(compose-region): Mention the special handling of TAB.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
5d374ce1 3# Generated by GNU Autoconf 2.61 for emacs 23.0.60.
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'
5d374ce1
AS
575PACKAGE_VERSION='23.0.60'
576PACKAGE_STRING='emacs 23.0.60'
9cf8f393 577PACKAGE_BUGREPORT=''
c0d27fcc 578
503d2be0
AS
579ac_unique_file="src/lisp.h"
580# Factoring default headers for most tests.
581ac_includes_default="\
582#include <stdio.h>
f053c89f 583#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
584# include <sys/types.h>
585#endif
f053c89f 586#ifdef HAVE_SYS_STAT_H
503d2be0
AS
587# include <sys/stat.h>
588#endif
f053c89f 589#ifdef STDC_HEADERS
503d2be0
AS
590# include <stdlib.h>
591# include <stddef.h>
592#else
f053c89f 593# ifdef HAVE_STDLIB_H
503d2be0
AS
594# include <stdlib.h>
595# endif
596#endif
f053c89f
CY
597#ifdef HAVE_STRING_H
598# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
599# include <memory.h>
600# endif
601# include <string.h>
602#endif
f053c89f 603#ifdef HAVE_STRINGS_H
503d2be0
AS
604# include <strings.h>
605#endif
f053c89f 606#ifdef HAVE_INTTYPES_H
503d2be0 607# include <inttypes.h>
503d2be0 608#endif
f053c89f 609#ifdef HAVE_STDINT_H
ca81d7a0 610# include <stdint.h>
503d2be0 611#endif
f053c89f 612#ifdef HAVE_UNISTD_H
503d2be0
AS
613# include <unistd.h>
614#endif"
ba4481b5 615
a51f4969 616ac_config_libobj_dir=src
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
5d374ce1 1251\`configure' configures emacs 23.0.60 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 1324 case $ac_init_help in
5d374ce1 1325 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 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]
d0098f13 1335 --enable-asserts compile code with asserts enabled
709e90de
AS
1336 --enable-maintainer-mode
1337 enable make rules and dependencies not useful (and
1338 sometimes confusing) to the casual installer
9adfabc2
LK
1339 --enable-locallisppath=PATH
1340 directories Emacs should search for lisp files
1341 specific to this site
503d2be0
AS
1342 --disable-largefile omit support for large files
1343
1344Optional Packages:
1345 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1346 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1347 --without-pop don't support POP mail retrieval with movemail
1348 --with-kerberos support Kerberos-authenticated POP
1349 --with-kerberos5 support Kerberos version 5 authenticated POP
1350 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1351 --without-sound don't compile with sound support
a51f4969 1352 --without-sync-input Process async input synchronously
49adb60f
TTN
1353 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1354 motif, gtk, no)
c8467c40
GM
1355 --without-xpm don't compile with XPM image support
1356 --without-jpeg don't compile with JPEG image support
1357 --without-tiff don't compile with TIFF image support
1358 --without-gif don't compile with GIF image support
1359 --without-png don't compile with PNG image support
1360 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1361 --without-freetype don't use Freetype for local font support
1362 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1363 --without-libotf don't use libotf for OpenType font support
1364 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1365 --without-toolkit-scroll-bars
cc227489 1366 don't use Motif or Xaw3d scroll bars
c982cf7d 1367 --without-xaw3d don't use Xaw3d
cc227489 1368 --without-xim don't use X11 XIM
2aea825c 1369 --with-carbon use Carbon GUI on Mac OS X. This is unsupported!
c8467c40
GM
1370 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1371 console
b5a922de 1372 --without-dbus don't compile with D-Bus support
921fbdf0 1373 --without-makeinfo don't require makeinfo for building manuals
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
5d374ce1 1453emacs configure 23.0.60
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
5d374ce1 1467It was created by emacs $as_me 23.0.60, 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
a51f4969
SM
1935# Check whether --with-sync-input was given.
1936if test "${with_sync_input+set}" = set; then
1937 withval=$with_sync_input;
1938else
1939 with_sync_input=yes
1940fi
1941
1942if test "$with_sync_input" = yes; then
1943
1944cat >>confdefs.h <<\_ACEOF
1945#define SYNC_INPUT 1
1946_ACEOF
1947
1948fi
1949
1950
ca81d7a0 1951# Check whether --with-x-toolkit was given.
ba4481b5 1952if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1953 withval=$with_x_toolkit; case "${withval}" in
089a966d 1954 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1955 n | no ) val=no ;;
1956 l | lu | luc | luci | lucid ) val=lucid ;;
1957 a | at | ath | athe | athen | athena ) val=athena ;;
1958 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1959 g | gt | gtk ) val=gtk ;;
ba4481b5 1960 * )
29d69661 1961{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1962this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1963\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1964echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1965this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1966\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1967 { (exit 1); exit 1; }; }
ba4481b5
DL
1968 ;;
1969 esac
1970 with_x_toolkit=$val
1971
ca81d7a0 1972fi
8eeae1c9 1973
ba4481b5 1974
49adb60f 1975
ca81d7a0 1976# Check whether --with-xpm was given.
ba4481b5 1977if test "${with_xpm+set}" = set; then
ca81d7a0 1978 withval=$with_xpm;
00b9c927 1979else
c8467c40 1980 with_xpm=yes
ca81d7a0 1981fi
503d2be0 1982
ba4481b5 1983
ca81d7a0 1984# Check whether --with-jpeg was given.
ba4481b5 1985if test "${with_jpeg+set}" = set; then
ca81d7a0 1986 withval=$with_jpeg;
00b9c927 1987else
c8467c40 1988 with_jpeg=yes
ca81d7a0 1989fi
503d2be0 1990
ba4481b5 1991
ca81d7a0 1992# Check whether --with-tiff was given.
ba4481b5 1993if test "${with_tiff+set}" = set; then
ca81d7a0 1994 withval=$with_tiff;
00b9c927 1995else
c8467c40 1996 with_tiff=yes
ca81d7a0 1997fi
503d2be0 1998
ba4481b5 1999
ca81d7a0 2000# Check whether --with-gif was given.
ba4481b5 2001if test "${with_gif+set}" = set; then
ca81d7a0 2002 withval=$with_gif;
00b9c927 2003else
c8467c40 2004 with_gif=yes
ca81d7a0 2005fi
503d2be0 2006
ba4481b5 2007
ca81d7a0 2008# Check whether --with-png was given.
ba4481b5 2009if test "${with_png+set}" = set; then
ca81d7a0 2010 withval=$with_png;
00b9c927 2011else
c8467c40 2012 with_png=yes
ca81d7a0 2013fi
503d2be0 2014
ba4481b5 2015
0cfc0546
GM
2016# Check whether --with-rsvg was given.
2017if test "${with_rsvg+set}" = set; then
2018 withval=$with_rsvg;
00b9c927 2019else
c8467c40 2020 with_rsvg=yes
0cfc0546
GM
2021fi
2022
2023
c8467c40 2024
c24fa7dc 2025# Check whether --with-freetype was given.
45a4b03e 2026if test "${with_freetype+set}" = set; then
c24fa7dc 2027 withval=$with_freetype;
d235ca2f 2028else
4efcc8d1 2029 with_freetype=yes
c24fa7dc 2030fi
45a4b03e 2031
45a4b03e 2032
c24fa7dc 2033# Check whether --with-xft was given.
45a4b03e 2034if test "${with_xft+set}" = set; then
c24fa7dc 2035 withval=$with_xft;
d235ca2f 2036else
4efcc8d1 2037 with_xft=yes
c24fa7dc 2038fi
45a4b03e 2039
45a4b03e 2040
d235ca2f
MB
2041# Check whether --with-libotf was given.
2042if test "${with_libotf+set}" = set; then
2043 withval=$with_libotf;
2044else
2045 with_libotf=yes
79011b82
NR
2046fi
2047
2048
d235ca2f
MB
2049# Check whether --with-m17n-flt was given.
2050if test "${with_m17n_flt+set}" = set; then
2051 withval=$with_m17n_flt;
2052else
2053 with_m17n_flt=yes
0cfc0546
GM
2054fi
2055
2056
d235ca2f 2057
ca81d7a0 2058# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2059if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2060 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2061else
2062 with_toolkit_scroll_bars=yes
ca81d7a0 2063fi
503d2be0 2064
ba4481b5 2065
e35a28cd
TTN
2066# Check whether --with-xaw3d was given.
2067if test "${with_xaw3d+set}" = set; then
2068 withval=$with_xaw3d;
00b9c927
MO
2069else
2070 with_xaw3d=yes
c982cf7d
JD
2071fi
2072
2073
ca81d7a0 2074# Check whether --with-xim was given.
1d36487c 2075if test "${with_xim+set}" = set; then
ca81d7a0 2076 withval=$with_xim;
00b9c927
MO
2077else
2078 with_xim=yes
ca81d7a0 2079fi
1d36487c 2080
ba4481b5 2081
ca81d7a0 2082# Check whether --with-carbon was given.
e0f712ba 2083if test "${with_carbon+set}" = set; then
ca81d7a0 2084 withval=$with_carbon;
00b9c927 2085else
c8467c40
GM
2086 with_carbon=no
2087fi
2088
2089
2090
2091# Check whether --with-gpm was given.
2092if test "${with_gpm+set}" = set; then
2093 withval=$with_gpm;
2094else
2095 with_gpm=yes
ca81d7a0 2096fi
e0f712ba 2097
49adb60f 2098
131e4133
MA
2099# Check whether --with-dbus was given.
2100if test "${with_dbus+set}" = set; then
2101 withval=$with_dbus;
00b9c927 2102else
b5a922de 2103 with_dbus=yes
131e4133
MA
2104fi
2105
2106
921fbdf0
GM
2107## For the times when you want to build Emacs but don't have
2108## a suitable makeinfo, and can live without the manuals.
2109
2110# Check whether --with-makeinfo was given.
2111if test "${with_makeinfo+set}" = set; then
2112 withval=$with_makeinfo;
2113else
2114 with_makeinfo=yes
2115fi
2116
2117
e70b2110 2118
9d2818d6
DN
2119# Check whether --with-gtk was given.
2120if test "${with_gtk+set}" = set; then
2121 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2122specify a toolkit." >&5
2123echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2124specify a toolkit." >&2;}
2125 { (exit 1); exit 1; }; }
2126fi
2127
2128
2129
2130# Check whether --with-gcc was given.
2131if test "${with_gcc+set}" = set; then
2132 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
2133 variable to specify a compiler." >&5
2134echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
2135 variable to specify a compiler." >&2;}
2136 { (exit 1); exit 1; }; }
2137fi
2138
2139
2140
00b9c927
MO
2141# Check whether --with-pkg-config-prog was given.
2142if test "${with_pkg_config_prog+set}" = set; then
2143 withval=$with_pkg_config_prog;
e70b2110
KH
2144fi
2145
00b9c927
MO
2146if test "X${with_pkg_config_prog}" != X; then
2147 if test "${with_pkg_config_prog}" != yes; then
2148 PKG_CONFIG="${with_pkg_config_prog}"
2149 fi
2150fi
e70b2110 2151
ca81d7a0 2152# Check whether --enable-carbon-app was given.
6a3a24fa 2153if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
2154 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2155fi
2156
e0f712ba 2157
c24fa7dc 2158# Check whether --enable-asserts was given.
d0098f13 2159if test "${enable_asserts+set}" = set; then
ca81d7a0 2160 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2161else
2162 USE_XASSERTS=no
ca81d7a0 2163fi
8eeae1c9 2164
d0098f13 2165
ca81d7a0 2166# Check whether --enable-maintainer-mode was given.
19650fd6 2167if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2168 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2169else
2170 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2171fi
2172
19650fd6
AS
2173if test $USE_MAINTAINER_MODE = yes; then
2174 MAINT=
2175else
2176 MAINT=#
2177fi
2178
2179
ca81d7a0 2180# Check whether --enable-locallisppath was given.
9adfabc2 2181if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2182 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2183 locallisppath=
2184elif test "${enableval}" != "yes"; then
2185 locallisppath=${enableval}
2186fi
ca81d7a0
JD
2187fi
2188
9adfabc2 2189
ba4481b5 2190#### Make srcdir absolute, if it isn't already. It's important to
17494071 2191#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2192#### give you automounter prefixes, which can go away. We do all this
2193#### so Emacs can find its files when run uninstalled.
17494071
GM
2194## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2195unset CDPATH
ba4481b5
DL
2196case "${srcdir}" in
2197 /* ) ;;
2198 . )
2199 ## We may be able to use the $PWD environment variable to make this
2200 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2201 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2202 ## but that tested only for a well-formed and valid PWD,
2203 ## it did not object when PWD was well-formed and valid but just wrong.
2204 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2205 then
2206 srcdir="$PWD"
2207 else
2208 srcdir="`(cd ${srcdir}; pwd)`"
2209 fi
2210 ;;
2211 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2212esac
2213
2214#### Check if the source directory already has a configured system in it.
2215if test `pwd` != `(cd ${srcdir} && pwd)` \
2216 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2217 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2218 as a build directory right now; it has been configured in its own
2219 right. To configure in another directory as well, you MUST
2220 use GNU make. If you do not have GNU make, then you must
2221 now do \`make distclean' in ${srcdir},
2222 and then run $0 again." >&5
2223echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2224 as a build directory right now; it has been configured in its own
2225 right. To configure in another directory as well, you MUST
2226 use GNU make. If you do not have GNU make, then you must
2227 now do \`make distclean' in ${srcdir},
503d2be0 2228 and then run $0 again." >&2;}
ba4481b5
DL
2229fi
2230
2231#### Given the configuration name, set machfile and opsysfile to the
2232#### names of the m/*.h and s/*.h files we should use.
2233
2234### Canonicalize the configuration name.
2235
2236ac_aux_dir=
ca81d7a0
JD
2237for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2238 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2239 ac_aux_dir=$ac_dir
2240 ac_install_sh="$ac_aux_dir/install-sh -c"
2241 break
ca81d7a0 2242 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2243 ac_aux_dir=$ac_dir
2244 ac_install_sh="$ac_aux_dir/install.sh -c"
2245 break
ca81d7a0 2246 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2247 ac_aux_dir=$ac_dir
2248 ac_install_sh="$ac_aux_dir/shtool install -c"
2249 break
ba4481b5
DL
2250 fi
2251done
2252if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2253 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2254echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2255 { (exit 1); exit 1; }; }
ba4481b5 2256fi
ca81d7a0
JD
2257
2258# These three variables are undocumented and unsupported,
2259# and are intended to be withdrawn in a future Autoconf release.
2260# They can cause serious problems if a builder's source tree is in a directory
2261# whose full name contains unusual characters.
2262ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2263ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2264ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2265
ba4481b5
DL
2266
2267# Make sure we can run config.sub.
ca81d7a0
JD
2268$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2269 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2270echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2271 { (exit 1); exit 1; }; }
2272
ca81d7a0
JD
2273{ echo "$as_me:$LINENO: checking build system type" >&5
2274echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2275if test "${ac_cv_build+set}" = set; then
2276 echo $ECHO_N "(cached) $ECHO_C" >&6
2277else
ca81d7a0
JD
2278 ac_build_alias=$build_alias
2279test "x$ac_build_alias" = x &&
2280 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2281test "x$ac_build_alias" = x &&
c0d27fcc 2282 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2283echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2284 { (exit 1); exit 1; }; }
ca81d7a0
JD
2285ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2286 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2287echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2288 { (exit 1); exit 1; }; }
2289
2290fi
ca81d7a0
JD
2291{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2292echo "${ECHO_T}$ac_cv_build" >&6; }
2293case $ac_cv_build in
2294*-*-*) ;;
2295*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2296echo "$as_me: error: invalid value of canonical build" >&2;}
2297 { (exit 1); exit 1; }; };;
2298esac
503d2be0 2299build=$ac_cv_build
ca81d7a0
JD
2300ac_save_IFS=$IFS; IFS='-'
2301set x $ac_cv_build
2302shift
2303build_cpu=$1
2304build_vendor=$2
2305shift; shift
2306# Remember, the first character of IFS is used to create $*,
2307# except with old shells:
2308build_os=$*
2309IFS=$ac_save_IFS
2310case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2311
2312
2313{ echo "$as_me:$LINENO: checking host system type" >&5
2314echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2315if test "${ac_cv_host+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2317else
ca81d7a0
JD
2318 if test "x$host_alias" = x; then
2319 ac_cv_host=$ac_cv_build
2320else
2321 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2322 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2323echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2324 { (exit 1); exit 1; }; }
ca81d7a0 2325fi
503d2be0
AS
2326
2327fi
ca81d7a0
JD
2328{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2329echo "${ECHO_T}$ac_cv_host" >&6; }
2330case $ac_cv_host in
2331*-*-*) ;;
2332*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2333echo "$as_me: error: invalid value of canonical host" >&2;}
2334 { (exit 1); exit 1; }; };;
2335esac
503d2be0 2336host=$ac_cv_host
ca81d7a0
JD
2337ac_save_IFS=$IFS; IFS='-'
2338set x $ac_cv_host
2339shift
2340host_cpu=$1
2341host_vendor=$2
2342shift; shift
2343# Remember, the first character of IFS is used to create $*,
2344# except with old shells:
2345host_os=$*
2346IFS=$ac_save_IFS
2347case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2348
c0d27fcc 2349
ba4481b5 2350canonical=$host
1770dcdc 2351configuration=${host_alias-${build_alias-$host}}
ba4481b5 2352
c0d27fcc 2353
22044edf 2354
ba4481b5
DL
2355### If you add support for a new configuration, add code to this
2356### switch statement to recognize your configuration name and select
2357### the appropriate operating system and machine description files.
2358
2359### You would hope that you could choose an m/*.h file pretty much
2360### based on the machine portion of the configuration name, and an s-
2361### file based on the operating system portion. However, it turns out
2362### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2363### example mips.h is MIPS
2364### So we basically have to have a special case for each
ba4481b5
DL
2365### configuration name.
2366###
2367### As far as handling version numbers on operating systems is
2368### concerned, make sure things will fail in a fixable way. If
2369### /etc/MACHINES doesn't say anything about version numbers, be
2370### prepared to handle anything reasonably. If version numbers
2371### matter, be sure /etc/MACHINES says something about it.
2372###
2373### Eric Raymond says we should accept strings like "sysvr4" to mean
2374### "System V Release 4"; he writes, "The old convention encouraged
2375### confusion between `system' and `release' levels'."
2376
2377machine='' opsys='' unported=no
2378case "${canonical}" in
2379
1096bcc0
GM
2380 ## FreeBSD ports
2381 *-*-freebsd* )
2382 opsys=freebsd
2383 case "${canonical}" in
2384 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2385 arm*-*-freebsd*) machine=arm ;;
ec8fcb10
YM
2386 ia64-*-freebsd*) machine=ia64 ;;
2387 sparc64-*-freebsd*) machine=sparc ;;
2388 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2389 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2390 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2391 esac
2392 ;;
2393
1b275743
GM
2394 ## FreeBSD kernel + glibc based userland
2395 *-*-kfreebsd*gnu* )
2396 opsys=gnu-kfreebsd
2397 case "${canonical}" in
2398 alpha*-*-kfreebsd*) machine=alpha ;;
2399 ia64-*-kfreebsd*) machine=ia64 ;;
2400 sparc64-*-kfreebsd*) machine=sparc ;;
2401 powerpc-*-kfreebsd*) machine=macppc ;;
2402 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2403 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2404 esac
2405 ;;
2406
ba4481b5
DL
2407 ## NetBSD ports
2408 *-*-netbsd* )
2409 opsys=netbsd
dd038e26 2410 if test -f /usr/lib/crti.o; then
f57bd967
DL
2411
2412cat >>confdefs.h <<\_ACEOF
2413#define HAVE_CRTIN
dd038e26
AS
2414_ACEOF
2415
2416 fi
2417
ba4481b5
DL
2418 case "${canonical}" in
2419 alpha*-*-netbsd*) machine=alpha ;;
2420 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2421 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2422 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2423 vax-*-netbsd*) machine=vax ;;
2df636f4 2424 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2425 x86_64-*-netbsd*) machine=amdx86-64 ;;
2426 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2427 esac
2428 ;;
2429
2430 ## OpenBSD ports
2431 *-*-openbsd* )
2432 opsys=openbsd
2433 case "${canonical}" in
2434 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2435 arm-*-openbsd*) machine=arm ;;
85410b02 2436 i386-*-openbsd*) machine=intel386 ;;
85410b02 2437 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2438 sparc*-*-openbsd*) machine=sparc ;;
2439 vax-*-openbsd*) machine=vax ;;
2440 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2441 esac
2442 ;;
2443
10a3b1a1
EZ
2444 ## LynxOS ports
2445 *-*-lynxos* )
2446 opsys=lynxos
2447 case "${canonical}" in
2448 i[3456]86-*-lynxos*) machine=intel386 ;;
2449 powerpc-*-lynxos*) machine=powerpc ;;
2450 esac
2451 ;;
2452
ba4481b5
DL
2453 alpha*-*-linux-gnu* )
2454 machine=alpha opsys=gnu-linux
2455 ;;
2456
c4bb2108
DL
2457 arm*-*-linux-gnu* )
2458 machine=arm opsys=gnu-linux
2459 ;;
2460
040c474e
CY
2461 ## Apple Darwin / Mac OS X
2462 *-apple-darwin* )
2463 case "${canonical}" in
2464 i[3456]86-* ) machine=intel386 ;;
2465 powerpc-* ) machine=powermac ;;
2466 * ) unported=yes ;;
2467 esac
2468 opsys=darwin
2469 # Define CPP as follows to make autoconf work correctly.
2470 CPP="${CC-cc} -E -no-cpp-precomp"
2471 # Use fink packages if available.
2472 if test -d /sw/include && test -d /sw/lib; then
2473 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2474 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2475 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2476 fi
2477 ;;
2478
6fbb6db1 2479 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2480 hppa*-hp-hpux10.2* )
2481 machine=hp800 opsys=hpux10-20
2482 ;;
6fbb6db1
GM
2483 hppa*-hp-hpux1[1-9]* )
2484 machine=hp800 opsys=hpux11
2485 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2486 ;;
2487
409d9577
GM
2488 hppa*-*-linux-gnu* )
2489 machine=hp800 opsys=gnu-linux
2490 ;;
2491
ba4481b5 2492 ## IBM machines
55597d70 2493 s390-*-linux-gnu* )
138f0859
GM
2494 machine=ibms390 opsys=gnu-linux
2495 ;;
bcdb1378
EZ
2496 s390x-*-linux-gnu* )
2497 machine=ibms390x opsys=gnu-linux
2498 ;;
ba4481b5
DL
2499 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2500 machine=ibmrs6000 opsys=aix4-2
2501 ;;
67bf991b
CY
2502 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2503 machine=ibmrs6000 opsys=aix4-2
2504 ;;
55597d70 2505 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2506 machine=ibmrs6000 opsys=aix4-2
2507 ;;
26a42dac
DN
2508 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2509 machine=ibmrs6000 opsys=aix4-2
2510 ;;
ba4481b5 2511
c76e04a8
GM
2512 ## Macintosh PowerPC
2513 powerpc*-*-linux-gnu* )
2514 machine=macppc opsys=gnu-linux
2515 ;;
2516
ba4481b5 2517 ## Silicon Graphics machines
ba4481b5 2518 ## Iris 4D
ba4481b5
DL
2519 mips-sgi-irix6.5 )
2520 machine=iris4d opsys=irix6-5
946173ad
DL
2521 # Without defining _LANGUAGE_C, things get masked out in the headers
2522 # so that, for instance, grepping for `free' in stdlib.h fails and
2523 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2524 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2525 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2526 ;;
ba4481b5 2527
ba4481b5
DL
2528 ## Suns
2529 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2530 machine=sparc opsys=gnu-linux
2531 ;;
2532
d054101f 2533 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2534 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2535 | rs6000-*-solaris2*)
2536 case "${canonical}" in
ba4481b5 2537 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2538 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2539 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2540 sparc* ) machine=sparc ;;
2541 * ) unported=yes ;;
2542 esac
2543 case "${canonical}" in
ba4481b5
DL
2544 *-sunos5.3* | *-solaris2.3* )
2545 opsys=sol2-3
2546 NON_GNU_CPP=/usr/ccs/lib/cpp
2547 ;;
2548 *-sunos5.4* | *-solaris2.4* )
2549 opsys=sol2-4
2550 NON_GNU_CPP=/usr/ccs/lib/cpp
2551 RANLIB="ar -ts"
2552 ;;
2553 *-sunos5.5* | *-solaris2.5* )
2554 opsys=sol2-5
2555 NON_GNU_CPP=/usr/ccs/lib/cpp
2556 RANLIB="ar -ts"
2557 ;;
8e967cf7
MR
2558 *-sunos5.6* | *-solaris2.6* )
2559 opsys=sol2-6
2560 NON_GNU_CPP=/usr/ccs/lib/cpp
2561 RANLIB="ar -ts"
2562 ;;
ba4481b5 2563 *-sunos5* | *-solaris* )
9e71690e 2564 opsys=sol2-6
089a966d
GM
2565 emacs_check_sunpro_c=yes
2566 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2567 ;;
ba4481b5
DL
2568 esac
2569 ## Watch out for a compiler that we know will not work.
2570 case "${canonical}" in
2571 *-solaris* | *-sunos5* )
2572 if [ "x$CC" = x/usr/ucb/cc ]; then
2573 ## /usr/ucb/cc doesn't work;
2574 ## we should find some other compiler that does work.
2575 unset CC
2576 fi
2577 ;;
2578 *) ;;
2579 esac
2580 ;;
ba4481b5 2581
ba4481b5
DL
2582 ## Vaxen.
2583 vax-dec-* )
2584 machine=vax
2585 case "${canonical}" in
ba4481b5
DL
2586 *-vms* ) opsys=vms ;;
2587 * ) unported=yes
2588 esac
2589 ;;
2590
f4988be7
GM
2591 ## IA-64
2592 ia64*-*-linux* )
2593 machine=ia64 opsys=gnu-linux
2594 ;;
2595
ba4481b5
DL
2596 ## Intel 386 machines where we don't care about the manufacturer
2597 i[3456]86-*-* )
2598 machine=intel386
2599 case "${canonical}" in
c60ee5e7 2600 *-cygwin ) opsys=cygwin ;;
eae54018 2601 *-darwin* ) opsys=darwin
23fd4483
ST
2602 CPP="${CC-cc} -E -no-cpp-precomp"
2603 ;;
ba4481b5 2604 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2605 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2606 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2607 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2608 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2609 esac
2610 ;;
2611
2612 ## m68k Linux-based GNU system
2613 m68k-*-linux-gnu* )
2614 machine=m68k opsys=gnu-linux
2615 ;;
2616
2617 ## Mips Linux-based GNU system
cd958eb3 2618 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2619 machine=mips opsys=gnu-linux
2620 ;;
2621
598a2813
AS
2622 ## AMD x86-64 Linux-based GNU system
2623 x86_64-*-linux-gnu* )
24b01ec4 2624 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2625 ;;
2626
94218e27 2627 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2628 xtensa*-*-linux-gnu* )
94218e27
DN
2629 machine=xtensa opsys=gnu-linux
2630 ;;
2631
ba4481b5
DL
2632 * )
2633 unported=yes
2634 ;;
2635esac
2636
2637### If the code above didn't choose an operating system, just choose
2638### an operating system based on the configuration name. You really
2639### only want to use this when you have no idea what the right
2640### operating system is; if you know what operating systems a machine
2641### runs, it's cleaner to make it explicit in the case statement
2642### above.
2643if test x"${opsys}" = x; then
2644 case "${canonical}" in
2645 *-gnu* ) opsys=gnu ;;
ba4481b5 2646 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2647 *-sysv5uw* ) opsys=unixware ;;
2648 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2649 *-sysv4.1* | *-sysvr4.1* )
2650 NON_GNU_CPP=/usr/lib/cpp
2651 opsys=usg5-4 ;;
2652 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2653 if [ x$NON_GNU_CPP = x ]; then
2654 if [ -f /usr/ccs/lib/cpp ]; then
2655 NON_GNU_CPP=/usr/ccs/lib/cpp
2656 else
2657 NON_GNU_CPP=/lib/cpp
2658 fi
2659 fi
2660 opsys=usg5-4-2 ;;
2661 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2662 * )
2663 unported=yes
2664 ;;
2665 esac
2666fi
2667
c0d27fcc 2668
22044edf 2669
ba4481b5 2670if test $unported = yes; then
c0d27fcc 2671 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2672Check \`etc/MACHINES' for recognized configuration names." >&5
2673echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2674Check \`etc/MACHINES' for recognized configuration names." >&2;}
2675 { (exit 1); exit 1; }; }
ba4481b5
DL
2676fi
2677
2678machfile="m/${machine}.h"
2679opsysfile="s/${opsys}.h"
2680
c0d27fcc 2681
ba4481b5
DL
2682#### Choose a compiler.
2683test -n "$CC" && cc_specified=yes
2684
2685# Save the value of CFLAGS that the user specified.
2686SPECIFIED_CFLAGS="$CFLAGS"
2687
503d2be0
AS
2688ac_ext=c
2689ac_cpp='$CPP $CPPFLAGS'
2690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2692ac_compiler_gnu=$ac_cv_c_compiler_gnu
2693if test -n "$ac_tool_prefix"; then
2694 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2695set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2696{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2697echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2698if test "${ac_cv_prog_CC+set}" = set; then
2699 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2700else
2701 if test -n "$CC"; then
2702 ac_cv_prog_CC="$CC" # Let the user override the test.
2703else
c0d27fcc
MR
2704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2705for as_dir in $PATH
2706do
2707 IFS=$as_save_IFS
2708 test -z "$as_dir" && as_dir=.
2709 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2710 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2711 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2712 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2713 break 2
2714 fi
2715done
503d2be0 2716done
ca81d7a0 2717IFS=$as_save_IFS
503d2be0 2718
ba4481b5
DL
2719fi
2720fi
503d2be0 2721CC=$ac_cv_prog_CC
ba4481b5 2722if test -n "$CC"; then
ca81d7a0
JD
2723 { echo "$as_me:$LINENO: result: $CC" >&5
2724echo "${ECHO_T}$CC" >&6; }
503d2be0 2725else
ca81d7a0
JD
2726 { echo "$as_me:$LINENO: result: no" >&5
2727echo "${ECHO_T}no" >&6; }
503d2be0
AS
2728fi
2729
ca81d7a0 2730
503d2be0
AS
2731fi
2732if test -z "$ac_cv_prog_CC"; then
2733 ac_ct_CC=$CC
2734 # Extract the first word of "gcc", so it can be a program name with args.
2735set dummy gcc; ac_word=$2
ca81d7a0
JD
2736{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2738if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
2740else
2741 if test -n "$ac_ct_CC"; then
2742 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2743else
c0d27fcc
MR
2744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2745for as_dir in $PATH
2746do
2747 IFS=$as_save_IFS
2748 test -z "$as_dir" && as_dir=.
2749 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2750 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2751 ac_cv_prog_ac_ct_CC="gcc"
2752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2753 break 2
2754 fi
2755done
503d2be0 2756done
ca81d7a0 2757IFS=$as_save_IFS
503d2be0
AS
2758
2759fi
2760fi
2761ac_ct_CC=$ac_cv_prog_ac_ct_CC
2762if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2763 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2764echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2765else
ca81d7a0
JD
2766 { echo "$as_me:$LINENO: result: no" >&5
2767echo "${ECHO_T}no" >&6; }
503d2be0
AS
2768fi
2769
ca81d7a0
JD
2770 if test "x$ac_ct_CC" = x; then
2771 CC=""
2772 else
2773 case $cross_compiling:$ac_tool_warned in
2774yes:)
2775{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2776whose name does not start with the host triplet. If you think this
2777configuration is useful to you, please write to autoconf@gnu.org." >&5
2778echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2779whose name does not start with the host triplet. If you think this
2780configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2781ac_tool_warned=yes ;;
2782esac
2783 CC=$ac_ct_CC
2784 fi
503d2be0
AS
2785else
2786 CC="$ac_cv_prog_CC"
ba4481b5
DL
2787fi
2788
2789if test -z "$CC"; then
ca81d7a0
JD
2790 if test -n "$ac_tool_prefix"; then
2791 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2792set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2793{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2795if test "${ac_cv_prog_CC+set}" = set; then
2796 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2797else
2798 if test -n "$CC"; then
2799 ac_cv_prog_CC="$CC" # Let the user override the test.
2800else
c0d27fcc
MR
2801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2802for as_dir in $PATH
2803do
2804 IFS=$as_save_IFS
2805 test -z "$as_dir" && as_dir=.
2806 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2807 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2808 ac_cv_prog_CC="${ac_tool_prefix}cc"
2809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2810 break 2
2811 fi
2812done
503d2be0 2813done
ca81d7a0 2814IFS=$as_save_IFS
503d2be0
AS
2815
2816fi
2817fi
2818CC=$ac_cv_prog_CC
2819if test -n "$CC"; then
ca81d7a0
JD
2820 { echo "$as_me:$LINENO: result: $CC" >&5
2821echo "${ECHO_T}$CC" >&6; }
503d2be0 2822else
ca81d7a0
JD
2823 { echo "$as_me:$LINENO: result: no" >&5
2824echo "${ECHO_T}no" >&6; }
503d2be0
AS
2825fi
2826
503d2be0 2827
ca81d7a0 2828 fi
503d2be0
AS
2829fi
2830if test -z "$CC"; then
2831 # Extract the first word of "cc", so it can be a program name with args.
2832set dummy cc; ac_word=$2
ca81d7a0
JD
2833{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2834echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2835if test "${ac_cv_prog_CC+set}" = set; then
2836 echo $ECHO_N "(cached) $ECHO_C" >&6
2837else
2838 if test -n "$CC"; then
2839 ac_cv_prog_CC="$CC" # Let the user override the test.
2840else
2841 ac_prog_rejected=no
c0d27fcc
MR
2842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2843for as_dir in $PATH
2844do
2845 IFS=$as_save_IFS
2846 test -z "$as_dir" && as_dir=.
2847 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2848 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2849 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2850 ac_prog_rejected=yes
2851 continue
2852 fi
2853 ac_cv_prog_CC="cc"
2854 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2855 break 2
2856 fi
2857done
503d2be0 2858done
ca81d7a0 2859IFS=$as_save_IFS
503d2be0 2860
ba4481b5
DL
2861if test $ac_prog_rejected = yes; then
2862 # We found a bogon in the path, so make sure we never use it.
2863 set dummy $ac_cv_prog_CC
2864 shift
503d2be0 2865 if test $# != 0; then
ba4481b5
DL
2866 # We chose a different compiler from the bogus one.
2867 # However, it has the same basename, so the bogon will be chosen
2868 # first if we set CC to just the basename; use the full file name.
2869 shift
6bae0ccf 2870 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2871 fi
2872fi
2873fi
2874fi
503d2be0 2875CC=$ac_cv_prog_CC
ba4481b5 2876if test -n "$CC"; then
ca81d7a0
JD
2877 { echo "$as_me:$LINENO: result: $CC" >&5
2878echo "${ECHO_T}$CC" >&6; }
ba4481b5 2879else
ca81d7a0
JD
2880 { echo "$as_me:$LINENO: result: no" >&5
2881echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2882fi
2883
ca81d7a0 2884
503d2be0
AS
2885fi
2886if test -z "$CC"; then
2887 if test -n "$ac_tool_prefix"; then
ca81d7a0 2888 for ac_prog in cl.exe
503d2be0
AS
2889 do
2890 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2891set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2892{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2893echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2894if test "${ac_cv_prog_CC+set}" = set; then
2895 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2896else
2897 if test -n "$CC"; then
2898 ac_cv_prog_CC="$CC" # Let the user override the test.
2899else
c0d27fcc
MR
2900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2901for as_dir in $PATH
2902do
2903 IFS=$as_save_IFS
2904 test -z "$as_dir" && as_dir=.
2905 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2906 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2907 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2908 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2909 break 2
2910 fi
2911done
503d2be0 2912done
ca81d7a0 2913IFS=$as_save_IFS
503d2be0 2914
c4bb2108
DL
2915fi
2916fi
503d2be0 2917CC=$ac_cv_prog_CC
c4bb2108 2918if test -n "$CC"; then
ca81d7a0
JD
2919 { echo "$as_me:$LINENO: result: $CC" >&5
2920echo "${ECHO_T}$CC" >&6; }
c4bb2108 2921else
ca81d7a0
JD
2922 { echo "$as_me:$LINENO: result: no" >&5
2923echo "${ECHO_T}no" >&6; }
503d2be0
AS
2924fi
2925
ca81d7a0 2926
503d2be0
AS
2927 test -n "$CC" && break
2928 done
2929fi
2930if test -z "$CC"; then
2931 ac_ct_CC=$CC
ca81d7a0 2932 for ac_prog in cl.exe
503d2be0
AS
2933do
2934 # Extract the first word of "$ac_prog", so it can be a program name with args.
2935set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2936{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2937echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2938if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2939 echo $ECHO_N "(cached) $ECHO_C" >&6
2940else
2941 if test -n "$ac_ct_CC"; then
2942 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2943else
c0d27fcc
MR
2944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2945for as_dir in $PATH
2946do
2947 IFS=$as_save_IFS
2948 test -z "$as_dir" && as_dir=.
2949 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2950 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2951 ac_cv_prog_ac_ct_CC="$ac_prog"
2952 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2953 break 2
2954 fi
2955done
503d2be0 2956done
ca81d7a0 2957IFS=$as_save_IFS
503d2be0 2958
c4bb2108 2959fi
503d2be0
AS
2960fi
2961ac_ct_CC=$ac_cv_prog_ac_ct_CC
2962if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2963 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2964echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 2965else
ca81d7a0
JD
2966 { echo "$as_me:$LINENO: result: no" >&5
2967echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2968fi
2969
ca81d7a0 2970
503d2be0
AS
2971 test -n "$ac_ct_CC" && break
2972done
ba4481b5 2973
ca81d7a0
JD
2974 if test "x$ac_ct_CC" = x; then
2975 CC=""
2976 else
2977 case $cross_compiling:$ac_tool_warned in
2978yes:)
2979{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2980whose name does not start with the host triplet. If you think this
2981configuration is useful to you, please write to autoconf@gnu.org." >&5
2982echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2983whose name does not start with the host triplet. If you think this
2984configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2985ac_tool_warned=yes ;;
2986esac
2987 CC=$ac_ct_CC
2988 fi
503d2be0
AS
2989fi
2990
2991fi
ba4481b5 2992
c0d27fcc 2993
19650fd6
AS
2994test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2995See \`config.log' for more details." >&5
2996echo "$as_me: error: no acceptable C compiler found in \$PATH
2997See \`config.log' for more details." >&2;}
503d2be0 2998 { (exit 1); exit 1; }; }
c4bb2108 2999
503d2be0 3000# Provide some information about the compiler.
ca81d7a0 3001echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3002ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3003{ (ac_try="$ac_compiler --version >&5"
3004case "(($ac_try" in
3005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3006 *) ac_try_echo=$ac_try;;
3007esac
3008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3009 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3010 ac_status=$?
c0d27fcc 3011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3012 (exit $ac_status); }
ca81d7a0
JD
3013{ (ac_try="$ac_compiler -v >&5"
3014case "(($ac_try" in
3015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3016 *) ac_try_echo=$ac_try;;
3017esac
3018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3019 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3020 ac_status=$?
c0d27fcc 3021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3022 (exit $ac_status); }
ca81d7a0
JD
3023{ (ac_try="$ac_compiler -V >&5"
3024case "(($ac_try" in
3025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026 *) ac_try_echo=$ac_try;;
3027esac
3028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3029 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3030 ac_status=$?
c0d27fcc 3031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3032 (exit $ac_status); }
3033
3034cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3035/* confdefs.h. */
3036_ACEOF
3037cat confdefs.h >>conftest.$ac_ext
3038cat >>conftest.$ac_ext <<_ACEOF
3039/* end confdefs.h. */
c4bb2108 3040
503d2be0
AS
3041int
3042main ()
3043{
3044
3045 ;
3046 return 0;
3047}
3048_ACEOF
3049ac_clean_files_save=$ac_clean_files
19650fd6 3050ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3051# Try to create an executable without -o first, disregard a.out.
3052# It will help us diagnose broken compilers, and finding out an intuition
3053# of exeext.
ca81d7a0
JD
3054{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3055echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3056ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3057#
3058# List of possible output files, starting from the most likely.
3059# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3060# only as a last resort. b.out is created by i960 compilers.
3061ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3062#
3063# The IRIX 6 linker writes into existing files which may not be
3064# executable, retaining their permissions. Remove them first so a
3065# subsequent execution test works.
3066ac_rmfiles=
3067for ac_file in $ac_files
3068do
3069 case $ac_file in
3070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3071 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3072 esac
3073done
3074rm -f $ac_rmfiles
3075
3076if { (ac_try="$ac_link_default"
3077case "(($ac_try" in
3078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3079 *) ac_try_echo=$ac_try;;
3080esac
3081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3082 (eval "$ac_link_default") 2>&5
503d2be0 3083 ac_status=$?
c0d27fcc 3084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3085 (exit $ac_status); }; then
ca81d7a0
JD
3086 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3087# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3088# in a Makefile. We should not override ac_cv_exeext if it was cached,
3089# so that the user can short-circuit this test for compilers unknown to
3090# Autoconf.
f053c89f 3091for ac_file in $ac_files ''
19650fd6 3092do
6bae0ccf 3093 test -f "$ac_file" || continue
503d2be0 3094 case $ac_file in
ca81d7a0 3095 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3096 ;;
19650fd6 3097 [ab].out )
edfaf76d
LK
3098 # We found the default executable, but exeext='' is most
3099 # certainly right.
3100 break;;
19650fd6 3101 *.* )
ca81d7a0
JD
3102 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3103 then :; else
3104 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3105 fi
3106 # We set ac_cv_exeext here because the later test for it is not
3107 # safe: cross compilers may not add the suffix if given an `-o'
3108 # argument, so we may need to know it at that point already.
3109 # Even if this section looks crufty: it has the advantage of
3110 # actually working.
edfaf76d 3111 break;;
19650fd6 3112 * )
edfaf76d 3113 break;;
503d2be0
AS
3114 esac
3115done
ca81d7a0
JD
3116test "$ac_cv_exeext" = no && ac_cv_exeext=
3117
503d2be0 3118else
f053c89f
CY
3119 ac_file=''
3120fi
3121
3122{ echo "$as_me:$LINENO: result: $ac_file" >&5
3123echo "${ECHO_T}$ac_file" >&6; }
3124if test -z "$ac_file"; then
503d2be0 3125 echo "$as_me: failed program was:" >&5
19650fd6
AS
3126sed 's/^/| /' conftest.$ac_ext >&5
3127
6bae0ccf 3128{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3129See \`config.log' for more details." >&5
6bae0ccf 3130echo "$as_me: error: C compiler cannot create executables
19650fd6 3131See \`config.log' for more details." >&2;}
503d2be0
AS
3132 { (exit 77); exit 77; }; }
3133fi
3134
3135ac_exeext=$ac_cv_exeext
503d2be0 3136
ca81d7a0 3137# Check that the compiler produces executables we can run. If not, either
503d2be0 3138# the compiler is broken, or we cross compile.
ca81d7a0
JD
3139{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3140echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3141# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3142# If not cross compiling, check that we can run a simple program.
3143if test "$cross_compiling" != yes; then
3144 if { ac_try='./$ac_file'
ca81d7a0
JD
3145 { (case "(($ac_try" in
3146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3147 *) ac_try_echo=$ac_try;;
3148esac
3149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3150 (eval "$ac_try") 2>&5
503d2be0 3151 ac_status=$?
c0d27fcc 3152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3153 (exit $ac_status); }; }; then
3154 cross_compiling=no
ba4481b5 3155 else
503d2be0
AS
3156 if test "$cross_compiling" = maybe; then
3157 cross_compiling=yes
3158 else
c0d27fcc 3159 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3160If you meant to cross compile, use \`--host'.
3161See \`config.log' for more details." >&5
503d2be0 3162echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3163If you meant to cross compile, use \`--host'.
3164See \`config.log' for more details." >&2;}
503d2be0
AS
3165 { (exit 1); exit 1; }; }
3166 fi
ba4481b5 3167 fi
503d2be0 3168fi
ca81d7a0
JD
3169{ echo "$as_me:$LINENO: result: yes" >&5
3170echo "${ECHO_T}yes" >&6; }
503d2be0 3171
19650fd6 3172rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3173ac_clean_files=$ac_clean_files_save
ca81d7a0 3174# Check that the compiler produces executables we can run. If not, either
503d2be0 3175# the compiler is broken, or we cross compile.
ca81d7a0
JD
3176{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3177echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3178{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3179echo "${ECHO_T}$cross_compiling" >&6; }
3180
3181{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3182echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3183if { (ac_try="$ac_link"
3184case "(($ac_try" in
3185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186 *) ac_try_echo=$ac_try;;
3187esac
3188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3189 (eval "$ac_link") 2>&5
503d2be0 3190 ac_status=$?
c0d27fcc 3191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3192 (exit $ac_status); }; then
3193 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3194# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3195# work properly (i.e., refer to `conftest.exe'), while it won't with
3196# `rm'.
6bae0ccf
DL
3197for ac_file in conftest.exe conftest conftest.*; do
3198 test -f "$ac_file" || continue
503d2be0 3199 case $ac_file in
ca81d7a0 3200 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3201 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3202 break;;
503d2be0
AS
3203 * ) break;;
3204 esac
3205done
ba4481b5 3206else
19650fd6
AS
3207 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3208See \`config.log' for more details." >&5
3209echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3210See \`config.log' for more details." >&2;}
503d2be0 3211 { (exit 1); exit 1; }; }
ba4481b5 3212fi
ba4481b5 3213
503d2be0 3214rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3215{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3216echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3217
503d2be0
AS
3218rm -f conftest.$ac_ext
3219EXEEXT=$ac_cv_exeext
3220ac_exeext=$EXEEXT
ca81d7a0
JD
3221{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3222echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3223if test "${ac_cv_objext+set}" = set; then
3224 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3225else
503d2be0 3226 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3227/* confdefs.h. */
3228_ACEOF
3229cat confdefs.h >>conftest.$ac_ext
3230cat >>conftest.$ac_ext <<_ACEOF
3231/* end confdefs.h. */
ba4481b5 3232
503d2be0
AS
3233int
3234main ()
3235{
ba4481b5 3236
503d2be0
AS
3237 ;
3238 return 0;
3239}
3240_ACEOF
3241rm -f conftest.o conftest.obj
ca81d7a0
JD
3242if { (ac_try="$ac_compile"
3243case "(($ac_try" in
3244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3245 *) ac_try_echo=$ac_try;;
3246esac
3247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3248 (eval "$ac_compile") 2>&5
503d2be0 3249 ac_status=$?
c0d27fcc 3250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3251 (exit $ac_status); }; then
ca81d7a0
JD
3252 for ac_file in conftest.o conftest.obj conftest.*; do
3253 test -f "$ac_file" || continue;
503d2be0 3254 case $ac_file in
ca81d7a0 3255 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3256 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3257 break;;
3258 esac
3259done
c4bb2108 3260else
503d2be0 3261 echo "$as_me: failed program was:" >&5
19650fd6
AS
3262sed 's/^/| /' conftest.$ac_ext >&5
3263
3264{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3265See \`config.log' for more details." >&5
3266echo "$as_me: error: cannot compute suffix of object files: cannot compile
3267See \`config.log' for more details." >&2;}
503d2be0 3268 { (exit 1); exit 1; }; }
c4bb2108
DL
3269fi
3270
503d2be0
AS
3271rm -f conftest.$ac_cv_objext conftest.$ac_ext
3272fi
ca81d7a0
JD
3273{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3274echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3275OBJEXT=$ac_cv_objext
3276ac_objext=$OBJEXT
ca81d7a0
JD
3277{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3278echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3279if test "${ac_cv_c_compiler_gnu+set}" = set; then
3280 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3281else
503d2be0 3282 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3283/* confdefs.h. */
3284_ACEOF
3285cat confdefs.h >>conftest.$ac_ext
3286cat >>conftest.$ac_ext <<_ACEOF
3287/* end confdefs.h. */
503d2be0
AS
3288
3289int
3290main ()
3291{
3292#ifndef __GNUC__
3293 choke me
3294#endif
3295
3296 ;
3297 return 0;
3298}
3299_ACEOF
3300rm -f conftest.$ac_objext
ca81d7a0
JD
3301if { (ac_try="$ac_compile"
3302case "(($ac_try" in
3303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3304 *) ac_try_echo=$ac_try;;
3305esac
3306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3307 (eval "$ac_compile") 2>conftest.er1
503d2be0 3308 ac_status=$?
edfaf76d
LK
3309 grep -v '^ *+' conftest.er1 >conftest.err
3310 rm -f conftest.er1
3311 cat conftest.err >&5
c0d27fcc 3312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3313 (exit $ac_status); } && {
3314 test -z "$ac_c_werror_flag" ||
3315 test ! -s conftest.err
3316 } && test -s conftest.$ac_objext; then
503d2be0
AS
3317 ac_compiler_gnu=yes
3318else
3319 echo "$as_me: failed program was:" >&5
19650fd6
AS
3320sed 's/^/| /' conftest.$ac_ext >&5
3321
ca81d7a0 3322 ac_compiler_gnu=no
503d2be0 3323fi
ca81d7a0
JD
3324
3325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3326ac_cv_c_compiler_gnu=$ac_compiler_gnu
3327
3328fi
ca81d7a0
JD
3329{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3330echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3331GCC=`test $ac_compiler_gnu = yes && echo yes`
3332ac_test_CFLAGS=${CFLAGS+set}
3333ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3334{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3335echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3336if test "${ac_cv_prog_cc_g+set}" = set; then
3337 echo $ECHO_N "(cached) $ECHO_C" >&6
3338else
ca81d7a0
JD
3339 ac_save_c_werror_flag=$ac_c_werror_flag
3340 ac_c_werror_flag=yes
3341 ac_cv_prog_cc_g=no
3342 CFLAGS="-g"
3343 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3344/* confdefs.h. */
3345_ACEOF
3346cat confdefs.h >>conftest.$ac_ext
3347cat >>conftest.$ac_ext <<_ACEOF
3348/* end confdefs.h. */
503d2be0
AS
3349
3350int
3351main ()
3352{
3353
3354 ;
3355 return 0;
3356}
3357_ACEOF
3358rm -f conftest.$ac_objext
ca81d7a0
JD
3359if { (ac_try="$ac_compile"
3360case "(($ac_try" in
3361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3362 *) ac_try_echo=$ac_try;;
3363esac
3364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3365 (eval "$ac_compile") 2>conftest.er1
503d2be0 3366 ac_status=$?
edfaf76d
LK
3367 grep -v '^ *+' conftest.er1 >conftest.err
3368 rm -f conftest.er1
3369 cat conftest.err >&5
c0d27fcc 3370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3371 (exit $ac_status); } && {
3372 test -z "$ac_c_werror_flag" ||
3373 test ! -s conftest.err
3374 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3375 ac_cv_prog_cc_g=yes
3376else
503d2be0 3377 echo "$as_me: failed program was:" >&5
19650fd6
AS
3378sed 's/^/| /' conftest.$ac_ext >&5
3379
ca81d7a0
JD
3380 CFLAGS=""
3381 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3382/* confdefs.h. */
3383_ACEOF
3384cat confdefs.h >>conftest.$ac_ext
3385cat >>conftest.$ac_ext <<_ACEOF
3386/* end confdefs.h. */
edfaf76d 3387
6bae0ccf
DL
3388int
3389main ()
3390{
ca81d7a0 3391
6bae0ccf
DL
3392 ;
3393 return 0;
3394}
3395_ACEOF
ca81d7a0
JD
3396rm -f conftest.$ac_objext
3397if { (ac_try="$ac_compile"
3398case "(($ac_try" in
3399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3400 *) ac_try_echo=$ac_try;;
3401esac
3402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3403 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3404 ac_status=$?
edfaf76d
LK
3405 grep -v '^ *+' conftest.er1 >conftest.err
3406 rm -f conftest.er1
3407 cat conftest.err >&5
edfaf76d 3408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3409 (exit $ac_status); } && {
3410 test -z "$ac_c_werror_flag" ||
3411 test ! -s conftest.err
3412 } && test -s conftest.$ac_objext; then
ca81d7a0 3413 :
6bae0ccf
DL
3414else
3415 echo "$as_me: failed program was:" >&5
19650fd6
AS
3416sed 's/^/| /' conftest.$ac_ext >&5
3417
ca81d7a0
JD
3418 ac_c_werror_flag=$ac_save_c_werror_flag
3419 CFLAGS="-g"
3420 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3421/* confdefs.h. */
19650fd6
AS
3422_ACEOF
3423cat confdefs.h >>conftest.$ac_ext
3424cat >>conftest.$ac_ext <<_ACEOF
3425/* end confdefs.h. */
ca81d7a0 3426
503d2be0
AS
3427int
3428main ()
3429{
ca81d7a0 3430
503d2be0
AS
3431 ;
3432 return 0;
3433}
3434_ACEOF
3435rm -f conftest.$ac_objext
ca81d7a0
JD
3436if { (ac_try="$ac_compile"
3437case "(($ac_try" in
3438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439 *) ac_try_echo=$ac_try;;
3440esac
3441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3442 (eval "$ac_compile") 2>conftest.er1
503d2be0 3443 ac_status=$?
edfaf76d
LK
3444 grep -v '^ *+' conftest.er1 >conftest.err
3445 rm -f conftest.er1
3446 cat conftest.err >&5
c0d27fcc 3447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3448 (exit $ac_status); } && {
3449 test -z "$ac_c_werror_flag" ||
3450 test ! -s conftest.err
3451 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3452 ac_cv_prog_cc_g=yes
3453else
503d2be0 3454 echo "$as_me: failed program was:" >&5
19650fd6
AS
3455sed 's/^/| /' conftest.$ac_ext >&5
3456
ca81d7a0 3457
ba4481b5 3458fi
ca81d7a0
JD
3459
3460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3461fi
3462
3463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3464fi
3465
3466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3467 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3468fi
ca81d7a0
JD
3469{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3470echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3471if test "$ac_test_CFLAGS" = set; then
503d2be0 3472 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3473elif test $ac_cv_prog_cc_g = yes; then
3474 if test "$GCC" = yes; then
ba4481b5
DL
3475 CFLAGS="-g -O2"
3476 else
c4bb2108 3477 CFLAGS="-g"
ba4481b5 3478 fi
22afa6e8 3479else
c4bb2108
DL
3480 if test "$GCC" = yes; then
3481 CFLAGS="-O2"
3482 else
3483 CFLAGS=
3484 fi
ba4481b5 3485fi
ca81d7a0
JD
3486{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3487echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3488if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3489 echo $ECHO_N "(cached) $ECHO_C" >&6
3490else
ca81d7a0 3491 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3492ac_save_CC=$CC
3493cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3494/* confdefs.h. */
3495_ACEOF
3496cat confdefs.h >>conftest.$ac_ext
3497cat >>conftest.$ac_ext <<_ACEOF
3498/* end confdefs.h. */
6bae0ccf
DL
3499#include <stdarg.h>
3500#include <stdio.h>
3501#include <sys/types.h>
3502#include <sys/stat.h>
3503/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3504struct buf { int x; };
3505FILE * (*rcsopen) (struct buf *, struct stat *, int);
3506static char *e (p, i)
3507 char **p;
3508 int i;
3509{
3510 return p[i];
3511}
3512static char *f (char * (*g) (char **, int), char **p, ...)
3513{
3514 char *s;
3515 va_list v;
3516 va_start (v,p);
3517 s = g (p, va_arg (v,int));
3518 va_end (v);
3519 return s;
3520}
edfaf76d
LK
3521
3522/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3523 function prototypes and stuff, but not '\xHH' hex character constants.
3524 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3525 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3526 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3527 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3528 that's true only with -std. */
edfaf76d
LK
3529int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3530
ca81d7a0
JD
3531/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3532 inside strings and character constants. */
3533#define FOO(x) 'x'
3534int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3535
6bae0ccf
DL
3536int test (int i, double x);
3537struct s1 {int (*f) (int a);};
3538struct s2 {int (*f) (double a);};
3539int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3540int argc;
3541char **argv;
3542int
3543main ()
3544{
3545return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3546 ;
3547 return 0;
3548}
3549_ACEOF
ca81d7a0
JD
3550for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3551 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3552do
3553 CC="$ac_save_CC $ac_arg"
3554 rm -f conftest.$ac_objext
ca81d7a0
JD
3555if { (ac_try="$ac_compile"
3556case "(($ac_try" in
3557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3558 *) ac_try_echo=$ac_try;;
3559esac
3560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3561 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3562 ac_status=$?
edfaf76d
LK
3563 grep -v '^ *+' conftest.er1 >conftest.err
3564 rm -f conftest.er1
3565 cat conftest.err >&5
6bae0ccf 3566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3567 (exit $ac_status); } && {
3568 test -z "$ac_c_werror_flag" ||
3569 test ! -s conftest.err
3570 } && test -s conftest.$ac_objext; then
ca81d7a0 3571 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3572else
3573 echo "$as_me: failed program was:" >&5
19650fd6
AS
3574sed 's/^/| /' conftest.$ac_ext >&5
3575
ca81d7a0 3576
6bae0ccf 3577fi
ca81d7a0
JD
3578
3579rm -f core conftest.err conftest.$ac_objext
3580 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3581done
ca81d7a0 3582rm -f conftest.$ac_ext
6bae0ccf
DL
3583CC=$ac_save_CC
3584
3585fi
ca81d7a0
JD
3586# AC_CACHE_VAL
3587case "x$ac_cv_prog_cc_c89" in
3588 x)
3589 { echo "$as_me:$LINENO: result: none needed" >&5
3590echo "${ECHO_T}none needed" >&6; } ;;
3591 xno)
3592 { echo "$as_me:$LINENO: result: unsupported" >&5
3593echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3594 *)
ca81d7a0
JD
3595 CC="$CC $ac_cv_prog_cc_c89"
3596 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3597echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3598esac
3599
19650fd6 3600
503d2be0
AS
3601ac_ext=c
3602ac_cpp='$CPP $CPPFLAGS'
3603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3605ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3606
c0d27fcc 3607
ba4481b5
DL
3608# On Suns, sometimes $CPP names a directory.
3609if test -n "$CPP" && test -d "$CPP"; then
3610 CPP=
3611fi
3612
089a966d
GM
3613## If not using gcc, and on Solaris, and no CPP specified, see if
3614## using a Sun compiler, which needs -Xs to prevent whitespace.
3615if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3616 test x"$CPP" = x; then
3617 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3618echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3619
3620if test "${emacs_cv_sunpro_c+set}" = set; then
3621 echo $ECHO_N "(cached) $ECHO_C" >&6
3622else
3623 cat >conftest.$ac_ext <<_ACEOF
3624/* confdefs.h. */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h. */
3629
3630int
3631main ()
3632{
3633#ifndef __SUNPRO_C
3634fail;
3635#endif
3636
3637 ;
3638 return 0;
3639}
3640_ACEOF
3641rm -f conftest.$ac_objext conftest$ac_exeext
3642if { (ac_try="$ac_link"
3643case "(($ac_try" in
3644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3645 *) ac_try_echo=$ac_try;;
3646esac
3647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3648 (eval "$ac_link") 2>conftest.er1
3649 ac_status=$?
3650 grep -v '^ *+' conftest.er1 >conftest.err
3651 rm -f conftest.er1
3652 cat conftest.err >&5
3653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3654 (exit $ac_status); } && {
3655 test -z "$ac_c_werror_flag" ||
3656 test ! -s conftest.err
3657 } && test -s conftest$ac_exeext &&
3658 $as_test_x conftest$ac_exeext; then
3659 emacs_cv_sunpro_c=yes
3660else
3661 echo "$as_me: failed program was:" >&5
3662sed 's/^/| /' conftest.$ac_ext >&5
3663
3664 emacs_cv_sunpro_c=no
3665fi
3666
3667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3668 conftest$ac_exeext conftest.$ac_ext
3669fi
3670
3671 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3672echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3673
3674 if test x"$emacs_cv_sunpro_c" = xyes; then
3675 NON_GNU_CPP="$CC -E -Xs"
3676 fi
3677fi
3678
ba4481b5
DL
3679#### Some systems specify a CPP to use unless we are using GCC.
3680#### Now that we know whether we are using GCC, we can decide whether
3681#### to use that one.
3682if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3683then
3684 CPP="$NON_GNU_CPP"
3685fi
3686
3687#### Some systems specify a CC to use unless we are using GCC.
3688#### Now that we know whether we are using GCC, we can decide whether
3689#### to use that one.
3690if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3691 test x$cc_specified != xyes
3692then
3693 CC="$NON_GNU_CC"
3694fi
3695
3696if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3697then
3698 CC="$CC $GCC_TEST_OPTIONS"
3699fi
3700
3701if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3702then
3703 CC="$CC $NON_GCC_TEST_OPTIONS"
3704fi
3705
a51f4969
SM
3706
3707cat >>confdefs.h <<\_ACEOF
3708#define _GNU_SOURCE 1
3709_ACEOF
3710
3711
e143ad11
AS
3712ac_ext=c
3713ac_cpp='$CPP $CPPFLAGS'
3714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3716ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3717{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3718echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3719# On Suns, sometimes $CPP names a directory.
3720if test -n "$CPP" && test -d "$CPP"; then
3721 CPP=
3722fi
3723if test -z "$CPP"; then
3724 if test "${ac_cv_prog_CPP+set}" = set; then
3725 echo $ECHO_N "(cached) $ECHO_C" >&6
3726else
3727 # Double quotes because CPP needs to be expanded
3728 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3729 do
3730 ac_preproc_ok=false
3731for ac_c_preproc_warn_flag in '' yes
3732do
3733 # Use a header file that comes with gcc, so configuring glibc
3734 # with a fresh cross-compiler works.
3735 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3736 # <limits.h> exists even on freestanding compilers.
3737 # On the NeXT, cc -E runs the code through the compiler's parser,
3738 # not just through cpp. "Syntax error" is here to catch this case.
3739 cat >conftest.$ac_ext <<_ACEOF
3740/* confdefs.h. */
3741_ACEOF
3742cat confdefs.h >>conftest.$ac_ext
3743cat >>conftest.$ac_ext <<_ACEOF
3744/* end confdefs.h. */
3745#ifdef __STDC__
3746# include <limits.h>
3747#else
3748# include <assert.h>
3749#endif
3750 Syntax error
3751_ACEOF
ca81d7a0
JD
3752if { (ac_try="$ac_cpp conftest.$ac_ext"
3753case "(($ac_try" in
3754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3755 *) ac_try_echo=$ac_try;;
3756esac
3757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3758 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3759 ac_status=$?
3760 grep -v '^ *+' conftest.er1 >conftest.err
3761 rm -f conftest.er1
3762 cat conftest.err >&5
3763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3764 (exit $ac_status); } >/dev/null && {
3765 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3766 test ! -s conftest.err
3767 }; then
e143ad11
AS
3768 :
3769else
3770 echo "$as_me: failed program was:" >&5
3771sed 's/^/| /' conftest.$ac_ext >&5
3772
3773 # Broken: fails on valid input.
3774continue
3775fi
ca81d7a0 3776
e143ad11
AS
3777rm -f conftest.err conftest.$ac_ext
3778
ca81d7a0 3779 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3780 # can be detected and how.
3781 cat >conftest.$ac_ext <<_ACEOF
3782/* confdefs.h. */
3783_ACEOF
3784cat confdefs.h >>conftest.$ac_ext
3785cat >>conftest.$ac_ext <<_ACEOF
3786/* end confdefs.h. */
3787#include <ac_nonexistent.h>
3788_ACEOF
ca81d7a0
JD
3789if { (ac_try="$ac_cpp conftest.$ac_ext"
3790case "(($ac_try" in
3791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3792 *) ac_try_echo=$ac_try;;
3793esac
3794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3795 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3796 ac_status=$?
3797 grep -v '^ *+' conftest.er1 >conftest.err
3798 rm -f conftest.er1
3799 cat conftest.err >&5
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3801 (exit $ac_status); } >/dev/null && {
3802 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3803 test ! -s conftest.err
3804 }; then
e143ad11
AS
3805 # Broken: success on invalid input.
3806continue
3807else
3808 echo "$as_me: failed program was:" >&5
3809sed 's/^/| /' conftest.$ac_ext >&5
3810
3811 # Passes both tests.
3812ac_preproc_ok=:
3813break
3814fi
ca81d7a0 3815
e143ad11
AS
3816rm -f conftest.err conftest.$ac_ext
3817
3818done
3819# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3820rm -f conftest.err conftest.$ac_ext
3821if $ac_preproc_ok; then
3822 break
3823fi
3824
3825 done
3826 ac_cv_prog_CPP=$CPP
3827
3828fi
3829 CPP=$ac_cv_prog_CPP
3830else
3831 ac_cv_prog_CPP=$CPP
3832fi
ca81d7a0
JD
3833{ echo "$as_me:$LINENO: result: $CPP" >&5
3834echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3835ac_preproc_ok=false
3836for ac_c_preproc_warn_flag in '' yes
3837do
3838 # Use a header file that comes with gcc, so configuring glibc
3839 # with a fresh cross-compiler works.
3840 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3841 # <limits.h> exists even on freestanding compilers.
3842 # On the NeXT, cc -E runs the code through the compiler's parser,
3843 # not just through cpp. "Syntax error" is here to catch this case.
3844 cat >conftest.$ac_ext <<_ACEOF
3845/* confdefs.h. */
3846_ACEOF
3847cat confdefs.h >>conftest.$ac_ext
3848cat >>conftest.$ac_ext <<_ACEOF
3849/* end confdefs.h. */
3850#ifdef __STDC__
3851# include <limits.h>
3852#else
3853# include <assert.h>
3854#endif
3855 Syntax error
3856_ACEOF
ca81d7a0
JD
3857if { (ac_try="$ac_cpp conftest.$ac_ext"
3858case "(($ac_try" in
3859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3860 *) ac_try_echo=$ac_try;;
3861esac
3862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3863 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3864 ac_status=$?
3865 grep -v '^ *+' conftest.er1 >conftest.err
3866 rm -f conftest.er1
3867 cat conftest.err >&5
3868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3869 (exit $ac_status); } >/dev/null && {
3870 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3871 test ! -s conftest.err
3872 }; then
e143ad11
AS
3873 :
3874else
3875 echo "$as_me: failed program was:" >&5
3876sed 's/^/| /' conftest.$ac_ext >&5
3877
3878 # Broken: fails on valid input.
3879continue
3880fi
ca81d7a0 3881
e143ad11
AS
3882rm -f conftest.err conftest.$ac_ext
3883
ca81d7a0 3884 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3885 # can be detected and how.
3886 cat >conftest.$ac_ext <<_ACEOF
3887/* confdefs.h. */
3888_ACEOF
3889cat confdefs.h >>conftest.$ac_ext
3890cat >>conftest.$ac_ext <<_ACEOF
3891/* end confdefs.h. */
3892#include <ac_nonexistent.h>
3893_ACEOF
ca81d7a0
JD
3894if { (ac_try="$ac_cpp conftest.$ac_ext"
3895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
3899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3900 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3901 ac_status=$?
3902 grep -v '^ *+' conftest.er1 >conftest.err
3903 rm -f conftest.er1
3904 cat conftest.err >&5
3905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3906 (exit $ac_status); } >/dev/null && {
3907 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3908 test ! -s conftest.err
3909 }; then
e143ad11
AS
3910 # Broken: success on invalid input.
3911continue
3912else
3913 echo "$as_me: failed program was:" >&5
3914sed 's/^/| /' conftest.$ac_ext >&5
3915
3916 # Passes both tests.
3917ac_preproc_ok=:
3918break
3919fi
ca81d7a0 3920
e143ad11
AS
3921rm -f conftest.err conftest.$ac_ext
3922
3923done
3924# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3925rm -f conftest.err conftest.$ac_ext
3926if $ac_preproc_ok; then
3927 :
3928else
3929 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3930See \`config.log' for more details." >&5
3931echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3932See \`config.log' for more details." >&2;}
3933 { (exit 1); exit 1; }; }
3934fi
3935
3936ac_ext=c
3937ac_cpp='$CPP $CPPFLAGS'
3938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3940ac_compiler_gnu=$ac_cv_c_compiler_gnu
3941
3942
ca81d7a0
JD
3943{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3944echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3945if test "${ac_cv_path_GREP+set}" = set; then
3946 echo $ECHO_N "(cached) $ECHO_C" >&6
3947else
3948 # Extract the first word of "grep ggrep" to use in msg output
3949if test -z "$GREP"; then
3950set dummy grep ggrep; ac_prog_name=$2
3951if test "${ac_cv_path_GREP+set}" = set; then
3952 echo $ECHO_N "(cached) $ECHO_C" >&6
3953else
3954 ac_path_GREP_found=false
3955# Loop through the user's path and test for each of PROGNAME-LIST
3956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3958do
3959 IFS=$as_save_IFS
3960 test -z "$as_dir" && as_dir=.
3961 for ac_prog in grep ggrep; do
3962 for ac_exec_ext in '' $ac_executable_extensions; do
3963 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 3964 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
3965 # Check for GNU ac_path_GREP and select it if it is found.
3966 # Check for GNU $ac_path_GREP
3967case `"$ac_path_GREP" --version 2>&1` in
3968*GNU*)
3969 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3970*)
3971 ac_count=0
3972 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3973 while :
3974 do
3975 cat "conftest.in" "conftest.in" >"conftest.tmp"
3976 mv "conftest.tmp" "conftest.in"
3977 cp "conftest.in" "conftest.nl"
3978 echo 'GREP' >> "conftest.nl"
3979 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3980 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3981 ac_count=`expr $ac_count + 1`
3982 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3983 # Best one so far, save it but keep looking for a better one
3984 ac_cv_path_GREP="$ac_path_GREP"
3985 ac_path_GREP_max=$ac_count
3986 fi
3987 # 10*(2^10) chars as input seems more than enough
3988 test $ac_count -gt 10 && break
3989 done
3990 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3991esac
3992
3993
3994 $ac_path_GREP_found && break 3
3995 done
3996done
3997
3998done
3999IFS=$as_save_IFS
4000
4001
4002fi
4003
4004GREP="$ac_cv_path_GREP"
4005if test -z "$GREP"; then
4006 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4007echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4008 { (exit 1); exit 1; }; }
4009fi
4010
4011else
4012 ac_cv_path_GREP=$GREP
4013fi
4014
4015
4016fi
4017{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4018echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4019 GREP="$ac_cv_path_GREP"
4020
4021
4022{ echo "$as_me:$LINENO: checking for egrep" >&5
4023echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4024if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4025 echo $ECHO_N "(cached) $ECHO_C" >&6
4026else
ca81d7a0
JD
4027 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4028 then ac_cv_path_EGREP="$GREP -E"
4029 else
4030 # Extract the first word of "egrep" to use in msg output
4031if test -z "$EGREP"; then
4032set dummy egrep; ac_prog_name=$2
4033if test "${ac_cv_path_EGREP+set}" = set; then
4034 echo $ECHO_N "(cached) $ECHO_C" >&6
4035else
4036 ac_path_EGREP_found=false
4037# Loop through the user's path and test for each of PROGNAME-LIST
4038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4039for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4040do
4041 IFS=$as_save_IFS
4042 test -z "$as_dir" && as_dir=.
4043 for ac_prog in egrep; do
4044 for ac_exec_ext in '' $ac_executable_extensions; do
4045 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4046 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4047 # Check for GNU ac_path_EGREP and select it if it is found.
4048 # Check for GNU $ac_path_EGREP
4049case `"$ac_path_EGREP" --version 2>&1` in
4050*GNU*)
4051 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4052*)
4053 ac_count=0
4054 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4055 while :
4056 do
4057 cat "conftest.in" "conftest.in" >"conftest.tmp"
4058 mv "conftest.tmp" "conftest.in"
4059 cp "conftest.in" "conftest.nl"
4060 echo 'EGREP' >> "conftest.nl"
4061 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4062 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4063 ac_count=`expr $ac_count + 1`
4064 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4065 # Best one so far, save it but keep looking for a better one
4066 ac_cv_path_EGREP="$ac_path_EGREP"
4067 ac_path_EGREP_max=$ac_count
e143ad11 4068 fi
ca81d7a0
JD
4069 # 10*(2^10) chars as input seems more than enough
4070 test $ac_count -gt 10 && break
4071 done
4072 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4073esac
4074
4075
4076 $ac_path_EGREP_found && break 3
4077 done
4078done
4079
4080done
4081IFS=$as_save_IFS
4082
4083
e143ad11 4084fi
e143ad11 4085
ca81d7a0
JD
4086EGREP="$ac_cv_path_EGREP"
4087if test -z "$EGREP"; then
4088 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4089echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4090 { (exit 1); exit 1; }; }
4091fi
e143ad11 4092
ca81d7a0
JD
4093else
4094 ac_cv_path_EGREP=$EGREP
4095fi
e143ad11 4096
ca81d7a0
JD
4097
4098 fi
8eeae1c9 4099fi
ca81d7a0
JD
4100{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4101echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4102 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4103
4104
4105
ca81d7a0
JD
4106{ echo "$as_me:$LINENO: checking for AIX" >&5
4107echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4108cat >conftest.$ac_ext <<_ACEOF
4109/* confdefs.h. */
4110_ACEOF
4111cat confdefs.h >>conftest.$ac_ext
4112cat >>conftest.$ac_ext <<_ACEOF
4113/* end confdefs.h. */
4114#ifdef _AIX
4115 yes
4116#endif
4117
4118_ACEOF
4119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4120 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4121 { echo "$as_me:$LINENO: result: yes" >&5
4122echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4123cat >>confdefs.h <<\_ACEOF
4124#define _ALL_SOURCE 1
4125_ACEOF
4126
4127else
ca81d7a0
JD
4128 { echo "$as_me:$LINENO: result: no" >&5
4129echo "${ECHO_T}no" >&6; }
e143ad11 4130fi
a51f4969
SM
4131rm -f conftest*
4132
4133
4134{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4135echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4136if test "${ac_cv_header_stdc+set}" = set; then
4137 echo $ECHO_N "(cached) $ECHO_C" >&6
4138else
4139 cat >conftest.$ac_ext <<_ACEOF
4140/* confdefs.h. */
4141_ACEOF
4142cat confdefs.h >>conftest.$ac_ext
4143cat >>conftest.$ac_ext <<_ACEOF
4144/* end confdefs.h. */
4145#include <stdlib.h>
4146#include <stdarg.h>
4147#include <string.h>
4148#include <float.h>
4149
4150int
4151main ()
4152{
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
4158rm -f conftest.$ac_objext
4159if { (ac_try="$ac_compile"
4160case "(($ac_try" in
4161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4162 *) ac_try_echo=$ac_try;;
4163esac
4164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4165 (eval "$ac_compile") 2>conftest.er1
4166 ac_status=$?
4167 grep -v '^ *+' conftest.er1 >conftest.err
4168 rm -f conftest.er1
4169 cat conftest.err >&5
4170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4171 (exit $ac_status); } && {
4172 test -z "$ac_c_werror_flag" ||
4173 test ! -s conftest.err
4174 } && test -s conftest.$ac_objext; then
4175 ac_cv_header_stdc=yes
4176else
4177 echo "$as_me: failed program was:" >&5
4178sed 's/^/| /' conftest.$ac_ext >&5
4179
4180 ac_cv_header_stdc=no
4181fi
4182
4183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184
4185if test $ac_cv_header_stdc = yes; then
4186 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4187 cat >conftest.$ac_ext <<_ACEOF
4188/* confdefs.h. */
4189_ACEOF
4190cat confdefs.h >>conftest.$ac_ext
4191cat >>conftest.$ac_ext <<_ACEOF
4192/* end confdefs.h. */
4193#include <string.h>
4194
4195_ACEOF
4196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4197 $EGREP "memchr" >/dev/null 2>&1; then
4198 :
4199else
4200 ac_cv_header_stdc=no
4201fi
4202rm -f conftest*
4203
4204fi
4205
4206if test $ac_cv_header_stdc = yes; then
4207 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4208 cat >conftest.$ac_ext <<_ACEOF
4209/* confdefs.h. */
4210_ACEOF
4211cat confdefs.h >>conftest.$ac_ext
4212cat >>conftest.$ac_ext <<_ACEOF
4213/* end confdefs.h. */
4214#include <stdlib.h>
4215
4216_ACEOF
4217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4218 $EGREP "free" >/dev/null 2>&1; then
4219 :
4220else
4221 ac_cv_header_stdc=no
4222fi
4223rm -f conftest*
4224
4225fi
4226
4227if test $ac_cv_header_stdc = yes; then
4228 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4229 if test "$cross_compiling" = yes; then
4230 :
4231else
4232 cat >conftest.$ac_ext <<_ACEOF
4233/* confdefs.h. */
4234_ACEOF
4235cat confdefs.h >>conftest.$ac_ext
4236cat >>conftest.$ac_ext <<_ACEOF
4237/* end confdefs.h. */
4238#include <ctype.h>
4239#include <stdlib.h>
4240#if ((' ' & 0x0FF) == 0x020)
4241# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4242# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4243#else
4244# define ISLOWER(c) \
4245 (('a' <= (c) && (c) <= 'i') \
4246 || ('j' <= (c) && (c) <= 'r') \
4247 || ('s' <= (c) && (c) <= 'z'))
4248# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4249#endif
4250
4251#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4252int
4253main ()
4254{
4255 int i;
4256 for (i = 0; i < 256; i++)
4257 if (XOR (islower (i), ISLOWER (i))
4258 || toupper (i) != TOUPPER (i))
4259 return 2;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest$ac_exeext
4264if { (ac_try="$ac_link"
4265case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268esac
4269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4270 (eval "$ac_link") 2>&5
4271 ac_status=$?
4272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4274 { (case "(($ac_try" in
4275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4276 *) ac_try_echo=$ac_try;;
4277esac
4278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4279 (eval "$ac_try") 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); }; }; then
4283 :
4284else
4285 echo "$as_me: program exited with status $ac_status" >&5
4286echo "$as_me: failed program was:" >&5
4287sed 's/^/| /' conftest.$ac_ext >&5
4288
4289( exit $ac_status )
4290ac_cv_header_stdc=no
4291fi
4292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4293fi
4294
4295
4296fi
4297fi
4298{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4299echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4300if test $ac_cv_header_stdc = yes; then
4301
4302cat >>confdefs.h <<\_ACEOF
4303#define STDC_HEADERS 1
4304_ACEOF
4305
4306fi
4307
4308# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4319 inttypes.h stdint.h unistd.h
4320do
4321as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4322{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4323echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4324if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4325 echo $ECHO_N "(cached) $ECHO_C" >&6
4326else
4327 cat >conftest.$ac_ext <<_ACEOF
4328/* confdefs.h. */
4329_ACEOF
4330cat confdefs.h >>conftest.$ac_ext
4331cat >>conftest.$ac_ext <<_ACEOF
4332/* end confdefs.h. */
4333$ac_includes_default
4334
4335#include <$ac_header>
4336_ACEOF
4337rm -f conftest.$ac_objext
4338if { (ac_try="$ac_compile"
4339case "(($ac_try" in
4340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4341 *) ac_try_echo=$ac_try;;
4342esac
4343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4344 (eval "$ac_compile") 2>conftest.er1
4345 ac_status=$?
4346 grep -v '^ *+' conftest.er1 >conftest.err
4347 rm -f conftest.er1
4348 cat conftest.err >&5
4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350 (exit $ac_status); } && {
4351 test -z "$ac_c_werror_flag" ||
4352 test ! -s conftest.err
4353 } && test -s conftest.$ac_objext; then
4354 eval "$as_ac_Header=yes"
4355else
4356 echo "$as_me: failed program was:" >&5
4357sed 's/^/| /' conftest.$ac_ext >&5
4358
4359 eval "$as_ac_Header=no"
4360fi
4361
4362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4363fi
4364ac_res=`eval echo '${'$as_ac_Header'}'`
4365 { echo "$as_me:$LINENO: result: $ac_res" >&5
4366echo "${ECHO_T}$ac_res" >&6; }
4367if test `eval echo '${'$as_ac_Header'}'` = yes; then
4368 cat >>confdefs.h <<_ACEOF
4369#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4370_ACEOF
4371
4372fi
4373
4374done
4375
4376
4377if test "${ac_cv_header_minix_config_h+set}" = set; then
4378 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4379echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4380if test "${ac_cv_header_minix_config_h+set}" = set; then
4381 echo $ECHO_N "(cached) $ECHO_C" >&6
4382fi
4383{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4384echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4385else
4386 # Is the header compilable?
4387{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4388echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4389cat >conftest.$ac_ext <<_ACEOF
4390/* confdefs.h. */
4391_ACEOF
4392cat confdefs.h >>conftest.$ac_ext
4393cat >>conftest.$ac_ext <<_ACEOF
4394/* end confdefs.h. */
4395$ac_includes_default
4396#include <minix/config.h>
4397_ACEOF
4398rm -f conftest.$ac_objext
4399if { (ac_try="$ac_compile"
4400case "(($ac_try" in
4401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4402 *) ac_try_echo=$ac_try;;
4403esac
4404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4405 (eval "$ac_compile") 2>conftest.er1
4406 ac_status=$?
4407 grep -v '^ *+' conftest.er1 >conftest.err
4408 rm -f conftest.er1
4409 cat conftest.err >&5
4410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411 (exit $ac_status); } && {
4412 test -z "$ac_c_werror_flag" ||
4413 test ! -s conftest.err
4414 } && test -s conftest.$ac_objext; then
4415 ac_header_compiler=yes
4416else
4417 echo "$as_me: failed program was:" >&5
4418sed 's/^/| /' conftest.$ac_ext >&5
4419
4420 ac_header_compiler=no
4421fi
4422
4423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4424{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4425echo "${ECHO_T}$ac_header_compiler" >&6; }
4426
4427# Is the header present?
4428{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4429echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4430cat >conftest.$ac_ext <<_ACEOF
4431/* confdefs.h. */
4432_ACEOF
4433cat confdefs.h >>conftest.$ac_ext
4434cat >>conftest.$ac_ext <<_ACEOF
4435/* end confdefs.h. */
4436#include <minix/config.h>
4437_ACEOF
4438if { (ac_try="$ac_cpp conftest.$ac_ext"
4439case "(($ac_try" in
4440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4441 *) ac_try_echo=$ac_try;;
4442esac
4443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4444 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4445 ac_status=$?
4446 grep -v '^ *+' conftest.er1 >conftest.err
4447 rm -f conftest.er1
4448 cat conftest.err >&5
4449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4450 (exit $ac_status); } >/dev/null && {
4451 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4452 test ! -s conftest.err
4453 }; then
4454 ac_header_preproc=yes
4455else
4456 echo "$as_me: failed program was:" >&5
4457sed 's/^/| /' conftest.$ac_ext >&5
4458
4459 ac_header_preproc=no
4460fi
4461
4462rm -f conftest.err conftest.$ac_ext
4463{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4464echo "${ECHO_T}$ac_header_preproc" >&6; }
4465
4466# So? What about this header?
4467case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4468 yes:no: )
4469 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4470echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4471 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4472echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4473 ac_header_preproc=yes
4474 ;;
4475 no:yes:* )
4476 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4477echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4478 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4479echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4480 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4481echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4482 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4483echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4484 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4485echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4486 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4487echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4488
4489 ;;
4490esac
4491{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4492echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4493if test "${ac_cv_header_minix_config_h+set}" = set; then
4494 echo $ECHO_N "(cached) $ECHO_C" >&6
4495else
4496 ac_cv_header_minix_config_h=$ac_header_preproc
4497fi
4498{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4499echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4500
4501fi
4502if test $ac_cv_header_minix_config_h = yes; then
4503 MINIX=yes
4504else
4505 MINIX=
4506fi
4507
4508
4509if test "$MINIX" = yes; then
4510
4511cat >>confdefs.h <<\_ACEOF
4512#define _POSIX_SOURCE 1
4513_ACEOF
4514
4515
4516cat >>confdefs.h <<\_ACEOF
4517#define _POSIX_1_SOURCE 2
4518_ACEOF
4519
4520
4521cat >>confdefs.h <<\_ACEOF
4522#define _MINIX 1
4523_ACEOF
4524
4525fi
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4538echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4539if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4540 echo $ECHO_N "(cached) $ECHO_C" >&6
4541else
4542 cat >conftest.$ac_ext <<_ACEOF
4543/* confdefs.h. */
4544_ACEOF
4545cat confdefs.h >>conftest.$ac_ext
4546cat >>conftest.$ac_ext <<_ACEOF
4547/* end confdefs.h. */
4548
4549# define __EXTENSIONS__ 1
4550 $ac_includes_default
4551int
4552main ()
4553{
4554
4555 ;
4556 return 0;
4557}
4558_ACEOF
4559rm -f conftest.$ac_objext
4560if { (ac_try="$ac_compile"
4561case "(($ac_try" in
4562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4563 *) ac_try_echo=$ac_try;;
4564esac
4565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4566 (eval "$ac_compile") 2>conftest.er1
4567 ac_status=$?
4568 grep -v '^ *+' conftest.er1 >conftest.err
4569 rm -f conftest.er1
4570 cat conftest.err >&5
4571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4572 (exit $ac_status); } && {
4573 test -z "$ac_c_werror_flag" ||
4574 test ! -s conftest.err
4575 } && test -s conftest.$ac_objext; then
4576 ac_cv_safe_to_define___extensions__=yes
4577else
4578 echo "$as_me: failed program was:" >&5
4579sed 's/^/| /' conftest.$ac_ext >&5
4580
4581 ac_cv_safe_to_define___extensions__=no
4582fi
e143ad11 4583
a51f4969
SM
4584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4585fi
4586{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4587echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4588 test $ac_cv_safe_to_define___extensions__ = yes &&
4589 cat >>confdefs.h <<\_ACEOF
4590#define __EXTENSIONS__ 1
4591_ACEOF
e143ad11 4592
a51f4969
SM
4593 cat >>confdefs.h <<\_ACEOF
4594#define _POSIX_PTHREAD_SEMANTICS 1
4595_ACEOF
e143ad11 4596
a51f4969
SM
4597 cat >>confdefs.h <<\_ACEOF
4598#define _TANDEM_SOURCE 1
e143ad11
AS
4599_ACEOF
4600
4601
4602
01abe918 4603### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4604{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4605echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4606SAVE_CFLAGS="$CFLAGS"
4607CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4608cat >conftest.$ac_ext <<_ACEOF
4609/* confdefs.h. */
4610_ACEOF
4611cat confdefs.h >>conftest.$ac_ext
4612cat >>conftest.$ac_ext <<_ACEOF
4613/* end confdefs.h. */
4614
4615int
4616main ()
4617{
4618
4619 ;
4620 return 0;
4621}
4622_ACEOF
4623rm -f conftest.$ac_objext
ca81d7a0
JD
4624if { (ac_try="$ac_compile"
4625case "(($ac_try" in
4626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4627 *) ac_try_echo=$ac_try;;
4628esac
4629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4630 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4631 ac_status=$?
4632 grep -v '^ *+' conftest.er1 >conftest.err
4633 rm -f conftest.er1
4634 cat conftest.err >&5
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4636 (exit $ac_status); } && {
4637 test -z "$ac_c_werror_flag" ||
4638 test ! -s conftest.err
4639 } && test -s conftest.$ac_objext; then
01abe918
CY
4640 has_option=yes
4641else
4642 echo "$as_me: failed program was:" >&5
4643sed 's/^/| /' conftest.$ac_ext >&5
4644
ca81d7a0 4645 has_option=no
01abe918 4646fi
ca81d7a0
JD
4647
4648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4649if test $has_option = yes; then
4650 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4651fi
ca81d7a0
JD
4652{ echo "$as_me:$LINENO: result: $has_option" >&5
4653echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4654CFLAGS="$SAVE_CFLAGS"
4655unset has_option
4656unset SAVE_CFLAGS
4657
6a3a24fa 4658#### Some other nice autoconf tests.
ba4481b5 4659
ca81d7a0
JD
4660{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4661echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4662LN_S=$as_ln_s
4663if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4664 { echo "$as_me:$LINENO: result: yes" >&5
4665echo "${ECHO_T}yes" >&6; }
ba4481b5 4666else
ca81d7a0
JD
4667 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4668echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4669fi
4670
503d2be0
AS
4671ac_ext=c
4672ac_cpp='$CPP $CPPFLAGS'
4673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4675ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4676{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4677echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4678# On Suns, sometimes $CPP names a directory.
4679if test -n "$CPP" && test -d "$CPP"; then
4680 CPP=
4681fi
4682if test -z "$CPP"; then
503d2be0
AS
4683 if test "${ac_cv_prog_CPP+set}" = set; then
4684 echo $ECHO_N "(cached) $ECHO_C" >&6
4685else
4686 # Double quotes because CPP needs to be expanded
4687 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4688 do
4689 ac_preproc_ok=false
4690for ac_c_preproc_warn_flag in '' yes
4691do
4692 # Use a header file that comes with gcc, so configuring glibc
4693 # with a fresh cross-compiler works.
19650fd6
AS
4694 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4695 # <limits.h> exists even on freestanding compilers.
ba4481b5 4696 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4697 # not just through cpp. "Syntax error" is here to catch this case.
4698 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4699/* confdefs.h. */
4700_ACEOF
4701cat confdefs.h >>conftest.$ac_ext
4702cat >>conftest.$ac_ext <<_ACEOF
4703/* end confdefs.h. */
4704#ifdef __STDC__
4705# include <limits.h>
4706#else
4707# include <assert.h>
4708#endif
edfaf76d 4709 Syntax error
503d2be0 4710_ACEOF
ca81d7a0
JD
4711if { (ac_try="$ac_cpp conftest.$ac_ext"
4712case "(($ac_try" in
4713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4714 *) ac_try_echo=$ac_try;;
4715esac
4716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4717 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4718 ac_status=$?
6bae0ccf 4719 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4720 rm -f conftest.er1
4721 cat conftest.err >&5
c0d27fcc 4722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4723 (exit $ac_status); } >/dev/null && {
4724 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4725 test ! -s conftest.err
4726 }; then
ba4481b5
DL
4727 :
4728else
503d2be0 4729 echo "$as_me: failed program was:" >&5
19650fd6
AS
4730sed 's/^/| /' conftest.$ac_ext >&5
4731
503d2be0
AS
4732 # Broken: fails on valid input.
4733continue
4734fi
ca81d7a0 4735
503d2be0
AS
4736rm -f conftest.err conftest.$ac_ext
4737
ca81d7a0 4738 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4739 # can be detected and how.
4740 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4741/* confdefs.h. */
4742_ACEOF
4743cat confdefs.h >>conftest.$ac_ext
4744cat >>conftest.$ac_ext <<_ACEOF
4745/* end confdefs.h. */
503d2be0
AS
4746#include <ac_nonexistent.h>
4747_ACEOF
ca81d7a0
JD
4748if { (ac_try="$ac_cpp conftest.$ac_ext"
4749case "(($ac_try" in
4750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4751 *) ac_try_echo=$ac_try;;
4752esac
4753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4754 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4755 ac_status=$?
6bae0ccf 4756 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4757 rm -f conftest.er1
4758 cat conftest.err >&5
c0d27fcc 4759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4760 (exit $ac_status); } >/dev/null && {
4761 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4762 test ! -s conftest.err
4763 }; then
503d2be0
AS
4764 # Broken: success on invalid input.
4765continue
c4bb2108 4766else
503d2be0 4767 echo "$as_me: failed program was:" >&5
19650fd6
AS
4768sed 's/^/| /' conftest.$ac_ext >&5
4769
503d2be0
AS
4770 # Passes both tests.
4771ac_preproc_ok=:
4772break
4773fi
ca81d7a0 4774
503d2be0
AS
4775rm -f conftest.err conftest.$ac_ext
4776
4777done
4778# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4779rm -f conftest.err conftest.$ac_ext
4780if $ac_preproc_ok; then
4781 break
4782fi
4783
4784 done
4785 ac_cv_prog_CPP=$CPP
4786
4787fi
4788 CPP=$ac_cv_prog_CPP
4789else
4790 ac_cv_prog_CPP=$CPP
4791fi
ca81d7a0
JD
4792{ echo "$as_me:$LINENO: result: $CPP" >&5
4793echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4794ac_preproc_ok=false
4795for ac_c_preproc_warn_flag in '' yes
4796do
4797 # Use a header file that comes with gcc, so configuring glibc
4798 # with a fresh cross-compiler works.
19650fd6
AS
4799 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4800 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4801 # On the NeXT, cc -E runs the code through the compiler's parser,
4802 # not just through cpp. "Syntax error" is here to catch this case.
4803 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4804/* confdefs.h. */
4805_ACEOF
4806cat confdefs.h >>conftest.$ac_ext
4807cat >>conftest.$ac_ext <<_ACEOF
4808/* end confdefs.h. */
4809#ifdef __STDC__
4810# include <limits.h>
4811#else
4812# include <assert.h>
4813#endif
edfaf76d 4814 Syntax error
503d2be0 4815_ACEOF
ca81d7a0
JD
4816if { (ac_try="$ac_cpp conftest.$ac_ext"
4817case "(($ac_try" in
4818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4819 *) ac_try_echo=$ac_try;;
4820esac
4821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4823 ac_status=$?
6bae0ccf 4824 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4825 rm -f conftest.er1
4826 cat conftest.err >&5
c0d27fcc 4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4828 (exit $ac_status); } >/dev/null && {
4829 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4830 test ! -s conftest.err
4831 }; then
ba4481b5
DL
4832 :
4833else
503d2be0 4834 echo "$as_me: failed program was:" >&5
19650fd6
AS
4835sed 's/^/| /' conftest.$ac_ext >&5
4836
503d2be0
AS
4837 # Broken: fails on valid input.
4838continue
4839fi
ca81d7a0 4840
503d2be0
AS
4841rm -f conftest.err conftest.$ac_ext
4842
ca81d7a0 4843 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4844 # can be detected and how.
4845 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4846/* confdefs.h. */
4847_ACEOF
4848cat confdefs.h >>conftest.$ac_ext
4849cat >>conftest.$ac_ext <<_ACEOF
4850/* end confdefs.h. */
503d2be0
AS
4851#include <ac_nonexistent.h>
4852_ACEOF
ca81d7a0
JD
4853if { (ac_try="$ac_cpp conftest.$ac_ext"
4854case "(($ac_try" in
4855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4856 *) ac_try_echo=$ac_try;;
4857esac
4858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4859 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4860 ac_status=$?
6bae0ccf 4861 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4862 rm -f conftest.er1
4863 cat conftest.err >&5
c0d27fcc 4864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4865 (exit $ac_status); } >/dev/null && {
4866 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4867 test ! -s conftest.err
4868 }; then
503d2be0
AS
4869 # Broken: success on invalid input.
4870continue
4871else
4872 echo "$as_me: failed program was:" >&5
19650fd6
AS
4873sed 's/^/| /' conftest.$ac_ext >&5
4874
503d2be0
AS
4875 # Passes both tests.
4876ac_preproc_ok=:
4877break
ba4481b5 4878fi
ca81d7a0 4879
503d2be0
AS
4880rm -f conftest.err conftest.$ac_ext
4881
4882done
4883# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4884rm -f conftest.err conftest.$ac_ext
4885if $ac_preproc_ok; then
4886 :
ba4481b5 4887else
19650fd6
AS
4888 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4889See \`config.log' for more details." >&5
4890echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4891See \`config.log' for more details." >&2;}
503d2be0 4892 { (exit 1); exit 1; }; }
ba4481b5 4893fi
503d2be0
AS
4894
4895ac_ext=c
4896ac_cpp='$CPP $CPPFLAGS'
4897ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4898ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4899ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4900
4901# Find a good install program. We prefer a C program (faster),
4902# so one script is as good as another. But avoid the broken or
4903# incompatible versions:
4904# SysV /etc/install, /usr/sbin/install
4905# SunOS /usr/etc/install
4906# IRIX /sbin/install
4907# AIX /bin/install
503d2be0 4908# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4909# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4910# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4911# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4912# OS/2's system install, which has a completely different semantic
ba4481b5 4913# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4914{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4915echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4916if test -z "$INSTALL"; then
503d2be0
AS
4917if test "${ac_cv_path_install+set}" = set; then
4918 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4919else
c0d27fcc
MR
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in $PATH
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 # Account for people who put trailing slashes in PATH elements.
4926case $as_dir/ in
4927 ./ | .// | /cC/* | \
4928 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4929 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4930 /usr/ucb/* ) ;;
4931 *)
4932 # OSF1 and SCO ODT 3.0 have their own names for install.
4933 # Don't use installbsd from OSF since it installs stuff as root
4934 # by default.
4935 for ac_prog in ginstall scoinst install; do
4936 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4937 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4938 if test $ac_prog = install &&
4939 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4940 # AIX install. It has an incompatible calling convention.
4941 :
4942 elif test $ac_prog = install &&
4943 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4944 # program-specific install script used by HP pwplus--don't use.
4945 :
4946 else
4947 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4948 break 3
4949 fi
4950 fi
ba4481b5 4951 done
c0d27fcc
MR
4952 done
4953 ;;
4954esac
4955done
ca81d7a0 4956IFS=$as_save_IFS
c0d27fcc 4957
ba4481b5
DL
4958
4959fi
4960 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4961 INSTALL=$ac_cv_path_install
ba4481b5 4962 else
ca81d7a0
JD
4963 # As a last resort, use the slow shell script. Don't cache a
4964 # value for INSTALL within a source directory, because that will
ba4481b5 4965 # break other packages using the cache if that directory is
ca81d7a0 4966 # removed, or if the value is a relative name.
503d2be0 4967 INSTALL=$ac_install_sh
ba4481b5
DL
4968 fi
4969fi
ca81d7a0
JD
4970{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4971echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4972
4973# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4974# It thinks the first close brace ends the variable substitution.
4975test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4976
503d2be0 4977test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4978
ba4481b5
DL
4979test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4980
c0d27fcc
MR
4981if test "x$RANLIB" = x; then
4982 if test -n "$ac_tool_prefix"; then
4983 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4984set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
4985{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 4987if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4988 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4989else
4990 if test -n "$RANLIB"; then
4991 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4992else
c0d27fcc
MR
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5000 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
503d2be0 5005done
ca81d7a0 5006IFS=$as_save_IFS
503d2be0 5007
7397acc4
DL
5008fi
5009fi
503d2be0 5010RANLIB=$ac_cv_prog_RANLIB
7397acc4 5011if test -n "$RANLIB"; then
ca81d7a0
JD
5012 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5013echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5014else
ca81d7a0
JD
5015 { echo "$as_me:$LINENO: result: no" >&5
5016echo "${ECHO_T}no" >&6; }
503d2be0
AS
5017fi
5018
ca81d7a0 5019
503d2be0
AS
5020fi
5021if test -z "$ac_cv_prog_RANLIB"; then
5022 ac_ct_RANLIB=$RANLIB
5023 # Extract the first word of "ranlib", so it can be a program name with args.
5024set dummy ranlib; ac_word=$2
ca81d7a0
JD
5025{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5027if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5028 echo $ECHO_N "(cached) $ECHO_C" >&6
5029else
5030 if test -n "$ac_ct_RANLIB"; then
5031 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5032else
c0d27fcc
MR
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
5038 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5040 ac_cv_prog_ac_ct_RANLIB="ranlib"
5041 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5042 break 2
5043 fi
5044done
503d2be0 5045done
ca81d7a0 5046IFS=$as_save_IFS
503d2be0 5047
503d2be0
AS
5048fi
5049fi
5050ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5051if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5052 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5053echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5054else
ca81d7a0
JD
5055 { echo "$as_me:$LINENO: result: no" >&5
5056echo "${ECHO_T}no" >&6; }
503d2be0
AS
5057fi
5058
ca81d7a0
JD
5059 if test "x$ac_ct_RANLIB" = x; then
5060 RANLIB=":"
5061 else
5062 case $cross_compiling:$ac_tool_warned in
5063yes:)
5064{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5065whose name does not start with the host triplet. If you think this
5066configuration is useful to you, please write to autoconf@gnu.org." >&5
5067echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5068whose name does not start with the host triplet. If you think this
5069configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5070ac_tool_warned=yes ;;
5071esac
5072 RANLIB=$ac_ct_RANLIB
5073 fi
7397acc4 5074else
503d2be0 5075 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5076fi
5077
5078fi
9e71690e
DK
5079# Extract the first word of "install-info", so it can be a program name with args.
5080set dummy install-info; ac_word=$2
ca81d7a0
JD
5081{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5082echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5083if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086 case $INSTALL_INFO in
5087 [\\/]* | ?:[\\/]*)
5088 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5089 ;;
5090 *)
5091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
5096 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5097 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5098 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5099 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5100 break 2
5101 fi
5102done
5103done
ca81d7a0 5104IFS=$as_save_IFS
9e71690e
DK
5105
5106 ;;
5107esac
5108fi
5109INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5110if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5111 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5112echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5113else
ca81d7a0
JD
5114 { echo "$as_me:$LINENO: result: no" >&5
5115echo "${ECHO_T}no" >&6; }
9e71690e
DK
5116fi
5117
ca81d7a0 5118
9e71690e
DK
5119# Extract the first word of "install-info", so it can be a program name with args.
5120set dummy install-info; ac_word=$2
ca81d7a0
JD
5121{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5123if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5124 echo $ECHO_N "(cached) $ECHO_C" >&6
5125else
5126 case $INSTALL_INFO in
5127 [\\/]* | ?:[\\/]*)
5128 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5129 ;;
5130 *)
5131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5132for as_dir in /usr/sbin
5133do
5134 IFS=$as_save_IFS
5135 test -z "$as_dir" && as_dir=.
5136 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5138 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5140 break 2
5141 fi
5142done
5143done
ca81d7a0 5144IFS=$as_save_IFS
9e71690e
DK
5145
5146 ;;
5147esac
5148fi
5149INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5150if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5151 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5152echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5153else
ca81d7a0
JD
5154 { echo "$as_me:$LINENO: result: no" >&5
5155echo "${ECHO_T}no" >&6; }
9e71690e
DK
5156fi
5157
ca81d7a0 5158
9e71690e
DK
5159# Extract the first word of "install-info", so it can be a program name with args.
5160set dummy install-info; ac_word=$2
ca81d7a0
JD
5161{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5162echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5163if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5164 echo $ECHO_N "(cached) $ECHO_C" >&6
5165else
5166 case $INSTALL_INFO in
5167 [\\/]* | ?:[\\/]*)
5168 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5169 ;;
5170 *)
5171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in /sbin
5173do
5174 IFS=$as_save_IFS
5175 test -z "$as_dir" && as_dir=.
5176 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5178 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5179 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5180 break 2
5181 fi
5182done
5183done
ca81d7a0 5184IFS=$as_save_IFS
9e71690e
DK
5185
5186 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5187 ;;
5188esac
5189fi
5190INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5191if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5192 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5193echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5194else
ca81d7a0
JD
5195 { echo "$as_me:$LINENO: result: no" >&5
5196echo "${ECHO_T}no" >&6; }
9e71690e
DK
5197fi
5198
ca81d7a0 5199
8ae52ca6
RF
5200# Extract the first word of "gzip", so it can be a program name with args.
5201set dummy gzip; ac_word=$2
ca81d7a0
JD
5202{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5204if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5205 echo $ECHO_N "(cached) $ECHO_C" >&6
5206else
46e35e9f 5207 case $GZIP_PROG in
8ae52ca6 5208 [\\/]* | ?:[\\/]*)
46e35e9f 5209 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5210 ;;
5211 *)
5212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215 IFS=$as_save_IFS
5216 test -z "$as_dir" && as_dir=.
5217 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5219 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5221 break 2
5222 fi
5223done
5224done
ca81d7a0 5225IFS=$as_save_IFS
8ae52ca6
RF
5226
5227 ;;
5228esac
5229fi
46e35e9f 5230GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5231if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5232 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5233echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5234else
ca81d7a0
JD
5235 { echo "$as_me:$LINENO: result: no" >&5
5236echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5237fi
5238
ba4481b5 5239
c0d27fcc 5240
ca81d7a0 5241
1bb9a689
MB
5242## Need makeinfo >= 4.6 (?) to build the manuals.
5243# Extract the first word of "makeinfo", so it can be a program name with args.
5244set dummy makeinfo; ac_word=$2
5245{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5246echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5247if test "${ac_cv_path_MAKEINFO+set}" = set; then
5248 echo $ECHO_N "(cached) $ECHO_C" >&6
5249else
5250 case $MAKEINFO in
5251 [\\/]* | ?:[\\/]*)
5252 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5253 ;;
5254 *)
5255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258 IFS=$as_save_IFS
5259 test -z "$as_dir" && as_dir=.
5260 for ac_exec_ext in '' $ac_executable_extensions; do
5261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5263 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5264 break 2
5265 fi
5266done
5267done
5268IFS=$as_save_IFS
5269
5270 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5271 ;;
5272esac
5273fi
5274MAKEINFO=$ac_cv_path_MAKEINFO
5275if test -n "$MAKEINFO"; then
5276 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5277echo "${ECHO_T}$MAKEINFO" >&6; }
5278else
5279 { echo "$as_me:$LINENO: result: no" >&5
5280echo "${ECHO_T}no" >&6; }
5281fi
5282
5283
5284if test "$MAKEINFO" != "no" && \
d4840f44 5285 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
5286 MAKEINFO=no
5287fi
5288
e1b89931
GM
5289## Makeinfo is unusual. For a released Emacs, the manuals are
5290## pre-built, and not deleted by the normal clean rules. makeinfo is
5291## therefore in the category of "special tools" not normally required, which
5292## configure does not have to check for (eg autoconf itself).
5293## In a CVS checkout on the other hand, the manuals are not included.
5294## So makeinfo is a requirement to build from CVS, and configure
5295## should test for it as it does for any other build requirement.
5296## We use the presence of $srcdir/info/emacs to distinguish a release,
5297## with pre-built manuals, from a CVS checkout.
5298if test "$MAKEINFO" = "no"; then
5299 if test "x${with_makeinfo}" = "xno"; then
5300 MAKEINFO=off
5301 elif ! test -e $srcdir/info/emacs; then
5302 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5303source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5304Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5305with the \`--without-makeinfo' option to build without the manuals. " >&5
5306echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5307source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5308Either install a suitable version of makeinfo, or re-run configure
e1b89931 5309with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5310 { (exit 1); exit 1; }; }
e1b89931 5311 fi
921fbdf0 5312fi
1bb9a689
MB
5313
5314
8e967cf7
MR
5315if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5316then
5317 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5318fi
5319
5320if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5321then
5322 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5323fi
5324
c0d27fcc 5325
fe239f0f 5326late_LDFLAGS=$LDFLAGS
4af002d6 5327if test "$GCC" = yes; then
fe239f0f
AS
5328 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5329else
5330 LDFLAGS="$LDFLAGS -znocombreloc"
5331fi
5332
ca81d7a0
JD
5333{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5334echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5335cat >conftest.$ac_ext <<_ACEOF
5336main(){return 0;}
5337_ACEOF
5338rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5339if { (ac_try="$ac_link"
5340case "(($ac_try" in
5341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5342 *) ac_try_echo=$ac_try;;
5343esac
5344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5345 (eval "$ac_link") 2>conftest.er1
fe239f0f 5346 ac_status=$?
edfaf76d
LK
5347 grep -v '^ *+' conftest.er1 >conftest.err
5348 rm -f conftest.er1
5349 cat conftest.err >&5
fe239f0f 5350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5351 (exit $ac_status); } && {
5352 test -z "$ac_c_werror_flag" ||
5353 test ! -s conftest.err
5354 } && test -s conftest$ac_exeext &&
5355 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5356 { echo "$as_me:$LINENO: result: yes" >&5
5357echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5358else
5359 echo "$as_me: failed program was:" >&5
5360sed 's/^/| /' conftest.$ac_ext >&5
5361
ca81d7a0
JD
5362 LDFLAGS=$late_LDFLAGS
5363 { echo "$as_me:$LINENO: result: no" >&5
5364echo "${ECHO_T}no" >&6; }
fe239f0f 5365fi
ca81d7a0 5366
f053c89f 5367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5368 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5369
3b33a005
DL
5370#### Extract some information from the operating system and machine files.
5371
c0d27fcc 5372{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5373 - which libraries the lib-src programs will want, and
503d2be0
AS
5374 - whether the GNU malloc routines are usable..." >&5
5375echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5376 - which libraries the lib-src programs will want, and
503d2be0 5377 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5378
5379### First figure out CFLAGS (which we use for running the compiler here)
5380### and REAL_CFLAGS (which we use for real compilation).
5381### The two are the same except on a few systems, where they are made
5382### different to work around various lossages. For example,
5383### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5384### as implying static linking.
5385
5386### If the CFLAGS env var is specified, we use that value
5387### instead of the default.
5388
5389### It's not important that this name contain the PID; you can't run
5390### two configures in the same directory and have anything work
5391### anyway.
5392tempcname="conftest.c"
5393
5394echo '
5395#include "'${srcdir}'/src/'${opsysfile}'"
5396#include "'${srcdir}'/src/'${machfile}'"
5397#ifndef LIBS_MACHINE
5398#define LIBS_MACHINE
5399#endif
5400#ifndef LIBS_SYSTEM
5401#define LIBS_SYSTEM
5402#endif
5403#ifndef C_SWITCH_SYSTEM
5404#define C_SWITCH_SYSTEM
5405#endif
5406#ifndef C_SWITCH_MACHINE
5407#define C_SWITCH_MACHINE
5408#endif
5409configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5410configure___ c_switch_system=C_SWITCH_SYSTEM
5411configure___ c_switch_machine=C_SWITCH_MACHINE
5412
5413#ifndef LIB_X11_LIB
5414#define LIB_X11_LIB -lX11
5415#endif
5416
3b33a005
DL
5417#ifndef LIBX11_SYSTEM
5418#define LIBX11_SYSTEM
5419#endif
9d2818d6 5420configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5421
5422#ifdef UNEXEC
5423configure___ unexec=UNEXEC
5424#else
5425configure___ unexec=unexec.o
5426#endif
5427
5428#ifdef SYSTEM_MALLOC
5429configure___ system_malloc=yes
5430#else
5431configure___ system_malloc=no
5432#endif
5433
ef9e4345
GM
5434#ifdef USE_MMAP_FOR_BUFFERS
5435configure___ use_mmap_for_buffers=yes
73b77ee5 5436#else
ef9e4345 5437configure___ use_mmap_for_buffers=no
73b77ee5
GM
5438#endif
5439
3b33a005
DL
5440#ifndef C_DEBUG_SWITCH
5441#define C_DEBUG_SWITCH -g
5442#endif
5443
5444#ifndef C_OPTIMIZE_SWITCH
5445#ifdef __GNUC__
5446#define C_OPTIMIZE_SWITCH -O2
5447#else
5448#define C_OPTIMIZE_SWITCH -O
5449#endif
5450#endif
5451
01abe918
CY
5452#ifndef C_WARNINGS_SWITCH
5453#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5454#endif
5455
3b33a005
DL
5456#ifndef LD_SWITCH_MACHINE
5457#define LD_SWITCH_MACHINE
5458#endif
5459
5460#ifndef LD_SWITCH_SYSTEM
5461#define LD_SWITCH_SYSTEM
5462#endif
5463
5464#ifndef LD_SWITCH_X_SITE_AUX
5465#define LD_SWITCH_X_SITE_AUX
503d2be0 5466#endif
3b33a005
DL
5467
5468configure___ ld_switch_system=LD_SWITCH_SYSTEM
5469configure___ ld_switch_machine=LD_SWITCH_MACHINE
5470
5471#ifdef THIS_IS_CONFIGURE
5472
5473/* Get the CFLAGS for tests in configure. */
5474#ifdef __GNUC__
5475configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5476#else
5477configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5478#endif
5479
5480#else /* not THIS_IS_CONFIGURE */
5481
5482/* Get the CFLAGS for real compilation. */
5483#ifdef __GNUC__
01abe918 5484configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5485#else
5486configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5487#endif
5488
5489#endif /* not THIS_IS_CONFIGURE */
5490' > ${tempcname}
5491
5492# The value of CPP is a quoted variable reference, so we need to do this
5493# to get its actual value...
5494CPP=`eval "echo $CPP"`
5495eval `${CPP} -Isrc ${tempcname} \
5496 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5497if test "x$SPECIFIED_CFLAGS" = x; then
5498 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5499 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5500else
5501 REAL_CFLAGS="$CFLAGS"
5502fi
5503rm ${tempcname}
5504
5505ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5506
5507### Make sure subsequent tests use flags consistent with the build flags.
5508
5509if test x"${OVERRIDE_CPPFLAGS}" != x; then
5510 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5511else
5512 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5513fi
5514
6bae0ccf
DL
5515
5516
ca81d7a0 5517# Check whether --enable-largefile was given.
f4988be7 5518if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5519 enableval=$enable_largefile;
5520fi
f4988be7 5521
503d2be0 5522if test "$enable_largefile" != no; then
f4988be7 5523
ca81d7a0
JD
5524 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5525echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5526if test "${ac_cv_sys_largefile_CC+set}" = set; then
5527 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5528else
f4988be7 5529 ac_cv_sys_largefile_CC=no
503d2be0
AS
5530 if test "$GCC" != yes; then
5531 ac_save_CC=$CC
5532 while :; do
ca81d7a0
JD
5533 # IRIX 6.2 and later do not support large files by default,
5534 # so use the C compiler's -n32 option if that helps.
edfaf76d 5535 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5536/* confdefs.h. */
5537_ACEOF
5538cat confdefs.h >>conftest.$ac_ext
5539cat >>conftest.$ac_ext <<_ACEOF
5540/* end confdefs.h. */
f4988be7 5541#include <sys/types.h>
503d2be0
AS
5542 /* Check that off_t can represent 2**63 - 1 correctly.
5543 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5544 since some C++ compilers masquerading as C compilers
5545 incorrectly reject 9223372036854775807. */
5546#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5547 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5548 && LARGE_OFF_T % 2147483647 == 1)
5549 ? 1 : -1];
5550int
5551main ()
5552{
f4988be7 5553
503d2be0
AS
5554 ;
5555 return 0;
5556}
5557_ACEOF
ca81d7a0
JD
5558 rm -f conftest.$ac_objext
5559if { (ac_try="$ac_compile"
5560case "(($ac_try" in
5561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5562 *) ac_try_echo=$ac_try;;
5563esac
5564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5565 (eval "$ac_compile") 2>conftest.er1
503d2be0 5566 ac_status=$?
edfaf76d
LK
5567 grep -v '^ *+' conftest.er1 >conftest.err
5568 rm -f conftest.er1
5569 cat conftest.err >&5
c0d27fcc 5570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5571 (exit $ac_status); } && {
5572 test -z "$ac_c_werror_flag" ||
5573 test ! -s conftest.err
5574 } && test -s conftest.$ac_objext; then
503d2be0 5575 break
b192d653 5576else
503d2be0 5577 echo "$as_me: failed program was:" >&5
19650fd6
AS
5578sed 's/^/| /' conftest.$ac_ext >&5
5579
ca81d7a0 5580
503d2be0 5581fi
ca81d7a0
JD
5582
5583rm -f core conftest.err conftest.$ac_objext
5584 CC="$CC -n32"
5585 rm -f conftest.$ac_objext
5586if { (ac_try="$ac_compile"
5587case "(($ac_try" in
5588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5589 *) ac_try_echo=$ac_try;;
5590esac
5591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5592 (eval "$ac_compile") 2>conftest.er1
503d2be0 5593 ac_status=$?
edfaf76d
LK
5594 grep -v '^ *+' conftest.er1 >conftest.err
5595 rm -f conftest.er1
5596 cat conftest.err >&5
c0d27fcc 5597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5598 (exit $ac_status); } && {
5599 test -z "$ac_c_werror_flag" ||
5600 test ! -s conftest.err
5601 } && test -s conftest.$ac_objext; then
503d2be0
AS
5602 ac_cv_sys_largefile_CC=' -n32'; break
5603else
5604 echo "$as_me: failed program was:" >&5
19650fd6
AS
5605sed 's/^/| /' conftest.$ac_ext >&5
5606
ca81d7a0 5607
503d2be0 5608fi
ca81d7a0
JD
5609
5610rm -f core conftest.err conftest.$ac_objext
edfaf76d 5611 break
503d2be0
AS
5612 done
5613 CC=$ac_save_CC
5614 rm -f conftest.$ac_ext
5615 fi
b192d653 5616fi
ca81d7a0
JD
5617{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5618echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5619 if test "$ac_cv_sys_largefile_CC" != no; then
5620 CC=$CC$ac_cv_sys_largefile_CC
5621 fi
b192d653 5622
ca81d7a0
JD
5623 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5624echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5625if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5626 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5627else
503d2be0 5628 while :; do
503d2be0 5629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5630/* confdefs.h. */
5631_ACEOF
5632cat confdefs.h >>conftest.$ac_ext
5633cat >>conftest.$ac_ext <<_ACEOF
5634/* end confdefs.h. */
f4988be7 5635#include <sys/types.h>
503d2be0
AS
5636 /* Check that off_t can represent 2**63 - 1 correctly.
5637 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5638 since some C++ compilers masquerading as C compilers
5639 incorrectly reject 9223372036854775807. */
5640#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5641 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5642 && LARGE_OFF_T % 2147483647 == 1)
5643 ? 1 : -1];
5644int
5645main ()
5646{
f4988be7 5647
503d2be0
AS
5648 ;
5649 return 0;
5650}
5651_ACEOF
5652rm -f conftest.$ac_objext
ca81d7a0
JD
5653if { (ac_try="$ac_compile"
5654case "(($ac_try" in
5655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5656 *) ac_try_echo=$ac_try;;
5657esac
5658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5659 (eval "$ac_compile") 2>conftest.er1
503d2be0 5660 ac_status=$?
edfaf76d
LK
5661 grep -v '^ *+' conftest.er1 >conftest.err
5662 rm -f conftest.er1
5663 cat conftest.err >&5
c0d27fcc 5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5665 (exit $ac_status); } && {
5666 test -z "$ac_c_werror_flag" ||
5667 test ! -s conftest.err
5668 } && test -s conftest.$ac_objext; then
5669 ac_cv_sys_file_offset_bits=no; break
f4988be7 5670else
503d2be0 5671 echo "$as_me: failed program was:" >&5
19650fd6
AS
5672sed 's/^/| /' conftest.$ac_ext >&5
5673
ca81d7a0 5674
503d2be0 5675fi
ca81d7a0
JD
5676
5677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5678 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5679/* confdefs.h. */
5680_ACEOF
5681cat confdefs.h >>conftest.$ac_ext
5682cat >>conftest.$ac_ext <<_ACEOF
5683/* end confdefs.h. */
f4988be7
GM
5684#define _FILE_OFFSET_BITS 64
5685#include <sys/types.h>
503d2be0
AS
5686 /* Check that off_t can represent 2**63 - 1 correctly.
5687 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5688 since some C++ compilers masquerading as C compilers
5689 incorrectly reject 9223372036854775807. */
5690#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5691 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5692 && LARGE_OFF_T % 2147483647 == 1)
5693 ? 1 : -1];
5694int
5695main ()
5696{
5697
5698 ;
5699 return 0;
5700}
5701_ACEOF
5702rm -f conftest.$ac_objext
ca81d7a0
JD
5703if { (ac_try="$ac_compile"
5704case "(($ac_try" in
5705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5706 *) ac_try_echo=$ac_try;;
5707esac
5708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5709 (eval "$ac_compile") 2>conftest.er1
503d2be0 5710 ac_status=$?
edfaf76d
LK
5711 grep -v '^ *+' conftest.er1 >conftest.err
5712 rm -f conftest.er1
5713 cat conftest.err >&5
c0d27fcc 5714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5715 (exit $ac_status); } && {
5716 test -z "$ac_c_werror_flag" ||
5717 test ! -s conftest.err
5718 } && test -s conftest.$ac_objext; then
503d2be0
AS
5719 ac_cv_sys_file_offset_bits=64; break
5720else
5721 echo "$as_me: failed program was:" >&5
19650fd6
AS
5722sed 's/^/| /' conftest.$ac_ext >&5
5723
ca81d7a0 5724
503d2be0 5725fi
ca81d7a0
JD
5726
5727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5728 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5729 break
5730done
ba4481b5 5731fi
ca81d7a0
JD
5732{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5733echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5734case $ac_cv_sys_file_offset_bits in #(
5735 no | unknown) ;;
5736 *)
c0d27fcc 5737cat >>confdefs.h <<_ACEOF
f4988be7 5738#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5739_ACEOF
f053c89f
CY
5740;;
5741esac
503d2be0 5742rm -f conftest*
f053c89f
CY
5743 if test $ac_cv_sys_file_offset_bits = unknown; then
5744 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5745echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5746if test "${ac_cv_sys_large_files+set}" = set; then
5747 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5748else
503d2be0 5749 while :; do
503d2be0 5750 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
503d2be0
AS
5756#include <sys/types.h>
5757 /* Check that off_t can represent 2**63 - 1 correctly.
5758 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5759 since some C++ compilers masquerading as C compilers
5760 incorrectly reject 9223372036854775807. */
5761#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5762 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5763 && LARGE_OFF_T % 2147483647 == 1)
5764 ? 1 : -1];
5765int
5766main ()
5767{
ba4481b5 5768
503d2be0
AS
5769 ;
5770 return 0;
5771}
5772_ACEOF
5773rm -f conftest.$ac_objext
ca81d7a0
JD
5774if { (ac_try="$ac_compile"
5775case "(($ac_try" in
5776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5777 *) ac_try_echo=$ac_try;;
5778esac
5779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5780 (eval "$ac_compile") 2>conftest.er1
503d2be0 5781 ac_status=$?
edfaf76d
LK
5782 grep -v '^ *+' conftest.er1 >conftest.err
5783 rm -f conftest.er1
5784 cat conftest.err >&5
c0d27fcc 5785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5786 (exit $ac_status); } && {
5787 test -z "$ac_c_werror_flag" ||
5788 test ! -s conftest.err
5789 } && test -s conftest.$ac_objext; then
5790 ac_cv_sys_large_files=no; break
ba4481b5 5791else
503d2be0 5792 echo "$as_me: failed program was:" >&5
19650fd6
AS
5793sed 's/^/| /' conftest.$ac_ext >&5
5794
ca81d7a0 5795
503d2be0 5796fi
ca81d7a0
JD
5797
5798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5800/* confdefs.h. */
5801_ACEOF
5802cat confdefs.h >>conftest.$ac_ext
5803cat >>conftest.$ac_ext <<_ACEOF
5804/* end confdefs.h. */
f4988be7 5805#define _LARGE_FILES 1
503d2be0
AS
5806#include <sys/types.h>
5807 /* Check that off_t can represent 2**63 - 1 correctly.
5808 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5809 since some C++ compilers masquerading as C compilers
5810 incorrectly reject 9223372036854775807. */
5811#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5812 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5813 && LARGE_OFF_T % 2147483647 == 1)
5814 ? 1 : -1];
5815int
5816main ()
5817{
f4988be7 5818
503d2be0
AS
5819 ;
5820 return 0;
5821}
5822_ACEOF
5823rm -f conftest.$ac_objext
ca81d7a0
JD
5824if { (ac_try="$ac_compile"
5825case "(($ac_try" in
5826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5827 *) ac_try_echo=$ac_try;;
5828esac
5829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5830 (eval "$ac_compile") 2>conftest.er1
503d2be0 5831 ac_status=$?
edfaf76d
LK
5832 grep -v '^ *+' conftest.er1 >conftest.err
5833 rm -f conftest.er1
5834 cat conftest.err >&5
c0d27fcc 5835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5836 (exit $ac_status); } && {
5837 test -z "$ac_c_werror_flag" ||
5838 test ! -s conftest.err
5839 } && test -s conftest.$ac_objext; then
503d2be0
AS
5840 ac_cv_sys_large_files=1; break
5841else
5842 echo "$as_me: failed program was:" >&5
19650fd6
AS
5843sed 's/^/| /' conftest.$ac_ext >&5
5844
ca81d7a0 5845
503d2be0 5846fi
ca81d7a0
JD
5847
5848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5849 ac_cv_sys_large_files=unknown
503d2be0
AS
5850 break
5851done
ba4481b5 5852fi
ca81d7a0
JD
5853{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5854echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5855case $ac_cv_sys_large_files in #(
5856 no | unknown) ;;
5857 *)
c0d27fcc 5858cat >>confdefs.h <<_ACEOF
f4988be7 5859#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5860_ACEOF
f053c89f
CY
5861;;
5862esac
503d2be0 5863rm -f conftest*
f053c89f 5864 fi
503d2be0 5865fi
ba4481b5 5866
c0d27fcc 5867
439f58ee 5868
55e6d9b2 5869### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5870### be located in either /usr/lib64 or /usr/lib.
5871case "${canonical}" in
55e6d9b2 5872 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5873 if test -d /usr/lib64; then
5874
5875cat >>confdefs.h <<\_ACEOF
55e6d9b2 5876#define HAVE_LIB64_DIR 1
bc5d9888
CY
5877_ACEOF
5878
5879fi
5880esac
5881
439f58ee
JD
5882
5883
5884
2c9dccc9
PJ
5885if test "${with_sound}" != "no"; then
5886 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5887
5888
5889
5890for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5891do
5892as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5893if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5894 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5895echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5896if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5897 echo $ECHO_N "(cached) $ECHO_C" >&6
5898fi
ca81d7a0
JD
5899ac_res=`eval echo '${'$as_ac_Header'}'`
5900 { echo "$as_me:$LINENO: result: $ac_res" >&5
5901echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5902else
5903 # Is the header compilable?
ca81d7a0
JD
5904{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5905echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5906cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5907/* confdefs.h. */
5908_ACEOF
5909cat confdefs.h >>conftest.$ac_ext
5910cat >>conftest.$ac_ext <<_ACEOF
5911/* end confdefs.h. */
c0d27fcc 5912$ac_includes_default
98418dba 5913#include <$ac_header>
503d2be0 5914_ACEOF
c0d27fcc 5915rm -f conftest.$ac_objext
ca81d7a0
JD
5916if { (ac_try="$ac_compile"
5917case "(($ac_try" in
5918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5919 *) ac_try_echo=$ac_try;;
5920esac
5921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5922 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5923 ac_status=$?
edfaf76d
LK
5924 grep -v '^ *+' conftest.er1 >conftest.err
5925 rm -f conftest.er1
5926 cat conftest.err >&5
c0d27fcc 5927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5928 (exit $ac_status); } && {
5929 test -z "$ac_c_werror_flag" ||
5930 test ! -s conftest.err
5931 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5932 ac_header_compiler=yes
5933else
5934 echo "$as_me: failed program was:" >&5
19650fd6
AS
5935sed 's/^/| /' conftest.$ac_ext >&5
5936
ca81d7a0 5937 ac_header_compiler=no
c0d27fcc 5938fi
ca81d7a0
JD
5939
5940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5941{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5942echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5943
5944# Is the header present?
ca81d7a0
JD
5945{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5946echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5947cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5948/* confdefs.h. */
5949_ACEOF
5950cat confdefs.h >>conftest.$ac_ext
5951cat >>conftest.$ac_ext <<_ACEOF
5952/* end confdefs.h. */
c0d27fcc
MR
5953#include <$ac_header>
5954_ACEOF
ca81d7a0
JD
5955if { (ac_try="$ac_cpp conftest.$ac_ext"
5956case "(($ac_try" in
5957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5958 *) ac_try_echo=$ac_try;;
5959esac
5960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5961 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5962 ac_status=$?
6bae0ccf 5963 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5964 rm -f conftest.er1
5965 cat conftest.err >&5
c0d27fcc 5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5967 (exit $ac_status); } >/dev/null && {
5968 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5969 test ! -s conftest.err
5970 }; then
c0d27fcc 5971 ac_header_preproc=yes
f4988be7 5972else
503d2be0 5973 echo "$as_me: failed program was:" >&5
19650fd6
AS
5974sed 's/^/| /' conftest.$ac_ext >&5
5975
c0d27fcc 5976 ac_header_preproc=no
f4988be7 5977fi
ca81d7a0 5978
98418dba 5979rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
5980{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5981echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
5982
5983# So? What about this header?
edfaf76d
LK
5984case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5985 yes:no: )
c0d27fcc
MR
5986 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5987echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5988 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5989echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5990 ac_header_preproc=yes
19650fd6 5991 ;;
edfaf76d 5992 no:yes:* )
c0d27fcc
MR
5993 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5994echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5995 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5996echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5997 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5998echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5999 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6000echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6001 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6002echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6003 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6004echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6005
19650fd6 6006 ;;
c0d27fcc 6007esac
ca81d7a0
JD
6008{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6009echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6010if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6011 echo $ECHO_N "(cached) $ECHO_C" >&6
6012else
edfaf76d 6013 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6014fi
ca81d7a0
JD
6015ac_res=`eval echo '${'$as_ac_Header'}'`
6016 { echo "$as_me:$LINENO: result: $ac_res" >&5
6017echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6018
6019fi
98418dba 6020if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6021 cat >>confdefs.h <<_ACEOF
98418dba 6022#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6023_ACEOF
f4988be7
GM
6024
6025fi
c0d27fcc 6026
98418dba
CW
6027done
6028
6029 # Emulation library used on NetBSD.
ca81d7a0
JD
6030 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6031echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6032if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6033 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6034else
98418dba
CW
6035 ac_check_lib_save_LIBS=$LIBS
6036LIBS="-lossaudio $LIBS"
6037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6038/* confdefs.h. */
6039_ACEOF
6040cat confdefs.h >>conftest.$ac_ext
6041cat >>conftest.$ac_ext <<_ACEOF
6042/* end confdefs.h. */
98418dba 6043
ca81d7a0
JD
6044/* Override any GCC internal prototype to avoid an error.
6045 Use char because int might match the return type of a GCC
6046 builtin and then its argument prototype would still apply. */
98418dba
CW
6047#ifdef __cplusplus
6048extern "C"
f4988be7 6049#endif
98418dba 6050char _oss_ioctl ();
503d2be0
AS
6051int
6052main ()
6053{
ca81d7a0 6054return _oss_ioctl ();
503d2be0
AS
6055 ;
6056 return 0;
6057}
6058_ACEOF
98418dba 6059rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6060if { (ac_try="$ac_link"
6061case "(($ac_try" in
6062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6063 *) ac_try_echo=$ac_try;;
6064esac
6065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6066 (eval "$ac_link") 2>conftest.er1
503d2be0 6067 ac_status=$?
edfaf76d
LK
6068 grep -v '^ *+' conftest.er1 >conftest.err
6069 rm -f conftest.er1
6070 cat conftest.err >&5
c0d27fcc 6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6072 (exit $ac_status); } && {
6073 test -z "$ac_c_werror_flag" ||
6074 test ! -s conftest.err
6075 } && test -s conftest$ac_exeext &&
6076 $as_test_x conftest$ac_exeext; then
98418dba 6077 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6078else
503d2be0 6079 echo "$as_me: failed program was:" >&5
19650fd6
AS
6080sed 's/^/| /' conftest.$ac_ext >&5
6081
ca81d7a0 6082 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6083fi
ca81d7a0 6084
f053c89f 6085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6086 conftest$ac_exeext conftest.$ac_ext
98418dba 6087LIBS=$ac_check_lib_save_LIBS
f4988be7 6088fi
ca81d7a0
JD
6089{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6090echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6091if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6092 LIBSOUND=-lossaudio
6093else
6094 LIBSOUND=
6095fi
6096
c0d27fcc 6097
439f58ee
JD
6098
6099 ALSA_REQUIRED=1.0.0
6100 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6101
6102 succeeded=no
6103
00b9c927 6104 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6105set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6106{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6107echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6108if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6110else
6111 case $PKG_CONFIG in
6112 [\\/]* | ?:[\\/]*)
6113 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6114 ;;
6115 *)
6116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117for as_dir in $PATH
6118do
6119 IFS=$as_save_IFS
6120 test -z "$as_dir" && as_dir=.
6121 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6122 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6123 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6124 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6125 break 2
6126 fi
6127done
6128done
ca81d7a0 6129IFS=$as_save_IFS
439f58ee
JD
6130
6131 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6132 ;;
6133esac
6134fi
6135PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6136if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6137 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6138echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6139else
ca81d7a0
JD
6140 { echo "$as_me:$LINENO: result: no" >&5
6141echo "${ECHO_T}no" >&6; }
439f58ee
JD
6142fi
6143
ca81d7a0 6144
439f58ee
JD
6145
6146 if test "$PKG_CONFIG" = "no" ; then
6147 HAVE_ALSA=no
6148 else
6149 PKG_CONFIG_MIN_VERSION=0.9.0
6150 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6151 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6152echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6153
67db6aa2 6154 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6155 { echo "$as_me:$LINENO: result: yes" >&5
6156echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6157 succeeded=yes
6158
ca81d7a0
JD
6159 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6160echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6161 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6162 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6163echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6164
ca81d7a0
JD
6165 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6166echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6167 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6168 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6169echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6170 else
ca81d7a0
JD
6171 { echo "$as_me:$LINENO: result: no" >&5
6172echo "${ECHO_T}no" >&6; }
439f58ee
JD
6173 ALSA_CFLAGS=""
6174 ALSA_LIBS=""
6175 ## If we have a custom action on failure, don't print errors, but
6176 ## do set a variable so people can do so.
6177 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6178
6179 fi
6180
6181
6182
6183 else
6184 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6185 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6186 fi
6187 fi
6188
6189 if test $succeeded = yes; then
6190 HAVE_ALSA=yes
6191 else
6192 HAVE_ALSA=no
6193 fi
6194
6195 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6196 SAVE_CFLAGS="$CFLAGS"
6197 SAVE_LDFLAGS="$LDFLAGS"
6198 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6199 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6200 cat >conftest.$ac_ext <<_ACEOF
6201/* confdefs.h. */
6202_ACEOF
6203cat confdefs.h >>conftest.$ac_ext
6204cat >>conftest.$ac_ext <<_ACEOF
6205/* end confdefs.h. */
6206#include <asoundlib.h>
6207int
6208main ()
6209{
6210snd_lib_error_set_handler (0);
6211 ;
6212 return 0;
6213}
6214_ACEOF
6215rm -f conftest.$ac_objext
6216if { (ac_try="$ac_compile"
6217case "(($ac_try" in
6218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6219 *) ac_try_echo=$ac_try;;
6220esac
6221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6222 (eval "$ac_compile") 2>conftest.er1
6223 ac_status=$?
6224 grep -v '^ *+' conftest.er1 >conftest.err
6225 rm -f conftest.er1
6226 cat conftest.err >&5
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6228 (exit $ac_status); } && {
6229 test -z "$ac_c_werror_flag" ||
6230 test ! -s conftest.err
6231 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6232 emacs_alsa_normal=yes
6233else
6234 echo "$as_me: failed program was:" >&5
6235sed 's/^/| /' conftest.$ac_ext >&5
6236
6237 emacs_alsa_normal=no
6238fi
6239
6240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6241 if test "$emacs_alsa_normal" != yes; then
6242 cat >conftest.$ac_ext <<_ACEOF
6243/* confdefs.h. */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h. */
6248#include <alsa/asoundlib.h>
6249int
6250main ()
6251{
6252snd_lib_error_set_handler (0);
6253 ;
6254 return 0;
6255}
6256_ACEOF
6257rm -f conftest.$ac_objext
6258if { (ac_try="$ac_compile"
6259case "(($ac_try" in
6260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6261 *) ac_try_echo=$ac_try;;
6262esac
6263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6264 (eval "$ac_compile") 2>conftest.er1
6265 ac_status=$?
6266 grep -v '^ *+' conftest.er1 >conftest.err
6267 rm -f conftest.er1
6268 cat conftest.err >&5
6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6270 (exit $ac_status); } && {
6271 test -z "$ac_c_werror_flag" ||
6272 test ! -s conftest.err
6273 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6274 emacs_alsa_subdir=yes
6275else
6276 echo "$as_me: failed program was:" >&5
6277sed 's/^/| /' conftest.$ac_ext >&5
6278
6279 emacs_alsa_subdir=no
6280fi
6281
6282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6283 if test "$emacs_alsa_subdir" != yes; then
6284 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6285echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6286 { (exit 1); exit 1; }; }
6287 fi
6288 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6289 fi
6290
6291 CFLAGS="$SAVE_CFLAGS"
6292 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6293 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6294 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6295
6296cat >>confdefs.h <<\_ACEOF
6297#define HAVE_ALSA 1
6298_ACEOF
6299
6300 fi
6301
f4988be7 6302fi
c0d27fcc
MR
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
22044edf
DL
6321
6322
973a76b1 6323
cffcede7 6324
551ffc27 6325
226e2359 6326
c0d27fcc 6327
f4988be7 6328
98418dba
CW
6329for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6330 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6331 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6332 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6333 sys/utsname.h pwd.h
98418dba
CW
6334do
6335as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6336if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6337 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6338echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6339if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6340 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6341fi
ca81d7a0
JD
6342ac_res=`eval echo '${'$as_ac_Header'}'`
6343 { echo "$as_me:$LINENO: result: $ac_res" >&5
6344echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6345else
c0d27fcc 6346 # Is the header compilable?
ca81d7a0
JD
6347{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6348echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6349cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6350/* confdefs.h. */
6351_ACEOF
6352cat confdefs.h >>conftest.$ac_ext
6353cat >>conftest.$ac_ext <<_ACEOF
6354/* end confdefs.h. */
c0d27fcc
MR
6355$ac_includes_default
6356#include <$ac_header>
6357_ACEOF
6358rm -f conftest.$ac_objext
ca81d7a0
JD
6359if { (ac_try="$ac_compile"
6360case "(($ac_try" in
6361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6362 *) ac_try_echo=$ac_try;;
6363esac
6364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6365 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6366 ac_status=$?
edfaf76d
LK
6367 grep -v '^ *+' conftest.er1 >conftest.err
6368 rm -f conftest.er1
6369 cat conftest.err >&5
c0d27fcc 6370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6371 (exit $ac_status); } && {
6372 test -z "$ac_c_werror_flag" ||
6373 test ! -s conftest.err
6374 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6375 ac_header_compiler=yes
6376else
6377 echo "$as_me: failed program was:" >&5
19650fd6
AS
6378sed 's/^/| /' conftest.$ac_ext >&5
6379
ca81d7a0 6380 ac_header_compiler=no
c0d27fcc 6381fi
ca81d7a0
JD
6382
6383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6384{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6385echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6386
6387# Is the header present?
ca81d7a0
JD
6388{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6389echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6390cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
98418dba 6396#include <$ac_header>
503d2be0 6397_ACEOF
ca81d7a0
JD
6398if { (ac_try="$ac_cpp conftest.$ac_ext"
6399case "(($ac_try" in
6400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6401 *) ac_try_echo=$ac_try;;
6402esac
6403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6404 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6405 ac_status=$?
6bae0ccf 6406 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6407 rm -f conftest.er1
6408 cat conftest.err >&5
c0d27fcc 6409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6410 (exit $ac_status); } >/dev/null && {
6411 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6412 test ! -s conftest.err
6413 }; then
c0d27fcc 6414 ac_header_preproc=yes
34ec9ebe 6415else
503d2be0 6416 echo "$as_me: failed program was:" >&5
19650fd6
AS
6417sed 's/^/| /' conftest.$ac_ext >&5
6418
c0d27fcc 6419 ac_header_preproc=no
34ec9ebe 6420fi
ca81d7a0 6421
98418dba 6422rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6423{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6424echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6425
6426# So? What about this header?
edfaf76d
LK
6427case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6428 yes:no: )
c0d27fcc
MR
6429 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6430echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6431 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6432echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6433 ac_header_preproc=yes
19650fd6 6434 ;;
edfaf76d 6435 no:yes:* )
c0d27fcc
MR
6436 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6437echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6438 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6439echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6440 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6441echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6442 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6443echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6444 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6445echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6446 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6447echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6448
19650fd6 6449 ;;
c0d27fcc 6450esac
ca81d7a0
JD
6451{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6452echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6453if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6454 echo $ECHO_N "(cached) $ECHO_C" >&6
6455else
edfaf76d 6456 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6457fi
ca81d7a0
JD
6458ac_res=`eval echo '${'$as_ac_Header'}'`
6459 { echo "$as_me:$LINENO: result: $ac_res" >&5
6460echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6461
6462fi
98418dba 6463if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6464 cat >>confdefs.h <<_ACEOF
98418dba 6465#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6466_ACEOF
34ec9ebe 6467
98418dba 6468fi
c0d27fcc 6469
98418dba
CW
6470done
6471
22044edf 6472
ca81d7a0
JD
6473{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6474echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6475cat >conftest.$ac_ext <<_ACEOF
6476/* confdefs.h. */
6477_ACEOF
6478cat confdefs.h >>conftest.$ac_ext
6479cat >>conftest.$ac_ext <<_ACEOF
6480/* end confdefs.h. */
6481#include <sys/personality.h>
6482int
6483main ()
6484{
6485personality (PER_LINUX32)
6486 ;
6487 return 0;
6488}
6489_ACEOF
6490rm -f conftest.$ac_objext
ca81d7a0
JD
6491if { (ac_try="$ac_compile"
6492case "(($ac_try" in
6493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6494 *) ac_try_echo=$ac_try;;
6495esac
6496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6497 (eval "$ac_compile") 2>conftest.er1
f17e308a 6498 ac_status=$?
edfaf76d
LK
6499 grep -v '^ *+' conftest.er1 >conftest.err
6500 rm -f conftest.er1
6501 cat conftest.err >&5
f17e308a 6502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6503 (exit $ac_status); } && {
6504 test -z "$ac_c_werror_flag" ||
6505 test ! -s conftest.err
6506 } && test -s conftest.$ac_objext; then
f17e308a
JD
6507 emacs_cv_personality_linux32=yes
6508else
6509 echo "$as_me: failed program was:" >&5
6510sed 's/^/| /' conftest.$ac_ext >&5
6511
ca81d7a0 6512 emacs_cv_personality_linux32=no
f17e308a 6513fi
ca81d7a0
JD
6514
6515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6516{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6517echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6518
6519if test $emacs_cv_personality_linux32 = yes; then
6520
6521cat >>confdefs.h <<\_ACEOF
6522#define HAVE_PERSONALITY_LINUX32 1
6523_ACEOF
6524
6525fi
6526
6527
22044edf
DL
6528for ac_header in term.h
6529do
6530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6531{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6533if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6534 echo $ECHO_N "(cached) $ECHO_C" >&6
6535else
6536 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6537/* confdefs.h. */
6538_ACEOF
6539cat confdefs.h >>conftest.$ac_ext
6540cat >>conftest.$ac_ext <<_ACEOF
6541/* end confdefs.h. */
22044edf
DL
6542#include <$ac_header>
6543_ACEOF
ca81d7a0
JD
6544if { (ac_try="$ac_cpp conftest.$ac_ext"
6545case "(($ac_try" in
6546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6547 *) ac_try_echo=$ac_try;;
6548esac
6549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6550 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6551 ac_status=$?
6552 grep -v '^ *+' conftest.er1 >conftest.err
6553 rm -f conftest.er1
6554 cat conftest.err >&5
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6556 (exit $ac_status); } >/dev/null && {
6557 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6558 test ! -s conftest.err
6559 }; then
22044edf
DL
6560 eval "$as_ac_Header=yes"
6561else
6562 echo "$as_me: failed program was:" >&5
19650fd6
AS
6563sed 's/^/| /' conftest.$ac_ext >&5
6564
22044edf
DL
6565 eval "$as_ac_Header=no"
6566fi
ca81d7a0 6567
22044edf
DL
6568rm -f conftest.err conftest.$ac_ext
6569fi
ca81d7a0
JD
6570ac_res=`eval echo '${'$as_ac_Header'}'`
6571 { echo "$as_me:$LINENO: result: $ac_res" >&5
6572echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6573if test `eval echo '${'$as_ac_Header'}'` = yes; then
6574 cat >>confdefs.h <<_ACEOF
6575#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6576_ACEOF
6577
6578fi
6579
6580done
6581
ca81d7a0
JD
6582{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6583echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6584if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6585 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6586else
503d2be0 6587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
98418dba
CW
6593#include <stdlib.h>
6594#include <stdarg.h>
6595#include <string.h>
6596#include <float.h>
6597
19650fd6
AS
6598int
6599main ()
6600{
6601
6602 ;
6603 return 0;
6604}
98418dba 6605_ACEOF
19650fd6 6606rm -f conftest.$ac_objext
ca81d7a0
JD
6607if { (ac_try="$ac_compile"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
6612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6613 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6614 ac_status=$?
edfaf76d
LK
6615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
cd958eb3 6618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
6622 } && test -s conftest.$ac_objext; then
98418dba 6623 ac_cv_header_stdc=yes
ba4481b5 6624else
503d2be0 6625 echo "$as_me: failed program was:" >&5
19650fd6
AS
6626sed 's/^/| /' conftest.$ac_ext >&5
6627
ca81d7a0 6628 ac_cv_header_stdc=no
ba4481b5 6629fi
ca81d7a0
JD
6630
6631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6632
6633if test $ac_cv_header_stdc = yes; then
6634 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
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
CW
6641#include <string.h>
6642
6643_ACEOF
6644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6645 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6646 :
6647else
6648 ac_cv_header_stdc=no
ba4481b5 6649fi
98418dba 6650rm -f conftest*
ba4481b5
DL
6651
6652fi
6653
98418dba
CW
6654if test $ac_cv_header_stdc = yes; then
6655 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6656 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
98418dba
CW
6662#include <stdlib.h>
6663
6664_ACEOF
6665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6666 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6667 :
6668else
6669 ac_cv_header_stdc=no
6670fi
6671rm -f conftest*
6672
6673fi
6674
6675if test $ac_cv_header_stdc = yes; then
6676 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6677 if test "$cross_compiling" = yes; then
6678 :
d42122a3 6679else
503d2be0 6680 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6681/* confdefs.h. */
6682_ACEOF
6683cat confdefs.h >>conftest.$ac_ext
6684cat >>conftest.$ac_ext <<_ACEOF
6685/* end confdefs.h. */
98418dba 6686#include <ctype.h>
ca81d7a0 6687#include <stdlib.h>
98418dba
CW
6688#if ((' ' & 0x0FF) == 0x020)
6689# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6690# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6691#else
19650fd6 6692# define ISLOWER(c) \
edfaf76d
LK
6693 (('a' <= (c) && (c) <= 'i') \
6694 || ('j' <= (c) && (c) <= 'r') \
6695 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6696# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6697#endif
6698
6699#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6700int
6701main ()
6702{
98418dba
CW
6703 int i;
6704 for (i = 0; i < 256; i++)
6705 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6706 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6707 return 2;
6708 return 0;
503d2be0
AS
6709}
6710_ACEOF
98418dba 6711rm -f conftest$ac_exeext
ca81d7a0
JD
6712if { (ac_try="$ac_link"
6713case "(($ac_try" in
6714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6715 *) ac_try_echo=$ac_try;;
6716esac
6717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6718 (eval "$ac_link") 2>&5
503d2be0 6719 ac_status=$?
c0d27fcc 6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6722 { (case "(($ac_try" in
6723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6724 *) ac_try_echo=$ac_try;;
6725esac
6726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6727 (eval "$ac_try") 2>&5
503d2be0 6728 ac_status=$?
c0d27fcc 6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6730 (exit $ac_status); }; }; then
98418dba 6731 :
d42122a3 6732else
98418dba
CW
6733 echo "$as_me: program exited with status $ac_status" >&5
6734echo "$as_me: failed program was:" >&5
19650fd6
AS
6735sed 's/^/| /' conftest.$ac_ext >&5
6736
c0d27fcc 6737( exit $ac_status )
98418dba 6738ac_cv_header_stdc=no
d42122a3 6739fi
ca81d7a0 6740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6741fi
ca81d7a0
JD
6742
6743
98418dba
CW
6744fi
6745fi
ca81d7a0
JD
6746{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6747echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6748if test $ac_cv_header_stdc = yes; then
6749
c0d27fcc 6750cat >>confdefs.h <<\_ACEOF
98418dba 6751#define STDC_HEADERS 1
c0d27fcc 6752_ACEOF
d42122a3
DL
6753
6754fi
6755
ca81d7a0
JD
6756{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6757echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6758if test "${ac_cv_header_time+set}" = set; then
503d2be0 6759 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6760else
503d2be0 6761 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6762/* confdefs.h. */
6763_ACEOF
6764cat confdefs.h >>conftest.$ac_ext
6765cat >>conftest.$ac_ext <<_ACEOF
6766/* end confdefs.h. */
ba4481b5 6767#include <sys/types.h>
98418dba 6768#include <sys/time.h>
ba4481b5 6769#include <time.h>
503d2be0
AS
6770
6771int
6772main ()
6773{
98418dba
CW
6774if ((struct tm *) 0)
6775return 0;
503d2be0
AS
6776 ;
6777 return 0;
6778}
6779_ACEOF
6780rm -f conftest.$ac_objext
ca81d7a0
JD
6781if { (ac_try="$ac_compile"
6782case "(($ac_try" in
6783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6784 *) ac_try_echo=$ac_try;;
6785esac
6786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6787 (eval "$ac_compile") 2>conftest.er1
503d2be0 6788 ac_status=$?
edfaf76d
LK
6789 grep -v '^ *+' conftest.er1 >conftest.err
6790 rm -f conftest.er1
6791 cat conftest.err >&5
c0d27fcc 6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6793 (exit $ac_status); } && {
6794 test -z "$ac_c_werror_flag" ||
6795 test ! -s conftest.err
6796 } && test -s conftest.$ac_objext; then
98418dba 6797 ac_cv_header_time=yes
ba4481b5 6798else
503d2be0 6799 echo "$as_me: failed program was:" >&5
19650fd6
AS
6800sed 's/^/| /' conftest.$ac_ext >&5
6801
ca81d7a0 6802 ac_cv_header_time=no
ba4481b5 6803fi
ca81d7a0
JD
6804
6805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6806fi
ca81d7a0
JD
6807{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6808echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6809if test $ac_cv_header_time = yes; then
503d2be0 6810
c0d27fcc 6811cat >>confdefs.h <<\_ACEOF
98418dba 6812#define TIME_WITH_SYS_TIME 1
c0d27fcc 6813_ACEOF
ba4481b5
DL
6814
6815fi
6816
ca81d7a0
JD
6817{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6818echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6819if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6820 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6821else
503d2be0 6822 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6823/* confdefs.h. */
6824_ACEOF
6825cat confdefs.h >>conftest.$ac_ext
6826cat >>conftest.$ac_ext <<_ACEOF
6827/* end confdefs.h. */
cd958eb3
MB
6828$ac_includes_default
6829int
6830main ()
6831{
6832#ifndef sys_siglist
f053c89f 6833 (void) sys_siglist;
98418dba 6834#endif
503d2be0 6835
cd958eb3
MB
6836 ;
6837 return 0;
6838}
6839_ACEOF
6840rm -f conftest.$ac_objext
ca81d7a0
JD
6841if { (ac_try="$ac_compile"
6842case "(($ac_try" in
6843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6844 *) ac_try_echo=$ac_try;;
6845esac
6846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6847 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6848 ac_status=$?
edfaf76d
LK
6849 grep -v '^ *+' conftest.er1 >conftest.err
6850 rm -f conftest.er1
6851 cat conftest.err >&5
cd958eb3 6852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6853 (exit $ac_status); } && {
6854 test -z "$ac_c_werror_flag" ||
6855 test ! -s conftest.err
6856 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6857 ac_cv_have_decl_sys_siglist=yes
6858else
6859 echo "$as_me: failed program was:" >&5
19650fd6
AS
6860sed 's/^/| /' conftest.$ac_ext >&5
6861
ca81d7a0 6862 ac_cv_have_decl_sys_siglist=no
cd958eb3 6863fi
ca81d7a0
JD
6864
6865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6866fi
ca81d7a0
JD
6867{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6868echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6869if test $ac_cv_have_decl_sys_siglist = yes; then
6870
6871cat >>confdefs.h <<_ACEOF
6872#define HAVE_DECL_SYS_SIGLIST 1
6873_ACEOF
6874
6875
6876else
6877 cat >>confdefs.h <<_ACEOF
6878#define HAVE_DECL_SYS_SIGLIST 0
6879_ACEOF
6880
6881
6882fi
6883
6884
6885if test $ac_cv_have_decl_sys_siglist != yes; then
6886 # For Tru64, at least:
ca81d7a0
JD
6887 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6888echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6889if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6890 echo $ECHO_N "(cached) $ECHO_C" >&6
6891else
6892 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6893/* confdefs.h. */
6894_ACEOF
6895cat confdefs.h >>conftest.$ac_ext
6896cat >>conftest.$ac_ext <<_ACEOF
6897/* end confdefs.h. */
cd958eb3 6898$ac_includes_default
503d2be0
AS
6899int
6900main ()
6901{
cd958eb3 6902#ifndef __sys_siglist
f053c89f 6903 (void) __sys_siglist;
cd958eb3
MB
6904#endif
6905
503d2be0
AS
6906 ;
6907 return 0;
6908}
6909_ACEOF
6910rm -f conftest.$ac_objext
ca81d7a0
JD
6911if { (ac_try="$ac_compile"
6912case "(($ac_try" in
6913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6914 *) ac_try_echo=$ac_try;;
6915esac
6916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6917 (eval "$ac_compile") 2>conftest.er1
503d2be0 6918 ac_status=$?
edfaf76d
LK
6919 grep -v '^ *+' conftest.er1 >conftest.err
6920 rm -f conftest.er1
6921 cat conftest.err >&5
c0d27fcc 6922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6923 (exit $ac_status); } && {
6924 test -z "$ac_c_werror_flag" ||
6925 test ! -s conftest.err
6926 } && test -s conftest.$ac_objext; then
cd958eb3 6927 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6928else
503d2be0 6929 echo "$as_me: failed program was:" >&5
19650fd6
AS
6930sed 's/^/| /' conftest.$ac_ext >&5
6931
ca81d7a0 6932 ac_cv_have_decl___sys_siglist=no
ba4481b5 6933fi
ca81d7a0
JD
6934
6935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6936fi
ca81d7a0
JD
6937{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6938echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6939if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6940
cd958eb3
MB
6941cat >>confdefs.h <<_ACEOF
6942#define HAVE_DECL___SYS_SIGLIST 1
6943_ACEOF
6944
6945
6946else
6947 cat >>confdefs.h <<_ACEOF
6948#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6949_ACEOF
503d2be0 6950
cd958eb3 6951
ba4481b5
DL
6952fi
6953
cd958eb3
MB
6954
6955 if test $ac_cv_have_decl___sys_siglist = yes; then
6956
6957cat >>confdefs.h <<\_ACEOF
6958#define sys_siglist __sys_siglist
6959_ACEOF
6960
6961 fi
6962fi
ca81d7a0
JD
6963{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6964echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6965if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6966 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6967else
503d2be0 6968 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6969/* confdefs.h. */
6970_ACEOF
6971cat confdefs.h >>conftest.$ac_ext
6972cat >>conftest.$ac_ext <<_ACEOF
6973/* end confdefs.h. */
98418dba
CW
6974#include <sys/types.h>
6975#include <sys/wait.h>
6976#ifndef WEXITSTATUS
ca81d7a0 6977# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
6978#endif
6979#ifndef WIFEXITED
6980# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6981#endif
503d2be0
AS
6982
6983int
6984main ()
6985{
98418dba
CW
6986 int s;
6987 wait (&s);
6988 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6989 ;
6990 return 0;
6991}
6992_ACEOF
98418dba 6993rm -f conftest.$ac_objext
ca81d7a0
JD
6994if { (ac_try="$ac_compile"
6995case "(($ac_try" in
6996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6997 *) ac_try_echo=$ac_try;;
6998esac
6999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7000 (eval "$ac_compile") 2>conftest.er1
503d2be0 7001 ac_status=$?
edfaf76d
LK
7002 grep -v '^ *+' conftest.er1 >conftest.err
7003 rm -f conftest.er1
7004 cat conftest.err >&5
c0d27fcc 7005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7006 (exit $ac_status); } && {
7007 test -z "$ac_c_werror_flag" ||
7008 test ! -s conftest.err
7009 } && test -s conftest.$ac_objext; then
98418dba 7010 ac_cv_header_sys_wait_h=yes
ba4481b5 7011else
503d2be0 7012 echo "$as_me: failed program was:" >&5
19650fd6
AS
7013sed 's/^/| /' conftest.$ac_ext >&5
7014
ca81d7a0 7015 ac_cv_header_sys_wait_h=no
ba4481b5 7016fi
ca81d7a0
JD
7017
7018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7019fi
ca81d7a0
JD
7020{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7021echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7022if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7023
c0d27fcc 7024cat >>confdefs.h <<\_ACEOF
98418dba 7025#define HAVE_SYS_WAIT_H 1
c0d27fcc 7026_ACEOF
ba4481b5 7027
ba4481b5
DL
7028fi
7029
c0d27fcc 7030
ca81d7a0
JD
7031{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7032echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7033if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7034 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7035else
503d2be0 7036 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7037/* confdefs.h. */
7038_ACEOF
7039cat confdefs.h >>conftest.$ac_ext
7040cat >>conftest.$ac_ext <<_ACEOF
7041/* end confdefs.h. */
98418dba
CW
7042#ifdef TIME_WITH_SYS_TIME
7043#include <sys/time.h>
7044#include <time.h>
7045#else
7046#ifdef HAVE_SYS_TIME_H
7047#include <sys/time.h>
7048#else
1113b624 7049#include <time.h>
98418dba
CW
7050#endif
7051#endif
7052#ifdef HAVE_UTIME_H
7053#include <utime.h>
7054#endif
503d2be0
AS
7055int
7056main ()
7057{
98418dba 7058static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7059 ;
7060 return 0;
7061}
7062_ACEOF
98418dba 7063rm -f conftest.$ac_objext
ca81d7a0
JD
7064if { (ac_try="$ac_compile"
7065case "(($ac_try" in
7066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7067 *) ac_try_echo=$ac_try;;
7068esac
7069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7070 (eval "$ac_compile") 2>conftest.er1
503d2be0 7071 ac_status=$?
edfaf76d
LK
7072 grep -v '^ *+' conftest.er1 >conftest.err
7073 rm -f conftest.er1
7074 cat conftest.err >&5
c0d27fcc 7075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7076 (exit $ac_status); } && {
7077 test -z "$ac_c_werror_flag" ||
7078 test ! -s conftest.err
7079 } && test -s conftest.$ac_objext; then
98418dba 7080 emacs_cv_struct_utimbuf=yes
1113b624 7081else
503d2be0 7082 echo "$as_me: failed program was:" >&5
19650fd6
AS
7083sed 's/^/| /' conftest.$ac_ext >&5
7084
ca81d7a0 7085 emacs_cv_struct_utimbuf=no
1113b624 7086fi
ca81d7a0
JD
7087
7088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7089fi
ca81d7a0
JD
7090{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7091echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7092if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7093
c0d27fcc 7094cat >>confdefs.h <<\_ACEOF
98418dba 7095#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7096_ACEOF
1113b624
PE
7097
7098fi
ba4481b5 7099
ca81d7a0
JD
7100{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7101echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7102if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7103 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7104else
98418dba 7105 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7106/* confdefs.h. */
7107_ACEOF
7108cat confdefs.h >>conftest.$ac_ext
7109cat >>conftest.$ac_ext <<_ACEOF
7110/* end confdefs.h. */
7397acc4 7111#include <sys/types.h>
98418dba 7112#include <signal.h>
98418dba 7113
503d2be0
AS
7114int
7115main ()
7116{
ca81d7a0 7117return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7118 ;
7119 return 0;
7120}
7121_ACEOF
98418dba 7122rm -f conftest.$ac_objext
ca81d7a0
JD
7123if { (ac_try="$ac_compile"
7124case "(($ac_try" in
7125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126 *) ac_try_echo=$ac_try;;
7127esac
7128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7129 (eval "$ac_compile") 2>conftest.er1
503d2be0 7130 ac_status=$?
edfaf76d
LK
7131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
c0d27fcc 7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7135 (exit $ac_status); } && {
7136 test -z "$ac_c_werror_flag" ||
7137 test ! -s conftest.err
7138 } && test -s conftest.$ac_objext; then
ca81d7a0 7139 ac_cv_type_signal=int
503d2be0
AS
7140else
7141 echo "$as_me: failed program was:" >&5
19650fd6
AS
7142sed 's/^/| /' conftest.$ac_ext >&5
7143
ca81d7a0 7144 ac_cv_type_signal=void
503d2be0 7145fi
ca81d7a0
JD
7146
7147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7148fi
ca81d7a0
JD
7149{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7150echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7151
c0d27fcc 7152cat >>confdefs.h <<_ACEOF
98418dba 7153#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7154_ACEOF
7155
503d2be0 7156
c0d27fcc 7157
ca81d7a0
JD
7158{ echo "$as_me:$LINENO: checking for speed_t" >&5
7159echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7160if test "${emacs_cv_speed_t+set}" = set; then
7161 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7162else
98418dba 7163 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
98418dba 7169#include <termios.h>
98418dba
CW
7170int
7171main ()
7172{
7173speed_t x = 1;
7174 ;
7175 return 0;
7176}
7177_ACEOF
7178rm -f conftest.$ac_objext
ca81d7a0
JD
7179if { (ac_try="$ac_compile"
7180case "(($ac_try" in
7181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7182 *) ac_try_echo=$ac_try;;
7183esac
7184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7185 (eval "$ac_compile") 2>conftest.er1
98418dba 7186 ac_status=$?
edfaf76d
LK
7187 grep -v '^ *+' conftest.er1 >conftest.err
7188 rm -f conftest.er1
7189 cat conftest.err >&5
c0d27fcc 7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7191 (exit $ac_status); } && {
7192 test -z "$ac_c_werror_flag" ||
7193 test ! -s conftest.err
7194 } && test -s conftest.$ac_objext; then
98418dba
CW
7195 emacs_cv_speed_t=yes
7196else
7197 echo "$as_me: failed program was:" >&5
19650fd6
AS
7198sed 's/^/| /' conftest.$ac_ext >&5
7199
ca81d7a0 7200 emacs_cv_speed_t=no
98418dba 7201fi
ca81d7a0
JD
7202
7203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7204fi
ca81d7a0
JD
7205{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7206echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7207if test $emacs_cv_speed_t = yes; then
b936fae4 7208
c0d27fcc 7209cat >>confdefs.h <<\_ACEOF
98418dba 7210#define HAVE_SPEED_T 1
c0d27fcc 7211_ACEOF
98418dba 7212
7397acc4
DL
7213fi
7214
ca81d7a0
JD
7215{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7216echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7217if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7218 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7219else
503d2be0 7220 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7221/* confdefs.h. */
7222_ACEOF
7223cat confdefs.h >>conftest.$ac_ext
7224cat >>conftest.$ac_ext <<_ACEOF
7225/* end confdefs.h. */
98418dba
CW
7226#ifdef TIME_WITH_SYS_TIME
7227#include <sys/time.h>
7228#include <time.h>
7229#else
7230#ifdef HAVE_SYS_TIME_H
7231#include <sys/time.h>
7232#else
7233#include <time.h>
7234#endif
7235#endif
503d2be0
AS
7236int
7237main ()
7238{
98418dba 7239static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7240 ;
7241 return 0;
7242}
7243_ACEOF
7244rm -f conftest.$ac_objext
ca81d7a0
JD
7245if { (ac_try="$ac_compile"
7246case "(($ac_try" in
7247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7248 *) ac_try_echo=$ac_try;;
7249esac
7250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7251 (eval "$ac_compile") 2>conftest.er1
503d2be0 7252 ac_status=$?
edfaf76d
LK
7253 grep -v '^ *+' conftest.er1 >conftest.err
7254 rm -f conftest.er1
7255 cat conftest.err >&5
c0d27fcc 7256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7257 (exit $ac_status); } && {
7258 test -z "$ac_c_werror_flag" ||
7259 test ! -s conftest.err
7260 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7261 emacs_cv_struct_timeval=yes
7262else
503d2be0 7263 echo "$as_me: failed program was:" >&5
19650fd6
AS
7264sed 's/^/| /' conftest.$ac_ext >&5
7265
ca81d7a0 7266 emacs_cv_struct_timeval=no
7397acc4 7267fi
ca81d7a0
JD
7268
7269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7270fi
ca81d7a0
JD
7271{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7272echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7273HAVE_TIMEVAL=$emacs_cv_struct_timeval
7274if test $emacs_cv_struct_timeval = yes; then
b936fae4 7275
c0d27fcc 7276cat >>confdefs.h <<\_ACEOF
98418dba 7277#define HAVE_TIMEVAL 1
c0d27fcc 7278_ACEOF
7397acc4
DL
7279
7280fi
7281
ca81d7a0
JD
7282{ echo "$as_me:$LINENO: checking for struct exception" >&5
7283echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7284if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7285 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7286else
503d2be0 7287 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7288/* confdefs.h. */
7289_ACEOF
7290cat confdefs.h >>conftest.$ac_ext
7291cat >>conftest.$ac_ext <<_ACEOF
7292/* end confdefs.h. */
98418dba 7293#include <math.h>
503d2be0
AS
7294int
7295main ()
7296{
98418dba 7297static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7298 ;
7299 return 0;
ba4481b5 7300}
503d2be0
AS
7301_ACEOF
7302rm -f conftest.$ac_objext
ca81d7a0
JD
7303if { (ac_try="$ac_compile"
7304case "(($ac_try" in
7305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7306 *) ac_try_echo=$ac_try;;
7307esac
7308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7309 (eval "$ac_compile") 2>conftest.er1
503d2be0 7310 ac_status=$?
edfaf76d
LK
7311 grep -v '^ *+' conftest.er1 >conftest.err
7312 rm -f conftest.er1
7313 cat conftest.err >&5
c0d27fcc 7314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7315 (exit $ac_status); } && {
7316 test -z "$ac_c_werror_flag" ||
7317 test ! -s conftest.err
7318 } && test -s conftest.$ac_objext; then
98418dba 7319 emacs_cv_struct_exception=yes
ba4481b5 7320else
503d2be0 7321 echo "$as_me: failed program was:" >&5
19650fd6
AS
7322sed 's/^/| /' conftest.$ac_ext >&5
7323
ca81d7a0 7324 emacs_cv_struct_exception=no
ba4481b5 7325fi
ca81d7a0
JD
7326
7327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7328fi
ca81d7a0
JD
7329{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7330echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7331HAVE_EXCEPTION=$emacs_cv_struct_exception
7332if test $emacs_cv_struct_exception != yes; then
b936fae4 7333
c0d27fcc 7334cat >>confdefs.h <<\_ACEOF
98418dba 7335#define NO_MATHERR 1
c0d27fcc 7336_ACEOF
ba4481b5
DL
7337
7338fi
7339
7862d3a8
AS
7340
7341for ac_header in sys/socket.h
7342do
7343as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7344if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7345 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7346echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7347if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7348 echo $ECHO_N "(cached) $ECHO_C" >&6
7349fi
ca81d7a0
JD
7350ac_res=`eval echo '${'$as_ac_Header'}'`
7351 { echo "$as_me:$LINENO: result: $ac_res" >&5
7352echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7353else
7354 # Is the header compilable?
ca81d7a0
JD
7355{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7356echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7357cat >conftest.$ac_ext <<_ACEOF
7358/* confdefs.h. */
7359_ACEOF
7360cat confdefs.h >>conftest.$ac_ext
7361cat >>conftest.$ac_ext <<_ACEOF
7362/* end confdefs.h. */
7363$ac_includes_default
7364#include <$ac_header>
7365_ACEOF
7366rm -f conftest.$ac_objext
ca81d7a0
JD
7367if { (ac_try="$ac_compile"
7368case "(($ac_try" in
7369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7370 *) ac_try_echo=$ac_try;;
7371esac
7372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7373 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7374 ac_status=$?
edfaf76d
LK
7375 grep -v '^ *+' conftest.er1 >conftest.err
7376 rm -f conftest.er1
7377 cat conftest.err >&5
7862d3a8 7378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7379 (exit $ac_status); } && {
7380 test -z "$ac_c_werror_flag" ||
7381 test ! -s conftest.err
7382 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7383 ac_header_compiler=yes
7384else
7385 echo "$as_me: failed program was:" >&5
7386sed 's/^/| /' conftest.$ac_ext >&5
7387
ca81d7a0 7388 ac_header_compiler=no
7862d3a8 7389fi
ca81d7a0
JD
7390
7391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7392{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7393echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7394
7395# Is the header present?
ca81d7a0
JD
7396{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7397echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7398cat >conftest.$ac_ext <<_ACEOF
7399/* confdefs.h. */
7400_ACEOF
7401cat confdefs.h >>conftest.$ac_ext
7402cat >>conftest.$ac_ext <<_ACEOF
7403/* end confdefs.h. */
7404#include <$ac_header>
7405_ACEOF
ca81d7a0
JD
7406if { (ac_try="$ac_cpp conftest.$ac_ext"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
7411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7412 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7413 ac_status=$?
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7418 (exit $ac_status); } >/dev/null && {
7419 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 }; then
7862d3a8
AS
7422 ac_header_preproc=yes
7423else
7424 echo "$as_me: failed program was:" >&5
7425sed 's/^/| /' conftest.$ac_ext >&5
7426
7427 ac_header_preproc=no
7428fi
ca81d7a0 7429
7862d3a8 7430rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7431{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7432echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7433
7434# So? What about this header?
edfaf76d
LK
7435case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7436 yes:no: )
7862d3a8
AS
7437 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7438echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7439 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7440echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7441 ac_header_preproc=yes
7862d3a8 7442 ;;
edfaf76d 7443 no:yes:* )
7862d3a8
AS
7444 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7445echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7446 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7447echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7448 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7449echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7450 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7451echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7452 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7453echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7454 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7455echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7456
7862d3a8
AS
7457 ;;
7458esac
ca81d7a0
JD
7459{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7461if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7462 echo $ECHO_N "(cached) $ECHO_C" >&6
7463else
edfaf76d 7464 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7465fi
ca81d7a0
JD
7466ac_res=`eval echo '${'$as_ac_Header'}'`
7467 { echo "$as_me:$LINENO: result: $ac_res" >&5
7468echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7469
7470fi
7471if test `eval echo '${'$as_ac_Header'}'` = yes; then
7472 cat >>confdefs.h <<_ACEOF
7473#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7474_ACEOF
7475
7476fi
7477
7478done
7479
7480
7481for ac_header in net/if.h
7482do
7483as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7484{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7485echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7486if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7487 echo $ECHO_N "(cached) $ECHO_C" >&6
7488else
7489 cat >conftest.$ac_ext <<_ACEOF
7490/* confdefs.h. */
7491_ACEOF
7492cat confdefs.h >>conftest.$ac_ext
7493cat >>conftest.$ac_ext <<_ACEOF
7494/* end confdefs.h. */
7495$ac_includes_default
7496#if HAVE_SYS_SOCKET_H
7497#include <sys/socket.h>
7498#endif
7499
7500#include <$ac_header>
7501_ACEOF
7502rm -f conftest.$ac_objext
ca81d7a0
JD
7503if { (ac_try="$ac_compile"
7504case "(($ac_try" in
7505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7506 *) ac_try_echo=$ac_try;;
7507esac
7508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7509 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7510 ac_status=$?
edfaf76d
LK
7511 grep -v '^ *+' conftest.er1 >conftest.err
7512 rm -f conftest.er1
7513 cat conftest.err >&5
7862d3a8 7514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7515 (exit $ac_status); } && {
7516 test -z "$ac_c_werror_flag" ||
7517 test ! -s conftest.err
7518 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7519 eval "$as_ac_Header=yes"
7520else
7521 echo "$as_me: failed program was:" >&5
7522sed 's/^/| /' conftest.$ac_ext >&5
7523
ca81d7a0 7524 eval "$as_ac_Header=no"
7862d3a8 7525fi
ca81d7a0
JD
7526
7527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7528fi
ca81d7a0
JD
7529ac_res=`eval echo '${'$as_ac_Header'}'`
7530 { echo "$as_me:$LINENO: result: $ac_res" >&5
7531echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7532if test `eval echo '${'$as_ac_Header'}'` = yes; then
7533 cat >>confdefs.h <<_ACEOF
7534#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7535_ACEOF
7536
7537fi
7538
7539done
7540
7541
ca81d7a0
JD
7542{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7543echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7544if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7545 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7546else
503d2be0 7547 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7548/* confdefs.h. */
7549_ACEOF
7550cat confdefs.h >>conftest.$ac_ext
7551cat >>conftest.$ac_ext <<_ACEOF
7552/* end confdefs.h. */
98418dba
CW
7553#include <sys/types.h>
7554#include <time.h>
7397acc4 7555
503d2be0
AS
7556int
7557main ()
7558{
f053c89f
CY
7559struct tm tm;
7560 int *p = &tm.tm_sec;
7561 return !p;
503d2be0
AS
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
ca81d7a0
JD
7567if { (ac_try="$ac_compile"
7568case "(($ac_try" in
7569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7570 *) ac_try_echo=$ac_try;;
7571esac
7572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7573 (eval "$ac_compile") 2>conftest.er1
503d2be0 7574 ac_status=$?
edfaf76d
LK
7575 grep -v '^ *+' conftest.er1 >conftest.err
7576 rm -f conftest.er1
7577 cat conftest.err >&5
c0d27fcc 7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7579 (exit $ac_status); } && {
7580 test -z "$ac_c_werror_flag" ||
7581 test ! -s conftest.err
7582 } && test -s conftest.$ac_objext; then
35996d22
AS
7583 ac_cv_struct_tm=time.h
7584else
503d2be0 7585 echo "$as_me: failed program was:" >&5
19650fd6
AS
7586sed 's/^/| /' conftest.$ac_ext >&5
7587
ca81d7a0 7588 ac_cv_struct_tm=sys/time.h
7397acc4 7589fi
ca81d7a0
JD
7590
7591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7592fi
ca81d7a0
JD
7593{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7594echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7595if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7596
c0d27fcc 7597cat >>confdefs.h <<\_ACEOF
98418dba 7598#define TM_IN_SYS_TIME 1
c0d27fcc 7599_ACEOF
7397acc4
DL
7600
7601fi
ba4481b5 7602
ca81d7a0
JD
7603{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7604echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7605if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7606 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7607else
98418dba 7608 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7609/* confdefs.h. */
7610_ACEOF
7611cat confdefs.h >>conftest.$ac_ext
7612cat >>conftest.$ac_ext <<_ACEOF
7613/* end confdefs.h. */
98418dba
CW
7614#include <sys/types.h>
7615#include <$ac_cv_struct_tm>
ba4481b5 7616
c0d27fcc 7617
98418dba
CW
7618int
7619main ()
7620{
7621static struct tm ac_aggr;
7622if (ac_aggr.tm_zone)
7623return 0;
7624 ;
7625 return 0;
7626}
7627_ACEOF
7628rm -f conftest.$ac_objext
ca81d7a0
JD
7629if { (ac_try="$ac_compile"
7630case "(($ac_try" in
7631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7632 *) ac_try_echo=$ac_try;;
7633esac
7634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7635 (eval "$ac_compile") 2>conftest.er1
98418dba 7636 ac_status=$?
edfaf76d
LK
7637 grep -v '^ *+' conftest.er1 >conftest.err
7638 rm -f conftest.er1
7639 cat conftest.err >&5
c0d27fcc 7640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7641 (exit $ac_status); } && {
7642 test -z "$ac_c_werror_flag" ||
7643 test ! -s conftest.err
7644 } && test -s conftest.$ac_objext; then
98418dba 7645 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7646else
98418dba 7647 echo "$as_me: failed program was:" >&5
19650fd6
AS
7648sed 's/^/| /' conftest.$ac_ext >&5
7649
ca81d7a0 7650 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7651/* confdefs.h. */
7652_ACEOF
7653cat confdefs.h >>conftest.$ac_ext
7654cat >>conftest.$ac_ext <<_ACEOF
7655/* end confdefs.h. */
6bae0ccf
DL
7656#include <sys/types.h>
7657#include <$ac_cv_struct_tm>
7658
7659
7660int
7661main ()
7662{
7663static struct tm ac_aggr;
7664if (sizeof ac_aggr.tm_zone)
7665return 0;
7666 ;
7667 return 0;
7668}
7669_ACEOF
7670rm -f conftest.$ac_objext
ca81d7a0
JD
7671if { (ac_try="$ac_compile"
7672case "(($ac_try" in
7673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7674 *) ac_try_echo=$ac_try;;
7675esac
7676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7677 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7678 ac_status=$?
edfaf76d
LK
7679 grep -v '^ *+' conftest.er1 >conftest.err
7680 rm -f conftest.er1
7681 cat conftest.err >&5
6bae0ccf 7682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7683 (exit $ac_status); } && {
7684 test -z "$ac_c_werror_flag" ||
7685 test ! -s conftest.err
7686 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7687 ac_cv_member_struct_tm_tm_zone=yes
7688else
7689 echo "$as_me: failed program was:" >&5
19650fd6
AS
7690sed 's/^/| /' conftest.$ac_ext >&5
7691
ca81d7a0 7692 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7693fi
ca81d7a0
JD
7694
7695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7696fi
ca81d7a0
JD
7697
7698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7699fi
ca81d7a0
JD
7700{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7701echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7702if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7703
c0d27fcc 7704cat >>confdefs.h <<_ACEOF
98418dba 7705#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7706_ACEOF
7707
ba4481b5 7708
98418dba 7709fi
ba4481b5 7710
98418dba 7711if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7712
c0d27fcc 7713cat >>confdefs.h <<\_ACEOF
98418dba 7714#define HAVE_TM_ZONE 1
c0d27fcc 7715_ACEOF
ba4481b5 7716
ba4481b5 7717else
ca81d7a0
JD
7718 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7719echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7720if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7721 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7722else
98418dba 7723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7724/* confdefs.h. */
7725_ACEOF
7726cat confdefs.h >>conftest.$ac_ext
7727cat >>conftest.$ac_ext <<_ACEOF
7728/* end confdefs.h. */
98418dba 7729#include <time.h>
98418dba 7730
98418dba
CW
7731int
7732main ()
7733{
ca81d7a0 7734#ifndef tzname
f053c89f 7735 (void) tzname;
ca81d7a0
JD
7736#endif
7737
6bae0ccf
DL
7738 ;
7739 return 0;
7740}
7741_ACEOF
7742rm -f conftest.$ac_objext
ca81d7a0
JD
7743if { (ac_try="$ac_compile"
7744case "(($ac_try" in
7745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7746 *) ac_try_echo=$ac_try;;
7747esac
7748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7749 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7750 ac_status=$?
edfaf76d
LK
7751 grep -v '^ *+' conftest.er1 >conftest.err
7752 rm -f conftest.er1
7753 cat conftest.err >&5
6bae0ccf 7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7755 (exit $ac_status); } && {
7756 test -z "$ac_c_werror_flag" ||
7757 test ! -s conftest.err
7758 } && test -s conftest.$ac_objext; then
ca81d7a0 7759 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7760else
7761 echo "$as_me: failed program was:" >&5
19650fd6
AS
7762sed 's/^/| /' conftest.$ac_ext >&5
7763
ca81d7a0 7764 ac_cv_have_decl_tzname=no
ba4481b5 7765fi
ca81d7a0
JD
7766
7767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7768fi
ca81d7a0
JD
7769{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7770echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7771if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7772
c0d27fcc 7773cat >>confdefs.h <<_ACEOF
ca81d7a0 7774#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7775_ACEOF
7776
ba4481b5 7777
ca81d7a0
JD
7778else
7779 cat >>confdefs.h <<_ACEOF
7780#define HAVE_DECL_TZNAME 0
7781_ACEOF
ba4481b5 7782
ba4481b5 7783
98418dba 7784fi
ba4481b5 7785
ca81d7a0
JD
7786
7787 { echo "$as_me:$LINENO: checking for tzname" >&5
7788echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7789if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7790 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7791else
98418dba 7792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
98418dba 7798#include <time.h>
ca81d7a0
JD
7799#if !HAVE_DECL_TZNAME
7800extern char *tzname[];
98418dba
CW
7801#endif
7802
98418dba
CW
7803int
7804main ()
7805{
ca81d7a0 7806return tzname[0][0];
98418dba
CW
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7812if { (ac_try="$ac_link"
7813case "(($ac_try" in
7814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7815 *) ac_try_echo=$ac_try;;
7816esac
7817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7818 (eval "$ac_link") 2>conftest.er1
98418dba 7819 ac_status=$?
edfaf76d
LK
7820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
c0d27fcc 7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7824 (exit $ac_status); } && {
7825 test -z "$ac_c_werror_flag" ||
7826 test ! -s conftest.err
7827 } && test -s conftest$ac_exeext &&
7828 $as_test_x conftest$ac_exeext; then
98418dba
CW
7829 ac_cv_var_tzname=yes
7830else
7831 echo "$as_me: failed program was:" >&5
19650fd6
AS
7832sed 's/^/| /' conftest.$ac_ext >&5
7833
ca81d7a0 7834 ac_cv_var_tzname=no
ba4481b5 7835fi
6bae0ccf 7836
f053c89f 7837rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7838 conftest$ac_exeext conftest.$ac_ext
98418dba 7839fi
ca81d7a0
JD
7840{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7841echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7842 if test $ac_cv_var_tzname = yes; then
ba4481b5 7843
c0d27fcc 7844cat >>confdefs.h <<\_ACEOF
98418dba 7845#define HAVE_TZNAME 1
c0d27fcc 7846_ACEOF
503d2be0 7847
98418dba
CW
7848 fi
7849fi
503d2be0 7850
ca81d7a0
JD
7851{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7852echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7853if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7854 echo $ECHO_N "(cached) $ECHO_C" >&6
7855else
7856 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7857/* confdefs.h. */
7858_ACEOF
7859cat confdefs.h >>conftest.$ac_ext
7860cat >>conftest.$ac_ext <<_ACEOF
7861/* end confdefs.h. */
98418dba 7862#include <time.h>
b936fae4 7863
98418dba
CW
7864int
7865main ()
7866{
b936fae4
AS
7867static struct tm ac_aggr;
7868if (ac_aggr.tm_gmtoff)
7869return 0;
98418dba
CW
7870 ;
7871 return 0;
7872}
7873_ACEOF
b936fae4 7874rm -f conftest.$ac_objext
ca81d7a0
JD
7875if { (ac_try="$ac_compile"
7876case "(($ac_try" in
7877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7878 *) ac_try_echo=$ac_try;;
7879esac
7880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7881 (eval "$ac_compile") 2>conftest.er1
98418dba 7882 ac_status=$?
edfaf76d
LK
7883 grep -v '^ *+' conftest.er1 >conftest.err
7884 rm -f conftest.er1
7885 cat conftest.err >&5
c0d27fcc 7886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7887 (exit $ac_status); } && {
7888 test -z "$ac_c_werror_flag" ||
7889 test ! -s conftest.err
7890 } && test -s conftest.$ac_objext; then
b936fae4 7891 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7892else
7893 echo "$as_me: failed program was:" >&5
19650fd6
AS
7894sed 's/^/| /' conftest.$ac_ext >&5
7895
ca81d7a0 7896 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7897/* confdefs.h. */
7898_ACEOF
7899cat confdefs.h >>conftest.$ac_ext
7900cat >>conftest.$ac_ext <<_ACEOF
7901/* end confdefs.h. */
6bae0ccf
DL
7902#include <time.h>
7903
8799b3e4
CW
7904int
7905main ()
7906{
6bae0ccf
DL
7907static struct tm ac_aggr;
7908if (sizeof ac_aggr.tm_gmtoff)
7909return 0;
8799b3e4
CW
7910 ;
7911 return 0;
7912}
7913_ACEOF
6bae0ccf 7914rm -f conftest.$ac_objext
ca81d7a0
JD
7915if { (ac_try="$ac_compile"
7916case "(($ac_try" in
7917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7918 *) ac_try_echo=$ac_try;;
7919esac
7920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7921 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7922 ac_status=$?
edfaf76d
LK
7923 grep -v '^ *+' conftest.er1 >conftest.err
7924 rm -f conftest.er1
7925 cat conftest.err >&5
c0d27fcc 7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7927 (exit $ac_status); } && {
7928 test -z "$ac_c_werror_flag" ||
7929 test ! -s conftest.err
7930 } && test -s conftest.$ac_objext; then
6bae0ccf 7931 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7932else
7933 echo "$as_me: failed program was:" >&5
19650fd6
AS
7934sed 's/^/| /' conftest.$ac_ext >&5
7935
ca81d7a0 7936 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7937fi
ca81d7a0
JD
7938
7939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7940fi
ca81d7a0
JD
7941
7942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7943fi
ca81d7a0
JD
7944{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7945echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7946if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7947
7948cat >>confdefs.h <<\_ACEOF
7949#define HAVE_TM_GMTOFF 1
7950_ACEOF
7951
7952fi
7953
ca81d7a0
JD
7954{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7955echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7956if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7957 echo $ECHO_N "(cached) $ECHO_C" >&6
7958else
7959 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7960/* confdefs.h. */
7961_ACEOF
7962cat confdefs.h >>conftest.$ac_ext
7963cat >>conftest.$ac_ext <<_ACEOF
7964/* end confdefs.h. */
7862d3a8
AS
7965$ac_includes_default
7966#if HAVE_SYS_SOCKET_H
7967#include <sys/socket.h>
7968#endif
7969#if HAVE_NET_IF_H
96f3a036 7970#include <net/if.h>
7862d3a8 7971#endif
96f3a036
DL
7972
7973int
7974main ()
7975{
7976static struct ifreq ac_aggr;
7977if (ac_aggr.ifr_flags)
7978return 0;
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
ca81d7a0
JD
7984if { (ac_try="$ac_compile"
7985case "(($ac_try" in
7986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7987 *) ac_try_echo=$ac_try;;
7988esac
7989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7990 (eval "$ac_compile") 2>conftest.er1
96f3a036 7991 ac_status=$?
edfaf76d
LK
7992 grep -v '^ *+' conftest.er1 >conftest.err
7993 rm -f conftest.er1
7994 cat conftest.err >&5
96f3a036 7995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7996 (exit $ac_status); } && {
7997 test -z "$ac_c_werror_flag" ||
7998 test ! -s conftest.err
7999 } && test -s conftest.$ac_objext; then
96f3a036
DL
8000 ac_cv_member_struct_ifreq_ifr_flags=yes
8001else
8002 echo "$as_me: failed program was:" >&5
8003sed 's/^/| /' conftest.$ac_ext >&5
8004
ca81d7a0 8005 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8006/* confdefs.h. */
8007_ACEOF
8008cat confdefs.h >>conftest.$ac_ext
8009cat >>conftest.$ac_ext <<_ACEOF
8010/* end confdefs.h. */
7862d3a8
AS
8011$ac_includes_default
8012#if HAVE_SYS_SOCKET_H
8013#include <sys/socket.h>
8014#endif
8015#if HAVE_NET_IF_H
96f3a036 8016#include <net/if.h>
7862d3a8 8017#endif
96f3a036
DL
8018
8019int
8020main ()
8021{
8022static struct ifreq ac_aggr;
8023if (sizeof ac_aggr.ifr_flags)
8024return 0;
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029rm -f conftest.$ac_objext
ca81d7a0
JD
8030if { (ac_try="$ac_compile"
8031case "(($ac_try" in
8032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8033 *) ac_try_echo=$ac_try;;
8034esac
8035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8036 (eval "$ac_compile") 2>conftest.er1
96f3a036 8037 ac_status=$?
edfaf76d
LK
8038 grep -v '^ *+' conftest.er1 >conftest.err
8039 rm -f conftest.er1
8040 cat conftest.err >&5
96f3a036 8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8042 (exit $ac_status); } && {
8043 test -z "$ac_c_werror_flag" ||
8044 test ! -s conftest.err
8045 } && test -s conftest.$ac_objext; then
96f3a036
DL
8046 ac_cv_member_struct_ifreq_ifr_flags=yes
8047else
8048 echo "$as_me: failed program was:" >&5
8049sed 's/^/| /' conftest.$ac_ext >&5
8050
ca81d7a0 8051 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8052fi
ca81d7a0
JD
8053
8054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8055fi
ca81d7a0
JD
8056
8057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8058fi
ca81d7a0
JD
8059{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8060echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8061if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8062
8063cat >>confdefs.h <<_ACEOF
8064#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8065_ACEOF
8066
8067
8068fi
ca81d7a0
JD
8069{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8070echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8071if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8072 echo $ECHO_N "(cached) $ECHO_C" >&6
8073else
8074 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8075/* confdefs.h. */
8076_ACEOF
8077cat confdefs.h >>conftest.$ac_ext
8078cat >>conftest.$ac_ext <<_ACEOF
8079/* end confdefs.h. */
7862d3a8
AS
8080$ac_includes_default
8081#if HAVE_SYS_SOCKET_H
8082#include <sys/socket.h>
8083#endif
8084#if HAVE_NET_IF_H
96f3a036 8085#include <net/if.h>
7862d3a8 8086#endif
96f3a036
DL
8087
8088int
8089main ()
8090{
8091static struct ifreq ac_aggr;
8092if (ac_aggr.ifr_hwaddr)
8093return 0;
8094 ;
8095 return 0;
8096}
8097_ACEOF
8098rm -f conftest.$ac_objext
ca81d7a0
JD
8099if { (ac_try="$ac_compile"
8100case "(($ac_try" in
8101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8102 *) ac_try_echo=$ac_try;;
8103esac
8104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8105 (eval "$ac_compile") 2>conftest.er1
96f3a036 8106 ac_status=$?
edfaf76d
LK
8107 grep -v '^ *+' conftest.er1 >conftest.err
8108 rm -f conftest.er1
8109 cat conftest.err >&5
96f3a036 8110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8111 (exit $ac_status); } && {
8112 test -z "$ac_c_werror_flag" ||
8113 test ! -s conftest.err
8114 } && test -s conftest.$ac_objext; then
96f3a036
DL
8115 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8116else
8117 echo "$as_me: failed program was:" >&5
8118sed 's/^/| /' conftest.$ac_ext >&5
8119
ca81d7a0 8120 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8121/* confdefs.h. */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h. */
7862d3a8
AS
8126$ac_includes_default
8127#if HAVE_SYS_SOCKET_H
8128#include <sys/socket.h>
8129#endif
8130#if HAVE_NET_IF_H
96f3a036 8131#include <net/if.h>
7862d3a8 8132#endif
96f3a036
DL
8133
8134int
8135main ()
8136{
8137static struct ifreq ac_aggr;
8138if (sizeof ac_aggr.ifr_hwaddr)
8139return 0;
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
ca81d7a0
JD
8145if { (ac_try="$ac_compile"
8146case "(($ac_try" in
8147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148 *) ac_try_echo=$ac_try;;
8149esac
8150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8151 (eval "$ac_compile") 2>conftest.er1
96f3a036 8152 ac_status=$?
edfaf76d
LK
8153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
96f3a036 8156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8157 (exit $ac_status); } && {
8158 test -z "$ac_c_werror_flag" ||
8159 test ! -s conftest.err
8160 } && test -s conftest.$ac_objext; then
96f3a036
DL
8161 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8162else
8163 echo "$as_me: failed program was:" >&5
8164sed 's/^/| /' conftest.$ac_ext >&5
8165
ca81d7a0 8166 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8167fi
ca81d7a0
JD
8168
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8170fi
ca81d7a0
JD
8171
8172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8173fi
ca81d7a0
JD
8174{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8175echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8176if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8177
8178cat >>confdefs.h <<_ACEOF
8179#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8180_ACEOF
8181
8182
8183fi
ca81d7a0
JD
8184{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8185echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8186if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8187 echo $ECHO_N "(cached) $ECHO_C" >&6
8188else
8189 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
7862d3a8
AS
8195$ac_includes_default
8196#if HAVE_SYS_SOCKET_H
8197#include <sys/socket.h>
8198#endif
8199#if HAVE_NET_IF_H
96f3a036 8200#include <net/if.h>
7862d3a8 8201#endif
96f3a036
DL
8202
8203int
8204main ()
8205{
8206static struct ifreq ac_aggr;
8207if (ac_aggr.ifr_netmask)
8208return 0;
8209 ;
8210 return 0;
8211}
8212_ACEOF
8213rm -f conftest.$ac_objext
ca81d7a0
JD
8214if { (ac_try="$ac_compile"
8215case "(($ac_try" in
8216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8217 *) ac_try_echo=$ac_try;;
8218esac
8219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8220 (eval "$ac_compile") 2>conftest.er1
96f3a036 8221 ac_status=$?
edfaf76d
LK
8222 grep -v '^ *+' conftest.er1 >conftest.err
8223 rm -f conftest.er1
8224 cat conftest.err >&5
96f3a036 8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8226 (exit $ac_status); } && {
8227 test -z "$ac_c_werror_flag" ||
8228 test ! -s conftest.err
8229 } && test -s conftest.$ac_objext; then
96f3a036
DL
8230 ac_cv_member_struct_ifreq_ifr_netmask=yes
8231else
8232 echo "$as_me: failed program was:" >&5
8233sed 's/^/| /' conftest.$ac_ext >&5
8234
ca81d7a0 8235 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8236/* confdefs.h. */
8237_ACEOF
8238cat confdefs.h >>conftest.$ac_ext
8239cat >>conftest.$ac_ext <<_ACEOF
8240/* end confdefs.h. */
7862d3a8
AS
8241$ac_includes_default
8242#if HAVE_SYS_SOCKET_H
8243#include <sys/socket.h>
8244#endif
8245#if HAVE_NET_IF_H
96f3a036 8246#include <net/if.h>
7862d3a8 8247#endif
96f3a036
DL
8248
8249int
8250main ()
8251{
8252static struct ifreq ac_aggr;
8253if (sizeof ac_aggr.ifr_netmask)
8254return 0;
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
ca81d7a0
JD
8260if { (ac_try="$ac_compile"
8261case "(($ac_try" in
8262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8263 *) ac_try_echo=$ac_try;;
8264esac
8265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8266 (eval "$ac_compile") 2>conftest.er1
96f3a036 8267 ac_status=$?
edfaf76d
LK
8268 grep -v '^ *+' conftest.er1 >conftest.err
8269 rm -f conftest.er1
8270 cat conftest.err >&5
96f3a036 8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8272 (exit $ac_status); } && {
8273 test -z "$ac_c_werror_flag" ||
8274 test ! -s conftest.err
8275 } && test -s conftest.$ac_objext; then
96f3a036
DL
8276 ac_cv_member_struct_ifreq_ifr_netmask=yes
8277else
8278 echo "$as_me: failed program was:" >&5
8279sed 's/^/| /' conftest.$ac_ext >&5
8280
ca81d7a0 8281 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8282fi
ca81d7a0
JD
8283
8284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8285fi
ca81d7a0
JD
8286
8287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8288fi
ca81d7a0
JD
8289{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8290echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8291if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8292
8293cat >>confdefs.h <<_ACEOF
8294#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8295_ACEOF
8296
8297
8298fi
ca81d7a0
JD
8299{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8300echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8301if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8302 echo $ECHO_N "(cached) $ECHO_C" >&6
8303else
8304 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8305/* confdefs.h. */
8306_ACEOF
8307cat confdefs.h >>conftest.$ac_ext
8308cat >>conftest.$ac_ext <<_ACEOF
8309/* end confdefs.h. */
7862d3a8
AS
8310$ac_includes_default
8311#if HAVE_SYS_SOCKET_H
8312#include <sys/socket.h>
8313#endif
8314#if HAVE_NET_IF_H
96f3a036 8315#include <net/if.h>
7862d3a8 8316#endif
96f3a036
DL
8317
8318int
8319main ()
8320{
8321static struct ifreq ac_aggr;
8322if (ac_aggr.ifr_broadaddr)
8323return 0;
8324 ;
8325 return 0;
8326}
8327_ACEOF
8328rm -f conftest.$ac_objext
ca81d7a0
JD
8329if { (ac_try="$ac_compile"
8330case "(($ac_try" in
8331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8332 *) ac_try_echo=$ac_try;;
8333esac
8334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8335 (eval "$ac_compile") 2>conftest.er1
96f3a036 8336 ac_status=$?
edfaf76d
LK
8337 grep -v '^ *+' conftest.er1 >conftest.err
8338 rm -f conftest.er1
8339 cat conftest.err >&5
96f3a036 8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8341 (exit $ac_status); } && {
8342 test -z "$ac_c_werror_flag" ||
8343 test ! -s conftest.err
8344 } && test -s conftest.$ac_objext; then
96f3a036
DL
8345 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8346else
8347 echo "$as_me: failed program was:" >&5
8348sed 's/^/| /' conftest.$ac_ext >&5
8349
ca81d7a0 8350 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8351/* confdefs.h. */
8352_ACEOF
8353cat confdefs.h >>conftest.$ac_ext
8354cat >>conftest.$ac_ext <<_ACEOF
8355/* end confdefs.h. */
7862d3a8
AS
8356$ac_includes_default
8357#if HAVE_SYS_SOCKET_H
8358#include <sys/socket.h>
8359#endif
8360#if HAVE_NET_IF_H
96f3a036 8361#include <net/if.h>
7862d3a8 8362#endif
96f3a036
DL
8363
8364int
8365main ()
8366{
8367static struct ifreq ac_aggr;
8368if (sizeof ac_aggr.ifr_broadaddr)
8369return 0;
8370 ;
8371 return 0;
8372}
8373_ACEOF
8374rm -f conftest.$ac_objext
ca81d7a0
JD
8375if { (ac_try="$ac_compile"
8376case "(($ac_try" in
8377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8378 *) ac_try_echo=$ac_try;;
8379esac
8380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8381 (eval "$ac_compile") 2>conftest.er1
96f3a036 8382 ac_status=$?
edfaf76d
LK
8383 grep -v '^ *+' conftest.er1 >conftest.err
8384 rm -f conftest.er1
8385 cat conftest.err >&5
96f3a036 8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8387 (exit $ac_status); } && {
8388 test -z "$ac_c_werror_flag" ||
8389 test ! -s conftest.err
8390 } && test -s conftest.$ac_objext; then
96f3a036
DL
8391 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8392else
8393 echo "$as_me: failed program was:" >&5
8394sed 's/^/| /' conftest.$ac_ext >&5
8395
ca81d7a0 8396 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8397fi
ca81d7a0
JD
8398
8399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8400fi
ca81d7a0
JD
8401
8402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8403fi
ca81d7a0
JD
8404{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8405echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8406if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8407
8408cat >>confdefs.h <<_ACEOF
8409#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8410_ACEOF
8411
8412
8413fi
ca81d7a0
JD
8414{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8415echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8416if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8417 echo $ECHO_N "(cached) $ECHO_C" >&6
8418else
8419 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8420/* confdefs.h. */
8421_ACEOF
8422cat confdefs.h >>conftest.$ac_ext
8423cat >>conftest.$ac_ext <<_ACEOF
8424/* end confdefs.h. */
7862d3a8
AS
8425$ac_includes_default
8426#if HAVE_SYS_SOCKET_H
8427#include <sys/socket.h>
8428#endif
8429#if HAVE_NET_IF_H
96f3a036 8430#include <net/if.h>
7862d3a8 8431#endif
96f3a036
DL
8432
8433int
8434main ()
8435{
8436static struct ifreq ac_aggr;
8437if (ac_aggr.ifr_addr)
8438return 0;
8439 ;
8440 return 0;
8441}
8442_ACEOF
8443rm -f conftest.$ac_objext
ca81d7a0
JD
8444if { (ac_try="$ac_compile"
8445case "(($ac_try" in
8446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8447 *) ac_try_echo=$ac_try;;
8448esac
8449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8450 (eval "$ac_compile") 2>conftest.er1
96f3a036 8451 ac_status=$?
edfaf76d
LK
8452 grep -v '^ *+' conftest.er1 >conftest.err
8453 rm -f conftest.er1
8454 cat conftest.err >&5
96f3a036 8455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8456 (exit $ac_status); } && {
8457 test -z "$ac_c_werror_flag" ||
8458 test ! -s conftest.err
8459 } && test -s conftest.$ac_objext; then
96f3a036
DL
8460 ac_cv_member_struct_ifreq_ifr_addr=yes
8461else
8462 echo "$as_me: failed program was:" >&5
8463sed 's/^/| /' conftest.$ac_ext >&5
8464
ca81d7a0 8465 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8466/* confdefs.h. */
8467_ACEOF
8468cat confdefs.h >>conftest.$ac_ext
8469cat >>conftest.$ac_ext <<_ACEOF
8470/* end confdefs.h. */
7862d3a8
AS
8471$ac_includes_default
8472#if HAVE_SYS_SOCKET_H
8473#include <sys/socket.h>
8474#endif
8475#if HAVE_NET_IF_H
96f3a036 8476#include <net/if.h>
7862d3a8 8477#endif
96f3a036
DL
8478
8479int
8480main ()
8481{
8482static struct ifreq ac_aggr;
8483if (sizeof ac_aggr.ifr_addr)
8484return 0;
8485 ;
8486 return 0;
8487}
8488_ACEOF
8489rm -f conftest.$ac_objext
ca81d7a0
JD
8490if { (ac_try="$ac_compile"
8491case "(($ac_try" in
8492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8493 *) ac_try_echo=$ac_try;;
8494esac
8495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8496 (eval "$ac_compile") 2>conftest.er1
96f3a036 8497 ac_status=$?
edfaf76d
LK
8498 grep -v '^ *+' conftest.er1 >conftest.err
8499 rm -f conftest.er1
8500 cat conftest.err >&5
96f3a036 8501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8502 (exit $ac_status); } && {
8503 test -z "$ac_c_werror_flag" ||
8504 test ! -s conftest.err
8505 } && test -s conftest.$ac_objext; then
96f3a036
DL
8506 ac_cv_member_struct_ifreq_ifr_addr=yes
8507else
8508 echo "$as_me: failed program was:" >&5
8509sed 's/^/| /' conftest.$ac_ext >&5
8510
ca81d7a0 8511 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8512fi
ca81d7a0
JD
8513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8515fi
ca81d7a0
JD
8516
8517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8518fi
ca81d7a0
JD
8519{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8520echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8521if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8522
8523cat >>confdefs.h <<_ACEOF
8524#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8525_ACEOF
8526
8527
8528fi
8529
8799b3e4 8530
8799b3e4 8531
ca81d7a0
JD
8532{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8533echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8534if test "$ac_cv_prog_cc_c89" != no; then
8535 { echo "$as_me:$LINENO: result: yes" >&5
8536echo "${ECHO_T}yes" >&6; }
98418dba 8537
c0d27fcc 8538cat >>confdefs.h <<\_ACEOF
98418dba 8539#define PROTOTYPES 1
c0d27fcc
MR
8540_ACEOF
8541
8542
8543cat >>confdefs.h <<\_ACEOF
8544#define __PROTOTYPES 1
8545_ACEOF
98418dba
CW
8546
8547else
ca81d7a0
JD
8548 { echo "$as_me:$LINENO: result: no" >&5
8549echo "${ECHO_T}no" >&6; }
98418dba
CW
8550fi
8551
ca81d7a0
JD
8552{ echo "$as_me:$LINENO: checking for working volatile" >&5
8553echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8554if test "${ac_cv_c_volatile+set}" = set; then
8555 echo $ECHO_N "(cached) $ECHO_C" >&6
8556else
8557 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8558/* confdefs.h. */
8559_ACEOF
8560cat confdefs.h >>conftest.$ac_ext
8561cat >>conftest.$ac_ext <<_ACEOF
8562/* end confdefs.h. */
98418dba 8563
98418dba
CW
8564int
8565main ()
8566{
8567
8568volatile int x;
ca81d7a0
JD
8569int * volatile y = (int *) 0;
8570return !x && !y;
98418dba
CW
8571 ;
8572 return 0;
8573}
8574_ACEOF
8575rm -f conftest.$ac_objext
ca81d7a0
JD
8576if { (ac_try="$ac_compile"
8577case "(($ac_try" in
8578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8579 *) ac_try_echo=$ac_try;;
8580esac
8581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8582 (eval "$ac_compile") 2>conftest.er1
98418dba 8583 ac_status=$?
edfaf76d
LK
8584 grep -v '^ *+' conftest.er1 >conftest.err
8585 rm -f conftest.er1
8586 cat conftest.err >&5
c0d27fcc 8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8588 (exit $ac_status); } && {
8589 test -z "$ac_c_werror_flag" ||
8590 test ! -s conftest.err
8591 } && test -s conftest.$ac_objext; then
98418dba
CW
8592 ac_cv_c_volatile=yes
8593else
8594 echo "$as_me: failed program was:" >&5
19650fd6
AS
8595sed 's/^/| /' conftest.$ac_ext >&5
8596
ca81d7a0 8597 ac_cv_c_volatile=no
98418dba 8598fi
ca81d7a0
JD
8599
8600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8601fi
ca81d7a0
JD
8602{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8603echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8604if test $ac_cv_c_volatile = no; then
8605
c0d27fcc 8606cat >>confdefs.h <<\_ACEOF
98418dba 8607#define volatile
c0d27fcc 8608_ACEOF
98418dba
CW
8609
8610fi
8611
ca81d7a0
JD
8612{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8613echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8614if test "${ac_cv_c_const+set}" = set; then
8615 echo $ECHO_N "(cached) $ECHO_C" >&6
8616else
8617 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8618/* confdefs.h. */
8619_ACEOF
8620cat confdefs.h >>conftest.$ac_ext
8621cat >>conftest.$ac_ext <<_ACEOF
8622/* end confdefs.h. */
98418dba 8623
98418dba
CW
8624int
8625main ()
8626{
8627/* FIXME: Include the comments suggested by Paul. */
8628#ifndef __cplusplus
8629 /* Ultrix mips cc rejects this. */
8630 typedef int charset[2];
f053c89f 8631 const charset cs;
98418dba 8632 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8633 char const *const *pcpcc;
8634 char **ppc;
98418dba
CW
8635 /* NEC SVR4.0.2 mips cc rejects this. */
8636 struct point {int x, y;};
8637 static struct point const zero = {0,0};
8638 /* AIX XL C 1.02.0.0 rejects this.
8639 It does not let you subtract one const X* pointer from another in
8640 an arm of an if-expression whose if-part is not a constant
8641 expression */
8642 const char *g = "string";
f053c89f 8643 pcpcc = &g + (g ? g-g : 0);
98418dba 8644 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8645 ++pcpcc;
8646 ppc = (char**) pcpcc;
8647 pcpcc = (char const *const *) ppc;
98418dba
CW
8648 { /* SCO 3.2v4 cc rejects this. */
8649 char *t;
8650 char const *s = 0 ? (char *) 0 : (char const *) 0;
8651
8652 *t++ = 0;
ca81d7a0 8653 if (s) return 0;
98418dba
CW
8654 }
8655 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8656 int x[] = {25, 17};
8657 const int *foo = &x[0];
8658 ++foo;
8659 }
8660 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8661 typedef const int *iptr;
8662 iptr p = 0;
8663 ++p;
8664 }
8665 { /* AIX XL C 1.02.0.0 rejects this saying
8666 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8667 struct s { int j; const int *ap[3]; };
8668 struct s *b; b->j = 5;
8669 }
8670 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8671 const int foo = 10;
ca81d7a0 8672 if (!foo) return 0;
98418dba 8673 }
f053c89f 8674 return !cs[0] && !zero.x;
98418dba
CW
8675#endif
8676
8677 ;
8678 return 0;
8679}
8680_ACEOF
8681rm -f conftest.$ac_objext
ca81d7a0
JD
8682if { (ac_try="$ac_compile"
8683case "(($ac_try" in
8684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8685 *) ac_try_echo=$ac_try;;
8686esac
8687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8688 (eval "$ac_compile") 2>conftest.er1
98418dba 8689 ac_status=$?
edfaf76d
LK
8690 grep -v '^ *+' conftest.er1 >conftest.err
8691 rm -f conftest.er1
8692 cat conftest.err >&5
c0d27fcc 8693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8694 (exit $ac_status); } && {
8695 test -z "$ac_c_werror_flag" ||
8696 test ! -s conftest.err
8697 } && test -s conftest.$ac_objext; then
98418dba
CW
8698 ac_cv_c_const=yes
8699else
8700 echo "$as_me: failed program was:" >&5
19650fd6
AS
8701sed 's/^/| /' conftest.$ac_ext >&5
8702
ca81d7a0 8703 ac_cv_c_const=no
98418dba 8704fi
ca81d7a0
JD
8705
8706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8707fi
ca81d7a0
JD
8708{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8709echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8710if test $ac_cv_c_const = no; then
8711
c0d27fcc 8712cat >>confdefs.h <<\_ACEOF
98418dba 8713#define const
c0d27fcc 8714_ACEOF
98418dba
CW
8715
8716fi
8717
ca81d7a0
JD
8718{ echo "$as_me:$LINENO: checking for void * support" >&5
8719echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8720if test "${emacs_cv_void_star+set}" = set; then
8721 echo $ECHO_N "(cached) $ECHO_C" >&6
8722else
8723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
98418dba 8729
98418dba
CW
8730int
8731main ()
8732{
8733void * foo;
8734 ;
8735 return 0;
8736}
8737_ACEOF
8738rm -f conftest.$ac_objext
ca81d7a0
JD
8739if { (ac_try="$ac_compile"
8740case "(($ac_try" in
8741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8742 *) ac_try_echo=$ac_try;;
8743esac
8744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8745 (eval "$ac_compile") 2>conftest.er1
98418dba 8746 ac_status=$?
edfaf76d
LK
8747 grep -v '^ *+' conftest.er1 >conftest.err
8748 rm -f conftest.er1
8749 cat conftest.err >&5
c0d27fcc 8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8751 (exit $ac_status); } && {
8752 test -z "$ac_c_werror_flag" ||
8753 test ! -s conftest.err
8754 } && test -s conftest.$ac_objext; then
98418dba
CW
8755 emacs_cv_void_star=yes
8756else
8757 echo "$as_me: failed program was:" >&5
19650fd6
AS
8758sed 's/^/| /' conftest.$ac_ext >&5
8759
ca81d7a0 8760 emacs_cv_void_star=no
98418dba 8761fi
ca81d7a0
JD
8762
8763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8764fi
ca81d7a0
JD
8765{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8766echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8767if test $emacs_cv_void_star = yes; then
c0d27fcc 8768 cat >>confdefs.h <<\_ACEOF
98418dba 8769#define POINTER_TYPE void
c0d27fcc 8770_ACEOF
98418dba
CW
8771
8772else
c0d27fcc 8773 cat >>confdefs.h <<\_ACEOF
98418dba 8774#define POINTER_TYPE char
c0d27fcc 8775_ACEOF
98418dba
CW
8776
8777fi
8778
c0d27fcc 8779
4494a266
JD
8780
8781
cd958eb3 8782
ca81d7a0
JD
8783{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8784echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8785set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8786if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8787 echo $ECHO_N "(cached) $ECHO_C" >&6
8788else
c0d27fcc 8789 cat >conftest.make <<\_ACEOF
ca81d7a0 8790SHELL = /bin/sh
98418dba 8791all:
ca81d7a0 8792 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8793_ACEOF
98418dba 8794# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8795case `${MAKE-make} -f conftest.make 2>/dev/null` in
8796 *@@@%%%=?*=@@@%%%*)
8797 eval ac_cv_prog_make_${ac_make}_set=yes;;
8798 *)
8799 eval ac_cv_prog_make_${ac_make}_set=no;;
8800esac
98418dba
CW
8801rm -f conftest.make
8802fi
ca81d7a0
JD
8803if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8804 { echo "$as_me:$LINENO: result: yes" >&5
8805echo "${ECHO_T}yes" >&6; }
98418dba
CW
8806 SET_MAKE=
8807else
ca81d7a0
JD
8808 { echo "$as_me:$LINENO: result: no" >&5
8809echo "${ECHO_T}no" >&6; }
98418dba
CW
8810 SET_MAKE="MAKE=${MAKE-make}"
8811fi
8812
c0d27fcc 8813
ca81d7a0
JD
8814{ echo "$as_me:$LINENO: checking for long file names" >&5
8815echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8816if test "${ac_cv_sys_long_file_names+set}" = set; then
8817 echo $ECHO_N "(cached) $ECHO_C" >&6
8818else
8819 ac_cv_sys_long_file_names=yes
8820# Test for long file names in all the places we know might matter:
8821# . the current directory, where building will happen
8822# $prefix/lib where we will be installing things
8823# $exec_prefix/lib likewise
98418dba 8824# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8825# /tmp where it might want to write temporary files
8826# /var/tmp likewise
8827# /usr/tmp likewise
ca81d7a0
JD
8828for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8829 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8830 # in the usual case where exec_prefix is '${prefix}'.
8831 case $ac_dir in #(
8832 . | /* | ?:[\\/]*) ;; #(
8833 *) continue;;
8834 esac
8835 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8836 ac_xdir=$ac_dir/cf$$
ca81d7a0 8837 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8838 ac_tf1=$ac_xdir/conftest9012345
8839 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8840 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8841 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8842 rm -f -r "$ac_xdir" 2>/dev/null
8843 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8844done
8845fi
ca81d7a0
JD
8846{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8847echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8848if test $ac_cv_sys_long_file_names = yes; then
8849
c0d27fcc 8850cat >>confdefs.h <<\_ACEOF
98418dba 8851#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8852_ACEOF
98418dba
CW
8853
8854fi
8855
c0d27fcc 8856
98418dba
CW
8857#### Choose a window system.
8858
ca81d7a0
JD
8859{ echo "$as_me:$LINENO: checking for X" >&5
8860echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8861
c0d27fcc 8862
ca81d7a0 8863# Check whether --with-x was given.
98418dba 8864if test "${with_x+set}" = set; then
ca81d7a0
JD
8865 withval=$with_x;
8866fi
98418dba 8867
98418dba
CW
8868# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8869if test "x$with_x" = xno; then
8870 # The user explicitly disabled X.
8871 have_x=disabled
8872else
ca81d7a0
JD
8873 case $x_includes,$x_libraries in #(
8874 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8875echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8876 { (exit 1); exit 1; }; };; #(
8877 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8878 echo $ECHO_N "(cached) $ECHO_C" >&6
8879else
8880 # One or both of the vars are not set, and there is no cached value.
8881ac_x_includes=no ac_x_libraries=no
ca81d7a0 8882rm -f -r conftest.dir
98418dba
CW
8883if mkdir conftest.dir; then
8884 cd conftest.dir
c0d27fcc 8885 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8886incroot:
8887 @echo incroot='${INCROOT}'
8888usrlibdir:
8889 @echo usrlibdir='${USRLIBDIR}'
8890libdir:
8891 @echo libdir='${LIBDIR}'
8892_ACEOF
8893 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8894 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8895 for ac_var in incroot usrlibdir libdir; do
8896 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8897 done
98418dba
CW
8898 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8899 for ac_extension in a so sl; do
ca81d7a0
JD
8900 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8901 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8902 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8903 fi
8904 done
8905 # Screen out bogus values from the imake configuration. They are
8906 # bogus both because they are the default anyway, and because
8907 # using them would break gcc on systems where it needs fixed includes.
8908 case $ac_im_incroot in
ca81d7a0 8909 /usr/include) ac_x_includes= ;;
98418dba
CW
8910 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8911 esac
8912 case $ac_im_usrlibdir in
8913 /usr/lib | /lib) ;;
8914 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8915 esac
8916 fi
8917 cd ..
ca81d7a0 8918 rm -f -r conftest.dir
98418dba
CW
8919fi
8920
8921# Standard set of common directories for X headers.
8922# Check X11 before X11Rn because it is often a symlink to the current release.
8923ac_x_header_dirs='
8924/usr/X11/include
8925/usr/X11R6/include
8926/usr/X11R5/include
8927/usr/X11R4/include
8928
8929/usr/include/X11
8930/usr/include/X11R6
8931/usr/include/X11R5
8932/usr/include/X11R4
8933
8934/usr/local/X11/include
8935/usr/local/X11R6/include
8936/usr/local/X11R5/include
8937/usr/local/X11R4/include
8938
8939/usr/local/include/X11
8940/usr/local/include/X11R6
8941/usr/local/include/X11R5
8942/usr/local/include/X11R4
8943
8944/usr/X386/include
8945/usr/x386/include
8946/usr/XFree86/include/X11
8947
8948/usr/include
8949/usr/local/include
8950/usr/unsupported/include
8951/usr/athena/include
8952/usr/local/x11r5/include
8953/usr/lpp/Xamples/include
8954
8955/usr/openwin/include
8956/usr/openwin/share/include'
8957
8958if test "$ac_x_includes" = no; then
ca81d7a0 8959 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8960 # First, try using that file with no special directory specified.
8961 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8962/* confdefs.h. */
8963_ACEOF
8964cat confdefs.h >>conftest.$ac_ext
8965cat >>conftest.$ac_ext <<_ACEOF
8966/* end confdefs.h. */
ca81d7a0 8967#include <X11/Xlib.h>
98418dba 8968_ACEOF
ca81d7a0
JD
8969if { (ac_try="$ac_cpp conftest.$ac_ext"
8970case "(($ac_try" in
8971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8972 *) ac_try_echo=$ac_try;;
8973esac
8974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8975 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 8976 ac_status=$?
6bae0ccf 8977 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8978 rm -f conftest.er1
8979 cat conftest.err >&5
c0d27fcc 8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8981 (exit $ac_status); } >/dev/null && {
8982 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8983 test ! -s conftest.err
8984 }; then
98418dba
CW
8985 # We can compile using X headers with no special include directory.
8986ac_x_includes=
8987else
8988 echo "$as_me: failed program was:" >&5
19650fd6
AS
8989sed 's/^/| /' conftest.$ac_ext >&5
8990
98418dba 8991 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 8992 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
8993 ac_x_includes=$ac_dir
8994 break
8995 fi
8996done
8997fi
ca81d7a0 8998
98418dba
CW
8999rm -f conftest.err conftest.$ac_ext
9000fi # $ac_x_includes = no
9001
9002if test "$ac_x_libraries" = no; then
9003 # Check for the libraries.
9004 # See if we find them without any special options.
9005 # Don't add to $LIBS permanently.
9006 ac_save_LIBS=$LIBS
f053c89f 9007 LIBS="-lX11 $LIBS"
98418dba 9008 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
ca81d7a0 9014#include <X11/Xlib.h>
98418dba
CW
9015int
9016main ()
9017{
ca81d7a0 9018XrmInitialize ()
98418dba
CW
9019 ;
9020 return 0;
9021}
9022_ACEOF
9023rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9024if { (ac_try="$ac_link"
9025case "(($ac_try" in
9026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9027 *) ac_try_echo=$ac_try;;
9028esac
9029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9030 (eval "$ac_link") 2>conftest.er1
98418dba 9031 ac_status=$?
edfaf76d
LK
9032 grep -v '^ *+' conftest.er1 >conftest.err
9033 rm -f conftest.er1
9034 cat conftest.err >&5
c0d27fcc 9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9036 (exit $ac_status); } && {
9037 test -z "$ac_c_werror_flag" ||
9038 test ! -s conftest.err
9039 } && test -s conftest$ac_exeext &&
9040 $as_test_x conftest$ac_exeext; then
98418dba
CW
9041 LIBS=$ac_save_LIBS
9042# We can link X programs with no special library path.
9043ac_x_libraries=
9044else
9045 echo "$as_me: failed program was:" >&5
19650fd6
AS
9046sed 's/^/| /' conftest.$ac_ext >&5
9047
ca81d7a0 9048 LIBS=$ac_save_LIBS
98418dba
CW
9049for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9050do
9051 # Don't even attempt the hair of trying to link an X program!
9052 for ac_extension in a so sl; do
f053c89f 9053 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9054 ac_x_libraries=$ac_dir
9055 break 2
9056 fi
9057 done
9058done
9059fi
ca81d7a0 9060
f053c89f 9061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9062 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9063fi # $ac_x_libraries = no
9064
ca81d7a0
JD
9065case $ac_x_includes,$ac_x_libraries in #(
9066 no,* | *,no | *\'*)
9067 # Didn't find X, or a directory has "'" in its name.
9068 ac_cv_have_x="have_x=no";; #(
9069 *)
9070 # Record where we found X for the cache.
9071 ac_cv_have_x="have_x=yes\
9072 ac_x_includes='$ac_x_includes'\
9073 ac_x_libraries='$ac_x_libraries'"
9074esac
98418dba 9075fi
ca81d7a0
JD
9076;; #(
9077 *) have_x=yes;;
9078 esac
98418dba
CW
9079 eval "$ac_cv_have_x"
9080fi # $with_x != no
9081
9082if test "$have_x" != yes; then
ca81d7a0
JD
9083 { echo "$as_me:$LINENO: result: $have_x" >&5
9084echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9085 no_x=yes
9086else
9087 # If each of the values was on the command line, it overrides each guess.
9088 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9089 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9090 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9091 ac_cv_have_x="have_x=yes\
9092 ac_x_includes='$x_includes'\
9093 ac_x_libraries='$x_libraries'"
9094 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9095echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9096fi
9097
9098if test "$no_x" = yes; then
9099 window_system=none
9100else
9101 window_system=x11
9102fi
9103
a8cd2496
GM
9104## Workaround for bug in autoconf <= 2.62.
9105## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9106## No need to do anything special for these standard directories.
921fbdf0 9107## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9108if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9109
9110 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9111
9112fi
9113
92d1ccf4
AS
9114if test "${x_libraries}" != NONE; then
9115 if test -n "${x_libraries}"; then
9116 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9117 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9118 fi
98418dba 9119 x_default_search_path=""
92d1ccf4
AS
9120 x_search_path=${x_libraries}
9121 if test -z "${x_search_path}"; then
9122 x_search_path=/usr/lib
9123 fi
9124 for x_library in `echo ${x_search_path}: | \
9125 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9126 x_search_path="\
9127${x_library}/X11/%L/%T/%N%C%S:\
9128${x_library}/X11/%l/%T/%N%C%S:\
9129${x_library}/X11/%T/%N%C%S:\
9130${x_library}/X11/%L/%T/%N%S:\
9131${x_library}/X11/%l/%T/%N%S:\
9132${x_library}/X11/%T/%N%S"
9133 if test x"${x_default_search_path}" = x; then
9134 x_default_search_path=${x_search_path}
9135 else
9136 x_default_search_path="${x_search_path}:${x_default_search_path}"
9137 fi
9138 done
9139fi
9140if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9141 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9142fi
9143
9144if test x"${x_includes}" = x; then
9145 bitmapdir=/usr/include/X11/bitmaps
9146else
9147 # accumulate include directories that have X11 bitmap subdirectories
9148 bmd_acc="dummyval"
9149 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9150 if test -d "${bmd}/X11/bitmaps"; then
9151 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9152 fi
9153 if test -d "${bmd}/bitmaps"; then
9154 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9155 fi
9156 done
9157 if test ${bmd_acc} != "dummyval"; then
9158 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9159 fi
9160fi
9161
5d6da11e 9162HAVE_CARBON=no
1d4d5604
YM
9163if test "${with_carbon}" != no; then
9164 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9165 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9166echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9167if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9168 echo $ECHO_N "(cached) $ECHO_C" >&6
9169fi
ca81d7a0
JD
9170{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9171echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9172else
9173 # Is the header compilable?
ca81d7a0
JD
9174{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9175echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9176cat >conftest.$ac_ext <<_ACEOF
9177/* confdefs.h. */
9178_ACEOF
9179cat confdefs.h >>conftest.$ac_ext
9180cat >>conftest.$ac_ext <<_ACEOF
9181/* end confdefs.h. */
9182$ac_includes_default
9183#include <Carbon/Carbon.h>
9184_ACEOF
9185rm -f conftest.$ac_objext
ca81d7a0
JD
9186if { (ac_try="$ac_compile"
9187case "(($ac_try" in
9188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9189 *) ac_try_echo=$ac_try;;
9190esac
9191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9192 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9193 ac_status=$?
edfaf76d
LK
9194 grep -v '^ *+' conftest.er1 >conftest.err
9195 rm -f conftest.er1
9196 cat conftest.err >&5
5d6da11e 9197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9198 (exit $ac_status); } && {
9199 test -z "$ac_c_werror_flag" ||
9200 test ! -s conftest.err
9201 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9202 ac_header_compiler=yes
9203else
9204 echo "$as_me: failed program was:" >&5
9205sed 's/^/| /' conftest.$ac_ext >&5
9206
ca81d7a0 9207 ac_header_compiler=no
5d6da11e 9208fi
ca81d7a0
JD
9209
9210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9211{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9212echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9213
9214# Is the header present?
ca81d7a0
JD
9215{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9216echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9217cat >conftest.$ac_ext <<_ACEOF
9218/* confdefs.h. */
9219_ACEOF
9220cat confdefs.h >>conftest.$ac_ext
9221cat >>conftest.$ac_ext <<_ACEOF
9222/* end confdefs.h. */
9223#include <Carbon/Carbon.h>
9224_ACEOF
ca81d7a0
JD
9225if { (ac_try="$ac_cpp conftest.$ac_ext"
9226case "(($ac_try" in
9227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9228 *) ac_try_echo=$ac_try;;
9229esac
9230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9231 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9232 ac_status=$?
9233 grep -v '^ *+' conftest.er1 >conftest.err
9234 rm -f conftest.er1
9235 cat conftest.err >&5
9236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9237 (exit $ac_status); } >/dev/null && {
9238 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9239 test ! -s conftest.err
9240 }; then
5d6da11e
YM
9241 ac_header_preproc=yes
9242else
9243 echo "$as_me: failed program was:" >&5
9244sed 's/^/| /' conftest.$ac_ext >&5
9245
9246 ac_header_preproc=no
9247fi
ca81d7a0 9248
5d6da11e 9249rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9250{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9251echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9252
9253# So? What about this header?
edfaf76d
LK
9254case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9255 yes:no: )
5d6da11e
YM
9256 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9257echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9258 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9259echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9260 ac_header_preproc=yes
5d6da11e 9261 ;;
edfaf76d 9262 no:yes:* )
5d6da11e
YM
9263 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9264echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9265 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9266echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9267 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9268echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9269 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9270echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9271 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9272echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9273 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9274echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9275
5d6da11e
YM
9276 ;;
9277esac
ca81d7a0
JD
9278{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9279echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9280if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9281 echo $ECHO_N "(cached) $ECHO_C" >&6
9282else
9283 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9284fi
ca81d7a0
JD
9285{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9286echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9287
9288fi
9289if test $ac_cv_header_Carbon_Carbon_h = yes; then
9290 HAVE_CARBON=yes
9291fi
9292
9293
1d4d5604
YM
9294fi
9295if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9296 if test "${with_carbon+set}" != set \
9297 && test "${carbon_appdir_x+set}" != set; then
9d2818d6 9298 for var in with_x with_x_toolkit with_xim \
ec8fcb10
YM
9299 with_xpm with_jpeg with_tiff with_gif with_png; do
9300 if eval test \"\${$var+set}\" = set; then
9301 HAVE_CARBON=no
9302 break
9303 fi
9304 done
5d6da11e
YM
9305 fi
9306fi
1d4d5604
YM
9307if test "${HAVE_CARBON}" = yes; then
9308 window_system=mac
9309fi
9310
9311case "${window_system}" in
9312 x11 )
9313 HAVE_X_WINDOWS=yes
9314 HAVE_X11=yes
9315 case "${with_x_toolkit}" in
9316 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9317 motif ) USE_X_TOOLKIT=MOTIF ;;
9318 gtk ) with_gtk=yes
9319 USE_X_TOOLKIT=none ;;
9320 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9321 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9322 esac
9323 ;;
9324 mac | none )
9325 HAVE_X_WINDOWS=no
9326 HAVE_X11=no
9327 USE_X_TOOLKIT=none
9328 ;;
9329esac
9330
cfe440b8
JD
9331if test "$window_system" = none && test "X$with_x" != "Xno"; then
9332 # Extract the first word of "X", so it can be a program name with args.
9333set dummy X; ac_word=$2
9334{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9335echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9336if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9337 echo $ECHO_N "(cached) $ECHO_C" >&6
9338else
9339 if test -n "$HAVE_XSERVER"; then
9340 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9341else
9342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9343for as_dir in $PATH
9344do
9345 IFS=$as_save_IFS
9346 test -z "$as_dir" && as_dir=.
9347 for ac_exec_ext in '' $ac_executable_extensions; do
9348 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9349 ac_cv_prog_HAVE_XSERVER="true"
9350 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9351 break 2
9352 fi
9353done
9354done
9355IFS=$as_save_IFS
9356
9357 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9358fi
9359fi
9360HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9361if test -n "$HAVE_XSERVER"; then
9362 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9363echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9364else
9365 { echo "$as_me:$LINENO: result: no" >&5
9366echo "${ECHO_T}no" >&6; }
9367fi
9368
9369
9370 if test "$HAVE_XSERVER" = true ||
9371 test -n "$DISPLAY" ||
9372 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9373 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9374were found. You should install the relevant development files for X
9375and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9376sure you have development files for image handling, i.e.
9377tiff, gif, jpeg, png and xpm.
9378If you are sure you want Emacs compiled without X window support, pass
9379 --without-x
9380to configure." >&5
9381echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9382were found. You should install the relevant development files for X
9383and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9384sure you have development files for image handling, i.e.
9385tiff, gif, jpeg, png and xpm.
9386If you are sure you want Emacs compiled without X window support, pass
9387 --without-x
9388to configure." >&2;}
9389 { (exit 1); exit 1; }; }
9390 fi
9391fi
9392
1d4d5604
YM
9393### If we're using X11, we should use the X menu package.
9394HAVE_MENUS=no
9395case ${HAVE_X11} in
9396 yes ) HAVE_MENUS=yes ;;
9397esac
9398
98418dba
CW
9399### Compute the unexec source name from the object name.
9400UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9401
9402# Do the opsystem or machine files prohibit the use of the GNU malloc?
9403# Assume not, until told otherwise.
9404GNU_MALLOC=yes
9405doug_lea_malloc=yes
ca81d7a0
JD
9406{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9407echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9408if test "${ac_cv_func_malloc_get_state+set}" = set; then
9409 echo $ECHO_N "(cached) $ECHO_C" >&6
9410else
9411 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9412/* confdefs.h. */
9413_ACEOF
9414cat confdefs.h >>conftest.$ac_ext
9415cat >>conftest.$ac_ext <<_ACEOF
9416/* end confdefs.h. */
edfaf76d
LK
9417/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9418 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9419#define malloc_get_state innocuous_malloc_get_state
9420
98418dba 9421/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9422 which can conflict with char malloc_get_state (); below.
9423 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9424 <limits.h> exists even on freestanding compilers. */
edfaf76d 9425
19650fd6
AS
9426#ifdef __STDC__
9427# include <limits.h>
9428#else
9429# include <assert.h>
9430#endif
edfaf76d
LK
9431
9432#undef malloc_get_state
9433
ca81d7a0
JD
9434/* Override any GCC internal prototype to avoid an error.
9435 Use char because int might match the return type of a GCC
9436 builtin and then its argument prototype would still apply. */
98418dba
CW
9437#ifdef __cplusplus
9438extern "C"
9439#endif
98418dba 9440char malloc_get_state ();
98418dba
CW
9441/* The GNU C library defines this for functions which it implements
9442 to always fail with ENOSYS. Some functions are actually named
9443 something starting with __ and the normal name is an alias. */
ca81d7a0 9444#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9445choke me
98418dba
CW
9446#endif
9447
19650fd6
AS
9448int
9449main ()
9450{
ca81d7a0 9451return malloc_get_state ();
98418dba
CW
9452 ;
9453 return 0;
9454}
9455_ACEOF
9456rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9457if { (ac_try="$ac_link"
9458case "(($ac_try" in
9459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9460 *) ac_try_echo=$ac_try;;
9461esac
9462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9463 (eval "$ac_link") 2>conftest.er1
98418dba 9464 ac_status=$?
edfaf76d
LK
9465 grep -v '^ *+' conftest.er1 >conftest.err
9466 rm -f conftest.er1
9467 cat conftest.err >&5
c0d27fcc 9468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9469 (exit $ac_status); } && {
9470 test -z "$ac_c_werror_flag" ||
9471 test ! -s conftest.err
9472 } && test -s conftest$ac_exeext &&
9473 $as_test_x conftest$ac_exeext; then
98418dba
CW
9474 ac_cv_func_malloc_get_state=yes
9475else
9476 echo "$as_me: failed program was:" >&5
19650fd6
AS
9477sed 's/^/| /' conftest.$ac_ext >&5
9478
ca81d7a0 9479 ac_cv_func_malloc_get_state=no
98418dba 9480fi
ca81d7a0 9481
f053c89f 9482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9483 conftest$ac_exeext conftest.$ac_ext
98418dba 9484fi
ca81d7a0
JD
9485{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9486echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9487if test $ac_cv_func_malloc_get_state = yes; then
9488 :
9489else
9490 doug_lea_malloc=no
9491fi
9492
ca81d7a0
JD
9493{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9494echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9495if test "${ac_cv_func_malloc_set_state+set}" = set; then
9496 echo $ECHO_N "(cached) $ECHO_C" >&6
9497else
9498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9499/* confdefs.h. */
9500_ACEOF
9501cat confdefs.h >>conftest.$ac_ext
9502cat >>conftest.$ac_ext <<_ACEOF
9503/* end confdefs.h. */
edfaf76d
LK
9504/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9505 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9506#define malloc_set_state innocuous_malloc_set_state
9507
98418dba 9508/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9509 which can conflict with char malloc_set_state (); below.
9510 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9511 <limits.h> exists even on freestanding compilers. */
edfaf76d 9512
19650fd6
AS
9513#ifdef __STDC__
9514# include <limits.h>
9515#else
9516# include <assert.h>
9517#endif
edfaf76d
LK
9518
9519#undef malloc_set_state
9520
ca81d7a0
JD
9521/* Override any GCC internal prototype to avoid an error.
9522 Use char because int might match the return type of a GCC
9523 builtin and then its argument prototype would still apply. */
98418dba
CW
9524#ifdef __cplusplus
9525extern "C"
9526#endif
98418dba 9527char malloc_set_state ();
98418dba
CW
9528/* The GNU C library defines this for functions which it implements
9529 to always fail with ENOSYS. Some functions are actually named
9530 something starting with __ and the normal name is an alias. */
ca81d7a0 9531#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9532choke me
98418dba
CW
9533#endif
9534
19650fd6
AS
9535int
9536main ()
9537{
ca81d7a0 9538return malloc_set_state ();
98418dba
CW
9539 ;
9540 return 0;
9541}
9542_ACEOF
9543rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9544if { (ac_try="$ac_link"
9545case "(($ac_try" in
9546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9547 *) ac_try_echo=$ac_try;;
9548esac
9549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9550 (eval "$ac_link") 2>conftest.er1
98418dba 9551 ac_status=$?
edfaf76d
LK
9552 grep -v '^ *+' conftest.er1 >conftest.err
9553 rm -f conftest.er1
9554 cat conftest.err >&5
c0d27fcc 9555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9556 (exit $ac_status); } && {
9557 test -z "$ac_c_werror_flag" ||
9558 test ! -s conftest.err
9559 } && test -s conftest$ac_exeext &&
9560 $as_test_x conftest$ac_exeext; then
98418dba
CW
9561 ac_cv_func_malloc_set_state=yes
9562else
9563 echo "$as_me: failed program was:" >&5
19650fd6
AS
9564sed 's/^/| /' conftest.$ac_ext >&5
9565
ca81d7a0 9566 ac_cv_func_malloc_set_state=no
98418dba 9567fi
ca81d7a0 9568
f053c89f 9569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9570 conftest$ac_exeext conftest.$ac_ext
98418dba 9571fi
ca81d7a0
JD
9572{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9573echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9574if test $ac_cv_func_malloc_set_state = yes; then
9575 :
9576else
9577 doug_lea_malloc=no
9578fi
9579
ca81d7a0
JD
9580{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9581echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9582if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9583 echo $ECHO_N "(cached) $ECHO_C" >&6
9584else
9585 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9586/* confdefs.h. */
9587_ACEOF
9588cat confdefs.h >>conftest.$ac_ext
9589cat >>conftest.$ac_ext <<_ACEOF
9590/* end confdefs.h. */
98418dba 9591extern void (* __after_morecore_hook)();
98418dba
CW
9592int
9593main ()
9594{
9595__after_morecore_hook = 0
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9601if { (ac_try="$ac_link"
9602case "(($ac_try" in
9603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9604 *) ac_try_echo=$ac_try;;
9605esac
9606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9607 (eval "$ac_link") 2>conftest.er1
98418dba 9608 ac_status=$?
edfaf76d
LK
9609 grep -v '^ *+' conftest.er1 >conftest.err
9610 rm -f conftest.er1
9611 cat conftest.err >&5
c0d27fcc 9612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9613 (exit $ac_status); } && {
9614 test -z "$ac_c_werror_flag" ||
9615 test ! -s conftest.err
9616 } && test -s conftest$ac_exeext &&
9617 $as_test_x conftest$ac_exeext; then
98418dba
CW
9618 emacs_cv_var___after_morecore_hook=yes
9619else
9620 echo "$as_me: failed program was:" >&5
19650fd6
AS
9621sed 's/^/| /' conftest.$ac_ext >&5
9622
ca81d7a0 9623 emacs_cv_var___after_morecore_hook=no
98418dba 9624fi
ca81d7a0 9625
f053c89f 9626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9627 conftest$ac_exeext conftest.$ac_ext
98418dba 9628fi
ca81d7a0
JD
9629{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9630echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9631if test $emacs_cv_var___after_morecore_hook = no; then
9632 doug_lea_malloc=no
9633fi
9634if test "${system_malloc}" = "yes"; then
9635 GNU_MALLOC=no
9636 GNU_MALLOC_reason="
9637 (The GNU allocators don't work with this system configuration.)"
9638fi
9639if test "$doug_lea_malloc" = "yes" ; then
9640 if test "$GNU_MALLOC" = yes ; then
9641 GNU_MALLOC_reason="
9642 (Using Doug Lea's new malloc from the GNU C Library.)"
9643 fi
b936fae4 9644
c0d27fcc 9645cat >>confdefs.h <<\_ACEOF
98418dba 9646#define DOUG_LEA_MALLOC 1
c0d27fcc 9647_ACEOF
98418dba
CW
9648
9649fi
9650
9651if test x"${REL_ALLOC}" = x; then
9652 REL_ALLOC=${GNU_MALLOC}
9653fi
9654
9655
c0d27fcc
MR
9656
9657
9658for ac_header in stdlib.h unistd.h
98418dba
CW
9659do
9660as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9661if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9662 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9663echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9664if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9665 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9666fi
ca81d7a0
JD
9667ac_res=`eval echo '${'$as_ac_Header'}'`
9668 { echo "$as_me:$LINENO: result: $ac_res" >&5
9669echo "${ECHO_T}$ac_res" >&6; }
98418dba 9670else
c0d27fcc 9671 # Is the header compilable?
ca81d7a0
JD
9672{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9673echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9675/* confdefs.h. */
9676_ACEOF
9677cat confdefs.h >>conftest.$ac_ext
9678cat >>conftest.$ac_ext <<_ACEOF
9679/* end confdefs.h. */
98418dba
CW
9680$ac_includes_default
9681#include <$ac_header>
9682_ACEOF
9683rm -f conftest.$ac_objext
ca81d7a0
JD
9684if { (ac_try="$ac_compile"
9685case "(($ac_try" in
9686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9687 *) ac_try_echo=$ac_try;;
9688esac
9689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9690 (eval "$ac_compile") 2>conftest.er1
98418dba 9691 ac_status=$?
edfaf76d
LK
9692 grep -v '^ *+' conftest.er1 >conftest.err
9693 rm -f conftest.er1
9694 cat conftest.err >&5
c0d27fcc 9695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9696 (exit $ac_status); } && {
9697 test -z "$ac_c_werror_flag" ||
9698 test ! -s conftest.err
9699 } && test -s conftest.$ac_objext; then
c0d27fcc 9700 ac_header_compiler=yes
98418dba
CW
9701else
9702 echo "$as_me: failed program was:" >&5
19650fd6
AS
9703sed 's/^/| /' conftest.$ac_ext >&5
9704
ca81d7a0 9705 ac_header_compiler=no
98418dba 9706fi
ca81d7a0
JD
9707
9708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9709{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9710echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9711
c0d27fcc 9712# Is the header present?
ca81d7a0
JD
9713{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9714echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9715cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9716/* confdefs.h. */
9717_ACEOF
9718cat confdefs.h >>conftest.$ac_ext
9719cat >>conftest.$ac_ext <<_ACEOF
9720/* end confdefs.h. */
98418dba
CW
9721#include <$ac_header>
9722_ACEOF
ca81d7a0
JD
9723if { (ac_try="$ac_cpp conftest.$ac_ext"
9724case "(($ac_try" in
9725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9726 *) ac_try_echo=$ac_try;;
9727esac
9728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9729 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9730 ac_status=$?
6bae0ccf 9731 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9732 rm -f conftest.er1
9733 cat conftest.err >&5
c0d27fcc 9734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9735 (exit $ac_status); } >/dev/null && {
9736 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9737 test ! -s conftest.err
9738 }; then
c0d27fcc 9739 ac_header_preproc=yes
98418dba
CW
9740else
9741 echo "$as_me: failed program was:" >&5
19650fd6
AS
9742sed 's/^/| /' conftest.$ac_ext >&5
9743
c0d27fcc 9744 ac_header_preproc=no
98418dba 9745fi
ca81d7a0 9746
98418dba 9747rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9748{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9749echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9750
9751# So? What about this header?
edfaf76d
LK
9752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9753 yes:no: )
c0d27fcc
MR
9754 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9755echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9756 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9757echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9758 ac_header_preproc=yes
9759 ;;
9760 no:yes:* )
9761 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9762echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9763 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9764echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9765 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9766echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9767 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9768echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9769 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9770echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9771 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9772echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9773
19650fd6 9774 ;;
c0d27fcc 9775esac
ca81d7a0
JD
9776{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9779 echo $ECHO_N "(cached) $ECHO_C" >&6
9780else
edfaf76d 9781 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9782fi
ca81d7a0
JD
9783ac_res=`eval echo '${'$as_ac_Header'}'`
9784 { echo "$as_me:$LINENO: result: $ac_res" >&5
9785echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9786
9787fi
98418dba 9788if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9789 cat >>confdefs.h <<_ACEOF
98418dba 9790#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9791_ACEOF
98418dba
CW
9792
9793fi
c0d27fcc 9794
98418dba
CW
9795done
9796
c0d27fcc 9797
98418dba
CW
9798for ac_func in getpagesize
9799do
9800as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9801{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9802echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9803if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
9805else
9806 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9807/* confdefs.h. */
9808_ACEOF
9809cat confdefs.h >>conftest.$ac_ext
9810cat >>conftest.$ac_ext <<_ACEOF
9811/* end confdefs.h. */
edfaf76d
LK
9812/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9814#define $ac_func innocuous_$ac_func
9815
98418dba 9816/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9817 which can conflict with char $ac_func (); below.
9818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9819 <limits.h> exists even on freestanding compilers. */
edfaf76d 9820
19650fd6
AS
9821#ifdef __STDC__
9822# include <limits.h>
9823#else
9824# include <assert.h>
9825#endif
edfaf76d
LK
9826
9827#undef $ac_func
9828
ca81d7a0
JD
9829/* Override any GCC internal prototype to avoid an error.
9830 Use char because int might match the return type of a GCC
9831 builtin and then its argument prototype would still apply. */
98418dba
CW
9832#ifdef __cplusplus
9833extern "C"
9834#endif
98418dba 9835char $ac_func ();
98418dba
CW
9836/* The GNU C library defines this for functions which it implements
9837 to always fail with ENOSYS. Some functions are actually named
9838 something starting with __ and the normal name is an alias. */
ca81d7a0 9839#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9840choke me
98418dba
CW
9841#endif
9842
19650fd6
AS
9843int
9844main ()
9845{
ca81d7a0 9846return $ac_func ();
98418dba
CW
9847 ;
9848 return 0;
9849}
9850_ACEOF
9851rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9852if { (ac_try="$ac_link"
9853case "(($ac_try" in
9854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9855 *) ac_try_echo=$ac_try;;
9856esac
9857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9858 (eval "$ac_link") 2>conftest.er1
98418dba 9859 ac_status=$?
edfaf76d
LK
9860 grep -v '^ *+' conftest.er1 >conftest.err
9861 rm -f conftest.er1
9862 cat conftest.err >&5
c0d27fcc 9863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9864 (exit $ac_status); } && {
9865 test -z "$ac_c_werror_flag" ||
9866 test ! -s conftest.err
9867 } && test -s conftest$ac_exeext &&
9868 $as_test_x conftest$ac_exeext; then
98418dba
CW
9869 eval "$as_ac_var=yes"
9870else
9871 echo "$as_me: failed program was:" >&5
19650fd6
AS
9872sed 's/^/| /' conftest.$ac_ext >&5
9873
ca81d7a0 9874 eval "$as_ac_var=no"
98418dba 9875fi
ca81d7a0 9876
f053c89f 9877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9878 conftest$ac_exeext conftest.$ac_ext
98418dba 9879fi
ca81d7a0
JD
9880ac_res=`eval echo '${'$as_ac_var'}'`
9881 { echo "$as_me:$LINENO: result: $ac_res" >&5
9882echo "${ECHO_T}$ac_res" >&6; }
98418dba 9883if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9884 cat >>confdefs.h <<_ACEOF
98418dba 9885#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9886_ACEOF
98418dba
CW
9887
9888fi
9889done
9890
ca81d7a0
JD
9891{ echo "$as_me:$LINENO: checking for working mmap" >&5
9892echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
9893if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9894 echo $ECHO_N "(cached) $ECHO_C" >&6
9895else
9896 if test "$cross_compiling" = yes; then
9897 ac_cv_func_mmap_fixed_mapped=no
9898else
9899 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9900/* confdefs.h. */
9901_ACEOF
9902cat confdefs.h >>conftest.$ac_ext
9903cat >>conftest.$ac_ext <<_ACEOF
9904/* end confdefs.h. */
98418dba 9905$ac_includes_default
c0d27fcc
MR
9906/* malloc might have been renamed as rpl_malloc. */
9907#undef malloc
9908
98418dba
CW
9909/* Thanks to Mike Haertel and Jim Avera for this test.
9910 Here is a matrix of mmap possibilities:
9911 mmap private not fixed
9912 mmap private fixed at somewhere currently unmapped
9913 mmap private fixed at somewhere already mapped
9914 mmap shared not fixed
9915 mmap shared fixed at somewhere currently unmapped
9916 mmap shared fixed at somewhere already mapped
9917 For private mappings, we should verify that changes cannot be read()
9918 back from the file, nor mmap's back from the file at a different
9919 address. (There have been systems where private was not correctly
9920 implemented like the infamous i386 svr4.0, and systems where the
9921 VM page cache was not coherent with the file system buffer cache
9922 like early versions of FreeBSD and possibly contemporary NetBSD.)
9923 For shared mappings, we should conversely verify that changes get
c0d27fcc 9924 propagated back to all the places they're supposed to be.
98418dba
CW
9925
9926 Grep wants private fixed already mapped.
9927 The main things grep needs to know about mmap are:
9928 * does it exist and is it safe to write into the mmap'd area
9929 * how to use it (BSD variants) */
9930
9931#include <fcntl.h>
9932#include <sys/mman.h>
9933
f053c89f 9934#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
9935char *malloc ();
9936#endif
9937
9938/* This mess was copied from the GNU getpagesize.h. */
f053c89f 9939#ifndef HAVE_GETPAGESIZE
98418dba 9940/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 9941# ifndef HAVE_SYS_PARAM_H
98418dba
CW
9942# define HAVE_SYS_PARAM_H 1
9943# endif
9944
9945# ifdef _SC_PAGESIZE
9946# define getpagesize() sysconf(_SC_PAGESIZE)
9947# else /* no _SC_PAGESIZE */
f053c89f 9948# ifdef HAVE_SYS_PARAM_H
98418dba
CW
9949# include <sys/param.h>
9950# ifdef EXEC_PAGESIZE
9951# define getpagesize() EXEC_PAGESIZE
9952# else /* no EXEC_PAGESIZE */
9953# ifdef NBPG
9954# define getpagesize() NBPG * CLSIZE
9955# ifndef CLSIZE
9956# define CLSIZE 1
9957# endif /* no CLSIZE */
9958# else /* no NBPG */
9959# ifdef NBPC
9960# define getpagesize() NBPC
9961# else /* no NBPC */
9962# ifdef PAGESIZE
9963# define getpagesize() PAGESIZE
9964# endif /* PAGESIZE */
9965# endif /* no NBPC */
9966# endif /* no NBPG */
9967# endif /* no EXEC_PAGESIZE */
9968# else /* no HAVE_SYS_PARAM_H */
9969# define getpagesize() 8192 /* punt totally */
9970# endif /* no HAVE_SYS_PARAM_H */
9971# endif /* no _SC_PAGESIZE */
9972
9973#endif /* no HAVE_GETPAGESIZE */
9974
9975int
9976main ()
9977{
9978 char *data, *data2, *data3;
9979 int i, pagesize;
9980 int fd;
9981
9982 pagesize = getpagesize ();
9983
9984 /* First, make a file with some known garbage in it. */
9985 data = (char *) malloc (pagesize);
9986 if (!data)
ca81d7a0 9987 return 1;
98418dba
CW
9988 for (i = 0; i < pagesize; ++i)
9989 *(data + i) = rand ();
9990 umask (0);
9991 fd = creat ("conftest.mmap", 0600);
9992 if (fd < 0)
ca81d7a0 9993 return 1;
98418dba 9994 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 9995 return 1;
98418dba
CW
9996 close (fd);
9997
9998 /* Next, try to mmap the file at a fixed address which already has
9999 something else allocated at it. If we can, also make sure that
10000 we see the same garbage. */
10001 fd = open ("conftest.mmap", O_RDWR);
10002 if (fd < 0)
ca81d7a0 10003 return 1;
98418dba
CW
10004 data2 = (char *) malloc (2 * pagesize);
10005 if (!data2)
ca81d7a0
JD
10006 return 1;
10007 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10008 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10009 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10010 return 1;
98418dba
CW
10011 for (i = 0; i < pagesize; ++i)
10012 if (*(data + i) != *(data2 + i))
ca81d7a0 10013 return 1;
98418dba
CW
10014
10015 /* Finally, make sure that changes to the mapped area do not
10016 percolate back to the file as seen by read(). (This is a bug on
10017 some variants of i386 svr4.0.) */
10018 for (i = 0; i < pagesize; ++i)
10019 *(data2 + i) = *(data2 + i) + 1;
10020 data3 = (char *) malloc (pagesize);
10021 if (!data3)
ca81d7a0 10022 return 1;
98418dba 10023 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10024 return 1;
98418dba
CW
10025 for (i = 0; i < pagesize; ++i)
10026 if (*(data + i) != *(data3 + i))
ca81d7a0 10027 return 1;
98418dba 10028 close (fd);
ca81d7a0 10029 return 0;
98418dba
CW
10030}
10031_ACEOF
10032rm -f conftest$ac_exeext
ca81d7a0
JD
10033if { (ac_try="$ac_link"
10034case "(($ac_try" in
10035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10036 *) ac_try_echo=$ac_try;;
10037esac
10038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10039 (eval "$ac_link") 2>&5
98418dba 10040 ac_status=$?
c0d27fcc 10041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10043 { (case "(($ac_try" in
10044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10045 *) ac_try_echo=$ac_try;;
10046esac
10047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10048 (eval "$ac_try") 2>&5
98418dba 10049 ac_status=$?
c0d27fcc 10050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10051 (exit $ac_status); }; }; then
10052 ac_cv_func_mmap_fixed_mapped=yes
10053else
10054 echo "$as_me: program exited with status $ac_status" >&5
10055echo "$as_me: failed program was:" >&5
19650fd6
AS
10056sed 's/^/| /' conftest.$ac_ext >&5
10057
c0d27fcc 10058( exit $ac_status )
98418dba
CW
10059ac_cv_func_mmap_fixed_mapped=no
10060fi
ca81d7a0 10061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10062fi
ca81d7a0
JD
10063
10064
98418dba 10065fi
ca81d7a0
JD
10066{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10067echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10068if test $ac_cv_func_mmap_fixed_mapped = yes; then
10069
c0d27fcc 10070cat >>confdefs.h <<\_ACEOF
98418dba 10071#define HAVE_MMAP 1
c0d27fcc 10072_ACEOF
98418dba
CW
10073
10074fi
10075rm -f conftest.mmap
10076
10077if test $use_mmap_for_buffers = yes; then
10078 REL_ALLOC=no
10079fi
10080
10081LIBS="$libsrc_libs $LIBS"
10082
c0d27fcc 10083
ca81d7a0
JD
10084{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10085echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10086if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10087 echo $ECHO_N "(cached) $ECHO_C" >&6
10088else
10089 ac_check_lib_save_LIBS=$LIBS
10090LIBS="-ldnet $LIBS"
10091cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10092/* confdefs.h. */
10093_ACEOF
10094cat confdefs.h >>conftest.$ac_ext
10095cat >>conftest.$ac_ext <<_ACEOF
10096/* end confdefs.h. */
98418dba 10097
ca81d7a0
JD
10098/* Override any GCC internal prototype to avoid an error.
10099 Use char because int might match the return type of a GCC
10100 builtin and then its argument prototype would still apply. */
98418dba
CW
10101#ifdef __cplusplus
10102extern "C"
10103#endif
98418dba 10104char dnet_ntoa ();
98418dba
CW
10105int
10106main ()
10107{
ca81d7a0 10108return dnet_ntoa ();
98418dba
CW
10109 ;
10110 return 0;
10111}
10112_ACEOF
10113rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10114if { (ac_try="$ac_link"
10115case "(($ac_try" in
10116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10117 *) ac_try_echo=$ac_try;;
10118esac
10119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10120 (eval "$ac_link") 2>conftest.er1
98418dba 10121 ac_status=$?
edfaf76d
LK
10122 grep -v '^ *+' conftest.er1 >conftest.err
10123 rm -f conftest.er1
10124 cat conftest.err >&5
c0d27fcc 10125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10126 (exit $ac_status); } && {
10127 test -z "$ac_c_werror_flag" ||
10128 test ! -s conftest.err
10129 } && test -s conftest$ac_exeext &&
10130 $as_test_x conftest$ac_exeext; then
98418dba
CW
10131 ac_cv_lib_dnet_dnet_ntoa=yes
10132else
10133 echo "$as_me: failed program was:" >&5
19650fd6
AS
10134sed 's/^/| /' conftest.$ac_ext >&5
10135
ca81d7a0 10136 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10137fi
ca81d7a0 10138
f053c89f 10139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10140 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10141LIBS=$ac_check_lib_save_LIBS
10142fi
ca81d7a0
JD
10143{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10144echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10145if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10146 cat >>confdefs.h <<_ACEOF
98418dba 10147#define HAVE_LIBDNET 1
c0d27fcc 10148_ACEOF
98418dba
CW
10149
10150 LIBS="-ldnet $LIBS"
10151
10152fi
10153
c0d27fcc 10154
ca81d7a0
JD
10155{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10156echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10157if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10158 echo $ECHO_N "(cached) $ECHO_C" >&6
10159else
10160 ac_check_lib_save_LIBS=$LIBS
10161LIBS="-lXbsd $LIBS"
10162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10163/* confdefs.h. */
10164_ACEOF
10165cat confdefs.h >>conftest.$ac_ext
10166cat >>conftest.$ac_ext <<_ACEOF
10167/* end confdefs.h. */
98418dba 10168
c0d27fcc 10169
98418dba
CW
10170int
10171main ()
10172{
ca81d7a0 10173return main ();
98418dba
CW
10174 ;
10175 return 0;
10176}
10177_ACEOF
10178rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10179if { (ac_try="$ac_link"
10180case "(($ac_try" in
10181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10182 *) ac_try_echo=$ac_try;;
10183esac
10184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10185 (eval "$ac_link") 2>conftest.er1
98418dba 10186 ac_status=$?
edfaf76d
LK
10187 grep -v '^ *+' conftest.er1 >conftest.err
10188 rm -f conftest.er1
10189 cat conftest.err >&5
c0d27fcc 10190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10191 (exit $ac_status); } && {
10192 test -z "$ac_c_werror_flag" ||
10193 test ! -s conftest.err
10194 } && test -s conftest$ac_exeext &&
10195 $as_test_x conftest$ac_exeext; then
98418dba
CW
10196 ac_cv_lib_Xbsd_main=yes
10197else
10198 echo "$as_me: failed program was:" >&5
19650fd6
AS
10199sed 's/^/| /' conftest.$ac_ext >&5
10200
ca81d7a0 10201 ac_cv_lib_Xbsd_main=no
98418dba 10202fi
ca81d7a0 10203
f053c89f 10204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10205 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10206LIBS=$ac_check_lib_save_LIBS
10207fi
ca81d7a0
JD
10208{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10209echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10210if test $ac_cv_lib_Xbsd_main = yes; then
10211 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10212fi
10213
c0d27fcc
MR
10214
10215
ca81d7a0
JD
10216{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10217echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10218if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10219 echo $ECHO_N "(cached) $ECHO_C" >&6
10220else
10221 ac_check_lib_save_LIBS=$LIBS
10222LIBS="-lpthreads $LIBS"
10223cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10224/* confdefs.h. */
10225_ACEOF
10226cat confdefs.h >>conftest.$ac_ext
10227cat >>conftest.$ac_ext <<_ACEOF
10228/* end confdefs.h. */
98418dba 10229
ca81d7a0
JD
10230/* Override any GCC internal prototype to avoid an error.
10231 Use char because int might match the return type of a GCC
10232 builtin and then its argument prototype would still apply. */
98418dba
CW
10233#ifdef __cplusplus
10234extern "C"
10235#endif
98418dba 10236char cma_open ();
98418dba
CW
10237int
10238main ()
10239{
ca81d7a0 10240return cma_open ();
98418dba
CW
10241 ;
10242 return 0;
10243}
10244_ACEOF
10245rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10246if { (ac_try="$ac_link"
10247case "(($ac_try" in
10248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10249 *) ac_try_echo=$ac_try;;
10250esac
10251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10252 (eval "$ac_link") 2>conftest.er1
98418dba 10253 ac_status=$?
edfaf76d
LK
10254 grep -v '^ *+' conftest.er1 >conftest.err
10255 rm -f conftest.er1
10256 cat conftest.err >&5
c0d27fcc 10257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10258 (exit $ac_status); } && {
10259 test -z "$ac_c_werror_flag" ||
10260 test ! -s conftest.err
10261 } && test -s conftest$ac_exeext &&
10262 $as_test_x conftest$ac_exeext; then
98418dba
CW
10263 ac_cv_lib_pthreads_cma_open=yes
10264else
10265 echo "$as_me: failed program was:" >&5
19650fd6
AS
10266sed 's/^/| /' conftest.$ac_ext >&5
10267
ca81d7a0 10268 ac_cv_lib_pthreads_cma_open=no
98418dba 10269fi
ca81d7a0 10270
f053c89f 10271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10272 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10273LIBS=$ac_check_lib_save_LIBS
10274fi
ca81d7a0
JD
10275{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10276echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10277if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10278 cat >>confdefs.h <<_ACEOF
98418dba 10279#define HAVE_LIBPTHREADS 1
c0d27fcc 10280_ACEOF
98418dba
CW
10281
10282 LIBS="-lpthreads $LIBS"
10283
10284fi
10285
c0d27fcc 10286
55597d70
DL
10287
10288case ${host_os} in
10289aix*)
ca81d7a0
JD
10290 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10291echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10292if test "${gdb_cv_bigtoc+set}" = set; then
10293 echo $ECHO_N "(cached) $ECHO_C" >&6
10294else
10295
10296 case $GCC in
10297 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10298 *) gdb_cv_bigtoc=-bbigtoc ;;
10299 esac
10300
10301 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10302 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10303/* confdefs.h. */
10304_ACEOF
10305cat confdefs.h >>conftest.$ac_ext
10306cat >>conftest.$ac_ext <<_ACEOF
10307/* end confdefs.h. */
55597d70
DL
10308
10309int
10310main ()
10311{
10312int i;
10313 ;
10314 return 0;
10315}
10316_ACEOF
10317rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10318if { (ac_try="$ac_link"
10319case "(($ac_try" in
10320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10321 *) ac_try_echo=$ac_try;;
10322esac
10323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10324 (eval "$ac_link") 2>conftest.er1
55597d70 10325 ac_status=$?
edfaf76d
LK
10326 grep -v '^ *+' conftest.er1 >conftest.err
10327 rm -f conftest.er1
10328 cat conftest.err >&5
55597d70 10329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10330 (exit $ac_status); } && {
10331 test -z "$ac_c_werror_flag" ||
10332 test ! -s conftest.err
10333 } && test -s conftest$ac_exeext &&
10334 $as_test_x conftest$ac_exeext; then
55597d70
DL
10335 :
10336else
10337 echo "$as_me: failed program was:" >&5
19650fd6
AS
10338sed 's/^/| /' conftest.$ac_ext >&5
10339
ca81d7a0 10340 gdb_cv_bigtoc=
55597d70 10341fi
ca81d7a0 10342
f053c89f 10343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10344 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10345
10346fi
ca81d7a0
JD
10347{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10348echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10349 ;;
10350esac
10351
ae1a998c
RS
10352# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10353# used for the tests that follow. We set them back to REAL_CFLAGS and
10354# REAL_CPPFLAGS later on.
98418dba
CW
10355
10356REAL_CPPFLAGS="$CPPFLAGS"
10357
10358if test "${HAVE_X11}" = "yes"; then
10359 DEFS="$C_SWITCH_X_SITE $DEFS"
10360 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10361 LIBS="$LIBX $LIBS"
10362 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10363 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10364
10365 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10366 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10367 # but it's more convenient here to set LD_RUN_PATH
10368 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10369 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10370 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10371 export LD_RUN_PATH
10372 fi
10373
10374 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10375 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10376echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10377 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10378/* confdefs.h. */
10379_ACEOF
10380cat confdefs.h >>conftest.$ac_ext
10381cat >>conftest.$ac_ext <<_ACEOF
10382/* end confdefs.h. */
98418dba 10383
98418dba
CW
10384int
10385main ()
10386{
10387XOpenDisplay ("foo");
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10393if { (ac_try="$ac_link"
10394case "(($ac_try" in
10395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10396 *) ac_try_echo=$ac_try;;
10397esac
10398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10399 (eval "$ac_link") 2>conftest.er1
98418dba 10400 ac_status=$?
edfaf76d
LK
10401 grep -v '^ *+' conftest.er1 >conftest.err
10402 rm -f conftest.er1
10403 cat conftest.err >&5
c0d27fcc 10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10405 (exit $ac_status); } && {
10406 test -z "$ac_c_werror_flag" ||
10407 test ! -s conftest.err
10408 } && test -s conftest$ac_exeext &&
10409 $as_test_x conftest$ac_exeext; then
35996d22 10410 xlinux_first_failure=no
98418dba
CW
10411else
10412 echo "$as_me: failed program was:" >&5
19650fd6
AS
10413sed 's/^/| /' conftest.$ac_ext >&5
10414
ca81d7a0 10415 xlinux_first_failure=yes
98418dba 10416fi
ca81d7a0 10417
f053c89f 10418rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10419 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10420 if test "${xlinux_first_failure}" = "yes"; then
10421 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10422 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10423 OLD_CPPFLAGS="$CPPFLAGS"
10424 OLD_LIBS="$LIBS"
10425 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10426 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10427 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10428 LIBS="$LIBS -b i486-linuxaout"
10429 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10430/* confdefs.h. */
10431_ACEOF
10432cat confdefs.h >>conftest.$ac_ext
10433cat >>conftest.$ac_ext <<_ACEOF
10434/* end confdefs.h. */
98418dba 10435
98418dba
CW
10436int
10437main ()
10438{
10439XOpenDisplay ("foo");
10440 ;
10441 return 0;
10442}
10443_ACEOF
10444rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10445if { (ac_try="$ac_link"
10446case "(($ac_try" in
10447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10448 *) ac_try_echo=$ac_try;;
10449esac
10450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10451 (eval "$ac_link") 2>conftest.er1
98418dba 10452 ac_status=$?
edfaf76d
LK
10453 grep -v '^ *+' conftest.er1 >conftest.err
10454 rm -f conftest.er1
10455 cat conftest.err >&5
c0d27fcc 10456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10457 (exit $ac_status); } && {
10458 test -z "$ac_c_werror_flag" ||
10459 test ! -s conftest.err
10460 } && test -s conftest$ac_exeext &&
10461 $as_test_x conftest$ac_exeext; then
98418dba
CW
10462 xlinux_second_failure=no
10463else
10464 echo "$as_me: failed program was:" >&5
19650fd6
AS
10465sed 's/^/| /' conftest.$ac_ext >&5
10466
ca81d7a0 10467 xlinux_second_failure=yes
98418dba 10468fi
ca81d7a0 10469
f053c89f 10470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10471 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10472 if test "${xlinux_second_failure}" = "yes"; then
10473 # If we get the same failure with -b, there is no use adding -b.
10474 # So take it out. This plays safe.
10475 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10476 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10477 CPPFLAGS="$OLD_CPPFLAGS"
10478 LIBS="$OLD_LIBS"
ca81d7a0
JD
10479 { echo "$as_me:$LINENO: result: no" >&5
10480echo "${ECHO_T}no" >&6; }
98418dba 10481 else
ca81d7a0
JD
10482 { echo "$as_me:$LINENO: result: yes" >&5
10483echo "${ECHO_T}yes" >&6; }
98418dba
CW
10484 fi
10485 else
ca81d7a0
JD
10486 { echo "$as_me:$LINENO: result: no" >&5
10487echo "${ECHO_T}no" >&6; }
98418dba
CW
10488 fi
10489 fi
10490
10491 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10492 # header files included from there.
ca81d7a0
JD
10493 { echo "$as_me:$LINENO: checking for Xkb" >&5
10494echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10495 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10496/* confdefs.h. */
10497_ACEOF
10498cat confdefs.h >>conftest.$ac_ext
10499cat >>conftest.$ac_ext <<_ACEOF
10500/* end confdefs.h. */
98418dba
CW
10501#include <X11/Xlib.h>
10502#include <X11/XKBlib.h>
98418dba
CW
10503int
10504main ()
10505{
10506XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10507 ;
10508 return 0;
10509}
10510_ACEOF
10511rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10512if { (ac_try="$ac_link"
10513case "(($ac_try" in
10514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10515 *) ac_try_echo=$ac_try;;
10516esac
10517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10518 (eval "$ac_link") 2>conftest.er1
98418dba 10519 ac_status=$?
edfaf76d
LK
10520 grep -v '^ *+' conftest.er1 >conftest.err
10521 rm -f conftest.er1
10522 cat conftest.err >&5
c0d27fcc 10523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10524 (exit $ac_status); } && {
10525 test -z "$ac_c_werror_flag" ||
10526 test ! -s conftest.err
10527 } && test -s conftest$ac_exeext &&
10528 $as_test_x conftest$ac_exeext; then
98418dba
CW
10529 emacs_xkb=yes
10530else
10531 echo "$as_me: failed program was:" >&5
19650fd6
AS
10532sed 's/^/| /' conftest.$ac_ext >&5
10533
ca81d7a0 10534 emacs_xkb=no
98418dba 10535fi
ca81d7a0 10536
f053c89f 10537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10538 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10539 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10540echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10541 if test $emacs_xkb = yes; then
b936fae4 10542
c0d27fcc 10543cat >>confdefs.h <<\_ACEOF
98418dba 10544#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10545_ACEOF
98418dba
CW
10546
10547 fi
10548
c0d27fcc
MR
10549
10550
10551
10552
98418dba
CW
10553for ac_func in XrmSetDatabase XScreenResourceString \
10554XScreenNumberOfScreen XSetWMProtocols
10555do
10556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10557{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10559if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10560 echo $ECHO_N "(cached) $ECHO_C" >&6
10561else
10562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10563/* confdefs.h. */
10564_ACEOF
10565cat confdefs.h >>conftest.$ac_ext
10566cat >>conftest.$ac_ext <<_ACEOF
10567/* end confdefs.h. */
edfaf76d
LK
10568/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10569 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10570#define $ac_func innocuous_$ac_func
10571
98418dba 10572/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10573 which can conflict with char $ac_func (); below.
10574 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10575 <limits.h> exists even on freestanding compilers. */
edfaf76d 10576
19650fd6
AS
10577#ifdef __STDC__
10578# include <limits.h>
10579#else
10580# include <assert.h>
10581#endif
edfaf76d
LK
10582
10583#undef $ac_func
10584
ca81d7a0
JD
10585/* Override any GCC internal prototype to avoid an error.
10586 Use char because int might match the return type of a GCC
10587 builtin and then its argument prototype would still apply. */
98418dba
CW
10588#ifdef __cplusplus
10589extern "C"
10590#endif
98418dba 10591char $ac_func ();
98418dba
CW
10592/* The GNU C library defines this for functions which it implements
10593 to always fail with ENOSYS. Some functions are actually named
10594 something starting with __ and the normal name is an alias. */
ca81d7a0 10595#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10596choke me
98418dba
CW
10597#endif
10598
19650fd6
AS
10599int
10600main ()
10601{
ca81d7a0 10602return $ac_func ();
98418dba
CW
10603 ;
10604 return 0;
10605}
10606_ACEOF
10607rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10608if { (ac_try="$ac_link"
10609case "(($ac_try" in
10610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10611 *) ac_try_echo=$ac_try;;
10612esac
10613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10614 (eval "$ac_link") 2>conftest.er1
98418dba 10615 ac_status=$?
edfaf76d
LK
10616 grep -v '^ *+' conftest.er1 >conftest.err
10617 rm -f conftest.er1
10618 cat conftest.err >&5
c0d27fcc 10619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10620 (exit $ac_status); } && {
10621 test -z "$ac_c_werror_flag" ||
10622 test ! -s conftest.err
10623 } && test -s conftest$ac_exeext &&
10624 $as_test_x conftest$ac_exeext; then
98418dba
CW
10625 eval "$as_ac_var=yes"
10626else
10627 echo "$as_me: failed program was:" >&5
19650fd6
AS
10628sed 's/^/| /' conftest.$ac_ext >&5
10629
ca81d7a0 10630 eval "$as_ac_var=no"
98418dba 10631fi
ca81d7a0 10632
f053c89f 10633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10634 conftest$ac_exeext conftest.$ac_ext
98418dba 10635fi
ca81d7a0
JD
10636ac_res=`eval echo '${'$as_ac_var'}'`
10637 { echo "$as_me:$LINENO: result: $ac_res" >&5
10638echo "${ECHO_T}$ac_res" >&6; }
98418dba 10639if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10640 cat >>confdefs.h <<_ACEOF
98418dba 10641#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10642_ACEOF
98418dba
CW
10643
10644fi
10645done
10646
10647fi
10648
10649if test "${window_system}" = "x11"; then
ca81d7a0
JD
10650 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10651echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10652 if test "${emacs_cv_x11_version_6+set}" = set; then
10653 echo $ECHO_N "(cached) $ECHO_C" >&6
10654else
10655 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10656/* confdefs.h. */
10657_ACEOF
10658cat confdefs.h >>conftest.$ac_ext
10659cat >>conftest.$ac_ext <<_ACEOF
10660/* end confdefs.h. */
98418dba 10661#include <X11/Xlib.h>
98418dba
CW
10662int
10663main ()
10664{
10665#if XlibSpecificationRelease < 6
10666fail;
10667#endif
10668
10669 ;
10670 return 0;
10671}
10672_ACEOF
10673rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10674if { (ac_try="$ac_link"
10675case "(($ac_try" in
10676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10677 *) ac_try_echo=$ac_try;;
10678esac
10679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10680 (eval "$ac_link") 2>conftest.er1
98418dba 10681 ac_status=$?
edfaf76d
LK
10682 grep -v '^ *+' conftest.er1 >conftest.err
10683 rm -f conftest.er1
10684 cat conftest.err >&5
c0d27fcc 10685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10686 (exit $ac_status); } && {
10687 test -z "$ac_c_werror_flag" ||
10688 test ! -s conftest.err
10689 } && test -s conftest$ac_exeext &&
10690 $as_test_x conftest$ac_exeext; then
98418dba
CW
10691 emacs_cv_x11_version_6=yes
10692else
10693 echo "$as_me: failed program was:" >&5
19650fd6
AS
10694sed 's/^/| /' conftest.$ac_ext >&5
10695
ca81d7a0 10696 emacs_cv_x11_version_6=no
98418dba 10697fi
ca81d7a0 10698
f053c89f 10699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10700 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10701fi
10702
10703 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10704 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10705echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10706
c0d27fcc 10707cat >>confdefs.h <<\_ACEOF
98418dba 10708#define HAVE_X11R6 1
c0d27fcc 10709_ACEOF
98418dba
CW
10710
10711 else
ca81d7a0
JD
10712 { echo "$as_me:$LINENO: result: before 6" >&5
10713echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10714 fi
10715fi
10716
98418dba 10717
0cfc0546
GM
10718### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10719HAVE_RSVG=no
ae0476ed 10720if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546 10721 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10722 RSVG_REQUIRED=2.0.0
10723 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10724
10725
10726 succeeded=no
10727
00b9c927 10728 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10729set dummy pkg-config; ac_word=$2
10730{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10731echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10732if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
10734else
10735 case $PKG_CONFIG in
10736 [\\/]* | ?:[\\/]*)
10737 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10738 ;;
10739 *)
10740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10741for as_dir in $PATH
10742do
10743 IFS=$as_save_IFS
10744 test -z "$as_dir" && as_dir=.
10745 for ac_exec_ext in '' $ac_executable_extensions; do
10746 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10747 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10748 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10749 break 2
10750 fi
10751done
10752done
10753IFS=$as_save_IFS
10754
10755 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10756 ;;
10757esac
10758fi
10759PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10760if test -n "$PKG_CONFIG"; then
10761 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10762echo "${ECHO_T}$PKG_CONFIG" >&6; }
10763else
10764 { echo "$as_me:$LINENO: result: no" >&5
10765echo "${ECHO_T}no" >&6; }
10766fi
10767
10768
0cfc0546
GM
10769
10770 if test "$PKG_CONFIG" = "no" ; then
10771 :
10772 else
10773 PKG_CONFIG_MIN_VERSION=0.9.0
10774 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10775 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10776echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10777
10778 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10779 { echo "$as_me:$LINENO: result: yes" >&5
10780echo "${ECHO_T}yes" >&6; }
10781 succeeded=yes
10782
10783 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10784echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10785 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10786 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10787echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10788
10789 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10790echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10791 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10792 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10793echo "${ECHO_T}$RSVG_LIBS" >&6; }
10794 else
10795 { echo "$as_me:$LINENO: result: no" >&5
10796echo "${ECHO_T}no" >&6; }
10797 RSVG_CFLAGS=""
10798 RSVG_LIBS=""
10799 ## If we have a custom action on failure, don't print errors, but
10800 ## do set a variable so people can do so.
10801 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10802
10803 fi
10804
10805
10806
10807 else
10808 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10809 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10810 fi
10811 fi
10812
10813 if test $succeeded = yes; then
10814 :
10815 else
10816 :
10817 fi
10818
10819
10820
10821
10822 if test ".${RSVG_CFLAGS}" != "."; then
10823 HAVE_RSVG=yes
10824
10825cat >>confdefs.h <<\_ACEOF
10826#define HAVE_RSVG 1
10827_ACEOF
10828
10829 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10830 LIBS="$RSVG_LIBS $LIBS"
10831 fi
10832 fi
10833fi
10834
10835
488dd4c4 10836HAVE_GTK=no
9d2818d6 10837if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10838 GLIB_REQUIRED=2.6
10839 GTK_REQUIRED=2.6
488dd4c4
JD
10840 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10841
488dd4c4
JD
10842
10843 succeeded=no
10844
00b9c927 10845 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10846set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10847{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10849if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10850 echo $ECHO_N "(cached) $ECHO_C" >&6
10851else
10852 case $PKG_CONFIG in
10853 [\\/]* | ?:[\\/]*)
10854 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10855 ;;
10856 *)
10857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10858for as_dir in $PATH
10859do
10860 IFS=$as_save_IFS
10861 test -z "$as_dir" && as_dir=.
10862 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10863 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10864 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10865 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10866 break 2
10867 fi
10868done
10869done
ca81d7a0 10870IFS=$as_save_IFS
488dd4c4
JD
10871
10872 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10873 ;;
10874esac
10875fi
10876PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10877if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10878 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10879echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10880else
ca81d7a0
JD
10881 { echo "$as_me:$LINENO: result: no" >&5
10882echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10883fi
10884
ca81d7a0 10885
488dd4c4
JD
10886
10887 if test "$PKG_CONFIG" = "no" ; then
089a966d 10888 pkg_check_gtk=no
488dd4c4
JD
10889 else
10890 PKG_CONFIG_MIN_VERSION=0.9.0
10891 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
10892 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10893echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10894
67db6aa2 10895 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
10896 { echo "$as_me:$LINENO: result: yes" >&5
10897echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10898 succeeded=yes
10899
ca81d7a0
JD
10900 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10901echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 10902 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10903 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10904echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10905
ca81d7a0
JD
10906 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10907echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 10908 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10909 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10910echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 10911 else
ca81d7a0
JD
10912 { echo "$as_me:$LINENO: result: no" >&5
10913echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10914 GTK_CFLAGS=""
10915 GTK_LIBS=""
10916 ## If we have a custom action on failure, don't print errors, but
10917 ## do set a variable so people can do so.
10918 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 10919
488dd4c4
JD
10920 fi
10921
10922
10923
10924 else
10925 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10926 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10927 fi
10928 fi
10929
10930 if test $succeeded = yes; then
089a966d 10931 pkg_check_gtk=yes
488dd4c4 10932 else
089a966d
GM
10933 pkg_check_gtk=no
10934 fi
10935
10936 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10937 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
10938echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
10939 { (exit 1); exit 1; }; }
10940 fi
089a966d
GM
10941fi
10942
10943
10944if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
10945
10946
10947
10948 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10949 CFLAGS="$CFLAGS $GTK_CFLAGS"
10950 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 10951 GTK_COMPILES=no
57669b57 10952
8eeae1c9 10953for ac_func in gtk_main
57669b57
JD
10954do
10955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10956{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10958if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
10959 echo $ECHO_N "(cached) $ECHO_C" >&6
10960else
10961 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
edfaf76d
LK
10967/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10968 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10969#define $ac_func innocuous_$ac_func
10970
57669b57
JD
10971/* System header to define __stub macros and hopefully few prototypes,
10972 which can conflict with char $ac_func (); below.
10973 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10974 <limits.h> exists even on freestanding compilers. */
edfaf76d 10975
57669b57
JD
10976#ifdef __STDC__
10977# include <limits.h>
10978#else
10979# include <assert.h>
10980#endif
edfaf76d
LK
10981
10982#undef $ac_func
10983
ca81d7a0
JD
10984/* Override any GCC internal prototype to avoid an error.
10985 Use char because int might match the return type of a GCC
10986 builtin and then its argument prototype would still apply. */
57669b57
JD
10987#ifdef __cplusplus
10988extern "C"
57669b57 10989#endif
57669b57
JD
10990char $ac_func ();
10991/* The GNU C library defines this for functions which it implements
10992 to always fail with ENOSYS. Some functions are actually named
10993 something starting with __ and the normal name is an alias. */
ca81d7a0 10994#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 10995choke me
57669b57
JD
10996#endif
10997
10998int
10999main ()
11000{
ca81d7a0 11001return $ac_func ();
57669b57
JD
11002 ;
11003 return 0;
11004}
11005_ACEOF
11006rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11007if { (ac_try="$ac_link"
11008case "(($ac_try" in
11009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11010 *) ac_try_echo=$ac_try;;
11011esac
11012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11013 (eval "$ac_link") 2>conftest.er1
57669b57 11014 ac_status=$?
edfaf76d
LK
11015 grep -v '^ *+' conftest.er1 >conftest.err
11016 rm -f conftest.er1
11017 cat conftest.err >&5
57669b57 11018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11019 (exit $ac_status); } && {
11020 test -z "$ac_c_werror_flag" ||
11021 test ! -s conftest.err
11022 } && test -s conftest$ac_exeext &&
11023 $as_test_x conftest$ac_exeext; then
57669b57
JD
11024 eval "$as_ac_var=yes"
11025else
11026 echo "$as_me: failed program was:" >&5
11027sed 's/^/| /' conftest.$ac_ext >&5
11028
ca81d7a0 11029 eval "$as_ac_var=no"
57669b57 11030fi
ca81d7a0 11031
f053c89f 11032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11033 conftest$ac_exeext conftest.$ac_ext
57669b57 11034fi
ca81d7a0
JD
11035ac_res=`eval echo '${'$as_ac_var'}'`
11036 { echo "$as_me:$LINENO: result: $ac_res" >&5
11037echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11038if test `eval echo '${'$as_ac_var'}'` = yes; then
11039 cat >>confdefs.h <<_ACEOF
11040#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11041_ACEOF
8eeae1c9 11042 GTK_COMPILES=yes
57669b57
JD
11043fi
11044done
11045
8eeae1c9 11046 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11047 if test "$USE_X_TOOLKIT" != "maybe"; then
11048 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11049echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11050 { (exit 1); exit 1; }; };
089a966d
GM
11051 fi
11052 else
11053 HAVE_GTK=yes
488dd4c4
JD
11054
11055cat >>confdefs.h <<\_ACEOF
a51f4969 11056#define USE_GTK 1
488dd4c4
JD
11057_ACEOF
11058
089a966d 11059 USE_X_TOOLKIT=none
f60c93db
JD
11060 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11061 :
11062 else
11063 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11064 closing open displays. This is no problem if you just use
11065 one display, but if you use more than one and close one of them
11066 Emacs may crash." >&5
11067echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11068 closing open displays. This is no problem if you just use
11069 one display, but if you use more than one and close one of them
11070 Emacs may crash." >&2;}
11071 sleep 3
11072 fi
089a966d
GM
11073 fi
11074
11075fi
11076
11077
11078if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11079
d0a80c21
JD
11080 if test "$with_toolkit_scroll_bars" != no; then
11081 with_toolkit_scroll_bars=yes
11082 fi
57669b57
JD
11083
11084 HAVE_GTK_MULTIDISPLAY=no
11085
11086for ac_func in gdk_display_open
11087do
11088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11089{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11091if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11092 echo $ECHO_N "(cached) $ECHO_C" >&6
11093else
11094 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11095/* confdefs.h. */
11096_ACEOF
11097cat confdefs.h >>conftest.$ac_ext
11098cat >>conftest.$ac_ext <<_ACEOF
11099/* end confdefs.h. */
edfaf76d
LK
11100/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11102#define $ac_func innocuous_$ac_func
11103
57669b57
JD
11104/* System header to define __stub macros and hopefully few prototypes,
11105 which can conflict with char $ac_func (); below.
11106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11107 <limits.h> exists even on freestanding compilers. */
edfaf76d 11108
57669b57
JD
11109#ifdef __STDC__
11110# include <limits.h>
11111#else
11112# include <assert.h>
11113#endif
edfaf76d
LK
11114
11115#undef $ac_func
11116
ca81d7a0
JD
11117/* Override any GCC internal prototype to avoid an error.
11118 Use char because int might match the return type of a GCC
11119 builtin and then its argument prototype would still apply. */
57669b57
JD
11120#ifdef __cplusplus
11121extern "C"
57669b57 11122#endif
57669b57
JD
11123char $ac_func ();
11124/* The GNU C library defines this for functions which it implements
11125 to always fail with ENOSYS. Some functions are actually named
11126 something starting with __ and the normal name is an alias. */
ca81d7a0 11127#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11128choke me
57669b57
JD
11129#endif
11130
11131int
11132main ()
11133{
ca81d7a0 11134return $ac_func ();
57669b57
JD
11135 ;
11136 return 0;
11137}
11138_ACEOF
11139rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11140if { (ac_try="$ac_link"
11141case "(($ac_try" in
11142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11143 *) ac_try_echo=$ac_try;;
11144esac
11145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11146 (eval "$ac_link") 2>conftest.er1
57669b57 11147 ac_status=$?
edfaf76d
LK
11148 grep -v '^ *+' conftest.er1 >conftest.err
11149 rm -f conftest.er1
11150 cat conftest.err >&5
57669b57 11151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11152 (exit $ac_status); } && {
11153 test -z "$ac_c_werror_flag" ||
11154 test ! -s conftest.err
11155 } && test -s conftest$ac_exeext &&
11156 $as_test_x conftest$ac_exeext; then
57669b57
JD
11157 eval "$as_ac_var=yes"
11158else
11159 echo "$as_me: failed program was:" >&5
11160sed 's/^/| /' conftest.$ac_ext >&5
11161
ca81d7a0 11162 eval "$as_ac_var=no"
57669b57 11163fi
ca81d7a0 11164
f053c89f 11165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11166 conftest$ac_exeext conftest.$ac_ext
57669b57 11167fi
ca81d7a0
JD
11168ac_res=`eval echo '${'$as_ac_var'}'`
11169 { echo "$as_me:$LINENO: result: $ac_res" >&5
11170echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11171if test `eval echo '${'$as_ac_var'}'` = yes; then
11172 cat >>confdefs.h <<_ACEOF
11173#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11174_ACEOF
11175 HAVE_GTK_MULTIDISPLAY=yes
11176fi
11177done
11178
11179 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11180
11181cat >>confdefs.h <<\_ACEOF
11182#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11183_ACEOF
11184
11185 fi
57669b57 11186
572a3cc2
JD
11187 HAVE_GTK_FILE_SELECTION=no
11188
11189for ac_func in gtk_file_selection_new
11190do
11191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11192{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11194if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11195 echo $ECHO_N "(cached) $ECHO_C" >&6
11196else
11197 cat >conftest.$ac_ext <<_ACEOF
11198/* confdefs.h. */
11199_ACEOF
11200cat confdefs.h >>conftest.$ac_ext
11201cat >>conftest.$ac_ext <<_ACEOF
11202/* end confdefs.h. */
edfaf76d
LK
11203/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11204 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11205#define $ac_func innocuous_$ac_func
11206
572a3cc2
JD
11207/* System header to define __stub macros and hopefully few prototypes,
11208 which can conflict with char $ac_func (); below.
11209 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11210 <limits.h> exists even on freestanding compilers. */
edfaf76d 11211
572a3cc2
JD
11212#ifdef __STDC__
11213# include <limits.h>
11214#else
11215# include <assert.h>
11216#endif
edfaf76d
LK
11217
11218#undef $ac_func
11219
ca81d7a0
JD
11220/* Override any GCC internal prototype to avoid an error.
11221 Use char because int might match the return type of a GCC
11222 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11223#ifdef __cplusplus
11224extern "C"
572a3cc2 11225#endif
572a3cc2
JD
11226char $ac_func ();
11227/* The GNU C library defines this for functions which it implements
11228 to always fail with ENOSYS. Some functions are actually named
11229 something starting with __ and the normal name is an alias. */
ca81d7a0 11230#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11231choke me
572a3cc2
JD
11232#endif
11233
11234int
11235main ()
11236{
ca81d7a0 11237return $ac_func ();
572a3cc2
JD
11238 ;
11239 return 0;
11240}
11241_ACEOF
11242rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11243if { (ac_try="$ac_link"
11244case "(($ac_try" in
11245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11246 *) ac_try_echo=$ac_try;;
11247esac
11248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11249 (eval "$ac_link") 2>conftest.er1
572a3cc2 11250 ac_status=$?
edfaf76d
LK
11251 grep -v '^ *+' conftest.er1 >conftest.err
11252 rm -f conftest.er1
11253 cat conftest.err >&5
572a3cc2 11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11255 (exit $ac_status); } && {
11256 test -z "$ac_c_werror_flag" ||
11257 test ! -s conftest.err
11258 } && test -s conftest$ac_exeext &&
11259 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11260 eval "$as_ac_var=yes"
11261else
11262 echo "$as_me: failed program was:" >&5
11263sed 's/^/| /' conftest.$ac_ext >&5
11264
ca81d7a0 11265 eval "$as_ac_var=no"
572a3cc2 11266fi
ca81d7a0 11267
f053c89f 11268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11269 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11270fi
ca81d7a0
JD
11271ac_res=`eval echo '${'$as_ac_var'}'`
11272 { echo "$as_me:$LINENO: result: $ac_res" >&5
11273echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11274if test `eval echo '${'$as_ac_var'}'` = yes; then
11275 cat >>confdefs.h <<_ACEOF
11276#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11277_ACEOF
11278 HAVE_GTK_FILE_SELECTION=yes
11279fi
11280done
11281
11282
11283 HAVE_GTK_FILE_CHOOSER=no
11284
11285for ac_func in gtk_file_chooser_dialog_new
11286do
11287as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11288{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11289echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11290if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11291 echo $ECHO_N "(cached) $ECHO_C" >&6
11292else
11293 cat >conftest.$ac_ext <<_ACEOF
11294/* confdefs.h. */
11295_ACEOF
11296cat confdefs.h >>conftest.$ac_ext
11297cat >>conftest.$ac_ext <<_ACEOF
11298/* end confdefs.h. */
edfaf76d
LK
11299/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11301#define $ac_func innocuous_$ac_func
11302
572a3cc2
JD
11303/* System header to define __stub macros and hopefully few prototypes,
11304 which can conflict with char $ac_func (); below.
11305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11306 <limits.h> exists even on freestanding compilers. */
edfaf76d 11307
572a3cc2
JD
11308#ifdef __STDC__
11309# include <limits.h>
11310#else
11311# include <assert.h>
11312#endif
edfaf76d
LK
11313
11314#undef $ac_func
11315
ca81d7a0
JD
11316/* Override any GCC internal prototype to avoid an error.
11317 Use char because int might match the return type of a GCC
11318 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11319#ifdef __cplusplus
11320extern "C"
572a3cc2 11321#endif
572a3cc2
JD
11322char $ac_func ();
11323/* The GNU C library defines this for functions which it implements
11324 to always fail with ENOSYS. Some functions are actually named
11325 something starting with __ and the normal name is an alias. */
ca81d7a0 11326#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11327choke me
572a3cc2
JD
11328#endif
11329
11330int
11331main ()
11332{
ca81d7a0 11333return $ac_func ();
572a3cc2
JD
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11339if { (ac_try="$ac_link"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
11344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11345 (eval "$ac_link") 2>conftest.er1
572a3cc2 11346 ac_status=$?
edfaf76d
LK
11347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
572a3cc2 11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest$ac_exeext &&
11355 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11356 eval "$as_ac_var=yes"
11357else
11358 echo "$as_me: failed program was:" >&5
11359sed 's/^/| /' conftest.$ac_ext >&5
11360
ca81d7a0 11361 eval "$as_ac_var=no"
572a3cc2 11362fi
ca81d7a0 11363
f053c89f 11364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11365 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11366fi
ca81d7a0
JD
11367ac_res=`eval echo '${'$as_ac_var'}'`
11368 { echo "$as_me:$LINENO: result: $ac_res" >&5
11369echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11370if test `eval echo '${'$as_ac_var'}'` = yes; then
11371 cat >>confdefs.h <<_ACEOF
11372#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11373_ACEOF
11374 HAVE_GTK_FILE_CHOOSER=yes
11375fi
11376done
11377
11378
11379 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11380 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11381
11382cat >>confdefs.h <<\_ACEOF
11383#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11384_ACEOF
11385
b8bdffbe
JD
11386 fi
11387
11388 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11389 HAVE_GTK_AND_PTHREAD=no
11390
11391for ac_header in pthread.h
11392do
11393as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11394if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11395 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11396echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11397if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11398 echo $ECHO_N "(cached) $ECHO_C" >&6
11399fi
ca81d7a0
JD
11400ac_res=`eval echo '${'$as_ac_Header'}'`
11401 { echo "$as_me:$LINENO: result: $ac_res" >&5
11402echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11403else
11404 # Is the header compilable?
ca81d7a0
JD
11405{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11406echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11407cat >conftest.$ac_ext <<_ACEOF
11408/* confdefs.h. */
11409_ACEOF
11410cat confdefs.h >>conftest.$ac_ext
11411cat >>conftest.$ac_ext <<_ACEOF
11412/* end confdefs.h. */
11413$ac_includes_default
11414#include <$ac_header>
11415_ACEOF
11416rm -f conftest.$ac_objext
ca81d7a0
JD
11417if { (ac_try="$ac_compile"
11418case "(($ac_try" in
11419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11420 *) ac_try_echo=$ac_try;;
11421esac
11422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11423 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11424 ac_status=$?
edfaf76d
LK
11425 grep -v '^ *+' conftest.er1 >conftest.err
11426 rm -f conftest.er1
11427 cat conftest.err >&5
b8bdffbe 11428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11429 (exit $ac_status); } && {
11430 test -z "$ac_c_werror_flag" ||
11431 test ! -s conftest.err
11432 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11433 ac_header_compiler=yes
11434else
11435 echo "$as_me: failed program was:" >&5
11436sed 's/^/| /' conftest.$ac_ext >&5
11437
ca81d7a0 11438 ac_header_compiler=no
b8bdffbe 11439fi
ca81d7a0
JD
11440
11441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11442{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11443echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11444
11445# Is the header present?
ca81d7a0
JD
11446{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11447echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11448cat >conftest.$ac_ext <<_ACEOF
11449/* confdefs.h. */
11450_ACEOF
11451cat confdefs.h >>conftest.$ac_ext
11452cat >>conftest.$ac_ext <<_ACEOF
11453/* end confdefs.h. */
11454#include <$ac_header>
11455_ACEOF
ca81d7a0
JD
11456if { (ac_try="$ac_cpp conftest.$ac_ext"
11457case "(($ac_try" in
11458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11459 *) ac_try_echo=$ac_try;;
11460esac
11461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11462 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11463 ac_status=$?
11464 grep -v '^ *+' conftest.er1 >conftest.err
11465 rm -f conftest.er1
11466 cat conftest.err >&5
11467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11468 (exit $ac_status); } >/dev/null && {
11469 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11470 test ! -s conftest.err
11471 }; then
b8bdffbe
JD
11472 ac_header_preproc=yes
11473else
11474 echo "$as_me: failed program was:" >&5
11475sed 's/^/| /' conftest.$ac_ext >&5
11476
11477 ac_header_preproc=no
11478fi
ca81d7a0 11479
b8bdffbe 11480rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11481{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11482echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11483
11484# So? What about this header?
edfaf76d
LK
11485case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11486 yes:no: )
b8bdffbe
JD
11487 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11488echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11489 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11490echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11491 ac_header_preproc=yes
b8bdffbe 11492 ;;
edfaf76d 11493 no:yes:* )
b8bdffbe
JD
11494 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11495echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11496 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11497echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11498 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11499echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11500 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11501echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11502 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11503echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11504 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11505echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11506
b8bdffbe
JD
11507 ;;
11508esac
ca81d7a0
JD
11509{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11510echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11511if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11512 echo $ECHO_N "(cached) $ECHO_C" >&6
11513else
edfaf76d 11514 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11515fi
ca81d7a0
JD
11516ac_res=`eval echo '${'$as_ac_Header'}'`
11517 { echo "$as_me:$LINENO: result: $ac_res" >&5
11518echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11519
11520fi
11521if test `eval echo '${'$as_ac_Header'}'` = yes; then
11522 cat >>confdefs.h <<_ACEOF
11523#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11524_ACEOF
11525
11526fi
11527
11528done
11529
11530 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11531 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11532echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11533if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11534 echo $ECHO_N "(cached) $ECHO_C" >&6
11535else
11536 ac_check_lib_save_LIBS=$LIBS
11537LIBS="-lpthread $LIBS"
11538cat >conftest.$ac_ext <<_ACEOF
11539/* confdefs.h. */
11540_ACEOF
11541cat confdefs.h >>conftest.$ac_ext
11542cat >>conftest.$ac_ext <<_ACEOF
11543/* end confdefs.h. */
11544
ca81d7a0
JD
11545/* Override any GCC internal prototype to avoid an error.
11546 Use char because int might match the return type of a GCC
11547 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11548#ifdef __cplusplus
11549extern "C"
11550#endif
b8bdffbe
JD
11551char pthread_self ();
11552int
11553main ()
11554{
ca81d7a0 11555return pthread_self ();
b8bdffbe
JD
11556 ;
11557 return 0;
11558}
11559_ACEOF
11560rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11561if { (ac_try="$ac_link"
11562case "(($ac_try" in
11563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11564 *) ac_try_echo=$ac_try;;
11565esac
11566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11567 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11568 ac_status=$?
edfaf76d
LK
11569 grep -v '^ *+' conftest.er1 >conftest.err
11570 rm -f conftest.er1
11571 cat conftest.err >&5
b8bdffbe 11572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11573 (exit $ac_status); } && {
11574 test -z "$ac_c_werror_flag" ||
11575 test ! -s conftest.err
11576 } && test -s conftest$ac_exeext &&
11577 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11578 ac_cv_lib_pthread_pthread_self=yes
11579else
11580 echo "$as_me: failed program was:" >&5
11581sed 's/^/| /' conftest.$ac_ext >&5
11582
ca81d7a0 11583 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11584fi
ca81d7a0 11585
f053c89f 11586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11587 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11588LIBS=$ac_check_lib_save_LIBS
11589fi
ca81d7a0
JD
11590{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11591echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11592if test $ac_cv_lib_pthread_pthread_self = yes; then
11593 HAVE_GTK_AND_PTHREAD=yes
11594fi
11595
11596 fi
11597 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11598 case "${canonical}" in
11599 *-hpux*) ;;
11600 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11601 esac
b8bdffbe
JD
11602
11603cat >>confdefs.h <<\_ACEOF
11604#define HAVE_GTK_AND_PTHREAD 1
11605_ACEOF
11606
11607 fi
57669b57 11608 fi
488dd4c4
JD
11609fi
11610
131e4133
MA
11611HAVE_DBUS=no
11612if test "${with_dbus}" = "yes"; then
cffe4909
MH
11613
11614 succeeded=no
11615
00b9c927 11616 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11617set dummy pkg-config; ac_word=$2
11618{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11619echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11620if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11621 echo $ECHO_N "(cached) $ECHO_C" >&6
11622else
cffe4909
MH
11623 case $PKG_CONFIG in
11624 [\\/]* | ?:[\\/]*)
11625 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11626 ;;
11627 *)
11628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11629for as_dir in $PATH
11630do
11631 IFS=$as_save_IFS
11632 test -z "$as_dir" && as_dir=.
11633 for ac_exec_ext in '' $ac_executable_extensions; do
11634 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11635 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11637 break 2
11638 fi
11639done
11640done
11641IFS=$as_save_IFS
131e4133 11642
cffe4909
MH
11643 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11644 ;;
131e4133 11645esac
cffe4909
MH
11646fi
11647PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11648if test -n "$PKG_CONFIG"; then
11649 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11650echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11651else
cffe4909
MH
11652 { echo "$as_me:$LINENO: result: no" >&5
11653echo "${ECHO_T}no" >&6; }
131e4133
MA
11654fi
11655
cffe4909 11656
cffe4909
MH
11657
11658 if test "$PKG_CONFIG" = "no" ; then
11659 HAVE_DBUS=no
11660 else
11661 PKG_CONFIG_MIN_VERSION=0.9.0
11662 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11663 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11664echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11665
11666 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11667 { echo "$as_me:$LINENO: result: yes" >&5
11668echo "${ECHO_T}yes" >&6; }
11669 succeeded=yes
11670
11671 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11672echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11673 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11674 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11675echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11676
11677 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11678echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11679 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11680 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11681echo "${ECHO_T}$DBUS_LIBS" >&6; }
11682 else
11683 { echo "$as_me:$LINENO: result: no" >&5
11684echo "${ECHO_T}no" >&6; }
11685 DBUS_CFLAGS=""
11686 DBUS_LIBS=""
11687 ## If we have a custom action on failure, don't print errors, but
11688 ## do set a variable so people can do so.
11689 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11690
11691 fi
11692
11693
11694
11695 else
11696 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11697 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11698 fi
11699 fi
11700
11701 if test $succeeded = yes; then
11702 HAVE_DBUS=yes
11703 else
11704 HAVE_DBUS=no
11705 fi
131e4133
MA
11706
11707 if test "$HAVE_DBUS" = yes; then
11708
11709cat >>confdefs.h <<\_ACEOF
11710#define HAVE_DBUS 1
11711_ACEOF
11712
131e4133
MA
11713 fi
11714fi
11715
b3615392 11716HAVE_XAW3D=no
991a7602 11717if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11718 if test "$with_xaw3d" != no; then
11719 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11720echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11721 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11722 echo $ECHO_N "(cached) $ECHO_C" >&6
11723else
11724 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
98418dba
CW
11730
11731#include <X11/Intrinsic.h>
b3615392 11732#include <X11/Xaw3d/Simple.h>
98418dba
CW
11733int
11734main ()
11735{
11736
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11742if { (ac_try="$ac_link"
11743case "(($ac_try" in
11744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11745 *) ac_try_echo=$ac_try;;
11746esac
11747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11748 (eval "$ac_link") 2>conftest.er1
98418dba 11749 ac_status=$?
edfaf76d
LK
11750 grep -v '^ *+' conftest.er1 >conftest.err
11751 rm -f conftest.er1
11752 cat conftest.err >&5
c0d27fcc 11753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11754 (exit $ac_status); } && {
11755 test -z "$ac_c_werror_flag" ||
11756 test ! -s conftest.err
11757 } && test -s conftest$ac_exeext &&
11758 $as_test_x conftest$ac_exeext; then
b3615392 11759 emacs_cv_xaw3d=yes
98418dba
CW
11760else
11761 echo "$as_me: failed program was:" >&5
19650fd6
AS
11762sed 's/^/| /' conftest.$ac_ext >&5
11763
b3615392 11764 emacs_cv_xaw3d=no
98418dba 11765fi
ca81d7a0 11766
f053c89f 11767rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11768 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11769fi
11770
9d89ffd0 11771 else
f23d76bd 11772 emacs_cv_xaw3d=no
9d89ffd0 11773 fi
f23d76bd
MB
11774 if test $emacs_cv_xaw3d = yes; then
11775 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11776echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11777 USE_X_TOOLKIT=LUCID
11778 HAVE_XAW3D=yes
9d89ffd0 11779
b3615392
MB
11780cat >>confdefs.h <<\_ACEOF
11781#define HAVE_XAW3D 1
11782_ACEOF
9d89ffd0 11783
f23d76bd
MB
11784 else
11785 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11786echo "${ECHO_T}no" >&6; }
f23d76bd 11787 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11788echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11789 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11790 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11791else
b3615392 11792 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11793/* confdefs.h. */
11794_ACEOF
11795cat confdefs.h >>conftest.$ac_ext
11796cat >>conftest.$ac_ext <<_ACEOF
11797/* end confdefs.h. */
b3615392
MB
11798
11799#include <X11/Intrinsic.h>
11800#include <X11/Xaw/Simple.h>
11801int
11802main ()
11803{
11804
11805 ;
11806 return 0;
11807}
9d89ffd0 11808_ACEOF
b3615392
MB
11809rm -f conftest.$ac_objext conftest$ac_exeext
11810if { (ac_try="$ac_link"
9d89ffd0
JD
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
11815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11816 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
b3615392
MB
11825 } && test -s conftest$ac_exeext &&
11826 $as_test_x conftest$ac_exeext; then
11827 emacs_cv_xaw=yes
9d89ffd0
JD
11828else
11829 echo "$as_me: failed program was:" >&5
11830sed 's/^/| /' conftest.$ac_ext >&5
11831
b3615392 11832 emacs_cv_xaw=no
9d89ffd0
JD
11833fi
11834
b3615392
MB
11835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11836 conftest$ac_exeext conftest.$ac_ext
11837fi
9d89ffd0 11838
f23d76bd
MB
11839 if test $emacs_cv_xaw = yes; then
11840 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11841echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11842 USE_X_TOOLKIT=LUCID
11843 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11844 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
11845echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
11846 { (exit 1); exit 1; }; }
f23d76bd
MB
11847 else
11848 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 11849echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11850 USE_X_TOOLKIT=none
98418dba 11851 fi
98418dba
CW
11852 fi
11853fi
11854
11855X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11856
11857if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11858 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11859echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11860 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11861 echo $ECHO_N "(cached) $ECHO_C" >&6
11862else
11863 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11864/* confdefs.h. */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h. */
98418dba 11869#include <X11/Intrinsic.h>
98418dba
CW
11870int
11871main ()
11872{
11873#if XtSpecificationRelease < 6
11874fail;
11875#endif
11876
11877 ;
11878 return 0;
11879}
11880_ACEOF
11881rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11882if { (ac_try="$ac_link"
11883case "(($ac_try" in
11884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11885 *) ac_try_echo=$ac_try;;
11886esac
11887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11888 (eval "$ac_link") 2>conftest.er1
98418dba 11889 ac_status=$?
edfaf76d
LK
11890 grep -v '^ *+' conftest.er1 >conftest.err
11891 rm -f conftest.er1
11892 cat conftest.err >&5
c0d27fcc 11893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11894 (exit $ac_status); } && {
11895 test -z "$ac_c_werror_flag" ||
11896 test ! -s conftest.err
11897 } && test -s conftest$ac_exeext &&
11898 $as_test_x conftest$ac_exeext; then
98418dba
CW
11899 emacs_cv_x11_toolkit_version_6=yes
11900else
11901 echo "$as_me: failed program was:" >&5
19650fd6
AS
11902sed 's/^/| /' conftest.$ac_ext >&5
11903
ca81d7a0 11904 emacs_cv_x11_toolkit_version_6=no
98418dba 11905fi
ca81d7a0 11906
f053c89f 11907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11908 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11909fi
11910
11911 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11912 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
11913 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11914echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11915
c0d27fcc 11916cat >>confdefs.h <<\_ACEOF
98418dba 11917#define HAVE_X11XTR6 1
c0d27fcc 11918_ACEOF
98418dba
CW
11919
11920 else
ca81d7a0
JD
11921 { echo "$as_me:$LINENO: result: before 6" >&5
11922echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11923 fi
11924
11925 OLDLIBS="$LIBS"
11926 if test x$HAVE_X11XTR6 = xyes; then
11927 LIBS="-lXt -lSM -lICE $LIBS"
11928 else
11929 LIBS="-lXt $LIBS"
11930 fi
11931
ca81d7a0
JD
11932{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
11933echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
11934if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11935 echo $ECHO_N "(cached) $ECHO_C" >&6
11936else
11937 ac_check_lib_save_LIBS=$LIBS
11938LIBS="-lXmu $LIBS"
11939cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11940/* confdefs.h. */
11941_ACEOF
11942cat confdefs.h >>conftest.$ac_ext
11943cat >>conftest.$ac_ext <<_ACEOF
11944/* end confdefs.h. */
98418dba 11945
ca81d7a0
JD
11946/* Override any GCC internal prototype to avoid an error.
11947 Use char because int might match the return type of a GCC
11948 builtin and then its argument prototype would still apply. */
98418dba
CW
11949#ifdef __cplusplus
11950extern "C"
11951#endif
98418dba 11952char XmuConvertStandardSelection ();
98418dba
CW
11953int
11954main ()
11955{
ca81d7a0 11956return XmuConvertStandardSelection ();
98418dba
CW
11957 ;
11958 return 0;
11959}
11960_ACEOF
11961rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11962if { (ac_try="$ac_link"
11963case "(($ac_try" in
11964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11965 *) ac_try_echo=$ac_try;;
11966esac
11967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11968 (eval "$ac_link") 2>conftest.er1
98418dba 11969 ac_status=$?
edfaf76d
LK
11970 grep -v '^ *+' conftest.er1 >conftest.err
11971 rm -f conftest.er1
11972 cat conftest.err >&5
c0d27fcc 11973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11974 (exit $ac_status); } && {
11975 test -z "$ac_c_werror_flag" ||
11976 test ! -s conftest.err
11977 } && test -s conftest$ac_exeext &&
11978 $as_test_x conftest$ac_exeext; then
98418dba
CW
11979 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11980else
11981 echo "$as_me: failed program was:" >&5
19650fd6
AS
11982sed 's/^/| /' conftest.$ac_ext >&5
11983
ca81d7a0 11984 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 11985fi
ca81d7a0 11986
f053c89f 11987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11988 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11989LIBS=$ac_check_lib_save_LIBS
11990fi
ca81d7a0
JD
11991{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11992echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 11993if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11994 cat >>confdefs.h <<_ACEOF
98418dba 11995#define HAVE_LIBXMU 1
c0d27fcc 11996_ACEOF
98418dba
CW
11997
11998 LIBS="-lXmu $LIBS"
11999
12000fi
12001
12002 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12003fi
12004
12005# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12006if test "${HAVE_X11}" = "yes"; then
12007 if test "${USE_X_TOOLKIT}" != "none"; then
12008
ca81d7a0
JD
12009{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12010echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12011if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12012 echo $ECHO_N "(cached) $ECHO_C" >&6
12013else
12014 ac_check_lib_save_LIBS=$LIBS
12015LIBS="-lXext $LIBS"
12016cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12017/* confdefs.h. */
12018_ACEOF
12019cat confdefs.h >>conftest.$ac_ext
12020cat >>conftest.$ac_ext <<_ACEOF
12021/* end confdefs.h. */
98418dba 12022
ca81d7a0
JD
12023/* Override any GCC internal prototype to avoid an error.
12024 Use char because int might match the return type of a GCC
12025 builtin and then its argument prototype would still apply. */
98418dba
CW
12026#ifdef __cplusplus
12027extern "C"
12028#endif
98418dba 12029char XShapeQueryExtension ();
98418dba
CW
12030int
12031main ()
12032{
ca81d7a0 12033return XShapeQueryExtension ();
98418dba
CW
12034 ;
12035 return 0;
12036}
12037_ACEOF
12038rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12039if { (ac_try="$ac_link"
12040case "(($ac_try" in
12041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12042 *) ac_try_echo=$ac_try;;
12043esac
12044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12045 (eval "$ac_link") 2>conftest.er1
98418dba 12046 ac_status=$?
edfaf76d
LK
12047 grep -v '^ *+' conftest.er1 >conftest.err
12048 rm -f conftest.er1
12049 cat conftest.err >&5
c0d27fcc 12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12051 (exit $ac_status); } && {
12052 test -z "$ac_c_werror_flag" ||
12053 test ! -s conftest.err
12054 } && test -s conftest$ac_exeext &&
12055 $as_test_x conftest$ac_exeext; then
98418dba
CW
12056 ac_cv_lib_Xext_XShapeQueryExtension=yes
12057else
12058 echo "$as_me: failed program was:" >&5
19650fd6
AS
12059sed 's/^/| /' conftest.$ac_ext >&5
12060
ca81d7a0 12061 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12062fi
ca81d7a0 12063
f053c89f 12064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12065 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12066LIBS=$ac_check_lib_save_LIBS
12067fi
ca81d7a0
JD
12068{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12069echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12070if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12071 cat >>confdefs.h <<_ACEOF
98418dba 12072#define HAVE_LIBXEXT 1
c0d27fcc 12073_ACEOF
98418dba
CW
12074
12075 LIBS="-lXext $LIBS"
12076
12077fi
12078
12079 fi
12080fi
12081
12082if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12083 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12084echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12085if test "${emacs_cv_motif_version_2_1+set}" = set; then
12086 echo $ECHO_N "(cached) $ECHO_C" >&6
12087else
12088 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12089/* confdefs.h. */
12090_ACEOF
12091cat confdefs.h >>conftest.$ac_ext
12092cat >>conftest.$ac_ext <<_ACEOF
12093/* end confdefs.h. */
98418dba 12094#include <Xm/Xm.h>
98418dba
CW
12095int
12096main ()
12097{
12098#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12099int x = 5;
12100#else
12101Motif version prior to 2.1.
12102#endif
12103 ;
12104 return 0;
12105}
12106_ACEOF
12107rm -f conftest.$ac_objext
ca81d7a0
JD
12108if { (ac_try="$ac_compile"
12109case "(($ac_try" in
12110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12111 *) ac_try_echo=$ac_try;;
12112esac
12113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12114 (eval "$ac_compile") 2>conftest.er1
98418dba 12115 ac_status=$?
edfaf76d
LK
12116 grep -v '^ *+' conftest.er1 >conftest.err
12117 rm -f conftest.er1
12118 cat conftest.err >&5
c0d27fcc 12119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12120 (exit $ac_status); } && {
12121 test -z "$ac_c_werror_flag" ||
12122 test ! -s conftest.err
12123 } && test -s conftest.$ac_objext; then
98418dba
CW
12124 emacs_cv_motif_version_2_1=yes
12125else
12126 echo "$as_me: failed program was:" >&5
19650fd6
AS
12127sed 's/^/| /' conftest.$ac_ext >&5
12128
ca81d7a0 12129 emacs_cv_motif_version_2_1=no
98418dba 12130fi
ca81d7a0
JD
12131
12132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12133fi
ca81d7a0
JD
12134{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12135echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12136 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12137 if test $emacs_cv_motif_version_2_1 = yes; then
12138 HAVE_LIBXP=no
b936fae4 12139
c0d27fcc 12140cat >>confdefs.h <<\_ACEOF
98418dba 12141#define HAVE_MOTIF_2_1 1
c0d27fcc 12142_ACEOF
98418dba 12143
ca81d7a0
JD
12144 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12145echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12146if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12147 echo $ECHO_N "(cached) $ECHO_C" >&6
12148else
12149 ac_check_lib_save_LIBS=$LIBS
12150LIBS="-lXp $LIBS"
12151cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12152/* confdefs.h. */
12153_ACEOF
12154cat confdefs.h >>conftest.$ac_ext
12155cat >>conftest.$ac_ext <<_ACEOF
12156/* end confdefs.h. */
98418dba 12157
ca81d7a0
JD
12158/* Override any GCC internal prototype to avoid an error.
12159 Use char because int might match the return type of a GCC
12160 builtin and then its argument prototype would still apply. */
98418dba
CW
12161#ifdef __cplusplus
12162extern "C"
12163#endif
98418dba 12164char XpCreateContext ();
98418dba
CW
12165int
12166main ()
12167{
ca81d7a0 12168return XpCreateContext ();
98418dba
CW
12169 ;
12170 return 0;
12171}
12172_ACEOF
12173rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12174if { (ac_try="$ac_link"
12175case "(($ac_try" in
12176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177 *) ac_try_echo=$ac_try;;
12178esac
12179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180 (eval "$ac_link") 2>conftest.er1
98418dba 12181 ac_status=$?
edfaf76d
LK
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
c0d27fcc 12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12186 (exit $ac_status); } && {
12187 test -z "$ac_c_werror_flag" ||
12188 test ! -s conftest.err
12189 } && test -s conftest$ac_exeext &&
12190 $as_test_x conftest$ac_exeext; then
98418dba
CW
12191 ac_cv_lib_Xp_XpCreateContext=yes
12192else
12193 echo "$as_me: failed program was:" >&5
19650fd6
AS
12194sed 's/^/| /' conftest.$ac_ext >&5
12195
ca81d7a0 12196 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12197fi
ca81d7a0 12198
f053c89f 12199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12200 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12201LIBS=$ac_check_lib_save_LIBS
12202fi
ca81d7a0
JD
12203{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12204echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12205if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12206 HAVE_LIBXP=yes
12207fi
503d2be0 12208
98418dba 12209 if test ${HAVE_LIBXP} = yes; then
b936fae4 12210
c0d27fcc 12211cat >>confdefs.h <<\_ACEOF
98418dba 12212#define HAVE_LIBXP 1
c0d27fcc 12213_ACEOF
503d2be0 12214
98418dba 12215 fi
4693dbc9 12216 else
ca81d7a0
JD
12217 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12218echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12219if test "${emacs_cv_lesstif+set}" = set; then
12220 echo $ECHO_N "(cached) $ECHO_C" >&6
12221else
12222 # We put this in CFLAGS temporarily to precede other -I options
12223 # that might be in CFLAGS temporarily.
12224 # We put this in CPPFLAGS where it precedes the other -I options.
12225 OLD_CPPFLAGS=$CPPFLAGS
12226 OLD_CFLAGS=$CFLAGS
12227 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12228 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12229 cat >conftest.$ac_ext <<_ACEOF
12230/* confdefs.h. */
12231_ACEOF
12232cat confdefs.h >>conftest.$ac_ext
12233cat >>conftest.$ac_ext <<_ACEOF
12234/* end confdefs.h. */
12235#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12236int
12237main ()
12238{
12239int x = 5;
12240 ;
12241 return 0;
12242}
12243_ACEOF
12244rm -f conftest.$ac_objext
ca81d7a0
JD
12245if { (ac_try="$ac_compile"
12246case "(($ac_try" in
12247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12248 *) ac_try_echo=$ac_try;;
12249esac
12250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12251 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12252 ac_status=$?
edfaf76d
LK
12253 grep -v '^ *+' conftest.er1 >conftest.err
12254 rm -f conftest.er1
12255 cat conftest.err >&5
4693dbc9 12256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12257 (exit $ac_status); } && {
12258 test -z "$ac_c_werror_flag" ||
12259 test ! -s conftest.err
12260 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12261 emacs_cv_lesstif=yes
12262else
12263 echo "$as_me: failed program was:" >&5
12264sed 's/^/| /' conftest.$ac_ext >&5
12265
ca81d7a0 12266 emacs_cv_lesstif=no
4693dbc9 12267fi
ca81d7a0
JD
12268
12269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12270fi
ca81d7a0
JD
12271{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12272echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12273 if test $emacs_cv_lesstif = yes; then
12274 # Make sure this -I option remains in CPPFLAGS after it is set
12275 # back to REAL_CPPFLAGS.
12276 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12277 # have those other -I options anyway. Ultimately, having this
12278 # directory ultimately in CPPFLAGS will be enough.
12279 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12280 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12281 else
12282 CFLAGS=$OLD_CFLAGS
12283 CPPFLAGS=$OLD_CPPFLAGS
12284 fi
98418dba
CW
12285 fi
12286fi
12287
c0d27fcc
MR
12288
12289
98418dba
CW
12290USE_TOOLKIT_SCROLL_BARS=no
12291if test "${with_toolkit_scroll_bars}" != "no"; then
12292 if test "${USE_X_TOOLKIT}" != "none"; then
12293 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12294 cat >>confdefs.h <<\_ACEOF
98418dba 12295#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12296_ACEOF
98418dba
CW
12297
12298 HAVE_XAW3D=no
12299 USE_TOOLKIT_SCROLL_BARS=yes
12300 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12301 cat >>confdefs.h <<\_ACEOF
98418dba 12302#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12303_ACEOF
98418dba
CW
12304
12305 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12306 fi
488dd4c4
JD
12307 elif test "${HAVE_GTK}" = "yes"; then
12308 cat >>confdefs.h <<\_ACEOF
12309#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12310_ACEOF
12311
12312 USE_TOOLKIT_SCROLL_BARS=yes
12313 elif test "${HAVE_CARBON}" = "yes"; then
12314 cat >>confdefs.h <<\_ACEOF
12315#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12316_ACEOF
12317
12318 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12319 fi
12320fi
12321
abd39b57 12322cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12323/* confdefs.h. */
12324_ACEOF
12325cat confdefs.h >>conftest.$ac_ext
12326cat >>conftest.$ac_ext <<_ACEOF
12327/* end confdefs.h. */
12328
12329 #include <X11/Xlib.h>
12330 #include <X11/Xresource.h>
12331int
12332main ()
12333{
12334XIMProc callback;
12335 ;
12336 return 0;
12337}
12338_ACEOF
12339rm -f conftest.$ac_objext
ca81d7a0
JD
12340if { (ac_try="$ac_compile"
12341case "(($ac_try" in
12342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12343 *) ac_try_echo=$ac_try;;
12344esac
12345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12346 (eval "$ac_compile") 2>conftest.er1
abd39b57 12347 ac_status=$?
edfaf76d
LK
12348 grep -v '^ *+' conftest.er1 >conftest.err
12349 rm -f conftest.er1
12350 cat conftest.err >&5
abd39b57 12351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12352 (exit $ac_status); } && {
12353 test -z "$ac_c_werror_flag" ||
12354 test ! -s conftest.err
12355 } && test -s conftest.$ac_objext; then
abd39b57
AC
12356 HAVE_XIM=yes
12357
12358cat >>confdefs.h <<\_ACEOF
12359#define HAVE_XIM 1
12360_ACEOF
12361
12362else
12363 echo "$as_me: failed program was:" >&5
12364sed 's/^/| /' conftest.$ac_ext >&5
12365
ca81d7a0 12366 HAVE_XIM=no
abd39b57 12367fi
ca81d7a0
JD
12368
12369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12370
c0d27fcc 12371
98418dba 12372if test "${with_xim}" != "no"; then
b936fae4 12373
c0d27fcc 12374cat >>confdefs.h <<\_ACEOF
98418dba 12375#define USE_XIM 1
c0d27fcc 12376_ACEOF
98418dba 12377
793fa0d7 12378fi
abd39b57
AC
12379
12380
12381if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12382 late_CFLAGS=$CFLAGS
12383 if test "$GCC" = yes; then
12384 CFLAGS="$CFLAGS --pedantic-errors"
12385 fi
cffcede7 12386 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12387/* confdefs.h. */
12388_ACEOF
12389cat confdefs.h >>conftest.$ac_ext
12390cat >>conftest.$ac_ext <<_ACEOF
12391/* end confdefs.h. */
cffcede7
JD
12392
12393#include <X11/Xlib.h>
12394#include <X11/Xresource.h>
12395int
12396main ()
12397{
12398Display *display;
12399XrmDatabase db;
12400char *res_name;
12401char *res_class;
12402XIMProc callback;
12403XPointer *client_data;
849d80cf
DL
12404#ifndef __GNUC__
12405/* If we're not using GCC, it's probably not XFree86, and this is
12406 probably right, but we can't use something like --pedantic-errors. */
12407extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12408 char*, XIMProc, XPointer*);
12409#endif
cffcede7
JD
12410(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12411 client_data);
12412 ;
12413 return 0;
12414}
12415_ACEOF
12416rm -f conftest.$ac_objext
ca81d7a0
JD
12417if { (ac_try="$ac_compile"
12418case "(($ac_try" in
12419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12420 *) ac_try_echo=$ac_try;;
12421esac
12422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12423 (eval "$ac_compile") 2>conftest.er1
cffcede7 12424 ac_status=$?
edfaf76d
LK
12425 grep -v '^ *+' conftest.er1 >conftest.err
12426 rm -f conftest.er1
12427 cat conftest.err >&5
cffcede7 12428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12429 (exit $ac_status); } && {
12430 test -z "$ac_c_werror_flag" ||
12431 test ! -s conftest.err
12432 } && test -s conftest.$ac_objext; then
cffcede7
JD
12433 emacs_cv_arg6_star=yes
12434else
12435 echo "$as_me: failed program was:" >&5
19650fd6
AS
12436sed 's/^/| /' conftest.$ac_ext >&5
12437
ca81d7a0 12438
cffcede7 12439fi
ca81d7a0
JD
12440
12441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12442
12443 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12444 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12445#define XRegisterIMInstantiateCallback_arg6 XPointer*
12446_ACEOF
12447
12448 else
f57bd967 12449 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12450#define XRegisterIMInstantiateCallback_arg6 XPointer
12451_ACEOF
12452
12453 fi
849d80cf 12454 CFLAGS=$late_CFLAGS
45a4b03e
KH
12455fi
12456
77dfeef5 12457### Start of font-backend section.
45a4b03e 12458
b8bdd8c9
KH
12459## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12460HAVE_XFT=maybe
12461if test "x${with_freetype}" = "xno"; then
12462 with_xft="no";
12463fi
12464if test "x${with_xft}" != "xno"; then
45a4b03e 12465
45a4b03e
KH
12466
12467 succeeded=no
12468
d235ca2f 12469 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12470set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12471{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12472echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12473if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12474 echo $ECHO_N "(cached) $ECHO_C" >&6
12475else
12476 case $PKG_CONFIG in
12477 [\\/]* | ?:[\\/]*)
12478 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12479 ;;
12480 *)
12481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12482for as_dir in $PATH
12483do
12484 IFS=$as_save_IFS
12485 test -z "$as_dir" && as_dir=.
12486 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12487 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12488 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12489 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12490 break 2
12491 fi
12492done
12493done
c24fa7dc 12494IFS=$as_save_IFS
45a4b03e
KH
12495
12496 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12497 ;;
12498esac
12499fi
12500PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12501if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12502 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12503echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12504else
c24fa7dc
MB
12505 { echo "$as_me:$LINENO: result: no" >&5
12506echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12507fi
12508
c24fa7dc 12509
45a4b03e
KH
12510
12511 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12512 HAVE_XFT=no
45a4b03e
KH
12513 else
12514 PKG_CONFIG_MIN_VERSION=0.9.0
12515 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12516 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12517echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12518
c24fa7dc
MB
12519 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12520 { echo "$as_me:$LINENO: result: yes" >&5
12521echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12522 succeeded=yes
12523
c24fa7dc
MB
12524 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12525echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12526 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12527 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12528echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12529
c24fa7dc
MB
12530 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12531echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12532 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12533 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12534echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12535 else
c24fa7dc
MB
12536 { echo "$as_me:$LINENO: result: no" >&5
12537echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12538 XFT_CFLAGS=""
12539 XFT_LIBS=""
12540 ## If we have a custom action on failure, don't print errors, but
12541 ## do set a variable so people can do so.
12542 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12543
12544 fi
12545
12546
12547
12548 else
12549 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12550 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12551 fi
12552 fi
12553
12554 if test $succeeded = yes; then
12555 :
12556 else
12557 HAVE_XFT=no
12558 fi
12559
b8bdd8c9
KH
12560 if test "$HAVE_XFT" != no; then
12561 OLD_CPPFLAGS="$CPPFLAGS"
12562 OLD_CFLAGS="$CFLAGS"
12563 OLD_LIBS="$LIBS"
12564 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12565 CFLAGS="$CFLAGS $XFT_CFLAGS"
12566 LIBS="$XFT_LIBS $LIBS"
12567 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12568 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12569echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12570if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12571 echo $ECHO_N "(cached) $ECHO_C" >&6
12572fi
c24fa7dc
MB
12573{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12574echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12575else
12576 # Is the header compilable?
c24fa7dc
MB
12577{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12578echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12579cat >conftest.$ac_ext <<_ACEOF
12580/* confdefs.h. */
12581_ACEOF
12582cat confdefs.h >>conftest.$ac_ext
12583cat >>conftest.$ac_ext <<_ACEOF
12584/* end confdefs.h. */
12585$ac_includes_default
12586#include <X11/Xft/Xft.h>
12587_ACEOF
12588rm -f conftest.$ac_objext
c24fa7dc
MB
12589if { (ac_try="$ac_compile"
12590case "(($ac_try" in
12591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12592 *) ac_try_echo=$ac_try;;
12593esac
12594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12595 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12596 ac_status=$?
12597 grep -v '^ *+' conftest.er1 >conftest.err
12598 rm -f conftest.er1
12599 cat conftest.err >&5
12600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12601 (exit $ac_status); } && {
12602 test -z "$ac_c_werror_flag" ||
12603 test ! -s conftest.err
12604 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12605 ac_header_compiler=yes
12606else
12607 echo "$as_me: failed program was:" >&5
12608sed 's/^/| /' conftest.$ac_ext >&5
12609
c24fa7dc 12610 ac_header_compiler=no
45a4b03e 12611fi
c24fa7dc
MB
12612
12613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12614{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12615echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12616
12617# Is the header present?
c24fa7dc
MB
12618{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12619echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12620cat >conftest.$ac_ext <<_ACEOF
12621/* confdefs.h. */
12622_ACEOF
12623cat confdefs.h >>conftest.$ac_ext
12624cat >>conftest.$ac_ext <<_ACEOF
12625/* end confdefs.h. */
12626#include <X11/Xft/Xft.h>
12627_ACEOF
c24fa7dc
MB
12628if { (ac_try="$ac_cpp conftest.$ac_ext"
12629case "(($ac_try" in
12630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12631 *) ac_try_echo=$ac_try;;
12632esac
12633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12635 ac_status=$?
12636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12640 (exit $ac_status); } >/dev/null && {
12641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12642 test ! -s conftest.err
12643 }; then
45a4b03e
KH
12644 ac_header_preproc=yes
12645else
12646 echo "$as_me: failed program was:" >&5
12647sed 's/^/| /' conftest.$ac_ext >&5
12648
12649 ac_header_preproc=no
12650fi
c24fa7dc 12651
45a4b03e 12652rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12653{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12654echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12655
12656# So? What about this header?
12657case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12658 yes:no: )
12659 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12660echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12661 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12662echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12663 ac_header_preproc=yes
12664 ;;
12665 no:yes:* )
12666 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12667echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12668 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12669echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12670 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12671echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12672 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12673echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12674 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12675echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12676 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12677echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12678
45a4b03e
KH
12679 ;;
12680esac
c24fa7dc
MB
12681{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12682echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12683if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12684 echo $ECHO_N "(cached) $ECHO_C" >&6
12685else
12686 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12687fi
c24fa7dc
MB
12688{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12689echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12690
12691fi
12692if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12693 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12694echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12695if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12696 echo $ECHO_N "(cached) $ECHO_C" >&6
12697else
12698 ac_check_lib_save_LIBS=$LIBS
12699LIBS="-lXft $XFT_LIBS $LIBS"
12700cat >conftest.$ac_ext <<_ACEOF
12701/* confdefs.h. */
12702_ACEOF
12703cat confdefs.h >>conftest.$ac_ext
12704cat >>conftest.$ac_ext <<_ACEOF
12705/* end confdefs.h. */
12706
c24fa7dc
MB
12707/* Override any GCC internal prototype to avoid an error.
12708 Use char because int might match the return type of a GCC
12709 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12710#ifdef __cplusplus
12711extern "C"
12712#endif
45a4b03e
KH
12713char XftFontOpen ();
12714int
12715main ()
12716{
c24fa7dc 12717return XftFontOpen ();
45a4b03e
KH
12718 ;
12719 return 0;
12720}
12721_ACEOF
12722rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12723if { (ac_try="$ac_link"
12724case "(($ac_try" in
12725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12726 *) ac_try_echo=$ac_try;;
12727esac
12728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12729 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12730 ac_status=$?
12731 grep -v '^ *+' conftest.er1 >conftest.err
12732 rm -f conftest.er1
12733 cat conftest.err >&5
12734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12735 (exit $ac_status); } && {
12736 test -z "$ac_c_werror_flag" ||
12737 test ! -s conftest.err
12738 } && test -s conftest$ac_exeext &&
12739 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12740 ac_cv_lib_Xft_XftFontOpen=yes
12741else
12742 echo "$as_me: failed program was:" >&5
12743sed 's/^/| /' conftest.$ac_ext >&5
12744
c24fa7dc 12745 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12746fi
c24fa7dc
MB
12747
12748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12749 conftest$ac_exeext conftest.$ac_ext
12750LIBS=$ac_check_lib_save_LIBS
12751fi
c24fa7dc
MB
12752{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12753echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12754if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12755 HAVE_XFT=yes
12756fi
12757
12758fi
12759
12760
12761
b8bdd8c9 12762 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12763
12764cat >>confdefs.h <<\_ACEOF
12765#define HAVE_XFT 1
12766_ACEOF
12767
12768
b8bdd8c9
KH
12769 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12770 else
12771 CPPFLAGS="$OLD_CPPFLAGS"
12772 CFLAGS="$OLD_CFLAGS"
12773 LIBS="$OLD_LIBS"
12774 fi # "${HAVE_XFT}" = "yes"
12775 fi # "$HAVE_XFT" != no
12776fi # "x${with_xft}" != "xno"
2ee27f27 12777
b8bdd8c9
KH
12778if test "$HAVE_XFT" != "yes"; then
12779 HAVE_XFT=no
12780fi
45a4b03e 12781
b8bdd8c9
KH
12782
12783HAVE_FREETYPE=no
12784### Use -lfreetype if available, unless `--with-freetype=no'.
12785if test "${HAVE_XFT}" = "yes"; then
12786 HAVE_FREETYPE=yes
12787elif test "x${with_freetype}" != "xno"; then
45a4b03e 12788
d235ca2f 12789
45a4b03e
KH
12790 succeeded=no
12791
d235ca2f 12792 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12793set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12794{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12795echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12796if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12797 echo $ECHO_N "(cached) $ECHO_C" >&6
12798else
12799 case $PKG_CONFIG in
12800 [\\/]* | ?:[\\/]*)
12801 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12802 ;;
12803 *)
12804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12805for as_dir in $PATH
12806do
12807 IFS=$as_save_IFS
12808 test -z "$as_dir" && as_dir=.
12809 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12810 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12811 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12812 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12813 break 2
12814 fi
12815done
12816done
c24fa7dc 12817IFS=$as_save_IFS
45a4b03e
KH
12818
12819 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12820 ;;
12821esac
12822fi
12823PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12824if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12825 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12826echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12827else
c24fa7dc
MB
12828 { echo "$as_me:$LINENO: result: no" >&5
12829echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12830fi
12831
c24fa7dc 12832
45a4b03e
KH
12833
12834 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12835 HAVE_FREETYPE=no
45a4b03e
KH
12836 else
12837 PKG_CONFIG_MIN_VERSION=0.9.0
12838 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12839 { echo "$as_me:$LINENO: checking for freetype2" >&5
12840echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 12841
c24fa7dc
MB
12842 if $PKG_CONFIG --exists "freetype2" 2>&5; then
12843 { echo "$as_me:$LINENO: result: yes" >&5
12844echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12845 succeeded=yes
12846
c24fa7dc
MB
12847 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
12848echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 12849 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12850 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
12851echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 12852
c24fa7dc
MB
12853 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
12854echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 12855 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12856 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
12857echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 12858 else
c24fa7dc
MB
12859 { echo "$as_me:$LINENO: result: no" >&5
12860echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12861 FREETYPE_CFLAGS=""
12862 FREETYPE_LIBS=""
12863 ## If we have a custom action on failure, don't print errors, but
12864 ## do set a variable so people can do so.
12865 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
12866
12867 fi
12868
12869
12870
12871 else
12872 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12873 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12874 fi
12875 fi
12876
12877 if test $succeeded = yes; then
12878 HAVE_FREETYPE=yes
12879 else
12880 HAVE_FREETYPE=no
12881 fi
12882
b8bdd8c9 12883 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
12884
12885 succeeded=no
12886
d235ca2f 12887 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12888set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12889{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12891if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12892 echo $ECHO_N "(cached) $ECHO_C" >&6
12893else
12894 case $PKG_CONFIG in
12895 [\\/]* | ?:[\\/]*)
12896 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12897 ;;
12898 *)
12899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12900for as_dir in $PATH
12901do
12902 IFS=$as_save_IFS
12903 test -z "$as_dir" && as_dir=.
12904 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12905 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12906 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12908 break 2
12909 fi
12910done
12911done
c24fa7dc 12912IFS=$as_save_IFS
45a4b03e
KH
12913
12914 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12915 ;;
12916esac
12917fi
12918PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12919if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12920 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12921echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12922else
c24fa7dc
MB
12923 { echo "$as_me:$LINENO: result: no" >&5
12924echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12925fi
12926
c24fa7dc 12927
45a4b03e
KH
12928
12929 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12930 HAVE_FC=no
45a4b03e
KH
12931 else
12932 PKG_CONFIG_MIN_VERSION=0.9.0
12933 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12934 { echo "$as_me:$LINENO: checking for fontconfig" >&5
12935echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 12936
c24fa7dc
MB
12937 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
12938 { echo "$as_me:$LINENO: result: yes" >&5
12939echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12940 succeeded=yes
12941
c24fa7dc
MB
12942 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
12943echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 12944 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12945 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
12946echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 12947
c24fa7dc
MB
12948 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
12949echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 12950 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12951 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
12952echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 12953 else
c24fa7dc
MB
12954 { echo "$as_me:$LINENO: result: no" >&5
12955echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12956 FONTCONFIG_CFLAGS=""
12957 FONTCONFIG_LIBS=""
12958 ## If we have a custom action on failure, don't print errors, but
12959 ## do set a variable so people can do so.
12960 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
12961
12962 fi
12963
12964
12965
12966 else
12967 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12968 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12969 fi
12970 fi
12971
12972 if test $succeeded = yes; then
12973 HAVE_FC=yes
12974 else
12975 HAVE_FC=no
12976 fi
12977
b8bdd8c9
KH
12978 if test "${HAVE_FC}" = "no"; then
12979 HAVE_FREETYPE=no
45a4b03e
KH
12980 fi
12981 fi
b8bdd8c9 12982fi
e70b2110 12983
b8bdd8c9
KH
12984HAVE_LIBOTF=no
12985if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
12986
12987cat >>confdefs.h <<\_ACEOF
12988#define HAVE_FREETYPE 1
12989_ACEOF
12990
b8bdd8c9 12991 if test "${with_libotf}" != "no"; then
e70b2110
KH
12992
12993 succeeded=no
12994
d235ca2f 12995 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 12996set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12997{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12998echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 12999if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13000 echo $ECHO_N "(cached) $ECHO_C" >&6
13001else
e70b2110
KH
13002 case $PKG_CONFIG in
13003 [\\/]* | ?:[\\/]*)
13004 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13005 ;;
13006 *)
13007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13008for as_dir in $PATH
13009do
13010 IFS=$as_save_IFS
13011 test -z "$as_dir" && as_dir=.
13012 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13014 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13015 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13016 break 2
13017 fi
13018done
13019done
c24fa7dc 13020IFS=$as_save_IFS
45a4b03e 13021
e70b2110
KH
13022 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13023 ;;
13024esac
45a4b03e 13025fi
e70b2110
KH
13026PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13027if test -n "$PKG_CONFIG"; then
13028 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13029echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13030else
c24fa7dc
MB
13031 { echo "$as_me:$LINENO: result: no" >&5
13032echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13033fi
13034
c24fa7dc 13035
45a4b03e 13036
e70b2110 13037 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13038 HAVE_LIBOTF=no
e70b2110
KH
13039 else
13040 PKG_CONFIG_MIN_VERSION=0.9.0
13041 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13042 { echo "$as_me:$LINENO: checking for libotf" >&5
13043echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13044
e70b2110
KH
13045 if $PKG_CONFIG --exists "libotf" 2>&5; then
13046 { echo "$as_me:$LINENO: result: yes" >&5
13047echo "${ECHO_T}yes" >&6; }
13048 succeeded=yes
6ed29d7b 13049
e70b2110
KH
13050 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13051echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13052 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13053 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13054echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13055
13056 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13057echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13058 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13059 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13060echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13061 else
13062 { echo "$as_me:$LINENO: result: no" >&5
13063echo "${ECHO_T}no" >&6; }
13064 LIBOTF_CFLAGS=""
13065 LIBOTF_LIBS=""
13066 ## If we have a custom action on failure, don't print errors, but
13067 ## do set a variable so people can do so.
13068 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13069
e70b2110 13070 fi
6ed29d7b 13071
6ed29d7b 13072
6ed29d7b 13073
e70b2110
KH
13074 else
13075 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13076 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13077 fi
13078 fi
13079
13080 if test $succeeded = yes; then
435f8bc5 13081 HAVE_LIBOTF=yes
e70b2110 13082 else
435f8bc5 13083 HAVE_LIBOTF=no
e70b2110
KH
13084 fi
13085
b8bdd8c9 13086 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13087
45a4b03e
KH
13088cat >>confdefs.h <<\_ACEOF
13089#define HAVE_LIBOTF 1
13090_ACEOF
13091
6ed29d7b 13092 fi
45a4b03e 13093 fi
b8bdd8c9 13094fi
45a4b03e 13095
b8bdd8c9
KH
13096HAVE_M17N_FLT=no
13097if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13098
13099 succeeded=no
13100
d235ca2f 13101 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13102set dummy pkg-config; ac_word=$2
13103{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13104echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13105if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13106 echo $ECHO_N "(cached) $ECHO_C" >&6
13107else
13108 case $PKG_CONFIG in
13109 [\\/]* | ?:[\\/]*)
13110 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13111 ;;
13112 *)
13113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13114for as_dir in $PATH
13115do
13116 IFS=$as_save_IFS
13117 test -z "$as_dir" && as_dir=.
13118 for ac_exec_ext in '' $ac_executable_extensions; do
13119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13120 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13121 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13122 break 2
13123 fi
13124done
13125done
13126IFS=$as_save_IFS
13127
13128 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13129 ;;
13130esac
13131fi
13132PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13133if test -n "$PKG_CONFIG"; then
13134 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13135echo "${ECHO_T}$PKG_CONFIG" >&6; }
13136else
13137 { echo "$as_me:$LINENO: result: no" >&5
13138echo "${ECHO_T}no" >&6; }
13139fi
13140
13141
7f0942ba
KH
13142
13143 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13144 HAVE_M17N_FLT=no
7f0942ba
KH
13145 else
13146 PKG_CONFIG_MIN_VERSION=0.9.0
13147 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13148 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13149echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13150
13151 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13152 { echo "$as_me:$LINENO: result: yes" >&5
13153echo "${ECHO_T}yes" >&6; }
13154 succeeded=yes
13155
13156 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13157echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13158 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13159 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13160echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13161
13162 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13163echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13164 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13165 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13166echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13167 else
13168 { echo "$as_me:$LINENO: result: no" >&5
13169echo "${ECHO_T}no" >&6; }
13170 M17N_FLT_CFLAGS=""
13171 M17N_FLT_LIBS=""
13172 ## If we have a custom action on failure, don't print errors, but
13173 ## do set a variable so people can do so.
13174 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13175
13176 fi
13177
13178
13179
13180 else
13181 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13182 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13183 fi
13184 fi
13185
13186 if test $succeeded = yes; then
435f8bc5 13187 HAVE_M17N_FLT=yes
7f0942ba 13188 else
435f8bc5 13189 HAVE_M17N_FLT=no
7f0942ba
KH
13190 fi
13191
b8bdd8c9 13192 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13193
13194cat >>confdefs.h <<\_ACEOF
13195#define HAVE_M17N_FLT 1
13196_ACEOF
13197
e70b2110 13198 fi
b8bdd8c9 13199fi
e70b2110
KH
13200
13201
13202
13203
13204
13205
13206
7f0942ba
KH
13207
13208
7f0942ba 13209
77dfeef5 13210### End of font-backend section.
98418dba
CW
13211
13212### Use -lXpm if available, unless `--with-xpm=no'.
13213HAVE_XPM=no
13214if test "${HAVE_X11}" = "yes"; then
13215 if test "${with_xpm}" != "no"; then
c0d27fcc 13216 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13217 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13218echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13219if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13220 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13221fi
4c34eeee
MB
13222{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13223echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13224else
c0d27fcc 13225 # Is the header compilable?
4c34eeee
MB
13226{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13227echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13228cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13229/* confdefs.h. */
13230_ACEOF
13231cat confdefs.h >>conftest.$ac_ext
13232cat >>conftest.$ac_ext <<_ACEOF
13233/* end confdefs.h. */
c0d27fcc
MR
13234$ac_includes_default
13235#include <X11/xpm.h>
13236_ACEOF
13237rm -f conftest.$ac_objext
4c34eeee
MB
13238if { (ac_try="$ac_compile"
13239case "(($ac_try" in
13240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13241 *) ac_try_echo=$ac_try;;
13242esac
13243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13244 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13245 ac_status=$?
edfaf76d
LK
13246 grep -v '^ *+' conftest.er1 >conftest.err
13247 rm -f conftest.er1
13248 cat conftest.err >&5
c0d27fcc 13249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13250 (exit $ac_status); } && {
13251 test -z "$ac_c_werror_flag" ||
13252 test ! -s conftest.err
13253 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13254 ac_header_compiler=yes
13255else
13256 echo "$as_me: failed program was:" >&5
19650fd6
AS
13257sed 's/^/| /' conftest.$ac_ext >&5
13258
4c34eeee 13259 ac_header_compiler=no
c0d27fcc 13260fi
4c34eeee
MB
13261
13262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13263{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13264echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13265
13266# Is the header present?
4c34eeee
MB
13267{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13268echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13269cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13270/* confdefs.h. */
13271_ACEOF
13272cat confdefs.h >>conftest.$ac_ext
13273cat >>conftest.$ac_ext <<_ACEOF
13274/* end confdefs.h. */
98418dba
CW
13275#include <X11/xpm.h>
13276_ACEOF
4c34eeee
MB
13277if { (ac_try="$ac_cpp conftest.$ac_ext"
13278case "(($ac_try" in
13279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13280 *) ac_try_echo=$ac_try;;
13281esac
13282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13283 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13284 ac_status=$?
6bae0ccf 13285 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13286 rm -f conftest.er1
13287 cat conftest.err >&5
c0d27fcc 13288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13289 (exit $ac_status); } >/dev/null && {
13290 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13291 test ! -s conftest.err
13292 }; then
c0d27fcc 13293 ac_header_preproc=yes
98418dba
CW
13294else
13295 echo "$as_me: failed program was:" >&5
19650fd6
AS
13296sed 's/^/| /' conftest.$ac_ext >&5
13297
c0d27fcc 13298 ac_header_preproc=no
98418dba 13299fi
4c34eeee 13300
98418dba 13301rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13302{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13303echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13304
13305# So? What about this header?
edfaf76d
LK
13306case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13307 yes:no: )
c0d27fcc
MR
13308 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13309echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13310 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13311echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13312 ac_header_preproc=yes
13313 ;;
13314 no:yes:* )
13315 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13316echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13317 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13318echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13319 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13320echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13321 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13322echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13323 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13324echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13325 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13326echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13327
19650fd6 13328 ;;
c0d27fcc 13329esac
4c34eeee
MB
13330{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13331echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13332if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13333 echo $ECHO_N "(cached) $ECHO_C" >&6
13334else
13335 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13336fi
4c34eeee
MB
13337{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13338echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13339
13340fi
98418dba 13341if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13342 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13343echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13344if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13345 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13346else
98418dba
CW
13347 ac_check_lib_save_LIBS=$LIBS
13348LIBS="-lXpm -lX11 $LIBS"
13349cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13350/* confdefs.h. */
13351_ACEOF
13352cat confdefs.h >>conftest.$ac_ext
13353cat >>conftest.$ac_ext <<_ACEOF
13354/* end confdefs.h. */
98418dba 13355
4c34eeee
MB
13356/* Override any GCC internal prototype to avoid an error.
13357 Use char because int might match the return type of a GCC
13358 builtin and then its argument prototype would still apply. */
503d2be0
AS
13359#ifdef __cplusplus
13360extern "C"
13361#endif
98418dba 13362char XpmReadFileToPixmap ();
503d2be0
AS
13363int
13364main ()
13365{
4c34eeee 13366return XpmReadFileToPixmap ();
503d2be0
AS
13367 ;
13368 return 0;
13369}
13370_ACEOF
13371rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13372if { (ac_try="$ac_link"
13373case "(($ac_try" in
13374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13375 *) ac_try_echo=$ac_try;;
13376esac
13377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13378 (eval "$ac_link") 2>conftest.er1
503d2be0 13379 ac_status=$?
edfaf76d
LK
13380 grep -v '^ *+' conftest.er1 >conftest.err
13381 rm -f conftest.er1
13382 cat conftest.err >&5
c0d27fcc 13383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13384 (exit $ac_status); } && {
13385 test -z "$ac_c_werror_flag" ||
13386 test ! -s conftest.err
13387 } && test -s conftest$ac_exeext &&
13388 $as_test_x conftest$ac_exeext; then
98418dba 13389 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13390else
13391 echo "$as_me: failed program was:" >&5
19650fd6
AS
13392sed 's/^/| /' conftest.$ac_ext >&5
13393
4c34eeee 13394 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13395fi
4c34eeee
MB
13396
13397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13398 conftest$ac_exeext conftest.$ac_ext
98418dba 13399LIBS=$ac_check_lib_save_LIBS
503d2be0 13400fi
4c34eeee
MB
13401{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13402echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13403if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13404 HAVE_XPM=yes
ba4481b5
DL
13405fi
13406
98418dba
CW
13407fi
13408
c0d27fcc 13409
98418dba 13410 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13411 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13412echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13413 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13414/* confdefs.h. */
13415_ACEOF
13416cat confdefs.h >>conftest.$ac_ext
13417cat >>conftest.$ac_ext <<_ACEOF
13418/* end confdefs.h. */
98418dba
CW
13419#include "X11/xpm.h"
13420#ifndef XpmReturnAllocPixels
13421no_return_alloc_pixels
503d2be0 13422#endif
ba4481b5 13423
98418dba
CW
13424_ACEOF
13425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13426 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13427 HAVE_XPM=no
13428else
13429 HAVE_XPM=yes
13430fi
13431rm -f conftest*
ba4481b5 13432
c0d27fcc 13433
98418dba 13434 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13435 { echo "$as_me:$LINENO: result: yes" >&5
13436echo "${ECHO_T}yes" >&6; }
98418dba 13437 else
4c34eeee
MB
13438 { echo "$as_me:$LINENO: result: no" >&5
13439echo "${ECHO_T}no" >&6; }
98418dba
CW
13440 fi
13441 fi
13442 fi
13443
13444 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13445
c0d27fcc 13446cat >>confdefs.h <<\_ACEOF
98418dba 13447#define HAVE_XPM 1
c0d27fcc 13448_ACEOF
98418dba
CW
13449
13450 fi
13451fi
13452
13453### Use -ljpeg if available, unless `--with-jpeg=no'.
13454HAVE_JPEG=no
13455if test "${HAVE_X11}" = "yes"; then
13456 if test "${with_jpeg}" != "no"; then
c0d27fcc 13457 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13458 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13459echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13460if test "${ac_cv_header_jerror_h+set}" = set; then
13461 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13462fi
ca81d7a0
JD
13463{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13464echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13465else
c0d27fcc 13466 # Is the header compilable?
ca81d7a0
JD
13467{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13468echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13469cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13470/* confdefs.h. */
13471_ACEOF
13472cat confdefs.h >>conftest.$ac_ext
13473cat >>conftest.$ac_ext <<_ACEOF
13474/* end confdefs.h. */
c0d27fcc
MR
13475$ac_includes_default
13476#include <jerror.h>
13477_ACEOF
13478rm -f conftest.$ac_objext
ca81d7a0
JD
13479if { (ac_try="$ac_compile"
13480case "(($ac_try" in
13481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13482 *) ac_try_echo=$ac_try;;
13483esac
13484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13485 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13486 ac_status=$?
edfaf76d
LK
13487 grep -v '^ *+' conftest.er1 >conftest.err
13488 rm -f conftest.er1
13489 cat conftest.err >&5
c0d27fcc 13490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13491 (exit $ac_status); } && {
13492 test -z "$ac_c_werror_flag" ||
13493 test ! -s conftest.err
13494 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13495 ac_header_compiler=yes
13496else
13497 echo "$as_me: failed program was:" >&5
19650fd6
AS
13498sed 's/^/| /' conftest.$ac_ext >&5
13499
ca81d7a0 13500 ac_header_compiler=no
c0d27fcc 13501fi
ca81d7a0
JD
13502
13503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13504{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13505echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13506
13507# Is the header present?
ca81d7a0
JD
13508{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13509echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13510cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13511/* confdefs.h. */
13512_ACEOF
13513cat confdefs.h >>conftest.$ac_ext
13514cat >>conftest.$ac_ext <<_ACEOF
13515/* end confdefs.h. */
98418dba
CW
13516#include <jerror.h>
13517_ACEOF
ca81d7a0
JD
13518if { (ac_try="$ac_cpp conftest.$ac_ext"
13519case "(($ac_try" in
13520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13521 *) ac_try_echo=$ac_try;;
13522esac
13523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13524 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13525 ac_status=$?
6bae0ccf 13526 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13527 rm -f conftest.er1
13528 cat conftest.err >&5
c0d27fcc 13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13530 (exit $ac_status); } >/dev/null && {
13531 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13532 test ! -s conftest.err
13533 }; then
c0d27fcc 13534 ac_header_preproc=yes
ba4481b5 13535else
98418dba 13536 echo "$as_me: failed program was:" >&5
19650fd6
AS
13537sed 's/^/| /' conftest.$ac_ext >&5
13538
c0d27fcc 13539 ac_header_preproc=no
98418dba 13540fi
ca81d7a0 13541
98418dba 13542rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13543{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13544echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13545
13546# So? What about this header?
edfaf76d
LK
13547case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13548 yes:no: )
c0d27fcc
MR
13549 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13550echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13551 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13552echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13553 ac_header_preproc=yes
19650fd6 13554 ;;
edfaf76d 13555 no:yes:* )
c0d27fcc
MR
13556 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13557echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13558 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13559echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13560 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13561echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13562 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13563echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13564 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13565echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13566 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13567echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13568
19650fd6 13569 ;;
c0d27fcc 13570esac
ca81d7a0
JD
13571{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13572echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13573if test "${ac_cv_header_jerror_h+set}" = set; then
13574 echo $ECHO_N "(cached) $ECHO_C" >&6
13575else
13576 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13577fi
ca81d7a0
JD
13578{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13579echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13580
13581fi
98418dba 13582if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13583 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13584echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13585if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13586 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13587else
98418dba
CW
13588 ac_check_lib_save_LIBS=$LIBS
13589LIBS="-ljpeg $LIBS"
13590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13591/* confdefs.h. */
13592_ACEOF
13593cat confdefs.h >>conftest.$ac_ext
13594cat >>conftest.$ac_ext <<_ACEOF
13595/* end confdefs.h. */
98418dba 13596
ca81d7a0
JD
13597/* Override any GCC internal prototype to avoid an error.
13598 Use char because int might match the return type of a GCC
13599 builtin and then its argument prototype would still apply. */
98418dba
CW
13600#ifdef __cplusplus
13601extern "C"
13602#endif
98418dba 13603char jpeg_destroy_compress ();
503d2be0
AS
13604int
13605main ()
13606{
ca81d7a0 13607return jpeg_destroy_compress ();
503d2be0
AS
13608 ;
13609 return 0;
13610}
13611_ACEOF
13612rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13613if { (ac_try="$ac_link"
13614case "(($ac_try" in
13615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13616 *) ac_try_echo=$ac_try;;
13617esac
13618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13619 (eval "$ac_link") 2>conftest.er1
503d2be0 13620 ac_status=$?
edfaf76d
LK
13621 grep -v '^ *+' conftest.er1 >conftest.err
13622 rm -f conftest.er1
13623 cat conftest.err >&5
c0d27fcc 13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13625 (exit $ac_status); } && {
13626 test -z "$ac_c_werror_flag" ||
13627 test ! -s conftest.err
13628 } && test -s conftest$ac_exeext &&
13629 $as_test_x conftest$ac_exeext; then
98418dba 13630 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13631else
503d2be0 13632 echo "$as_me: failed program was:" >&5
19650fd6
AS
13633sed 's/^/| /' conftest.$ac_ext >&5
13634
ca81d7a0 13635 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13636fi
ca81d7a0 13637
f053c89f 13638rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13639 conftest$ac_exeext conftest.$ac_ext
98418dba 13640LIBS=$ac_check_lib_save_LIBS
ba4481b5 13641fi
ca81d7a0
JD
13642{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13643echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13644if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13645 HAVE_JPEG=yes
ba4481b5 13646fi
98418dba 13647
ba4481b5 13648fi
98418dba 13649
c0d27fcc 13650
ba4481b5 13651 fi
ba4481b5 13652
c0d27fcc 13653
98418dba 13654 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13655 cat >>confdefs.h <<\_ACEOF
98418dba 13656#define HAVE_JPEG 1
c0d27fcc 13657_ACEOF
98418dba
CW
13658
13659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13660/* confdefs.h. */
13661_ACEOF
13662cat confdefs.h >>conftest.$ac_ext
13663cat >>conftest.$ac_ext <<_ACEOF
13664/* end confdefs.h. */
22044edf 13665#include <jpeglib.h>
98418dba
CW
13666 version=JPEG_LIB_VERSION
13667
13668_ACEOF
13669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13670 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13671 cat >>confdefs.h <<\_ACEOF
98418dba 13672#define HAVE_JPEG 1
c0d27fcc 13673_ACEOF
ba4481b5 13674
98418dba 13675else
c0d27fcc 13676 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13677echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13678 HAVE_JPEG=no
ba4481b5 13679fi
98418dba 13680rm -f conftest*
ba4481b5 13681
98418dba
CW
13682 fi
13683fi
503d2be0 13684
98418dba
CW
13685### Use -lpng if available, unless `--with-png=no'.
13686HAVE_PNG=no
13687if test "${HAVE_X11}" = "yes"; then
13688 if test "${with_png}" != "no"; then
f57bd967
DL
13689 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13690 # in /usr/include/libpng.
13691
13692
13693for ac_header in png.h libpng/png.h
13694do
13695as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13696if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13697 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13698echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13699if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13700 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13701fi
ca81d7a0
JD
13702ac_res=`eval echo '${'$as_ac_Header'}'`
13703 { echo "$as_me:$LINENO: result: $ac_res" >&5
13704echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13705else
c0d27fcc 13706 # Is the header compilable?
ca81d7a0
JD
13707{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13708echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13709cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13710/* confdefs.h. */
13711_ACEOF
13712cat confdefs.h >>conftest.$ac_ext
13713cat >>conftest.$ac_ext <<_ACEOF
13714/* end confdefs.h. */
c0d27fcc 13715$ac_includes_default
f57bd967 13716#include <$ac_header>
c0d27fcc
MR
13717_ACEOF
13718rm -f conftest.$ac_objext
ca81d7a0
JD
13719if { (ac_try="$ac_compile"
13720case "(($ac_try" in
13721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13722 *) ac_try_echo=$ac_try;;
13723esac
13724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13725 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13726 ac_status=$?
edfaf76d
LK
13727 grep -v '^ *+' conftest.er1 >conftest.err
13728 rm -f conftest.er1
13729 cat conftest.err >&5
c0d27fcc 13730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13731 (exit $ac_status); } && {
13732 test -z "$ac_c_werror_flag" ||
13733 test ! -s conftest.err
13734 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13735 ac_header_compiler=yes
13736else
13737 echo "$as_me: failed program was:" >&5
19650fd6
AS
13738sed 's/^/| /' conftest.$ac_ext >&5
13739
ca81d7a0 13740 ac_header_compiler=no
c0d27fcc 13741fi
ca81d7a0
JD
13742
13743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13744{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13745echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13746
13747# Is the header present?
ca81d7a0
JD
13748{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13749echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13750cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13751/* confdefs.h. */
13752_ACEOF
13753cat confdefs.h >>conftest.$ac_ext
13754cat >>conftest.$ac_ext <<_ACEOF
13755/* end confdefs.h. */
f57bd967 13756#include <$ac_header>
503d2be0 13757_ACEOF
ca81d7a0
JD
13758if { (ac_try="$ac_cpp conftest.$ac_ext"
13759case "(($ac_try" in
13760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13761 *) ac_try_echo=$ac_try;;
13762esac
13763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13764 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13765 ac_status=$?
6bae0ccf 13766 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13767 rm -f conftest.er1
13768 cat conftest.err >&5
c0d27fcc 13769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13770 (exit $ac_status); } >/dev/null && {
13771 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13772 test ! -s conftest.err
13773 }; then
c0d27fcc 13774 ac_header_preproc=yes
503d2be0
AS
13775else
13776 echo "$as_me: failed program was:" >&5
19650fd6
AS
13777sed 's/^/| /' conftest.$ac_ext >&5
13778
c0d27fcc 13779 ac_header_preproc=no
ba4481b5 13780fi
ca81d7a0 13781
503d2be0 13782rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13783{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13784echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13785
13786# So? What about this header?
edfaf76d
LK
13787case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13788 yes:no: )
f57bd967
DL
13789 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13790echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13791 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13792echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13793 ac_header_preproc=yes
19650fd6 13794 ;;
edfaf76d 13795 no:yes:* )
f57bd967
DL
13796 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13797echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13798 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13799echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13800 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13801echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13802 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13803echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13804 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13805echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13806 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13807echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13808
19650fd6 13809 ;;
c0d27fcc 13810esac
ca81d7a0
JD
13811{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13813if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13814 echo $ECHO_N "(cached) $ECHO_C" >&6
13815else
edfaf76d 13816 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13817fi
ca81d7a0
JD
13818ac_res=`eval echo '${'$as_ac_Header'}'`
13819 { echo "$as_me:$LINENO: result: $ac_res" >&5
13820echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13821
ba4481b5 13822fi
f57bd967
DL
13823if test `eval echo '${'$as_ac_Header'}'` = yes; then
13824 cat >>confdefs.h <<_ACEOF
13825#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13826_ACEOF
c0d27fcc
MR
13827
13828fi
f57bd967
DL
13829
13830done
13831
13832 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13833 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13834echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13835if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13836 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13837else
98418dba
CW
13838 ac_check_lib_save_LIBS=$LIBS
13839LIBS="-lpng -lz -lm $LIBS"
13840cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13841/* confdefs.h. */
13842_ACEOF
13843cat confdefs.h >>conftest.$ac_ext
13844cat >>conftest.$ac_ext <<_ACEOF
13845/* end confdefs.h. */
98418dba 13846
ca81d7a0
JD
13847/* Override any GCC internal prototype to avoid an error.
13848 Use char because int might match the return type of a GCC
13849 builtin and then its argument prototype would still apply. */
503d2be0
AS
13850#ifdef __cplusplus
13851extern "C"
13852#endif
98418dba 13853char png_get_channels ();
503d2be0
AS
13854int
13855main ()
13856{
ca81d7a0 13857return png_get_channels ();
503d2be0
AS
13858 ;
13859 return 0;
13860}
13861_ACEOF
13862rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13863if { (ac_try="$ac_link"
13864case "(($ac_try" in
13865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13866 *) ac_try_echo=$ac_try;;
13867esac
13868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13869 (eval "$ac_link") 2>conftest.er1
503d2be0 13870 ac_status=$?
edfaf76d
LK
13871 grep -v '^ *+' conftest.er1 >conftest.err
13872 rm -f conftest.er1
13873 cat conftest.err >&5
c0d27fcc 13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13875 (exit $ac_status); } && {
13876 test -z "$ac_c_werror_flag" ||
13877 test ! -s conftest.err
13878 } && test -s conftest$ac_exeext &&
13879 $as_test_x conftest$ac_exeext; then
98418dba 13880 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13881else
98418dba 13882 echo "$as_me: failed program was:" >&5
19650fd6
AS
13883sed 's/^/| /' conftest.$ac_ext >&5
13884
ca81d7a0 13885 ac_cv_lib_png_png_get_channels=no
73b77ee5 13886fi
ca81d7a0 13887
f053c89f 13888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13889 conftest$ac_exeext conftest.$ac_ext
98418dba 13890LIBS=$ac_check_lib_save_LIBS
73b77ee5 13891fi
ca81d7a0
JD
13892{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13893echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13894if test $ac_cv_lib_png_png_get_channels = yes; then
13895 HAVE_PNG=yes
73b77ee5 13896fi
503d2be0 13897
f57bd967 13898 fi
98418dba
CW
13899 fi
13900
13901 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13902
c0d27fcc 13903cat >>confdefs.h <<\_ACEOF
98418dba 13904#define HAVE_PNG 1
c0d27fcc 13905_ACEOF
73b77ee5 13906
98418dba 13907 fi
73b77ee5
GM
13908fi
13909
98418dba
CW
13910### Use -ltiff if available, unless `--with-tiff=no'.
13911HAVE_TIFF=no
13912if test "${HAVE_X11}" = "yes"; then
13913 if test "${with_tiff}" != "no"; then
c0d27fcc 13914 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13915 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13916echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13917if test "${ac_cv_header_tiffio_h+set}" = set; then
13918 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13919fi
ca81d7a0
JD
13920{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13921echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13922else
c0d27fcc 13923 # Is the header compilable?
ca81d7a0
JD
13924{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13925echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13926cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13927/* confdefs.h. */
13928_ACEOF
13929cat confdefs.h >>conftest.$ac_ext
13930cat >>conftest.$ac_ext <<_ACEOF
13931/* end confdefs.h. */
c0d27fcc
MR
13932$ac_includes_default
13933#include <tiffio.h>
13934_ACEOF
13935rm -f conftest.$ac_objext
ca81d7a0
JD
13936if { (ac_try="$ac_compile"
13937case "(($ac_try" in
13938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13939 *) ac_try_echo=$ac_try;;
13940esac
13941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13942 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13943 ac_status=$?
edfaf76d
LK
13944 grep -v '^ *+' conftest.er1 >conftest.err
13945 rm -f conftest.er1
13946 cat conftest.err >&5
c0d27fcc 13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13948 (exit $ac_status); } && {
13949 test -z "$ac_c_werror_flag" ||
13950 test ! -s conftest.err
13951 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13952 ac_header_compiler=yes
13953else
13954 echo "$as_me: failed program was:" >&5
19650fd6
AS
13955sed 's/^/| /' conftest.$ac_ext >&5
13956
ca81d7a0 13957 ac_header_compiler=no
c0d27fcc 13958fi
ca81d7a0
JD
13959
13960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13961{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13962echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13963
13964# Is the header present?
ca81d7a0
JD
13965{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13966echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13967cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13968/* confdefs.h. */
13969_ACEOF
13970cat confdefs.h >>conftest.$ac_ext
13971cat >>conftest.$ac_ext <<_ACEOF
13972/* end confdefs.h. */
98418dba
CW
13973#include <tiffio.h>
13974_ACEOF
ca81d7a0
JD
13975if { (ac_try="$ac_cpp conftest.$ac_ext"
13976case "(($ac_try" in
13977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13978 *) ac_try_echo=$ac_try;;
13979esac
13980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13981 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13982 ac_status=$?
6bae0ccf 13983 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13984 rm -f conftest.er1
13985 cat conftest.err >&5
c0d27fcc 13986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13987 (exit $ac_status); } >/dev/null && {
13988 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13989 test ! -s conftest.err
13990 }; then
c0d27fcc 13991 ac_header_preproc=yes
98418dba
CW
13992else
13993 echo "$as_me: failed program was:" >&5
19650fd6
AS
13994sed 's/^/| /' conftest.$ac_ext >&5
13995
c0d27fcc 13996 ac_header_preproc=no
98418dba 13997fi
ca81d7a0 13998
98418dba 13999rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14000{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14001echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14002
14003# So? What about this header?
edfaf76d
LK
14004case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14005 yes:no: )
c0d27fcc
MR
14006 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14007echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14008 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14009echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14010 ac_header_preproc=yes
19650fd6 14011 ;;
edfaf76d 14012 no:yes:* )
c0d27fcc
MR
14013 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14014echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14015 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14016echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14017 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14018echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14019 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14020echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14021 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14022echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14023 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14024echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14025
19650fd6 14026 ;;
c0d27fcc 14027esac
ca81d7a0
JD
14028{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14029echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14030if test "${ac_cv_header_tiffio_h+set}" = set; then
14031 echo $ECHO_N "(cached) $ECHO_C" >&6
14032else
14033 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14034fi
ca81d7a0
JD
14035{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14036echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14037
14038fi
98418dba
CW
14039if test $ac_cv_header_tiffio_h = yes; then
14040 tifflibs="-lz -lm"
14041 # At least one tiff package requires the jpeg library.
14042 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14043 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14044echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14045if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14046 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14047else
503d2be0 14048 ac_check_lib_save_LIBS=$LIBS
98418dba 14049LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14051/* confdefs.h. */
14052_ACEOF
14053cat confdefs.h >>conftest.$ac_ext
14054cat >>conftest.$ac_ext <<_ACEOF
14055/* end confdefs.h. */
503d2be0 14056
ca81d7a0
JD
14057/* Override any GCC internal prototype to avoid an error.
14058 Use char because int might match the return type of a GCC
14059 builtin and then its argument prototype would still apply. */
503d2be0
AS
14060#ifdef __cplusplus
14061extern "C"
14062#endif
98418dba 14063char TIFFGetVersion ();
503d2be0
AS
14064int
14065main ()
14066{
ca81d7a0 14067return TIFFGetVersion ();
503d2be0
AS
14068 ;
14069 return 0;
14070}
14071_ACEOF
14072rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14073if { (ac_try="$ac_link"
14074case "(($ac_try" in
14075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14076 *) ac_try_echo=$ac_try;;
14077esac
14078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14079 (eval "$ac_link") 2>conftest.er1
503d2be0 14080 ac_status=$?
edfaf76d
LK
14081 grep -v '^ *+' conftest.er1 >conftest.err
14082 rm -f conftest.er1
14083 cat conftest.err >&5
c0d27fcc 14084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14085 (exit $ac_status); } && {
14086 test -z "$ac_c_werror_flag" ||
14087 test ! -s conftest.err
14088 } && test -s conftest$ac_exeext &&
14089 $as_test_x conftest$ac_exeext; then
98418dba 14090 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14091else
14092 echo "$as_me: failed program was:" >&5
19650fd6
AS
14093sed 's/^/| /' conftest.$ac_ext >&5
14094
ca81d7a0 14095 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14096fi
ca81d7a0 14097
f053c89f 14098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14099 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14100LIBS=$ac_check_lib_save_LIBS
14101fi
ca81d7a0
JD
14102{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14103echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14104if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14105 HAVE_TIFF=yes
14106fi
14107
14108fi
73b77ee5 14109
c0d27fcc 14110
98418dba
CW
14111 fi
14112
14113 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14114
c0d27fcc 14115cat >>confdefs.h <<\_ACEOF
98418dba 14116#define HAVE_TIFF 1
c0d27fcc 14117_ACEOF
98418dba
CW
14118
14119 fi
73b77ee5
GM
14120fi
14121
9aeb8aaa 14122### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14123HAVE_GIF=no
9aeb8aaa
GM
14124if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14125 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14126 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14127echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14128if test "${ac_cv_header_gif_lib_h+set}" = set; then
14129 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14130fi
ca81d7a0
JD
14131{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14132echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14133else
c0d27fcc 14134 # Is the header compilable?
ca81d7a0
JD
14135{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14136echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14137cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14138/* confdefs.h. */
14139_ACEOF
14140cat confdefs.h >>conftest.$ac_ext
14141cat >>conftest.$ac_ext <<_ACEOF
14142/* end confdefs.h. */
c0d27fcc
MR
14143$ac_includes_default
14144#include <gif_lib.h>
14145_ACEOF
14146rm -f conftest.$ac_objext
ca81d7a0
JD
14147if { (ac_try="$ac_compile"
14148case "(($ac_try" in
14149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14150 *) ac_try_echo=$ac_try;;
14151esac
14152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14153 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14154 ac_status=$?
edfaf76d
LK
14155 grep -v '^ *+' conftest.er1 >conftest.err
14156 rm -f conftest.er1
14157 cat conftest.err >&5
c0d27fcc 14158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14159 (exit $ac_status); } && {
14160 test -z "$ac_c_werror_flag" ||
14161 test ! -s conftest.err
14162 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14163 ac_header_compiler=yes
14164else
14165 echo "$as_me: failed program was:" >&5
19650fd6
AS
14166sed 's/^/| /' conftest.$ac_ext >&5
14167
ca81d7a0 14168 ac_header_compiler=no
c0d27fcc 14169fi
ca81d7a0
JD
14170
14171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14172{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14173echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14174
14175# Is the header present?
ca81d7a0
JD
14176{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14177echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14178cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14179/* confdefs.h. */
14180_ACEOF
14181cat confdefs.h >>conftest.$ac_ext
14182cat >>conftest.$ac_ext <<_ACEOF
14183/* end confdefs.h. */
98418dba
CW
14184#include <gif_lib.h>
14185_ACEOF
ca81d7a0
JD
14186if { (ac_try="$ac_cpp conftest.$ac_ext"
14187case "(($ac_try" in
14188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14189 *) ac_try_echo=$ac_try;;
14190esac
14191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14192 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14193 ac_status=$?
6bae0ccf 14194 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14195 rm -f conftest.er1
14196 cat conftest.err >&5
c0d27fcc 14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14198 (exit $ac_status); } >/dev/null && {
14199 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14200 test ! -s conftest.err
14201 }; then
c0d27fcc 14202 ac_header_preproc=yes
98418dba
CW
14203else
14204 echo "$as_me: failed program was:" >&5
19650fd6
AS
14205sed 's/^/| /' conftest.$ac_ext >&5
14206
c0d27fcc 14207 ac_header_preproc=no
98418dba 14208fi
ca81d7a0 14209
98418dba 14210rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14211{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14212echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14213
14214# So? What about this header?
edfaf76d
LK
14215case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14216 yes:no: )
c0d27fcc
MR
14217 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14218echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14219 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14220echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14221 ac_header_preproc=yes
19650fd6 14222 ;;
edfaf76d 14223 no:yes:* )
c0d27fcc
MR
14224 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14225echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14226 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14227echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14228 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14229echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14230 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14231echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14232 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14233echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14234 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14235echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14236
19650fd6 14237 ;;
c0d27fcc 14238esac
ca81d7a0
JD
14239{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14240echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14241if test "${ac_cv_header_gif_lib_h+set}" = set; then
14242 echo $ECHO_N "(cached) $ECHO_C" >&6
14243else
14244 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14245fi
ca81d7a0
JD
14246{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14247echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14248
14249fi
98418dba
CW
14250if test $ac_cv_header_gif_lib_h = yes; then
14251 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14252# Earlier versions can crash Emacs.
63175cd2
GM
14253 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14254echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14255if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14256 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14257else
503d2be0 14258 ac_check_lib_save_LIBS=$LIBS
63175cd2 14259LIBS="-lgif $LIBS"
503d2be0 14260cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14261/* confdefs.h. */
14262_ACEOF
14263cat confdefs.h >>conftest.$ac_ext
14264cat >>conftest.$ac_ext <<_ACEOF
14265/* end confdefs.h. */
73b77ee5 14266
ca81d7a0
JD
14267/* Override any GCC internal prototype to avoid an error.
14268 Use char because int might match the return type of a GCC
14269 builtin and then its argument prototype would still apply. */
98418dba
CW
14270#ifdef __cplusplus
14271extern "C"
14272#endif
98418dba 14273char EGifPutExtensionLast ();
503d2be0
AS
14274int
14275main ()
14276{
ca81d7a0 14277return EGifPutExtensionLast ();
503d2be0
AS
14278 ;
14279 return 0;
14280}
14281_ACEOF
14282rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14283if { (ac_try="$ac_link"
14284case "(($ac_try" in
14285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14286 *) ac_try_echo=$ac_try;;
14287esac
14288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14289 (eval "$ac_link") 2>conftest.er1
503d2be0 14290 ac_status=$?
edfaf76d
LK
14291 grep -v '^ *+' conftest.er1 >conftest.err
14292 rm -f conftest.er1
14293 cat conftest.err >&5
c0d27fcc 14294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14295 (exit $ac_status); } && {
14296 test -z "$ac_c_werror_flag" ||
14297 test ! -s conftest.err
14298 } && test -s conftest$ac_exeext &&
14299 $as_test_x conftest$ac_exeext; then
63175cd2 14300 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14301else
98418dba 14302 echo "$as_me: failed program was:" >&5
19650fd6
AS
14303sed 's/^/| /' conftest.$ac_ext >&5
14304
63175cd2 14305 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14306fi
ca81d7a0 14307
f053c89f 14308rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14309 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14310LIBS=$ac_check_lib_save_LIBS
14311fi
63175cd2
GM
14312{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14313echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14314if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14315 HAVE_GIF=yes
9aeb8aaa 14316else
63175cd2 14317 try_libungif=yes
98418dba
CW
14318fi
14319
14320fi
14321
c0d27fcc 14322
9aeb8aaa
GM
14323
14324 if test "$HAVE_GIF" = yes; then
63175cd2 14325 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14326 fi
14327
63175cd2
GM
14328# If gif_lib.h but no libgif, try libungif.
14329 if test x"$try_libungif" = xyes; then
14330 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14331echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14332if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14333 echo $ECHO_N "(cached) $ECHO_C" >&6
14334else
14335 ac_check_lib_save_LIBS=$LIBS
63175cd2 14336LIBS="-lungif $LIBS"
9aeb8aaa
GM
14337cat >conftest.$ac_ext <<_ACEOF
14338/* confdefs.h. */
14339_ACEOF
14340cat confdefs.h >>conftest.$ac_ext
14341cat >>conftest.$ac_ext <<_ACEOF
14342/* end confdefs.h. */
14343
14344/* Override any GCC internal prototype to avoid an error.
14345 Use char because int might match the return type of a GCC
14346 builtin and then its argument prototype would still apply. */
14347#ifdef __cplusplus
14348extern "C"
14349#endif
14350char EGifPutExtensionLast ();
14351int
14352main ()
14353{
14354return EGifPutExtensionLast ();
14355 ;
14356 return 0;
14357}
14358_ACEOF
14359rm -f conftest.$ac_objext conftest$ac_exeext
14360if { (ac_try="$ac_link"
14361case "(($ac_try" in
14362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14363 *) ac_try_echo=$ac_try;;
14364esac
14365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14366 (eval "$ac_link") 2>conftest.er1
14367 ac_status=$?
14368 grep -v '^ *+' conftest.er1 >conftest.err
14369 rm -f conftest.er1
14370 cat conftest.err >&5
14371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14372 (exit $ac_status); } && {
14373 test -z "$ac_c_werror_flag" ||
14374 test ! -s conftest.err
14375 } && test -s conftest$ac_exeext &&
14376 $as_test_x conftest$ac_exeext; then
63175cd2 14377 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14378else
14379 echo "$as_me: failed program was:" >&5
14380sed 's/^/| /' conftest.$ac_ext >&5
14381
63175cd2 14382 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14383fi
14384
9aeb8aaa
GM
14385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14386 conftest$ac_exeext conftest.$ac_ext
14387LIBS=$ac_check_lib_save_LIBS
14388fi
63175cd2
GM
14389{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14390echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14391if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14392 HAVE_GIF=yes
98418dba
CW
14393fi
14394
c0d27fcc 14395
9aeb8aaa
GM
14396 if test "$HAVE_GIF" = yes; then
14397
14398cat >>confdefs.h <<\_ACEOF
63175cd2 14399#define LIBGIF -lungif
9aeb8aaa
GM
14400_ACEOF
14401
63175cd2 14402 ac_gif_lib_name="-lungif"
9aeb8aaa 14403 fi
98418dba
CW
14404 fi
14405
14406 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14407
c0d27fcc 14408cat >>confdefs.h <<\_ACEOF
98418dba 14409#define HAVE_GIF 1
c0d27fcc 14410_ACEOF
98418dba
CW
14411
14412 fi
14413fi
14414
5afbeb22
JD
14415if test "${HAVE_X11}" = "yes"; then
14416 MISSING=""
14417 WITH_NO=""
14418 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14419 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14420 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14421 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14422 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14423 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14424 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14425 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14426 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14427 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14428
14429 if test "X${MISSING}" != X; then
1bb9a689 14430 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14431 $MISSING
86e73516 14432Maybe some development libraries/packages are missing?
5afbeb22
JD
14433If you don't want to link with them give
14434 $WITH_NO
14435as options to configure" >&5
1bb9a689 14436echo "$as_me: error: The following required libraries were not found:
5afbeb22 14437 $MISSING
86e73516 14438Maybe some development libraries/packages are missing?
5afbeb22
JD
14439If you don't want to link with them give
14440 $WITH_NO
14441as options to configure" >&2;}
86e73516 14442 { (exit 1); exit 1; }; }
98418dba
CW
14443 fi
14444fi
14445
79011b82
NR
14446### Use -lgpm if available, unless `--with-gpm=no'.
14447HAVE_GPM=no
14448if test "${with_gpm}" != "no"; then
14449 if test "${ac_cv_header_gpm_h+set}" = set; then
14450 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14451echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14452if test "${ac_cv_header_gpm_h+set}" = set; then
14453 echo $ECHO_N "(cached) $ECHO_C" >&6
14454fi
14455{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14456echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14457else
14458 # Is the header compilable?
14459{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14460echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14461cat >conftest.$ac_ext <<_ACEOF
14462/* confdefs.h. */
14463_ACEOF
14464cat confdefs.h >>conftest.$ac_ext
14465cat >>conftest.$ac_ext <<_ACEOF
14466/* end confdefs.h. */
14467$ac_includes_default
14468#include <gpm.h>
14469_ACEOF
14470rm -f conftest.$ac_objext
14471if { (ac_try="$ac_compile"
14472case "(($ac_try" in
14473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14474 *) ac_try_echo=$ac_try;;
14475esac
14476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14477 (eval "$ac_compile") 2>conftest.er1
14478 ac_status=$?
14479 grep -v '^ *+' conftest.er1 >conftest.err
14480 rm -f conftest.er1
14481 cat conftest.err >&5
14482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14483 (exit $ac_status); } && {
14484 test -z "$ac_c_werror_flag" ||
14485 test ! -s conftest.err
14486 } && test -s conftest.$ac_objext; then
14487 ac_header_compiler=yes
14488else
14489 echo "$as_me: failed program was:" >&5
14490sed 's/^/| /' conftest.$ac_ext >&5
14491
14492 ac_header_compiler=no
14493fi
14494
14495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14496{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14497echo "${ECHO_T}$ac_header_compiler" >&6; }
14498
14499# Is the header present?
14500{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14501echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14502cat >conftest.$ac_ext <<_ACEOF
14503/* confdefs.h. */
14504_ACEOF
14505cat confdefs.h >>conftest.$ac_ext
14506cat >>conftest.$ac_ext <<_ACEOF
14507/* end confdefs.h. */
14508#include <gpm.h>
14509_ACEOF
14510if { (ac_try="$ac_cpp conftest.$ac_ext"
14511case "(($ac_try" in
14512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14513 *) ac_try_echo=$ac_try;;
14514esac
14515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14516 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14517 ac_status=$?
14518 grep -v '^ *+' conftest.er1 >conftest.err
14519 rm -f conftest.er1
14520 cat conftest.err >&5
14521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14522 (exit $ac_status); } >/dev/null && {
14523 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14524 test ! -s conftest.err
14525 }; then
14526 ac_header_preproc=yes
14527else
14528 echo "$as_me: failed program was:" >&5
14529sed 's/^/| /' conftest.$ac_ext >&5
14530
14531 ac_header_preproc=no
14532fi
14533
14534rm -f conftest.err conftest.$ac_ext
14535{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14536echo "${ECHO_T}$ac_header_preproc" >&6; }
14537
14538# So? What about this header?
14539case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14540 yes:no: )
14541 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14542echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14543 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14544echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14545 ac_header_preproc=yes
14546 ;;
14547 no:yes:* )
14548 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14549echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14550 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14551echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14552 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14553echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14554 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14555echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14556 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14557echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14558 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14559echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14560
14561 ;;
14562esac
14563{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14564echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14565if test "${ac_cv_header_gpm_h+set}" = set; then
14566 echo $ECHO_N "(cached) $ECHO_C" >&6
14567else
14568 ac_cv_header_gpm_h=$ac_header_preproc
14569fi
14570{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14571echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14572
14573fi
14574if test $ac_cv_header_gpm_h = yes; then
14575 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14576echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14577if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14578 echo $ECHO_N "(cached) $ECHO_C" >&6
14579else
14580 ac_check_lib_save_LIBS=$LIBS
14581LIBS="-lgpm $LIBS"
14582cat >conftest.$ac_ext <<_ACEOF
14583/* confdefs.h. */
14584_ACEOF
14585cat confdefs.h >>conftest.$ac_ext
14586cat >>conftest.$ac_ext <<_ACEOF
14587/* end confdefs.h. */
14588
14589/* Override any GCC internal prototype to avoid an error.
14590 Use char because int might match the return type of a GCC
14591 builtin and then its argument prototype would still apply. */
14592#ifdef __cplusplus
14593extern "C"
14594#endif
14595char Gpm_Open ();
14596int
14597main ()
14598{
14599return Gpm_Open ();
14600 ;
14601 return 0;
14602}
14603_ACEOF
14604rm -f conftest.$ac_objext conftest$ac_exeext
14605if { (ac_try="$ac_link"
14606case "(($ac_try" in
14607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14608 *) ac_try_echo=$ac_try;;
14609esac
14610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14611 (eval "$ac_link") 2>conftest.er1
14612 ac_status=$?
14613 grep -v '^ *+' conftest.er1 >conftest.err
14614 rm -f conftest.er1
14615 cat conftest.err >&5
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); } && {
14618 test -z "$ac_c_werror_flag" ||
14619 test ! -s conftest.err
14620 } && test -s conftest$ac_exeext &&
14621 $as_test_x conftest$ac_exeext; then
14622 ac_cv_lib_gpm_Gpm_Open=yes
14623else
14624 echo "$as_me: failed program was:" >&5
14625sed 's/^/| /' conftest.$ac_ext >&5
14626
14627 ac_cv_lib_gpm_Gpm_Open=no
14628fi
14629
14630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14631 conftest$ac_exeext conftest.$ac_ext
14632LIBS=$ac_check_lib_save_LIBS
14633fi
14634{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14635echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14636if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14637 HAVE_GPM=yes
14638fi
14639
14640fi
14641
14642
14643fi
14644
14645if test "${HAVE_GPM}" = "yes"; then
14646
14647cat >>confdefs.h <<\_ACEOF
14648#define HAVE_GPM 1
14649_ACEOF
14650
14651fi
14652
cef11da2 14653if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14654 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14655echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14656if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14657 echo $ECHO_N "(cached) $ECHO_C" >&6
14658fi
ca81d7a0
JD
14659{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14660echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14661else
14662 # Is the header compilable?
ca81d7a0
JD
14663{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14664echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14665cat >conftest.$ac_ext <<_ACEOF
14666/* confdefs.h. */
14667_ACEOF
14668cat confdefs.h >>conftest.$ac_ext
14669cat >>conftest.$ac_ext <<_ACEOF
14670/* end confdefs.h. */
14671$ac_includes_default
14672#include <malloc/malloc.h>
14673_ACEOF
14674rm -f conftest.$ac_objext
ca81d7a0
JD
14675if { (ac_try="$ac_compile"
14676case "(($ac_try" in
14677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14678 *) ac_try_echo=$ac_try;;
14679esac
14680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14681 (eval "$ac_compile") 2>conftest.er1
cef11da2 14682 ac_status=$?
edfaf76d
LK
14683 grep -v '^ *+' conftest.er1 >conftest.err
14684 rm -f conftest.er1
14685 cat conftest.err >&5
cef11da2 14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14687 (exit $ac_status); } && {
14688 test -z "$ac_c_werror_flag" ||
14689 test ! -s conftest.err
14690 } && test -s conftest.$ac_objext; then
cef11da2
ST
14691 ac_header_compiler=yes
14692else
14693 echo "$as_me: failed program was:" >&5
14694sed 's/^/| /' conftest.$ac_ext >&5
14695
ca81d7a0 14696 ac_header_compiler=no
cef11da2 14697fi
ca81d7a0
JD
14698
14699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14700{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14701echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14702
14703# Is the header present?
ca81d7a0
JD
14704{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14705echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14706cat >conftest.$ac_ext <<_ACEOF
14707/* confdefs.h. */
14708_ACEOF
14709cat confdefs.h >>conftest.$ac_ext
14710cat >>conftest.$ac_ext <<_ACEOF
14711/* end confdefs.h. */
14712#include <malloc/malloc.h>
14713_ACEOF
ca81d7a0
JD
14714if { (ac_try="$ac_cpp conftest.$ac_ext"
14715case "(($ac_try" in
14716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14717 *) ac_try_echo=$ac_try;;
14718esac
14719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14720 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14721 ac_status=$?
14722 grep -v '^ *+' conftest.er1 >conftest.err
14723 rm -f conftest.er1
14724 cat conftest.err >&5
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14726 (exit $ac_status); } >/dev/null && {
14727 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14728 test ! -s conftest.err
14729 }; then
cef11da2
ST
14730 ac_header_preproc=yes
14731else
14732 echo "$as_me: failed program was:" >&5
14733sed 's/^/| /' conftest.$ac_ext >&5
14734
14735 ac_header_preproc=no
14736fi
ca81d7a0 14737
cef11da2 14738rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14739{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14740echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14741
14742# So? What about this header?
edfaf76d
LK
14743case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14744 yes:no: )
cef11da2
ST
14745 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14746echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14747 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14748echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14749 ac_header_preproc=yes
cef11da2 14750 ;;
edfaf76d 14751 no:yes:* )
cef11da2
ST
14752 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14753echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14754 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14755echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14756 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14757echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14758 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14759echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14760 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14761echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14762 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14763echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14764
cef11da2
ST
14765 ;;
14766esac
ca81d7a0
JD
14767{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14768echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14769if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14770 echo $ECHO_N "(cached) $ECHO_C" >&6
14771else
14772 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14773fi
ca81d7a0
JD
14774{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14775echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14776
7c9e5167 14777fi
cef11da2
ST
14778if test $ac_cv_header_malloc_malloc_h = yes; then
14779
14780cat >>confdefs.h <<\_ACEOF
14781#define HAVE_MALLOC_MALLOC_H 1
14782_ACEOF
14783
7c9e5167
JD
14784fi
14785
cef11da2
ST
14786
14787
5d6da11e 14788### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14789if test "${HAVE_CARBON}" = "yes"; then
7c9e5167
JD
14790
14791cat >>confdefs.h <<\_ACEOF
e0f712ba 14792#define HAVE_CARBON 1
7c9e5167
JD
14793_ACEOF
14794
dbdbca09
YM
14795
14796for ac_header in AvailabilityMacros.h
14797do
14798as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14799if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14800 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14801echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14802if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14803 echo $ECHO_N "(cached) $ECHO_C" >&6
14804fi
14805ac_res=`eval echo '${'$as_ac_Header'}'`
14806 { echo "$as_me:$LINENO: result: $ac_res" >&5
14807echo "${ECHO_T}$ac_res" >&6; }
14808else
14809 # Is the header compilable?
14810{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
14811echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
14812cat >conftest.$ac_ext <<_ACEOF
14813/* confdefs.h. */
14814_ACEOF
14815cat confdefs.h >>conftest.$ac_ext
14816cat >>conftest.$ac_ext <<_ACEOF
14817/* end confdefs.h. */
14818$ac_includes_default
14819#include <$ac_header>
14820_ACEOF
14821rm -f conftest.$ac_objext
14822if { (ac_try="$ac_compile"
14823case "(($ac_try" in
14824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14825 *) ac_try_echo=$ac_try;;
14826esac
14827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14828 (eval "$ac_compile") 2>conftest.er1
14829 ac_status=$?
14830 grep -v '^ *+' conftest.er1 >conftest.err
14831 rm -f conftest.er1
14832 cat conftest.err >&5
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); } && {
14835 test -z "$ac_c_werror_flag" ||
14836 test ! -s conftest.err
14837 } && test -s conftest.$ac_objext; then
14838 ac_header_compiler=yes
14839else
14840 echo "$as_me: failed program was:" >&5
14841sed 's/^/| /' conftest.$ac_ext >&5
14842
14843 ac_header_compiler=no
14844fi
14845
14846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14847{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14848echo "${ECHO_T}$ac_header_compiler" >&6; }
14849
14850# Is the header present?
14851{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
14852echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
14853cat >conftest.$ac_ext <<_ACEOF
14854/* confdefs.h. */
14855_ACEOF
14856cat confdefs.h >>conftest.$ac_ext
14857cat >>conftest.$ac_ext <<_ACEOF
14858/* end confdefs.h. */
14859#include <$ac_header>
14860_ACEOF
14861if { (ac_try="$ac_cpp conftest.$ac_ext"
14862case "(($ac_try" in
14863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14864 *) ac_try_echo=$ac_try;;
14865esac
14866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14867 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14868 ac_status=$?
14869 grep -v '^ *+' conftest.er1 >conftest.err
14870 rm -f conftest.er1
14871 cat conftest.err >&5
14872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14873 (exit $ac_status); } >/dev/null && {
14874 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14875 test ! -s conftest.err
14876 }; then
14877 ac_header_preproc=yes
14878else
14879 echo "$as_me: failed program was:" >&5
14880sed 's/^/| /' conftest.$ac_ext >&5
14881
14882 ac_header_preproc=no
14883fi
14884
14885rm -f conftest.err conftest.$ac_ext
14886{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14887echo "${ECHO_T}$ac_header_preproc" >&6; }
14888
14889# So? What about this header?
14890case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14891 yes:no: )
14892 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14893echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14894 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14895echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14896 ac_header_preproc=yes
14897 ;;
14898 no:yes:* )
14899 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14900echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14901 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14902echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14903 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14904echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14905 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14906echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14907 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14908echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14909 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14910echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14911
14912 ;;
14913esac
14914{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14915echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14916if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14917 echo $ECHO_N "(cached) $ECHO_C" >&6
14918else
14919 eval "$as_ac_Header=\$ac_header_preproc"
14920fi
14921ac_res=`eval echo '${'$as_ac_Header'}'`
14922 { echo "$as_me:$LINENO: result: $ac_res" >&5
14923echo "${ECHO_T}$ac_res" >&6; }
14924
14925fi
14926if test `eval echo '${'$as_ac_Header'}'` = yes; then
14927 cat >>confdefs.h <<_ACEOF
14928#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14929_ACEOF
14930
14931fi
14932
14933done
14934
6a3a24fa
JD
14935 ## Specify the install directory
14936 carbon_appdir=
14937 if test "${carbon_appdir_x}" != ""; then
14938 case ${carbon_appdir_x} in
14939 y | ye | yes) carbon_appdir=/Applications ;;
14940 * ) carbon_appdir=${carbon_appdir_x} ;;
14941 esac
7c9e5167 14942 fi
8f417b3b
AS
14943 # We also have mouse menus.
14944 HAVE_MENUS=yes
e0f712ba
AC
14945fi
14946
98418dba
CW
14947### Use session management (-lSM -lICE) if available
14948HAVE_X_SM=no
14949if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14950 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14951 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14952echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14953if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14954 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14955fi
ca81d7a0
JD
14956{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14957echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14958else
c0d27fcc 14959 # Is the header compilable?
ca81d7a0
JD
14960{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14961echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14962cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14963/* confdefs.h. */
14964_ACEOF
14965cat confdefs.h >>conftest.$ac_ext
14966cat >>conftest.$ac_ext <<_ACEOF
14967/* end confdefs.h. */
c0d27fcc
MR
14968$ac_includes_default
14969#include <X11/SM/SMlib.h>
14970_ACEOF
14971rm -f conftest.$ac_objext
ca81d7a0
JD
14972if { (ac_try="$ac_compile"
14973case "(($ac_try" in
14974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14975 *) ac_try_echo=$ac_try;;
14976esac
14977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14978 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14979 ac_status=$?
edfaf76d
LK
14980 grep -v '^ *+' conftest.er1 >conftest.err
14981 rm -f conftest.er1
14982 cat conftest.err >&5
c0d27fcc 14983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14984 (exit $ac_status); } && {
14985 test -z "$ac_c_werror_flag" ||
14986 test ! -s conftest.err
14987 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14988 ac_header_compiler=yes
14989else
14990 echo "$as_me: failed program was:" >&5
19650fd6
AS
14991sed 's/^/| /' conftest.$ac_ext >&5
14992
ca81d7a0 14993 ac_header_compiler=no
c0d27fcc 14994fi
ca81d7a0
JD
14995
14996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14997{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14998echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14999
15000# Is the header present?
ca81d7a0
JD
15001{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15002echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15003cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15004/* confdefs.h. */
15005_ACEOF
15006cat confdefs.h >>conftest.$ac_ext
15007cat >>conftest.$ac_ext <<_ACEOF
15008/* end confdefs.h. */
98418dba
CW
15009#include <X11/SM/SMlib.h>
15010_ACEOF
ca81d7a0
JD
15011if { (ac_try="$ac_cpp conftest.$ac_ext"
15012case "(($ac_try" in
15013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15014 *) ac_try_echo=$ac_try;;
15015esac
15016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15017 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15018 ac_status=$?
6bae0ccf 15019 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15020 rm -f conftest.er1
15021 cat conftest.err >&5
c0d27fcc 15022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15023 (exit $ac_status); } >/dev/null && {
15024 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15025 test ! -s conftest.err
15026 }; then
c0d27fcc 15027 ac_header_preproc=yes
98418dba
CW
15028else
15029 echo "$as_me: failed program was:" >&5
19650fd6
AS
15030sed 's/^/| /' conftest.$ac_ext >&5
15031
c0d27fcc 15032 ac_header_preproc=no
98418dba 15033fi
ca81d7a0 15034
98418dba 15035rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15036{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15037echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15038
15039# So? What about this header?
edfaf76d
LK
15040case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15041 yes:no: )
c0d27fcc
MR
15042 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15043echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15044 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15045echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15046 ac_header_preproc=yes
19650fd6 15047 ;;
edfaf76d 15048 no:yes:* )
c0d27fcc
MR
15049 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15050echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15051 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15052echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15053 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15054echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15055 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15056echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15057 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15058echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15059 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15060echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15061
19650fd6 15062 ;;
c0d27fcc 15063esac
ca81d7a0
JD
15064{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15065echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15066if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15067 echo $ECHO_N "(cached) $ECHO_C" >&6
15068else
15069 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15070fi
ca81d7a0
JD
15071{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15072echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15073
15074fi
98418dba 15075if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15076 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15077echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15078if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15079 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15080else
503d2be0 15081 ac_check_lib_save_LIBS=$LIBS
1660500f 15082LIBS="-lSM -lICE $LIBS"
503d2be0 15083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15084/* confdefs.h. */
15085_ACEOF
15086cat confdefs.h >>conftest.$ac_ext
15087cat >>conftest.$ac_ext <<_ACEOF
15088/* end confdefs.h. */
503d2be0 15089
ca81d7a0
JD
15090/* Override any GCC internal prototype to avoid an error.
15091 Use char because int might match the return type of a GCC
15092 builtin and then its argument prototype would still apply. */
503d2be0
AS
15093#ifdef __cplusplus
15094extern "C"
15095#endif
98418dba 15096char SmcOpenConnection ();
503d2be0
AS
15097int
15098main ()
15099{
ca81d7a0 15100return SmcOpenConnection ();
503d2be0
AS
15101 ;
15102 return 0;
15103}
15104_ACEOF
15105rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15106if { (ac_try="$ac_link"
15107case "(($ac_try" in
15108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15109 *) ac_try_echo=$ac_try;;
15110esac
15111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15112 (eval "$ac_link") 2>conftest.er1
503d2be0 15113 ac_status=$?
edfaf76d
LK
15114 grep -v '^ *+' conftest.er1 >conftest.err
15115 rm -f conftest.er1
15116 cat conftest.err >&5
c0d27fcc 15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15118 (exit $ac_status); } && {
15119 test -z "$ac_c_werror_flag" ||
15120 test ! -s conftest.err
15121 } && test -s conftest$ac_exeext &&
15122 $as_test_x conftest$ac_exeext; then
98418dba 15123 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15124else
15125 echo "$as_me: failed program was:" >&5
19650fd6
AS
15126sed 's/^/| /' conftest.$ac_ext >&5
15127
ca81d7a0 15128 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15129fi
ca81d7a0 15130
f053c89f 15131rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15132 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15133LIBS=$ac_check_lib_save_LIBS
15134fi
ca81d7a0
JD
15135{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15136echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15137if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15138 HAVE_X_SM=yes
73b77ee5
GM
15139fi
15140
73b77ee5 15141fi
73b77ee5 15142
c0d27fcc
MR
15143
15144
98418dba 15145 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15146
c0d27fcc 15147cat >>confdefs.h <<\_ACEOF
98418dba 15148#define HAVE_X_SM 1
c0d27fcc 15149_ACEOF
73b77ee5 15150
98418dba
CW
15151 case "$LIBS" in
15152 *-lSM*) ;;
15153 *) LIBS="-lSM -lICE $LIBS" ;;
15154 esac
73b77ee5 15155 fi
98418dba 15156fi
73b77ee5 15157
98418dba 15158# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15159{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15160echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15161if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15162 echo $ECHO_N "(cached) $ECHO_C" >&6
15163else
15164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15165/* confdefs.h. */
15166_ACEOF
15167cat confdefs.h >>conftest.$ac_ext
15168cat >>conftest.$ac_ext <<_ACEOF
15169/* end confdefs.h. */
98418dba 15170#include <netdb.h>
503d2be0
AS
15171int
15172main ()
15173{
98418dba 15174return h_errno;
503d2be0
AS
15175 ;
15176 return 0;
15177}
15178_ACEOF
15179rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15180if { (ac_try="$ac_link"
15181case "(($ac_try" in
15182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15183 *) ac_try_echo=$ac_try;;
15184esac
15185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15186 (eval "$ac_link") 2>conftest.er1
503d2be0 15187 ac_status=$?
edfaf76d
LK
15188 grep -v '^ *+' conftest.er1 >conftest.err
15189 rm -f conftest.er1
15190 cat conftest.err >&5
c0d27fcc 15191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15192 (exit $ac_status); } && {
15193 test -z "$ac_c_werror_flag" ||
15194 test ! -s conftest.err
15195 } && test -s conftest$ac_exeext &&
15196 $as_test_x conftest$ac_exeext; then
98418dba 15197 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15198else
503d2be0 15199 echo "$as_me: failed program was:" >&5
19650fd6
AS
15200sed 's/^/| /' conftest.$ac_ext >&5
15201
ca81d7a0 15202 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15203fi
ca81d7a0 15204
f053c89f 15205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15206 conftest$ac_exeext conftest.$ac_ext
98418dba 15207fi
ca81d7a0
JD
15208{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15209echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15210if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15211
c0d27fcc 15212cat >>confdefs.h <<\_ACEOF
98418dba 15213#define HAVE_H_ERRNO 1
c0d27fcc 15214_ACEOF
73b77ee5 15215
98418dba
CW
15216fi
15217
15218# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15219# for constant arguments. Useless!
ca81d7a0
JD
15220{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15221echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15222if test "${ac_cv_working_alloca_h+set}" = set; then
15223 echo $ECHO_N "(cached) $ECHO_C" >&6
15224else
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. */
98418dba 15231#include <alloca.h>
503d2be0
AS
15232int
15233main ()
15234{
98418dba 15235char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15236 if (p) return 0;
503d2be0
AS
15237 ;
15238 return 0;
15239}
15240_ACEOF
15241rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15242if { (ac_try="$ac_link"
15243case "(($ac_try" in
15244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15245 *) ac_try_echo=$ac_try;;
15246esac
15247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15248 (eval "$ac_link") 2>conftest.er1
503d2be0 15249 ac_status=$?
edfaf76d
LK
15250 grep -v '^ *+' conftest.er1 >conftest.err
15251 rm -f conftest.er1
15252 cat conftest.err >&5
c0d27fcc 15253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15254 (exit $ac_status); } && {
15255 test -z "$ac_c_werror_flag" ||
15256 test ! -s conftest.err
15257 } && test -s conftest$ac_exeext &&
15258 $as_test_x conftest$ac_exeext; then
98418dba 15259 ac_cv_working_alloca_h=yes
73b77ee5 15260else
503d2be0 15261 echo "$as_me: failed program was:" >&5
19650fd6
AS
15262sed 's/^/| /' conftest.$ac_ext >&5
15263
ca81d7a0 15264 ac_cv_working_alloca_h=no
73b77ee5 15265fi
ca81d7a0 15266
f053c89f 15267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15268 conftest$ac_exeext conftest.$ac_ext
98418dba 15269fi
ca81d7a0
JD
15270{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15271echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15272if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15273
c0d27fcc 15274cat >>confdefs.h <<\_ACEOF
98418dba 15275#define HAVE_ALLOCA_H 1
c0d27fcc 15276_ACEOF
98418dba
CW
15277
15278fi
15279
ca81d7a0
JD
15280{ echo "$as_me:$LINENO: checking for alloca" >&5
15281echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15282if test "${ac_cv_func_alloca_works+set}" = set; then
15283 echo $ECHO_N "(cached) $ECHO_C" >&6
15284else
503d2be0 15285 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15286/* confdefs.h. */
15287_ACEOF
15288cat confdefs.h >>conftest.$ac_ext
15289cat >>conftest.$ac_ext <<_ACEOF
15290/* end confdefs.h. */
98418dba
CW
15291#ifdef __GNUC__
15292# define alloca __builtin_alloca
15293#else
15294# ifdef _MSC_VER
15295# include <malloc.h>
15296# define alloca _alloca
15297# else
f053c89f 15298# ifdef HAVE_ALLOCA_H
98418dba
CW
15299# include <alloca.h>
15300# else
15301# ifdef _AIX
15302 #pragma alloca
15303# else
15304# ifndef alloca /* predefined by HP cc +Olibcalls */
15305char *alloca ();
15306# endif
15307# endif
15308# endif
15309# endif
15310#endif
15311
503d2be0
AS
15312int
15313main ()
15314{
98418dba 15315char *p = (char *) alloca (1);
ca81d7a0 15316 if (p) return 0;
503d2be0
AS
15317 ;
15318 return 0;
15319}
15320_ACEOF
15321rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15322if { (ac_try="$ac_link"
15323case "(($ac_try" in
15324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15325 *) ac_try_echo=$ac_try;;
15326esac
15327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15328 (eval "$ac_link") 2>conftest.er1
503d2be0 15329 ac_status=$?
edfaf76d
LK
15330 grep -v '^ *+' conftest.er1 >conftest.err
15331 rm -f conftest.er1
15332 cat conftest.err >&5
c0d27fcc 15333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15334 (exit $ac_status); } && {
15335 test -z "$ac_c_werror_flag" ||
15336 test ! -s conftest.err
15337 } && test -s conftest$ac_exeext &&
15338 $as_test_x conftest$ac_exeext; then
98418dba 15339 ac_cv_func_alloca_works=yes
ac95a621 15340else
503d2be0 15341 echo "$as_me: failed program was:" >&5
19650fd6
AS
15342sed 's/^/| /' conftest.$ac_ext >&5
15343
ca81d7a0 15344 ac_cv_func_alloca_works=no
ac95a621 15345fi
ca81d7a0 15346
f053c89f 15347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15348 conftest$ac_exeext conftest.$ac_ext
98418dba 15349fi
ca81d7a0
JD
15350{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15351echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15352
98418dba
CW
15353if test $ac_cv_func_alloca_works = yes; then
15354
c0d27fcc 15355cat >>confdefs.h <<\_ACEOF
98418dba 15356#define HAVE_ALLOCA 1
c0d27fcc 15357_ACEOF
98418dba
CW
15358
15359else
15360 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15361# that cause trouble. Some versions do not even contain alloca or
15362# contain a buggy version. If you still want to use their alloca,
15363# use ar to extract alloca.o from them instead of compiling alloca.c.
15364
ca81d7a0 15365ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15366
c0d27fcc 15367cat >>confdefs.h <<\_ACEOF
98418dba 15368#define C_ALLOCA 1
c0d27fcc 15369_ACEOF
98418dba 15370
c0d27fcc 15371
ca81d7a0
JD
15372{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15373echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15374if test "${ac_cv_os_cray+set}" = set; then
15375 echo $ECHO_N "(cached) $ECHO_C" >&6
15376else
15377 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15378/* confdefs.h. */
15379_ACEOF
15380cat confdefs.h >>conftest.$ac_ext
15381cat >>conftest.$ac_ext <<_ACEOF
15382/* end confdefs.h. */
ca81d7a0 15383#if defined CRAY && ! defined CRAY2
98418dba
CW
15384webecray
15385#else
15386wenotbecray
15387#endif
15388
15389_ACEOF
15390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15391 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15392 ac_cv_os_cray=yes
15393else
15394 ac_cv_os_cray=no
15395fi
15396rm -f conftest*
ac95a621 15397
98418dba 15398fi
ca81d7a0
JD
15399{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15400echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15401if test $ac_cv_os_cray = yes; then
15402 for ac_func in _getb67 GETB67 getb67; do
15403 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15404{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15405echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15406if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15407 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15408else
503d2be0 15409 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15410/* confdefs.h. */
15411_ACEOF
15412cat confdefs.h >>conftest.$ac_ext
15413cat >>conftest.$ac_ext <<_ACEOF
15414/* end confdefs.h. */
edfaf76d
LK
15415/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15416 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15417#define $ac_func innocuous_$ac_func
15418
73b77ee5 15419/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15420 which can conflict with char $ac_func (); below.
15421 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15422 <limits.h> exists even on freestanding compilers. */
edfaf76d 15423
19650fd6
AS
15424#ifdef __STDC__
15425# include <limits.h>
15426#else
15427# include <assert.h>
15428#endif
edfaf76d
LK
15429
15430#undef $ac_func
15431
ca81d7a0
JD
15432/* Override any GCC internal prototype to avoid an error.
15433 Use char because int might match the return type of a GCC
15434 builtin and then its argument prototype would still apply. */
503d2be0
AS
15435#ifdef __cplusplus
15436extern "C"
15437#endif
503d2be0 15438char $ac_func ();
73b77ee5
GM
15439/* The GNU C library defines this for functions which it implements
15440 to always fail with ENOSYS. Some functions are actually named
15441 something starting with __ and the normal name is an alias. */
ca81d7a0 15442#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15443choke me
73b77ee5
GM
15444#endif
15445
19650fd6
AS
15446int
15447main ()
15448{
ca81d7a0 15449return $ac_func ();
503d2be0
AS
15450 ;
15451 return 0;
15452}
15453_ACEOF
15454rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15455if { (ac_try="$ac_link"
15456case "(($ac_try" in
15457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15458 *) ac_try_echo=$ac_try;;
15459esac
15460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15461 (eval "$ac_link") 2>conftest.er1
503d2be0 15462 ac_status=$?
edfaf76d
LK
15463 grep -v '^ *+' conftest.er1 >conftest.err
15464 rm -f conftest.er1
15465 cat conftest.err >&5
c0d27fcc 15466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15467 (exit $ac_status); } && {
15468 test -z "$ac_c_werror_flag" ||
15469 test ! -s conftest.err
15470 } && test -s conftest$ac_exeext &&
15471 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15472 eval "$as_ac_var=yes"
15473else
15474 echo "$as_me: failed program was:" >&5
19650fd6
AS
15475sed 's/^/| /' conftest.$ac_ext >&5
15476
ca81d7a0 15477 eval "$as_ac_var=no"
503d2be0 15478fi
ca81d7a0 15479
f053c89f 15480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15481 conftest$ac_exeext conftest.$ac_ext
503d2be0 15482fi
ca81d7a0
JD
15483ac_res=`eval echo '${'$as_ac_var'}'`
15484 { echo "$as_me:$LINENO: result: $ac_res" >&5
15485echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15486if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15487
c0d27fcc 15488cat >>confdefs.h <<_ACEOF
98418dba 15489#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15490_ACEOF
98418dba
CW
15491
15492 break
73b77ee5 15493fi
73b77ee5 15494
98418dba 15495 done
73b77ee5
GM
15496fi
15497
ca81d7a0
JD
15498{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15499echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15500if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15501 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15502else
15503 if test "$cross_compiling" = yes; then
15504 ac_cv_c_stack_direction=0
73b77ee5 15505else
503d2be0 15506 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15507/* confdefs.h. */
15508_ACEOF
15509cat confdefs.h >>conftest.$ac_ext
15510cat >>conftest.$ac_ext <<_ACEOF
15511/* end confdefs.h. */
ca81d7a0 15512$ac_includes_default
503d2be0 15513int
98418dba 15514find_stack_direction ()
503d2be0 15515{
98418dba
CW
15516 static char *addr = 0;
15517 auto char dummy;
15518 if (addr == 0)
15519 {
15520 addr = &dummy;
15521 return find_stack_direction ();
15522 }
73b77ee5 15523 else
98418dba
CW
15524 return (&dummy > addr) ? 1 : -1;
15525}
ba4481b5 15526
503d2be0
AS
15527int
15528main ()
15529{
ca81d7a0 15530 return find_stack_direction () < 0;
503d2be0
AS
15531}
15532_ACEOF
98418dba 15533rm -f conftest$ac_exeext
ca81d7a0
JD
15534if { (ac_try="$ac_link"
15535case "(($ac_try" in
15536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15537 *) ac_try_echo=$ac_try;;
15538esac
15539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15540 (eval "$ac_link") 2>&5
503d2be0 15541 ac_status=$?
c0d27fcc 15542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15544 { (case "(($ac_try" in
15545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15546 *) ac_try_echo=$ac_try;;
15547esac
15548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15549 (eval "$ac_try") 2>&5
503d2be0 15550 ac_status=$?
c0d27fcc 15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15552 (exit $ac_status); }; }; then
98418dba 15553 ac_cv_c_stack_direction=1
ba4481b5 15554else
98418dba
CW
15555 echo "$as_me: program exited with status $ac_status" >&5
15556echo "$as_me: failed program was:" >&5
19650fd6
AS
15557sed 's/^/| /' conftest.$ac_ext >&5
15558
c0d27fcc 15559( exit $ac_status )
98418dba 15560ac_cv_c_stack_direction=-1
ba4481b5 15561fi
ca81d7a0 15562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15563fi
ca81d7a0
JD
15564
15565
98418dba 15566fi
ca81d7a0
JD
15567{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15568echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15569
c0d27fcc 15570cat >>confdefs.h <<_ACEOF
98418dba 15571#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15572_ACEOF
15573
ba4481b5 15574
ba4481b5
DL
15575fi
15576
c0d27fcc 15577
611adb3e
GM
15578if test x"$ac_cv_func_alloca_works" != xyes; then
15579 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15580echo "$as_me: error: a system implementation of alloca is required " >&2;}
15581 { (exit 1); exit 1; }; }
15582fi
15583
98418dba
CW
15584# fmod, logb, and frexp are found in -lm on most systems.
15585# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15586
ca81d7a0
JD
15587{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15588echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15589if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15590 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15591else
98418dba
CW
15592 ac_check_lib_save_LIBS=$LIBS
15593LIBS="-lm $LIBS"
15594cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15595/* confdefs.h. */
15596_ACEOF
15597cat confdefs.h >>conftest.$ac_ext
15598cat >>conftest.$ac_ext <<_ACEOF
15599/* end confdefs.h. */
ba4481b5 15600
ca81d7a0
JD
15601/* Override any GCC internal prototype to avoid an error.
15602 Use char because int might match the return type of a GCC
15603 builtin and then its argument prototype would still apply. */
98418dba
CW
15604#ifdef __cplusplus
15605extern "C"
15606#endif
98418dba 15607char sqrt ();
503d2be0
AS
15608int
15609main ()
15610{
ca81d7a0 15611return sqrt ();
503d2be0
AS
15612 ;
15613 return 0;
15614}
15615_ACEOF
15616rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15617if { (ac_try="$ac_link"
15618case "(($ac_try" in
15619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15620 *) ac_try_echo=$ac_try;;
15621esac
15622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15623 (eval "$ac_link") 2>conftest.er1
503d2be0 15624 ac_status=$?
edfaf76d
LK
15625 grep -v '^ *+' conftest.er1 >conftest.err
15626 rm -f conftest.er1
15627 cat conftest.err >&5
c0d27fcc 15628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15629 (exit $ac_status); } && {
15630 test -z "$ac_c_werror_flag" ||
15631 test ! -s conftest.err
15632 } && test -s conftest$ac_exeext &&
15633 $as_test_x conftest$ac_exeext; then
98418dba 15634 ac_cv_lib_m_sqrt=yes
ba4481b5 15635else
503d2be0 15636 echo "$as_me: failed program was:" >&5
19650fd6
AS
15637sed 's/^/| /' conftest.$ac_ext >&5
15638
ca81d7a0 15639 ac_cv_lib_m_sqrt=no
ba4481b5 15640fi
ca81d7a0 15641
f053c89f 15642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15643 conftest$ac_exeext conftest.$ac_ext
98418dba 15644LIBS=$ac_check_lib_save_LIBS
ba4481b5 15645fi
ca81d7a0
JD
15646{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15647echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15648if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15649 cat >>confdefs.h <<_ACEOF
98418dba 15650#define HAVE_LIBM 1
c0d27fcc 15651_ACEOF
98418dba
CW
15652
15653 LIBS="-lm $LIBS"
ba4481b5 15654
ba4481b5
DL
15655fi
15656
c0d27fcc 15657
55597d70
DL
15658# Check for mail-locking functions in a "mail" library. Probably this should
15659# have the same check as for liblockfile below.
98418dba 15660
ca81d7a0
JD
15661{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15662echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15663if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15664 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15665else
98418dba
CW
15666 ac_check_lib_save_LIBS=$LIBS
15667LIBS="-lmail $LIBS"
15668cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15669/* confdefs.h. */
15670_ACEOF
15671cat confdefs.h >>conftest.$ac_ext
15672cat >>conftest.$ac_ext <<_ACEOF
15673/* end confdefs.h. */
98418dba 15674
ca81d7a0
JD
15675/* Override any GCC internal prototype to avoid an error.
15676 Use char because int might match the return type of a GCC
15677 builtin and then its argument prototype would still apply. */
98418dba
CW
15678#ifdef __cplusplus
15679extern "C"
15680#endif
98418dba 15681char maillock ();
503d2be0
AS
15682int
15683main ()
15684{
ca81d7a0 15685return maillock ();
503d2be0
AS
15686 ;
15687 return 0;
15688}
15689_ACEOF
15690rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15691if { (ac_try="$ac_link"
15692case "(($ac_try" in
15693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15694 *) ac_try_echo=$ac_try;;
15695esac
15696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15697 (eval "$ac_link") 2>conftest.er1
503d2be0 15698 ac_status=$?
edfaf76d
LK
15699 grep -v '^ *+' conftest.er1 >conftest.err
15700 rm -f conftest.er1
15701 cat conftest.err >&5
c0d27fcc 15702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15703 (exit $ac_status); } && {
15704 test -z "$ac_c_werror_flag" ||
15705 test ! -s conftest.err
15706 } && test -s conftest$ac_exeext &&
15707 $as_test_x conftest$ac_exeext; then
98418dba 15708 ac_cv_lib_mail_maillock=yes
ba4481b5 15709else
503d2be0 15710 echo "$as_me: failed program was:" >&5
19650fd6
AS
15711sed 's/^/| /' conftest.$ac_ext >&5
15712
ca81d7a0 15713 ac_cv_lib_mail_maillock=no
ba4481b5 15714fi
ca81d7a0 15715
f053c89f 15716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15717 conftest$ac_exeext conftest.$ac_ext
98418dba 15718LIBS=$ac_check_lib_save_LIBS
ba4481b5 15719fi
ca81d7a0
JD
15720{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15721echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15722if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15723 cat >>confdefs.h <<_ACEOF
98418dba 15724#define HAVE_LIBMAIL 1
c0d27fcc 15725_ACEOF
ba4481b5 15726
98418dba 15727 LIBS="-lmail $LIBS"
ba4481b5 15728
98418dba 15729fi
ba4481b5 15730
c0d27fcc 15731
ca81d7a0
JD
15732{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15733echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15734if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15735 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15736else
503d2be0 15737 ac_check_lib_save_LIBS=$LIBS
98418dba 15738LIBS="-llockfile $LIBS"
503d2be0 15739cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15740/* confdefs.h. */
15741_ACEOF
15742cat confdefs.h >>conftest.$ac_ext
15743cat >>conftest.$ac_ext <<_ACEOF
15744/* end confdefs.h. */
503d2be0 15745
ca81d7a0
JD
15746/* Override any GCC internal prototype to avoid an error.
15747 Use char because int might match the return type of a GCC
15748 builtin and then its argument prototype would still apply. */
503d2be0
AS
15749#ifdef __cplusplus
15750extern "C"
15751#endif
98418dba 15752char maillock ();
503d2be0
AS
15753int
15754main ()
15755{
ca81d7a0 15756return maillock ();
503d2be0
AS
15757 ;
15758 return 0;
15759}
15760_ACEOF
15761rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15762if { (ac_try="$ac_link"
15763case "(($ac_try" in
15764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15765 *) ac_try_echo=$ac_try;;
15766esac
15767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15768 (eval "$ac_link") 2>conftest.er1
503d2be0 15769 ac_status=$?
edfaf76d
LK
15770 grep -v '^ *+' conftest.er1 >conftest.err
15771 rm -f conftest.er1
15772 cat conftest.err >&5
c0d27fcc 15773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15774 (exit $ac_status); } && {
15775 test -z "$ac_c_werror_flag" ||
15776 test ! -s conftest.err
15777 } && test -s conftest$ac_exeext &&
15778 $as_test_x conftest$ac_exeext; then
98418dba 15779 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15780else
15781 echo "$as_me: failed program was:" >&5
19650fd6
AS
15782sed 's/^/| /' conftest.$ac_ext >&5
15783
ca81d7a0 15784 ac_cv_lib_lockfile_maillock=no
98418dba 15785fi
ca81d7a0 15786
f053c89f 15787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15788 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15789LIBS=$ac_check_lib_save_LIBS
15790fi
ca81d7a0
JD
15791{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15792echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15793if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15794 cat >>confdefs.h <<_ACEOF
98418dba 15795#define HAVE_LIBLOCKFILE 1
c0d27fcc 15796_ACEOF
98418dba
CW
15797
15798 LIBS="-llockfile $LIBS"
15799
15800fi
15801
15802# If we have the shared liblockfile, assume we must use it for mail
15803# locking (e.g. Debian). If we couldn't link against liblockfile
15804# (no liblockfile.a installed), ensure that we don't need to.
15805if test "$ac_cv_lib_lockfile_maillock" = no; then
15806 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15807set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15808{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15809echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15810if test "${ac_cv_prog_liblockfile+set}" = set; then
15811 echo $ECHO_N "(cached) $ECHO_C" >&6
15812else
15813 if test -n "$liblockfile"; then
15814 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15815else
c0d27fcc 15816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15817as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15818for as_dir in $as_dummy
c0d27fcc
MR
15819do
15820 IFS=$as_save_IFS
15821 test -z "$as_dir" && as_dir=.
15822 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15823 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15824 ac_cv_prog_liblockfile="yes"
15825 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15826 break 2
15827 fi
15828done
98418dba 15829done
ca81d7a0 15830IFS=$as_save_IFS
98418dba
CW
15831
15832 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15833fi
503d2be0 15834fi
98418dba
CW
15835liblockfile=$ac_cv_prog_liblockfile
15836if test -n "$liblockfile"; then
ca81d7a0
JD
15837 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15838echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15839else
ca81d7a0
JD
15840 { echo "$as_me:$LINENO: result: no" >&5
15841echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15842fi
15843
ca81d7a0 15844
98418dba 15845 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15846 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15847This probably means that movemail could lose mail.
15848There may be a \`development' package to install containing liblockfile." >&5
15849echo "$as_me: error: Shared liblockfile found but can't link against it.
15850This probably means that movemail could lose mail.
15851There may be a \`development' package to install containing liblockfile." >&2;}
15852 { (exit 1); exit 1; }; }
98418dba 15853 else :
55597d70 15854 fi
98418dba 15855fi
503d2be0 15856
98418dba
CW
15857for ac_func in touchlock
15858do
15859as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15860{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15861echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15862if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15863 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15864else
98418dba 15865 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15866/* confdefs.h. */
15867_ACEOF
15868cat confdefs.h >>conftest.$ac_ext
15869cat >>conftest.$ac_ext <<_ACEOF
15870/* end confdefs.h. */
edfaf76d
LK
15871/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15872 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15873#define $ac_func innocuous_$ac_func
15874
98418dba 15875/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15876 which can conflict with char $ac_func (); below.
15877 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15878 <limits.h> exists even on freestanding compilers. */
edfaf76d 15879
19650fd6
AS
15880#ifdef __STDC__
15881# include <limits.h>
15882#else
15883# include <assert.h>
15884#endif
edfaf76d
LK
15885
15886#undef $ac_func
15887
ca81d7a0
JD
15888/* Override any GCC internal prototype to avoid an error.
15889 Use char because int might match the return type of a GCC
15890 builtin and then its argument prototype would still apply. */
503d2be0
AS
15891#ifdef __cplusplus
15892extern "C"
15893#endif
98418dba 15894char $ac_func ();
98418dba
CW
15895/* The GNU C library defines this for functions which it implements
15896 to always fail with ENOSYS. Some functions are actually named
15897 something starting with __ and the normal name is an alias. */
ca81d7a0 15898#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15899choke me
cd958eb3
MB
15900#endif
15901
19650fd6
AS
15902int
15903main ()
15904{
ca81d7a0 15905return $ac_func ();
503d2be0
AS
15906 ;
15907 return 0;
15908}
15909_ACEOF
15910rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15911if { (ac_try="$ac_link"
15912case "(($ac_try" in
15913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15914 *) ac_try_echo=$ac_try;;
15915esac
15916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15917 (eval "$ac_link") 2>conftest.er1
503d2be0 15918 ac_status=$?
edfaf76d
LK
15919 grep -v '^ *+' conftest.er1 >conftest.err
15920 rm -f conftest.er1
15921 cat conftest.err >&5
c0d27fcc 15922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15923 (exit $ac_status); } && {
15924 test -z "$ac_c_werror_flag" ||
15925 test ! -s conftest.err
15926 } && test -s conftest$ac_exeext &&
15927 $as_test_x conftest$ac_exeext; then
98418dba 15928 eval "$as_ac_var=yes"
503d2be0
AS
15929else
15930 echo "$as_me: failed program was:" >&5
19650fd6
AS
15931sed 's/^/| /' conftest.$ac_ext >&5
15932
ca81d7a0 15933 eval "$as_ac_var=no"
503d2be0 15934fi
ca81d7a0 15935
f053c89f 15936rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15937 conftest$ac_exeext conftest.$ac_ext
503d2be0 15938fi
ca81d7a0
JD
15939ac_res=`eval echo '${'$as_ac_var'}'`
15940 { echo "$as_me:$LINENO: result: $ac_res" >&5
15941echo "${ECHO_T}$ac_res" >&6; }
98418dba 15942if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15943 cat >>confdefs.h <<_ACEOF
98418dba 15944#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15945_ACEOF
457b792c 15946
457b792c 15947fi
98418dba 15948done
457b792c 15949
c0d27fcc 15950
98418dba
CW
15951for ac_header in maillock.h
15952do
15953as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15954if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15955 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15956echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15957if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15958 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15959fi
ca81d7a0
JD
15960ac_res=`eval echo '${'$as_ac_Header'}'`
15961 { echo "$as_me:$LINENO: result: $ac_res" >&5
15962echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15963else
c0d27fcc 15964 # Is the header compilable?
ca81d7a0
JD
15965{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15966echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15967cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15968/* confdefs.h. */
15969_ACEOF
15970cat confdefs.h >>conftest.$ac_ext
15971cat >>conftest.$ac_ext <<_ACEOF
15972/* end confdefs.h. */
c0d27fcc
MR
15973$ac_includes_default
15974#include <$ac_header>
15975_ACEOF
15976rm -f conftest.$ac_objext
ca81d7a0
JD
15977if { (ac_try="$ac_compile"
15978case "(($ac_try" in
15979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15980 *) ac_try_echo=$ac_try;;
15981esac
15982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15983 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15984 ac_status=$?
edfaf76d
LK
15985 grep -v '^ *+' conftest.er1 >conftest.err
15986 rm -f conftest.er1
15987 cat conftest.err >&5
c0d27fcc 15988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15989 (exit $ac_status); } && {
15990 test -z "$ac_c_werror_flag" ||
15991 test ! -s conftest.err
15992 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15993 ac_header_compiler=yes
15994else
15995 echo "$as_me: failed program was:" >&5
19650fd6
AS
15996sed 's/^/| /' conftest.$ac_ext >&5
15997
ca81d7a0 15998 ac_header_compiler=no
c0d27fcc 15999fi
ca81d7a0
JD
16000
16001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16002{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16003echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16004
16005# Is the header present?
ca81d7a0
JD
16006{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16007echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16008cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16009/* confdefs.h. */
16010_ACEOF
16011cat confdefs.h >>conftest.$ac_ext
16012cat >>conftest.$ac_ext <<_ACEOF
16013/* end confdefs.h. */
98418dba 16014#include <$ac_header>
503d2be0 16015_ACEOF
ca81d7a0
JD
16016if { (ac_try="$ac_cpp conftest.$ac_ext"
16017case "(($ac_try" in
16018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16019 *) ac_try_echo=$ac_try;;
16020esac
16021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16022 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16023 ac_status=$?
6bae0ccf 16024 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16025 rm -f conftest.er1
16026 cat conftest.err >&5
c0d27fcc 16027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16028 (exit $ac_status); } >/dev/null && {
16029 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16030 test ! -s conftest.err
16031 }; then
c0d27fcc 16032 ac_header_preproc=yes
98418dba
CW
16033else
16034 echo "$as_me: failed program was:" >&5
19650fd6
AS
16035sed 's/^/| /' conftest.$ac_ext >&5
16036
c0d27fcc 16037 ac_header_preproc=no
503d2be0 16038fi
ca81d7a0 16039
98418dba 16040rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16041{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16042echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16043
16044# So? What about this header?
edfaf76d
LK
16045case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16046 yes:no: )
c0d27fcc
MR
16047 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16048echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16049 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16050echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16051 ac_header_preproc=yes
19650fd6 16052 ;;
edfaf76d 16053 no:yes:* )
c0d27fcc
MR
16054 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16055echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16056 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16057echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16058 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16059echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16060 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16061echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16062 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16063echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16064 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16065echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16066
19650fd6 16067 ;;
c0d27fcc 16068esac
ca81d7a0
JD
16069{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16070echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16071if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16072 echo $ECHO_N "(cached) $ECHO_C" >&6
16073else
edfaf76d 16074 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16075fi
ca81d7a0
JD
16076ac_res=`eval echo '${'$as_ac_Header'}'`
16077 { echo "$as_me:$LINENO: result: $ac_res" >&5
16078echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16079
16080fi
98418dba 16081if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16082 cat >>confdefs.h <<_ACEOF
98418dba 16083#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16084_ACEOF
48d4b120 16085
ba4481b5 16086fi
c0d27fcc 16087
98418dba
CW
16088done
16089
c0d27fcc
MR
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
22044edf
DL
16145
16146
c0d27fcc 16147
b0e44248
RB
16148
16149
973a76b1
DL
16150
16151
16152
cd958eb3 16153
25ca0bca 16154
ea92fc9f 16155
2d3c36ae
SM
16156
16157
e2fcf543 16158
c0d27fcc
MR
16159
16160
98418dba 16161for ac_func in gethostname getdomainname dup2 \
e2fcf543 16162rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16163random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16164strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 16165utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16166__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16167sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16168gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16169memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16170cfmakeraw cfsetspeed
98418dba
CW
16171do
16172as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16173{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16174echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16175if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16176 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16177else
503d2be0 16178 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16179/* confdefs.h. */
16180_ACEOF
16181cat confdefs.h >>conftest.$ac_ext
16182cat >>conftest.$ac_ext <<_ACEOF
16183/* end confdefs.h. */
edfaf76d
LK
16184/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16186#define $ac_func innocuous_$ac_func
16187
98418dba 16188/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16189 which can conflict with char $ac_func (); below.
16190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16191 <limits.h> exists even on freestanding compilers. */
edfaf76d 16192
19650fd6
AS
16193#ifdef __STDC__
16194# include <limits.h>
16195#else
16196# include <assert.h>
16197#endif
edfaf76d
LK
16198
16199#undef $ac_func
16200
ca81d7a0
JD
16201/* Override any GCC internal prototype to avoid an error.
16202 Use char because int might match the return type of a GCC
16203 builtin and then its argument prototype would still apply. */
503d2be0
AS
16204#ifdef __cplusplus
16205extern "C"
16206#endif
98418dba 16207char $ac_func ();
98418dba
CW
16208/* The GNU C library defines this for functions which it implements
16209 to always fail with ENOSYS. Some functions are actually named
16210 something starting with __ and the normal name is an alias. */
ca81d7a0 16211#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16212choke me
98418dba
CW
16213#endif
16214
19650fd6
AS
16215int
16216main ()
16217{
ca81d7a0 16218return $ac_func ();
503d2be0
AS
16219 ;
16220 return 0;
16221}
16222_ACEOF
16223rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16224if { (ac_try="$ac_link"
16225case "(($ac_try" in
16226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16227 *) ac_try_echo=$ac_try;;
16228esac
16229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16230 (eval "$ac_link") 2>conftest.er1
503d2be0 16231 ac_status=$?
edfaf76d
LK
16232 grep -v '^ *+' conftest.er1 >conftest.err
16233 rm -f conftest.er1
16234 cat conftest.err >&5
c0d27fcc 16235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16236 (exit $ac_status); } && {
16237 test -z "$ac_c_werror_flag" ||
16238 test ! -s conftest.err
16239 } && test -s conftest$ac_exeext &&
16240 $as_test_x conftest$ac_exeext; then
98418dba 16241 eval "$as_ac_var=yes"
503d2be0
AS
16242else
16243 echo "$as_me: failed program was:" >&5
19650fd6
AS
16244sed 's/^/| /' conftest.$ac_ext >&5
16245
ca81d7a0 16246 eval "$as_ac_var=no"
503d2be0 16247fi
ca81d7a0 16248
f053c89f 16249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16250 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16251fi
ca81d7a0
JD
16252ac_res=`eval echo '${'$as_ac_var'}'`
16253 { echo "$as_me:$LINENO: result: $ac_res" >&5
16254echo "${ECHO_T}$ac_res" >&6; }
98418dba 16255if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16256 cat >>confdefs.h <<_ACEOF
98418dba 16257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16258_ACEOF
ba4481b5 16259
ba4481b5 16260fi
98418dba 16261done
ba4481b5 16262
c0d27fcc
MR
16263
16264
98418dba
CW
16265for ac_header in sys/un.h
16266do
16267as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16268if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16269 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16270echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16271if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16272 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16273fi
ca81d7a0
JD
16274ac_res=`eval echo '${'$as_ac_Header'}'`
16275 { echo "$as_me:$LINENO: result: $ac_res" >&5
16276echo "${ECHO_T}$ac_res" >&6; }
98418dba 16277else
c0d27fcc 16278 # Is the header compilable?
ca81d7a0
JD
16279{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16280echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16281cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16282/* confdefs.h. */
16283_ACEOF
16284cat confdefs.h >>conftest.$ac_ext
16285cat >>conftest.$ac_ext <<_ACEOF
16286/* end confdefs.h. */
c0d27fcc
MR
16287$ac_includes_default
16288#include <$ac_header>
16289_ACEOF
16290rm -f conftest.$ac_objext
ca81d7a0
JD
16291if { (ac_try="$ac_compile"
16292case "(($ac_try" in
16293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16294 *) ac_try_echo=$ac_try;;
16295esac
16296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16297 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16298 ac_status=$?
edfaf76d
LK
16299 grep -v '^ *+' conftest.er1 >conftest.err
16300 rm -f conftest.er1
16301 cat conftest.err >&5
c0d27fcc 16302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16303 (exit $ac_status); } && {
16304 test -z "$ac_c_werror_flag" ||
16305 test ! -s conftest.err
16306 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16307 ac_header_compiler=yes
16308else
16309 echo "$as_me: failed program was:" >&5
19650fd6
AS
16310sed 's/^/| /' conftest.$ac_ext >&5
16311
ca81d7a0 16312 ac_header_compiler=no
c0d27fcc 16313fi
ca81d7a0
JD
16314
16315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16316{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16317echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16318
16319# Is the header present?
ca81d7a0
JD
16320{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16321echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16322cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16323/* confdefs.h. */
16324_ACEOF
16325cat confdefs.h >>conftest.$ac_ext
16326cat >>conftest.$ac_ext <<_ACEOF
16327/* end confdefs.h. */
98418dba 16328#include <$ac_header>
503d2be0 16329_ACEOF
ca81d7a0
JD
16330if { (ac_try="$ac_cpp conftest.$ac_ext"
16331case "(($ac_try" in
16332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16333 *) ac_try_echo=$ac_try;;
16334esac
16335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16336 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16337 ac_status=$?
6bae0ccf 16338 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16339 rm -f conftest.er1
16340 cat conftest.err >&5
c0d27fcc 16341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16342 (exit $ac_status); } >/dev/null && {
16343 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16344 test ! -s conftest.err
16345 }; then
c0d27fcc 16346 ac_header_preproc=yes
ba4481b5 16347else
503d2be0 16348 echo "$as_me: failed program was:" >&5
19650fd6
AS
16349sed 's/^/| /' conftest.$ac_ext >&5
16350
c0d27fcc 16351 ac_header_preproc=no
ba4481b5 16352fi
ca81d7a0 16353
503d2be0 16354rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16355{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16356echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16357
16358# So? What about this header?
edfaf76d
LK
16359case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16360 yes:no: )
c0d27fcc
MR
16361 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16362echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16363 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16364echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16365 ac_header_preproc=yes
19650fd6 16366 ;;
edfaf76d 16367 no:yes:* )
c0d27fcc
MR
16368 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16369echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16370 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16371echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16372 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16373echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16374 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16375echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16376 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16377echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16378 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16379echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16380
19650fd6 16381 ;;
c0d27fcc 16382esac
ca81d7a0
JD
16383{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16386 echo $ECHO_N "(cached) $ECHO_C" >&6
16387else
edfaf76d 16388 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16389fi
ca81d7a0
JD
16390ac_res=`eval echo '${'$as_ac_Header'}'`
16391 { echo "$as_me:$LINENO: result: $ac_res" >&5
16392echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16393
16394fi
925c2f3f 16395if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16396 cat >>confdefs.h <<_ACEOF
925c2f3f 16397#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16398_ACEOF
503d2be0 16399
925c2f3f 16400fi
c0d27fcc 16401
925c2f3f
EZ
16402done
16403
c0d27fcc
MR
16404
16405
16406
edfaf76d 16407
f053c89f
CY
16408
16409for ac_header in $ac_header_list
925c2f3f
EZ
16410do
16411as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16412if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16413 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16414echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16415if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16416 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16417fi
ca81d7a0
JD
16418ac_res=`eval echo '${'$as_ac_Header'}'`
16419 { echo "$as_me:$LINENO: result: $ac_res" >&5
16420echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16421else
c0d27fcc 16422 # Is the header compilable?
ca81d7a0
JD
16423{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16424echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16425cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16426/* confdefs.h. */
16427_ACEOF
16428cat confdefs.h >>conftest.$ac_ext
16429cat >>conftest.$ac_ext <<_ACEOF
16430/* end confdefs.h. */
c0d27fcc
MR
16431$ac_includes_default
16432#include <$ac_header>
16433_ACEOF
16434rm -f conftest.$ac_objext
ca81d7a0
JD
16435if { (ac_try="$ac_compile"
16436case "(($ac_try" in
16437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16438 *) ac_try_echo=$ac_try;;
16439esac
16440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16441 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16442 ac_status=$?
edfaf76d
LK
16443 grep -v '^ *+' conftest.er1 >conftest.err
16444 rm -f conftest.er1
16445 cat conftest.err >&5
c0d27fcc 16446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16447 (exit $ac_status); } && {
16448 test -z "$ac_c_werror_flag" ||
16449 test ! -s conftest.err
16450 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16451 ac_header_compiler=yes
16452else
16453 echo "$as_me: failed program was:" >&5
19650fd6
AS
16454sed 's/^/| /' conftest.$ac_ext >&5
16455
ca81d7a0 16456 ac_header_compiler=no
c0d27fcc 16457fi
ca81d7a0
JD
16458
16459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16460{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16461echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16462
16463# Is the header present?
ca81d7a0
JD
16464{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16465echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16467/* confdefs.h. */
16468_ACEOF
16469cat confdefs.h >>conftest.$ac_ext
16470cat >>conftest.$ac_ext <<_ACEOF
16471/* end confdefs.h. */
98418dba 16472#include <$ac_header>
503d2be0 16473_ACEOF
ca81d7a0
JD
16474if { (ac_try="$ac_cpp conftest.$ac_ext"
16475case "(($ac_try" in
16476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16477 *) ac_try_echo=$ac_try;;
16478esac
16479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16481 ac_status=$?
6bae0ccf 16482 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16483 rm -f conftest.er1
16484 cat conftest.err >&5
c0d27fcc 16485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16486 (exit $ac_status); } >/dev/null && {
16487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16488 test ! -s conftest.err
16489 }; then
c0d27fcc 16490 ac_header_preproc=yes
98418dba
CW
16491else
16492 echo "$as_me: failed program was:" >&5
19650fd6
AS
16493sed 's/^/| /' conftest.$ac_ext >&5
16494
c0d27fcc 16495 ac_header_preproc=no
98418dba 16496fi
ca81d7a0 16497
98418dba 16498rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16499{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16500echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16501
16502# So? What about this header?
edfaf76d
LK
16503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16504 yes:no: )
c0d27fcc
MR
16505 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16506echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16507 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16508echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16509 ac_header_preproc=yes
19650fd6 16510 ;;
edfaf76d 16511 no:yes:* )
c0d27fcc
MR
16512 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16513echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16514 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16515echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16516 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16517echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16518 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16519echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16520 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16521echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16522 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16523echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16524
19650fd6 16525 ;;
c0d27fcc 16526esac
ca81d7a0
JD
16527{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16528echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16529if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16530 echo $ECHO_N "(cached) $ECHO_C" >&6
16531else
edfaf76d 16532 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16533fi
ca81d7a0
JD
16534ac_res=`eval echo '${'$as_ac_Header'}'`
16535 { echo "$as_me:$LINENO: result: $ac_res" >&5
16536echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16537
16538fi
98418dba 16539if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16540 cat >>confdefs.h <<_ACEOF
98418dba 16541#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16542_ACEOF
98418dba
CW
16543
16544fi
c0d27fcc 16545
98418dba
CW
16546done
16547
c0d27fcc 16548
f053c89f
CY
16549
16550
16551
16552
16553
16554
16555
16556for ac_func in $ac_func_list
98418dba
CW
16557do
16558as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16559{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16560echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16561if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16562 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16563else
98418dba 16564 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16565/* confdefs.h. */
16566_ACEOF
16567cat confdefs.h >>conftest.$ac_ext
16568cat >>conftest.$ac_ext <<_ACEOF
16569/* end confdefs.h. */
edfaf76d
LK
16570/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16571 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16572#define $ac_func innocuous_$ac_func
16573
98418dba 16574/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16575 which can conflict with char $ac_func (); below.
16576 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16577 <limits.h> exists even on freestanding compilers. */
edfaf76d 16578
19650fd6
AS
16579#ifdef __STDC__
16580# include <limits.h>
16581#else
16582# include <assert.h>
16583#endif
edfaf76d
LK
16584
16585#undef $ac_func
16586
ca81d7a0
JD
16587/* Override any GCC internal prototype to avoid an error.
16588 Use char because int might match the return type of a GCC
16589 builtin and then its argument prototype would still apply. */
503d2be0
AS
16590#ifdef __cplusplus
16591extern "C"
16592#endif
98418dba 16593char $ac_func ();
98418dba
CW
16594/* The GNU C library defines this for functions which it implements
16595 to always fail with ENOSYS. Some functions are actually named
16596 something starting with __ and the normal name is an alias. */
ca81d7a0 16597#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16598choke me
98418dba
CW
16599#endif
16600
19650fd6
AS
16601int
16602main ()
16603{
ca81d7a0 16604return $ac_func ();
503d2be0
AS
16605 ;
16606 return 0;
16607}
16608_ACEOF
16609rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16610if { (ac_try="$ac_link"
16611case "(($ac_try" in
16612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16613 *) ac_try_echo=$ac_try;;
16614esac
16615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16616 (eval "$ac_link") 2>conftest.er1
503d2be0 16617 ac_status=$?
edfaf76d
LK
16618 grep -v '^ *+' conftest.er1 >conftest.err
16619 rm -f conftest.er1
16620 cat conftest.err >&5
c0d27fcc 16621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16622 (exit $ac_status); } && {
16623 test -z "$ac_c_werror_flag" ||
16624 test ! -s conftest.err
16625 } && test -s conftest$ac_exeext &&
16626 $as_test_x conftest$ac_exeext; then
98418dba 16627 eval "$as_ac_var=yes"
503d2be0
AS
16628else
16629 echo "$as_me: failed program was:" >&5
19650fd6
AS
16630sed 's/^/| /' conftest.$ac_ext >&5
16631
ca81d7a0 16632 eval "$as_ac_var=no"
503d2be0 16633fi
ca81d7a0 16634
f053c89f 16635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16636 conftest$ac_exeext conftest.$ac_ext
ffe36136 16637fi
ca81d7a0
JD
16638ac_res=`eval echo '${'$as_ac_var'}'`
16639 { echo "$as_me:$LINENO: result: $ac_res" >&5
16640echo "${ECHO_T}$ac_res" >&6; }
98418dba 16641if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16642 cat >>confdefs.h <<_ACEOF
98418dba 16643#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16644_ACEOF
ffe36136 16645
ba4481b5 16646fi
98418dba 16647done
ba4481b5 16648
f053c89f
CY
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
ca81d7a0
JD
16665{ echo "$as_me:$LINENO: checking for working mktime" >&5
16666echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16667if test "${ac_cv_func_working_mktime+set}" = set; then
16668 echo $ECHO_N "(cached) $ECHO_C" >&6
16669else
16670 if test "$cross_compiling" = yes; then
16671 ac_cv_func_working_mktime=no
16672else
16673 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16674/* confdefs.h. */
16675_ACEOF
16676cat confdefs.h >>conftest.$ac_ext
16677cat >>conftest.$ac_ext <<_ACEOF
16678/* end confdefs.h. */
98418dba 16679/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16680#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16681# include <sys/time.h>
16682# include <time.h>
16683#else
f053c89f 16684# ifdef HAVE_SYS_TIME_H
98418dba
CW
16685# include <sys/time.h>
16686# else
16687# include <time.h>
16688# endif
16689#endif
ba4481b5 16690
362f44f2 16691#include <limits.h>
f053c89f 16692#include <stdlib.h>
edfaf76d 16693
f053c89f 16694#ifdef HAVE_UNISTD_H
98418dba
CW
16695# include <unistd.h>
16696#endif
ba4481b5 16697
f053c89f 16698#ifndef HAVE_ALARM
98418dba
CW
16699# define alarm(X) /* empty */
16700#endif
df645f7c 16701
98418dba
CW
16702/* Work around redefinition to rpl_putenv by other config tests. */
16703#undef putenv
df645f7c 16704
98418dba 16705static time_t time_t_max;
edfaf76d 16706static time_t time_t_min;
df645f7c 16707
98418dba 16708/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16709static char *tz_strings[] = {
16710 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16711 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16712};
16713#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16714
ca81d7a0 16715/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16716 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16717static int
98418dba
CW
16718spring_forward_gap ()
16719{
16720 /* glibc (up to about 1998-10-07) failed this test. */
16721 struct tm tm;
16722
16723 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16724 instead of "TZ=America/Vancouver" in order to detect the bug even
16725 on systems that don't support the Olson extension, or don't have the
16726 full zoneinfo tables installed. */
16727 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16728
16729 tm.tm_year = 98;
16730 tm.tm_mon = 3;
16731 tm.tm_mday = 5;
16732 tm.tm_hour = 2;
16733 tm.tm_min = 0;
16734 tm.tm_sec = 0;
16735 tm.tm_isdst = -1;
ca81d7a0 16736 return mktime (&tm) != (time_t) -1;
98418dba
CW
16737}
16738
ca81d7a0 16739static int
edfaf76d 16740mktime_test1 (now)
98418dba
CW
16741 time_t now;
16742{
16743 struct tm *lt;
ca81d7a0 16744 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16745}
16746
ca81d7a0 16747static int
edfaf76d
LK
16748mktime_test (now)
16749 time_t now;
16750{
ca81d7a0
JD
16751 return (mktime_test1 (now)
16752 && mktime_test1 ((time_t) (time_t_max - now))
16753 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16754}
16755
ca81d7a0 16756static int
98418dba
CW
16757irix_6_4_bug ()
16758{
16759 /* Based on code from Ariel Faigon. */
16760 struct tm tm;
16761 tm.tm_year = 96;
16762 tm.tm_mon = 3;
16763 tm.tm_mday = 0;
16764 tm.tm_hour = 0;
16765 tm.tm_min = 0;
16766 tm.tm_sec = 0;
16767 tm.tm_isdst = -1;
16768 mktime (&tm);
ca81d7a0 16769 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16770}
16771
ca81d7a0 16772static int
98418dba
CW
16773bigtime_test (j)
16774 int j;
16775{
16776 struct tm tm;
16777 time_t now;
16778 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16779 now = mktime (&tm);
16780 if (now != (time_t) -1)
16781 {
16782 struct tm *lt = localtime (&now);
16783 if (! (lt
16784 && lt->tm_year == tm.tm_year
16785 && lt->tm_mon == tm.tm_mon
16786 && lt->tm_mday == tm.tm_mday
16787 && lt->tm_hour == tm.tm_hour
16788 && lt->tm_min == tm.tm_min
16789 && lt->tm_sec == tm.tm_sec
16790 && lt->tm_yday == tm.tm_yday
16791 && lt->tm_wday == tm.tm_wday
16792 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16793 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16794 return 0;
98418dba 16795 }
ca81d7a0 16796 return 1;
98418dba
CW
16797}
16798
f053c89f
CY
16799static int
16800year_2050_test ()
16801{
16802 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16803 ignoring leap seconds. */
16804 unsigned long int answer = 2527315200UL;
16805
16806 struct tm tm;
16807 time_t t;
16808 tm.tm_year = 2050 - 1900;
16809 tm.tm_mon = 2 - 1;
16810 tm.tm_mday = 1;
16811 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16812 tm.tm_isdst = -1;
16813
16814 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16815 instead of "TZ=America/Vancouver" in order to detect the bug even
16816 on systems that don't support the Olson extension, or don't have the
16817 full zoneinfo tables installed. */
16818 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16819
16820 t = mktime (&tm);
16821
16822 /* Check that the result is either a failure, or close enough
16823 to the correct answer that we can assume the discrepancy is
16824 due to leap seconds. */
16825 return (t == (time_t) -1
16826 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16827}
16828
16829int
16830main ()
16831{
16832 time_t t, delta;
16833 int i, j;
16834
16835 /* This test makes some buggy mktime implementations loop.
16836 Give up after 60 seconds; a mktime slower than that
16837 isn't worth using anyway. */
16838 alarm (60);
16839
362f44f2
AS
16840 for (;;)
16841 {
16842 t = (time_t_max << 1) + 1;
16843 if (t <= time_t_max)
16844 break;
16845 time_t_max = t;
16846 }
16847 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
16848
98418dba
CW
16849 delta = time_t_max / 997; /* a suitable prime number */
16850 for (i = 0; i < N_STRINGS; i++)
16851 {
16852 if (tz_strings[i])
16853 putenv (tz_strings[i]);
503d2be0 16854
98418dba 16855 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16856 if (! mktime_test (t))
16857 return 1;
16858 if (! (mktime_test ((time_t) 1)
16859 && mktime_test ((time_t) (60 * 60))
16860 && mktime_test ((time_t) (60 * 60 * 24))))
16861 return 1;
98418dba 16862
362f44f2 16863 for (j = 1; ; j <<= 1)
ca81d7a0
JD
16864 if (! bigtime_test (j))
16865 return 1;
362f44f2
AS
16866 else if (INT_MAX / 2 < j)
16867 break;
16868 if (! bigtime_test (INT_MAX))
ca81d7a0 16869 return 1;
98418dba 16870 }
f053c89f 16871 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16872}
16873_ACEOF
98418dba 16874rm -f conftest$ac_exeext
ca81d7a0
JD
16875if { (ac_try="$ac_link"
16876case "(($ac_try" in
16877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16878 *) ac_try_echo=$ac_try;;
16879esac
16880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16881 (eval "$ac_link") 2>&5
503d2be0 16882 ac_status=$?
c0d27fcc 16883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16885 { (case "(($ac_try" in
16886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16887 *) ac_try_echo=$ac_try;;
16888esac
16889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16890 (eval "$ac_try") 2>&5
503d2be0 16891 ac_status=$?
c0d27fcc 16892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16893 (exit $ac_status); }; }; then
98418dba 16894 ac_cv_func_working_mktime=yes
503d2be0 16895else
98418dba
CW
16896 echo "$as_me: program exited with status $ac_status" >&5
16897echo "$as_me: failed program was:" >&5
19650fd6
AS
16898sed 's/^/| /' conftest.$ac_ext >&5
16899
c0d27fcc 16900( exit $ac_status )
98418dba 16901ac_cv_func_working_mktime=no
503d2be0 16902fi
ca81d7a0 16903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16904fi
ca81d7a0
JD
16905
16906
ba4481b5 16907fi
ca81d7a0
JD
16908{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16909echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16910if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16911 case " $LIBOBJS " in
edfaf76d 16912 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16913 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16914 ;;
edfaf76d
LK
16915esac
16916
ba4481b5
DL
16917fi
16918
98418dba 16919if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16920
c0d27fcc 16921cat >>confdefs.h <<\_ACEOF
98418dba 16922#define BROKEN_MKTIME 1
c0d27fcc 16923_ACEOF
ba4481b5 16924
ba4481b5 16925fi
503d2be0 16926
98418dba
CW
16927ac_have_func=no # yes means we've found a way to get the load average.
16928
6bae0ccf
DL
16929# Make sure getloadavg.c is where it belongs, at configure-time.
16930test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16931 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16932echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16933 { (exit 1); exit 1; }; }
16934
98418dba
CW
16935ac_save_LIBS=$LIBS
16936
16937# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16938({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16939echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16940if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16941 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16942else
503d2be0 16943 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16944/* confdefs.h. */
16945_ACEOF
16946cat confdefs.h >>conftest.$ac_ext
16947cat >>conftest.$ac_ext <<_ACEOF
16948/* end confdefs.h. */
edfaf76d
LK
16949/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16950 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16951#define getloadavg innocuous_getloadavg
16952
98418dba 16953/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16954 which can conflict with char getloadavg (); below.
16955 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16956 <limits.h> exists even on freestanding compilers. */
edfaf76d 16957
19650fd6
AS
16958#ifdef __STDC__
16959# include <limits.h>
16960#else
16961# include <assert.h>
16962#endif
edfaf76d
LK
16963
16964#undef getloadavg
16965
ca81d7a0
JD
16966/* Override any GCC internal prototype to avoid an error.
16967 Use char because int might match the return type of a GCC
16968 builtin and then its argument prototype would still apply. */
503d2be0
AS
16969#ifdef __cplusplus
16970extern "C"
16971#endif
98418dba 16972char getloadavg ();
98418dba
CW
16973/* The GNU C library defines this for functions which it implements
16974 to always fail with ENOSYS. Some functions are actually named
16975 something starting with __ and the normal name is an alias. */
ca81d7a0 16976#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16977choke me
cd958eb3
MB
16978#endif
16979
19650fd6
AS
16980int
16981main ()
16982{
ca81d7a0 16983return getloadavg ();
503d2be0
AS
16984 ;
16985 return 0;
16986}
16987_ACEOF
16988rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16989if { (ac_try="$ac_link"
16990case "(($ac_try" in
16991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16992 *) ac_try_echo=$ac_try;;
16993esac
16994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16995 (eval "$ac_link") 2>conftest.er1
503d2be0 16996 ac_status=$?
edfaf76d
LK
16997 grep -v '^ *+' conftest.er1 >conftest.err
16998 rm -f conftest.er1
16999 cat conftest.err >&5
c0d27fcc 17000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17001 (exit $ac_status); } && {
17002 test -z "$ac_c_werror_flag" ||
17003 test ! -s conftest.err
17004 } && test -s conftest$ac_exeext &&
17005 $as_test_x conftest$ac_exeext; then
98418dba 17006 ac_cv_func_getloadavg=yes
503d2be0
AS
17007else
17008 echo "$as_me: failed program was:" >&5
19650fd6
AS
17009sed 's/^/| /' conftest.$ac_ext >&5
17010
ca81d7a0 17011 ac_cv_func_getloadavg=no
503d2be0 17012fi
ca81d7a0 17013
f053c89f 17014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17015 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17016fi
ca81d7a0
JD
17017{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17018echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17019if test $ac_cv_func_getloadavg = yes; then
17020 exit 0
17021else
17022 exit 1
ba4481b5 17023fi
98418dba 17024) && ac_have_func=yes
ba4481b5 17025
98418dba 17026# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17027
98418dba
CW
17028for ac_func in pstat_getdynamic
17029do
17030as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17031{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17033if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17034 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17035else
503d2be0 17036 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17037/* confdefs.h. */
17038_ACEOF
17039cat confdefs.h >>conftest.$ac_ext
17040cat >>conftest.$ac_ext <<_ACEOF
17041/* end confdefs.h. */
edfaf76d
LK
17042/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17044#define $ac_func innocuous_$ac_func
17045
98418dba 17046/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17047 which can conflict with char $ac_func (); below.
17048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17049 <limits.h> exists even on freestanding compilers. */
edfaf76d 17050
19650fd6
AS
17051#ifdef __STDC__
17052# include <limits.h>
17053#else
17054# include <assert.h>
17055#endif
edfaf76d
LK
17056
17057#undef $ac_func
17058
ca81d7a0
JD
17059/* Override any GCC internal prototype to avoid an error.
17060 Use char because int might match the return type of a GCC
17061 builtin and then its argument prototype would still apply. */
503d2be0
AS
17062#ifdef __cplusplus
17063extern "C"
17064#endif
98418dba 17065char $ac_func ();
98418dba
CW
17066/* The GNU C library defines this for functions which it implements
17067 to always fail with ENOSYS. Some functions are actually named
17068 something starting with __ and the normal name is an alias. */
ca81d7a0 17069#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17070choke me
98418dba
CW
17071#endif
17072
19650fd6
AS
17073int
17074main ()
17075{
ca81d7a0 17076return $ac_func ();
98418dba
CW
17077 ;
17078 return 0;
17079}
f21fadcc 17080_ACEOF
98418dba 17081rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17082if { (ac_try="$ac_link"
17083case "(($ac_try" in
17084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17085 *) ac_try_echo=$ac_try;;
17086esac
17087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17088 (eval "$ac_link") 2>conftest.er1
f21fadcc 17089 ac_status=$?
edfaf76d
LK
17090 grep -v '^ *+' conftest.er1 >conftest.err
17091 rm -f conftest.er1
17092 cat conftest.err >&5
c0d27fcc 17093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17094 (exit $ac_status); } && {
17095 test -z "$ac_c_werror_flag" ||
17096 test ! -s conftest.err
17097 } && test -s conftest$ac_exeext &&
17098 $as_test_x conftest$ac_exeext; then
98418dba 17099 eval "$as_ac_var=yes"
f21fadcc
JD
17100else
17101 echo "$as_me: failed program was:" >&5
19650fd6
AS
17102sed 's/^/| /' conftest.$ac_ext >&5
17103
ca81d7a0 17104 eval "$as_ac_var=no"
f21fadcc 17105fi
ca81d7a0 17106
f053c89f 17107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17108 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17109fi
ca81d7a0
JD
17110ac_res=`eval echo '${'$as_ac_var'}'`
17111 { echo "$as_me:$LINENO: result: $ac_res" >&5
17112echo "${ECHO_T}$ac_res" >&6; }
98418dba 17113if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17114 cat >>confdefs.h <<_ACEOF
98418dba 17115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17116_ACEOF
98418dba
CW
17117
17118fi
17119done
17120
c0d27fcc 17121
98418dba
CW
17122# Solaris has libkstat which does not require root.
17123
ca81d7a0
JD
17124{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17125echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17126if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17127 echo $ECHO_N "(cached) $ECHO_C" >&6
17128else
17129 ac_check_lib_save_LIBS=$LIBS
98418dba 17130LIBS="-lkstat $LIBS"
f21fadcc 17131cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17132/* confdefs.h. */
17133_ACEOF
17134cat confdefs.h >>conftest.$ac_ext
17135cat >>conftest.$ac_ext <<_ACEOF
17136/* end confdefs.h. */
f21fadcc 17137
ca81d7a0
JD
17138/* Override any GCC internal prototype to avoid an error.
17139 Use char because int might match the return type of a GCC
17140 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17141#ifdef __cplusplus
17142extern "C"
17143#endif
98418dba 17144char kstat_open ();
f21fadcc
JD
17145int
17146main ()
17147{
ca81d7a0 17148return kstat_open ();
f21fadcc
JD
17149 ;
17150 return 0;
17151}
17152_ACEOF
17153rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17154if { (ac_try="$ac_link"
17155case "(($ac_try" in
17156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17157 *) ac_try_echo=$ac_try;;
17158esac
17159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17160 (eval "$ac_link") 2>conftest.er1
f21fadcc 17161 ac_status=$?
edfaf76d
LK
17162 grep -v '^ *+' conftest.er1 >conftest.err
17163 rm -f conftest.er1
17164 cat conftest.err >&5
c0d27fcc 17165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17166 (exit $ac_status); } && {
17167 test -z "$ac_c_werror_flag" ||
17168 test ! -s conftest.err
17169 } && test -s conftest$ac_exeext &&
17170 $as_test_x conftest$ac_exeext; then
98418dba 17171 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17172else
17173 echo "$as_me: failed program was:" >&5
19650fd6
AS
17174sed 's/^/| /' conftest.$ac_ext >&5
17175
ca81d7a0 17176 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17177fi
ca81d7a0 17178
f053c89f 17179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17180 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17181LIBS=$ac_check_lib_save_LIBS
17182fi
ca81d7a0
JD
17183{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17184echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17185if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17186 cat >>confdefs.h <<_ACEOF
98418dba 17187#define HAVE_LIBKSTAT 1
c0d27fcc 17188_ACEOF
f21fadcc 17189
98418dba 17190 LIBS="-lkstat $LIBS"
f21fadcc 17191
f21fadcc
JD
17192fi
17193
98418dba
CW
17194test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17195
17196# Some systems with -lutil have (and need) -lkvm as well, some do not.
17197# On Solaris, -lkvm requires nlist from -lelf, so check that first
17198# to get the right answer into the cache.
17199# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17200if test $ac_have_func = no; then
ca81d7a0
JD
17201 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17202echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17203if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17204 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17205else
98418dba
CW
17206 ac_check_lib_save_LIBS=$LIBS
17207LIBS="-lelf $LIBS"
17208cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17209/* confdefs.h. */
17210_ACEOF
17211cat confdefs.h >>conftest.$ac_ext
17212cat >>conftest.$ac_ext <<_ACEOF
17213/* end confdefs.h. */
98418dba 17214
ca81d7a0
JD
17215/* Override any GCC internal prototype to avoid an error.
17216 Use char because int might match the return type of a GCC
17217 builtin and then its argument prototype would still apply. */
98418dba
CW
17218#ifdef __cplusplus
17219extern "C"
17220#endif
98418dba 17221char elf_begin ();
503d2be0
AS
17222int
17223main ()
17224{
ca81d7a0 17225return elf_begin ();
503d2be0
AS
17226 ;
17227 return 0;
17228}
17229_ACEOF
17230rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17231if { (ac_try="$ac_link"
17232case "(($ac_try" in
17233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17234 *) ac_try_echo=$ac_try;;
17235esac
17236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17237 (eval "$ac_link") 2>conftest.er1
503d2be0 17238 ac_status=$?
edfaf76d
LK
17239 grep -v '^ *+' conftest.er1 >conftest.err
17240 rm -f conftest.er1
17241 cat conftest.err >&5
c0d27fcc 17242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17243 (exit $ac_status); } && {
17244 test -z "$ac_c_werror_flag" ||
17245 test ! -s conftest.err
17246 } && test -s conftest$ac_exeext &&
17247 $as_test_x conftest$ac_exeext; then
98418dba 17248 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17249else
503d2be0 17250 echo "$as_me: failed program was:" >&5
19650fd6
AS
17251sed 's/^/| /' conftest.$ac_ext >&5
17252
ca81d7a0 17253 ac_cv_lib_elf_elf_begin=no
ba4481b5 17254fi
ca81d7a0 17255
f053c89f 17256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17257 conftest$ac_exeext conftest.$ac_ext
98418dba 17258LIBS=$ac_check_lib_save_LIBS
ba4481b5 17259fi
ca81d7a0
JD
17260{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17261echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17262if test $ac_cv_lib_elf_elf_begin = yes; then
17263 LIBS="-lelf $LIBS"
ba4481b5
DL
17264fi
17265
98418dba
CW
17266fi
17267if test $ac_have_func = no; then
ca81d7a0
JD
17268 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17269echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17270if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17271 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17272else
98418dba
CW
17273 ac_check_lib_save_LIBS=$LIBS
17274LIBS="-lkvm $LIBS"
17275cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17276/* confdefs.h. */
17277_ACEOF
17278cat confdefs.h >>conftest.$ac_ext
17279cat >>conftest.$ac_ext <<_ACEOF
17280/* end confdefs.h. */
98418dba 17281
ca81d7a0
JD
17282/* Override any GCC internal prototype to avoid an error.
17283 Use char because int might match the return type of a GCC
17284 builtin and then its argument prototype would still apply. */
98418dba
CW
17285#ifdef __cplusplus
17286extern "C"
17287#endif
98418dba 17288char kvm_open ();
503d2be0
AS
17289int
17290main ()
17291{
ca81d7a0 17292return kvm_open ();
503d2be0
AS
17293 ;
17294 return 0;
17295}
17296_ACEOF
17297rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17298if { (ac_try="$ac_link"
17299case "(($ac_try" in
17300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17301 *) ac_try_echo=$ac_try;;
17302esac
17303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17304 (eval "$ac_link") 2>conftest.er1
503d2be0 17305 ac_status=$?
edfaf76d
LK
17306 grep -v '^ *+' conftest.er1 >conftest.err
17307 rm -f conftest.er1
17308 cat conftest.err >&5
c0d27fcc 17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17310 (exit $ac_status); } && {
17311 test -z "$ac_c_werror_flag" ||
17312 test ! -s conftest.err
17313 } && test -s conftest$ac_exeext &&
17314 $as_test_x conftest$ac_exeext; then
98418dba 17315 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17316else
17317 echo "$as_me: failed program was:" >&5
19650fd6
AS
17318sed 's/^/| /' conftest.$ac_ext >&5
17319
ca81d7a0 17320 ac_cv_lib_kvm_kvm_open=no
503d2be0 17321fi
ca81d7a0 17322
f053c89f 17323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17324 conftest$ac_exeext conftest.$ac_ext
98418dba 17325LIBS=$ac_check_lib_save_LIBS
503d2be0 17326fi
ca81d7a0
JD
17327{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17328echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17329if test $ac_cv_lib_kvm_kvm_open = yes; then
17330 LIBS="-lkvm $LIBS"
ba4481b5
DL
17331fi
17332
98418dba 17333 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17334 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17335echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17336if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17337 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17338else
98418dba
CW
17339 ac_check_lib_save_LIBS=$LIBS
17340LIBS="-lutil $LIBS"
17341cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17342/* confdefs.h. */
17343_ACEOF
17344cat confdefs.h >>conftest.$ac_ext
17345cat >>conftest.$ac_ext <<_ACEOF
17346/* end confdefs.h. */
98418dba 17347
ca81d7a0
JD
17348/* Override any GCC internal prototype to avoid an error.
17349 Use char because int might match the return type of a GCC
17350 builtin and then its argument prototype would still apply. */
98418dba
CW
17351#ifdef __cplusplus
17352extern "C"
17353#endif
98418dba 17354char getloadavg ();
503d2be0
AS
17355int
17356main ()
17357{
ca81d7a0 17358return getloadavg ();
503d2be0
AS
17359 ;
17360 return 0;
17361}
17362_ACEOF
17363rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17364if { (ac_try="$ac_link"
17365case "(($ac_try" in
17366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17367 *) ac_try_echo=$ac_try;;
17368esac
17369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17370 (eval "$ac_link") 2>conftest.er1
503d2be0 17371 ac_status=$?
edfaf76d
LK
17372 grep -v '^ *+' conftest.er1 >conftest.err
17373 rm -f conftest.er1
17374 cat conftest.err >&5
c0d27fcc 17375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17376 (exit $ac_status); } && {
17377 test -z "$ac_c_werror_flag" ||
17378 test ! -s conftest.err
17379 } && test -s conftest$ac_exeext &&
17380 $as_test_x conftest$ac_exeext; then
35996d22
AS
17381 ac_cv_lib_util_getloadavg=yes
17382else
503d2be0 17383 echo "$as_me: failed program was:" >&5
19650fd6
AS
17384sed 's/^/| /' conftest.$ac_ext >&5
17385
ca81d7a0 17386 ac_cv_lib_util_getloadavg=no
ba4481b5 17387fi
ca81d7a0 17388
f053c89f 17389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17390 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17391LIBS=$ac_check_lib_save_LIBS
17392fi
ca81d7a0
JD
17393{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17394echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17395if test $ac_cv_lib_util_getloadavg = yes; then
17396 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17397fi
503d2be0 17398
98418dba 17399fi
ba4481b5 17400
98418dba
CW
17401if test $ac_have_func = no; then
17402 # There is a commonly available library for RS/6000 AIX.
17403 # Since it is not a standard part of AIX, it might be installed locally.
17404 ac_getloadavg_LIBS=$LIBS
17405 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17406 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17407echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17408if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17409 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17410else
98418dba
CW
17411 ac_check_lib_save_LIBS=$LIBS
17412LIBS="-lgetloadavg $LIBS"
17413cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17414/* confdefs.h. */
17415_ACEOF
17416cat confdefs.h >>conftest.$ac_ext
17417cat >>conftest.$ac_ext <<_ACEOF
17418/* end confdefs.h. */
ba4481b5 17419
ca81d7a0
JD
17420/* Override any GCC internal prototype to avoid an error.
17421 Use char because int might match the return type of a GCC
17422 builtin and then its argument prototype would still apply. */
98418dba
CW
17423#ifdef __cplusplus
17424extern "C"
17425#endif
98418dba 17426char getloadavg ();
98418dba
CW
17427int
17428main ()
17429{
ca81d7a0 17430return getloadavg ();
98418dba
CW
17431 ;
17432 return 0;
17433}
503d2be0 17434_ACEOF
98418dba 17435rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17436if { (ac_try="$ac_link"
17437case "(($ac_try" in
17438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17439 *) ac_try_echo=$ac_try;;
17440esac
17441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17442 (eval "$ac_link") 2>conftest.er1
98418dba 17443 ac_status=$?
edfaf76d
LK
17444 grep -v '^ *+' conftest.er1 >conftest.err
17445 rm -f conftest.er1
17446 cat conftest.err >&5
c0d27fcc 17447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17448 (exit $ac_status); } && {
17449 test -z "$ac_c_werror_flag" ||
17450 test ! -s conftest.err
17451 } && test -s conftest$ac_exeext &&
17452 $as_test_x conftest$ac_exeext; then
98418dba 17453 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17454else
98418dba 17455 echo "$as_me: failed program was:" >&5
19650fd6
AS
17456sed 's/^/| /' conftest.$ac_ext >&5
17457
ca81d7a0 17458 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17459fi
ca81d7a0 17460
f053c89f 17461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17462 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17463LIBS=$ac_check_lib_save_LIBS
17464fi
ca81d7a0
JD
17465{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17466echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17467if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17468 LIBS="-lgetloadavg $LIBS"
17469else
17470 LIBS=$ac_getloadavg_LIBS
ba4481b5 17471fi
ba4481b5
DL
17472
17473fi
98418dba
CW
17474
17475# Make sure it is really in the library, if we think we found it,
17476# otherwise set up the replacement function.
17477
17478for ac_func in getloadavg
17479do
17480as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17481{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17482echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17483if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17484 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17485else
503d2be0 17486 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17487/* confdefs.h. */
17488_ACEOF
17489cat confdefs.h >>conftest.$ac_ext
17490cat >>conftest.$ac_ext <<_ACEOF
17491/* end confdefs.h. */
edfaf76d
LK
17492/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17493 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17494#define $ac_func innocuous_$ac_func
17495
ba4481b5 17496/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17497 which can conflict with char $ac_func (); below.
17498 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17499 <limits.h> exists even on freestanding compilers. */
edfaf76d 17500
19650fd6
AS
17501#ifdef __STDC__
17502# include <limits.h>
17503#else
17504# include <assert.h>
17505#endif
edfaf76d
LK
17506
17507#undef $ac_func
17508
ca81d7a0
JD
17509/* Override any GCC internal prototype to avoid an error.
17510 Use char because int might match the return type of a GCC
17511 builtin and then its argument prototype would still apply. */
503d2be0
AS
17512#ifdef __cplusplus
17513extern "C"
17514#endif
503d2be0 17515char $ac_func ();
ba4481b5
DL
17516/* The GNU C library defines this for functions which it implements
17517 to always fail with ENOSYS. Some functions are actually named
17518 something starting with __ and the normal name is an alias. */
ca81d7a0 17519#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17520choke me
cd958eb3
MB
17521#endif
17522
19650fd6
AS
17523int
17524main ()
17525{
ca81d7a0 17526return $ac_func ();
503d2be0
AS
17527 ;
17528 return 0;
17529}
17530_ACEOF
17531rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17532if { (ac_try="$ac_link"
17533case "(($ac_try" in
17534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17535 *) ac_try_echo=$ac_try;;
17536esac
17537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17538 (eval "$ac_link") 2>conftest.er1
503d2be0 17539 ac_status=$?
edfaf76d
LK
17540 grep -v '^ *+' conftest.er1 >conftest.err
17541 rm -f conftest.er1
17542 cat conftest.err >&5
c0d27fcc 17543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17544 (exit $ac_status); } && {
17545 test -z "$ac_c_werror_flag" ||
17546 test ! -s conftest.err
17547 } && test -s conftest$ac_exeext &&
17548 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17549 eval "$as_ac_var=yes"
17550else
17551 echo "$as_me: failed program was:" >&5
19650fd6
AS
17552sed 's/^/| /' conftest.$ac_ext >&5
17553
ca81d7a0 17554 eval "$as_ac_var=no"
503d2be0 17555fi
ca81d7a0 17556
f053c89f 17557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17558 conftest$ac_exeext conftest.$ac_ext
503d2be0 17559fi
ca81d7a0
JD
17560ac_res=`eval echo '${'$as_ac_var'}'`
17561 { echo "$as_me:$LINENO: result: $ac_res" >&5
17562echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17563if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17564 cat >>confdefs.h <<_ACEOF
98418dba 17565#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17566_ACEOF
503d2be0 17567
98418dba 17568else
ca81d7a0 17569 case " $LIBOBJS " in
edfaf76d 17570 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17571 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17572 ;;
edfaf76d
LK
17573esac
17574
ba4481b5 17575
c0d27fcc 17576cat >>confdefs.h <<\_ACEOF
98418dba 17577#define C_GETLOADAVG 1
c0d27fcc 17578_ACEOF
ba4481b5 17579
98418dba
CW
17580# Figure out what our getloadavg.c needs.
17581ac_have_func=no
c0d27fcc 17582if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17583 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17584echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17585if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17586 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17587fi
ca81d7a0
JD
17588{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17589echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17590else
c0d27fcc 17591 # Is the header compilable?
ca81d7a0
JD
17592{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17593echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17594cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17595/* confdefs.h. */
17596_ACEOF
17597cat confdefs.h >>conftest.$ac_ext
17598cat >>conftest.$ac_ext <<_ACEOF
17599/* end confdefs.h. */
c0d27fcc
MR
17600$ac_includes_default
17601#include <sys/dg_sys_info.h>
17602_ACEOF
17603rm -f conftest.$ac_objext
ca81d7a0
JD
17604if { (ac_try="$ac_compile"
17605case "(($ac_try" in
17606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17607 *) ac_try_echo=$ac_try;;
17608esac
17609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17610 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17611 ac_status=$?
edfaf76d
LK
17612 grep -v '^ *+' conftest.er1 >conftest.err
17613 rm -f conftest.er1
17614 cat conftest.err >&5
c0d27fcc 17615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17616 (exit $ac_status); } && {
17617 test -z "$ac_c_werror_flag" ||
17618 test ! -s conftest.err
17619 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17620 ac_header_compiler=yes
17621else
17622 echo "$as_me: failed program was:" >&5
19650fd6
AS
17623sed 's/^/| /' conftest.$ac_ext >&5
17624
ca81d7a0 17625 ac_header_compiler=no
c0d27fcc 17626fi
ca81d7a0
JD
17627
17628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17629{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17630echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17631
17632# Is the header present?
ca81d7a0
JD
17633{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17634echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17635cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17636/* confdefs.h. */
17637_ACEOF
17638cat confdefs.h >>conftest.$ac_ext
17639cat >>conftest.$ac_ext <<_ACEOF
17640/* end confdefs.h. */
98418dba
CW
17641#include <sys/dg_sys_info.h>
17642_ACEOF
ca81d7a0
JD
17643if { (ac_try="$ac_cpp conftest.$ac_ext"
17644case "(($ac_try" in
17645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17646 *) ac_try_echo=$ac_try;;
17647esac
17648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17649 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17650 ac_status=$?
6bae0ccf 17651 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17652 rm -f conftest.er1
17653 cat conftest.err >&5
c0d27fcc 17654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17655 (exit $ac_status); } >/dev/null && {
17656 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17657 test ! -s conftest.err
17658 }; then
c0d27fcc 17659 ac_header_preproc=yes
98418dba
CW
17660else
17661 echo "$as_me: failed program was:" >&5
19650fd6
AS
17662sed 's/^/| /' conftest.$ac_ext >&5
17663
c0d27fcc 17664 ac_header_preproc=no
ba4481b5 17665fi
ca81d7a0 17666
98418dba 17667rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17668{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17669echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17670
17671# So? What about this header?
edfaf76d
LK
17672case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17673 yes:no: )
c0d27fcc
MR
17674 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17675echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17676 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17677echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17678 ac_header_preproc=yes
19650fd6 17679 ;;
edfaf76d 17680 no:yes:* )
c0d27fcc
MR
17681 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17682echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17683 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17684echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17685 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17686echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17687 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17688echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17689 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17690echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17691 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17692echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17693
19650fd6 17694 ;;
c0d27fcc 17695esac
ca81d7a0
JD
17696{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17697echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17698if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17699 echo $ECHO_N "(cached) $ECHO_C" >&6
17700else
17701 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17702fi
ca81d7a0
JD
17703{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17704echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17705
17706fi
98418dba
CW
17707if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17708 ac_have_func=yes
ba4481b5 17709
c0d27fcc 17710cat >>confdefs.h <<\_ACEOF
98418dba 17711#define DGUX 1
c0d27fcc
MR
17712_ACEOF
17713
503d2be0 17714
ca81d7a0
JD
17715{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17716echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17717if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17718 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17719else
503d2be0 17720 ac_check_lib_save_LIBS=$LIBS
98418dba 17721LIBS="-ldgc $LIBS"
503d2be0 17722cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17723/* confdefs.h. */
17724_ACEOF
17725cat confdefs.h >>conftest.$ac_ext
17726cat >>conftest.$ac_ext <<_ACEOF
17727/* end confdefs.h. */
503d2be0 17728
ca81d7a0
JD
17729/* Override any GCC internal prototype to avoid an error.
17730 Use char because int might match the return type of a GCC
17731 builtin and then its argument prototype would still apply. */
503d2be0
AS
17732#ifdef __cplusplus
17733extern "C"
17734#endif
98418dba 17735char dg_sys_info ();
503d2be0
AS
17736int
17737main ()
17738{
ca81d7a0 17739return dg_sys_info ();
503d2be0
AS
17740 ;
17741 return 0;
17742}
17743_ACEOF
17744rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17745if { (ac_try="$ac_link"
17746case "(($ac_try" in
17747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17748 *) ac_try_echo=$ac_try;;
17749esac
17750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17751 (eval "$ac_link") 2>conftest.er1
503d2be0 17752 ac_status=$?
edfaf76d
LK
17753 grep -v '^ *+' conftest.er1 >conftest.err
17754 rm -f conftest.er1
17755 cat conftest.err >&5
c0d27fcc 17756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17757 (exit $ac_status); } && {
17758 test -z "$ac_c_werror_flag" ||
17759 test ! -s conftest.err
17760 } && test -s conftest$ac_exeext &&
17761 $as_test_x conftest$ac_exeext; then
98418dba 17762 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17763else
17764 echo "$as_me: failed program was:" >&5
19650fd6
AS
17765sed 's/^/| /' conftest.$ac_ext >&5
17766
ca81d7a0 17767 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17768fi
ca81d7a0 17769
f053c89f 17770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17771 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17772LIBS=$ac_check_lib_save_LIBS
17773fi
ca81d7a0
JD
17774{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17775echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17776if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17777 cat >>confdefs.h <<_ACEOF
98418dba 17778#define HAVE_LIBDGC 1
c0d27fcc 17779_ACEOF
ba4481b5 17780
98418dba 17781 LIBS="-ldgc $LIBS"
ba4481b5 17782
ba4481b5
DL
17783fi
17784
98418dba 17785fi
503d2be0 17786
c0d27fcc
MR
17787
17788
17789if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17790 { echo "$as_me:$LINENO: checking for locale.h" >&5
17791echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17792if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17793 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17794fi
ca81d7a0
JD
17795{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17796echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17797else
c0d27fcc 17798 # Is the header compilable?
ca81d7a0
JD
17799{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17800echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17802/* confdefs.h. */
17803_ACEOF
17804cat confdefs.h >>conftest.$ac_ext
17805cat >>conftest.$ac_ext <<_ACEOF
17806/* end confdefs.h. */
c0d27fcc
MR
17807$ac_includes_default
17808#include <locale.h>
17809_ACEOF
17810rm -f conftest.$ac_objext
ca81d7a0
JD
17811if { (ac_try="$ac_compile"
17812case "(($ac_try" in
17813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17814 *) ac_try_echo=$ac_try;;
17815esac
17816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17817 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17818 ac_status=$?
edfaf76d
LK
17819 grep -v '^ *+' conftest.er1 >conftest.err
17820 rm -f conftest.er1
17821 cat conftest.err >&5
c0d27fcc 17822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17823 (exit $ac_status); } && {
17824 test -z "$ac_c_werror_flag" ||
17825 test ! -s conftest.err
17826 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17827 ac_header_compiler=yes
17828else
17829 echo "$as_me: failed program was:" >&5
19650fd6
AS
17830sed 's/^/| /' conftest.$ac_ext >&5
17831
ca81d7a0 17832 ac_header_compiler=no
c0d27fcc 17833fi
ca81d7a0
JD
17834
17835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17836{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17837echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17838
17839# Is the header present?
ca81d7a0
JD
17840{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17841echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17842cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17843/* confdefs.h. */
17844_ACEOF
17845cat confdefs.h >>conftest.$ac_ext
17846cat >>conftest.$ac_ext <<_ACEOF
17847/* end confdefs.h. */
98418dba 17848#include <locale.h>
503d2be0 17849_ACEOF
ca81d7a0
JD
17850if { (ac_try="$ac_cpp conftest.$ac_ext"
17851case "(($ac_try" in
17852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17853 *) ac_try_echo=$ac_try;;
17854esac
17855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17856 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17857 ac_status=$?
6bae0ccf 17858 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17859 rm -f conftest.er1
17860 cat conftest.err >&5
c0d27fcc 17861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17862 (exit $ac_status); } >/dev/null && {
17863 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17864 test ! -s conftest.err
17865 }; then
c0d27fcc 17866 ac_header_preproc=yes
98418dba
CW
17867else
17868 echo "$as_me: failed program was:" >&5
19650fd6
AS
17869sed 's/^/| /' conftest.$ac_ext >&5
17870
c0d27fcc 17871 ac_header_preproc=no
ba4481b5 17872fi
ca81d7a0 17873
98418dba 17874rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17875{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17876echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17877
17878# So? What about this header?
edfaf76d
LK
17879case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17880 yes:no: )
c0d27fcc
MR
17881 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17882echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17883 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17884echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17885 ac_header_preproc=yes
19650fd6 17886 ;;
edfaf76d 17887 no:yes:* )
c0d27fcc
MR
17888 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17889echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17890 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17891echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17892 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17893echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17894 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17895echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17896 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17897echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17898 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17899echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17900
19650fd6 17901 ;;
c0d27fcc 17902esac
ca81d7a0
JD
17903{ echo "$as_me:$LINENO: checking for locale.h" >&5
17904echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17905if test "${ac_cv_header_locale_h+set}" = set; then
17906 echo $ECHO_N "(cached) $ECHO_C" >&6
17907else
17908 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17909fi
ca81d7a0
JD
17910{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17911echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17912
c0d27fcc
MR
17913fi
17914
17915
17916
98418dba 17917for ac_func in setlocale
ba4481b5 17918do
503d2be0 17919as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17920{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17921echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17922if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17923 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17924else
503d2be0 17925 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17926/* confdefs.h. */
17927_ACEOF
17928cat confdefs.h >>conftest.$ac_ext
17929cat >>conftest.$ac_ext <<_ACEOF
17930/* end confdefs.h. */
edfaf76d
LK
17931/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17932 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17933#define $ac_func innocuous_$ac_func
17934
ba4481b5 17935/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17936 which can conflict with char $ac_func (); below.
17937 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17938 <limits.h> exists even on freestanding compilers. */
edfaf76d 17939
19650fd6
AS
17940#ifdef __STDC__
17941# include <limits.h>
17942#else
17943# include <assert.h>
17944#endif
edfaf76d
LK
17945
17946#undef $ac_func
17947
ca81d7a0
JD
17948/* Override any GCC internal prototype to avoid an error.
17949 Use char because int might match the return type of a GCC
17950 builtin and then its argument prototype would still apply. */
503d2be0
AS
17951#ifdef __cplusplus
17952extern "C"
17953#endif
503d2be0 17954char $ac_func ();
ba4481b5
DL
17955/* The GNU C library defines this for functions which it implements
17956 to always fail with ENOSYS. Some functions are actually named
17957 something starting with __ and the normal name is an alias. */
ca81d7a0 17958#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17959choke me
ba4481b5
DL
17960#endif
17961
19650fd6
AS
17962int
17963main ()
17964{
ca81d7a0 17965return $ac_func ();
503d2be0
AS
17966 ;
17967 return 0;
17968}
17969_ACEOF
17970rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17971if { (ac_try="$ac_link"
17972case "(($ac_try" in
17973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17974 *) ac_try_echo=$ac_try;;
17975esac
17976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17977 (eval "$ac_link") 2>conftest.er1
503d2be0 17978 ac_status=$?
edfaf76d
LK
17979 grep -v '^ *+' conftest.er1 >conftest.err
17980 rm -f conftest.er1
17981 cat conftest.err >&5
c0d27fcc 17982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17983 (exit $ac_status); } && {
17984 test -z "$ac_c_werror_flag" ||
17985 test ! -s conftest.err
17986 } && test -s conftest$ac_exeext &&
17987 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17988 eval "$as_ac_var=yes"
17989else
17990 echo "$as_me: failed program was:" >&5
19650fd6
AS
17991sed 's/^/| /' conftest.$ac_ext >&5
17992
ca81d7a0 17993 eval "$as_ac_var=no"
503d2be0 17994fi
ca81d7a0 17995
f053c89f 17996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17997 conftest$ac_exeext conftest.$ac_ext
503d2be0 17998fi
ca81d7a0
JD
17999ac_res=`eval echo '${'$as_ac_var'}'`
18000 { echo "$as_me:$LINENO: result: $ac_res" >&5
18001echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18002if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18003 cat >>confdefs.h <<_ACEOF
503d2be0 18004#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18005_ACEOF
ba4481b5 18006
ba4481b5
DL
18007fi
18008done
18009
c0d27fcc 18010
98418dba
CW
18011# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18012# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18013# Irix 4.0.5F has the header but not the library.
18014if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18015 ac_have_func=yes
18016
c0d27fcc 18017cat >>confdefs.h <<\_ACEOF
98418dba 18018#define SVR4 1
c0d27fcc 18019_ACEOF
98418dba
CW
18020
18021fi
18022
18023if test $ac_have_func = no; then
c0d27fcc 18024 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18025 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18026echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18027if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18028 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18029fi
ca81d7a0
JD
18030{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18031echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18032else
c0d27fcc 18033 # Is the header compilable?
ca81d7a0
JD
18034{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18035echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18037/* confdefs.h. */
18038_ACEOF
18039cat confdefs.h >>conftest.$ac_ext
18040cat >>conftest.$ac_ext <<_ACEOF
18041/* end confdefs.h. */
c0d27fcc
MR
18042$ac_includes_default
18043#include <inq_stats/cpustats.h>
18044_ACEOF
18045rm -f conftest.$ac_objext
ca81d7a0
JD
18046if { (ac_try="$ac_compile"
18047case "(($ac_try" in
18048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18049 *) ac_try_echo=$ac_try;;
18050esac
18051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18052 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18053 ac_status=$?
edfaf76d
LK
18054 grep -v '^ *+' conftest.er1 >conftest.err
18055 rm -f conftest.er1
18056 cat conftest.err >&5
c0d27fcc 18057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18058 (exit $ac_status); } && {
18059 test -z "$ac_c_werror_flag" ||
18060 test ! -s conftest.err
18061 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18062 ac_header_compiler=yes
18063else
18064 echo "$as_me: failed program was:" >&5
19650fd6
AS
18065sed 's/^/| /' conftest.$ac_ext >&5
18066
ca81d7a0 18067 ac_header_compiler=no
c0d27fcc 18068fi
ca81d7a0
JD
18069
18070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18071{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18072echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18073
18074# Is the header present?
ca81d7a0
JD
18075{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18076echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18077cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18078/* confdefs.h. */
18079_ACEOF
18080cat confdefs.h >>conftest.$ac_ext
18081cat >>conftest.$ac_ext <<_ACEOF
18082/* end confdefs.h. */
98418dba 18083#include <inq_stats/cpustats.h>
503d2be0 18084_ACEOF
ca81d7a0
JD
18085if { (ac_try="$ac_cpp conftest.$ac_ext"
18086case "(($ac_try" in
18087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18088 *) ac_try_echo=$ac_try;;
18089esac
18090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18091 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18092 ac_status=$?
6bae0ccf 18093 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18094 rm -f conftest.er1
18095 cat conftest.err >&5
c0d27fcc 18096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18097 (exit $ac_status); } >/dev/null && {
18098 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18099 test ! -s conftest.err
18100 }; then
c0d27fcc 18101 ac_header_preproc=yes
503d2be0
AS
18102else
18103 echo "$as_me: failed program was:" >&5
19650fd6
AS
18104sed 's/^/| /' conftest.$ac_ext >&5
18105
c0d27fcc 18106 ac_header_preproc=no
ba4481b5 18107fi
ca81d7a0 18108
503d2be0 18109rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18110{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18111echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18112
18113# So? What about this header?
edfaf76d
LK
18114case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18115 yes:no: )
c0d27fcc
MR
18116 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18117echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18118 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18119echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18120 ac_header_preproc=yes
19650fd6 18121 ;;
edfaf76d 18122 no:yes:* )
c0d27fcc
MR
18123 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18124echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18125 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18126echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18127 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18128echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18129 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18130echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18131 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18132echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18133 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18134echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18135
19650fd6 18136 ;;
c0d27fcc 18137esac
ca81d7a0
JD
18138{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18139echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18140if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18141 echo $ECHO_N "(cached) $ECHO_C" >&6
18142else
18143 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18144fi
ca81d7a0
JD
18145{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18146echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18147
18148fi
98418dba
CW
18149if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18150 ac_have_func=yes
ba4481b5 18151
c0d27fcc 18152cat >>confdefs.h <<\_ACEOF
98418dba 18153#define UMAX 1
c0d27fcc 18154_ACEOF
98418dba 18155
c0d27fcc
MR
18156
18157cat >>confdefs.h <<\_ACEOF
98418dba 18158#define UMAX4_3 1
c0d27fcc 18159_ACEOF
98418dba
CW
18160
18161fi
18162
c0d27fcc 18163
98418dba
CW
18164fi
18165
18166if test $ac_have_func = no; then
c0d27fcc 18167 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18168 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18169echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18170if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18171 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18172fi
ca81d7a0
JD
18173{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18174echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18175else
c0d27fcc 18176 # Is the header compilable?
ca81d7a0
JD
18177{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18178echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18179cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18180/* confdefs.h. */
18181_ACEOF
18182cat confdefs.h >>conftest.$ac_ext
18183cat >>conftest.$ac_ext <<_ACEOF
18184/* end confdefs.h. */
c0d27fcc
MR
18185$ac_includes_default
18186#include <sys/cpustats.h>
18187_ACEOF
18188rm -f conftest.$ac_objext
ca81d7a0
JD
18189if { (ac_try="$ac_compile"
18190case "(($ac_try" in
18191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18192 *) ac_try_echo=$ac_try;;
18193esac
18194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18195 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18196 ac_status=$?
edfaf76d
LK
18197 grep -v '^ *+' conftest.er1 >conftest.err
18198 rm -f conftest.er1
18199 cat conftest.err >&5
c0d27fcc 18200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18201 (exit $ac_status); } && {
18202 test -z "$ac_c_werror_flag" ||
18203 test ! -s conftest.err
18204 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18205 ac_header_compiler=yes
18206else
18207 echo "$as_me: failed program was:" >&5
19650fd6
AS
18208sed 's/^/| /' conftest.$ac_ext >&5
18209
ca81d7a0 18210 ac_header_compiler=no
c0d27fcc 18211fi
ca81d7a0
JD
18212
18213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18214{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18215echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18216
18217# Is the header present?
ca81d7a0
JD
18218{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18219echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18220cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18221/* confdefs.h. */
18222_ACEOF
18223cat confdefs.h >>conftest.$ac_ext
18224cat >>conftest.$ac_ext <<_ACEOF
18225/* end confdefs.h. */
98418dba
CW
18226#include <sys/cpustats.h>
18227_ACEOF
ca81d7a0
JD
18228if { (ac_try="$ac_cpp conftest.$ac_ext"
18229case "(($ac_try" in
18230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18231 *) ac_try_echo=$ac_try;;
18232esac
18233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18234 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18235 ac_status=$?
6bae0ccf 18236 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18237 rm -f conftest.er1
18238 cat conftest.err >&5
c0d27fcc 18239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18240 (exit $ac_status); } >/dev/null && {
18241 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18242 test ! -s conftest.err
18243 }; then
c0d27fcc 18244 ac_header_preproc=yes
98418dba
CW
18245else
18246 echo "$as_me: failed program was:" >&5
19650fd6
AS
18247sed 's/^/| /' conftest.$ac_ext >&5
18248
c0d27fcc 18249 ac_header_preproc=no
98418dba 18250fi
ca81d7a0 18251
98418dba 18252rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18253{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18254echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18255
18256# So? What about this header?
edfaf76d
LK
18257case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18258 yes:no: )
c0d27fcc
MR
18259 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18260echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18261 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18262echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18263 ac_header_preproc=yes
19650fd6 18264 ;;
edfaf76d 18265 no:yes:* )
c0d27fcc
MR
18266 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18267echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18268 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18269echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18270 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18271echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18272 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18273echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18274 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18275echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18276 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18277echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18278
19650fd6 18279 ;;
c0d27fcc 18280esac
ca81d7a0
JD
18281{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18282echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18283if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18284 echo $ECHO_N "(cached) $ECHO_C" >&6
18285else
18286 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18287fi
ca81d7a0
JD
18288{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18289echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18290
18291fi
98418dba 18292if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18293 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18294#define UMAX 1
c0d27fcc 18295_ACEOF
ba4481b5 18296
98418dba
CW
18297fi
18298
c0d27fcc 18299
98418dba
CW
18300fi
18301
18302if test $ac_have_func = no; then
18303
18304for ac_header in mach/mach.h
2c9dccc9
PJ
18305do
18306as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18307if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18308 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18309echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18310if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18311 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18312fi
ca81d7a0
JD
18313ac_res=`eval echo '${'$as_ac_Header'}'`
18314 { echo "$as_me:$LINENO: result: $ac_res" >&5
18315echo "${ECHO_T}$ac_res" >&6; }
98418dba 18316else
c0d27fcc 18317 # Is the header compilable?
ca81d7a0
JD
18318{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18319echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18320cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18321/* confdefs.h. */
18322_ACEOF
18323cat confdefs.h >>conftest.$ac_ext
18324cat >>conftest.$ac_ext <<_ACEOF
18325/* end confdefs.h. */
c0d27fcc
MR
18326$ac_includes_default
18327#include <$ac_header>
18328_ACEOF
18329rm -f conftest.$ac_objext
ca81d7a0
JD
18330if { (ac_try="$ac_compile"
18331case "(($ac_try" in
18332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18333 *) ac_try_echo=$ac_try;;
18334esac
18335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18336 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18337 ac_status=$?
edfaf76d
LK
18338 grep -v '^ *+' conftest.er1 >conftest.err
18339 rm -f conftest.er1
18340 cat conftest.err >&5
c0d27fcc 18341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18342 (exit $ac_status); } && {
18343 test -z "$ac_c_werror_flag" ||
18344 test ! -s conftest.err
18345 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18346 ac_header_compiler=yes
18347else
18348 echo "$as_me: failed program was:" >&5
19650fd6
AS
18349sed 's/^/| /' conftest.$ac_ext >&5
18350
ca81d7a0 18351 ac_header_compiler=no
c0d27fcc 18352fi
ca81d7a0
JD
18353
18354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18355{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18356echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18357
18358# Is the header present?
ca81d7a0
JD
18359{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18360echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18361cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18362/* confdefs.h. */
18363_ACEOF
18364cat confdefs.h >>conftest.$ac_ext
18365cat >>conftest.$ac_ext <<_ACEOF
18366/* end confdefs.h. */
2c9dccc9
PJ
18367#include <$ac_header>
18368_ACEOF
ca81d7a0
JD
18369if { (ac_try="$ac_cpp conftest.$ac_ext"
18370case "(($ac_try" in
18371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18372 *) ac_try_echo=$ac_try;;
18373esac
18374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18375 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18376 ac_status=$?
6bae0ccf 18377 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18378 rm -f conftest.er1
18379 cat conftest.err >&5
c0d27fcc 18380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18381 (exit $ac_status); } >/dev/null && {
18382 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18383 test ! -s conftest.err
18384 }; then
c0d27fcc
MR
18385 ac_header_preproc=yes
18386else
18387 echo "$as_me: failed program was:" >&5
19650fd6
AS
18388sed 's/^/| /' conftest.$ac_ext >&5
18389
c0d27fcc
MR
18390 ac_header_preproc=no
18391fi
ca81d7a0 18392
c0d27fcc 18393rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18394{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18395echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18396
18397# So? What about this header?
edfaf76d
LK
18398case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18399 yes:no: )
c0d27fcc
MR
18400 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18401echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18402 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18403echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18404 ac_header_preproc=yes
19650fd6 18405 ;;
edfaf76d 18406 no:yes:* )
c0d27fcc
MR
18407 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18408echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18409 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18410echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18411 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18412echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18413 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18414echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18415 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18416echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18417 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18418echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18419
19650fd6 18420 ;;
c0d27fcc 18421esac
ca81d7a0
JD
18422{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18424if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18425 echo $ECHO_N "(cached) $ECHO_C" >&6
18426else
edfaf76d 18427 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18428fi
ca81d7a0
JD
18429ac_res=`eval echo '${'$as_ac_Header'}'`
18430 { echo "$as_me:$LINENO: result: $ac_res" >&5
18431echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18432
18433fi
18434if test `eval echo '${'$as_ac_Header'}'` = yes; then
18435 cat >>confdefs.h <<_ACEOF
18436#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18437_ACEOF
18438
18439fi
18440
18441done
18442
18443fi
18444
18445
18446for ac_header in nlist.h
18447do
18448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18449if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18450 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18453 echo $ECHO_N "(cached) $ECHO_C" >&6
18454fi
ca81d7a0
JD
18455ac_res=`eval echo '${'$as_ac_Header'}'`
18456 { echo "$as_me:$LINENO: result: $ac_res" >&5
18457echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18458else
18459 # Is the header compilable?
ca81d7a0
JD
18460{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18461echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18462cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18463/* confdefs.h. */
18464_ACEOF
18465cat confdefs.h >>conftest.$ac_ext
18466cat >>conftest.$ac_ext <<_ACEOF
18467/* end confdefs.h. */
c0d27fcc
MR
18468$ac_includes_default
18469#include <$ac_header>
18470_ACEOF
18471rm -f conftest.$ac_objext
ca81d7a0
JD
18472if { (ac_try="$ac_compile"
18473case "(($ac_try" in
18474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18475 *) ac_try_echo=$ac_try;;
18476esac
18477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18478 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18479 ac_status=$?
edfaf76d
LK
18480 grep -v '^ *+' conftest.er1 >conftest.err
18481 rm -f conftest.er1
18482 cat conftest.err >&5
c0d27fcc 18483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18484 (exit $ac_status); } && {
18485 test -z "$ac_c_werror_flag" ||
18486 test ! -s conftest.err
18487 } && test -s conftest.$ac_objext; then
c0d27fcc 18488 ac_header_compiler=yes
2c9dccc9
PJ
18489else
18490 echo "$as_me: failed program was:" >&5
19650fd6
AS
18491sed 's/^/| /' conftest.$ac_ext >&5
18492
ca81d7a0 18493 ac_header_compiler=no
98418dba 18494fi
ca81d7a0
JD
18495
18496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18497{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18498echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18499
c0d27fcc 18500# Is the header present?
ca81d7a0
JD
18501{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18502echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18503cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18504/* confdefs.h. */
18505_ACEOF
18506cat confdefs.h >>conftest.$ac_ext
18507cat >>conftest.$ac_ext <<_ACEOF
18508/* end confdefs.h. */
503d2be0
AS
18509#include <$ac_header>
18510_ACEOF
ca81d7a0
JD
18511if { (ac_try="$ac_cpp conftest.$ac_ext"
18512case "(($ac_try" in
18513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18514 *) ac_try_echo=$ac_try;;
18515esac
18516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18517 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18518 ac_status=$?
6bae0ccf 18519 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18520 rm -f conftest.er1
18521 cat conftest.err >&5
c0d27fcc 18522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18523 (exit $ac_status); } >/dev/null && {
18524 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18525 test ! -s conftest.err
18526 }; then
c0d27fcc 18527 ac_header_preproc=yes
503d2be0
AS
18528else
18529 echo "$as_me: failed program was:" >&5
19650fd6
AS
18530sed 's/^/| /' conftest.$ac_ext >&5
18531
c0d27fcc 18532 ac_header_preproc=no
b5de8dc0 18533fi
ca81d7a0 18534
503d2be0 18535rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18536{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18537echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18538
18539# So? What about this header?
edfaf76d
LK
18540case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18541 yes:no: )
c0d27fcc
MR
18542 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18543echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18544 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18545echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18546 ac_header_preproc=yes
19650fd6 18547 ;;
edfaf76d 18548 no:yes:* )
c0d27fcc
MR
18549 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18550echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18551 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18552echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18553 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18554echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18555 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18556echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18557 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18558echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18559 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18560echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18561
19650fd6 18562 ;;
c0d27fcc 18563esac
ca81d7a0
JD
18564{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18565echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18566if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18567 echo $ECHO_N "(cached) $ECHO_C" >&6
18568else
edfaf76d 18569 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18570fi
ca81d7a0
JD
18571ac_res=`eval echo '${'$as_ac_Header'}'`
18572 { echo "$as_me:$LINENO: result: $ac_res" >&5
18573echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18574
18575fi
98418dba 18576if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18577 cat >>confdefs.h <<_ACEOF
98418dba 18578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18579_ACEOF
ca81d7a0
JD
18580 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18581echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18582if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18583 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18584else
503d2be0 18585 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18586/* confdefs.h. */
18587_ACEOF
18588cat confdefs.h >>conftest.$ac_ext
18589cat >>conftest.$ac_ext <<_ACEOF
18590/* end confdefs.h. */
98418dba 18591#include <nlist.h>
b5de8dc0 18592
503d2be0
AS
18593int
18594main ()
18595{
98418dba
CW
18596static struct nlist ac_aggr;
18597if (ac_aggr.n_un.n_name)
18598return 0;
503d2be0
AS
18599 ;
18600 return 0;
18601}
18602_ACEOF
98418dba 18603rm -f conftest.$ac_objext
ca81d7a0
JD
18604if { (ac_try="$ac_compile"
18605case "(($ac_try" in
18606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18607 *) ac_try_echo=$ac_try;;
18608esac
18609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18610 (eval "$ac_compile") 2>conftest.er1
503d2be0 18611 ac_status=$?
edfaf76d
LK
18612 grep -v '^ *+' conftest.er1 >conftest.err
18613 rm -f conftest.er1
18614 cat conftest.err >&5
c0d27fcc 18615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18616 (exit $ac_status); } && {
18617 test -z "$ac_c_werror_flag" ||
18618 test ! -s conftest.err
18619 } && test -s conftest.$ac_objext; then
edfaf76d 18620 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18621else
18622 echo "$as_me: failed program was:" >&5
19650fd6
AS
18623sed 's/^/| /' conftest.$ac_ext >&5
18624
ca81d7a0 18625 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18626/* confdefs.h. */
18627_ACEOF
18628cat confdefs.h >>conftest.$ac_ext
18629cat >>conftest.$ac_ext <<_ACEOF
18630/* end confdefs.h. */
6bae0ccf
DL
18631#include <nlist.h>
18632
18633int
18634main ()
18635{
18636static struct nlist ac_aggr;
18637if (sizeof ac_aggr.n_un.n_name)
18638return 0;
18639 ;
18640 return 0;
18641}
18642_ACEOF
18643rm -f conftest.$ac_objext
ca81d7a0
JD
18644if { (ac_try="$ac_compile"
18645case "(($ac_try" in
18646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18647 *) ac_try_echo=$ac_try;;
18648esac
18649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18650 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18651 ac_status=$?
edfaf76d
LK
18652 grep -v '^ *+' conftest.er1 >conftest.err
18653 rm -f conftest.er1
18654 cat conftest.err >&5
6bae0ccf 18655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18656 (exit $ac_status); } && {
18657 test -z "$ac_c_werror_flag" ||
18658 test ! -s conftest.err
18659 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18660 ac_cv_member_struct_nlist_n_un_n_name=yes
18661else
18662 echo "$as_me: failed program was:" >&5
19650fd6
AS
18663sed 's/^/| /' conftest.$ac_ext >&5
18664
ca81d7a0 18665 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18666fi
ca81d7a0
JD
18667
18668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18669fi
ca81d7a0
JD
18670
18671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18672fi
ca81d7a0
JD
18673{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18674echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18675if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18676
c0d27fcc 18677cat >>confdefs.h <<_ACEOF
98418dba 18678#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18679_ACEOF
b5de8dc0 18680
c0d27fcc
MR
18681
18682cat >>confdefs.h <<\_ACEOF
98418dba 18683#define NLIST_NAME_UNION 1
c0d27fcc 18684_ACEOF
b5de8dc0 18685
98418dba 18686fi
b5de8dc0 18687
c0d27fcc 18688
98418dba 18689fi
c0d27fcc 18690
98418dba 18691done
b5de8dc0 18692
98418dba
CW
18693fi
18694done
b5de8dc0 18695
c0d27fcc 18696
98418dba 18697# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18698{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18699echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18700if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18701 echo $ECHO_N "(cached) $ECHO_C" >&6
18702else
18703 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18704/* confdefs.h. */
18705_ACEOF
18706cat confdefs.h >>conftest.$ac_ext
18707cat >>conftest.$ac_ext <<_ACEOF
18708/* end confdefs.h. */
6bae0ccf 18709#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18710#ifdef LDAV_PRIVILEGED
18711Yowza Am I SETGID yet
18712#endif
18713_ACEOF
18714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18715 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18716 ac_cv_func_getloadavg_setgid=yes
18717else
18718 ac_cv_func_getloadavg_setgid=no
18719fi
18720rm -f conftest*
b5de8dc0 18721
98418dba 18722fi
ca81d7a0
JD
18723{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18724echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18725if test $ac_cv_func_getloadavg_setgid = yes; then
18726 NEED_SETGID=true
b5de8dc0 18727
c0d27fcc 18728cat >>confdefs.h <<\_ACEOF
98418dba 18729#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18730_ACEOF
98418dba 18731
b5de8dc0 18732else
98418dba 18733 NEED_SETGID=false
b5de8dc0 18734fi
98418dba
CW
18735
18736if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18737 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18738echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18739if test "${ac_cv_group_kmem+set}" = set; then
18740 echo $ECHO_N "(cached) $ECHO_C" >&6
18741else
18742 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18743 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18744 # If we got an error (system does not support symlinks), try without -L.
18745 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18746 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18747 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18748 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18749 / /s/.* //;p;'`
18750
b5de8dc0 18751fi
ca81d7a0
JD
18752{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18753echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18754 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18755fi
98418dba
CW
18756if test "x$ac_save_LIBS" = x; then
18757 GETLOADAVG_LIBS=$LIBS
18758else
18759 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18760fi
98418dba 18761LIBS=$ac_save_LIBS
b5de8dc0 18762
c0d27fcc
MR
18763
18764
ca81d7a0
JD
18765{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18766echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18767if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18768 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18769else
b936fae4 18770 while :; do
503d2be0 18771 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18772/* confdefs.h. */
18773_ACEOF
18774cat confdefs.h >>conftest.$ac_ext
18775cat >>conftest.$ac_ext <<_ACEOF
18776/* end confdefs.h. */
2d3c36ae
SM
18777#include <sys/types.h> /* for off_t */
18778 #include <stdio.h>
503d2be0
AS
18779int
18780main ()
18781{
2d3c36ae
SM
18782int (*fp) (FILE *, off_t, int) = fseeko;
18783 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18784 ;
18785 return 0;
18786}
18787_ACEOF
f053c89f
CY
18788rm -f conftest.$ac_objext conftest$ac_exeext
18789if { (ac_try="$ac_link"
ca81d7a0
JD
18790case "(($ac_try" in
18791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18792 *) ac_try_echo=$ac_try;;
18793esac
18794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18795 (eval "$ac_link") 2>conftest.er1
b936fae4 18796 ac_status=$?
edfaf76d
LK
18797 grep -v '^ *+' conftest.er1 >conftest.err
18798 rm -f conftest.er1
18799 cat conftest.err >&5
c0d27fcc 18800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18801 (exit $ac_status); } && {
18802 test -z "$ac_c_werror_flag" ||
18803 test ! -s conftest.err
18804 } && test -s conftest$ac_exeext &&
18805 $as_test_x conftest$ac_exeext; then
18806 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18807else
18808 echo "$as_me: failed program was:" >&5
19650fd6
AS
18809sed 's/^/| /' conftest.$ac_ext >&5
18810
ca81d7a0 18811
b936fae4 18812fi
ca81d7a0 18813
f053c89f
CY
18814rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18815 conftest$ac_exeext conftest.$ac_ext
b936fae4 18816 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18817/* confdefs.h. */
18818_ACEOF
18819cat confdefs.h >>conftest.$ac_ext
18820cat >>conftest.$ac_ext <<_ACEOF
18821/* end confdefs.h. */
b936fae4 18822#define _LARGEFILE_SOURCE 1
2d3c36ae
SM
18823#include <sys/types.h> /* for off_t */
18824 #include <stdio.h>
b936fae4
AS
18825int
18826main ()
18827{
2d3c36ae
SM
18828int (*fp) (FILE *, off_t, int) = fseeko;
18829 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18830 ;
18831 return 0;
18832}
18833_ACEOF
f053c89f
CY
18834rm -f conftest.$ac_objext conftest$ac_exeext
18835if { (ac_try="$ac_link"
ca81d7a0
JD
18836case "(($ac_try" in
18837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18838 *) ac_try_echo=$ac_try;;
18839esac
18840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18841 (eval "$ac_link") 2>conftest.er1
b936fae4 18842 ac_status=$?
edfaf76d
LK
18843 grep -v '^ *+' conftest.er1 >conftest.err
18844 rm -f conftest.er1
18845 cat conftest.err >&5
c0d27fcc 18846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18847 (exit $ac_status); } && {
18848 test -z "$ac_c_werror_flag" ||
18849 test ! -s conftest.err
18850 } && test -s conftest$ac_exeext &&
18851 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18852 ac_cv_sys_largefile_source=1; break
18853else
18854 echo "$as_me: failed program was:" >&5
19650fd6
AS
18855sed 's/^/| /' conftest.$ac_ext >&5
18856
ca81d7a0 18857
b936fae4 18858fi
ca81d7a0 18859
f053c89f
CY
18860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18861 conftest$ac_exeext conftest.$ac_ext
18862 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18863 break
18864done
18865fi
ca81d7a0
JD
18866{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18867echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18868case $ac_cv_sys_largefile_source in #(
18869 no | unknown) ;;
18870 *)
c0d27fcc 18871cat >>confdefs.h <<_ACEOF
b936fae4 18872#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18873_ACEOF
f053c89f
CY
18874;;
18875esac
b936fae4 18876rm -f conftest*
4c343001 18877
b936fae4
AS
18878# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18879# in glibc 2.1.3, but that breaks too many other things.
18880# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18881if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18882
c0d27fcc 18883cat >>confdefs.h <<\_ACEOF
b936fae4 18884#define HAVE_FSEEKO 1
c0d27fcc 18885_ACEOF
b936fae4 18886
4c343001
DL
18887fi
18888
c0d27fcc 18889
52dbaac8
PE
18890# Configure getopt.
18891# getopt.m4 serial 10
18892
18893# The getopt module assume you want GNU getopt, with getopt_long etc,
18894# rather than vanilla POSIX getopt. This means your your code should
18895# always include <getopt.h> for the getopt prototypes.
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907# Prerequisites of lib/getopt*.
18908
18909
18910
10a3b1a1 18911
52dbaac8
PE
18912 GETOPT_H=
18913
18914for ac_header in getopt.h
18915do
18916as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18917if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18918 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18919echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18920if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18921 echo $ECHO_N "(cached) $ECHO_C" >&6
18922fi
ca81d7a0
JD
18923ac_res=`eval echo '${'$as_ac_Header'}'`
18924 { echo "$as_me:$LINENO: result: $ac_res" >&5
18925echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18926else
18927 # Is the header compilable?
ca81d7a0
JD
18928{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18929echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18930cat >conftest.$ac_ext <<_ACEOF
18931/* confdefs.h. */
18932_ACEOF
18933cat confdefs.h >>conftest.$ac_ext
18934cat >>conftest.$ac_ext <<_ACEOF
18935/* end confdefs.h. */
18936$ac_includes_default
18937#include <$ac_header>
18938_ACEOF
18939rm -f conftest.$ac_objext
ca81d7a0
JD
18940if { (ac_try="$ac_compile"
18941case "(($ac_try" in
18942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18943 *) ac_try_echo=$ac_try;;
18944esac
18945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18946 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18947 ac_status=$?
18948 grep -v '^ *+' conftest.er1 >conftest.err
18949 rm -f conftest.er1
18950 cat conftest.err >&5
18951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18952 (exit $ac_status); } && {
18953 test -z "$ac_c_werror_flag" ||
18954 test ! -s conftest.err
18955 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18956 ac_header_compiler=yes
18957else
18958 echo "$as_me: failed program was:" >&5
18959sed 's/^/| /' conftest.$ac_ext >&5
18960
ca81d7a0 18961 ac_header_compiler=no
52dbaac8 18962fi
ca81d7a0
JD
18963
18964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18965{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18966echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18967
18968# Is the header present?
ca81d7a0
JD
18969{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18970echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18971cat >conftest.$ac_ext <<_ACEOF
18972/* confdefs.h. */
18973_ACEOF
18974cat confdefs.h >>conftest.$ac_ext
18975cat >>conftest.$ac_ext <<_ACEOF
18976/* end confdefs.h. */
18977#include <$ac_header>
18978_ACEOF
ca81d7a0
JD
18979if { (ac_try="$ac_cpp conftest.$ac_ext"
18980case "(($ac_try" in
18981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18982 *) ac_try_echo=$ac_try;;
18983esac
18984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18985 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18986 ac_status=$?
18987 grep -v '^ *+' conftest.er1 >conftest.err
18988 rm -f conftest.er1
18989 cat conftest.err >&5
18990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18991 (exit $ac_status); } >/dev/null && {
18992 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18993 test ! -s conftest.err
18994 }; then
52dbaac8
PE
18995 ac_header_preproc=yes
18996else
18997 echo "$as_me: failed program was:" >&5
18998sed 's/^/| /' conftest.$ac_ext >&5
18999
19000 ac_header_preproc=no
19001fi
ca81d7a0 19002
52dbaac8 19003rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19004{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19005echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19006
19007# So? What about this header?
19008case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19009 yes:no: )
19010 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19011echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19012 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19013echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19014 ac_header_preproc=yes
19015 ;;
19016 no:yes:* )
19017 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19018echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19019 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19020echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19021 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19022echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19023 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19024echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19025 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19026echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19027 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19028echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19029
52dbaac8
PE
19030 ;;
19031esac
ca81d7a0
JD
19032{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19033echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19034if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19035 echo $ECHO_N "(cached) $ECHO_C" >&6
19036else
19037 eval "$as_ac_Header=\$ac_header_preproc"
19038fi
ca81d7a0
JD
19039ac_res=`eval echo '${'$as_ac_Header'}'`
19040 { echo "$as_me:$LINENO: result: $ac_res" >&5
19041echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19042
19043fi
19044if test `eval echo '${'$as_ac_Header'}'` = yes; then
19045 cat >>confdefs.h <<_ACEOF
19046#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19047_ACEOF
19048
19049else
19050 GETOPT_H=getopt.h
19051fi
19052
19053done
19054
19055 if test -z "$GETOPT_H"; then
19056
19057for ac_func in getopt_long_only
19058do
19059as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19060{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19061echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19062if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19063 echo $ECHO_N "(cached) $ECHO_C" >&6
19064else
19065 cat >conftest.$ac_ext <<_ACEOF
19066/* confdefs.h. */
19067_ACEOF
19068cat confdefs.h >>conftest.$ac_ext
19069cat >>conftest.$ac_ext <<_ACEOF
19070/* end confdefs.h. */
19071/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19073#define $ac_func innocuous_$ac_func
19074
19075/* System header to define __stub macros and hopefully few prototypes,
19076 which can conflict with char $ac_func (); below.
19077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19078 <limits.h> exists even on freestanding compilers. */
19079
19080#ifdef __STDC__
19081# include <limits.h>
19082#else
19083# include <assert.h>
19084#endif
19085
19086#undef $ac_func
19087
ca81d7a0
JD
19088/* Override any GCC internal prototype to avoid an error.
19089 Use char because int might match the return type of a GCC
19090 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19091#ifdef __cplusplus
19092extern "C"
52dbaac8 19093#endif
52dbaac8
PE
19094char $ac_func ();
19095/* The GNU C library defines this for functions which it implements
19096 to always fail with ENOSYS. Some functions are actually named
19097 something starting with __ and the normal name is an alias. */
ca81d7a0 19098#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19099choke me
52dbaac8
PE
19100#endif
19101
19102int
19103main ()
19104{
ca81d7a0 19105return $ac_func ();
52dbaac8
PE
19106 ;
19107 return 0;
19108}
19109_ACEOF
19110rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19111if { (ac_try="$ac_link"
19112case "(($ac_try" in
19113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19114 *) ac_try_echo=$ac_try;;
19115esac
19116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19117 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19118 ac_status=$?
19119 grep -v '^ *+' conftest.er1 >conftest.err
19120 rm -f conftest.er1
19121 cat conftest.err >&5
19122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19123 (exit $ac_status); } && {
19124 test -z "$ac_c_werror_flag" ||
19125 test ! -s conftest.err
19126 } && test -s conftest$ac_exeext &&
19127 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19128 eval "$as_ac_var=yes"
19129else
19130 echo "$as_me: failed program was:" >&5
19131sed 's/^/| /' conftest.$ac_ext >&5
19132
ca81d7a0 19133 eval "$as_ac_var=no"
52dbaac8 19134fi
ca81d7a0 19135
f053c89f 19136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19137 conftest$ac_exeext conftest.$ac_ext
19138fi
ca81d7a0
JD
19139ac_res=`eval echo '${'$as_ac_var'}'`
19140 { echo "$as_me:$LINENO: result: $ac_res" >&5
19141echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19142if test `eval echo '${'$as_ac_var'}'` = yes; then
19143 cat >>confdefs.h <<_ACEOF
19144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19145_ACEOF
19146
19147else
19148 GETOPT_H=getopt.h
19149fi
19150done
19151
19152 fi
19153
19154 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19155 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19156echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19157if test "${ac_cv_have_decl_optreset+set}" = set; then
19158 echo $ECHO_N "(cached) $ECHO_C" >&6
19159else
19160 cat >conftest.$ac_ext <<_ACEOF
19161/* confdefs.h. */
19162_ACEOF
19163cat confdefs.h >>conftest.$ac_ext
19164cat >>conftest.$ac_ext <<_ACEOF
19165/* end confdefs.h. */
19166#include <getopt.h>
19167
19168int
19169main ()
19170{
19171#ifndef optreset
f053c89f 19172 (void) optreset;
52dbaac8
PE
19173#endif
19174
19175 ;
19176 return 0;
19177}
19178_ACEOF
19179rm -f conftest.$ac_objext
ca81d7a0
JD
19180if { (ac_try="$ac_compile"
19181case "(($ac_try" in
19182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19183 *) ac_try_echo=$ac_try;;
19184esac
19185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19186 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19187 ac_status=$?
19188 grep -v '^ *+' conftest.er1 >conftest.err
19189 rm -f conftest.er1
19190 cat conftest.err >&5
19191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19192 (exit $ac_status); } && {
19193 test -z "$ac_c_werror_flag" ||
19194 test ! -s conftest.err
19195 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19196 ac_cv_have_decl_optreset=yes
19197else
19198 echo "$as_me: failed program was:" >&5
19199sed 's/^/| /' conftest.$ac_ext >&5
19200
ca81d7a0 19201 ac_cv_have_decl_optreset=no
52dbaac8 19202fi
ca81d7a0
JD
19203
19204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19205fi
ca81d7a0
JD
19206{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19207echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19208if test $ac_cv_have_decl_optreset = yes; then
19209 GETOPT_H=getopt.h
19210fi
19211
19212 fi
19213
19214 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19215 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19216echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19217if test "${gl_cv_func_gnu_getopt+set}" = set; then
19218 echo $ECHO_N "(cached) $ECHO_C" >&6
19219else
19220 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19221 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19222echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19223if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19224 echo $ECHO_N "(cached) $ECHO_C" >&6
19225else
19226 cat >conftest.$ac_ext <<_ACEOF
19227/* confdefs.h. */
19228_ACEOF
19229cat confdefs.h >>conftest.$ac_ext
19230cat >>conftest.$ac_ext <<_ACEOF
19231/* end confdefs.h. */
19232#include <getopt.h>
19233
19234int
19235main ()
19236{
19237#ifndef getopt_clip
f053c89f 19238 (void) getopt_clip;
52dbaac8
PE
19239#endif
19240
19241 ;
19242 return 0;
19243}
19244_ACEOF
19245rm -f conftest.$ac_objext
ca81d7a0
JD
19246if { (ac_try="$ac_compile"
19247case "(($ac_try" in
19248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19249 *) ac_try_echo=$ac_try;;
19250esac
19251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19252 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19253 ac_status=$?
19254 grep -v '^ *+' conftest.er1 >conftest.err
19255 rm -f conftest.er1
19256 cat conftest.err >&5
19257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19258 (exit $ac_status); } && {
19259 test -z "$ac_c_werror_flag" ||
19260 test ! -s conftest.err
19261 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19262 ac_cv_have_decl_getopt_clip=yes
19263else
19264 echo "$as_me: failed program was:" >&5
19265sed 's/^/| /' conftest.$ac_ext >&5
19266
ca81d7a0 19267 ac_cv_have_decl_getopt_clip=no
52dbaac8 19268fi
ca81d7a0
JD
19269
19270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19271fi
ca81d7a0
JD
19272{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19273echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19274if test $ac_cv_have_decl_getopt_clip = yes; then
19275 gl_cv_func_gnu_getopt=no
19276else
19277 gl_cv_func_gnu_getopt=yes
19278fi
19279
19280else
19281 cat >conftest.$ac_ext <<_ACEOF
19282/* confdefs.h. */
19283_ACEOF
19284cat confdefs.h >>conftest.$ac_ext
19285cat >>conftest.$ac_ext <<_ACEOF
19286/* end confdefs.h. */
19287#include <getopt.h>
19288int
19289main ()
19290{
19291
19292 char *myargv[3];
19293 myargv[0] = "conftest";
19294 myargv[1] = "-+";
19295 myargv[2] = 0;
19296 return getopt (2, myargv, "+a") != '?';
19297
19298 ;
19299 return 0;
19300}
19301_ACEOF
19302rm -f conftest$ac_exeext
ca81d7a0
JD
19303if { (ac_try="$ac_link"
19304case "(($ac_try" in
19305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19306 *) ac_try_echo=$ac_try;;
19307esac
19308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19309 (eval "$ac_link") 2>&5
52dbaac8
PE
19310 ac_status=$?
19311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19313 { (case "(($ac_try" in
19314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315 *) ac_try_echo=$ac_try;;
19316esac
19317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19318 (eval "$ac_try") 2>&5
52dbaac8
PE
19319 ac_status=$?
19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321 (exit $ac_status); }; }; then
19322 gl_cv_func_gnu_getopt=yes
19323else
19324 echo "$as_me: program exited with status $ac_status" >&5
19325echo "$as_me: failed program was:" >&5
19326sed 's/^/| /' conftest.$ac_ext >&5
19327
19328( exit $ac_status )
19329gl_cv_func_gnu_getopt=no
19330fi
ca81d7a0 19331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19332fi
ca81d7a0
JD
19333
19334
52dbaac8 19335fi
ca81d7a0
JD
19336{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19337echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19338 if test "$gl_cv_func_gnu_getopt" = "no"; then
19339 GETOPT_H=getopt.h
19340 fi
19341 fi
19342
19343
19344
19345 if test -n "$GETOPT_H"; then
19346
19347
19348 GETOPT_H=getopt.h
19349
19350cat >>confdefs.h <<\_ACEOF
19351#define __GETOPT_PREFIX rpl_
19352_ACEOF
19353
19354
19355
19356 :
19357 GETOPTOBJS='getopt.o getopt1.o'
19358
19359fi
19360
19361
19362
19363
ca81d7a0
JD
19364{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19365echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19366if test "${ac_cv_func_getpgrp_void+set}" = set; then
19367 echo $ECHO_N "(cached) $ECHO_C" >&6
19368else
19369 # Use it with a single arg.
19370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19371/* confdefs.h. */
19372_ACEOF
19373cat confdefs.h >>conftest.$ac_ext
19374cat >>conftest.$ac_ext <<_ACEOF
19375/* end confdefs.h. */
cd958eb3
MB
19376$ac_includes_default
19377int
19378main ()
19379{
19380getpgrp (0);
19381 ;
19382 return 0;
19383}
19384_ACEOF
19385rm -f conftest.$ac_objext
ca81d7a0
JD
19386if { (ac_try="$ac_compile"
19387case "(($ac_try" in
19388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19389 *) ac_try_echo=$ac_try;;
19390esac
19391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19392 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19393 ac_status=$?
edfaf76d
LK
19394 grep -v '^ *+' conftest.er1 >conftest.err
19395 rm -f conftest.er1
19396 cat conftest.err >&5
cd958eb3 19397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19398 (exit $ac_status); } && {
19399 test -z "$ac_c_werror_flag" ||
19400 test ! -s conftest.err
19401 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19402 ac_cv_func_getpgrp_void=no
19403else
19404 echo "$as_me: failed program was:" >&5
19650fd6
AS
19405sed 's/^/| /' conftest.$ac_ext >&5
19406
ca81d7a0 19407 ac_cv_func_getpgrp_void=yes
cd958eb3 19408fi
ca81d7a0
JD
19409
19410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19411
19412fi
ca81d7a0
JD
19413{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19414echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19415if test $ac_cv_func_getpgrp_void = yes; then
19416
19417cat >>confdefs.h <<\_ACEOF
19418#define GETPGRP_VOID 1
19419_ACEOF
19420
19421fi
19422
19423
973a76b1
DL
19424
19425for ac_func in strftime
19426do
19427as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19428{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19429echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19430if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19431 echo $ECHO_N "(cached) $ECHO_C" >&6
19432else
19433 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19434/* confdefs.h. */
19435_ACEOF
19436cat confdefs.h >>conftest.$ac_ext
19437cat >>conftest.$ac_ext <<_ACEOF
19438/* end confdefs.h. */
edfaf76d
LK
19439/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19440 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19441#define $ac_func innocuous_$ac_func
19442
973a76b1 19443/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19444 which can conflict with char $ac_func (); below.
19445 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19446 <limits.h> exists even on freestanding compilers. */
edfaf76d 19447
19650fd6
AS
19448#ifdef __STDC__
19449# include <limits.h>
19450#else
19451# include <assert.h>
19452#endif
edfaf76d
LK
19453
19454#undef $ac_func
19455
ca81d7a0
JD
19456/* Override any GCC internal prototype to avoid an error.
19457 Use char because int might match the return type of a GCC
19458 builtin and then its argument prototype would still apply. */
973a76b1
DL
19459#ifdef __cplusplus
19460extern "C"
973a76b1 19461#endif
973a76b1
DL
19462char $ac_func ();
19463/* The GNU C library defines this for functions which it implements
19464 to always fail with ENOSYS. Some functions are actually named
19465 something starting with __ and the normal name is an alias. */
ca81d7a0 19466#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19467choke me
973a76b1
DL
19468#endif
19469
19650fd6
AS
19470int
19471main ()
19472{
ca81d7a0 19473return $ac_func ();
973a76b1
DL
19474 ;
19475 return 0;
19476}
19477_ACEOF
19478rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19479if { (ac_try="$ac_link"
19480case "(($ac_try" in
19481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19482 *) ac_try_echo=$ac_try;;
19483esac
19484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19485 (eval "$ac_link") 2>conftest.er1
973a76b1 19486 ac_status=$?
edfaf76d
LK
19487 grep -v '^ *+' conftest.er1 >conftest.err
19488 rm -f conftest.er1
19489 cat conftest.err >&5
973a76b1 19490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19491 (exit $ac_status); } && {
19492 test -z "$ac_c_werror_flag" ||
19493 test ! -s conftest.err
19494 } && test -s conftest$ac_exeext &&
19495 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19496 eval "$as_ac_var=yes"
19497else
19498 echo "$as_me: failed program was:" >&5
19650fd6
AS
19499sed 's/^/| /' conftest.$ac_ext >&5
19500
ca81d7a0 19501 eval "$as_ac_var=no"
973a76b1 19502fi
ca81d7a0 19503
f053c89f 19504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19505 conftest$ac_exeext conftest.$ac_ext
973a76b1 19506fi
ca81d7a0
JD
19507ac_res=`eval echo '${'$as_ac_var'}'`
19508 { echo "$as_me:$LINENO: result: $ac_res" >&5
19509echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19510if test `eval echo '${'$as_ac_var'}'` = yes; then
19511 cat >>confdefs.h <<_ACEOF
19512#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19513_ACEOF
19514
19515else
19516 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19517{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19518echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19519if test "${ac_cv_lib_intl_strftime+set}" = set; then
19520 echo $ECHO_N "(cached) $ECHO_C" >&6
19521else
19522 ac_check_lib_save_LIBS=$LIBS
19523LIBS="-lintl $LIBS"
19524cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19525/* confdefs.h. */
19526_ACEOF
19527cat confdefs.h >>conftest.$ac_ext
19528cat >>conftest.$ac_ext <<_ACEOF
19529/* end confdefs.h. */
973a76b1 19530
ca81d7a0
JD
19531/* Override any GCC internal prototype to avoid an error.
19532 Use char because int might match the return type of a GCC
19533 builtin and then its argument prototype would still apply. */
973a76b1
DL
19534#ifdef __cplusplus
19535extern "C"
19536#endif
973a76b1
DL
19537char strftime ();
19538int
19539main ()
19540{
ca81d7a0 19541return strftime ();
973a76b1
DL
19542 ;
19543 return 0;
19544}
19545_ACEOF
19546rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19547if { (ac_try="$ac_link"
19548case "(($ac_try" in
19549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19550 *) ac_try_echo=$ac_try;;
19551esac
19552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19553 (eval "$ac_link") 2>conftest.er1
973a76b1 19554 ac_status=$?
edfaf76d
LK
19555 grep -v '^ *+' conftest.er1 >conftest.err
19556 rm -f conftest.er1
19557 cat conftest.err >&5
973a76b1 19558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19559 (exit $ac_status); } && {
19560 test -z "$ac_c_werror_flag" ||
19561 test ! -s conftest.err
19562 } && test -s conftest$ac_exeext &&
19563 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19564 ac_cv_lib_intl_strftime=yes
19565else
19566 echo "$as_me: failed program was:" >&5
19650fd6
AS
19567sed 's/^/| /' conftest.$ac_ext >&5
19568
ca81d7a0 19569 ac_cv_lib_intl_strftime=no
973a76b1 19570fi
ca81d7a0 19571
f053c89f 19572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19573 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19574LIBS=$ac_check_lib_save_LIBS
19575fi
ca81d7a0
JD
19576{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19577echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19578if test $ac_cv_lib_intl_strftime = yes; then
19579 cat >>confdefs.h <<\_ACEOF
19580#define HAVE_STRFTIME 1
19581_ACEOF
19582
19583LIBS="-lintl $LIBS"
19584fi
19585
19586fi
19587done
19588
19589
b936fae4
AS
19590# UNIX98 PTYs.
19591
19592for ac_func in grantpt
503d2be0
AS
19593do
19594as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19595{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19596echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19597if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19598 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19599else
503d2be0 19600 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19601/* confdefs.h. */
19602_ACEOF
19603cat confdefs.h >>conftest.$ac_ext
19604cat >>conftest.$ac_ext <<_ACEOF
19605/* end confdefs.h. */
edfaf76d
LK
19606/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19607 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19608#define $ac_func innocuous_$ac_func
19609
503d2be0 19610/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19611 which can conflict with char $ac_func (); below.
19612 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19613 <limits.h> exists even on freestanding compilers. */
edfaf76d 19614
19650fd6
AS
19615#ifdef __STDC__
19616# include <limits.h>
19617#else
19618# include <assert.h>
19619#endif
edfaf76d
LK
19620
19621#undef $ac_func
19622
ca81d7a0
JD
19623/* Override any GCC internal prototype to avoid an error.
19624 Use char because int might match the return type of a GCC
19625 builtin and then its argument prototype would still apply. */
503d2be0
AS
19626#ifdef __cplusplus
19627extern "C"
19628#endif
503d2be0 19629char $ac_func ();
503d2be0
AS
19630/* The GNU C library defines this for functions which it implements
19631 to always fail with ENOSYS. Some functions are actually named
19632 something starting with __ and the normal name is an alias. */
ca81d7a0 19633#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19634choke me
503d2be0 19635#endif
4c343001 19636
19650fd6
AS
19637int
19638main ()
19639{
ca81d7a0 19640return $ac_func ();
503d2be0
AS
19641 ;
19642 return 0;
19643}
19644_ACEOF
19645rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19646if { (ac_try="$ac_link"
19647case "(($ac_try" in
19648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19649 *) ac_try_echo=$ac_try;;
19650esac
19651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19652 (eval "$ac_link") 2>conftest.er1
503d2be0 19653 ac_status=$?
edfaf76d
LK
19654 grep -v '^ *+' conftest.er1 >conftest.err
19655 rm -f conftest.er1
19656 cat conftest.err >&5
c0d27fcc 19657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19658 (exit $ac_status); } && {
19659 test -z "$ac_c_werror_flag" ||
19660 test ! -s conftest.err
19661 } && test -s conftest$ac_exeext &&
19662 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19663 eval "$as_ac_var=yes"
19664else
19665 echo "$as_me: failed program was:" >&5
19650fd6
AS
19666sed 's/^/| /' conftest.$ac_ext >&5
19667
ca81d7a0 19668 eval "$as_ac_var=no"
503d2be0 19669fi
ca81d7a0 19670
f053c89f 19671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19672 conftest$ac_exeext conftest.$ac_ext
503d2be0 19673fi
ca81d7a0
JD
19674ac_res=`eval echo '${'$as_ac_var'}'`
19675 { echo "$as_me:$LINENO: result: $ac_res" >&5
19676echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19677if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19678 cat >>confdefs.h <<_ACEOF
503d2be0 19679#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19680_ACEOF
4c343001
DL
19681
19682fi
503d2be0
AS
19683done
19684
c0d27fcc 19685
b936fae4 19686# PTY-related GNU extensions.
4c343001 19687
b936fae4
AS
19688for ac_func in getpt
19689do
19690as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19691{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19692echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19693if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19694 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19695else
b936fae4 19696 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19697/* confdefs.h. */
19698_ACEOF
19699cat confdefs.h >>conftest.$ac_ext
19700cat >>conftest.$ac_ext <<_ACEOF
19701/* end confdefs.h. */
edfaf76d
LK
19702/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19703 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19704#define $ac_func innocuous_$ac_func
19705
087121cc 19706/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19707 which can conflict with char $ac_func (); below.
19708 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19709 <limits.h> exists even on freestanding compilers. */
edfaf76d 19710
19650fd6
AS
19711#ifdef __STDC__
19712# include <limits.h>
19713#else
19714# include <assert.h>
19715#endif
edfaf76d
LK
19716
19717#undef $ac_func
19718
ca81d7a0
JD
19719/* Override any GCC internal prototype to avoid an error.
19720 Use char because int might match the return type of a GCC
19721 builtin and then its argument prototype would still apply. */
503d2be0
AS
19722#ifdef __cplusplus
19723extern "C"
19724#endif
503d2be0 19725char $ac_func ();
087121cc
GM
19726/* The GNU C library defines this for functions which it implements
19727 to always fail with ENOSYS. Some functions are actually named
19728 something starting with __ and the normal name is an alias. */
ca81d7a0 19729#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19730choke me
087121cc
GM
19731#endif
19732
19650fd6
AS
19733int
19734main ()
19735{
ca81d7a0 19736return $ac_func ();
503d2be0
AS
19737 ;
19738 return 0;
19739}
19740_ACEOF
19741rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19742if { (ac_try="$ac_link"
19743case "(($ac_try" in
19744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19745 *) ac_try_echo=$ac_try;;
19746esac
19747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19748 (eval "$ac_link") 2>conftest.er1
503d2be0 19749 ac_status=$?
edfaf76d
LK
19750 grep -v '^ *+' conftest.er1 >conftest.err
19751 rm -f conftest.er1
19752 cat conftest.err >&5
c0d27fcc 19753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19754 (exit $ac_status); } && {
19755 test -z "$ac_c_werror_flag" ||
19756 test ! -s conftest.err
19757 } && test -s conftest$ac_exeext &&
19758 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19759 eval "$as_ac_var=yes"
19760else
19761 echo "$as_me: failed program was:" >&5
19650fd6
AS
19762sed 's/^/| /' conftest.$ac_ext >&5
19763
ca81d7a0 19764 eval "$as_ac_var=no"
503d2be0 19765fi
ca81d7a0 19766
f053c89f 19767rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19768 conftest$ac_exeext conftest.$ac_ext
503d2be0 19769fi
ca81d7a0
JD
19770ac_res=`eval echo '${'$as_ac_var'}'`
19771 { echo "$as_me:$LINENO: result: $ac_res" >&5
19772echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19773if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19774 cat >>confdefs.h <<_ACEOF
503d2be0 19775#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19776_ACEOF
087121cc 19777
087121cc
GM
19778fi
19779done
19780
c0d27fcc 19781
ba4481b5
DL
19782# Check this now, so that we will NOT find the above functions in ncurses.
19783# That is because we have not set up to link ncurses in lib-src.
19784# It's better to believe a function is not available
19785# than to expect to find it in ncurses.
503d2be0 19786
ca81d7a0
JD
19787{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19788echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19789if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19790 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19791else
503d2be0 19792 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19793LIBS="-lncurses $LIBS"
503d2be0 19794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19795/* confdefs.h. */
19796_ACEOF
19797cat confdefs.h >>conftest.$ac_ext
19798cat >>conftest.$ac_ext <<_ACEOF
19799/* end confdefs.h. */
503d2be0 19800
ca81d7a0
JD
19801/* Override any GCC internal prototype to avoid an error.
19802 Use char because int might match the return type of a GCC
19803 builtin and then its argument prototype would still apply. */
503d2be0
AS
19804#ifdef __cplusplus
19805extern "C"
19806#endif
503d2be0
AS
19807char tparm ();
19808int
19809main ()
19810{
ca81d7a0 19811return tparm ();
503d2be0
AS
19812 ;
19813 return 0;
19814}
19815_ACEOF
19816rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19817if { (ac_try="$ac_link"
19818case "(($ac_try" in
19819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19820 *) ac_try_echo=$ac_try;;
19821esac
19822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19823 (eval "$ac_link") 2>conftest.er1
503d2be0 19824 ac_status=$?
edfaf76d
LK
19825 grep -v '^ *+' conftest.er1 >conftest.err
19826 rm -f conftest.er1
19827 cat conftest.err >&5
c0d27fcc 19828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19829 (exit $ac_status); } && {
19830 test -z "$ac_c_werror_flag" ||
19831 test ! -s conftest.err
19832 } && test -s conftest$ac_exeext &&
19833 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19834 ac_cv_lib_ncurses_tparm=yes
19835else
19836 echo "$as_me: failed program was:" >&5
19650fd6
AS
19837sed 's/^/| /' conftest.$ac_ext >&5
19838
ca81d7a0 19839 ac_cv_lib_ncurses_tparm=no
503d2be0 19840fi
ca81d7a0 19841
f053c89f 19842rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19843 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19844LIBS=$ac_check_lib_save_LIBS
19845fi
ca81d7a0
JD
19846{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19847echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19848if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19849 cat >>confdefs.h <<_ACEOF
503d2be0 19850#define HAVE_LIBNCURSES 1
c0d27fcc 19851_ACEOF
ba4481b5
DL
19852
19853 LIBS="-lncurses $LIBS"
19854
ba4481b5
DL
19855fi
19856
c0d27fcc 19857
bc3512d0
CY
19858# Do we have res_init, for detecting changes in /etc/resolv.conf?
19859
19860resolv=no
074767f2 19861cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19862/* confdefs.h. */
19863_ACEOF
19864cat confdefs.h >>conftest.$ac_ext
19865cat >>conftest.$ac_ext <<_ACEOF
19866/* end confdefs.h. */
074767f2
AS
19867#include <netinet/in.h>
19868#include <arpa/nameser.h>
19869#include <resolv.h>
bc3512d0
CY
19870int
19871main ()
19872{
074767f2 19873return res_init();
bc3512d0
CY
19874 ;
19875 return 0;
19876}
19877_ACEOF
19878rm -f conftest.$ac_objext conftest$ac_exeext
19879if { (ac_try="$ac_link"
19880case "(($ac_try" in
19881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882 *) ac_try_echo=$ac_try;;
19883esac
19884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19885 (eval "$ac_link") 2>conftest.er1
19886 ac_status=$?
19887 grep -v '^ *+' conftest.er1 >conftest.err
19888 rm -f conftest.er1
19889 cat conftest.err >&5
19890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891 (exit $ac_status); } && {
19892 test -z "$ac_c_werror_flag" ||
19893 test ! -s conftest.err
19894 } && test -s conftest$ac_exeext &&
19895 $as_test_x conftest$ac_exeext; then
074767f2 19896 have_res_init=yes
bc3512d0
CY
19897else
19898 echo "$as_me: failed program was:" >&5
19899sed 's/^/| /' conftest.$ac_ext >&5
19900
074767f2 19901 have_res_init=no
bc3512d0
CY
19902fi
19903
19904rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19905 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19906if test "$have_res_init" = no; then
19907 OLIBS="$LIBS"
19908 LIBS="$LIBS -lresolv"
19909 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19910echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19911 cat >conftest.$ac_ext <<_ACEOF
19912/* confdefs.h. */
19913_ACEOF
19914cat confdefs.h >>conftest.$ac_ext
19915cat >>conftest.$ac_ext <<_ACEOF
19916/* end confdefs.h. */
19917#include <netinet/in.h>
19918#include <arpa/nameser.h>
19919#include <resolv.h>
19920int
19921main ()
19922{
074767f2 19923return res_init();
bc3512d0
CY
19924 ;
19925 return 0;
19926}
19927_ACEOF
19928rm -f conftest.$ac_objext conftest$ac_exeext
19929if { (ac_try="$ac_link"
19930case "(($ac_try" in
19931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19932 *) ac_try_echo=$ac_try;;
19933esac
19934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19935 (eval "$ac_link") 2>conftest.er1
19936 ac_status=$?
19937 grep -v '^ *+' conftest.er1 >conftest.err
19938 rm -f conftest.er1
19939 cat conftest.err >&5
19940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19941 (exit $ac_status); } && {
19942 test -z "$ac_c_werror_flag" ||
19943 test ! -s conftest.err
19944 } && test -s conftest$ac_exeext &&
19945 $as_test_x conftest$ac_exeext; then
19946 have_res_init=yes
19947else
19948 echo "$as_me: failed program was:" >&5
19949sed 's/^/| /' conftest.$ac_ext >&5
19950
19951 have_res_init=no
19952fi
19953
19954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19955 conftest$ac_exeext conftest.$ac_ext
19956 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19957echo "${ECHO_T}$have_res_init" >&6; }
19958 if test "$have_res_init" = yes ; then
19959 resolv=yes
19960 fi
19961 LIBS="$OLIBS"
19962fi
19963
19964if test "$have_res_init" = yes; then
19965
19966cat >>confdefs.h <<\_ACEOF
19967#define HAVE_RES_INIT 1
19968_ACEOF
19969
19970fi
19971
84e70f78
KR
19972# Do we need the Hesiod library to provide the support routines?
19973if test "$with_hesiod" = yes ; then
19974 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
19975 { echo "$as_me:$LINENO: checking for res_send" >&5
19976echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19977if test "${ac_cv_func_res_send+set}" = set; then
19978 echo $ECHO_N "(cached) $ECHO_C" >&6
19979else
19980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19981/* confdefs.h. */
19982_ACEOF
19983cat confdefs.h >>conftest.$ac_ext
19984cat >>conftest.$ac_ext <<_ACEOF
19985/* end confdefs.h. */
edfaf76d
LK
19986/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19987 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19988#define res_send innocuous_res_send
19989
84e70f78 19990/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19991 which can conflict with char res_send (); below.
19992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19993 <limits.h> exists even on freestanding compilers. */
edfaf76d 19994
19650fd6
AS
19995#ifdef __STDC__
19996# include <limits.h>
19997#else
19998# include <assert.h>
19999#endif
edfaf76d
LK
20000
20001#undef res_send
20002
ca81d7a0
JD
20003/* Override any GCC internal prototype to avoid an error.
20004 Use char because int might match the return type of a GCC
20005 builtin and then its argument prototype would still apply. */
84e70f78
KR
20006#ifdef __cplusplus
20007extern "C"
20008#endif
84e70f78 20009char res_send ();
84e70f78
KR
20010/* The GNU C library defines this for functions which it implements
20011 to always fail with ENOSYS. Some functions are actually named
20012 something starting with __ and the normal name is an alias. */
ca81d7a0 20013#if defined __stub_res_send || defined __stub___res_send
84e70f78 20014choke me
cd958eb3
MB
20015#endif
20016
19650fd6
AS
20017int
20018main ()
20019{
ca81d7a0 20020return res_send ();
84e70f78
KR
20021 ;
20022 return 0;
20023}
20024_ACEOF
20025rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20026if { (ac_try="$ac_link"
20027case "(($ac_try" in
20028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029 *) ac_try_echo=$ac_try;;
20030esac
20031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20032 (eval "$ac_link") 2>conftest.er1
84e70f78 20033 ac_status=$?
edfaf76d
LK
20034 grep -v '^ *+' conftest.er1 >conftest.err
20035 rm -f conftest.er1
20036 cat conftest.err >&5
c0d27fcc 20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20038 (exit $ac_status); } && {
20039 test -z "$ac_c_werror_flag" ||
20040 test ! -s conftest.err
20041 } && test -s conftest$ac_exeext &&
20042 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20043 ac_cv_func_res_send=yes
20044else
20045 echo "$as_me: failed program was:" >&5
19650fd6
AS
20046sed 's/^/| /' conftest.$ac_ext >&5
20047
ca81d7a0 20048 ac_cv_func_res_send=no
84e70f78 20049fi
ca81d7a0 20050
f053c89f 20051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20052 conftest$ac_exeext conftest.$ac_ext
84e70f78 20053fi
ca81d7a0
JD
20054{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20055echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20056if test $ac_cv_func_res_send = yes; then
20057 :
20058else
ca81d7a0
JD
20059 { echo "$as_me:$LINENO: checking for __res_send" >&5
20060echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20061if test "${ac_cv_func___res_send+set}" = set; then
20062 echo $ECHO_N "(cached) $ECHO_C" >&6
20063else
20064 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20065/* confdefs.h. */
20066_ACEOF
20067cat confdefs.h >>conftest.$ac_ext
20068cat >>conftest.$ac_ext <<_ACEOF
20069/* end confdefs.h. */
edfaf76d
LK
20070/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20071 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20072#define __res_send innocuous___res_send
20073
84e70f78 20074/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20075 which can conflict with char __res_send (); below.
20076 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20077 <limits.h> exists even on freestanding compilers. */
edfaf76d 20078
19650fd6
AS
20079#ifdef __STDC__
20080# include <limits.h>
20081#else
20082# include <assert.h>
20083#endif
edfaf76d
LK
20084
20085#undef __res_send
20086
ca81d7a0
JD
20087/* Override any GCC internal prototype to avoid an error.
20088 Use char because int might match the return type of a GCC
20089 builtin and then its argument prototype would still apply. */
84e70f78
KR
20090#ifdef __cplusplus
20091extern "C"
20092#endif
84e70f78 20093char __res_send ();
84e70f78
KR
20094/* The GNU C library defines this for functions which it implements
20095 to always fail with ENOSYS. Some functions are actually named
20096 something starting with __ and the normal name is an alias. */
ca81d7a0 20097#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20098choke me
84e70f78
KR
20099#endif
20100
19650fd6
AS
20101int
20102main ()
20103{
ca81d7a0 20104return __res_send ();
84e70f78
KR
20105 ;
20106 return 0;
20107}
20108_ACEOF
20109rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20110if { (ac_try="$ac_link"
20111case "(($ac_try" in
20112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20113 *) ac_try_echo=$ac_try;;
20114esac
20115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20116 (eval "$ac_link") 2>conftest.er1
84e70f78 20117 ac_status=$?
edfaf76d
LK
20118 grep -v '^ *+' conftest.er1 >conftest.err
20119 rm -f conftest.er1
20120 cat conftest.err >&5
c0d27fcc 20121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20122 (exit $ac_status); } && {
20123 test -z "$ac_c_werror_flag" ||
20124 test ! -s conftest.err
20125 } && test -s conftest$ac_exeext &&
20126 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20127 ac_cv_func___res_send=yes
20128else
20129 echo "$as_me: failed program was:" >&5
19650fd6
AS
20130sed 's/^/| /' conftest.$ac_ext >&5
20131
ca81d7a0 20132 ac_cv_func___res_send=no
84e70f78 20133fi
ca81d7a0 20134
f053c89f 20135rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20136 conftest$ac_exeext conftest.$ac_ext
84e70f78 20137fi
ca81d7a0
JD
20138{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20139echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20140if test $ac_cv_func___res_send = yes; then
20141 :
20142else
ca81d7a0
JD
20143 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20144echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20145if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20146 echo $ECHO_N "(cached) $ECHO_C" >&6
20147else
20148 ac_check_lib_save_LIBS=$LIBS
20149LIBS="-lresolv $LIBS"
20150cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20151/* confdefs.h. */
20152_ACEOF
20153cat confdefs.h >>conftest.$ac_ext
20154cat >>conftest.$ac_ext <<_ACEOF
20155/* end confdefs.h. */
84e70f78 20156
ca81d7a0
JD
20157/* Override any GCC internal prototype to avoid an error.
20158 Use char because int might match the return type of a GCC
20159 builtin and then its argument prototype would still apply. */
84e70f78
KR
20160#ifdef __cplusplus
20161extern "C"
20162#endif
84e70f78
KR
20163char res_send ();
20164int
20165main ()
20166{
ca81d7a0 20167return res_send ();
84e70f78
KR
20168 ;
20169 return 0;
20170}
20171_ACEOF
20172rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20173if { (ac_try="$ac_link"
20174case "(($ac_try" in
20175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20176 *) ac_try_echo=$ac_try;;
20177esac
20178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20179 (eval "$ac_link") 2>conftest.er1
84e70f78 20180 ac_status=$?
edfaf76d
LK
20181 grep -v '^ *+' conftest.er1 >conftest.err
20182 rm -f conftest.er1
20183 cat conftest.err >&5
c0d27fcc 20184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20185 (exit $ac_status); } && {
20186 test -z "$ac_c_werror_flag" ||
20187 test ! -s conftest.err
20188 } && test -s conftest$ac_exeext &&
20189 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20190 ac_cv_lib_resolv_res_send=yes
20191else
20192 echo "$as_me: failed program was:" >&5
19650fd6
AS
20193sed 's/^/| /' conftest.$ac_ext >&5
20194
ca81d7a0 20195 ac_cv_lib_resolv_res_send=no
84e70f78 20196fi
ca81d7a0 20197
f053c89f 20198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20199 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20200LIBS=$ac_check_lib_save_LIBS
20201fi
ca81d7a0
JD
20202{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20203echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20204if test $ac_cv_lib_resolv_res_send = yes; then
20205 resolv=yes
20206else
ca81d7a0
JD
20207 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20208echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20209if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20210 echo $ECHO_N "(cached) $ECHO_C" >&6
20211else
20212 ac_check_lib_save_LIBS=$LIBS
20213LIBS="-lresolv $LIBS"
20214cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20215/* confdefs.h. */
20216_ACEOF
20217cat confdefs.h >>conftest.$ac_ext
20218cat >>conftest.$ac_ext <<_ACEOF
20219/* end confdefs.h. */
84e70f78 20220
ca81d7a0
JD
20221/* Override any GCC internal prototype to avoid an error.
20222 Use char because int might match the return type of a GCC
20223 builtin and then its argument prototype would still apply. */
84e70f78
KR
20224#ifdef __cplusplus
20225extern "C"
20226#endif
84e70f78
KR
20227char __res_send ();
20228int
20229main ()
20230{
ca81d7a0 20231return __res_send ();
84e70f78
KR
20232 ;
20233 return 0;
20234}
20235_ACEOF
20236rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20237if { (ac_try="$ac_link"
20238case "(($ac_try" in
20239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20240 *) ac_try_echo=$ac_try;;
20241esac
20242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20243 (eval "$ac_link") 2>conftest.er1
84e70f78 20244 ac_status=$?
edfaf76d
LK
20245 grep -v '^ *+' conftest.er1 >conftest.err
20246 rm -f conftest.er1
20247 cat conftest.err >&5
c0d27fcc 20248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20249 (exit $ac_status); } && {
20250 test -z "$ac_c_werror_flag" ||
20251 test ! -s conftest.err
20252 } && test -s conftest$ac_exeext &&
20253 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20254 ac_cv_lib_resolv___res_send=yes
20255else
20256 echo "$as_me: failed program was:" >&5
19650fd6
AS
20257sed 's/^/| /' conftest.$ac_ext >&5
20258
ca81d7a0 20259 ac_cv_lib_resolv___res_send=no
84e70f78 20260fi
ca81d7a0 20261
f053c89f 20262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20263 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20264LIBS=$ac_check_lib_save_LIBS
20265fi
ca81d7a0
JD
20266{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20267echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20268if test $ac_cv_lib_resolv___res_send = yes; then
20269 resolv=yes
20270fi
20271
20272fi
20273
20274fi
20275
20276fi
20277
20278 if test "$resolv" = yes ; then
20279 RESOLVLIB=-lresolv
84e70f78
KR
20280 else
20281 RESOLVLIB=
20282 fi
ca81d7a0
JD
20283 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20284echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20285if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20286 echo $ECHO_N "(cached) $ECHO_C" >&6
20287else
20288 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20289/* confdefs.h. */
20290_ACEOF
20291cat confdefs.h >>conftest.$ac_ext
20292cat >>conftest.$ac_ext <<_ACEOF
20293/* end confdefs.h. */
edfaf76d
LK
20294/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20295 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20296#define hes_getmailhost innocuous_hes_getmailhost
20297
84e70f78 20298/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20299 which can conflict with char hes_getmailhost (); below.
20300 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20301 <limits.h> exists even on freestanding compilers. */
edfaf76d 20302
19650fd6
AS
20303#ifdef __STDC__
20304# include <limits.h>
20305#else
20306# include <assert.h>
20307#endif
edfaf76d
LK
20308
20309#undef hes_getmailhost
20310
ca81d7a0
JD
20311/* Override any GCC internal prototype to avoid an error.
20312 Use char because int might match the return type of a GCC
20313 builtin and then its argument prototype would still apply. */
84e70f78
KR
20314#ifdef __cplusplus
20315extern "C"
20316#endif
84e70f78 20317char hes_getmailhost ();
84e70f78
KR
20318/* The GNU C library defines this for functions which it implements
20319 to always fail with ENOSYS. Some functions are actually named
20320 something starting with __ and the normal name is an alias. */
ca81d7a0 20321#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20322choke me
cd958eb3
MB
20323#endif
20324
19650fd6
AS
20325int
20326main ()
20327{
ca81d7a0 20328return hes_getmailhost ();
84e70f78
KR
20329 ;
20330 return 0;
20331}
20332_ACEOF
20333rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20334if { (ac_try="$ac_link"
20335case "(($ac_try" in
20336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20337 *) ac_try_echo=$ac_try;;
20338esac
20339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20340 (eval "$ac_link") 2>conftest.er1
84e70f78 20341 ac_status=$?
edfaf76d
LK
20342 grep -v '^ *+' conftest.er1 >conftest.err
20343 rm -f conftest.er1
20344 cat conftest.err >&5
c0d27fcc 20345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20346 (exit $ac_status); } && {
20347 test -z "$ac_c_werror_flag" ||
20348 test ! -s conftest.err
20349 } && test -s conftest$ac_exeext &&
20350 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20351 ac_cv_func_hes_getmailhost=yes
20352else
20353 echo "$as_me: failed program was:" >&5
19650fd6
AS
20354sed 's/^/| /' conftest.$ac_ext >&5
20355
ca81d7a0 20356 ac_cv_func_hes_getmailhost=no
84e70f78 20357fi
ca81d7a0 20358
f053c89f 20359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20360 conftest$ac_exeext conftest.$ac_ext
84e70f78 20361fi
ca81d7a0
JD
20362{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20363echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20364if test $ac_cv_func_hes_getmailhost = yes; then
20365 :
20366else
ca81d7a0
JD
20367 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20368echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20369if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20370 echo $ECHO_N "(cached) $ECHO_C" >&6
20371else
20372 ac_check_lib_save_LIBS=$LIBS
20373LIBS="-lhesiod $RESOLVLIB $LIBS"
20374cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20375/* confdefs.h. */
20376_ACEOF
20377cat confdefs.h >>conftest.$ac_ext
20378cat >>conftest.$ac_ext <<_ACEOF
20379/* end confdefs.h. */
84e70f78 20380
ca81d7a0
JD
20381/* Override any GCC internal prototype to avoid an error.
20382 Use char because int might match the return type of a GCC
20383 builtin and then its argument prototype would still apply. */
84e70f78
KR
20384#ifdef __cplusplus
20385extern "C"
20386#endif
84e70f78
KR
20387char hes_getmailhost ();
20388int
20389main ()
20390{
ca81d7a0 20391return hes_getmailhost ();
84e70f78
KR
20392 ;
20393 return 0;
20394}
20395_ACEOF
20396rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20397if { (ac_try="$ac_link"
20398case "(($ac_try" in
20399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20400 *) ac_try_echo=$ac_try;;
20401esac
20402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20403 (eval "$ac_link") 2>conftest.er1
84e70f78 20404 ac_status=$?
edfaf76d
LK
20405 grep -v '^ *+' conftest.er1 >conftest.err
20406 rm -f conftest.er1
20407 cat conftest.err >&5
c0d27fcc 20408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20409 (exit $ac_status); } && {
20410 test -z "$ac_c_werror_flag" ||
20411 test ! -s conftest.err
20412 } && test -s conftest$ac_exeext &&
20413 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20414 ac_cv_lib_hesiod_hes_getmailhost=yes
20415else
20416 echo "$as_me: failed program was:" >&5
19650fd6
AS
20417sed 's/^/| /' conftest.$ac_ext >&5
20418
ca81d7a0 20419 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20420fi
ca81d7a0 20421
f053c89f 20422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20423 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20424LIBS=$ac_check_lib_save_LIBS
20425fi
ca81d7a0
JD
20426{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20427echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20428if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20429
c0d27fcc 20430cat >>confdefs.h <<\_ACEOF
84e70f78 20431#define HAVE_LIBHESIOD 1
c0d27fcc 20432_ACEOF
84e70f78
KR
20433
20434else
20435 :
20436fi
20437
20438fi
20439
20440fi
20441
bc3512d0
CY
20442# Do we need libresolv (due to res_init or Hesiod)?
20443if test "$resolv" = yes ; then
20444
20445cat >>confdefs.h <<\_ACEOF
20446#define HAVE_LIBRESOLV 1
20447_ACEOF
20448
20449fi
20450
a21616bd
KR
20451# These tell us which Kerberos-related libraries to use.
20452if test "${with_kerberos+set}" = set; then
503d2be0 20453
ca81d7a0
JD
20454{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20455echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20456if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20457 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20458else
503d2be0 20459 ac_check_lib_save_LIBS=$LIBS
a21616bd 20460LIBS="-lcom_err $LIBS"
503d2be0 20461cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20462/* confdefs.h. */
20463_ACEOF
20464cat confdefs.h >>conftest.$ac_ext
20465cat >>conftest.$ac_ext <<_ACEOF
20466/* end confdefs.h. */
503d2be0 20467
ca81d7a0
JD
20468/* Override any GCC internal prototype to avoid an error.
20469 Use char because int might match the return type of a GCC
20470 builtin and then its argument prototype would still apply. */
503d2be0
AS
20471#ifdef __cplusplus
20472extern "C"
20473#endif
503d2be0
AS
20474char com_err ();
20475int
20476main ()
20477{
ca81d7a0 20478return com_err ();
503d2be0
AS
20479 ;
20480 return 0;
20481}
20482_ACEOF
20483rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20484if { (ac_try="$ac_link"
20485case "(($ac_try" in
20486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20487 *) ac_try_echo=$ac_try;;
20488esac
20489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20490 (eval "$ac_link") 2>conftest.er1
503d2be0 20491 ac_status=$?
edfaf76d
LK
20492 grep -v '^ *+' conftest.er1 >conftest.err
20493 rm -f conftest.er1
20494 cat conftest.err >&5
c0d27fcc 20495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20496 (exit $ac_status); } && {
20497 test -z "$ac_c_werror_flag" ||
20498 test ! -s conftest.err
20499 } && test -s conftest$ac_exeext &&
20500 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20501 ac_cv_lib_com_err_com_err=yes
20502else
20503 echo "$as_me: failed program was:" >&5
19650fd6
AS
20504sed 's/^/| /' conftest.$ac_ext >&5
20505
ca81d7a0 20506 ac_cv_lib_com_err_com_err=no
503d2be0 20507fi
ca81d7a0 20508
f053c89f 20509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20510 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20511LIBS=$ac_check_lib_save_LIBS
20512fi
ca81d7a0
JD
20513{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20514echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20515if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20516 cat >>confdefs.h <<_ACEOF
503d2be0 20517#define HAVE_LIBCOM_ERR 1
c0d27fcc 20518_ACEOF
a21616bd
KR
20519
20520 LIBS="-lcom_err $LIBS"
20521
a21616bd
KR
20522fi
20523
c0d27fcc 20524
ca81d7a0
JD
20525{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20526echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20527if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20528 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20529else
503d2be0 20530 ac_check_lib_save_LIBS=$LIBS
a21616bd 20531LIBS="-lk5crypto $LIBS"
503d2be0 20532cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20533/* confdefs.h. */
20534_ACEOF
20535cat confdefs.h >>conftest.$ac_ext
20536cat >>conftest.$ac_ext <<_ACEOF
20537/* end confdefs.h. */
503d2be0 20538
ca81d7a0
JD
20539/* Override any GCC internal prototype to avoid an error.
20540 Use char because int might match the return type of a GCC
20541 builtin and then its argument prototype would still apply. */
503d2be0
AS
20542#ifdef __cplusplus
20543extern "C"
20544#endif
503d2be0
AS
20545char mit_des_cbc_encrypt ();
20546int
20547main ()
20548{
ca81d7a0 20549return mit_des_cbc_encrypt ();
503d2be0
AS
20550 ;
20551 return 0;
20552}
20553_ACEOF
20554rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20555if { (ac_try="$ac_link"
20556case "(($ac_try" in
20557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20558 *) ac_try_echo=$ac_try;;
20559esac
20560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20561 (eval "$ac_link") 2>conftest.er1
503d2be0 20562 ac_status=$?
edfaf76d
LK
20563 grep -v '^ *+' conftest.er1 >conftest.err
20564 rm -f conftest.er1
20565 cat conftest.err >&5
c0d27fcc 20566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20567 (exit $ac_status); } && {
20568 test -z "$ac_c_werror_flag" ||
20569 test ! -s conftest.err
20570 } && test -s conftest$ac_exeext &&
20571 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20572 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20573else
20574 echo "$as_me: failed program was:" >&5
19650fd6
AS
20575sed 's/^/| /' conftest.$ac_ext >&5
20576
ca81d7a0 20577 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20578fi
ca81d7a0 20579
f053c89f 20580rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20581 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20582LIBS=$ac_check_lib_save_LIBS
20583fi
ca81d7a0
JD
20584{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20585echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20586if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20587 cat >>confdefs.h <<_ACEOF
503d2be0 20588#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20589_ACEOF
a21616bd
KR
20590
20591 LIBS="-lk5crypto $LIBS"
20592
a21616bd
KR
20593fi
20594
c0d27fcc 20595
ca81d7a0
JD
20596{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20597echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20598if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20599 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20600else
503d2be0 20601 ac_check_lib_save_LIBS=$LIBS
a21616bd 20602LIBS="-lcrypto $LIBS"
503d2be0 20603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20604/* confdefs.h. */
20605_ACEOF
20606cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */
503d2be0 20609
ca81d7a0
JD
20610/* Override any GCC internal prototype to avoid an error.
20611 Use char because int might match the return type of a GCC
20612 builtin and then its argument prototype would still apply. */
503d2be0
AS
20613#ifdef __cplusplus
20614extern "C"
20615#endif
503d2be0
AS
20616char mit_des_cbc_encrypt ();
20617int
20618main ()
20619{
ca81d7a0 20620return mit_des_cbc_encrypt ();
503d2be0
AS
20621 ;
20622 return 0;
20623}
20624_ACEOF
20625rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20626if { (ac_try="$ac_link"
20627case "(($ac_try" in
20628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20629 *) ac_try_echo=$ac_try;;
20630esac
20631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20632 (eval "$ac_link") 2>conftest.er1
503d2be0 20633 ac_status=$?
edfaf76d
LK
20634 grep -v '^ *+' conftest.er1 >conftest.err
20635 rm -f conftest.er1
20636 cat conftest.err >&5
c0d27fcc 20637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20638 (exit $ac_status); } && {
20639 test -z "$ac_c_werror_flag" ||
20640 test ! -s conftest.err
20641 } && test -s conftest$ac_exeext &&
20642 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20643 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20644else
20645 echo "$as_me: failed program was:" >&5
19650fd6
AS
20646sed 's/^/| /' conftest.$ac_ext >&5
20647
ca81d7a0 20648 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20649fi
ca81d7a0 20650
f053c89f 20651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20652 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20653LIBS=$ac_check_lib_save_LIBS
20654fi
ca81d7a0
JD
20655{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20656echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20657if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20658 cat >>confdefs.h <<_ACEOF
503d2be0 20659#define HAVE_LIBCRYPTO 1
c0d27fcc 20660_ACEOF
a21616bd
KR
20661
20662 LIBS="-lcrypto $LIBS"
20663
a21616bd
KR
20664fi
20665
c0d27fcc 20666
ca81d7a0
JD
20667{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20668echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20669if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20670 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20671else
503d2be0 20672 ac_check_lib_save_LIBS=$LIBS
a21616bd 20673LIBS="-lkrb5 $LIBS"
503d2be0 20674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20675/* confdefs.h. */
20676_ACEOF
20677cat confdefs.h >>conftest.$ac_ext
20678cat >>conftest.$ac_ext <<_ACEOF
20679/* end confdefs.h. */
a21616bd 20680
ca81d7a0
JD
20681/* Override any GCC internal prototype to avoid an error.
20682 Use char because int might match the return type of a GCC
20683 builtin and then its argument prototype would still apply. */
503d2be0
AS
20684#ifdef __cplusplus
20685extern "C"
20686#endif
503d2be0
AS
20687char krb5_init_context ();
20688int
20689main ()
20690{
ca81d7a0 20691return krb5_init_context ();
503d2be0
AS
20692 ;
20693 return 0;
20694}
20695_ACEOF
20696rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20697if { (ac_try="$ac_link"
20698case "(($ac_try" in
20699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20700 *) ac_try_echo=$ac_try;;
20701esac
20702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20703 (eval "$ac_link") 2>conftest.er1
503d2be0 20704 ac_status=$?
edfaf76d
LK
20705 grep -v '^ *+' conftest.er1 >conftest.err
20706 rm -f conftest.er1
20707 cat conftest.err >&5
c0d27fcc 20708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20709 (exit $ac_status); } && {
20710 test -z "$ac_c_werror_flag" ||
20711 test ! -s conftest.err
20712 } && test -s conftest$ac_exeext &&
20713 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20714 ac_cv_lib_krb5_krb5_init_context=yes
20715else
20716 echo "$as_me: failed program was:" >&5
19650fd6
AS
20717sed 's/^/| /' conftest.$ac_ext >&5
20718
ca81d7a0 20719 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20720fi
ca81d7a0 20721
f053c89f 20722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20723 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20724LIBS=$ac_check_lib_save_LIBS
20725fi
ca81d7a0
JD
20726{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20727echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20728if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20729 cat >>confdefs.h <<_ACEOF
503d2be0 20730#define HAVE_LIBKRB5 1
c0d27fcc 20731_ACEOF
a21616bd
KR
20732
20733 LIBS="-lkrb5 $LIBS"
20734
a21616bd
KR
20735fi
20736
20737 if test "${with_kerberos5+set}" != set; then
503d2be0 20738
ca81d7a0
JD
20739{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20740echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20741if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20742 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20743else
503d2be0 20744 ac_check_lib_save_LIBS=$LIBS
a21616bd 20745LIBS="-ldes425 $LIBS"
503d2be0 20746cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20747/* confdefs.h. */
20748_ACEOF
20749cat confdefs.h >>conftest.$ac_ext
20750cat >>conftest.$ac_ext <<_ACEOF
20751/* end confdefs.h. */
503d2be0 20752
ca81d7a0
JD
20753/* Override any GCC internal prototype to avoid an error.
20754 Use char because int might match the return type of a GCC
20755 builtin and then its argument prototype would still apply. */
503d2be0
AS
20756#ifdef __cplusplus
20757extern "C"
20758#endif
503d2be0
AS
20759char des_cbc_encrypt ();
20760int
20761main ()
20762{
ca81d7a0 20763return des_cbc_encrypt ();
503d2be0
AS
20764 ;
20765 return 0;
20766}
20767_ACEOF
20768rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20769if { (ac_try="$ac_link"
20770case "(($ac_try" in
20771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20772 *) ac_try_echo=$ac_try;;
20773esac
20774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20775 (eval "$ac_link") 2>conftest.er1
503d2be0 20776 ac_status=$?
edfaf76d
LK
20777 grep -v '^ *+' conftest.er1 >conftest.err
20778 rm -f conftest.er1
20779 cat conftest.err >&5
c0d27fcc 20780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20781 (exit $ac_status); } && {
20782 test -z "$ac_c_werror_flag" ||
20783 test ! -s conftest.err
20784 } && test -s conftest$ac_exeext &&
20785 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20786 ac_cv_lib_des425_des_cbc_encrypt=yes
20787else
20788 echo "$as_me: failed program was:" >&5
19650fd6
AS
20789sed 's/^/| /' conftest.$ac_ext >&5
20790
ca81d7a0 20791 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20792fi
ca81d7a0 20793
f053c89f 20794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20795 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20796LIBS=$ac_check_lib_save_LIBS
20797fi
ca81d7a0
JD
20798{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20799echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20800if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20801 cat >>confdefs.h <<_ACEOF
503d2be0 20802#define HAVE_LIBDES425 1
c0d27fcc 20803_ACEOF
a21616bd
KR
20804
20805 LIBS="-ldes425 $LIBS"
20806
20807else
503d2be0 20808
ca81d7a0
JD
20809{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20810echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20811if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20812 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20813else
503d2be0 20814 ac_check_lib_save_LIBS=$LIBS
a21616bd 20815LIBS="-ldes $LIBS"
503d2be0 20816cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20817/* confdefs.h. */
20818_ACEOF
20819cat confdefs.h >>conftest.$ac_ext
20820cat >>conftest.$ac_ext <<_ACEOF
20821/* end confdefs.h. */
503d2be0 20822
ca81d7a0
JD
20823/* Override any GCC internal prototype to avoid an error.
20824 Use char because int might match the return type of a GCC
20825 builtin and then its argument prototype would still apply. */
503d2be0
AS
20826#ifdef __cplusplus
20827extern "C"
20828#endif
503d2be0
AS
20829char des_cbc_encrypt ();
20830int
20831main ()
20832{
ca81d7a0 20833return des_cbc_encrypt ();
503d2be0
AS
20834 ;
20835 return 0;
20836}
20837_ACEOF
20838rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20839if { (ac_try="$ac_link"
20840case "(($ac_try" in
20841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20842 *) ac_try_echo=$ac_try;;
20843esac
20844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20845 (eval "$ac_link") 2>conftest.er1
503d2be0 20846 ac_status=$?
edfaf76d
LK
20847 grep -v '^ *+' conftest.er1 >conftest.err
20848 rm -f conftest.er1
20849 cat conftest.err >&5
c0d27fcc 20850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20851 (exit $ac_status); } && {
20852 test -z "$ac_c_werror_flag" ||
20853 test ! -s conftest.err
20854 } && test -s conftest$ac_exeext &&
20855 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20856 ac_cv_lib_des_des_cbc_encrypt=yes
20857else
20858 echo "$as_me: failed program was:" >&5
19650fd6
AS
20859sed 's/^/| /' conftest.$ac_ext >&5
20860
ca81d7a0 20861 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20862fi
ca81d7a0 20863
f053c89f 20864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20865 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20866LIBS=$ac_check_lib_save_LIBS
20867fi
ca81d7a0
JD
20868{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20869echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20870if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20871 cat >>confdefs.h <<_ACEOF
503d2be0 20872#define HAVE_LIBDES 1
c0d27fcc 20873_ACEOF
a21616bd
KR
20874
20875 LIBS="-ldes $LIBS"
20876
a21616bd
KR
20877fi
20878
20879fi
20880
c0d27fcc 20881
ca81d7a0
JD
20882{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20883echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20884if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20885 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20886else
503d2be0 20887 ac_check_lib_save_LIBS=$LIBS
a21616bd 20888LIBS="-lkrb4 $LIBS"
503d2be0 20889cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20890/* confdefs.h. */
20891_ACEOF
20892cat confdefs.h >>conftest.$ac_ext
20893cat >>conftest.$ac_ext <<_ACEOF
20894/* end confdefs.h. */
503d2be0 20895
ca81d7a0
JD
20896/* Override any GCC internal prototype to avoid an error.
20897 Use char because int might match the return type of a GCC
20898 builtin and then its argument prototype would still apply. */
503d2be0
AS
20899#ifdef __cplusplus
20900extern "C"
20901#endif
503d2be0
AS
20902char krb_get_cred ();
20903int
20904main ()
20905{
f053c89f 20906return krb_get_cred ();
503d2be0
AS
20907 ;
20908 return 0;
20909}
20910_ACEOF
20911rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20912if { (ac_try="$ac_link"
20913case "(($ac_try" in
ca81d7a0
JD
20914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20915 *) ac_try_echo=$ac_try;;
20916esac
20917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20918 (eval "$ac_link") 2>conftest.er1
503d2be0 20919 ac_status=$?
edfaf76d
LK
20920 grep -v '^ *+' conftest.er1 >conftest.err
20921 rm -f conftest.er1
20922 cat conftest.err >&5
c0d27fcc 20923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20924 (exit $ac_status); } && {
20925 test -z "$ac_c_werror_flag" ||
20926 test ! -s conftest.err
20927 } && test -s conftest$ac_exeext &&
20928 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20929 ac_cv_lib_krb4_krb_get_cred=yes
20930else
20931 echo "$as_me: failed program was:" >&5
19650fd6
AS
20932sed 's/^/| /' conftest.$ac_ext >&5
20933
ca81d7a0 20934 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20935fi
ca81d7a0 20936
f053c89f 20937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20938 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20939LIBS=$ac_check_lib_save_LIBS
20940fi
ca81d7a0
JD
20941{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20942echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20943if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20944 cat >>confdefs.h <<_ACEOF
503d2be0 20945#define HAVE_LIBKRB4 1
c0d27fcc 20946_ACEOF
a21616bd
KR
20947
20948 LIBS="-lkrb4 $LIBS"
20949
20950else
503d2be0 20951
ca81d7a0
JD
20952{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20953echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20954if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20955 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20956else
503d2be0 20957 ac_check_lib_save_LIBS=$LIBS
a21616bd 20958LIBS="-lkrb $LIBS"
503d2be0 20959cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20960/* confdefs.h. */
20961_ACEOF
20962cat confdefs.h >>conftest.$ac_ext
20963cat >>conftest.$ac_ext <<_ACEOF
20964/* end confdefs.h. */
503d2be0 20965
ca81d7a0
JD
20966/* Override any GCC internal prototype to avoid an error.
20967 Use char because int might match the return type of a GCC
20968 builtin and then its argument prototype would still apply. */
503d2be0
AS
20969#ifdef __cplusplus
20970extern "C"
20971#endif
503d2be0
AS
20972char krb_get_cred ();
20973int
20974main ()
20975{
ca81d7a0 20976return krb_get_cred ();
503d2be0
AS
20977 ;
20978 return 0;
20979}
20980_ACEOF
20981rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20982if { (ac_try="$ac_link"
20983case "(($ac_try" in
20984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20985 *) ac_try_echo=$ac_try;;
20986esac
20987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20988 (eval "$ac_link") 2>conftest.er1
503d2be0 20989 ac_status=$?
edfaf76d
LK
20990 grep -v '^ *+' conftest.er1 >conftest.err
20991 rm -f conftest.er1
20992 cat conftest.err >&5
c0d27fcc 20993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20994 (exit $ac_status); } && {
20995 test -z "$ac_c_werror_flag" ||
20996 test ! -s conftest.err
20997 } && test -s conftest$ac_exeext &&
20998 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20999 ac_cv_lib_krb_krb_get_cred=yes
21000else
21001 echo "$as_me: failed program was:" >&5
19650fd6
AS
21002sed 's/^/| /' conftest.$ac_ext >&5
21003
ca81d7a0 21004 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21005fi
ca81d7a0 21006
f053c89f 21007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21008 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21009LIBS=$ac_check_lib_save_LIBS
21010fi
ca81d7a0
JD
21011{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21012echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21013if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21014 cat >>confdefs.h <<_ACEOF
503d2be0 21015#define HAVE_LIBKRB 1
c0d27fcc 21016_ACEOF
a21616bd
KR
21017
21018 LIBS="-lkrb $LIBS"
21019
a21616bd
KR
21020fi
21021
21022fi
21023
21024 fi
21025
21026 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
21027
21028for ac_header in krb5.h
a21616bd 21029do
503d2be0 21030as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21031if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21032 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21033echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21034if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21035 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21036fi
ca81d7a0
JD
21037ac_res=`eval echo '${'$as_ac_Header'}'`
21038 { echo "$as_me:$LINENO: result: $ac_res" >&5
21039echo "${ECHO_T}$ac_res" >&6; }
98418dba 21040else
c0d27fcc 21041 # Is the header compilable?
ca81d7a0
JD
21042{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21043echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21044cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21045/* confdefs.h. */
21046_ACEOF
21047cat confdefs.h >>conftest.$ac_ext
21048cat >>conftest.$ac_ext <<_ACEOF
21049/* end confdefs.h. */
c0d27fcc
MR
21050$ac_includes_default
21051#include <$ac_header>
21052_ACEOF
21053rm -f conftest.$ac_objext
ca81d7a0
JD
21054if { (ac_try="$ac_compile"
21055case "(($ac_try" in
21056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21057 *) ac_try_echo=$ac_try;;
21058esac
21059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21060 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21061 ac_status=$?
edfaf76d
LK
21062 grep -v '^ *+' conftest.er1 >conftest.err
21063 rm -f conftest.er1
21064 cat conftest.err >&5
c0d27fcc 21065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21066 (exit $ac_status); } && {
21067 test -z "$ac_c_werror_flag" ||
21068 test ! -s conftest.err
21069 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21070 ac_header_compiler=yes
21071else
21072 echo "$as_me: failed program was:" >&5
19650fd6
AS
21073sed 's/^/| /' conftest.$ac_ext >&5
21074
ca81d7a0 21075 ac_header_compiler=no
c0d27fcc 21076fi
ca81d7a0
JD
21077
21078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21080echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21081
21082# Is the header present?
ca81d7a0
JD
21083{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21084echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21085cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21086/* confdefs.h. */
21087_ACEOF
21088cat confdefs.h >>conftest.$ac_ext
21089cat >>conftest.$ac_ext <<_ACEOF
21090/* end confdefs.h. */
503d2be0
AS
21091#include <$ac_header>
21092_ACEOF
ca81d7a0
JD
21093if { (ac_try="$ac_cpp conftest.$ac_ext"
21094case "(($ac_try" in
21095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21096 *) ac_try_echo=$ac_try;;
21097esac
21098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21100 ac_status=$?
6bae0ccf 21101 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21102 rm -f conftest.er1
21103 cat conftest.err >&5
c0d27fcc 21104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21105 (exit $ac_status); } >/dev/null && {
21106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21107 test ! -s conftest.err
21108 }; then
c0d27fcc 21109 ac_header_preproc=yes
503d2be0
AS
21110else
21111 echo "$as_me: failed program was:" >&5
19650fd6
AS
21112sed 's/^/| /' conftest.$ac_ext >&5
21113
c0d27fcc 21114 ac_header_preproc=no
a21616bd 21115fi
ca81d7a0 21116
503d2be0 21117rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21119echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21120
21121# So? What about this header?
edfaf76d
LK
21122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21123 yes:no: )
c0d27fcc
MR
21124 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21125echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21126 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21127echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21128 ac_header_preproc=yes
19650fd6 21129 ;;
edfaf76d 21130 no:yes:* )
c0d27fcc
MR
21131 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21132echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21133 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21134echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21135 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21136echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21137 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21138echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21139 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21140echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21141 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21142echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21143
19650fd6 21144 ;;
c0d27fcc 21145esac
ca81d7a0
JD
21146{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21147echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21148if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21149 echo $ECHO_N "(cached) $ECHO_C" >&6
21150else
edfaf76d 21151 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21152fi
ca81d7a0
JD
21153ac_res=`eval echo '${'$as_ac_Header'}'`
21154 { echo "$as_me:$LINENO: result: $ac_res" >&5
21155echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21156
21157fi
503d2be0 21158if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21159 cat >>confdefs.h <<_ACEOF
503d2be0 21160#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21161_ACEOF
503d2be0 21162
a21616bd 21163fi
c0d27fcc 21164
a21616bd
KR
21165done
21166
21167 else
503d2be0
AS
21168
21169for ac_header in des.h
a21616bd 21170do
503d2be0 21171as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21172if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21173 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21174echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21175if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21176 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21177fi
ca81d7a0
JD
21178ac_res=`eval echo '${'$as_ac_Header'}'`
21179 { echo "$as_me:$LINENO: result: $ac_res" >&5
21180echo "${ECHO_T}$ac_res" >&6; }
98418dba 21181else
c0d27fcc 21182 # Is the header compilable?
ca81d7a0
JD
21183{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21184echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21185cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21186/* confdefs.h. */
21187_ACEOF
21188cat confdefs.h >>conftest.$ac_ext
21189cat >>conftest.$ac_ext <<_ACEOF
21190/* end confdefs.h. */
c0d27fcc
MR
21191$ac_includes_default
21192#include <$ac_header>
21193_ACEOF
21194rm -f conftest.$ac_objext
ca81d7a0
JD
21195if { (ac_try="$ac_compile"
21196case "(($ac_try" in
21197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21198 *) ac_try_echo=$ac_try;;
21199esac
21200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21201 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21202 ac_status=$?
edfaf76d
LK
21203 grep -v '^ *+' conftest.er1 >conftest.err
21204 rm -f conftest.er1
21205 cat conftest.err >&5
c0d27fcc 21206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21207 (exit $ac_status); } && {
21208 test -z "$ac_c_werror_flag" ||
21209 test ! -s conftest.err
21210 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21211 ac_header_compiler=yes
21212else
21213 echo "$as_me: failed program was:" >&5
19650fd6
AS
21214sed 's/^/| /' conftest.$ac_ext >&5
21215
ca81d7a0 21216 ac_header_compiler=no
c0d27fcc 21217fi
ca81d7a0
JD
21218
21219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21220{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21221echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21222
21223# Is the header present?
ca81d7a0
JD
21224{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21225echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21226cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21227/* confdefs.h. */
21228_ACEOF
21229cat confdefs.h >>conftest.$ac_ext
21230cat >>conftest.$ac_ext <<_ACEOF
21231/* end confdefs.h. */
503d2be0
AS
21232#include <$ac_header>
21233_ACEOF
ca81d7a0
JD
21234if { (ac_try="$ac_cpp conftest.$ac_ext"
21235case "(($ac_try" in
21236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21237 *) ac_try_echo=$ac_try;;
21238esac
21239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21240 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21241 ac_status=$?
6bae0ccf 21242 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21243 rm -f conftest.er1
21244 cat conftest.err >&5
c0d27fcc 21245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21246 (exit $ac_status); } >/dev/null && {
21247 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21248 test ! -s conftest.err
21249 }; then
c0d27fcc 21250 ac_header_preproc=yes
503d2be0
AS
21251else
21252 echo "$as_me: failed program was:" >&5
19650fd6
AS
21253sed 's/^/| /' conftest.$ac_ext >&5
21254
c0d27fcc 21255 ac_header_preproc=no
a21616bd 21256fi
ca81d7a0 21257
503d2be0 21258rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21259{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21260echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21261
21262# So? What about this header?
edfaf76d
LK
21263case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21264 yes:no: )
c0d27fcc
MR
21265 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21266echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21267 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21268echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21269 ac_header_preproc=yes
19650fd6 21270 ;;
edfaf76d 21271 no:yes:* )
c0d27fcc
MR
21272 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21273echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21274 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21275echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21276 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21277echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21278 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21279echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21280 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21281echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21282 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21283echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21284
19650fd6 21285 ;;
c0d27fcc 21286esac
ca81d7a0
JD
21287{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21288echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21289if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21290 echo $ECHO_N "(cached) $ECHO_C" >&6
21291else
edfaf76d 21292 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21293fi
ca81d7a0
JD
21294ac_res=`eval echo '${'$as_ac_Header'}'`
21295 { echo "$as_me:$LINENO: result: $ac_res" >&5
21296echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21297
21298fi
503d2be0 21299if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21300 cat >>confdefs.h <<_ACEOF
503d2be0 21301#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21302_ACEOF
503d2be0 21303
a21616bd 21304else
503d2be0
AS
21305
21306for ac_header in kerberosIV/des.h
a21616bd 21307do
503d2be0 21308as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21309if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21310 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21311echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21312if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21313 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21314fi
ca81d7a0
JD
21315ac_res=`eval echo '${'$as_ac_Header'}'`
21316 { echo "$as_me:$LINENO: result: $ac_res" >&5
21317echo "${ECHO_T}$ac_res" >&6; }
98418dba 21318else
c0d27fcc 21319 # Is the header compilable?
ca81d7a0
JD
21320{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21321echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21322cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21323/* confdefs.h. */
21324_ACEOF
21325cat confdefs.h >>conftest.$ac_ext
21326cat >>conftest.$ac_ext <<_ACEOF
21327/* end confdefs.h. */
c0d27fcc
MR
21328$ac_includes_default
21329#include <$ac_header>
21330_ACEOF
21331rm -f conftest.$ac_objext
ca81d7a0
JD
21332if { (ac_try="$ac_compile"
21333case "(($ac_try" in
21334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21335 *) ac_try_echo=$ac_try;;
21336esac
21337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21338 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21339 ac_status=$?
edfaf76d
LK
21340 grep -v '^ *+' conftest.er1 >conftest.err
21341 rm -f conftest.er1
21342 cat conftest.err >&5
c0d27fcc 21343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21344 (exit $ac_status); } && {
21345 test -z "$ac_c_werror_flag" ||
21346 test ! -s conftest.err
21347 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21348 ac_header_compiler=yes
21349else
21350 echo "$as_me: failed program was:" >&5
19650fd6
AS
21351sed 's/^/| /' conftest.$ac_ext >&5
21352
ca81d7a0 21353 ac_header_compiler=no
c0d27fcc 21354fi
ca81d7a0
JD
21355
21356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21357{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21358echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21359
21360# Is the header present?
ca81d7a0
JD
21361{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21362echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21363cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21364/* confdefs.h. */
21365_ACEOF
21366cat confdefs.h >>conftest.$ac_ext
21367cat >>conftest.$ac_ext <<_ACEOF
21368/* end confdefs.h. */
503d2be0
AS
21369#include <$ac_header>
21370_ACEOF
ca81d7a0
JD
21371if { (ac_try="$ac_cpp conftest.$ac_ext"
21372case "(($ac_try" in
21373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21374 *) ac_try_echo=$ac_try;;
21375esac
21376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21377 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21378 ac_status=$?
6bae0ccf 21379 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21380 rm -f conftest.er1
21381 cat conftest.err >&5
c0d27fcc 21382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21383 (exit $ac_status); } >/dev/null && {
21384 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21385 test ! -s conftest.err
21386 }; then
c0d27fcc 21387 ac_header_preproc=yes
503d2be0
AS
21388else
21389 echo "$as_me: failed program was:" >&5
19650fd6
AS
21390sed 's/^/| /' conftest.$ac_ext >&5
21391
c0d27fcc 21392 ac_header_preproc=no
a21616bd 21393fi
ca81d7a0 21394
503d2be0 21395rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21396{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21397echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21398
21399# So? What about this header?
edfaf76d
LK
21400case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21401 yes:no: )
c0d27fcc
MR
21402 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21403echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21404 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21405echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21406 ac_header_preproc=yes
19650fd6 21407 ;;
edfaf76d 21408 no:yes:* )
c0d27fcc
MR
21409 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21410echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21411 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21412echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21413 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21414echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21415 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21416echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21417 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21418echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21419 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21420echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21421
19650fd6 21422 ;;
c0d27fcc 21423esac
ca81d7a0
JD
21424{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21425echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21426if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21427 echo $ECHO_N "(cached) $ECHO_C" >&6
21428else
edfaf76d 21429 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21430fi
ca81d7a0
JD
21431ac_res=`eval echo '${'$as_ac_Header'}'`
21432 { echo "$as_me:$LINENO: result: $ac_res" >&5
21433echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21434
21435fi
503d2be0 21436if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21437 cat >>confdefs.h <<_ACEOF
503d2be0 21438#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21439_ACEOF
503d2be0 21440
a21616bd 21441else
503d2be0
AS
21442
21443for ac_header in kerberos/des.h
a21616bd 21444do
503d2be0 21445as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21446if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21447 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21448echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21449if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21450 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21451fi
ca81d7a0
JD
21452ac_res=`eval echo '${'$as_ac_Header'}'`
21453 { echo "$as_me:$LINENO: result: $ac_res" >&5
21454echo "${ECHO_T}$ac_res" >&6; }
98418dba 21455else
c0d27fcc 21456 # Is the header compilable?
ca81d7a0
JD
21457{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21458echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21459cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21460/* confdefs.h. */
21461_ACEOF
21462cat confdefs.h >>conftest.$ac_ext
21463cat >>conftest.$ac_ext <<_ACEOF
21464/* end confdefs.h. */
c0d27fcc
MR
21465$ac_includes_default
21466#include <$ac_header>
21467_ACEOF
21468rm -f conftest.$ac_objext
ca81d7a0
JD
21469if { (ac_try="$ac_compile"
21470case "(($ac_try" in
21471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21472 *) ac_try_echo=$ac_try;;
21473esac
21474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21475 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21476 ac_status=$?
edfaf76d
LK
21477 grep -v '^ *+' conftest.er1 >conftest.err
21478 rm -f conftest.er1
21479 cat conftest.err >&5
c0d27fcc 21480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21481 (exit $ac_status); } && {
21482 test -z "$ac_c_werror_flag" ||
21483 test ! -s conftest.err
21484 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21485 ac_header_compiler=yes
21486else
21487 echo "$as_me: failed program was:" >&5
19650fd6
AS
21488sed 's/^/| /' conftest.$ac_ext >&5
21489
ca81d7a0 21490 ac_header_compiler=no
c0d27fcc 21491fi
ca81d7a0
JD
21492
21493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21494{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21495echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21496
21497# Is the header present?
ca81d7a0
JD
21498{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21499echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21500cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21501/* confdefs.h. */
21502_ACEOF
21503cat confdefs.h >>conftest.$ac_ext
21504cat >>conftest.$ac_ext <<_ACEOF
21505/* end confdefs.h. */
503d2be0
AS
21506#include <$ac_header>
21507_ACEOF
ca81d7a0
JD
21508if { (ac_try="$ac_cpp conftest.$ac_ext"
21509case "(($ac_try" in
21510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21511 *) ac_try_echo=$ac_try;;
21512esac
21513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21514 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21515 ac_status=$?
6bae0ccf 21516 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21517 rm -f conftest.er1
21518 cat conftest.err >&5
c0d27fcc 21519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21520 (exit $ac_status); } >/dev/null && {
21521 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21522 test ! -s conftest.err
21523 }; then
c0d27fcc 21524 ac_header_preproc=yes
503d2be0
AS
21525else
21526 echo "$as_me: failed program was:" >&5
19650fd6
AS
21527sed 's/^/| /' conftest.$ac_ext >&5
21528
c0d27fcc 21529 ac_header_preproc=no
a21616bd 21530fi
ca81d7a0 21531
503d2be0 21532rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21533{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21534echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21535
21536# So? What about this header?
edfaf76d
LK
21537case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21538 yes:no: )
c0d27fcc
MR
21539 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21540echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21541 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21542echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21543 ac_header_preproc=yes
19650fd6 21544 ;;
edfaf76d 21545 no:yes:* )
c0d27fcc
MR
21546 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21547echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21548 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21549echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21550 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21551echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21552 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21553echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21554 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21555echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21556 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21557echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21558
19650fd6 21559 ;;
c0d27fcc 21560esac
ca81d7a0
JD
21561{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21562echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21563if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21564 echo $ECHO_N "(cached) $ECHO_C" >&6
21565else
edfaf76d 21566 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21567fi
ca81d7a0
JD
21568ac_res=`eval echo '${'$as_ac_Header'}'`
21569 { echo "$as_me:$LINENO: result: $ac_res" >&5
21570echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21571
21572fi
503d2be0 21573if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21574 cat >>confdefs.h <<_ACEOF
503d2be0 21575#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21576_ACEOF
a21616bd
KR
21577
21578fi
c0d27fcc 21579
a21616bd
KR
21580done
21581
98418dba 21582fi
c0d27fcc 21583
925c2f3f
EZ
21584done
21585
98418dba 21586fi
c0d27fcc 21587
925c2f3f 21588done
98418dba 21589
c0d27fcc 21590
925c2f3f
EZ
21591for ac_header in krb.h
21592do
21593as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21594if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21595 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21596echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21597if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21598 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21599fi
ca81d7a0
JD
21600ac_res=`eval echo '${'$as_ac_Header'}'`
21601 { echo "$as_me:$LINENO: result: $ac_res" >&5
21602echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21603else
21604 # Is the header compilable?
ca81d7a0
JD
21605{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21606echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21607cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21608/* confdefs.h. */
21609_ACEOF
21610cat confdefs.h >>conftest.$ac_ext
21611cat >>conftest.$ac_ext <<_ACEOF
21612/* end confdefs.h. */
c0d27fcc
MR
21613$ac_includes_default
21614#include <$ac_header>
21615_ACEOF
21616rm -f conftest.$ac_objext
ca81d7a0
JD
21617if { (ac_try="$ac_compile"
21618case "(($ac_try" in
21619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21620 *) ac_try_echo=$ac_try;;
21621esac
21622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21623 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21624 ac_status=$?
edfaf76d
LK
21625 grep -v '^ *+' conftest.er1 >conftest.err
21626 rm -f conftest.er1
21627 cat conftest.err >&5
c0d27fcc 21628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21629 (exit $ac_status); } && {
21630 test -z "$ac_c_werror_flag" ||
21631 test ! -s conftest.err
21632 } && test -s conftest.$ac_objext; then
c0d27fcc 21633 ac_header_compiler=yes
925c2f3f 21634else
c0d27fcc 21635 echo "$as_me: failed program was:" >&5
19650fd6
AS
21636sed 's/^/| /' conftest.$ac_ext >&5
21637
ca81d7a0 21638 ac_header_compiler=no
c0d27fcc 21639fi
ca81d7a0
JD
21640
21641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21642{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21643echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21644
21645# Is the header present?
ca81d7a0
JD
21646{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21647echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21648cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21649/* confdefs.h. */
21650_ACEOF
21651cat confdefs.h >>conftest.$ac_ext
21652cat >>conftest.$ac_ext <<_ACEOF
21653/* end confdefs.h. */
503d2be0
AS
21654#include <$ac_header>
21655_ACEOF
ca81d7a0
JD
21656if { (ac_try="$ac_cpp conftest.$ac_ext"
21657case "(($ac_try" in
21658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21659 *) ac_try_echo=$ac_try;;
21660esac
21661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21663 ac_status=$?
6bae0ccf 21664 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21665 rm -f conftest.er1
21666 cat conftest.err >&5
c0d27fcc 21667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21668 (exit $ac_status); } >/dev/null && {
21669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21670 test ! -s conftest.err
21671 }; then
c0d27fcc 21672 ac_header_preproc=yes
503d2be0
AS
21673else
21674 echo "$as_me: failed program was:" >&5
19650fd6
AS
21675sed 's/^/| /' conftest.$ac_ext >&5
21676
c0d27fcc 21677 ac_header_preproc=no
a21616bd 21678fi
ca81d7a0 21679
503d2be0 21680rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21681{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21682echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21683
21684# So? What about this header?
edfaf76d
LK
21685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21686 yes:no: )
c0d27fcc
MR
21687 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21688echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21689 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21690echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21691 ac_header_preproc=yes
19650fd6 21692 ;;
edfaf76d 21693 no:yes:* )
c0d27fcc
MR
21694 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21695echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21696 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21697echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21698 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21699echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21700 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21701echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21702 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21703echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21704 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21705echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21706
19650fd6 21707 ;;
c0d27fcc 21708esac
ca81d7a0
JD
21709{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21710echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21711if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21712 echo $ECHO_N "(cached) $ECHO_C" >&6
21713else
edfaf76d 21714 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21715fi
ca81d7a0
JD
21716ac_res=`eval echo '${'$as_ac_Header'}'`
21717 { echo "$as_me:$LINENO: result: $ac_res" >&5
21718echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21719
21720fi
503d2be0 21721if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21722 cat >>confdefs.h <<_ACEOF
503d2be0 21723#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21724_ACEOF
503d2be0 21725
a21616bd 21726else
503d2be0
AS
21727
21728for ac_header in kerberosIV/krb.h
a21616bd 21729do
503d2be0 21730as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21731if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21732 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21733echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21734if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21735 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21736fi
ca81d7a0
JD
21737ac_res=`eval echo '${'$as_ac_Header'}'`
21738 { echo "$as_me:$LINENO: result: $ac_res" >&5
21739echo "${ECHO_T}$ac_res" >&6; }
98418dba 21740else
c0d27fcc 21741 # Is the header compilable?
ca81d7a0
JD
21742{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21743echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21744cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21745/* confdefs.h. */
21746_ACEOF
21747cat confdefs.h >>conftest.$ac_ext
21748cat >>conftest.$ac_ext <<_ACEOF
21749/* end confdefs.h. */
c0d27fcc
MR
21750$ac_includes_default
21751#include <$ac_header>
21752_ACEOF
21753rm -f conftest.$ac_objext
ca81d7a0
JD
21754if { (ac_try="$ac_compile"
21755case "(($ac_try" in
21756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21757 *) ac_try_echo=$ac_try;;
21758esac
21759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21760 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21761 ac_status=$?
edfaf76d
LK
21762 grep -v '^ *+' conftest.er1 >conftest.err
21763 rm -f conftest.er1
21764 cat conftest.err >&5
c0d27fcc 21765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21766 (exit $ac_status); } && {
21767 test -z "$ac_c_werror_flag" ||
21768 test ! -s conftest.err
21769 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21770 ac_header_compiler=yes
21771else
21772 echo "$as_me: failed program was:" >&5
19650fd6
AS
21773sed 's/^/| /' conftest.$ac_ext >&5
21774
ca81d7a0 21775 ac_header_compiler=no
c0d27fcc 21776fi
ca81d7a0
JD
21777
21778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21779{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21780echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21781
21782# Is the header present?
ca81d7a0
JD
21783{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21784echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21785cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21786/* confdefs.h. */
21787_ACEOF
21788cat confdefs.h >>conftest.$ac_ext
21789cat >>conftest.$ac_ext <<_ACEOF
21790/* end confdefs.h. */
503d2be0
AS
21791#include <$ac_header>
21792_ACEOF
ca81d7a0
JD
21793if { (ac_try="$ac_cpp conftest.$ac_ext"
21794case "(($ac_try" in
21795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21796 *) ac_try_echo=$ac_try;;
21797esac
21798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21799 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21800 ac_status=$?
6bae0ccf 21801 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21802 rm -f conftest.er1
21803 cat conftest.err >&5
c0d27fcc 21804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21805 (exit $ac_status); } >/dev/null && {
21806 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21807 test ! -s conftest.err
21808 }; then
c0d27fcc 21809 ac_header_preproc=yes
503d2be0
AS
21810else
21811 echo "$as_me: failed program was:" >&5
19650fd6
AS
21812sed 's/^/| /' conftest.$ac_ext >&5
21813
c0d27fcc 21814 ac_header_preproc=no
a21616bd 21815fi
ca81d7a0 21816
503d2be0 21817rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21818{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21819echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21820
21821# So? What about this header?
edfaf76d
LK
21822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21823 yes:no: )
c0d27fcc
MR
21824 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21825echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21826 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21827echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21828 ac_header_preproc=yes
19650fd6 21829 ;;
edfaf76d 21830 no:yes:* )
c0d27fcc
MR
21831 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21832echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21833 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21834echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21835 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21836echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21837 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21838echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21839 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21840echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21841 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21842echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21843
19650fd6 21844 ;;
c0d27fcc 21845esac
ca81d7a0
JD
21846{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21847echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21848if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21849 echo $ECHO_N "(cached) $ECHO_C" >&6
21850else
edfaf76d 21851 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21852fi
ca81d7a0
JD
21853ac_res=`eval echo '${'$as_ac_Header'}'`
21854 { echo "$as_me:$LINENO: result: $ac_res" >&5
21855echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21856
21857fi
503d2be0 21858if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21859 cat >>confdefs.h <<_ACEOF
503d2be0 21860#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21861_ACEOF
503d2be0 21862
a21616bd 21863else
503d2be0
AS
21864
21865for ac_header in kerberos/krb.h
a21616bd 21866do
503d2be0 21867as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21868if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21869 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21870echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21871if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21872 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21873fi
ca81d7a0
JD
21874ac_res=`eval echo '${'$as_ac_Header'}'`
21875 { echo "$as_me:$LINENO: result: $ac_res" >&5
21876echo "${ECHO_T}$ac_res" >&6; }
98418dba 21877else
c0d27fcc 21878 # Is the header compilable?
ca81d7a0
JD
21879{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21880echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21881cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21882/* confdefs.h. */
21883_ACEOF
21884cat confdefs.h >>conftest.$ac_ext
21885cat >>conftest.$ac_ext <<_ACEOF
21886/* end confdefs.h. */
c0d27fcc
MR
21887$ac_includes_default
21888#include <$ac_header>
21889_ACEOF
21890rm -f conftest.$ac_objext
ca81d7a0
JD
21891if { (ac_try="$ac_compile"
21892case "(($ac_try" in
21893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21894 *) ac_try_echo=$ac_try;;
21895esac
21896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21897 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21898 ac_status=$?
edfaf76d
LK
21899 grep -v '^ *+' conftest.er1 >conftest.err
21900 rm -f conftest.er1
21901 cat conftest.err >&5
c0d27fcc 21902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21903 (exit $ac_status); } && {
21904 test -z "$ac_c_werror_flag" ||
21905 test ! -s conftest.err
21906 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21907 ac_header_compiler=yes
21908else
21909 echo "$as_me: failed program was:" >&5
19650fd6
AS
21910sed 's/^/| /' conftest.$ac_ext >&5
21911
ca81d7a0 21912 ac_header_compiler=no
c0d27fcc 21913fi
ca81d7a0
JD
21914
21915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21916{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21917echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21918
21919# Is the header present?
ca81d7a0
JD
21920{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21921echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21922cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21923/* confdefs.h. */
21924_ACEOF
21925cat confdefs.h >>conftest.$ac_ext
21926cat >>conftest.$ac_ext <<_ACEOF
21927/* end confdefs.h. */
503d2be0
AS
21928#include <$ac_header>
21929_ACEOF
ca81d7a0
JD
21930if { (ac_try="$ac_cpp conftest.$ac_ext"
21931case "(($ac_try" in
21932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21933 *) ac_try_echo=$ac_try;;
21934esac
21935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21936 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21937 ac_status=$?
6bae0ccf 21938 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21939 rm -f conftest.er1
21940 cat conftest.err >&5
c0d27fcc 21941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21942 (exit $ac_status); } >/dev/null && {
21943 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21944 test ! -s conftest.err
21945 }; then
c0d27fcc 21946 ac_header_preproc=yes
503d2be0
AS
21947else
21948 echo "$as_me: failed program was:" >&5
19650fd6
AS
21949sed 's/^/| /' conftest.$ac_ext >&5
21950
c0d27fcc 21951 ac_header_preproc=no
a21616bd 21952fi
ca81d7a0 21953
503d2be0 21954rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21955{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21956echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21957
21958# So? What about this header?
edfaf76d
LK
21959case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21960 yes:no: )
35996d22
AS
21961 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21962echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21963 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21964echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21965 ac_header_preproc=yes
19650fd6 21966 ;;
edfaf76d 21967 no:yes:* )
c0d27fcc
MR
21968 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21969echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21970 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21971echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21972 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21973echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21974 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21975echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21976 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21977echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21978 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21979echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21980
19650fd6 21981 ;;
c0d27fcc 21982esac
ca81d7a0
JD
21983{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21985if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21986 echo $ECHO_N "(cached) $ECHO_C" >&6
21987else
edfaf76d 21988 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21989fi
ca81d7a0
JD
21990ac_res=`eval echo '${'$as_ac_Header'}'`
21991 { echo "$as_me:$LINENO: result: $ac_res" >&5
21992echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21993
21994fi
503d2be0 21995if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21996 cat >>confdefs.h <<_ACEOF
503d2be0 21997#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21998_ACEOF
503d2be0 21999
a21616bd 22000fi
c0d27fcc 22001
a21616bd
KR
22002done
22003
22004fi
c0d27fcc 22005
a21616bd
KR
22006done
22007
22008fi
c0d27fcc 22009
a21616bd
KR
22010done
22011
22012 fi
503d2be0
AS
22013
22014for ac_header in com_err.h
a21616bd 22015do
503d2be0 22016as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22017if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22018 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22019echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22020if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22021 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22022fi
ca81d7a0
JD
22023ac_res=`eval echo '${'$as_ac_Header'}'`
22024 { echo "$as_me:$LINENO: result: $ac_res" >&5
22025echo "${ECHO_T}$ac_res" >&6; }
98418dba 22026else
c0d27fcc 22027 # Is the header compilable?
ca81d7a0
JD
22028{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22029echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22030cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22031/* confdefs.h. */
22032_ACEOF
22033cat confdefs.h >>conftest.$ac_ext
22034cat >>conftest.$ac_ext <<_ACEOF
22035/* end confdefs.h. */
c0d27fcc
MR
22036$ac_includes_default
22037#include <$ac_header>
22038_ACEOF
22039rm -f conftest.$ac_objext
ca81d7a0
JD
22040if { (ac_try="$ac_compile"
22041case "(($ac_try" in
22042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22043 *) ac_try_echo=$ac_try;;
22044esac
22045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22046 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22047 ac_status=$?
22048 grep -v '^ *+' conftest.er1 >conftest.err
22049 rm -f conftest.er1
22050 cat conftest.err >&5
22051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22052 (exit $ac_status); } && {
22053 test -z "$ac_c_werror_flag" ||
22054 test ! -s conftest.err
22055 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22056 ac_header_compiler=yes
22057else
22058 echo "$as_me: failed program was:" >&5
19650fd6
AS
22059sed 's/^/| /' conftest.$ac_ext >&5
22060
ca81d7a0 22061 ac_header_compiler=no
c0d27fcc 22062fi
ca81d7a0
JD
22063
22064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22065{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22066echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22067
22068# Is the header present?
ca81d7a0
JD
22069{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22070echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22071cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22072/* confdefs.h. */
22073_ACEOF
22074cat confdefs.h >>conftest.$ac_ext
22075cat >>conftest.$ac_ext <<_ACEOF
22076/* end confdefs.h. */
503d2be0
AS
22077#include <$ac_header>
22078_ACEOF
ca81d7a0
JD
22079if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22086 ac_status=$?
6bae0ccf 22087 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22088 rm -f conftest.er1
22089 cat conftest.err >&5
c0d27fcc 22090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22091 (exit $ac_status); } >/dev/null && {
22092 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22093 test ! -s conftest.err
22094 }; then
c0d27fcc 22095 ac_header_preproc=yes
503d2be0
AS
22096else
22097 echo "$as_me: failed program was:" >&5
19650fd6
AS
22098sed 's/^/| /' conftest.$ac_ext >&5
22099
c0d27fcc 22100 ac_header_preproc=no
a21616bd 22101fi
ca81d7a0 22102
503d2be0 22103rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22104{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22105echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22106
22107# So? What about this header?
edfaf76d
LK
22108case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22109 yes:no: )
c0d27fcc
MR
22110 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22111echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22112 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22113echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22114 ac_header_preproc=yes
19650fd6 22115 ;;
edfaf76d 22116 no:yes:* )
c0d27fcc
MR
22117 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22118echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22119 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22120echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22121 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22122echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22123 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22124echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22125 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22126echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22127 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22128echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22129
19650fd6 22130 ;;
c0d27fcc 22131esac
ca81d7a0
JD
22132{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22133echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22134if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22135 echo $ECHO_N "(cached) $ECHO_C" >&6
22136else
edfaf76d 22137 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22138fi
ca81d7a0
JD
22139ac_res=`eval echo '${'$as_ac_Header'}'`
22140 { echo "$as_me:$LINENO: result: $ac_res" >&5
22141echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22142
22143fi
503d2be0 22144if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22145 cat >>confdefs.h <<_ACEOF
503d2be0 22146#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22147_ACEOF
503d2be0 22148
a21616bd 22149fi
c0d27fcc 22150
a21616bd
KR
22151done
22152
22153fi
22154
ba4481b5
DL
22155# Solaris requires -lintl if you want strerror (which calls dgettext)
22156# to return localized messages.
503d2be0 22157
ca81d7a0
JD
22158{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22159echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22160if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22161 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22162else
503d2be0 22163 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22164LIBS="-lintl $LIBS"
503d2be0 22165cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22166/* confdefs.h. */
22167_ACEOF
22168cat confdefs.h >>conftest.$ac_ext
22169cat >>conftest.$ac_ext <<_ACEOF
22170/* end confdefs.h. */
503d2be0 22171
ca81d7a0
JD
22172/* Override any GCC internal prototype to avoid an error.
22173 Use char because int might match the return type of a GCC
22174 builtin and then its argument prototype would still apply. */
503d2be0
AS
22175#ifdef __cplusplus
22176extern "C"
22177#endif
503d2be0
AS
22178char dgettext ();
22179int
22180main ()
22181{
ca81d7a0 22182return dgettext ();
503d2be0
AS
22183 ;
22184 return 0;
22185}
22186_ACEOF
22187rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22188if { (ac_try="$ac_link"
22189case "(($ac_try" in
22190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22191 *) ac_try_echo=$ac_try;;
22192esac
22193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22194 (eval "$ac_link") 2>conftest.er1
503d2be0 22195 ac_status=$?
edfaf76d
LK
22196 grep -v '^ *+' conftest.er1 >conftest.err
22197 rm -f conftest.er1
22198 cat conftest.err >&5
c0d27fcc 22199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22200 (exit $ac_status); } && {
22201 test -z "$ac_c_werror_flag" ||
22202 test ! -s conftest.err
22203 } && test -s conftest$ac_exeext &&
22204 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22205 ac_cv_lib_intl_dgettext=yes
22206else
22207 echo "$as_me: failed program was:" >&5
19650fd6
AS
22208sed 's/^/| /' conftest.$ac_ext >&5
22209
ca81d7a0 22210 ac_cv_lib_intl_dgettext=no
503d2be0 22211fi
ca81d7a0 22212
f053c89f 22213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22214 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22215LIBS=$ac_check_lib_save_LIBS
22216fi
ca81d7a0
JD
22217{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22218echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22219if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22220 cat >>confdefs.h <<_ACEOF
503d2be0 22221#define HAVE_LIBINTL 1
c0d27fcc 22222_ACEOF
ba4481b5
DL
22223
22224 LIBS="-lintl $LIBS"
22225
ba4481b5
DL
22226fi
22227
c0d27fcc 22228
ca81d7a0
JD
22229{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22230echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22231if test "${emacs_cv_localtime_cache+set}" = set; then
22232 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22233else
22234 if test x$ac_cv_func_tzset = xyes; then
22235if test "$cross_compiling" = yes; then
22236 # If we have tzset, assume the worst when cross-compiling.
22237emacs_cv_localtime_cache=yes
22238else
503d2be0 22239 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22240/* confdefs.h. */
22241_ACEOF
22242cat confdefs.h >>conftest.$ac_ext
22243cat >>conftest.$ac_ext <<_ACEOF
22244/* end confdefs.h. */
ba4481b5 22245#include <time.h>
ba4481b5
DL
22246extern char **environ;
22247unset_TZ ()
22248{
22249 char **from, **to;
22250 for (to = from = environ; (*to = *from); from++)
22251 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22252 to++;
22253}
22254char TZ_GMT0[] = "TZ=GMT0";
22255char TZ_PST8[] = "TZ=PST8";
22256main()
22257{
22258 time_t now = time ((time_t *) 0);
22259 int hour_GMT0, hour_unset;
22260 if (putenv (TZ_GMT0) != 0)
22261 exit (1);
22262 hour_GMT0 = localtime (&now)->tm_hour;
22263 unset_TZ ();
22264 hour_unset = localtime (&now)->tm_hour;
22265 if (putenv (TZ_PST8) != 0)
22266 exit (1);
22267 if (localtime (&now)->tm_hour == hour_GMT0)
22268 exit (1);
22269 unset_TZ ();
22270 if (localtime (&now)->tm_hour != hour_unset)
22271 exit (1);
22272 exit (0);
22273}
503d2be0
AS
22274_ACEOF
22275rm -f conftest$ac_exeext
ca81d7a0
JD
22276if { (ac_try="$ac_link"
22277case "(($ac_try" in
22278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22279 *) ac_try_echo=$ac_try;;
22280esac
22281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22282 (eval "$ac_link") 2>&5
503d2be0 22283 ac_status=$?
c0d27fcc 22284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22285 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22286 { (case "(($ac_try" in
22287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22288 *) ac_try_echo=$ac_try;;
22289esac
22290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22291 (eval "$ac_try") 2>&5
503d2be0 22292 ac_status=$?
c0d27fcc 22293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22294 (exit $ac_status); }; }; then
ba4481b5
DL
22295 emacs_cv_localtime_cache=no
22296else
503d2be0
AS
22297 echo "$as_me: program exited with status $ac_status" >&5
22298echo "$as_me: failed program was:" >&5
19650fd6
AS
22299sed 's/^/| /' conftest.$ac_ext >&5
22300
c0d27fcc 22301( exit $ac_status )
503d2be0 22302emacs_cv_localtime_cache=yes
ba4481b5 22303fi
ca81d7a0 22304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22305fi
ca81d7a0
JD
22306
22307
ba4481b5
DL
22308else
22309 # If we lack tzset, report that localtime does not cache TZ,
22310 # since we can't invalidate the cache if we don't have tzset.
22311 emacs_cv_localtime_cache=no
22312fi
22313fi
ca81d7a0
JD
22314{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22315echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22316if test $emacs_cv_localtime_cache = yes; then
b936fae4 22317
c0d27fcc 22318cat >>confdefs.h <<\_ACEOF
ba4481b5 22319#define LOCALTIME_CACHE 1
c0d27fcc 22320_ACEOF
ba4481b5
DL
22321
22322fi
22323
22324if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22325
22326for ac_func in gettimeofday
48d4b120 22327do
503d2be0 22328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22329{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22331if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22332 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22333else
503d2be0 22334 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22335/* confdefs.h. */
22336_ACEOF
22337cat confdefs.h >>conftest.$ac_ext
22338cat >>conftest.$ac_ext <<_ACEOF
22339/* end confdefs.h. */
edfaf76d
LK
22340/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22341 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22342#define $ac_func innocuous_$ac_func
22343
48d4b120 22344/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22345 which can conflict with char $ac_func (); below.
22346 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22347 <limits.h> exists even on freestanding compilers. */
edfaf76d 22348
19650fd6
AS
22349#ifdef __STDC__
22350# include <limits.h>
22351#else
22352# include <assert.h>
22353#endif
edfaf76d
LK
22354
22355#undef $ac_func
22356
ca81d7a0
JD
22357/* Override any GCC internal prototype to avoid an error.
22358 Use char because int might match the return type of a GCC
22359 builtin and then its argument prototype would still apply. */
503d2be0
AS
22360#ifdef __cplusplus
22361extern "C"
22362#endif
503d2be0 22363char $ac_func ();
48d4b120
DL
22364/* The GNU C library defines this for functions which it implements
22365 to always fail with ENOSYS. Some functions are actually named
22366 something starting with __ and the normal name is an alias. */
ca81d7a0 22367#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22368choke me
cd958eb3
MB
22369#endif
22370
19650fd6
AS
22371int
22372main ()
22373{
ca81d7a0 22374return $ac_func ();
503d2be0
AS
22375 ;
22376 return 0;
22377}
22378_ACEOF
22379rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22380if { (ac_try="$ac_link"
22381case "(($ac_try" in
22382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22383 *) ac_try_echo=$ac_try;;
22384esac
22385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22386 (eval "$ac_link") 2>conftest.er1
503d2be0 22387 ac_status=$?
edfaf76d
LK
22388 grep -v '^ *+' conftest.er1 >conftest.err
22389 rm -f conftest.er1
22390 cat conftest.err >&5
c0d27fcc 22391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22392 (exit $ac_status); } && {
22393 test -z "$ac_c_werror_flag" ||
22394 test ! -s conftest.err
22395 } && test -s conftest$ac_exeext &&
22396 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22397 eval "$as_ac_var=yes"
22398else
22399 echo "$as_me: failed program was:" >&5
19650fd6
AS
22400sed 's/^/| /' conftest.$ac_ext >&5
22401
ca81d7a0 22402 eval "$as_ac_var=no"
503d2be0 22403fi
ca81d7a0 22404
f053c89f 22405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22406 conftest$ac_exeext conftest.$ac_ext
503d2be0 22407fi
ca81d7a0
JD
22408ac_res=`eval echo '${'$as_ac_var'}'`
22409 { echo "$as_me:$LINENO: result: $ac_res" >&5
22410echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22411if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22412 cat >>confdefs.h <<_ACEOF
503d2be0 22413#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22414_ACEOF
48d4b120 22415
48d4b120
DL
22416fi
22417done
22418
b936fae4 22419 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22420 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22421echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22422if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22423 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22424else
503d2be0 22425 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22426/* confdefs.h. */
22427_ACEOF
22428cat confdefs.h >>conftest.$ac_ext
22429cat >>conftest.$ac_ext <<_ACEOF
22430/* end confdefs.h. */
ba4481b5 22431
a3f08d9e
DL
22432#ifdef TIME_WITH_SYS_TIME
22433#include <sys/time.h>
22434#include <time.h>
22435#else
22436#ifdef HAVE_SYS_TIME_H
22437#include <sys/time.h>
22438#else
22439#include <time.h>
22440#endif
22441#endif
503d2be0
AS
22442int
22443main ()
22444{
a3f08d9e 22445struct timeval time;
b936fae4 22446 gettimeofday (&time, 0);
503d2be0
AS
22447 ;
22448 return 0;
22449}
22450_ACEOF
22451rm -f conftest.$ac_objext
f053c89f
CY
22452if { (ac_try="$ac_compile"
22453case "(($ac_try" in
ca81d7a0
JD
22454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22455 *) ac_try_echo=$ac_try;;
22456esac
22457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22458 (eval "$ac_compile") 2>conftest.er1
503d2be0 22459 ac_status=$?
edfaf76d
LK
22460 grep -v '^ *+' conftest.er1 >conftest.err
22461 rm -f conftest.er1
22462 cat conftest.err >&5
c0d27fcc 22463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22464 (exit $ac_status); } && {
22465 test -z "$ac_c_werror_flag" ||
22466 test ! -s conftest.err
22467 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22468 emacs_cv_gettimeofday_two_arguments=yes
22469else
503d2be0 22470 echo "$as_me: failed program was:" >&5
19650fd6
AS
22471sed 's/^/| /' conftest.$ac_ext >&5
22472
ca81d7a0 22473 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22474fi
ca81d7a0
JD
22475
22476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22477fi
ca81d7a0
JD
22478{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22479echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22480 if test $emacs_cv_gettimeofday_two_arguments = no; then
22481
c0d27fcc 22482cat >>confdefs.h <<\_ACEOF
ba4481b5 22483#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22484_ACEOF
ba4481b5 22485
b936fae4 22486 fi
ba4481b5
DL
22487 fi
22488fi
22489
22490ok_so_far=yes
ca81d7a0
JD
22491{ echo "$as_me:$LINENO: checking for socket" >&5
22492echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22493if test "${ac_cv_func_socket+set}" = set; then
22494 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22495else
503d2be0 22496 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22497/* confdefs.h. */
22498_ACEOF
22499cat confdefs.h >>conftest.$ac_ext
22500cat >>conftest.$ac_ext <<_ACEOF
22501/* end confdefs.h. */
edfaf76d
LK
22502/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22503 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22504#define socket innocuous_socket
22505
ba4481b5 22506/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22507 which can conflict with char socket (); below.
22508 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22509 <limits.h> exists even on freestanding compilers. */
edfaf76d 22510
19650fd6
AS
22511#ifdef __STDC__
22512# include <limits.h>
22513#else
22514# include <assert.h>
22515#endif
edfaf76d
LK
22516
22517#undef socket
22518
ca81d7a0
JD
22519/* Override any GCC internal prototype to avoid an error.
22520 Use char because int might match the return type of a GCC
22521 builtin and then its argument prototype would still apply. */
503d2be0
AS
22522#ifdef __cplusplus
22523extern "C"
22524#endif
503d2be0 22525char socket ();
ba4481b5
DL
22526/* The GNU C library defines this for functions which it implements
22527 to always fail with ENOSYS. Some functions are actually named
22528 something starting with __ and the normal name is an alias. */
ca81d7a0 22529#if defined __stub_socket || defined __stub___socket
ba4481b5 22530choke me
cd958eb3
MB
22531#endif
22532
19650fd6
AS
22533int
22534main ()
22535{
ca81d7a0 22536return socket ();
503d2be0
AS
22537 ;
22538 return 0;
22539}
22540_ACEOF
22541rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22542if { (ac_try="$ac_link"
22543case "(($ac_try" in
22544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22545 *) ac_try_echo=$ac_try;;
22546esac
22547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22548 (eval "$ac_link") 2>conftest.er1
503d2be0 22549 ac_status=$?
edfaf76d
LK
22550 grep -v '^ *+' conftest.er1 >conftest.err
22551 rm -f conftest.er1
22552 cat conftest.err >&5
c0d27fcc 22553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22554 (exit $ac_status); } && {
22555 test -z "$ac_c_werror_flag" ||
22556 test ! -s conftest.err
22557 } && test -s conftest$ac_exeext &&
22558 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22559 ac_cv_func_socket=yes
22560else
22561 echo "$as_me: failed program was:" >&5
19650fd6
AS
22562sed 's/^/| /' conftest.$ac_ext >&5
22563
ca81d7a0 22564 ac_cv_func_socket=no
503d2be0 22565fi
ca81d7a0 22566
f053c89f 22567rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22568 conftest$ac_exeext conftest.$ac_ext
503d2be0 22569fi
ca81d7a0
JD
22570{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22571echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22572if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22573 :
22574else
503d2be0 22575 ok_so_far=no
ba4481b5
DL
22576fi
22577
22578if test $ok_so_far = yes; then
c0d27fcc 22579 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22580 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22581echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22582if test "${ac_cv_header_netinet_in_h+set}" = set; then
22583 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22584fi
ca81d7a0
JD
22585{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22586echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22587else
c0d27fcc 22588 # Is the header compilable?
ca81d7a0
JD
22589{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22590echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22591cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22592/* confdefs.h. */
22593_ACEOF
22594cat confdefs.h >>conftest.$ac_ext
22595cat >>conftest.$ac_ext <<_ACEOF
22596/* end confdefs.h. */
c0d27fcc
MR
22597$ac_includes_default
22598#include <netinet/in.h>
22599_ACEOF
22600rm -f conftest.$ac_objext
ca81d7a0
JD
22601if { (ac_try="$ac_compile"
22602case "(($ac_try" in
22603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22604 *) ac_try_echo=$ac_try;;
22605esac
22606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22607 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22608 ac_status=$?
edfaf76d
LK
22609 grep -v '^ *+' conftest.er1 >conftest.err
22610 rm -f conftest.er1
22611 cat conftest.err >&5
c0d27fcc 22612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22613 (exit $ac_status); } && {
22614 test -z "$ac_c_werror_flag" ||
22615 test ! -s conftest.err
22616 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22617 ac_header_compiler=yes
22618else
22619 echo "$as_me: failed program was:" >&5
19650fd6
AS
22620sed 's/^/| /' conftest.$ac_ext >&5
22621
ca81d7a0 22622 ac_header_compiler=no
c0d27fcc 22623fi
ca81d7a0
JD
22624
22625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22626{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22627echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22628
22629# Is the header present?
ca81d7a0
JD
22630{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22631echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22632cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22633/* confdefs.h. */
22634_ACEOF
22635cat confdefs.h >>conftest.$ac_ext
22636cat >>conftest.$ac_ext <<_ACEOF
22637/* end confdefs.h. */
ba4481b5 22638#include <netinet/in.h>
503d2be0 22639_ACEOF
ca81d7a0
JD
22640if { (ac_try="$ac_cpp conftest.$ac_ext"
22641case "(($ac_try" in
22642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22643 *) ac_try_echo=$ac_try;;
22644esac
22645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22646 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22647 ac_status=$?
6bae0ccf 22648 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22649 rm -f conftest.er1
22650 cat conftest.err >&5
c0d27fcc 22651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22652 (exit $ac_status); } >/dev/null && {
22653 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22654 test ! -s conftest.err
22655 }; then
c0d27fcc 22656 ac_header_preproc=yes
ba4481b5 22657else
503d2be0 22658 echo "$as_me: failed program was:" >&5
19650fd6
AS
22659sed 's/^/| /' conftest.$ac_ext >&5
22660
c0d27fcc 22661 ac_header_preproc=no
ba4481b5 22662fi
ca81d7a0 22663
503d2be0 22664rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22665{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22666echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22667
22668# So? What about this header?
edfaf76d
LK
22669case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22670 yes:no: )
c0d27fcc
MR
22671 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22672echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22673 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22674echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22675 ac_header_preproc=yes
19650fd6 22676 ;;
edfaf76d 22677 no:yes:* )
c0d27fcc
MR
22678 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22679echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22680 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22681echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22682 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22683echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22684 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22685echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22686 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22687echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22688 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22689echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22690
19650fd6 22691 ;;
c0d27fcc 22692esac
ca81d7a0
JD
22693{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22694echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22695if test "${ac_cv_header_netinet_in_h+set}" = set; then
22696 echo $ECHO_N "(cached) $ECHO_C" >&6
22697else
22698 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22699fi
ca81d7a0
JD
22700{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22701echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22702
22703fi
503d2be0 22704if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22705 :
22706else
503d2be0 22707 ok_so_far=no
ba4481b5
DL
22708fi
22709
c0d27fcc 22710
ba4481b5
DL
22711fi
22712if test $ok_so_far = yes; then
c0d27fcc 22713 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22714 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22715echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22716if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22717 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22718fi
ca81d7a0
JD
22719{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22720echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22721else
c0d27fcc 22722 # Is the header compilable?
ca81d7a0
JD
22723{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22724echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22725cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22726/* confdefs.h. */
22727_ACEOF
22728cat confdefs.h >>conftest.$ac_ext
22729cat >>conftest.$ac_ext <<_ACEOF
22730/* end confdefs.h. */
c0d27fcc
MR
22731$ac_includes_default
22732#include <arpa/inet.h>
22733_ACEOF
22734rm -f conftest.$ac_objext
ca81d7a0
JD
22735if { (ac_try="$ac_compile"
22736case "(($ac_try" in
22737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22738 *) ac_try_echo=$ac_try;;
22739esac
22740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22741 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22742 ac_status=$?
edfaf76d
LK
22743 grep -v '^ *+' conftest.er1 >conftest.err
22744 rm -f conftest.er1
22745 cat conftest.err >&5
c0d27fcc 22746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22747 (exit $ac_status); } && {
22748 test -z "$ac_c_werror_flag" ||
22749 test ! -s conftest.err
22750 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22751 ac_header_compiler=yes
22752else
22753 echo "$as_me: failed program was:" >&5
19650fd6
AS
22754sed 's/^/| /' conftest.$ac_ext >&5
22755
ca81d7a0 22756 ac_header_compiler=no
c0d27fcc 22757fi
ca81d7a0
JD
22758
22759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22760{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22761echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22762
22763# Is the header present?
ca81d7a0
JD
22764{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22765echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22766cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22767/* confdefs.h. */
22768_ACEOF
22769cat confdefs.h >>conftest.$ac_ext
22770cat >>conftest.$ac_ext <<_ACEOF
22771/* end confdefs.h. */
ba4481b5 22772#include <arpa/inet.h>
503d2be0 22773_ACEOF
ca81d7a0
JD
22774if { (ac_try="$ac_cpp conftest.$ac_ext"
22775case "(($ac_try" in
22776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22777 *) ac_try_echo=$ac_try;;
22778esac
22779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22780 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22781 ac_status=$?
6bae0ccf 22782 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22783 rm -f conftest.er1
22784 cat conftest.err >&5
c0d27fcc 22785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22786 (exit $ac_status); } >/dev/null && {
22787 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22788 test ! -s conftest.err
22789 }; then
c0d27fcc 22790 ac_header_preproc=yes
ba4481b5 22791else
503d2be0 22792 echo "$as_me: failed program was:" >&5
19650fd6
AS
22793sed 's/^/| /' conftest.$ac_ext >&5
22794
c0d27fcc 22795 ac_header_preproc=no
ba4481b5 22796fi
ca81d7a0 22797
503d2be0 22798rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22799{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22800echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22801
22802# So? What about this header?
edfaf76d
LK
22803case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22804 yes:no: )
c0d27fcc
MR
22805 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22806echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22807 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22808echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22809 ac_header_preproc=yes
19650fd6 22810 ;;
edfaf76d 22811 no:yes:* )
c0d27fcc
MR
22812 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22813echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22814 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22815echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22816 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22817echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22818 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22819echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22820 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22821echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22822 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22823echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22824
19650fd6 22825 ;;
c0d27fcc 22826esac
ca81d7a0
JD
22827{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22828echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22829if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22830 echo $ECHO_N "(cached) $ECHO_C" >&6
22831else
22832 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22833fi
ca81d7a0
JD
22834{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22835echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22836
22837fi
503d2be0 22838if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22839 :
22840else
503d2be0 22841 ok_so_far=no
ba4481b5
DL
22842fi
22843
c0d27fcc 22844
ba4481b5
DL
22845fi
22846if test $ok_so_far = yes; then
b936fae4 22847
c0d27fcc 22848cat >>confdefs.h <<\_ACEOF
ba4481b5 22849#define HAVE_INET_SOCKETS 1
c0d27fcc 22850_ACEOF
ba4481b5
DL
22851
22852fi
22853
2d2b6695 22854
7862d3a8 22855for ac_header in sys/ioctl.h
2d2b6695
KS
22856do
22857as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22858if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22859 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22860echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22861if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22862 echo $ECHO_N "(cached) $ECHO_C" >&6
22863fi
ca81d7a0
JD
22864ac_res=`eval echo '${'$as_ac_Header'}'`
22865 { echo "$as_me:$LINENO: result: $ac_res" >&5
22866echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22867else
22868 # Is the header compilable?
ca81d7a0
JD
22869{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22870echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22871cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22872/* confdefs.h. */
22873_ACEOF
22874cat confdefs.h >>conftest.$ac_ext
22875cat >>conftest.$ac_ext <<_ACEOF
22876/* end confdefs.h. */
22877$ac_includes_default
22878#include <$ac_header>
22879_ACEOF
22880rm -f conftest.$ac_objext
ca81d7a0
JD
22881if { (ac_try="$ac_compile"
22882case "(($ac_try" in
22883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22884 *) ac_try_echo=$ac_try;;
22885esac
22886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22887 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22888 ac_status=$?
edfaf76d
LK
22889 grep -v '^ *+' conftest.er1 >conftest.err
22890 rm -f conftest.er1
22891 cat conftest.err >&5
2d2b6695 22892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22893 (exit $ac_status); } && {
22894 test -z "$ac_c_werror_flag" ||
22895 test ! -s conftest.err
22896 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22897 ac_header_compiler=yes
22898else
22899 echo "$as_me: failed program was:" >&5
22900sed 's/^/| /' conftest.$ac_ext >&5
22901
ca81d7a0 22902 ac_header_compiler=no
2d2b6695 22903fi
ca81d7a0
JD
22904
22905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22906{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22907echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22908
22909# Is the header present?
ca81d7a0
JD
22910{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22911echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22912cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22913/* confdefs.h. */
22914_ACEOF
22915cat confdefs.h >>conftest.$ac_ext
22916cat >>conftest.$ac_ext <<_ACEOF
22917/* end confdefs.h. */
22918#include <$ac_header>
22919_ACEOF
ca81d7a0
JD
22920if { (ac_try="$ac_cpp conftest.$ac_ext"
22921case "(($ac_try" in
22922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22923 *) ac_try_echo=$ac_try;;
22924esac
22925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22926 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22927 ac_status=$?
22928 grep -v '^ *+' conftest.er1 >conftest.err
22929 rm -f conftest.er1
22930 cat conftest.err >&5
22931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22932 (exit $ac_status); } >/dev/null && {
22933 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22934 test ! -s conftest.err
22935 }; then
2d2b6695
KS
22936 ac_header_preproc=yes
22937else
22938 echo "$as_me: failed program was:" >&5
22939sed 's/^/| /' conftest.$ac_ext >&5
22940
22941 ac_header_preproc=no
22942fi
ca81d7a0 22943
2d2b6695 22944rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22945{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22946echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22947
22948# So? What about this header?
edfaf76d
LK
22949case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22950 yes:no: )
2d2b6695
KS
22951 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22952echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22954echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22955 ac_header_preproc=yes
2d2b6695 22956 ;;
edfaf76d 22957 no:yes:* )
2d2b6695
KS
22958 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22959echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22960 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22961echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22962 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22963echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22964 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22965echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22966 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22967echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22968 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22969echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22970
2d2b6695
KS
22971 ;;
22972esac
ca81d7a0
JD
22973{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22974echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22975if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22976 echo $ECHO_N "(cached) $ECHO_C" >&6
22977else
edfaf76d 22978 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22979fi
ca81d7a0
JD
22980ac_res=`eval echo '${'$as_ac_Header'}'`
22981 { echo "$as_me:$LINENO: result: $ac_res" >&5
22982echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22983
22984fi
22985if test `eval echo '${'$as_ac_Header'}'` = yes; then
22986 cat >>confdefs.h <<_ACEOF
22987#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22988_ACEOF
22989
22990fi
22991
22992done
22993
22994
ba4481b5 22995if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22996
c0d27fcc 22997cat >>confdefs.h <<\_ACEOF
ba4481b5 22998#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22999_ACEOF
ba4481b5
DL
23000
23001fi
23002
ca81d7a0
JD
23003{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23004echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23005if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23006 { echo "$as_me:$LINENO: result: yes" >&5
23007echo "${ECHO_T}yes" >&6; }
b936fae4 23008
c0d27fcc 23009cat >>confdefs.h <<\_ACEOF
3d9fec71 23010#define HAVE_DEV_PTMX 1
c0d27fcc 23011_ACEOF
3d9fec71
DL
23012
23013else
ca81d7a0
JD
23014 { echo "$as_me:$LINENO: result: no" >&5
23015echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23016fi
23017
ca81d7a0
JD
23018{ echo "$as_me:$LINENO: checking for pid_t" >&5
23019echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23020if test "${ac_cv_type_pid_t+set}" = set; then
23021 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23022else
503d2be0 23023 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23024/* confdefs.h. */
23025_ACEOF
23026cat confdefs.h >>conftest.$ac_ext
23027cat >>conftest.$ac_ext <<_ACEOF
23028/* end confdefs.h. */
503d2be0 23029$ac_includes_default
ca81d7a0 23030typedef pid_t ac__type_new_;
503d2be0
AS
23031int
23032main ()
23033{
ca81d7a0 23034if ((ac__type_new_ *) 0)
503d2be0 23035 return 0;
ca81d7a0 23036if (sizeof (ac__type_new_))
503d2be0
AS
23037 return 0;
23038 ;
23039 return 0;
23040}
23041_ACEOF
23042rm -f conftest.$ac_objext
ca81d7a0
JD
23043if { (ac_try="$ac_compile"
23044case "(($ac_try" in
23045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23046 *) ac_try_echo=$ac_try;;
23047esac
23048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23049 (eval "$ac_compile") 2>conftest.er1
503d2be0 23050 ac_status=$?
edfaf76d
LK
23051 grep -v '^ *+' conftest.er1 >conftest.err
23052 rm -f conftest.er1
23053 cat conftest.err >&5
c0d27fcc 23054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23055 (exit $ac_status); } && {
23056 test -z "$ac_c_werror_flag" ||
23057 test ! -s conftest.err
23058 } && test -s conftest.$ac_objext; then
647847ea
DL
23059 ac_cv_type_pid_t=yes
23060else
503d2be0 23061 echo "$as_me: failed program was:" >&5
19650fd6
AS
23062sed 's/^/| /' conftest.$ac_ext >&5
23063
ca81d7a0 23064 ac_cv_type_pid_t=no
647847ea 23065fi
ca81d7a0
JD
23066
23067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23068fi
ca81d7a0
JD
23069{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23070echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23071if test $ac_cv_type_pid_t = yes; then
23072 :
23073else
23074
c0d27fcc 23075cat >>confdefs.h <<_ACEOF
647847ea 23076#define pid_t int
c0d27fcc 23077_ACEOF
647847ea
DL
23078
23079fi
23080
c0d27fcc 23081
ca81d7a0 23082for ac_header in vfork.h
503d2be0
AS
23083do
23084as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23085if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23086 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23087echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23088if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23089 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23090fi
ca81d7a0
JD
23091ac_res=`eval echo '${'$as_ac_Header'}'`
23092 { echo "$as_me:$LINENO: result: $ac_res" >&5
23093echo "${ECHO_T}$ac_res" >&6; }
98418dba 23094else
c0d27fcc 23095 # Is the header compilable?
ca81d7a0
JD
23096{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23097echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23098cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23099/* confdefs.h. */
23100_ACEOF
23101cat confdefs.h >>conftest.$ac_ext
23102cat >>conftest.$ac_ext <<_ACEOF
23103/* end confdefs.h. */
c0d27fcc
MR
23104$ac_includes_default
23105#include <$ac_header>
23106_ACEOF
23107rm -f conftest.$ac_objext
ca81d7a0
JD
23108if { (ac_try="$ac_compile"
23109case "(($ac_try" in
23110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23111 *) ac_try_echo=$ac_try;;
23112esac
23113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23114 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23115 ac_status=$?
edfaf76d
LK
23116 grep -v '^ *+' conftest.er1 >conftest.err
23117 rm -f conftest.er1
23118 cat conftest.err >&5
c0d27fcc 23119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23120 (exit $ac_status); } && {
23121 test -z "$ac_c_werror_flag" ||
23122 test ! -s conftest.err
23123 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23124 ac_header_compiler=yes
23125else
23126 echo "$as_me: failed program was:" >&5
19650fd6
AS
23127sed 's/^/| /' conftest.$ac_ext >&5
23128
ca81d7a0 23129 ac_header_compiler=no
c0d27fcc 23130fi
ca81d7a0
JD
23131
23132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23133{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23134echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23135
23136# Is the header present?
ca81d7a0
JD
23137{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23138echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23139cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23140/* confdefs.h. */
23141_ACEOF
23142cat confdefs.h >>conftest.$ac_ext
23143cat >>conftest.$ac_ext <<_ACEOF
23144/* end confdefs.h. */
503d2be0
AS
23145#include <$ac_header>
23146_ACEOF
ca81d7a0
JD
23147if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23154 ac_status=$?
6bae0ccf 23155 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23156 rm -f conftest.er1
23157 cat conftest.err >&5
c0d27fcc 23158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23159 (exit $ac_status); } >/dev/null && {
23160 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23161 test ! -s conftest.err
23162 }; then
c0d27fcc 23163 ac_header_preproc=yes
647847ea 23164else
503d2be0 23165 echo "$as_me: failed program was:" >&5
19650fd6
AS
23166sed 's/^/| /' conftest.$ac_ext >&5
23167
c0d27fcc 23168 ac_header_preproc=no
647847ea 23169fi
ca81d7a0 23170
503d2be0 23171rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23172{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23173echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23174
23175# So? What about this header?
edfaf76d
LK
23176case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23177 yes:no: )
c0d27fcc
MR
23178 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23179echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23180 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23181echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23182 ac_header_preproc=yes
19650fd6 23183 ;;
edfaf76d 23184 no:yes:* )
c0d27fcc
MR
23185 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23186echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23187 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23188echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23189 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23190echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23191 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23192echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23193 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23194echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23195 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23196echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23197
19650fd6 23198 ;;
c0d27fcc 23199esac
ca81d7a0
JD
23200{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23201echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23202if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23203 echo $ECHO_N "(cached) $ECHO_C" >&6
23204else
edfaf76d 23205 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23206fi
ca81d7a0
JD
23207ac_res=`eval echo '${'$as_ac_Header'}'`
23208 { echo "$as_me:$LINENO: result: $ac_res" >&5
23209echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23210
23211fi
503d2be0 23212if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23213 cat >>confdefs.h <<_ACEOF
503d2be0 23214#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23215_ACEOF
647847ea 23216
73b77ee5 23217fi
c0d27fcc 23218
503d2be0 23219done
73b77ee5 23220
c0d27fcc
MR
23221
23222
503d2be0
AS
23223for ac_func in fork vfork
23224do
23225as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23226{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23227echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23228if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23229 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23230else
503d2be0 23231 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23232/* confdefs.h. */
23233_ACEOF
23234cat confdefs.h >>conftest.$ac_ext
23235cat >>conftest.$ac_ext <<_ACEOF
23236/* end confdefs.h. */
edfaf76d
LK
23237/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23238 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23239#define $ac_func innocuous_$ac_func
23240
fa0b693c 23241/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23242 which can conflict with char $ac_func (); below.
23243 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23244 <limits.h> exists even on freestanding compilers. */
edfaf76d 23245
19650fd6
AS
23246#ifdef __STDC__
23247# include <limits.h>
23248#else
23249# include <assert.h>
23250#endif
edfaf76d
LK
23251
23252#undef $ac_func
23253
ca81d7a0
JD
23254/* Override any GCC internal prototype to avoid an error.
23255 Use char because int might match the return type of a GCC
23256 builtin and then its argument prototype would still apply. */
503d2be0
AS
23257#ifdef __cplusplus
23258extern "C"
23259#endif
503d2be0 23260char $ac_func ();
fa0b693c
GM
23261/* The GNU C library defines this for functions which it implements
23262 to always fail with ENOSYS. Some functions are actually named
23263 something starting with __ and the normal name is an alias. */
ca81d7a0 23264#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23265choke me
fa0b693c
GM
23266#endif
23267
19650fd6
AS
23268int
23269main ()
23270{
ca81d7a0 23271return $ac_func ();
503d2be0
AS
23272 ;
23273 return 0;
23274}
23275_ACEOF
23276rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23277if { (ac_try="$ac_link"
23278case "(($ac_try" in
23279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23280 *) ac_try_echo=$ac_try;;
23281esac
23282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23283 (eval "$ac_link") 2>conftest.er1
503d2be0 23284 ac_status=$?
edfaf76d
LK
23285 grep -v '^ *+' conftest.er1 >conftest.err
23286 rm -f conftest.er1
23287 cat conftest.err >&5
c0d27fcc 23288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23289 (exit $ac_status); } && {
23290 test -z "$ac_c_werror_flag" ||
23291 test ! -s conftest.err
23292 } && test -s conftest$ac_exeext &&
23293 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23294 eval "$as_ac_var=yes"
23295else
23296 echo "$as_me: failed program was:" >&5
19650fd6
AS
23297sed 's/^/| /' conftest.$ac_ext >&5
23298
ca81d7a0 23299 eval "$as_ac_var=no"
503d2be0 23300fi
ca81d7a0 23301
f053c89f 23302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23303 conftest$ac_exeext conftest.$ac_ext
503d2be0 23304fi
ca81d7a0
JD
23305ac_res=`eval echo '${'$as_ac_var'}'`
23306 { echo "$as_me:$LINENO: result: $ac_res" >&5
23307echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23308if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23309 cat >>confdefs.h <<_ACEOF
503d2be0 23310#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23311_ACEOF
503d2be0 23312
fa0b693c 23313fi
503d2be0 23314done
fa0b693c 23315
503d2be0 23316if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23317 { echo "$as_me:$LINENO: checking for working fork" >&5
23318echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23319if test "${ac_cv_func_fork_works+set}" = set; then
23320 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23321else
503d2be0
AS
23322 if test "$cross_compiling" = yes; then
23323 ac_cv_func_fork_works=cross
23324else
23325 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23326/* confdefs.h. */
23327_ACEOF
23328cat confdefs.h >>conftest.$ac_ext
23329cat >>conftest.$ac_ext <<_ACEOF
23330/* end confdefs.h. */
23331$ac_includes_default
23332int
23333main ()
23334{
23335
23336 /* By Ruediger Kuhlmann. */
23337 return fork () < 0;
23338
23339 ;
23340 return 0;
23341}
503d2be0
AS
23342_ACEOF
23343rm -f conftest$ac_exeext
ca81d7a0
JD
23344if { (ac_try="$ac_link"
23345case "(($ac_try" in
23346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23347 *) ac_try_echo=$ac_try;;
23348esac
23349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23350 (eval "$ac_link") 2>&5
503d2be0 23351 ac_status=$?
c0d27fcc 23352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23354 { (case "(($ac_try" in
23355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23356 *) ac_try_echo=$ac_try;;
23357esac
23358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23359 (eval "$ac_try") 2>&5
503d2be0 23360 ac_status=$?
c0d27fcc 23361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23362 (exit $ac_status); }; }; then
23363 ac_cv_func_fork_works=yes
23364else
23365 echo "$as_me: program exited with status $ac_status" >&5
23366echo "$as_me: failed program was:" >&5
19650fd6
AS
23367sed 's/^/| /' conftest.$ac_ext >&5
23368
c0d27fcc 23369( exit $ac_status )
503d2be0
AS
23370ac_cv_func_fork_works=no
23371fi
ca81d7a0 23372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23373fi
ca81d7a0
JD
23374
23375
503d2be0 23376fi
ca81d7a0
JD
23377{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23378echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23379
6bae0ccf
DL
23380else
23381 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23382fi
23383if test "x$ac_cv_func_fork_works" = xcross; then
23384 case $host in
23385 *-*-amigaos* | *-*-msdosdjgpp*)
23386 # Override, as these systems have only a dummy fork() stub
23387 ac_cv_func_fork_works=no
23388 ;;
23389 *)
23390 ac_cv_func_fork_works=yes
23391 ;;
23392 esac
c0d27fcc
MR
23393 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23394echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23395fi
73b77ee5 23396ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23397if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23398 { echo "$as_me:$LINENO: checking for working vfork" >&5
23399echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23400if test "${ac_cv_func_vfork_works+set}" = set; then
23401 echo $ECHO_N "(cached) $ECHO_C" >&6
23402else
23403 if test "$cross_compiling" = yes; then
23404 ac_cv_func_vfork_works=cross
fa0b693c 23405else
503d2be0 23406 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23407/* confdefs.h. */
23408_ACEOF
23409cat confdefs.h >>conftest.$ac_ext
23410cat >>conftest.$ac_ext <<_ACEOF
23411/* end confdefs.h. */
73b77ee5 23412/* Thanks to Paul Eggert for this test. */
ca81d7a0 23413$ac_includes_default
19650fd6 23414#include <sys/wait.h>
f053c89f 23415#ifdef HAVE_VFORK_H
503d2be0 23416# include <vfork.h>
73b77ee5
GM
23417#endif
23418/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23419 argument registers are propagated back to the parent. The compiler
23420 is told about this with #include <vfork.h>, but some compilers
23421 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23422 static variable whose address is put into a register that is
23423 clobbered by the vfork. */
19650fd6 23424static void
fa0b693c 23425#ifdef __cplusplus
73b77ee5 23426sparc_address_test (int arg)
503d2be0 23427# else
73b77ee5 23428sparc_address_test (arg) int arg;
fa0b693c 23429#endif
fa0b693c 23430{
73b77ee5
GM
23431 static pid_t child;
23432 if (!child) {
23433 child = vfork ();
23434 if (child < 0) {
23435 perror ("vfork");
23436 _exit(2);
23437 }
23438 if (!child) {
23439 arg = getpid();
23440 write(-1, "", 0);
23441 _exit (arg);
23442 }
23443 }
23444}
503d2be0
AS
23445
23446int
23447main ()
23448{
73b77ee5
GM
23449 pid_t parent = getpid ();
23450 pid_t child;
fa0b693c 23451
19650fd6 23452 sparc_address_test (0);
fa0b693c 23453
73b77ee5 23454 child = vfork ();
fa0b693c 23455
73b77ee5 23456 if (child == 0) {
503d2be0
AS
23457 /* Here is another test for sparc vfork register problems. This
23458 test uses lots of local variables, at least as many local
23459 variables as main has allocated so far including compiler
23460 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23461 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23462 reuse the register of parent for one of the local variables,
23463 since it will think that parent can't possibly be used any more
23464 in this routine. Assigning to the local variable will thus
23465 munge parent in the parent process. */
73b77ee5
GM
23466 pid_t
23467 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23468 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23469 /* Convince the compiler that p..p7 are live; otherwise, it might
23470 use the same hardware register for all 8 local variables. */
23471 if (p != p1 || p != p2 || p != p3 || p != p4
23472 || p != p5 || p != p6 || p != p7)
23473 _exit(1);
fa0b693c 23474
503d2be0
AS
23475 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23476 from child file descriptors. If the child closes a descriptor
23477 before it execs or exits, this munges the parent's descriptor
23478 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23479 _exit(close(fileno(stdout)) != 0);
23480 } else {
23481 int status;
23482 struct stat st;
23483
23484 while (wait(&status) != child)
23485 ;
ca81d7a0 23486 return (
73b77ee5
GM
23487 /* Was there some problem with vforking? */
23488 child < 0
23489
23490 /* Did the child fail? (This shouldn't happen.) */
23491 || status
23492
23493 /* Did the vfork/compiler bug occur? */
23494 || parent != getpid()
fa0b693c 23495
73b77ee5
GM
23496 /* Did the file descriptor bug occur? */
23497 || fstat(fileno(stdout), &st) != 0
23498 );
23499 }
23500}
503d2be0
AS
23501_ACEOF
23502rm -f conftest$ac_exeext
ca81d7a0
JD
23503if { (ac_try="$ac_link"
23504case "(($ac_try" in
23505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23506 *) ac_try_echo=$ac_try;;
23507esac
23508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23509 (eval "$ac_link") 2>&5
503d2be0 23510 ac_status=$?
c0d27fcc 23511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23513 { (case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
23517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23518 (eval "$ac_try") 2>&5
503d2be0 23519 ac_status=$?
c0d27fcc 23520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23521 (exit $ac_status); }; }; then
73b77ee5 23522 ac_cv_func_vfork_works=yes
fa0b693c 23523else
503d2be0
AS
23524 echo "$as_me: program exited with status $ac_status" >&5
23525echo "$as_me: failed program was:" >&5
19650fd6
AS
23526sed 's/^/| /' conftest.$ac_ext >&5
23527
c0d27fcc 23528( exit $ac_status )
503d2be0
AS
23529ac_cv_func_vfork_works=no
23530fi
ca81d7a0 23531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23532fi
ca81d7a0
JD
23533
23534
fa0b693c 23535fi
ca81d7a0
JD
23536{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23537echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23538
503d2be0
AS
23539fi;
23540if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23541 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23542 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23543echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23544fi
23545
503d2be0
AS
23546if test "x$ac_cv_func_vfork_works" = xyes; then
23547
c0d27fcc 23548cat >>confdefs.h <<\_ACEOF
503d2be0 23549#define HAVE_WORKING_VFORK 1
c0d27fcc 23550_ACEOF
503d2be0
AS
23551
23552else
23553
c0d27fcc 23554cat >>confdefs.h <<\_ACEOF
73b77ee5 23555#define vfork fork
c0d27fcc 23556_ACEOF
fa0b693c
GM
23557
23558fi
503d2be0
AS
23559if test "x$ac_cv_func_fork_works" = xyes; then
23560
c0d27fcc 23561cat >>confdefs.h <<\_ACEOF
503d2be0 23562#define HAVE_WORKING_FORK 1
c0d27fcc 23563_ACEOF
fa0b693c 23564
503d2be0 23565fi
647847ea 23566
c0d27fcc 23567
ca81d7a0
JD
23568{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23569echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23570if test "${emacs_cv_langinfo_codeset+set}" = set; then
23571 echo $ECHO_N "(cached) $ECHO_C" >&6
23572else
23573 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23574/* confdefs.h. */
23575_ACEOF
23576cat confdefs.h >>conftest.$ac_ext
23577cat >>conftest.$ac_ext <<_ACEOF
23578/* end confdefs.h. */
6a3a24fa
JD
23579#include <langinfo.h>
23580int
23581main ()
23582{
23583char* cs = nl_langinfo(CODESET);
23584 ;
23585 return 0;
23586}
23587_ACEOF
23588rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23589if { (ac_try="$ac_link"
23590case "(($ac_try" in
23591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23592 *) ac_try_echo=$ac_try;;
23593esac
23594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23595 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23596 ac_status=$?
edfaf76d
LK
23597 grep -v '^ *+' conftest.er1 >conftest.err
23598 rm -f conftest.er1
23599 cat conftest.err >&5
6a3a24fa 23600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23601 (exit $ac_status); } && {
23602 test -z "$ac_c_werror_flag" ||
23603 test ! -s conftest.err
23604 } && test -s conftest$ac_exeext &&
23605 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23606 emacs_cv_langinfo_codeset=yes
23607else
23608 echo "$as_me: failed program was:" >&5
19650fd6
AS
23609sed 's/^/| /' conftest.$ac_ext >&5
23610
ca81d7a0 23611 emacs_cv_langinfo_codeset=no
6a3a24fa 23612fi
ca81d7a0 23613
f053c89f 23614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23615 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23616
23617fi
ca81d7a0
JD
23618{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23619echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23620if test $emacs_cv_langinfo_codeset = yes; then
23621
23622cat >>confdefs.h <<\_ACEOF
23623#define HAVE_LANGINFO_CODESET 1
23624_ACEOF
23625
23626fi
23627
ca81d7a0
JD
23628{ echo "$as_me:$LINENO: checking for size_t" >&5
23629echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23630if test "${ac_cv_type_size_t+set}" = set; then
23631 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23632else
503d2be0 23633 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23634/* confdefs.h. */
23635_ACEOF
23636cat confdefs.h >>conftest.$ac_ext
23637cat >>conftest.$ac_ext <<_ACEOF
23638/* end confdefs.h. */
503d2be0 23639$ac_includes_default
ca81d7a0 23640typedef size_t ac__type_new_;
503d2be0
AS
23641int
23642main ()
23643{
ca81d7a0 23644if ((ac__type_new_ *) 0)
503d2be0 23645 return 0;
ca81d7a0 23646if (sizeof (ac__type_new_))
503d2be0
AS
23647 return 0;
23648 ;
23649 return 0;
23650}
23651_ACEOF
23652rm -f conftest.$ac_objext
ca81d7a0
JD
23653if { (ac_try="$ac_compile"
23654case "(($ac_try" in
23655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23656 *) ac_try_echo=$ac_try;;
23657esac
23658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23659 (eval "$ac_compile") 2>conftest.er1
503d2be0 23660 ac_status=$?
edfaf76d
LK
23661 grep -v '^ *+' conftest.er1 >conftest.err
23662 rm -f conftest.er1
23663 cat conftest.err >&5
c0d27fcc 23664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23665 (exit $ac_status); } && {
23666 test -z "$ac_c_werror_flag" ||
23667 test ! -s conftest.err
23668 } && test -s conftest.$ac_objext; then
8730a8da
DL
23669 ac_cv_type_size_t=yes
23670else
503d2be0 23671 echo "$as_me: failed program was:" >&5
19650fd6
AS
23672sed 's/^/| /' conftest.$ac_ext >&5
23673
ca81d7a0 23674 ac_cv_type_size_t=no
8730a8da 23675fi
ca81d7a0
JD
23676
23677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23678fi
ca81d7a0
JD
23679{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23680echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23681if test $ac_cv_type_size_t = yes; then
503d2be0 23682
c0d27fcc
MR
23683cat >>confdefs.h <<_ACEOF
23684#define HAVE_SIZE_T 1
23685_ACEOF
23686
8730a8da
DL
23687
23688fi
23689
c0d27fcc 23690
ca81d7a0
JD
23691{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23692echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23693if test "${ac_cv_type_mbstate_t+set}" = set; then
23694 echo $ECHO_N "(cached) $ECHO_C" >&6
23695else
23696 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23697/* confdefs.h. */
23698_ACEOF
23699cat confdefs.h >>conftest.$ac_ext
23700cat >>conftest.$ac_ext <<_ACEOF
23701/* end confdefs.h. */
973a76b1
DL
23702$ac_includes_default
23703# include <wchar.h>
23704int
23705main ()
23706{
23707mbstate_t x; return sizeof x;
23708 ;
23709 return 0;
23710}
23711_ACEOF
23712rm -f conftest.$ac_objext
ca81d7a0
JD
23713if { (ac_try="$ac_compile"
23714case "(($ac_try" in
23715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23716 *) ac_try_echo=$ac_try;;
23717esac
23718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23719 (eval "$ac_compile") 2>conftest.er1
973a76b1 23720 ac_status=$?
edfaf76d
LK
23721 grep -v '^ *+' conftest.er1 >conftest.err
23722 rm -f conftest.er1
23723 cat conftest.err >&5
973a76b1 23724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23725 (exit $ac_status); } && {
23726 test -z "$ac_c_werror_flag" ||
23727 test ! -s conftest.err
23728 } && test -s conftest.$ac_objext; then
973a76b1
DL
23729 ac_cv_type_mbstate_t=yes
23730else
23731 echo "$as_me: failed program was:" >&5
19650fd6
AS
23732sed 's/^/| /' conftest.$ac_ext >&5
23733
ca81d7a0 23734 ac_cv_type_mbstate_t=no
973a76b1 23735fi
ca81d7a0
JD
23736
23737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23738fi
ca81d7a0
JD
23739{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23740echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23741 if test $ac_cv_type_mbstate_t = yes; then
23742
23743cat >>confdefs.h <<\_ACEOF
23744#define HAVE_MBSTATE_T 1
23745_ACEOF
23746
23747 else
23748
23749cat >>confdefs.h <<\_ACEOF
23750#define mbstate_t int
23751_ACEOF
23752
23753 fi
23754
ca81d7a0
JD
23755{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23756echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23757if test "${emacs_cv_c_restrict+set}" = set; then
23758 echo $ECHO_N "(cached) $ECHO_C" >&6
23759else
23760 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23761/* confdefs.h. */
23762_ACEOF
23763cat confdefs.h >>conftest.$ac_ext
23764cat >>conftest.$ac_ext <<_ACEOF
23765/* end confdefs.h. */
22044edf
DL
23766void fred (int *restrict x);
23767int
23768main ()
23769{
b936fae4 23770
22044edf
DL
23771 ;
23772 return 0;
23773}
c0d27fcc 23774_ACEOF
22044edf 23775rm -f conftest.$ac_objext
ca81d7a0
JD
23776if { (ac_try="$ac_compile"
23777case "(($ac_try" in
23778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23779 *) ac_try_echo=$ac_try;;
23780esac
23781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23782 (eval "$ac_compile") 2>conftest.er1
22044edf 23783 ac_status=$?
edfaf76d
LK
23784 grep -v '^ *+' conftest.er1 >conftest.err
23785 rm -f conftest.er1
23786 cat conftest.err >&5
22044edf 23787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23788 (exit $ac_status); } && {
23789 test -z "$ac_c_werror_flag" ||
23790 test ! -s conftest.err
23791 } && test -s conftest.$ac_objext; then
22044edf
DL
23792 emacs_cv_c_restrict=yes
23793else
23794 echo "$as_me: failed program was:" >&5
19650fd6
AS
23795sed 's/^/| /' conftest.$ac_ext >&5
23796
ca81d7a0 23797 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23798/* confdefs.h. */
23799_ACEOF
23800cat confdefs.h >>conftest.$ac_ext
23801cat >>conftest.$ac_ext <<_ACEOF
23802/* end confdefs.h. */
22044edf
DL
23803void fred (int *__restrict x);
23804int
23805main ()
23806{
c0d27fcc 23807
22044edf
DL
23808 ;
23809 return 0;
23810}
c0d27fcc 23811_ACEOF
22044edf 23812rm -f conftest.$ac_objext
ca81d7a0
JD
23813if { (ac_try="$ac_compile"
23814case "(($ac_try" in
23815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23816 *) ac_try_echo=$ac_try;;
23817esac
23818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23819 (eval "$ac_compile") 2>conftest.er1
22044edf 23820 ac_status=$?
edfaf76d
LK
23821 grep -v '^ *+' conftest.er1 >conftest.err
23822 rm -f conftest.er1
23823 cat conftest.err >&5
22044edf 23824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23825 (exit $ac_status); } && {
23826 test -z "$ac_c_werror_flag" ||
23827 test ! -s conftest.err
23828 } && test -s conftest.$ac_objext; then
22044edf
DL
23829 emacs_cv_c_restrict=__restrict
23830else
23831 echo "$as_me: failed program was:" >&5
19650fd6
AS
23832sed 's/^/| /' conftest.$ac_ext >&5
23833
ca81d7a0 23834 emacs_cv_c_restrict=no
ba4481b5 23835fi
ca81d7a0
JD
23836
23837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23838fi
ca81d7a0
JD
23839
23840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23841fi
ca81d7a0
JD
23842{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23843echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23844case "$emacs_cv_c_restrict" in
23845 yes) emacs_restrict=restrict;;
23846 no) emacs_restrict="";;
23847 *) emacs_restrict="$emacs_cv_c_restrict";;
23848esac
23849if test "$emacs_restrict" != __restrict; then
b936fae4 23850
22044edf
DL
23851cat >>confdefs.h <<_ACEOF
23852#define __restrict $emacs_restrict
c0d27fcc 23853_ACEOF
ba4481b5
DL
23854
23855fi
ba4481b5 23856
ca81d7a0
JD
23857{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23858echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23859if test "${emacs_cv_c_restrict_arr+set}" = set; then
23860 echo $ECHO_N "(cached) $ECHO_C" >&6
23861else
23862 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23863/* confdefs.h. */
23864_ACEOF
23865cat confdefs.h >>conftest.$ac_ext
23866cat >>conftest.$ac_ext <<_ACEOF
23867/* end confdefs.h. */
22044edf
DL
23868void fred (int x[__restrict]);
23869int
23870main ()
23871{
b936fae4 23872
22044edf
DL
23873 ;
23874 return 0;
23875}
c0d27fcc 23876_ACEOF
22044edf 23877rm -f conftest.$ac_objext
ca81d7a0
JD
23878if { (ac_try="$ac_compile"
23879case "(($ac_try" in
23880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23881 *) ac_try_echo=$ac_try;;
23882esac
23883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23884 (eval "$ac_compile") 2>conftest.er1
22044edf 23885 ac_status=$?
edfaf76d
LK
23886 grep -v '^ *+' conftest.er1 >conftest.err
23887 rm -f conftest.er1
23888 cat conftest.err >&5
22044edf 23889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23890 (exit $ac_status); } && {
23891 test -z "$ac_c_werror_flag" ||
23892 test ! -s conftest.err
23893 } && test -s conftest.$ac_objext; then
22044edf
DL
23894 emacs_cv_c_restrict_arr=yes
23895else
23896 echo "$as_me: failed program was:" >&5
19650fd6
AS
23897sed 's/^/| /' conftest.$ac_ext >&5
23898
ca81d7a0 23899 emacs_cv_c_restrict_arr=no
ba4481b5 23900fi
ca81d7a0
JD
23901
23902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23903fi
ca81d7a0
JD
23904{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23905echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23906if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23907
c0d27fcc 23908cat >>confdefs.h <<\_ACEOF
22044edf 23909#define __restrict_arr __restrict
c0d27fcc 23910_ACEOF
ba4481b5 23911
ba4481b5
DL
23912fi
23913
c0d27fcc 23914
c0d27fcc 23915
22044edf
DL
23916# Set up the CFLAGS for real compilation, so we can substitute it.
23917CFLAGS="$REAL_CFLAGS"
23918CPPFLAGS="$REAL_CPPFLAGS"
23919
23920#### Find out which version of Emacs this is.
23921version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23922 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23923if test x"${version}" = x; then
23924 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23925echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23926 { (exit 1); exit 1; }; }
23927fi
23928
23929### Specify what sort of things we'll be editing into Makefile and config.h.
23930### Use configuration here uncanonicalized to avoid exceeding size limits.
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
6a3a24fa 23963
22044edf
DL
23964
23965
23966cat >>confdefs.h <<_ACEOF
23967#define EMACS_CONFIGURATION "${canonical}"
23968_ACEOF
23969
23970
23971cat >>confdefs.h <<_ACEOF
23972#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23973_ACEOF
23974
23975
23976cat >>confdefs.h <<_ACEOF
23977#define config_machfile "${machfile}"
23978_ACEOF
23979
23980
23981cat >>confdefs.h <<_ACEOF
23982#define config_opsysfile "${opsysfile}"
23983_ACEOF
23984
23985
23986cat >>confdefs.h <<_ACEOF
23987#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23988_ACEOF
23989
23990
23991cat >>confdefs.h <<_ACEOF
23992#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23993_ACEOF
23994
23995
23996cat >>confdefs.h <<_ACEOF
23997#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23998_ACEOF
23999
24000
24001cat >>confdefs.h <<_ACEOF
24002#define UNEXEC_SRC ${UNEXEC_SRC}
24003_ACEOF
24004
24005
24006if test "${HAVE_X_WINDOWS}" = "yes" ; then
24007
24008cat >>confdefs.h <<\_ACEOF
24009#define HAVE_X_WINDOWS 1
24010_ACEOF
24011
24012fi
24013if test "${USE_X_TOOLKIT}" != "none" ; then
24014
24015cat >>confdefs.h <<\_ACEOF
24016#define USE_X_TOOLKIT 1
24017_ACEOF
24018
39dd4d52 24019 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24020
24021cat >>confdefs.h <<\_ACEOF
24022#define USE_LUCID 1
24023_ACEOF
24024
39dd4d52 24025 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24026
24027cat >>confdefs.h <<\_ACEOF
24028#define USE_MOTIF 1
24029_ACEOF
24030
24031 fi
22044edf
DL
24032fi
24033if test "${HAVE_X11}" = "yes" ; then
24034
24035cat >>confdefs.h <<\_ACEOF
24036#define HAVE_X11 1
24037_ACEOF
24038
22044edf
DL
24039fi
24040if test "${HAVE_MENUS}" = "yes" ; then
24041
24042cat >>confdefs.h <<\_ACEOF
24043#define HAVE_MENUS 1
24044_ACEOF
24045
24046fi
24047if test "${GNU_MALLOC}" = "yes" ; then
24048
24049cat >>confdefs.h <<\_ACEOF
24050#define GNU_MALLOC 1
24051_ACEOF
24052
24053fi
24054if test "${REL_ALLOC}" = "yes" ; then
24055
24056cat >>confdefs.h <<\_ACEOF
24057#define REL_ALLOC 1
24058_ACEOF
24059
24060fi
24061
24062
24063
c0d27fcc
MR
24064
24065
5afbeb22 24066
ba4481b5 24067#### Report on what we decided to do.
488dd4c4
JD
24068#### Report GTK as a toolkit, even if it doesn't use Xt.
24069#### It makes printing result more understandable as using GTK sets
24070#### toolkit_scroll_bars to yes by default.
24071if test "${HAVE_GTK}" = "yes"; then
24072 USE_X_TOOLKIT=GTK
24073fi
24074
ba4481b5
DL
24075echo "
24076Configured for \`${canonical}'.
24077
24078 Where should the build process find the source code? ${srcdir}
24079 What operating system and machine description files should Emacs use?
24080 \`${opsysfile}' and \`${machfile}'
24081 What compiler should emacs be built with? ${CC} ${CFLAGS}
24082 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24083 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24084 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24085 What window system should Emacs use? ${window_system}
8e967cf7 24086 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24087
24088if test -n "${x_includes}"; then
24089echo " Where do we find X Windows header files? ${x_includes}"
24090else
24091echo " Where do we find X Windows header files? Standard dirs"
24092fi
24093if test -n "${x_libraries}"; then
24094echo " Where do we find X Windows libraries? ${x_libraries}"
24095else
24096echo " Where do we find X Windows libraries? Standard dirs"
24097fi
24098
24099echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24100echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24101echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24102echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24103echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24104echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24105echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24106echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24107echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27
EZ
24108
24109if test "${USE_FONT_BACKEND}" = "yes"; then
24110 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24111 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24112 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24113 echo " Does Emacs use -lxft? ${HAVE_XFT}"
24114fi
ba4481b5
DL
24115echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24116echo
24117
d0098f13
JD
24118if test $USE_XASSERTS = yes; then
24119 echo " Compiling with asserts turned on."
d0098f13 24120 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24121fi
05cf15c6 24122
ca34d75a
JD
24123echo
24124
a2d3b5bd
JD
24125if test "$USE_X_TOOLKIT" = GTK; then
24126 case "$canonical" in
24127 *cygwin*)
24128 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24129 will probably get a crash on startup. If this happens, please use another
24130 toolkit for Emacs. See etc/PROBLEMS for more information."
24131 ;;
24132 esac
24133fi
24134
05cf15c6 24135
f0e04acc
GM
24136if test "$HAVE_CARBON" = "yes"; then
24137 echo
24138 echo "Warning: The Mac Carbon port is currently unsupported and has
24139known problems. It is not recommended for use by non-developers.
24140Read the emacs-devel archives for more information."
24141 echo
24142fi
24143
131e4133
MA
24144if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24145 echo "D-Bus integration has been tested for GNU/Linux only."
24146 echo
24147fi
24148
05cf15c6 24149
ba4481b5
DL
24150# Remove any trailing slashes in these variables.
24151test "${prefix}" != NONE &&
24152 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24153test "${exec_prefix}" != NONE &&
24154 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24155
d0e9bfd2
GM
24156## Check if the C preprocessor will convert `..' to `. .'. If so, set
24157## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24158## from Makefile.c can correctly provide the arg `-traditional' to the
24159## C preprocessor.
24160
503d2be0 24161cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24162/* confdefs.h. */
24163_ACEOF
24164cat confdefs.h >>conftest.$ac_ext
24165cat >>conftest.$ac_ext <<_ACEOF
24166/* end confdefs.h. */
d0e9bfd2 24167yes..yes
503d2be0 24168_ACEOF
d0e9bfd2 24169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24170 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24171 CPP_NEED_TRADITIONAL=no
24172else
d0e9bfd2
GM
24173 CPP_NEED_TRADITIONAL=yes
24174fi
24175rm -f conftest*
24176
c0d27fcc 24177
f657c21b 24178ac_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
24179
24180ac_config_commands="$ac_config_commands default"
24181
503d2be0 24182cat >confcache <<\_ACEOF
ba4481b5
DL
24183# This file is a shell script that caches the results of configure
24184# tests run on this system so they can be shared between configure
503d2be0
AS
24185# scripts and configure runs, see configure's option --config-cache.
24186# It is not useful on other systems. If it contains results you don't
24187# want to keep, you may remove or edit it.
ba4481b5 24188#
503d2be0
AS
24189# config.status only pays attention to the cache file if you give it
24190# the --recheck option to rerun configure.
ba4481b5 24191#
6bae0ccf 24192# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24193# loading this file, other *unset* `ac_cv_foo' will be assigned the
24194# following values.
24195
24196_ACEOF
24197
ba4481b5
DL
24198# The following way of writing the cache mishandles newlines in values,
24199# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24200# So, we kill variables containing newlines.
ba4481b5
DL
24201# Ultrix sh set writes to stderr and can't be redirected directly,
24202# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24203(
24204 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24205 eval ac_val=\$$ac_var
24206 case $ac_val in #(
24207 *${as_nl}*)
24208 case $ac_var in #(
24209 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24210echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24211 esac
24212 case $ac_var in #(
24213 _ | IFS | as_nl) ;; #(
24214 *) $as_unset $ac_var ;;
24215 esac ;;
24216 esac
24217 done
24218
503d2be0 24219 (set) 2>&1 |
ca81d7a0
JD
24220 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24221 *${as_nl}ac_space=\ *)
503d2be0
AS
24222 # `set' does not quote correctly, so add quotes (double-quote
24223 # substitution turns \\\\ into \\, and sed turns \\ into \).
24224 sed -n \
edfaf76d
LK
24225 "s/'/'\\\\''/g;
24226 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24227 ;; #(
503d2be0
AS
24228 *)
24229 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24230 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24231 ;;
ca81d7a0
JD
24232 esac |
24233 sort
24234) |
503d2be0 24235 sed '
ca81d7a0 24236 /^ac_cv_env_/b end
503d2be0 24237 t clear
ca81d7a0 24238 :clear
503d2be0
AS
24239 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24240 t end
ca81d7a0
JD
24241 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24242 :end' >>confcache
24243if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24244 if test -w "$cache_file"; then
24245 test "x$cache_file" != "x/dev/null" &&
24246 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24247echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24248 cat confcache >$cache_file
ba4481b5 24249 else
ca81d7a0
JD
24250 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24251echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24252 fi
24253fi
24254rm -f confcache
24255
ba4481b5
DL
24256test "x$prefix" = xNONE && prefix=$ac_default_prefix
24257# Let make expand exec_prefix.
24258test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24259
ba4481b5
DL
24260DEFS=-DHAVE_CONFIG_H
24261
6bae0ccf
DL
24262ac_libobjs=
24263ac_ltlibobjs=
24264for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24265 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24266 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24267 ac_i=`echo "$ac_i" | sed "$ac_script"`
24268 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24269 # will be set to the directory where LIBOBJS objects are built.
24270 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24271 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24272done
24273LIBOBJS=$ac_libobjs
24274
24275LTLIBOBJS=$ac_ltlibobjs
24276
24277
c0d27fcc 24278
ba4481b5 24279: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24280ac_clean_files_save=$ac_clean_files
24281ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24282{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24283echo "$as_me: creating $CONFIG_STATUS" >&6;}
24284cat >$CONFIG_STATUS <<_ACEOF
24285#! $SHELL
c0d27fcc 24286# Generated by $as_me.
ba4481b5 24287# Run this file to recreate the current configuration.
ba4481b5 24288# Compiler output produced by configure, useful for debugging
503d2be0 24289# configure, is in config.log if it exists.
ba4481b5 24290
503d2be0 24291debug=false
19650fd6
AS
24292ac_cs_recheck=false
24293ac_cs_silent=false
503d2be0 24294SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24295_ACEOF
24296
24297cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24298## --------------------- ##
24299## M4sh Initialization. ##
24300## --------------------- ##
24301
f053c89f
CY
24302# Be more Bourne compatible
24303DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24304if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24305 emulate sh
24306 NULLCMD=:
6bae0ccf
DL
24307 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24308 # is contrary to our usage. Disable this feature.
24309 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24310 setopt NO_GLOB_SUBST
24311else
f053c89f
CY
24312 case `(set -o) 2>/dev/null` in
24313 *posix*) set -o posix ;;
24314esac
24315
503d2be0 24316fi
f053c89f
CY
24317
24318
503d2be0 24319
ca81d7a0
JD
24320
24321# PATH needs CR
24322# Avoid depending upon Character Ranges.
24323as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24324as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24325as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24326as_cr_digits='0123456789'
24327as_cr_alnum=$as_cr_Letters$as_cr_digits
24328
24329# The user is always right.
24330if test "${PATH_SEPARATOR+set}" != set; then
24331 echo "#! /bin/sh" >conf$$.sh
24332 echo "exit 0" >>conf$$.sh
24333 chmod +x conf$$.sh
24334 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24335 PATH_SEPARATOR=';'
24336 else
24337 PATH_SEPARATOR=:
24338 fi
24339 rm -f conf$$.sh
503d2be0
AS
24340fi
24341
c0d27fcc 24342# Support unset when possible.
edfaf76d 24343if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24344 as_unset=unset
24345else
24346 as_unset=false
24347fi
24348
6bae0ccf 24349
ca81d7a0
JD
24350# IFS
24351# We need space, tab and new line, in precisely that order. Quoting is
24352# there to prevent editors from complaining about space-tab.
24353# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24354# splitting by setting IFS to empty value.)
24355as_nl='
24356'
24357IFS=" "" $as_nl"
24358
24359# Find who we are. Look in the path if we contain no directory separator.
24360case $0 in
24361 *[\\/]* ) as_myself=$0 ;;
24362 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24363for as_dir in $PATH
24364do
24365 IFS=$as_save_IFS
24366 test -z "$as_dir" && as_dir=.
24367 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24368done
24369IFS=$as_save_IFS
24370
24371 ;;
24372esac
24373# We did not find ourselves, most probably we were run as `sh COMMAND'
24374# in which case we are not to be found in the path.
24375if test "x$as_myself" = x; then
24376 as_myself=$0
24377fi
24378if test ! -f "$as_myself"; then
24379 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24380 { (exit 1); exit 1; }
24381fi
24382
6bae0ccf 24383# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24384for as_var in ENV MAIL MAILPATH
24385do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24386done
6bae0ccf
DL
24387PS1='$ '
24388PS2='> '
24389PS4='+ '
24390
24391# NLS nuisances.
19650fd6
AS
24392for as_var in \
24393 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24394 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24395 LC_TELEPHONE LC_TIME
6bae0ccf 24396do
edfaf76d 24397 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24398 eval $as_var=C; export $as_var
24399 else
ca81d7a0 24400 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24401 fi
24402done
24403
24404# Required to use basename.
ca81d7a0
JD
24405if expr a : '\(a\)' >/dev/null 2>&1 &&
24406 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24407 as_expr=expr
24408else
24409 as_expr=false
24410fi
24411
ca81d7a0 24412if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24413 as_basename=basename
24414else
24415 as_basename=false
24416fi
c0d27fcc
MR
24417
24418
503d2be0 24419# Name of the executable.
ca81d7a0 24420as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24421$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24422 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24423 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24424echo X/"$0" |
ca81d7a0
JD
24425 sed '/^.*\/\([^/][^/]*\)\/*$/{
24426 s//\1/
24427 q
24428 }
24429 /^X\/\(\/\/\)$/{
24430 s//\1/
24431 q
24432 }
24433 /^X\/\(\/\).*/{
24434 s//\1/
24435 q
24436 }
24437 s/.*/./; q'`
c0d27fcc 24438
ca81d7a0
JD
24439# CDPATH.
24440$as_unset CDPATH
c0d27fcc
MR
24441
24442
c0d27fcc 24443
c0d27fcc 24444 as_lineno_1=$LINENO
c0d27fcc 24445 as_lineno_2=$LINENO
c0d27fcc 24446 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24447 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24448
24449 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24450 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24451 # line-number line after each line using $LINENO; the second 'sed'
24452 # does the real work. The second script uses 'N' to pair each
24453 # line-number line with the line containing $LINENO, and appends
24454 # trailing '-' during substitution so that $LINENO is not a special
24455 # case at line end.
c0d27fcc 24456 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24457 # scripts with optimization help from Paolo Bonzini. Blame Lee
24458 # E. McMahon (1931-1989) for sed's syntax. :-)
24459 sed -n '
24460 p
24461 /[$]LINENO/=
24462 ' <$as_myself |
c0d27fcc 24463 sed '
ca81d7a0
JD
24464 s/[$]LINENO.*/&-/
24465 t lineno
24466 b
24467 :lineno
c0d27fcc 24468 N
ca81d7a0
JD
24469 :loop
24470 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24471 t loop
ca81d7a0 24472 s/-\n.*//
c0d27fcc 24473 ' >$as_me.lineno &&
ca81d7a0
JD
24474 chmod +x "$as_me.lineno" ||
24475 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24476 { (exit 1); exit 1; }; }
24477
24478 # Don't try to exec as it changes $[0], causing all sort of problems
24479 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24480 # original and so on. Autoconf is especially sensitive to this).
24481 . "./$as_me.lineno"
c0d27fcc
MR
24482 # Exit status is that of the last command.
24483 exit
24484}
24485
24486
ca81d7a0
JD
24487if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24488 as_dirname=dirname
24489else
24490 as_dirname=false
24491fi
24492
24493ECHO_C= ECHO_N= ECHO_T=
24494case `echo -n x` in
24495-n*)
24496 case `echo 'x\c'` in
24497 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24498 *) ECHO_C='\c';;
24499 esac;;
24500*)
24501 ECHO_N='-n';;
c0d27fcc 24502esac
503d2be0 24503
ca81d7a0
JD
24504if expr a : '\(a\)' >/dev/null 2>&1 &&
24505 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24506 as_expr=expr
24507else
24508 as_expr=false
24509fi
24510
24511rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24512if test -d conf$$.dir; then
24513 rm -f conf$$.dir/conf$$.file
24514else
24515 rm -f conf$$.dir
24516 mkdir conf$$.dir
24517fi
503d2be0
AS
24518echo >conf$$.file
24519if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24520 as_ln_s='ln -s'
24521 # ... but there are two gotchas:
24522 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24523 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24524 # In both cases, we have to default to `cp -p'.
24525 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24526 as_ln_s='cp -p'
503d2be0
AS
24527elif ln conf$$.file conf$$ 2>/dev/null; then
24528 as_ln_s=ln
24529else
24530 as_ln_s='cp -p'
24531fi
ca81d7a0
JD
24532rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24533rmdir conf$$.dir 2>/dev/null
503d2be0 24534
6bae0ccf
DL
24535if mkdir -p . 2>/dev/null; then
24536 as_mkdir_p=:
24537else
edfaf76d 24538 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24539 as_mkdir_p=false
24540fi
24541
f053c89f
CY
24542if test -x / >/dev/null 2>&1; then
24543 as_test_x='test -x'
ca81d7a0 24544else
f053c89f
CY
24545 if ls -dL / >/dev/null 2>&1; then
24546 as_ls_L_option=L
24547 else
24548 as_ls_L_option=
24549 fi
24550 as_test_x='
24551 eval sh -c '\''
24552 if test -d "$1"; then
24553 test -d "$1/.";
24554 else
24555 case $1 in
24556 -*)set "./$1";;
24557 esac;
24558 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24559 ???[sx]*):;;*)false;;esac;fi
24560 '\'' sh
24561 '
ca81d7a0 24562fi
f053c89f 24563as_executable_p=$as_test_x
503d2be0 24564
c0d27fcc 24565# Sed expression to map a string onto a valid CPP name.
edfaf76d 24566as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24567
24568# Sed expression to map a string onto a valid variable name.
edfaf76d 24569as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24570
503d2be0 24571
503d2be0
AS
24572exec 6>&1
24573
ca81d7a0 24574# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24575# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24576# values after options handling.
24577ac_log="
5d374ce1 24578This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24579generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24580
24581 CONFIG_FILES = $CONFIG_FILES
24582 CONFIG_HEADERS = $CONFIG_HEADERS
24583 CONFIG_LINKS = $CONFIG_LINKS
24584 CONFIG_COMMANDS = $CONFIG_COMMANDS
24585 $ $0 $@
24586
ca81d7a0
JD
24587on `(hostname || uname -n) 2>/dev/null | sed 1q`
24588"
24589
503d2be0
AS
24590_ACEOF
24591
ca81d7a0 24592cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24593# Files that config.status was made for.
ca81d7a0
JD
24594config_files="$ac_config_files"
24595config_headers="$ac_config_headers"
24596config_commands="$ac_config_commands"
503d2be0 24597
ca81d7a0 24598_ACEOF
503d2be0 24599
c0d27fcc 24600cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24601ac_cs_usage="\
24602\`$as_me' instantiates files from templates according to the
24603current configuration.
24604
24605Usage: $0 [OPTIONS] [FILE]...
24606
24607 -h, --help print this help, then exit
f053c89f 24608 -V, --version print version number and configuration settings, then exit
19650fd6 24609 -q, --quiet do not print progress messages
503d2be0
AS
24610 -d, --debug don't remove temporary files
24611 --recheck update $as_me by reconfiguring in the same conditions
24612 --file=FILE[:TEMPLATE]
edfaf76d 24613 instantiate the configuration file FILE
503d2be0 24614 --header=FILE[:TEMPLATE]
edfaf76d 24615 instantiate the configuration header FILE
503d2be0
AS
24616
24617Configuration files:
24618$config_files
24619
24620Configuration headers:
24621$config_headers
24622
24623Configuration commands:
24624$config_commands
24625
24626Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24627
ca81d7a0 24628_ACEOF
c0d27fcc 24629cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24630ac_cs_version="\\
5d374ce1 24631emacs config.status 23.0.60
f053c89f 24632configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24633 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24634
ca81d7a0 24635Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24636This config.status script is free software; the Free Software Foundation
24637gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24638
24639ac_pwd='$ac_pwd'
24640srcdir='$srcdir'
24641INSTALL='$INSTALL'
c0d27fcc 24642_ACEOF
503d2be0 24643
c0d27fcc 24644cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24645# If no file are specified by the user, then we need to provide default
24646# value. By we need to know if files were specified by the user.
24647ac_need_defaults=:
24648while test $# != 0
ba4481b5 24649do
503d2be0
AS
24650 case $1 in
24651 --*=*)
ca81d7a0
JD
24652 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24653 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24654 ac_shift=:
24655 ;;
ca81d7a0 24656 *)
6bae0ccf
DL
24657 ac_option=$1
24658 ac_optarg=$2
24659 ac_shift=shift
503d2be0 24660 ;;
503d2be0
AS
24661 esac
24662
6bae0ccf 24663 case $ac_option in
503d2be0 24664 # Handling of the options.
19650fd6
AS
24665 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24666 ac_cs_recheck=: ;;
ca81d7a0
JD
24667 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24668 echo "$ac_cs_version"; exit ;;
24669 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24670 debug=: ;;
24671 --file | --fil | --fi | --f )
6bae0ccf
DL
24672 $ac_shift
24673 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24674 ac_need_defaults=false;;
24675 --header | --heade | --head | --hea )
6bae0ccf
DL
24676 $ac_shift
24677 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24678 ac_need_defaults=false;;
ca81d7a0
JD
24679 --he | --h)
24680 # Conflict between --help and --header
24681 { echo "$as_me: error: ambiguous option: $1
24682Try \`$0 --help' for more information." >&2
24683 { (exit 1); exit 1; }; };;
24684 --help | --hel | -h )
24685 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24686 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24687 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24688 ac_cs_silent=: ;;
503d2be0
AS
24689
24690 # This is an error.
ca81d7a0
JD
24691 -*) { echo "$as_me: error: unrecognized option: $1
24692Try \`$0 --help' for more information." >&2
503d2be0
AS
24693 { (exit 1); exit 1; }; } ;;
24694
ca81d7a0
JD
24695 *) ac_config_targets="$ac_config_targets $1"
24696 ac_need_defaults=false ;;
503d2be0 24697
ba4481b5 24698 esac
503d2be0 24699 shift
ba4481b5
DL
24700done
24701
19650fd6
AS
24702ac_configure_extra_args=
24703
24704if $ac_cs_silent; then
24705 exec 6>/dev/null
24706 ac_configure_extra_args="$ac_configure_extra_args --silent"
24707fi
24708
24709_ACEOF
24710cat >>$CONFIG_STATUS <<_ACEOF
24711if \$ac_cs_recheck; then
ca81d7a0
JD
24712 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24713 CONFIG_SHELL=$SHELL
24714 export CONFIG_SHELL
24715 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24716fi
24717
503d2be0 24718_ACEOF
ca81d7a0
JD
24719cat >>$CONFIG_STATUS <<\_ACEOF
24720exec 5>>config.log
24721{
24722 echo
24723 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24724## Running $as_me. ##
24725_ASBOX
24726 echo "$ac_log"
24727} >&5
ba4481b5 24728
ca81d7a0 24729_ACEOF
c0d27fcc 24730cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24731#
ca81d7a0 24732# INIT-COMMANDS
503d2be0 24733#
503d2be0
AS
24734GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24735
c0d27fcc
MR
24736_ACEOF
24737
c0d27fcc 24738cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24739
24740# Handling of arguments.
503d2be0
AS
24741for ac_config_target in $ac_config_targets
24742do
ca81d7a0
JD
24743 case $ac_config_target in
24744 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24745 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24746 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24747 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24748 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24749 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24750 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24751 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24752 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24753 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24754 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24755 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24756 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24757
c0d27fcc 24758 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24759echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24760 { (exit 1); exit 1; }; };;
24761 esac
ba4481b5 24762done
503d2be0 24763
ca81d7a0 24764
503d2be0
AS
24765# If the user did not use the arguments to specify the items to instantiate,
24766# then the envvar interface is used. Set only those that are not.
24767# We use the long form for the default assignment because of an extremely
24768# bizarre bug on SunOS 4.1.3.
24769if $ac_need_defaults; then
24770 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24771 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24772 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24773fi
503d2be0 24774
19650fd6 24775# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24776# simply because there is no reason against having it here, and in addition,
19650fd6 24777# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24778# Hook for its removal unless debugging.
24779# Note that there is a small window in which the directory will not be cleaned:
24780# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24781$debug ||
24782{
ca81d7a0
JD
24783 tmp=
24784 trap 'exit_status=$?
24785 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24786' 0
503d2be0
AS
24787 trap '{ (exit 1); exit 1; }' 1 2 13 15
24788}
503d2be0 24789# Create a (secure) tmp directory for tmp files.
19650fd6 24790
503d2be0 24791{
ca81d7a0 24792 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24793 test -n "$tmp" && test -d "$tmp"
24794} ||
24795{
ca81d7a0
JD
24796 tmp=./conf$$-$RANDOM
24797 (umask 077 && mkdir "$tmp")
503d2be0
AS
24798} ||
24799{
19650fd6 24800 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24801 { (exit 1); exit 1; }
24802}
24803
503d2be0 24804#
ca81d7a0 24805# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24806#
24807
24808# No need to generate the scripts if there are no CONFIG_FILES.
24809# This happens for instance when ./config.status config.h
ca81d7a0
JD
24810if test -n "$CONFIG_FILES"; then
24811
24812_ACEOF
24813
24814
24815
24816ac_delim='%!_!# '
24817for ac_last_try in false false false false false :; do
24818 cat >conf$$subs.sed <<_ACEOF
24819SHELL!$SHELL$ac_delim
24820PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24821PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24822PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24823PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24824PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24825PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24826exec_prefix!$exec_prefix$ac_delim
24827prefix!$prefix$ac_delim
24828program_transform_name!$program_transform_name$ac_delim
24829bindir!$bindir$ac_delim
24830sbindir!$sbindir$ac_delim
24831libexecdir!$libexecdir$ac_delim
24832datarootdir!$datarootdir$ac_delim
24833datadir!$datadir$ac_delim
24834sysconfdir!$sysconfdir$ac_delim
24835sharedstatedir!$sharedstatedir$ac_delim
24836localstatedir!$localstatedir$ac_delim
24837includedir!$includedir$ac_delim
24838oldincludedir!$oldincludedir$ac_delim
24839docdir!$docdir$ac_delim
24840infodir!$infodir$ac_delim
24841htmldir!$htmldir$ac_delim
24842dvidir!$dvidir$ac_delim
24843pdfdir!$pdfdir$ac_delim
24844psdir!$psdir$ac_delim
24845libdir!$libdir$ac_delim
24846localedir!$localedir$ac_delim
24847mandir!$mandir$ac_delim
24848DEFS!$DEFS$ac_delim
24849ECHO_C!$ECHO_C$ac_delim
24850ECHO_N!$ECHO_N$ac_delim
24851ECHO_T!$ECHO_T$ac_delim
24852LIBS!$LIBS$ac_delim
24853build_alias!$build_alias$ac_delim
24854host_alias!$host_alias$ac_delim
24855target_alias!$target_alias$ac_delim
24856MAINT!$MAINT$ac_delim
24857build!$build$ac_delim
24858build_cpu!$build_cpu$ac_delim
24859build_vendor!$build_vendor$ac_delim
24860build_os!$build_os$ac_delim
24861host!$host$ac_delim
24862host_cpu!$host_cpu$ac_delim
24863host_vendor!$host_vendor$ac_delim
24864host_os!$host_os$ac_delim
24865CC!$CC$ac_delim
24866CFLAGS!$CFLAGS$ac_delim
24867LDFLAGS!$LDFLAGS$ac_delim
24868CPPFLAGS!$CPPFLAGS$ac_delim
24869ac_ct_CC!$ac_ct_CC$ac_delim
24870EXEEXT!$EXEEXT$ac_delim
24871OBJEXT!$OBJEXT$ac_delim
24872CPP!$CPP$ac_delim
24873GREP!$GREP$ac_delim
24874EGREP!$EGREP$ac_delim
24875LN_S!$LN_S$ac_delim
24876INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24877INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24878INSTALL_DATA!$INSTALL_DATA$ac_delim
24879RANLIB!$RANLIB$ac_delim
24880INSTALL_INFO!$INSTALL_INFO$ac_delim
24881GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 24882MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
24883LIBSOUND!$LIBSOUND$ac_delim
24884PKG_CONFIG!$PKG_CONFIG$ac_delim
24885ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24886ALSA_LIBS!$ALSA_LIBS$ac_delim
24887CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24888SET_MAKE!$SET_MAKE$ac_delim
24889XMKMF!$XMKMF$ac_delim
cfe440b8 24890HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
24891RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
24892RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
24893GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24894GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
24895DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
24896DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
24897XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24898XFT_LIBS!$XFT_LIBS$ac_delim
24899FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
24900FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
24901FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
24902FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
24903LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
24904LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
24905M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
24906M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
24907ALLOCA!$ALLOCA$ac_delim
24908liblockfile!$liblockfile$ac_delim
24909LIBOBJS!$LIBOBJS$ac_delim
24910NEED_SETGID!$NEED_SETGID$ac_delim
24911KMEM_GROUP!$KMEM_GROUP$ac_delim
24912GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24913GETOPT_H!$GETOPT_H$ac_delim
24914GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 24915version!$version$ac_delim
ca81d7a0
JD
24916_ACEOF
24917
24918 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24919 break
24920 elif $ac_last_try; then
24921 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24922echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24923 { (exit 1); exit 1; }; }
24924 else
24925 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 24926 fi
ca81d7a0
JD
24927done
24928
24929ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24930if test -n "$ac_eof"; then
24931 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24932 ac_eof=`expr $ac_eof + 1`
24933fi
503d2be0 24934
c0d27fcc 24935cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
24936cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24937/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24938_ACEOF
24939sed '
24940s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24941s/^/s,@/; s/!/@,|#_!!_#|/
24942:n
24943t n
24944s/'"$ac_delim"'$/,g/; t
24945s/$/\\/; p
24946N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24947' >>$CONFIG_STATUS <conf$$subs.sed
24948rm -f conf$$subs.sed
24949cat >>$CONFIG_STATUS <<_ACEOF
24950CEOF$ac_eof
24951_ACEOF
503d2be0 24952
ca81d7a0
JD
24953
24954ac_delim='%!_!# '
24955for ac_last_try in false false false false false :; do
24956 cat >conf$$subs.sed <<_ACEOF
0bd50841 24957configuration!$configuration$ac_delim
7f0942ba
KH
24958canonical!$canonical$ac_delim
24959srcdir!$srcdir$ac_delim
1bb9a689
MB
24960lispdir!$lispdir$ac_delim
24961locallisppath!$locallisppath$ac_delim
24962lisppath!$lisppath$ac_delim
9bdeb5e9
MB
24963x_default_search_path!$x_default_search_path$ac_delim
24964etcdir!$etcdir$ac_delim
24965archlibdir!$archlibdir$ac_delim
24966bitmapdir!$bitmapdir$ac_delim
24967gamedir!$gamedir$ac_delim
24968gameuser!$gameuser$ac_delim
24969c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
24970c_switch_machine!$c_switch_machine$ac_delim
24971LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24972LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
24973C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24974X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24975machfile!$machfile$ac_delim
24976opsysfile!$opsysfile$ac_delim
24977carbon_appdir!$carbon_appdir$ac_delim
24978LTLIBOBJS!$LTLIBOBJS$ac_delim
24979_ACEOF
503d2be0 24980
e70b2110 24981 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
c24fa7dc
MB
24982 break
24983 elif $ac_last_try; then
24984 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24985echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24986 { (exit 1); exit 1; }; }
24987 else
24988 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 24989 fi
ca81d7a0
JD
24990done
24991
24992ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24993if test -n "$ac_eof"; then
24994 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24995 ac_eof=`expr $ac_eof + 1`
24996fi
ba4481b5 24997
ca81d7a0
JD
24998cat >>$CONFIG_STATUS <<_ACEOF
24999cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25000/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25001_ACEOF
25002sed '
25003s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25004s/^/s,@/; s/!/@,|#_!!_#|/
25005:n
25006t n
25007s/'"$ac_delim"'$/,g/; t
25008s/$/\\/; p
25009N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25010' >>$CONFIG_STATUS <conf$$subs.sed
25011rm -f conf$$subs.sed
25012cat >>$CONFIG_STATUS <<_ACEOF
25013:end
25014s/|#_!!_#|//g
25015CEOF$ac_eof
c0d27fcc 25016_ACEOF
ca81d7a0
JD
25017
25018
25019# VPATH may cause trouble with some makes, so we remove $(srcdir),
25020# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25021# trailing colons and then remove the whole line if VPATH becomes empty
25022# (actually we leave an empty line to preserve line numbers).
25023if test "x$srcdir" = x.; then
25024 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25025s/:*\$(srcdir):*/:/
25026s/:*\${srcdir}:*/:/
25027s/:*@srcdir@:*/:/
25028s/^\([^=]*=[ ]*\):*/\1/
25029s/:*$//
25030s/^[^=]*=[ ]*$//
25031}'
25032fi
25033
c0d27fcc 25034cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25035fi # test -n "$CONFIG_FILES"
25036
25037
25038for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25039do
25040 case $ac_tag in
25041 :[FHLC]) ac_mode=$ac_tag; continue;;
25042 esac
25043 case $ac_mode$ac_tag in
25044 :[FHL]*:*);;
25045 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25046echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25047 { (exit 1); exit 1; }; };;
25048 :[FH]-) ac_tag=-:-;;
25049 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25050 esac
25051 ac_save_IFS=$IFS
25052 IFS=:
25053 set x $ac_tag
25054 IFS=$ac_save_IFS
25055 shift
25056 ac_file=$1
25057 shift
25058
25059 case $ac_mode in
25060 :L) ac_source=$1;;
25061 :[FH])
25062 ac_file_inputs=
25063 for ac_f
25064 do
25065 case $ac_f in
25066 -) ac_f="$tmp/stdin";;
25067 *) # Look for the file first in the build tree, then in the source tree
25068 # (if the path is not absolute). The absolute path cannot be DOS-style,
25069 # because $ac_f cannot contain `:'.
25070 test -f "$ac_f" ||
25071 case $ac_f in
25072 [\\/$]*) false;;
25073 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25074 esac ||
25075 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25076echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25077 { (exit 1); exit 1; }; };;
25078 esac
25079 ac_file_inputs="$ac_file_inputs $ac_f"
25080 done
25081
25082 # Let's still pretend it is `configure' which instantiates (i.e., don't
25083 # use $as_me), people would be surprised to read:
25084 # /* config.h. Generated by config.status. */
25085 configure_input="Generated from "`IFS=:
25086 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25087 if test x"$ac_file" != x-; then
25088 configure_input="$ac_file. $configure_input"
25089 { echo "$as_me:$LINENO: creating $ac_file" >&5
25090echo "$as_me: creating $ac_file" >&6;}
25091 fi
25092
25093 case $ac_tag in
25094 *:-:* | *:-) cat >"$tmp/stdin";;
25095 esac
25096 ;;
ba4481b5
DL
25097 esac
25098
ca81d7a0 25099 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25100$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25101 X"$ac_file" : 'X\(//\)[^/]' \| \
25102 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25103 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25104echo X"$ac_file" |
ca81d7a0
JD
25105 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25106 s//\1/
25107 q
25108 }
25109 /^X\(\/\/\)[^/].*/{
25110 s//\1/
25111 q
25112 }
25113 /^X\(\/\/\)$/{
25114 s//\1/
25115 q
25116 }
25117 /^X\(\/\).*/{
25118 s//\1/
25119 q
25120 }
25121 s/.*/./; q'`
25122 { as_dir="$ac_dir"
25123 case $as_dir in #(
25124 -*) as_dir=./$as_dir;;
25125 esac
25126 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25127 as_dirs=
ca81d7a0
JD
25128 while :; do
25129 case $as_dir in #(
25130 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25131 *) as_qdir=$as_dir;;
25132 esac
25133 as_dirs="'$as_qdir' $as_dirs"
25134 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25135$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25136 X"$as_dir" : 'X\(//\)[^/]' \| \
25137 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25138 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25139echo X"$as_dir" |
ca81d7a0
JD
25140 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25141 s//\1/
25142 q
25143 }
25144 /^X\(\/\/\)[^/].*/{
25145 s//\1/
25146 q
25147 }
25148 /^X\(\/\/\)$/{
25149 s//\1/
25150 q
25151 }
25152 /^X\(\/\).*/{
25153 s//\1/
25154 q
25155 }
25156 s/.*/./; q'`
25157 test -d "$as_dir" && break
6bae0ccf 25158 done
ca81d7a0
JD
25159 test -z "$as_dirs" || eval "mkdir $as_dirs"
25160 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25161echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25162 { (exit 1); exit 1; }; }; }
c0d27fcc 25163 ac_builddir=.
98418dba 25164
ca81d7a0
JD
25165case "$ac_dir" in
25166.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25167*)
c0d27fcc 25168 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25169 # A ".." for each directory in $ac_dir_suffix.
25170 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25171 case $ac_top_builddir_sub in
25172 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25173 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25174 esac ;;
25175esac
25176ac_abs_top_builddir=$ac_pwd
25177ac_abs_builddir=$ac_pwd$ac_dir_suffix
25178# for backward compatibility:
25179ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25180
25181case $srcdir in
ca81d7a0 25182 .) # We are building in place.
c0d27fcc 25183 ac_srcdir=.
ca81d7a0
JD
25184 ac_top_srcdir=$ac_top_builddir_sub
25185 ac_abs_top_srcdir=$ac_pwd ;;
25186 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25187 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25188 ac_top_srcdir=$srcdir
25189 ac_abs_top_srcdir=$srcdir ;;
25190 *) # Relative name.
25191 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25192 ac_top_srcdir=$ac_top_build_prefix$srcdir
25193 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25194esac
ca81d7a0 25195ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25196
c0d27fcc 25197
ca81d7a0
JD
25198 case $ac_mode in
25199 :F)
25200 #
25201 # CONFIG_FILE
25202 #
ba4481b5 25203
503d2be0
AS
25204 case $INSTALL in
25205 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25206 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25207 esac
ca81d7a0 25208_ACEOF
ba4481b5 25209
ca81d7a0
JD
25210cat >>$CONFIG_STATUS <<\_ACEOF
25211# If the template does not know about datarootdir, expand it.
25212# FIXME: This hack should be removed a few years after 2.60.
25213ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25214
ca81d7a0
JD
25215case `sed -n '/datarootdir/ {
25216 p
25217 q
25218}
25219/@datadir@/p
25220/@docdir@/p
25221/@infodir@/p
25222/@localedir@/p
25223/@mandir@/p
25224' $ac_file_inputs` in
25225*datarootdir*) ac_datarootdir_seen=yes;;
25226*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25227 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25228echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25229_ACEOF
ca81d7a0
JD
25230cat >>$CONFIG_STATUS <<_ACEOF
25231 ac_datarootdir_hack='
25232 s&@datadir@&$datadir&g
25233 s&@docdir@&$docdir&g
25234 s&@infodir@&$infodir&g
25235 s&@localedir@&$localedir&g
25236 s&@mandir@&$mandir&g
25237 s&\\\${datarootdir}&$datarootdir&g' ;;
25238esac
c0d27fcc 25239_ACEOF
ca81d7a0
JD
25240
25241# Neutralize VPATH when `$srcdir' = `.'.
25242# Shell code in configure.ac might set extrasub.
25243# FIXME: do we really want to maintain this feature?
c0d27fcc 25244cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25245 sed "$ac_vpsub
25246$extrasub
c0d27fcc
MR
25247_ACEOF
25248cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25249:t
25250/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25251s&@configure_input@&$configure_input&;t t
25252s&@top_builddir@&$ac_top_builddir_sub&;t t
25253s&@srcdir@&$ac_srcdir&;t t
25254s&@abs_srcdir@&$ac_abs_srcdir&;t t
25255s&@top_srcdir@&$ac_top_srcdir&;t t
25256s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25257s&@builddir@&$ac_builddir&;t t
25258s&@abs_builddir@&$ac_abs_builddir&;t t
25259s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25260s&@INSTALL@&$ac_INSTALL&;t t
25261$ac_datarootdir_hack
25262" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25263
25264test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25265 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25266 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25267 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25268which seems to be undefined. Please make sure it is defined." >&5
25269echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25270which seems to be undefined. Please make sure it is defined." >&2;}
25271
25272 rm -f "$tmp/stdin"
503d2be0 25273 case $ac_file in
ca81d7a0
JD
25274 -) cat "$tmp/out"; rm -f "$tmp/out";;
25275 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25276 esac
ca81d7a0
JD
25277 ;;
25278 :H)
25279 #
25280 # CONFIG_HEADER
25281 #
25282_ACEOF
25283
25284# Transform confdefs.h into a sed script `conftest.defines', that
25285# substitutes the proper values into config.h.in to produce config.h.
25286rm -f conftest.defines conftest.tail
25287# First, append a space to every undef/define line, to ease matching.
25288echo 's/$/ /' >conftest.defines
25289# Then, protect against being on the right side of a sed subst, or in
25290# an unquoted here document, in config.status. If some macros were
25291# called several times there might be several #defines for the same
25292# symbol, which is useless. But do not sort them, since the last
25293# AC_DEFINE must be honored.
25294ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25295# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25296# NAME is the cpp macro being defined, VALUE is the value it is being given.
25297# PARAMS is the parameter list in the macro definition--in most cases, it's
25298# just an empty string.
25299ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25300ac_dB='\\)[ (].*,\\1define\\2'
25301ac_dC=' '
25302ac_dD=' ,'
25303
25304uniq confdefs.h |
25305 sed -n '
25306 t rset
25307 :rset
25308 s/^[ ]*#[ ]*define[ ][ ]*//
25309 t ok
25310 d
25311 :ok
25312 s/[\\&,]/\\&/g
25313 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25314 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25315 ' >>conftest.defines
25316
25317# Remove the space that was appended to ease matching.
25318# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25319# example, in the case of _POSIX_SOURCE, which is predefined and required
25320# on some systems where configure will not decide to define it.
ca81d7a0
JD
25321# (The regexp can be short, since the line contains either #define or #undef.)
25322echo 's/ $//
25323s,^[ #]*u.*,/* & */,' >>conftest.defines
25324
25325# Break up conftest.defines:
25326ac_max_sed_lines=50
25327
25328# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25329# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25330# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25331# et cetera.
25332ac_in='$ac_file_inputs'
25333ac_out='"$tmp/out1"'
25334ac_nxt='"$tmp/out2"'
25335
25336while :
503d2be0 25337do
ca81d7a0
JD
25338 # Write a here document:
25339 cat >>$CONFIG_STATUS <<_ACEOF
25340 # First, check the format of the line:
25341 cat >"\$tmp/defines.sed" <<\\CEOF
25342/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25343/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25344b
25345:def
25346_ACEOF
25347 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25348 echo 'CEOF
ca81d7a0
JD
25349 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25350 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25351 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25352 grep . conftest.tail >/dev/null || break
503d2be0
AS
25353 rm -f conftest.defines
25354 mv conftest.tail conftest.defines
25355done
ca81d7a0 25356rm -f conftest.defines conftest.tail
503d2be0 25357
ca81d7a0 25358echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25359cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25360 if test x"$ac_file" != x-; then
ca81d7a0
JD
25361 echo "/* $configure_input */" >"$tmp/config.h"
25362 cat "$ac_result" >>"$tmp/config.h"
25363 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25364 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25365echo "$as_me: $ac_file is unchanged" >&6;}
25366 else
503d2be0 25367 rm -f $ac_file
ca81d7a0 25368 mv "$tmp/config.h" $ac_file
ba4481b5 25369 fi
503d2be0 25370 else
ca81d7a0
JD
25371 echo "/* $configure_input */"
25372 cat "$ac_result"
ba4481b5 25373 fi
ca81d7a0
JD
25374 rm -f "$tmp/out12"
25375 ;;
edfaf76d 25376
ca81d7a0
JD
25377 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25378echo "$as_me: executing $ac_file commands" >&6;}
25379 ;;
25380 esac
ba4481b5 25381
c0d27fcc 25382
ca81d7a0
JD
25383 case $ac_file$ac_mode in
25384 "default":C)
ba4481b5
DL
25385
25386### Make the necessary directories, if they don't exist.
25387for dir in etc lisp ; do
25388 test -d ${dir} || mkdir ${dir}
25389done
25390
25391# Build src/Makefile from ${srcdir}/src/Makefile.c
25392# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25393# This must be done after src/config.h is built, since we rely on that file.
25394
25395# Now get this: Some word that is part of the ${srcdir} directory name
25396# or the ${configuration} value might, just might, happen to be an
25397# identifier like `sun4' or `i386' or something, and be predefined by
25398# the C preprocessor to some helpful value like 1, or maybe the empty
25399# string. Needless to say consequent macro substitutions are less
25400# than conducive to the makefile finding the correct directory.
25401undefs="`echo $top_srcdir $configuration $canonical |
25402sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
25403 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25404`"
25405
25406echo creating src/epaths.h
4aa6b955 25407${MAKE-make} epaths-force
ba4481b5 25408
1c203d4c
DL
25409# As of 2000-11-19, newest development versions of GNU cpp preprocess
25410# `..' to `. .' unless invoked with -traditional
25411
d0e9bfd2 25412if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25413 CPPFLAGS="$CPPFLAGS -traditional"
25414fi
25415
ba4481b5
DL
25416echo creating lib-src/Makefile
25417( cd lib-src
25418 rm -f junk.c junk1.c junk2.c
25419 sed -e '/start of cpp stuff/q' \
25420 < Makefile.c > junk1.c
25421 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25422 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25423 < Makefile.c > junk.c
503d2be0 25424 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25425 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25426 cat junk1.c junk2.c > Makefile.new
25427 rm -f junk.c junk1.c junk2.c
25428 chmod 444 Makefile.new
25429 mv -f Makefile.new Makefile
25430)
25431
25432echo creating src/Makefile
25433( cd src
25434 rm -f junk.c junk1.c junk2.c
25435 sed -e '/start of cpp stuff/q' \
25436 < Makefile.c > junk1.c
25437 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25438 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25439 < Makefile.c > junk.c
503d2be0 25440 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25441 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25442 cat junk1.c junk2.c > Makefile.new
25443 rm -f junk.c junk1.c junk2.c
25444 chmod 444 Makefile.new
25445 mv -f Makefile.new Makefile
25446)
25447
503d2be0 25448if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25449 echo creating src/.gdbinit
503d2be0 25450 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25451fi
25452
25453# This is how we know whether to re-run configure in certain cases.
25454touch src/config.stamp
25455
503d2be0 25456 ;;
ca81d7a0 25457
503d2be0 25458 esac
ca81d7a0 25459done # for ac_tag
503d2be0 25460
ba4481b5 25461
503d2be0 25462{ (exit 0); exit 0; }
c0d27fcc 25463_ACEOF
ba4481b5 25464chmod +x $CONFIG_STATUS
503d2be0
AS
25465ac_clean_files=$ac_clean_files_save
25466
c0d27fcc 25467
503d2be0
AS
25468# configure is writing to config.log, and then calls config.status.
25469# config.status does its own redirection, appending to config.log.
25470# Unfortunately, on DOS this fails, as config.log is still kept open
25471# by configure, so config.status won't be able to write to it; its
25472# output is simply discarded. So we exec the FD to /dev/null,
25473# effectively closing config.log, so it can be properly (re)opened and
25474# appended to by config.status. When coming back to configure, we
25475# need to make the FD available again.
25476if test "$no_create" != yes; then
25477 ac_cs_success=:
19650fd6
AS
25478 ac_config_status_args=
25479 test "$silent" = yes &&
25480 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25481 exec 5>/dev/null
19650fd6 25482 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25483 exec 5>>config.log
25484 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25485 # would make configure fail if this is the last instruction.
25486 $ac_cs_success || { (exit 1); exit 1; }
25487fi
f5f47add 25488
c0d27fcc 25489