Fix typos.
[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
edfda783 736ns_appdir
06b62770
AR
737ns_appbindir
738ns_appresdir
739ns_appsrc
facfbbbd 740GNUSTEP_MAKEFILES
c24fa7dc 741LTLIBOBJS'
6bae0ccf 742ac_subst_files=''
ca81d7a0
JD
743 ac_precious_vars='build_alias
744host_alias
745target_alias
746CC
747CFLAGS
748LDFLAGS
f053c89f 749LIBS
ca81d7a0
JD
750CPPFLAGS
751CPP
752XMKMF'
753
c0d27fcc 754
ba4481b5 755# Initialize some variables set by options.
503d2be0
AS
756ac_init_help=
757ac_init_version=false
ba4481b5
DL
758# The variables have the same names as the options, with
759# dashes changed to underlines.
503d2be0 760cache_file=/dev/null
ba4481b5 761exec_prefix=NONE
ba4481b5 762no_create=
ba4481b5
DL
763no_recursion=
764prefix=NONE
765program_prefix=NONE
766program_suffix=NONE
767program_transform_name=s,x,x,
768silent=
769site=
770srcdir=
ba4481b5
DL
771verbose=
772x_includes=NONE
773x_libraries=NONE
503d2be0
AS
774
775# Installation directory options.
776# These are left unexpanded so users can "make install exec_prefix=/foo"
777# and all the variables that are supposed to be based on exec_prefix
778# by default will actually change.
779# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 780# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
781bindir='${exec_prefix}/bin'
782sbindir='${exec_prefix}/sbin'
783libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
784datarootdir='${prefix}/share'
785datadir='${datarootdir}'
ba4481b5
DL
786sysconfdir='${prefix}/etc'
787sharedstatedir='${prefix}/com'
788localstatedir='${prefix}/var'
ba4481b5
DL
789includedir='${prefix}/include'
790oldincludedir='/usr/include'
9cf8f393 791docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
792infodir='${datarootdir}/info'
793htmldir='${docdir}'
794dvidir='${docdir}'
795pdfdir='${docdir}'
796psdir='${docdir}'
797libdir='${exec_prefix}/lib'
798localedir='${datarootdir}/locale'
799mandir='${datarootdir}/man'
ba4481b5 800
ba4481b5 801ac_prev=
ca81d7a0 802ac_dashdash=
ba4481b5
DL
803for ac_option
804do
ba4481b5
DL
805 # If the previous option needs an argument, assign it.
806 if test -n "$ac_prev"; then
ca81d7a0 807 eval $ac_prev=\$ac_option
ba4481b5
DL
808 ac_prev=
809 continue
810 fi
811
ca81d7a0
JD
812 case $ac_option in
813 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
814 *) ac_optarg=yes ;;
815 esac
ba4481b5
DL
816
817 # Accept the important Cygnus configure options, so we can diagnose typos.
818
ca81d7a0
JD
819 case $ac_dashdash$ac_option in
820 --)
821 ac_dashdash=yes ;;
ba4481b5
DL
822
823 -bindir | --bindir | --bindi | --bind | --bin | --bi)
824 ac_prev=bindir ;;
825 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 826 bindir=$ac_optarg ;;
ba4481b5
DL
827
828 -build | --build | --buil | --bui | --bu)
503d2be0 829 ac_prev=build_alias ;;
ba4481b5 830 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 831 build_alias=$ac_optarg ;;
ba4481b5
DL
832
833 -cache-file | --cache-file | --cache-fil | --cache-fi \
834 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
835 ac_prev=cache_file ;;
836 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
837 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
838 cache_file=$ac_optarg ;;
839
840 --config-cache | -C)
841 cache_file=config.cache ;;
ba4481b5 842
ca81d7a0 843 -datadir | --datadir | --datadi | --datad)
ba4481b5 844 ac_prev=datadir ;;
ca81d7a0 845 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 846 datadir=$ac_optarg ;;
ba4481b5 847
ca81d7a0
JD
848 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
849 | --dataroo | --dataro | --datar)
850 ac_prev=datarootdir ;;
851 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
852 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
853 datarootdir=$ac_optarg ;;
854
ba4481b5 855 -disable-* | --disable-*)
503d2be0 856 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 857 # Reject names that are not valid shell variable names.
f053c89f 858 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
859 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
860 { (exit 1); exit 1; }; }
f053c89f 861 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
862 eval enable_$ac_feature=no ;;
863
864 -docdir | --docdir | --docdi | --doc | --do)
865 ac_prev=docdir ;;
866 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
867 docdir=$ac_optarg ;;
868
869 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
870 ac_prev=dvidir ;;
871 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
872 dvidir=$ac_optarg ;;
ba4481b5
DL
873
874 -enable-* | --enable-*)
503d2be0 875 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 876 # Reject names that are not valid shell variable names.
f053c89f 877 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
878 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
879 { (exit 1); exit 1; }; }
f053c89f 880 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 881 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
882
883 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
884 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
885 | --exec | --exe | --ex)
886 ac_prev=exec_prefix ;;
887 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
888 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
889 | --exec=* | --exe=* | --ex=*)
503d2be0 890 exec_prefix=$ac_optarg ;;
ba4481b5
DL
891
892 -gas | --gas | --ga | --g)
893 # Obsolete; use --with-gas.
894 with_gas=yes ;;
895
503d2be0
AS
896 -help | --help | --hel | --he | -h)
897 ac_init_help=long ;;
898 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
899 ac_init_help=recursive ;;
900 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
901 ac_init_help=short ;;
ba4481b5
DL
902
903 -host | --host | --hos | --ho)
503d2be0 904 ac_prev=host_alias ;;
ba4481b5 905 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 906 host_alias=$ac_optarg ;;
ba4481b5 907
ca81d7a0
JD
908 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
909 ac_prev=htmldir ;;
910 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
911 | --ht=*)
912 htmldir=$ac_optarg ;;
913
ba4481b5
DL
914 -includedir | --includedir | --includedi | --included | --include \
915 | --includ | --inclu | --incl | --inc)
916 ac_prev=includedir ;;
917 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
918 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 919 includedir=$ac_optarg ;;
ba4481b5
DL
920
921 -infodir | --infodir | --infodi | --infod | --info | --inf)
922 ac_prev=infodir ;;
923 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 924 infodir=$ac_optarg ;;
ba4481b5
DL
925
926 -libdir | --libdir | --libdi | --libd)
927 ac_prev=libdir ;;
928 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 929 libdir=$ac_optarg ;;
ba4481b5
DL
930
931 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
932 | --libexe | --libex | --libe)
933 ac_prev=libexecdir ;;
934 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
935 | --libexe=* | --libex=* | --libe=*)
503d2be0 936 libexecdir=$ac_optarg ;;
ba4481b5 937
ca81d7a0
JD
938 -localedir | --localedir | --localedi | --localed | --locale)
939 ac_prev=localedir ;;
940 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
941 localedir=$ac_optarg ;;
942
ba4481b5 943 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 944 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
945 ac_prev=localstatedir ;;
946 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 947 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 948 localstatedir=$ac_optarg ;;
ba4481b5
DL
949
950 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
951 ac_prev=mandir ;;
952 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 953 mandir=$ac_optarg ;;
ba4481b5
DL
954
955 -nfp | --nfp | --nf)
956 # Obsolete; use --without-fp.
957 with_fp=no ;;
958
959 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 960 | --no-cr | --no-c | -n)
ba4481b5
DL
961 no_create=yes ;;
962
963 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
964 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
965 no_recursion=yes ;;
966
967 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
968 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
969 | --oldin | --oldi | --old | --ol | --o)
970 ac_prev=oldincludedir ;;
971 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
972 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
973 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 974 oldincludedir=$ac_optarg ;;
ba4481b5
DL
975
976 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
977 ac_prev=prefix ;;
978 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 979 prefix=$ac_optarg ;;
ba4481b5
DL
980
981 -program-prefix | --program-prefix | --program-prefi | --program-pref \
982 | --program-pre | --program-pr | --program-p)
983 ac_prev=program_prefix ;;
984 -program-prefix=* | --program-prefix=* | --program-prefi=* \
985 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 986 program_prefix=$ac_optarg ;;
ba4481b5
DL
987
988 -program-suffix | --program-suffix | --program-suffi | --program-suff \
989 | --program-suf | --program-su | --program-s)
990 ac_prev=program_suffix ;;
991 -program-suffix=* | --program-suffix=* | --program-suffi=* \
992 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 993 program_suffix=$ac_optarg ;;
ba4481b5
DL
994
995 -program-transform-name | --program-transform-name \
996 | --program-transform-nam | --program-transform-na \
997 | --program-transform-n | --program-transform- \
998 | --program-transform | --program-transfor \
999 | --program-transfo | --program-transf \
1000 | --program-trans | --program-tran \
1001 | --progr-tra | --program-tr | --program-t)
1002 ac_prev=program_transform_name ;;
1003 -program-transform-name=* | --program-transform-name=* \
1004 | --program-transform-nam=* | --program-transform-na=* \
1005 | --program-transform-n=* | --program-transform-=* \
1006 | --program-transform=* | --program-transfor=* \
1007 | --program-transfo=* | --program-transf=* \
1008 | --program-trans=* | --program-tran=* \
1009 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1010 program_transform_name=$ac_optarg ;;
ba4481b5 1011
ca81d7a0
JD
1012 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1013 ac_prev=pdfdir ;;
1014 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1015 pdfdir=$ac_optarg ;;
1016
1017 -psdir | --psdir | --psdi | --psd | --ps)
1018 ac_prev=psdir ;;
1019 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1020 psdir=$ac_optarg ;;
1021
ba4481b5
DL
1022 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1023 | -silent | --silent | --silen | --sile | --sil)
1024 silent=yes ;;
1025
1026 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1027 ac_prev=sbindir ;;
1028 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1029 | --sbi=* | --sb=*)
503d2be0 1030 sbindir=$ac_optarg ;;
ba4481b5
DL
1031
1032 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1033 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1034 | --sharedst | --shareds | --shared | --share | --shar \
1035 | --sha | --sh)
1036 ac_prev=sharedstatedir ;;
1037 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1038 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1039 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1040 | --sha=* | --sh=*)
503d2be0 1041 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1042
1043 -site | --site | --sit)
1044 ac_prev=site ;;
1045 -site=* | --site=* | --sit=*)
503d2be0 1046 site=$ac_optarg ;;
ba4481b5
DL
1047
1048 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1049 ac_prev=srcdir ;;
1050 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1051 srcdir=$ac_optarg ;;
ba4481b5
DL
1052
1053 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1054 | --syscon | --sysco | --sysc | --sys | --sy)
1055 ac_prev=sysconfdir ;;
1056 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1057 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1058 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1059
1060 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1061 ac_prev=target_alias ;;
ba4481b5 1062 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1063 target_alias=$ac_optarg ;;
ba4481b5
DL
1064
1065 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1066 verbose=yes ;;
1067
503d2be0
AS
1068 -version | --version | --versio | --versi | --vers | -V)
1069 ac_init_version=: ;;
ba4481b5
DL
1070
1071 -with-* | --with-*)
503d2be0 1072 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1073 # Reject names that are not valid shell variable names.
f053c89f 1074 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1075 { echo "$as_me: error: invalid package name: $ac_package" >&2
1076 { (exit 1); exit 1; }; }
f053c89f 1077 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1078 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1079
1080 -without-* | --without-*)
503d2be0 1081 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1082 # Reject names that are not valid shell variable names.
f053c89f 1083 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1084 { echo "$as_me: error: invalid package name: $ac_package" >&2
1085 { (exit 1); exit 1; }; }
f053c89f 1086 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1087 eval with_$ac_package=no ;;
ba4481b5
DL
1088
1089 --x)
1090 # Obsolete; use --with-x.
1091 with_x=yes ;;
1092
1093 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1094 | --x-incl | --x-inc | --x-in | --x-i)
1095 ac_prev=x_includes ;;
1096 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1097 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1098 x_includes=$ac_optarg ;;
ba4481b5
DL
1099
1100 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1101 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1102 ac_prev=x_libraries ;;
1103 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1104 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1105 x_libraries=$ac_optarg ;;
ba4481b5 1106
503d2be0
AS
1107 -*) { echo "$as_me: error: unrecognized option: $ac_option
1108Try \`$0 --help' for more information." >&2
1109 { (exit 1); exit 1; }; }
ba4481b5
DL
1110 ;;
1111
503d2be0
AS
1112 *=*)
1113 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1114 # Reject names that are not valid shell variable names.
1115 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1116 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1117 { (exit 1); exit 1; }; }
ca81d7a0 1118 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1119 export $ac_envvar ;;
1120
ba4481b5 1121 *)
503d2be0
AS
1122 # FIXME: should be removed in autoconf 3.0.
1123 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1124 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1125 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1126 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1127 ;;
1128
1129 esac
1130done
1131
1132if test -n "$ac_prev"; then
503d2be0
AS
1133 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1134 { echo "$as_me: error: missing argument to $ac_option" >&2
1135 { (exit 1); exit 1; }; }
ba4481b5 1136fi
ba4481b5 1137
ca81d7a0
JD
1138# Be sure to have absolute directory names.
1139for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1140 datadir sysconfdir sharedstatedir localstatedir includedir \
1141 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1142 libdir localedir mandir
ba4481b5 1143do
ca81d7a0 1144 eval ac_val=\$$ac_var
503d2be0 1145 case $ac_val in
ca81d7a0
JD
1146 [\\/$]* | ?:[\\/]* ) continue;;
1147 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1148 esac
ca81d7a0
JD
1149 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1150 { (exit 1); exit 1; }; }
ba4481b5
DL
1151done
1152
503d2be0
AS
1153# There might be people who depend on the old broken behavior: `$host'
1154# used to hold the argument of --host etc.
c0d27fcc 1155# FIXME: To remove some day.
503d2be0
AS
1156build=$build_alias
1157host=$host_alias
1158target=$target_alias
1159
c0d27fcc 1160# FIXME: To remove some day.
503d2be0
AS
1161if test "x$host_alias" != x; then
1162 if test "x$build_alias" = x; then
1163 cross_compiling=maybe
1164 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1165 If a cross compiler is detected then cross compile mode will be used." >&2
1166 elif test "x$build_alias" != "x$host_alias"; then
1167 cross_compiling=yes
1168 fi
1169fi
ba4481b5 1170
503d2be0
AS
1171ac_tool_prefix=
1172test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1173
503d2be0 1174test "$silent" = yes && exec 6>/dev/null
ba4481b5 1175
c0d27fcc 1176
ca81d7a0
JD
1177ac_pwd=`pwd` && test -n "$ac_pwd" &&
1178ac_ls_di=`ls -di .` &&
1179ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1180 { echo "$as_me: error: Working directory cannot be determined" >&2
1181 { (exit 1); exit 1; }; }
1182test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1183 { echo "$as_me: error: pwd does not report name of working directory" >&2
1184 { (exit 1); exit 1; }; }
1185
1186
ba4481b5
DL
1187# Find the source files, if location was not specified.
1188if test -z "$srcdir"; then
1189 ac_srcdir_defaulted=yes
ca81d7a0
JD
1190 # Try the directory containing this script, then the parent directory.
1191 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1192$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1193 X"$0" : 'X\(//\)[^/]' \| \
1194 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1195 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1196echo X"$0" |
ca81d7a0
JD
1197 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)[^/].*/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\/\)$/{
1206 s//\1/
1207 q
1208 }
1209 /^X\(\/\).*/{
1210 s//\1/
1211 q
1212 }
1213 s/.*/./; q'`
ba4481b5 1214 srcdir=$ac_confdir
ca81d7a0 1215 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1216 srcdir=..
1217 fi
1218else
1219 ac_srcdir_defaulted=no
1220fi
ca81d7a0
JD
1221if test ! -r "$srcdir/$ac_unique_file"; then
1222 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1223 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1224 { (exit 1); exit 1; }; }
ba4481b5 1225fi
ca81d7a0
JD
1226ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1227ac_abs_confdir=`(
1228 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1229 { (exit 1); exit 1; }; }
ca81d7a0
JD
1230 pwd)`
1231# When building in place, set srcdir=.
1232if test "$ac_abs_confdir" = "$ac_pwd"; then
1233 srcdir=.
1234fi
1235# Remove unnecessary trailing slashes from srcdir.
1236# Double slashes in file names in object file debugging info
1237# mess up M-x gdb in Emacs.
1238case $srcdir in
1239*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1240esac
1241for ac_var in $ac_precious_vars; do
1242 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_env_${ac_var}_value=\$${ac_var}
1244 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1245 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1246done
503d2be0
AS
1247
1248#
1249# Report the --help message.
1250#
1251if test "$ac_init_help" = "long"; then
1252 # Omit some internal or obsolete options to make the list less imposing.
1253 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1254 cat <<_ACEOF
5d374ce1 1255\`configure' configures emacs 23.0.60 to adapt to many kinds of systems.
503d2be0
AS
1256
1257Usage: $0 [OPTION]... [VAR=VALUE]...
1258
1259To assign environment variables (e.g., CC, CFLAGS...), specify them as
1260VAR=VALUE. See below for descriptions of some of the useful variables.
1261
1262Defaults for the options are specified in brackets.
1263
1264Configuration:
1265 -h, --help display this help and exit
1266 --help=short display options specific to this package
1267 --help=recursive display the short help of all the included packages
1268 -V, --version display version information and exit
1269 -q, --quiet, --silent do not print \`checking...' messages
1270 --cache-file=FILE cache test results in FILE [disabled]
1271 -C, --config-cache alias for \`--cache-file=config.cache'
1272 -n, --no-create do not create output files
1273 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1274
503d2be0
AS
1275Installation directories:
1276 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1277 [$ac_default_prefix]
503d2be0 1278 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1279 [PREFIX]
503d2be0
AS
1280
1281By default, \`make install' will install all the files in
1282\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1283an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1284for instance \`--prefix=\$HOME'.
1285
1286For better control, use the options below.
1287
1288Fine tuning of the installation directories:
1289 --bindir=DIR user executables [EPREFIX/bin]
1290 --sbindir=DIR system admin executables [EPREFIX/sbin]
1291 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1292 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1293 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1294 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1295 --libdir=DIR object code libraries [EPREFIX/lib]
1296 --includedir=DIR C header files [PREFIX/include]
1297 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1298 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1299 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1300 --infodir=DIR info documentation [DATAROOTDIR/info]
1301 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1302 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1303 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1304 --htmldir=DIR html documentation [DOCDIR]
1305 --dvidir=DIR dvi documentation [DOCDIR]
1306 --pdfdir=DIR pdf documentation [DOCDIR]
1307 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1308_ACEOF
503d2be0 1309
c0d27fcc 1310 cat <<\_ACEOF
503d2be0 1311
ba5da88a
PJ
1312Program names:
1313 --program-prefix=PREFIX prepend PREFIX to installed program names
1314 --program-suffix=SUFFIX append SUFFIX to installed program names
1315 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1316
503d2be0
AS
1317X features:
1318 --x-includes=DIR X include files are in DIR
1319 --x-libraries=DIR X library files are in DIR
1320
1321System types:
1322 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1323 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1324_ACEOF
503d2be0
AS
1325fi
1326
1327if test -n "$ac_init_help"; then
9cf8f393 1328 case $ac_init_help in
5d374ce1 1329 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 1330 esac
c0d27fcc 1331 cat <<\_ACEOF
503d2be0
AS
1332
1333Optional Features:
1334 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1335 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
edfda783 1336 --enable-cocoa-experimental-ctrl-g enable experimental improved ctrl-g recognition
06b62770 1337 --disable-ns-self-contained disable self contained build under NS
d0098f13 1338 --enable-asserts compile code with asserts enabled
709e90de
AS
1339 --enable-maintainer-mode
1340 enable make rules and dependencies not useful (and
1341 sometimes confusing) to the casual installer
9adfabc2
LK
1342 --enable-locallisppath=PATH
1343 directories Emacs should search for lisp files
1344 specific to this site
503d2be0
AS
1345 --disable-largefile omit support for large files
1346
1347Optional Packages:
1348 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1349 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1350 --without-pop don't support POP mail retrieval with movemail
1351 --with-kerberos support Kerberos-authenticated POP
1352 --with-kerberos5 support Kerberos version 5 authenticated POP
1353 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1354 --without-sound don't compile with sound support
a51f4969 1355 --without-sync-input Process async input synchronously
49adb60f
TTN
1356 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1357 motif, gtk, no)
c8467c40
GM
1358 --without-xpm don't compile with XPM image support
1359 --without-jpeg don't compile with JPEG image support
1360 --without-tiff don't compile with TIFF image support
1361 --without-gif don't compile with GIF image support
1362 --without-png don't compile with PNG image support
1363 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1364 --without-freetype don't use Freetype for local font support
1365 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1366 --without-libotf don't use libotf for OpenType font support
1367 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1368 --without-toolkit-scroll-bars
cc227489 1369 don't use Motif or Xaw3d scroll bars
c982cf7d 1370 --without-xaw3d don't use Xaw3d
cc227489 1371 --without-xim don't use X11 XIM
edfda783 1372 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1373 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1374 console
b5a922de 1375 --without-dbus don't compile with D-Bus support
921fbdf0 1376 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1377
00b9c927
MO
1378 --with-pkg-config-prog=PATH
1379 Path to pkg-config for finding GTK and librsvg
503d2be0
AS
1380 --with-x use the X Window System
1381
1382Some influential environment variables:
1383 CC C compiler command
1384 CFLAGS C compiler flags
1385 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1386 nonstandard directory <lib dir>
f053c89f 1387 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1388 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1389 you have headers in a nonstandard directory <include dir>
503d2be0 1390 CPP C preprocessor
ca81d7a0 1391 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1392
1393Use these variables to override the choices made by `configure' or to help
1394it to find libraries and programs with nonstandard names/locations.
1395
c0d27fcc 1396_ACEOF
ca81d7a0 1397ac_status=$?
503d2be0
AS
1398fi
1399
1400if test "$ac_init_help" = "recursive"; then
1401 # If there are subdirs, report their specific --help.
c0d27fcc 1402 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1403 test -d "$ac_dir" || continue
c0d27fcc
MR
1404 ac_builddir=.
1405
ca81d7a0
JD
1406case "$ac_dir" in
1407.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1408*)
c0d27fcc 1409 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1410 # A ".." for each directory in $ac_dir_suffix.
1411 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1412 case $ac_top_builddir_sub in
1413 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1414 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1415 esac ;;
1416esac
1417ac_abs_top_builddir=$ac_pwd
1418ac_abs_builddir=$ac_pwd$ac_dir_suffix
1419# for backward compatibility:
1420ac_top_builddir=$ac_top_build_prefix
503d2be0 1421
c0d27fcc 1422case $srcdir in
ca81d7a0 1423 .) # We are building in place.
c0d27fcc 1424 ac_srcdir=.
ca81d7a0
JD
1425 ac_top_srcdir=$ac_top_builddir_sub
1426 ac_abs_top_srcdir=$ac_pwd ;;
1427 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1428 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1429 ac_top_srcdir=$srcdir
1430 ac_abs_top_srcdir=$srcdir ;;
1431 *) # Relative name.
1432 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1433 ac_top_srcdir=$ac_top_build_prefix$srcdir
1434 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1435esac
ca81d7a0
JD
1436ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1437
1438 cd "$ac_dir" || { ac_status=$?; continue; }
1439 # Check for guested configure.
1440 if test -f "$ac_srcdir/configure.gnu"; then
1441 echo &&
1442 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1443 elif test -f "$ac_srcdir/configure"; then
1444 echo &&
1445 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1446 else
c0d27fcc 1447 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1448 fi || ac_status=$?
1449 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1450 done
1451fi
1452
ca81d7a0 1453test -n "$ac_init_help" && exit $ac_status
503d2be0 1454if $ac_init_version; then
c0d27fcc 1455 cat <<\_ACEOF
5d374ce1 1456emacs configure 23.0.60
f053c89f 1457generated by GNU Autoconf 2.61
503d2be0 1458
ca81d7a0
JD
1459Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14602002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1461This configure script is free software; the Free Software Foundation
1462gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1463_ACEOF
ca81d7a0 1464 exit
503d2be0 1465fi
ca81d7a0 1466cat >config.log <<_ACEOF
503d2be0
AS
1467This file contains any messages produced by compilers while
1468running configure, to aid debugging if configure makes a mistake.
1469
5d374ce1 1470It was created by emacs $as_me 23.0.60, which was
f053c89f 1471generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1472
1473 $ $0 $@
1474
c0d27fcc 1475_ACEOF
ca81d7a0 1476exec 5>>config.log
503d2be0
AS
1477{
1478cat <<_ASUNAME
c0d27fcc
MR
1479## --------- ##
1480## Platform. ##
1481## --------- ##
503d2be0
AS
1482
1483hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1484uname -m = `(uname -m) 2>/dev/null || echo unknown`
1485uname -r = `(uname -r) 2>/dev/null || echo unknown`
1486uname -s = `(uname -s) 2>/dev/null || echo unknown`
1487uname -v = `(uname -v) 2>/dev/null || echo unknown`
1488
1489/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1490/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1491
1492/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1493/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1494/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1495/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1496/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1497/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1498/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1499
925c2f3f 1500_ASUNAME
c0d27fcc
MR
1501
1502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1503for as_dir in $PATH
1504do
1505 IFS=$as_save_IFS
1506 test -z "$as_dir" && as_dir=.
1507 echo "PATH: $as_dir"
1508done
ca81d7a0 1509IFS=$as_save_IFS
c0d27fcc 1510
503d2be0
AS
1511} >&5
1512
c0d27fcc
MR
1513cat >&5 <<_ACEOF
1514
1515
1516## ----------- ##
1517## Core tests. ##
1518## ----------- ##
1519
1520_ACEOF
503d2be0 1521
503d2be0
AS
1522
1523# Keep a trace of the command line.
1524# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1525# Strip out --silent because we don't want to record it for future runs.
503d2be0 1526# Also quote any args containing shell meta-characters.
19650fd6 1527# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1528ac_configure_args=
19650fd6
AS
1529ac_configure_args0=
1530ac_configure_args1=
19650fd6
AS
1531ac_must_keep_next=false
1532for ac_pass in 1 2
503d2be0 1533do
19650fd6
AS
1534 for ac_arg
1535 do
1536 case $ac_arg in
1537 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1539 | -silent | --silent | --silen | --sile | --sil)
1540 continue ;;
ca81d7a0 1541 *\'*)
19650fd6
AS
1542 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1543 esac
1544 case $ac_pass in
1545 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1546 2)
1547 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1548 if test $ac_must_keep_next = true; then
edfaf76d 1549 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1550 else
edfaf76d
LK
1551 case $ac_arg in
1552 *=* | --config-cache | -C | -disable-* | --disable-* \
1553 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1554 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1555 | -with-* | --with-* | -without-* | --without-* | --x)
1556 case "$ac_configure_args0 " in
1557 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1558 esac
1559 ;;
1560 -* ) ac_must_keep_next=true ;;
1561 esac
19650fd6 1562 fi
ca81d7a0 1563 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1564 ;;
1565 esac
1566 done
503d2be0 1567done
19650fd6
AS
1568$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1569$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1570
1571# When interrupted or exit'd, cleanup temporary files, and complete
1572# config.log. We remove comments because anyway the quotes in there
1573# would cause problems or look ugly.
ca81d7a0
JD
1574# WARNING: Use '\'' to represent an apostrophe within the trap.
1575# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1576trap 'exit_status=$?
1577 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1578 {
1579 echo
6bae0ccf 1580
c0d27fcc
MR
1581 cat <<\_ASBOX
1582## ---------------- ##
1583## Cache variables. ##
1584## ---------------- ##
1585_ASBOX
1586 echo
1587 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1588(
1589 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1590 eval ac_val=\$$ac_var
1591 case $ac_val in #(
1592 *${as_nl}*)
1593 case $ac_var in #(
1594 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1595echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1596 esac
1597 case $ac_var in #(
1598 _ | IFS | as_nl) ;; #(
1599 *) $as_unset $ac_var ;;
1600 esac ;;
1601 esac
1602 done
503d2be0 1603 (set) 2>&1 |
ca81d7a0
JD
1604 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1605 *${as_nl}ac_space=\ *)
503d2be0 1606 sed -n \
ca81d7a0
JD
1607 "s/'\''/'\''\\\\'\'''\''/g;
1608 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1609 ;; #(
503d2be0 1610 *)
ca81d7a0 1611 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1612 ;;
ca81d7a0
JD
1613 esac |
1614 sort
1615)
c0d27fcc 1616 echo
6bae0ccf
DL
1617
1618 cat <<\_ASBOX
1619## ----------------- ##
1620## Output variables. ##
1621## ----------------- ##
1622_ASBOX
1623 echo
1624 for ac_var in $ac_subst_vars
1625 do
ca81d7a0
JD
1626 eval ac_val=\$$ac_var
1627 case $ac_val in
1628 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1629 esac
1630 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1631 done | sort
1632 echo
1633
1634 if test -n "$ac_subst_files"; then
1635 cat <<\_ASBOX
ca81d7a0
JD
1636## ------------------- ##
1637## File substitutions. ##
1638## ------------------- ##
6bae0ccf
DL
1639_ASBOX
1640 echo
1641 for ac_var in $ac_subst_files
1642 do
ca81d7a0
JD
1643 eval ac_val=\$$ac_var
1644 case $ac_val in
1645 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1646 esac
1647 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1648 done | sort
1649 echo
1650 fi
1651
c0d27fcc
MR
1652 if test -s confdefs.h; then
1653 cat <<\_ASBOX
1654## ----------- ##
1655## confdefs.h. ##
1656## ----------- ##
1657_ASBOX
1658 echo
ca81d7a0 1659 cat confdefs.h
c0d27fcc
MR
1660 echo
1661 fi
1662 test "$ac_signal" != 0 &&
1663 echo "$as_me: caught signal $ac_signal"
1664 echo "$as_me: exit $exit_status"
1665 } >&5
ca81d7a0
JD
1666 rm -f core *.core core.conftest.* &&
1667 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1668 exit $exit_status
ca81d7a0 1669' 0
503d2be0
AS
1670for ac_signal in 1 2 13 15; do
1671 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1672done
1673ac_signal=0
1674
1675# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1676rm -f -r conftest* confdefs.h
ba4481b5 1677
c0d27fcc
MR
1678# Predefined preprocessor variables.
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_NAME "$PACKAGE_NAME"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_VERSION "$PACKAGE_VERSION"
1692_ACEOF
1693
1694
1695cat >>confdefs.h <<_ACEOF
1696#define PACKAGE_STRING "$PACKAGE_STRING"
1697_ACEOF
1698
1699
1700cat >>confdefs.h <<_ACEOF
1701#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1702_ACEOF
1703
1704
503d2be0 1705# Let the site file select an alternate cache file if it wants to.
ba4481b5 1706# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1707if test -n "$CONFIG_SITE"; then
1708 set x "$CONFIG_SITE"
1709elif test "x$prefix" != xNONE; then
1710 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1711else
1712 set x "$ac_default_prefix/share/config.site" \
1713 "$ac_default_prefix/etc/config.site"
ba4481b5 1714fi
ca81d7a0
JD
1715shift
1716for ac_site_file
1717do
ba4481b5 1718 if test -r "$ac_site_file"; then
c0d27fcc 1719 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1720echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1721 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1722 . "$ac_site_file"
1723 fi
1724done
1725
1726if test -r "$cache_file"; then
503d2be0
AS
1727 # Some versions of bash will fail to source /dev/null (special
1728 # files actually), so we avoid doing that.
1729 if test -f "$cache_file"; then
c0d27fcc 1730 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1731echo "$as_me: loading cache $cache_file" >&6;}
1732 case $cache_file in
ca81d7a0
JD
1733 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1734 *) . "./$cache_file";;
503d2be0
AS
1735 esac
1736 fi
ba4481b5 1737else
c0d27fcc 1738 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1739echo "$as_me: creating cache $cache_file" >&6;}
1740 >$cache_file
1741fi
1742
f053c89f
CY
1743ac_header_list="$ac_header_list sys/time.h"
1744ac_header_list="$ac_header_list unistd.h"
1745ac_func_list="$ac_func_list alarm"
503d2be0
AS
1746# Check that the precious variables saved in the cache have kept the same
1747# value.
1748ac_cache_corrupted=false
ca81d7a0 1749for ac_var in $ac_precious_vars; do
503d2be0
AS
1750 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1751 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1752 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1753 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1754 case $ac_old_set,$ac_new_set in
1755 set,)
c0d27fcc 1756 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1757echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1758 ac_cache_corrupted=: ;;
1759 ,set)
c0d27fcc 1760 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1761echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1762 ac_cache_corrupted=: ;;
1763 ,);;
1764 *)
1765 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1766 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1767echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1768 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1769echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1770 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1771echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1772 ac_cache_corrupted=:
503d2be0
AS
1773 fi;;
1774 esac
c0d27fcc 1775 # Pass precious variables to config.status.
503d2be0
AS
1776 if test "$ac_new_set" = set; then
1777 case $ac_new_val in
ca81d7a0 1778 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1779 *) ac_arg=$ac_var=$ac_new_val ;;
1780 esac
1781 case " $ac_configure_args " in
1782 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1783 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1784 esac
1785 fi
1786done
1787if $ac_cache_corrupted; then
c0d27fcc 1788 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1789echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1790 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1791echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1792 { (exit 1); exit 1; }; }
ba4481b5
DL
1793fi
1794
c0d27fcc
MR
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
9cf8f393
JD
1806
1807
1808
1809
1810
1811
1812
1813
c0d27fcc
MR
1814
1815
1816
1817
1818
ca81d7a0
JD
1819ac_ext=c
1820ac_cpp='$CPP $CPPFLAGS'
1821ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1822ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1823ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1824
6bae0ccf 1825
ca81d7a0 1826ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1827
c0d27fcc 1828
9fb1ba80 1829
ba5da88a 1830test "$program_prefix" != NONE &&
ca81d7a0 1831 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1832# Use a double $ so make ignores it.
1833test "$program_suffix" != NONE &&
ca81d7a0 1834 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1835# Double any \ or $. echo might interpret backslashes.
1836# By default was `s,x,x', remove it if useless.
1837cat <<\_ACEOF >conftest.sed
1838s/[\\$]/&&/g;s/;s,x,x,$//
1839_ACEOF
1840program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1841rm -f conftest.sed
ba5da88a 1842
c0d27fcc 1843
ba4481b5
DL
1844lispdir='${datadir}/emacs/${version}/lisp'
1845locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1846'${datadir}/emacs/site-lisp'
1847lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1848etcdir='${datadir}/emacs/${version}/etc'
1849archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1850docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1851gamedir='${localstatedir}/games/emacs'
98418dba
CW
1852
1853gameuser=games
1854
c0d27fcc 1855
49adb60f 1856
00b9c927 1857
ca81d7a0 1858# Check whether --with-pop was given.
ba4481b5 1859if test "${with_pop+set}" = set; then
00b9c927 1860 withval=$with_pop;
3d9fec71 1861else
00b9c927
MO
1862 with_pop=yes
1863fi
1864
1865if test "$with_pop" = yes; then
1866 cat >>confdefs.h <<\_ACEOF
3d9fec71 1867#define MAIL_USE_POP 1
c0d27fcc 1868_ACEOF
3d9fec71 1869
ca81d7a0 1870fi
ba4481b5 1871
c0d27fcc 1872
c0d27fcc 1873
ca81d7a0 1874# Check whether --with-kerberos was given.
a21616bd 1875if test "${with_kerberos+set}" = set; then
00b9c927
MO
1876 withval=$with_kerberos;
1877else
1878 with_kerberos=no
1879fi
1880
ff1095d1 1881if test "$with_kerberos" != no; then
54e6585f 1882 cat >>confdefs.h <<\_ACEOF
a21616bd 1883#define KERBEROS 1
c0d27fcc 1884_ACEOF
a21616bd 1885
ca81d7a0 1886fi
c0d27fcc 1887
c0d27fcc 1888
49adb60f 1889
ca81d7a0 1890# Check whether --with-kerberos5 was given.
a21616bd 1891if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1892 withval=$with_kerberos5;
1893else
1894 with_kerberos5=no
1895fi
1896
ff1095d1
AR
1897if test "${with_kerberos5}" != no; then
1898 if test "${with_kerberos}" = no; then
a21616bd 1899 with_kerberos=yes
c0d27fcc 1900 cat >>confdefs.h <<\_ACEOF
a21616bd 1901#define KERBEROS 1
c0d27fcc 1902_ACEOF
a21616bd
KR
1903
1904 fi
b936fae4 1905
c0d27fcc 1906cat >>confdefs.h <<\_ACEOF
a21616bd 1907#define KERBEROS5 1
c0d27fcc 1908_ACEOF
a21616bd 1909
ca81d7a0 1910fi
b936fae4 1911
49adb60f 1912
ca81d7a0
JD
1913# Check whether --with-hesiod was given.
1914if test "${with_hesiod+set}" = set; then
00b9c927
MO
1915 withval=$with_hesiod;
1916else
1917 with_hesiod=no
1918fi
1919
ff1095d1 1920if test "$with_hesiod" != no; then
54e6585f 1921
c0d27fcc 1922cat >>confdefs.h <<\_ACEOF
ba4481b5 1923#define HESIOD 1
c0d27fcc 1924_ACEOF
ba4481b5 1925
ca81d7a0 1926fi
c0d27fcc 1927
c0d27fcc 1928
ca81d7a0 1929# Check whether --with-sound was given.
2c9dccc9 1930if test "${with_sound+set}" = set; then
ca81d7a0 1931 withval=$with_sound;
00b9c927
MO
1932else
1933 with_sound=yes
ca81d7a0 1934fi
2c9dccc9 1935
2c9dccc9 1936
c0d27fcc 1937
a51f4969
SM
1938# Check whether --with-sync-input was given.
1939if test "${with_sync_input+set}" = set; then
1940 withval=$with_sync_input;
1941else
1942 with_sync_input=yes
1943fi
1944
1945if test "$with_sync_input" = yes; then
1946
1947cat >>confdefs.h <<\_ACEOF
1948#define SYNC_INPUT 1
1949_ACEOF
1950
1951fi
1952
1953
ca81d7a0 1954# Check whether --with-x-toolkit was given.
ba4481b5 1955if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1956 withval=$with_x_toolkit; case "${withval}" in
089a966d 1957 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1958 n | no ) val=no ;;
1959 l | lu | luc | luci | lucid ) val=lucid ;;
1960 a | at | ath | athe | athen | athena ) val=athena ;;
1961 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1962 g | gt | gtk ) val=gtk ;;
ba4481b5 1963 * )
29d69661 1964{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1965this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1966\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1967echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1968this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1969\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1970 { (exit 1); exit 1; }; }
ba4481b5
DL
1971 ;;
1972 esac
1973 with_x_toolkit=$val
1974
ca81d7a0 1975fi
8eeae1c9 1976
ba4481b5 1977
49adb60f 1978
ca81d7a0 1979# Check whether --with-xpm was given.
ba4481b5 1980if test "${with_xpm+set}" = set; then
ca81d7a0 1981 withval=$with_xpm;
00b9c927 1982else
c8467c40 1983 with_xpm=yes
ca81d7a0 1984fi
503d2be0 1985
ba4481b5 1986
ca81d7a0 1987# Check whether --with-jpeg was given.
ba4481b5 1988if test "${with_jpeg+set}" = set; then
ca81d7a0 1989 withval=$with_jpeg;
00b9c927 1990else
c8467c40 1991 with_jpeg=yes
ca81d7a0 1992fi
503d2be0 1993
ba4481b5 1994
ca81d7a0 1995# Check whether --with-tiff was given.
ba4481b5 1996if test "${with_tiff+set}" = set; then
ca81d7a0 1997 withval=$with_tiff;
00b9c927 1998else
c8467c40 1999 with_tiff=yes
ca81d7a0 2000fi
503d2be0 2001
ba4481b5 2002
ca81d7a0 2003# Check whether --with-gif was given.
ba4481b5 2004if test "${with_gif+set}" = set; then
ca81d7a0 2005 withval=$with_gif;
00b9c927 2006else
c8467c40 2007 with_gif=yes
ca81d7a0 2008fi
503d2be0 2009
ba4481b5 2010
ca81d7a0 2011# Check whether --with-png was given.
ba4481b5 2012if test "${with_png+set}" = set; then
ca81d7a0 2013 withval=$with_png;
00b9c927 2014else
c8467c40 2015 with_png=yes
ca81d7a0 2016fi
503d2be0 2017
ba4481b5 2018
0cfc0546
GM
2019# Check whether --with-rsvg was given.
2020if test "${with_rsvg+set}" = set; then
2021 withval=$with_rsvg;
00b9c927 2022else
c8467c40 2023 with_rsvg=yes
0cfc0546
GM
2024fi
2025
2026
c8467c40 2027
c24fa7dc 2028# Check whether --with-freetype was given.
45a4b03e 2029if test "${with_freetype+set}" = set; then
c24fa7dc 2030 withval=$with_freetype;
d235ca2f 2031else
4efcc8d1 2032 with_freetype=yes
c24fa7dc 2033fi
45a4b03e 2034
45a4b03e 2035
c24fa7dc 2036# Check whether --with-xft was given.
45a4b03e 2037if test "${with_xft+set}" = set; then
c24fa7dc 2038 withval=$with_xft;
d235ca2f 2039else
4efcc8d1 2040 with_xft=yes
c24fa7dc 2041fi
45a4b03e 2042
45a4b03e 2043
d235ca2f
MB
2044# Check whether --with-libotf was given.
2045if test "${with_libotf+set}" = set; then
2046 withval=$with_libotf;
2047else
2048 with_libotf=yes
79011b82
NR
2049fi
2050
2051
d235ca2f
MB
2052# Check whether --with-m17n-flt was given.
2053if test "${with_m17n_flt+set}" = set; then
2054 withval=$with_m17n_flt;
2055else
2056 with_m17n_flt=yes
0cfc0546
GM
2057fi
2058
2059
d235ca2f 2060
ca81d7a0 2061# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2062if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2063 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2064else
2065 with_toolkit_scroll_bars=yes
ca81d7a0 2066fi
503d2be0 2067
ba4481b5 2068
e35a28cd
TTN
2069# Check whether --with-xaw3d was given.
2070if test "${with_xaw3d+set}" = set; then
2071 withval=$with_xaw3d;
00b9c927
MO
2072else
2073 with_xaw3d=yes
c982cf7d
JD
2074fi
2075
2076
ca81d7a0 2077# Check whether --with-xim was given.
1d36487c 2078if test "${with_xim+set}" = set; then
ca81d7a0 2079 withval=$with_xim;
00b9c927
MO
2080else
2081 with_xim=yes
ca81d7a0 2082fi
1d36487c 2083
ba4481b5 2084
edfda783
AR
2085# Check whether --with-ns was given.
2086if test "${with_ns+set}" = set; then
2087 withval=$with_ns;
2088else
2089 with_ns=no
2090fi
2091
2092
c8467c40
GM
2093
2094# Check whether --with-gpm was given.
2095if test "${with_gpm+set}" = set; then
2096 withval=$with_gpm;
2097else
2098 with_gpm=yes
ca81d7a0 2099fi
e0f712ba 2100
49adb60f 2101
131e4133
MA
2102# Check whether --with-dbus was given.
2103if test "${with_dbus+set}" = set; then
2104 withval=$with_dbus;
00b9c927 2105else
b5a922de 2106 with_dbus=yes
131e4133
MA
2107fi
2108
2109
921fbdf0
GM
2110## For the times when you want to build Emacs but don't have
2111## a suitable makeinfo, and can live without the manuals.
2112
2113# Check whether --with-makeinfo was given.
2114if test "${with_makeinfo+set}" = set; then
2115 withval=$with_makeinfo;
2116else
2117 with_makeinfo=yes
2118fi
2119
2120
e70b2110 2121
9d2818d6
DN
2122# Check whether --with-gtk was given.
2123if test "${with_gtk+set}" = set; then
2124 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2125specify a toolkit." >&5
2126echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2127specify a toolkit." >&2;}
2128 { (exit 1); exit 1; }; }
2129fi
2130
2131
2132
2133# Check whether --with-gcc was given.
2134if test "${with_gcc+set}" = set; then
2135 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
2136 variable to specify a compiler." >&5
2137echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
2138 variable to specify a compiler." >&2;}
2139 { (exit 1); exit 1; }; }
2140fi
2141
2142
2143
00b9c927
MO
2144# Check whether --with-pkg-config-prog was given.
2145if test "${with_pkg_config_prog+set}" = set; then
2146 withval=$with_pkg_config_prog;
e70b2110
KH
2147fi
2148
00b9c927
MO
2149if test "X${with_pkg_config_prog}" != X; then
2150 if test "${with_pkg_config_prog}" != yes; then
2151 PKG_CONFIG="${with_pkg_config_prog}"
2152 fi
2153fi
e70b2110 2154
edfda783
AR
2155# Check whether --enable-cocoa-experimental-ctrl-g was given.
2156if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
2157 enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=yes
2158else
2159 EN_COCOA_EXPERIMENTAL_CTRL_G=no
2160fi
2161
2162
06b62770
AR
2163# Check whether --enable-ns-self-contained was given.
2164if test "${enable_ns_self_contained+set}" = set; then
2165 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=no
2166else
2167 EN_NS_SELF_CONTAINED=yes
2168fi
2169
2170
c24fa7dc 2171# Check whether --enable-asserts was given.
d0098f13 2172if test "${enable_asserts+set}" = set; then
ca81d7a0 2173 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2174else
2175 USE_XASSERTS=no
ca81d7a0 2176fi
8eeae1c9 2177
d0098f13 2178
ca81d7a0 2179# Check whether --enable-maintainer-mode was given.
19650fd6 2180if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2181 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2182else
2183 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2184fi
2185
19650fd6
AS
2186if test $USE_MAINTAINER_MODE = yes; then
2187 MAINT=
2188else
2189 MAINT=#
2190fi
2191
2192
ca81d7a0 2193# Check whether --enable-locallisppath was given.
9adfabc2 2194if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2195 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2196 locallisppath=
2197elif test "${enableval}" != "yes"; then
2198 locallisppath=${enableval}
2199fi
ca81d7a0
JD
2200fi
2201
9adfabc2 2202
ba4481b5 2203#### Make srcdir absolute, if it isn't already. It's important to
17494071 2204#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2205#### give you automounter prefixes, which can go away. We do all this
2206#### so Emacs can find its files when run uninstalled.
17494071
GM
2207## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2208unset CDPATH
ba4481b5
DL
2209case "${srcdir}" in
2210 /* ) ;;
2211 . )
2212 ## We may be able to use the $PWD environment variable to make this
2213 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2214 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2215 ## but that tested only for a well-formed and valid PWD,
2216 ## it did not object when PWD was well-formed and valid but just wrong.
2217 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2218 then
2219 srcdir="$PWD"
2220 else
2221 srcdir="`(cd ${srcdir}; pwd)`"
2222 fi
2223 ;;
2224 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2225esac
2226
2227#### Check if the source directory already has a configured system in it.
2228if test `pwd` != `(cd ${srcdir} && pwd)` \
2229 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2230 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2231 as a build directory right now; it has been configured in its own
2232 right. To configure in another directory as well, you MUST
2233 use GNU make. If you do not have GNU make, then you must
2234 now do \`make distclean' in ${srcdir},
2235 and then run $0 again." >&5
2236echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2237 as a build directory right now; it has been configured in its own
2238 right. To configure in another directory as well, you MUST
2239 use GNU make. If you do not have GNU make, then you must
2240 now do \`make distclean' in ${srcdir},
503d2be0 2241 and then run $0 again." >&2;}
ba4481b5
DL
2242fi
2243
2244#### Given the configuration name, set machfile and opsysfile to the
2245#### names of the m/*.h and s/*.h files we should use.
2246
2247### Canonicalize the configuration name.
2248
2249ac_aux_dir=
ca81d7a0
JD
2250for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2251 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2252 ac_aux_dir=$ac_dir
2253 ac_install_sh="$ac_aux_dir/install-sh -c"
2254 break
ca81d7a0 2255 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2256 ac_aux_dir=$ac_dir
2257 ac_install_sh="$ac_aux_dir/install.sh -c"
2258 break
ca81d7a0 2259 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2260 ac_aux_dir=$ac_dir
2261 ac_install_sh="$ac_aux_dir/shtool install -c"
2262 break
ba4481b5
DL
2263 fi
2264done
2265if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2266 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2267echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2268 { (exit 1); exit 1; }; }
ba4481b5 2269fi
ca81d7a0
JD
2270
2271# These three variables are undocumented and unsupported,
2272# and are intended to be withdrawn in a future Autoconf release.
2273# They can cause serious problems if a builder's source tree is in a directory
2274# whose full name contains unusual characters.
2275ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2276ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2277ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2278
ba4481b5
DL
2279
2280# Make sure we can run config.sub.
ca81d7a0
JD
2281$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2282 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2283echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2284 { (exit 1); exit 1; }; }
2285
ca81d7a0
JD
2286{ echo "$as_me:$LINENO: checking build system type" >&5
2287echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2288if test "${ac_cv_build+set}" = set; then
2289 echo $ECHO_N "(cached) $ECHO_C" >&6
2290else
ca81d7a0
JD
2291 ac_build_alias=$build_alias
2292test "x$ac_build_alias" = x &&
2293 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2294test "x$ac_build_alias" = x &&
c0d27fcc 2295 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2296echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2297 { (exit 1); exit 1; }; }
ca81d7a0
JD
2298ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2299 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2300echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2301 { (exit 1); exit 1; }; }
2302
2303fi
ca81d7a0
JD
2304{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2305echo "${ECHO_T}$ac_cv_build" >&6; }
2306case $ac_cv_build in
2307*-*-*) ;;
2308*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2309echo "$as_me: error: invalid value of canonical build" >&2;}
2310 { (exit 1); exit 1; }; };;
2311esac
503d2be0 2312build=$ac_cv_build
ca81d7a0
JD
2313ac_save_IFS=$IFS; IFS='-'
2314set x $ac_cv_build
2315shift
2316build_cpu=$1
2317build_vendor=$2
2318shift; shift
2319# Remember, the first character of IFS is used to create $*,
2320# except with old shells:
2321build_os=$*
2322IFS=$ac_save_IFS
2323case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2324
2325
2326{ echo "$as_me:$LINENO: checking host system type" >&5
2327echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2328if test "${ac_cv_host+set}" = set; then
2329 echo $ECHO_N "(cached) $ECHO_C" >&6
2330else
ca81d7a0
JD
2331 if test "x$host_alias" = x; then
2332 ac_cv_host=$ac_cv_build
2333else
2334 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2335 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2336echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2337 { (exit 1); exit 1; }; }
ca81d7a0 2338fi
503d2be0
AS
2339
2340fi
ca81d7a0
JD
2341{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2342echo "${ECHO_T}$ac_cv_host" >&6; }
2343case $ac_cv_host in
2344*-*-*) ;;
2345*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2346echo "$as_me: error: invalid value of canonical host" >&2;}
2347 { (exit 1); exit 1; }; };;
2348esac
503d2be0 2349host=$ac_cv_host
ca81d7a0
JD
2350ac_save_IFS=$IFS; IFS='-'
2351set x $ac_cv_host
2352shift
2353host_cpu=$1
2354host_vendor=$2
2355shift; shift
2356# Remember, the first character of IFS is used to create $*,
2357# except with old shells:
2358host_os=$*
2359IFS=$ac_save_IFS
2360case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2361
c0d27fcc 2362
ba4481b5 2363canonical=$host
1770dcdc 2364configuration=${host_alias-${build_alias-$host}}
ba4481b5 2365
c0d27fcc 2366
22044edf 2367
ba4481b5
DL
2368### If you add support for a new configuration, add code to this
2369### switch statement to recognize your configuration name and select
2370### the appropriate operating system and machine description files.
2371
2372### You would hope that you could choose an m/*.h file pretty much
2373### based on the machine portion of the configuration name, and an s-
2374### file based on the operating system portion. However, it turns out
2375### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2376### example mips.h is MIPS
2377### So we basically have to have a special case for each
ba4481b5
DL
2378### configuration name.
2379###
2380### As far as handling version numbers on operating systems is
2381### concerned, make sure things will fail in a fixable way. If
2382### /etc/MACHINES doesn't say anything about version numbers, be
2383### prepared to handle anything reasonably. If version numbers
2384### matter, be sure /etc/MACHINES says something about it.
2385###
2386### Eric Raymond says we should accept strings like "sysvr4" to mean
2387### "System V Release 4"; he writes, "The old convention encouraged
2388### confusion between `system' and `release' levels'."
2389
2390machine='' opsys='' unported=no
2391case "${canonical}" in
2392
1096bcc0 2393 ## FreeBSD ports
6b0273cd 2394 *-*-freebsd* )
1096bcc0
GM
2395 opsys=freebsd
2396 case "${canonical}" in
2397 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2398 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2399 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2400 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2401 sparc64-*-freebsd*) machine=sparc ;;
2402 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2403 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2404 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2405 esac
2406 ;;
2407
1b275743
GM
2408 ## FreeBSD kernel + glibc based userland
2409 *-*-kfreebsd*gnu* )
2410 opsys=gnu-kfreebsd
2411 case "${canonical}" in
2412 alpha*-*-kfreebsd*) machine=alpha ;;
2413 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2414 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2415 sparc64-*-kfreebsd*) machine=sparc ;;
2416 powerpc-*-kfreebsd*) machine=macppc ;;
2417 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2418 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2419 esac
2420 ;;
2421
ba4481b5
DL
2422 ## NetBSD ports
2423 *-*-netbsd* )
2424 opsys=netbsd
dd038e26 2425 if test -f /usr/lib/crti.o; then
f57bd967
DL
2426
2427cat >>confdefs.h <<\_ACEOF
2428#define HAVE_CRTIN
dd038e26
AS
2429_ACEOF
2430
2431 fi
2432
ba4481b5
DL
2433 case "${canonical}" in
2434 alpha*-*-netbsd*) machine=alpha ;;
2435 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2436 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2437 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2438 vax-*-netbsd*) machine=vax ;;
2df636f4 2439 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2440 x86_64-*-netbsd*) machine=amdx86-64 ;;
2441 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2442 esac
2443 ;;
2444
2445 ## OpenBSD ports
2446 *-*-openbsd* )
2447 opsys=openbsd
2448 case "${canonical}" in
2449 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2450 arm-*-openbsd*) machine=arm ;;
85410b02 2451 i386-*-openbsd*) machine=intel386 ;;
85410b02 2452 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2453 sparc*-*-openbsd*) machine=sparc ;;
2454 vax-*-openbsd*) machine=vax ;;
2455 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2456 esac
2457 ;;
2458
10a3b1a1
EZ
2459 ## LynxOS ports
2460 *-*-lynxos* )
2461 opsys=lynxos
2462 case "${canonical}" in
2463 i[3456]86-*-lynxos*) machine=intel386 ;;
2464 powerpc-*-lynxos*) machine=powerpc ;;
2465 esac
2466 ;;
2467
ba4481b5
DL
2468 alpha*-*-linux-gnu* )
2469 machine=alpha opsys=gnu-linux
2470 ;;
2471
c4bb2108
DL
2472 arm*-*-linux-gnu* )
2473 machine=arm opsys=gnu-linux
2474 ;;
2475
040c474e
CY
2476 ## Apple Darwin / Mac OS X
2477 *-apple-darwin* )
2478 case "${canonical}" in
2479 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2480 powerpc-* ) machine=macppc ;;
040c474e
CY
2481 * ) unported=yes ;;
2482 esac
2483 opsys=darwin
2484 # Define CPP as follows to make autoconf work correctly.
2485 CPP="${CC-cc} -E -no-cpp-precomp"
2486 # Use fink packages if available.
2487 if test -d /sw/include && test -d /sw/lib; then
2488 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2489 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2490 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2491 fi
2492 ;;
2493
6fbb6db1 2494 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2495 hppa*-hp-hpux10.2* )
2496 machine=hp800 opsys=hpux10-20
2497 ;;
6fbb6db1
GM
2498 hppa*-hp-hpux1[1-9]* )
2499 machine=hp800 opsys=hpux11
2500 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2501 ;;
2502
409d9577
GM
2503 hppa*-*-linux-gnu* )
2504 machine=hp800 opsys=gnu-linux
2505 ;;
2506
ba4481b5 2507 ## IBM machines
55597d70 2508 s390-*-linux-gnu* )
138f0859
GM
2509 machine=ibms390 opsys=gnu-linux
2510 ;;
bcdb1378
EZ
2511 s390x-*-linux-gnu* )
2512 machine=ibms390x opsys=gnu-linux
2513 ;;
ba4481b5
DL
2514 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2515 machine=ibmrs6000 opsys=aix4-2
2516 ;;
67bf991b
CY
2517 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2518 machine=ibmrs6000 opsys=aix4-2
2519 ;;
55597d70 2520 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2521 machine=ibmrs6000 opsys=aix4-2
2522 ;;
26a42dac
DN
2523 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2524 machine=ibmrs6000 opsys=aix4-2
2525 ;;
ba4481b5 2526
c76e04a8
GM
2527 ## Macintosh PowerPC
2528 powerpc*-*-linux-gnu* )
2529 machine=macppc opsys=gnu-linux
2530 ;;
2531
ba4481b5 2532 ## Silicon Graphics machines
ba4481b5 2533 ## Iris 4D
ba4481b5
DL
2534 mips-sgi-irix6.5 )
2535 machine=iris4d opsys=irix6-5
946173ad
DL
2536 # Without defining _LANGUAGE_C, things get masked out in the headers
2537 # so that, for instance, grepping for `free' in stdlib.h fails and
2538 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2539 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2540 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2541 ;;
ba4481b5 2542
ba4481b5
DL
2543 ## Suns
2544 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2545 machine=sparc opsys=gnu-linux
2546 ;;
2547
176fe5fc 2548 *-sun-solaris* \
ba4481b5
DL
2549 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2550 | rs6000-*-solaris2*)
2551 case "${canonical}" in
ba4481b5 2552 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2553 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2554 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2555 sparc* ) machine=sparc ;;
2556 * ) unported=yes ;;
2557 esac
2558 case "${canonical}" in
ba4481b5
DL
2559 *-sunos5.3* | *-solaris2.3* )
2560 opsys=sol2-3
2561 NON_GNU_CPP=/usr/ccs/lib/cpp
2562 ;;
2563 *-sunos5.4* | *-solaris2.4* )
2564 opsys=sol2-4
2565 NON_GNU_CPP=/usr/ccs/lib/cpp
2566 RANLIB="ar -ts"
2567 ;;
2568 *-sunos5.5* | *-solaris2.5* )
2569 opsys=sol2-5
2570 NON_GNU_CPP=/usr/ccs/lib/cpp
2571 RANLIB="ar -ts"
2572 ;;
8e967cf7
MR
2573 *-sunos5.6* | *-solaris2.6* )
2574 opsys=sol2-6
2575 NON_GNU_CPP=/usr/ccs/lib/cpp
2576 RANLIB="ar -ts"
2577 ;;
ba4481b5 2578 *-sunos5* | *-solaris* )
9e71690e 2579 opsys=sol2-6
089a966d
GM
2580 emacs_check_sunpro_c=yes
2581 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2582 ;;
ba4481b5
DL
2583 esac
2584 ## Watch out for a compiler that we know will not work.
2585 case "${canonical}" in
2586 *-solaris* | *-sunos5* )
2587 if [ "x$CC" = x/usr/ucb/cc ]; then
2588 ## /usr/ucb/cc doesn't work;
2589 ## we should find some other compiler that does work.
2590 unset CC
2591 fi
2592 ;;
2593 *) ;;
2594 esac
2595 ;;
ba4481b5 2596
ba4481b5
DL
2597 ## Vaxen.
2598 vax-dec-* )
2599 machine=vax
2600 case "${canonical}" in
ba4481b5
DL
2601 *-vms* ) opsys=vms ;;
2602 * ) unported=yes
2603 esac
2604 ;;
2605
f4988be7
GM
2606 ## IA-64
2607 ia64*-*-linux* )
2608 machine=ia64 opsys=gnu-linux
2609 ;;
2610
ba4481b5
DL
2611 ## Intel 386 machines where we don't care about the manufacturer
2612 i[3456]86-*-* )
2613 machine=intel386
2614 case "${canonical}" in
c60ee5e7 2615 *-cygwin ) opsys=cygwin ;;
eae54018 2616 *-darwin* ) opsys=darwin
23fd4483
ST
2617 CPP="${CC-cc} -E -no-cpp-precomp"
2618 ;;
ba4481b5 2619 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2620 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2621 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2622 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2623 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2624 esac
2625 ;;
2626
2627 ## m68k Linux-based GNU system
2628 m68k-*-linux-gnu* )
2629 machine=m68k opsys=gnu-linux
2630 ;;
2631
2632 ## Mips Linux-based GNU system
cd958eb3 2633 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2634 machine=mips opsys=gnu-linux
2635 ;;
2636
598a2813
AS
2637 ## AMD x86-64 Linux-based GNU system
2638 x86_64-*-linux-gnu* )
24b01ec4 2639 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2640 ;;
2641
94218e27 2642 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2643 xtensa*-*-linux-gnu* )
94218e27
DN
2644 machine=xtensa opsys=gnu-linux
2645 ;;
2646
ba4481b5
DL
2647 * )
2648 unported=yes
2649 ;;
2650esac
2651
2652### If the code above didn't choose an operating system, just choose
2653### an operating system based on the configuration name. You really
2654### only want to use this when you have no idea what the right
2655### operating system is; if you know what operating systems a machine
2656### runs, it's cleaner to make it explicit in the case statement
2657### above.
2658if test x"${opsys}" = x; then
2659 case "${canonical}" in
2660 *-gnu* ) opsys=gnu ;;
ba4481b5 2661 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2662 *-sysv5uw* ) opsys=unixware ;;
2663 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2664 *-sysv4.1* | *-sysvr4.1* )
2665 NON_GNU_CPP=/usr/lib/cpp
2666 opsys=usg5-4 ;;
2667 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2668 if [ x$NON_GNU_CPP = x ]; then
2669 if [ -f /usr/ccs/lib/cpp ]; then
2670 NON_GNU_CPP=/usr/ccs/lib/cpp
2671 else
2672 NON_GNU_CPP=/lib/cpp
2673 fi
2674 fi
2675 opsys=usg5-4-2 ;;
2676 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2677 * )
2678 unported=yes
2679 ;;
2680 esac
2681fi
2682
c0d27fcc 2683
22044edf 2684
ba4481b5 2685if test $unported = yes; then
c0d27fcc 2686 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2687Check \`etc/MACHINES' for recognized configuration names." >&5
2688echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2689Check \`etc/MACHINES' for recognized configuration names." >&2;}
2690 { (exit 1); exit 1; }; }
ba4481b5
DL
2691fi
2692
2693machfile="m/${machine}.h"
2694opsysfile="s/${opsys}.h"
2695
c0d27fcc 2696
ba4481b5
DL
2697#### Choose a compiler.
2698test -n "$CC" && cc_specified=yes
2699
2700# Save the value of CFLAGS that the user specified.
2701SPECIFIED_CFLAGS="$CFLAGS"
2702
503d2be0
AS
2703ac_ext=c
2704ac_cpp='$CPP $CPPFLAGS'
2705ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2706ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2707ac_compiler_gnu=$ac_cv_c_compiler_gnu
2708if test -n "$ac_tool_prefix"; then
2709 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2710set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2711{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2712echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2713if test "${ac_cv_prog_CC+set}" = set; then
2714 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2715else
2716 if test -n "$CC"; then
2717 ac_cv_prog_CC="$CC" # Let the user override the test.
2718else
c0d27fcc
MR
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2725 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2726 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2727 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
503d2be0 2731done
ca81d7a0 2732IFS=$as_save_IFS
503d2be0 2733
ba4481b5
DL
2734fi
2735fi
503d2be0 2736CC=$ac_cv_prog_CC
ba4481b5 2737if test -n "$CC"; then
ca81d7a0
JD
2738 { echo "$as_me:$LINENO: result: $CC" >&5
2739echo "${ECHO_T}$CC" >&6; }
503d2be0 2740else
ca81d7a0
JD
2741 { echo "$as_me:$LINENO: result: no" >&5
2742echo "${ECHO_T}no" >&6; }
503d2be0
AS
2743fi
2744
ca81d7a0 2745
503d2be0
AS
2746fi
2747if test -z "$ac_cv_prog_CC"; then
2748 ac_ct_CC=$CC
2749 # Extract the first word of "gcc", so it can be a program name with args.
2750set dummy gcc; ac_word=$2
ca81d7a0
JD
2751{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2753if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2754 echo $ECHO_N "(cached) $ECHO_C" >&6
2755else
2756 if test -n "$ac_ct_CC"; then
2757 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2758else
c0d27fcc
MR
2759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2760for as_dir in $PATH
2761do
2762 IFS=$as_save_IFS
2763 test -z "$as_dir" && as_dir=.
2764 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2765 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2766 ac_cv_prog_ac_ct_CC="gcc"
2767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2768 break 2
2769 fi
2770done
503d2be0 2771done
ca81d7a0 2772IFS=$as_save_IFS
503d2be0
AS
2773
2774fi
2775fi
2776ac_ct_CC=$ac_cv_prog_ac_ct_CC
2777if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2778 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2779echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2780else
ca81d7a0
JD
2781 { echo "$as_me:$LINENO: result: no" >&5
2782echo "${ECHO_T}no" >&6; }
503d2be0
AS
2783fi
2784
ca81d7a0
JD
2785 if test "x$ac_ct_CC" = x; then
2786 CC=""
2787 else
2788 case $cross_compiling:$ac_tool_warned in
2789yes:)
2790{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2791whose name does not start with the host triplet. If you think this
2792configuration is useful to you, please write to autoconf@gnu.org." >&5
2793echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2794whose name does not start with the host triplet. If you think this
2795configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2796ac_tool_warned=yes ;;
2797esac
2798 CC=$ac_ct_CC
2799 fi
503d2be0
AS
2800else
2801 CC="$ac_cv_prog_CC"
ba4481b5
DL
2802fi
2803
2804if test -z "$CC"; then
ca81d7a0
JD
2805 if test -n "$ac_tool_prefix"; then
2806 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2807set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2808{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2809echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2810if test "${ac_cv_prog_CC+set}" = set; then
2811 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2812else
2813 if test -n "$CC"; then
2814 ac_cv_prog_CC="$CC" # Let the user override the test.
2815else
c0d27fcc
MR
2816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2817for as_dir in $PATH
2818do
2819 IFS=$as_save_IFS
2820 test -z "$as_dir" && as_dir=.
2821 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2822 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2823 ac_cv_prog_CC="${ac_tool_prefix}cc"
2824 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2825 break 2
2826 fi
2827done
503d2be0 2828done
ca81d7a0 2829IFS=$as_save_IFS
503d2be0
AS
2830
2831fi
2832fi
2833CC=$ac_cv_prog_CC
2834if test -n "$CC"; then
ca81d7a0
JD
2835 { echo "$as_me:$LINENO: result: $CC" >&5
2836echo "${ECHO_T}$CC" >&6; }
503d2be0 2837else
ca81d7a0
JD
2838 { echo "$as_me:$LINENO: result: no" >&5
2839echo "${ECHO_T}no" >&6; }
503d2be0
AS
2840fi
2841
503d2be0 2842
ca81d7a0 2843 fi
503d2be0
AS
2844fi
2845if test -z "$CC"; then
2846 # Extract the first word of "cc", so it can be a program name with args.
2847set dummy cc; ac_word=$2
ca81d7a0
JD
2848{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2849echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2850if test "${ac_cv_prog_CC+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2852else
2853 if test -n "$CC"; then
2854 ac_cv_prog_CC="$CC" # Let the user override the test.
2855else
2856 ac_prog_rejected=no
c0d27fcc
MR
2857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2858for as_dir in $PATH
2859do
2860 IFS=$as_save_IFS
2861 test -z "$as_dir" && as_dir=.
2862 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2863 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2864 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2865 ac_prog_rejected=yes
2866 continue
2867 fi
2868 ac_cv_prog_CC="cc"
2869 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2870 break 2
2871 fi
2872done
503d2be0 2873done
ca81d7a0 2874IFS=$as_save_IFS
503d2be0 2875
ba4481b5
DL
2876if test $ac_prog_rejected = yes; then
2877 # We found a bogon in the path, so make sure we never use it.
2878 set dummy $ac_cv_prog_CC
2879 shift
503d2be0 2880 if test $# != 0; then
ba4481b5
DL
2881 # We chose a different compiler from the bogus one.
2882 # However, it has the same basename, so the bogon will be chosen
2883 # first if we set CC to just the basename; use the full file name.
2884 shift
6bae0ccf 2885 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2886 fi
2887fi
2888fi
2889fi
503d2be0 2890CC=$ac_cv_prog_CC
ba4481b5 2891if test -n "$CC"; then
ca81d7a0
JD
2892 { echo "$as_me:$LINENO: result: $CC" >&5
2893echo "${ECHO_T}$CC" >&6; }
ba4481b5 2894else
ca81d7a0
JD
2895 { echo "$as_me:$LINENO: result: no" >&5
2896echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2897fi
2898
ca81d7a0 2899
503d2be0
AS
2900fi
2901if test -z "$CC"; then
2902 if test -n "$ac_tool_prefix"; then
ca81d7a0 2903 for ac_prog in cl.exe
503d2be0
AS
2904 do
2905 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2906set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2907{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2908echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2909if test "${ac_cv_prog_CC+set}" = set; then
2910 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2911else
2912 if test -n "$CC"; then
2913 ac_cv_prog_CC="$CC" # Let the user override the test.
2914else
c0d27fcc
MR
2915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2916for as_dir in $PATH
2917do
2918 IFS=$as_save_IFS
2919 test -z "$as_dir" && as_dir=.
2920 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2921 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2922 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2923 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2924 break 2
2925 fi
2926done
503d2be0 2927done
ca81d7a0 2928IFS=$as_save_IFS
503d2be0 2929
c4bb2108
DL
2930fi
2931fi
503d2be0 2932CC=$ac_cv_prog_CC
c4bb2108 2933if test -n "$CC"; then
ca81d7a0
JD
2934 { echo "$as_me:$LINENO: result: $CC" >&5
2935echo "${ECHO_T}$CC" >&6; }
c4bb2108 2936else
ca81d7a0
JD
2937 { echo "$as_me:$LINENO: result: no" >&5
2938echo "${ECHO_T}no" >&6; }
503d2be0
AS
2939fi
2940
ca81d7a0 2941
503d2be0
AS
2942 test -n "$CC" && break
2943 done
2944fi
2945if test -z "$CC"; then
2946 ac_ct_CC=$CC
ca81d7a0 2947 for ac_prog in cl.exe
503d2be0
AS
2948do
2949 # Extract the first word of "$ac_prog", so it can be a program name with args.
2950set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2951{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2952echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2953if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2954 echo $ECHO_N "(cached) $ECHO_C" >&6
2955else
2956 if test -n "$ac_ct_CC"; then
2957 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2958else
c0d27fcc
MR
2959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2960for as_dir in $PATH
2961do
2962 IFS=$as_save_IFS
2963 test -z "$as_dir" && as_dir=.
2964 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2965 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2966 ac_cv_prog_ac_ct_CC="$ac_prog"
2967 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2968 break 2
2969 fi
2970done
503d2be0 2971done
ca81d7a0 2972IFS=$as_save_IFS
503d2be0 2973
c4bb2108 2974fi
503d2be0
AS
2975fi
2976ac_ct_CC=$ac_cv_prog_ac_ct_CC
2977if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2978 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2979echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 2980else
ca81d7a0
JD
2981 { echo "$as_me:$LINENO: result: no" >&5
2982echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2983fi
2984
ca81d7a0 2985
503d2be0
AS
2986 test -n "$ac_ct_CC" && break
2987done
ba4481b5 2988
ca81d7a0
JD
2989 if test "x$ac_ct_CC" = x; then
2990 CC=""
2991 else
2992 case $cross_compiling:$ac_tool_warned in
2993yes:)
2994{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2995whose name does not start with the host triplet. If you think this
2996configuration is useful to you, please write to autoconf@gnu.org." >&5
2997echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2998whose name does not start with the host triplet. If you think this
2999configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3000ac_tool_warned=yes ;;
3001esac
3002 CC=$ac_ct_CC
3003 fi
503d2be0
AS
3004fi
3005
3006fi
ba4481b5 3007
c0d27fcc 3008
19650fd6
AS
3009test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3010See \`config.log' for more details." >&5
3011echo "$as_me: error: no acceptable C compiler found in \$PATH
3012See \`config.log' for more details." >&2;}
503d2be0 3013 { (exit 1); exit 1; }; }
c4bb2108 3014
503d2be0 3015# Provide some information about the compiler.
ca81d7a0 3016echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3017ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3018{ (ac_try="$ac_compiler --version >&5"
3019case "(($ac_try" in
3020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021 *) ac_try_echo=$ac_try;;
3022esac
3023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3024 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3025 ac_status=$?
c0d27fcc 3026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3027 (exit $ac_status); }
ca81d7a0
JD
3028{ (ac_try="$ac_compiler -v >&5"
3029case "(($ac_try" in
3030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3031 *) ac_try_echo=$ac_try;;
3032esac
3033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3034 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3035 ac_status=$?
c0d27fcc 3036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3037 (exit $ac_status); }
ca81d7a0
JD
3038{ (ac_try="$ac_compiler -V >&5"
3039case "(($ac_try" in
3040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3041 *) ac_try_echo=$ac_try;;
3042esac
3043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3044 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3045 ac_status=$?
c0d27fcc 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3047 (exit $ac_status); }
3048
3049cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3050/* confdefs.h. */
3051_ACEOF
3052cat confdefs.h >>conftest.$ac_ext
3053cat >>conftest.$ac_ext <<_ACEOF
3054/* end confdefs.h. */
c4bb2108 3055
503d2be0
AS
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064ac_clean_files_save=$ac_clean_files
19650fd6 3065ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3066# Try to create an executable without -o first, disregard a.out.
3067# It will help us diagnose broken compilers, and finding out an intuition
3068# of exeext.
ca81d7a0
JD
3069{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3070echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3071ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3072#
3073# List of possible output files, starting from the most likely.
3074# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3075# only as a last resort. b.out is created by i960 compilers.
3076ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3077#
3078# The IRIX 6 linker writes into existing files which may not be
3079# executable, retaining their permissions. Remove them first so a
3080# subsequent execution test works.
3081ac_rmfiles=
3082for ac_file in $ac_files
3083do
3084 case $ac_file in
3085 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3086 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3087 esac
3088done
3089rm -f $ac_rmfiles
3090
3091if { (ac_try="$ac_link_default"
3092case "(($ac_try" in
3093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3094 *) ac_try_echo=$ac_try;;
3095esac
3096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3097 (eval "$ac_link_default") 2>&5
503d2be0 3098 ac_status=$?
c0d27fcc 3099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3100 (exit $ac_status); }; then
ca81d7a0
JD
3101 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3102# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3103# in a Makefile. We should not override ac_cv_exeext if it was cached,
3104# so that the user can short-circuit this test for compilers unknown to
3105# Autoconf.
f053c89f 3106for ac_file in $ac_files ''
19650fd6 3107do
6bae0ccf 3108 test -f "$ac_file" || continue
503d2be0 3109 case $ac_file in
ca81d7a0 3110 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3111 ;;
19650fd6 3112 [ab].out )
edfaf76d
LK
3113 # We found the default executable, but exeext='' is most
3114 # certainly right.
3115 break;;
19650fd6 3116 *.* )
ca81d7a0
JD
3117 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3118 then :; else
3119 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3120 fi
3121 # We set ac_cv_exeext here because the later test for it is not
3122 # safe: cross compilers may not add the suffix if given an `-o'
3123 # argument, so we may need to know it at that point already.
3124 # Even if this section looks crufty: it has the advantage of
3125 # actually working.
edfaf76d 3126 break;;
19650fd6 3127 * )
edfaf76d 3128 break;;
503d2be0
AS
3129 esac
3130done
ca81d7a0
JD
3131test "$ac_cv_exeext" = no && ac_cv_exeext=
3132
503d2be0 3133else
f053c89f
CY
3134 ac_file=''
3135fi
3136
3137{ echo "$as_me:$LINENO: result: $ac_file" >&5
3138echo "${ECHO_T}$ac_file" >&6; }
3139if test -z "$ac_file"; then
503d2be0 3140 echo "$as_me: failed program was:" >&5
19650fd6
AS
3141sed 's/^/| /' conftest.$ac_ext >&5
3142
6bae0ccf 3143{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3144See \`config.log' for more details." >&5
6bae0ccf 3145echo "$as_me: error: C compiler cannot create executables
19650fd6 3146See \`config.log' for more details." >&2;}
503d2be0
AS
3147 { (exit 77); exit 77; }; }
3148fi
3149
3150ac_exeext=$ac_cv_exeext
503d2be0 3151
ca81d7a0 3152# Check that the compiler produces executables we can run. If not, either
503d2be0 3153# the compiler is broken, or we cross compile.
ca81d7a0
JD
3154{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3155echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3156# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3157# If not cross compiling, check that we can run a simple program.
3158if test "$cross_compiling" != yes; then
3159 if { ac_try='./$ac_file'
ca81d7a0
JD
3160 { (case "(($ac_try" in
3161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3162 *) ac_try_echo=$ac_try;;
3163esac
3164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3165 (eval "$ac_try") 2>&5
503d2be0 3166 ac_status=$?
c0d27fcc 3167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3168 (exit $ac_status); }; }; then
3169 cross_compiling=no
ba4481b5 3170 else
503d2be0
AS
3171 if test "$cross_compiling" = maybe; then
3172 cross_compiling=yes
3173 else
c0d27fcc 3174 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3175If you meant to cross compile, use \`--host'.
3176See \`config.log' for more details." >&5
503d2be0 3177echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3178If you meant to cross compile, use \`--host'.
3179See \`config.log' for more details." >&2;}
503d2be0
AS
3180 { (exit 1); exit 1; }; }
3181 fi
ba4481b5 3182 fi
503d2be0 3183fi
ca81d7a0
JD
3184{ echo "$as_me:$LINENO: result: yes" >&5
3185echo "${ECHO_T}yes" >&6; }
503d2be0 3186
19650fd6 3187rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3188ac_clean_files=$ac_clean_files_save
ca81d7a0 3189# Check that the compiler produces executables we can run. If not, either
503d2be0 3190# the compiler is broken, or we cross compile.
ca81d7a0
JD
3191{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3192echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3193{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3194echo "${ECHO_T}$cross_compiling" >&6; }
3195
3196{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3197echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3198if { (ac_try="$ac_link"
3199case "(($ac_try" in
3200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3201 *) ac_try_echo=$ac_try;;
3202esac
3203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3204 (eval "$ac_link") 2>&5
503d2be0 3205 ac_status=$?
c0d27fcc 3206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3207 (exit $ac_status); }; then
3208 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3209# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3210# work properly (i.e., refer to `conftest.exe'), while it won't with
3211# `rm'.
6bae0ccf
DL
3212for ac_file in conftest.exe conftest conftest.*; do
3213 test -f "$ac_file" || continue
503d2be0 3214 case $ac_file in
ca81d7a0 3215 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3216 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3217 break;;
503d2be0
AS
3218 * ) break;;
3219 esac
3220done
ba4481b5 3221else
19650fd6
AS
3222 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3223See \`config.log' for more details." >&5
3224echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3225See \`config.log' for more details." >&2;}
503d2be0 3226 { (exit 1); exit 1; }; }
ba4481b5 3227fi
ba4481b5 3228
503d2be0 3229rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3230{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3231echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3232
503d2be0
AS
3233rm -f conftest.$ac_ext
3234EXEEXT=$ac_cv_exeext
3235ac_exeext=$EXEEXT
ca81d7a0
JD
3236{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3237echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3238if test "${ac_cv_objext+set}" = set; then
3239 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3240else
503d2be0 3241 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3242/* confdefs.h. */
3243_ACEOF
3244cat confdefs.h >>conftest.$ac_ext
3245cat >>conftest.$ac_ext <<_ACEOF
3246/* end confdefs.h. */
ba4481b5 3247
503d2be0
AS
3248int
3249main ()
3250{
ba4481b5 3251
503d2be0
AS
3252 ;
3253 return 0;
3254}
3255_ACEOF
3256rm -f conftest.o conftest.obj
ca81d7a0
JD
3257if { (ac_try="$ac_compile"
3258case "(($ac_try" in
3259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3260 *) ac_try_echo=$ac_try;;
3261esac
3262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3263 (eval "$ac_compile") 2>&5
503d2be0 3264 ac_status=$?
c0d27fcc 3265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3266 (exit $ac_status); }; then
ca81d7a0
JD
3267 for ac_file in conftest.o conftest.obj conftest.*; do
3268 test -f "$ac_file" || continue;
503d2be0 3269 case $ac_file in
ca81d7a0 3270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3271 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3272 break;;
3273 esac
3274done
c4bb2108 3275else
503d2be0 3276 echo "$as_me: failed program was:" >&5
19650fd6
AS
3277sed 's/^/| /' conftest.$ac_ext >&5
3278
3279{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3280See \`config.log' for more details." >&5
3281echo "$as_me: error: cannot compute suffix of object files: cannot compile
3282See \`config.log' for more details." >&2;}
503d2be0 3283 { (exit 1); exit 1; }; }
c4bb2108
DL
3284fi
3285
503d2be0
AS
3286rm -f conftest.$ac_cv_objext conftest.$ac_ext
3287fi
ca81d7a0
JD
3288{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3289echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3290OBJEXT=$ac_cv_objext
3291ac_objext=$OBJEXT
ca81d7a0
JD
3292{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3293echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3294if test "${ac_cv_c_compiler_gnu+set}" = set; then
3295 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3296else
503d2be0 3297 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3298/* confdefs.h. */
3299_ACEOF
3300cat confdefs.h >>conftest.$ac_ext
3301cat >>conftest.$ac_ext <<_ACEOF
3302/* end confdefs.h. */
503d2be0
AS
3303
3304int
3305main ()
3306{
3307#ifndef __GNUC__
3308 choke me
3309#endif
3310
3311 ;
3312 return 0;
3313}
3314_ACEOF
3315rm -f conftest.$ac_objext
ca81d7a0
JD
3316if { (ac_try="$ac_compile"
3317case "(($ac_try" in
3318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3319 *) ac_try_echo=$ac_try;;
3320esac
3321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3322 (eval "$ac_compile") 2>conftest.er1
503d2be0 3323 ac_status=$?
edfaf76d
LK
3324 grep -v '^ *+' conftest.er1 >conftest.err
3325 rm -f conftest.er1
3326 cat conftest.err >&5
c0d27fcc 3327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3328 (exit $ac_status); } && {
3329 test -z "$ac_c_werror_flag" ||
3330 test ! -s conftest.err
3331 } && test -s conftest.$ac_objext; then
503d2be0
AS
3332 ac_compiler_gnu=yes
3333else
3334 echo "$as_me: failed program was:" >&5
19650fd6
AS
3335sed 's/^/| /' conftest.$ac_ext >&5
3336
ca81d7a0 3337 ac_compiler_gnu=no
503d2be0 3338fi
ca81d7a0
JD
3339
3340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3341ac_cv_c_compiler_gnu=$ac_compiler_gnu
3342
3343fi
ca81d7a0
JD
3344{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3345echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3346GCC=`test $ac_compiler_gnu = yes && echo yes`
3347ac_test_CFLAGS=${CFLAGS+set}
3348ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3349{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3350echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3351if test "${ac_cv_prog_cc_g+set}" = set; then
3352 echo $ECHO_N "(cached) $ECHO_C" >&6
3353else
ca81d7a0
JD
3354 ac_save_c_werror_flag=$ac_c_werror_flag
3355 ac_c_werror_flag=yes
3356 ac_cv_prog_cc_g=no
3357 CFLAGS="-g"
3358 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3359/* confdefs.h. */
3360_ACEOF
3361cat confdefs.h >>conftest.$ac_ext
3362cat >>conftest.$ac_ext <<_ACEOF
3363/* end confdefs.h. */
503d2be0
AS
3364
3365int
3366main ()
3367{
3368
3369 ;
3370 return 0;
3371}
3372_ACEOF
3373rm -f conftest.$ac_objext
ca81d7a0
JD
3374if { (ac_try="$ac_compile"
3375case "(($ac_try" in
3376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3377 *) ac_try_echo=$ac_try;;
3378esac
3379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3380 (eval "$ac_compile") 2>conftest.er1
503d2be0 3381 ac_status=$?
edfaf76d
LK
3382 grep -v '^ *+' conftest.er1 >conftest.err
3383 rm -f conftest.er1
3384 cat conftest.err >&5
c0d27fcc 3385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3386 (exit $ac_status); } && {
3387 test -z "$ac_c_werror_flag" ||
3388 test ! -s conftest.err
3389 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3390 ac_cv_prog_cc_g=yes
3391else
503d2be0 3392 echo "$as_me: failed program was:" >&5
19650fd6
AS
3393sed 's/^/| /' conftest.$ac_ext >&5
3394
ca81d7a0
JD
3395 CFLAGS=""
3396 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3397/* confdefs.h. */
3398_ACEOF
3399cat confdefs.h >>conftest.$ac_ext
3400cat >>conftest.$ac_ext <<_ACEOF
3401/* end confdefs.h. */
edfaf76d 3402
6bae0ccf
DL
3403int
3404main ()
3405{
ca81d7a0 3406
6bae0ccf
DL
3407 ;
3408 return 0;
3409}
3410_ACEOF
ca81d7a0
JD
3411rm -f conftest.$ac_objext
3412if { (ac_try="$ac_compile"
3413case "(($ac_try" in
3414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3415 *) ac_try_echo=$ac_try;;
3416esac
3417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3418 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3419 ac_status=$?
edfaf76d
LK
3420 grep -v '^ *+' conftest.er1 >conftest.err
3421 rm -f conftest.er1
3422 cat conftest.err >&5
edfaf76d 3423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3424 (exit $ac_status); } && {
3425 test -z "$ac_c_werror_flag" ||
3426 test ! -s conftest.err
3427 } && test -s conftest.$ac_objext; then
ca81d7a0 3428 :
6bae0ccf
DL
3429else
3430 echo "$as_me: failed program was:" >&5
19650fd6
AS
3431sed 's/^/| /' conftest.$ac_ext >&5
3432
ca81d7a0
JD
3433 ac_c_werror_flag=$ac_save_c_werror_flag
3434 CFLAGS="-g"
3435 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3436/* confdefs.h. */
19650fd6
AS
3437_ACEOF
3438cat confdefs.h >>conftest.$ac_ext
3439cat >>conftest.$ac_ext <<_ACEOF
3440/* end confdefs.h. */
ca81d7a0 3441
503d2be0
AS
3442int
3443main ()
3444{
ca81d7a0 3445
503d2be0
AS
3446 ;
3447 return 0;
3448}
3449_ACEOF
3450rm -f conftest.$ac_objext
ca81d7a0
JD
3451if { (ac_try="$ac_compile"
3452case "(($ac_try" in
3453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3454 *) ac_try_echo=$ac_try;;
3455esac
3456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3457 (eval "$ac_compile") 2>conftest.er1
503d2be0 3458 ac_status=$?
edfaf76d
LK
3459 grep -v '^ *+' conftest.er1 >conftest.err
3460 rm -f conftest.er1
3461 cat conftest.err >&5
c0d27fcc 3462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3463 (exit $ac_status); } && {
3464 test -z "$ac_c_werror_flag" ||
3465 test ! -s conftest.err
3466 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3467 ac_cv_prog_cc_g=yes
3468else
503d2be0 3469 echo "$as_me: failed program was:" >&5
19650fd6
AS
3470sed 's/^/| /' conftest.$ac_ext >&5
3471
ca81d7a0 3472
ba4481b5 3473fi
ca81d7a0
JD
3474
3475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3476fi
3477
3478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3479fi
3480
3481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3482 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3483fi
ca81d7a0
JD
3484{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3485echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3486if test "$ac_test_CFLAGS" = set; then
503d2be0 3487 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3488elif test $ac_cv_prog_cc_g = yes; then
3489 if test "$GCC" = yes; then
ba4481b5
DL
3490 CFLAGS="-g -O2"
3491 else
c4bb2108 3492 CFLAGS="-g"
ba4481b5 3493 fi
22afa6e8 3494else
c4bb2108
DL
3495 if test "$GCC" = yes; then
3496 CFLAGS="-O2"
3497 else
3498 CFLAGS=
3499 fi
ba4481b5 3500fi
ca81d7a0
JD
3501{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3502echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3503if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3504 echo $ECHO_N "(cached) $ECHO_C" >&6
3505else
ca81d7a0 3506 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3507ac_save_CC=$CC
3508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3509/* confdefs.h. */
3510_ACEOF
3511cat confdefs.h >>conftest.$ac_ext
3512cat >>conftest.$ac_ext <<_ACEOF
3513/* end confdefs.h. */
6bae0ccf
DL
3514#include <stdarg.h>
3515#include <stdio.h>
3516#include <sys/types.h>
3517#include <sys/stat.h>
3518/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3519struct buf { int x; };
3520FILE * (*rcsopen) (struct buf *, struct stat *, int);
3521static char *e (p, i)
3522 char **p;
3523 int i;
3524{
3525 return p[i];
3526}
3527static char *f (char * (*g) (char **, int), char **p, ...)
3528{
3529 char *s;
3530 va_list v;
3531 va_start (v,p);
3532 s = g (p, va_arg (v,int));
3533 va_end (v);
3534 return s;
3535}
edfaf76d
LK
3536
3537/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3538 function prototypes and stuff, but not '\xHH' hex character constants.
3539 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3540 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3541 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3542 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3543 that's true only with -std. */
edfaf76d
LK
3544int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3545
ca81d7a0
JD
3546/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3547 inside strings and character constants. */
3548#define FOO(x) 'x'
3549int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3550
6bae0ccf
DL
3551int test (int i, double x);
3552struct s1 {int (*f) (int a);};
3553struct s2 {int (*f) (double a);};
3554int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3555int argc;
3556char **argv;
3557int
3558main ()
3559{
3560return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3561 ;
3562 return 0;
3563}
3564_ACEOF
ca81d7a0
JD
3565for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3566 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3567do
3568 CC="$ac_save_CC $ac_arg"
3569 rm -f conftest.$ac_objext
ca81d7a0
JD
3570if { (ac_try="$ac_compile"
3571case "(($ac_try" in
3572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3573 *) ac_try_echo=$ac_try;;
3574esac
3575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3576 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3577 ac_status=$?
edfaf76d
LK
3578 grep -v '^ *+' conftest.er1 >conftest.err
3579 rm -f conftest.er1
3580 cat conftest.err >&5
6bae0ccf 3581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3582 (exit $ac_status); } && {
3583 test -z "$ac_c_werror_flag" ||
3584 test ! -s conftest.err
3585 } && test -s conftest.$ac_objext; then
ca81d7a0 3586 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3587else
3588 echo "$as_me: failed program was:" >&5
19650fd6
AS
3589sed 's/^/| /' conftest.$ac_ext >&5
3590
ca81d7a0 3591
6bae0ccf 3592fi
ca81d7a0
JD
3593
3594rm -f core conftest.err conftest.$ac_objext
3595 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3596done
ca81d7a0 3597rm -f conftest.$ac_ext
6bae0ccf
DL
3598CC=$ac_save_CC
3599
3600fi
ca81d7a0
JD
3601# AC_CACHE_VAL
3602case "x$ac_cv_prog_cc_c89" in
3603 x)
3604 { echo "$as_me:$LINENO: result: none needed" >&5
3605echo "${ECHO_T}none needed" >&6; } ;;
3606 xno)
3607 { echo "$as_me:$LINENO: result: unsupported" >&5
3608echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3609 *)
ca81d7a0
JD
3610 CC="$CC $ac_cv_prog_cc_c89"
3611 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3612echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3613esac
3614
19650fd6 3615
503d2be0
AS
3616ac_ext=c
3617ac_cpp='$CPP $CPPFLAGS'
3618ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3619ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3620ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3621
c0d27fcc 3622
ba4481b5
DL
3623# On Suns, sometimes $CPP names a directory.
3624if test -n "$CPP" && test -d "$CPP"; then
3625 CPP=
3626fi
3627
089a966d
GM
3628## If not using gcc, and on Solaris, and no CPP specified, see if
3629## using a Sun compiler, which needs -Xs to prevent whitespace.
3630if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3631 test x"$CPP" = x; then
3632 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3633echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3634
3635if test "${emacs_cv_sunpro_c+set}" = set; then
3636 echo $ECHO_N "(cached) $ECHO_C" >&6
3637else
3638 cat >conftest.$ac_ext <<_ACEOF
3639/* confdefs.h. */
3640_ACEOF
3641cat confdefs.h >>conftest.$ac_ext
3642cat >>conftest.$ac_ext <<_ACEOF
3643/* end confdefs.h. */
3644
3645int
3646main ()
3647{
3648#ifndef __SUNPRO_C
3649fail;
3650#endif
3651
3652 ;
3653 return 0;
3654}
3655_ACEOF
3656rm -f conftest.$ac_objext conftest$ac_exeext
3657if { (ac_try="$ac_link"
3658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3663 (eval "$ac_link") 2>conftest.er1
3664 ac_status=$?
3665 grep -v '^ *+' conftest.er1 >conftest.err
3666 rm -f conftest.er1
3667 cat conftest.err >&5
3668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 (exit $ac_status); } && {
3670 test -z "$ac_c_werror_flag" ||
3671 test ! -s conftest.err
3672 } && test -s conftest$ac_exeext &&
3673 $as_test_x conftest$ac_exeext; then
3674 emacs_cv_sunpro_c=yes
3675else
3676 echo "$as_me: failed program was:" >&5
3677sed 's/^/| /' conftest.$ac_ext >&5
3678
3679 emacs_cv_sunpro_c=no
3680fi
3681
3682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3683 conftest$ac_exeext conftest.$ac_ext
3684fi
3685
3686 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3687echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3688
3689 if test x"$emacs_cv_sunpro_c" = xyes; then
3690 NON_GNU_CPP="$CC -E -Xs"
3691 fi
3692fi
3693
ba4481b5
DL
3694#### Some systems specify a CPP to use unless we are using GCC.
3695#### Now that we know whether we are using GCC, we can decide whether
3696#### to use that one.
3697if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3698then
3699 CPP="$NON_GNU_CPP"
3700fi
3701
3702#### Some systems specify a CC to use unless we are using GCC.
3703#### Now that we know whether we are using GCC, we can decide whether
3704#### to use that one.
3705if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3706 test x$cc_specified != xyes
3707then
3708 CC="$NON_GNU_CC"
3709fi
3710
3711if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3712then
3713 CC="$CC $GCC_TEST_OPTIONS"
3714fi
3715
3716if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3717then
3718 CC="$CC $NON_GCC_TEST_OPTIONS"
3719fi
3720
a51f4969
SM
3721
3722cat >>confdefs.h <<\_ACEOF
3723#define _GNU_SOURCE 1
3724_ACEOF
3725
3726
e143ad11
AS
3727ac_ext=c
3728ac_cpp='$CPP $CPPFLAGS'
3729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3731ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3732{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3733echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3734# On Suns, sometimes $CPP names a directory.
3735if test -n "$CPP" && test -d "$CPP"; then
3736 CPP=
3737fi
3738if test -z "$CPP"; then
3739 if test "${ac_cv_prog_CPP+set}" = set; then
3740 echo $ECHO_N "(cached) $ECHO_C" >&6
3741else
3742 # Double quotes because CPP needs to be expanded
3743 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3744 do
3745 ac_preproc_ok=false
3746for ac_c_preproc_warn_flag in '' yes
3747do
3748 # Use a header file that comes with gcc, so configuring glibc
3749 # with a fresh cross-compiler works.
3750 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3751 # <limits.h> exists even on freestanding compilers.
3752 # On the NeXT, cc -E runs the code through the compiler's parser,
3753 # not just through cpp. "Syntax error" is here to catch this case.
3754 cat >conftest.$ac_ext <<_ACEOF
3755/* confdefs.h. */
3756_ACEOF
3757cat confdefs.h >>conftest.$ac_ext
3758cat >>conftest.$ac_ext <<_ACEOF
3759/* end confdefs.h. */
3760#ifdef __STDC__
3761# include <limits.h>
3762#else
3763# include <assert.h>
3764#endif
3765 Syntax error
3766_ACEOF
ca81d7a0
JD
3767if { (ac_try="$ac_cpp conftest.$ac_ext"
3768case "(($ac_try" in
3769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3770 *) ac_try_echo=$ac_try;;
3771esac
3772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3774 ac_status=$?
3775 grep -v '^ *+' conftest.er1 >conftest.err
3776 rm -f conftest.er1
3777 cat conftest.err >&5
3778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3779 (exit $ac_status); } >/dev/null && {
3780 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3781 test ! -s conftest.err
3782 }; then
e143ad11
AS
3783 :
3784else
3785 echo "$as_me: failed program was:" >&5
3786sed 's/^/| /' conftest.$ac_ext >&5
3787
3788 # Broken: fails on valid input.
3789continue
3790fi
ca81d7a0 3791
e143ad11
AS
3792rm -f conftest.err conftest.$ac_ext
3793
ca81d7a0 3794 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3795 # can be detected and how.
3796 cat >conftest.$ac_ext <<_ACEOF
3797/* confdefs.h. */
3798_ACEOF
3799cat confdefs.h >>conftest.$ac_ext
3800cat >>conftest.$ac_ext <<_ACEOF
3801/* end confdefs.h. */
3802#include <ac_nonexistent.h>
3803_ACEOF
ca81d7a0
JD
3804if { (ac_try="$ac_cpp conftest.$ac_ext"
3805case "(($ac_try" in
3806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3807 *) ac_try_echo=$ac_try;;
3808esac
3809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3810 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3811 ac_status=$?
3812 grep -v '^ *+' conftest.er1 >conftest.err
3813 rm -f conftest.er1
3814 cat conftest.err >&5
3815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3816 (exit $ac_status); } >/dev/null && {
3817 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3818 test ! -s conftest.err
3819 }; then
e143ad11
AS
3820 # Broken: success on invalid input.
3821continue
3822else
3823 echo "$as_me: failed program was:" >&5
3824sed 's/^/| /' conftest.$ac_ext >&5
3825
3826 # Passes both tests.
3827ac_preproc_ok=:
3828break
3829fi
ca81d7a0 3830
e143ad11
AS
3831rm -f conftest.err conftest.$ac_ext
3832
3833done
3834# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3835rm -f conftest.err conftest.$ac_ext
3836if $ac_preproc_ok; then
3837 break
3838fi
3839
3840 done
3841 ac_cv_prog_CPP=$CPP
3842
3843fi
3844 CPP=$ac_cv_prog_CPP
3845else
3846 ac_cv_prog_CPP=$CPP
3847fi
ca81d7a0
JD
3848{ echo "$as_me:$LINENO: result: $CPP" >&5
3849echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3850ac_preproc_ok=false
3851for ac_c_preproc_warn_flag in '' yes
3852do
3853 # Use a header file that comes with gcc, so configuring glibc
3854 # with a fresh cross-compiler works.
3855 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3856 # <limits.h> exists even on freestanding compilers.
3857 # On the NeXT, cc -E runs the code through the compiler's parser,
3858 # not just through cpp. "Syntax error" is here to catch this case.
3859 cat >conftest.$ac_ext <<_ACEOF
3860/* confdefs.h. */
3861_ACEOF
3862cat confdefs.h >>conftest.$ac_ext
3863cat >>conftest.$ac_ext <<_ACEOF
3864/* end confdefs.h. */
3865#ifdef __STDC__
3866# include <limits.h>
3867#else
3868# include <assert.h>
3869#endif
3870 Syntax error
3871_ACEOF
ca81d7a0
JD
3872if { (ac_try="$ac_cpp conftest.$ac_ext"
3873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
3877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3878 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3879 ac_status=$?
3880 grep -v '^ *+' conftest.er1 >conftest.err
3881 rm -f conftest.er1
3882 cat conftest.err >&5
3883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3884 (exit $ac_status); } >/dev/null && {
3885 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3886 test ! -s conftest.err
3887 }; then
e143ad11
AS
3888 :
3889else
3890 echo "$as_me: failed program was:" >&5
3891sed 's/^/| /' conftest.$ac_ext >&5
3892
3893 # Broken: fails on valid input.
3894continue
3895fi
ca81d7a0 3896
e143ad11
AS
3897rm -f conftest.err conftest.$ac_ext
3898
ca81d7a0 3899 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3900 # can be detected and how.
3901 cat >conftest.$ac_ext <<_ACEOF
3902/* confdefs.h. */
3903_ACEOF
3904cat confdefs.h >>conftest.$ac_ext
3905cat >>conftest.$ac_ext <<_ACEOF
3906/* end confdefs.h. */
3907#include <ac_nonexistent.h>
3908_ACEOF
ca81d7a0
JD
3909if { (ac_try="$ac_cpp conftest.$ac_ext"
3910case "(($ac_try" in
3911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3912 *) ac_try_echo=$ac_try;;
3913esac
3914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3915 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3916 ac_status=$?
3917 grep -v '^ *+' conftest.er1 >conftest.err
3918 rm -f conftest.er1
3919 cat conftest.err >&5
3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3921 (exit $ac_status); } >/dev/null && {
3922 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3923 test ! -s conftest.err
3924 }; then
e143ad11
AS
3925 # Broken: success on invalid input.
3926continue
3927else
3928 echo "$as_me: failed program was:" >&5
3929sed 's/^/| /' conftest.$ac_ext >&5
3930
3931 # Passes both tests.
3932ac_preproc_ok=:
3933break
3934fi
ca81d7a0 3935
e143ad11
AS
3936rm -f conftest.err conftest.$ac_ext
3937
3938done
3939# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3940rm -f conftest.err conftest.$ac_ext
3941if $ac_preproc_ok; then
3942 :
3943else
3944 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3945See \`config.log' for more details." >&5
3946echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3947See \`config.log' for more details." >&2;}
3948 { (exit 1); exit 1; }; }
3949fi
3950
3951ac_ext=c
3952ac_cpp='$CPP $CPPFLAGS'
3953ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3954ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3955ac_compiler_gnu=$ac_cv_c_compiler_gnu
3956
3957
ca81d7a0
JD
3958{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3959echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3960if test "${ac_cv_path_GREP+set}" = set; then
3961 echo $ECHO_N "(cached) $ECHO_C" >&6
3962else
3963 # Extract the first word of "grep ggrep" to use in msg output
3964if test -z "$GREP"; then
3965set dummy grep ggrep; ac_prog_name=$2
3966if test "${ac_cv_path_GREP+set}" = set; then
3967 echo $ECHO_N "(cached) $ECHO_C" >&6
3968else
3969 ac_path_GREP_found=false
3970# Loop through the user's path and test for each of PROGNAME-LIST
3971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3973do
3974 IFS=$as_save_IFS
3975 test -z "$as_dir" && as_dir=.
3976 for ac_prog in grep ggrep; do
3977 for ac_exec_ext in '' $ac_executable_extensions; do
3978 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 3979 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
3980 # Check for GNU ac_path_GREP and select it if it is found.
3981 # Check for GNU $ac_path_GREP
3982case `"$ac_path_GREP" --version 2>&1` in
3983*GNU*)
3984 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3985*)
3986 ac_count=0
3987 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3988 while :
3989 do
3990 cat "conftest.in" "conftest.in" >"conftest.tmp"
3991 mv "conftest.tmp" "conftest.in"
3992 cp "conftest.in" "conftest.nl"
3993 echo 'GREP' >> "conftest.nl"
3994 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3995 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3996 ac_count=`expr $ac_count + 1`
3997 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3998 # Best one so far, save it but keep looking for a better one
3999 ac_cv_path_GREP="$ac_path_GREP"
4000 ac_path_GREP_max=$ac_count
4001 fi
4002 # 10*(2^10) chars as input seems more than enough
4003 test $ac_count -gt 10 && break
4004 done
4005 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4006esac
4007
4008
4009 $ac_path_GREP_found && break 3
4010 done
4011done
4012
4013done
4014IFS=$as_save_IFS
4015
4016
4017fi
4018
4019GREP="$ac_cv_path_GREP"
4020if test -z "$GREP"; then
4021 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4022echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4023 { (exit 1); exit 1; }; }
4024fi
4025
4026else
4027 ac_cv_path_GREP=$GREP
4028fi
4029
4030
4031fi
4032{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4033echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4034 GREP="$ac_cv_path_GREP"
4035
4036
4037{ echo "$as_me:$LINENO: checking for egrep" >&5
4038echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4039if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4040 echo $ECHO_N "(cached) $ECHO_C" >&6
4041else
ca81d7a0
JD
4042 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4043 then ac_cv_path_EGREP="$GREP -E"
4044 else
4045 # Extract the first word of "egrep" to use in msg output
4046if test -z "$EGREP"; then
4047set dummy egrep; ac_prog_name=$2
4048if test "${ac_cv_path_EGREP+set}" = set; then
4049 echo $ECHO_N "(cached) $ECHO_C" >&6
4050else
4051 ac_path_EGREP_found=false
4052# Loop through the user's path and test for each of PROGNAME-LIST
4053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4054for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4055do
4056 IFS=$as_save_IFS
4057 test -z "$as_dir" && as_dir=.
4058 for ac_prog in egrep; do
4059 for ac_exec_ext in '' $ac_executable_extensions; do
4060 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4061 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4062 # Check for GNU ac_path_EGREP and select it if it is found.
4063 # Check for GNU $ac_path_EGREP
4064case `"$ac_path_EGREP" --version 2>&1` in
4065*GNU*)
4066 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4067*)
4068 ac_count=0
4069 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4070 while :
4071 do
4072 cat "conftest.in" "conftest.in" >"conftest.tmp"
4073 mv "conftest.tmp" "conftest.in"
4074 cp "conftest.in" "conftest.nl"
4075 echo 'EGREP' >> "conftest.nl"
4076 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4077 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4078 ac_count=`expr $ac_count + 1`
4079 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4080 # Best one so far, save it but keep looking for a better one
4081 ac_cv_path_EGREP="$ac_path_EGREP"
4082 ac_path_EGREP_max=$ac_count
e143ad11 4083 fi
ca81d7a0
JD
4084 # 10*(2^10) chars as input seems more than enough
4085 test $ac_count -gt 10 && break
4086 done
4087 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4088esac
4089
4090
4091 $ac_path_EGREP_found && break 3
4092 done
4093done
4094
4095done
4096IFS=$as_save_IFS
4097
4098
e143ad11 4099fi
e143ad11 4100
ca81d7a0
JD
4101EGREP="$ac_cv_path_EGREP"
4102if test -z "$EGREP"; then
4103 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4104echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4105 { (exit 1); exit 1; }; }
4106fi
e143ad11 4107
ca81d7a0
JD
4108else
4109 ac_cv_path_EGREP=$EGREP
4110fi
e143ad11 4111
ca81d7a0
JD
4112
4113 fi
8eeae1c9 4114fi
ca81d7a0
JD
4115{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4116echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4117 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4118
4119
4120
ca81d7a0
JD
4121{ echo "$as_me:$LINENO: checking for AIX" >&5
4122echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4123cat >conftest.$ac_ext <<_ACEOF
4124/* confdefs.h. */
4125_ACEOF
4126cat confdefs.h >>conftest.$ac_ext
4127cat >>conftest.$ac_ext <<_ACEOF
4128/* end confdefs.h. */
4129#ifdef _AIX
4130 yes
4131#endif
4132
4133_ACEOF
4134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4135 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4136 { echo "$as_me:$LINENO: result: yes" >&5
4137echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4138cat >>confdefs.h <<\_ACEOF
4139#define _ALL_SOURCE 1
4140_ACEOF
4141
4142else
ca81d7a0
JD
4143 { echo "$as_me:$LINENO: result: no" >&5
4144echo "${ECHO_T}no" >&6; }
e143ad11 4145fi
a51f4969
SM
4146rm -f conftest*
4147
4148
4149{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4150echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4151if test "${ac_cv_header_stdc+set}" = set; then
4152 echo $ECHO_N "(cached) $ECHO_C" >&6
4153else
4154 cat >conftest.$ac_ext <<_ACEOF
4155/* confdefs.h. */
4156_ACEOF
4157cat confdefs.h >>conftest.$ac_ext
4158cat >>conftest.$ac_ext <<_ACEOF
4159/* end confdefs.h. */
4160#include <stdlib.h>
4161#include <stdarg.h>
4162#include <string.h>
4163#include <float.h>
4164
4165int
4166main ()
4167{
4168
4169 ;
4170 return 0;
4171}
4172_ACEOF
4173rm -f conftest.$ac_objext
4174if { (ac_try="$ac_compile"
4175case "(($ac_try" in
4176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4177 *) ac_try_echo=$ac_try;;
4178esac
4179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4180 (eval "$ac_compile") 2>conftest.er1
4181 ac_status=$?
4182 grep -v '^ *+' conftest.er1 >conftest.err
4183 rm -f conftest.er1
4184 cat conftest.err >&5
4185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4186 (exit $ac_status); } && {
4187 test -z "$ac_c_werror_flag" ||
4188 test ! -s conftest.err
4189 } && test -s conftest.$ac_objext; then
4190 ac_cv_header_stdc=yes
4191else
4192 echo "$as_me: failed program was:" >&5
4193sed 's/^/| /' conftest.$ac_ext >&5
4194
4195 ac_cv_header_stdc=no
4196fi
4197
4198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4199
4200if test $ac_cv_header_stdc = yes; then
4201 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4202 cat >conftest.$ac_ext <<_ACEOF
4203/* confdefs.h. */
4204_ACEOF
4205cat confdefs.h >>conftest.$ac_ext
4206cat >>conftest.$ac_ext <<_ACEOF
4207/* end confdefs.h. */
4208#include <string.h>
4209
4210_ACEOF
4211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4212 $EGREP "memchr" >/dev/null 2>&1; then
4213 :
4214else
4215 ac_cv_header_stdc=no
4216fi
4217rm -f conftest*
4218
4219fi
4220
4221if test $ac_cv_header_stdc = yes; then
4222 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4223 cat >conftest.$ac_ext <<_ACEOF
4224/* confdefs.h. */
4225_ACEOF
4226cat confdefs.h >>conftest.$ac_ext
4227cat >>conftest.$ac_ext <<_ACEOF
4228/* end confdefs.h. */
4229#include <stdlib.h>
4230
4231_ACEOF
4232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4233 $EGREP "free" >/dev/null 2>&1; then
4234 :
4235else
4236 ac_cv_header_stdc=no
4237fi
4238rm -f conftest*
4239
4240fi
4241
4242if test $ac_cv_header_stdc = yes; then
4243 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4244 if test "$cross_compiling" = yes; then
4245 :
4246else
4247 cat >conftest.$ac_ext <<_ACEOF
4248/* confdefs.h. */
4249_ACEOF
4250cat confdefs.h >>conftest.$ac_ext
4251cat >>conftest.$ac_ext <<_ACEOF
4252/* end confdefs.h. */
4253#include <ctype.h>
4254#include <stdlib.h>
4255#if ((' ' & 0x0FF) == 0x020)
4256# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4257# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4258#else
4259# define ISLOWER(c) \
4260 (('a' <= (c) && (c) <= 'i') \
4261 || ('j' <= (c) && (c) <= 'r') \
4262 || ('s' <= (c) && (c) <= 'z'))
4263# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4264#endif
4265
4266#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4267int
4268main ()
4269{
4270 int i;
4271 for (i = 0; i < 256; i++)
4272 if (XOR (islower (i), ISLOWER (i))
4273 || toupper (i) != TOUPPER (i))
4274 return 2;
4275 return 0;
4276}
4277_ACEOF
4278rm -f conftest$ac_exeext
4279if { (ac_try="$ac_link"
4280case "(($ac_try" in
4281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4282 *) ac_try_echo=$ac_try;;
4283esac
4284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4285 (eval "$ac_link") 2>&5
4286 ac_status=$?
4287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4289 { (case "(($ac_try" in
4290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4291 *) ac_try_echo=$ac_try;;
4292esac
4293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4294 (eval "$ac_try") 2>&5
4295 ac_status=$?
4296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4297 (exit $ac_status); }; }; then
4298 :
4299else
4300 echo "$as_me: program exited with status $ac_status" >&5
4301echo "$as_me: failed program was:" >&5
4302sed 's/^/| /' conftest.$ac_ext >&5
4303
4304( exit $ac_status )
4305ac_cv_header_stdc=no
4306fi
4307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4308fi
4309
4310
4311fi
4312fi
4313{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4314echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4315if test $ac_cv_header_stdc = yes; then
4316
4317cat >>confdefs.h <<\_ACEOF
4318#define STDC_HEADERS 1
4319_ACEOF
4320
4321fi
4322
4323# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4334 inttypes.h stdint.h unistd.h
4335do
4336as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4337{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4338echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4339if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4340 echo $ECHO_N "(cached) $ECHO_C" >&6
4341else
4342 cat >conftest.$ac_ext <<_ACEOF
4343/* confdefs.h. */
4344_ACEOF
4345cat confdefs.h >>conftest.$ac_ext
4346cat >>conftest.$ac_ext <<_ACEOF
4347/* end confdefs.h. */
4348$ac_includes_default
4349
4350#include <$ac_header>
4351_ACEOF
4352rm -f conftest.$ac_objext
4353if { (ac_try="$ac_compile"
4354case "(($ac_try" in
4355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4356 *) ac_try_echo=$ac_try;;
4357esac
4358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4359 (eval "$ac_compile") 2>conftest.er1
4360 ac_status=$?
4361 grep -v '^ *+' conftest.er1 >conftest.err
4362 rm -f conftest.er1
4363 cat conftest.err >&5
4364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4365 (exit $ac_status); } && {
4366 test -z "$ac_c_werror_flag" ||
4367 test ! -s conftest.err
4368 } && test -s conftest.$ac_objext; then
4369 eval "$as_ac_Header=yes"
4370else
4371 echo "$as_me: failed program was:" >&5
4372sed 's/^/| /' conftest.$ac_ext >&5
4373
4374 eval "$as_ac_Header=no"
4375fi
4376
4377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4378fi
4379ac_res=`eval echo '${'$as_ac_Header'}'`
4380 { echo "$as_me:$LINENO: result: $ac_res" >&5
4381echo "${ECHO_T}$ac_res" >&6; }
4382if test `eval echo '${'$as_ac_Header'}'` = yes; then
4383 cat >>confdefs.h <<_ACEOF
4384#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4385_ACEOF
4386
4387fi
4388
4389done
4390
4391
4392if test "${ac_cv_header_minix_config_h+set}" = set; then
4393 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4394echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4395if test "${ac_cv_header_minix_config_h+set}" = set; then
4396 echo $ECHO_N "(cached) $ECHO_C" >&6
4397fi
4398{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4399echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4400else
4401 # Is the header compilable?
4402{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4403echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4404cat >conftest.$ac_ext <<_ACEOF
4405/* confdefs.h. */
4406_ACEOF
4407cat confdefs.h >>conftest.$ac_ext
4408cat >>conftest.$ac_ext <<_ACEOF
4409/* end confdefs.h. */
4410$ac_includes_default
4411#include <minix/config.h>
4412_ACEOF
4413rm -f conftest.$ac_objext
4414if { (ac_try="$ac_compile"
4415case "(($ac_try" in
4416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4417 *) ac_try_echo=$ac_try;;
4418esac
4419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4420 (eval "$ac_compile") 2>conftest.er1
4421 ac_status=$?
4422 grep -v '^ *+' conftest.er1 >conftest.err
4423 rm -f conftest.er1
4424 cat conftest.err >&5
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426 (exit $ac_status); } && {
4427 test -z "$ac_c_werror_flag" ||
4428 test ! -s conftest.err
4429 } && test -s conftest.$ac_objext; then
4430 ac_header_compiler=yes
4431else
4432 echo "$as_me: failed program was:" >&5
4433sed 's/^/| /' conftest.$ac_ext >&5
4434
4435 ac_header_compiler=no
4436fi
4437
4438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4439{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4440echo "${ECHO_T}$ac_header_compiler" >&6; }
4441
4442# Is the header present?
4443{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4444echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4445cat >conftest.$ac_ext <<_ACEOF
4446/* confdefs.h. */
4447_ACEOF
4448cat confdefs.h >>conftest.$ac_ext
4449cat >>conftest.$ac_ext <<_ACEOF
4450/* end confdefs.h. */
4451#include <minix/config.h>
4452_ACEOF
4453if { (ac_try="$ac_cpp conftest.$ac_ext"
4454case "(($ac_try" in
4455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4456 *) ac_try_echo=$ac_try;;
4457esac
4458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4460 ac_status=$?
4461 grep -v '^ *+' conftest.er1 >conftest.err
4462 rm -f conftest.er1
4463 cat conftest.err >&5
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); } >/dev/null && {
4466 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4467 test ! -s conftest.err
4468 }; then
4469 ac_header_preproc=yes
4470else
4471 echo "$as_me: failed program was:" >&5
4472sed 's/^/| /' conftest.$ac_ext >&5
4473
4474 ac_header_preproc=no
4475fi
4476
4477rm -f conftest.err conftest.$ac_ext
4478{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4479echo "${ECHO_T}$ac_header_preproc" >&6; }
4480
4481# So? What about this header?
4482case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4483 yes:no: )
4484 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4485echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4486 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4487echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4488 ac_header_preproc=yes
4489 ;;
4490 no:yes:* )
4491 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4492echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4493 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4494echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4495 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4496echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4497 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4498echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4499 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4500echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4501 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4502echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4503
4504 ;;
4505esac
4506{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4507echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4508if test "${ac_cv_header_minix_config_h+set}" = set; then
4509 echo $ECHO_N "(cached) $ECHO_C" >&6
4510else
4511 ac_cv_header_minix_config_h=$ac_header_preproc
4512fi
4513{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4514echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4515
4516fi
4517if test $ac_cv_header_minix_config_h = yes; then
4518 MINIX=yes
4519else
4520 MINIX=
4521fi
4522
4523
4524if test "$MINIX" = yes; then
4525
4526cat >>confdefs.h <<\_ACEOF
4527#define _POSIX_SOURCE 1
4528_ACEOF
4529
4530
4531cat >>confdefs.h <<\_ACEOF
4532#define _POSIX_1_SOURCE 2
4533_ACEOF
4534
4535
4536cat >>confdefs.h <<\_ACEOF
4537#define _MINIX 1
4538_ACEOF
4539
4540fi
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4553echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4554if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4555 echo $ECHO_N "(cached) $ECHO_C" >&6
4556else
4557 cat >conftest.$ac_ext <<_ACEOF
4558/* confdefs.h. */
4559_ACEOF
4560cat confdefs.h >>conftest.$ac_ext
4561cat >>conftest.$ac_ext <<_ACEOF
4562/* end confdefs.h. */
4563
4564# define __EXTENSIONS__ 1
4565 $ac_includes_default
4566int
4567main ()
4568{
4569
4570 ;
4571 return 0;
4572}
4573_ACEOF
4574rm -f conftest.$ac_objext
4575if { (ac_try="$ac_compile"
4576case "(($ac_try" in
4577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4578 *) ac_try_echo=$ac_try;;
4579esac
4580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4581 (eval "$ac_compile") 2>conftest.er1
4582 ac_status=$?
4583 grep -v '^ *+' conftest.er1 >conftest.err
4584 rm -f conftest.er1
4585 cat conftest.err >&5
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); } && {
4588 test -z "$ac_c_werror_flag" ||
4589 test ! -s conftest.err
4590 } && test -s conftest.$ac_objext; then
4591 ac_cv_safe_to_define___extensions__=yes
4592else
4593 echo "$as_me: failed program was:" >&5
4594sed 's/^/| /' conftest.$ac_ext >&5
4595
4596 ac_cv_safe_to_define___extensions__=no
4597fi
e143ad11 4598
a51f4969
SM
4599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4600fi
4601{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4602echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4603 test $ac_cv_safe_to_define___extensions__ = yes &&
4604 cat >>confdefs.h <<\_ACEOF
4605#define __EXTENSIONS__ 1
4606_ACEOF
e143ad11 4607
a51f4969
SM
4608 cat >>confdefs.h <<\_ACEOF
4609#define _POSIX_PTHREAD_SEMANTICS 1
4610_ACEOF
e143ad11 4611
a51f4969
SM
4612 cat >>confdefs.h <<\_ACEOF
4613#define _TANDEM_SOURCE 1
e143ad11
AS
4614_ACEOF
4615
4616
4617
01abe918 4618### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4619{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4620echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4621SAVE_CFLAGS="$CFLAGS"
4622CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4623cat >conftest.$ac_ext <<_ACEOF
4624/* confdefs.h. */
4625_ACEOF
4626cat confdefs.h >>conftest.$ac_ext
4627cat >>conftest.$ac_ext <<_ACEOF
4628/* end confdefs.h. */
4629
4630int
4631main ()
4632{
4633
4634 ;
4635 return 0;
4636}
4637_ACEOF
4638rm -f conftest.$ac_objext
ca81d7a0
JD
4639if { (ac_try="$ac_compile"
4640case "(($ac_try" in
4641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4642 *) ac_try_echo=$ac_try;;
4643esac
4644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4645 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4646 ac_status=$?
4647 grep -v '^ *+' conftest.er1 >conftest.err
4648 rm -f conftest.er1
4649 cat conftest.err >&5
4650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4651 (exit $ac_status); } && {
4652 test -z "$ac_c_werror_flag" ||
4653 test ! -s conftest.err
4654 } && test -s conftest.$ac_objext; then
01abe918
CY
4655 has_option=yes
4656else
4657 echo "$as_me: failed program was:" >&5
4658sed 's/^/| /' conftest.$ac_ext >&5
4659
ca81d7a0 4660 has_option=no
01abe918 4661fi
ca81d7a0
JD
4662
4663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4664if test $has_option = yes; then
4665 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4666fi
ca81d7a0
JD
4667{ echo "$as_me:$LINENO: result: $has_option" >&5
4668echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4669CFLAGS="$SAVE_CFLAGS"
4670unset has_option
4671unset SAVE_CFLAGS
4672
6a3a24fa 4673#### Some other nice autoconf tests.
ba4481b5 4674
ca81d7a0
JD
4675{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4676echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4677LN_S=$as_ln_s
4678if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4679 { echo "$as_me:$LINENO: result: yes" >&5
4680echo "${ECHO_T}yes" >&6; }
ba4481b5 4681else
ca81d7a0
JD
4682 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4683echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4684fi
4685
503d2be0
AS
4686ac_ext=c
4687ac_cpp='$CPP $CPPFLAGS'
4688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4690ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4691{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4692echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4693# On Suns, sometimes $CPP names a directory.
4694if test -n "$CPP" && test -d "$CPP"; then
4695 CPP=
4696fi
4697if test -z "$CPP"; then
503d2be0
AS
4698 if test "${ac_cv_prog_CPP+set}" = set; then
4699 echo $ECHO_N "(cached) $ECHO_C" >&6
4700else
4701 # Double quotes because CPP needs to be expanded
4702 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4703 do
4704 ac_preproc_ok=false
4705for ac_c_preproc_warn_flag in '' yes
4706do
4707 # Use a header file that comes with gcc, so configuring glibc
4708 # with a fresh cross-compiler works.
19650fd6
AS
4709 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4710 # <limits.h> exists even on freestanding compilers.
ba4481b5 4711 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4712 # not just through cpp. "Syntax error" is here to catch this case.
4713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4714/* confdefs.h. */
4715_ACEOF
4716cat confdefs.h >>conftest.$ac_ext
4717cat >>conftest.$ac_ext <<_ACEOF
4718/* end confdefs.h. */
4719#ifdef __STDC__
4720# include <limits.h>
4721#else
4722# include <assert.h>
4723#endif
edfaf76d 4724 Syntax error
503d2be0 4725_ACEOF
ca81d7a0
JD
4726if { (ac_try="$ac_cpp conftest.$ac_ext"
4727case "(($ac_try" in
4728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4729 *) ac_try_echo=$ac_try;;
4730esac
4731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4733 ac_status=$?
6bae0ccf 4734 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4735 rm -f conftest.er1
4736 cat conftest.err >&5
c0d27fcc 4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4738 (exit $ac_status); } >/dev/null && {
4739 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4740 test ! -s conftest.err
4741 }; then
ba4481b5
DL
4742 :
4743else
503d2be0 4744 echo "$as_me: failed program was:" >&5
19650fd6
AS
4745sed 's/^/| /' conftest.$ac_ext >&5
4746
503d2be0
AS
4747 # Broken: fails on valid input.
4748continue
4749fi
ca81d7a0 4750
503d2be0
AS
4751rm -f conftest.err conftest.$ac_ext
4752
ca81d7a0 4753 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4754 # can be detected and how.
4755 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4756/* confdefs.h. */
4757_ACEOF
4758cat confdefs.h >>conftest.$ac_ext
4759cat >>conftest.$ac_ext <<_ACEOF
4760/* end confdefs.h. */
503d2be0
AS
4761#include <ac_nonexistent.h>
4762_ACEOF
ca81d7a0
JD
4763if { (ac_try="$ac_cpp conftest.$ac_ext"
4764case "(($ac_try" in
4765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4766 *) ac_try_echo=$ac_try;;
4767esac
4768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4770 ac_status=$?
6bae0ccf 4771 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4772 rm -f conftest.er1
4773 cat conftest.err >&5
c0d27fcc 4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4775 (exit $ac_status); } >/dev/null && {
4776 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4777 test ! -s conftest.err
4778 }; then
503d2be0
AS
4779 # Broken: success on invalid input.
4780continue
c4bb2108 4781else
503d2be0 4782 echo "$as_me: failed program was:" >&5
19650fd6
AS
4783sed 's/^/| /' conftest.$ac_ext >&5
4784
503d2be0
AS
4785 # Passes both tests.
4786ac_preproc_ok=:
4787break
4788fi
ca81d7a0 4789
503d2be0
AS
4790rm -f conftest.err conftest.$ac_ext
4791
4792done
4793# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4794rm -f conftest.err conftest.$ac_ext
4795if $ac_preproc_ok; then
4796 break
4797fi
4798
4799 done
4800 ac_cv_prog_CPP=$CPP
4801
4802fi
4803 CPP=$ac_cv_prog_CPP
4804else
4805 ac_cv_prog_CPP=$CPP
4806fi
ca81d7a0
JD
4807{ echo "$as_me:$LINENO: result: $CPP" >&5
4808echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4809ac_preproc_ok=false
4810for ac_c_preproc_warn_flag in '' yes
4811do
4812 # Use a header file that comes with gcc, so configuring glibc
4813 # with a fresh cross-compiler works.
19650fd6
AS
4814 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4815 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4816 # On the NeXT, cc -E runs the code through the compiler's parser,
4817 # not just through cpp. "Syntax error" is here to catch this case.
4818 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
4824#ifdef __STDC__
4825# include <limits.h>
4826#else
4827# include <assert.h>
4828#endif
edfaf76d 4829 Syntax error
503d2be0 4830_ACEOF
ca81d7a0
JD
4831if { (ac_try="$ac_cpp conftest.$ac_ext"
4832case "(($ac_try" in
4833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4834 *) ac_try_echo=$ac_try;;
4835esac
4836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4837 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4838 ac_status=$?
6bae0ccf 4839 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4840 rm -f conftest.er1
4841 cat conftest.err >&5
c0d27fcc 4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4843 (exit $ac_status); } >/dev/null && {
4844 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4845 test ! -s conftest.err
4846 }; then
ba4481b5
DL
4847 :
4848else
503d2be0 4849 echo "$as_me: failed program was:" >&5
19650fd6
AS
4850sed 's/^/| /' conftest.$ac_ext >&5
4851
503d2be0
AS
4852 # Broken: fails on valid input.
4853continue
4854fi
ca81d7a0 4855
503d2be0
AS
4856rm -f conftest.err conftest.$ac_ext
4857
ca81d7a0 4858 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4859 # can be detected and how.
4860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4861/* confdefs.h. */
4862_ACEOF
4863cat confdefs.h >>conftest.$ac_ext
4864cat >>conftest.$ac_ext <<_ACEOF
4865/* end confdefs.h. */
503d2be0
AS
4866#include <ac_nonexistent.h>
4867_ACEOF
ca81d7a0
JD
4868if { (ac_try="$ac_cpp conftest.$ac_ext"
4869case "(($ac_try" in
4870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4871 *) ac_try_echo=$ac_try;;
4872esac
4873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4874 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4875 ac_status=$?
6bae0ccf 4876 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4877 rm -f conftest.er1
4878 cat conftest.err >&5
c0d27fcc 4879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4880 (exit $ac_status); } >/dev/null && {
4881 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4882 test ! -s conftest.err
4883 }; then
503d2be0
AS
4884 # Broken: success on invalid input.
4885continue
4886else
4887 echo "$as_me: failed program was:" >&5
19650fd6
AS
4888sed 's/^/| /' conftest.$ac_ext >&5
4889
503d2be0
AS
4890 # Passes both tests.
4891ac_preproc_ok=:
4892break
ba4481b5 4893fi
ca81d7a0 4894
503d2be0
AS
4895rm -f conftest.err conftest.$ac_ext
4896
4897done
4898# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4899rm -f conftest.err conftest.$ac_ext
4900if $ac_preproc_ok; then
4901 :
ba4481b5 4902else
19650fd6
AS
4903 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4904See \`config.log' for more details." >&5
4905echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4906See \`config.log' for more details." >&2;}
503d2be0 4907 { (exit 1); exit 1; }; }
ba4481b5 4908fi
503d2be0
AS
4909
4910ac_ext=c
4911ac_cpp='$CPP $CPPFLAGS'
4912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4914ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4915
4916# Find a good install program. We prefer a C program (faster),
4917# so one script is as good as another. But avoid the broken or
4918# incompatible versions:
4919# SysV /etc/install, /usr/sbin/install
4920# SunOS /usr/etc/install
4921# IRIX /sbin/install
4922# AIX /bin/install
503d2be0 4923# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4924# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4925# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4926# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4927# OS/2's system install, which has a completely different semantic
ba4481b5 4928# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4929{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4930echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4931if test -z "$INSTALL"; then
503d2be0
AS
4932if test "${ac_cv_path_install+set}" = set; then
4933 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4934else
c0d27fcc
MR
4935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936for as_dir in $PATH
4937do
4938 IFS=$as_save_IFS
4939 test -z "$as_dir" && as_dir=.
4940 # Account for people who put trailing slashes in PATH elements.
4941case $as_dir/ in
4942 ./ | .// | /cC/* | \
4943 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4944 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4945 /usr/ucb/* ) ;;
4946 *)
4947 # OSF1 and SCO ODT 3.0 have their own names for install.
4948 # Don't use installbsd from OSF since it installs stuff as root
4949 # by default.
4950 for ac_prog in ginstall scoinst install; do
4951 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4952 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4953 if test $ac_prog = install &&
4954 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4955 # AIX install. It has an incompatible calling convention.
4956 :
4957 elif test $ac_prog = install &&
4958 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4959 # program-specific install script used by HP pwplus--don't use.
4960 :
4961 else
4962 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4963 break 3
4964 fi
4965 fi
ba4481b5 4966 done
c0d27fcc
MR
4967 done
4968 ;;
4969esac
4970done
ca81d7a0 4971IFS=$as_save_IFS
c0d27fcc 4972
ba4481b5
DL
4973
4974fi
4975 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4976 INSTALL=$ac_cv_path_install
ba4481b5 4977 else
ca81d7a0
JD
4978 # As a last resort, use the slow shell script. Don't cache a
4979 # value for INSTALL within a source directory, because that will
ba4481b5 4980 # break other packages using the cache if that directory is
ca81d7a0 4981 # removed, or if the value is a relative name.
503d2be0 4982 INSTALL=$ac_install_sh
ba4481b5
DL
4983 fi
4984fi
ca81d7a0
JD
4985{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4986echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4987
4988# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4989# It thinks the first close brace ends the variable substitution.
4990test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4991
503d2be0 4992test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4993
ba4481b5
DL
4994test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4995
c0d27fcc
MR
4996if test "x$RANLIB" = x; then
4997 if test -n "$ac_tool_prefix"; then
4998 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4999set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5000{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5001echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5002if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5003 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5004else
5005 if test -n "$RANLIB"; then
5006 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5007else
c0d27fcc
MR
5008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5009for as_dir in $PATH
5010do
5011 IFS=$as_save_IFS
5012 test -z "$as_dir" && as_dir=.
5013 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5014 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5015 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5016 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5017 break 2
5018 fi
5019done
503d2be0 5020done
ca81d7a0 5021IFS=$as_save_IFS
503d2be0 5022
7397acc4
DL
5023fi
5024fi
503d2be0 5025RANLIB=$ac_cv_prog_RANLIB
7397acc4 5026if test -n "$RANLIB"; then
ca81d7a0
JD
5027 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5028echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5029else
ca81d7a0
JD
5030 { echo "$as_me:$LINENO: result: no" >&5
5031echo "${ECHO_T}no" >&6; }
503d2be0
AS
5032fi
5033
ca81d7a0 5034
503d2be0
AS
5035fi
5036if test -z "$ac_cv_prog_RANLIB"; then
5037 ac_ct_RANLIB=$RANLIB
5038 # Extract the first word of "ranlib", so it can be a program name with args.
5039set dummy ranlib; ac_word=$2
ca81d7a0
JD
5040{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5041echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5042if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
5044else
5045 if test -n "$ac_ct_RANLIB"; then
5046 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5047else
c0d27fcc
MR
5048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
5053 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5054 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5055 ac_cv_prog_ac_ct_RANLIB="ranlib"
5056 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5057 break 2
5058 fi
5059done
503d2be0 5060done
ca81d7a0 5061IFS=$as_save_IFS
503d2be0 5062
503d2be0
AS
5063fi
5064fi
5065ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5066if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5067 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5068echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5069else
ca81d7a0
JD
5070 { echo "$as_me:$LINENO: result: no" >&5
5071echo "${ECHO_T}no" >&6; }
503d2be0
AS
5072fi
5073
ca81d7a0
JD
5074 if test "x$ac_ct_RANLIB" = x; then
5075 RANLIB=":"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
5079{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5080whose name does not start with the host triplet. If you think this
5081configuration is useful to you, please write to autoconf@gnu.org." >&5
5082echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5083whose name does not start with the host triplet. If you think this
5084configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5085ac_tool_warned=yes ;;
5086esac
5087 RANLIB=$ac_ct_RANLIB
5088 fi
7397acc4 5089else
503d2be0 5090 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5091fi
5092
5093fi
9e71690e
DK
5094# Extract the first word of "install-info", so it can be a program name with args.
5095set dummy install-info; ac_word=$2
ca81d7a0
JD
5096{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5097echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5098if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5099 echo $ECHO_N "(cached) $ECHO_C" >&6
5100else
5101 case $INSTALL_INFO in
5102 [\\/]* | ?:[\\/]*)
5103 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5104 ;;
5105 *)
5106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109 IFS=$as_save_IFS
5110 test -z "$as_dir" && as_dir=.
5111 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5113 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5114 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5115 break 2
5116 fi
5117done
5118done
ca81d7a0 5119IFS=$as_save_IFS
9e71690e
DK
5120
5121 ;;
5122esac
5123fi
5124INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5125if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5126 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5127echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5128else
ca81d7a0
JD
5129 { echo "$as_me:$LINENO: result: no" >&5
5130echo "${ECHO_T}no" >&6; }
9e71690e
DK
5131fi
5132
ca81d7a0 5133
9e71690e
DK
5134# Extract the first word of "install-info", so it can be a program name with args.
5135set dummy install-info; ac_word=$2
ca81d7a0
JD
5136{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5137echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5138if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5139 echo $ECHO_N "(cached) $ECHO_C" >&6
5140else
5141 case $INSTALL_INFO in
5142 [\\/]* | ?:[\\/]*)
5143 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5144 ;;
5145 *)
5146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in /usr/sbin
5148do
5149 IFS=$as_save_IFS
5150 test -z "$as_dir" && as_dir=.
5151 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5153 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5155 break 2
5156 fi
5157done
5158done
ca81d7a0 5159IFS=$as_save_IFS
9e71690e
DK
5160
5161 ;;
5162esac
5163fi
5164INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5165if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5166 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5167echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5168else
ca81d7a0
JD
5169 { echo "$as_me:$LINENO: result: no" >&5
5170echo "${ECHO_T}no" >&6; }
9e71690e
DK
5171fi
5172
ca81d7a0 5173
9e71690e
DK
5174# Extract the first word of "install-info", so it can be a program name with args.
5175set dummy install-info; ac_word=$2
ca81d7a0
JD
5176{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5177echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5178if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5179 echo $ECHO_N "(cached) $ECHO_C" >&6
5180else
5181 case $INSTALL_INFO in
5182 [\\/]* | ?:[\\/]*)
5183 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5184 ;;
5185 *)
5186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in /sbin
5188do
5189 IFS=$as_save_IFS
5190 test -z "$as_dir" && as_dir=.
5191 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5193 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5195 break 2
5196 fi
5197done
5198done
ca81d7a0 5199IFS=$as_save_IFS
9e71690e
DK
5200
5201 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5202 ;;
5203esac
5204fi
5205INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5206if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5207 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5208echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5209else
ca81d7a0
JD
5210 { echo "$as_me:$LINENO: result: no" >&5
5211echo "${ECHO_T}no" >&6; }
9e71690e
DK
5212fi
5213
ca81d7a0 5214
8ae52ca6
RF
5215# Extract the first word of "gzip", so it can be a program name with args.
5216set dummy gzip; ac_word=$2
ca81d7a0
JD
5217{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5218echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5219if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5221else
46e35e9f 5222 case $GZIP_PROG in
8ae52ca6 5223 [\\/]* | ?:[\\/]*)
46e35e9f 5224 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5225 ;;
5226 *)
5227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5228for as_dir in $PATH
5229do
5230 IFS=$as_save_IFS
5231 test -z "$as_dir" && as_dir=.
5232 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5233 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5234 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5235 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5236 break 2
5237 fi
5238done
5239done
ca81d7a0 5240IFS=$as_save_IFS
8ae52ca6
RF
5241
5242 ;;
5243esac
5244fi
46e35e9f 5245GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5246if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5247 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5248echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5249else
ca81d7a0
JD
5250 { echo "$as_me:$LINENO: result: no" >&5
5251echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5252fi
5253
ba4481b5 5254
c0d27fcc 5255
ca81d7a0 5256
1bb9a689
MB
5257## Need makeinfo >= 4.6 (?) to build the manuals.
5258# Extract the first word of "makeinfo", so it can be a program name with args.
5259set dummy makeinfo; ac_word=$2
5260{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5262if test "${ac_cv_path_MAKEINFO+set}" = set; then
5263 echo $ECHO_N "(cached) $ECHO_C" >&6
5264else
5265 case $MAKEINFO in
5266 [\\/]* | ?:[\\/]*)
5267 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5268 ;;
5269 *)
5270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273 IFS=$as_save_IFS
5274 test -z "$as_dir" && as_dir=.
5275 for ac_exec_ext in '' $ac_executable_extensions; do
5276 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5277 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5278 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5279 break 2
5280 fi
5281done
5282done
5283IFS=$as_save_IFS
5284
5285 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5286 ;;
5287esac
5288fi
5289MAKEINFO=$ac_cv_path_MAKEINFO
5290if test -n "$MAKEINFO"; then
5291 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5292echo "${ECHO_T}$MAKEINFO" >&6; }
5293else
5294 { echo "$as_me:$LINENO: result: no" >&5
5295echo "${ECHO_T}no" >&6; }
5296fi
5297
5298
5299if test "$MAKEINFO" != "no" && \
d4840f44 5300 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
5301 MAKEINFO=no
5302fi
5303
e1b89931
GM
5304## Makeinfo is unusual. For a released Emacs, the manuals are
5305## pre-built, and not deleted by the normal clean rules. makeinfo is
5306## therefore in the category of "special tools" not normally required, which
5307## configure does not have to check for (eg autoconf itself).
5308## In a CVS checkout on the other hand, the manuals are not included.
5309## So makeinfo is a requirement to build from CVS, and configure
5310## should test for it as it does for any other build requirement.
5311## We use the presence of $srcdir/info/emacs to distinguish a release,
5312## with pre-built manuals, from a CVS checkout.
5313if test "$MAKEINFO" = "no"; then
5314 if test "x${with_makeinfo}" = "xno"; then
5315 MAKEINFO=off
5316 elif ! test -e $srcdir/info/emacs; then
5317 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5318source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5319Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5320with the \`--without-makeinfo' option to build without the manuals. " >&5
5321echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5322source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5323Either install a suitable version of makeinfo, or re-run configure
e1b89931 5324with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5325 { (exit 1); exit 1; }; }
e1b89931 5326 fi
921fbdf0 5327fi
1bb9a689
MB
5328
5329
8e967cf7
MR
5330if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5331then
5332 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5333fi
5334
5335if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5336then
5337 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5338fi
5339
c0d27fcc 5340
fe239f0f 5341late_LDFLAGS=$LDFLAGS
4af002d6 5342if test "$GCC" = yes; then
fe239f0f
AS
5343 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5344else
5345 LDFLAGS="$LDFLAGS -znocombreloc"
5346fi
5347
ca81d7a0
JD
5348{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5349echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5350cat >conftest.$ac_ext <<_ACEOF
5351main(){return 0;}
5352_ACEOF
5353rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5354if { (ac_try="$ac_link"
5355case "(($ac_try" in
5356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5357 *) ac_try_echo=$ac_try;;
5358esac
5359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5360 (eval "$ac_link") 2>conftest.er1
fe239f0f 5361 ac_status=$?
edfaf76d
LK
5362 grep -v '^ *+' conftest.er1 >conftest.err
5363 rm -f conftest.er1
5364 cat conftest.err >&5
fe239f0f 5365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5366 (exit $ac_status); } && {
5367 test -z "$ac_c_werror_flag" ||
5368 test ! -s conftest.err
5369 } && test -s conftest$ac_exeext &&
5370 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5371 { echo "$as_me:$LINENO: result: yes" >&5
5372echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5373else
5374 echo "$as_me: failed program was:" >&5
5375sed 's/^/| /' conftest.$ac_ext >&5
5376
ca81d7a0
JD
5377 LDFLAGS=$late_LDFLAGS
5378 { echo "$as_me:$LINENO: result: no" >&5
5379echo "${ECHO_T}no" >&6; }
fe239f0f 5380fi
ca81d7a0 5381
f053c89f 5382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5383 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5384
3b33a005
DL
5385#### Extract some information from the operating system and machine files.
5386
c0d27fcc 5387{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5388 - which libraries the lib-src programs will want, and
503d2be0
AS
5389 - whether the GNU malloc routines are usable..." >&5
5390echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5391 - which libraries the lib-src programs will want, and
503d2be0 5392 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5393
5394### First figure out CFLAGS (which we use for running the compiler here)
5395### and REAL_CFLAGS (which we use for real compilation).
5396### The two are the same except on a few systems, where they are made
5397### different to work around various lossages. For example,
5398### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5399### as implying static linking.
5400
5401### If the CFLAGS env var is specified, we use that value
5402### instead of the default.
5403
5404### It's not important that this name contain the PID; you can't run
5405### two configures in the same directory and have anything work
5406### anyway.
5407tempcname="conftest.c"
5408
5409echo '
5410#include "'${srcdir}'/src/'${opsysfile}'"
5411#include "'${srcdir}'/src/'${machfile}'"
5412#ifndef LIBS_MACHINE
5413#define LIBS_MACHINE
5414#endif
5415#ifndef LIBS_SYSTEM
5416#define LIBS_SYSTEM
5417#endif
5418#ifndef C_SWITCH_SYSTEM
5419#define C_SWITCH_SYSTEM
5420#endif
5421#ifndef C_SWITCH_MACHINE
5422#define C_SWITCH_MACHINE
5423#endif
5424configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5425configure___ c_switch_system=C_SWITCH_SYSTEM
5426configure___ c_switch_machine=C_SWITCH_MACHINE
5427
5428#ifndef LIB_X11_LIB
5429#define LIB_X11_LIB -lX11
5430#endif
5431
3b33a005
DL
5432#ifndef LIBX11_SYSTEM
5433#define LIBX11_SYSTEM
5434#endif
9d2818d6 5435configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5436
5437#ifdef UNEXEC
5438configure___ unexec=UNEXEC
5439#else
5440configure___ unexec=unexec.o
5441#endif
5442
5443#ifdef SYSTEM_MALLOC
5444configure___ system_malloc=yes
5445#else
5446configure___ system_malloc=no
5447#endif
5448
ef9e4345
GM
5449#ifdef USE_MMAP_FOR_BUFFERS
5450configure___ use_mmap_for_buffers=yes
73b77ee5 5451#else
ef9e4345 5452configure___ use_mmap_for_buffers=no
73b77ee5
GM
5453#endif
5454
3b33a005
DL
5455#ifndef C_DEBUG_SWITCH
5456#define C_DEBUG_SWITCH -g
5457#endif
5458
5459#ifndef C_OPTIMIZE_SWITCH
5460#ifdef __GNUC__
5461#define C_OPTIMIZE_SWITCH -O2
5462#else
5463#define C_OPTIMIZE_SWITCH -O
5464#endif
5465#endif
5466
01abe918
CY
5467#ifndef C_WARNINGS_SWITCH
5468#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5469#endif
5470
3b33a005
DL
5471#ifndef LD_SWITCH_MACHINE
5472#define LD_SWITCH_MACHINE
5473#endif
5474
5475#ifndef LD_SWITCH_SYSTEM
5476#define LD_SWITCH_SYSTEM
5477#endif
5478
5479#ifndef LD_SWITCH_X_SITE_AUX
5480#define LD_SWITCH_X_SITE_AUX
503d2be0 5481#endif
3b33a005
DL
5482
5483configure___ ld_switch_system=LD_SWITCH_SYSTEM
5484configure___ ld_switch_machine=LD_SWITCH_MACHINE
5485
5486#ifdef THIS_IS_CONFIGURE
5487
5488/* Get the CFLAGS for tests in configure. */
5489#ifdef __GNUC__
5490configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5491#else
5492configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5493#endif
5494
5495#else /* not THIS_IS_CONFIGURE */
5496
5497/* Get the CFLAGS for real compilation. */
5498#ifdef __GNUC__
01abe918 5499configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5500#else
5501configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5502#endif
5503
5504#endif /* not THIS_IS_CONFIGURE */
5505' > ${tempcname}
5506
5507# The value of CPP is a quoted variable reference, so we need to do this
5508# to get its actual value...
5509CPP=`eval "echo $CPP"`
5510eval `${CPP} -Isrc ${tempcname} \
5511 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5512if test "x$SPECIFIED_CFLAGS" = x; then
5513 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5514 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5515else
5516 REAL_CFLAGS="$CFLAGS"
5517fi
5518rm ${tempcname}
5519
5520ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5521
5522### Make sure subsequent tests use flags consistent with the build flags.
5523
5524if test x"${OVERRIDE_CPPFLAGS}" != x; then
5525 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5526else
5527 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5528fi
5529
6bae0ccf
DL
5530
5531
ca81d7a0 5532# Check whether --enable-largefile was given.
f4988be7 5533if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5534 enableval=$enable_largefile;
5535fi
f4988be7 5536
503d2be0 5537if test "$enable_largefile" != no; then
f4988be7 5538
ca81d7a0
JD
5539 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5540echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5541if test "${ac_cv_sys_largefile_CC+set}" = set; then
5542 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5543else
f4988be7 5544 ac_cv_sys_largefile_CC=no
503d2be0
AS
5545 if test "$GCC" != yes; then
5546 ac_save_CC=$CC
5547 while :; do
ca81d7a0
JD
5548 # IRIX 6.2 and later do not support large files by default,
5549 # so use the C compiler's -n32 option if that helps.
edfaf76d 5550 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5551/* confdefs.h. */
5552_ACEOF
5553cat confdefs.h >>conftest.$ac_ext
5554cat >>conftest.$ac_ext <<_ACEOF
5555/* end confdefs.h. */
f4988be7 5556#include <sys/types.h>
503d2be0
AS
5557 /* Check that off_t can represent 2**63 - 1 correctly.
5558 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5559 since some C++ compilers masquerading as C compilers
5560 incorrectly reject 9223372036854775807. */
5561#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5562 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5563 && LARGE_OFF_T % 2147483647 == 1)
5564 ? 1 : -1];
5565int
5566main ()
5567{
f4988be7 5568
503d2be0
AS
5569 ;
5570 return 0;
5571}
5572_ACEOF
ca81d7a0
JD
5573 rm -f conftest.$ac_objext
5574if { (ac_try="$ac_compile"
5575case "(($ac_try" in
5576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5577 *) ac_try_echo=$ac_try;;
5578esac
5579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5580 (eval "$ac_compile") 2>conftest.er1
503d2be0 5581 ac_status=$?
edfaf76d
LK
5582 grep -v '^ *+' conftest.er1 >conftest.err
5583 rm -f conftest.er1
5584 cat conftest.err >&5
c0d27fcc 5585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5586 (exit $ac_status); } && {
5587 test -z "$ac_c_werror_flag" ||
5588 test ! -s conftest.err
5589 } && test -s conftest.$ac_objext; then
503d2be0 5590 break
b192d653 5591else
503d2be0 5592 echo "$as_me: failed program was:" >&5
19650fd6
AS
5593sed 's/^/| /' conftest.$ac_ext >&5
5594
ca81d7a0 5595
503d2be0 5596fi
ca81d7a0
JD
5597
5598rm -f core conftest.err conftest.$ac_objext
5599 CC="$CC -n32"
5600 rm -f conftest.$ac_objext
5601if { (ac_try="$ac_compile"
5602case "(($ac_try" in
5603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5604 *) ac_try_echo=$ac_try;;
5605esac
5606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5607 (eval "$ac_compile") 2>conftest.er1
503d2be0 5608 ac_status=$?
edfaf76d
LK
5609 grep -v '^ *+' conftest.er1 >conftest.err
5610 rm -f conftest.er1
5611 cat conftest.err >&5
c0d27fcc 5612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5613 (exit $ac_status); } && {
5614 test -z "$ac_c_werror_flag" ||
5615 test ! -s conftest.err
5616 } && test -s conftest.$ac_objext; then
503d2be0
AS
5617 ac_cv_sys_largefile_CC=' -n32'; break
5618else
5619 echo "$as_me: failed program was:" >&5
19650fd6
AS
5620sed 's/^/| /' conftest.$ac_ext >&5
5621
ca81d7a0 5622
503d2be0 5623fi
ca81d7a0
JD
5624
5625rm -f core conftest.err conftest.$ac_objext
edfaf76d 5626 break
503d2be0
AS
5627 done
5628 CC=$ac_save_CC
5629 rm -f conftest.$ac_ext
5630 fi
b192d653 5631fi
ca81d7a0
JD
5632{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5633echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5634 if test "$ac_cv_sys_largefile_CC" != no; then
5635 CC=$CC$ac_cv_sys_largefile_CC
5636 fi
b192d653 5637
ca81d7a0
JD
5638 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5639echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5640if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5641 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5642else
503d2be0 5643 while :; do
503d2be0 5644 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5645/* confdefs.h. */
5646_ACEOF
5647cat confdefs.h >>conftest.$ac_ext
5648cat >>conftest.$ac_ext <<_ACEOF
5649/* end confdefs.h. */
f4988be7 5650#include <sys/types.h>
503d2be0
AS
5651 /* Check that off_t can represent 2**63 - 1 correctly.
5652 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5653 since some C++ compilers masquerading as C compilers
5654 incorrectly reject 9223372036854775807. */
5655#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5656 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5657 && LARGE_OFF_T % 2147483647 == 1)
5658 ? 1 : -1];
5659int
5660main ()
5661{
f4988be7 5662
503d2be0
AS
5663 ;
5664 return 0;
5665}
5666_ACEOF
5667rm -f conftest.$ac_objext
ca81d7a0
JD
5668if { (ac_try="$ac_compile"
5669case "(($ac_try" in
5670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5671 *) ac_try_echo=$ac_try;;
5672esac
5673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5674 (eval "$ac_compile") 2>conftest.er1
503d2be0 5675 ac_status=$?
edfaf76d
LK
5676 grep -v '^ *+' conftest.er1 >conftest.err
5677 rm -f conftest.er1
5678 cat conftest.err >&5
c0d27fcc 5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5680 (exit $ac_status); } && {
5681 test -z "$ac_c_werror_flag" ||
5682 test ! -s conftest.err
5683 } && test -s conftest.$ac_objext; then
5684 ac_cv_sys_file_offset_bits=no; break
f4988be7 5685else
503d2be0 5686 echo "$as_me: failed program was:" >&5
19650fd6
AS
5687sed 's/^/| /' conftest.$ac_ext >&5
5688
ca81d7a0 5689
503d2be0 5690fi
ca81d7a0
JD
5691
5692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5693 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5694/* confdefs.h. */
5695_ACEOF
5696cat confdefs.h >>conftest.$ac_ext
5697cat >>conftest.$ac_ext <<_ACEOF
5698/* end confdefs.h. */
f4988be7
GM
5699#define _FILE_OFFSET_BITS 64
5700#include <sys/types.h>
503d2be0
AS
5701 /* Check that off_t can represent 2**63 - 1 correctly.
5702 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5703 since some C++ compilers masquerading as C compilers
5704 incorrectly reject 9223372036854775807. */
5705#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5706 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5707 && LARGE_OFF_T % 2147483647 == 1)
5708 ? 1 : -1];
5709int
5710main ()
5711{
5712
5713 ;
5714 return 0;
5715}
5716_ACEOF
5717rm -f conftest.$ac_objext
ca81d7a0
JD
5718if { (ac_try="$ac_compile"
5719case "(($ac_try" in
5720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5721 *) ac_try_echo=$ac_try;;
5722esac
5723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5724 (eval "$ac_compile") 2>conftest.er1
503d2be0 5725 ac_status=$?
edfaf76d
LK
5726 grep -v '^ *+' conftest.er1 >conftest.err
5727 rm -f conftest.er1
5728 cat conftest.err >&5
c0d27fcc 5729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5730 (exit $ac_status); } && {
5731 test -z "$ac_c_werror_flag" ||
5732 test ! -s conftest.err
5733 } && test -s conftest.$ac_objext; then
503d2be0
AS
5734 ac_cv_sys_file_offset_bits=64; break
5735else
5736 echo "$as_me: failed program was:" >&5
19650fd6
AS
5737sed 's/^/| /' conftest.$ac_ext >&5
5738
ca81d7a0 5739
503d2be0 5740fi
ca81d7a0
JD
5741
5742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5743 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5744 break
5745done
ba4481b5 5746fi
ca81d7a0
JD
5747{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5748echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5749case $ac_cv_sys_file_offset_bits in #(
5750 no | unknown) ;;
5751 *)
c0d27fcc 5752cat >>confdefs.h <<_ACEOF
f4988be7 5753#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5754_ACEOF
f053c89f
CY
5755;;
5756esac
503d2be0 5757rm -f conftest*
f053c89f
CY
5758 if test $ac_cv_sys_file_offset_bits = unknown; then
5759 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5760echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5761if test "${ac_cv_sys_large_files+set}" = set; then
5762 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5763else
503d2be0 5764 while :; do
503d2be0 5765 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5766/* confdefs.h. */
5767_ACEOF
5768cat confdefs.h >>conftest.$ac_ext
5769cat >>conftest.$ac_ext <<_ACEOF
5770/* end confdefs.h. */
503d2be0
AS
5771#include <sys/types.h>
5772 /* Check that off_t can represent 2**63 - 1 correctly.
5773 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5774 since some C++ compilers masquerading as C compilers
5775 incorrectly reject 9223372036854775807. */
5776#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5777 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5778 && LARGE_OFF_T % 2147483647 == 1)
5779 ? 1 : -1];
5780int
5781main ()
5782{
ba4481b5 5783
503d2be0
AS
5784 ;
5785 return 0;
5786}
5787_ACEOF
5788rm -f conftest.$ac_objext
ca81d7a0
JD
5789if { (ac_try="$ac_compile"
5790case "(($ac_try" in
5791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5792 *) ac_try_echo=$ac_try;;
5793esac
5794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5795 (eval "$ac_compile") 2>conftest.er1
503d2be0 5796 ac_status=$?
edfaf76d
LK
5797 grep -v '^ *+' conftest.er1 >conftest.err
5798 rm -f conftest.er1
5799 cat conftest.err >&5
c0d27fcc 5800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5801 (exit $ac_status); } && {
5802 test -z "$ac_c_werror_flag" ||
5803 test ! -s conftest.err
5804 } && test -s conftest.$ac_objext; then
5805 ac_cv_sys_large_files=no; break
ba4481b5 5806else
503d2be0 5807 echo "$as_me: failed program was:" >&5
19650fd6
AS
5808sed 's/^/| /' conftest.$ac_ext >&5
5809
ca81d7a0 5810
503d2be0 5811fi
ca81d7a0
JD
5812
5813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5814 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
f4988be7 5820#define _LARGE_FILES 1
503d2be0
AS
5821#include <sys/types.h>
5822 /* Check that off_t can represent 2**63 - 1 correctly.
5823 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5824 since some C++ compilers masquerading as C compilers
5825 incorrectly reject 9223372036854775807. */
5826#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5827 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5828 && LARGE_OFF_T % 2147483647 == 1)
5829 ? 1 : -1];
5830int
5831main ()
5832{
f4988be7 5833
503d2be0
AS
5834 ;
5835 return 0;
5836}
5837_ACEOF
5838rm -f conftest.$ac_objext
ca81d7a0
JD
5839if { (ac_try="$ac_compile"
5840case "(($ac_try" in
5841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5842 *) ac_try_echo=$ac_try;;
5843esac
5844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5845 (eval "$ac_compile") 2>conftest.er1
503d2be0 5846 ac_status=$?
edfaf76d
LK
5847 grep -v '^ *+' conftest.er1 >conftest.err
5848 rm -f conftest.er1
5849 cat conftest.err >&5
c0d27fcc 5850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5851 (exit $ac_status); } && {
5852 test -z "$ac_c_werror_flag" ||
5853 test ! -s conftest.err
5854 } && test -s conftest.$ac_objext; then
503d2be0
AS
5855 ac_cv_sys_large_files=1; break
5856else
5857 echo "$as_me: failed program was:" >&5
19650fd6
AS
5858sed 's/^/| /' conftest.$ac_ext >&5
5859
ca81d7a0 5860
503d2be0 5861fi
ca81d7a0
JD
5862
5863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5864 ac_cv_sys_large_files=unknown
503d2be0
AS
5865 break
5866done
ba4481b5 5867fi
ca81d7a0
JD
5868{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5869echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5870case $ac_cv_sys_large_files in #(
5871 no | unknown) ;;
5872 *)
c0d27fcc 5873cat >>confdefs.h <<_ACEOF
f4988be7 5874#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5875_ACEOF
f053c89f
CY
5876;;
5877esac
503d2be0 5878rm -f conftest*
f053c89f 5879 fi
503d2be0 5880fi
ba4481b5 5881
c0d27fcc 5882
439f58ee 5883
55e6d9b2 5884### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5885### be located in either /usr/lib64 or /usr/lib.
5886case "${canonical}" in
55e6d9b2 5887 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5888 if test -d /usr/lib64; then
5889
5890cat >>confdefs.h <<\_ACEOF
55e6d9b2 5891#define HAVE_LIB64_DIR 1
bc5d9888
CY
5892_ACEOF
5893
5894fi
5895esac
5896
439f58ee
JD
5897
5898
5899
2c9dccc9
PJ
5900if test "${with_sound}" != "no"; then
5901 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5902
5903
5904
5905for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5906do
5907as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5908if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5909 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5910echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5911if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5912 echo $ECHO_N "(cached) $ECHO_C" >&6
5913fi
ca81d7a0
JD
5914ac_res=`eval echo '${'$as_ac_Header'}'`
5915 { echo "$as_me:$LINENO: result: $ac_res" >&5
5916echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5917else
5918 # Is the header compilable?
ca81d7a0
JD
5919{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5920echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5921cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5922/* confdefs.h. */
5923_ACEOF
5924cat confdefs.h >>conftest.$ac_ext
5925cat >>conftest.$ac_ext <<_ACEOF
5926/* end confdefs.h. */
c0d27fcc 5927$ac_includes_default
98418dba 5928#include <$ac_header>
503d2be0 5929_ACEOF
c0d27fcc 5930rm -f conftest.$ac_objext
ca81d7a0
JD
5931if { (ac_try="$ac_compile"
5932case "(($ac_try" in
5933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5934 *) ac_try_echo=$ac_try;;
5935esac
5936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5937 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5938 ac_status=$?
edfaf76d
LK
5939 grep -v '^ *+' conftest.er1 >conftest.err
5940 rm -f conftest.er1
5941 cat conftest.err >&5
c0d27fcc 5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5943 (exit $ac_status); } && {
5944 test -z "$ac_c_werror_flag" ||
5945 test ! -s conftest.err
5946 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5947 ac_header_compiler=yes
5948else
5949 echo "$as_me: failed program was:" >&5
19650fd6
AS
5950sed 's/^/| /' conftest.$ac_ext >&5
5951
ca81d7a0 5952 ac_header_compiler=no
c0d27fcc 5953fi
ca81d7a0
JD
5954
5955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5956{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5957echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5958
5959# Is the header present?
ca81d7a0
JD
5960{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5961echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5962cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5963/* confdefs.h. */
5964_ACEOF
5965cat confdefs.h >>conftest.$ac_ext
5966cat >>conftest.$ac_ext <<_ACEOF
5967/* end confdefs.h. */
c0d27fcc
MR
5968#include <$ac_header>
5969_ACEOF
ca81d7a0
JD
5970if { (ac_try="$ac_cpp conftest.$ac_ext"
5971case "(($ac_try" in
5972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5973 *) ac_try_echo=$ac_try;;
5974esac
5975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5976 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5977 ac_status=$?
6bae0ccf 5978 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5979 rm -f conftest.er1
5980 cat conftest.err >&5
c0d27fcc 5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5982 (exit $ac_status); } >/dev/null && {
5983 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5984 test ! -s conftest.err
5985 }; then
c0d27fcc 5986 ac_header_preproc=yes
f4988be7 5987else
503d2be0 5988 echo "$as_me: failed program was:" >&5
19650fd6
AS
5989sed 's/^/| /' conftest.$ac_ext >&5
5990
c0d27fcc 5991 ac_header_preproc=no
f4988be7 5992fi
ca81d7a0 5993
98418dba 5994rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
5995{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5996echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
5997
5998# So? What about this header?
edfaf76d
LK
5999case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6000 yes:no: )
c0d27fcc
MR
6001 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6002echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6003 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6004echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6005 ac_header_preproc=yes
19650fd6 6006 ;;
edfaf76d 6007 no:yes:* )
c0d27fcc
MR
6008 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6009echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6010 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6011echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6012 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6013echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6014 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6015echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6016 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6017echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6018 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6019echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6020
19650fd6 6021 ;;
c0d27fcc 6022esac
ca81d7a0
JD
6023{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6024echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6025if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6026 echo $ECHO_N "(cached) $ECHO_C" >&6
6027else
edfaf76d 6028 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6029fi
ca81d7a0
JD
6030ac_res=`eval echo '${'$as_ac_Header'}'`
6031 { echo "$as_me:$LINENO: result: $ac_res" >&5
6032echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6033
6034fi
98418dba 6035if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6036 cat >>confdefs.h <<_ACEOF
98418dba 6037#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6038_ACEOF
f4988be7
GM
6039
6040fi
c0d27fcc 6041
98418dba
CW
6042done
6043
6044 # Emulation library used on NetBSD.
ca81d7a0
JD
6045 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6046echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6047if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6048 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6049else
98418dba
CW
6050 ac_check_lib_save_LIBS=$LIBS
6051LIBS="-lossaudio $LIBS"
6052cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6053/* confdefs.h. */
6054_ACEOF
6055cat confdefs.h >>conftest.$ac_ext
6056cat >>conftest.$ac_ext <<_ACEOF
6057/* end confdefs.h. */
98418dba 6058
ca81d7a0
JD
6059/* Override any GCC internal prototype to avoid an error.
6060 Use char because int might match the return type of a GCC
6061 builtin and then its argument prototype would still apply. */
98418dba
CW
6062#ifdef __cplusplus
6063extern "C"
f4988be7 6064#endif
98418dba 6065char _oss_ioctl ();
503d2be0
AS
6066int
6067main ()
6068{
ca81d7a0 6069return _oss_ioctl ();
503d2be0
AS
6070 ;
6071 return 0;
6072}
6073_ACEOF
98418dba 6074rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6075if { (ac_try="$ac_link"
6076case "(($ac_try" in
6077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6078 *) ac_try_echo=$ac_try;;
6079esac
6080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6081 (eval "$ac_link") 2>conftest.er1
503d2be0 6082 ac_status=$?
edfaf76d
LK
6083 grep -v '^ *+' conftest.er1 >conftest.err
6084 rm -f conftest.er1
6085 cat conftest.err >&5
c0d27fcc 6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6087 (exit $ac_status); } && {
6088 test -z "$ac_c_werror_flag" ||
6089 test ! -s conftest.err
6090 } && test -s conftest$ac_exeext &&
6091 $as_test_x conftest$ac_exeext; then
98418dba 6092 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6093else
503d2be0 6094 echo "$as_me: failed program was:" >&5
19650fd6
AS
6095sed 's/^/| /' conftest.$ac_ext >&5
6096
ca81d7a0 6097 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6098fi
ca81d7a0 6099
f053c89f 6100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6101 conftest$ac_exeext conftest.$ac_ext
98418dba 6102LIBS=$ac_check_lib_save_LIBS
f4988be7 6103fi
ca81d7a0
JD
6104{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6105echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6106if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6107 LIBSOUND=-lossaudio
6108else
6109 LIBSOUND=
6110fi
6111
c0d27fcc 6112
439f58ee
JD
6113
6114 ALSA_REQUIRED=1.0.0
6115 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6116
6117 succeeded=no
6118
00b9c927 6119 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6120set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6121{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6123if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6124 echo $ECHO_N "(cached) $ECHO_C" >&6
6125else
6126 case $PKG_CONFIG in
6127 [\\/]* | ?:[\\/]*)
6128 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6129 ;;
6130 *)
6131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH
6133do
6134 IFS=$as_save_IFS
6135 test -z "$as_dir" && as_dir=.
6136 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6138 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6140 break 2
6141 fi
6142done
6143done
ca81d7a0 6144IFS=$as_save_IFS
439f58ee
JD
6145
6146 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6147 ;;
6148esac
6149fi
6150PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6151if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6152 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6153echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6154else
ca81d7a0
JD
6155 { echo "$as_me:$LINENO: result: no" >&5
6156echo "${ECHO_T}no" >&6; }
439f58ee
JD
6157fi
6158
ca81d7a0 6159
439f58ee
JD
6160
6161 if test "$PKG_CONFIG" = "no" ; then
6162 HAVE_ALSA=no
6163 else
6164 PKG_CONFIG_MIN_VERSION=0.9.0
6165 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6166 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6167echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6168
67db6aa2 6169 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6170 { echo "$as_me:$LINENO: result: yes" >&5
6171echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6172 succeeded=yes
6173
ca81d7a0
JD
6174 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6175echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6176 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6177 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6178echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6179
ca81d7a0
JD
6180 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6181echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6182 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6183 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6184echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6185 else
ca81d7a0
JD
6186 { echo "$as_me:$LINENO: result: no" >&5
6187echo "${ECHO_T}no" >&6; }
439f58ee
JD
6188 ALSA_CFLAGS=""
6189 ALSA_LIBS=""
6190 ## If we have a custom action on failure, don't print errors, but
6191 ## do set a variable so people can do so.
6192 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6193
6194 fi
6195
6196
6197
6198 else
6199 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6200 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6201 fi
6202 fi
6203
6204 if test $succeeded = yes; then
6205 HAVE_ALSA=yes
6206 else
6207 HAVE_ALSA=no
6208 fi
6209
6210 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6211 SAVE_CFLAGS="$CFLAGS"
6212 SAVE_LDFLAGS="$LDFLAGS"
6213 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6214 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6215 cat >conftest.$ac_ext <<_ACEOF
6216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
6221#include <asoundlib.h>
6222int
6223main ()
6224{
6225snd_lib_error_set_handler (0);
6226 ;
6227 return 0;
6228}
6229_ACEOF
6230rm -f conftest.$ac_objext
6231if { (ac_try="$ac_compile"
6232case "(($ac_try" in
6233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6234 *) ac_try_echo=$ac_try;;
6235esac
6236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6237 (eval "$ac_compile") 2>conftest.er1
6238 ac_status=$?
6239 grep -v '^ *+' conftest.er1 >conftest.err
6240 rm -f conftest.er1
6241 cat conftest.err >&5
6242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6243 (exit $ac_status); } && {
6244 test -z "$ac_c_werror_flag" ||
6245 test ! -s conftest.err
6246 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6247 emacs_alsa_normal=yes
6248else
6249 echo "$as_me: failed program was:" >&5
6250sed 's/^/| /' conftest.$ac_ext >&5
6251
6252 emacs_alsa_normal=no
6253fi
6254
6255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6256 if test "$emacs_alsa_normal" != yes; then
6257 cat >conftest.$ac_ext <<_ACEOF
6258/* confdefs.h. */
6259_ACEOF
6260cat confdefs.h >>conftest.$ac_ext
6261cat >>conftest.$ac_ext <<_ACEOF
6262/* end confdefs.h. */
6263#include <alsa/asoundlib.h>
6264int
6265main ()
6266{
6267snd_lib_error_set_handler (0);
6268 ;
6269 return 0;
6270}
6271_ACEOF
6272rm -f conftest.$ac_objext
6273if { (ac_try="$ac_compile"
6274case "(($ac_try" in
6275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6276 *) ac_try_echo=$ac_try;;
6277esac
6278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6279 (eval "$ac_compile") 2>conftest.er1
6280 ac_status=$?
6281 grep -v '^ *+' conftest.er1 >conftest.err
6282 rm -f conftest.er1
6283 cat conftest.err >&5
6284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6285 (exit $ac_status); } && {
6286 test -z "$ac_c_werror_flag" ||
6287 test ! -s conftest.err
6288 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6289 emacs_alsa_subdir=yes
6290else
6291 echo "$as_me: failed program was:" >&5
6292sed 's/^/| /' conftest.$ac_ext >&5
6293
6294 emacs_alsa_subdir=no
6295fi
6296
6297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6298 if test "$emacs_alsa_subdir" != yes; then
6299 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6300echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6301 { (exit 1); exit 1; }; }
6302 fi
6303 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6304 fi
6305
6306 CFLAGS="$SAVE_CFLAGS"
6307 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6308 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6309 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6310
6311cat >>confdefs.h <<\_ACEOF
6312#define HAVE_ALSA 1
6313_ACEOF
6314
6315 fi
6316
f4988be7 6317fi
c0d27fcc
MR
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
22044edf
DL
6336
6337
973a76b1 6338
cffcede7 6339
551ffc27 6340
226e2359 6341
c0d27fcc 6342
f4988be7 6343
98418dba
CW
6344for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6345 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6346 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6347 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6348 sys/utsname.h pwd.h
98418dba
CW
6349do
6350as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6351if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6352 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6354if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6355 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6356fi
ca81d7a0
JD
6357ac_res=`eval echo '${'$as_ac_Header'}'`
6358 { echo "$as_me:$LINENO: result: $ac_res" >&5
6359echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6360else
c0d27fcc 6361 # Is the header compilable?
ca81d7a0
JD
6362{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6363echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6364cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6365/* confdefs.h. */
6366_ACEOF
6367cat confdefs.h >>conftest.$ac_ext
6368cat >>conftest.$ac_ext <<_ACEOF
6369/* end confdefs.h. */
c0d27fcc
MR
6370$ac_includes_default
6371#include <$ac_header>
6372_ACEOF
6373rm -f conftest.$ac_objext
ca81d7a0
JD
6374if { (ac_try="$ac_compile"
6375case "(($ac_try" in
6376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6377 *) ac_try_echo=$ac_try;;
6378esac
6379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6380 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6381 ac_status=$?
edfaf76d
LK
6382 grep -v '^ *+' conftest.er1 >conftest.err
6383 rm -f conftest.er1
6384 cat conftest.err >&5
c0d27fcc 6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6386 (exit $ac_status); } && {
6387 test -z "$ac_c_werror_flag" ||
6388 test ! -s conftest.err
6389 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6390 ac_header_compiler=yes
6391else
6392 echo "$as_me: failed program was:" >&5
19650fd6
AS
6393sed 's/^/| /' conftest.$ac_ext >&5
6394
ca81d7a0 6395 ac_header_compiler=no
c0d27fcc 6396fi
ca81d7a0
JD
6397
6398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6399{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6400echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6401
6402# Is the header present?
ca81d7a0
JD
6403{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6404echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6405cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6406/* confdefs.h. */
6407_ACEOF
6408cat confdefs.h >>conftest.$ac_ext
6409cat >>conftest.$ac_ext <<_ACEOF
6410/* end confdefs.h. */
98418dba 6411#include <$ac_header>
503d2be0 6412_ACEOF
ca81d7a0
JD
6413if { (ac_try="$ac_cpp conftest.$ac_ext"
6414case "(($ac_try" in
6415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6416 *) ac_try_echo=$ac_try;;
6417esac
6418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6419 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6420 ac_status=$?
6bae0ccf 6421 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6422 rm -f conftest.er1
6423 cat conftest.err >&5
c0d27fcc 6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6425 (exit $ac_status); } >/dev/null && {
6426 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6427 test ! -s conftest.err
6428 }; then
c0d27fcc 6429 ac_header_preproc=yes
34ec9ebe 6430else
503d2be0 6431 echo "$as_me: failed program was:" >&5
19650fd6
AS
6432sed 's/^/| /' conftest.$ac_ext >&5
6433
c0d27fcc 6434 ac_header_preproc=no
34ec9ebe 6435fi
ca81d7a0 6436
98418dba 6437rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6438{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6439echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6440
6441# So? What about this header?
edfaf76d
LK
6442case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6443 yes:no: )
c0d27fcc
MR
6444 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6445echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6447echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6448 ac_header_preproc=yes
19650fd6 6449 ;;
edfaf76d 6450 no:yes:* )
c0d27fcc
MR
6451 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6452echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6453 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6454echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6455 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6456echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6457 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6458echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6459 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6460echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6461 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6462echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6463
19650fd6 6464 ;;
c0d27fcc 6465esac
ca81d7a0
JD
6466{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6467echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6468if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6469 echo $ECHO_N "(cached) $ECHO_C" >&6
6470else
edfaf76d 6471 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6472fi
ca81d7a0
JD
6473ac_res=`eval echo '${'$as_ac_Header'}'`
6474 { echo "$as_me:$LINENO: result: $ac_res" >&5
6475echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6476
6477fi
98418dba 6478if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6479 cat >>confdefs.h <<_ACEOF
98418dba 6480#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6481_ACEOF
34ec9ebe 6482
98418dba 6483fi
c0d27fcc 6484
98418dba
CW
6485done
6486
22044edf 6487
ca81d7a0
JD
6488{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6489echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6490cat >conftest.$ac_ext <<_ACEOF
6491/* confdefs.h. */
6492_ACEOF
6493cat confdefs.h >>conftest.$ac_ext
6494cat >>conftest.$ac_ext <<_ACEOF
6495/* end confdefs.h. */
6496#include <sys/personality.h>
6497int
6498main ()
6499{
6500personality (PER_LINUX32)
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext
ca81d7a0
JD
6506if { (ac_try="$ac_compile"
6507case "(($ac_try" in
6508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6509 *) ac_try_echo=$ac_try;;
6510esac
6511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6512 (eval "$ac_compile") 2>conftest.er1
f17e308a 6513 ac_status=$?
edfaf76d
LK
6514 grep -v '^ *+' conftest.er1 >conftest.err
6515 rm -f conftest.er1
6516 cat conftest.err >&5
f17e308a 6517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6518 (exit $ac_status); } && {
6519 test -z "$ac_c_werror_flag" ||
6520 test ! -s conftest.err
6521 } && test -s conftest.$ac_objext; then
f17e308a
JD
6522 emacs_cv_personality_linux32=yes
6523else
6524 echo "$as_me: failed program was:" >&5
6525sed 's/^/| /' conftest.$ac_ext >&5
6526
ca81d7a0 6527 emacs_cv_personality_linux32=no
f17e308a 6528fi
ca81d7a0
JD
6529
6530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6531{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6532echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6533
6534if test $emacs_cv_personality_linux32 = yes; then
6535
6536cat >>confdefs.h <<\_ACEOF
6537#define HAVE_PERSONALITY_LINUX32 1
6538_ACEOF
6539
6540fi
6541
6542
22044edf
DL
6543for ac_header in term.h
6544do
6545as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6546{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6547echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6548if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6549 echo $ECHO_N "(cached) $ECHO_C" >&6
6550else
6551 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6552/* confdefs.h. */
6553_ACEOF
6554cat confdefs.h >>conftest.$ac_ext
6555cat >>conftest.$ac_ext <<_ACEOF
6556/* end confdefs.h. */
22044edf
DL
6557#include <$ac_header>
6558_ACEOF
ca81d7a0
JD
6559if { (ac_try="$ac_cpp conftest.$ac_ext"
6560case "(($ac_try" in
6561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562 *) ac_try_echo=$ac_try;;
6563esac
6564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6565 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6566 ac_status=$?
6567 grep -v '^ *+' conftest.er1 >conftest.err
6568 rm -f conftest.er1
6569 cat conftest.err >&5
6570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6571 (exit $ac_status); } >/dev/null && {
6572 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6573 test ! -s conftest.err
6574 }; then
22044edf
DL
6575 eval "$as_ac_Header=yes"
6576else
6577 echo "$as_me: failed program was:" >&5
19650fd6
AS
6578sed 's/^/| /' conftest.$ac_ext >&5
6579
22044edf
DL
6580 eval "$as_ac_Header=no"
6581fi
ca81d7a0 6582
22044edf
DL
6583rm -f conftest.err conftest.$ac_ext
6584fi
ca81d7a0
JD
6585ac_res=`eval echo '${'$as_ac_Header'}'`
6586 { echo "$as_me:$LINENO: result: $ac_res" >&5
6587echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6588if test `eval echo '${'$as_ac_Header'}'` = yes; then
6589 cat >>confdefs.h <<_ACEOF
6590#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6591_ACEOF
6592
6593fi
6594
6595done
6596
ca81d7a0
JD
6597{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6598echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6599if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6600 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6601else
503d2be0 6602 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
98418dba
CW
6608#include <stdlib.h>
6609#include <stdarg.h>
6610#include <string.h>
6611#include <float.h>
6612
19650fd6
AS
6613int
6614main ()
6615{
6616
6617 ;
6618 return 0;
6619}
98418dba 6620_ACEOF
19650fd6 6621rm -f conftest.$ac_objext
ca81d7a0
JD
6622if { (ac_try="$ac_compile"
6623case "(($ac_try" in
6624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6625 *) ac_try_echo=$ac_try;;
6626esac
6627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6628 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6629 ac_status=$?
edfaf76d
LK
6630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
cd958eb3 6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6634 (exit $ac_status); } && {
6635 test -z "$ac_c_werror_flag" ||
6636 test ! -s conftest.err
6637 } && test -s conftest.$ac_objext; then
98418dba 6638 ac_cv_header_stdc=yes
ba4481b5 6639else
503d2be0 6640 echo "$as_me: failed program was:" >&5
19650fd6
AS
6641sed 's/^/| /' conftest.$ac_ext >&5
6642
ca81d7a0 6643 ac_cv_header_stdc=no
ba4481b5 6644fi
ca81d7a0
JD
6645
6646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6647
6648if test $ac_cv_header_stdc = yes; then
6649 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6650 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6651/* confdefs.h. */
6652_ACEOF
6653cat confdefs.h >>conftest.$ac_ext
6654cat >>conftest.$ac_ext <<_ACEOF
6655/* end confdefs.h. */
98418dba
CW
6656#include <string.h>
6657
6658_ACEOF
6659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6660 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6661 :
6662else
6663 ac_cv_header_stdc=no
ba4481b5 6664fi
98418dba 6665rm -f conftest*
ba4481b5
DL
6666
6667fi
6668
98418dba
CW
6669if test $ac_cv_header_stdc = yes; then
6670 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6671 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
98418dba
CW
6677#include <stdlib.h>
6678
6679_ACEOF
6680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6681 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6682 :
6683else
6684 ac_cv_header_stdc=no
6685fi
6686rm -f conftest*
6687
6688fi
6689
6690if test $ac_cv_header_stdc = yes; then
6691 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6692 if test "$cross_compiling" = yes; then
6693 :
d42122a3 6694else
503d2be0 6695 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6696/* confdefs.h. */
6697_ACEOF
6698cat confdefs.h >>conftest.$ac_ext
6699cat >>conftest.$ac_ext <<_ACEOF
6700/* end confdefs.h. */
98418dba 6701#include <ctype.h>
ca81d7a0 6702#include <stdlib.h>
98418dba
CW
6703#if ((' ' & 0x0FF) == 0x020)
6704# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6705# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6706#else
19650fd6 6707# define ISLOWER(c) \
edfaf76d
LK
6708 (('a' <= (c) && (c) <= 'i') \
6709 || ('j' <= (c) && (c) <= 'r') \
6710 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6711# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6712#endif
6713
6714#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6715int
6716main ()
6717{
98418dba
CW
6718 int i;
6719 for (i = 0; i < 256; i++)
6720 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6721 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6722 return 2;
6723 return 0;
503d2be0
AS
6724}
6725_ACEOF
98418dba 6726rm -f conftest$ac_exeext
ca81d7a0
JD
6727if { (ac_try="$ac_link"
6728case "(($ac_try" in
6729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6730 *) ac_try_echo=$ac_try;;
6731esac
6732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6733 (eval "$ac_link") 2>&5
503d2be0 6734 ac_status=$?
c0d27fcc 6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6736 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6737 { (case "(($ac_try" in
6738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6739 *) ac_try_echo=$ac_try;;
6740esac
6741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6742 (eval "$ac_try") 2>&5
503d2be0 6743 ac_status=$?
c0d27fcc 6744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6745 (exit $ac_status); }; }; then
98418dba 6746 :
d42122a3 6747else
98418dba
CW
6748 echo "$as_me: program exited with status $ac_status" >&5
6749echo "$as_me: failed program was:" >&5
19650fd6
AS
6750sed 's/^/| /' conftest.$ac_ext >&5
6751
c0d27fcc 6752( exit $ac_status )
98418dba 6753ac_cv_header_stdc=no
d42122a3 6754fi
ca81d7a0 6755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6756fi
ca81d7a0
JD
6757
6758
98418dba
CW
6759fi
6760fi
ca81d7a0
JD
6761{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6762echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6763if test $ac_cv_header_stdc = yes; then
6764
c0d27fcc 6765cat >>confdefs.h <<\_ACEOF
98418dba 6766#define STDC_HEADERS 1
c0d27fcc 6767_ACEOF
d42122a3
DL
6768
6769fi
6770
ca81d7a0
JD
6771{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6772echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6773if test "${ac_cv_header_time+set}" = set; then
503d2be0 6774 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6775else
503d2be0 6776 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6777/* confdefs.h. */
6778_ACEOF
6779cat confdefs.h >>conftest.$ac_ext
6780cat >>conftest.$ac_ext <<_ACEOF
6781/* end confdefs.h. */
ba4481b5 6782#include <sys/types.h>
98418dba 6783#include <sys/time.h>
ba4481b5 6784#include <time.h>
503d2be0
AS
6785
6786int
6787main ()
6788{
98418dba
CW
6789if ((struct tm *) 0)
6790return 0;
503d2be0
AS
6791 ;
6792 return 0;
6793}
6794_ACEOF
6795rm -f conftest.$ac_objext
ca81d7a0
JD
6796if { (ac_try="$ac_compile"
6797case "(($ac_try" in
6798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6799 *) ac_try_echo=$ac_try;;
6800esac
6801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6802 (eval "$ac_compile") 2>conftest.er1
503d2be0 6803 ac_status=$?
edfaf76d
LK
6804 grep -v '^ *+' conftest.er1 >conftest.err
6805 rm -f conftest.er1
6806 cat conftest.err >&5
c0d27fcc 6807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6808 (exit $ac_status); } && {
6809 test -z "$ac_c_werror_flag" ||
6810 test ! -s conftest.err
6811 } && test -s conftest.$ac_objext; then
98418dba 6812 ac_cv_header_time=yes
ba4481b5 6813else
503d2be0 6814 echo "$as_me: failed program was:" >&5
19650fd6
AS
6815sed 's/^/| /' conftest.$ac_ext >&5
6816
ca81d7a0 6817 ac_cv_header_time=no
ba4481b5 6818fi
ca81d7a0
JD
6819
6820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6821fi
ca81d7a0
JD
6822{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6823echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6824if test $ac_cv_header_time = yes; then
503d2be0 6825
c0d27fcc 6826cat >>confdefs.h <<\_ACEOF
98418dba 6827#define TIME_WITH_SYS_TIME 1
c0d27fcc 6828_ACEOF
ba4481b5
DL
6829
6830fi
6831
ca81d7a0
JD
6832{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6833echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6834if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6835 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6836else
503d2be0 6837 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6838/* confdefs.h. */
6839_ACEOF
6840cat confdefs.h >>conftest.$ac_ext
6841cat >>conftest.$ac_ext <<_ACEOF
6842/* end confdefs.h. */
cd958eb3
MB
6843$ac_includes_default
6844int
6845main ()
6846{
6847#ifndef sys_siglist
f053c89f 6848 (void) sys_siglist;
98418dba 6849#endif
503d2be0 6850
cd958eb3
MB
6851 ;
6852 return 0;
6853}
6854_ACEOF
6855rm -f conftest.$ac_objext
ca81d7a0
JD
6856if { (ac_try="$ac_compile"
6857case "(($ac_try" in
6858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6859 *) ac_try_echo=$ac_try;;
6860esac
6861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6862 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6863 ac_status=$?
edfaf76d
LK
6864 grep -v '^ *+' conftest.er1 >conftest.err
6865 rm -f conftest.er1
6866 cat conftest.err >&5
cd958eb3 6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6868 (exit $ac_status); } && {
6869 test -z "$ac_c_werror_flag" ||
6870 test ! -s conftest.err
6871 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6872 ac_cv_have_decl_sys_siglist=yes
6873else
6874 echo "$as_me: failed program was:" >&5
19650fd6
AS
6875sed 's/^/| /' conftest.$ac_ext >&5
6876
ca81d7a0 6877 ac_cv_have_decl_sys_siglist=no
cd958eb3 6878fi
ca81d7a0
JD
6879
6880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6881fi
ca81d7a0
JD
6882{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6883echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6884if test $ac_cv_have_decl_sys_siglist = yes; then
6885
6886cat >>confdefs.h <<_ACEOF
6887#define HAVE_DECL_SYS_SIGLIST 1
6888_ACEOF
6889
6890
6891else
6892 cat >>confdefs.h <<_ACEOF
6893#define HAVE_DECL_SYS_SIGLIST 0
6894_ACEOF
6895
6896
6897fi
6898
6899
6900if test $ac_cv_have_decl_sys_siglist != yes; then
6901 # For Tru64, at least:
ca81d7a0
JD
6902 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6903echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6904if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6905 echo $ECHO_N "(cached) $ECHO_C" >&6
6906else
6907 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6908/* confdefs.h. */
6909_ACEOF
6910cat confdefs.h >>conftest.$ac_ext
6911cat >>conftest.$ac_ext <<_ACEOF
6912/* end confdefs.h. */
cd958eb3 6913$ac_includes_default
503d2be0
AS
6914int
6915main ()
6916{
cd958eb3 6917#ifndef __sys_siglist
f053c89f 6918 (void) __sys_siglist;
cd958eb3
MB
6919#endif
6920
503d2be0
AS
6921 ;
6922 return 0;
6923}
6924_ACEOF
6925rm -f conftest.$ac_objext
ca81d7a0
JD
6926if { (ac_try="$ac_compile"
6927case "(($ac_try" in
6928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6929 *) ac_try_echo=$ac_try;;
6930esac
6931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6932 (eval "$ac_compile") 2>conftest.er1
503d2be0 6933 ac_status=$?
edfaf76d
LK
6934 grep -v '^ *+' conftest.er1 >conftest.err
6935 rm -f conftest.er1
6936 cat conftest.err >&5
c0d27fcc 6937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6938 (exit $ac_status); } && {
6939 test -z "$ac_c_werror_flag" ||
6940 test ! -s conftest.err
6941 } && test -s conftest.$ac_objext; then
cd958eb3 6942 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6943else
503d2be0 6944 echo "$as_me: failed program was:" >&5
19650fd6
AS
6945sed 's/^/| /' conftest.$ac_ext >&5
6946
ca81d7a0 6947 ac_cv_have_decl___sys_siglist=no
ba4481b5 6948fi
ca81d7a0
JD
6949
6950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6951fi
ca81d7a0
JD
6952{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6953echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6954if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6955
cd958eb3
MB
6956cat >>confdefs.h <<_ACEOF
6957#define HAVE_DECL___SYS_SIGLIST 1
6958_ACEOF
6959
6960
6961else
6962 cat >>confdefs.h <<_ACEOF
6963#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6964_ACEOF
503d2be0 6965
cd958eb3 6966
ba4481b5
DL
6967fi
6968
cd958eb3
MB
6969
6970 if test $ac_cv_have_decl___sys_siglist = yes; then
6971
6972cat >>confdefs.h <<\_ACEOF
6973#define sys_siglist __sys_siglist
6974_ACEOF
6975
6976 fi
6977fi
ca81d7a0
JD
6978{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6979echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6980if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6981 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6982else
503d2be0 6983 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6984/* confdefs.h. */
6985_ACEOF
6986cat confdefs.h >>conftest.$ac_ext
6987cat >>conftest.$ac_ext <<_ACEOF
6988/* end confdefs.h. */
98418dba
CW
6989#include <sys/types.h>
6990#include <sys/wait.h>
6991#ifndef WEXITSTATUS
ca81d7a0 6992# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
6993#endif
6994#ifndef WIFEXITED
6995# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6996#endif
503d2be0
AS
6997
6998int
6999main ()
7000{
98418dba
CW
7001 int s;
7002 wait (&s);
7003 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7004 ;
7005 return 0;
7006}
7007_ACEOF
98418dba 7008rm -f conftest.$ac_objext
ca81d7a0
JD
7009if { (ac_try="$ac_compile"
7010case "(($ac_try" in
7011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7012 *) ac_try_echo=$ac_try;;
7013esac
7014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7015 (eval "$ac_compile") 2>conftest.er1
503d2be0 7016 ac_status=$?
edfaf76d
LK
7017 grep -v '^ *+' conftest.er1 >conftest.err
7018 rm -f conftest.er1
7019 cat conftest.err >&5
c0d27fcc 7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7021 (exit $ac_status); } && {
7022 test -z "$ac_c_werror_flag" ||
7023 test ! -s conftest.err
7024 } && test -s conftest.$ac_objext; then
98418dba 7025 ac_cv_header_sys_wait_h=yes
ba4481b5 7026else
503d2be0 7027 echo "$as_me: failed program was:" >&5
19650fd6
AS
7028sed 's/^/| /' conftest.$ac_ext >&5
7029
ca81d7a0 7030 ac_cv_header_sys_wait_h=no
ba4481b5 7031fi
ca81d7a0
JD
7032
7033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7034fi
ca81d7a0
JD
7035{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7036echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7037if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7038
c0d27fcc 7039cat >>confdefs.h <<\_ACEOF
98418dba 7040#define HAVE_SYS_WAIT_H 1
c0d27fcc 7041_ACEOF
ba4481b5 7042
ba4481b5
DL
7043fi
7044
c0d27fcc 7045
ca81d7a0
JD
7046{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7047echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7048if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7049 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7050else
503d2be0 7051 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7052/* confdefs.h. */
7053_ACEOF
7054cat confdefs.h >>conftest.$ac_ext
7055cat >>conftest.$ac_ext <<_ACEOF
7056/* end confdefs.h. */
98418dba
CW
7057#ifdef TIME_WITH_SYS_TIME
7058#include <sys/time.h>
7059#include <time.h>
7060#else
7061#ifdef HAVE_SYS_TIME_H
7062#include <sys/time.h>
7063#else
1113b624 7064#include <time.h>
98418dba
CW
7065#endif
7066#endif
7067#ifdef HAVE_UTIME_H
7068#include <utime.h>
7069#endif
503d2be0
AS
7070int
7071main ()
7072{
98418dba 7073static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7074 ;
7075 return 0;
7076}
7077_ACEOF
98418dba 7078rm -f conftest.$ac_objext
ca81d7a0
JD
7079if { (ac_try="$ac_compile"
7080case "(($ac_try" in
7081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7082 *) ac_try_echo=$ac_try;;
7083esac
7084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7085 (eval "$ac_compile") 2>conftest.er1
503d2be0 7086 ac_status=$?
edfaf76d
LK
7087 grep -v '^ *+' conftest.er1 >conftest.err
7088 rm -f conftest.er1
7089 cat conftest.err >&5
c0d27fcc 7090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7091 (exit $ac_status); } && {
7092 test -z "$ac_c_werror_flag" ||
7093 test ! -s conftest.err
7094 } && test -s conftest.$ac_objext; then
98418dba 7095 emacs_cv_struct_utimbuf=yes
1113b624 7096else
503d2be0 7097 echo "$as_me: failed program was:" >&5
19650fd6
AS
7098sed 's/^/| /' conftest.$ac_ext >&5
7099
ca81d7a0 7100 emacs_cv_struct_utimbuf=no
1113b624 7101fi
ca81d7a0
JD
7102
7103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7104fi
ca81d7a0
JD
7105{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7106echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7107if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7108
c0d27fcc 7109cat >>confdefs.h <<\_ACEOF
98418dba 7110#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7111_ACEOF
1113b624
PE
7112
7113fi
ba4481b5 7114
ca81d7a0
JD
7115{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7116echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7117if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7118 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7119else
98418dba 7120 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7121/* confdefs.h. */
7122_ACEOF
7123cat confdefs.h >>conftest.$ac_ext
7124cat >>conftest.$ac_ext <<_ACEOF
7125/* end confdefs.h. */
7397acc4 7126#include <sys/types.h>
98418dba 7127#include <signal.h>
98418dba 7128
503d2be0
AS
7129int
7130main ()
7131{
ca81d7a0 7132return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7133 ;
7134 return 0;
7135}
7136_ACEOF
98418dba 7137rm -f conftest.$ac_objext
ca81d7a0
JD
7138if { (ac_try="$ac_compile"
7139case "(($ac_try" in
7140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7141 *) ac_try_echo=$ac_try;;
7142esac
7143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7144 (eval "$ac_compile") 2>conftest.er1
503d2be0 7145 ac_status=$?
edfaf76d
LK
7146 grep -v '^ *+' conftest.er1 >conftest.err
7147 rm -f conftest.er1
7148 cat conftest.err >&5
c0d27fcc 7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7150 (exit $ac_status); } && {
7151 test -z "$ac_c_werror_flag" ||
7152 test ! -s conftest.err
7153 } && test -s conftest.$ac_objext; then
ca81d7a0 7154 ac_cv_type_signal=int
503d2be0
AS
7155else
7156 echo "$as_me: failed program was:" >&5
19650fd6
AS
7157sed 's/^/| /' conftest.$ac_ext >&5
7158
ca81d7a0 7159 ac_cv_type_signal=void
503d2be0 7160fi
ca81d7a0
JD
7161
7162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7163fi
ca81d7a0
JD
7164{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7165echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7166
c0d27fcc 7167cat >>confdefs.h <<_ACEOF
98418dba 7168#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7169_ACEOF
7170
503d2be0 7171
c0d27fcc 7172
ca81d7a0
JD
7173{ echo "$as_me:$LINENO: checking for speed_t" >&5
7174echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7175if test "${emacs_cv_speed_t+set}" = set; then
7176 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7177else
98418dba 7178 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7179/* confdefs.h. */
7180_ACEOF
7181cat confdefs.h >>conftest.$ac_ext
7182cat >>conftest.$ac_ext <<_ACEOF
7183/* end confdefs.h. */
98418dba 7184#include <termios.h>
98418dba
CW
7185int
7186main ()
7187{
7188speed_t x = 1;
7189 ;
7190 return 0;
7191}
7192_ACEOF
7193rm -f conftest.$ac_objext
ca81d7a0
JD
7194if { (ac_try="$ac_compile"
7195case "(($ac_try" in
7196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7197 *) ac_try_echo=$ac_try;;
7198esac
7199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7200 (eval "$ac_compile") 2>conftest.er1
98418dba 7201 ac_status=$?
edfaf76d
LK
7202 grep -v '^ *+' conftest.er1 >conftest.err
7203 rm -f conftest.er1
7204 cat conftest.err >&5
c0d27fcc 7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7206 (exit $ac_status); } && {
7207 test -z "$ac_c_werror_flag" ||
7208 test ! -s conftest.err
7209 } && test -s conftest.$ac_objext; then
98418dba
CW
7210 emacs_cv_speed_t=yes
7211else
7212 echo "$as_me: failed program was:" >&5
19650fd6
AS
7213sed 's/^/| /' conftest.$ac_ext >&5
7214
ca81d7a0 7215 emacs_cv_speed_t=no
98418dba 7216fi
ca81d7a0
JD
7217
7218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7219fi
ca81d7a0
JD
7220{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7221echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7222if test $emacs_cv_speed_t = yes; then
b936fae4 7223
c0d27fcc 7224cat >>confdefs.h <<\_ACEOF
98418dba 7225#define HAVE_SPEED_T 1
c0d27fcc 7226_ACEOF
98418dba 7227
7397acc4
DL
7228fi
7229
ca81d7a0
JD
7230{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7231echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7232if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7233 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7234else
503d2be0 7235 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7236/* confdefs.h. */
7237_ACEOF
7238cat confdefs.h >>conftest.$ac_ext
7239cat >>conftest.$ac_ext <<_ACEOF
7240/* end confdefs.h. */
98418dba
CW
7241#ifdef TIME_WITH_SYS_TIME
7242#include <sys/time.h>
7243#include <time.h>
7244#else
7245#ifdef HAVE_SYS_TIME_H
7246#include <sys/time.h>
7247#else
7248#include <time.h>
7249#endif
7250#endif
503d2be0
AS
7251int
7252main ()
7253{
98418dba 7254static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7255 ;
7256 return 0;
7257}
7258_ACEOF
7259rm -f conftest.$ac_objext
ca81d7a0
JD
7260if { (ac_try="$ac_compile"
7261case "(($ac_try" in
7262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7263 *) ac_try_echo=$ac_try;;
7264esac
7265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7266 (eval "$ac_compile") 2>conftest.er1
503d2be0 7267 ac_status=$?
edfaf76d
LK
7268 grep -v '^ *+' conftest.er1 >conftest.err
7269 rm -f conftest.er1
7270 cat conftest.err >&5
c0d27fcc 7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7272 (exit $ac_status); } && {
7273 test -z "$ac_c_werror_flag" ||
7274 test ! -s conftest.err
7275 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7276 emacs_cv_struct_timeval=yes
7277else
503d2be0 7278 echo "$as_me: failed program was:" >&5
19650fd6
AS
7279sed 's/^/| /' conftest.$ac_ext >&5
7280
ca81d7a0 7281 emacs_cv_struct_timeval=no
7397acc4 7282fi
ca81d7a0
JD
7283
7284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7285fi
ca81d7a0
JD
7286{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7287echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7288HAVE_TIMEVAL=$emacs_cv_struct_timeval
7289if test $emacs_cv_struct_timeval = yes; then
b936fae4 7290
c0d27fcc 7291cat >>confdefs.h <<\_ACEOF
98418dba 7292#define HAVE_TIMEVAL 1
c0d27fcc 7293_ACEOF
7397acc4
DL
7294
7295fi
7296
ca81d7a0
JD
7297{ echo "$as_me:$LINENO: checking for struct exception" >&5
7298echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7299if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7300 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7301else
503d2be0 7302 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7303/* confdefs.h. */
7304_ACEOF
7305cat confdefs.h >>conftest.$ac_ext
7306cat >>conftest.$ac_ext <<_ACEOF
7307/* end confdefs.h. */
98418dba 7308#include <math.h>
503d2be0
AS
7309int
7310main ()
7311{
98418dba 7312static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7313 ;
7314 return 0;
ba4481b5 7315}
503d2be0
AS
7316_ACEOF
7317rm -f conftest.$ac_objext
ca81d7a0
JD
7318if { (ac_try="$ac_compile"
7319case "(($ac_try" in
7320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7321 *) ac_try_echo=$ac_try;;
7322esac
7323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7324 (eval "$ac_compile") 2>conftest.er1
503d2be0 7325 ac_status=$?
edfaf76d
LK
7326 grep -v '^ *+' conftest.er1 >conftest.err
7327 rm -f conftest.er1
7328 cat conftest.err >&5
c0d27fcc 7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7330 (exit $ac_status); } && {
7331 test -z "$ac_c_werror_flag" ||
7332 test ! -s conftest.err
7333 } && test -s conftest.$ac_objext; then
98418dba 7334 emacs_cv_struct_exception=yes
ba4481b5 7335else
503d2be0 7336 echo "$as_me: failed program was:" >&5
19650fd6
AS
7337sed 's/^/| /' conftest.$ac_ext >&5
7338
ca81d7a0 7339 emacs_cv_struct_exception=no
ba4481b5 7340fi
ca81d7a0
JD
7341
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7343fi
ca81d7a0
JD
7344{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7345echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7346HAVE_EXCEPTION=$emacs_cv_struct_exception
7347if test $emacs_cv_struct_exception != yes; then
b936fae4 7348
c0d27fcc 7349cat >>confdefs.h <<\_ACEOF
98418dba 7350#define NO_MATHERR 1
c0d27fcc 7351_ACEOF
ba4481b5
DL
7352
7353fi
7354
7862d3a8
AS
7355
7356for ac_header in sys/socket.h
7357do
7358as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7359if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7360 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7361echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7362if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7363 echo $ECHO_N "(cached) $ECHO_C" >&6
7364fi
ca81d7a0
JD
7365ac_res=`eval echo '${'$as_ac_Header'}'`
7366 { echo "$as_me:$LINENO: result: $ac_res" >&5
7367echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7368else
7369 # Is the header compilable?
ca81d7a0
JD
7370{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7371echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7372cat >conftest.$ac_ext <<_ACEOF
7373/* confdefs.h. */
7374_ACEOF
7375cat confdefs.h >>conftest.$ac_ext
7376cat >>conftest.$ac_ext <<_ACEOF
7377/* end confdefs.h. */
7378$ac_includes_default
7379#include <$ac_header>
7380_ACEOF
7381rm -f conftest.$ac_objext
ca81d7a0
JD
7382if { (ac_try="$ac_compile"
7383case "(($ac_try" in
7384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7385 *) ac_try_echo=$ac_try;;
7386esac
7387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7388 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7389 ac_status=$?
edfaf76d
LK
7390 grep -v '^ *+' conftest.er1 >conftest.err
7391 rm -f conftest.er1
7392 cat conftest.err >&5
7862d3a8 7393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7394 (exit $ac_status); } && {
7395 test -z "$ac_c_werror_flag" ||
7396 test ! -s conftest.err
7397 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7398 ac_header_compiler=yes
7399else
7400 echo "$as_me: failed program was:" >&5
7401sed 's/^/| /' conftest.$ac_ext >&5
7402
ca81d7a0 7403 ac_header_compiler=no
7862d3a8 7404fi
ca81d7a0
JD
7405
7406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7407{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7408echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7409
7410# Is the header present?
ca81d7a0
JD
7411{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7412echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7413cat >conftest.$ac_ext <<_ACEOF
7414/* confdefs.h. */
7415_ACEOF
7416cat confdefs.h >>conftest.$ac_ext
7417cat >>conftest.$ac_ext <<_ACEOF
7418/* end confdefs.h. */
7419#include <$ac_header>
7420_ACEOF
ca81d7a0
JD
7421if { (ac_try="$ac_cpp conftest.$ac_ext"
7422case "(($ac_try" in
7423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7424 *) ac_try_echo=$ac_try;;
7425esac
7426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7427 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7428 ac_status=$?
7429 grep -v '^ *+' conftest.er1 >conftest.err
7430 rm -f conftest.er1
7431 cat conftest.err >&5
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7433 (exit $ac_status); } >/dev/null && {
7434 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7435 test ! -s conftest.err
7436 }; then
7862d3a8
AS
7437 ac_header_preproc=yes
7438else
7439 echo "$as_me: failed program was:" >&5
7440sed 's/^/| /' conftest.$ac_ext >&5
7441
7442 ac_header_preproc=no
7443fi
ca81d7a0 7444
7862d3a8 7445rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7446{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7447echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7448
7449# So? What about this header?
edfaf76d
LK
7450case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7451 yes:no: )
7862d3a8
AS
7452 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7453echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7454 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7455echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7456 ac_header_preproc=yes
7862d3a8 7457 ;;
edfaf76d 7458 no:yes:* )
7862d3a8
AS
7459 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7460echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7461 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7462echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7463 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7464echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7465 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7466echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7467 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7468echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7469 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7470echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7471
7862d3a8
AS
7472 ;;
7473esac
ca81d7a0
JD
7474{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7475echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7476if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7477 echo $ECHO_N "(cached) $ECHO_C" >&6
7478else
edfaf76d 7479 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7480fi
ca81d7a0
JD
7481ac_res=`eval echo '${'$as_ac_Header'}'`
7482 { echo "$as_me:$LINENO: result: $ac_res" >&5
7483echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7484
7485fi
7486if test `eval echo '${'$as_ac_Header'}'` = yes; then
7487 cat >>confdefs.h <<_ACEOF
7488#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7489_ACEOF
7490
7491fi
7492
7493done
7494
7495
7496for ac_header in net/if.h
7497do
7498as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7499{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7500echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7501if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7502 echo $ECHO_N "(cached) $ECHO_C" >&6
7503else
7504 cat >conftest.$ac_ext <<_ACEOF
7505/* confdefs.h. */
7506_ACEOF
7507cat confdefs.h >>conftest.$ac_ext
7508cat >>conftest.$ac_ext <<_ACEOF
7509/* end confdefs.h. */
7510$ac_includes_default
7511#if HAVE_SYS_SOCKET_H
7512#include <sys/socket.h>
7513#endif
7514
7515#include <$ac_header>
7516_ACEOF
7517rm -f conftest.$ac_objext
ca81d7a0
JD
7518if { (ac_try="$ac_compile"
7519case "(($ac_try" in
7520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7521 *) ac_try_echo=$ac_try;;
7522esac
7523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7524 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7525 ac_status=$?
edfaf76d
LK
7526 grep -v '^ *+' conftest.er1 >conftest.err
7527 rm -f conftest.er1
7528 cat conftest.err >&5
7862d3a8 7529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7530 (exit $ac_status); } && {
7531 test -z "$ac_c_werror_flag" ||
7532 test ! -s conftest.err
7533 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7534 eval "$as_ac_Header=yes"
7535else
7536 echo "$as_me: failed program was:" >&5
7537sed 's/^/| /' conftest.$ac_ext >&5
7538
ca81d7a0 7539 eval "$as_ac_Header=no"
7862d3a8 7540fi
ca81d7a0
JD
7541
7542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7543fi
ca81d7a0
JD
7544ac_res=`eval echo '${'$as_ac_Header'}'`
7545 { echo "$as_me:$LINENO: result: $ac_res" >&5
7546echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7547if test `eval echo '${'$as_ac_Header'}'` = yes; then
7548 cat >>confdefs.h <<_ACEOF
7549#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7550_ACEOF
7551
7552fi
7553
7554done
7555
7556
ca81d7a0
JD
7557{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7558echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7559if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7560 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7561else
503d2be0 7562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7563/* confdefs.h. */
7564_ACEOF
7565cat confdefs.h >>conftest.$ac_ext
7566cat >>conftest.$ac_ext <<_ACEOF
7567/* end confdefs.h. */
98418dba
CW
7568#include <sys/types.h>
7569#include <time.h>
7397acc4 7570
503d2be0
AS
7571int
7572main ()
7573{
f053c89f
CY
7574struct tm tm;
7575 int *p = &tm.tm_sec;
7576 return !p;
503d2be0
AS
7577 ;
7578 return 0;
7579}
7580_ACEOF
7581rm -f conftest.$ac_objext
ca81d7a0
JD
7582if { (ac_try="$ac_compile"
7583case "(($ac_try" in
7584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7585 *) ac_try_echo=$ac_try;;
7586esac
7587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7588 (eval "$ac_compile") 2>conftest.er1
503d2be0 7589 ac_status=$?
edfaf76d
LK
7590 grep -v '^ *+' conftest.er1 >conftest.err
7591 rm -f conftest.er1
7592 cat conftest.err >&5
c0d27fcc 7593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7594 (exit $ac_status); } && {
7595 test -z "$ac_c_werror_flag" ||
7596 test ! -s conftest.err
7597 } && test -s conftest.$ac_objext; then
35996d22
AS
7598 ac_cv_struct_tm=time.h
7599else
503d2be0 7600 echo "$as_me: failed program was:" >&5
19650fd6
AS
7601sed 's/^/| /' conftest.$ac_ext >&5
7602
ca81d7a0 7603 ac_cv_struct_tm=sys/time.h
7397acc4 7604fi
ca81d7a0
JD
7605
7606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7607fi
ca81d7a0
JD
7608{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7609echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7610if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7611
c0d27fcc 7612cat >>confdefs.h <<\_ACEOF
98418dba 7613#define TM_IN_SYS_TIME 1
c0d27fcc 7614_ACEOF
7397acc4
DL
7615
7616fi
ba4481b5 7617
ca81d7a0
JD
7618{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7619echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7620if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7621 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7622else
98418dba 7623 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7624/* confdefs.h. */
7625_ACEOF
7626cat confdefs.h >>conftest.$ac_ext
7627cat >>conftest.$ac_ext <<_ACEOF
7628/* end confdefs.h. */
98418dba
CW
7629#include <sys/types.h>
7630#include <$ac_cv_struct_tm>
ba4481b5 7631
c0d27fcc 7632
98418dba
CW
7633int
7634main ()
7635{
7636static struct tm ac_aggr;
7637if (ac_aggr.tm_zone)
7638return 0;
7639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
ca81d7a0
JD
7644if { (ac_try="$ac_compile"
7645case "(($ac_try" in
7646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7647 *) ac_try_echo=$ac_try;;
7648esac
7649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7650 (eval "$ac_compile") 2>conftest.er1
98418dba 7651 ac_status=$?
edfaf76d
LK
7652 grep -v '^ *+' conftest.er1 >conftest.err
7653 rm -f conftest.er1
7654 cat conftest.err >&5
c0d27fcc 7655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7656 (exit $ac_status); } && {
7657 test -z "$ac_c_werror_flag" ||
7658 test ! -s conftest.err
7659 } && test -s conftest.$ac_objext; then
98418dba 7660 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7661else
98418dba 7662 echo "$as_me: failed program was:" >&5
19650fd6
AS
7663sed 's/^/| /' conftest.$ac_ext >&5
7664
ca81d7a0 7665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7666/* confdefs.h. */
7667_ACEOF
7668cat confdefs.h >>conftest.$ac_ext
7669cat >>conftest.$ac_ext <<_ACEOF
7670/* end confdefs.h. */
6bae0ccf
DL
7671#include <sys/types.h>
7672#include <$ac_cv_struct_tm>
7673
7674
7675int
7676main ()
7677{
7678static struct tm ac_aggr;
7679if (sizeof ac_aggr.tm_zone)
7680return 0;
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext
ca81d7a0
JD
7686if { (ac_try="$ac_compile"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
7691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7692 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7693 ac_status=$?
edfaf76d
LK
7694 grep -v '^ *+' conftest.er1 >conftest.err
7695 rm -f conftest.er1
7696 cat conftest.err >&5
6bae0ccf 7697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7698 (exit $ac_status); } && {
7699 test -z "$ac_c_werror_flag" ||
7700 test ! -s conftest.err
7701 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7702 ac_cv_member_struct_tm_tm_zone=yes
7703else
7704 echo "$as_me: failed program was:" >&5
19650fd6
AS
7705sed 's/^/| /' conftest.$ac_ext >&5
7706
ca81d7a0 7707 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7708fi
ca81d7a0
JD
7709
7710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7711fi
ca81d7a0
JD
7712
7713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7714fi
ca81d7a0
JD
7715{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7716echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7717if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7718
c0d27fcc 7719cat >>confdefs.h <<_ACEOF
98418dba 7720#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7721_ACEOF
7722
ba4481b5 7723
98418dba 7724fi
ba4481b5 7725
98418dba 7726if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7727
c0d27fcc 7728cat >>confdefs.h <<\_ACEOF
98418dba 7729#define HAVE_TM_ZONE 1
c0d27fcc 7730_ACEOF
ba4481b5 7731
ba4481b5 7732else
ca81d7a0
JD
7733 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7734echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7735if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7736 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7737else
98418dba 7738 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */
98418dba 7744#include <time.h>
98418dba 7745
98418dba
CW
7746int
7747main ()
7748{
ca81d7a0 7749#ifndef tzname
f053c89f 7750 (void) tzname;
ca81d7a0
JD
7751#endif
7752
6bae0ccf
DL
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
ca81d7a0
JD
7758if { (ac_try="$ac_compile"
7759case "(($ac_try" in
7760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7761 *) ac_try_echo=$ac_try;;
7762esac
7763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7764 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7765 ac_status=$?
edfaf76d
LK
7766 grep -v '^ *+' conftest.er1 >conftest.err
7767 rm -f conftest.er1
7768 cat conftest.err >&5
6bae0ccf 7769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7770 (exit $ac_status); } && {
7771 test -z "$ac_c_werror_flag" ||
7772 test ! -s conftest.err
7773 } && test -s conftest.$ac_objext; then
ca81d7a0 7774 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7775else
7776 echo "$as_me: failed program was:" >&5
19650fd6
AS
7777sed 's/^/| /' conftest.$ac_ext >&5
7778
ca81d7a0 7779 ac_cv_have_decl_tzname=no
ba4481b5 7780fi
ca81d7a0
JD
7781
7782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7783fi
ca81d7a0
JD
7784{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7785echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7786if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7787
c0d27fcc 7788cat >>confdefs.h <<_ACEOF
ca81d7a0 7789#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7790_ACEOF
7791
ba4481b5 7792
ca81d7a0
JD
7793else
7794 cat >>confdefs.h <<_ACEOF
7795#define HAVE_DECL_TZNAME 0
7796_ACEOF
ba4481b5 7797
ba4481b5 7798
98418dba 7799fi
ba4481b5 7800
ca81d7a0
JD
7801
7802 { echo "$as_me:$LINENO: checking for tzname" >&5
7803echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7804if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7805 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7806else
98418dba 7807 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7808/* confdefs.h. */
7809_ACEOF
7810cat confdefs.h >>conftest.$ac_ext
7811cat >>conftest.$ac_ext <<_ACEOF
7812/* end confdefs.h. */
98418dba 7813#include <time.h>
ca81d7a0
JD
7814#if !HAVE_DECL_TZNAME
7815extern char *tzname[];
98418dba
CW
7816#endif
7817
98418dba
CW
7818int
7819main ()
7820{
ca81d7a0 7821return tzname[0][0];
98418dba
CW
7822 ;
7823 return 0;
7824}
7825_ACEOF
7826rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7827if { (ac_try="$ac_link"
7828case "(($ac_try" in
7829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7830 *) ac_try_echo=$ac_try;;
7831esac
7832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7833 (eval "$ac_link") 2>conftest.er1
98418dba 7834 ac_status=$?
edfaf76d
LK
7835 grep -v '^ *+' conftest.er1 >conftest.err
7836 rm -f conftest.er1
7837 cat conftest.err >&5
c0d27fcc 7838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7839 (exit $ac_status); } && {
7840 test -z "$ac_c_werror_flag" ||
7841 test ! -s conftest.err
7842 } && test -s conftest$ac_exeext &&
7843 $as_test_x conftest$ac_exeext; then
98418dba
CW
7844 ac_cv_var_tzname=yes
7845else
7846 echo "$as_me: failed program was:" >&5
19650fd6
AS
7847sed 's/^/| /' conftest.$ac_ext >&5
7848
ca81d7a0 7849 ac_cv_var_tzname=no
ba4481b5 7850fi
6bae0ccf 7851
f053c89f 7852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7853 conftest$ac_exeext conftest.$ac_ext
98418dba 7854fi
ca81d7a0
JD
7855{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7856echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7857 if test $ac_cv_var_tzname = yes; then
ba4481b5 7858
c0d27fcc 7859cat >>confdefs.h <<\_ACEOF
98418dba 7860#define HAVE_TZNAME 1
c0d27fcc 7861_ACEOF
503d2be0 7862
98418dba
CW
7863 fi
7864fi
503d2be0 7865
ca81d7a0
JD
7866{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7867echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7868if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7869 echo $ECHO_N "(cached) $ECHO_C" >&6
7870else
7871 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7872/* confdefs.h. */
7873_ACEOF
7874cat confdefs.h >>conftest.$ac_ext
7875cat >>conftest.$ac_ext <<_ACEOF
7876/* end confdefs.h. */
98418dba 7877#include <time.h>
b936fae4 7878
98418dba
CW
7879int
7880main ()
7881{
b936fae4
AS
7882static struct tm ac_aggr;
7883if (ac_aggr.tm_gmtoff)
7884return 0;
98418dba
CW
7885 ;
7886 return 0;
7887}
7888_ACEOF
b936fae4 7889rm -f conftest.$ac_objext
ca81d7a0
JD
7890if { (ac_try="$ac_compile"
7891case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
7895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7896 (eval "$ac_compile") 2>conftest.er1
98418dba 7897 ac_status=$?
edfaf76d
LK
7898 grep -v '^ *+' conftest.er1 >conftest.err
7899 rm -f conftest.er1
7900 cat conftest.err >&5
c0d27fcc 7901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7902 (exit $ac_status); } && {
7903 test -z "$ac_c_werror_flag" ||
7904 test ! -s conftest.err
7905 } && test -s conftest.$ac_objext; then
b936fae4 7906 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7907else
7908 echo "$as_me: failed program was:" >&5
19650fd6
AS
7909sed 's/^/| /' conftest.$ac_ext >&5
7910
ca81d7a0 7911 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7912/* confdefs.h. */
7913_ACEOF
7914cat confdefs.h >>conftest.$ac_ext
7915cat >>conftest.$ac_ext <<_ACEOF
7916/* end confdefs.h. */
6bae0ccf
DL
7917#include <time.h>
7918
8799b3e4
CW
7919int
7920main ()
7921{
6bae0ccf
DL
7922static struct tm ac_aggr;
7923if (sizeof ac_aggr.tm_gmtoff)
7924return 0;
8799b3e4
CW
7925 ;
7926 return 0;
7927}
7928_ACEOF
6bae0ccf 7929rm -f conftest.$ac_objext
ca81d7a0
JD
7930if { (ac_try="$ac_compile"
7931case "(($ac_try" in
7932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7933 *) ac_try_echo=$ac_try;;
7934esac
7935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7936 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7937 ac_status=$?
edfaf76d
LK
7938 grep -v '^ *+' conftest.er1 >conftest.err
7939 rm -f conftest.er1
7940 cat conftest.err >&5
c0d27fcc 7941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7942 (exit $ac_status); } && {
7943 test -z "$ac_c_werror_flag" ||
7944 test ! -s conftest.err
7945 } && test -s conftest.$ac_objext; then
6bae0ccf 7946 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7947else
7948 echo "$as_me: failed program was:" >&5
19650fd6
AS
7949sed 's/^/| /' conftest.$ac_ext >&5
7950
ca81d7a0 7951 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7952fi
ca81d7a0
JD
7953
7954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7955fi
ca81d7a0
JD
7956
7957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7958fi
ca81d7a0
JD
7959{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7960echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7961if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7962
7963cat >>confdefs.h <<\_ACEOF
7964#define HAVE_TM_GMTOFF 1
7965_ACEOF
7966
7967fi
7968
ca81d7a0
JD
7969{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7970echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7971if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7972 echo $ECHO_N "(cached) $ECHO_C" >&6
7973else
7974 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7975/* confdefs.h. */
7976_ACEOF
7977cat confdefs.h >>conftest.$ac_ext
7978cat >>conftest.$ac_ext <<_ACEOF
7979/* end confdefs.h. */
7862d3a8
AS
7980$ac_includes_default
7981#if HAVE_SYS_SOCKET_H
7982#include <sys/socket.h>
7983#endif
7984#if HAVE_NET_IF_H
96f3a036 7985#include <net/if.h>
7862d3a8 7986#endif
96f3a036
DL
7987
7988int
7989main ()
7990{
7991static struct ifreq ac_aggr;
7992if (ac_aggr.ifr_flags)
7993return 0;
7994 ;
7995 return 0;
7996}
7997_ACEOF
7998rm -f conftest.$ac_objext
ca81d7a0
JD
7999if { (ac_try="$ac_compile"
8000case "(($ac_try" in
8001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8002 *) ac_try_echo=$ac_try;;
8003esac
8004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8005 (eval "$ac_compile") 2>conftest.er1
96f3a036 8006 ac_status=$?
edfaf76d
LK
8007 grep -v '^ *+' conftest.er1 >conftest.err
8008 rm -f conftest.er1
8009 cat conftest.err >&5
96f3a036 8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8011 (exit $ac_status); } && {
8012 test -z "$ac_c_werror_flag" ||
8013 test ! -s conftest.err
8014 } && test -s conftest.$ac_objext; then
96f3a036
DL
8015 ac_cv_member_struct_ifreq_ifr_flags=yes
8016else
8017 echo "$as_me: failed program was:" >&5
8018sed 's/^/| /' conftest.$ac_ext >&5
8019
ca81d7a0 8020 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8021/* confdefs.h. */
8022_ACEOF
8023cat confdefs.h >>conftest.$ac_ext
8024cat >>conftest.$ac_ext <<_ACEOF
8025/* end confdefs.h. */
7862d3a8
AS
8026$ac_includes_default
8027#if HAVE_SYS_SOCKET_H
8028#include <sys/socket.h>
8029#endif
8030#if HAVE_NET_IF_H
96f3a036 8031#include <net/if.h>
7862d3a8 8032#endif
96f3a036
DL
8033
8034int
8035main ()
8036{
8037static struct ifreq ac_aggr;
8038if (sizeof ac_aggr.ifr_flags)
8039return 0;
8040 ;
8041 return 0;
8042}
8043_ACEOF
8044rm -f conftest.$ac_objext
ca81d7a0
JD
8045if { (ac_try="$ac_compile"
8046case "(($ac_try" in
8047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8048 *) ac_try_echo=$ac_try;;
8049esac
8050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8051 (eval "$ac_compile") 2>conftest.er1
96f3a036 8052 ac_status=$?
edfaf76d
LK
8053 grep -v '^ *+' conftest.er1 >conftest.err
8054 rm -f conftest.er1
8055 cat conftest.err >&5
96f3a036 8056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8057 (exit $ac_status); } && {
8058 test -z "$ac_c_werror_flag" ||
8059 test ! -s conftest.err
8060 } && test -s conftest.$ac_objext; then
96f3a036
DL
8061 ac_cv_member_struct_ifreq_ifr_flags=yes
8062else
8063 echo "$as_me: failed program was:" >&5
8064sed 's/^/| /' conftest.$ac_ext >&5
8065
ca81d7a0 8066 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8067fi
ca81d7a0
JD
8068
8069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8070fi
ca81d7a0
JD
8071
8072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8073fi
ca81d7a0
JD
8074{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8075echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8076if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8077
8078cat >>confdefs.h <<_ACEOF
8079#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8080_ACEOF
8081
8082
8083fi
ca81d7a0
JD
8084{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8085echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8086if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8087 echo $ECHO_N "(cached) $ECHO_C" >&6
8088else
8089 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8090/* confdefs.h. */
8091_ACEOF
8092cat confdefs.h >>conftest.$ac_ext
8093cat >>conftest.$ac_ext <<_ACEOF
8094/* end confdefs.h. */
7862d3a8
AS
8095$ac_includes_default
8096#if HAVE_SYS_SOCKET_H
8097#include <sys/socket.h>
8098#endif
8099#if HAVE_NET_IF_H
96f3a036 8100#include <net/if.h>
7862d3a8 8101#endif
96f3a036
DL
8102
8103int
8104main ()
8105{
8106static struct ifreq ac_aggr;
8107if (ac_aggr.ifr_hwaddr)
8108return 0;
8109 ;
8110 return 0;
8111}
8112_ACEOF
8113rm -f conftest.$ac_objext
ca81d7a0
JD
8114if { (ac_try="$ac_compile"
8115case "(($ac_try" in
8116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8117 *) ac_try_echo=$ac_try;;
8118esac
8119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8120 (eval "$ac_compile") 2>conftest.er1
96f3a036 8121 ac_status=$?
edfaf76d
LK
8122 grep -v '^ *+' conftest.er1 >conftest.err
8123 rm -f conftest.er1
8124 cat conftest.err >&5
96f3a036 8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8126 (exit $ac_status); } && {
8127 test -z "$ac_c_werror_flag" ||
8128 test ! -s conftest.err
8129 } && test -s conftest.$ac_objext; then
96f3a036
DL
8130 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8131else
8132 echo "$as_me: failed program was:" >&5
8133sed 's/^/| /' conftest.$ac_ext >&5
8134
ca81d7a0 8135 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8136/* confdefs.h. */
8137_ACEOF
8138cat confdefs.h >>conftest.$ac_ext
8139cat >>conftest.$ac_ext <<_ACEOF
8140/* end confdefs.h. */
7862d3a8
AS
8141$ac_includes_default
8142#if HAVE_SYS_SOCKET_H
8143#include <sys/socket.h>
8144#endif
8145#if HAVE_NET_IF_H
96f3a036 8146#include <net/if.h>
7862d3a8 8147#endif
96f3a036
DL
8148
8149int
8150main ()
8151{
8152static struct ifreq ac_aggr;
8153if (sizeof ac_aggr.ifr_hwaddr)
8154return 0;
8155 ;
8156 return 0;
8157}
8158_ACEOF
8159rm -f conftest.$ac_objext
ca81d7a0
JD
8160if { (ac_try="$ac_compile"
8161case "(($ac_try" in
8162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8163 *) ac_try_echo=$ac_try;;
8164esac
8165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8166 (eval "$ac_compile") 2>conftest.er1
96f3a036 8167 ac_status=$?
edfaf76d
LK
8168 grep -v '^ *+' conftest.er1 >conftest.err
8169 rm -f conftest.er1
8170 cat conftest.err >&5
96f3a036 8171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8172 (exit $ac_status); } && {
8173 test -z "$ac_c_werror_flag" ||
8174 test ! -s conftest.err
8175 } && test -s conftest.$ac_objext; then
96f3a036
DL
8176 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8177else
8178 echo "$as_me: failed program was:" >&5
8179sed 's/^/| /' conftest.$ac_ext >&5
8180
ca81d7a0 8181 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8182fi
ca81d7a0
JD
8183
8184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8185fi
ca81d7a0
JD
8186
8187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8188fi
ca81d7a0
JD
8189{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8190echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8191if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8192
8193cat >>confdefs.h <<_ACEOF
8194#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8195_ACEOF
8196
8197
8198fi
ca81d7a0
JD
8199{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8200echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8201if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8202 echo $ECHO_N "(cached) $ECHO_C" >&6
8203else
8204 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8205/* confdefs.h. */
8206_ACEOF
8207cat confdefs.h >>conftest.$ac_ext
8208cat >>conftest.$ac_ext <<_ACEOF
8209/* end confdefs.h. */
7862d3a8
AS
8210$ac_includes_default
8211#if HAVE_SYS_SOCKET_H
8212#include <sys/socket.h>
8213#endif
8214#if HAVE_NET_IF_H
96f3a036 8215#include <net/if.h>
7862d3a8 8216#endif
96f3a036
DL
8217
8218int
8219main ()
8220{
8221static struct ifreq ac_aggr;
8222if (ac_aggr.ifr_netmask)
8223return 0;
8224 ;
8225 return 0;
8226}
8227_ACEOF
8228rm -f conftest.$ac_objext
ca81d7a0
JD
8229if { (ac_try="$ac_compile"
8230case "(($ac_try" in
8231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8232 *) ac_try_echo=$ac_try;;
8233esac
8234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8235 (eval "$ac_compile") 2>conftest.er1
96f3a036 8236 ac_status=$?
edfaf76d
LK
8237 grep -v '^ *+' conftest.er1 >conftest.err
8238 rm -f conftest.er1
8239 cat conftest.err >&5
96f3a036 8240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8241 (exit $ac_status); } && {
8242 test -z "$ac_c_werror_flag" ||
8243 test ! -s conftest.err
8244 } && test -s conftest.$ac_objext; then
96f3a036
DL
8245 ac_cv_member_struct_ifreq_ifr_netmask=yes
8246else
8247 echo "$as_me: failed program was:" >&5
8248sed 's/^/| /' conftest.$ac_ext >&5
8249
ca81d7a0 8250 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8251/* confdefs.h. */
8252_ACEOF
8253cat confdefs.h >>conftest.$ac_ext
8254cat >>conftest.$ac_ext <<_ACEOF
8255/* end confdefs.h. */
7862d3a8
AS
8256$ac_includes_default
8257#if HAVE_SYS_SOCKET_H
8258#include <sys/socket.h>
8259#endif
8260#if HAVE_NET_IF_H
96f3a036 8261#include <net/if.h>
7862d3a8 8262#endif
96f3a036
DL
8263
8264int
8265main ()
8266{
8267static struct ifreq ac_aggr;
8268if (sizeof ac_aggr.ifr_netmask)
8269return 0;
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext
ca81d7a0
JD
8275if { (ac_try="$ac_compile"
8276case "(($ac_try" in
8277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8278 *) ac_try_echo=$ac_try;;
8279esac
8280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8281 (eval "$ac_compile") 2>conftest.er1
96f3a036 8282 ac_status=$?
edfaf76d
LK
8283 grep -v '^ *+' conftest.er1 >conftest.err
8284 rm -f conftest.er1
8285 cat conftest.err >&5
96f3a036 8286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8287 (exit $ac_status); } && {
8288 test -z "$ac_c_werror_flag" ||
8289 test ! -s conftest.err
8290 } && test -s conftest.$ac_objext; then
96f3a036
DL
8291 ac_cv_member_struct_ifreq_ifr_netmask=yes
8292else
8293 echo "$as_me: failed program was:" >&5
8294sed 's/^/| /' conftest.$ac_ext >&5
8295
ca81d7a0 8296 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8297fi
ca81d7a0
JD
8298
8299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8300fi
ca81d7a0
JD
8301
8302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8303fi
ca81d7a0
JD
8304{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8305echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8306if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8307
8308cat >>confdefs.h <<_ACEOF
8309#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8310_ACEOF
8311
8312
8313fi
ca81d7a0
JD
8314{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8315echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8316if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8317 echo $ECHO_N "(cached) $ECHO_C" >&6
8318else
8319 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8320/* confdefs.h. */
8321_ACEOF
8322cat confdefs.h >>conftest.$ac_ext
8323cat >>conftest.$ac_ext <<_ACEOF
8324/* end confdefs.h. */
7862d3a8
AS
8325$ac_includes_default
8326#if HAVE_SYS_SOCKET_H
8327#include <sys/socket.h>
8328#endif
8329#if HAVE_NET_IF_H
96f3a036 8330#include <net/if.h>
7862d3a8 8331#endif
96f3a036
DL
8332
8333int
8334main ()
8335{
8336static struct ifreq ac_aggr;
8337if (ac_aggr.ifr_broadaddr)
8338return 0;
8339 ;
8340 return 0;
8341}
8342_ACEOF
8343rm -f conftest.$ac_objext
ca81d7a0
JD
8344if { (ac_try="$ac_compile"
8345case "(($ac_try" in
8346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8347 *) ac_try_echo=$ac_try;;
8348esac
8349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8350 (eval "$ac_compile") 2>conftest.er1
96f3a036 8351 ac_status=$?
edfaf76d
LK
8352 grep -v '^ *+' conftest.er1 >conftest.err
8353 rm -f conftest.er1
8354 cat conftest.err >&5
96f3a036 8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8356 (exit $ac_status); } && {
8357 test -z "$ac_c_werror_flag" ||
8358 test ! -s conftest.err
8359 } && test -s conftest.$ac_objext; then
96f3a036
DL
8360 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8361else
8362 echo "$as_me: failed program was:" >&5
8363sed 's/^/| /' conftest.$ac_ext >&5
8364
ca81d7a0 8365 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
7862d3a8
AS
8371$ac_includes_default
8372#if HAVE_SYS_SOCKET_H
8373#include <sys/socket.h>
8374#endif
8375#if HAVE_NET_IF_H
96f3a036 8376#include <net/if.h>
7862d3a8 8377#endif
96f3a036
DL
8378
8379int
8380main ()
8381{
8382static struct ifreq ac_aggr;
8383if (sizeof ac_aggr.ifr_broadaddr)
8384return 0;
8385 ;
8386 return 0;
8387}
8388_ACEOF
8389rm -f conftest.$ac_objext
ca81d7a0
JD
8390if { (ac_try="$ac_compile"
8391case "(($ac_try" in
8392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8393 *) ac_try_echo=$ac_try;;
8394esac
8395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8396 (eval "$ac_compile") 2>conftest.er1
96f3a036 8397 ac_status=$?
edfaf76d
LK
8398 grep -v '^ *+' conftest.er1 >conftest.err
8399 rm -f conftest.er1
8400 cat conftest.err >&5
96f3a036 8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8402 (exit $ac_status); } && {
8403 test -z "$ac_c_werror_flag" ||
8404 test ! -s conftest.err
8405 } && test -s conftest.$ac_objext; then
96f3a036
DL
8406 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8407else
8408 echo "$as_me: failed program was:" >&5
8409sed 's/^/| /' conftest.$ac_ext >&5
8410
ca81d7a0 8411 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8412fi
ca81d7a0
JD
8413
8414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8415fi
ca81d7a0
JD
8416
8417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8418fi
ca81d7a0
JD
8419{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8420echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8421if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8422
8423cat >>confdefs.h <<_ACEOF
8424#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8425_ACEOF
8426
8427
8428fi
ca81d7a0
JD
8429{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8430echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8431if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8432 echo $ECHO_N "(cached) $ECHO_C" >&6
8433else
8434 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8435/* confdefs.h. */
8436_ACEOF
8437cat confdefs.h >>conftest.$ac_ext
8438cat >>conftest.$ac_ext <<_ACEOF
8439/* end confdefs.h. */
7862d3a8
AS
8440$ac_includes_default
8441#if HAVE_SYS_SOCKET_H
8442#include <sys/socket.h>
8443#endif
8444#if HAVE_NET_IF_H
96f3a036 8445#include <net/if.h>
7862d3a8 8446#endif
96f3a036
DL
8447
8448int
8449main ()
8450{
8451static struct ifreq ac_aggr;
8452if (ac_aggr.ifr_addr)
8453return 0;
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
ca81d7a0
JD
8459if { (ac_try="$ac_compile"
8460case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
8464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8465 (eval "$ac_compile") 2>conftest.er1
96f3a036 8466 ac_status=$?
edfaf76d
LK
8467 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1
8469 cat conftest.err >&5
96f3a036 8470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8471 (exit $ac_status); } && {
8472 test -z "$ac_c_werror_flag" ||
8473 test ! -s conftest.err
8474 } && test -s conftest.$ac_objext; then
96f3a036
DL
8475 ac_cv_member_struct_ifreq_ifr_addr=yes
8476else
8477 echo "$as_me: failed program was:" >&5
8478sed 's/^/| /' conftest.$ac_ext >&5
8479
ca81d7a0 8480 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8481/* confdefs.h. */
8482_ACEOF
8483cat confdefs.h >>conftest.$ac_ext
8484cat >>conftest.$ac_ext <<_ACEOF
8485/* end confdefs.h. */
7862d3a8
AS
8486$ac_includes_default
8487#if HAVE_SYS_SOCKET_H
8488#include <sys/socket.h>
8489#endif
8490#if HAVE_NET_IF_H
96f3a036 8491#include <net/if.h>
7862d3a8 8492#endif
96f3a036
DL
8493
8494int
8495main ()
8496{
8497static struct ifreq ac_aggr;
8498if (sizeof ac_aggr.ifr_addr)
8499return 0;
8500 ;
8501 return 0;
8502}
8503_ACEOF
8504rm -f conftest.$ac_objext
ca81d7a0
JD
8505if { (ac_try="$ac_compile"
8506case "(($ac_try" in
8507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8508 *) ac_try_echo=$ac_try;;
8509esac
8510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8511 (eval "$ac_compile") 2>conftest.er1
96f3a036 8512 ac_status=$?
edfaf76d
LK
8513 grep -v '^ *+' conftest.er1 >conftest.err
8514 rm -f conftest.er1
8515 cat conftest.err >&5
96f3a036 8516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8517 (exit $ac_status); } && {
8518 test -z "$ac_c_werror_flag" ||
8519 test ! -s conftest.err
8520 } && test -s conftest.$ac_objext; then
96f3a036
DL
8521 ac_cv_member_struct_ifreq_ifr_addr=yes
8522else
8523 echo "$as_me: failed program was:" >&5
8524sed 's/^/| /' conftest.$ac_ext >&5
8525
ca81d7a0 8526 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8527fi
ca81d7a0
JD
8528
8529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8530fi
ca81d7a0
JD
8531
8532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8533fi
ca81d7a0
JD
8534{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8535echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8536if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8537
8538cat >>confdefs.h <<_ACEOF
8539#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8540_ACEOF
8541
8542
8543fi
8544
8799b3e4 8545
8799b3e4 8546
ca81d7a0
JD
8547{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8548echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8549if test "$ac_cv_prog_cc_c89" != no; then
8550 { echo "$as_me:$LINENO: result: yes" >&5
8551echo "${ECHO_T}yes" >&6; }
98418dba 8552
c0d27fcc 8553cat >>confdefs.h <<\_ACEOF
98418dba 8554#define PROTOTYPES 1
c0d27fcc
MR
8555_ACEOF
8556
8557
8558cat >>confdefs.h <<\_ACEOF
8559#define __PROTOTYPES 1
8560_ACEOF
98418dba
CW
8561
8562else
ca81d7a0
JD
8563 { echo "$as_me:$LINENO: result: no" >&5
8564echo "${ECHO_T}no" >&6; }
98418dba
CW
8565fi
8566
ca81d7a0
JD
8567{ echo "$as_me:$LINENO: checking for working volatile" >&5
8568echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8569if test "${ac_cv_c_volatile+set}" = set; then
8570 echo $ECHO_N "(cached) $ECHO_C" >&6
8571else
8572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8573/* confdefs.h. */
8574_ACEOF
8575cat confdefs.h >>conftest.$ac_ext
8576cat >>conftest.$ac_ext <<_ACEOF
8577/* end confdefs.h. */
98418dba 8578
98418dba
CW
8579int
8580main ()
8581{
8582
8583volatile int x;
ca81d7a0
JD
8584int * volatile y = (int *) 0;
8585return !x && !y;
98418dba
CW
8586 ;
8587 return 0;
8588}
8589_ACEOF
8590rm -f conftest.$ac_objext
ca81d7a0
JD
8591if { (ac_try="$ac_compile"
8592case "(($ac_try" in
8593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8594 *) ac_try_echo=$ac_try;;
8595esac
8596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8597 (eval "$ac_compile") 2>conftest.er1
98418dba 8598 ac_status=$?
edfaf76d
LK
8599 grep -v '^ *+' conftest.er1 >conftest.err
8600 rm -f conftest.er1
8601 cat conftest.err >&5
c0d27fcc 8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8603 (exit $ac_status); } && {
8604 test -z "$ac_c_werror_flag" ||
8605 test ! -s conftest.err
8606 } && test -s conftest.$ac_objext; then
98418dba
CW
8607 ac_cv_c_volatile=yes
8608else
8609 echo "$as_me: failed program was:" >&5
19650fd6
AS
8610sed 's/^/| /' conftest.$ac_ext >&5
8611
ca81d7a0 8612 ac_cv_c_volatile=no
98418dba 8613fi
ca81d7a0
JD
8614
8615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8616fi
ca81d7a0
JD
8617{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8618echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8619if test $ac_cv_c_volatile = no; then
8620
c0d27fcc 8621cat >>confdefs.h <<\_ACEOF
98418dba 8622#define volatile
c0d27fcc 8623_ACEOF
98418dba
CW
8624
8625fi
8626
ca81d7a0
JD
8627{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8628echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8629if test "${ac_cv_c_const+set}" = set; then
8630 echo $ECHO_N "(cached) $ECHO_C" >&6
8631else
8632 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8633/* confdefs.h. */
8634_ACEOF
8635cat confdefs.h >>conftest.$ac_ext
8636cat >>conftest.$ac_ext <<_ACEOF
8637/* end confdefs.h. */
98418dba 8638
98418dba
CW
8639int
8640main ()
8641{
8642/* FIXME: Include the comments suggested by Paul. */
8643#ifndef __cplusplus
8644 /* Ultrix mips cc rejects this. */
8645 typedef int charset[2];
f053c89f 8646 const charset cs;
98418dba 8647 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8648 char const *const *pcpcc;
8649 char **ppc;
98418dba
CW
8650 /* NEC SVR4.0.2 mips cc rejects this. */
8651 struct point {int x, y;};
8652 static struct point const zero = {0,0};
8653 /* AIX XL C 1.02.0.0 rejects this.
8654 It does not let you subtract one const X* pointer from another in
8655 an arm of an if-expression whose if-part is not a constant
8656 expression */
8657 const char *g = "string";
f053c89f 8658 pcpcc = &g + (g ? g-g : 0);
98418dba 8659 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8660 ++pcpcc;
8661 ppc = (char**) pcpcc;
8662 pcpcc = (char const *const *) ppc;
98418dba
CW
8663 { /* SCO 3.2v4 cc rejects this. */
8664 char *t;
8665 char const *s = 0 ? (char *) 0 : (char const *) 0;
8666
8667 *t++ = 0;
ca81d7a0 8668 if (s) return 0;
98418dba
CW
8669 }
8670 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8671 int x[] = {25, 17};
8672 const int *foo = &x[0];
8673 ++foo;
8674 }
8675 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8676 typedef const int *iptr;
8677 iptr p = 0;
8678 ++p;
8679 }
8680 { /* AIX XL C 1.02.0.0 rejects this saying
8681 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8682 struct s { int j; const int *ap[3]; };
8683 struct s *b; b->j = 5;
8684 }
8685 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8686 const int foo = 10;
ca81d7a0 8687 if (!foo) return 0;
98418dba 8688 }
f053c89f 8689 return !cs[0] && !zero.x;
98418dba
CW
8690#endif
8691
8692 ;
8693 return 0;
8694}
8695_ACEOF
8696rm -f conftest.$ac_objext
ca81d7a0
JD
8697if { (ac_try="$ac_compile"
8698case "(($ac_try" in
8699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8700 *) ac_try_echo=$ac_try;;
8701esac
8702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8703 (eval "$ac_compile") 2>conftest.er1
98418dba 8704 ac_status=$?
edfaf76d
LK
8705 grep -v '^ *+' conftest.er1 >conftest.err
8706 rm -f conftest.er1
8707 cat conftest.err >&5
c0d27fcc 8708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8709 (exit $ac_status); } && {
8710 test -z "$ac_c_werror_flag" ||
8711 test ! -s conftest.err
8712 } && test -s conftest.$ac_objext; then
98418dba
CW
8713 ac_cv_c_const=yes
8714else
8715 echo "$as_me: failed program was:" >&5
19650fd6
AS
8716sed 's/^/| /' conftest.$ac_ext >&5
8717
ca81d7a0 8718 ac_cv_c_const=no
98418dba 8719fi
ca81d7a0
JD
8720
8721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8722fi
ca81d7a0
JD
8723{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8724echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8725if test $ac_cv_c_const = no; then
8726
c0d27fcc 8727cat >>confdefs.h <<\_ACEOF
98418dba 8728#define const
c0d27fcc 8729_ACEOF
98418dba
CW
8730
8731fi
8732
ca81d7a0
JD
8733{ echo "$as_me:$LINENO: checking for void * support" >&5
8734echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8735if test "${emacs_cv_void_star+set}" = set; then
8736 echo $ECHO_N "(cached) $ECHO_C" >&6
8737else
8738 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8739/* confdefs.h. */
8740_ACEOF
8741cat confdefs.h >>conftest.$ac_ext
8742cat >>conftest.$ac_ext <<_ACEOF
8743/* end confdefs.h. */
98418dba 8744
98418dba
CW
8745int
8746main ()
8747{
8748void * foo;
8749 ;
8750 return 0;
8751}
8752_ACEOF
8753rm -f conftest.$ac_objext
ca81d7a0
JD
8754if { (ac_try="$ac_compile"
8755case "(($ac_try" in
8756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8757 *) ac_try_echo=$ac_try;;
8758esac
8759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8760 (eval "$ac_compile") 2>conftest.er1
98418dba 8761 ac_status=$?
edfaf76d
LK
8762 grep -v '^ *+' conftest.er1 >conftest.err
8763 rm -f conftest.er1
8764 cat conftest.err >&5
c0d27fcc 8765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8766 (exit $ac_status); } && {
8767 test -z "$ac_c_werror_flag" ||
8768 test ! -s conftest.err
8769 } && test -s conftest.$ac_objext; then
98418dba
CW
8770 emacs_cv_void_star=yes
8771else
8772 echo "$as_me: failed program was:" >&5
19650fd6
AS
8773sed 's/^/| /' conftest.$ac_ext >&5
8774
ca81d7a0 8775 emacs_cv_void_star=no
98418dba 8776fi
ca81d7a0
JD
8777
8778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8779fi
ca81d7a0
JD
8780{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8781echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8782if test $emacs_cv_void_star = yes; then
c0d27fcc 8783 cat >>confdefs.h <<\_ACEOF
98418dba 8784#define POINTER_TYPE void
c0d27fcc 8785_ACEOF
98418dba
CW
8786
8787else
c0d27fcc 8788 cat >>confdefs.h <<\_ACEOF
98418dba 8789#define POINTER_TYPE char
c0d27fcc 8790_ACEOF
98418dba
CW
8791
8792fi
8793
c0d27fcc 8794
4494a266
JD
8795
8796
cd958eb3 8797
ca81d7a0
JD
8798{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8799echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8800set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8801if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8802 echo $ECHO_N "(cached) $ECHO_C" >&6
8803else
c0d27fcc 8804 cat >conftest.make <<\_ACEOF
ca81d7a0 8805SHELL = /bin/sh
98418dba 8806all:
ca81d7a0 8807 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8808_ACEOF
98418dba 8809# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8810case `${MAKE-make} -f conftest.make 2>/dev/null` in
8811 *@@@%%%=?*=@@@%%%*)
8812 eval ac_cv_prog_make_${ac_make}_set=yes;;
8813 *)
8814 eval ac_cv_prog_make_${ac_make}_set=no;;
8815esac
98418dba
CW
8816rm -f conftest.make
8817fi
ca81d7a0
JD
8818if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8819 { echo "$as_me:$LINENO: result: yes" >&5
8820echo "${ECHO_T}yes" >&6; }
98418dba
CW
8821 SET_MAKE=
8822else
ca81d7a0
JD
8823 { echo "$as_me:$LINENO: result: no" >&5
8824echo "${ECHO_T}no" >&6; }
98418dba
CW
8825 SET_MAKE="MAKE=${MAKE-make}"
8826fi
8827
c0d27fcc 8828
ca81d7a0
JD
8829{ echo "$as_me:$LINENO: checking for long file names" >&5
8830echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8831if test "${ac_cv_sys_long_file_names+set}" = set; then
8832 echo $ECHO_N "(cached) $ECHO_C" >&6
8833else
8834 ac_cv_sys_long_file_names=yes
8835# Test for long file names in all the places we know might matter:
8836# . the current directory, where building will happen
8837# $prefix/lib where we will be installing things
8838# $exec_prefix/lib likewise
98418dba 8839# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8840# /tmp where it might want to write temporary files
8841# /var/tmp likewise
8842# /usr/tmp likewise
ca81d7a0
JD
8843for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8844 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8845 # in the usual case where exec_prefix is '${prefix}'.
8846 case $ac_dir in #(
8847 . | /* | ?:[\\/]*) ;; #(
8848 *) continue;;
8849 esac
8850 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8851 ac_xdir=$ac_dir/cf$$
ca81d7a0 8852 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8853 ac_tf1=$ac_xdir/conftest9012345
8854 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8855 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8856 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8857 rm -f -r "$ac_xdir" 2>/dev/null
8858 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8859done
8860fi
ca81d7a0
JD
8861{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8862echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8863if test $ac_cv_sys_long_file_names = yes; then
8864
c0d27fcc 8865cat >>confdefs.h <<\_ACEOF
98418dba 8866#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8867_ACEOF
98418dba
CW
8868
8869fi
8870
c0d27fcc 8871
98418dba
CW
8872#### Choose a window system.
8873
ca81d7a0
JD
8874{ echo "$as_me:$LINENO: checking for X" >&5
8875echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8876
c0d27fcc 8877
ca81d7a0 8878# Check whether --with-x was given.
98418dba 8879if test "${with_x+set}" = set; then
ca81d7a0
JD
8880 withval=$with_x;
8881fi
98418dba 8882
98418dba
CW
8883# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8884if test "x$with_x" = xno; then
8885 # The user explicitly disabled X.
8886 have_x=disabled
8887else
ca81d7a0
JD
8888 case $x_includes,$x_libraries in #(
8889 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8890echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8891 { (exit 1); exit 1; }; };; #(
8892 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8893 echo $ECHO_N "(cached) $ECHO_C" >&6
8894else
8895 # One or both of the vars are not set, and there is no cached value.
8896ac_x_includes=no ac_x_libraries=no
ca81d7a0 8897rm -f -r conftest.dir
98418dba
CW
8898if mkdir conftest.dir; then
8899 cd conftest.dir
c0d27fcc 8900 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8901incroot:
8902 @echo incroot='${INCROOT}'
8903usrlibdir:
8904 @echo usrlibdir='${USRLIBDIR}'
8905libdir:
8906 @echo libdir='${LIBDIR}'
8907_ACEOF
8908 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8909 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8910 for ac_var in incroot usrlibdir libdir; do
8911 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8912 done
98418dba
CW
8913 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8914 for ac_extension in a so sl; do
ca81d7a0
JD
8915 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8916 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8917 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8918 fi
8919 done
8920 # Screen out bogus values from the imake configuration. They are
8921 # bogus both because they are the default anyway, and because
8922 # using them would break gcc on systems where it needs fixed includes.
8923 case $ac_im_incroot in
ca81d7a0 8924 /usr/include) ac_x_includes= ;;
98418dba
CW
8925 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8926 esac
8927 case $ac_im_usrlibdir in
8928 /usr/lib | /lib) ;;
8929 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8930 esac
8931 fi
8932 cd ..
ca81d7a0 8933 rm -f -r conftest.dir
98418dba
CW
8934fi
8935
8936# Standard set of common directories for X headers.
8937# Check X11 before X11Rn because it is often a symlink to the current release.
8938ac_x_header_dirs='
8939/usr/X11/include
8940/usr/X11R6/include
8941/usr/X11R5/include
8942/usr/X11R4/include
8943
8944/usr/include/X11
8945/usr/include/X11R6
8946/usr/include/X11R5
8947/usr/include/X11R4
8948
8949/usr/local/X11/include
8950/usr/local/X11R6/include
8951/usr/local/X11R5/include
8952/usr/local/X11R4/include
8953
8954/usr/local/include/X11
8955/usr/local/include/X11R6
8956/usr/local/include/X11R5
8957/usr/local/include/X11R4
8958
8959/usr/X386/include
8960/usr/x386/include
8961/usr/XFree86/include/X11
8962
8963/usr/include
8964/usr/local/include
8965/usr/unsupported/include
8966/usr/athena/include
8967/usr/local/x11r5/include
8968/usr/lpp/Xamples/include
8969
8970/usr/openwin/include
8971/usr/openwin/share/include'
8972
8973if test "$ac_x_includes" = no; then
ca81d7a0 8974 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8975 # First, try using that file with no special directory specified.
8976 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8977/* confdefs.h. */
8978_ACEOF
8979cat confdefs.h >>conftest.$ac_ext
8980cat >>conftest.$ac_ext <<_ACEOF
8981/* end confdefs.h. */
ca81d7a0 8982#include <X11/Xlib.h>
98418dba 8983_ACEOF
ca81d7a0
JD
8984if { (ac_try="$ac_cpp conftest.$ac_ext"
8985case "(($ac_try" in
8986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8987 *) ac_try_echo=$ac_try;;
8988esac
8989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8990 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 8991 ac_status=$?
6bae0ccf 8992 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8993 rm -f conftest.er1
8994 cat conftest.err >&5
c0d27fcc 8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8996 (exit $ac_status); } >/dev/null && {
8997 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8998 test ! -s conftest.err
8999 }; then
98418dba
CW
9000 # We can compile using X headers with no special include directory.
9001ac_x_includes=
9002else
9003 echo "$as_me: failed program was:" >&5
19650fd6
AS
9004sed 's/^/| /' conftest.$ac_ext >&5
9005
98418dba 9006 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9007 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9008 ac_x_includes=$ac_dir
9009 break
9010 fi
9011done
9012fi
ca81d7a0 9013
98418dba
CW
9014rm -f conftest.err conftest.$ac_ext
9015fi # $ac_x_includes = no
9016
9017if test "$ac_x_libraries" = no; then
9018 # Check for the libraries.
9019 # See if we find them without any special options.
9020 # Don't add to $LIBS permanently.
9021 ac_save_LIBS=$LIBS
f053c89f 9022 LIBS="-lX11 $LIBS"
98418dba 9023 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9024/* confdefs.h. */
9025_ACEOF
9026cat confdefs.h >>conftest.$ac_ext
9027cat >>conftest.$ac_ext <<_ACEOF
9028/* end confdefs.h. */
ca81d7a0 9029#include <X11/Xlib.h>
98418dba
CW
9030int
9031main ()
9032{
ca81d7a0 9033XrmInitialize ()
98418dba
CW
9034 ;
9035 return 0;
9036}
9037_ACEOF
9038rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9039if { (ac_try="$ac_link"
9040case "(($ac_try" in
9041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9042 *) ac_try_echo=$ac_try;;
9043esac
9044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9045 (eval "$ac_link") 2>conftest.er1
98418dba 9046 ac_status=$?
edfaf76d
LK
9047 grep -v '^ *+' conftest.er1 >conftest.err
9048 rm -f conftest.er1
9049 cat conftest.err >&5
c0d27fcc 9050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9051 (exit $ac_status); } && {
9052 test -z "$ac_c_werror_flag" ||
9053 test ! -s conftest.err
9054 } && test -s conftest$ac_exeext &&
9055 $as_test_x conftest$ac_exeext; then
98418dba
CW
9056 LIBS=$ac_save_LIBS
9057# We can link X programs with no special library path.
9058ac_x_libraries=
9059else
9060 echo "$as_me: failed program was:" >&5
19650fd6
AS
9061sed 's/^/| /' conftest.$ac_ext >&5
9062
ca81d7a0 9063 LIBS=$ac_save_LIBS
98418dba
CW
9064for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9065do
9066 # Don't even attempt the hair of trying to link an X program!
9067 for ac_extension in a so sl; do
f053c89f 9068 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9069 ac_x_libraries=$ac_dir
9070 break 2
9071 fi
9072 done
9073done
9074fi
ca81d7a0 9075
f053c89f 9076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9077 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9078fi # $ac_x_libraries = no
9079
ca81d7a0
JD
9080case $ac_x_includes,$ac_x_libraries in #(
9081 no,* | *,no | *\'*)
9082 # Didn't find X, or a directory has "'" in its name.
9083 ac_cv_have_x="have_x=no";; #(
9084 *)
9085 # Record where we found X for the cache.
9086 ac_cv_have_x="have_x=yes\
9087 ac_x_includes='$ac_x_includes'\
9088 ac_x_libraries='$ac_x_libraries'"
9089esac
98418dba 9090fi
ca81d7a0
JD
9091;; #(
9092 *) have_x=yes;;
9093 esac
98418dba
CW
9094 eval "$ac_cv_have_x"
9095fi # $with_x != no
9096
9097if test "$have_x" != yes; then
ca81d7a0
JD
9098 { echo "$as_me:$LINENO: result: $have_x" >&5
9099echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9100 no_x=yes
9101else
9102 # If each of the values was on the command line, it overrides each guess.
9103 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9104 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9105 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9106 ac_cv_have_x="have_x=yes\
9107 ac_x_includes='$x_includes'\
9108 ac_x_libraries='$x_libraries'"
9109 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9110echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9111fi
9112
9113if test "$no_x" = yes; then
9114 window_system=none
9115else
9116 window_system=x11
9117fi
9118
a8cd2496
GM
9119## Workaround for bug in autoconf <= 2.62.
9120## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9121## No need to do anything special for these standard directories.
921fbdf0 9122## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9123if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9124
9125 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9126
9127fi
9128
92d1ccf4
AS
9129if test "${x_libraries}" != NONE; then
9130 if test -n "${x_libraries}"; then
9131 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9132 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9133 fi
98418dba 9134 x_default_search_path=""
92d1ccf4
AS
9135 x_search_path=${x_libraries}
9136 if test -z "${x_search_path}"; then
9137 x_search_path=/usr/lib
9138 fi
9139 for x_library in `echo ${x_search_path}: | \
9140 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9141 x_search_path="\
9142${x_library}/X11/%L/%T/%N%C%S:\
9143${x_library}/X11/%l/%T/%N%C%S:\
9144${x_library}/X11/%T/%N%C%S:\
9145${x_library}/X11/%L/%T/%N%S:\
9146${x_library}/X11/%l/%T/%N%S:\
9147${x_library}/X11/%T/%N%S"
9148 if test x"${x_default_search_path}" = x; then
9149 x_default_search_path=${x_search_path}
9150 else
9151 x_default_search_path="${x_search_path}:${x_default_search_path}"
9152 fi
9153 done
9154fi
9155if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9156 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9157fi
9158
9159if test x"${x_includes}" = x; then
9160 bitmapdir=/usr/include/X11/bitmaps
9161else
9162 # accumulate include directories that have X11 bitmap subdirectories
9163 bmd_acc="dummyval"
9164 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9165 if test -d "${bmd}/X11/bitmaps"; then
9166 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9167 fi
9168 if test -d "${bmd}/bitmaps"; then
9169 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9170 fi
9171 done
9172 if test ${bmd_acc} != "dummyval"; then
9173 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9174 fi
9175fi
9176
edfda783 9177HAVE_NS=no
ff1095d1
AR
9178NS_IMPL_COCOA=no
9179NS_IMPL_GNUSTEP=no
edfda783
AR
9180tmp_CPPFLAGS="$CPPFLAGS"
9181tmp_CFLAGS="$CFLAGS"
9182CPPFLAGS="$CPPFLAGS -x objective-c"
9183CFLAGS="$CFLAGS -x objective-c"
9184if test "${with_ns}" != no; then
9185 if test "${opsys}" = darwin; then
ff1095d1 9186 NS_IMPL_COCOA=yes
06b62770
AR
9187 ns_appdir=`pwd`/nextstep/Emacs.app
9188 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9189 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9190 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
edfda783 9191 elif test -f /etc/GNUstep/GNUstep.conf; then
ff1095d1 9192 NS_IMPL_GNUSTEP=yes
06b62770
AR
9193 ns_appdir=`pwd`/nextstep/Emacs.app
9194 ns_appbindir=`pwd`/nextstep/Emacs.app
9195 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9196 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7a55ab54 9197 GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
edfda783
AR
9198 GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
9199 GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9200 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9201 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9202 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9203 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9204 fi
9205 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9206 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9207echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9208if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9209 echo $ECHO_N "(cached) $ECHO_C" >&6
9210fi
9211{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9212echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9213else
9214 # Is the header compilable?
9215{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9216echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
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$ac_includes_default
9224#include <AppKit/AppKit.h>
9225_ACEOF
9226rm -f conftest.$ac_objext
9227if { (ac_try="$ac_compile"
9228case "(($ac_try" in
9229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9230 *) ac_try_echo=$ac_try;;
9231esac
9232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9233 (eval "$ac_compile") 2>conftest.er1
9234 ac_status=$?
9235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
9238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239 (exit $ac_status); } && {
9240 test -z "$ac_c_werror_flag" ||
9241 test ! -s conftest.err
9242 } && test -s conftest.$ac_objext; then
9243 ac_header_compiler=yes
9244else
9245 echo "$as_me: failed program was:" >&5
9246sed 's/^/| /' conftest.$ac_ext >&5
9247
9248 ac_header_compiler=no
9249fi
9250
9251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9252{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9253echo "${ECHO_T}$ac_header_compiler" >&6; }
9254
9255# Is the header present?
9256{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9257echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
9258cat >conftest.$ac_ext <<_ACEOF
9259/* confdefs.h. */
9260_ACEOF
9261cat confdefs.h >>conftest.$ac_ext
9262cat >>conftest.$ac_ext <<_ACEOF
9263/* end confdefs.h. */
9264#include <AppKit/AppKit.h>
9265_ACEOF
9266if { (ac_try="$ac_cpp conftest.$ac_ext"
9267case "(($ac_try" in
9268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9269 *) ac_try_echo=$ac_try;;
9270esac
9271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9272 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9273 ac_status=$?
9274 grep -v '^ *+' conftest.er1 >conftest.err
9275 rm -f conftest.er1
9276 cat conftest.err >&5
9277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278 (exit $ac_status); } >/dev/null && {
9279 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9280 test ! -s conftest.err
9281 }; then
9282 ac_header_preproc=yes
9283else
9284 echo "$as_me: failed program was:" >&5
9285sed 's/^/| /' conftest.$ac_ext >&5
9286
9287 ac_header_preproc=no
9288fi
9289
9290rm -f conftest.err conftest.$ac_ext
9291{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9292echo "${ECHO_T}$ac_header_preproc" >&6; }
9293
9294# So? What about this header?
9295case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9296 yes:no: )
9297 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9298echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9299 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9300echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
9301 ac_header_preproc=yes
9302 ;;
9303 no:yes:* )
9304 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9305echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9306 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9307echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9308 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9309echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9310 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9311echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9312 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9313echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9314 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9315echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
9316
9317 ;;
9318esac
9319{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9320echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9321if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9322 echo $ECHO_N "(cached) $ECHO_C" >&6
9323else
9324 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9325fi
9326{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9327echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9328
9329fi
9330if test $ac_cv_header_AppKit_AppKit_h = yes; then
9331 HAVE_NS=yes
9332fi
9333
9334
519c4a9a
CY
9335 NS_HAVE_INTEGER=yes
9336 cat >conftest.$ac_ext <<_ACEOF
9337/* confdefs.h. */
9338_ACEOF
9339cat confdefs.h >>conftest.$ac_ext
9340cat >>conftest.$ac_ext <<_ACEOF
9341/* end confdefs.h. */
9342#include <Foundation/NSObjCRuntime.h>
9343int
9344main ()
9345{
9346NSInteger i;
9347 ;
9348 return 0;
9349}
9350_ACEOF
9351rm -f conftest.$ac_objext
9352if { (ac_try="$ac_compile"
9353case "(($ac_try" in
9354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9355 *) ac_try_echo=$ac_try;;
9356esac
9357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9358 (eval "$ac_compile") 2>conftest.er1
9359 ac_status=$?
9360 grep -v '^ *+' conftest.er1 >conftest.err
9361 rm -f conftest.er1
9362 cat conftest.err >&5
9363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364 (exit $ac_status); } && {
9365 test -z "$ac_c_werror_flag" ||
9366 test ! -s conftest.err
9367 } && test -s conftest.$ac_objext; then
9368 ns_have_integer=yes
9369else
9370 echo "$as_me: failed program was:" >&5
9371sed 's/^/| /' conftest.$ac_ext >&5
9372
9373 ns_have_integer=no
9374fi
9375
9376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9377 if test $ns_have_integer = no; then
9378 NS_HAVE_INTEGER=no
9379 fi
edfda783
AR
9380fi
9381if test "${HAVE_NS}" = yes; then
9382 window_system=nextstep
9383 with_xft=no
9384 with_freetype=no
06b62770
AR
9385 # set up packaging dirs
9386 exec_prefix=${ns_appbindir}
9387 libexecdir=${ns_appbindir}/libexec
9388 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9389 prefix=${ns_appresdir}
9390 fi
edfda783
AR
9391fi
9392CFLAGS="$tmp_CFLAGS"
9393CPPFLAGS="$tmp_CPPFLAGS"
9394
1d4d5604
YM
9395case "${window_system}" in
9396 x11 )
9397 HAVE_X_WINDOWS=yes
9398 HAVE_X11=yes
9399 case "${with_x_toolkit}" in
9400 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9401 motif ) USE_X_TOOLKIT=MOTIF ;;
9402 gtk ) with_gtk=yes
9403 USE_X_TOOLKIT=none ;;
9404 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9405 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9406 esac
9407 ;;
9e2a2647 9408 nextstep | none )
1d4d5604
YM
9409 HAVE_X_WINDOWS=no
9410 HAVE_X11=no
9411 USE_X_TOOLKIT=none
9412 ;;
9413esac
9414
cfe440b8
JD
9415if test "$window_system" = none && test "X$with_x" != "Xno"; then
9416 # Extract the first word of "X", so it can be a program name with args.
9417set dummy X; ac_word=$2
9418{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9419echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9420if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9421 echo $ECHO_N "(cached) $ECHO_C" >&6
9422else
9423 if test -n "$HAVE_XSERVER"; then
9424 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9425else
9426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9427for as_dir in $PATH
9428do
9429 IFS=$as_save_IFS
9430 test -z "$as_dir" && as_dir=.
9431 for ac_exec_ext in '' $ac_executable_extensions; do
9432 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9433 ac_cv_prog_HAVE_XSERVER="true"
9434 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9435 break 2
9436 fi
9437done
9438done
9439IFS=$as_save_IFS
9440
9441 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9442fi
9443fi
9444HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9445if test -n "$HAVE_XSERVER"; then
9446 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9447echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9448else
9449 { echo "$as_me:$LINENO: result: no" >&5
9450echo "${ECHO_T}no" >&6; }
9451fi
9452
9453
9454 if test "$HAVE_XSERVER" = true ||
9455 test -n "$DISPLAY" ||
9456 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9457 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9458were found. You should install the relevant development files for X
9459and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9460sure you have development files for image handling, i.e.
9461tiff, gif, jpeg, png and xpm.
9462If you are sure you want Emacs compiled without X window support, pass
9463 --without-x
9464to configure." >&5
9465echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9466were found. You should install the relevant development files for X
9467and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9468sure you have development files for image handling, i.e.
9469tiff, gif, jpeg, png and xpm.
9470If you are sure you want Emacs compiled without X window support, pass
9471 --without-x
9472to configure." >&2;}
9473 { (exit 1); exit 1; }; }
9474 fi
9475fi
9476
1d4d5604
YM
9477### If we're using X11, we should use the X menu package.
9478HAVE_MENUS=no
9479case ${HAVE_X11} in
9480 yes ) HAVE_MENUS=yes ;;
9481esac
9482
98418dba
CW
9483# Do the opsystem or machine files prohibit the use of the GNU malloc?
9484# Assume not, until told otherwise.
9485GNU_MALLOC=yes
9486doug_lea_malloc=yes
ca81d7a0
JD
9487{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9488echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9489if test "${ac_cv_func_malloc_get_state+set}" = set; then
9490 echo $ECHO_N "(cached) $ECHO_C" >&6
9491else
9492 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9493/* confdefs.h. */
9494_ACEOF
9495cat confdefs.h >>conftest.$ac_ext
9496cat >>conftest.$ac_ext <<_ACEOF
9497/* end confdefs.h. */
edfaf76d
LK
9498/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9500#define malloc_get_state innocuous_malloc_get_state
9501
98418dba 9502/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9503 which can conflict with char malloc_get_state (); below.
9504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9505 <limits.h> exists even on freestanding compilers. */
edfaf76d 9506
19650fd6
AS
9507#ifdef __STDC__
9508# include <limits.h>
9509#else
9510# include <assert.h>
9511#endif
edfaf76d
LK
9512
9513#undef malloc_get_state
9514
ca81d7a0
JD
9515/* Override any GCC internal prototype to avoid an error.
9516 Use char because int might match the return type of a GCC
9517 builtin and then its argument prototype would still apply. */
98418dba
CW
9518#ifdef __cplusplus
9519extern "C"
9520#endif
98418dba 9521char malloc_get_state ();
98418dba
CW
9522/* The GNU C library defines this for functions which it implements
9523 to always fail with ENOSYS. Some functions are actually named
9524 something starting with __ and the normal name is an alias. */
ca81d7a0 9525#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9526choke me
98418dba
CW
9527#endif
9528
19650fd6
AS
9529int
9530main ()
9531{
ca81d7a0 9532return malloc_get_state ();
98418dba
CW
9533 ;
9534 return 0;
9535}
9536_ACEOF
9537rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9538if { (ac_try="$ac_link"
9539case "(($ac_try" in
9540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9541 *) ac_try_echo=$ac_try;;
9542esac
9543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9544 (eval "$ac_link") 2>conftest.er1
98418dba 9545 ac_status=$?
edfaf76d
LK
9546 grep -v '^ *+' conftest.er1 >conftest.err
9547 rm -f conftest.er1
9548 cat conftest.err >&5
c0d27fcc 9549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9550 (exit $ac_status); } && {
9551 test -z "$ac_c_werror_flag" ||
9552 test ! -s conftest.err
9553 } && test -s conftest$ac_exeext &&
9554 $as_test_x conftest$ac_exeext; then
98418dba
CW
9555 ac_cv_func_malloc_get_state=yes
9556else
9557 echo "$as_me: failed program was:" >&5
19650fd6
AS
9558sed 's/^/| /' conftest.$ac_ext >&5
9559
ca81d7a0 9560 ac_cv_func_malloc_get_state=no
98418dba 9561fi
ca81d7a0 9562
f053c89f 9563rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9564 conftest$ac_exeext conftest.$ac_ext
98418dba 9565fi
ca81d7a0
JD
9566{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9567echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9568if test $ac_cv_func_malloc_get_state = yes; then
9569 :
9570else
9571 doug_lea_malloc=no
9572fi
9573
ca81d7a0
JD
9574{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9575echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9576if test "${ac_cv_func_malloc_set_state+set}" = set; then
9577 echo $ECHO_N "(cached) $ECHO_C" >&6
9578else
9579 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9580/* confdefs.h. */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h. */
edfaf76d
LK
9585/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9586 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9587#define malloc_set_state innocuous_malloc_set_state
9588
98418dba 9589/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9590 which can conflict with char malloc_set_state (); below.
9591 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9592 <limits.h> exists even on freestanding compilers. */
edfaf76d 9593
19650fd6
AS
9594#ifdef __STDC__
9595# include <limits.h>
9596#else
9597# include <assert.h>
9598#endif
edfaf76d
LK
9599
9600#undef malloc_set_state
9601
ca81d7a0
JD
9602/* Override any GCC internal prototype to avoid an error.
9603 Use char because int might match the return type of a GCC
9604 builtin and then its argument prototype would still apply. */
98418dba
CW
9605#ifdef __cplusplus
9606extern "C"
9607#endif
98418dba 9608char malloc_set_state ();
98418dba
CW
9609/* The GNU C library defines this for functions which it implements
9610 to always fail with ENOSYS. Some functions are actually named
9611 something starting with __ and the normal name is an alias. */
ca81d7a0 9612#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9613choke me
98418dba
CW
9614#endif
9615
19650fd6
AS
9616int
9617main ()
9618{
ca81d7a0 9619return malloc_set_state ();
98418dba
CW
9620 ;
9621 return 0;
9622}
9623_ACEOF
9624rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9625if { (ac_try="$ac_link"
9626case "(($ac_try" in
9627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9628 *) ac_try_echo=$ac_try;;
9629esac
9630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9631 (eval "$ac_link") 2>conftest.er1
98418dba 9632 ac_status=$?
edfaf76d
LK
9633 grep -v '^ *+' conftest.er1 >conftest.err
9634 rm -f conftest.er1
9635 cat conftest.err >&5
c0d27fcc 9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9637 (exit $ac_status); } && {
9638 test -z "$ac_c_werror_flag" ||
9639 test ! -s conftest.err
9640 } && test -s conftest$ac_exeext &&
9641 $as_test_x conftest$ac_exeext; then
98418dba
CW
9642 ac_cv_func_malloc_set_state=yes
9643else
9644 echo "$as_me: failed program was:" >&5
19650fd6
AS
9645sed 's/^/| /' conftest.$ac_ext >&5
9646
ca81d7a0 9647 ac_cv_func_malloc_set_state=no
98418dba 9648fi
ca81d7a0 9649
f053c89f 9650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9651 conftest$ac_exeext conftest.$ac_ext
98418dba 9652fi
ca81d7a0
JD
9653{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9654echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9655if test $ac_cv_func_malloc_set_state = yes; then
9656 :
9657else
9658 doug_lea_malloc=no
9659fi
9660
ca81d7a0
JD
9661{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9662echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9663if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9664 echo $ECHO_N "(cached) $ECHO_C" >&6
9665else
9666 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9667/* confdefs.h. */
9668_ACEOF
9669cat confdefs.h >>conftest.$ac_ext
9670cat >>conftest.$ac_ext <<_ACEOF
9671/* end confdefs.h. */
98418dba 9672extern void (* __after_morecore_hook)();
98418dba
CW
9673int
9674main ()
9675{
9676__after_morecore_hook = 0
9677 ;
9678 return 0;
9679}
9680_ACEOF
9681rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9682if { (ac_try="$ac_link"
9683case "(($ac_try" in
9684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9685 *) ac_try_echo=$ac_try;;
9686esac
9687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9688 (eval "$ac_link") 2>conftest.er1
98418dba 9689 ac_status=$?
edfaf76d
LK
9690 grep -v '^ *+' conftest.er1 >conftest.err
9691 rm -f conftest.er1
9692 cat conftest.err >&5
c0d27fcc 9693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9694 (exit $ac_status); } && {
9695 test -z "$ac_c_werror_flag" ||
9696 test ! -s conftest.err
9697 } && test -s conftest$ac_exeext &&
9698 $as_test_x conftest$ac_exeext; then
98418dba
CW
9699 emacs_cv_var___after_morecore_hook=yes
9700else
9701 echo "$as_me: failed program was:" >&5
19650fd6
AS
9702sed 's/^/| /' conftest.$ac_ext >&5
9703
ca81d7a0 9704 emacs_cv_var___after_morecore_hook=no
98418dba 9705fi
ca81d7a0 9706
f053c89f 9707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9708 conftest$ac_exeext conftest.$ac_ext
98418dba 9709fi
ca81d7a0
JD
9710{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9711echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9712if test $emacs_cv_var___after_morecore_hook = no; then
9713 doug_lea_malloc=no
9714fi
9715if test "${system_malloc}" = "yes"; then
9716 GNU_MALLOC=no
9717 GNU_MALLOC_reason="
9718 (The GNU allocators don't work with this system configuration.)"
9719fi
9720if test "$doug_lea_malloc" = "yes" ; then
9721 if test "$GNU_MALLOC" = yes ; then
9722 GNU_MALLOC_reason="
9723 (Using Doug Lea's new malloc from the GNU C Library.)"
9724 fi
b936fae4 9725
c0d27fcc 9726cat >>confdefs.h <<\_ACEOF
98418dba 9727#define DOUG_LEA_MALLOC 1
c0d27fcc 9728_ACEOF
98418dba
CW
9729
9730fi
9731
9732if test x"${REL_ALLOC}" = x; then
9733 REL_ALLOC=${GNU_MALLOC}
9734fi
9735
9736
c0d27fcc
MR
9737
9738
9739for ac_header in stdlib.h unistd.h
98418dba
CW
9740do
9741as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9742if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9743 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9744echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9745if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9746 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9747fi
ca81d7a0
JD
9748ac_res=`eval echo '${'$as_ac_Header'}'`
9749 { echo "$as_me:$LINENO: result: $ac_res" >&5
9750echo "${ECHO_T}$ac_res" >&6; }
98418dba 9751else
c0d27fcc 9752 # Is the header compilable?
ca81d7a0
JD
9753{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9754echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9755cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9756/* confdefs.h. */
9757_ACEOF
9758cat confdefs.h >>conftest.$ac_ext
9759cat >>conftest.$ac_ext <<_ACEOF
9760/* end confdefs.h. */
98418dba
CW
9761$ac_includes_default
9762#include <$ac_header>
9763_ACEOF
9764rm -f conftest.$ac_objext
ca81d7a0
JD
9765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
9770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9771 (eval "$ac_compile") 2>conftest.er1
98418dba 9772 ac_status=$?
edfaf76d
LK
9773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
c0d27fcc 9776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9777 (exit $ac_status); } && {
9778 test -z "$ac_c_werror_flag" ||
9779 test ! -s conftest.err
9780 } && test -s conftest.$ac_objext; then
c0d27fcc 9781 ac_header_compiler=yes
98418dba
CW
9782else
9783 echo "$as_me: failed program was:" >&5
19650fd6
AS
9784sed 's/^/| /' conftest.$ac_ext >&5
9785
ca81d7a0 9786 ac_header_compiler=no
98418dba 9787fi
ca81d7a0
JD
9788
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9790{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9791echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9792
c0d27fcc 9793# Is the header present?
ca81d7a0
JD
9794{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9795echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9796cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9797/* confdefs.h. */
9798_ACEOF
9799cat confdefs.h >>conftest.$ac_ext
9800cat >>conftest.$ac_ext <<_ACEOF
9801/* end confdefs.h. */
98418dba
CW
9802#include <$ac_header>
9803_ACEOF
ca81d7a0
JD
9804if { (ac_try="$ac_cpp conftest.$ac_ext"
9805case "(($ac_try" in
9806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9807 *) ac_try_echo=$ac_try;;
9808esac
9809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9810 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9811 ac_status=$?
6bae0ccf 9812 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9813 rm -f conftest.er1
9814 cat conftest.err >&5
c0d27fcc 9815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9816 (exit $ac_status); } >/dev/null && {
9817 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9818 test ! -s conftest.err
9819 }; then
c0d27fcc 9820 ac_header_preproc=yes
98418dba
CW
9821else
9822 echo "$as_me: failed program was:" >&5
19650fd6
AS
9823sed 's/^/| /' conftest.$ac_ext >&5
9824
c0d27fcc 9825 ac_header_preproc=no
98418dba 9826fi
ca81d7a0 9827
98418dba 9828rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9829{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9830echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9831
9832# So? What about this header?
edfaf76d
LK
9833case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9834 yes:no: )
c0d27fcc
MR
9835 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9836echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9837 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9838echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9839 ac_header_preproc=yes
9840 ;;
9841 no:yes:* )
9842 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9843echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9844 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9845echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9846 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9847echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9848 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9849echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9850 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9851echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9852 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9853echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9854
19650fd6 9855 ;;
c0d27fcc 9856esac
ca81d7a0
JD
9857{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9858echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9859if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9860 echo $ECHO_N "(cached) $ECHO_C" >&6
9861else
edfaf76d 9862 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9863fi
ca81d7a0
JD
9864ac_res=`eval echo '${'$as_ac_Header'}'`
9865 { echo "$as_me:$LINENO: result: $ac_res" >&5
9866echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9867
9868fi
98418dba 9869if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9870 cat >>confdefs.h <<_ACEOF
98418dba 9871#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9872_ACEOF
98418dba
CW
9873
9874fi
c0d27fcc 9875
98418dba
CW
9876done
9877
c0d27fcc 9878
98418dba
CW
9879for ac_func in getpagesize
9880do
9881as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9882{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9883echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9884if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9885 echo $ECHO_N "(cached) $ECHO_C" >&6
9886else
9887 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
edfaf76d
LK
9893/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9894 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9895#define $ac_func innocuous_$ac_func
9896
98418dba 9897/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9898 which can conflict with char $ac_func (); below.
9899 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9900 <limits.h> exists even on freestanding compilers. */
edfaf76d 9901
19650fd6
AS
9902#ifdef __STDC__
9903# include <limits.h>
9904#else
9905# include <assert.h>
9906#endif
edfaf76d
LK
9907
9908#undef $ac_func
9909
ca81d7a0
JD
9910/* Override any GCC internal prototype to avoid an error.
9911 Use char because int might match the return type of a GCC
9912 builtin and then its argument prototype would still apply. */
98418dba
CW
9913#ifdef __cplusplus
9914extern "C"
9915#endif
98418dba 9916char $ac_func ();
98418dba
CW
9917/* The GNU C library defines this for functions which it implements
9918 to always fail with ENOSYS. Some functions are actually named
9919 something starting with __ and the normal name is an alias. */
ca81d7a0 9920#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9921choke me
98418dba
CW
9922#endif
9923
19650fd6
AS
9924int
9925main ()
9926{
ca81d7a0 9927return $ac_func ();
98418dba
CW
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9933if { (ac_try="$ac_link"
9934case "(($ac_try" in
9935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9936 *) ac_try_echo=$ac_try;;
9937esac
9938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9939 (eval "$ac_link") 2>conftest.er1
98418dba 9940 ac_status=$?
edfaf76d
LK
9941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
c0d27fcc 9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9945 (exit $ac_status); } && {
9946 test -z "$ac_c_werror_flag" ||
9947 test ! -s conftest.err
9948 } && test -s conftest$ac_exeext &&
9949 $as_test_x conftest$ac_exeext; then
98418dba
CW
9950 eval "$as_ac_var=yes"
9951else
9952 echo "$as_me: failed program was:" >&5
19650fd6
AS
9953sed 's/^/| /' conftest.$ac_ext >&5
9954
ca81d7a0 9955 eval "$as_ac_var=no"
98418dba 9956fi
ca81d7a0 9957
f053c89f 9958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9959 conftest$ac_exeext conftest.$ac_ext
98418dba 9960fi
ca81d7a0
JD
9961ac_res=`eval echo '${'$as_ac_var'}'`
9962 { echo "$as_me:$LINENO: result: $ac_res" >&5
9963echo "${ECHO_T}$ac_res" >&6; }
98418dba 9964if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9965 cat >>confdefs.h <<_ACEOF
98418dba 9966#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9967_ACEOF
98418dba
CW
9968
9969fi
9970done
9971
ca81d7a0
JD
9972{ echo "$as_me:$LINENO: checking for working mmap" >&5
9973echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
9974if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9975 echo $ECHO_N "(cached) $ECHO_C" >&6
9976else
9977 if test "$cross_compiling" = yes; then
9978 ac_cv_func_mmap_fixed_mapped=no
9979else
9980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9981/* confdefs.h. */
9982_ACEOF
9983cat confdefs.h >>conftest.$ac_ext
9984cat >>conftest.$ac_ext <<_ACEOF
9985/* end confdefs.h. */
98418dba 9986$ac_includes_default
c0d27fcc
MR
9987/* malloc might have been renamed as rpl_malloc. */
9988#undef malloc
9989
98418dba
CW
9990/* Thanks to Mike Haertel and Jim Avera for this test.
9991 Here is a matrix of mmap possibilities:
9992 mmap private not fixed
9993 mmap private fixed at somewhere currently unmapped
9994 mmap private fixed at somewhere already mapped
9995 mmap shared not fixed
9996 mmap shared fixed at somewhere currently unmapped
9997 mmap shared fixed at somewhere already mapped
9998 For private mappings, we should verify that changes cannot be read()
9999 back from the file, nor mmap's back from the file at a different
10000 address. (There have been systems where private was not correctly
10001 implemented like the infamous i386 svr4.0, and systems where the
10002 VM page cache was not coherent with the file system buffer cache
10003 like early versions of FreeBSD and possibly contemporary NetBSD.)
10004 For shared mappings, we should conversely verify that changes get
c0d27fcc 10005 propagated back to all the places they're supposed to be.
98418dba
CW
10006
10007 Grep wants private fixed already mapped.
10008 The main things grep needs to know about mmap are:
10009 * does it exist and is it safe to write into the mmap'd area
10010 * how to use it (BSD variants) */
10011
10012#include <fcntl.h>
10013#include <sys/mman.h>
10014
f053c89f 10015#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10016char *malloc ();
10017#endif
10018
10019/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10020#ifndef HAVE_GETPAGESIZE
98418dba 10021/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10022# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10023# define HAVE_SYS_PARAM_H 1
10024# endif
10025
10026# ifdef _SC_PAGESIZE
10027# define getpagesize() sysconf(_SC_PAGESIZE)
10028# else /* no _SC_PAGESIZE */
f053c89f 10029# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10030# include <sys/param.h>
10031# ifdef EXEC_PAGESIZE
10032# define getpagesize() EXEC_PAGESIZE
10033# else /* no EXEC_PAGESIZE */
10034# ifdef NBPG
10035# define getpagesize() NBPG * CLSIZE
10036# ifndef CLSIZE
10037# define CLSIZE 1
10038# endif /* no CLSIZE */
10039# else /* no NBPG */
10040# ifdef NBPC
10041# define getpagesize() NBPC
10042# else /* no NBPC */
10043# ifdef PAGESIZE
10044# define getpagesize() PAGESIZE
10045# endif /* PAGESIZE */
10046# endif /* no NBPC */
10047# endif /* no NBPG */
10048# endif /* no EXEC_PAGESIZE */
10049# else /* no HAVE_SYS_PARAM_H */
10050# define getpagesize() 8192 /* punt totally */
10051# endif /* no HAVE_SYS_PARAM_H */
10052# endif /* no _SC_PAGESIZE */
10053
10054#endif /* no HAVE_GETPAGESIZE */
10055
10056int
10057main ()
10058{
10059 char *data, *data2, *data3;
10060 int i, pagesize;
10061 int fd;
10062
10063 pagesize = getpagesize ();
10064
10065 /* First, make a file with some known garbage in it. */
10066 data = (char *) malloc (pagesize);
10067 if (!data)
ca81d7a0 10068 return 1;
98418dba
CW
10069 for (i = 0; i < pagesize; ++i)
10070 *(data + i) = rand ();
10071 umask (0);
10072 fd = creat ("conftest.mmap", 0600);
10073 if (fd < 0)
ca81d7a0 10074 return 1;
98418dba 10075 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10076 return 1;
98418dba
CW
10077 close (fd);
10078
10079 /* Next, try to mmap the file at a fixed address which already has
10080 something else allocated at it. If we can, also make sure that
10081 we see the same garbage. */
10082 fd = open ("conftest.mmap", O_RDWR);
10083 if (fd < 0)
ca81d7a0 10084 return 1;
98418dba
CW
10085 data2 = (char *) malloc (2 * pagesize);
10086 if (!data2)
ca81d7a0
JD
10087 return 1;
10088 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10089 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10090 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10091 return 1;
98418dba
CW
10092 for (i = 0; i < pagesize; ++i)
10093 if (*(data + i) != *(data2 + i))
ca81d7a0 10094 return 1;
98418dba
CW
10095
10096 /* Finally, make sure that changes to the mapped area do not
10097 percolate back to the file as seen by read(). (This is a bug on
10098 some variants of i386 svr4.0.) */
10099 for (i = 0; i < pagesize; ++i)
10100 *(data2 + i) = *(data2 + i) + 1;
10101 data3 = (char *) malloc (pagesize);
10102 if (!data3)
ca81d7a0 10103 return 1;
98418dba 10104 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10105 return 1;
98418dba
CW
10106 for (i = 0; i < pagesize; ++i)
10107 if (*(data + i) != *(data3 + i))
ca81d7a0 10108 return 1;
98418dba 10109 close (fd);
ca81d7a0 10110 return 0;
98418dba
CW
10111}
10112_ACEOF
10113rm -f 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>&5
98418dba 10121 ac_status=$?
c0d27fcc 10122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10124 { (case "(($ac_try" in
10125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10126 *) ac_try_echo=$ac_try;;
10127esac
10128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10129 (eval "$ac_try") 2>&5
98418dba 10130 ac_status=$?
c0d27fcc 10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10132 (exit $ac_status); }; }; then
10133 ac_cv_func_mmap_fixed_mapped=yes
10134else
10135 echo "$as_me: program exited with status $ac_status" >&5
10136echo "$as_me: failed program was:" >&5
19650fd6
AS
10137sed 's/^/| /' conftest.$ac_ext >&5
10138
c0d27fcc 10139( exit $ac_status )
98418dba
CW
10140ac_cv_func_mmap_fixed_mapped=no
10141fi
ca81d7a0 10142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10143fi
ca81d7a0
JD
10144
10145
98418dba 10146fi
ca81d7a0
JD
10147{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10148echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10149if test $ac_cv_func_mmap_fixed_mapped = yes; then
10150
c0d27fcc 10151cat >>confdefs.h <<\_ACEOF
98418dba 10152#define HAVE_MMAP 1
c0d27fcc 10153_ACEOF
98418dba
CW
10154
10155fi
10156rm -f conftest.mmap
10157
10158if test $use_mmap_for_buffers = yes; then
10159 REL_ALLOC=no
10160fi
10161
10162LIBS="$libsrc_libs $LIBS"
10163
c0d27fcc 10164
ca81d7a0
JD
10165{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10166echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10167if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10168 echo $ECHO_N "(cached) $ECHO_C" >&6
10169else
10170 ac_check_lib_save_LIBS=$LIBS
10171LIBS="-ldnet $LIBS"
10172cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10173/* confdefs.h. */
10174_ACEOF
10175cat confdefs.h >>conftest.$ac_ext
10176cat >>conftest.$ac_ext <<_ACEOF
10177/* end confdefs.h. */
98418dba 10178
ca81d7a0
JD
10179/* Override any GCC internal prototype to avoid an error.
10180 Use char because int might match the return type of a GCC
10181 builtin and then its argument prototype would still apply. */
98418dba
CW
10182#ifdef __cplusplus
10183extern "C"
10184#endif
98418dba 10185char dnet_ntoa ();
98418dba
CW
10186int
10187main ()
10188{
ca81d7a0 10189return dnet_ntoa ();
98418dba
CW
10190 ;
10191 return 0;
10192}
10193_ACEOF
10194rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10195if { (ac_try="$ac_link"
10196case "(($ac_try" in
10197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10198 *) ac_try_echo=$ac_try;;
10199esac
10200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10201 (eval "$ac_link") 2>conftest.er1
98418dba 10202 ac_status=$?
edfaf76d
LK
10203 grep -v '^ *+' conftest.er1 >conftest.err
10204 rm -f conftest.er1
10205 cat conftest.err >&5
c0d27fcc 10206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10207 (exit $ac_status); } && {
10208 test -z "$ac_c_werror_flag" ||
10209 test ! -s conftest.err
10210 } && test -s conftest$ac_exeext &&
10211 $as_test_x conftest$ac_exeext; then
98418dba
CW
10212 ac_cv_lib_dnet_dnet_ntoa=yes
10213else
10214 echo "$as_me: failed program was:" >&5
19650fd6
AS
10215sed 's/^/| /' conftest.$ac_ext >&5
10216
ca81d7a0 10217 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10218fi
ca81d7a0 10219
f053c89f 10220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10221 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10222LIBS=$ac_check_lib_save_LIBS
10223fi
ca81d7a0
JD
10224{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10225echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10226if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10227 cat >>confdefs.h <<_ACEOF
98418dba 10228#define HAVE_LIBDNET 1
c0d27fcc 10229_ACEOF
98418dba
CW
10230
10231 LIBS="-ldnet $LIBS"
10232
10233fi
10234
c0d27fcc 10235
ca81d7a0
JD
10236{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10237echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10238if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10239 echo $ECHO_N "(cached) $ECHO_C" >&6
10240else
10241 ac_check_lib_save_LIBS=$LIBS
10242LIBS="-lXbsd $LIBS"
10243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10244/* confdefs.h. */
10245_ACEOF
10246cat confdefs.h >>conftest.$ac_ext
10247cat >>conftest.$ac_ext <<_ACEOF
10248/* end confdefs.h. */
98418dba 10249
c0d27fcc 10250
98418dba
CW
10251int
10252main ()
10253{
ca81d7a0 10254return main ();
98418dba
CW
10255 ;
10256 return 0;
10257}
10258_ACEOF
10259rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10260if { (ac_try="$ac_link"
10261case "(($ac_try" in
10262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10263 *) ac_try_echo=$ac_try;;
10264esac
10265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10266 (eval "$ac_link") 2>conftest.er1
98418dba 10267 ac_status=$?
edfaf76d
LK
10268 grep -v '^ *+' conftest.er1 >conftest.err
10269 rm -f conftest.er1
10270 cat conftest.err >&5
c0d27fcc 10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10272 (exit $ac_status); } && {
10273 test -z "$ac_c_werror_flag" ||
10274 test ! -s conftest.err
10275 } && test -s conftest$ac_exeext &&
10276 $as_test_x conftest$ac_exeext; then
98418dba
CW
10277 ac_cv_lib_Xbsd_main=yes
10278else
10279 echo "$as_me: failed program was:" >&5
19650fd6
AS
10280sed 's/^/| /' conftest.$ac_ext >&5
10281
ca81d7a0 10282 ac_cv_lib_Xbsd_main=no
98418dba 10283fi
ca81d7a0 10284
f053c89f 10285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10286 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10287LIBS=$ac_check_lib_save_LIBS
10288fi
ca81d7a0
JD
10289{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10290echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10291if test $ac_cv_lib_Xbsd_main = yes; then
10292 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10293fi
10294
c0d27fcc
MR
10295
10296
ca81d7a0
JD
10297{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10298echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10299if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10300 echo $ECHO_N "(cached) $ECHO_C" >&6
10301else
10302 ac_check_lib_save_LIBS=$LIBS
10303LIBS="-lpthreads $LIBS"
10304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10305/* confdefs.h. */
10306_ACEOF
10307cat confdefs.h >>conftest.$ac_ext
10308cat >>conftest.$ac_ext <<_ACEOF
10309/* end confdefs.h. */
98418dba 10310
ca81d7a0
JD
10311/* Override any GCC internal prototype to avoid an error.
10312 Use char because int might match the return type of a GCC
10313 builtin and then its argument prototype would still apply. */
98418dba
CW
10314#ifdef __cplusplus
10315extern "C"
10316#endif
98418dba 10317char cma_open ();
98418dba
CW
10318int
10319main ()
10320{
ca81d7a0 10321return cma_open ();
98418dba
CW
10322 ;
10323 return 0;
10324}
10325_ACEOF
10326rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10327if { (ac_try="$ac_link"
10328case "(($ac_try" in
10329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10330 *) ac_try_echo=$ac_try;;
10331esac
10332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10333 (eval "$ac_link") 2>conftest.er1
98418dba 10334 ac_status=$?
edfaf76d
LK
10335 grep -v '^ *+' conftest.er1 >conftest.err
10336 rm -f conftest.er1
10337 cat conftest.err >&5
c0d27fcc 10338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10339 (exit $ac_status); } && {
10340 test -z "$ac_c_werror_flag" ||
10341 test ! -s conftest.err
10342 } && test -s conftest$ac_exeext &&
10343 $as_test_x conftest$ac_exeext; then
98418dba
CW
10344 ac_cv_lib_pthreads_cma_open=yes
10345else
10346 echo "$as_me: failed program was:" >&5
19650fd6
AS
10347sed 's/^/| /' conftest.$ac_ext >&5
10348
ca81d7a0 10349 ac_cv_lib_pthreads_cma_open=no
98418dba 10350fi
ca81d7a0 10351
f053c89f 10352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10353 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10354LIBS=$ac_check_lib_save_LIBS
10355fi
ca81d7a0
JD
10356{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10357echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10358if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10359 cat >>confdefs.h <<_ACEOF
98418dba 10360#define HAVE_LIBPTHREADS 1
c0d27fcc 10361_ACEOF
98418dba
CW
10362
10363 LIBS="-lpthreads $LIBS"
10364
10365fi
10366
c0d27fcc 10367
55597d70
DL
10368
10369case ${host_os} in
10370aix*)
ca81d7a0
JD
10371 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10372echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10373if test "${gdb_cv_bigtoc+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
10375else
10376
10377 case $GCC in
10378 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10379 *) gdb_cv_bigtoc=-bbigtoc ;;
10380 esac
10381
10382 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10383 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10384/* confdefs.h. */
10385_ACEOF
10386cat confdefs.h >>conftest.$ac_ext
10387cat >>conftest.$ac_ext <<_ACEOF
10388/* end confdefs.h. */
55597d70
DL
10389
10390int
10391main ()
10392{
10393int i;
10394 ;
10395 return 0;
10396}
10397_ACEOF
10398rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10399if { (ac_try="$ac_link"
10400case "(($ac_try" in
10401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10402 *) ac_try_echo=$ac_try;;
10403esac
10404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10405 (eval "$ac_link") 2>conftest.er1
55597d70 10406 ac_status=$?
edfaf76d
LK
10407 grep -v '^ *+' conftest.er1 >conftest.err
10408 rm -f conftest.er1
10409 cat conftest.err >&5
55597d70 10410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10411 (exit $ac_status); } && {
10412 test -z "$ac_c_werror_flag" ||
10413 test ! -s conftest.err
10414 } && test -s conftest$ac_exeext &&
10415 $as_test_x conftest$ac_exeext; then
55597d70
DL
10416 :
10417else
10418 echo "$as_me: failed program was:" >&5
19650fd6
AS
10419sed 's/^/| /' conftest.$ac_ext >&5
10420
ca81d7a0 10421 gdb_cv_bigtoc=
55597d70 10422fi
ca81d7a0 10423
f053c89f 10424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10425 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10426
10427fi
ca81d7a0
JD
10428{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10429echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10430 ;;
10431esac
10432
ae1a998c
RS
10433# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10434# used for the tests that follow. We set them back to REAL_CFLAGS and
10435# REAL_CPPFLAGS later on.
98418dba
CW
10436
10437REAL_CPPFLAGS="$CPPFLAGS"
10438
10439if test "${HAVE_X11}" = "yes"; then
10440 DEFS="$C_SWITCH_X_SITE $DEFS"
10441 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10442 LIBS="$LIBX $LIBS"
10443 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10444 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10445
10446 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10447 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10448 # but it's more convenient here to set LD_RUN_PATH
10449 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10450 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10451 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10452 export LD_RUN_PATH
10453 fi
10454
10455 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10456 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10457echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10459/* confdefs.h. */
10460_ACEOF
10461cat confdefs.h >>conftest.$ac_ext
10462cat >>conftest.$ac_ext <<_ACEOF
10463/* end confdefs.h. */
98418dba 10464
98418dba
CW
10465int
10466main ()
10467{
10468XOpenDisplay ("foo");
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10474if { (ac_try="$ac_link"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
10479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10480 (eval "$ac_link") 2>conftest.er1
98418dba 10481 ac_status=$?
edfaf76d
LK
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
c0d27fcc 10485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest$ac_exeext &&
10490 $as_test_x conftest$ac_exeext; then
35996d22 10491 xlinux_first_failure=no
98418dba
CW
10492else
10493 echo "$as_me: failed program was:" >&5
19650fd6
AS
10494sed 's/^/| /' conftest.$ac_ext >&5
10495
ca81d7a0 10496 xlinux_first_failure=yes
98418dba 10497fi
ca81d7a0 10498
f053c89f 10499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10500 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10501 if test "${xlinux_first_failure}" = "yes"; then
10502 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10503 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10504 OLD_CPPFLAGS="$CPPFLAGS"
10505 OLD_LIBS="$LIBS"
10506 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10507 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10508 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10509 LIBS="$LIBS -b i486-linuxaout"
10510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10511/* confdefs.h. */
10512_ACEOF
10513cat confdefs.h >>conftest.$ac_ext
10514cat >>conftest.$ac_ext <<_ACEOF
10515/* end confdefs.h. */
98418dba 10516
98418dba
CW
10517int
10518main ()
10519{
10520XOpenDisplay ("foo");
10521 ;
10522 return 0;
10523}
10524_ACEOF
10525rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10526if { (ac_try="$ac_link"
10527case "(($ac_try" in
10528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10529 *) ac_try_echo=$ac_try;;
10530esac
10531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10532 (eval "$ac_link") 2>conftest.er1
98418dba 10533 ac_status=$?
edfaf76d
LK
10534 grep -v '^ *+' conftest.er1 >conftest.err
10535 rm -f conftest.er1
10536 cat conftest.err >&5
c0d27fcc 10537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10538 (exit $ac_status); } && {
10539 test -z "$ac_c_werror_flag" ||
10540 test ! -s conftest.err
10541 } && test -s conftest$ac_exeext &&
10542 $as_test_x conftest$ac_exeext; then
98418dba
CW
10543 xlinux_second_failure=no
10544else
10545 echo "$as_me: failed program was:" >&5
19650fd6
AS
10546sed 's/^/| /' conftest.$ac_ext >&5
10547
ca81d7a0 10548 xlinux_second_failure=yes
98418dba 10549fi
ca81d7a0 10550
f053c89f 10551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10552 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10553 if test "${xlinux_second_failure}" = "yes"; then
10554 # If we get the same failure with -b, there is no use adding -b.
10555 # So take it out. This plays safe.
10556 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10557 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10558 CPPFLAGS="$OLD_CPPFLAGS"
10559 LIBS="$OLD_LIBS"
ca81d7a0
JD
10560 { echo "$as_me:$LINENO: result: no" >&5
10561echo "${ECHO_T}no" >&6; }
98418dba 10562 else
ca81d7a0
JD
10563 { echo "$as_me:$LINENO: result: yes" >&5
10564echo "${ECHO_T}yes" >&6; }
98418dba
CW
10565 fi
10566 else
ca81d7a0
JD
10567 { echo "$as_me:$LINENO: result: no" >&5
10568echo "${ECHO_T}no" >&6; }
98418dba
CW
10569 fi
10570 fi
10571
10572 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10573 # header files included from there.
ca81d7a0
JD
10574 { echo "$as_me:$LINENO: checking for Xkb" >&5
10575echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10576 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10577/* confdefs.h. */
10578_ACEOF
10579cat confdefs.h >>conftest.$ac_ext
10580cat >>conftest.$ac_ext <<_ACEOF
10581/* end confdefs.h. */
98418dba
CW
10582#include <X11/Xlib.h>
10583#include <X11/XKBlib.h>
98418dba
CW
10584int
10585main ()
10586{
10587XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10588 ;
10589 return 0;
10590}
10591_ACEOF
10592rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10593if { (ac_try="$ac_link"
10594case "(($ac_try" in
10595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10596 *) ac_try_echo=$ac_try;;
10597esac
10598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10599 (eval "$ac_link") 2>conftest.er1
98418dba 10600 ac_status=$?
edfaf76d
LK
10601 grep -v '^ *+' conftest.er1 >conftest.err
10602 rm -f conftest.er1
10603 cat conftest.err >&5
c0d27fcc 10604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10605 (exit $ac_status); } && {
10606 test -z "$ac_c_werror_flag" ||
10607 test ! -s conftest.err
10608 } && test -s conftest$ac_exeext &&
10609 $as_test_x conftest$ac_exeext; then
98418dba
CW
10610 emacs_xkb=yes
10611else
10612 echo "$as_me: failed program was:" >&5
19650fd6
AS
10613sed 's/^/| /' conftest.$ac_ext >&5
10614
ca81d7a0 10615 emacs_xkb=no
98418dba 10616fi
ca81d7a0 10617
f053c89f 10618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10619 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10620 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10621echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10622 if test $emacs_xkb = yes; then
b936fae4 10623
c0d27fcc 10624cat >>confdefs.h <<\_ACEOF
98418dba 10625#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10626_ACEOF
98418dba
CW
10627
10628 fi
10629
c0d27fcc
MR
10630
10631
10632
10633
98418dba
CW
10634for ac_func in XrmSetDatabase XScreenResourceString \
10635XScreenNumberOfScreen XSetWMProtocols
10636do
10637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10638{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10640if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10641 echo $ECHO_N "(cached) $ECHO_C" >&6
10642else
10643 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10644/* confdefs.h. */
10645_ACEOF
10646cat confdefs.h >>conftest.$ac_ext
10647cat >>conftest.$ac_ext <<_ACEOF
10648/* end confdefs.h. */
edfaf76d
LK
10649/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10650 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10651#define $ac_func innocuous_$ac_func
10652
98418dba 10653/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10654 which can conflict with char $ac_func (); below.
10655 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10656 <limits.h> exists even on freestanding compilers. */
edfaf76d 10657
19650fd6
AS
10658#ifdef __STDC__
10659# include <limits.h>
10660#else
10661# include <assert.h>
10662#endif
edfaf76d
LK
10663
10664#undef $ac_func
10665
ca81d7a0
JD
10666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
98418dba
CW
10669#ifdef __cplusplus
10670extern "C"
10671#endif
98418dba 10672char $ac_func ();
98418dba
CW
10673/* The GNU C library defines this for functions which it implements
10674 to always fail with ENOSYS. Some functions are actually named
10675 something starting with __ and the normal name is an alias. */
ca81d7a0 10676#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10677choke me
98418dba
CW
10678#endif
10679
19650fd6
AS
10680int
10681main ()
10682{
ca81d7a0 10683return $ac_func ();
98418dba
CW
10684 ;
10685 return 0;
10686}
10687_ACEOF
10688rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10689if { (ac_try="$ac_link"
10690case "(($ac_try" in
10691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10692 *) ac_try_echo=$ac_try;;
10693esac
10694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10695 (eval "$ac_link") 2>conftest.er1
98418dba 10696 ac_status=$?
edfaf76d
LK
10697 grep -v '^ *+' conftest.er1 >conftest.err
10698 rm -f conftest.er1
10699 cat conftest.err >&5
c0d27fcc 10700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10701 (exit $ac_status); } && {
10702 test -z "$ac_c_werror_flag" ||
10703 test ! -s conftest.err
10704 } && test -s conftest$ac_exeext &&
10705 $as_test_x conftest$ac_exeext; then
98418dba
CW
10706 eval "$as_ac_var=yes"
10707else
10708 echo "$as_me: failed program was:" >&5
19650fd6
AS
10709sed 's/^/| /' conftest.$ac_ext >&5
10710
ca81d7a0 10711 eval "$as_ac_var=no"
98418dba 10712fi
ca81d7a0 10713
f053c89f 10714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10715 conftest$ac_exeext conftest.$ac_ext
98418dba 10716fi
ca81d7a0
JD
10717ac_res=`eval echo '${'$as_ac_var'}'`
10718 { echo "$as_me:$LINENO: result: $ac_res" >&5
10719echo "${ECHO_T}$ac_res" >&6; }
98418dba 10720if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10721 cat >>confdefs.h <<_ACEOF
98418dba 10722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10723_ACEOF
98418dba
CW
10724
10725fi
10726done
10727
10728fi
10729
10730if test "${window_system}" = "x11"; then
ca81d7a0
JD
10731 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10732echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10733 if test "${emacs_cv_x11_version_6+set}" = set; then
10734 echo $ECHO_N "(cached) $ECHO_C" >&6
10735else
10736 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10737/* confdefs.h. */
10738_ACEOF
10739cat confdefs.h >>conftest.$ac_ext
10740cat >>conftest.$ac_ext <<_ACEOF
10741/* end confdefs.h. */
98418dba 10742#include <X11/Xlib.h>
98418dba
CW
10743int
10744main ()
10745{
10746#if XlibSpecificationRelease < 6
10747fail;
10748#endif
10749
10750 ;
10751 return 0;
10752}
10753_ACEOF
10754rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10755if { (ac_try="$ac_link"
10756case "(($ac_try" in
10757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10758 *) ac_try_echo=$ac_try;;
10759esac
10760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10761 (eval "$ac_link") 2>conftest.er1
98418dba 10762 ac_status=$?
edfaf76d
LK
10763 grep -v '^ *+' conftest.er1 >conftest.err
10764 rm -f conftest.er1
10765 cat conftest.err >&5
c0d27fcc 10766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10767 (exit $ac_status); } && {
10768 test -z "$ac_c_werror_flag" ||
10769 test ! -s conftest.err
10770 } && test -s conftest$ac_exeext &&
10771 $as_test_x conftest$ac_exeext; then
98418dba
CW
10772 emacs_cv_x11_version_6=yes
10773else
10774 echo "$as_me: failed program was:" >&5
19650fd6
AS
10775sed 's/^/| /' conftest.$ac_ext >&5
10776
ca81d7a0 10777 emacs_cv_x11_version_6=no
98418dba 10778fi
ca81d7a0 10779
f053c89f 10780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10781 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10782fi
10783
10784 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10785 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10786echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10787
c0d27fcc 10788cat >>confdefs.h <<\_ACEOF
98418dba 10789#define HAVE_X11R6 1
c0d27fcc 10790_ACEOF
98418dba
CW
10791
10792 else
ca81d7a0
JD
10793 { echo "$as_me:$LINENO: result: before 6" >&5
10794echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10795 fi
10796fi
10797
98418dba 10798
0cfc0546
GM
10799### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10800HAVE_RSVG=no
9e2a2647 10801if test "${HAVE_X11}" = "yes"; then
0cfc0546 10802 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10803 RSVG_REQUIRED=2.0.0
10804 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10805
10806
10807 succeeded=no
10808
00b9c927 10809 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10810set dummy pkg-config; ac_word=$2
10811{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10813if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10814 echo $ECHO_N "(cached) $ECHO_C" >&6
10815else
10816 case $PKG_CONFIG in
10817 [\\/]* | ?:[\\/]*)
10818 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10819 ;;
10820 *)
10821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10822for as_dir in $PATH
10823do
10824 IFS=$as_save_IFS
10825 test -z "$as_dir" && as_dir=.
10826 for ac_exec_ext in '' $ac_executable_extensions; do
10827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10828 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10829 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10830 break 2
10831 fi
10832done
10833done
10834IFS=$as_save_IFS
10835
10836 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10837 ;;
10838esac
10839fi
10840PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10841if test -n "$PKG_CONFIG"; then
10842 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10843echo "${ECHO_T}$PKG_CONFIG" >&6; }
10844else
10845 { echo "$as_me:$LINENO: result: no" >&5
10846echo "${ECHO_T}no" >&6; }
10847fi
10848
10849
0cfc0546
GM
10850
10851 if test "$PKG_CONFIG" = "no" ; then
10852 :
10853 else
10854 PKG_CONFIG_MIN_VERSION=0.9.0
10855 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10856 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10857echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10858
10859 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10860 { echo "$as_me:$LINENO: result: yes" >&5
10861echo "${ECHO_T}yes" >&6; }
10862 succeeded=yes
10863
10864 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10865echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10866 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10867 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10868echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10869
10870 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10871echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10872 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10873 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10874echo "${ECHO_T}$RSVG_LIBS" >&6; }
10875 else
10876 { echo "$as_me:$LINENO: result: no" >&5
10877echo "${ECHO_T}no" >&6; }
10878 RSVG_CFLAGS=""
10879 RSVG_LIBS=""
10880 ## If we have a custom action on failure, don't print errors, but
10881 ## do set a variable so people can do so.
10882 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10883
10884 fi
10885
10886
10887
10888 else
10889 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10890 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10891 fi
10892 fi
10893
10894 if test $succeeded = yes; then
10895 :
10896 else
10897 :
10898 fi
10899
10900
10901
10902
10903 if test ".${RSVG_CFLAGS}" != "."; then
10904 HAVE_RSVG=yes
10905
10906cat >>confdefs.h <<\_ACEOF
10907#define HAVE_RSVG 1
10908_ACEOF
10909
10910 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10911 LIBS="$RSVG_LIBS $LIBS"
10912 fi
10913 fi
10914fi
10915
10916
488dd4c4 10917HAVE_GTK=no
9d2818d6 10918if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10919 GLIB_REQUIRED=2.6
10920 GTK_REQUIRED=2.6
488dd4c4
JD
10921 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10922
488dd4c4
JD
10923
10924 succeeded=no
10925
00b9c927 10926 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10927set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10928{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10929echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10930if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10931 echo $ECHO_N "(cached) $ECHO_C" >&6
10932else
10933 case $PKG_CONFIG in
10934 [\\/]* | ?:[\\/]*)
10935 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10936 ;;
10937 *)
10938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10939for as_dir in $PATH
10940do
10941 IFS=$as_save_IFS
10942 test -z "$as_dir" && as_dir=.
10943 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10945 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10947 break 2
10948 fi
10949done
10950done
ca81d7a0 10951IFS=$as_save_IFS
488dd4c4
JD
10952
10953 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10954 ;;
10955esac
10956fi
10957PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10958if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10959 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10960echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10961else
ca81d7a0
JD
10962 { echo "$as_me:$LINENO: result: no" >&5
10963echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10964fi
10965
ca81d7a0 10966
488dd4c4
JD
10967
10968 if test "$PKG_CONFIG" = "no" ; then
089a966d 10969 pkg_check_gtk=no
488dd4c4
JD
10970 else
10971 PKG_CONFIG_MIN_VERSION=0.9.0
10972 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
10973 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10974echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10975
67db6aa2 10976 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
10977 { echo "$as_me:$LINENO: result: yes" >&5
10978echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10979 succeeded=yes
10980
ca81d7a0
JD
10981 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10982echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 10983 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10984 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10985echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10986
ca81d7a0
JD
10987 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10988echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 10989 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10990 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10991echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 10992 else
ca81d7a0
JD
10993 { echo "$as_me:$LINENO: result: no" >&5
10994echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10995 GTK_CFLAGS=""
10996 GTK_LIBS=""
10997 ## If we have a custom action on failure, don't print errors, but
10998 ## do set a variable so people can do so.
10999 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11000
488dd4c4
JD
11001 fi
11002
11003
11004
11005 else
11006 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11007 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11008 fi
11009 fi
11010
11011 if test $succeeded = yes; then
089a966d 11012 pkg_check_gtk=yes
488dd4c4 11013 else
089a966d
GM
11014 pkg_check_gtk=no
11015 fi
11016
11017 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11018 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11019echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11020 { (exit 1); exit 1; }; }
11021 fi
089a966d
GM
11022fi
11023
11024
11025if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11026
11027
11028
11029 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11030 CFLAGS="$CFLAGS $GTK_CFLAGS"
11031 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11032 GTK_COMPILES=no
57669b57 11033
8eeae1c9 11034for ac_func in gtk_main
57669b57
JD
11035do
11036as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11037{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11038echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11039if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11040 echo $ECHO_N "(cached) $ECHO_C" >&6
11041else
11042 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11043/* confdefs.h. */
11044_ACEOF
11045cat confdefs.h >>conftest.$ac_ext
11046cat >>conftest.$ac_ext <<_ACEOF
11047/* end confdefs.h. */
edfaf76d
LK
11048/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11050#define $ac_func innocuous_$ac_func
11051
57669b57
JD
11052/* System header to define __stub macros and hopefully few prototypes,
11053 which can conflict with char $ac_func (); below.
11054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11055 <limits.h> exists even on freestanding compilers. */
edfaf76d 11056
57669b57
JD
11057#ifdef __STDC__
11058# include <limits.h>
11059#else
11060# include <assert.h>
11061#endif
edfaf76d
LK
11062
11063#undef $ac_func
11064
ca81d7a0
JD
11065/* Override any GCC internal prototype to avoid an error.
11066 Use char because int might match the return type of a GCC
11067 builtin and then its argument prototype would still apply. */
57669b57
JD
11068#ifdef __cplusplus
11069extern "C"
57669b57 11070#endif
57669b57
JD
11071char $ac_func ();
11072/* The GNU C library defines this for functions which it implements
11073 to always fail with ENOSYS. Some functions are actually named
11074 something starting with __ and the normal name is an alias. */
ca81d7a0 11075#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11076choke me
57669b57
JD
11077#endif
11078
11079int
11080main ()
11081{
ca81d7a0 11082return $ac_func ();
57669b57
JD
11083 ;
11084 return 0;
11085}
11086_ACEOF
11087rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11088if { (ac_try="$ac_link"
11089case "(($ac_try" in
11090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11091 *) ac_try_echo=$ac_try;;
11092esac
11093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11094 (eval "$ac_link") 2>conftest.er1
57669b57 11095 ac_status=$?
edfaf76d
LK
11096 grep -v '^ *+' conftest.er1 >conftest.err
11097 rm -f conftest.er1
11098 cat conftest.err >&5
57669b57 11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11100 (exit $ac_status); } && {
11101 test -z "$ac_c_werror_flag" ||
11102 test ! -s conftest.err
11103 } && test -s conftest$ac_exeext &&
11104 $as_test_x conftest$ac_exeext; then
57669b57
JD
11105 eval "$as_ac_var=yes"
11106else
11107 echo "$as_me: failed program was:" >&5
11108sed 's/^/| /' conftest.$ac_ext >&5
11109
ca81d7a0 11110 eval "$as_ac_var=no"
57669b57 11111fi
ca81d7a0 11112
f053c89f 11113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11114 conftest$ac_exeext conftest.$ac_ext
57669b57 11115fi
ca81d7a0
JD
11116ac_res=`eval echo '${'$as_ac_var'}'`
11117 { echo "$as_me:$LINENO: result: $ac_res" >&5
11118echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11119if test `eval echo '${'$as_ac_var'}'` = yes; then
11120 cat >>confdefs.h <<_ACEOF
11121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11122_ACEOF
8eeae1c9 11123 GTK_COMPILES=yes
57669b57
JD
11124fi
11125done
11126
8eeae1c9 11127 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11128 if test "$USE_X_TOOLKIT" != "maybe"; then
11129 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11130echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11131 { (exit 1); exit 1; }; };
089a966d
GM
11132 fi
11133 else
11134 HAVE_GTK=yes
488dd4c4
JD
11135
11136cat >>confdefs.h <<\_ACEOF
a51f4969 11137#define USE_GTK 1
488dd4c4
JD
11138_ACEOF
11139
089a966d 11140 USE_X_TOOLKIT=none
f60c93db
JD
11141 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11142 :
11143 else
11144 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11145 closing open displays. This is no problem if you just use
11146 one display, but if you use more than one and close one of them
11147 Emacs may crash." >&5
11148echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11149 closing open displays. This is no problem if you just use
11150 one display, but if you use more than one and close one of them
11151 Emacs may crash." >&2;}
11152 sleep 3
11153 fi
089a966d
GM
11154 fi
11155
11156fi
11157
11158
11159if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11160
d0a80c21
JD
11161 if test "$with_toolkit_scroll_bars" != no; then
11162 with_toolkit_scroll_bars=yes
11163 fi
57669b57
JD
11164
11165 HAVE_GTK_MULTIDISPLAY=no
11166
11167for ac_func in gdk_display_open
11168do
11169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11170{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11172if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11173 echo $ECHO_N "(cached) $ECHO_C" >&6
11174else
11175 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11176/* confdefs.h. */
11177_ACEOF
11178cat confdefs.h >>conftest.$ac_ext
11179cat >>conftest.$ac_ext <<_ACEOF
11180/* end confdefs.h. */
edfaf76d
LK
11181/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11183#define $ac_func innocuous_$ac_func
11184
57669b57
JD
11185/* System header to define __stub macros and hopefully few prototypes,
11186 which can conflict with char $ac_func (); below.
11187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11188 <limits.h> exists even on freestanding compilers. */
edfaf76d 11189
57669b57
JD
11190#ifdef __STDC__
11191# include <limits.h>
11192#else
11193# include <assert.h>
11194#endif
edfaf76d
LK
11195
11196#undef $ac_func
11197
ca81d7a0
JD
11198/* Override any GCC internal prototype to avoid an error.
11199 Use char because int might match the return type of a GCC
11200 builtin and then its argument prototype would still apply. */
57669b57
JD
11201#ifdef __cplusplus
11202extern "C"
57669b57 11203#endif
57669b57
JD
11204char $ac_func ();
11205/* The GNU C library defines this for functions which it implements
11206 to always fail with ENOSYS. Some functions are actually named
11207 something starting with __ and the normal name is an alias. */
ca81d7a0 11208#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11209choke me
57669b57
JD
11210#endif
11211
11212int
11213main ()
11214{
ca81d7a0 11215return $ac_func ();
57669b57
JD
11216 ;
11217 return 0;
11218}
11219_ACEOF
11220rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11221if { (ac_try="$ac_link"
11222case "(($ac_try" in
11223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11224 *) ac_try_echo=$ac_try;;
11225esac
11226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11227 (eval "$ac_link") 2>conftest.er1
57669b57 11228 ac_status=$?
edfaf76d
LK
11229 grep -v '^ *+' conftest.er1 >conftest.err
11230 rm -f conftest.er1
11231 cat conftest.err >&5
57669b57 11232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11233 (exit $ac_status); } && {
11234 test -z "$ac_c_werror_flag" ||
11235 test ! -s conftest.err
11236 } && test -s conftest$ac_exeext &&
11237 $as_test_x conftest$ac_exeext; then
57669b57
JD
11238 eval "$as_ac_var=yes"
11239else
11240 echo "$as_me: failed program was:" >&5
11241sed 's/^/| /' conftest.$ac_ext >&5
11242
ca81d7a0 11243 eval "$as_ac_var=no"
57669b57 11244fi
ca81d7a0 11245
f053c89f 11246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11247 conftest$ac_exeext conftest.$ac_ext
57669b57 11248fi
ca81d7a0
JD
11249ac_res=`eval echo '${'$as_ac_var'}'`
11250 { echo "$as_me:$LINENO: result: $ac_res" >&5
11251echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11252if test `eval echo '${'$as_ac_var'}'` = yes; then
11253 cat >>confdefs.h <<_ACEOF
11254#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11255_ACEOF
11256 HAVE_GTK_MULTIDISPLAY=yes
11257fi
11258done
11259
11260 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11261
11262cat >>confdefs.h <<\_ACEOF
11263#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11264_ACEOF
11265
11266 fi
57669b57 11267
572a3cc2
JD
11268 HAVE_GTK_FILE_SELECTION=no
11269
11270for ac_func in gtk_file_selection_new
11271do
11272as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11273{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11274echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11275if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11276 echo $ECHO_N "(cached) $ECHO_C" >&6
11277else
11278 cat >conftest.$ac_ext <<_ACEOF
11279/* confdefs.h. */
11280_ACEOF
11281cat confdefs.h >>conftest.$ac_ext
11282cat >>conftest.$ac_ext <<_ACEOF
11283/* end confdefs.h. */
edfaf76d
LK
11284/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11285 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11286#define $ac_func innocuous_$ac_func
11287
572a3cc2
JD
11288/* System header to define __stub macros and hopefully few prototypes,
11289 which can conflict with char $ac_func (); below.
11290 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11291 <limits.h> exists even on freestanding compilers. */
edfaf76d 11292
572a3cc2
JD
11293#ifdef __STDC__
11294# include <limits.h>
11295#else
11296# include <assert.h>
11297#endif
edfaf76d
LK
11298
11299#undef $ac_func
11300
ca81d7a0
JD
11301/* Override any GCC internal prototype to avoid an error.
11302 Use char because int might match the return type of a GCC
11303 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11304#ifdef __cplusplus
11305extern "C"
572a3cc2 11306#endif
572a3cc2
JD
11307char $ac_func ();
11308/* The GNU C library defines this for functions which it implements
11309 to always fail with ENOSYS. Some functions are actually named
11310 something starting with __ and the normal name is an alias. */
ca81d7a0 11311#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11312choke me
572a3cc2
JD
11313#endif
11314
11315int
11316main ()
11317{
ca81d7a0 11318return $ac_func ();
572a3cc2
JD
11319 ;
11320 return 0;
11321}
11322_ACEOF
11323rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11324if { (ac_try="$ac_link"
11325case "(($ac_try" in
11326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11327 *) ac_try_echo=$ac_try;;
11328esac
11329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11330 (eval "$ac_link") 2>conftest.er1
572a3cc2 11331 ac_status=$?
edfaf76d
LK
11332 grep -v '^ *+' conftest.er1 >conftest.err
11333 rm -f conftest.er1
11334 cat conftest.err >&5
572a3cc2 11335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11336 (exit $ac_status); } && {
11337 test -z "$ac_c_werror_flag" ||
11338 test ! -s conftest.err
11339 } && test -s conftest$ac_exeext &&
11340 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11341 eval "$as_ac_var=yes"
11342else
11343 echo "$as_me: failed program was:" >&5
11344sed 's/^/| /' conftest.$ac_ext >&5
11345
ca81d7a0 11346 eval "$as_ac_var=no"
572a3cc2 11347fi
ca81d7a0 11348
f053c89f 11349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11350 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11351fi
ca81d7a0
JD
11352ac_res=`eval echo '${'$as_ac_var'}'`
11353 { echo "$as_me:$LINENO: result: $ac_res" >&5
11354echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11355if test `eval echo '${'$as_ac_var'}'` = yes; then
11356 cat >>confdefs.h <<_ACEOF
11357#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11358_ACEOF
11359 HAVE_GTK_FILE_SELECTION=yes
11360fi
11361done
11362
11363
11364 HAVE_GTK_FILE_CHOOSER=no
11365
11366for ac_func in gtk_file_chooser_dialog_new
11367do
11368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11369{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11371if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11372 echo $ECHO_N "(cached) $ECHO_C" >&6
11373else
11374 cat >conftest.$ac_ext <<_ACEOF
11375/* confdefs.h. */
11376_ACEOF
11377cat confdefs.h >>conftest.$ac_ext
11378cat >>conftest.$ac_ext <<_ACEOF
11379/* end confdefs.h. */
edfaf76d
LK
11380/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11381 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11382#define $ac_func innocuous_$ac_func
11383
572a3cc2
JD
11384/* System header to define __stub macros and hopefully few prototypes,
11385 which can conflict with char $ac_func (); below.
11386 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11387 <limits.h> exists even on freestanding compilers. */
edfaf76d 11388
572a3cc2
JD
11389#ifdef __STDC__
11390# include <limits.h>
11391#else
11392# include <assert.h>
11393#endif
edfaf76d
LK
11394
11395#undef $ac_func
11396
ca81d7a0
JD
11397/* Override any GCC internal prototype to avoid an error.
11398 Use char because int might match the return type of a GCC
11399 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11400#ifdef __cplusplus
11401extern "C"
572a3cc2 11402#endif
572a3cc2
JD
11403char $ac_func ();
11404/* The GNU C library defines this for functions which it implements
11405 to always fail with ENOSYS. Some functions are actually named
11406 something starting with __ and the normal name is an alias. */
ca81d7a0 11407#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11408choke me
572a3cc2
JD
11409#endif
11410
11411int
11412main ()
11413{
ca81d7a0 11414return $ac_func ();
572a3cc2
JD
11415 ;
11416 return 0;
11417}
11418_ACEOF
11419rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11420if { (ac_try="$ac_link"
11421case "(($ac_try" in
11422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11423 *) ac_try_echo=$ac_try;;
11424esac
11425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11426 (eval "$ac_link") 2>conftest.er1
572a3cc2 11427 ac_status=$?
edfaf76d
LK
11428 grep -v '^ *+' conftest.er1 >conftest.err
11429 rm -f conftest.er1
11430 cat conftest.err >&5
572a3cc2 11431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11432 (exit $ac_status); } && {
11433 test -z "$ac_c_werror_flag" ||
11434 test ! -s conftest.err
11435 } && test -s conftest$ac_exeext &&
11436 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11437 eval "$as_ac_var=yes"
11438else
11439 echo "$as_me: failed program was:" >&5
11440sed 's/^/| /' conftest.$ac_ext >&5
11441
ca81d7a0 11442 eval "$as_ac_var=no"
572a3cc2 11443fi
ca81d7a0 11444
f053c89f 11445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11446 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11447fi
ca81d7a0
JD
11448ac_res=`eval echo '${'$as_ac_var'}'`
11449 { echo "$as_me:$LINENO: result: $ac_res" >&5
11450echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11451if test `eval echo '${'$as_ac_var'}'` = yes; then
11452 cat >>confdefs.h <<_ACEOF
11453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11454_ACEOF
11455 HAVE_GTK_FILE_CHOOSER=yes
11456fi
11457done
11458
11459
11460 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11461 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11462
11463cat >>confdefs.h <<\_ACEOF
11464#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11465_ACEOF
11466
b8bdffbe
JD
11467 fi
11468
11469 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11470 HAVE_GTK_AND_PTHREAD=no
11471
11472for ac_header in pthread.h
11473do
11474as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11475if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11476 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11478if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11479 echo $ECHO_N "(cached) $ECHO_C" >&6
11480fi
ca81d7a0
JD
11481ac_res=`eval echo '${'$as_ac_Header'}'`
11482 { echo "$as_me:$LINENO: result: $ac_res" >&5
11483echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11484else
11485 # Is the header compilable?
ca81d7a0
JD
11486{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11487echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11488cat >conftest.$ac_ext <<_ACEOF
11489/* confdefs.h. */
11490_ACEOF
11491cat confdefs.h >>conftest.$ac_ext
11492cat >>conftest.$ac_ext <<_ACEOF
11493/* end confdefs.h. */
11494$ac_includes_default
11495#include <$ac_header>
11496_ACEOF
11497rm -f conftest.$ac_objext
ca81d7a0
JD
11498if { (ac_try="$ac_compile"
11499case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
11503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11504 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11505 ac_status=$?
edfaf76d
LK
11506 grep -v '^ *+' conftest.er1 >conftest.err
11507 rm -f conftest.er1
11508 cat conftest.err >&5
b8bdffbe 11509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11510 (exit $ac_status); } && {
11511 test -z "$ac_c_werror_flag" ||
11512 test ! -s conftest.err
11513 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11514 ac_header_compiler=yes
11515else
11516 echo "$as_me: failed program was:" >&5
11517sed 's/^/| /' conftest.$ac_ext >&5
11518
ca81d7a0 11519 ac_header_compiler=no
b8bdffbe 11520fi
ca81d7a0
JD
11521
11522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11523{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11524echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11525
11526# Is the header present?
ca81d7a0
JD
11527{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11528echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11529cat >conftest.$ac_ext <<_ACEOF
11530/* confdefs.h. */
11531_ACEOF
11532cat confdefs.h >>conftest.$ac_ext
11533cat >>conftest.$ac_ext <<_ACEOF
11534/* end confdefs.h. */
11535#include <$ac_header>
11536_ACEOF
ca81d7a0
JD
11537if { (ac_try="$ac_cpp conftest.$ac_ext"
11538case "(($ac_try" in
11539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11540 *) ac_try_echo=$ac_try;;
11541esac
11542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11543 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11544 ac_status=$?
11545 grep -v '^ *+' conftest.er1 >conftest.err
11546 rm -f conftest.er1
11547 cat conftest.err >&5
11548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11549 (exit $ac_status); } >/dev/null && {
11550 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11551 test ! -s conftest.err
11552 }; then
b8bdffbe
JD
11553 ac_header_preproc=yes
11554else
11555 echo "$as_me: failed program was:" >&5
11556sed 's/^/| /' conftest.$ac_ext >&5
11557
11558 ac_header_preproc=no
11559fi
ca81d7a0 11560
b8bdffbe 11561rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11562{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11563echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11564
11565# So? What about this header?
edfaf76d
LK
11566case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11567 yes:no: )
b8bdffbe
JD
11568 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11569echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11570 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11571echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11572 ac_header_preproc=yes
b8bdffbe 11573 ;;
edfaf76d 11574 no:yes:* )
b8bdffbe
JD
11575 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11576echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11577 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11578echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11579 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11580echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11581 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11582echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11583 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11584echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11585 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11586echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11587
b8bdffbe
JD
11588 ;;
11589esac
ca81d7a0
JD
11590{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11591echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11592if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11593 echo $ECHO_N "(cached) $ECHO_C" >&6
11594else
edfaf76d 11595 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11596fi
ca81d7a0
JD
11597ac_res=`eval echo '${'$as_ac_Header'}'`
11598 { echo "$as_me:$LINENO: result: $ac_res" >&5
11599echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11600
11601fi
11602if test `eval echo '${'$as_ac_Header'}'` = yes; then
11603 cat >>confdefs.h <<_ACEOF
11604#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11605_ACEOF
11606
11607fi
11608
11609done
11610
11611 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11612 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11613echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11614if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11616else
11617 ac_check_lib_save_LIBS=$LIBS
11618LIBS="-lpthread $LIBS"
11619cat >conftest.$ac_ext <<_ACEOF
11620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
11625
ca81d7a0
JD
11626/* Override any GCC internal prototype to avoid an error.
11627 Use char because int might match the return type of a GCC
11628 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11629#ifdef __cplusplus
11630extern "C"
11631#endif
b8bdffbe
JD
11632char pthread_self ();
11633int
11634main ()
11635{
ca81d7a0 11636return pthread_self ();
b8bdffbe
JD
11637 ;
11638 return 0;
11639}
11640_ACEOF
11641rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11642if { (ac_try="$ac_link"
11643case "(($ac_try" in
11644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11645 *) ac_try_echo=$ac_try;;
11646esac
11647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11648 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11649 ac_status=$?
edfaf76d
LK
11650 grep -v '^ *+' conftest.er1 >conftest.err
11651 rm -f conftest.er1
11652 cat conftest.err >&5
b8bdffbe 11653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11654 (exit $ac_status); } && {
11655 test -z "$ac_c_werror_flag" ||
11656 test ! -s conftest.err
11657 } && test -s conftest$ac_exeext &&
11658 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11659 ac_cv_lib_pthread_pthread_self=yes
11660else
11661 echo "$as_me: failed program was:" >&5
11662sed 's/^/| /' conftest.$ac_ext >&5
11663
ca81d7a0 11664 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11665fi
ca81d7a0 11666
f053c89f 11667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11668 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11669LIBS=$ac_check_lib_save_LIBS
11670fi
ca81d7a0
JD
11671{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11672echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11673if test $ac_cv_lib_pthread_pthread_self = yes; then
11674 HAVE_GTK_AND_PTHREAD=yes
11675fi
11676
11677 fi
11678 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11679 case "${canonical}" in
11680 *-hpux*) ;;
11681 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11682 esac
b8bdffbe
JD
11683
11684cat >>confdefs.h <<\_ACEOF
11685#define HAVE_GTK_AND_PTHREAD 1
11686_ACEOF
11687
11688 fi
57669b57 11689 fi
488dd4c4
JD
11690fi
11691
131e4133
MA
11692HAVE_DBUS=no
11693if test "${with_dbus}" = "yes"; then
cffe4909
MH
11694
11695 succeeded=no
11696
00b9c927 11697 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11698set dummy pkg-config; ac_word=$2
11699{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11700echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11701if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11702 echo $ECHO_N "(cached) $ECHO_C" >&6
11703else
cffe4909
MH
11704 case $PKG_CONFIG in
11705 [\\/]* | ?:[\\/]*)
11706 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11707 ;;
11708 *)
11709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11710for as_dir in $PATH
11711do
11712 IFS=$as_save_IFS
11713 test -z "$as_dir" && as_dir=.
11714 for ac_exec_ext in '' $ac_executable_extensions; do
11715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11716 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11717 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11718 break 2
11719 fi
11720done
11721done
11722IFS=$as_save_IFS
131e4133 11723
cffe4909
MH
11724 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11725 ;;
131e4133 11726esac
cffe4909
MH
11727fi
11728PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11729if test -n "$PKG_CONFIG"; then
11730 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11731echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11732else
cffe4909
MH
11733 { echo "$as_me:$LINENO: result: no" >&5
11734echo "${ECHO_T}no" >&6; }
131e4133
MA
11735fi
11736
cffe4909 11737
cffe4909
MH
11738
11739 if test "$PKG_CONFIG" = "no" ; then
11740 HAVE_DBUS=no
11741 else
11742 PKG_CONFIG_MIN_VERSION=0.9.0
11743 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11744 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11745echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11746
11747 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11748 { echo "$as_me:$LINENO: result: yes" >&5
11749echo "${ECHO_T}yes" >&6; }
11750 succeeded=yes
11751
11752 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11753echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11754 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11755 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11756echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11757
11758 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11759echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11760 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11761 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11762echo "${ECHO_T}$DBUS_LIBS" >&6; }
11763 else
11764 { echo "$as_me:$LINENO: result: no" >&5
11765echo "${ECHO_T}no" >&6; }
11766 DBUS_CFLAGS=""
11767 DBUS_LIBS=""
11768 ## If we have a custom action on failure, don't print errors, but
11769 ## do set a variable so people can do so.
11770 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11771
11772 fi
11773
11774
11775
11776 else
11777 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11778 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11779 fi
11780 fi
11781
11782 if test $succeeded = yes; then
11783 HAVE_DBUS=yes
11784 else
11785 HAVE_DBUS=no
11786 fi
131e4133
MA
11787
11788 if test "$HAVE_DBUS" = yes; then
11789
11790cat >>confdefs.h <<\_ACEOF
11791#define HAVE_DBUS 1
11792_ACEOF
11793
131e4133
MA
11794 fi
11795fi
11796
b3615392 11797HAVE_XAW3D=no
991a7602 11798if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11799 if test "$with_xaw3d" != no; then
11800 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11801echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11802 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11803 echo $ECHO_N "(cached) $ECHO_C" >&6
11804else
11805 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11806/* confdefs.h. */
11807_ACEOF
11808cat confdefs.h >>conftest.$ac_ext
11809cat >>conftest.$ac_ext <<_ACEOF
11810/* end confdefs.h. */
98418dba
CW
11811
11812#include <X11/Intrinsic.h>
b3615392 11813#include <X11/Xaw3d/Simple.h>
98418dba
CW
11814int
11815main ()
11816{
11817
11818 ;
11819 return 0;
11820}
11821_ACEOF
11822rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11823if { (ac_try="$ac_link"
11824case "(($ac_try" in
11825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11826 *) ac_try_echo=$ac_try;;
11827esac
11828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11829 (eval "$ac_link") 2>conftest.er1
98418dba 11830 ac_status=$?
edfaf76d
LK
11831 grep -v '^ *+' conftest.er1 >conftest.err
11832 rm -f conftest.er1
11833 cat conftest.err >&5
c0d27fcc 11834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11835 (exit $ac_status); } && {
11836 test -z "$ac_c_werror_flag" ||
11837 test ! -s conftest.err
11838 } && test -s conftest$ac_exeext &&
11839 $as_test_x conftest$ac_exeext; then
b3615392 11840 emacs_cv_xaw3d=yes
98418dba
CW
11841else
11842 echo "$as_me: failed program was:" >&5
19650fd6
AS
11843sed 's/^/| /' conftest.$ac_ext >&5
11844
b3615392 11845 emacs_cv_xaw3d=no
98418dba 11846fi
ca81d7a0 11847
f053c89f 11848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11849 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11850fi
11851
9d89ffd0 11852 else
f23d76bd 11853 emacs_cv_xaw3d=no
9d89ffd0 11854 fi
f23d76bd
MB
11855 if test $emacs_cv_xaw3d = yes; then
11856 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11857echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11858 USE_X_TOOLKIT=LUCID
11859 HAVE_XAW3D=yes
9d89ffd0 11860
b3615392
MB
11861cat >>confdefs.h <<\_ACEOF
11862#define HAVE_XAW3D 1
11863_ACEOF
9d89ffd0 11864
f23d76bd
MB
11865 else
11866 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11867echo "${ECHO_T}no" >&6; }
f23d76bd 11868 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11869echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11870 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11871 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11872else
b3615392 11873 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11874/* confdefs.h. */
11875_ACEOF
11876cat confdefs.h >>conftest.$ac_ext
11877cat >>conftest.$ac_ext <<_ACEOF
11878/* end confdefs.h. */
b3615392
MB
11879
11880#include <X11/Intrinsic.h>
11881#include <X11/Xaw/Simple.h>
11882int
11883main ()
11884{
11885
11886 ;
11887 return 0;
11888}
9d89ffd0 11889_ACEOF
b3615392
MB
11890rm -f conftest.$ac_objext conftest$ac_exeext
11891if { (ac_try="$ac_link"
9d89ffd0
JD
11892case "(($ac_try" in
11893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11894 *) ac_try_echo=$ac_try;;
11895esac
11896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11897 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11898 ac_status=$?
11899 grep -v '^ *+' conftest.er1 >conftest.err
11900 rm -f conftest.er1
11901 cat conftest.err >&5
11902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903 (exit $ac_status); } && {
11904 test -z "$ac_c_werror_flag" ||
11905 test ! -s conftest.err
b3615392
MB
11906 } && test -s conftest$ac_exeext &&
11907 $as_test_x conftest$ac_exeext; then
11908 emacs_cv_xaw=yes
9d89ffd0
JD
11909else
11910 echo "$as_me: failed program was:" >&5
11911sed 's/^/| /' conftest.$ac_ext >&5
11912
b3615392 11913 emacs_cv_xaw=no
9d89ffd0
JD
11914fi
11915
b3615392
MB
11916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11917 conftest$ac_exeext conftest.$ac_ext
11918fi
9d89ffd0 11919
f23d76bd
MB
11920 if test $emacs_cv_xaw = yes; then
11921 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11922echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11923 USE_X_TOOLKIT=LUCID
11924 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11925 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
11926echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
11927 { (exit 1); exit 1; }; }
f23d76bd
MB
11928 else
11929 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 11930echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11931 USE_X_TOOLKIT=none
98418dba 11932 fi
98418dba
CW
11933 fi
11934fi
11935
11936X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11937
11938if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11939 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11940echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11941 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11942 echo $ECHO_N "(cached) $ECHO_C" >&6
11943else
11944 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11945/* confdefs.h. */
11946_ACEOF
11947cat confdefs.h >>conftest.$ac_ext
11948cat >>conftest.$ac_ext <<_ACEOF
11949/* end confdefs.h. */
98418dba 11950#include <X11/Intrinsic.h>
98418dba
CW
11951int
11952main ()
11953{
11954#if XtSpecificationRelease < 6
11955fail;
11956#endif
11957
11958 ;
11959 return 0;
11960}
11961_ACEOF
11962rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11963if { (ac_try="$ac_link"
11964case "(($ac_try" in
11965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11966 *) ac_try_echo=$ac_try;;
11967esac
11968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11969 (eval "$ac_link") 2>conftest.er1
98418dba 11970 ac_status=$?
edfaf76d
LK
11971 grep -v '^ *+' conftest.er1 >conftest.err
11972 rm -f conftest.er1
11973 cat conftest.err >&5
c0d27fcc 11974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11975 (exit $ac_status); } && {
11976 test -z "$ac_c_werror_flag" ||
11977 test ! -s conftest.err
11978 } && test -s conftest$ac_exeext &&
11979 $as_test_x conftest$ac_exeext; then
98418dba
CW
11980 emacs_cv_x11_toolkit_version_6=yes
11981else
11982 echo "$as_me: failed program was:" >&5
19650fd6
AS
11983sed 's/^/| /' conftest.$ac_ext >&5
11984
ca81d7a0 11985 emacs_cv_x11_toolkit_version_6=no
98418dba 11986fi
ca81d7a0 11987
f053c89f 11988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11989 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11990fi
11991
11992 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11993 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
11994 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11995echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11996
c0d27fcc 11997cat >>confdefs.h <<\_ACEOF
98418dba 11998#define HAVE_X11XTR6 1
c0d27fcc 11999_ACEOF
98418dba
CW
12000
12001 else
ca81d7a0
JD
12002 { echo "$as_me:$LINENO: result: before 6" >&5
12003echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12004 fi
12005
12006 OLDLIBS="$LIBS"
12007 if test x$HAVE_X11XTR6 = xyes; then
12008 LIBS="-lXt -lSM -lICE $LIBS"
12009 else
12010 LIBS="-lXt $LIBS"
12011 fi
12012
ca81d7a0
JD
12013{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12014echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12015if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12016 echo $ECHO_N "(cached) $ECHO_C" >&6
12017else
12018 ac_check_lib_save_LIBS=$LIBS
12019LIBS="-lXmu $LIBS"
12020cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12021/* confdefs.h. */
12022_ACEOF
12023cat confdefs.h >>conftest.$ac_ext
12024cat >>conftest.$ac_ext <<_ACEOF
12025/* end confdefs.h. */
98418dba 12026
ca81d7a0
JD
12027/* Override any GCC internal prototype to avoid an error.
12028 Use char because int might match the return type of a GCC
12029 builtin and then its argument prototype would still apply. */
98418dba
CW
12030#ifdef __cplusplus
12031extern "C"
12032#endif
98418dba 12033char XmuConvertStandardSelection ();
98418dba
CW
12034int
12035main ()
12036{
ca81d7a0 12037return XmuConvertStandardSelection ();
98418dba
CW
12038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12043if { (ac_try="$ac_link"
12044case "(($ac_try" in
12045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12046 *) ac_try_echo=$ac_try;;
12047esac
12048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12049 (eval "$ac_link") 2>conftest.er1
98418dba 12050 ac_status=$?
edfaf76d
LK
12051 grep -v '^ *+' conftest.er1 >conftest.err
12052 rm -f conftest.er1
12053 cat conftest.err >&5
c0d27fcc 12054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12055 (exit $ac_status); } && {
12056 test -z "$ac_c_werror_flag" ||
12057 test ! -s conftest.err
12058 } && test -s conftest$ac_exeext &&
12059 $as_test_x conftest$ac_exeext; then
98418dba
CW
12060 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12061else
12062 echo "$as_me: failed program was:" >&5
19650fd6
AS
12063sed 's/^/| /' conftest.$ac_ext >&5
12064
ca81d7a0 12065 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12066fi
ca81d7a0 12067
f053c89f 12068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12069 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12070LIBS=$ac_check_lib_save_LIBS
12071fi
ca81d7a0
JD
12072{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12073echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12074if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12075 cat >>confdefs.h <<_ACEOF
98418dba 12076#define HAVE_LIBXMU 1
c0d27fcc 12077_ACEOF
98418dba
CW
12078
12079 LIBS="-lXmu $LIBS"
12080
12081fi
12082
12083 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12084fi
12085
12086# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12087if test "${HAVE_X11}" = "yes"; then
12088 if test "${USE_X_TOOLKIT}" != "none"; then
12089
ca81d7a0
JD
12090{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12091echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12092if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12093 echo $ECHO_N "(cached) $ECHO_C" >&6
12094else
12095 ac_check_lib_save_LIBS=$LIBS
12096LIBS="-lXext $LIBS"
12097cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12098/* confdefs.h. */
12099_ACEOF
12100cat confdefs.h >>conftest.$ac_ext
12101cat >>conftest.$ac_ext <<_ACEOF
12102/* end confdefs.h. */
98418dba 12103
ca81d7a0
JD
12104/* Override any GCC internal prototype to avoid an error.
12105 Use char because int might match the return type of a GCC
12106 builtin and then its argument prototype would still apply. */
98418dba
CW
12107#ifdef __cplusplus
12108extern "C"
12109#endif
98418dba 12110char XShapeQueryExtension ();
98418dba
CW
12111int
12112main ()
12113{
ca81d7a0 12114return XShapeQueryExtension ();
98418dba
CW
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12120if { (ac_try="$ac_link"
12121case "(($ac_try" in
12122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12123 *) ac_try_echo=$ac_try;;
12124esac
12125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12126 (eval "$ac_link") 2>conftest.er1
98418dba 12127 ac_status=$?
edfaf76d
LK
12128 grep -v '^ *+' conftest.er1 >conftest.err
12129 rm -f conftest.er1
12130 cat conftest.err >&5
c0d27fcc 12131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12132 (exit $ac_status); } && {
12133 test -z "$ac_c_werror_flag" ||
12134 test ! -s conftest.err
12135 } && test -s conftest$ac_exeext &&
12136 $as_test_x conftest$ac_exeext; then
98418dba
CW
12137 ac_cv_lib_Xext_XShapeQueryExtension=yes
12138else
12139 echo "$as_me: failed program was:" >&5
19650fd6
AS
12140sed 's/^/| /' conftest.$ac_ext >&5
12141
ca81d7a0 12142 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12143fi
ca81d7a0 12144
f053c89f 12145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12146 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12147LIBS=$ac_check_lib_save_LIBS
12148fi
ca81d7a0
JD
12149{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12150echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12151if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12152 cat >>confdefs.h <<_ACEOF
98418dba 12153#define HAVE_LIBXEXT 1
c0d27fcc 12154_ACEOF
98418dba
CW
12155
12156 LIBS="-lXext $LIBS"
12157
12158fi
12159
12160 fi
12161fi
12162
12163if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12164 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12165echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12166if test "${emacs_cv_motif_version_2_1+set}" = set; then
12167 echo $ECHO_N "(cached) $ECHO_C" >&6
12168else
12169 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12170/* confdefs.h. */
12171_ACEOF
12172cat confdefs.h >>conftest.$ac_ext
12173cat >>conftest.$ac_ext <<_ACEOF
12174/* end confdefs.h. */
98418dba 12175#include <Xm/Xm.h>
98418dba
CW
12176int
12177main ()
12178{
12179#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12180int x = 5;
12181#else
12182Motif version prior to 2.1.
12183#endif
12184 ;
12185 return 0;
12186}
12187_ACEOF
12188rm -f conftest.$ac_objext
ca81d7a0
JD
12189if { (ac_try="$ac_compile"
12190case "(($ac_try" in
12191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12192 *) ac_try_echo=$ac_try;;
12193esac
12194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12195 (eval "$ac_compile") 2>conftest.er1
98418dba 12196 ac_status=$?
edfaf76d
LK
12197 grep -v '^ *+' conftest.er1 >conftest.err
12198 rm -f conftest.er1
12199 cat conftest.err >&5
c0d27fcc 12200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12201 (exit $ac_status); } && {
12202 test -z "$ac_c_werror_flag" ||
12203 test ! -s conftest.err
12204 } && test -s conftest.$ac_objext; then
98418dba
CW
12205 emacs_cv_motif_version_2_1=yes
12206else
12207 echo "$as_me: failed program was:" >&5
19650fd6
AS
12208sed 's/^/| /' conftest.$ac_ext >&5
12209
ca81d7a0 12210 emacs_cv_motif_version_2_1=no
98418dba 12211fi
ca81d7a0
JD
12212
12213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12214fi
ca81d7a0
JD
12215{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12216echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12217 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12218 if test $emacs_cv_motif_version_2_1 = yes; then
12219 HAVE_LIBXP=no
b936fae4 12220
c0d27fcc 12221cat >>confdefs.h <<\_ACEOF
98418dba 12222#define HAVE_MOTIF_2_1 1
c0d27fcc 12223_ACEOF
98418dba 12224
ca81d7a0
JD
12225 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12226echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12227if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12228 echo $ECHO_N "(cached) $ECHO_C" >&6
12229else
12230 ac_check_lib_save_LIBS=$LIBS
12231LIBS="-lXp $LIBS"
12232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12233/* confdefs.h. */
12234_ACEOF
12235cat confdefs.h >>conftest.$ac_ext
12236cat >>conftest.$ac_ext <<_ACEOF
12237/* end confdefs.h. */
98418dba 12238
ca81d7a0
JD
12239/* Override any GCC internal prototype to avoid an error.
12240 Use char because int might match the return type of a GCC
12241 builtin and then its argument prototype would still apply. */
98418dba
CW
12242#ifdef __cplusplus
12243extern "C"
12244#endif
98418dba 12245char XpCreateContext ();
98418dba
CW
12246int
12247main ()
12248{
ca81d7a0 12249return XpCreateContext ();
98418dba
CW
12250 ;
12251 return 0;
12252}
12253_ACEOF
12254rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12255if { (ac_try="$ac_link"
12256case "(($ac_try" in
12257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12258 *) ac_try_echo=$ac_try;;
12259esac
12260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12261 (eval "$ac_link") 2>conftest.er1
98418dba 12262 ac_status=$?
edfaf76d
LK
12263 grep -v '^ *+' conftest.er1 >conftest.err
12264 rm -f conftest.er1
12265 cat conftest.err >&5
c0d27fcc 12266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12267 (exit $ac_status); } && {
12268 test -z "$ac_c_werror_flag" ||
12269 test ! -s conftest.err
12270 } && test -s conftest$ac_exeext &&
12271 $as_test_x conftest$ac_exeext; then
98418dba
CW
12272 ac_cv_lib_Xp_XpCreateContext=yes
12273else
12274 echo "$as_me: failed program was:" >&5
19650fd6
AS
12275sed 's/^/| /' conftest.$ac_ext >&5
12276
ca81d7a0 12277 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12278fi
ca81d7a0 12279
f053c89f 12280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12281 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12282LIBS=$ac_check_lib_save_LIBS
12283fi
ca81d7a0
JD
12284{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12285echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12286if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12287 HAVE_LIBXP=yes
12288fi
503d2be0 12289
98418dba 12290 if test ${HAVE_LIBXP} = yes; then
b936fae4 12291
c0d27fcc 12292cat >>confdefs.h <<\_ACEOF
98418dba 12293#define HAVE_LIBXP 1
c0d27fcc 12294_ACEOF
503d2be0 12295
98418dba 12296 fi
4693dbc9 12297 else
ca81d7a0
JD
12298 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12299echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12300if test "${emacs_cv_lesstif+set}" = set; then
12301 echo $ECHO_N "(cached) $ECHO_C" >&6
12302else
12303 # We put this in CFLAGS temporarily to precede other -I options
12304 # that might be in CFLAGS temporarily.
12305 # We put this in CPPFLAGS where it precedes the other -I options.
12306 OLD_CPPFLAGS=$CPPFLAGS
12307 OLD_CFLAGS=$CFLAGS
12308 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12309 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12310 cat >conftest.$ac_ext <<_ACEOF
12311/* confdefs.h. */
12312_ACEOF
12313cat confdefs.h >>conftest.$ac_ext
12314cat >>conftest.$ac_ext <<_ACEOF
12315/* end confdefs.h. */
12316#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12317int
12318main ()
12319{
12320int x = 5;
12321 ;
12322 return 0;
12323}
12324_ACEOF
12325rm -f conftest.$ac_objext
ca81d7a0
JD
12326if { (ac_try="$ac_compile"
12327case "(($ac_try" in
12328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12329 *) ac_try_echo=$ac_try;;
12330esac
12331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12332 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12333 ac_status=$?
edfaf76d
LK
12334 grep -v '^ *+' conftest.er1 >conftest.err
12335 rm -f conftest.er1
12336 cat conftest.err >&5
4693dbc9 12337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12338 (exit $ac_status); } && {
12339 test -z "$ac_c_werror_flag" ||
12340 test ! -s conftest.err
12341 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12342 emacs_cv_lesstif=yes
12343else
12344 echo "$as_me: failed program was:" >&5
12345sed 's/^/| /' conftest.$ac_ext >&5
12346
ca81d7a0 12347 emacs_cv_lesstif=no
4693dbc9 12348fi
ca81d7a0
JD
12349
12350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12351fi
ca81d7a0
JD
12352{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12353echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12354 if test $emacs_cv_lesstif = yes; then
12355 # Make sure this -I option remains in CPPFLAGS after it is set
12356 # back to REAL_CPPFLAGS.
12357 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12358 # have those other -I options anyway. Ultimately, having this
12359 # directory ultimately in CPPFLAGS will be enough.
12360 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12361 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12362 else
12363 CFLAGS=$OLD_CFLAGS
12364 CPPFLAGS=$OLD_CPPFLAGS
12365 fi
98418dba
CW
12366 fi
12367fi
12368
c0d27fcc
MR
12369
12370
98418dba
CW
12371USE_TOOLKIT_SCROLL_BARS=no
12372if test "${with_toolkit_scroll_bars}" != "no"; then
12373 if test "${USE_X_TOOLKIT}" != "none"; then
12374 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12375 cat >>confdefs.h <<\_ACEOF
98418dba 12376#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12377_ACEOF
98418dba
CW
12378
12379 HAVE_XAW3D=no
12380 USE_TOOLKIT_SCROLL_BARS=yes
12381 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12382 cat >>confdefs.h <<\_ACEOF
98418dba 12383#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12384_ACEOF
98418dba
CW
12385
12386 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12387 fi
488dd4c4
JD
12388 elif test "${HAVE_GTK}" = "yes"; then
12389 cat >>confdefs.h <<\_ACEOF
12390#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12391_ACEOF
12392
12393 USE_TOOLKIT_SCROLL_BARS=yes
12394 elif test "${HAVE_NS}" = "yes"; then
12395 cat >>confdefs.h <<\_ACEOF
12396#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12397_ACEOF
12398
12399 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12400 fi
12401fi
12402
abd39b57 12403cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12404/* confdefs.h. */
12405_ACEOF
12406cat confdefs.h >>conftest.$ac_ext
12407cat >>conftest.$ac_ext <<_ACEOF
12408/* end confdefs.h. */
12409
12410 #include <X11/Xlib.h>
12411 #include <X11/Xresource.h>
12412int
12413main ()
12414{
12415XIMProc callback;
12416 ;
12417 return 0;
12418}
12419_ACEOF
12420rm -f conftest.$ac_objext
ca81d7a0
JD
12421if { (ac_try="$ac_compile"
12422case "(($ac_try" in
12423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12424 *) ac_try_echo=$ac_try;;
12425esac
12426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12427 (eval "$ac_compile") 2>conftest.er1
abd39b57 12428 ac_status=$?
edfaf76d
LK
12429 grep -v '^ *+' conftest.er1 >conftest.err
12430 rm -f conftest.er1
12431 cat conftest.err >&5
abd39b57 12432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12433 (exit $ac_status); } && {
12434 test -z "$ac_c_werror_flag" ||
12435 test ! -s conftest.err
12436 } && test -s conftest.$ac_objext; then
abd39b57
AC
12437 HAVE_XIM=yes
12438
12439cat >>confdefs.h <<\_ACEOF
12440#define HAVE_XIM 1
12441_ACEOF
12442
12443else
12444 echo "$as_me: failed program was:" >&5
12445sed 's/^/| /' conftest.$ac_ext >&5
12446
ca81d7a0 12447 HAVE_XIM=no
abd39b57 12448fi
ca81d7a0
JD
12449
12450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12451
c0d27fcc 12452
98418dba 12453if test "${with_xim}" != "no"; then
b936fae4 12454
c0d27fcc 12455cat >>confdefs.h <<\_ACEOF
98418dba 12456#define USE_XIM 1
c0d27fcc 12457_ACEOF
98418dba 12458
793fa0d7 12459fi
abd39b57
AC
12460
12461
12462if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12463 late_CFLAGS=$CFLAGS
12464 if test "$GCC" = yes; then
12465 CFLAGS="$CFLAGS --pedantic-errors"
12466 fi
cffcede7 12467 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12468/* confdefs.h. */
12469_ACEOF
12470cat confdefs.h >>conftest.$ac_ext
12471cat >>conftest.$ac_ext <<_ACEOF
12472/* end confdefs.h. */
cffcede7
JD
12473
12474#include <X11/Xlib.h>
12475#include <X11/Xresource.h>
12476int
12477main ()
12478{
12479Display *display;
12480XrmDatabase db;
12481char *res_name;
12482char *res_class;
12483XIMProc callback;
12484XPointer *client_data;
849d80cf
DL
12485#ifndef __GNUC__
12486/* If we're not using GCC, it's probably not XFree86, and this is
12487 probably right, but we can't use something like --pedantic-errors. */
12488extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12489 char*, XIMProc, XPointer*);
12490#endif
cffcede7
JD
12491(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12492 client_data);
12493 ;
12494 return 0;
12495}
12496_ACEOF
12497rm -f conftest.$ac_objext
ca81d7a0
JD
12498if { (ac_try="$ac_compile"
12499case "(($ac_try" in
12500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501 *) ac_try_echo=$ac_try;;
12502esac
12503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12504 (eval "$ac_compile") 2>conftest.er1
cffcede7 12505 ac_status=$?
edfaf76d
LK
12506 grep -v '^ *+' conftest.er1 >conftest.err
12507 rm -f conftest.er1
12508 cat conftest.err >&5
cffcede7 12509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12510 (exit $ac_status); } && {
12511 test -z "$ac_c_werror_flag" ||
12512 test ! -s conftest.err
12513 } && test -s conftest.$ac_objext; then
cffcede7
JD
12514 emacs_cv_arg6_star=yes
12515else
12516 echo "$as_me: failed program was:" >&5
19650fd6
AS
12517sed 's/^/| /' conftest.$ac_ext >&5
12518
ca81d7a0 12519
cffcede7 12520fi
ca81d7a0
JD
12521
12522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12523
12524 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12525 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12526#define XRegisterIMInstantiateCallback_arg6 XPointer*
12527_ACEOF
12528
12529 else
f57bd967 12530 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12531#define XRegisterIMInstantiateCallback_arg6 XPointer
12532_ACEOF
12533
12534 fi
849d80cf 12535 CFLAGS=$late_CFLAGS
45a4b03e
KH
12536fi
12537
77dfeef5 12538### Start of font-backend section.
45a4b03e 12539
b8bdd8c9
KH
12540## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12541HAVE_XFT=maybe
12542if test "x${with_freetype}" = "xno"; then
12543 with_xft="no";
12544fi
12545if test "x${with_xft}" != "xno"; then
45a4b03e 12546
45a4b03e
KH
12547
12548 succeeded=no
12549
d235ca2f 12550 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12551set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12552{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12553echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12554if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12555 echo $ECHO_N "(cached) $ECHO_C" >&6
12556else
12557 case $PKG_CONFIG in
12558 [\\/]* | ?:[\\/]*)
12559 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12560 ;;
12561 *)
12562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12563for as_dir in $PATH
12564do
12565 IFS=$as_save_IFS
12566 test -z "$as_dir" && as_dir=.
12567 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12568 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12569 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12570 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12571 break 2
12572 fi
12573done
12574done
c24fa7dc 12575IFS=$as_save_IFS
45a4b03e
KH
12576
12577 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12578 ;;
12579esac
12580fi
12581PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12582if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12583 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12584echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12585else
c24fa7dc
MB
12586 { echo "$as_me:$LINENO: result: no" >&5
12587echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12588fi
12589
c24fa7dc 12590
45a4b03e
KH
12591
12592 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12593 HAVE_XFT=no
45a4b03e
KH
12594 else
12595 PKG_CONFIG_MIN_VERSION=0.9.0
12596 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12597 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12598echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12599
c24fa7dc
MB
12600 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12601 { echo "$as_me:$LINENO: result: yes" >&5
12602echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12603 succeeded=yes
12604
c24fa7dc
MB
12605 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12606echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12607 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12608 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12609echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12610
c24fa7dc
MB
12611 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12612echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12613 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12614 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12615echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12616 else
c24fa7dc
MB
12617 { echo "$as_me:$LINENO: result: no" >&5
12618echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12619 XFT_CFLAGS=""
12620 XFT_LIBS=""
12621 ## If we have a custom action on failure, don't print errors, but
12622 ## do set a variable so people can do so.
12623 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12624
12625 fi
12626
12627
12628
12629 else
12630 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12631 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12632 fi
12633 fi
12634
12635 if test $succeeded = yes; then
12636 :
12637 else
12638 HAVE_XFT=no
12639 fi
12640
b8bdd8c9
KH
12641 if test "$HAVE_XFT" != no; then
12642 OLD_CPPFLAGS="$CPPFLAGS"
12643 OLD_CFLAGS="$CFLAGS"
12644 OLD_LIBS="$LIBS"
12645 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12646 CFLAGS="$CFLAGS $XFT_CFLAGS"
12647 LIBS="$XFT_LIBS $LIBS"
12648 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12649 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12650echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12651if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12652 echo $ECHO_N "(cached) $ECHO_C" >&6
12653fi
c24fa7dc
MB
12654{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12655echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12656else
12657 # Is the header compilable?
c24fa7dc
MB
12658{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12659echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12660cat >conftest.$ac_ext <<_ACEOF
12661/* confdefs.h. */
12662_ACEOF
12663cat confdefs.h >>conftest.$ac_ext
12664cat >>conftest.$ac_ext <<_ACEOF
12665/* end confdefs.h. */
12666$ac_includes_default
12667#include <X11/Xft/Xft.h>
12668_ACEOF
12669rm -f conftest.$ac_objext
c24fa7dc
MB
12670if { (ac_try="$ac_compile"
12671case "(($ac_try" in
12672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12673 *) ac_try_echo=$ac_try;;
12674esac
12675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12676 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12677 ac_status=$?
12678 grep -v '^ *+' conftest.er1 >conftest.err
12679 rm -f conftest.er1
12680 cat conftest.err >&5
12681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12682 (exit $ac_status); } && {
12683 test -z "$ac_c_werror_flag" ||
12684 test ! -s conftest.err
12685 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12686 ac_header_compiler=yes
12687else
12688 echo "$as_me: failed program was:" >&5
12689sed 's/^/| /' conftest.$ac_ext >&5
12690
c24fa7dc 12691 ac_header_compiler=no
45a4b03e 12692fi
c24fa7dc
MB
12693
12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12695{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12696echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12697
12698# Is the header present?
c24fa7dc
MB
12699{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12700echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12701cat >conftest.$ac_ext <<_ACEOF
12702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
12707#include <X11/Xft/Xft.h>
12708_ACEOF
c24fa7dc
MB
12709if { (ac_try="$ac_cpp conftest.$ac_ext"
12710case "(($ac_try" in
12711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12712 *) ac_try_echo=$ac_try;;
12713esac
12714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12715 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12716 ac_status=$?
12717 grep -v '^ *+' conftest.er1 >conftest.err
12718 rm -f conftest.er1
12719 cat conftest.err >&5
12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12721 (exit $ac_status); } >/dev/null && {
12722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12723 test ! -s conftest.err
12724 }; then
45a4b03e
KH
12725 ac_header_preproc=yes
12726else
12727 echo "$as_me: failed program was:" >&5
12728sed 's/^/| /' conftest.$ac_ext >&5
12729
12730 ac_header_preproc=no
12731fi
c24fa7dc 12732
45a4b03e 12733rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12734{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12735echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12736
12737# So? What about this header?
12738case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12739 yes:no: )
12740 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12741echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12742 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12743echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12744 ac_header_preproc=yes
12745 ;;
12746 no:yes:* )
12747 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12748echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12749 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12750echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12751 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12752echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12753 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12754echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12755 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12756echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12757 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12758echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12759
45a4b03e
KH
12760 ;;
12761esac
c24fa7dc
MB
12762{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12763echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12764if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12765 echo $ECHO_N "(cached) $ECHO_C" >&6
12766else
12767 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12768fi
c24fa7dc
MB
12769{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12770echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12771
12772fi
12773if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12774 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12775echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12776if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12777 echo $ECHO_N "(cached) $ECHO_C" >&6
12778else
12779 ac_check_lib_save_LIBS=$LIBS
12780LIBS="-lXft $XFT_LIBS $LIBS"
12781cat >conftest.$ac_ext <<_ACEOF
12782/* confdefs.h. */
12783_ACEOF
12784cat confdefs.h >>conftest.$ac_ext
12785cat >>conftest.$ac_ext <<_ACEOF
12786/* end confdefs.h. */
12787
c24fa7dc
MB
12788/* Override any GCC internal prototype to avoid an error.
12789 Use char because int might match the return type of a GCC
12790 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12791#ifdef __cplusplus
12792extern "C"
12793#endif
45a4b03e
KH
12794char XftFontOpen ();
12795int
12796main ()
12797{
c24fa7dc 12798return XftFontOpen ();
45a4b03e
KH
12799 ;
12800 return 0;
12801}
12802_ACEOF
12803rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12804if { (ac_try="$ac_link"
12805case "(($ac_try" in
12806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12807 *) ac_try_echo=$ac_try;;
12808esac
12809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12810 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12811 ac_status=$?
12812 grep -v '^ *+' conftest.er1 >conftest.err
12813 rm -f conftest.er1
12814 cat conftest.err >&5
12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12816 (exit $ac_status); } && {
12817 test -z "$ac_c_werror_flag" ||
12818 test ! -s conftest.err
12819 } && test -s conftest$ac_exeext &&
12820 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12821 ac_cv_lib_Xft_XftFontOpen=yes
12822else
12823 echo "$as_me: failed program was:" >&5
12824sed 's/^/| /' conftest.$ac_ext >&5
12825
c24fa7dc 12826 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12827fi
c24fa7dc
MB
12828
12829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12830 conftest$ac_exeext conftest.$ac_ext
12831LIBS=$ac_check_lib_save_LIBS
12832fi
c24fa7dc
MB
12833{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12834echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12835if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12836 HAVE_XFT=yes
12837fi
12838
12839fi
12840
12841
12842
b8bdd8c9 12843 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12844
12845cat >>confdefs.h <<\_ACEOF
12846#define HAVE_XFT 1
12847_ACEOF
12848
12849
b8bdd8c9
KH
12850 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12851 else
12852 CPPFLAGS="$OLD_CPPFLAGS"
12853 CFLAGS="$OLD_CFLAGS"
12854 LIBS="$OLD_LIBS"
12855 fi # "${HAVE_XFT}" = "yes"
12856 fi # "$HAVE_XFT" != no
12857fi # "x${with_xft}" != "xno"
2ee27f27 12858
b8bdd8c9
KH
12859if test "$HAVE_XFT" != "yes"; then
12860 HAVE_XFT=no
12861fi
45a4b03e 12862
b8bdd8c9
KH
12863
12864HAVE_FREETYPE=no
12865### Use -lfreetype if available, unless `--with-freetype=no'.
12866if test "${HAVE_XFT}" = "yes"; then
12867 HAVE_FREETYPE=yes
12868elif test "x${with_freetype}" != "xno"; then
45a4b03e 12869
d235ca2f 12870
45a4b03e
KH
12871 succeeded=no
12872
d235ca2f 12873 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12874set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12875{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12876echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12877if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12878 echo $ECHO_N "(cached) $ECHO_C" >&6
12879else
12880 case $PKG_CONFIG in
12881 [\\/]* | ?:[\\/]*)
12882 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12883 ;;
12884 *)
12885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12886for as_dir in $PATH
12887do
12888 IFS=$as_save_IFS
12889 test -z "$as_dir" && as_dir=.
12890 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12891 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12892 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12893 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12894 break 2
12895 fi
12896done
12897done
c24fa7dc 12898IFS=$as_save_IFS
45a4b03e
KH
12899
12900 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12901 ;;
12902esac
12903fi
12904PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12905if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12906 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12907echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12908else
c24fa7dc
MB
12909 { echo "$as_me:$LINENO: result: no" >&5
12910echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12911fi
12912
c24fa7dc 12913
45a4b03e
KH
12914
12915 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12916 HAVE_FREETYPE=no
45a4b03e
KH
12917 else
12918 PKG_CONFIG_MIN_VERSION=0.9.0
12919 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12920 { echo "$as_me:$LINENO: checking for freetype2" >&5
12921echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 12922
c24fa7dc
MB
12923 if $PKG_CONFIG --exists "freetype2" 2>&5; then
12924 { echo "$as_me:$LINENO: result: yes" >&5
12925echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12926 succeeded=yes
12927
c24fa7dc
MB
12928 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
12929echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 12930 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12931 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
12932echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 12933
c24fa7dc
MB
12934 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
12935echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 12936 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12937 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
12938echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 12939 else
c24fa7dc
MB
12940 { echo "$as_me:$LINENO: result: no" >&5
12941echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12942 FREETYPE_CFLAGS=""
12943 FREETYPE_LIBS=""
12944 ## If we have a custom action on failure, don't print errors, but
12945 ## do set a variable so people can do so.
12946 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
12947
12948 fi
12949
12950
12951
12952 else
12953 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12954 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12955 fi
12956 fi
12957
12958 if test $succeeded = yes; then
12959 HAVE_FREETYPE=yes
12960 else
12961 HAVE_FREETYPE=no
12962 fi
12963
b8bdd8c9 12964 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
12965
12966 succeeded=no
12967
d235ca2f 12968 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12969set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12970{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12972if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12973 echo $ECHO_N "(cached) $ECHO_C" >&6
12974else
12975 case $PKG_CONFIG in
12976 [\\/]* | ?:[\\/]*)
12977 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12978 ;;
12979 *)
12980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12981for as_dir in $PATH
12982do
12983 IFS=$as_save_IFS
12984 test -z "$as_dir" && as_dir=.
12985 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12987 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12988 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12989 break 2
12990 fi
12991done
12992done
c24fa7dc 12993IFS=$as_save_IFS
45a4b03e
KH
12994
12995 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12996 ;;
12997esac
12998fi
12999PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13000if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13001 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13002echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13003else
c24fa7dc
MB
13004 { echo "$as_me:$LINENO: result: no" >&5
13005echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13006fi
13007
c24fa7dc 13008
45a4b03e
KH
13009
13010 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13011 HAVE_FC=no
45a4b03e
KH
13012 else
13013 PKG_CONFIG_MIN_VERSION=0.9.0
13014 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13015 { echo "$as_me:$LINENO: checking for fontconfig" >&5
13016echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 13017
c24fa7dc
MB
13018 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
13019 { echo "$as_me:$LINENO: result: yes" >&5
13020echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13021 succeeded=yes
13022
c24fa7dc
MB
13023 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
13024echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 13025 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13026 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
13027echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 13028
c24fa7dc
MB
13029 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
13030echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 13031 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13032 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
13033echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 13034 else
c24fa7dc
MB
13035 { echo "$as_me:$LINENO: result: no" >&5
13036echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13037 FONTCONFIG_CFLAGS=""
13038 FONTCONFIG_LIBS=""
13039 ## If we have a custom action on failure, don't print errors, but
13040 ## do set a variable so people can do so.
13041 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
13042
13043 fi
13044
13045
13046
13047 else
13048 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13049 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13050 fi
13051 fi
13052
13053 if test $succeeded = yes; then
13054 HAVE_FC=yes
13055 else
13056 HAVE_FC=no
13057 fi
13058
b8bdd8c9
KH
13059 if test "${HAVE_FC}" = "no"; then
13060 HAVE_FREETYPE=no
45a4b03e
KH
13061 fi
13062 fi
b8bdd8c9 13063fi
e70b2110 13064
b8bdd8c9
KH
13065HAVE_LIBOTF=no
13066if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13067
13068cat >>confdefs.h <<\_ACEOF
13069#define HAVE_FREETYPE 1
13070_ACEOF
13071
b8bdd8c9 13072 if test "${with_libotf}" != "no"; then
e70b2110
KH
13073
13074 succeeded=no
13075
d235ca2f 13076 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13077set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13078{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13079echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13080if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13081 echo $ECHO_N "(cached) $ECHO_C" >&6
13082else
e70b2110
KH
13083 case $PKG_CONFIG in
13084 [\\/]* | ?:[\\/]*)
13085 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13086 ;;
13087 *)
13088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13089for as_dir in $PATH
13090do
13091 IFS=$as_save_IFS
13092 test -z "$as_dir" && as_dir=.
13093 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13095 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13096 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13097 break 2
13098 fi
13099done
13100done
c24fa7dc 13101IFS=$as_save_IFS
45a4b03e 13102
e70b2110
KH
13103 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13104 ;;
13105esac
45a4b03e 13106fi
e70b2110
KH
13107PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13108if test -n "$PKG_CONFIG"; then
13109 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13110echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13111else
c24fa7dc
MB
13112 { echo "$as_me:$LINENO: result: no" >&5
13113echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13114fi
13115
c24fa7dc 13116
45a4b03e 13117
e70b2110 13118 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13119 HAVE_LIBOTF=no
e70b2110
KH
13120 else
13121 PKG_CONFIG_MIN_VERSION=0.9.0
13122 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13123 { echo "$as_me:$LINENO: checking for libotf" >&5
13124echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13125
e70b2110
KH
13126 if $PKG_CONFIG --exists "libotf" 2>&5; then
13127 { echo "$as_me:$LINENO: result: yes" >&5
13128echo "${ECHO_T}yes" >&6; }
13129 succeeded=yes
6ed29d7b 13130
e70b2110
KH
13131 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13132echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13133 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13134 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13135echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13136
13137 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13138echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13139 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13140 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13141echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13142 else
13143 { echo "$as_me:$LINENO: result: no" >&5
13144echo "${ECHO_T}no" >&6; }
13145 LIBOTF_CFLAGS=""
13146 LIBOTF_LIBS=""
13147 ## If we have a custom action on failure, don't print errors, but
13148 ## do set a variable so people can do so.
13149 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13150
e70b2110 13151 fi
6ed29d7b 13152
6ed29d7b 13153
6ed29d7b 13154
e70b2110
KH
13155 else
13156 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13157 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13158 fi
13159 fi
13160
13161 if test $succeeded = yes; then
435f8bc5 13162 HAVE_LIBOTF=yes
e70b2110 13163 else
435f8bc5 13164 HAVE_LIBOTF=no
e70b2110
KH
13165 fi
13166
b8bdd8c9 13167 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13168
45a4b03e
KH
13169cat >>confdefs.h <<\_ACEOF
13170#define HAVE_LIBOTF 1
13171_ACEOF
13172
6ed29d7b 13173 fi
45a4b03e 13174 fi
b8bdd8c9 13175fi
45a4b03e 13176
b8bdd8c9
KH
13177HAVE_M17N_FLT=no
13178if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13179
13180 succeeded=no
13181
d235ca2f 13182 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13183set dummy pkg-config; ac_word=$2
13184{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13185echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13186if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13187 echo $ECHO_N "(cached) $ECHO_C" >&6
13188else
13189 case $PKG_CONFIG in
13190 [\\/]* | ?:[\\/]*)
13191 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13192 ;;
13193 *)
13194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13195for as_dir in $PATH
13196do
13197 IFS=$as_save_IFS
13198 test -z "$as_dir" && as_dir=.
13199 for ac_exec_ext in '' $ac_executable_extensions; do
13200 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13201 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13202 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13203 break 2
13204 fi
13205done
13206done
13207IFS=$as_save_IFS
13208
13209 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13210 ;;
13211esac
13212fi
13213PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13214if test -n "$PKG_CONFIG"; then
13215 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13216echo "${ECHO_T}$PKG_CONFIG" >&6; }
13217else
13218 { echo "$as_me:$LINENO: result: no" >&5
13219echo "${ECHO_T}no" >&6; }
13220fi
13221
13222
7f0942ba
KH
13223
13224 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13225 HAVE_M17N_FLT=no
7f0942ba
KH
13226 else
13227 PKG_CONFIG_MIN_VERSION=0.9.0
13228 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13229 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13230echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13231
13232 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13233 { echo "$as_me:$LINENO: result: yes" >&5
13234echo "${ECHO_T}yes" >&6; }
13235 succeeded=yes
13236
13237 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13238echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13239 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13240 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13241echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13242
13243 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13244echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13245 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13246 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13247echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13248 else
13249 { echo "$as_me:$LINENO: result: no" >&5
13250echo "${ECHO_T}no" >&6; }
13251 M17N_FLT_CFLAGS=""
13252 M17N_FLT_LIBS=""
13253 ## If we have a custom action on failure, don't print errors, but
13254 ## do set a variable so people can do so.
13255 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13256
13257 fi
13258
13259
13260
13261 else
13262 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13263 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13264 fi
13265 fi
13266
13267 if test $succeeded = yes; then
435f8bc5 13268 HAVE_M17N_FLT=yes
7f0942ba 13269 else
435f8bc5 13270 HAVE_M17N_FLT=no
7f0942ba
KH
13271 fi
13272
b8bdd8c9 13273 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13274
13275cat >>confdefs.h <<\_ACEOF
13276#define HAVE_M17N_FLT 1
13277_ACEOF
13278
e70b2110 13279 fi
b8bdd8c9 13280fi
e70b2110
KH
13281
13282
13283
13284
13285
13286
13287
7f0942ba
KH
13288
13289
7f0942ba 13290
77dfeef5 13291### End of font-backend section.
98418dba
CW
13292
13293### Use -lXpm if available, unless `--with-xpm=no'.
13294HAVE_XPM=no
13295if test "${HAVE_X11}" = "yes"; then
13296 if test "${with_xpm}" != "no"; then
c0d27fcc 13297 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13298 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13299echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13300if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13301 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13302fi
4c34eeee
MB
13303{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13304echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13305else
c0d27fcc 13306 # Is the header compilable?
4c34eeee
MB
13307{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13308echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13309cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13310/* confdefs.h. */
13311_ACEOF
13312cat confdefs.h >>conftest.$ac_ext
13313cat >>conftest.$ac_ext <<_ACEOF
13314/* end confdefs.h. */
c0d27fcc
MR
13315$ac_includes_default
13316#include <X11/xpm.h>
13317_ACEOF
13318rm -f conftest.$ac_objext
4c34eeee
MB
13319if { (ac_try="$ac_compile"
13320case "(($ac_try" in
13321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13322 *) ac_try_echo=$ac_try;;
13323esac
13324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13325 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13326 ac_status=$?
edfaf76d
LK
13327 grep -v '^ *+' conftest.er1 >conftest.err
13328 rm -f conftest.er1
13329 cat conftest.err >&5
c0d27fcc 13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13331 (exit $ac_status); } && {
13332 test -z "$ac_c_werror_flag" ||
13333 test ! -s conftest.err
13334 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13335 ac_header_compiler=yes
13336else
13337 echo "$as_me: failed program was:" >&5
19650fd6
AS
13338sed 's/^/| /' conftest.$ac_ext >&5
13339
4c34eeee 13340 ac_header_compiler=no
c0d27fcc 13341fi
4c34eeee
MB
13342
13343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13344{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13345echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13346
13347# Is the header present?
4c34eeee
MB
13348{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13349echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13350cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13351/* confdefs.h. */
13352_ACEOF
13353cat confdefs.h >>conftest.$ac_ext
13354cat >>conftest.$ac_ext <<_ACEOF
13355/* end confdefs.h. */
98418dba
CW
13356#include <X11/xpm.h>
13357_ACEOF
4c34eeee
MB
13358if { (ac_try="$ac_cpp conftest.$ac_ext"
13359case "(($ac_try" in
13360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13361 *) ac_try_echo=$ac_try;;
13362esac
13363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13364 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13365 ac_status=$?
6bae0ccf 13366 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13367 rm -f conftest.er1
13368 cat conftest.err >&5
c0d27fcc 13369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13370 (exit $ac_status); } >/dev/null && {
13371 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13372 test ! -s conftest.err
13373 }; then
c0d27fcc 13374 ac_header_preproc=yes
98418dba
CW
13375else
13376 echo "$as_me: failed program was:" >&5
19650fd6
AS
13377sed 's/^/| /' conftest.$ac_ext >&5
13378
c0d27fcc 13379 ac_header_preproc=no
98418dba 13380fi
4c34eeee 13381
98418dba 13382rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13383{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13384echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13385
13386# So? What about this header?
edfaf76d
LK
13387case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13388 yes:no: )
c0d27fcc
MR
13389 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13390echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13391 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13392echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13393 ac_header_preproc=yes
13394 ;;
13395 no:yes:* )
13396 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13397echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13398 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13399echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13400 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13401echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13402 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13403echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13404 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13405echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13406 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13407echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13408
19650fd6 13409 ;;
c0d27fcc 13410esac
4c34eeee
MB
13411{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13412echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13413if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13414 echo $ECHO_N "(cached) $ECHO_C" >&6
13415else
13416 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13417fi
4c34eeee
MB
13418{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13419echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13420
13421fi
98418dba 13422if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13423 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13424echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13425if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13426 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13427else
98418dba
CW
13428 ac_check_lib_save_LIBS=$LIBS
13429LIBS="-lXpm -lX11 $LIBS"
13430cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13431/* confdefs.h. */
13432_ACEOF
13433cat confdefs.h >>conftest.$ac_ext
13434cat >>conftest.$ac_ext <<_ACEOF
13435/* end confdefs.h. */
98418dba 13436
4c34eeee
MB
13437/* Override any GCC internal prototype to avoid an error.
13438 Use char because int might match the return type of a GCC
13439 builtin and then its argument prototype would still apply. */
503d2be0
AS
13440#ifdef __cplusplus
13441extern "C"
13442#endif
98418dba 13443char XpmReadFileToPixmap ();
503d2be0
AS
13444int
13445main ()
13446{
4c34eeee 13447return XpmReadFileToPixmap ();
503d2be0
AS
13448 ;
13449 return 0;
13450}
13451_ACEOF
13452rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13453if { (ac_try="$ac_link"
13454case "(($ac_try" in
13455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13456 *) ac_try_echo=$ac_try;;
13457esac
13458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13459 (eval "$ac_link") 2>conftest.er1
503d2be0 13460 ac_status=$?
edfaf76d
LK
13461 grep -v '^ *+' conftest.er1 >conftest.err
13462 rm -f conftest.er1
13463 cat conftest.err >&5
c0d27fcc 13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13465 (exit $ac_status); } && {
13466 test -z "$ac_c_werror_flag" ||
13467 test ! -s conftest.err
13468 } && test -s conftest$ac_exeext &&
13469 $as_test_x conftest$ac_exeext; then
98418dba 13470 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13471else
13472 echo "$as_me: failed program was:" >&5
19650fd6
AS
13473sed 's/^/| /' conftest.$ac_ext >&5
13474
4c34eeee 13475 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13476fi
4c34eeee
MB
13477
13478rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13479 conftest$ac_exeext conftest.$ac_ext
98418dba 13480LIBS=$ac_check_lib_save_LIBS
503d2be0 13481fi
4c34eeee
MB
13482{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13483echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13484if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13485 HAVE_XPM=yes
ba4481b5
DL
13486fi
13487
98418dba
CW
13488fi
13489
c0d27fcc 13490
98418dba 13491 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13492 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13493echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13494 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13495/* confdefs.h. */
13496_ACEOF
13497cat confdefs.h >>conftest.$ac_ext
13498cat >>conftest.$ac_ext <<_ACEOF
13499/* end confdefs.h. */
98418dba
CW
13500#include "X11/xpm.h"
13501#ifndef XpmReturnAllocPixels
13502no_return_alloc_pixels
503d2be0 13503#endif
ba4481b5 13504
98418dba
CW
13505_ACEOF
13506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13507 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13508 HAVE_XPM=no
13509else
13510 HAVE_XPM=yes
13511fi
13512rm -f conftest*
ba4481b5 13513
c0d27fcc 13514
98418dba 13515 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13516 { echo "$as_me:$LINENO: result: yes" >&5
13517echo "${ECHO_T}yes" >&6; }
98418dba 13518 else
4c34eeee
MB
13519 { echo "$as_me:$LINENO: result: no" >&5
13520echo "${ECHO_T}no" >&6; }
98418dba
CW
13521 fi
13522 fi
13523 fi
13524
13525 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13526
c0d27fcc 13527cat >>confdefs.h <<\_ACEOF
98418dba 13528#define HAVE_XPM 1
c0d27fcc 13529_ACEOF
98418dba
CW
13530
13531 fi
13532fi
13533
13534### Use -ljpeg if available, unless `--with-jpeg=no'.
13535HAVE_JPEG=no
13536if test "${HAVE_X11}" = "yes"; then
13537 if test "${with_jpeg}" != "no"; then
c0d27fcc 13538 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13539 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13540echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13541if test "${ac_cv_header_jerror_h+set}" = set; then
13542 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13543fi
ca81d7a0
JD
13544{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13545echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13546else
c0d27fcc 13547 # Is the header compilable?
ca81d7a0
JD
13548{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13549echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13550cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13551/* confdefs.h. */
13552_ACEOF
13553cat confdefs.h >>conftest.$ac_ext
13554cat >>conftest.$ac_ext <<_ACEOF
13555/* end confdefs.h. */
c0d27fcc
MR
13556$ac_includes_default
13557#include <jerror.h>
13558_ACEOF
13559rm -f conftest.$ac_objext
ca81d7a0
JD
13560if { (ac_try="$ac_compile"
13561case "(($ac_try" in
13562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13563 *) ac_try_echo=$ac_try;;
13564esac
13565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13566 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13567 ac_status=$?
edfaf76d
LK
13568 grep -v '^ *+' conftest.er1 >conftest.err
13569 rm -f conftest.er1
13570 cat conftest.err >&5
c0d27fcc 13571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13572 (exit $ac_status); } && {
13573 test -z "$ac_c_werror_flag" ||
13574 test ! -s conftest.err
13575 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13576 ac_header_compiler=yes
13577else
13578 echo "$as_me: failed program was:" >&5
19650fd6
AS
13579sed 's/^/| /' conftest.$ac_ext >&5
13580
ca81d7a0 13581 ac_header_compiler=no
c0d27fcc 13582fi
ca81d7a0
JD
13583
13584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13586echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13587
13588# Is the header present?
ca81d7a0
JD
13589{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13590echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13591cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13592/* confdefs.h. */
13593_ACEOF
13594cat confdefs.h >>conftest.$ac_ext
13595cat >>conftest.$ac_ext <<_ACEOF
13596/* end confdefs.h. */
98418dba
CW
13597#include <jerror.h>
13598_ACEOF
ca81d7a0
JD
13599if { (ac_try="$ac_cpp conftest.$ac_ext"
13600case "(($ac_try" in
13601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13602 *) ac_try_echo=$ac_try;;
13603esac
13604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13606 ac_status=$?
6bae0ccf 13607 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13608 rm -f conftest.er1
13609 cat conftest.err >&5
c0d27fcc 13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13611 (exit $ac_status); } >/dev/null && {
13612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13613 test ! -s conftest.err
13614 }; then
c0d27fcc 13615 ac_header_preproc=yes
ba4481b5 13616else
98418dba 13617 echo "$as_me: failed program was:" >&5
19650fd6
AS
13618sed 's/^/| /' conftest.$ac_ext >&5
13619
c0d27fcc 13620 ac_header_preproc=no
98418dba 13621fi
ca81d7a0 13622
98418dba 13623rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13624{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13625echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13626
13627# So? What about this header?
edfaf76d
LK
13628case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13629 yes:no: )
c0d27fcc
MR
13630 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13631echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13632 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13633echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13634 ac_header_preproc=yes
19650fd6 13635 ;;
edfaf76d 13636 no:yes:* )
c0d27fcc
MR
13637 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13638echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13639 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13640echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13641 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13642echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13643 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13644echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13645 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13646echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13647 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13648echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13649
19650fd6 13650 ;;
c0d27fcc 13651esac
ca81d7a0
JD
13652{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13653echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13654if test "${ac_cv_header_jerror_h+set}" = set; then
13655 echo $ECHO_N "(cached) $ECHO_C" >&6
13656else
13657 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13658fi
ca81d7a0
JD
13659{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13660echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13661
13662fi
98418dba 13663if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13664 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13665echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13666if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13667 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13668else
98418dba
CW
13669 ac_check_lib_save_LIBS=$LIBS
13670LIBS="-ljpeg $LIBS"
13671cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13672/* confdefs.h. */
13673_ACEOF
13674cat confdefs.h >>conftest.$ac_ext
13675cat >>conftest.$ac_ext <<_ACEOF
13676/* end confdefs.h. */
98418dba 13677
ca81d7a0
JD
13678/* Override any GCC internal prototype to avoid an error.
13679 Use char because int might match the return type of a GCC
13680 builtin and then its argument prototype would still apply. */
98418dba
CW
13681#ifdef __cplusplus
13682extern "C"
13683#endif
98418dba 13684char jpeg_destroy_compress ();
503d2be0
AS
13685int
13686main ()
13687{
ca81d7a0 13688return jpeg_destroy_compress ();
503d2be0
AS
13689 ;
13690 return 0;
13691}
13692_ACEOF
13693rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13694if { (ac_try="$ac_link"
13695case "(($ac_try" in
13696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13697 *) ac_try_echo=$ac_try;;
13698esac
13699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13700 (eval "$ac_link") 2>conftest.er1
503d2be0 13701 ac_status=$?
edfaf76d
LK
13702 grep -v '^ *+' conftest.er1 >conftest.err
13703 rm -f conftest.er1
13704 cat conftest.err >&5
c0d27fcc 13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13706 (exit $ac_status); } && {
13707 test -z "$ac_c_werror_flag" ||
13708 test ! -s conftest.err
13709 } && test -s conftest$ac_exeext &&
13710 $as_test_x conftest$ac_exeext; then
98418dba 13711 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13712else
503d2be0 13713 echo "$as_me: failed program was:" >&5
19650fd6
AS
13714sed 's/^/| /' conftest.$ac_ext >&5
13715
ca81d7a0 13716 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13717fi
ca81d7a0 13718
f053c89f 13719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13720 conftest$ac_exeext conftest.$ac_ext
98418dba 13721LIBS=$ac_check_lib_save_LIBS
ba4481b5 13722fi
ca81d7a0
JD
13723{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13724echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13725if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13726 HAVE_JPEG=yes
ba4481b5 13727fi
98418dba 13728
ba4481b5 13729fi
98418dba 13730
c0d27fcc 13731
ba4481b5 13732 fi
ba4481b5 13733
c0d27fcc 13734
98418dba 13735 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13736 cat >>confdefs.h <<\_ACEOF
98418dba 13737#define HAVE_JPEG 1
c0d27fcc 13738_ACEOF
98418dba
CW
13739
13740 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13741/* confdefs.h. */
13742_ACEOF
13743cat confdefs.h >>conftest.$ac_ext
13744cat >>conftest.$ac_ext <<_ACEOF
13745/* end confdefs.h. */
22044edf 13746#include <jpeglib.h>
98418dba
CW
13747 version=JPEG_LIB_VERSION
13748
13749_ACEOF
13750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13751 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13752 cat >>confdefs.h <<\_ACEOF
98418dba 13753#define HAVE_JPEG 1
c0d27fcc 13754_ACEOF
ba4481b5 13755
98418dba 13756else
c0d27fcc 13757 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13758echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13759 HAVE_JPEG=no
ba4481b5 13760fi
98418dba 13761rm -f conftest*
ba4481b5 13762
98418dba
CW
13763 fi
13764fi
503d2be0 13765
98418dba
CW
13766### Use -lpng if available, unless `--with-png=no'.
13767HAVE_PNG=no
13768if test "${HAVE_X11}" = "yes"; then
13769 if test "${with_png}" != "no"; then
f57bd967
DL
13770 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13771 # in /usr/include/libpng.
13772
13773
13774for ac_header in png.h libpng/png.h
13775do
13776as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13777if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13778 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13779echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13780if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13781 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13782fi
ca81d7a0
JD
13783ac_res=`eval echo '${'$as_ac_Header'}'`
13784 { echo "$as_me:$LINENO: result: $ac_res" >&5
13785echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13786else
c0d27fcc 13787 # Is the header compilable?
ca81d7a0
JD
13788{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13789echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13790cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13791/* confdefs.h. */
13792_ACEOF
13793cat confdefs.h >>conftest.$ac_ext
13794cat >>conftest.$ac_ext <<_ACEOF
13795/* end confdefs.h. */
c0d27fcc 13796$ac_includes_default
f57bd967 13797#include <$ac_header>
c0d27fcc
MR
13798_ACEOF
13799rm -f conftest.$ac_objext
ca81d7a0
JD
13800if { (ac_try="$ac_compile"
13801case "(($ac_try" in
13802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13803 *) ac_try_echo=$ac_try;;
13804esac
13805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13806 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13807 ac_status=$?
edfaf76d
LK
13808 grep -v '^ *+' conftest.er1 >conftest.err
13809 rm -f conftest.er1
13810 cat conftest.err >&5
c0d27fcc 13811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13812 (exit $ac_status); } && {
13813 test -z "$ac_c_werror_flag" ||
13814 test ! -s conftest.err
13815 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13816 ac_header_compiler=yes
13817else
13818 echo "$as_me: failed program was:" >&5
19650fd6
AS
13819sed 's/^/| /' conftest.$ac_ext >&5
13820
ca81d7a0 13821 ac_header_compiler=no
c0d27fcc 13822fi
ca81d7a0
JD
13823
13824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13825{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13826echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13827
13828# Is the header present?
ca81d7a0
JD
13829{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13830echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13831cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13832/* confdefs.h. */
13833_ACEOF
13834cat confdefs.h >>conftest.$ac_ext
13835cat >>conftest.$ac_ext <<_ACEOF
13836/* end confdefs.h. */
f57bd967 13837#include <$ac_header>
503d2be0 13838_ACEOF
ca81d7a0
JD
13839if { (ac_try="$ac_cpp conftest.$ac_ext"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
13844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13845 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13846 ac_status=$?
6bae0ccf 13847 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13848 rm -f conftest.er1
13849 cat conftest.err >&5
c0d27fcc 13850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13851 (exit $ac_status); } >/dev/null && {
13852 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13853 test ! -s conftest.err
13854 }; then
c0d27fcc 13855 ac_header_preproc=yes
503d2be0
AS
13856else
13857 echo "$as_me: failed program was:" >&5
19650fd6
AS
13858sed 's/^/| /' conftest.$ac_ext >&5
13859
c0d27fcc 13860 ac_header_preproc=no
ba4481b5 13861fi
ca81d7a0 13862
503d2be0 13863rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13864{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13865echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13866
13867# So? What about this header?
edfaf76d
LK
13868case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13869 yes:no: )
f57bd967
DL
13870 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13871echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13872 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13873echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13874 ac_header_preproc=yes
19650fd6 13875 ;;
edfaf76d 13876 no:yes:* )
f57bd967
DL
13877 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13878echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13879 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13880echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13881 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13882echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13883 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13884echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13885 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13886echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13887 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13888echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13889
19650fd6 13890 ;;
c0d27fcc 13891esac
ca81d7a0
JD
13892{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13893echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13894if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13895 echo $ECHO_N "(cached) $ECHO_C" >&6
13896else
edfaf76d 13897 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13898fi
ca81d7a0
JD
13899ac_res=`eval echo '${'$as_ac_Header'}'`
13900 { echo "$as_me:$LINENO: result: $ac_res" >&5
13901echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13902
ba4481b5 13903fi
f57bd967
DL
13904if test `eval echo '${'$as_ac_Header'}'` = yes; then
13905 cat >>confdefs.h <<_ACEOF
13906#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13907_ACEOF
c0d27fcc
MR
13908
13909fi
f57bd967
DL
13910
13911done
13912
13913 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13914 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13915echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13916if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13917 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13918else
98418dba
CW
13919 ac_check_lib_save_LIBS=$LIBS
13920LIBS="-lpng -lz -lm $LIBS"
13921cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13922/* confdefs.h. */
13923_ACEOF
13924cat confdefs.h >>conftest.$ac_ext
13925cat >>conftest.$ac_ext <<_ACEOF
13926/* end confdefs.h. */
98418dba 13927
ca81d7a0
JD
13928/* Override any GCC internal prototype to avoid an error.
13929 Use char because int might match the return type of a GCC
13930 builtin and then its argument prototype would still apply. */
503d2be0
AS
13931#ifdef __cplusplus
13932extern "C"
13933#endif
98418dba 13934char png_get_channels ();
503d2be0
AS
13935int
13936main ()
13937{
ca81d7a0 13938return png_get_channels ();
503d2be0
AS
13939 ;
13940 return 0;
13941}
13942_ACEOF
13943rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13944if { (ac_try="$ac_link"
13945case "(($ac_try" in
13946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13947 *) ac_try_echo=$ac_try;;
13948esac
13949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13950 (eval "$ac_link") 2>conftest.er1
503d2be0 13951 ac_status=$?
edfaf76d
LK
13952 grep -v '^ *+' conftest.er1 >conftest.err
13953 rm -f conftest.er1
13954 cat conftest.err >&5
c0d27fcc 13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13956 (exit $ac_status); } && {
13957 test -z "$ac_c_werror_flag" ||
13958 test ! -s conftest.err
13959 } && test -s conftest$ac_exeext &&
13960 $as_test_x conftest$ac_exeext; then
98418dba 13961 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13962else
98418dba 13963 echo "$as_me: failed program was:" >&5
19650fd6
AS
13964sed 's/^/| /' conftest.$ac_ext >&5
13965
ca81d7a0 13966 ac_cv_lib_png_png_get_channels=no
73b77ee5 13967fi
ca81d7a0 13968
f053c89f 13969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13970 conftest$ac_exeext conftest.$ac_ext
98418dba 13971LIBS=$ac_check_lib_save_LIBS
73b77ee5 13972fi
ca81d7a0
JD
13973{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13974echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13975if test $ac_cv_lib_png_png_get_channels = yes; then
13976 HAVE_PNG=yes
73b77ee5 13977fi
503d2be0 13978
f57bd967 13979 fi
98418dba
CW
13980 fi
13981
13982 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13983
c0d27fcc 13984cat >>confdefs.h <<\_ACEOF
98418dba 13985#define HAVE_PNG 1
c0d27fcc 13986_ACEOF
73b77ee5 13987
98418dba 13988 fi
73b77ee5
GM
13989fi
13990
98418dba
CW
13991### Use -ltiff if available, unless `--with-tiff=no'.
13992HAVE_TIFF=no
13993if test "${HAVE_X11}" = "yes"; then
13994 if test "${with_tiff}" != "no"; then
c0d27fcc 13995 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13996 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13997echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13998if test "${ac_cv_header_tiffio_h+set}" = set; then
13999 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14000fi
ca81d7a0
JD
14001{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14002echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14003else
c0d27fcc 14004 # Is the header compilable?
ca81d7a0
JD
14005{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14006echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14007cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
c0d27fcc
MR
14013$ac_includes_default
14014#include <tiffio.h>
14015_ACEOF
14016rm -f conftest.$ac_objext
ca81d7a0
JD
14017if { (ac_try="$ac_compile"
14018case "(($ac_try" in
14019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14020 *) ac_try_echo=$ac_try;;
14021esac
14022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14023 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14024 ac_status=$?
edfaf76d
LK
14025 grep -v '^ *+' conftest.er1 >conftest.err
14026 rm -f conftest.er1
14027 cat conftest.err >&5
c0d27fcc 14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14029 (exit $ac_status); } && {
14030 test -z "$ac_c_werror_flag" ||
14031 test ! -s conftest.err
14032 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14033 ac_header_compiler=yes
14034else
14035 echo "$as_me: failed program was:" >&5
19650fd6
AS
14036sed 's/^/| /' conftest.$ac_ext >&5
14037
ca81d7a0 14038 ac_header_compiler=no
c0d27fcc 14039fi
ca81d7a0
JD
14040
14041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14042{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14043echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14044
14045# Is the header present?
ca81d7a0
JD
14046{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14047echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14048cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14049/* confdefs.h. */
14050_ACEOF
14051cat confdefs.h >>conftest.$ac_ext
14052cat >>conftest.$ac_ext <<_ACEOF
14053/* end confdefs.h. */
98418dba
CW
14054#include <tiffio.h>
14055_ACEOF
ca81d7a0
JD
14056if { (ac_try="$ac_cpp conftest.$ac_ext"
14057case "(($ac_try" in
14058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14059 *) ac_try_echo=$ac_try;;
14060esac
14061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14062 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14063 ac_status=$?
6bae0ccf 14064 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14065 rm -f conftest.er1
14066 cat conftest.err >&5
c0d27fcc 14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14068 (exit $ac_status); } >/dev/null && {
14069 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14070 test ! -s conftest.err
14071 }; then
c0d27fcc 14072 ac_header_preproc=yes
98418dba
CW
14073else
14074 echo "$as_me: failed program was:" >&5
19650fd6
AS
14075sed 's/^/| /' conftest.$ac_ext >&5
14076
c0d27fcc 14077 ac_header_preproc=no
98418dba 14078fi
ca81d7a0 14079
98418dba 14080rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14081{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14082echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14083
14084# So? What about this header?
edfaf76d
LK
14085case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14086 yes:no: )
c0d27fcc
MR
14087 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14088echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14089 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14090echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14091 ac_header_preproc=yes
19650fd6 14092 ;;
edfaf76d 14093 no:yes:* )
c0d27fcc
MR
14094 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14095echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14096 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14097echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14098 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14099echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14100 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14101echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14102 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14103echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14104 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14105echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14106
19650fd6 14107 ;;
c0d27fcc 14108esac
ca81d7a0
JD
14109{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14110echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14111if test "${ac_cv_header_tiffio_h+set}" = set; then
14112 echo $ECHO_N "(cached) $ECHO_C" >&6
14113else
14114 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14115fi
ca81d7a0
JD
14116{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14117echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14118
14119fi
98418dba
CW
14120if test $ac_cv_header_tiffio_h = yes; then
14121 tifflibs="-lz -lm"
14122 # At least one tiff package requires the jpeg library.
14123 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14124 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14125echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14126if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14127 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14128else
503d2be0 14129 ac_check_lib_save_LIBS=$LIBS
98418dba 14130LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14131cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14132/* confdefs.h. */
14133_ACEOF
14134cat confdefs.h >>conftest.$ac_ext
14135cat >>conftest.$ac_ext <<_ACEOF
14136/* end confdefs.h. */
503d2be0 14137
ca81d7a0
JD
14138/* Override any GCC internal prototype to avoid an error.
14139 Use char because int might match the return type of a GCC
14140 builtin and then its argument prototype would still apply. */
503d2be0
AS
14141#ifdef __cplusplus
14142extern "C"
14143#endif
98418dba 14144char TIFFGetVersion ();
503d2be0
AS
14145int
14146main ()
14147{
ca81d7a0 14148return TIFFGetVersion ();
503d2be0
AS
14149 ;
14150 return 0;
14151}
14152_ACEOF
14153rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14154if { (ac_try="$ac_link"
14155case "(($ac_try" in
14156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14157 *) ac_try_echo=$ac_try;;
14158esac
14159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14160 (eval "$ac_link") 2>conftest.er1
503d2be0 14161 ac_status=$?
edfaf76d
LK
14162 grep -v '^ *+' conftest.er1 >conftest.err
14163 rm -f conftest.er1
14164 cat conftest.err >&5
c0d27fcc 14165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14166 (exit $ac_status); } && {
14167 test -z "$ac_c_werror_flag" ||
14168 test ! -s conftest.err
14169 } && test -s conftest$ac_exeext &&
14170 $as_test_x conftest$ac_exeext; then
98418dba 14171 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14172else
14173 echo "$as_me: failed program was:" >&5
19650fd6
AS
14174sed 's/^/| /' conftest.$ac_ext >&5
14175
ca81d7a0 14176 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14177fi
ca81d7a0 14178
f053c89f 14179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14180 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14181LIBS=$ac_check_lib_save_LIBS
14182fi
ca81d7a0
JD
14183{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14184echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14185if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14186 HAVE_TIFF=yes
14187fi
14188
14189fi
73b77ee5 14190
c0d27fcc 14191
98418dba
CW
14192 fi
14193
14194 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14195
c0d27fcc 14196cat >>confdefs.h <<\_ACEOF
98418dba 14197#define HAVE_TIFF 1
c0d27fcc 14198_ACEOF
98418dba
CW
14199
14200 fi
73b77ee5
GM
14201fi
14202
9aeb8aaa 14203### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14204HAVE_GIF=no
9aeb8aaa
GM
14205if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14206 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14207 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14208echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14209if test "${ac_cv_header_gif_lib_h+set}" = set; then
14210 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14211fi
ca81d7a0
JD
14212{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14213echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14214else
c0d27fcc 14215 # Is the header compilable?
ca81d7a0
JD
14216{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14217echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14218cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14219/* confdefs.h. */
14220_ACEOF
14221cat confdefs.h >>conftest.$ac_ext
14222cat >>conftest.$ac_ext <<_ACEOF
14223/* end confdefs.h. */
c0d27fcc
MR
14224$ac_includes_default
14225#include <gif_lib.h>
14226_ACEOF
14227rm -f conftest.$ac_objext
ca81d7a0
JD
14228if { (ac_try="$ac_compile"
14229case "(($ac_try" in
14230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14231 *) ac_try_echo=$ac_try;;
14232esac
14233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14234 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14235 ac_status=$?
edfaf76d
LK
14236 grep -v '^ *+' conftest.er1 >conftest.err
14237 rm -f conftest.er1
14238 cat conftest.err >&5
c0d27fcc 14239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14240 (exit $ac_status); } && {
14241 test -z "$ac_c_werror_flag" ||
14242 test ! -s conftest.err
14243 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14244 ac_header_compiler=yes
14245else
14246 echo "$as_me: failed program was:" >&5
19650fd6
AS
14247sed 's/^/| /' conftest.$ac_ext >&5
14248
ca81d7a0 14249 ac_header_compiler=no
c0d27fcc 14250fi
ca81d7a0
JD
14251
14252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14253{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14254echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14255
14256# Is the header present?
ca81d7a0
JD
14257{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14258echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14259cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14260/* confdefs.h. */
14261_ACEOF
14262cat confdefs.h >>conftest.$ac_ext
14263cat >>conftest.$ac_ext <<_ACEOF
14264/* end confdefs.h. */
98418dba
CW
14265#include <gif_lib.h>
14266_ACEOF
ca81d7a0
JD
14267if { (ac_try="$ac_cpp conftest.$ac_ext"
14268case "(($ac_try" in
14269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14270 *) ac_try_echo=$ac_try;;
14271esac
14272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14273 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14274 ac_status=$?
6bae0ccf 14275 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14276 rm -f conftest.er1
14277 cat conftest.err >&5
c0d27fcc 14278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14279 (exit $ac_status); } >/dev/null && {
14280 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14281 test ! -s conftest.err
14282 }; then
c0d27fcc 14283 ac_header_preproc=yes
98418dba
CW
14284else
14285 echo "$as_me: failed program was:" >&5
19650fd6
AS
14286sed 's/^/| /' conftest.$ac_ext >&5
14287
c0d27fcc 14288 ac_header_preproc=no
98418dba 14289fi
ca81d7a0 14290
98418dba 14291rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14292{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14293echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14294
14295# So? What about this header?
edfaf76d
LK
14296case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14297 yes:no: )
c0d27fcc
MR
14298 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14299echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14300 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14301echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14302 ac_header_preproc=yes
19650fd6 14303 ;;
edfaf76d 14304 no:yes:* )
c0d27fcc
MR
14305 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14306echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14307 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14308echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14309 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14310echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14311 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14312echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14313 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14314echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14315 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14316echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14317
19650fd6 14318 ;;
c0d27fcc 14319esac
ca81d7a0
JD
14320{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14321echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14322if test "${ac_cv_header_gif_lib_h+set}" = set; then
14323 echo $ECHO_N "(cached) $ECHO_C" >&6
14324else
14325 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14326fi
ca81d7a0
JD
14327{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14328echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14329
14330fi
98418dba
CW
14331if test $ac_cv_header_gif_lib_h = yes; then
14332 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14333# Earlier versions can crash Emacs.
63175cd2
GM
14334 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14335echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14336if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14337 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14338else
503d2be0 14339 ac_check_lib_save_LIBS=$LIBS
63175cd2 14340LIBS="-lgif $LIBS"
503d2be0 14341cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14342/* confdefs.h. */
14343_ACEOF
14344cat confdefs.h >>conftest.$ac_ext
14345cat >>conftest.$ac_ext <<_ACEOF
14346/* end confdefs.h. */
73b77ee5 14347
ca81d7a0
JD
14348/* Override any GCC internal prototype to avoid an error.
14349 Use char because int might match the return type of a GCC
14350 builtin and then its argument prototype would still apply. */
98418dba
CW
14351#ifdef __cplusplus
14352extern "C"
14353#endif
98418dba 14354char EGifPutExtensionLast ();
503d2be0
AS
14355int
14356main ()
14357{
ca81d7a0 14358return EGifPutExtensionLast ();
503d2be0
AS
14359 ;
14360 return 0;
14361}
14362_ACEOF
14363rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14364if { (ac_try="$ac_link"
14365case "(($ac_try" in
14366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14367 *) ac_try_echo=$ac_try;;
14368esac
14369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14370 (eval "$ac_link") 2>conftest.er1
503d2be0 14371 ac_status=$?
edfaf76d
LK
14372 grep -v '^ *+' conftest.er1 >conftest.err
14373 rm -f conftest.er1
14374 cat conftest.err >&5
c0d27fcc 14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14376 (exit $ac_status); } && {
14377 test -z "$ac_c_werror_flag" ||
14378 test ! -s conftest.err
14379 } && test -s conftest$ac_exeext &&
14380 $as_test_x conftest$ac_exeext; then
63175cd2 14381 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14382else
98418dba 14383 echo "$as_me: failed program was:" >&5
19650fd6
AS
14384sed 's/^/| /' conftest.$ac_ext >&5
14385
63175cd2 14386 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14387fi
ca81d7a0 14388
f053c89f 14389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14390 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14391LIBS=$ac_check_lib_save_LIBS
14392fi
63175cd2
GM
14393{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14394echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14395if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14396 HAVE_GIF=yes
9aeb8aaa 14397else
63175cd2 14398 try_libungif=yes
98418dba
CW
14399fi
14400
14401fi
14402
c0d27fcc 14403
9aeb8aaa
GM
14404
14405 if test "$HAVE_GIF" = yes; then
63175cd2 14406 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14407 fi
14408
63175cd2
GM
14409# If gif_lib.h but no libgif, try libungif.
14410 if test x"$try_libungif" = xyes; then
14411 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14412echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14413if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14414 echo $ECHO_N "(cached) $ECHO_C" >&6
14415else
14416 ac_check_lib_save_LIBS=$LIBS
63175cd2 14417LIBS="-lungif $LIBS"
9aeb8aaa
GM
14418cat >conftest.$ac_ext <<_ACEOF
14419/* confdefs.h. */
14420_ACEOF
14421cat confdefs.h >>conftest.$ac_ext
14422cat >>conftest.$ac_ext <<_ACEOF
14423/* end confdefs.h. */
14424
14425/* Override any GCC internal prototype to avoid an error.
14426 Use char because int might match the return type of a GCC
14427 builtin and then its argument prototype would still apply. */
14428#ifdef __cplusplus
14429extern "C"
14430#endif
14431char EGifPutExtensionLast ();
14432int
14433main ()
14434{
14435return EGifPutExtensionLast ();
14436 ;
14437 return 0;
14438}
14439_ACEOF
14440rm -f conftest.$ac_objext conftest$ac_exeext
14441if { (ac_try="$ac_link"
14442case "(($ac_try" in
14443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14444 *) ac_try_echo=$ac_try;;
14445esac
14446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14447 (eval "$ac_link") 2>conftest.er1
14448 ac_status=$?
14449 grep -v '^ *+' conftest.er1 >conftest.err
14450 rm -f conftest.er1
14451 cat conftest.err >&5
14452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14453 (exit $ac_status); } && {
14454 test -z "$ac_c_werror_flag" ||
14455 test ! -s conftest.err
14456 } && test -s conftest$ac_exeext &&
14457 $as_test_x conftest$ac_exeext; then
63175cd2 14458 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14459else
14460 echo "$as_me: failed program was:" >&5
14461sed 's/^/| /' conftest.$ac_ext >&5
14462
63175cd2 14463 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14464fi
14465
9aeb8aaa
GM
14466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14467 conftest$ac_exeext conftest.$ac_ext
14468LIBS=$ac_check_lib_save_LIBS
14469fi
63175cd2
GM
14470{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14471echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14472if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14473 HAVE_GIF=yes
98418dba
CW
14474fi
14475
c0d27fcc 14476
9aeb8aaa
GM
14477 if test "$HAVE_GIF" = yes; then
14478
14479cat >>confdefs.h <<\_ACEOF
63175cd2 14480#define LIBGIF -lungif
9aeb8aaa
GM
14481_ACEOF
14482
63175cd2 14483 ac_gif_lib_name="-lungif"
9aeb8aaa 14484 fi
98418dba
CW
14485 fi
14486
14487 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14488
c0d27fcc 14489cat >>confdefs.h <<\_ACEOF
98418dba 14490#define HAVE_GIF 1
c0d27fcc 14491_ACEOF
98418dba
CW
14492
14493 fi
14494fi
14495
5afbeb22
JD
14496if test "${HAVE_X11}" = "yes"; then
14497 MISSING=""
14498 WITH_NO=""
14499 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14500 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14501 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14502 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14503 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14504 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14505 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14506 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14507 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14508 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14509
14510 if test "X${MISSING}" != X; then
1bb9a689 14511 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14512 $MISSING
86e73516 14513Maybe some development libraries/packages are missing?
5afbeb22
JD
14514If you don't want to link with them give
14515 $WITH_NO
14516as options to configure" >&5
1bb9a689 14517echo "$as_me: error: The following required libraries were not found:
5afbeb22 14518 $MISSING
86e73516 14519Maybe some development libraries/packages are missing?
5afbeb22
JD
14520If you don't want to link with them give
14521 $WITH_NO
14522as options to configure" >&2;}
86e73516 14523 { (exit 1); exit 1; }; }
98418dba
CW
14524 fi
14525fi
14526
79011b82
NR
14527### Use -lgpm if available, unless `--with-gpm=no'.
14528HAVE_GPM=no
14529if test "${with_gpm}" != "no"; then
14530 if test "${ac_cv_header_gpm_h+set}" = set; then
14531 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14532echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14533if test "${ac_cv_header_gpm_h+set}" = set; then
14534 echo $ECHO_N "(cached) $ECHO_C" >&6
14535fi
14536{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14537echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14538else
14539 # Is the header compilable?
14540{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14541echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14542cat >conftest.$ac_ext <<_ACEOF
14543/* confdefs.h. */
14544_ACEOF
14545cat confdefs.h >>conftest.$ac_ext
14546cat >>conftest.$ac_ext <<_ACEOF
14547/* end confdefs.h. */
14548$ac_includes_default
14549#include <gpm.h>
14550_ACEOF
14551rm -f conftest.$ac_objext
14552if { (ac_try="$ac_compile"
14553case "(($ac_try" in
14554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14555 *) ac_try_echo=$ac_try;;
14556esac
14557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14558 (eval "$ac_compile") 2>conftest.er1
14559 ac_status=$?
14560 grep -v '^ *+' conftest.er1 >conftest.err
14561 rm -f conftest.er1
14562 cat conftest.err >&5
14563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14564 (exit $ac_status); } && {
14565 test -z "$ac_c_werror_flag" ||
14566 test ! -s conftest.err
14567 } && test -s conftest.$ac_objext; then
14568 ac_header_compiler=yes
14569else
14570 echo "$as_me: failed program was:" >&5
14571sed 's/^/| /' conftest.$ac_ext >&5
14572
14573 ac_header_compiler=no
14574fi
14575
14576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14577{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14578echo "${ECHO_T}$ac_header_compiler" >&6; }
14579
14580# Is the header present?
14581{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14582echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14583cat >conftest.$ac_ext <<_ACEOF
14584/* confdefs.h. */
14585_ACEOF
14586cat confdefs.h >>conftest.$ac_ext
14587cat >>conftest.$ac_ext <<_ACEOF
14588/* end confdefs.h. */
14589#include <gpm.h>
14590_ACEOF
14591if { (ac_try="$ac_cpp conftest.$ac_ext"
14592case "(($ac_try" in
14593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594 *) ac_try_echo=$ac_try;;
14595esac
14596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14597 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14598 ac_status=$?
14599 grep -v '^ *+' conftest.er1 >conftest.err
14600 rm -f conftest.er1
14601 cat conftest.err >&5
14602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603 (exit $ac_status); } >/dev/null && {
14604 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14605 test ! -s conftest.err
14606 }; then
14607 ac_header_preproc=yes
14608else
14609 echo "$as_me: failed program was:" >&5
14610sed 's/^/| /' conftest.$ac_ext >&5
14611
14612 ac_header_preproc=no
14613fi
14614
14615rm -f conftest.err conftest.$ac_ext
14616{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14617echo "${ECHO_T}$ac_header_preproc" >&6; }
14618
14619# So? What about this header?
14620case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14621 yes:no: )
14622 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14623echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14624 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14625echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14626 ac_header_preproc=yes
14627 ;;
14628 no:yes:* )
14629 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14630echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14631 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14632echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14633 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14634echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14635 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14636echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14637 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14638echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14639 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14640echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14641
14642 ;;
14643esac
14644{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14645echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14646if test "${ac_cv_header_gpm_h+set}" = set; then
14647 echo $ECHO_N "(cached) $ECHO_C" >&6
14648else
14649 ac_cv_header_gpm_h=$ac_header_preproc
14650fi
14651{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14652echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14653
14654fi
14655if test $ac_cv_header_gpm_h = yes; then
14656 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14657echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14658if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14659 echo $ECHO_N "(cached) $ECHO_C" >&6
14660else
14661 ac_check_lib_save_LIBS=$LIBS
14662LIBS="-lgpm $LIBS"
14663cat >conftest.$ac_ext <<_ACEOF
14664/* confdefs.h. */
14665_ACEOF
14666cat confdefs.h >>conftest.$ac_ext
14667cat >>conftest.$ac_ext <<_ACEOF
14668/* end confdefs.h. */
14669
14670/* Override any GCC internal prototype to avoid an error.
14671 Use char because int might match the return type of a GCC
14672 builtin and then its argument prototype would still apply. */
14673#ifdef __cplusplus
14674extern "C"
14675#endif
14676char Gpm_Open ();
14677int
14678main ()
14679{
14680return Gpm_Open ();
14681 ;
14682 return 0;
14683}
14684_ACEOF
14685rm -f conftest.$ac_objext conftest$ac_exeext
14686if { (ac_try="$ac_link"
14687case "(($ac_try" in
14688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14689 *) ac_try_echo=$ac_try;;
14690esac
14691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14692 (eval "$ac_link") 2>conftest.er1
14693 ac_status=$?
14694 grep -v '^ *+' conftest.er1 >conftest.err
14695 rm -f conftest.er1
14696 cat conftest.err >&5
14697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698 (exit $ac_status); } && {
14699 test -z "$ac_c_werror_flag" ||
14700 test ! -s conftest.err
14701 } && test -s conftest$ac_exeext &&
14702 $as_test_x conftest$ac_exeext; then
14703 ac_cv_lib_gpm_Gpm_Open=yes
14704else
14705 echo "$as_me: failed program was:" >&5
14706sed 's/^/| /' conftest.$ac_ext >&5
14707
14708 ac_cv_lib_gpm_Gpm_Open=no
14709fi
14710
14711rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14712 conftest$ac_exeext conftest.$ac_ext
14713LIBS=$ac_check_lib_save_LIBS
14714fi
14715{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14716echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14717if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14718 HAVE_GPM=yes
14719fi
14720
14721fi
14722
14723
14724fi
14725
14726if test "${HAVE_GPM}" = "yes"; then
14727
14728cat >>confdefs.h <<\_ACEOF
14729#define HAVE_GPM 1
14730_ACEOF
14731
14732fi
14733
cef11da2 14734if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14735 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14736echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14737if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14738 echo $ECHO_N "(cached) $ECHO_C" >&6
14739fi
ca81d7a0
JD
14740{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14741echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14742else
14743 # Is the header compilable?
ca81d7a0
JD
14744{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14745echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14746cat >conftest.$ac_ext <<_ACEOF
14747/* confdefs.h. */
14748_ACEOF
14749cat confdefs.h >>conftest.$ac_ext
14750cat >>conftest.$ac_ext <<_ACEOF
14751/* end confdefs.h. */
14752$ac_includes_default
14753#include <malloc/malloc.h>
14754_ACEOF
14755rm -f conftest.$ac_objext
ca81d7a0
JD
14756if { (ac_try="$ac_compile"
14757case "(($ac_try" in
14758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14759 *) ac_try_echo=$ac_try;;
14760esac
14761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14762 (eval "$ac_compile") 2>conftest.er1
cef11da2 14763 ac_status=$?
edfaf76d
LK
14764 grep -v '^ *+' conftest.er1 >conftest.err
14765 rm -f conftest.er1
14766 cat conftest.err >&5
cef11da2 14767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14768 (exit $ac_status); } && {
14769 test -z "$ac_c_werror_flag" ||
14770 test ! -s conftest.err
14771 } && test -s conftest.$ac_objext; then
cef11da2
ST
14772 ac_header_compiler=yes
14773else
14774 echo "$as_me: failed program was:" >&5
14775sed 's/^/| /' conftest.$ac_ext >&5
14776
ca81d7a0 14777 ac_header_compiler=no
cef11da2 14778fi
ca81d7a0
JD
14779
14780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14781{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14782echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14783
14784# Is the header present?
ca81d7a0
JD
14785{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14786echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14787cat >conftest.$ac_ext <<_ACEOF
14788/* confdefs.h. */
14789_ACEOF
14790cat confdefs.h >>conftest.$ac_ext
14791cat >>conftest.$ac_ext <<_ACEOF
14792/* end confdefs.h. */
14793#include <malloc/malloc.h>
14794_ACEOF
ca81d7a0
JD
14795if { (ac_try="$ac_cpp conftest.$ac_ext"
14796case "(($ac_try" in
14797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14798 *) ac_try_echo=$ac_try;;
14799esac
14800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14802 ac_status=$?
14803 grep -v '^ *+' conftest.er1 >conftest.err
14804 rm -f conftest.er1
14805 cat conftest.err >&5
14806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14807 (exit $ac_status); } >/dev/null && {
14808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14809 test ! -s conftest.err
14810 }; then
cef11da2
ST
14811 ac_header_preproc=yes
14812else
14813 echo "$as_me: failed program was:" >&5
14814sed 's/^/| /' conftest.$ac_ext >&5
14815
14816 ac_header_preproc=no
14817fi
ca81d7a0 14818
cef11da2 14819rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14820{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14821echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14822
14823# So? What about this header?
edfaf76d
LK
14824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14825 yes:no: )
cef11da2
ST
14826 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14827echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14828 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14829echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14830 ac_header_preproc=yes
cef11da2 14831 ;;
edfaf76d 14832 no:yes:* )
cef11da2
ST
14833 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14834echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14835 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14836echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14837 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14838echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14839 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14840echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14841 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14842echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14843 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14844echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14845
cef11da2
ST
14846 ;;
14847esac
ca81d7a0
JD
14848{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14849echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14850if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14851 echo $ECHO_N "(cached) $ECHO_C" >&6
14852else
14853 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14854fi
ca81d7a0
JD
14855{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14856echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14857
7c9e5167 14858fi
cef11da2
ST
14859if test $ac_cv_header_malloc_malloc_h = yes; then
14860
14861cat >>confdefs.h <<\_ACEOF
14862#define HAVE_MALLOC_MALLOC_H 1
14863_ACEOF
14864
7c9e5167
JD
14865fi
14866
cef11da2
ST
14867
14868
edfda783
AR
14869### Use NeXTstep API to implement GUI.
14870if test "${HAVE_NS}" = "yes"; then
14871
14872cat >>confdefs.h <<\_ACEOF
14873#define HAVE_NS 1
14874_ACEOF
14875
ff1095d1 14876 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
14877
14878cat >>confdefs.h <<\_ACEOF
14879#define NS_IMPL_COCOA 1
14880_ACEOF
14881
14882 fi
14883 if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
14884
14885cat >>confdefs.h <<\_ACEOF
14886#define COCOA_EXPERIMENTAL_CTRL_G 1
14887_ACEOF
14888
14889 fi
ff1095d1 14890 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
14891
14892cat >>confdefs.h <<\_ACEOF
14893#define NS_IMPL_GNUSTEP 1
14894_ACEOF
14895
14896 fi
177cd151 14897 if test "${NS_HAVE_INTEGER}" = "yes"; then
519c4a9a
CY
14898
14899cat >>confdefs.h <<\_ACEOF
14900#define NS_HAVE_INTEGER 1
14901_ACEOF
14902
177cd151
CY
14903 fi
14904 # We also have mouse menus.
edfda783
AR
14905 HAVE_MENUS=yes
14906fi
14907
e0f712ba 14908
98418dba
CW
14909### Use session management (-lSM -lICE) if available
14910HAVE_X_SM=no
14911if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14912 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14913 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14914echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14915if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14916 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14917fi
ca81d7a0
JD
14918{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14919echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14920else
c0d27fcc 14921 # Is the header compilable?
ca81d7a0
JD
14922{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14923echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14924cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14925/* confdefs.h. */
14926_ACEOF
14927cat confdefs.h >>conftest.$ac_ext
14928cat >>conftest.$ac_ext <<_ACEOF
14929/* end confdefs.h. */
c0d27fcc
MR
14930$ac_includes_default
14931#include <X11/SM/SMlib.h>
14932_ACEOF
14933rm -f conftest.$ac_objext
ca81d7a0
JD
14934if { (ac_try="$ac_compile"
14935case "(($ac_try" in
14936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14937 *) ac_try_echo=$ac_try;;
14938esac
14939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14940 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14941 ac_status=$?
edfaf76d
LK
14942 grep -v '^ *+' conftest.er1 >conftest.err
14943 rm -f conftest.er1
14944 cat conftest.err >&5
c0d27fcc 14945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14946 (exit $ac_status); } && {
14947 test -z "$ac_c_werror_flag" ||
14948 test ! -s conftest.err
14949 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14950 ac_header_compiler=yes
14951else
14952 echo "$as_me: failed program was:" >&5
19650fd6
AS
14953sed 's/^/| /' conftest.$ac_ext >&5
14954
ca81d7a0 14955 ac_header_compiler=no
c0d27fcc 14956fi
ca81d7a0
JD
14957
14958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14959{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14960echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14961
14962# Is the header present?
ca81d7a0
JD
14963{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14964echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14966/* confdefs.h. */
14967_ACEOF
14968cat confdefs.h >>conftest.$ac_ext
14969cat >>conftest.$ac_ext <<_ACEOF
14970/* end confdefs.h. */
98418dba
CW
14971#include <X11/SM/SMlib.h>
14972_ACEOF
ca81d7a0
JD
14973if { (ac_try="$ac_cpp conftest.$ac_ext"
14974case "(($ac_try" in
14975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14976 *) ac_try_echo=$ac_try;;
14977esac
14978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14979 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14980 ac_status=$?
6bae0ccf 14981 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14982 rm -f conftest.er1
14983 cat conftest.err >&5
c0d27fcc 14984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14985 (exit $ac_status); } >/dev/null && {
14986 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14987 test ! -s conftest.err
14988 }; then
c0d27fcc 14989 ac_header_preproc=yes
98418dba
CW
14990else
14991 echo "$as_me: failed program was:" >&5
19650fd6
AS
14992sed 's/^/| /' conftest.$ac_ext >&5
14993
c0d27fcc 14994 ac_header_preproc=no
98418dba 14995fi
ca81d7a0 14996
98418dba 14997rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14998{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14999echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15000
15001# So? What about this header?
edfaf76d
LK
15002case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15003 yes:no: )
c0d27fcc
MR
15004 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15005echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15006 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15007echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15008 ac_header_preproc=yes
19650fd6 15009 ;;
edfaf76d 15010 no:yes:* )
c0d27fcc
MR
15011 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15012echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15013 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15014echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15015 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15016echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15017 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15018echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15019 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15020echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15021 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15022echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15023
19650fd6 15024 ;;
c0d27fcc 15025esac
ca81d7a0
JD
15026{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15027echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15028if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15029 echo $ECHO_N "(cached) $ECHO_C" >&6
15030else
15031 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15032fi
ca81d7a0
JD
15033{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15034echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15035
15036fi
98418dba 15037if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15038 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15039echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15040if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15041 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15042else
503d2be0 15043 ac_check_lib_save_LIBS=$LIBS
1660500f 15044LIBS="-lSM -lICE $LIBS"
503d2be0 15045cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15046/* confdefs.h. */
15047_ACEOF
15048cat confdefs.h >>conftest.$ac_ext
15049cat >>conftest.$ac_ext <<_ACEOF
15050/* end confdefs.h. */
503d2be0 15051
ca81d7a0
JD
15052/* Override any GCC internal prototype to avoid an error.
15053 Use char because int might match the return type of a GCC
15054 builtin and then its argument prototype would still apply. */
503d2be0
AS
15055#ifdef __cplusplus
15056extern "C"
15057#endif
98418dba 15058char SmcOpenConnection ();
503d2be0
AS
15059int
15060main ()
15061{
ca81d7a0 15062return SmcOpenConnection ();
503d2be0
AS
15063 ;
15064 return 0;
15065}
15066_ACEOF
15067rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15068if { (ac_try="$ac_link"
15069case "(($ac_try" in
15070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15071 *) ac_try_echo=$ac_try;;
15072esac
15073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15074 (eval "$ac_link") 2>conftest.er1
503d2be0 15075 ac_status=$?
edfaf76d
LK
15076 grep -v '^ *+' conftest.er1 >conftest.err
15077 rm -f conftest.er1
15078 cat conftest.err >&5
c0d27fcc 15079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15080 (exit $ac_status); } && {
15081 test -z "$ac_c_werror_flag" ||
15082 test ! -s conftest.err
15083 } && test -s conftest$ac_exeext &&
15084 $as_test_x conftest$ac_exeext; then
98418dba 15085 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15086else
15087 echo "$as_me: failed program was:" >&5
19650fd6
AS
15088sed 's/^/| /' conftest.$ac_ext >&5
15089
ca81d7a0 15090 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15091fi
ca81d7a0 15092
f053c89f 15093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15094 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15095LIBS=$ac_check_lib_save_LIBS
15096fi
ca81d7a0
JD
15097{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15098echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15099if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15100 HAVE_X_SM=yes
73b77ee5
GM
15101fi
15102
73b77ee5 15103fi
73b77ee5 15104
c0d27fcc
MR
15105
15106
98418dba 15107 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15108
c0d27fcc 15109cat >>confdefs.h <<\_ACEOF
98418dba 15110#define HAVE_X_SM 1
c0d27fcc 15111_ACEOF
73b77ee5 15112
98418dba
CW
15113 case "$LIBS" in
15114 *-lSM*) ;;
15115 *) LIBS="-lSM -lICE $LIBS" ;;
15116 esac
73b77ee5 15117 fi
98418dba 15118fi
73b77ee5 15119
98418dba 15120# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15121{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15122echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15123if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15124 echo $ECHO_N "(cached) $ECHO_C" >&6
15125else
15126 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15127/* confdefs.h. */
15128_ACEOF
15129cat confdefs.h >>conftest.$ac_ext
15130cat >>conftest.$ac_ext <<_ACEOF
15131/* end confdefs.h. */
98418dba 15132#include <netdb.h>
503d2be0
AS
15133int
15134main ()
15135{
98418dba 15136return h_errno;
503d2be0
AS
15137 ;
15138 return 0;
15139}
15140_ACEOF
15141rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15142if { (ac_try="$ac_link"
15143case "(($ac_try" in
15144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15145 *) ac_try_echo=$ac_try;;
15146esac
15147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15148 (eval "$ac_link") 2>conftest.er1
503d2be0 15149 ac_status=$?
edfaf76d
LK
15150 grep -v '^ *+' conftest.er1 >conftest.err
15151 rm -f conftest.er1
15152 cat conftest.err >&5
c0d27fcc 15153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15154 (exit $ac_status); } && {
15155 test -z "$ac_c_werror_flag" ||
15156 test ! -s conftest.err
15157 } && test -s conftest$ac_exeext &&
15158 $as_test_x conftest$ac_exeext; then
98418dba 15159 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15160else
503d2be0 15161 echo "$as_me: failed program was:" >&5
19650fd6
AS
15162sed 's/^/| /' conftest.$ac_ext >&5
15163
ca81d7a0 15164 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15165fi
ca81d7a0 15166
f053c89f 15167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15168 conftest$ac_exeext conftest.$ac_ext
98418dba 15169fi
ca81d7a0
JD
15170{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15171echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15172if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15173
c0d27fcc 15174cat >>confdefs.h <<\_ACEOF
98418dba 15175#define HAVE_H_ERRNO 1
c0d27fcc 15176_ACEOF
73b77ee5 15177
98418dba
CW
15178fi
15179
15180# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15181# for constant arguments. Useless!
ca81d7a0
JD
15182{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15183echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15184if test "${ac_cv_working_alloca_h+set}" = set; then
15185 echo $ECHO_N "(cached) $ECHO_C" >&6
15186else
15187 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15188/* confdefs.h. */
15189_ACEOF
15190cat confdefs.h >>conftest.$ac_ext
15191cat >>conftest.$ac_ext <<_ACEOF
15192/* end confdefs.h. */
98418dba 15193#include <alloca.h>
503d2be0
AS
15194int
15195main ()
15196{
98418dba 15197char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15198 if (p) return 0;
503d2be0
AS
15199 ;
15200 return 0;
15201}
15202_ACEOF
15203rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15204if { (ac_try="$ac_link"
15205case "(($ac_try" in
15206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15207 *) ac_try_echo=$ac_try;;
15208esac
15209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15210 (eval "$ac_link") 2>conftest.er1
503d2be0 15211 ac_status=$?
edfaf76d
LK
15212 grep -v '^ *+' conftest.er1 >conftest.err
15213 rm -f conftest.er1
15214 cat conftest.err >&5
c0d27fcc 15215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15216 (exit $ac_status); } && {
15217 test -z "$ac_c_werror_flag" ||
15218 test ! -s conftest.err
15219 } && test -s conftest$ac_exeext &&
15220 $as_test_x conftest$ac_exeext; then
98418dba 15221 ac_cv_working_alloca_h=yes
73b77ee5 15222else
503d2be0 15223 echo "$as_me: failed program was:" >&5
19650fd6
AS
15224sed 's/^/| /' conftest.$ac_ext >&5
15225
ca81d7a0 15226 ac_cv_working_alloca_h=no
73b77ee5 15227fi
ca81d7a0 15228
f053c89f 15229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15230 conftest$ac_exeext conftest.$ac_ext
98418dba 15231fi
ca81d7a0
JD
15232{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15233echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15234if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15235
c0d27fcc 15236cat >>confdefs.h <<\_ACEOF
98418dba 15237#define HAVE_ALLOCA_H 1
c0d27fcc 15238_ACEOF
98418dba
CW
15239
15240fi
15241
ca81d7a0
JD
15242{ echo "$as_me:$LINENO: checking for alloca" >&5
15243echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15244if test "${ac_cv_func_alloca_works+set}" = set; then
15245 echo $ECHO_N "(cached) $ECHO_C" >&6
15246else
503d2be0 15247 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15248/* confdefs.h. */
15249_ACEOF
15250cat confdefs.h >>conftest.$ac_ext
15251cat >>conftest.$ac_ext <<_ACEOF
15252/* end confdefs.h. */
98418dba
CW
15253#ifdef __GNUC__
15254# define alloca __builtin_alloca
15255#else
15256# ifdef _MSC_VER
15257# include <malloc.h>
15258# define alloca _alloca
15259# else
f053c89f 15260# ifdef HAVE_ALLOCA_H
98418dba
CW
15261# include <alloca.h>
15262# else
15263# ifdef _AIX
15264 #pragma alloca
15265# else
15266# ifndef alloca /* predefined by HP cc +Olibcalls */
15267char *alloca ();
15268# endif
15269# endif
15270# endif
15271# endif
15272#endif
15273
503d2be0
AS
15274int
15275main ()
15276{
98418dba 15277char *p = (char *) alloca (1);
ca81d7a0 15278 if (p) return 0;
503d2be0
AS
15279 ;
15280 return 0;
15281}
15282_ACEOF
15283rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15284if { (ac_try="$ac_link"
15285case "(($ac_try" in
15286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15287 *) ac_try_echo=$ac_try;;
15288esac
15289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15290 (eval "$ac_link") 2>conftest.er1
503d2be0 15291 ac_status=$?
edfaf76d
LK
15292 grep -v '^ *+' conftest.er1 >conftest.err
15293 rm -f conftest.er1
15294 cat conftest.err >&5
c0d27fcc 15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15296 (exit $ac_status); } && {
15297 test -z "$ac_c_werror_flag" ||
15298 test ! -s conftest.err
15299 } && test -s conftest$ac_exeext &&
15300 $as_test_x conftest$ac_exeext; then
98418dba 15301 ac_cv_func_alloca_works=yes
ac95a621 15302else
503d2be0 15303 echo "$as_me: failed program was:" >&5
19650fd6
AS
15304sed 's/^/| /' conftest.$ac_ext >&5
15305
ca81d7a0 15306 ac_cv_func_alloca_works=no
ac95a621 15307fi
ca81d7a0 15308
f053c89f 15309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15310 conftest$ac_exeext conftest.$ac_ext
98418dba 15311fi
ca81d7a0
JD
15312{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15313echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15314
98418dba
CW
15315if test $ac_cv_func_alloca_works = yes; then
15316
c0d27fcc 15317cat >>confdefs.h <<\_ACEOF
98418dba 15318#define HAVE_ALLOCA 1
c0d27fcc 15319_ACEOF
98418dba
CW
15320
15321else
15322 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15323# that cause trouble. Some versions do not even contain alloca or
15324# contain a buggy version. If you still want to use their alloca,
15325# use ar to extract alloca.o from them instead of compiling alloca.c.
15326
ca81d7a0 15327ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15328
c0d27fcc 15329cat >>confdefs.h <<\_ACEOF
98418dba 15330#define C_ALLOCA 1
c0d27fcc 15331_ACEOF
98418dba 15332
c0d27fcc 15333
ca81d7a0
JD
15334{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15335echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15336if test "${ac_cv_os_cray+set}" = set; then
15337 echo $ECHO_N "(cached) $ECHO_C" >&6
15338else
15339 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15340/* confdefs.h. */
15341_ACEOF
15342cat confdefs.h >>conftest.$ac_ext
15343cat >>conftest.$ac_ext <<_ACEOF
15344/* end confdefs.h. */
ca81d7a0 15345#if defined CRAY && ! defined CRAY2
98418dba
CW
15346webecray
15347#else
15348wenotbecray
15349#endif
15350
15351_ACEOF
15352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15353 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15354 ac_cv_os_cray=yes
15355else
15356 ac_cv_os_cray=no
15357fi
15358rm -f conftest*
ac95a621 15359
98418dba 15360fi
ca81d7a0
JD
15361{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15362echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15363if test $ac_cv_os_cray = yes; then
15364 for ac_func in _getb67 GETB67 getb67; do
15365 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15366{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15368if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15369 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15370else
503d2be0 15371 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15372/* confdefs.h. */
15373_ACEOF
15374cat confdefs.h >>conftest.$ac_ext
15375cat >>conftest.$ac_ext <<_ACEOF
15376/* end confdefs.h. */
edfaf76d
LK
15377/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15378 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15379#define $ac_func innocuous_$ac_func
15380
73b77ee5 15381/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15382 which can conflict with char $ac_func (); below.
15383 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15384 <limits.h> exists even on freestanding compilers. */
edfaf76d 15385
19650fd6
AS
15386#ifdef __STDC__
15387# include <limits.h>
15388#else
15389# include <assert.h>
15390#endif
edfaf76d
LK
15391
15392#undef $ac_func
15393
ca81d7a0
JD
15394/* Override any GCC internal prototype to avoid an error.
15395 Use char because int might match the return type of a GCC
15396 builtin and then its argument prototype would still apply. */
503d2be0
AS
15397#ifdef __cplusplus
15398extern "C"
15399#endif
503d2be0 15400char $ac_func ();
73b77ee5
GM
15401/* The GNU C library defines this for functions which it implements
15402 to always fail with ENOSYS. Some functions are actually named
15403 something starting with __ and the normal name is an alias. */
ca81d7a0 15404#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15405choke me
73b77ee5
GM
15406#endif
15407
19650fd6
AS
15408int
15409main ()
15410{
ca81d7a0 15411return $ac_func ();
503d2be0
AS
15412 ;
15413 return 0;
15414}
15415_ACEOF
15416rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15417if { (ac_try="$ac_link"
15418case "(($ac_try" in
15419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15420 *) ac_try_echo=$ac_try;;
15421esac
15422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15423 (eval "$ac_link") 2>conftest.er1
503d2be0 15424 ac_status=$?
edfaf76d
LK
15425 grep -v '^ *+' conftest.er1 >conftest.err
15426 rm -f conftest.er1
15427 cat conftest.err >&5
c0d27fcc 15428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15429 (exit $ac_status); } && {
15430 test -z "$ac_c_werror_flag" ||
15431 test ! -s conftest.err
15432 } && test -s conftest$ac_exeext &&
15433 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15434 eval "$as_ac_var=yes"
15435else
15436 echo "$as_me: failed program was:" >&5
19650fd6
AS
15437sed 's/^/| /' conftest.$ac_ext >&5
15438
ca81d7a0 15439 eval "$as_ac_var=no"
503d2be0 15440fi
ca81d7a0 15441
f053c89f 15442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15443 conftest$ac_exeext conftest.$ac_ext
503d2be0 15444fi
ca81d7a0
JD
15445ac_res=`eval echo '${'$as_ac_var'}'`
15446 { echo "$as_me:$LINENO: result: $ac_res" >&5
15447echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15448if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15449
c0d27fcc 15450cat >>confdefs.h <<_ACEOF
98418dba 15451#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15452_ACEOF
98418dba
CW
15453
15454 break
73b77ee5 15455fi
73b77ee5 15456
98418dba 15457 done
73b77ee5
GM
15458fi
15459
ca81d7a0
JD
15460{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15461echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15462if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15463 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15464else
15465 if test "$cross_compiling" = yes; then
15466 ac_cv_c_stack_direction=0
73b77ee5 15467else
503d2be0 15468 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15469/* confdefs.h. */
15470_ACEOF
15471cat confdefs.h >>conftest.$ac_ext
15472cat >>conftest.$ac_ext <<_ACEOF
15473/* end confdefs.h. */
ca81d7a0 15474$ac_includes_default
503d2be0 15475int
98418dba 15476find_stack_direction ()
503d2be0 15477{
98418dba
CW
15478 static char *addr = 0;
15479 auto char dummy;
15480 if (addr == 0)
15481 {
15482 addr = &dummy;
15483 return find_stack_direction ();
15484 }
73b77ee5 15485 else
98418dba
CW
15486 return (&dummy > addr) ? 1 : -1;
15487}
ba4481b5 15488
503d2be0
AS
15489int
15490main ()
15491{
ca81d7a0 15492 return find_stack_direction () < 0;
503d2be0
AS
15493}
15494_ACEOF
98418dba 15495rm -f conftest$ac_exeext
ca81d7a0
JD
15496if { (ac_try="$ac_link"
15497case "(($ac_try" in
15498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15499 *) ac_try_echo=$ac_try;;
15500esac
15501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15502 (eval "$ac_link") 2>&5
503d2be0 15503 ac_status=$?
c0d27fcc 15504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15506 { (case "(($ac_try" in
15507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15508 *) ac_try_echo=$ac_try;;
15509esac
15510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15511 (eval "$ac_try") 2>&5
503d2be0 15512 ac_status=$?
c0d27fcc 15513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15514 (exit $ac_status); }; }; then
98418dba 15515 ac_cv_c_stack_direction=1
ba4481b5 15516else
98418dba
CW
15517 echo "$as_me: program exited with status $ac_status" >&5
15518echo "$as_me: failed program was:" >&5
19650fd6
AS
15519sed 's/^/| /' conftest.$ac_ext >&5
15520
c0d27fcc 15521( exit $ac_status )
98418dba 15522ac_cv_c_stack_direction=-1
ba4481b5 15523fi
ca81d7a0 15524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15525fi
ca81d7a0
JD
15526
15527
98418dba 15528fi
ca81d7a0
JD
15529{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15530echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15531
c0d27fcc 15532cat >>confdefs.h <<_ACEOF
98418dba 15533#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15534_ACEOF
15535
ba4481b5 15536
ba4481b5
DL
15537fi
15538
c0d27fcc 15539
611adb3e
GM
15540if test x"$ac_cv_func_alloca_works" != xyes; then
15541 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15542echo "$as_me: error: a system implementation of alloca is required " >&2;}
15543 { (exit 1); exit 1; }; }
15544fi
15545
98418dba
CW
15546# fmod, logb, and frexp are found in -lm on most systems.
15547# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15548
ca81d7a0
JD
15549{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15550echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15551if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15552 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15553else
98418dba
CW
15554 ac_check_lib_save_LIBS=$LIBS
15555LIBS="-lm $LIBS"
15556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15557/* confdefs.h. */
15558_ACEOF
15559cat confdefs.h >>conftest.$ac_ext
15560cat >>conftest.$ac_ext <<_ACEOF
15561/* end confdefs.h. */
ba4481b5 15562
ca81d7a0
JD
15563/* Override any GCC internal prototype to avoid an error.
15564 Use char because int might match the return type of a GCC
15565 builtin and then its argument prototype would still apply. */
98418dba
CW
15566#ifdef __cplusplus
15567extern "C"
15568#endif
98418dba 15569char sqrt ();
503d2be0
AS
15570int
15571main ()
15572{
ca81d7a0 15573return sqrt ();
503d2be0
AS
15574 ;
15575 return 0;
15576}
15577_ACEOF
15578rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15579if { (ac_try="$ac_link"
15580case "(($ac_try" in
15581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15582 *) ac_try_echo=$ac_try;;
15583esac
15584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15585 (eval "$ac_link") 2>conftest.er1
503d2be0 15586 ac_status=$?
edfaf76d
LK
15587 grep -v '^ *+' conftest.er1 >conftest.err
15588 rm -f conftest.er1
15589 cat conftest.err >&5
c0d27fcc 15590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15591 (exit $ac_status); } && {
15592 test -z "$ac_c_werror_flag" ||
15593 test ! -s conftest.err
15594 } && test -s conftest$ac_exeext &&
15595 $as_test_x conftest$ac_exeext; then
98418dba 15596 ac_cv_lib_m_sqrt=yes
ba4481b5 15597else
503d2be0 15598 echo "$as_me: failed program was:" >&5
19650fd6
AS
15599sed 's/^/| /' conftest.$ac_ext >&5
15600
ca81d7a0 15601 ac_cv_lib_m_sqrt=no
ba4481b5 15602fi
ca81d7a0 15603
f053c89f 15604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15605 conftest$ac_exeext conftest.$ac_ext
98418dba 15606LIBS=$ac_check_lib_save_LIBS
ba4481b5 15607fi
ca81d7a0
JD
15608{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15609echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15610if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15611 cat >>confdefs.h <<_ACEOF
98418dba 15612#define HAVE_LIBM 1
c0d27fcc 15613_ACEOF
98418dba
CW
15614
15615 LIBS="-lm $LIBS"
ba4481b5 15616
ba4481b5
DL
15617fi
15618
c0d27fcc 15619
55597d70
DL
15620# Check for mail-locking functions in a "mail" library. Probably this should
15621# have the same check as for liblockfile below.
98418dba 15622
ca81d7a0
JD
15623{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15624echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15625if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15626 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15627else
98418dba
CW
15628 ac_check_lib_save_LIBS=$LIBS
15629LIBS="-lmail $LIBS"
15630cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15631/* confdefs.h. */
15632_ACEOF
15633cat confdefs.h >>conftest.$ac_ext
15634cat >>conftest.$ac_ext <<_ACEOF
15635/* end confdefs.h. */
98418dba 15636
ca81d7a0
JD
15637/* Override any GCC internal prototype to avoid an error.
15638 Use char because int might match the return type of a GCC
15639 builtin and then its argument prototype would still apply. */
98418dba
CW
15640#ifdef __cplusplus
15641extern "C"
15642#endif
98418dba 15643char maillock ();
503d2be0
AS
15644int
15645main ()
15646{
ca81d7a0 15647return maillock ();
503d2be0
AS
15648 ;
15649 return 0;
15650}
15651_ACEOF
15652rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15653if { (ac_try="$ac_link"
15654case "(($ac_try" in
15655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15656 *) ac_try_echo=$ac_try;;
15657esac
15658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15659 (eval "$ac_link") 2>conftest.er1
503d2be0 15660 ac_status=$?
edfaf76d
LK
15661 grep -v '^ *+' conftest.er1 >conftest.err
15662 rm -f conftest.er1
15663 cat conftest.err >&5
c0d27fcc 15664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15665 (exit $ac_status); } && {
15666 test -z "$ac_c_werror_flag" ||
15667 test ! -s conftest.err
15668 } && test -s conftest$ac_exeext &&
15669 $as_test_x conftest$ac_exeext; then
98418dba 15670 ac_cv_lib_mail_maillock=yes
ba4481b5 15671else
503d2be0 15672 echo "$as_me: failed program was:" >&5
19650fd6
AS
15673sed 's/^/| /' conftest.$ac_ext >&5
15674
ca81d7a0 15675 ac_cv_lib_mail_maillock=no
ba4481b5 15676fi
ca81d7a0 15677
f053c89f 15678rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15679 conftest$ac_exeext conftest.$ac_ext
98418dba 15680LIBS=$ac_check_lib_save_LIBS
ba4481b5 15681fi
ca81d7a0
JD
15682{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15683echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15684if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15685 cat >>confdefs.h <<_ACEOF
98418dba 15686#define HAVE_LIBMAIL 1
c0d27fcc 15687_ACEOF
ba4481b5 15688
98418dba 15689 LIBS="-lmail $LIBS"
ba4481b5 15690
98418dba 15691fi
ba4481b5 15692
c0d27fcc 15693
ca81d7a0
JD
15694{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15695echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15696if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15697 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15698else
503d2be0 15699 ac_check_lib_save_LIBS=$LIBS
98418dba 15700LIBS="-llockfile $LIBS"
503d2be0 15701cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
503d2be0 15707
ca81d7a0
JD
15708/* Override any GCC internal prototype to avoid an error.
15709 Use char because int might match the return type of a GCC
15710 builtin and then its argument prototype would still apply. */
503d2be0
AS
15711#ifdef __cplusplus
15712extern "C"
15713#endif
98418dba 15714char maillock ();
503d2be0
AS
15715int
15716main ()
15717{
ca81d7a0 15718return maillock ();
503d2be0
AS
15719 ;
15720 return 0;
15721}
15722_ACEOF
15723rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15724if { (ac_try="$ac_link"
15725case "(($ac_try" in
15726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15727 *) ac_try_echo=$ac_try;;
15728esac
15729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15730 (eval "$ac_link") 2>conftest.er1
503d2be0 15731 ac_status=$?
edfaf76d
LK
15732 grep -v '^ *+' conftest.er1 >conftest.err
15733 rm -f conftest.er1
15734 cat conftest.err >&5
c0d27fcc 15735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15736 (exit $ac_status); } && {
15737 test -z "$ac_c_werror_flag" ||
15738 test ! -s conftest.err
15739 } && test -s conftest$ac_exeext &&
15740 $as_test_x conftest$ac_exeext; then
98418dba 15741 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15742else
15743 echo "$as_me: failed program was:" >&5
19650fd6
AS
15744sed 's/^/| /' conftest.$ac_ext >&5
15745
ca81d7a0 15746 ac_cv_lib_lockfile_maillock=no
98418dba 15747fi
ca81d7a0 15748
f053c89f 15749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15750 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15751LIBS=$ac_check_lib_save_LIBS
15752fi
ca81d7a0
JD
15753{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15754echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15755if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15756 cat >>confdefs.h <<_ACEOF
98418dba 15757#define HAVE_LIBLOCKFILE 1
c0d27fcc 15758_ACEOF
98418dba
CW
15759
15760 LIBS="-llockfile $LIBS"
15761
15762fi
15763
15764# If we have the shared liblockfile, assume we must use it for mail
15765# locking (e.g. Debian). If we couldn't link against liblockfile
15766# (no liblockfile.a installed), ensure that we don't need to.
15767if test "$ac_cv_lib_lockfile_maillock" = no; then
15768 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15769set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15770{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15772if test "${ac_cv_prog_liblockfile+set}" = set; then
15773 echo $ECHO_N "(cached) $ECHO_C" >&6
15774else
15775 if test -n "$liblockfile"; then
15776 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15777else
c0d27fcc 15778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15779as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15780for as_dir in $as_dummy
c0d27fcc
MR
15781do
15782 IFS=$as_save_IFS
15783 test -z "$as_dir" && as_dir=.
15784 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15785 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15786 ac_cv_prog_liblockfile="yes"
15787 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15788 break 2
15789 fi
15790done
98418dba 15791done
ca81d7a0 15792IFS=$as_save_IFS
98418dba
CW
15793
15794 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15795fi
503d2be0 15796fi
98418dba
CW
15797liblockfile=$ac_cv_prog_liblockfile
15798if test -n "$liblockfile"; then
ca81d7a0
JD
15799 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15800echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15801else
ca81d7a0
JD
15802 { echo "$as_me:$LINENO: result: no" >&5
15803echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15804fi
15805
ca81d7a0 15806
98418dba 15807 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15808 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15809This probably means that movemail could lose mail.
15810There may be a \`development' package to install containing liblockfile." >&5
15811echo "$as_me: error: Shared liblockfile found but can't link against it.
15812This probably means that movemail could lose mail.
15813There may be a \`development' package to install containing liblockfile." >&2;}
15814 { (exit 1); exit 1; }; }
98418dba 15815 else :
55597d70 15816 fi
98418dba 15817fi
503d2be0 15818
98418dba
CW
15819for ac_func in touchlock
15820do
15821as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15822{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15823echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15824if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15825 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15826else
98418dba 15827 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15828/* confdefs.h. */
15829_ACEOF
15830cat confdefs.h >>conftest.$ac_ext
15831cat >>conftest.$ac_ext <<_ACEOF
15832/* end confdefs.h. */
edfaf76d
LK
15833/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15834 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15835#define $ac_func innocuous_$ac_func
15836
98418dba 15837/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15838 which can conflict with char $ac_func (); below.
15839 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15840 <limits.h> exists even on freestanding compilers. */
edfaf76d 15841
19650fd6
AS
15842#ifdef __STDC__
15843# include <limits.h>
15844#else
15845# include <assert.h>
15846#endif
edfaf76d
LK
15847
15848#undef $ac_func
15849
ca81d7a0
JD
15850/* Override any GCC internal prototype to avoid an error.
15851 Use char because int might match the return type of a GCC
15852 builtin and then its argument prototype would still apply. */
503d2be0
AS
15853#ifdef __cplusplus
15854extern "C"
15855#endif
98418dba 15856char $ac_func ();
98418dba
CW
15857/* The GNU C library defines this for functions which it implements
15858 to always fail with ENOSYS. Some functions are actually named
15859 something starting with __ and the normal name is an alias. */
ca81d7a0 15860#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15861choke me
cd958eb3
MB
15862#endif
15863
19650fd6
AS
15864int
15865main ()
15866{
ca81d7a0 15867return $ac_func ();
503d2be0
AS
15868 ;
15869 return 0;
15870}
15871_ACEOF
15872rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15873if { (ac_try="$ac_link"
15874case "(($ac_try" in
15875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15876 *) ac_try_echo=$ac_try;;
15877esac
15878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15879 (eval "$ac_link") 2>conftest.er1
503d2be0 15880 ac_status=$?
edfaf76d
LK
15881 grep -v '^ *+' conftest.er1 >conftest.err
15882 rm -f conftest.er1
15883 cat conftest.err >&5
c0d27fcc 15884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15885 (exit $ac_status); } && {
15886 test -z "$ac_c_werror_flag" ||
15887 test ! -s conftest.err
15888 } && test -s conftest$ac_exeext &&
15889 $as_test_x conftest$ac_exeext; then
98418dba 15890 eval "$as_ac_var=yes"
503d2be0
AS
15891else
15892 echo "$as_me: failed program was:" >&5
19650fd6
AS
15893sed 's/^/| /' conftest.$ac_ext >&5
15894
ca81d7a0 15895 eval "$as_ac_var=no"
503d2be0 15896fi
ca81d7a0 15897
f053c89f 15898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15899 conftest$ac_exeext conftest.$ac_ext
503d2be0 15900fi
ca81d7a0
JD
15901ac_res=`eval echo '${'$as_ac_var'}'`
15902 { echo "$as_me:$LINENO: result: $ac_res" >&5
15903echo "${ECHO_T}$ac_res" >&6; }
98418dba 15904if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15905 cat >>confdefs.h <<_ACEOF
98418dba 15906#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15907_ACEOF
457b792c 15908
457b792c 15909fi
98418dba 15910done
457b792c 15911
c0d27fcc 15912
98418dba
CW
15913for ac_header in maillock.h
15914do
15915as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15916if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15917 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15918echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15919if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15920 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15921fi
ca81d7a0
JD
15922ac_res=`eval echo '${'$as_ac_Header'}'`
15923 { echo "$as_me:$LINENO: result: $ac_res" >&5
15924echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15925else
c0d27fcc 15926 # Is the header compilable?
ca81d7a0
JD
15927{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15928echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15929cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15930/* confdefs.h. */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h. */
c0d27fcc
MR
15935$ac_includes_default
15936#include <$ac_header>
15937_ACEOF
15938rm -f conftest.$ac_objext
ca81d7a0
JD
15939if { (ac_try="$ac_compile"
15940case "(($ac_try" in
15941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15942 *) ac_try_echo=$ac_try;;
15943esac
15944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15945 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15946 ac_status=$?
edfaf76d
LK
15947 grep -v '^ *+' conftest.er1 >conftest.err
15948 rm -f conftest.er1
15949 cat conftest.err >&5
c0d27fcc 15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15951 (exit $ac_status); } && {
15952 test -z "$ac_c_werror_flag" ||
15953 test ! -s conftest.err
15954 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15955 ac_header_compiler=yes
15956else
15957 echo "$as_me: failed program was:" >&5
19650fd6
AS
15958sed 's/^/| /' conftest.$ac_ext >&5
15959
ca81d7a0 15960 ac_header_compiler=no
c0d27fcc 15961fi
ca81d7a0
JD
15962
15963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15964{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15965echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15966
15967# Is the header present?
ca81d7a0
JD
15968{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15969echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15970cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15971/* confdefs.h. */
15972_ACEOF
15973cat confdefs.h >>conftest.$ac_ext
15974cat >>conftest.$ac_ext <<_ACEOF
15975/* end confdefs.h. */
98418dba 15976#include <$ac_header>
503d2be0 15977_ACEOF
ca81d7a0
JD
15978if { (ac_try="$ac_cpp conftest.$ac_ext"
15979case "(($ac_try" in
15980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15981 *) ac_try_echo=$ac_try;;
15982esac
15983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15984 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15985 ac_status=$?
6bae0ccf 15986 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15987 rm -f conftest.er1
15988 cat conftest.err >&5
c0d27fcc 15989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15990 (exit $ac_status); } >/dev/null && {
15991 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15992 test ! -s conftest.err
15993 }; then
c0d27fcc 15994 ac_header_preproc=yes
98418dba
CW
15995else
15996 echo "$as_me: failed program was:" >&5
19650fd6
AS
15997sed 's/^/| /' conftest.$ac_ext >&5
15998
c0d27fcc 15999 ac_header_preproc=no
503d2be0 16000fi
ca81d7a0 16001
98418dba 16002rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16003{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16004echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16005
16006# So? What about this header?
edfaf76d
LK
16007case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16008 yes:no: )
c0d27fcc
MR
16009 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16010echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16011 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16012echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16013 ac_header_preproc=yes
19650fd6 16014 ;;
edfaf76d 16015 no:yes:* )
c0d27fcc
MR
16016 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16017echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16018 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16019echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16020 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16021echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16022 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16023echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16024 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16025echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16026 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16027echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16028
19650fd6 16029 ;;
c0d27fcc 16030esac
ca81d7a0
JD
16031{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16032echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16033if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16034 echo $ECHO_N "(cached) $ECHO_C" >&6
16035else
edfaf76d 16036 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16037fi
ca81d7a0
JD
16038ac_res=`eval echo '${'$as_ac_Header'}'`
16039 { echo "$as_me:$LINENO: result: $ac_res" >&5
16040echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16041
16042fi
98418dba 16043if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16044 cat >>confdefs.h <<_ACEOF
98418dba 16045#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16046_ACEOF
48d4b120 16047
ba4481b5 16048fi
c0d27fcc 16049
98418dba
CW
16050done
16051
c0d27fcc
MR
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
22044edf
DL
16107
16108
c0d27fcc 16109
b0e44248
RB
16110
16111
973a76b1
DL
16112
16113
16114
cd958eb3 16115
25ca0bca 16116
ea92fc9f 16117
2d3c36ae
SM
16118
16119
e2fcf543 16120
5acf240e 16121
c0d27fcc
MR
16122
16123
98418dba 16124for ac_func in gethostname getdomainname dup2 \
e2fcf543 16125rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16126random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16127strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5acf240e 16128utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16129__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16130sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16131gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16132memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16133cfmakeraw cfsetspeed
98418dba
CW
16134do
16135as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16136{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16137echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16138if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16139 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16140else
503d2be0 16141 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16142/* confdefs.h. */
16143_ACEOF
16144cat confdefs.h >>conftest.$ac_ext
16145cat >>conftest.$ac_ext <<_ACEOF
16146/* end confdefs.h. */
edfaf76d
LK
16147/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16148 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16149#define $ac_func innocuous_$ac_func
16150
98418dba 16151/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16152 which can conflict with char $ac_func (); below.
16153 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16154 <limits.h> exists even on freestanding compilers. */
edfaf76d 16155
19650fd6
AS
16156#ifdef __STDC__
16157# include <limits.h>
16158#else
16159# include <assert.h>
16160#endif
edfaf76d
LK
16161
16162#undef $ac_func
16163
ca81d7a0
JD
16164/* Override any GCC internal prototype to avoid an error.
16165 Use char because int might match the return type of a GCC
16166 builtin and then its argument prototype would still apply. */
503d2be0
AS
16167#ifdef __cplusplus
16168extern "C"
16169#endif
98418dba 16170char $ac_func ();
98418dba
CW
16171/* The GNU C library defines this for functions which it implements
16172 to always fail with ENOSYS. Some functions are actually named
16173 something starting with __ and the normal name is an alias. */
ca81d7a0 16174#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16175choke me
98418dba
CW
16176#endif
16177
19650fd6
AS
16178int
16179main ()
16180{
ca81d7a0 16181return $ac_func ();
503d2be0
AS
16182 ;
16183 return 0;
16184}
16185_ACEOF
16186rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16187if { (ac_try="$ac_link"
16188case "(($ac_try" in
16189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16190 *) ac_try_echo=$ac_try;;
16191esac
16192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16193 (eval "$ac_link") 2>conftest.er1
503d2be0 16194 ac_status=$?
edfaf76d
LK
16195 grep -v '^ *+' conftest.er1 >conftest.err
16196 rm -f conftest.er1
16197 cat conftest.err >&5
c0d27fcc 16198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16199 (exit $ac_status); } && {
16200 test -z "$ac_c_werror_flag" ||
16201 test ! -s conftest.err
16202 } && test -s conftest$ac_exeext &&
16203 $as_test_x conftest$ac_exeext; then
98418dba 16204 eval "$as_ac_var=yes"
503d2be0
AS
16205else
16206 echo "$as_me: failed program was:" >&5
19650fd6
AS
16207sed 's/^/| /' conftest.$ac_ext >&5
16208
ca81d7a0 16209 eval "$as_ac_var=no"
503d2be0 16210fi
ca81d7a0 16211
f053c89f 16212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16213 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16214fi
ca81d7a0
JD
16215ac_res=`eval echo '${'$as_ac_var'}'`
16216 { echo "$as_me:$LINENO: result: $ac_res" >&5
16217echo "${ECHO_T}$ac_res" >&6; }
98418dba 16218if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16219 cat >>confdefs.h <<_ACEOF
98418dba 16220#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16221_ACEOF
ba4481b5 16222
ba4481b5 16223fi
98418dba 16224done
ba4481b5 16225
c0d27fcc
MR
16226
16227
98418dba
CW
16228for ac_header in sys/un.h
16229do
16230as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16231if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16232 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16233echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16234if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16235 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16236fi
ca81d7a0
JD
16237ac_res=`eval echo '${'$as_ac_Header'}'`
16238 { echo "$as_me:$LINENO: result: $ac_res" >&5
16239echo "${ECHO_T}$ac_res" >&6; }
98418dba 16240else
c0d27fcc 16241 # Is the header compilable?
ca81d7a0
JD
16242{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16243echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16244cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16245/* confdefs.h. */
16246_ACEOF
16247cat confdefs.h >>conftest.$ac_ext
16248cat >>conftest.$ac_ext <<_ACEOF
16249/* end confdefs.h. */
c0d27fcc
MR
16250$ac_includes_default
16251#include <$ac_header>
16252_ACEOF
16253rm -f conftest.$ac_objext
ca81d7a0
JD
16254if { (ac_try="$ac_compile"
16255case "(($ac_try" in
16256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16257 *) ac_try_echo=$ac_try;;
16258esac
16259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16260 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16261 ac_status=$?
edfaf76d
LK
16262 grep -v '^ *+' conftest.er1 >conftest.err
16263 rm -f conftest.er1
16264 cat conftest.err >&5
c0d27fcc 16265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16266 (exit $ac_status); } && {
16267 test -z "$ac_c_werror_flag" ||
16268 test ! -s conftest.err
16269 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16270 ac_header_compiler=yes
16271else
16272 echo "$as_me: failed program was:" >&5
19650fd6
AS
16273sed 's/^/| /' conftest.$ac_ext >&5
16274
ca81d7a0 16275 ac_header_compiler=no
c0d27fcc 16276fi
ca81d7a0
JD
16277
16278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16279{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16280echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16281
16282# Is the header present?
ca81d7a0
JD
16283{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16284echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16285cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16286/* confdefs.h. */
16287_ACEOF
16288cat confdefs.h >>conftest.$ac_ext
16289cat >>conftest.$ac_ext <<_ACEOF
16290/* end confdefs.h. */
98418dba 16291#include <$ac_header>
503d2be0 16292_ACEOF
ca81d7a0
JD
16293if { (ac_try="$ac_cpp conftest.$ac_ext"
16294case "(($ac_try" in
16295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16296 *) ac_try_echo=$ac_try;;
16297esac
16298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16299 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16300 ac_status=$?
6bae0ccf 16301 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16302 rm -f conftest.er1
16303 cat conftest.err >&5
c0d27fcc 16304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16305 (exit $ac_status); } >/dev/null && {
16306 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16307 test ! -s conftest.err
16308 }; then
c0d27fcc 16309 ac_header_preproc=yes
ba4481b5 16310else
503d2be0 16311 echo "$as_me: failed program was:" >&5
19650fd6
AS
16312sed 's/^/| /' conftest.$ac_ext >&5
16313
c0d27fcc 16314 ac_header_preproc=no
ba4481b5 16315fi
ca81d7a0 16316
503d2be0 16317rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16318{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16319echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16320
16321# So? What about this header?
edfaf76d
LK
16322case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16323 yes:no: )
c0d27fcc
MR
16324 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16325echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16326 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16327echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16328 ac_header_preproc=yes
19650fd6 16329 ;;
edfaf76d 16330 no:yes:* )
c0d27fcc
MR
16331 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16332echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16333 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16334echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16335 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16336echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16337 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16338echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16339 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16340echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16341 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16342echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16343
19650fd6 16344 ;;
c0d27fcc 16345esac
ca81d7a0
JD
16346{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16347echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16348if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16349 echo $ECHO_N "(cached) $ECHO_C" >&6
16350else
edfaf76d 16351 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16352fi
ca81d7a0
JD
16353ac_res=`eval echo '${'$as_ac_Header'}'`
16354 { echo "$as_me:$LINENO: result: $ac_res" >&5
16355echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16356
16357fi
925c2f3f 16358if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16359 cat >>confdefs.h <<_ACEOF
925c2f3f 16360#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16361_ACEOF
503d2be0 16362
925c2f3f 16363fi
c0d27fcc 16364
925c2f3f
EZ
16365done
16366
c0d27fcc
MR
16367
16368
16369
edfaf76d 16370
f053c89f
CY
16371
16372for ac_header in $ac_header_list
925c2f3f
EZ
16373do
16374as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16375if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16376 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16377echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16378if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16379 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16380fi
ca81d7a0
JD
16381ac_res=`eval echo '${'$as_ac_Header'}'`
16382 { echo "$as_me:$LINENO: result: $ac_res" >&5
16383echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16384else
c0d27fcc 16385 # Is the header compilable?
ca81d7a0
JD
16386{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16387echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16388cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16389/* confdefs.h. */
16390_ACEOF
16391cat confdefs.h >>conftest.$ac_ext
16392cat >>conftest.$ac_ext <<_ACEOF
16393/* end confdefs.h. */
c0d27fcc
MR
16394$ac_includes_default
16395#include <$ac_header>
16396_ACEOF
16397rm -f conftest.$ac_objext
ca81d7a0
JD
16398if { (ac_try="$ac_compile"
16399case "(($ac_try" in
16400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16401 *) ac_try_echo=$ac_try;;
16402esac
16403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16404 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16405 ac_status=$?
edfaf76d
LK
16406 grep -v '^ *+' conftest.er1 >conftest.err
16407 rm -f conftest.er1
16408 cat conftest.err >&5
c0d27fcc 16409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16410 (exit $ac_status); } && {
16411 test -z "$ac_c_werror_flag" ||
16412 test ! -s conftest.err
16413 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16414 ac_header_compiler=yes
16415else
16416 echo "$as_me: failed program was:" >&5
19650fd6
AS
16417sed 's/^/| /' conftest.$ac_ext >&5
16418
ca81d7a0 16419 ac_header_compiler=no
c0d27fcc 16420fi
ca81d7a0
JD
16421
16422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16423{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16424echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16425
16426# Is the header present?
ca81d7a0
JD
16427{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16428echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16429cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16430/* confdefs.h. */
16431_ACEOF
16432cat confdefs.h >>conftest.$ac_ext
16433cat >>conftest.$ac_ext <<_ACEOF
16434/* end confdefs.h. */
98418dba 16435#include <$ac_header>
503d2be0 16436_ACEOF
ca81d7a0
JD
16437if { (ac_try="$ac_cpp conftest.$ac_ext"
16438case "(($ac_try" in
16439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16440 *) ac_try_echo=$ac_try;;
16441esac
16442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16443 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16444 ac_status=$?
6bae0ccf 16445 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16446 rm -f conftest.er1
16447 cat conftest.err >&5
c0d27fcc 16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16449 (exit $ac_status); } >/dev/null && {
16450 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16451 test ! -s conftest.err
16452 }; then
c0d27fcc 16453 ac_header_preproc=yes
98418dba
CW
16454else
16455 echo "$as_me: failed program was:" >&5
19650fd6
AS
16456sed 's/^/| /' conftest.$ac_ext >&5
16457
c0d27fcc 16458 ac_header_preproc=no
98418dba 16459fi
ca81d7a0 16460
98418dba 16461rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16462{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16463echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16464
16465# So? What about this header?
edfaf76d
LK
16466case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16467 yes:no: )
c0d27fcc
MR
16468 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16469echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16470 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16471echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16472 ac_header_preproc=yes
19650fd6 16473 ;;
edfaf76d 16474 no:yes:* )
c0d27fcc
MR
16475 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16476echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16477 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16478echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16479 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16480echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16481 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16482echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16483 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16484echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16485 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16486echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16487
19650fd6 16488 ;;
c0d27fcc 16489esac
ca81d7a0
JD
16490{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16491echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16492if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16493 echo $ECHO_N "(cached) $ECHO_C" >&6
16494else
edfaf76d 16495 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16496fi
ca81d7a0
JD
16497ac_res=`eval echo '${'$as_ac_Header'}'`
16498 { echo "$as_me:$LINENO: result: $ac_res" >&5
16499echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16500
16501fi
98418dba 16502if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16503 cat >>confdefs.h <<_ACEOF
98418dba 16504#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16505_ACEOF
98418dba
CW
16506
16507fi
c0d27fcc 16508
98418dba
CW
16509done
16510
c0d27fcc 16511
f053c89f
CY
16512
16513
16514
16515
16516
16517
16518
16519for ac_func in $ac_func_list
98418dba
CW
16520do
16521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16522{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16524if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16525 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16526else
98418dba 16527 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16528/* confdefs.h. */
16529_ACEOF
16530cat confdefs.h >>conftest.$ac_ext
16531cat >>conftest.$ac_ext <<_ACEOF
16532/* end confdefs.h. */
edfaf76d
LK
16533/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16535#define $ac_func innocuous_$ac_func
16536
98418dba 16537/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16538 which can conflict with char $ac_func (); below.
16539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16540 <limits.h> exists even on freestanding compilers. */
edfaf76d 16541
19650fd6
AS
16542#ifdef __STDC__
16543# include <limits.h>
16544#else
16545# include <assert.h>
16546#endif
edfaf76d
LK
16547
16548#undef $ac_func
16549
ca81d7a0
JD
16550/* Override any GCC internal prototype to avoid an error.
16551 Use char because int might match the return type of a GCC
16552 builtin and then its argument prototype would still apply. */
503d2be0
AS
16553#ifdef __cplusplus
16554extern "C"
16555#endif
98418dba 16556char $ac_func ();
98418dba
CW
16557/* The GNU C library defines this for functions which it implements
16558 to always fail with ENOSYS. Some functions are actually named
16559 something starting with __ and the normal name is an alias. */
ca81d7a0 16560#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16561choke me
98418dba
CW
16562#endif
16563
19650fd6
AS
16564int
16565main ()
16566{
ca81d7a0 16567return $ac_func ();
503d2be0
AS
16568 ;
16569 return 0;
16570}
16571_ACEOF
16572rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16573if { (ac_try="$ac_link"
16574case "(($ac_try" in
16575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16576 *) ac_try_echo=$ac_try;;
16577esac
16578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16579 (eval "$ac_link") 2>conftest.er1
503d2be0 16580 ac_status=$?
edfaf76d
LK
16581 grep -v '^ *+' conftest.er1 >conftest.err
16582 rm -f conftest.er1
16583 cat conftest.err >&5
c0d27fcc 16584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16585 (exit $ac_status); } && {
16586 test -z "$ac_c_werror_flag" ||
16587 test ! -s conftest.err
16588 } && test -s conftest$ac_exeext &&
16589 $as_test_x conftest$ac_exeext; then
98418dba 16590 eval "$as_ac_var=yes"
503d2be0
AS
16591else
16592 echo "$as_me: failed program was:" >&5
19650fd6
AS
16593sed 's/^/| /' conftest.$ac_ext >&5
16594
ca81d7a0 16595 eval "$as_ac_var=no"
503d2be0 16596fi
ca81d7a0 16597
f053c89f 16598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16599 conftest$ac_exeext conftest.$ac_ext
ffe36136 16600fi
ca81d7a0
JD
16601ac_res=`eval echo '${'$as_ac_var'}'`
16602 { echo "$as_me:$LINENO: result: $ac_res" >&5
16603echo "${ECHO_T}$ac_res" >&6; }
98418dba 16604if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16605 cat >>confdefs.h <<_ACEOF
98418dba 16606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16607_ACEOF
ffe36136 16608
ba4481b5 16609fi
98418dba 16610done
ba4481b5 16611
f053c89f
CY
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
ca81d7a0
JD
16628{ echo "$as_me:$LINENO: checking for working mktime" >&5
16629echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16630if test "${ac_cv_func_working_mktime+set}" = set; then
16631 echo $ECHO_N "(cached) $ECHO_C" >&6
16632else
16633 if test "$cross_compiling" = yes; then
16634 ac_cv_func_working_mktime=no
16635else
16636 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16637/* confdefs.h. */
16638_ACEOF
16639cat confdefs.h >>conftest.$ac_ext
16640cat >>conftest.$ac_ext <<_ACEOF
16641/* end confdefs.h. */
98418dba 16642/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16643#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16644# include <sys/time.h>
16645# include <time.h>
16646#else
f053c89f 16647# ifdef HAVE_SYS_TIME_H
98418dba
CW
16648# include <sys/time.h>
16649# else
16650# include <time.h>
16651# endif
16652#endif
ba4481b5 16653
f053c89f 16654#include <stdlib.h>
edfaf76d 16655
f053c89f 16656#ifdef HAVE_UNISTD_H
98418dba
CW
16657# include <unistd.h>
16658#endif
ba4481b5 16659
f053c89f 16660#ifndef HAVE_ALARM
98418dba
CW
16661# define alarm(X) /* empty */
16662#endif
df645f7c 16663
98418dba
CW
16664/* Work around redefinition to rpl_putenv by other config tests. */
16665#undef putenv
df645f7c 16666
98418dba 16667static time_t time_t_max;
edfaf76d 16668static time_t time_t_min;
df645f7c 16669
98418dba 16670/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16671static char *tz_strings[] = {
16672 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16673 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16674};
16675#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16676
ca81d7a0 16677/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16678 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16679static int
98418dba
CW
16680spring_forward_gap ()
16681{
16682 /* glibc (up to about 1998-10-07) failed this test. */
16683 struct tm tm;
16684
16685 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16686 instead of "TZ=America/Vancouver" in order to detect the bug even
16687 on systems that don't support the Olson extension, or don't have the
16688 full zoneinfo tables installed. */
16689 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16690
16691 tm.tm_year = 98;
16692 tm.tm_mon = 3;
16693 tm.tm_mday = 5;
16694 tm.tm_hour = 2;
16695 tm.tm_min = 0;
16696 tm.tm_sec = 0;
16697 tm.tm_isdst = -1;
ca81d7a0 16698 return mktime (&tm) != (time_t) -1;
98418dba
CW
16699}
16700
ca81d7a0 16701static int
edfaf76d 16702mktime_test1 (now)
98418dba
CW
16703 time_t now;
16704{
16705 struct tm *lt;
ca81d7a0 16706 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16707}
16708
ca81d7a0 16709static int
edfaf76d
LK
16710mktime_test (now)
16711 time_t now;
16712{
ca81d7a0
JD
16713 return (mktime_test1 (now)
16714 && mktime_test1 ((time_t) (time_t_max - now))
16715 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16716}
16717
ca81d7a0 16718static int
98418dba
CW
16719irix_6_4_bug ()
16720{
16721 /* Based on code from Ariel Faigon. */
16722 struct tm tm;
16723 tm.tm_year = 96;
16724 tm.tm_mon = 3;
16725 tm.tm_mday = 0;
16726 tm.tm_hour = 0;
16727 tm.tm_min = 0;
16728 tm.tm_sec = 0;
16729 tm.tm_isdst = -1;
16730 mktime (&tm);
ca81d7a0 16731 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16732}
16733
ca81d7a0 16734static int
98418dba
CW
16735bigtime_test (j)
16736 int j;
16737{
16738 struct tm tm;
16739 time_t now;
16740 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16741 now = mktime (&tm);
16742 if (now != (time_t) -1)
16743 {
16744 struct tm *lt = localtime (&now);
16745 if (! (lt
16746 && lt->tm_year == tm.tm_year
16747 && lt->tm_mon == tm.tm_mon
16748 && lt->tm_mday == tm.tm_mday
16749 && lt->tm_hour == tm.tm_hour
16750 && lt->tm_min == tm.tm_min
16751 && lt->tm_sec == tm.tm_sec
16752 && lt->tm_yday == tm.tm_yday
16753 && lt->tm_wday == tm.tm_wday
16754 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16755 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16756 return 0;
98418dba 16757 }
ca81d7a0 16758 return 1;
98418dba
CW
16759}
16760
f053c89f
CY
16761static int
16762year_2050_test ()
16763{
16764 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16765 ignoring leap seconds. */
16766 unsigned long int answer = 2527315200UL;
16767
16768 struct tm tm;
16769 time_t t;
16770 tm.tm_year = 2050 - 1900;
16771 tm.tm_mon = 2 - 1;
16772 tm.tm_mday = 1;
16773 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16774 tm.tm_isdst = -1;
16775
16776 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16777 instead of "TZ=America/Vancouver" in order to detect the bug even
16778 on systems that don't support the Olson extension, or don't have the
16779 full zoneinfo tables installed. */
16780 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16781
16782 t = mktime (&tm);
16783
16784 /* Check that the result is either a failure, or close enough
16785 to the correct answer that we can assume the discrepancy is
16786 due to leap seconds. */
16787 return (t == (time_t) -1
16788 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16789}
16790
16791int
16792main ()
16793{
16794 time_t t, delta;
16795 int i, j;
16796
16797 /* This test makes some buggy mktime implementations loop.
16798 Give up after 60 seconds; a mktime slower than that
16799 isn't worth using anyway. */
16800 alarm (60);
16801
06b62770
AR
16802 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16803 continue;
16804 time_t_max--;
16805 if ((time_t) -1 < 0)
16806 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16807 continue;
98418dba
CW
16808 delta = time_t_max / 997; /* a suitable prime number */
16809 for (i = 0; i < N_STRINGS; i++)
16810 {
16811 if (tz_strings[i])
16812 putenv (tz_strings[i]);
503d2be0 16813
98418dba 16814 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16815 if (! mktime_test (t))
16816 return 1;
16817 if (! (mktime_test ((time_t) 1)
16818 && mktime_test ((time_t) (60 * 60))
16819 && mktime_test ((time_t) (60 * 60 * 24))))
16820 return 1;
98418dba 16821
06b62770 16822 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
16823 if (! bigtime_test (j))
16824 return 1;
06b62770 16825 if (! bigtime_test (j - 1))
ca81d7a0 16826 return 1;
98418dba 16827 }
f053c89f 16828 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16829}
16830_ACEOF
98418dba 16831rm -f conftest$ac_exeext
ca81d7a0
JD
16832if { (ac_try="$ac_link"
16833case "(($ac_try" in
16834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16835 *) ac_try_echo=$ac_try;;
16836esac
16837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16838 (eval "$ac_link") 2>&5
503d2be0 16839 ac_status=$?
c0d27fcc 16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16842 { (case "(($ac_try" in
16843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16844 *) ac_try_echo=$ac_try;;
16845esac
16846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16847 (eval "$ac_try") 2>&5
503d2be0 16848 ac_status=$?
c0d27fcc 16849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16850 (exit $ac_status); }; }; then
98418dba 16851 ac_cv_func_working_mktime=yes
503d2be0 16852else
98418dba
CW
16853 echo "$as_me: program exited with status $ac_status" >&5
16854echo "$as_me: failed program was:" >&5
19650fd6
AS
16855sed 's/^/| /' conftest.$ac_ext >&5
16856
c0d27fcc 16857( exit $ac_status )
98418dba 16858ac_cv_func_working_mktime=no
503d2be0 16859fi
ca81d7a0 16860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16861fi
ca81d7a0
JD
16862
16863
ba4481b5 16864fi
ca81d7a0
JD
16865{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16866echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16867if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16868 case " $LIBOBJS " in
edfaf76d 16869 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16870 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16871 ;;
edfaf76d
LK
16872esac
16873
ba4481b5
DL
16874fi
16875
98418dba 16876if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16877
c0d27fcc 16878cat >>confdefs.h <<\_ACEOF
98418dba 16879#define BROKEN_MKTIME 1
c0d27fcc 16880_ACEOF
ba4481b5 16881
ba4481b5 16882fi
503d2be0 16883
98418dba
CW
16884ac_have_func=no # yes means we've found a way to get the load average.
16885
6bae0ccf
DL
16886# Make sure getloadavg.c is where it belongs, at configure-time.
16887test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16888 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16889echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16890 { (exit 1); exit 1; }; }
16891
98418dba
CW
16892ac_save_LIBS=$LIBS
16893
16894# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16895({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16896echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16897if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16898 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16899else
503d2be0 16900 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16901/* confdefs.h. */
16902_ACEOF
16903cat confdefs.h >>conftest.$ac_ext
16904cat >>conftest.$ac_ext <<_ACEOF
16905/* end confdefs.h. */
edfaf76d
LK
16906/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16907 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16908#define getloadavg innocuous_getloadavg
16909
98418dba 16910/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16911 which can conflict with char getloadavg (); below.
16912 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16913 <limits.h> exists even on freestanding compilers. */
edfaf76d 16914
19650fd6
AS
16915#ifdef __STDC__
16916# include <limits.h>
16917#else
16918# include <assert.h>
16919#endif
edfaf76d
LK
16920
16921#undef getloadavg
16922
ca81d7a0
JD
16923/* Override any GCC internal prototype to avoid an error.
16924 Use char because int might match the return type of a GCC
16925 builtin and then its argument prototype would still apply. */
503d2be0
AS
16926#ifdef __cplusplus
16927extern "C"
16928#endif
98418dba 16929char getloadavg ();
98418dba
CW
16930/* The GNU C library defines this for functions which it implements
16931 to always fail with ENOSYS. Some functions are actually named
16932 something starting with __ and the normal name is an alias. */
ca81d7a0 16933#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16934choke me
cd958eb3
MB
16935#endif
16936
19650fd6
AS
16937int
16938main ()
16939{
ca81d7a0 16940return getloadavg ();
503d2be0
AS
16941 ;
16942 return 0;
16943}
16944_ACEOF
16945rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16946if { (ac_try="$ac_link"
16947case "(($ac_try" in
16948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16949 *) ac_try_echo=$ac_try;;
16950esac
16951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16952 (eval "$ac_link") 2>conftest.er1
503d2be0 16953 ac_status=$?
edfaf76d
LK
16954 grep -v '^ *+' conftest.er1 >conftest.err
16955 rm -f conftest.er1
16956 cat conftest.err >&5
c0d27fcc 16957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16958 (exit $ac_status); } && {
16959 test -z "$ac_c_werror_flag" ||
16960 test ! -s conftest.err
16961 } && test -s conftest$ac_exeext &&
16962 $as_test_x conftest$ac_exeext; then
98418dba 16963 ac_cv_func_getloadavg=yes
503d2be0
AS
16964else
16965 echo "$as_me: failed program was:" >&5
19650fd6
AS
16966sed 's/^/| /' conftest.$ac_ext >&5
16967
ca81d7a0 16968 ac_cv_func_getloadavg=no
503d2be0 16969fi
ca81d7a0 16970
f053c89f 16971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16972 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16973fi
ca81d7a0
JD
16974{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16975echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16976if test $ac_cv_func_getloadavg = yes; then
16977 exit 0
16978else
16979 exit 1
ba4481b5 16980fi
98418dba 16981) && ac_have_func=yes
ba4481b5 16982
98418dba 16983# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16984
98418dba
CW
16985for ac_func in pstat_getdynamic
16986do
16987as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16988{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16989echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16990if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16991 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16992else
503d2be0 16993 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16994/* confdefs.h. */
16995_ACEOF
16996cat confdefs.h >>conftest.$ac_ext
16997cat >>conftest.$ac_ext <<_ACEOF
16998/* end confdefs.h. */
edfaf76d
LK
16999/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17000 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17001#define $ac_func innocuous_$ac_func
17002
98418dba 17003/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17004 which can conflict with char $ac_func (); below.
17005 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17006 <limits.h> exists even on freestanding compilers. */
edfaf76d 17007
19650fd6
AS
17008#ifdef __STDC__
17009# include <limits.h>
17010#else
17011# include <assert.h>
17012#endif
edfaf76d
LK
17013
17014#undef $ac_func
17015
ca81d7a0
JD
17016/* Override any GCC internal prototype to avoid an error.
17017 Use char because int might match the return type of a GCC
17018 builtin and then its argument prototype would still apply. */
503d2be0
AS
17019#ifdef __cplusplus
17020extern "C"
17021#endif
98418dba 17022char $ac_func ();
98418dba
CW
17023/* The GNU C library defines this for functions which it implements
17024 to always fail with ENOSYS. Some functions are actually named
17025 something starting with __ and the normal name is an alias. */
ca81d7a0 17026#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17027choke me
98418dba
CW
17028#endif
17029
19650fd6
AS
17030int
17031main ()
17032{
ca81d7a0 17033return $ac_func ();
98418dba
CW
17034 ;
17035 return 0;
17036}
f21fadcc 17037_ACEOF
98418dba 17038rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17039if { (ac_try="$ac_link"
17040case "(($ac_try" in
17041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17042 *) ac_try_echo=$ac_try;;
17043esac
17044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17045 (eval "$ac_link") 2>conftest.er1
f21fadcc 17046 ac_status=$?
edfaf76d
LK
17047 grep -v '^ *+' conftest.er1 >conftest.err
17048 rm -f conftest.er1
17049 cat conftest.err >&5
c0d27fcc 17050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17051 (exit $ac_status); } && {
17052 test -z "$ac_c_werror_flag" ||
17053 test ! -s conftest.err
17054 } && test -s conftest$ac_exeext &&
17055 $as_test_x conftest$ac_exeext; then
98418dba 17056 eval "$as_ac_var=yes"
f21fadcc
JD
17057else
17058 echo "$as_me: failed program was:" >&5
19650fd6
AS
17059sed 's/^/| /' conftest.$ac_ext >&5
17060
ca81d7a0 17061 eval "$as_ac_var=no"
f21fadcc 17062fi
ca81d7a0 17063
f053c89f 17064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17065 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17066fi
ca81d7a0
JD
17067ac_res=`eval echo '${'$as_ac_var'}'`
17068 { echo "$as_me:$LINENO: result: $ac_res" >&5
17069echo "${ECHO_T}$ac_res" >&6; }
98418dba 17070if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17071 cat >>confdefs.h <<_ACEOF
98418dba 17072#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17073_ACEOF
98418dba
CW
17074
17075fi
17076done
17077
c0d27fcc 17078
98418dba
CW
17079# Solaris has libkstat which does not require root.
17080
ca81d7a0
JD
17081{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17082echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17083if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17084 echo $ECHO_N "(cached) $ECHO_C" >&6
17085else
17086 ac_check_lib_save_LIBS=$LIBS
98418dba 17087LIBS="-lkstat $LIBS"
f21fadcc 17088cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17089/* confdefs.h. */
17090_ACEOF
17091cat confdefs.h >>conftest.$ac_ext
17092cat >>conftest.$ac_ext <<_ACEOF
17093/* end confdefs.h. */
f21fadcc 17094
ca81d7a0
JD
17095/* Override any GCC internal prototype to avoid an error.
17096 Use char because int might match the return type of a GCC
17097 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17098#ifdef __cplusplus
17099extern "C"
17100#endif
98418dba 17101char kstat_open ();
f21fadcc
JD
17102int
17103main ()
17104{
ca81d7a0 17105return kstat_open ();
f21fadcc
JD
17106 ;
17107 return 0;
17108}
17109_ACEOF
17110rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17111if { (ac_try="$ac_link"
17112case "(($ac_try" in
17113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17114 *) ac_try_echo=$ac_try;;
17115esac
17116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17117 (eval "$ac_link") 2>conftest.er1
f21fadcc 17118 ac_status=$?
edfaf76d
LK
17119 grep -v '^ *+' conftest.er1 >conftest.err
17120 rm -f conftest.er1
17121 cat conftest.err >&5
c0d27fcc 17122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17123 (exit $ac_status); } && {
17124 test -z "$ac_c_werror_flag" ||
17125 test ! -s conftest.err
17126 } && test -s conftest$ac_exeext &&
17127 $as_test_x conftest$ac_exeext; then
98418dba 17128 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17129else
17130 echo "$as_me: failed program was:" >&5
19650fd6
AS
17131sed 's/^/| /' conftest.$ac_ext >&5
17132
ca81d7a0 17133 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17134fi
ca81d7a0 17135
f053c89f 17136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17137 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17138LIBS=$ac_check_lib_save_LIBS
17139fi
ca81d7a0
JD
17140{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17141echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17142if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17143 cat >>confdefs.h <<_ACEOF
98418dba 17144#define HAVE_LIBKSTAT 1
c0d27fcc 17145_ACEOF
f21fadcc 17146
98418dba 17147 LIBS="-lkstat $LIBS"
f21fadcc 17148
f21fadcc
JD
17149fi
17150
98418dba
CW
17151test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17152
17153# Some systems with -lutil have (and need) -lkvm as well, some do not.
17154# On Solaris, -lkvm requires nlist from -lelf, so check that first
17155# to get the right answer into the cache.
17156# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17157if test $ac_have_func = no; then
ca81d7a0
JD
17158 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17159echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17160if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17161 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17162else
98418dba
CW
17163 ac_check_lib_save_LIBS=$LIBS
17164LIBS="-lelf $LIBS"
17165cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17166/* confdefs.h. */
17167_ACEOF
17168cat confdefs.h >>conftest.$ac_ext
17169cat >>conftest.$ac_ext <<_ACEOF
17170/* end confdefs.h. */
98418dba 17171
ca81d7a0
JD
17172/* Override any GCC internal prototype to avoid an error.
17173 Use char because int might match the return type of a GCC
17174 builtin and then its argument prototype would still apply. */
98418dba
CW
17175#ifdef __cplusplus
17176extern "C"
17177#endif
98418dba 17178char elf_begin ();
503d2be0
AS
17179int
17180main ()
17181{
ca81d7a0 17182return elf_begin ();
503d2be0
AS
17183 ;
17184 return 0;
17185}
17186_ACEOF
17187rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17188if { (ac_try="$ac_link"
17189case "(($ac_try" in
17190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17191 *) ac_try_echo=$ac_try;;
17192esac
17193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17194 (eval "$ac_link") 2>conftest.er1
503d2be0 17195 ac_status=$?
edfaf76d
LK
17196 grep -v '^ *+' conftest.er1 >conftest.err
17197 rm -f conftest.er1
17198 cat conftest.err >&5
c0d27fcc 17199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17200 (exit $ac_status); } && {
17201 test -z "$ac_c_werror_flag" ||
17202 test ! -s conftest.err
17203 } && test -s conftest$ac_exeext &&
17204 $as_test_x conftest$ac_exeext; then
98418dba 17205 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17206else
503d2be0 17207 echo "$as_me: failed program was:" >&5
19650fd6
AS
17208sed 's/^/| /' conftest.$ac_ext >&5
17209
ca81d7a0 17210 ac_cv_lib_elf_elf_begin=no
ba4481b5 17211fi
ca81d7a0 17212
f053c89f 17213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17214 conftest$ac_exeext conftest.$ac_ext
98418dba 17215LIBS=$ac_check_lib_save_LIBS
ba4481b5 17216fi
ca81d7a0
JD
17217{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17218echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17219if test $ac_cv_lib_elf_elf_begin = yes; then
17220 LIBS="-lelf $LIBS"
ba4481b5
DL
17221fi
17222
98418dba
CW
17223fi
17224if test $ac_have_func = no; then
ca81d7a0
JD
17225 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17226echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17227if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17228 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17229else
98418dba
CW
17230 ac_check_lib_save_LIBS=$LIBS
17231LIBS="-lkvm $LIBS"
17232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17233/* confdefs.h. */
17234_ACEOF
17235cat confdefs.h >>conftest.$ac_ext
17236cat >>conftest.$ac_ext <<_ACEOF
17237/* end confdefs.h. */
98418dba 17238
ca81d7a0
JD
17239/* Override any GCC internal prototype to avoid an error.
17240 Use char because int might match the return type of a GCC
17241 builtin and then its argument prototype would still apply. */
98418dba
CW
17242#ifdef __cplusplus
17243extern "C"
17244#endif
98418dba 17245char kvm_open ();
503d2be0
AS
17246int
17247main ()
17248{
ca81d7a0 17249return kvm_open ();
503d2be0
AS
17250 ;
17251 return 0;
17252}
17253_ACEOF
17254rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17255if { (ac_try="$ac_link"
17256case "(($ac_try" in
17257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17258 *) ac_try_echo=$ac_try;;
17259esac
17260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17261 (eval "$ac_link") 2>conftest.er1
503d2be0 17262 ac_status=$?
edfaf76d
LK
17263 grep -v '^ *+' conftest.er1 >conftest.err
17264 rm -f conftest.er1
17265 cat conftest.err >&5
c0d27fcc 17266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17267 (exit $ac_status); } && {
17268 test -z "$ac_c_werror_flag" ||
17269 test ! -s conftest.err
17270 } && test -s conftest$ac_exeext &&
17271 $as_test_x conftest$ac_exeext; then
98418dba 17272 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17273else
17274 echo "$as_me: failed program was:" >&5
19650fd6
AS
17275sed 's/^/| /' conftest.$ac_ext >&5
17276
ca81d7a0 17277 ac_cv_lib_kvm_kvm_open=no
503d2be0 17278fi
ca81d7a0 17279
f053c89f 17280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17281 conftest$ac_exeext conftest.$ac_ext
98418dba 17282LIBS=$ac_check_lib_save_LIBS
503d2be0 17283fi
ca81d7a0
JD
17284{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17285echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17286if test $ac_cv_lib_kvm_kvm_open = yes; then
17287 LIBS="-lkvm $LIBS"
ba4481b5
DL
17288fi
17289
98418dba 17290 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17291 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17292echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17293if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17294 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17295else
98418dba
CW
17296 ac_check_lib_save_LIBS=$LIBS
17297LIBS="-lutil $LIBS"
17298cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17299/* confdefs.h. */
17300_ACEOF
17301cat confdefs.h >>conftest.$ac_ext
17302cat >>conftest.$ac_ext <<_ACEOF
17303/* end confdefs.h. */
98418dba 17304
ca81d7a0
JD
17305/* Override any GCC internal prototype to avoid an error.
17306 Use char because int might match the return type of a GCC
17307 builtin and then its argument prototype would still apply. */
98418dba
CW
17308#ifdef __cplusplus
17309extern "C"
17310#endif
98418dba 17311char getloadavg ();
503d2be0
AS
17312int
17313main ()
17314{
ca81d7a0 17315return getloadavg ();
503d2be0
AS
17316 ;
17317 return 0;
17318}
17319_ACEOF
17320rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17321if { (ac_try="$ac_link"
17322case "(($ac_try" in
17323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17324 *) ac_try_echo=$ac_try;;
17325esac
17326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17327 (eval "$ac_link") 2>conftest.er1
503d2be0 17328 ac_status=$?
edfaf76d
LK
17329 grep -v '^ *+' conftest.er1 >conftest.err
17330 rm -f conftest.er1
17331 cat conftest.err >&5
c0d27fcc 17332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17333 (exit $ac_status); } && {
17334 test -z "$ac_c_werror_flag" ||
17335 test ! -s conftest.err
17336 } && test -s conftest$ac_exeext &&
17337 $as_test_x conftest$ac_exeext; then
35996d22
AS
17338 ac_cv_lib_util_getloadavg=yes
17339else
503d2be0 17340 echo "$as_me: failed program was:" >&5
19650fd6
AS
17341sed 's/^/| /' conftest.$ac_ext >&5
17342
ca81d7a0 17343 ac_cv_lib_util_getloadavg=no
ba4481b5 17344fi
ca81d7a0 17345
f053c89f 17346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17347 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17348LIBS=$ac_check_lib_save_LIBS
17349fi
ca81d7a0
JD
17350{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17351echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17352if test $ac_cv_lib_util_getloadavg = yes; then
17353 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17354fi
503d2be0 17355
98418dba 17356fi
ba4481b5 17357
98418dba
CW
17358if test $ac_have_func = no; then
17359 # There is a commonly available library for RS/6000 AIX.
17360 # Since it is not a standard part of AIX, it might be installed locally.
17361 ac_getloadavg_LIBS=$LIBS
17362 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17363 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17364echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17365if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17366 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17367else
98418dba
CW
17368 ac_check_lib_save_LIBS=$LIBS
17369LIBS="-lgetloadavg $LIBS"
17370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17371/* confdefs.h. */
17372_ACEOF
17373cat confdefs.h >>conftest.$ac_ext
17374cat >>conftest.$ac_ext <<_ACEOF
17375/* end confdefs.h. */
ba4481b5 17376
ca81d7a0
JD
17377/* Override any GCC internal prototype to avoid an error.
17378 Use char because int might match the return type of a GCC
17379 builtin and then its argument prototype would still apply. */
98418dba
CW
17380#ifdef __cplusplus
17381extern "C"
17382#endif
98418dba 17383char getloadavg ();
98418dba
CW
17384int
17385main ()
17386{
ca81d7a0 17387return getloadavg ();
98418dba
CW
17388 ;
17389 return 0;
17390}
503d2be0 17391_ACEOF
98418dba 17392rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17393if { (ac_try="$ac_link"
17394case "(($ac_try" in
17395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17396 *) ac_try_echo=$ac_try;;
17397esac
17398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17399 (eval "$ac_link") 2>conftest.er1
98418dba 17400 ac_status=$?
edfaf76d
LK
17401 grep -v '^ *+' conftest.er1 >conftest.err
17402 rm -f conftest.er1
17403 cat conftest.err >&5
c0d27fcc 17404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17405 (exit $ac_status); } && {
17406 test -z "$ac_c_werror_flag" ||
17407 test ! -s conftest.err
17408 } && test -s conftest$ac_exeext &&
17409 $as_test_x conftest$ac_exeext; then
98418dba 17410 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17411else
98418dba 17412 echo "$as_me: failed program was:" >&5
19650fd6
AS
17413sed 's/^/| /' conftest.$ac_ext >&5
17414
ca81d7a0 17415 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17416fi
ca81d7a0 17417
f053c89f 17418rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17419 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17420LIBS=$ac_check_lib_save_LIBS
17421fi
ca81d7a0
JD
17422{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17423echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17424if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17425 LIBS="-lgetloadavg $LIBS"
17426else
17427 LIBS=$ac_getloadavg_LIBS
ba4481b5 17428fi
ba4481b5
DL
17429
17430fi
98418dba
CW
17431
17432# Make sure it is really in the library, if we think we found it,
17433# otherwise set up the replacement function.
17434
17435for ac_func in getloadavg
17436do
17437as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17438{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17439echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17440if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17441 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17442else
503d2be0 17443 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17444/* confdefs.h. */
17445_ACEOF
17446cat confdefs.h >>conftest.$ac_ext
17447cat >>conftest.$ac_ext <<_ACEOF
17448/* end confdefs.h. */
edfaf76d
LK
17449/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17450 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17451#define $ac_func innocuous_$ac_func
17452
ba4481b5 17453/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17454 which can conflict with char $ac_func (); below.
17455 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17456 <limits.h> exists even on freestanding compilers. */
edfaf76d 17457
19650fd6
AS
17458#ifdef __STDC__
17459# include <limits.h>
17460#else
17461# include <assert.h>
17462#endif
edfaf76d
LK
17463
17464#undef $ac_func
17465
ca81d7a0
JD
17466/* Override any GCC internal prototype to avoid an error.
17467 Use char because int might match the return type of a GCC
17468 builtin and then its argument prototype would still apply. */
503d2be0
AS
17469#ifdef __cplusplus
17470extern "C"
17471#endif
503d2be0 17472char $ac_func ();
ba4481b5
DL
17473/* The GNU C library defines this for functions which it implements
17474 to always fail with ENOSYS. Some functions are actually named
17475 something starting with __ and the normal name is an alias. */
ca81d7a0 17476#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17477choke me
cd958eb3
MB
17478#endif
17479
19650fd6
AS
17480int
17481main ()
17482{
ca81d7a0 17483return $ac_func ();
503d2be0
AS
17484 ;
17485 return 0;
17486}
17487_ACEOF
17488rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17489if { (ac_try="$ac_link"
17490case "(($ac_try" in
17491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17492 *) ac_try_echo=$ac_try;;
17493esac
17494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17495 (eval "$ac_link") 2>conftest.er1
503d2be0 17496 ac_status=$?
edfaf76d
LK
17497 grep -v '^ *+' conftest.er1 >conftest.err
17498 rm -f conftest.er1
17499 cat conftest.err >&5
c0d27fcc 17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17501 (exit $ac_status); } && {
17502 test -z "$ac_c_werror_flag" ||
17503 test ! -s conftest.err
17504 } && test -s conftest$ac_exeext &&
17505 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17506 eval "$as_ac_var=yes"
17507else
17508 echo "$as_me: failed program was:" >&5
19650fd6
AS
17509sed 's/^/| /' conftest.$ac_ext >&5
17510
ca81d7a0 17511 eval "$as_ac_var=no"
503d2be0 17512fi
ca81d7a0 17513
f053c89f 17514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17515 conftest$ac_exeext conftest.$ac_ext
503d2be0 17516fi
ca81d7a0
JD
17517ac_res=`eval echo '${'$as_ac_var'}'`
17518 { echo "$as_me:$LINENO: result: $ac_res" >&5
17519echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17520if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17521 cat >>confdefs.h <<_ACEOF
98418dba 17522#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17523_ACEOF
503d2be0 17524
98418dba 17525else
ca81d7a0 17526 case " $LIBOBJS " in
edfaf76d 17527 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17528 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17529 ;;
edfaf76d
LK
17530esac
17531
ba4481b5 17532
c0d27fcc 17533cat >>confdefs.h <<\_ACEOF
98418dba 17534#define C_GETLOADAVG 1
c0d27fcc 17535_ACEOF
ba4481b5 17536
98418dba
CW
17537# Figure out what our getloadavg.c needs.
17538ac_have_func=no
c0d27fcc 17539if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17540 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17541echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17542if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17543 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17544fi
ca81d7a0
JD
17545{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17546echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17547else
c0d27fcc 17548 # Is the header compilable?
ca81d7a0
JD
17549{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17550echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17551cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17552/* confdefs.h. */
17553_ACEOF
17554cat confdefs.h >>conftest.$ac_ext
17555cat >>conftest.$ac_ext <<_ACEOF
17556/* end confdefs.h. */
c0d27fcc
MR
17557$ac_includes_default
17558#include <sys/dg_sys_info.h>
17559_ACEOF
17560rm -f conftest.$ac_objext
ca81d7a0
JD
17561if { (ac_try="$ac_compile"
17562case "(($ac_try" in
17563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17564 *) ac_try_echo=$ac_try;;
17565esac
17566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17567 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17568 ac_status=$?
edfaf76d
LK
17569 grep -v '^ *+' conftest.er1 >conftest.err
17570 rm -f conftest.er1
17571 cat conftest.err >&5
c0d27fcc 17572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17573 (exit $ac_status); } && {
17574 test -z "$ac_c_werror_flag" ||
17575 test ! -s conftest.err
17576 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17577 ac_header_compiler=yes
17578else
17579 echo "$as_me: failed program was:" >&5
19650fd6
AS
17580sed 's/^/| /' conftest.$ac_ext >&5
17581
ca81d7a0 17582 ac_header_compiler=no
c0d27fcc 17583fi
ca81d7a0
JD
17584
17585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17586{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17587echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17588
17589# Is the header present?
ca81d7a0
JD
17590{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17591echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17592cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17593/* confdefs.h. */
17594_ACEOF
17595cat confdefs.h >>conftest.$ac_ext
17596cat >>conftest.$ac_ext <<_ACEOF
17597/* end confdefs.h. */
98418dba
CW
17598#include <sys/dg_sys_info.h>
17599_ACEOF
ca81d7a0
JD
17600if { (ac_try="$ac_cpp conftest.$ac_ext"
17601case "(($ac_try" in
17602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17603 *) ac_try_echo=$ac_try;;
17604esac
17605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17606 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17607 ac_status=$?
6bae0ccf 17608 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17609 rm -f conftest.er1
17610 cat conftest.err >&5
c0d27fcc 17611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17612 (exit $ac_status); } >/dev/null && {
17613 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17614 test ! -s conftest.err
17615 }; then
c0d27fcc 17616 ac_header_preproc=yes
98418dba
CW
17617else
17618 echo "$as_me: failed program was:" >&5
19650fd6
AS
17619sed 's/^/| /' conftest.$ac_ext >&5
17620
c0d27fcc 17621 ac_header_preproc=no
ba4481b5 17622fi
ca81d7a0 17623
98418dba 17624rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17625{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17626echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17627
17628# So? What about this header?
edfaf76d
LK
17629case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17630 yes:no: )
c0d27fcc
MR
17631 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17632echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17633 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17634echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17635 ac_header_preproc=yes
19650fd6 17636 ;;
edfaf76d 17637 no:yes:* )
c0d27fcc
MR
17638 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17639echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17640 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17641echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17642 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17643echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17644 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17645echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17646 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17647echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17648 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17649echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17650
19650fd6 17651 ;;
c0d27fcc 17652esac
ca81d7a0
JD
17653{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17654echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17655if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17656 echo $ECHO_N "(cached) $ECHO_C" >&6
17657else
17658 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17659fi
ca81d7a0
JD
17660{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17661echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17662
17663fi
98418dba
CW
17664if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17665 ac_have_func=yes
ba4481b5 17666
c0d27fcc 17667cat >>confdefs.h <<\_ACEOF
98418dba 17668#define DGUX 1
c0d27fcc
MR
17669_ACEOF
17670
503d2be0 17671
ca81d7a0
JD
17672{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17673echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17674if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17675 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17676else
503d2be0 17677 ac_check_lib_save_LIBS=$LIBS
98418dba 17678LIBS="-ldgc $LIBS"
503d2be0 17679cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17680/* confdefs.h. */
17681_ACEOF
17682cat confdefs.h >>conftest.$ac_ext
17683cat >>conftest.$ac_ext <<_ACEOF
17684/* end confdefs.h. */
503d2be0 17685
ca81d7a0
JD
17686/* Override any GCC internal prototype to avoid an error.
17687 Use char because int might match the return type of a GCC
17688 builtin and then its argument prototype would still apply. */
503d2be0
AS
17689#ifdef __cplusplus
17690extern "C"
17691#endif
98418dba 17692char dg_sys_info ();
503d2be0
AS
17693int
17694main ()
17695{
ca81d7a0 17696return dg_sys_info ();
503d2be0
AS
17697 ;
17698 return 0;
17699}
17700_ACEOF
17701rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17702if { (ac_try="$ac_link"
17703case "(($ac_try" in
17704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17705 *) ac_try_echo=$ac_try;;
17706esac
17707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17708 (eval "$ac_link") 2>conftest.er1
503d2be0 17709 ac_status=$?
edfaf76d
LK
17710 grep -v '^ *+' conftest.er1 >conftest.err
17711 rm -f conftest.er1
17712 cat conftest.err >&5
c0d27fcc 17713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17714 (exit $ac_status); } && {
17715 test -z "$ac_c_werror_flag" ||
17716 test ! -s conftest.err
17717 } && test -s conftest$ac_exeext &&
17718 $as_test_x conftest$ac_exeext; then
98418dba 17719 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17720else
17721 echo "$as_me: failed program was:" >&5
19650fd6
AS
17722sed 's/^/| /' conftest.$ac_ext >&5
17723
ca81d7a0 17724 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17725fi
ca81d7a0 17726
f053c89f 17727rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17728 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17729LIBS=$ac_check_lib_save_LIBS
17730fi
ca81d7a0
JD
17731{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17732echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17733if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17734 cat >>confdefs.h <<_ACEOF
98418dba 17735#define HAVE_LIBDGC 1
c0d27fcc 17736_ACEOF
ba4481b5 17737
98418dba 17738 LIBS="-ldgc $LIBS"
ba4481b5 17739
ba4481b5
DL
17740fi
17741
98418dba 17742fi
503d2be0 17743
c0d27fcc
MR
17744
17745
17746if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17747 { echo "$as_me:$LINENO: checking for locale.h" >&5
17748echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17749if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17750 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17751fi
ca81d7a0
JD
17752{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17753echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17754else
c0d27fcc 17755 # Is the header compilable?
ca81d7a0
JD
17756{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17757echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17758cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
c0d27fcc
MR
17764$ac_includes_default
17765#include <locale.h>
17766_ACEOF
17767rm -f conftest.$ac_objext
ca81d7a0
JD
17768if { (ac_try="$ac_compile"
17769case "(($ac_try" in
17770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17771 *) ac_try_echo=$ac_try;;
17772esac
17773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17774 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17775 ac_status=$?
edfaf76d
LK
17776 grep -v '^ *+' conftest.er1 >conftest.err
17777 rm -f conftest.er1
17778 cat conftest.err >&5
c0d27fcc 17779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17780 (exit $ac_status); } && {
17781 test -z "$ac_c_werror_flag" ||
17782 test ! -s conftest.err
17783 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17784 ac_header_compiler=yes
17785else
17786 echo "$as_me: failed program was:" >&5
19650fd6
AS
17787sed 's/^/| /' conftest.$ac_ext >&5
17788
ca81d7a0 17789 ac_header_compiler=no
c0d27fcc 17790fi
ca81d7a0
JD
17791
17792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17793{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17794echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17795
17796# Is the header present?
ca81d7a0
JD
17797{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17798echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17799cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17800/* confdefs.h. */
17801_ACEOF
17802cat confdefs.h >>conftest.$ac_ext
17803cat >>conftest.$ac_ext <<_ACEOF
17804/* end confdefs.h. */
98418dba 17805#include <locale.h>
503d2be0 17806_ACEOF
ca81d7a0
JD
17807if { (ac_try="$ac_cpp conftest.$ac_ext"
17808case "(($ac_try" in
17809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17810 *) ac_try_echo=$ac_try;;
17811esac
17812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17813 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17814 ac_status=$?
6bae0ccf 17815 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17816 rm -f conftest.er1
17817 cat conftest.err >&5
c0d27fcc 17818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17819 (exit $ac_status); } >/dev/null && {
17820 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17821 test ! -s conftest.err
17822 }; then
c0d27fcc 17823 ac_header_preproc=yes
98418dba
CW
17824else
17825 echo "$as_me: failed program was:" >&5
19650fd6
AS
17826sed 's/^/| /' conftest.$ac_ext >&5
17827
c0d27fcc 17828 ac_header_preproc=no
ba4481b5 17829fi
ca81d7a0 17830
98418dba 17831rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17832{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17833echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17834
17835# So? What about this header?
edfaf76d
LK
17836case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17837 yes:no: )
c0d27fcc
MR
17838 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17839echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17840 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17841echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17842 ac_header_preproc=yes
19650fd6 17843 ;;
edfaf76d 17844 no:yes:* )
c0d27fcc
MR
17845 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17846echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17847 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17848echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17849 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17850echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17851 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17852echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17853 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17854echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17855 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17856echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17857
19650fd6 17858 ;;
c0d27fcc 17859esac
ca81d7a0
JD
17860{ echo "$as_me:$LINENO: checking for locale.h" >&5
17861echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17862if test "${ac_cv_header_locale_h+set}" = set; then
17863 echo $ECHO_N "(cached) $ECHO_C" >&6
17864else
17865 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17866fi
ca81d7a0
JD
17867{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17868echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17869
c0d27fcc
MR
17870fi
17871
17872
17873
98418dba 17874for ac_func in setlocale
ba4481b5 17875do
503d2be0 17876as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17877{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17878echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17879if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17880 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17881else
503d2be0 17882 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17883/* confdefs.h. */
17884_ACEOF
17885cat confdefs.h >>conftest.$ac_ext
17886cat >>conftest.$ac_ext <<_ACEOF
17887/* end confdefs.h. */
edfaf76d
LK
17888/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17889 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17890#define $ac_func innocuous_$ac_func
17891
ba4481b5 17892/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17893 which can conflict with char $ac_func (); below.
17894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17895 <limits.h> exists even on freestanding compilers. */
edfaf76d 17896
19650fd6
AS
17897#ifdef __STDC__
17898# include <limits.h>
17899#else
17900# include <assert.h>
17901#endif
edfaf76d
LK
17902
17903#undef $ac_func
17904
ca81d7a0
JD
17905/* Override any GCC internal prototype to avoid an error.
17906 Use char because int might match the return type of a GCC
17907 builtin and then its argument prototype would still apply. */
503d2be0
AS
17908#ifdef __cplusplus
17909extern "C"
17910#endif
503d2be0 17911char $ac_func ();
ba4481b5
DL
17912/* The GNU C library defines this for functions which it implements
17913 to always fail with ENOSYS. Some functions are actually named
17914 something starting with __ and the normal name is an alias. */
ca81d7a0 17915#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17916choke me
ba4481b5
DL
17917#endif
17918
19650fd6
AS
17919int
17920main ()
17921{
ca81d7a0 17922return $ac_func ();
503d2be0
AS
17923 ;
17924 return 0;
17925}
17926_ACEOF
17927rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17928if { (ac_try="$ac_link"
17929case "(($ac_try" in
17930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17931 *) ac_try_echo=$ac_try;;
17932esac
17933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17934 (eval "$ac_link") 2>conftest.er1
503d2be0 17935 ac_status=$?
edfaf76d
LK
17936 grep -v '^ *+' conftest.er1 >conftest.err
17937 rm -f conftest.er1
17938 cat conftest.err >&5
c0d27fcc 17939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17940 (exit $ac_status); } && {
17941 test -z "$ac_c_werror_flag" ||
17942 test ! -s conftest.err
17943 } && test -s conftest$ac_exeext &&
17944 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17945 eval "$as_ac_var=yes"
17946else
17947 echo "$as_me: failed program was:" >&5
19650fd6
AS
17948sed 's/^/| /' conftest.$ac_ext >&5
17949
ca81d7a0 17950 eval "$as_ac_var=no"
503d2be0 17951fi
ca81d7a0 17952
f053c89f 17953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17954 conftest$ac_exeext conftest.$ac_ext
503d2be0 17955fi
ca81d7a0
JD
17956ac_res=`eval echo '${'$as_ac_var'}'`
17957 { echo "$as_me:$LINENO: result: $ac_res" >&5
17958echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17959if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17960 cat >>confdefs.h <<_ACEOF
503d2be0 17961#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17962_ACEOF
ba4481b5 17963
ba4481b5
DL
17964fi
17965done
17966
c0d27fcc 17967
98418dba
CW
17968# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17969# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17970# Irix 4.0.5F has the header but not the library.
17971if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17972 ac_have_func=yes
17973
c0d27fcc 17974cat >>confdefs.h <<\_ACEOF
98418dba 17975#define SVR4 1
c0d27fcc 17976_ACEOF
98418dba
CW
17977
17978fi
17979
17980if test $ac_have_func = no; then
c0d27fcc 17981 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17982 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17983echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17984if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17985 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17986fi
ca81d7a0
JD
17987{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17988echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17989else
c0d27fcc 17990 # Is the header compilable?
ca81d7a0
JD
17991{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17992echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17993cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17994/* confdefs.h. */
17995_ACEOF
17996cat confdefs.h >>conftest.$ac_ext
17997cat >>conftest.$ac_ext <<_ACEOF
17998/* end confdefs.h. */
c0d27fcc
MR
17999$ac_includes_default
18000#include <inq_stats/cpustats.h>
18001_ACEOF
18002rm -f conftest.$ac_objext
ca81d7a0
JD
18003if { (ac_try="$ac_compile"
18004case "(($ac_try" in
18005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18006 *) ac_try_echo=$ac_try;;
18007esac
18008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18009 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18010 ac_status=$?
edfaf76d
LK
18011 grep -v '^ *+' conftest.er1 >conftest.err
18012 rm -f conftest.er1
18013 cat conftest.err >&5
c0d27fcc 18014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18015 (exit $ac_status); } && {
18016 test -z "$ac_c_werror_flag" ||
18017 test ! -s conftest.err
18018 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18019 ac_header_compiler=yes
18020else
18021 echo "$as_me: failed program was:" >&5
19650fd6
AS
18022sed 's/^/| /' conftest.$ac_ext >&5
18023
ca81d7a0 18024 ac_header_compiler=no
c0d27fcc 18025fi
ca81d7a0
JD
18026
18027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18028{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18029echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18030
18031# Is the header present?
ca81d7a0
JD
18032{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18033echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18034cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18035/* confdefs.h. */
18036_ACEOF
18037cat confdefs.h >>conftest.$ac_ext
18038cat >>conftest.$ac_ext <<_ACEOF
18039/* end confdefs.h. */
98418dba 18040#include <inq_stats/cpustats.h>
503d2be0 18041_ACEOF
ca81d7a0
JD
18042if { (ac_try="$ac_cpp conftest.$ac_ext"
18043case "(($ac_try" in
18044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18045 *) ac_try_echo=$ac_try;;
18046esac
18047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18048 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18049 ac_status=$?
6bae0ccf 18050 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18051 rm -f conftest.er1
18052 cat conftest.err >&5
c0d27fcc 18053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18054 (exit $ac_status); } >/dev/null && {
18055 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18056 test ! -s conftest.err
18057 }; then
c0d27fcc 18058 ac_header_preproc=yes
503d2be0
AS
18059else
18060 echo "$as_me: failed program was:" >&5
19650fd6
AS
18061sed 's/^/| /' conftest.$ac_ext >&5
18062
c0d27fcc 18063 ac_header_preproc=no
ba4481b5 18064fi
ca81d7a0 18065
503d2be0 18066rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18067{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18068echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18069
18070# So? What about this header?
edfaf76d
LK
18071case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18072 yes:no: )
c0d27fcc
MR
18073 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18074echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18075 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18076echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18077 ac_header_preproc=yes
19650fd6 18078 ;;
edfaf76d 18079 no:yes:* )
c0d27fcc
MR
18080 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18081echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18082 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18083echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18084 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18085echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18086 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18087echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18088 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18089echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18090 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18091echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18092
19650fd6 18093 ;;
c0d27fcc 18094esac
ca81d7a0
JD
18095{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18096echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18097if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18098 echo $ECHO_N "(cached) $ECHO_C" >&6
18099else
18100 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18101fi
ca81d7a0
JD
18102{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18103echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18104
18105fi
98418dba
CW
18106if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18107 ac_have_func=yes
ba4481b5 18108
c0d27fcc 18109cat >>confdefs.h <<\_ACEOF
98418dba 18110#define UMAX 1
c0d27fcc 18111_ACEOF
98418dba 18112
c0d27fcc
MR
18113
18114cat >>confdefs.h <<\_ACEOF
98418dba 18115#define UMAX4_3 1
c0d27fcc 18116_ACEOF
98418dba
CW
18117
18118fi
18119
c0d27fcc 18120
98418dba
CW
18121fi
18122
18123if test $ac_have_func = no; then
c0d27fcc 18124 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18125 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18126echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18127if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18128 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18129fi
ca81d7a0
JD
18130{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18131echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18132else
c0d27fcc 18133 # Is the header compilable?
ca81d7a0
JD
18134{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18135echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18136cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18137/* confdefs.h. */
18138_ACEOF
18139cat confdefs.h >>conftest.$ac_ext
18140cat >>conftest.$ac_ext <<_ACEOF
18141/* end confdefs.h. */
c0d27fcc
MR
18142$ac_includes_default
18143#include <sys/cpustats.h>
18144_ACEOF
18145rm -f conftest.$ac_objext
ca81d7a0
JD
18146if { (ac_try="$ac_compile"
18147case "(($ac_try" in
18148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18149 *) ac_try_echo=$ac_try;;
18150esac
18151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18152 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18153 ac_status=$?
edfaf76d
LK
18154 grep -v '^ *+' conftest.er1 >conftest.err
18155 rm -f conftest.er1
18156 cat conftest.err >&5
c0d27fcc 18157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18158 (exit $ac_status); } && {
18159 test -z "$ac_c_werror_flag" ||
18160 test ! -s conftest.err
18161 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18162 ac_header_compiler=yes
18163else
18164 echo "$as_me: failed program was:" >&5
19650fd6
AS
18165sed 's/^/| /' conftest.$ac_ext >&5
18166
ca81d7a0 18167 ac_header_compiler=no
c0d27fcc 18168fi
ca81d7a0
JD
18169
18170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18171{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18172echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18173
18174# Is the header present?
ca81d7a0
JD
18175{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18176echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
98418dba
CW
18183#include <sys/cpustats.h>
18184_ACEOF
ca81d7a0
JD
18185if { (ac_try="$ac_cpp conftest.$ac_ext"
18186case "(($ac_try" in
18187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18188 *) ac_try_echo=$ac_try;;
18189esac
18190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18191 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18192 ac_status=$?
6bae0ccf 18193 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18194 rm -f conftest.er1
18195 cat conftest.err >&5
c0d27fcc 18196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18197 (exit $ac_status); } >/dev/null && {
18198 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18199 test ! -s conftest.err
18200 }; then
c0d27fcc 18201 ac_header_preproc=yes
98418dba
CW
18202else
18203 echo "$as_me: failed program was:" >&5
19650fd6
AS
18204sed 's/^/| /' conftest.$ac_ext >&5
18205
c0d27fcc 18206 ac_header_preproc=no
98418dba 18207fi
ca81d7a0 18208
98418dba 18209rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18210{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18211echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18212
18213# So? What about this header?
edfaf76d
LK
18214case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18215 yes:no: )
c0d27fcc
MR
18216 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18217echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18218 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18219echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18220 ac_header_preproc=yes
19650fd6 18221 ;;
edfaf76d 18222 no:yes:* )
c0d27fcc
MR
18223 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18224echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18225 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18226echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18227 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18228echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18229 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18230echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18231 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18232echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18233 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18234echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18235
19650fd6 18236 ;;
c0d27fcc 18237esac
ca81d7a0
JD
18238{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18239echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18240if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18241 echo $ECHO_N "(cached) $ECHO_C" >&6
18242else
18243 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18244fi
ca81d7a0
JD
18245{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18246echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18247
18248fi
98418dba 18249if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18250 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18251#define UMAX 1
c0d27fcc 18252_ACEOF
ba4481b5 18253
98418dba
CW
18254fi
18255
c0d27fcc 18256
98418dba
CW
18257fi
18258
18259if test $ac_have_func = no; then
18260
18261for ac_header in mach/mach.h
2c9dccc9
PJ
18262do
18263as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18264if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18265 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18266echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18267if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18268 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18269fi
ca81d7a0
JD
18270ac_res=`eval echo '${'$as_ac_Header'}'`
18271 { echo "$as_me:$LINENO: result: $ac_res" >&5
18272echo "${ECHO_T}$ac_res" >&6; }
98418dba 18273else
c0d27fcc 18274 # Is the header compilable?
ca81d7a0
JD
18275{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18276echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18277cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18278/* confdefs.h. */
18279_ACEOF
18280cat confdefs.h >>conftest.$ac_ext
18281cat >>conftest.$ac_ext <<_ACEOF
18282/* end confdefs.h. */
c0d27fcc
MR
18283$ac_includes_default
18284#include <$ac_header>
18285_ACEOF
18286rm -f conftest.$ac_objext
ca81d7a0
JD
18287if { (ac_try="$ac_compile"
18288case "(($ac_try" in
18289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18290 *) ac_try_echo=$ac_try;;
18291esac
18292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18293 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18294 ac_status=$?
edfaf76d
LK
18295 grep -v '^ *+' conftest.er1 >conftest.err
18296 rm -f conftest.er1
18297 cat conftest.err >&5
c0d27fcc 18298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18299 (exit $ac_status); } && {
18300 test -z "$ac_c_werror_flag" ||
18301 test ! -s conftest.err
18302 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18303 ac_header_compiler=yes
18304else
18305 echo "$as_me: failed program was:" >&5
19650fd6
AS
18306sed 's/^/| /' conftest.$ac_ext >&5
18307
ca81d7a0 18308 ac_header_compiler=no
c0d27fcc 18309fi
ca81d7a0
JD
18310
18311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18312{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18313echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18314
18315# Is the header present?
ca81d7a0
JD
18316{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18317echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18318cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18319/* confdefs.h. */
18320_ACEOF
18321cat confdefs.h >>conftest.$ac_ext
18322cat >>conftest.$ac_ext <<_ACEOF
18323/* end confdefs.h. */
2c9dccc9
PJ
18324#include <$ac_header>
18325_ACEOF
ca81d7a0
JD
18326if { (ac_try="$ac_cpp conftest.$ac_ext"
18327case "(($ac_try" in
18328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18329 *) ac_try_echo=$ac_try;;
18330esac
18331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18332 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18333 ac_status=$?
6bae0ccf 18334 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18335 rm -f conftest.er1
18336 cat conftest.err >&5
c0d27fcc 18337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18338 (exit $ac_status); } >/dev/null && {
18339 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18340 test ! -s conftest.err
18341 }; then
c0d27fcc
MR
18342 ac_header_preproc=yes
18343else
18344 echo "$as_me: failed program was:" >&5
19650fd6
AS
18345sed 's/^/| /' conftest.$ac_ext >&5
18346
c0d27fcc
MR
18347 ac_header_preproc=no
18348fi
ca81d7a0 18349
c0d27fcc 18350rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18351{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18352echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18353
18354# So? What about this header?
edfaf76d
LK
18355case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18356 yes:no: )
c0d27fcc
MR
18357 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18358echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18359 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18360echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18361 ac_header_preproc=yes
19650fd6 18362 ;;
edfaf76d 18363 no:yes:* )
c0d27fcc
MR
18364 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18365echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18366 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18367echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18368 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18369echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18370 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18371echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18372 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18373echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18374 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18375echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18376
19650fd6 18377 ;;
c0d27fcc 18378esac
ca81d7a0
JD
18379{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18382 echo $ECHO_N "(cached) $ECHO_C" >&6
18383else
edfaf76d 18384 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18385fi
ca81d7a0
JD
18386ac_res=`eval echo '${'$as_ac_Header'}'`
18387 { echo "$as_me:$LINENO: result: $ac_res" >&5
18388echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18389
18390fi
18391if test `eval echo '${'$as_ac_Header'}'` = yes; then
18392 cat >>confdefs.h <<_ACEOF
18393#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18394_ACEOF
18395
18396fi
18397
18398done
18399
18400fi
18401
18402
18403for ac_header in nlist.h
18404do
18405as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18406if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18407 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18409if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18410 echo $ECHO_N "(cached) $ECHO_C" >&6
18411fi
ca81d7a0
JD
18412ac_res=`eval echo '${'$as_ac_Header'}'`
18413 { echo "$as_me:$LINENO: result: $ac_res" >&5
18414echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18415else
18416 # Is the header compilable?
ca81d7a0
JD
18417{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18418echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18419cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18420/* confdefs.h. */
18421_ACEOF
18422cat confdefs.h >>conftest.$ac_ext
18423cat >>conftest.$ac_ext <<_ACEOF
18424/* end confdefs.h. */
c0d27fcc
MR
18425$ac_includes_default
18426#include <$ac_header>
18427_ACEOF
18428rm -f conftest.$ac_objext
ca81d7a0
JD
18429if { (ac_try="$ac_compile"
18430case "(($ac_try" in
18431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18432 *) ac_try_echo=$ac_try;;
18433esac
18434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18435 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18436 ac_status=$?
edfaf76d
LK
18437 grep -v '^ *+' conftest.er1 >conftest.err
18438 rm -f conftest.er1
18439 cat conftest.err >&5
c0d27fcc 18440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18441 (exit $ac_status); } && {
18442 test -z "$ac_c_werror_flag" ||
18443 test ! -s conftest.err
18444 } && test -s conftest.$ac_objext; then
c0d27fcc 18445 ac_header_compiler=yes
2c9dccc9
PJ
18446else
18447 echo "$as_me: failed program was:" >&5
19650fd6
AS
18448sed 's/^/| /' conftest.$ac_ext >&5
18449
ca81d7a0 18450 ac_header_compiler=no
98418dba 18451fi
ca81d7a0
JD
18452
18453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18454{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18455echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18456
c0d27fcc 18457# Is the header present?
ca81d7a0
JD
18458{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18459echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18460cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18461/* confdefs.h. */
18462_ACEOF
18463cat confdefs.h >>conftest.$ac_ext
18464cat >>conftest.$ac_ext <<_ACEOF
18465/* end confdefs.h. */
503d2be0
AS
18466#include <$ac_header>
18467_ACEOF
ca81d7a0
JD
18468if { (ac_try="$ac_cpp conftest.$ac_ext"
18469case "(($ac_try" in
18470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18471 *) ac_try_echo=$ac_try;;
18472esac
18473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18475 ac_status=$?
6bae0ccf 18476 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18477 rm -f conftest.er1
18478 cat conftest.err >&5
c0d27fcc 18479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18480 (exit $ac_status); } >/dev/null && {
18481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18482 test ! -s conftest.err
18483 }; then
c0d27fcc 18484 ac_header_preproc=yes
503d2be0
AS
18485else
18486 echo "$as_me: failed program was:" >&5
19650fd6
AS
18487sed 's/^/| /' conftest.$ac_ext >&5
18488
c0d27fcc 18489 ac_header_preproc=no
b5de8dc0 18490fi
ca81d7a0 18491
503d2be0 18492rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18493{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18494echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18495
18496# So? What about this header?
edfaf76d
LK
18497case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18498 yes:no: )
c0d27fcc
MR
18499 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18500echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18501 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18502echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18503 ac_header_preproc=yes
19650fd6 18504 ;;
edfaf76d 18505 no:yes:* )
c0d27fcc
MR
18506 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18507echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18508 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18509echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18510 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18511echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18512 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18513echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18514 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18515echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18516 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18517echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18518
19650fd6 18519 ;;
c0d27fcc 18520esac
ca81d7a0
JD
18521{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18522echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18523if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18524 echo $ECHO_N "(cached) $ECHO_C" >&6
18525else
edfaf76d 18526 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18527fi
ca81d7a0
JD
18528ac_res=`eval echo '${'$as_ac_Header'}'`
18529 { echo "$as_me:$LINENO: result: $ac_res" >&5
18530echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18531
18532fi
98418dba 18533if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18534 cat >>confdefs.h <<_ACEOF
98418dba 18535#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18536_ACEOF
ca81d7a0
JD
18537 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18538echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18539if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18540 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18541else
503d2be0 18542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18543/* confdefs.h. */
18544_ACEOF
18545cat confdefs.h >>conftest.$ac_ext
18546cat >>conftest.$ac_ext <<_ACEOF
18547/* end confdefs.h. */
98418dba 18548#include <nlist.h>
b5de8dc0 18549
503d2be0
AS
18550int
18551main ()
18552{
98418dba
CW
18553static struct nlist ac_aggr;
18554if (ac_aggr.n_un.n_name)
18555return 0;
503d2be0
AS
18556 ;
18557 return 0;
18558}
18559_ACEOF
98418dba 18560rm -f conftest.$ac_objext
ca81d7a0
JD
18561if { (ac_try="$ac_compile"
18562case "(($ac_try" in
18563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18564 *) ac_try_echo=$ac_try;;
18565esac
18566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18567 (eval "$ac_compile") 2>conftest.er1
503d2be0 18568 ac_status=$?
edfaf76d
LK
18569 grep -v '^ *+' conftest.er1 >conftest.err
18570 rm -f conftest.er1
18571 cat conftest.err >&5
c0d27fcc 18572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18573 (exit $ac_status); } && {
18574 test -z "$ac_c_werror_flag" ||
18575 test ! -s conftest.err
18576 } && test -s conftest.$ac_objext; then
edfaf76d 18577 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18578else
18579 echo "$as_me: failed program was:" >&5
19650fd6
AS
18580sed 's/^/| /' conftest.$ac_ext >&5
18581
ca81d7a0 18582 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18583/* confdefs.h. */
18584_ACEOF
18585cat confdefs.h >>conftest.$ac_ext
18586cat >>conftest.$ac_ext <<_ACEOF
18587/* end confdefs.h. */
6bae0ccf
DL
18588#include <nlist.h>
18589
18590int
18591main ()
18592{
18593static struct nlist ac_aggr;
18594if (sizeof ac_aggr.n_un.n_name)
18595return 0;
18596 ;
18597 return 0;
18598}
18599_ACEOF
18600rm -f conftest.$ac_objext
ca81d7a0
JD
18601if { (ac_try="$ac_compile"
18602case "(($ac_try" in
18603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18604 *) ac_try_echo=$ac_try;;
18605esac
18606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18607 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18608 ac_status=$?
edfaf76d
LK
18609 grep -v '^ *+' conftest.er1 >conftest.err
18610 rm -f conftest.er1
18611 cat conftest.err >&5
6bae0ccf 18612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18613 (exit $ac_status); } && {
18614 test -z "$ac_c_werror_flag" ||
18615 test ! -s conftest.err
18616 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18617 ac_cv_member_struct_nlist_n_un_n_name=yes
18618else
18619 echo "$as_me: failed program was:" >&5
19650fd6
AS
18620sed 's/^/| /' conftest.$ac_ext >&5
18621
ca81d7a0 18622 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18623fi
ca81d7a0
JD
18624
18625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18626fi
ca81d7a0
JD
18627
18628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18629fi
ca81d7a0
JD
18630{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18631echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18632if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18633
c0d27fcc 18634cat >>confdefs.h <<_ACEOF
98418dba 18635#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18636_ACEOF
b5de8dc0 18637
c0d27fcc
MR
18638
18639cat >>confdefs.h <<\_ACEOF
98418dba 18640#define NLIST_NAME_UNION 1
c0d27fcc 18641_ACEOF
b5de8dc0 18642
98418dba 18643fi
b5de8dc0 18644
c0d27fcc 18645
98418dba 18646fi
c0d27fcc 18647
98418dba 18648done
b5de8dc0 18649
98418dba
CW
18650fi
18651done
b5de8dc0 18652
c0d27fcc 18653
98418dba 18654# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18655{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18656echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18657if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18658 echo $ECHO_N "(cached) $ECHO_C" >&6
18659else
18660 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18661/* confdefs.h. */
18662_ACEOF
18663cat confdefs.h >>conftest.$ac_ext
18664cat >>conftest.$ac_ext <<_ACEOF
18665/* end confdefs.h. */
6bae0ccf 18666#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18667#ifdef LDAV_PRIVILEGED
18668Yowza Am I SETGID yet
18669#endif
18670_ACEOF
18671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18672 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18673 ac_cv_func_getloadavg_setgid=yes
18674else
18675 ac_cv_func_getloadavg_setgid=no
18676fi
18677rm -f conftest*
b5de8dc0 18678
98418dba 18679fi
ca81d7a0
JD
18680{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18681echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18682if test $ac_cv_func_getloadavg_setgid = yes; then
18683 NEED_SETGID=true
b5de8dc0 18684
c0d27fcc 18685cat >>confdefs.h <<\_ACEOF
98418dba 18686#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18687_ACEOF
98418dba 18688
b5de8dc0 18689else
98418dba 18690 NEED_SETGID=false
b5de8dc0 18691fi
98418dba
CW
18692
18693if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18694 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18695echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18696if test "${ac_cv_group_kmem+set}" = set; then
18697 echo $ECHO_N "(cached) $ECHO_C" >&6
18698else
18699 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18700 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18701 # If we got an error (system does not support symlinks), try without -L.
18702 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18703 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18704 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18705 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18706 / /s/.* //;p;'`
18707
b5de8dc0 18708fi
ca81d7a0
JD
18709{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18710echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18711 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18712fi
98418dba
CW
18713if test "x$ac_save_LIBS" = x; then
18714 GETLOADAVG_LIBS=$LIBS
18715else
18716 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18717fi
98418dba 18718LIBS=$ac_save_LIBS
b5de8dc0 18719
c0d27fcc
MR
18720
18721
ca81d7a0
JD
18722{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18723echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18724if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18725 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18726else
b936fae4 18727 while :; do
503d2be0 18728 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18729/* confdefs.h. */
18730_ACEOF
18731cat confdefs.h >>conftest.$ac_ext
18732cat >>conftest.$ac_ext <<_ACEOF
18733/* end confdefs.h. */
177cd151 18734#include <stdio.h>
503d2be0
AS
18735int
18736main ()
18737{
177cd151 18738return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18739 ;
18740 return 0;
18741}
18742_ACEOF
f053c89f
CY
18743rm -f conftest.$ac_objext conftest$ac_exeext
18744if { (ac_try="$ac_link"
ca81d7a0
JD
18745case "(($ac_try" in
18746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18747 *) ac_try_echo=$ac_try;;
18748esac
18749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18750 (eval "$ac_link") 2>conftest.er1
b936fae4 18751 ac_status=$?
edfaf76d
LK
18752 grep -v '^ *+' conftest.er1 >conftest.err
18753 rm -f conftest.er1
18754 cat conftest.err >&5
c0d27fcc 18755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18756 (exit $ac_status); } && {
18757 test -z "$ac_c_werror_flag" ||
18758 test ! -s conftest.err
18759 } && test -s conftest$ac_exeext &&
18760 $as_test_x conftest$ac_exeext; then
18761 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18762else
18763 echo "$as_me: failed program was:" >&5
19650fd6
AS
18764sed 's/^/| /' conftest.$ac_ext >&5
18765
ca81d7a0 18766
b936fae4 18767fi
ca81d7a0 18768
f053c89f
CY
18769rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18770 conftest$ac_exeext conftest.$ac_ext
b936fae4 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. */
b936fae4 18777#define _LARGEFILE_SOURCE 1
177cd151 18778#include <stdio.h>
b936fae4
AS
18779int
18780main ()
18781{
177cd151 18782return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18783 ;
18784 return 0;
18785}
18786_ACEOF
f053c89f
CY
18787rm -f conftest.$ac_objext conftest$ac_exeext
18788if { (ac_try="$ac_link"
ca81d7a0
JD
18789case "(($ac_try" in
18790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18791 *) ac_try_echo=$ac_try;;
18792esac
18793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18794 (eval "$ac_link") 2>conftest.er1
b936fae4 18795 ac_status=$?
edfaf76d
LK
18796 grep -v '^ *+' conftest.er1 >conftest.err
18797 rm -f conftest.er1
18798 cat conftest.err >&5
c0d27fcc 18799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18800 (exit $ac_status); } && {
18801 test -z "$ac_c_werror_flag" ||
18802 test ! -s conftest.err
18803 } && test -s conftest$ac_exeext &&
18804 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18805 ac_cv_sys_largefile_source=1; break
18806else
18807 echo "$as_me: failed program was:" >&5
19650fd6
AS
18808sed 's/^/| /' conftest.$ac_ext >&5
18809
ca81d7a0 18810
b936fae4 18811fi
ca81d7a0 18812
f053c89f
CY
18813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18814 conftest$ac_exeext conftest.$ac_ext
18815 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18816 break
18817done
18818fi
ca81d7a0
JD
18819{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18820echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18821case $ac_cv_sys_largefile_source in #(
18822 no | unknown) ;;
18823 *)
c0d27fcc 18824cat >>confdefs.h <<_ACEOF
b936fae4 18825#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18826_ACEOF
f053c89f
CY
18827;;
18828esac
b936fae4 18829rm -f conftest*
4c343001 18830
b936fae4
AS
18831# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18832# in glibc 2.1.3, but that breaks too many other things.
18833# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18834if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18835
c0d27fcc 18836cat >>confdefs.h <<\_ACEOF
b936fae4 18837#define HAVE_FSEEKO 1
c0d27fcc 18838_ACEOF
b936fae4 18839
4c343001
DL
18840fi
18841
c0d27fcc 18842
52dbaac8
PE
18843# Configure getopt.
18844# getopt.m4 serial 10
18845
18846# The getopt module assume you want GNU getopt, with getopt_long etc,
18847# rather than vanilla POSIX getopt. This means your your code should
18848# always include <getopt.h> for the getopt prototypes.
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860# Prerequisites of lib/getopt*.
18861
18862
18863
10a3b1a1 18864
52dbaac8
PE
18865 GETOPT_H=
18866
18867for ac_header in getopt.h
18868do
18869as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18871 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18872echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18873if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18874 echo $ECHO_N "(cached) $ECHO_C" >&6
18875fi
ca81d7a0
JD
18876ac_res=`eval echo '${'$as_ac_Header'}'`
18877 { echo "$as_me:$LINENO: result: $ac_res" >&5
18878echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18879else
18880 # Is the header compilable?
ca81d7a0
JD
18881{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18882echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18883cat >conftest.$ac_ext <<_ACEOF
18884/* confdefs.h. */
18885_ACEOF
18886cat confdefs.h >>conftest.$ac_ext
18887cat >>conftest.$ac_ext <<_ACEOF
18888/* end confdefs.h. */
18889$ac_includes_default
18890#include <$ac_header>
18891_ACEOF
18892rm -f conftest.$ac_objext
ca81d7a0
JD
18893if { (ac_try="$ac_compile"
18894case "(($ac_try" in
18895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18896 *) ac_try_echo=$ac_try;;
18897esac
18898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18899 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18900 ac_status=$?
18901 grep -v '^ *+' conftest.er1 >conftest.err
18902 rm -f conftest.er1
18903 cat conftest.err >&5
18904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18905 (exit $ac_status); } && {
18906 test -z "$ac_c_werror_flag" ||
18907 test ! -s conftest.err
18908 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18909 ac_header_compiler=yes
18910else
18911 echo "$as_me: failed program was:" >&5
18912sed 's/^/| /' conftest.$ac_ext >&5
18913
ca81d7a0 18914 ac_header_compiler=no
52dbaac8 18915fi
ca81d7a0
JD
18916
18917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18918{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18919echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18920
18921# Is the header present?
ca81d7a0
JD
18922{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18923echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18924cat >conftest.$ac_ext <<_ACEOF
18925/* confdefs.h. */
18926_ACEOF
18927cat confdefs.h >>conftest.$ac_ext
18928cat >>conftest.$ac_ext <<_ACEOF
18929/* end confdefs.h. */
18930#include <$ac_header>
18931_ACEOF
ca81d7a0
JD
18932if { (ac_try="$ac_cpp conftest.$ac_ext"
18933case "(($ac_try" in
18934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18935 *) ac_try_echo=$ac_try;;
18936esac
18937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18938 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18939 ac_status=$?
18940 grep -v '^ *+' conftest.er1 >conftest.err
18941 rm -f conftest.er1
18942 cat conftest.err >&5
18943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18944 (exit $ac_status); } >/dev/null && {
18945 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18946 test ! -s conftest.err
18947 }; then
52dbaac8
PE
18948 ac_header_preproc=yes
18949else
18950 echo "$as_me: failed program was:" >&5
18951sed 's/^/| /' conftest.$ac_ext >&5
18952
18953 ac_header_preproc=no
18954fi
ca81d7a0 18955
52dbaac8 18956rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18957{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18958echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18959
18960# So? What about this header?
18961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18962 yes:no: )
18963 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18964echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18965 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18966echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18967 ac_header_preproc=yes
18968 ;;
18969 no:yes:* )
18970 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18971echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18972 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18973echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18974 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18975echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18976 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18977echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18978 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18979echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18980 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18981echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18982
52dbaac8
PE
18983 ;;
18984esac
ca81d7a0
JD
18985{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18986echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18987if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18988 echo $ECHO_N "(cached) $ECHO_C" >&6
18989else
18990 eval "$as_ac_Header=\$ac_header_preproc"
18991fi
ca81d7a0
JD
18992ac_res=`eval echo '${'$as_ac_Header'}'`
18993 { echo "$as_me:$LINENO: result: $ac_res" >&5
18994echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18995
18996fi
18997if test `eval echo '${'$as_ac_Header'}'` = yes; then
18998 cat >>confdefs.h <<_ACEOF
18999#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19000_ACEOF
19001
19002else
19003 GETOPT_H=getopt.h
19004fi
19005
19006done
19007
19008 if test -z "$GETOPT_H"; then
19009
19010for ac_func in getopt_long_only
19011do
19012as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19013{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19014echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19015if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19016 echo $ECHO_N "(cached) $ECHO_C" >&6
19017else
19018 cat >conftest.$ac_ext <<_ACEOF
19019/* confdefs.h. */
19020_ACEOF
19021cat confdefs.h >>conftest.$ac_ext
19022cat >>conftest.$ac_ext <<_ACEOF
19023/* end confdefs.h. */
19024/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19025 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19026#define $ac_func innocuous_$ac_func
19027
19028/* System header to define __stub macros and hopefully few prototypes,
19029 which can conflict with char $ac_func (); below.
19030 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19031 <limits.h> exists even on freestanding compilers. */
19032
19033#ifdef __STDC__
19034# include <limits.h>
19035#else
19036# include <assert.h>
19037#endif
19038
19039#undef $ac_func
19040
ca81d7a0
JD
19041/* Override any GCC internal prototype to avoid an error.
19042 Use char because int might match the return type of a GCC
19043 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19044#ifdef __cplusplus
19045extern "C"
52dbaac8 19046#endif
52dbaac8
PE
19047char $ac_func ();
19048/* The GNU C library defines this for functions which it implements
19049 to always fail with ENOSYS. Some functions are actually named
19050 something starting with __ and the normal name is an alias. */
ca81d7a0 19051#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19052choke me
52dbaac8
PE
19053#endif
19054
19055int
19056main ()
19057{
ca81d7a0 19058return $ac_func ();
52dbaac8
PE
19059 ;
19060 return 0;
19061}
19062_ACEOF
19063rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19064if { (ac_try="$ac_link"
19065case "(($ac_try" in
19066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19067 *) ac_try_echo=$ac_try;;
19068esac
19069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19070 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19071 ac_status=$?
19072 grep -v '^ *+' conftest.er1 >conftest.err
19073 rm -f conftest.er1
19074 cat conftest.err >&5
19075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19076 (exit $ac_status); } && {
19077 test -z "$ac_c_werror_flag" ||
19078 test ! -s conftest.err
19079 } && test -s conftest$ac_exeext &&
19080 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19081 eval "$as_ac_var=yes"
19082else
19083 echo "$as_me: failed program was:" >&5
19084sed 's/^/| /' conftest.$ac_ext >&5
19085
ca81d7a0 19086 eval "$as_ac_var=no"
52dbaac8 19087fi
ca81d7a0 19088
f053c89f 19089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19090 conftest$ac_exeext conftest.$ac_ext
19091fi
ca81d7a0
JD
19092ac_res=`eval echo '${'$as_ac_var'}'`
19093 { echo "$as_me:$LINENO: result: $ac_res" >&5
19094echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19095if test `eval echo '${'$as_ac_var'}'` = yes; then
19096 cat >>confdefs.h <<_ACEOF
19097#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19098_ACEOF
19099
19100else
19101 GETOPT_H=getopt.h
19102fi
19103done
19104
19105 fi
19106
19107 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19108 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19109echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19110if test "${ac_cv_have_decl_optreset+set}" = set; then
19111 echo $ECHO_N "(cached) $ECHO_C" >&6
19112else
19113 cat >conftest.$ac_ext <<_ACEOF
19114/* confdefs.h. */
19115_ACEOF
19116cat confdefs.h >>conftest.$ac_ext
19117cat >>conftest.$ac_ext <<_ACEOF
19118/* end confdefs.h. */
19119#include <getopt.h>
19120
19121int
19122main ()
19123{
19124#ifndef optreset
f053c89f 19125 (void) optreset;
52dbaac8
PE
19126#endif
19127
19128 ;
19129 return 0;
19130}
19131_ACEOF
19132rm -f conftest.$ac_objext
ca81d7a0
JD
19133if { (ac_try="$ac_compile"
19134case "(($ac_try" in
19135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19136 *) ac_try_echo=$ac_try;;
19137esac
19138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19139 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19140 ac_status=$?
19141 grep -v '^ *+' conftest.er1 >conftest.err
19142 rm -f conftest.er1
19143 cat conftest.err >&5
19144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19145 (exit $ac_status); } && {
19146 test -z "$ac_c_werror_flag" ||
19147 test ! -s conftest.err
19148 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19149 ac_cv_have_decl_optreset=yes
19150else
19151 echo "$as_me: failed program was:" >&5
19152sed 's/^/| /' conftest.$ac_ext >&5
19153
ca81d7a0 19154 ac_cv_have_decl_optreset=no
52dbaac8 19155fi
ca81d7a0
JD
19156
19157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19158fi
ca81d7a0
JD
19159{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19160echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19161if test $ac_cv_have_decl_optreset = yes; then
19162 GETOPT_H=getopt.h
19163fi
19164
19165 fi
19166
19167 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19168 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19169echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19170if test "${gl_cv_func_gnu_getopt+set}" = set; then
19171 echo $ECHO_N "(cached) $ECHO_C" >&6
19172else
19173 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19174 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19175echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19176if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19177 echo $ECHO_N "(cached) $ECHO_C" >&6
19178else
19179 cat >conftest.$ac_ext <<_ACEOF
19180/* confdefs.h. */
19181_ACEOF
19182cat confdefs.h >>conftest.$ac_ext
19183cat >>conftest.$ac_ext <<_ACEOF
19184/* end confdefs.h. */
19185#include <getopt.h>
19186
19187int
19188main ()
19189{
19190#ifndef getopt_clip
f053c89f 19191 (void) getopt_clip;
52dbaac8
PE
19192#endif
19193
19194 ;
19195 return 0;
19196}
19197_ACEOF
19198rm -f conftest.$ac_objext
ca81d7a0
JD
19199if { (ac_try="$ac_compile"
19200case "(($ac_try" in
19201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19202 *) ac_try_echo=$ac_try;;
19203esac
19204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19205 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19206 ac_status=$?
19207 grep -v '^ *+' conftest.er1 >conftest.err
19208 rm -f conftest.er1
19209 cat conftest.err >&5
19210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19211 (exit $ac_status); } && {
19212 test -z "$ac_c_werror_flag" ||
19213 test ! -s conftest.err
19214 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19215 ac_cv_have_decl_getopt_clip=yes
19216else
19217 echo "$as_me: failed program was:" >&5
19218sed 's/^/| /' conftest.$ac_ext >&5
19219
ca81d7a0 19220 ac_cv_have_decl_getopt_clip=no
52dbaac8 19221fi
ca81d7a0
JD
19222
19223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19224fi
ca81d7a0
JD
19225{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19226echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19227if test $ac_cv_have_decl_getopt_clip = yes; then
19228 gl_cv_func_gnu_getopt=no
19229else
19230 gl_cv_func_gnu_getopt=yes
19231fi
19232
19233else
19234 cat >conftest.$ac_ext <<_ACEOF
19235/* confdefs.h. */
19236_ACEOF
19237cat confdefs.h >>conftest.$ac_ext
19238cat >>conftest.$ac_ext <<_ACEOF
19239/* end confdefs.h. */
19240#include <getopt.h>
19241int
19242main ()
19243{
19244
19245 char *myargv[3];
19246 myargv[0] = "conftest";
19247 myargv[1] = "-+";
19248 myargv[2] = 0;
19249 return getopt (2, myargv, "+a") != '?';
19250
19251 ;
19252 return 0;
19253}
19254_ACEOF
19255rm -f conftest$ac_exeext
ca81d7a0
JD
19256if { (ac_try="$ac_link"
19257case "(($ac_try" in
19258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19259 *) ac_try_echo=$ac_try;;
19260esac
19261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19262 (eval "$ac_link") 2>&5
52dbaac8
PE
19263 ac_status=$?
19264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19266 { (case "(($ac_try" in
19267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19268 *) ac_try_echo=$ac_try;;
19269esac
19270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19271 (eval "$ac_try") 2>&5
52dbaac8
PE
19272 ac_status=$?
19273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19274 (exit $ac_status); }; }; then
19275 gl_cv_func_gnu_getopt=yes
19276else
19277 echo "$as_me: program exited with status $ac_status" >&5
19278echo "$as_me: failed program was:" >&5
19279sed 's/^/| /' conftest.$ac_ext >&5
19280
19281( exit $ac_status )
19282gl_cv_func_gnu_getopt=no
19283fi
ca81d7a0 19284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19285fi
ca81d7a0
JD
19286
19287
52dbaac8 19288fi
ca81d7a0
JD
19289{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19290echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19291 if test "$gl_cv_func_gnu_getopt" = "no"; then
19292 GETOPT_H=getopt.h
19293 fi
19294 fi
19295
19296
19297
19298 if test -n "$GETOPT_H"; then
19299
19300
19301 GETOPT_H=getopt.h
19302
19303cat >>confdefs.h <<\_ACEOF
19304#define __GETOPT_PREFIX rpl_
19305_ACEOF
19306
19307
19308
19309 :
19310 GETOPTOBJS='getopt.o getopt1.o'
19311
19312fi
19313
19314
19315
19316
ca81d7a0
JD
19317{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19318echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19319if test "${ac_cv_func_getpgrp_void+set}" = set; then
19320 echo $ECHO_N "(cached) $ECHO_C" >&6
19321else
19322 # Use it with a single arg.
19323cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19324/* confdefs.h. */
19325_ACEOF
19326cat confdefs.h >>conftest.$ac_ext
19327cat >>conftest.$ac_ext <<_ACEOF
19328/* end confdefs.h. */
cd958eb3
MB
19329$ac_includes_default
19330int
19331main ()
19332{
19333getpgrp (0);
19334 ;
19335 return 0;
19336}
19337_ACEOF
19338rm -f conftest.$ac_objext
ca81d7a0
JD
19339if { (ac_try="$ac_compile"
19340case "(($ac_try" in
19341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19342 *) ac_try_echo=$ac_try;;
19343esac
19344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19345 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19346 ac_status=$?
edfaf76d
LK
19347 grep -v '^ *+' conftest.er1 >conftest.err
19348 rm -f conftest.er1
19349 cat conftest.err >&5
cd958eb3 19350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19351 (exit $ac_status); } && {
19352 test -z "$ac_c_werror_flag" ||
19353 test ! -s conftest.err
19354 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19355 ac_cv_func_getpgrp_void=no
19356else
19357 echo "$as_me: failed program was:" >&5
19650fd6
AS
19358sed 's/^/| /' conftest.$ac_ext >&5
19359
ca81d7a0 19360 ac_cv_func_getpgrp_void=yes
cd958eb3 19361fi
ca81d7a0
JD
19362
19363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19364
19365fi
ca81d7a0
JD
19366{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19367echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19368if test $ac_cv_func_getpgrp_void = yes; then
19369
19370cat >>confdefs.h <<\_ACEOF
19371#define GETPGRP_VOID 1
19372_ACEOF
19373
19374fi
19375
19376
973a76b1
DL
19377
19378for ac_func in strftime
19379do
19380as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19381{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19382echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19383if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19384 echo $ECHO_N "(cached) $ECHO_C" >&6
19385else
19386 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19387/* confdefs.h. */
19388_ACEOF
19389cat confdefs.h >>conftest.$ac_ext
19390cat >>conftest.$ac_ext <<_ACEOF
19391/* end confdefs.h. */
edfaf76d
LK
19392/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19394#define $ac_func innocuous_$ac_func
19395
973a76b1 19396/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19397 which can conflict with char $ac_func (); below.
19398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19399 <limits.h> exists even on freestanding compilers. */
edfaf76d 19400
19650fd6
AS
19401#ifdef __STDC__
19402# include <limits.h>
19403#else
19404# include <assert.h>
19405#endif
edfaf76d
LK
19406
19407#undef $ac_func
19408
ca81d7a0
JD
19409/* Override any GCC internal prototype to avoid an error.
19410 Use char because int might match the return type of a GCC
19411 builtin and then its argument prototype would still apply. */
973a76b1
DL
19412#ifdef __cplusplus
19413extern "C"
973a76b1 19414#endif
973a76b1
DL
19415char $ac_func ();
19416/* The GNU C library defines this for functions which it implements
19417 to always fail with ENOSYS. Some functions are actually named
19418 something starting with __ and the normal name is an alias. */
ca81d7a0 19419#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19420choke me
973a76b1
DL
19421#endif
19422
19650fd6
AS
19423int
19424main ()
19425{
ca81d7a0 19426return $ac_func ();
973a76b1
DL
19427 ;
19428 return 0;
19429}
19430_ACEOF
19431rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19432if { (ac_try="$ac_link"
19433case "(($ac_try" in
19434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19435 *) ac_try_echo=$ac_try;;
19436esac
19437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19438 (eval "$ac_link") 2>conftest.er1
973a76b1 19439 ac_status=$?
edfaf76d
LK
19440 grep -v '^ *+' conftest.er1 >conftest.err
19441 rm -f conftest.er1
19442 cat conftest.err >&5
973a76b1 19443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19444 (exit $ac_status); } && {
19445 test -z "$ac_c_werror_flag" ||
19446 test ! -s conftest.err
19447 } && test -s conftest$ac_exeext &&
19448 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19449 eval "$as_ac_var=yes"
19450else
19451 echo "$as_me: failed program was:" >&5
19650fd6
AS
19452sed 's/^/| /' conftest.$ac_ext >&5
19453
ca81d7a0 19454 eval "$as_ac_var=no"
973a76b1 19455fi
ca81d7a0 19456
f053c89f 19457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19458 conftest$ac_exeext conftest.$ac_ext
973a76b1 19459fi
ca81d7a0
JD
19460ac_res=`eval echo '${'$as_ac_var'}'`
19461 { echo "$as_me:$LINENO: result: $ac_res" >&5
19462echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19463if test `eval echo '${'$as_ac_var'}'` = yes; then
19464 cat >>confdefs.h <<_ACEOF
19465#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19466_ACEOF
19467
19468else
19469 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19470{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19471echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19472if test "${ac_cv_lib_intl_strftime+set}" = set; then
19473 echo $ECHO_N "(cached) $ECHO_C" >&6
19474else
19475 ac_check_lib_save_LIBS=$LIBS
19476LIBS="-lintl $LIBS"
19477cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19478/* confdefs.h. */
19479_ACEOF
19480cat confdefs.h >>conftest.$ac_ext
19481cat >>conftest.$ac_ext <<_ACEOF
19482/* end confdefs.h. */
973a76b1 19483
ca81d7a0
JD
19484/* Override any GCC internal prototype to avoid an error.
19485 Use char because int might match the return type of a GCC
19486 builtin and then its argument prototype would still apply. */
973a76b1
DL
19487#ifdef __cplusplus
19488extern "C"
19489#endif
973a76b1
DL
19490char strftime ();
19491int
19492main ()
19493{
ca81d7a0 19494return strftime ();
973a76b1
DL
19495 ;
19496 return 0;
19497}
19498_ACEOF
19499rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19500if { (ac_try="$ac_link"
19501case "(($ac_try" in
19502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19503 *) ac_try_echo=$ac_try;;
19504esac
19505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19506 (eval "$ac_link") 2>conftest.er1
973a76b1 19507 ac_status=$?
edfaf76d
LK
19508 grep -v '^ *+' conftest.er1 >conftest.err
19509 rm -f conftest.er1
19510 cat conftest.err >&5
973a76b1 19511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19512 (exit $ac_status); } && {
19513 test -z "$ac_c_werror_flag" ||
19514 test ! -s conftest.err
19515 } && test -s conftest$ac_exeext &&
19516 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19517 ac_cv_lib_intl_strftime=yes
19518else
19519 echo "$as_me: failed program was:" >&5
19650fd6
AS
19520sed 's/^/| /' conftest.$ac_ext >&5
19521
ca81d7a0 19522 ac_cv_lib_intl_strftime=no
973a76b1 19523fi
ca81d7a0 19524
f053c89f 19525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19526 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19527LIBS=$ac_check_lib_save_LIBS
19528fi
ca81d7a0
JD
19529{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19530echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19531if test $ac_cv_lib_intl_strftime = yes; then
19532 cat >>confdefs.h <<\_ACEOF
19533#define HAVE_STRFTIME 1
19534_ACEOF
19535
19536LIBS="-lintl $LIBS"
19537fi
19538
19539fi
19540done
19541
19542
b936fae4
AS
19543# UNIX98 PTYs.
19544
19545for ac_func in grantpt
503d2be0
AS
19546do
19547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19548{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19550if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19551 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19552else
503d2be0 19553 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19554/* confdefs.h. */
19555_ACEOF
19556cat confdefs.h >>conftest.$ac_ext
19557cat >>conftest.$ac_ext <<_ACEOF
19558/* end confdefs.h. */
edfaf76d
LK
19559/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19560 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19561#define $ac_func innocuous_$ac_func
19562
503d2be0 19563/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19564 which can conflict with char $ac_func (); below.
19565 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19566 <limits.h> exists even on freestanding compilers. */
edfaf76d 19567
19650fd6
AS
19568#ifdef __STDC__
19569# include <limits.h>
19570#else
19571# include <assert.h>
19572#endif
edfaf76d
LK
19573
19574#undef $ac_func
19575
ca81d7a0
JD
19576/* Override any GCC internal prototype to avoid an error.
19577 Use char because int might match the return type of a GCC
19578 builtin and then its argument prototype would still apply. */
503d2be0
AS
19579#ifdef __cplusplus
19580extern "C"
19581#endif
503d2be0 19582char $ac_func ();
503d2be0
AS
19583/* The GNU C library defines this for functions which it implements
19584 to always fail with ENOSYS. Some functions are actually named
19585 something starting with __ and the normal name is an alias. */
ca81d7a0 19586#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19587choke me
503d2be0 19588#endif
4c343001 19589
19650fd6
AS
19590int
19591main ()
19592{
ca81d7a0 19593return $ac_func ();
503d2be0
AS
19594 ;
19595 return 0;
19596}
19597_ACEOF
19598rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19599if { (ac_try="$ac_link"
19600case "(($ac_try" in
19601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19602 *) ac_try_echo=$ac_try;;
19603esac
19604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19605 (eval "$ac_link") 2>conftest.er1
503d2be0 19606 ac_status=$?
edfaf76d
LK
19607 grep -v '^ *+' conftest.er1 >conftest.err
19608 rm -f conftest.er1
19609 cat conftest.err >&5
c0d27fcc 19610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19611 (exit $ac_status); } && {
19612 test -z "$ac_c_werror_flag" ||
19613 test ! -s conftest.err
19614 } && test -s conftest$ac_exeext &&
19615 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19616 eval "$as_ac_var=yes"
19617else
19618 echo "$as_me: failed program was:" >&5
19650fd6
AS
19619sed 's/^/| /' conftest.$ac_ext >&5
19620
ca81d7a0 19621 eval "$as_ac_var=no"
503d2be0 19622fi
ca81d7a0 19623
f053c89f 19624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19625 conftest$ac_exeext conftest.$ac_ext
503d2be0 19626fi
ca81d7a0
JD
19627ac_res=`eval echo '${'$as_ac_var'}'`
19628 { echo "$as_me:$LINENO: result: $ac_res" >&5
19629echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19630if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19631 cat >>confdefs.h <<_ACEOF
503d2be0 19632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19633_ACEOF
4c343001
DL
19634
19635fi
503d2be0
AS
19636done
19637
c0d27fcc 19638
b936fae4 19639# PTY-related GNU extensions.
4c343001 19640
b936fae4
AS
19641for ac_func in getpt
19642do
19643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19647 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19648else
b936fae4 19649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19650/* confdefs.h. */
19651_ACEOF
19652cat confdefs.h >>conftest.$ac_ext
19653cat >>conftest.$ac_ext <<_ACEOF
19654/* end confdefs.h. */
edfaf76d
LK
19655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19657#define $ac_func innocuous_$ac_func
19658
087121cc 19659/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19660 which can conflict with char $ac_func (); below.
19661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19662 <limits.h> exists even on freestanding compilers. */
edfaf76d 19663
19650fd6
AS
19664#ifdef __STDC__
19665# include <limits.h>
19666#else
19667# include <assert.h>
19668#endif
edfaf76d
LK
19669
19670#undef $ac_func
19671
ca81d7a0
JD
19672/* Override any GCC internal prototype to avoid an error.
19673 Use char because int might match the return type of a GCC
19674 builtin and then its argument prototype would still apply. */
503d2be0
AS
19675#ifdef __cplusplus
19676extern "C"
19677#endif
503d2be0 19678char $ac_func ();
087121cc
GM
19679/* The GNU C library defines this for functions which it implements
19680 to always fail with ENOSYS. Some functions are actually named
19681 something starting with __ and the normal name is an alias. */
ca81d7a0 19682#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19683choke me
087121cc
GM
19684#endif
19685
19650fd6
AS
19686int
19687main ()
19688{
ca81d7a0 19689return $ac_func ();
503d2be0
AS
19690 ;
19691 return 0;
19692}
19693_ACEOF
19694rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19695if { (ac_try="$ac_link"
19696case "(($ac_try" in
19697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19698 *) ac_try_echo=$ac_try;;
19699esac
19700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19701 (eval "$ac_link") 2>conftest.er1
503d2be0 19702 ac_status=$?
edfaf76d
LK
19703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
c0d27fcc 19706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
19710 } && test -s conftest$ac_exeext &&
19711 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19712 eval "$as_ac_var=yes"
19713else
19714 echo "$as_me: failed program was:" >&5
19650fd6
AS
19715sed 's/^/| /' conftest.$ac_ext >&5
19716
ca81d7a0 19717 eval "$as_ac_var=no"
503d2be0 19718fi
ca81d7a0 19719
f053c89f 19720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19721 conftest$ac_exeext conftest.$ac_ext
503d2be0 19722fi
ca81d7a0
JD
19723ac_res=`eval echo '${'$as_ac_var'}'`
19724 { echo "$as_me:$LINENO: result: $ac_res" >&5
19725echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19726if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19727 cat >>confdefs.h <<_ACEOF
503d2be0 19728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19729_ACEOF
087121cc 19730
087121cc
GM
19731fi
19732done
19733
c0d27fcc 19734
ba4481b5
DL
19735# Check this now, so that we will NOT find the above functions in ncurses.
19736# That is because we have not set up to link ncurses in lib-src.
19737# It's better to believe a function is not available
19738# than to expect to find it in ncurses.
503d2be0 19739
ca81d7a0
JD
19740{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19741echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19742if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19743 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19744else
503d2be0 19745 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19746LIBS="-lncurses $LIBS"
503d2be0 19747cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19748/* confdefs.h. */
19749_ACEOF
19750cat confdefs.h >>conftest.$ac_ext
19751cat >>conftest.$ac_ext <<_ACEOF
19752/* end confdefs.h. */
503d2be0 19753
ca81d7a0
JD
19754/* Override any GCC internal prototype to avoid an error.
19755 Use char because int might match the return type of a GCC
19756 builtin and then its argument prototype would still apply. */
503d2be0
AS
19757#ifdef __cplusplus
19758extern "C"
19759#endif
503d2be0
AS
19760char tparm ();
19761int
19762main ()
19763{
ca81d7a0 19764return tparm ();
503d2be0
AS
19765 ;
19766 return 0;
19767}
19768_ACEOF
19769rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19770if { (ac_try="$ac_link"
19771case "(($ac_try" in
19772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19773 *) ac_try_echo=$ac_try;;
19774esac
19775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19776 (eval "$ac_link") 2>conftest.er1
503d2be0 19777 ac_status=$?
edfaf76d
LK
19778 grep -v '^ *+' conftest.er1 >conftest.err
19779 rm -f conftest.er1
19780 cat conftest.err >&5
c0d27fcc 19781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19782 (exit $ac_status); } && {
19783 test -z "$ac_c_werror_flag" ||
19784 test ! -s conftest.err
19785 } && test -s conftest$ac_exeext &&
19786 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19787 ac_cv_lib_ncurses_tparm=yes
19788else
19789 echo "$as_me: failed program was:" >&5
19650fd6
AS
19790sed 's/^/| /' conftest.$ac_ext >&5
19791
ca81d7a0 19792 ac_cv_lib_ncurses_tparm=no
503d2be0 19793fi
ca81d7a0 19794
f053c89f 19795rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19796 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19797LIBS=$ac_check_lib_save_LIBS
19798fi
ca81d7a0
JD
19799{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19800echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19801if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19802 cat >>confdefs.h <<_ACEOF
503d2be0 19803#define HAVE_LIBNCURSES 1
c0d27fcc 19804_ACEOF
ba4481b5
DL
19805
19806 LIBS="-lncurses $LIBS"
19807
ba4481b5
DL
19808fi
19809
c0d27fcc 19810
bc3512d0
CY
19811# Do we have res_init, for detecting changes in /etc/resolv.conf?
19812
19813resolv=no
074767f2 19814cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19815/* confdefs.h. */
19816_ACEOF
19817cat confdefs.h >>conftest.$ac_ext
19818cat >>conftest.$ac_ext <<_ACEOF
19819/* end confdefs.h. */
074767f2
AS
19820#include <netinet/in.h>
19821#include <arpa/nameser.h>
19822#include <resolv.h>
bc3512d0
CY
19823int
19824main ()
19825{
074767f2 19826return res_init();
bc3512d0
CY
19827 ;
19828 return 0;
19829}
19830_ACEOF
19831rm -f conftest.$ac_objext conftest$ac_exeext
19832if { (ac_try="$ac_link"
19833case "(($ac_try" in
19834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19835 *) ac_try_echo=$ac_try;;
19836esac
19837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19838 (eval "$ac_link") 2>conftest.er1
19839 ac_status=$?
19840 grep -v '^ *+' conftest.er1 >conftest.err
19841 rm -f conftest.er1
19842 cat conftest.err >&5
19843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19844 (exit $ac_status); } && {
19845 test -z "$ac_c_werror_flag" ||
19846 test ! -s conftest.err
19847 } && test -s conftest$ac_exeext &&
19848 $as_test_x conftest$ac_exeext; then
074767f2 19849 have_res_init=yes
bc3512d0
CY
19850else
19851 echo "$as_me: failed program was:" >&5
19852sed 's/^/| /' conftest.$ac_ext >&5
19853
074767f2 19854 have_res_init=no
bc3512d0
CY
19855fi
19856
19857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19858 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19859if test "$have_res_init" = no; then
19860 OLIBS="$LIBS"
19861 LIBS="$LIBS -lresolv"
19862 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19863echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19864 cat >conftest.$ac_ext <<_ACEOF
19865/* confdefs.h. */
19866_ACEOF
19867cat confdefs.h >>conftest.$ac_ext
19868cat >>conftest.$ac_ext <<_ACEOF
19869/* end confdefs.h. */
19870#include <netinet/in.h>
19871#include <arpa/nameser.h>
19872#include <resolv.h>
19873int
19874main ()
19875{
074767f2 19876return res_init();
bc3512d0
CY
19877 ;
19878 return 0;
19879}
19880_ACEOF
19881rm -f conftest.$ac_objext conftest$ac_exeext
19882if { (ac_try="$ac_link"
19883case "(($ac_try" in
19884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19885 *) ac_try_echo=$ac_try;;
19886esac
19887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19888 (eval "$ac_link") 2>conftest.er1
19889 ac_status=$?
19890 grep -v '^ *+' conftest.er1 >conftest.err
19891 rm -f conftest.er1
19892 cat conftest.err >&5
19893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19894 (exit $ac_status); } && {
19895 test -z "$ac_c_werror_flag" ||
19896 test ! -s conftest.err
19897 } && test -s conftest$ac_exeext &&
19898 $as_test_x conftest$ac_exeext; then
19899 have_res_init=yes
19900else
19901 echo "$as_me: failed program was:" >&5
19902sed 's/^/| /' conftest.$ac_ext >&5
19903
19904 have_res_init=no
19905fi
19906
19907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19908 conftest$ac_exeext conftest.$ac_ext
19909 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19910echo "${ECHO_T}$have_res_init" >&6; }
19911 if test "$have_res_init" = yes ; then
19912 resolv=yes
19913 fi
19914 LIBS="$OLIBS"
19915fi
19916
19917if test "$have_res_init" = yes; then
19918
19919cat >>confdefs.h <<\_ACEOF
19920#define HAVE_RES_INIT 1
19921_ACEOF
19922
19923fi
19924
84e70f78 19925# Do we need the Hesiod library to provide the support routines?
ff1095d1 19926if test "$with_hesiod" != no ; then
84e70f78 19927 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
19928 { echo "$as_me:$LINENO: checking for res_send" >&5
19929echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19930if test "${ac_cv_func_res_send+set}" = set; then
19931 echo $ECHO_N "(cached) $ECHO_C" >&6
19932else
19933 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19934/* confdefs.h. */
19935_ACEOF
19936cat confdefs.h >>conftest.$ac_ext
19937cat >>conftest.$ac_ext <<_ACEOF
19938/* end confdefs.h. */
edfaf76d
LK
19939/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19940 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19941#define res_send innocuous_res_send
19942
84e70f78 19943/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19944 which can conflict with char res_send (); below.
19945 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19946 <limits.h> exists even on freestanding compilers. */
edfaf76d 19947
19650fd6
AS
19948#ifdef __STDC__
19949# include <limits.h>
19950#else
19951# include <assert.h>
19952#endif
edfaf76d
LK
19953
19954#undef res_send
19955
ca81d7a0
JD
19956/* Override any GCC internal prototype to avoid an error.
19957 Use char because int might match the return type of a GCC
19958 builtin and then its argument prototype would still apply. */
84e70f78
KR
19959#ifdef __cplusplus
19960extern "C"
19961#endif
84e70f78 19962char res_send ();
84e70f78
KR
19963/* The GNU C library defines this for functions which it implements
19964 to always fail with ENOSYS. Some functions are actually named
19965 something starting with __ and the normal name is an alias. */
ca81d7a0 19966#if defined __stub_res_send || defined __stub___res_send
84e70f78 19967choke me
cd958eb3
MB
19968#endif
19969
19650fd6
AS
19970int
19971main ()
19972{
ca81d7a0 19973return res_send ();
84e70f78
KR
19974 ;
19975 return 0;
19976}
19977_ACEOF
19978rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19979if { (ac_try="$ac_link"
19980case "(($ac_try" in
19981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19982 *) ac_try_echo=$ac_try;;
19983esac
19984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19985 (eval "$ac_link") 2>conftest.er1
84e70f78 19986 ac_status=$?
edfaf76d
LK
19987 grep -v '^ *+' conftest.er1 >conftest.err
19988 rm -f conftest.er1
19989 cat conftest.err >&5
c0d27fcc 19990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19991 (exit $ac_status); } && {
19992 test -z "$ac_c_werror_flag" ||
19993 test ! -s conftest.err
19994 } && test -s conftest$ac_exeext &&
19995 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19996 ac_cv_func_res_send=yes
19997else
19998 echo "$as_me: failed program was:" >&5
19650fd6
AS
19999sed 's/^/| /' conftest.$ac_ext >&5
20000
ca81d7a0 20001 ac_cv_func_res_send=no
84e70f78 20002fi
ca81d7a0 20003
f053c89f 20004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20005 conftest$ac_exeext conftest.$ac_ext
84e70f78 20006fi
ca81d7a0
JD
20007{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20008echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20009if test $ac_cv_func_res_send = yes; then
20010 :
20011else
ca81d7a0
JD
20012 { echo "$as_me:$LINENO: checking for __res_send" >&5
20013echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20014if test "${ac_cv_func___res_send+set}" = set; then
20015 echo $ECHO_N "(cached) $ECHO_C" >&6
20016else
20017 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20018/* confdefs.h. */
20019_ACEOF
20020cat confdefs.h >>conftest.$ac_ext
20021cat >>conftest.$ac_ext <<_ACEOF
20022/* end confdefs.h. */
edfaf76d
LK
20023/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20024 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20025#define __res_send innocuous___res_send
20026
84e70f78 20027/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20028 which can conflict with char __res_send (); below.
20029 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20030 <limits.h> exists even on freestanding compilers. */
edfaf76d 20031
19650fd6
AS
20032#ifdef __STDC__
20033# include <limits.h>
20034#else
20035# include <assert.h>
20036#endif
edfaf76d
LK
20037
20038#undef __res_send
20039
ca81d7a0
JD
20040/* Override any GCC internal prototype to avoid an error.
20041 Use char because int might match the return type of a GCC
20042 builtin and then its argument prototype would still apply. */
84e70f78
KR
20043#ifdef __cplusplus
20044extern "C"
20045#endif
84e70f78 20046char __res_send ();
84e70f78
KR
20047/* The GNU C library defines this for functions which it implements
20048 to always fail with ENOSYS. Some functions are actually named
20049 something starting with __ and the normal name is an alias. */
ca81d7a0 20050#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20051choke me
84e70f78
KR
20052#endif
20053
19650fd6
AS
20054int
20055main ()
20056{
ca81d7a0 20057return __res_send ();
84e70f78
KR
20058 ;
20059 return 0;
20060}
20061_ACEOF
20062rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20063if { (ac_try="$ac_link"
20064case "(($ac_try" in
20065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20066 *) ac_try_echo=$ac_try;;
20067esac
20068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20069 (eval "$ac_link") 2>conftest.er1
84e70f78 20070 ac_status=$?
edfaf76d
LK
20071 grep -v '^ *+' conftest.er1 >conftest.err
20072 rm -f conftest.er1
20073 cat conftest.err >&5
c0d27fcc 20074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20075 (exit $ac_status); } && {
20076 test -z "$ac_c_werror_flag" ||
20077 test ! -s conftest.err
20078 } && test -s conftest$ac_exeext &&
20079 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20080 ac_cv_func___res_send=yes
20081else
20082 echo "$as_me: failed program was:" >&5
19650fd6
AS
20083sed 's/^/| /' conftest.$ac_ext >&5
20084
ca81d7a0 20085 ac_cv_func___res_send=no
84e70f78 20086fi
ca81d7a0 20087
f053c89f 20088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20089 conftest$ac_exeext conftest.$ac_ext
84e70f78 20090fi
ca81d7a0
JD
20091{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20092echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20093if test $ac_cv_func___res_send = yes; then
20094 :
20095else
ca81d7a0
JD
20096 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20097echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20098if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20099 echo $ECHO_N "(cached) $ECHO_C" >&6
20100else
20101 ac_check_lib_save_LIBS=$LIBS
20102LIBS="-lresolv $LIBS"
20103cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20104/* confdefs.h. */
20105_ACEOF
20106cat confdefs.h >>conftest.$ac_ext
20107cat >>conftest.$ac_ext <<_ACEOF
20108/* end confdefs.h. */
84e70f78 20109
ca81d7a0
JD
20110/* Override any GCC internal prototype to avoid an error.
20111 Use char because int might match the return type of a GCC
20112 builtin and then its argument prototype would still apply. */
84e70f78
KR
20113#ifdef __cplusplus
20114extern "C"
20115#endif
84e70f78
KR
20116char res_send ();
20117int
20118main ()
20119{
ca81d7a0 20120return res_send ();
84e70f78
KR
20121 ;
20122 return 0;
20123}
20124_ACEOF
20125rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20126if { (ac_try="$ac_link"
20127case "(($ac_try" in
20128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20129 *) ac_try_echo=$ac_try;;
20130esac
20131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20132 (eval "$ac_link") 2>conftest.er1
84e70f78 20133 ac_status=$?
edfaf76d
LK
20134 grep -v '^ *+' conftest.er1 >conftest.err
20135 rm -f conftest.er1
20136 cat conftest.err >&5
c0d27fcc 20137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20138 (exit $ac_status); } && {
20139 test -z "$ac_c_werror_flag" ||
20140 test ! -s conftest.err
20141 } && test -s conftest$ac_exeext &&
20142 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20143 ac_cv_lib_resolv_res_send=yes
20144else
20145 echo "$as_me: failed program was:" >&5
19650fd6
AS
20146sed 's/^/| /' conftest.$ac_ext >&5
20147
ca81d7a0 20148 ac_cv_lib_resolv_res_send=no
84e70f78 20149fi
ca81d7a0 20150
f053c89f 20151rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20152 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20153LIBS=$ac_check_lib_save_LIBS
20154fi
ca81d7a0
JD
20155{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20156echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20157if test $ac_cv_lib_resolv_res_send = yes; then
20158 resolv=yes
20159else
ca81d7a0
JD
20160 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20161echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20162if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20163 echo $ECHO_N "(cached) $ECHO_C" >&6
20164else
20165 ac_check_lib_save_LIBS=$LIBS
20166LIBS="-lresolv $LIBS"
20167cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20168/* confdefs.h. */
20169_ACEOF
20170cat confdefs.h >>conftest.$ac_ext
20171cat >>conftest.$ac_ext <<_ACEOF
20172/* end confdefs.h. */
84e70f78 20173
ca81d7a0
JD
20174/* Override any GCC internal prototype to avoid an error.
20175 Use char because int might match the return type of a GCC
20176 builtin and then its argument prototype would still apply. */
84e70f78
KR
20177#ifdef __cplusplus
20178extern "C"
20179#endif
84e70f78
KR
20180char __res_send ();
20181int
20182main ()
20183{
ca81d7a0 20184return __res_send ();
84e70f78
KR
20185 ;
20186 return 0;
20187}
20188_ACEOF
20189rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20190if { (ac_try="$ac_link"
20191case "(($ac_try" in
20192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20193 *) ac_try_echo=$ac_try;;
20194esac
20195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20196 (eval "$ac_link") 2>conftest.er1
84e70f78 20197 ac_status=$?
edfaf76d
LK
20198 grep -v '^ *+' conftest.er1 >conftest.err
20199 rm -f conftest.er1
20200 cat conftest.err >&5
c0d27fcc 20201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20202 (exit $ac_status); } && {
20203 test -z "$ac_c_werror_flag" ||
20204 test ! -s conftest.err
20205 } && test -s conftest$ac_exeext &&
20206 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20207 ac_cv_lib_resolv___res_send=yes
20208else
20209 echo "$as_me: failed program was:" >&5
19650fd6
AS
20210sed 's/^/| /' conftest.$ac_ext >&5
20211
ca81d7a0 20212 ac_cv_lib_resolv___res_send=no
84e70f78 20213fi
ca81d7a0 20214
f053c89f 20215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20216 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20217LIBS=$ac_check_lib_save_LIBS
20218fi
ca81d7a0
JD
20219{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20220echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20221if test $ac_cv_lib_resolv___res_send = yes; then
20222 resolv=yes
20223fi
20224
20225fi
20226
20227fi
20228
20229fi
20230
20231 if test "$resolv" = yes ; then
20232 RESOLVLIB=-lresolv
84e70f78
KR
20233 else
20234 RESOLVLIB=
20235 fi
ca81d7a0
JD
20236 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20237echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20238if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20239 echo $ECHO_N "(cached) $ECHO_C" >&6
20240else
20241 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20242/* confdefs.h. */
20243_ACEOF
20244cat confdefs.h >>conftest.$ac_ext
20245cat >>conftest.$ac_ext <<_ACEOF
20246/* end confdefs.h. */
edfaf76d
LK
20247/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20248 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20249#define hes_getmailhost innocuous_hes_getmailhost
20250
84e70f78 20251/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20252 which can conflict with char hes_getmailhost (); below.
20253 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20254 <limits.h> exists even on freestanding compilers. */
edfaf76d 20255
19650fd6
AS
20256#ifdef __STDC__
20257# include <limits.h>
20258#else
20259# include <assert.h>
20260#endif
edfaf76d
LK
20261
20262#undef hes_getmailhost
20263
ca81d7a0
JD
20264/* Override any GCC internal prototype to avoid an error.
20265 Use char because int might match the return type of a GCC
20266 builtin and then its argument prototype would still apply. */
84e70f78
KR
20267#ifdef __cplusplus
20268extern "C"
20269#endif
84e70f78 20270char hes_getmailhost ();
84e70f78
KR
20271/* The GNU C library defines this for functions which it implements
20272 to always fail with ENOSYS. Some functions are actually named
20273 something starting with __ and the normal name is an alias. */
ca81d7a0 20274#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20275choke me
cd958eb3
MB
20276#endif
20277
19650fd6
AS
20278int
20279main ()
20280{
ca81d7a0 20281return hes_getmailhost ();
84e70f78
KR
20282 ;
20283 return 0;
20284}
20285_ACEOF
20286rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20287if { (ac_try="$ac_link"
20288case "(($ac_try" in
20289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290 *) ac_try_echo=$ac_try;;
20291esac
20292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20293 (eval "$ac_link") 2>conftest.er1
84e70f78 20294 ac_status=$?
edfaf76d
LK
20295 grep -v '^ *+' conftest.er1 >conftest.err
20296 rm -f conftest.er1
20297 cat conftest.err >&5
c0d27fcc 20298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20299 (exit $ac_status); } && {
20300 test -z "$ac_c_werror_flag" ||
20301 test ! -s conftest.err
20302 } && test -s conftest$ac_exeext &&
20303 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20304 ac_cv_func_hes_getmailhost=yes
20305else
20306 echo "$as_me: failed program was:" >&5
19650fd6
AS
20307sed 's/^/| /' conftest.$ac_ext >&5
20308
ca81d7a0 20309 ac_cv_func_hes_getmailhost=no
84e70f78 20310fi
ca81d7a0 20311
f053c89f 20312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20313 conftest$ac_exeext conftest.$ac_ext
84e70f78 20314fi
ca81d7a0
JD
20315{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20316echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20317if test $ac_cv_func_hes_getmailhost = yes; then
20318 :
20319else
ca81d7a0
JD
20320 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20321echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20322if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20323 echo $ECHO_N "(cached) $ECHO_C" >&6
20324else
20325 ac_check_lib_save_LIBS=$LIBS
20326LIBS="-lhesiod $RESOLVLIB $LIBS"
20327cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20328/* confdefs.h. */
20329_ACEOF
20330cat confdefs.h >>conftest.$ac_ext
20331cat >>conftest.$ac_ext <<_ACEOF
20332/* end confdefs.h. */
84e70f78 20333
ca81d7a0
JD
20334/* Override any GCC internal prototype to avoid an error.
20335 Use char because int might match the return type of a GCC
20336 builtin and then its argument prototype would still apply. */
84e70f78
KR
20337#ifdef __cplusplus
20338extern "C"
20339#endif
84e70f78
KR
20340char hes_getmailhost ();
20341int
20342main ()
20343{
ca81d7a0 20344return hes_getmailhost ();
84e70f78
KR
20345 ;
20346 return 0;
20347}
20348_ACEOF
20349rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20350if { (ac_try="$ac_link"
20351case "(($ac_try" in
20352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20353 *) ac_try_echo=$ac_try;;
20354esac
20355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20356 (eval "$ac_link") 2>conftest.er1
84e70f78 20357 ac_status=$?
edfaf76d
LK
20358 grep -v '^ *+' conftest.er1 >conftest.err
20359 rm -f conftest.er1
20360 cat conftest.err >&5
c0d27fcc 20361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20362 (exit $ac_status); } && {
20363 test -z "$ac_c_werror_flag" ||
20364 test ! -s conftest.err
20365 } && test -s conftest$ac_exeext &&
20366 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20367 ac_cv_lib_hesiod_hes_getmailhost=yes
20368else
20369 echo "$as_me: failed program was:" >&5
19650fd6
AS
20370sed 's/^/| /' conftest.$ac_ext >&5
20371
ca81d7a0 20372 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20373fi
ca81d7a0 20374
f053c89f 20375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20376 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20377LIBS=$ac_check_lib_save_LIBS
20378fi
ca81d7a0
JD
20379{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20380echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20381if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20382
c0d27fcc 20383cat >>confdefs.h <<\_ACEOF
84e70f78 20384#define HAVE_LIBHESIOD 1
c0d27fcc 20385_ACEOF
84e70f78
KR
20386
20387else
20388 :
20389fi
20390
20391fi
20392
20393fi
20394
bc3512d0
CY
20395# Do we need libresolv (due to res_init or Hesiod)?
20396if test "$resolv" = yes ; then
20397
20398cat >>confdefs.h <<\_ACEOF
20399#define HAVE_LIBRESOLV 1
20400_ACEOF
20401
20402fi
20403
a21616bd 20404# These tell us which Kerberos-related libraries to use.
ff1095d1 20405if test "${with_kerberos}" != no; then
503d2be0 20406
ca81d7a0
JD
20407{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20408echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20409if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20410 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20411else
503d2be0 20412 ac_check_lib_save_LIBS=$LIBS
a21616bd 20413LIBS="-lcom_err $LIBS"
503d2be0 20414cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20415/* confdefs.h. */
20416_ACEOF
20417cat confdefs.h >>conftest.$ac_ext
20418cat >>conftest.$ac_ext <<_ACEOF
20419/* end confdefs.h. */
503d2be0 20420
ca81d7a0
JD
20421/* Override any GCC internal prototype to avoid an error.
20422 Use char because int might match the return type of a GCC
20423 builtin and then its argument prototype would still apply. */
503d2be0
AS
20424#ifdef __cplusplus
20425extern "C"
20426#endif
503d2be0
AS
20427char com_err ();
20428int
20429main ()
20430{
ca81d7a0 20431return com_err ();
503d2be0
AS
20432 ;
20433 return 0;
20434}
20435_ACEOF
20436rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20437if { (ac_try="$ac_link"
20438case "(($ac_try" in
20439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20440 *) ac_try_echo=$ac_try;;
20441esac
20442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20443 (eval "$ac_link") 2>conftest.er1
503d2be0 20444 ac_status=$?
edfaf76d
LK
20445 grep -v '^ *+' conftest.er1 >conftest.err
20446 rm -f conftest.er1
20447 cat conftest.err >&5
c0d27fcc 20448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20449 (exit $ac_status); } && {
20450 test -z "$ac_c_werror_flag" ||
20451 test ! -s conftest.err
20452 } && test -s conftest$ac_exeext &&
20453 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20454 ac_cv_lib_com_err_com_err=yes
20455else
20456 echo "$as_me: failed program was:" >&5
19650fd6
AS
20457sed 's/^/| /' conftest.$ac_ext >&5
20458
ca81d7a0 20459 ac_cv_lib_com_err_com_err=no
503d2be0 20460fi
ca81d7a0 20461
f053c89f 20462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20463 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20464LIBS=$ac_check_lib_save_LIBS
20465fi
ca81d7a0
JD
20466{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20467echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20468if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20469 cat >>confdefs.h <<_ACEOF
503d2be0 20470#define HAVE_LIBCOM_ERR 1
c0d27fcc 20471_ACEOF
a21616bd
KR
20472
20473 LIBS="-lcom_err $LIBS"
20474
a21616bd
KR
20475fi
20476
c0d27fcc 20477
ca81d7a0
JD
20478{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20479echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20480if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20481 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20482else
503d2be0 20483 ac_check_lib_save_LIBS=$LIBS
a21616bd 20484LIBS="-lk5crypto $LIBS"
503d2be0 20485cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20486/* confdefs.h. */
20487_ACEOF
20488cat confdefs.h >>conftest.$ac_ext
20489cat >>conftest.$ac_ext <<_ACEOF
20490/* end confdefs.h. */
503d2be0 20491
ca81d7a0
JD
20492/* Override any GCC internal prototype to avoid an error.
20493 Use char because int might match the return type of a GCC
20494 builtin and then its argument prototype would still apply. */
503d2be0
AS
20495#ifdef __cplusplus
20496extern "C"
20497#endif
503d2be0
AS
20498char mit_des_cbc_encrypt ();
20499int
20500main ()
20501{
ca81d7a0 20502return mit_des_cbc_encrypt ();
503d2be0
AS
20503 ;
20504 return 0;
20505}
20506_ACEOF
20507rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20508if { (ac_try="$ac_link"
20509case "(($ac_try" in
20510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20511 *) ac_try_echo=$ac_try;;
20512esac
20513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20514 (eval "$ac_link") 2>conftest.er1
503d2be0 20515 ac_status=$?
edfaf76d
LK
20516 grep -v '^ *+' conftest.er1 >conftest.err
20517 rm -f conftest.er1
20518 cat conftest.err >&5
c0d27fcc 20519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20520 (exit $ac_status); } && {
20521 test -z "$ac_c_werror_flag" ||
20522 test ! -s conftest.err
20523 } && test -s conftest$ac_exeext &&
20524 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20525 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20526else
20527 echo "$as_me: failed program was:" >&5
19650fd6
AS
20528sed 's/^/| /' conftest.$ac_ext >&5
20529
ca81d7a0 20530 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20531fi
ca81d7a0 20532
f053c89f 20533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20534 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20535LIBS=$ac_check_lib_save_LIBS
20536fi
ca81d7a0
JD
20537{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20538echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20539if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20540 cat >>confdefs.h <<_ACEOF
503d2be0 20541#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20542_ACEOF
a21616bd
KR
20543
20544 LIBS="-lk5crypto $LIBS"
20545
a21616bd
KR
20546fi
20547
c0d27fcc 20548
ca81d7a0
JD
20549{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20550echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20551if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20552 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20553else
503d2be0 20554 ac_check_lib_save_LIBS=$LIBS
a21616bd 20555LIBS="-lcrypto $LIBS"
503d2be0 20556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20557/* confdefs.h. */
20558_ACEOF
20559cat confdefs.h >>conftest.$ac_ext
20560cat >>conftest.$ac_ext <<_ACEOF
20561/* end confdefs.h. */
503d2be0 20562
ca81d7a0
JD
20563/* Override any GCC internal prototype to avoid an error.
20564 Use char because int might match the return type of a GCC
20565 builtin and then its argument prototype would still apply. */
503d2be0
AS
20566#ifdef __cplusplus
20567extern "C"
20568#endif
503d2be0
AS
20569char mit_des_cbc_encrypt ();
20570int
20571main ()
20572{
ca81d7a0 20573return mit_des_cbc_encrypt ();
503d2be0
AS
20574 ;
20575 return 0;
20576}
20577_ACEOF
20578rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20579if { (ac_try="$ac_link"
20580case "(($ac_try" in
20581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20582 *) ac_try_echo=$ac_try;;
20583esac
20584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20585 (eval "$ac_link") 2>conftest.er1
503d2be0 20586 ac_status=$?
edfaf76d
LK
20587 grep -v '^ *+' conftest.er1 >conftest.err
20588 rm -f conftest.er1
20589 cat conftest.err >&5
c0d27fcc 20590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20591 (exit $ac_status); } && {
20592 test -z "$ac_c_werror_flag" ||
20593 test ! -s conftest.err
20594 } && test -s conftest$ac_exeext &&
20595 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20596 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20597else
20598 echo "$as_me: failed program was:" >&5
19650fd6
AS
20599sed 's/^/| /' conftest.$ac_ext >&5
20600
ca81d7a0 20601 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20602fi
ca81d7a0 20603
f053c89f 20604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20605 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20606LIBS=$ac_check_lib_save_LIBS
20607fi
ca81d7a0
JD
20608{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20609echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20610if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20611 cat >>confdefs.h <<_ACEOF
503d2be0 20612#define HAVE_LIBCRYPTO 1
c0d27fcc 20613_ACEOF
a21616bd
KR
20614
20615 LIBS="-lcrypto $LIBS"
20616
a21616bd
KR
20617fi
20618
c0d27fcc 20619
ca81d7a0
JD
20620{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20621echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20622if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20623 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20624else
503d2be0 20625 ac_check_lib_save_LIBS=$LIBS
a21616bd 20626LIBS="-lkrb5 $LIBS"
503d2be0 20627cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20628/* confdefs.h. */
20629_ACEOF
20630cat confdefs.h >>conftest.$ac_ext
20631cat >>conftest.$ac_ext <<_ACEOF
20632/* end confdefs.h. */
a21616bd 20633
ca81d7a0
JD
20634/* Override any GCC internal prototype to avoid an error.
20635 Use char because int might match the return type of a GCC
20636 builtin and then its argument prototype would still apply. */
503d2be0
AS
20637#ifdef __cplusplus
20638extern "C"
20639#endif
503d2be0
AS
20640char krb5_init_context ();
20641int
20642main ()
20643{
ca81d7a0 20644return krb5_init_context ();
503d2be0
AS
20645 ;
20646 return 0;
20647}
20648_ACEOF
20649rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20650if { (ac_try="$ac_link"
20651case "(($ac_try" in
20652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20653 *) ac_try_echo=$ac_try;;
20654esac
20655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20656 (eval "$ac_link") 2>conftest.er1
503d2be0 20657 ac_status=$?
edfaf76d
LK
20658 grep -v '^ *+' conftest.er1 >conftest.err
20659 rm -f conftest.er1
20660 cat conftest.err >&5
c0d27fcc 20661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20662 (exit $ac_status); } && {
20663 test -z "$ac_c_werror_flag" ||
20664 test ! -s conftest.err
20665 } && test -s conftest$ac_exeext &&
20666 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20667 ac_cv_lib_krb5_krb5_init_context=yes
20668else
20669 echo "$as_me: failed program was:" >&5
19650fd6
AS
20670sed 's/^/| /' conftest.$ac_ext >&5
20671
ca81d7a0 20672 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20673fi
ca81d7a0 20674
f053c89f 20675rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20676 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20677LIBS=$ac_check_lib_save_LIBS
20678fi
ca81d7a0
JD
20679{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20680echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20681if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20682 cat >>confdefs.h <<_ACEOF
503d2be0 20683#define HAVE_LIBKRB5 1
c0d27fcc 20684_ACEOF
a21616bd
KR
20685
20686 LIBS="-lkrb5 $LIBS"
20687
a21616bd
KR
20688fi
20689
ff1095d1 20690 if test "${with_kerberos5}" = no; then
503d2be0 20691
ca81d7a0
JD
20692{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20693echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20694if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20695 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20696else
503d2be0 20697 ac_check_lib_save_LIBS=$LIBS
a21616bd 20698LIBS="-ldes425 $LIBS"
503d2be0 20699cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20700/* confdefs.h. */
20701_ACEOF
20702cat confdefs.h >>conftest.$ac_ext
20703cat >>conftest.$ac_ext <<_ACEOF
20704/* end confdefs.h. */
503d2be0 20705
ca81d7a0
JD
20706/* Override any GCC internal prototype to avoid an error.
20707 Use char because int might match the return type of a GCC
20708 builtin and then its argument prototype would still apply. */
503d2be0
AS
20709#ifdef __cplusplus
20710extern "C"
20711#endif
503d2be0
AS
20712char des_cbc_encrypt ();
20713int
20714main ()
20715{
ca81d7a0 20716return des_cbc_encrypt ();
503d2be0
AS
20717 ;
20718 return 0;
20719}
20720_ACEOF
20721rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20722if { (ac_try="$ac_link"
20723case "(($ac_try" in
20724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20725 *) ac_try_echo=$ac_try;;
20726esac
20727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20728 (eval "$ac_link") 2>conftest.er1
503d2be0 20729 ac_status=$?
edfaf76d
LK
20730 grep -v '^ *+' conftest.er1 >conftest.err
20731 rm -f conftest.er1
20732 cat conftest.err >&5
c0d27fcc 20733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20734 (exit $ac_status); } && {
20735 test -z "$ac_c_werror_flag" ||
20736 test ! -s conftest.err
20737 } && test -s conftest$ac_exeext &&
20738 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20739 ac_cv_lib_des425_des_cbc_encrypt=yes
20740else
20741 echo "$as_me: failed program was:" >&5
19650fd6
AS
20742sed 's/^/| /' conftest.$ac_ext >&5
20743
ca81d7a0 20744 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20745fi
ca81d7a0 20746
f053c89f 20747rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20748 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20749LIBS=$ac_check_lib_save_LIBS
20750fi
ca81d7a0
JD
20751{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20752echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20753if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20754 cat >>confdefs.h <<_ACEOF
503d2be0 20755#define HAVE_LIBDES425 1
c0d27fcc 20756_ACEOF
a21616bd
KR
20757
20758 LIBS="-ldes425 $LIBS"
20759
20760else
503d2be0 20761
ca81d7a0
JD
20762{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20763echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20764if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20765 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20766else
503d2be0 20767 ac_check_lib_save_LIBS=$LIBS
a21616bd 20768LIBS="-ldes $LIBS"
503d2be0 20769cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20770/* confdefs.h. */
20771_ACEOF
20772cat confdefs.h >>conftest.$ac_ext
20773cat >>conftest.$ac_ext <<_ACEOF
20774/* end confdefs.h. */
503d2be0 20775
ca81d7a0
JD
20776/* Override any GCC internal prototype to avoid an error.
20777 Use char because int might match the return type of a GCC
20778 builtin and then its argument prototype would still apply. */
503d2be0
AS
20779#ifdef __cplusplus
20780extern "C"
20781#endif
503d2be0
AS
20782char des_cbc_encrypt ();
20783int
20784main ()
20785{
ca81d7a0 20786return des_cbc_encrypt ();
503d2be0
AS
20787 ;
20788 return 0;
20789}
20790_ACEOF
20791rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20792if { (ac_try="$ac_link"
20793case "(($ac_try" in
20794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20795 *) ac_try_echo=$ac_try;;
20796esac
20797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20798 (eval "$ac_link") 2>conftest.er1
503d2be0 20799 ac_status=$?
edfaf76d
LK
20800 grep -v '^ *+' conftest.er1 >conftest.err
20801 rm -f conftest.er1
20802 cat conftest.err >&5
c0d27fcc 20803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20804 (exit $ac_status); } && {
20805 test -z "$ac_c_werror_flag" ||
20806 test ! -s conftest.err
20807 } && test -s conftest$ac_exeext &&
20808 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20809 ac_cv_lib_des_des_cbc_encrypt=yes
20810else
20811 echo "$as_me: failed program was:" >&5
19650fd6
AS
20812sed 's/^/| /' conftest.$ac_ext >&5
20813
ca81d7a0 20814 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20815fi
ca81d7a0 20816
f053c89f 20817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20818 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20819LIBS=$ac_check_lib_save_LIBS
20820fi
ca81d7a0
JD
20821{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20822echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20823if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20824 cat >>confdefs.h <<_ACEOF
503d2be0 20825#define HAVE_LIBDES 1
c0d27fcc 20826_ACEOF
a21616bd
KR
20827
20828 LIBS="-ldes $LIBS"
20829
a21616bd
KR
20830fi
20831
20832fi
20833
c0d27fcc 20834
ca81d7a0
JD
20835{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20836echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20837if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20838 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20839else
503d2be0 20840 ac_check_lib_save_LIBS=$LIBS
a21616bd 20841LIBS="-lkrb4 $LIBS"
503d2be0 20842cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20843/* confdefs.h. */
20844_ACEOF
20845cat confdefs.h >>conftest.$ac_ext
20846cat >>conftest.$ac_ext <<_ACEOF
20847/* end confdefs.h. */
503d2be0 20848
ca81d7a0
JD
20849/* Override any GCC internal prototype to avoid an error.
20850 Use char because int might match the return type of a GCC
20851 builtin and then its argument prototype would still apply. */
503d2be0
AS
20852#ifdef __cplusplus
20853extern "C"
20854#endif
503d2be0
AS
20855char krb_get_cred ();
20856int
20857main ()
20858{
f053c89f 20859return krb_get_cred ();
503d2be0
AS
20860 ;
20861 return 0;
20862}
20863_ACEOF
20864rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20865if { (ac_try="$ac_link"
20866case "(($ac_try" in
ca81d7a0
JD
20867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20868 *) ac_try_echo=$ac_try;;
20869esac
20870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20871 (eval "$ac_link") 2>conftest.er1
503d2be0 20872 ac_status=$?
edfaf76d
LK
20873 grep -v '^ *+' conftest.er1 >conftest.err
20874 rm -f conftest.er1
20875 cat conftest.err >&5
c0d27fcc 20876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20877 (exit $ac_status); } && {
20878 test -z "$ac_c_werror_flag" ||
20879 test ! -s conftest.err
20880 } && test -s conftest$ac_exeext &&
20881 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20882 ac_cv_lib_krb4_krb_get_cred=yes
20883else
20884 echo "$as_me: failed program was:" >&5
19650fd6
AS
20885sed 's/^/| /' conftest.$ac_ext >&5
20886
ca81d7a0 20887 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20888fi
ca81d7a0 20889
f053c89f 20890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20891 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20892LIBS=$ac_check_lib_save_LIBS
20893fi
ca81d7a0
JD
20894{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20895echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20896if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20897 cat >>confdefs.h <<_ACEOF
503d2be0 20898#define HAVE_LIBKRB4 1
c0d27fcc 20899_ACEOF
a21616bd
KR
20900
20901 LIBS="-lkrb4 $LIBS"
20902
20903else
503d2be0 20904
ca81d7a0
JD
20905{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20906echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20907if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20908 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20909else
503d2be0 20910 ac_check_lib_save_LIBS=$LIBS
a21616bd 20911LIBS="-lkrb $LIBS"
503d2be0 20912cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20913/* confdefs.h. */
20914_ACEOF
20915cat confdefs.h >>conftest.$ac_ext
20916cat >>conftest.$ac_ext <<_ACEOF
20917/* end confdefs.h. */
503d2be0 20918
ca81d7a0
JD
20919/* Override any GCC internal prototype to avoid an error.
20920 Use char because int might match the return type of a GCC
20921 builtin and then its argument prototype would still apply. */
503d2be0
AS
20922#ifdef __cplusplus
20923extern "C"
20924#endif
503d2be0
AS
20925char krb_get_cred ();
20926int
20927main ()
20928{
ca81d7a0 20929return krb_get_cred ();
503d2be0
AS
20930 ;
20931 return 0;
20932}
20933_ACEOF
20934rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20935if { (ac_try="$ac_link"
20936case "(($ac_try" in
20937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20938 *) ac_try_echo=$ac_try;;
20939esac
20940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20941 (eval "$ac_link") 2>conftest.er1
503d2be0 20942 ac_status=$?
edfaf76d
LK
20943 grep -v '^ *+' conftest.er1 >conftest.err
20944 rm -f conftest.er1
20945 cat conftest.err >&5
c0d27fcc 20946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20947 (exit $ac_status); } && {
20948 test -z "$ac_c_werror_flag" ||
20949 test ! -s conftest.err
20950 } && test -s conftest$ac_exeext &&
20951 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20952 ac_cv_lib_krb_krb_get_cred=yes
20953else
20954 echo "$as_me: failed program was:" >&5
19650fd6
AS
20955sed 's/^/| /' conftest.$ac_ext >&5
20956
ca81d7a0 20957 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20958fi
ca81d7a0 20959
f053c89f 20960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20961 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20962LIBS=$ac_check_lib_save_LIBS
20963fi
ca81d7a0
JD
20964{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20965echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20966if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20967 cat >>confdefs.h <<_ACEOF
503d2be0 20968#define HAVE_LIBKRB 1
c0d27fcc 20969_ACEOF
a21616bd
KR
20970
20971 LIBS="-lkrb $LIBS"
20972
a21616bd
KR
20973fi
20974
20975fi
20976
20977 fi
20978
ff1095d1 20979 if test "${with_kerberos5}" != no; then
503d2be0
AS
20980
20981for ac_header in krb5.h
a21616bd 20982do
503d2be0 20983as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20984if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20985 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20986echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20987if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20988 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20989fi
ca81d7a0
JD
20990ac_res=`eval echo '${'$as_ac_Header'}'`
20991 { echo "$as_me:$LINENO: result: $ac_res" >&5
20992echo "${ECHO_T}$ac_res" >&6; }
98418dba 20993else
c0d27fcc 20994 # Is the header compilable?
ca81d7a0
JD
20995{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20996echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20997cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20998/* confdefs.h. */
20999_ACEOF
21000cat confdefs.h >>conftest.$ac_ext
21001cat >>conftest.$ac_ext <<_ACEOF
21002/* end confdefs.h. */
c0d27fcc
MR
21003$ac_includes_default
21004#include <$ac_header>
21005_ACEOF
21006rm -f conftest.$ac_objext
ca81d7a0
JD
21007if { (ac_try="$ac_compile"
21008case "(($ac_try" in
21009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21010 *) ac_try_echo=$ac_try;;
21011esac
21012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21013 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21014 ac_status=$?
edfaf76d
LK
21015 grep -v '^ *+' conftest.er1 >conftest.err
21016 rm -f conftest.er1
21017 cat conftest.err >&5
c0d27fcc 21018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21019 (exit $ac_status); } && {
21020 test -z "$ac_c_werror_flag" ||
21021 test ! -s conftest.err
21022 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21023 ac_header_compiler=yes
21024else
21025 echo "$as_me: failed program was:" >&5
19650fd6
AS
21026sed 's/^/| /' conftest.$ac_ext >&5
21027
ca81d7a0 21028 ac_header_compiler=no
c0d27fcc 21029fi
ca81d7a0
JD
21030
21031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21032{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21033echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21034
21035# Is the header present?
ca81d7a0
JD
21036{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21037echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21038cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21039/* confdefs.h. */
21040_ACEOF
21041cat confdefs.h >>conftest.$ac_ext
21042cat >>conftest.$ac_ext <<_ACEOF
21043/* end confdefs.h. */
503d2be0
AS
21044#include <$ac_header>
21045_ACEOF
ca81d7a0
JD
21046if { (ac_try="$ac_cpp conftest.$ac_ext"
21047case "(($ac_try" in
21048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21049 *) ac_try_echo=$ac_try;;
21050esac
21051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21052 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21053 ac_status=$?
6bae0ccf 21054 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21055 rm -f conftest.er1
21056 cat conftest.err >&5
c0d27fcc 21057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21058 (exit $ac_status); } >/dev/null && {
21059 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21060 test ! -s conftest.err
21061 }; then
c0d27fcc 21062 ac_header_preproc=yes
503d2be0
AS
21063else
21064 echo "$as_me: failed program was:" >&5
19650fd6
AS
21065sed 's/^/| /' conftest.$ac_ext >&5
21066
c0d27fcc 21067 ac_header_preproc=no
a21616bd 21068fi
ca81d7a0 21069
503d2be0 21070rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21071{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21072echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21073
21074# So? What about this header?
edfaf76d
LK
21075case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21076 yes:no: )
c0d27fcc
MR
21077 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21078echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21079 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21080echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21081 ac_header_preproc=yes
19650fd6 21082 ;;
edfaf76d 21083 no:yes:* )
c0d27fcc
MR
21084 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21085echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21086 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21087echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21088 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21089echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21090 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21091echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21092 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21093echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21094 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21095echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21096
19650fd6 21097 ;;
c0d27fcc 21098esac
ca81d7a0
JD
21099{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21101if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21102 echo $ECHO_N "(cached) $ECHO_C" >&6
21103else
edfaf76d 21104 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21105fi
ca81d7a0
JD
21106ac_res=`eval echo '${'$as_ac_Header'}'`
21107 { echo "$as_me:$LINENO: result: $ac_res" >&5
21108echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21109
21110fi
503d2be0 21111if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21112 cat >>confdefs.h <<_ACEOF
503d2be0 21113#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21114_ACEOF
21287a21
CY
21115 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
21116echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
21117if test "${ac_cv_member_krb5_error_text+set}" = set; then
21118 echo $ECHO_N "(cached) $ECHO_C" >&6
21119else
21120 cat >conftest.$ac_ext <<_ACEOF
21121/* confdefs.h. */
21122_ACEOF
21123cat confdefs.h >>conftest.$ac_ext
21124cat >>conftest.$ac_ext <<_ACEOF
21125/* end confdefs.h. */
21126#include <krb5.h>
21127
21128int
21129main ()
21130{
21131static krb5_error ac_aggr;
21132if (ac_aggr.text)
21133return 0;
21134 ;
21135 return 0;
21136}
21137_ACEOF
21138rm -f conftest.$ac_objext
21139if { (ac_try="$ac_compile"
21140case "(($ac_try" in
21141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21142 *) ac_try_echo=$ac_try;;
21143esac
21144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21145 (eval "$ac_compile") 2>conftest.er1
21146 ac_status=$?
21147 grep -v '^ *+' conftest.er1 >conftest.err
21148 rm -f conftest.er1
21149 cat conftest.err >&5
21150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21151 (exit $ac_status); } && {
21152 test -z "$ac_c_werror_flag" ||
21153 test ! -s conftest.err
21154 } && test -s conftest.$ac_objext; then
21155 ac_cv_member_krb5_error_text=yes
21156else
21157 echo "$as_me: failed program was:" >&5
21158sed 's/^/| /' conftest.$ac_ext >&5
21159
21160 cat >conftest.$ac_ext <<_ACEOF
21161/* confdefs.h. */
21162_ACEOF
21163cat confdefs.h >>conftest.$ac_ext
21164cat >>conftest.$ac_ext <<_ACEOF
21165/* end confdefs.h. */
21166#include <krb5.h>
21167
21168int
21169main ()
21170{
21171static krb5_error ac_aggr;
21172if (sizeof ac_aggr.text)
21173return 0;
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext
21179if { (ac_try="$ac_compile"
21180case "(($ac_try" in
21181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21182 *) ac_try_echo=$ac_try;;
21183esac
21184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21185 (eval "$ac_compile") 2>conftest.er1
21186 ac_status=$?
21187 grep -v '^ *+' conftest.er1 >conftest.err
21188 rm -f conftest.er1
21189 cat conftest.err >&5
21190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21191 (exit $ac_status); } && {
21192 test -z "$ac_c_werror_flag" ||
21193 test ! -s conftest.err
21194 } && test -s conftest.$ac_objext; then
21195 ac_cv_member_krb5_error_text=yes
21196else
21197 echo "$as_me: failed program was:" >&5
21198sed 's/^/| /' conftest.$ac_ext >&5
21199
21200 ac_cv_member_krb5_error_text=no
21201fi
21202
21203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21204fi
21205
21206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21207fi
21208{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
21209echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
21210if test $ac_cv_member_krb5_error_text = yes; then
21211
21212cat >>confdefs.h <<_ACEOF
21213#define HAVE_KRB5_ERROR_TEXT 1
21214_ACEOF
21215
21216
21217fi
21218{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
21219echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
21220if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
21221 echo $ECHO_N "(cached) $ECHO_C" >&6
21222else
21223 cat >conftest.$ac_ext <<_ACEOF
21224/* confdefs.h. */
21225_ACEOF
21226cat confdefs.h >>conftest.$ac_ext
21227cat >>conftest.$ac_ext <<_ACEOF
21228/* end confdefs.h. */
21229#include <krb5.h>
21230
21231int
21232main ()
21233{
21234static krb5_error ac_aggr;
21235if (ac_aggr.e_text)
21236return 0;
21237 ;
21238 return 0;
21239}
21240_ACEOF
21241rm -f conftest.$ac_objext
21242if { (ac_try="$ac_compile"
21243case "(($ac_try" in
21244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21245 *) ac_try_echo=$ac_try;;
21246esac
21247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21248 (eval "$ac_compile") 2>conftest.er1
21249 ac_status=$?
21250 grep -v '^ *+' conftest.er1 >conftest.err
21251 rm -f conftest.er1
21252 cat conftest.err >&5
21253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21254 (exit $ac_status); } && {
21255 test -z "$ac_c_werror_flag" ||
21256 test ! -s conftest.err
21257 } && test -s conftest.$ac_objext; then
21258 ac_cv_member_krb5_error_e_text=yes
21259else
21260 echo "$as_me: failed program was:" >&5
21261sed 's/^/| /' conftest.$ac_ext >&5
21262
21263 cat >conftest.$ac_ext <<_ACEOF
21264/* confdefs.h. */
21265_ACEOF
21266cat confdefs.h >>conftest.$ac_ext
21267cat >>conftest.$ac_ext <<_ACEOF
21268/* end confdefs.h. */
21269#include <krb5.h>
21270
21271int
21272main ()
21273{
21274static krb5_error ac_aggr;
21275if (sizeof ac_aggr.e_text)
21276return 0;
21277 ;
21278 return 0;
21279}
21280_ACEOF
21281rm -f conftest.$ac_objext
21282if { (ac_try="$ac_compile"
21283case "(($ac_try" in
21284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21285 *) ac_try_echo=$ac_try;;
21286esac
21287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21288 (eval "$ac_compile") 2>conftest.er1
21289 ac_status=$?
21290 grep -v '^ *+' conftest.er1 >conftest.err
21291 rm -f conftest.er1
21292 cat conftest.err >&5
21293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21294 (exit $ac_status); } && {
21295 test -z "$ac_c_werror_flag" ||
21296 test ! -s conftest.err
21297 } && test -s conftest.$ac_objext; then
21298 ac_cv_member_krb5_error_e_text=yes
21299else
21300 echo "$as_me: failed program was:" >&5
21301sed 's/^/| /' conftest.$ac_ext >&5
21302
21303 ac_cv_member_krb5_error_e_text=no
21304fi
21305
21306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21307fi
21308
21309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21310fi
21311{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
21312echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
21313if test $ac_cv_member_krb5_error_e_text = yes; then
21314
21315cat >>confdefs.h <<_ACEOF
21316#define HAVE_KRB5_ERROR_E_TEXT 1
21317_ACEOF
21318
21319
21320fi
503d2be0 21321
a21616bd 21322fi
c0d27fcc 21323
a21616bd
KR
21324done
21325
21326 else
503d2be0
AS
21327
21328for ac_header in des.h
a21616bd 21329do
503d2be0 21330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21331if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21332 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21333echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21334if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21335 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21336fi
ca81d7a0
JD
21337ac_res=`eval echo '${'$as_ac_Header'}'`
21338 { echo "$as_me:$LINENO: result: $ac_res" >&5
21339echo "${ECHO_T}$ac_res" >&6; }
98418dba 21340else
c0d27fcc 21341 # Is the header compilable?
ca81d7a0
JD
21342{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21343echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21344cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21345/* confdefs.h. */
21346_ACEOF
21347cat confdefs.h >>conftest.$ac_ext
21348cat >>conftest.$ac_ext <<_ACEOF
21349/* end confdefs.h. */
c0d27fcc
MR
21350$ac_includes_default
21351#include <$ac_header>
21352_ACEOF
21353rm -f conftest.$ac_objext
ca81d7a0
JD
21354if { (ac_try="$ac_compile"
21355case "(($ac_try" in
21356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21357 *) ac_try_echo=$ac_try;;
21358esac
21359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21360 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21361 ac_status=$?
edfaf76d
LK
21362 grep -v '^ *+' conftest.er1 >conftest.err
21363 rm -f conftest.er1
21364 cat conftest.err >&5
c0d27fcc 21365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21366 (exit $ac_status); } && {
21367 test -z "$ac_c_werror_flag" ||
21368 test ! -s conftest.err
21369 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21370 ac_header_compiler=yes
21371else
21372 echo "$as_me: failed program was:" >&5
19650fd6
AS
21373sed 's/^/| /' conftest.$ac_ext >&5
21374
ca81d7a0 21375 ac_header_compiler=no
c0d27fcc 21376fi
ca81d7a0
JD
21377
21378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21379{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21380echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21381
21382# Is the header present?
ca81d7a0
JD
21383{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21384echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21385cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21386/* confdefs.h. */
21387_ACEOF
21388cat confdefs.h >>conftest.$ac_ext
21389cat >>conftest.$ac_ext <<_ACEOF
21390/* end confdefs.h. */
503d2be0
AS
21391#include <$ac_header>
21392_ACEOF
ca81d7a0
JD
21393if { (ac_try="$ac_cpp conftest.$ac_ext"
21394case "(($ac_try" in
21395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21396 *) ac_try_echo=$ac_try;;
21397esac
21398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21399 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21400 ac_status=$?
6bae0ccf 21401 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21402 rm -f conftest.er1
21403 cat conftest.err >&5
c0d27fcc 21404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21405 (exit $ac_status); } >/dev/null && {
21406 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21407 test ! -s conftest.err
21408 }; then
c0d27fcc 21409 ac_header_preproc=yes
503d2be0
AS
21410else
21411 echo "$as_me: failed program was:" >&5
19650fd6
AS
21412sed 's/^/| /' conftest.$ac_ext >&5
21413
c0d27fcc 21414 ac_header_preproc=no
a21616bd 21415fi
ca81d7a0 21416
503d2be0 21417rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21418{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21419echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21420
21421# So? What about this header?
edfaf76d
LK
21422case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21423 yes:no: )
c0d27fcc
MR
21424 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21425echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21426 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21427echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21428 ac_header_preproc=yes
19650fd6 21429 ;;
edfaf76d 21430 no:yes:* )
c0d27fcc
MR
21431 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21432echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21433 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21434echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21435 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21436echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21437 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21438echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21439 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21440echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21441 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21442echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21443
19650fd6 21444 ;;
c0d27fcc 21445esac
ca81d7a0
JD
21446{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21447echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21448if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21449 echo $ECHO_N "(cached) $ECHO_C" >&6
21450else
edfaf76d 21451 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21452fi
ca81d7a0
JD
21453ac_res=`eval echo '${'$as_ac_Header'}'`
21454 { echo "$as_me:$LINENO: result: $ac_res" >&5
21455echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21456
21457fi
503d2be0 21458if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21459 cat >>confdefs.h <<_ACEOF
503d2be0 21460#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21461_ACEOF
503d2be0 21462
a21616bd 21463else
503d2be0
AS
21464
21465for ac_header in kerberosIV/des.h
a21616bd 21466do
503d2be0 21467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21468if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21469 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21470echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21471if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21472 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21473fi
ca81d7a0
JD
21474ac_res=`eval echo '${'$as_ac_Header'}'`
21475 { echo "$as_me:$LINENO: result: $ac_res" >&5
21476echo "${ECHO_T}$ac_res" >&6; }
98418dba 21477else
c0d27fcc 21478 # Is the header compilable?
ca81d7a0
JD
21479{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21480echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21481cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21482/* confdefs.h. */
21483_ACEOF
21484cat confdefs.h >>conftest.$ac_ext
21485cat >>conftest.$ac_ext <<_ACEOF
21486/* end confdefs.h. */
c0d27fcc
MR
21487$ac_includes_default
21488#include <$ac_header>
21489_ACEOF
21490rm -f conftest.$ac_objext
ca81d7a0
JD
21491if { (ac_try="$ac_compile"
21492case "(($ac_try" in
21493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21494 *) ac_try_echo=$ac_try;;
21495esac
21496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21497 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21498 ac_status=$?
edfaf76d
LK
21499 grep -v '^ *+' conftest.er1 >conftest.err
21500 rm -f conftest.er1
21501 cat conftest.err >&5
c0d27fcc 21502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21503 (exit $ac_status); } && {
21504 test -z "$ac_c_werror_flag" ||
21505 test ! -s conftest.err
21506 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21507 ac_header_compiler=yes
21508else
21509 echo "$as_me: failed program was:" >&5
19650fd6
AS
21510sed 's/^/| /' conftest.$ac_ext >&5
21511
ca81d7a0 21512 ac_header_compiler=no
c0d27fcc 21513fi
ca81d7a0
JD
21514
21515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21516{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21517echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21518
21519# Is the header present?
ca81d7a0
JD
21520{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21521echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21522cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21523/* confdefs.h. */
21524_ACEOF
21525cat confdefs.h >>conftest.$ac_ext
21526cat >>conftest.$ac_ext <<_ACEOF
21527/* end confdefs.h. */
503d2be0
AS
21528#include <$ac_header>
21529_ACEOF
ca81d7a0
JD
21530if { (ac_try="$ac_cpp conftest.$ac_ext"
21531case "(($ac_try" in
21532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21533 *) ac_try_echo=$ac_try;;
21534esac
21535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21536 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21537 ac_status=$?
6bae0ccf 21538 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21539 rm -f conftest.er1
21540 cat conftest.err >&5
c0d27fcc 21541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21542 (exit $ac_status); } >/dev/null && {
21543 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21544 test ! -s conftest.err
21545 }; then
c0d27fcc 21546 ac_header_preproc=yes
503d2be0
AS
21547else
21548 echo "$as_me: failed program was:" >&5
19650fd6
AS
21549sed 's/^/| /' conftest.$ac_ext >&5
21550
c0d27fcc 21551 ac_header_preproc=no
a21616bd 21552fi
ca81d7a0 21553
503d2be0 21554rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21555{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21556echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21557
21558# So? What about this header?
edfaf76d
LK
21559case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21560 yes:no: )
c0d27fcc
MR
21561 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21562echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21563 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21564echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21565 ac_header_preproc=yes
19650fd6 21566 ;;
edfaf76d 21567 no:yes:* )
c0d27fcc
MR
21568 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21569echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21570 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21571echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21572 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21573echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21574 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21575echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21576 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21577echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21578 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21579echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21580
19650fd6 21581 ;;
c0d27fcc 21582esac
ca81d7a0
JD
21583{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21584echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21586 echo $ECHO_N "(cached) $ECHO_C" >&6
21587else
edfaf76d 21588 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21589fi
ca81d7a0
JD
21590ac_res=`eval echo '${'$as_ac_Header'}'`
21591 { echo "$as_me:$LINENO: result: $ac_res" >&5
21592echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21593
21594fi
503d2be0 21595if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21596 cat >>confdefs.h <<_ACEOF
503d2be0 21597#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21598_ACEOF
503d2be0 21599
a21616bd 21600else
503d2be0
AS
21601
21602for ac_header in kerberos/des.h
a21616bd 21603do
503d2be0 21604as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21605if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21606 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21607echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21608if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21609 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21610fi
ca81d7a0
JD
21611ac_res=`eval echo '${'$as_ac_Header'}'`
21612 { echo "$as_me:$LINENO: result: $ac_res" >&5
21613echo "${ECHO_T}$ac_res" >&6; }
98418dba 21614else
c0d27fcc 21615 # Is the header compilable?
ca81d7a0
JD
21616{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21617echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21618cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21619/* confdefs.h. */
21620_ACEOF
21621cat confdefs.h >>conftest.$ac_ext
21622cat >>conftest.$ac_ext <<_ACEOF
21623/* end confdefs.h. */
c0d27fcc
MR
21624$ac_includes_default
21625#include <$ac_header>
21626_ACEOF
21627rm -f conftest.$ac_objext
ca81d7a0
JD
21628if { (ac_try="$ac_compile"
21629case "(($ac_try" in
21630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21631 *) ac_try_echo=$ac_try;;
21632esac
21633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21634 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21635 ac_status=$?
edfaf76d
LK
21636 grep -v '^ *+' conftest.er1 >conftest.err
21637 rm -f conftest.er1
21638 cat conftest.err >&5
c0d27fcc 21639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21640 (exit $ac_status); } && {
21641 test -z "$ac_c_werror_flag" ||
21642 test ! -s conftest.err
21643 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21644 ac_header_compiler=yes
21645else
21646 echo "$as_me: failed program was:" >&5
19650fd6
AS
21647sed 's/^/| /' conftest.$ac_ext >&5
21648
ca81d7a0 21649 ac_header_compiler=no
c0d27fcc 21650fi
ca81d7a0
JD
21651
21652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21653{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21654echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21655
21656# Is the header present?
ca81d7a0
JD
21657{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21658echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21659cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21660/* confdefs.h. */
21661_ACEOF
21662cat confdefs.h >>conftest.$ac_ext
21663cat >>conftest.$ac_ext <<_ACEOF
21664/* end confdefs.h. */
503d2be0
AS
21665#include <$ac_header>
21666_ACEOF
ca81d7a0
JD
21667if { (ac_try="$ac_cpp conftest.$ac_ext"
21668case "(($ac_try" in
21669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21670 *) ac_try_echo=$ac_try;;
21671esac
21672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21674 ac_status=$?
6bae0ccf 21675 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21676 rm -f conftest.er1
21677 cat conftest.err >&5
c0d27fcc 21678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21679 (exit $ac_status); } >/dev/null && {
21680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21681 test ! -s conftest.err
21682 }; then
c0d27fcc 21683 ac_header_preproc=yes
503d2be0
AS
21684else
21685 echo "$as_me: failed program was:" >&5
19650fd6
AS
21686sed 's/^/| /' conftest.$ac_ext >&5
21687
c0d27fcc 21688 ac_header_preproc=no
a21616bd 21689fi
ca81d7a0 21690
503d2be0 21691rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21692{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21693echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21694
21695# So? What about this header?
edfaf76d
LK
21696case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21697 yes:no: )
c0d27fcc
MR
21698 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21699echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21700 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21701echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21702 ac_header_preproc=yes
19650fd6 21703 ;;
edfaf76d 21704 no:yes:* )
c0d27fcc
MR
21705 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21706echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21707 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21708echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21709 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21710echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21711 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21712echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21713 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21714echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21715 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21716echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21717
19650fd6 21718 ;;
c0d27fcc 21719esac
ca81d7a0
JD
21720{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21721echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21722if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21723 echo $ECHO_N "(cached) $ECHO_C" >&6
21724else
edfaf76d 21725 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21726fi
ca81d7a0
JD
21727ac_res=`eval echo '${'$as_ac_Header'}'`
21728 { echo "$as_me:$LINENO: result: $ac_res" >&5
21729echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21730
21731fi
503d2be0 21732if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21733 cat >>confdefs.h <<_ACEOF
503d2be0 21734#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21735_ACEOF
a21616bd
KR
21736
21737fi
c0d27fcc 21738
a21616bd
KR
21739done
21740
98418dba 21741fi
c0d27fcc 21742
925c2f3f
EZ
21743done
21744
98418dba 21745fi
c0d27fcc 21746
925c2f3f 21747done
98418dba 21748
c0d27fcc 21749
925c2f3f
EZ
21750for ac_header in krb.h
21751do
21752as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21753if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21754 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21755echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21756if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21757 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21758fi
ca81d7a0
JD
21759ac_res=`eval echo '${'$as_ac_Header'}'`
21760 { echo "$as_me:$LINENO: result: $ac_res" >&5
21761echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21762else
21763 # Is the header compilable?
ca81d7a0
JD
21764{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21765echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21766cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21767/* confdefs.h. */
21768_ACEOF
21769cat confdefs.h >>conftest.$ac_ext
21770cat >>conftest.$ac_ext <<_ACEOF
21771/* end confdefs.h. */
c0d27fcc
MR
21772$ac_includes_default
21773#include <$ac_header>
21774_ACEOF
21775rm -f conftest.$ac_objext
ca81d7a0
JD
21776if { (ac_try="$ac_compile"
21777case "(($ac_try" in
21778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21779 *) ac_try_echo=$ac_try;;
21780esac
21781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21782 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21783 ac_status=$?
edfaf76d
LK
21784 grep -v '^ *+' conftest.er1 >conftest.err
21785 rm -f conftest.er1
21786 cat conftest.err >&5
c0d27fcc 21787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21788 (exit $ac_status); } && {
21789 test -z "$ac_c_werror_flag" ||
21790 test ! -s conftest.err
21791 } && test -s conftest.$ac_objext; then
c0d27fcc 21792 ac_header_compiler=yes
925c2f3f 21793else
c0d27fcc 21794 echo "$as_me: failed program was:" >&5
19650fd6
AS
21795sed 's/^/| /' conftest.$ac_ext >&5
21796
ca81d7a0 21797 ac_header_compiler=no
c0d27fcc 21798fi
ca81d7a0
JD
21799
21800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21801{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21802echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21803
21804# Is the header present?
ca81d7a0
JD
21805{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21806echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21807cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21808/* confdefs.h. */
21809_ACEOF
21810cat confdefs.h >>conftest.$ac_ext
21811cat >>conftest.$ac_ext <<_ACEOF
21812/* end confdefs.h. */
503d2be0
AS
21813#include <$ac_header>
21814_ACEOF
ca81d7a0
JD
21815if { (ac_try="$ac_cpp conftest.$ac_ext"
21816case "(($ac_try" in
21817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21818 *) ac_try_echo=$ac_try;;
21819esac
21820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21821 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21822 ac_status=$?
6bae0ccf 21823 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21824 rm -f conftest.er1
21825 cat conftest.err >&5
c0d27fcc 21826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21827 (exit $ac_status); } >/dev/null && {
21828 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21829 test ! -s conftest.err
21830 }; then
c0d27fcc 21831 ac_header_preproc=yes
503d2be0
AS
21832else
21833 echo "$as_me: failed program was:" >&5
19650fd6
AS
21834sed 's/^/| /' conftest.$ac_ext >&5
21835
c0d27fcc 21836 ac_header_preproc=no
a21616bd 21837fi
ca81d7a0 21838
503d2be0 21839rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21840{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21841echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21842
21843# So? What about this header?
edfaf76d
LK
21844case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21845 yes:no: )
c0d27fcc
MR
21846 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21847echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21848 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21849echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21850 ac_header_preproc=yes
19650fd6 21851 ;;
edfaf76d 21852 no:yes:* )
c0d27fcc
MR
21853 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21854echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21855 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21856echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21857 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21858echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21859 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21860echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21861 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21862echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21863 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21864echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21865
19650fd6 21866 ;;
c0d27fcc 21867esac
ca81d7a0
JD
21868{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21869echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21871 echo $ECHO_N "(cached) $ECHO_C" >&6
21872else
edfaf76d 21873 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21874fi
ca81d7a0
JD
21875ac_res=`eval echo '${'$as_ac_Header'}'`
21876 { echo "$as_me:$LINENO: result: $ac_res" >&5
21877echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21878
21879fi
503d2be0 21880if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21881 cat >>confdefs.h <<_ACEOF
503d2be0 21882#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21883_ACEOF
503d2be0 21884
a21616bd 21885else
503d2be0
AS
21886
21887for ac_header in kerberosIV/krb.h
a21616bd 21888do
503d2be0 21889as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21890if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21891 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21892echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21893if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21894 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21895fi
ca81d7a0
JD
21896ac_res=`eval echo '${'$as_ac_Header'}'`
21897 { echo "$as_me:$LINENO: result: $ac_res" >&5
21898echo "${ECHO_T}$ac_res" >&6; }
98418dba 21899else
c0d27fcc 21900 # Is the header compilable?
ca81d7a0
JD
21901{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21902echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21903cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21904/* confdefs.h. */
21905_ACEOF
21906cat confdefs.h >>conftest.$ac_ext
21907cat >>conftest.$ac_ext <<_ACEOF
21908/* end confdefs.h. */
c0d27fcc
MR
21909$ac_includes_default
21910#include <$ac_header>
21911_ACEOF
21912rm -f conftest.$ac_objext
ca81d7a0
JD
21913if { (ac_try="$ac_compile"
21914case "(($ac_try" in
21915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21916 *) ac_try_echo=$ac_try;;
21917esac
21918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21919 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21920 ac_status=$?
edfaf76d
LK
21921 grep -v '^ *+' conftest.er1 >conftest.err
21922 rm -f conftest.er1
21923 cat conftest.err >&5
c0d27fcc 21924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21925 (exit $ac_status); } && {
21926 test -z "$ac_c_werror_flag" ||
21927 test ! -s conftest.err
21928 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21929 ac_header_compiler=yes
21930else
21931 echo "$as_me: failed program was:" >&5
19650fd6
AS
21932sed 's/^/| /' conftest.$ac_ext >&5
21933
ca81d7a0 21934 ac_header_compiler=no
c0d27fcc 21935fi
ca81d7a0
JD
21936
21937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21938{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21939echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21940
21941# Is the header present?
ca81d7a0
JD
21942{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21943echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21944cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21945/* confdefs.h. */
21946_ACEOF
21947cat confdefs.h >>conftest.$ac_ext
21948cat >>conftest.$ac_ext <<_ACEOF
21949/* end confdefs.h. */
503d2be0
AS
21950#include <$ac_header>
21951_ACEOF
ca81d7a0
JD
21952if { (ac_try="$ac_cpp conftest.$ac_ext"
21953case "(($ac_try" in
21954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21955 *) ac_try_echo=$ac_try;;
21956esac
21957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21958 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21959 ac_status=$?
6bae0ccf 21960 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21961 rm -f conftest.er1
21962 cat conftest.err >&5
c0d27fcc 21963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21964 (exit $ac_status); } >/dev/null && {
21965 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21966 test ! -s conftest.err
21967 }; then
c0d27fcc 21968 ac_header_preproc=yes
503d2be0
AS
21969else
21970 echo "$as_me: failed program was:" >&5
19650fd6
AS
21971sed 's/^/| /' conftest.$ac_ext >&5
21972
c0d27fcc 21973 ac_header_preproc=no
a21616bd 21974fi
ca81d7a0 21975
503d2be0 21976rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21977{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21978echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21979
21980# So? What about this header?
edfaf76d
LK
21981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21982 yes:no: )
c0d27fcc
MR
21983 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21984echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21985 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21986echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21987 ac_header_preproc=yes
19650fd6 21988 ;;
edfaf76d 21989 no:yes:* )
c0d27fcc
MR
21990 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21991echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21992 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21993echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21994 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21995echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21996 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21997echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21998 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21999echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22000 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22001echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22002
19650fd6 22003 ;;
c0d27fcc 22004esac
ca81d7a0
JD
22005{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22006echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22007if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22008 echo $ECHO_N "(cached) $ECHO_C" >&6
22009else
edfaf76d 22010 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22011fi
ca81d7a0
JD
22012ac_res=`eval echo '${'$as_ac_Header'}'`
22013 { echo "$as_me:$LINENO: result: $ac_res" >&5
22014echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22015
22016fi
503d2be0 22017if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22018 cat >>confdefs.h <<_ACEOF
503d2be0 22019#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22020_ACEOF
503d2be0 22021
a21616bd 22022else
503d2be0
AS
22023
22024for ac_header in kerberos/krb.h
a21616bd 22025do
503d2be0 22026as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22027if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22028 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22029echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22030if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22031 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22032fi
ca81d7a0
JD
22033ac_res=`eval echo '${'$as_ac_Header'}'`
22034 { echo "$as_me:$LINENO: result: $ac_res" >&5
22035echo "${ECHO_T}$ac_res" >&6; }
98418dba 22036else
c0d27fcc 22037 # Is the header compilable?
ca81d7a0
JD
22038{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22039echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22040cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22041/* confdefs.h. */
22042_ACEOF
22043cat confdefs.h >>conftest.$ac_ext
22044cat >>conftest.$ac_ext <<_ACEOF
22045/* end confdefs.h. */
c0d27fcc
MR
22046$ac_includes_default
22047#include <$ac_header>
22048_ACEOF
22049rm -f conftest.$ac_objext
ca81d7a0
JD
22050if { (ac_try="$ac_compile"
22051case "(($ac_try" in
22052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22053 *) ac_try_echo=$ac_try;;
22054esac
22055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22056 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22057 ac_status=$?
edfaf76d
LK
22058 grep -v '^ *+' conftest.er1 >conftest.err
22059 rm -f conftest.er1
22060 cat conftest.err >&5
c0d27fcc 22061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22062 (exit $ac_status); } && {
22063 test -z "$ac_c_werror_flag" ||
22064 test ! -s conftest.err
22065 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22066 ac_header_compiler=yes
22067else
22068 echo "$as_me: failed program was:" >&5
19650fd6
AS
22069sed 's/^/| /' conftest.$ac_ext >&5
22070
ca81d7a0 22071 ac_header_compiler=no
c0d27fcc 22072fi
ca81d7a0
JD
22073
22074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22075{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22076echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22077
22078# Is the header present?
ca81d7a0
JD
22079{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22080echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22081cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22082/* confdefs.h. */
22083_ACEOF
22084cat confdefs.h >>conftest.$ac_ext
22085cat >>conftest.$ac_ext <<_ACEOF
22086/* end confdefs.h. */
503d2be0
AS
22087#include <$ac_header>
22088_ACEOF
ca81d7a0
JD
22089if { (ac_try="$ac_cpp conftest.$ac_ext"
22090case "(($ac_try" in
22091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22092 *) ac_try_echo=$ac_try;;
22093esac
22094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22095 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22096 ac_status=$?
6bae0ccf 22097 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22098 rm -f conftest.er1
22099 cat conftest.err >&5
c0d27fcc 22100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22101 (exit $ac_status); } >/dev/null && {
22102 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22103 test ! -s conftest.err
22104 }; then
c0d27fcc 22105 ac_header_preproc=yes
503d2be0
AS
22106else
22107 echo "$as_me: failed program was:" >&5
19650fd6
AS
22108sed 's/^/| /' conftest.$ac_ext >&5
22109
c0d27fcc 22110 ac_header_preproc=no
a21616bd 22111fi
ca81d7a0 22112
503d2be0 22113rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22114{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22115echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22116
22117# So? What about this header?
edfaf76d
LK
22118case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22119 yes:no: )
35996d22
AS
22120 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22121echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22122 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22123echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22124 ac_header_preproc=yes
19650fd6 22125 ;;
edfaf76d 22126 no:yes:* )
c0d27fcc
MR
22127 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22128echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22129 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22130echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22131 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22132echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22133 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22134echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22135 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22136echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22137 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22138echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22139
19650fd6 22140 ;;
c0d27fcc 22141esac
ca81d7a0
JD
22142{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22143echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22144if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22145 echo $ECHO_N "(cached) $ECHO_C" >&6
22146else
edfaf76d 22147 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22148fi
ca81d7a0
JD
22149ac_res=`eval echo '${'$as_ac_Header'}'`
22150 { echo "$as_me:$LINENO: result: $ac_res" >&5
22151echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22152
22153fi
503d2be0 22154if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22155 cat >>confdefs.h <<_ACEOF
503d2be0 22156#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22157_ACEOF
503d2be0 22158
a21616bd 22159fi
c0d27fcc 22160
a21616bd
KR
22161done
22162
22163fi
c0d27fcc 22164
a21616bd
KR
22165done
22166
22167fi
c0d27fcc 22168
a21616bd
KR
22169done
22170
22171 fi
503d2be0
AS
22172
22173for ac_header in com_err.h
a21616bd 22174do
503d2be0 22175as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22176if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22177 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22178echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22179if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22180 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22181fi
ca81d7a0
JD
22182ac_res=`eval echo '${'$as_ac_Header'}'`
22183 { echo "$as_me:$LINENO: result: $ac_res" >&5
22184echo "${ECHO_T}$ac_res" >&6; }
98418dba 22185else
c0d27fcc 22186 # Is the header compilable?
ca81d7a0
JD
22187{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22188echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22189cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22190/* confdefs.h. */
22191_ACEOF
22192cat confdefs.h >>conftest.$ac_ext
22193cat >>conftest.$ac_ext <<_ACEOF
22194/* end confdefs.h. */
c0d27fcc
MR
22195$ac_includes_default
22196#include <$ac_header>
22197_ACEOF
22198rm -f conftest.$ac_objext
ca81d7a0
JD
22199if { (ac_try="$ac_compile"
22200case "(($ac_try" in
22201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22202 *) ac_try_echo=$ac_try;;
22203esac
22204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22205 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22206 ac_status=$?
22207 grep -v '^ *+' conftest.er1 >conftest.err
22208 rm -f conftest.er1
22209 cat conftest.err >&5
22210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22211 (exit $ac_status); } && {
22212 test -z "$ac_c_werror_flag" ||
22213 test ! -s conftest.err
22214 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22215 ac_header_compiler=yes
22216else
22217 echo "$as_me: failed program was:" >&5
19650fd6
AS
22218sed 's/^/| /' conftest.$ac_ext >&5
22219
ca81d7a0 22220 ac_header_compiler=no
c0d27fcc 22221fi
ca81d7a0
JD
22222
22223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22224{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22225echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22226
22227# Is the header present?
ca81d7a0
JD
22228{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22229echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22230cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22231/* confdefs.h. */
22232_ACEOF
22233cat confdefs.h >>conftest.$ac_ext
22234cat >>conftest.$ac_ext <<_ACEOF
22235/* end confdefs.h. */
503d2be0
AS
22236#include <$ac_header>
22237_ACEOF
ca81d7a0
JD
22238if { (ac_try="$ac_cpp conftest.$ac_ext"
22239case "(($ac_try" in
22240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22241 *) ac_try_echo=$ac_try;;
22242esac
22243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22244 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22245 ac_status=$?
6bae0ccf 22246 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22247 rm -f conftest.er1
22248 cat conftest.err >&5
c0d27fcc 22249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22250 (exit $ac_status); } >/dev/null && {
22251 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22252 test ! -s conftest.err
22253 }; then
c0d27fcc 22254 ac_header_preproc=yes
503d2be0
AS
22255else
22256 echo "$as_me: failed program was:" >&5
19650fd6
AS
22257sed 's/^/| /' conftest.$ac_ext >&5
22258
c0d27fcc 22259 ac_header_preproc=no
a21616bd 22260fi
ca81d7a0 22261
503d2be0 22262rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22263{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22264echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22265
22266# So? What about this header?
edfaf76d
LK
22267case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22268 yes:no: )
c0d27fcc
MR
22269 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22270echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22271 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22272echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22273 ac_header_preproc=yes
19650fd6 22274 ;;
edfaf76d 22275 no:yes:* )
c0d27fcc
MR
22276 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22277echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22278 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22279echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22280 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22281echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22282 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22283echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22284 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22285echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22286 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22287echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22288
19650fd6 22289 ;;
c0d27fcc 22290esac
ca81d7a0
JD
22291{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22292echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22293if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22294 echo $ECHO_N "(cached) $ECHO_C" >&6
22295else
edfaf76d 22296 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22297fi
ca81d7a0
JD
22298ac_res=`eval echo '${'$as_ac_Header'}'`
22299 { echo "$as_me:$LINENO: result: $ac_res" >&5
22300echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22301
22302fi
503d2be0 22303if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22304 cat >>confdefs.h <<_ACEOF
503d2be0 22305#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22306_ACEOF
503d2be0 22307
a21616bd 22308fi
c0d27fcc 22309
a21616bd
KR
22310done
22311
22312fi
22313
ba4481b5
DL
22314# Solaris requires -lintl if you want strerror (which calls dgettext)
22315# to return localized messages.
503d2be0 22316
ca81d7a0
JD
22317{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22318echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22319if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22320 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22321else
503d2be0 22322 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22323LIBS="-lintl $LIBS"
503d2be0 22324cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22325/* confdefs.h. */
22326_ACEOF
22327cat confdefs.h >>conftest.$ac_ext
22328cat >>conftest.$ac_ext <<_ACEOF
22329/* end confdefs.h. */
503d2be0 22330
ca81d7a0
JD
22331/* Override any GCC internal prototype to avoid an error.
22332 Use char because int might match the return type of a GCC
22333 builtin and then its argument prototype would still apply. */
503d2be0
AS
22334#ifdef __cplusplus
22335extern "C"
22336#endif
503d2be0
AS
22337char dgettext ();
22338int
22339main ()
22340{
ca81d7a0 22341return dgettext ();
503d2be0
AS
22342 ;
22343 return 0;
22344}
22345_ACEOF
22346rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22347if { (ac_try="$ac_link"
22348case "(($ac_try" in
22349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22350 *) ac_try_echo=$ac_try;;
22351esac
22352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22353 (eval "$ac_link") 2>conftest.er1
503d2be0 22354 ac_status=$?
edfaf76d
LK
22355 grep -v '^ *+' conftest.er1 >conftest.err
22356 rm -f conftest.er1
22357 cat conftest.err >&5
c0d27fcc 22358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22359 (exit $ac_status); } && {
22360 test -z "$ac_c_werror_flag" ||
22361 test ! -s conftest.err
22362 } && test -s conftest$ac_exeext &&
22363 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22364 ac_cv_lib_intl_dgettext=yes
22365else
22366 echo "$as_me: failed program was:" >&5
19650fd6
AS
22367sed 's/^/| /' conftest.$ac_ext >&5
22368
ca81d7a0 22369 ac_cv_lib_intl_dgettext=no
503d2be0 22370fi
ca81d7a0 22371
f053c89f 22372rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22373 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22374LIBS=$ac_check_lib_save_LIBS
22375fi
ca81d7a0
JD
22376{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22377echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22378if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22379 cat >>confdefs.h <<_ACEOF
503d2be0 22380#define HAVE_LIBINTL 1
c0d27fcc 22381_ACEOF
ba4481b5
DL
22382
22383 LIBS="-lintl $LIBS"
22384
ba4481b5
DL
22385fi
22386
c0d27fcc 22387
ca81d7a0
JD
22388{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22389echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22390if test "${emacs_cv_localtime_cache+set}" = set; then
22391 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22392else
22393 if test x$ac_cv_func_tzset = xyes; then
22394if test "$cross_compiling" = yes; then
22395 # If we have tzset, assume the worst when cross-compiling.
22396emacs_cv_localtime_cache=yes
22397else
503d2be0 22398 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22399/* confdefs.h. */
22400_ACEOF
22401cat confdefs.h >>conftest.$ac_ext
22402cat >>conftest.$ac_ext <<_ACEOF
22403/* end confdefs.h. */
ba4481b5 22404#include <time.h>
ba4481b5
DL
22405extern char **environ;
22406unset_TZ ()
22407{
22408 char **from, **to;
22409 for (to = from = environ; (*to = *from); from++)
22410 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22411 to++;
22412}
22413char TZ_GMT0[] = "TZ=GMT0";
22414char TZ_PST8[] = "TZ=PST8";
22415main()
22416{
22417 time_t now = time ((time_t *) 0);
22418 int hour_GMT0, hour_unset;
22419 if (putenv (TZ_GMT0) != 0)
22420 exit (1);
22421 hour_GMT0 = localtime (&now)->tm_hour;
22422 unset_TZ ();
22423 hour_unset = localtime (&now)->tm_hour;
22424 if (putenv (TZ_PST8) != 0)
22425 exit (1);
22426 if (localtime (&now)->tm_hour == hour_GMT0)
22427 exit (1);
22428 unset_TZ ();
22429 if (localtime (&now)->tm_hour != hour_unset)
22430 exit (1);
22431 exit (0);
22432}
503d2be0
AS
22433_ACEOF
22434rm -f conftest$ac_exeext
ca81d7a0
JD
22435if { (ac_try="$ac_link"
22436case "(($ac_try" in
22437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22438 *) ac_try_echo=$ac_try;;
22439esac
22440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22441 (eval "$ac_link") 2>&5
503d2be0 22442 ac_status=$?
c0d27fcc 22443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22445 { (case "(($ac_try" in
22446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22447 *) ac_try_echo=$ac_try;;
22448esac
22449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22450 (eval "$ac_try") 2>&5
503d2be0 22451 ac_status=$?
c0d27fcc 22452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22453 (exit $ac_status); }; }; then
ba4481b5
DL
22454 emacs_cv_localtime_cache=no
22455else
503d2be0
AS
22456 echo "$as_me: program exited with status $ac_status" >&5
22457echo "$as_me: failed program was:" >&5
19650fd6
AS
22458sed 's/^/| /' conftest.$ac_ext >&5
22459
c0d27fcc 22460( exit $ac_status )
503d2be0 22461emacs_cv_localtime_cache=yes
ba4481b5 22462fi
ca81d7a0 22463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22464fi
ca81d7a0
JD
22465
22466
ba4481b5
DL
22467else
22468 # If we lack tzset, report that localtime does not cache TZ,
22469 # since we can't invalidate the cache if we don't have tzset.
22470 emacs_cv_localtime_cache=no
22471fi
22472fi
ca81d7a0
JD
22473{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22474echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22475if test $emacs_cv_localtime_cache = yes; then
b936fae4 22476
c0d27fcc 22477cat >>confdefs.h <<\_ACEOF
ba4481b5 22478#define LOCALTIME_CACHE 1
c0d27fcc 22479_ACEOF
ba4481b5
DL
22480
22481fi
22482
22483if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22484
22485for ac_func in gettimeofday
48d4b120 22486do
503d2be0 22487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22488{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22490if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22491 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22492else
503d2be0 22493 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22494/* confdefs.h. */
22495_ACEOF
22496cat confdefs.h >>conftest.$ac_ext
22497cat >>conftest.$ac_ext <<_ACEOF
22498/* end confdefs.h. */
edfaf76d
LK
22499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22501#define $ac_func innocuous_$ac_func
22502
48d4b120 22503/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22504 which can conflict with char $ac_func (); below.
22505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22506 <limits.h> exists even on freestanding compilers. */
edfaf76d 22507
19650fd6
AS
22508#ifdef __STDC__
22509# include <limits.h>
22510#else
22511# include <assert.h>
22512#endif
edfaf76d
LK
22513
22514#undef $ac_func
22515
ca81d7a0
JD
22516/* Override any GCC internal prototype to avoid an error.
22517 Use char because int might match the return type of a GCC
22518 builtin and then its argument prototype would still apply. */
503d2be0
AS
22519#ifdef __cplusplus
22520extern "C"
22521#endif
503d2be0 22522char $ac_func ();
48d4b120
DL
22523/* The GNU C library defines this for functions which it implements
22524 to always fail with ENOSYS. Some functions are actually named
22525 something starting with __ and the normal name is an alias. */
ca81d7a0 22526#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22527choke me
cd958eb3
MB
22528#endif
22529
19650fd6
AS
22530int
22531main ()
22532{
ca81d7a0 22533return $ac_func ();
503d2be0
AS
22534 ;
22535 return 0;
22536}
22537_ACEOF
22538rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22539if { (ac_try="$ac_link"
22540case "(($ac_try" in
22541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22542 *) ac_try_echo=$ac_try;;
22543esac
22544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22545 (eval "$ac_link") 2>conftest.er1
503d2be0 22546 ac_status=$?
edfaf76d
LK
22547 grep -v '^ *+' conftest.er1 >conftest.err
22548 rm -f conftest.er1
22549 cat conftest.err >&5
c0d27fcc 22550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22551 (exit $ac_status); } && {
22552 test -z "$ac_c_werror_flag" ||
22553 test ! -s conftest.err
22554 } && test -s conftest$ac_exeext &&
22555 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22556 eval "$as_ac_var=yes"
22557else
22558 echo "$as_me: failed program was:" >&5
19650fd6
AS
22559sed 's/^/| /' conftest.$ac_ext >&5
22560
ca81d7a0 22561 eval "$as_ac_var=no"
503d2be0 22562fi
ca81d7a0 22563
f053c89f 22564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22565 conftest$ac_exeext conftest.$ac_ext
503d2be0 22566fi
ca81d7a0
JD
22567ac_res=`eval echo '${'$as_ac_var'}'`
22568 { echo "$as_me:$LINENO: result: $ac_res" >&5
22569echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22570if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22571 cat >>confdefs.h <<_ACEOF
503d2be0 22572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22573_ACEOF
48d4b120 22574
48d4b120
DL
22575fi
22576done
22577
b936fae4 22578 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22579 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22580echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22581if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22582 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22583else
503d2be0 22584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22585/* confdefs.h. */
22586_ACEOF
22587cat confdefs.h >>conftest.$ac_ext
22588cat >>conftest.$ac_ext <<_ACEOF
22589/* end confdefs.h. */
ba4481b5 22590
a3f08d9e
DL
22591#ifdef TIME_WITH_SYS_TIME
22592#include <sys/time.h>
22593#include <time.h>
22594#else
22595#ifdef HAVE_SYS_TIME_H
22596#include <sys/time.h>
22597#else
22598#include <time.h>
22599#endif
22600#endif
503d2be0
AS
22601int
22602main ()
22603{
a3f08d9e 22604struct timeval time;
b936fae4 22605 gettimeofday (&time, 0);
503d2be0
AS
22606 ;
22607 return 0;
22608}
22609_ACEOF
22610rm -f conftest.$ac_objext
f053c89f
CY
22611if { (ac_try="$ac_compile"
22612case "(($ac_try" in
ca81d7a0
JD
22613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22614 *) ac_try_echo=$ac_try;;
22615esac
22616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22617 (eval "$ac_compile") 2>conftest.er1
503d2be0 22618 ac_status=$?
edfaf76d
LK
22619 grep -v '^ *+' conftest.er1 >conftest.err
22620 rm -f conftest.er1
22621 cat conftest.err >&5
c0d27fcc 22622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22623 (exit $ac_status); } && {
22624 test -z "$ac_c_werror_flag" ||
22625 test ! -s conftest.err
22626 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22627 emacs_cv_gettimeofday_two_arguments=yes
22628else
503d2be0 22629 echo "$as_me: failed program was:" >&5
19650fd6
AS
22630sed 's/^/| /' conftest.$ac_ext >&5
22631
ca81d7a0 22632 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22633fi
ca81d7a0
JD
22634
22635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22636fi
ca81d7a0
JD
22637{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22638echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22639 if test $emacs_cv_gettimeofday_two_arguments = no; then
22640
c0d27fcc 22641cat >>confdefs.h <<\_ACEOF
ba4481b5 22642#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22643_ACEOF
ba4481b5 22644
b936fae4 22645 fi
ba4481b5
DL
22646 fi
22647fi
22648
22649ok_so_far=yes
ca81d7a0
JD
22650{ echo "$as_me:$LINENO: checking for socket" >&5
22651echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22652if test "${ac_cv_func_socket+set}" = set; then
22653 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22654else
503d2be0 22655 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22656/* confdefs.h. */
22657_ACEOF
22658cat confdefs.h >>conftest.$ac_ext
22659cat >>conftest.$ac_ext <<_ACEOF
22660/* end confdefs.h. */
edfaf76d
LK
22661/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22662 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22663#define socket innocuous_socket
22664
ba4481b5 22665/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22666 which can conflict with char socket (); below.
22667 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22668 <limits.h> exists even on freestanding compilers. */
edfaf76d 22669
19650fd6
AS
22670#ifdef __STDC__
22671# include <limits.h>
22672#else
22673# include <assert.h>
22674#endif
edfaf76d
LK
22675
22676#undef socket
22677
ca81d7a0
JD
22678/* Override any GCC internal prototype to avoid an error.
22679 Use char because int might match the return type of a GCC
22680 builtin and then its argument prototype would still apply. */
503d2be0
AS
22681#ifdef __cplusplus
22682extern "C"
22683#endif
503d2be0 22684char socket ();
ba4481b5
DL
22685/* The GNU C library defines this for functions which it implements
22686 to always fail with ENOSYS. Some functions are actually named
22687 something starting with __ and the normal name is an alias. */
ca81d7a0 22688#if defined __stub_socket || defined __stub___socket
ba4481b5 22689choke me
cd958eb3
MB
22690#endif
22691
19650fd6
AS
22692int
22693main ()
22694{
ca81d7a0 22695return socket ();
503d2be0
AS
22696 ;
22697 return 0;
22698}
22699_ACEOF
22700rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22701if { (ac_try="$ac_link"
22702case "(($ac_try" in
22703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22704 *) ac_try_echo=$ac_try;;
22705esac
22706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22707 (eval "$ac_link") 2>conftest.er1
503d2be0 22708 ac_status=$?
edfaf76d
LK
22709 grep -v '^ *+' conftest.er1 >conftest.err
22710 rm -f conftest.er1
22711 cat conftest.err >&5
c0d27fcc 22712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22713 (exit $ac_status); } && {
22714 test -z "$ac_c_werror_flag" ||
22715 test ! -s conftest.err
22716 } && test -s conftest$ac_exeext &&
22717 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22718 ac_cv_func_socket=yes
22719else
22720 echo "$as_me: failed program was:" >&5
19650fd6
AS
22721sed 's/^/| /' conftest.$ac_ext >&5
22722
ca81d7a0 22723 ac_cv_func_socket=no
503d2be0 22724fi
ca81d7a0 22725
f053c89f 22726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22727 conftest$ac_exeext conftest.$ac_ext
503d2be0 22728fi
ca81d7a0
JD
22729{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22730echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22731if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22732 :
22733else
503d2be0 22734 ok_so_far=no
ba4481b5
DL
22735fi
22736
22737if test $ok_so_far = yes; then
c0d27fcc 22738 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22739 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22740echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22741if test "${ac_cv_header_netinet_in_h+set}" = set; then
22742 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22743fi
ca81d7a0
JD
22744{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22745echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22746else
c0d27fcc 22747 # Is the header compilable?
ca81d7a0
JD
22748{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22749echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22750cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22751/* confdefs.h. */
22752_ACEOF
22753cat confdefs.h >>conftest.$ac_ext
22754cat >>conftest.$ac_ext <<_ACEOF
22755/* end confdefs.h. */
c0d27fcc
MR
22756$ac_includes_default
22757#include <netinet/in.h>
22758_ACEOF
22759rm -f conftest.$ac_objext
ca81d7a0
JD
22760if { (ac_try="$ac_compile"
22761case "(($ac_try" in
22762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22763 *) ac_try_echo=$ac_try;;
22764esac
22765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22766 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22767 ac_status=$?
edfaf76d
LK
22768 grep -v '^ *+' conftest.er1 >conftest.err
22769 rm -f conftest.er1
22770 cat conftest.err >&5
c0d27fcc 22771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22772 (exit $ac_status); } && {
22773 test -z "$ac_c_werror_flag" ||
22774 test ! -s conftest.err
22775 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22776 ac_header_compiler=yes
22777else
22778 echo "$as_me: failed program was:" >&5
19650fd6
AS
22779sed 's/^/| /' conftest.$ac_ext >&5
22780
ca81d7a0 22781 ac_header_compiler=no
c0d27fcc 22782fi
ca81d7a0
JD
22783
22784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22785{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22786echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22787
22788# Is the header present?
ca81d7a0
JD
22789{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22790echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22791cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22792/* confdefs.h. */
22793_ACEOF
22794cat confdefs.h >>conftest.$ac_ext
22795cat >>conftest.$ac_ext <<_ACEOF
22796/* end confdefs.h. */
ba4481b5 22797#include <netinet/in.h>
503d2be0 22798_ACEOF
ca81d7a0
JD
22799if { (ac_try="$ac_cpp conftest.$ac_ext"
22800case "(($ac_try" in
22801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22802 *) ac_try_echo=$ac_try;;
22803esac
22804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22805 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22806 ac_status=$?
6bae0ccf 22807 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22808 rm -f conftest.er1
22809 cat conftest.err >&5
c0d27fcc 22810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22811 (exit $ac_status); } >/dev/null && {
22812 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22813 test ! -s conftest.err
22814 }; then
c0d27fcc 22815 ac_header_preproc=yes
ba4481b5 22816else
503d2be0 22817 echo "$as_me: failed program was:" >&5
19650fd6
AS
22818sed 's/^/| /' conftest.$ac_ext >&5
22819
c0d27fcc 22820 ac_header_preproc=no
ba4481b5 22821fi
ca81d7a0 22822
503d2be0 22823rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22824{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22825echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22826
22827# So? What about this header?
edfaf76d
LK
22828case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22829 yes:no: )
c0d27fcc
MR
22830 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22831echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22832 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22833echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22834 ac_header_preproc=yes
19650fd6 22835 ;;
edfaf76d 22836 no:yes:* )
c0d27fcc
MR
22837 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22838echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22839 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22840echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22841 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22842echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22843 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22844echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22845 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22846echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22847 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22848echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22849
19650fd6 22850 ;;
c0d27fcc 22851esac
ca81d7a0
JD
22852{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22853echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22854if test "${ac_cv_header_netinet_in_h+set}" = set; then
22855 echo $ECHO_N "(cached) $ECHO_C" >&6
22856else
22857 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22858fi
ca81d7a0
JD
22859{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22860echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22861
22862fi
503d2be0 22863if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22864 :
22865else
503d2be0 22866 ok_so_far=no
ba4481b5
DL
22867fi
22868
c0d27fcc 22869
ba4481b5
DL
22870fi
22871if test $ok_so_far = yes; then
c0d27fcc 22872 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22873 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22874echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22875if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22876 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22877fi
ca81d7a0
JD
22878{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22879echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22880else
c0d27fcc 22881 # Is the header compilable?
ca81d7a0
JD
22882{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22883echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22884cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22885/* confdefs.h. */
22886_ACEOF
22887cat confdefs.h >>conftest.$ac_ext
22888cat >>conftest.$ac_ext <<_ACEOF
22889/* end confdefs.h. */
c0d27fcc
MR
22890$ac_includes_default
22891#include <arpa/inet.h>
22892_ACEOF
22893rm -f conftest.$ac_objext
ca81d7a0
JD
22894if { (ac_try="$ac_compile"
22895case "(($ac_try" in
22896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22897 *) ac_try_echo=$ac_try;;
22898esac
22899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22900 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22901 ac_status=$?
edfaf76d
LK
22902 grep -v '^ *+' conftest.er1 >conftest.err
22903 rm -f conftest.er1
22904 cat conftest.err >&5
c0d27fcc 22905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22906 (exit $ac_status); } && {
22907 test -z "$ac_c_werror_flag" ||
22908 test ! -s conftest.err
22909 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22910 ac_header_compiler=yes
22911else
22912 echo "$as_me: failed program was:" >&5
19650fd6
AS
22913sed 's/^/| /' conftest.$ac_ext >&5
22914
ca81d7a0 22915 ac_header_compiler=no
c0d27fcc 22916fi
ca81d7a0
JD
22917
22918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22919{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22920echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22921
22922# Is the header present?
ca81d7a0
JD
22923{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22924echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22925cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22926/* confdefs.h. */
22927_ACEOF
22928cat confdefs.h >>conftest.$ac_ext
22929cat >>conftest.$ac_ext <<_ACEOF
22930/* end confdefs.h. */
ba4481b5 22931#include <arpa/inet.h>
503d2be0 22932_ACEOF
ca81d7a0
JD
22933if { (ac_try="$ac_cpp conftest.$ac_ext"
22934case "(($ac_try" in
22935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22936 *) ac_try_echo=$ac_try;;
22937esac
22938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22940 ac_status=$?
6bae0ccf 22941 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22942 rm -f conftest.er1
22943 cat conftest.err >&5
c0d27fcc 22944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22945 (exit $ac_status); } >/dev/null && {
22946 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22947 test ! -s conftest.err
22948 }; then
c0d27fcc 22949 ac_header_preproc=yes
ba4481b5 22950else
503d2be0 22951 echo "$as_me: failed program was:" >&5
19650fd6
AS
22952sed 's/^/| /' conftest.$ac_ext >&5
22953
c0d27fcc 22954 ac_header_preproc=no
ba4481b5 22955fi
ca81d7a0 22956
503d2be0 22957rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22958{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22959echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22960
22961# So? What about this header?
edfaf76d
LK
22962case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22963 yes:no: )
c0d27fcc
MR
22964 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22965echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22966 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22967echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22968 ac_header_preproc=yes
19650fd6 22969 ;;
edfaf76d 22970 no:yes:* )
c0d27fcc
MR
22971 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22972echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22973 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22974echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22975 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22976echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22977 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22978echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22979 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22980echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22981 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22982echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22983
19650fd6 22984 ;;
c0d27fcc 22985esac
ca81d7a0
JD
22986{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22987echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22988if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22989 echo $ECHO_N "(cached) $ECHO_C" >&6
22990else
22991 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22992fi
ca81d7a0
JD
22993{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22994echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22995
22996fi
503d2be0 22997if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22998 :
22999else
503d2be0 23000 ok_so_far=no
ba4481b5
DL
23001fi
23002
c0d27fcc 23003
ba4481b5
DL
23004fi
23005if test $ok_so_far = yes; then
b936fae4 23006
c0d27fcc 23007cat >>confdefs.h <<\_ACEOF
ba4481b5 23008#define HAVE_INET_SOCKETS 1
c0d27fcc 23009_ACEOF
ba4481b5
DL
23010
23011fi
23012
2d2b6695 23013
7862d3a8 23014for ac_header in sys/ioctl.h
2d2b6695
KS
23015do
23016as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23017if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23018 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23019echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23020if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23021 echo $ECHO_N "(cached) $ECHO_C" >&6
23022fi
ca81d7a0
JD
23023ac_res=`eval echo '${'$as_ac_Header'}'`
23024 { echo "$as_me:$LINENO: result: $ac_res" >&5
23025echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23026else
23027 # Is the header compilable?
ca81d7a0
JD
23028{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23029echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23030cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23031/* confdefs.h. */
23032_ACEOF
23033cat confdefs.h >>conftest.$ac_ext
23034cat >>conftest.$ac_ext <<_ACEOF
23035/* end confdefs.h. */
23036$ac_includes_default
23037#include <$ac_header>
23038_ACEOF
23039rm -f conftest.$ac_objext
ca81d7a0
JD
23040if { (ac_try="$ac_compile"
23041case "(($ac_try" in
23042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23043 *) ac_try_echo=$ac_try;;
23044esac
23045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23046 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23047 ac_status=$?
edfaf76d
LK
23048 grep -v '^ *+' conftest.er1 >conftest.err
23049 rm -f conftest.er1
23050 cat conftest.err >&5
2d2b6695 23051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23052 (exit $ac_status); } && {
23053 test -z "$ac_c_werror_flag" ||
23054 test ! -s conftest.err
23055 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23056 ac_header_compiler=yes
23057else
23058 echo "$as_me: failed program was:" >&5
23059sed 's/^/| /' conftest.$ac_ext >&5
23060
ca81d7a0 23061 ac_header_compiler=no
2d2b6695 23062fi
ca81d7a0
JD
23063
23064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23065{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23066echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23067
23068# Is the header present?
ca81d7a0
JD
23069{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23070echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23071cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23072/* confdefs.h. */
23073_ACEOF
23074cat confdefs.h >>conftest.$ac_ext
23075cat >>conftest.$ac_ext <<_ACEOF
23076/* end confdefs.h. */
23077#include <$ac_header>
23078_ACEOF
ca81d7a0
JD
23079if { (ac_try="$ac_cpp conftest.$ac_ext"
23080case "(($ac_try" in
23081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23082 *) ac_try_echo=$ac_try;;
23083esac
23084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23085 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23086 ac_status=$?
23087 grep -v '^ *+' conftest.er1 >conftest.err
23088 rm -f conftest.er1
23089 cat conftest.err >&5
23090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23091 (exit $ac_status); } >/dev/null && {
23092 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23093 test ! -s conftest.err
23094 }; then
2d2b6695
KS
23095 ac_header_preproc=yes
23096else
23097 echo "$as_me: failed program was:" >&5
23098sed 's/^/| /' conftest.$ac_ext >&5
23099
23100 ac_header_preproc=no
23101fi
ca81d7a0 23102
2d2b6695 23103rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23104{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23105echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23106
23107# So? What about this header?
edfaf76d
LK
23108case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23109 yes:no: )
2d2b6695
KS
23110 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23111echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23112 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23113echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23114 ac_header_preproc=yes
2d2b6695 23115 ;;
edfaf76d 23116 no:yes:* )
2d2b6695
KS
23117 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23118echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23119 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23120echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23121 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23122echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23123 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23124echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23125 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23126echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23127 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23128echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23129
2d2b6695
KS
23130 ;;
23131esac
ca81d7a0
JD
23132{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23133echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23134if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23135 echo $ECHO_N "(cached) $ECHO_C" >&6
23136else
edfaf76d 23137 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23138fi
ca81d7a0
JD
23139ac_res=`eval echo '${'$as_ac_Header'}'`
23140 { echo "$as_me:$LINENO: result: $ac_res" >&5
23141echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23142
23143fi
23144if test `eval echo '${'$as_ac_Header'}'` = yes; then
23145 cat >>confdefs.h <<_ACEOF
23146#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23147_ACEOF
23148
23149fi
23150
23151done
23152
23153
ba4481b5 23154if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23155
c0d27fcc 23156cat >>confdefs.h <<\_ACEOF
ba4481b5 23157#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23158_ACEOF
ba4481b5
DL
23159
23160fi
23161
ca81d7a0
JD
23162{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23163echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23164if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23165 { echo "$as_me:$LINENO: result: yes" >&5
23166echo "${ECHO_T}yes" >&6; }
b936fae4 23167
c0d27fcc 23168cat >>confdefs.h <<\_ACEOF
3d9fec71 23169#define HAVE_DEV_PTMX 1
c0d27fcc 23170_ACEOF
3d9fec71
DL
23171
23172else
ca81d7a0
JD
23173 { echo "$as_me:$LINENO: result: no" >&5
23174echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23175fi
23176
ca81d7a0
JD
23177{ echo "$as_me:$LINENO: checking for pid_t" >&5
23178echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23179if test "${ac_cv_type_pid_t+set}" = set; then
23180 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23181else
503d2be0 23182 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23183/* confdefs.h. */
23184_ACEOF
23185cat confdefs.h >>conftest.$ac_ext
23186cat >>conftest.$ac_ext <<_ACEOF
23187/* end confdefs.h. */
503d2be0 23188$ac_includes_default
ca81d7a0 23189typedef pid_t ac__type_new_;
503d2be0
AS
23190int
23191main ()
23192{
ca81d7a0 23193if ((ac__type_new_ *) 0)
503d2be0 23194 return 0;
ca81d7a0 23195if (sizeof (ac__type_new_))
503d2be0
AS
23196 return 0;
23197 ;
23198 return 0;
23199}
23200_ACEOF
23201rm -f conftest.$ac_objext
ca81d7a0
JD
23202if { (ac_try="$ac_compile"
23203case "(($ac_try" in
23204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23205 *) ac_try_echo=$ac_try;;
23206esac
23207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23208 (eval "$ac_compile") 2>conftest.er1
503d2be0 23209 ac_status=$?
edfaf76d
LK
23210 grep -v '^ *+' conftest.er1 >conftest.err
23211 rm -f conftest.er1
23212 cat conftest.err >&5
c0d27fcc 23213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23214 (exit $ac_status); } && {
23215 test -z "$ac_c_werror_flag" ||
23216 test ! -s conftest.err
23217 } && test -s conftest.$ac_objext; then
647847ea
DL
23218 ac_cv_type_pid_t=yes
23219else
503d2be0 23220 echo "$as_me: failed program was:" >&5
19650fd6
AS
23221sed 's/^/| /' conftest.$ac_ext >&5
23222
ca81d7a0 23223 ac_cv_type_pid_t=no
647847ea 23224fi
ca81d7a0
JD
23225
23226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23227fi
ca81d7a0
JD
23228{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23229echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23230if test $ac_cv_type_pid_t = yes; then
23231 :
23232else
23233
c0d27fcc 23234cat >>confdefs.h <<_ACEOF
647847ea 23235#define pid_t int
c0d27fcc 23236_ACEOF
647847ea
DL
23237
23238fi
23239
c0d27fcc 23240
ca81d7a0 23241for ac_header in vfork.h
503d2be0
AS
23242do
23243as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23244if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23245 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23246echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23247if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23248 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23249fi
ca81d7a0
JD
23250ac_res=`eval echo '${'$as_ac_Header'}'`
23251 { echo "$as_me:$LINENO: result: $ac_res" >&5
23252echo "${ECHO_T}$ac_res" >&6; }
98418dba 23253else
c0d27fcc 23254 # Is the header compilable?
ca81d7a0
JD
23255{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23256echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23257cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23258/* confdefs.h. */
23259_ACEOF
23260cat confdefs.h >>conftest.$ac_ext
23261cat >>conftest.$ac_ext <<_ACEOF
23262/* end confdefs.h. */
c0d27fcc
MR
23263$ac_includes_default
23264#include <$ac_header>
23265_ACEOF
23266rm -f conftest.$ac_objext
ca81d7a0
JD
23267if { (ac_try="$ac_compile"
23268case "(($ac_try" in
23269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23270 *) ac_try_echo=$ac_try;;
23271esac
23272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23273 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23274 ac_status=$?
edfaf76d
LK
23275 grep -v '^ *+' conftest.er1 >conftest.err
23276 rm -f conftest.er1
23277 cat conftest.err >&5
c0d27fcc 23278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23279 (exit $ac_status); } && {
23280 test -z "$ac_c_werror_flag" ||
23281 test ! -s conftest.err
23282 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23283 ac_header_compiler=yes
23284else
23285 echo "$as_me: failed program was:" >&5
19650fd6
AS
23286sed 's/^/| /' conftest.$ac_ext >&5
23287
ca81d7a0 23288 ac_header_compiler=no
c0d27fcc 23289fi
ca81d7a0
JD
23290
23291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23292{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23293echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23294
23295# Is the header present?
ca81d7a0
JD
23296{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23297echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23298cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23299/* confdefs.h. */
23300_ACEOF
23301cat confdefs.h >>conftest.$ac_ext
23302cat >>conftest.$ac_ext <<_ACEOF
23303/* end confdefs.h. */
503d2be0
AS
23304#include <$ac_header>
23305_ACEOF
ca81d7a0
JD
23306if { (ac_try="$ac_cpp conftest.$ac_ext"
23307case "(($ac_try" in
23308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23309 *) ac_try_echo=$ac_try;;
23310esac
23311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23312 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23313 ac_status=$?
6bae0ccf 23314 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23315 rm -f conftest.er1
23316 cat conftest.err >&5
c0d27fcc 23317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23318 (exit $ac_status); } >/dev/null && {
23319 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23320 test ! -s conftest.err
23321 }; then
c0d27fcc 23322 ac_header_preproc=yes
647847ea 23323else
503d2be0 23324 echo "$as_me: failed program was:" >&5
19650fd6
AS
23325sed 's/^/| /' conftest.$ac_ext >&5
23326
c0d27fcc 23327 ac_header_preproc=no
647847ea 23328fi
ca81d7a0 23329
503d2be0 23330rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23331{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23332echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23333
23334# So? What about this header?
edfaf76d
LK
23335case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23336 yes:no: )
c0d27fcc
MR
23337 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23338echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23339 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23340echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23341 ac_header_preproc=yes
19650fd6 23342 ;;
edfaf76d 23343 no:yes:* )
c0d27fcc
MR
23344 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23345echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23346 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23347echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23348 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23349echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23350 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23351echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23352 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23353echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23354 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23355echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23356
19650fd6 23357 ;;
c0d27fcc 23358esac
ca81d7a0
JD
23359{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23360echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23361if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23362 echo $ECHO_N "(cached) $ECHO_C" >&6
23363else
edfaf76d 23364 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23365fi
ca81d7a0
JD
23366ac_res=`eval echo '${'$as_ac_Header'}'`
23367 { echo "$as_me:$LINENO: result: $ac_res" >&5
23368echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23369
23370fi
503d2be0 23371if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23372 cat >>confdefs.h <<_ACEOF
503d2be0 23373#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23374_ACEOF
647847ea 23375
73b77ee5 23376fi
c0d27fcc 23377
503d2be0 23378done
73b77ee5 23379
c0d27fcc
MR
23380
23381
503d2be0
AS
23382for ac_func in fork vfork
23383do
23384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23385{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23387if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23388 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23389else
503d2be0 23390 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23391/* confdefs.h. */
23392_ACEOF
23393cat confdefs.h >>conftest.$ac_ext
23394cat >>conftest.$ac_ext <<_ACEOF
23395/* end confdefs.h. */
edfaf76d
LK
23396/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23397 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23398#define $ac_func innocuous_$ac_func
23399
fa0b693c 23400/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23401 which can conflict with char $ac_func (); below.
23402 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23403 <limits.h> exists even on freestanding compilers. */
edfaf76d 23404
19650fd6
AS
23405#ifdef __STDC__
23406# include <limits.h>
23407#else
23408# include <assert.h>
23409#endif
edfaf76d
LK
23410
23411#undef $ac_func
23412
ca81d7a0
JD
23413/* Override any GCC internal prototype to avoid an error.
23414 Use char because int might match the return type of a GCC
23415 builtin and then its argument prototype would still apply. */
503d2be0
AS
23416#ifdef __cplusplus
23417extern "C"
23418#endif
503d2be0 23419char $ac_func ();
fa0b693c
GM
23420/* The GNU C library defines this for functions which it implements
23421 to always fail with ENOSYS. Some functions are actually named
23422 something starting with __ and the normal name is an alias. */
ca81d7a0 23423#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23424choke me
fa0b693c
GM
23425#endif
23426
19650fd6
AS
23427int
23428main ()
23429{
ca81d7a0 23430return $ac_func ();
503d2be0
AS
23431 ;
23432 return 0;
23433}
23434_ACEOF
23435rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23436if { (ac_try="$ac_link"
23437case "(($ac_try" in
23438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23439 *) ac_try_echo=$ac_try;;
23440esac
23441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23442 (eval "$ac_link") 2>conftest.er1
503d2be0 23443 ac_status=$?
edfaf76d
LK
23444 grep -v '^ *+' conftest.er1 >conftest.err
23445 rm -f conftest.er1
23446 cat conftest.err >&5
c0d27fcc 23447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23448 (exit $ac_status); } && {
23449 test -z "$ac_c_werror_flag" ||
23450 test ! -s conftest.err
23451 } && test -s conftest$ac_exeext &&
23452 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23453 eval "$as_ac_var=yes"
23454else
23455 echo "$as_me: failed program was:" >&5
19650fd6
AS
23456sed 's/^/| /' conftest.$ac_ext >&5
23457
ca81d7a0 23458 eval "$as_ac_var=no"
503d2be0 23459fi
ca81d7a0 23460
f053c89f 23461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23462 conftest$ac_exeext conftest.$ac_ext
503d2be0 23463fi
ca81d7a0
JD
23464ac_res=`eval echo '${'$as_ac_var'}'`
23465 { echo "$as_me:$LINENO: result: $ac_res" >&5
23466echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23467if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23468 cat >>confdefs.h <<_ACEOF
503d2be0 23469#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23470_ACEOF
503d2be0 23471
fa0b693c 23472fi
503d2be0 23473done
fa0b693c 23474
503d2be0 23475if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23476 { echo "$as_me:$LINENO: checking for working fork" >&5
23477echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23478if test "${ac_cv_func_fork_works+set}" = set; then
23479 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23480else
503d2be0
AS
23481 if test "$cross_compiling" = yes; then
23482 ac_cv_func_fork_works=cross
23483else
23484 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23485/* confdefs.h. */
23486_ACEOF
23487cat confdefs.h >>conftest.$ac_ext
23488cat >>conftest.$ac_ext <<_ACEOF
23489/* end confdefs.h. */
23490$ac_includes_default
23491int
23492main ()
23493{
23494
23495 /* By Ruediger Kuhlmann. */
23496 return fork () < 0;
23497
23498 ;
23499 return 0;
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
AS
23521 (exit $ac_status); }; }; then
23522 ac_cv_func_fork_works=yes
23523else
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_fork_works=no
23530fi
ca81d7a0 23531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23532fi
ca81d7a0
JD
23533
23534
503d2be0 23535fi
ca81d7a0
JD
23536{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23537echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23538
6bae0ccf
DL
23539else
23540 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23541fi
23542if test "x$ac_cv_func_fork_works" = xcross; then
23543 case $host in
23544 *-*-amigaos* | *-*-msdosdjgpp*)
23545 # Override, as these systems have only a dummy fork() stub
23546 ac_cv_func_fork_works=no
23547 ;;
23548 *)
23549 ac_cv_func_fork_works=yes
23550 ;;
23551 esac
c0d27fcc
MR
23552 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23553echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23554fi
73b77ee5 23555ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23556if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23557 { echo "$as_me:$LINENO: checking for working vfork" >&5
23558echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23559if test "${ac_cv_func_vfork_works+set}" = set; then
23560 echo $ECHO_N "(cached) $ECHO_C" >&6
23561else
23562 if test "$cross_compiling" = yes; then
23563 ac_cv_func_vfork_works=cross
fa0b693c 23564else
503d2be0 23565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23566/* confdefs.h. */
23567_ACEOF
23568cat confdefs.h >>conftest.$ac_ext
23569cat >>conftest.$ac_ext <<_ACEOF
23570/* end confdefs.h. */
73b77ee5 23571/* Thanks to Paul Eggert for this test. */
ca81d7a0 23572$ac_includes_default
19650fd6 23573#include <sys/wait.h>
f053c89f 23574#ifdef HAVE_VFORK_H
503d2be0 23575# include <vfork.h>
73b77ee5
GM
23576#endif
23577/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23578 argument registers are propagated back to the parent. The compiler
23579 is told about this with #include <vfork.h>, but some compilers
23580 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23581 static variable whose address is put into a register that is
23582 clobbered by the vfork. */
19650fd6 23583static void
fa0b693c 23584#ifdef __cplusplus
73b77ee5 23585sparc_address_test (int arg)
503d2be0 23586# else
73b77ee5 23587sparc_address_test (arg) int arg;
fa0b693c 23588#endif
fa0b693c 23589{
73b77ee5
GM
23590 static pid_t child;
23591 if (!child) {
23592 child = vfork ();
23593 if (child < 0) {
23594 perror ("vfork");
23595 _exit(2);
23596 }
23597 if (!child) {
23598 arg = getpid();
23599 write(-1, "", 0);
23600 _exit (arg);
23601 }
23602 }
23603}
503d2be0
AS
23604
23605int
23606main ()
23607{
73b77ee5
GM
23608 pid_t parent = getpid ();
23609 pid_t child;
fa0b693c 23610
19650fd6 23611 sparc_address_test (0);
fa0b693c 23612
73b77ee5 23613 child = vfork ();
fa0b693c 23614
73b77ee5 23615 if (child == 0) {
503d2be0
AS
23616 /* Here is another test for sparc vfork register problems. This
23617 test uses lots of local variables, at least as many local
23618 variables as main has allocated so far including compiler
23619 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23620 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23621 reuse the register of parent for one of the local variables,
23622 since it will think that parent can't possibly be used any more
23623 in this routine. Assigning to the local variable will thus
23624 munge parent in the parent process. */
73b77ee5
GM
23625 pid_t
23626 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23627 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23628 /* Convince the compiler that p..p7 are live; otherwise, it might
23629 use the same hardware register for all 8 local variables. */
23630 if (p != p1 || p != p2 || p != p3 || p != p4
23631 || p != p5 || p != p6 || p != p7)
23632 _exit(1);
fa0b693c 23633
503d2be0
AS
23634 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23635 from child file descriptors. If the child closes a descriptor
23636 before it execs or exits, this munges the parent's descriptor
23637 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23638 _exit(close(fileno(stdout)) != 0);
23639 } else {
23640 int status;
23641 struct stat st;
23642
23643 while (wait(&status) != child)
23644 ;
ca81d7a0 23645 return (
73b77ee5
GM
23646 /* Was there some problem with vforking? */
23647 child < 0
23648
23649 /* Did the child fail? (This shouldn't happen.) */
23650 || status
23651
23652 /* Did the vfork/compiler bug occur? */
23653 || parent != getpid()
fa0b693c 23654
73b77ee5
GM
23655 /* Did the file descriptor bug occur? */
23656 || fstat(fileno(stdout), &st) != 0
23657 );
23658 }
23659}
503d2be0
AS
23660_ACEOF
23661rm -f conftest$ac_exeext
ca81d7a0
JD
23662if { (ac_try="$ac_link"
23663case "(($ac_try" in
23664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23665 *) ac_try_echo=$ac_try;;
23666esac
23667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23668 (eval "$ac_link") 2>&5
503d2be0 23669 ac_status=$?
c0d27fcc 23670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23672 { (case "(($ac_try" in
23673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23674 *) ac_try_echo=$ac_try;;
23675esac
23676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23677 (eval "$ac_try") 2>&5
503d2be0 23678 ac_status=$?
c0d27fcc 23679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23680 (exit $ac_status); }; }; then
73b77ee5 23681 ac_cv_func_vfork_works=yes
fa0b693c 23682else
503d2be0
AS
23683 echo "$as_me: program exited with status $ac_status" >&5
23684echo "$as_me: failed program was:" >&5
19650fd6
AS
23685sed 's/^/| /' conftest.$ac_ext >&5
23686
c0d27fcc 23687( exit $ac_status )
503d2be0
AS
23688ac_cv_func_vfork_works=no
23689fi
ca81d7a0 23690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23691fi
ca81d7a0
JD
23692
23693
fa0b693c 23694fi
ca81d7a0
JD
23695{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23696echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23697
503d2be0
AS
23698fi;
23699if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23700 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23701 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23702echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23703fi
23704
503d2be0
AS
23705if test "x$ac_cv_func_vfork_works" = xyes; then
23706
c0d27fcc 23707cat >>confdefs.h <<\_ACEOF
503d2be0 23708#define HAVE_WORKING_VFORK 1
c0d27fcc 23709_ACEOF
503d2be0
AS
23710
23711else
23712
c0d27fcc 23713cat >>confdefs.h <<\_ACEOF
73b77ee5 23714#define vfork fork
c0d27fcc 23715_ACEOF
fa0b693c
GM
23716
23717fi
503d2be0
AS
23718if test "x$ac_cv_func_fork_works" = xyes; then
23719
c0d27fcc 23720cat >>confdefs.h <<\_ACEOF
503d2be0 23721#define HAVE_WORKING_FORK 1
c0d27fcc 23722_ACEOF
fa0b693c 23723
503d2be0 23724fi
647847ea 23725
c0d27fcc 23726
ca81d7a0
JD
23727{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23728echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23729if test "${emacs_cv_langinfo_codeset+set}" = set; then
23730 echo $ECHO_N "(cached) $ECHO_C" >&6
23731else
23732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23733/* confdefs.h. */
23734_ACEOF
23735cat confdefs.h >>conftest.$ac_ext
23736cat >>conftest.$ac_ext <<_ACEOF
23737/* end confdefs.h. */
6a3a24fa
JD
23738#include <langinfo.h>
23739int
23740main ()
23741{
23742char* cs = nl_langinfo(CODESET);
23743 ;
23744 return 0;
23745}
23746_ACEOF
23747rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23748if { (ac_try="$ac_link"
23749case "(($ac_try" in
23750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23751 *) ac_try_echo=$ac_try;;
23752esac
23753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23754 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23755 ac_status=$?
edfaf76d
LK
23756 grep -v '^ *+' conftest.er1 >conftest.err
23757 rm -f conftest.er1
23758 cat conftest.err >&5
6a3a24fa 23759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23760 (exit $ac_status); } && {
23761 test -z "$ac_c_werror_flag" ||
23762 test ! -s conftest.err
23763 } && test -s conftest$ac_exeext &&
23764 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23765 emacs_cv_langinfo_codeset=yes
23766else
23767 echo "$as_me: failed program was:" >&5
19650fd6
AS
23768sed 's/^/| /' conftest.$ac_ext >&5
23769
ca81d7a0 23770 emacs_cv_langinfo_codeset=no
6a3a24fa 23771fi
ca81d7a0 23772
f053c89f 23773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23774 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23775
23776fi
ca81d7a0
JD
23777{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23778echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23779if test $emacs_cv_langinfo_codeset = yes; then
23780
23781cat >>confdefs.h <<\_ACEOF
23782#define HAVE_LANGINFO_CODESET 1
23783_ACEOF
23784
23785fi
23786
ca81d7a0
JD
23787{ echo "$as_me:$LINENO: checking for size_t" >&5
23788echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23789if test "${ac_cv_type_size_t+set}" = set; then
23790 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23791else
503d2be0 23792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23793/* confdefs.h. */
23794_ACEOF
23795cat confdefs.h >>conftest.$ac_ext
23796cat >>conftest.$ac_ext <<_ACEOF
23797/* end confdefs.h. */
503d2be0 23798$ac_includes_default
ca81d7a0 23799typedef size_t ac__type_new_;
503d2be0
AS
23800int
23801main ()
23802{
ca81d7a0 23803if ((ac__type_new_ *) 0)
503d2be0 23804 return 0;
ca81d7a0 23805if (sizeof (ac__type_new_))
503d2be0
AS
23806 return 0;
23807 ;
23808 return 0;
23809}
23810_ACEOF
23811rm -f conftest.$ac_objext
ca81d7a0
JD
23812if { (ac_try="$ac_compile"
23813case "(($ac_try" in
23814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23815 *) ac_try_echo=$ac_try;;
23816esac
23817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23818 (eval "$ac_compile") 2>conftest.er1
503d2be0 23819 ac_status=$?
edfaf76d
LK
23820 grep -v '^ *+' conftest.er1 >conftest.err
23821 rm -f conftest.er1
23822 cat conftest.err >&5
c0d27fcc 23823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23824 (exit $ac_status); } && {
23825 test -z "$ac_c_werror_flag" ||
23826 test ! -s conftest.err
23827 } && test -s conftest.$ac_objext; then
8730a8da
DL
23828 ac_cv_type_size_t=yes
23829else
503d2be0 23830 echo "$as_me: failed program was:" >&5
19650fd6
AS
23831sed 's/^/| /' conftest.$ac_ext >&5
23832
ca81d7a0 23833 ac_cv_type_size_t=no
8730a8da 23834fi
ca81d7a0
JD
23835
23836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23837fi
ca81d7a0
JD
23838{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23839echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23840if test $ac_cv_type_size_t = yes; then
503d2be0 23841
c0d27fcc
MR
23842cat >>confdefs.h <<_ACEOF
23843#define HAVE_SIZE_T 1
23844_ACEOF
23845
8730a8da
DL
23846
23847fi
23848
c0d27fcc 23849
ca81d7a0
JD
23850{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23851echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23852if test "${ac_cv_type_mbstate_t+set}" = set; then
23853 echo $ECHO_N "(cached) $ECHO_C" >&6
23854else
23855 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23856/* confdefs.h. */
23857_ACEOF
23858cat confdefs.h >>conftest.$ac_ext
23859cat >>conftest.$ac_ext <<_ACEOF
23860/* end confdefs.h. */
973a76b1
DL
23861$ac_includes_default
23862# include <wchar.h>
23863int
23864main ()
23865{
23866mbstate_t x; return sizeof x;
23867 ;
23868 return 0;
23869}
23870_ACEOF
23871rm -f conftest.$ac_objext
ca81d7a0
JD
23872if { (ac_try="$ac_compile"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
23877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23878 (eval "$ac_compile") 2>conftest.er1
973a76b1 23879 ac_status=$?
edfaf76d
LK
23880 grep -v '^ *+' conftest.er1 >conftest.err
23881 rm -f conftest.er1
23882 cat conftest.err >&5
973a76b1 23883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23884 (exit $ac_status); } && {
23885 test -z "$ac_c_werror_flag" ||
23886 test ! -s conftest.err
23887 } && test -s conftest.$ac_objext; then
973a76b1
DL
23888 ac_cv_type_mbstate_t=yes
23889else
23890 echo "$as_me: failed program was:" >&5
19650fd6
AS
23891sed 's/^/| /' conftest.$ac_ext >&5
23892
ca81d7a0 23893 ac_cv_type_mbstate_t=no
973a76b1 23894fi
ca81d7a0
JD
23895
23896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23897fi
ca81d7a0
JD
23898{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23899echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23900 if test $ac_cv_type_mbstate_t = yes; then
23901
23902cat >>confdefs.h <<\_ACEOF
23903#define HAVE_MBSTATE_T 1
23904_ACEOF
23905
23906 else
23907
23908cat >>confdefs.h <<\_ACEOF
23909#define mbstate_t int
23910_ACEOF
23911
23912 fi
23913
ca81d7a0
JD
23914{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23915echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23916if test "${emacs_cv_c_restrict+set}" = set; then
23917 echo $ECHO_N "(cached) $ECHO_C" >&6
23918else
23919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23920/* confdefs.h. */
23921_ACEOF
23922cat confdefs.h >>conftest.$ac_ext
23923cat >>conftest.$ac_ext <<_ACEOF
23924/* end confdefs.h. */
22044edf
DL
23925void fred (int *restrict x);
23926int
23927main ()
23928{
b936fae4 23929
22044edf
DL
23930 ;
23931 return 0;
23932}
c0d27fcc 23933_ACEOF
22044edf 23934rm -f conftest.$ac_objext
ca81d7a0
JD
23935if { (ac_try="$ac_compile"
23936case "(($ac_try" in
23937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23938 *) ac_try_echo=$ac_try;;
23939esac
23940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23941 (eval "$ac_compile") 2>conftest.er1
22044edf 23942 ac_status=$?
edfaf76d
LK
23943 grep -v '^ *+' conftest.er1 >conftest.err
23944 rm -f conftest.er1
23945 cat conftest.err >&5
22044edf 23946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23947 (exit $ac_status); } && {
23948 test -z "$ac_c_werror_flag" ||
23949 test ! -s conftest.err
23950 } && test -s conftest.$ac_objext; then
22044edf
DL
23951 emacs_cv_c_restrict=yes
23952else
23953 echo "$as_me: failed program was:" >&5
19650fd6
AS
23954sed 's/^/| /' conftest.$ac_ext >&5
23955
ca81d7a0 23956 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23957/* confdefs.h. */
23958_ACEOF
23959cat confdefs.h >>conftest.$ac_ext
23960cat >>conftest.$ac_ext <<_ACEOF
23961/* end confdefs.h. */
22044edf
DL
23962void fred (int *__restrict x);
23963int
23964main ()
23965{
c0d27fcc 23966
22044edf
DL
23967 ;
23968 return 0;
23969}
c0d27fcc 23970_ACEOF
22044edf 23971rm -f conftest.$ac_objext
ca81d7a0
JD
23972if { (ac_try="$ac_compile"
23973case "(($ac_try" in
23974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975 *) ac_try_echo=$ac_try;;
23976esac
23977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23978 (eval "$ac_compile") 2>conftest.er1
22044edf 23979 ac_status=$?
edfaf76d
LK
23980 grep -v '^ *+' conftest.er1 >conftest.err
23981 rm -f conftest.er1
23982 cat conftest.err >&5
22044edf 23983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23984 (exit $ac_status); } && {
23985 test -z "$ac_c_werror_flag" ||
23986 test ! -s conftest.err
23987 } && test -s conftest.$ac_objext; then
22044edf
DL
23988 emacs_cv_c_restrict=__restrict
23989else
23990 echo "$as_me: failed program was:" >&5
19650fd6
AS
23991sed 's/^/| /' conftest.$ac_ext >&5
23992
ca81d7a0 23993 emacs_cv_c_restrict=no
ba4481b5 23994fi
ca81d7a0
JD
23995
23996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23997fi
ca81d7a0
JD
23998
23999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24000fi
ca81d7a0
JD
24001{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24002echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24003case "$emacs_cv_c_restrict" in
24004 yes) emacs_restrict=restrict;;
24005 no) emacs_restrict="";;
24006 *) emacs_restrict="$emacs_cv_c_restrict";;
24007esac
24008if test "$emacs_restrict" != __restrict; then
b936fae4 24009
22044edf
DL
24010cat >>confdefs.h <<_ACEOF
24011#define __restrict $emacs_restrict
c0d27fcc 24012_ACEOF
ba4481b5
DL
24013
24014fi
ba4481b5 24015
ca81d7a0
JD
24016{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24017echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24018if test "${emacs_cv_c_restrict_arr+set}" = set; then
24019 echo $ECHO_N "(cached) $ECHO_C" >&6
24020else
24021 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24022/* confdefs.h. */
24023_ACEOF
24024cat confdefs.h >>conftest.$ac_ext
24025cat >>conftest.$ac_ext <<_ACEOF
24026/* end confdefs.h. */
22044edf
DL
24027void fred (int x[__restrict]);
24028int
24029main ()
24030{
b936fae4 24031
22044edf
DL
24032 ;
24033 return 0;
24034}
c0d27fcc 24035_ACEOF
22044edf 24036rm -f conftest.$ac_objext
ca81d7a0
JD
24037if { (ac_try="$ac_compile"
24038case "(($ac_try" in
24039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24040 *) ac_try_echo=$ac_try;;
24041esac
24042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24043 (eval "$ac_compile") 2>conftest.er1
22044edf 24044 ac_status=$?
edfaf76d
LK
24045 grep -v '^ *+' conftest.er1 >conftest.err
24046 rm -f conftest.er1
24047 cat conftest.err >&5
22044edf 24048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24049 (exit $ac_status); } && {
24050 test -z "$ac_c_werror_flag" ||
24051 test ! -s conftest.err
24052 } && test -s conftest.$ac_objext; then
22044edf
DL
24053 emacs_cv_c_restrict_arr=yes
24054else
24055 echo "$as_me: failed program was:" >&5
19650fd6
AS
24056sed 's/^/| /' conftest.$ac_ext >&5
24057
ca81d7a0 24058 emacs_cv_c_restrict_arr=no
ba4481b5 24059fi
ca81d7a0
JD
24060
24061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24062fi
ca81d7a0
JD
24063{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24064echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24065if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24066
c0d27fcc 24067cat >>confdefs.h <<\_ACEOF
22044edf 24068#define __restrict_arr __restrict
c0d27fcc 24069_ACEOF
ba4481b5 24070
ba4481b5
DL
24071fi
24072
c0d27fcc 24073
c0d27fcc 24074
22044edf
DL
24075# Set up the CFLAGS for real compilation, so we can substitute it.
24076CFLAGS="$REAL_CFLAGS"
24077CPPFLAGS="$REAL_CPPFLAGS"
24078
24079#### Find out which version of Emacs this is.
24080version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24081 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24082if test x"${version}" = x; then
24083 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24084echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24085 { (exit 1); exit 1; }; }
24086fi
24087
24088### Specify what sort of things we'll be editing into Makefile and config.h.
24089### Use configuration here uncanonicalized to avoid exceeding size limits.
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
6a3a24fa 24122
06b62770
AR
24123
24124
24125
edfda783 24126
22044edf
DL
24127
24128
24129cat >>confdefs.h <<_ACEOF
24130#define EMACS_CONFIGURATION "${canonical}"
24131_ACEOF
24132
24133
24134cat >>confdefs.h <<_ACEOF
24135#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24136_ACEOF
24137
24138
24139cat >>confdefs.h <<_ACEOF
24140#define config_machfile "${machfile}"
24141_ACEOF
24142
24143
24144cat >>confdefs.h <<_ACEOF
24145#define config_opsysfile "${opsysfile}"
24146_ACEOF
24147
24148
24149cat >>confdefs.h <<_ACEOF
24150#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24151_ACEOF
24152
24153
24154cat >>confdefs.h <<_ACEOF
24155#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24156_ACEOF
24157
24158
24159cat >>confdefs.h <<_ACEOF
24160#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24161_ACEOF
24162
24163
24164cat >>confdefs.h <<_ACEOF
24165#define UNEXEC_SRC ${UNEXEC_SRC}
24166_ACEOF
24167
24168
24169if test "${HAVE_X_WINDOWS}" = "yes" ; then
24170
24171cat >>confdefs.h <<\_ACEOF
24172#define HAVE_X_WINDOWS 1
24173_ACEOF
24174
24175fi
24176if test "${USE_X_TOOLKIT}" != "none" ; then
24177
24178cat >>confdefs.h <<\_ACEOF
24179#define USE_X_TOOLKIT 1
24180_ACEOF
24181
39dd4d52 24182 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24183
24184cat >>confdefs.h <<\_ACEOF
24185#define USE_LUCID 1
24186_ACEOF
24187
39dd4d52 24188 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24189
24190cat >>confdefs.h <<\_ACEOF
24191#define USE_MOTIF 1
24192_ACEOF
24193
24194 fi
22044edf
DL
24195fi
24196if test "${HAVE_X11}" = "yes" ; then
24197
24198cat >>confdefs.h <<\_ACEOF
24199#define HAVE_X11 1
24200_ACEOF
24201
22044edf
DL
24202fi
24203if test "${HAVE_MENUS}" = "yes" ; then
24204
24205cat >>confdefs.h <<\_ACEOF
24206#define HAVE_MENUS 1
24207_ACEOF
24208
24209fi
24210if test "${GNU_MALLOC}" = "yes" ; then
24211
24212cat >>confdefs.h <<\_ACEOF
24213#define GNU_MALLOC 1
24214_ACEOF
24215
24216fi
24217if test "${REL_ALLOC}" = "yes" ; then
24218
24219cat >>confdefs.h <<\_ACEOF
24220#define REL_ALLOC 1
24221_ACEOF
24222
24223fi
24224
24225
24226
c0d27fcc
MR
24227
24228
5afbeb22 24229
ba4481b5 24230#### Report on what we decided to do.
488dd4c4
JD
24231#### Report GTK as a toolkit, even if it doesn't use Xt.
24232#### It makes printing result more understandable as using GTK sets
24233#### toolkit_scroll_bars to yes by default.
24234if test "${HAVE_GTK}" = "yes"; then
24235 USE_X_TOOLKIT=GTK
24236fi
24237
ba4481b5
DL
24238echo "
24239Configured for \`${canonical}'.
24240
24241 Where should the build process find the source code? ${srcdir}
24242 What operating system and machine description files should Emacs use?
24243 \`${opsysfile}' and \`${machfile}'
24244 What compiler should emacs be built with? ${CC} ${CFLAGS}
24245 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24246 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24247 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24248 What window system should Emacs use? ${window_system}
8e967cf7 24249 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24250
24251if test -n "${x_includes}"; then
24252echo " Where do we find X Windows header files? ${x_includes}"
24253else
24254echo " Where do we find X Windows header files? Standard dirs"
24255fi
24256if test -n "${x_libraries}"; then
24257echo " Where do we find X Windows libraries? ${x_libraries}"
24258else
24259echo " Where do we find X Windows libraries? Standard dirs"
24260fi
24261
24262echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24263echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24264echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24265echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24266echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24267echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24268echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24269echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24270echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24271
edfda783
AR
24272echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24273echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24274echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24275echo " Does Emacs use -lxft? ${HAVE_XFT}"
24276
ba4481b5
DL
24277echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24278echo
24279
d0098f13
JD
24280if test $USE_XASSERTS = yes; then
24281 echo " Compiling with asserts turned on."
d0098f13 24282 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24283fi
05cf15c6 24284
ca34d75a
JD
24285echo
24286
a2d3b5bd
JD
24287if test "$USE_X_TOOLKIT" = GTK; then
24288 case "$canonical" in
24289 *cygwin*)
24290 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24291 will probably get a crash on startup. If this happens, please use another
24292 toolkit for Emacs. See etc/PROBLEMS for more information."
24293 ;;
24294 esac
24295fi
24296
06b62770
AR
24297if test "$HAVE_NS" = "yes"; then
24298 echo
24299 echo "You must run \"make install\" in order to test the built application.
24300The installed application will go to nextstep/Emacs.app and can be
24301run or moved from there."
24302 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24303 echo "The application will be fully self-contained."
24304 else
24305 echo "The lisp resources for the application will be installed under ${prefix}.
24306You may need to run \"make install\" with sudo. The application will fail
24307to run if these resources are not installed."
24308 fi
24309 echo
24310fi
24311
131e4133
MA
24312if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24313 echo "D-Bus integration has been tested for GNU/Linux only."
24314 echo
24315fi
24316
05cf15c6 24317
ba4481b5
DL
24318# Remove any trailing slashes in these variables.
24319test "${prefix}" != NONE &&
24320 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24321test "${exec_prefix}" != NONE &&
24322 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24323
8acdcf6f
GM
24324# Now get this: Some word that is part of the ${srcdir} directory name
24325# or the ${configuration} value might, just might, happen to be an
24326# identifier like `sun4' or `i386' or something, and be predefined by
24327# the C preprocessor to some helpful value like 1, or maybe the empty
24328# string. Needless to say consequent macro substitutions are less
24329# than conducive to the makefile finding the correct directory.
24330cpp_undefs="`echo $srcdir $configuration $canonical |
24331 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24332 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24333
d0e9bfd2
GM
24334## Check if the C preprocessor will convert `..' to `. .'. If so, set
24335## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24336## from Makefile.c can correctly provide the arg `-traditional' to the
24337## C preprocessor.
24338
503d2be0 24339cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24340/* confdefs.h. */
24341_ACEOF
24342cat confdefs.h >>conftest.$ac_ext
24343cat >>conftest.$ac_ext <<_ACEOF
24344/* end confdefs.h. */
d0e9bfd2 24345yes..yes
503d2be0 24346_ACEOF
d0e9bfd2 24347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24348 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24349 CPP_NEED_TRADITIONAL=no
24350else
d0e9bfd2
GM
24351 CPP_NEED_TRADITIONAL=yes
24352fi
24353rm -f conftest*
24354
c0d27fcc 24355
f657c21b 24356ac_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
24357
24358ac_config_commands="$ac_config_commands default"
24359
503d2be0 24360cat >confcache <<\_ACEOF
ba4481b5
DL
24361# This file is a shell script that caches the results of configure
24362# tests run on this system so they can be shared between configure
503d2be0
AS
24363# scripts and configure runs, see configure's option --config-cache.
24364# It is not useful on other systems. If it contains results you don't
24365# want to keep, you may remove or edit it.
ba4481b5 24366#
503d2be0
AS
24367# config.status only pays attention to the cache file if you give it
24368# the --recheck option to rerun configure.
ba4481b5 24369#
6bae0ccf 24370# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24371# loading this file, other *unset* `ac_cv_foo' will be assigned the
24372# following values.
24373
24374_ACEOF
24375
ba4481b5
DL
24376# The following way of writing the cache mishandles newlines in values,
24377# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24378# So, we kill variables containing newlines.
ba4481b5
DL
24379# Ultrix sh set writes to stderr and can't be redirected directly,
24380# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24381(
24382 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24383 eval ac_val=\$$ac_var
24384 case $ac_val in #(
24385 *${as_nl}*)
24386 case $ac_var in #(
24387 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24388echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24389 esac
24390 case $ac_var in #(
24391 _ | IFS | as_nl) ;; #(
24392 *) $as_unset $ac_var ;;
24393 esac ;;
24394 esac
24395 done
24396
503d2be0 24397 (set) 2>&1 |
ca81d7a0
JD
24398 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24399 *${as_nl}ac_space=\ *)
503d2be0
AS
24400 # `set' does not quote correctly, so add quotes (double-quote
24401 # substitution turns \\\\ into \\, and sed turns \\ into \).
24402 sed -n \
edfaf76d
LK
24403 "s/'/'\\\\''/g;
24404 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24405 ;; #(
503d2be0
AS
24406 *)
24407 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24408 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24409 ;;
ca81d7a0
JD
24410 esac |
24411 sort
24412) |
503d2be0 24413 sed '
ca81d7a0 24414 /^ac_cv_env_/b end
503d2be0 24415 t clear
ca81d7a0 24416 :clear
503d2be0
AS
24417 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24418 t end
ca81d7a0
JD
24419 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24420 :end' >>confcache
24421if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24422 if test -w "$cache_file"; then
24423 test "x$cache_file" != "x/dev/null" &&
24424 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24425echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24426 cat confcache >$cache_file
ba4481b5 24427 else
ca81d7a0
JD
24428 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24429echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24430 fi
24431fi
24432rm -f confcache
24433
ba4481b5
DL
24434test "x$prefix" = xNONE && prefix=$ac_default_prefix
24435# Let make expand exec_prefix.
24436test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24437
ba4481b5
DL
24438DEFS=-DHAVE_CONFIG_H
24439
6bae0ccf
DL
24440ac_libobjs=
24441ac_ltlibobjs=
24442for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24443 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24444 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24445 ac_i=`echo "$ac_i" | sed "$ac_script"`
24446 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24447 # will be set to the directory where LIBOBJS objects are built.
24448 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24449 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24450done
24451LIBOBJS=$ac_libobjs
24452
24453LTLIBOBJS=$ac_ltlibobjs
24454
24455
c0d27fcc 24456
ba4481b5 24457: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24458ac_clean_files_save=$ac_clean_files
24459ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24460{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24461echo "$as_me: creating $CONFIG_STATUS" >&6;}
24462cat >$CONFIG_STATUS <<_ACEOF
24463#! $SHELL
c0d27fcc 24464# Generated by $as_me.
ba4481b5 24465# Run this file to recreate the current configuration.
ba4481b5 24466# Compiler output produced by configure, useful for debugging
503d2be0 24467# configure, is in config.log if it exists.
ba4481b5 24468
503d2be0 24469debug=false
19650fd6
AS
24470ac_cs_recheck=false
24471ac_cs_silent=false
503d2be0 24472SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24473_ACEOF
24474
24475cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24476## --------------------- ##
24477## M4sh Initialization. ##
24478## --------------------- ##
24479
f053c89f
CY
24480# Be more Bourne compatible
24481DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24482if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24483 emulate sh
24484 NULLCMD=:
6bae0ccf
DL
24485 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24486 # is contrary to our usage. Disable this feature.
24487 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24488 setopt NO_GLOB_SUBST
24489else
f053c89f
CY
24490 case `(set -o) 2>/dev/null` in
24491 *posix*) set -o posix ;;
24492esac
24493
503d2be0 24494fi
f053c89f
CY
24495
24496
503d2be0 24497
ca81d7a0
JD
24498
24499# PATH needs CR
24500# Avoid depending upon Character Ranges.
24501as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24502as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24503as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24504as_cr_digits='0123456789'
24505as_cr_alnum=$as_cr_Letters$as_cr_digits
24506
24507# The user is always right.
24508if test "${PATH_SEPARATOR+set}" != set; then
24509 echo "#! /bin/sh" >conf$$.sh
24510 echo "exit 0" >>conf$$.sh
24511 chmod +x conf$$.sh
24512 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24513 PATH_SEPARATOR=';'
24514 else
24515 PATH_SEPARATOR=:
24516 fi
24517 rm -f conf$$.sh
503d2be0
AS
24518fi
24519
c0d27fcc 24520# Support unset when possible.
edfaf76d 24521if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24522 as_unset=unset
24523else
24524 as_unset=false
24525fi
24526
6bae0ccf 24527
ca81d7a0
JD
24528# IFS
24529# We need space, tab and new line, in precisely that order. Quoting is
24530# there to prevent editors from complaining about space-tab.
24531# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24532# splitting by setting IFS to empty value.)
24533as_nl='
24534'
24535IFS=" "" $as_nl"
24536
24537# Find who we are. Look in the path if we contain no directory separator.
24538case $0 in
24539 *[\\/]* ) as_myself=$0 ;;
24540 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24541for as_dir in $PATH
24542do
24543 IFS=$as_save_IFS
24544 test -z "$as_dir" && as_dir=.
24545 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24546done
24547IFS=$as_save_IFS
24548
24549 ;;
24550esac
24551# We did not find ourselves, most probably we were run as `sh COMMAND'
24552# in which case we are not to be found in the path.
24553if test "x$as_myself" = x; then
24554 as_myself=$0
24555fi
24556if test ! -f "$as_myself"; then
24557 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24558 { (exit 1); exit 1; }
24559fi
24560
6bae0ccf 24561# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24562for as_var in ENV MAIL MAILPATH
24563do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24564done
6bae0ccf
DL
24565PS1='$ '
24566PS2='> '
24567PS4='+ '
24568
24569# NLS nuisances.
19650fd6
AS
24570for as_var in \
24571 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24572 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24573 LC_TELEPHONE LC_TIME
6bae0ccf 24574do
edfaf76d 24575 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24576 eval $as_var=C; export $as_var
24577 else
ca81d7a0 24578 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24579 fi
24580done
24581
24582# Required to use basename.
ca81d7a0
JD
24583if expr a : '\(a\)' >/dev/null 2>&1 &&
24584 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24585 as_expr=expr
24586else
24587 as_expr=false
24588fi
24589
ca81d7a0 24590if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24591 as_basename=basename
24592else
24593 as_basename=false
24594fi
c0d27fcc
MR
24595
24596
503d2be0 24597# Name of the executable.
ca81d7a0 24598as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24599$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24600 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24601 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24602echo X/"$0" |
ca81d7a0
JD
24603 sed '/^.*\/\([^/][^/]*\)\/*$/{
24604 s//\1/
24605 q
24606 }
24607 /^X\/\(\/\/\)$/{
24608 s//\1/
24609 q
24610 }
24611 /^X\/\(\/\).*/{
24612 s//\1/
24613 q
24614 }
24615 s/.*/./; q'`
c0d27fcc 24616
ca81d7a0
JD
24617# CDPATH.
24618$as_unset CDPATH
c0d27fcc
MR
24619
24620
c0d27fcc 24621
c0d27fcc 24622 as_lineno_1=$LINENO
c0d27fcc 24623 as_lineno_2=$LINENO
c0d27fcc 24624 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24625 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24626
24627 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24628 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24629 # line-number line after each line using $LINENO; the second 'sed'
24630 # does the real work. The second script uses 'N' to pair each
24631 # line-number line with the line containing $LINENO, and appends
24632 # trailing '-' during substitution so that $LINENO is not a special
24633 # case at line end.
c0d27fcc 24634 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24635 # scripts with optimization help from Paolo Bonzini. Blame Lee
24636 # E. McMahon (1931-1989) for sed's syntax. :-)
24637 sed -n '
24638 p
24639 /[$]LINENO/=
24640 ' <$as_myself |
c0d27fcc 24641 sed '
ca81d7a0
JD
24642 s/[$]LINENO.*/&-/
24643 t lineno
24644 b
24645 :lineno
c0d27fcc 24646 N
ca81d7a0
JD
24647 :loop
24648 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24649 t loop
ca81d7a0 24650 s/-\n.*//
c0d27fcc 24651 ' >$as_me.lineno &&
ca81d7a0
JD
24652 chmod +x "$as_me.lineno" ||
24653 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24654 { (exit 1); exit 1; }; }
24655
24656 # Don't try to exec as it changes $[0], causing all sort of problems
24657 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24658 # original and so on. Autoconf is especially sensitive to this).
24659 . "./$as_me.lineno"
c0d27fcc
MR
24660 # Exit status is that of the last command.
24661 exit
24662}
24663
24664
ca81d7a0
JD
24665if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24666 as_dirname=dirname
24667else
24668 as_dirname=false
24669fi
24670
24671ECHO_C= ECHO_N= ECHO_T=
24672case `echo -n x` in
24673-n*)
24674 case `echo 'x\c'` in
24675 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24676 *) ECHO_C='\c';;
24677 esac;;
24678*)
24679 ECHO_N='-n';;
c0d27fcc 24680esac
503d2be0 24681
ca81d7a0
JD
24682if expr a : '\(a\)' >/dev/null 2>&1 &&
24683 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24684 as_expr=expr
24685else
24686 as_expr=false
24687fi
24688
24689rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24690if test -d conf$$.dir; then
24691 rm -f conf$$.dir/conf$$.file
24692else
24693 rm -f conf$$.dir
24694 mkdir conf$$.dir
24695fi
503d2be0
AS
24696echo >conf$$.file
24697if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24698 as_ln_s='ln -s'
24699 # ... but there are two gotchas:
24700 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24701 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24702 # In both cases, we have to default to `cp -p'.
24703 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24704 as_ln_s='cp -p'
503d2be0
AS
24705elif ln conf$$.file conf$$ 2>/dev/null; then
24706 as_ln_s=ln
24707else
24708 as_ln_s='cp -p'
24709fi
ca81d7a0
JD
24710rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24711rmdir conf$$.dir 2>/dev/null
503d2be0 24712
6bae0ccf
DL
24713if mkdir -p . 2>/dev/null; then
24714 as_mkdir_p=:
24715else
edfaf76d 24716 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24717 as_mkdir_p=false
24718fi
24719
f053c89f
CY
24720if test -x / >/dev/null 2>&1; then
24721 as_test_x='test -x'
ca81d7a0 24722else
f053c89f
CY
24723 if ls -dL / >/dev/null 2>&1; then
24724 as_ls_L_option=L
24725 else
24726 as_ls_L_option=
24727 fi
24728 as_test_x='
24729 eval sh -c '\''
24730 if test -d "$1"; then
24731 test -d "$1/.";
24732 else
24733 case $1 in
24734 -*)set "./$1";;
24735 esac;
24736 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24737 ???[sx]*):;;*)false;;esac;fi
24738 '\'' sh
24739 '
ca81d7a0 24740fi
f053c89f 24741as_executable_p=$as_test_x
503d2be0 24742
c0d27fcc 24743# Sed expression to map a string onto a valid CPP name.
edfaf76d 24744as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24745
24746# Sed expression to map a string onto a valid variable name.
edfaf76d 24747as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24748
503d2be0 24749
503d2be0
AS
24750exec 6>&1
24751
ca81d7a0 24752# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24753# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24754# values after options handling.
24755ac_log="
5d374ce1 24756This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24757generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24758
24759 CONFIG_FILES = $CONFIG_FILES
24760 CONFIG_HEADERS = $CONFIG_HEADERS
24761 CONFIG_LINKS = $CONFIG_LINKS
24762 CONFIG_COMMANDS = $CONFIG_COMMANDS
24763 $ $0 $@
24764
ca81d7a0
JD
24765on `(hostname || uname -n) 2>/dev/null | sed 1q`
24766"
24767
503d2be0
AS
24768_ACEOF
24769
ca81d7a0 24770cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24771# Files that config.status was made for.
ca81d7a0
JD
24772config_files="$ac_config_files"
24773config_headers="$ac_config_headers"
24774config_commands="$ac_config_commands"
503d2be0 24775
ca81d7a0 24776_ACEOF
503d2be0 24777
c0d27fcc 24778cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24779ac_cs_usage="\
24780\`$as_me' instantiates files from templates according to the
24781current configuration.
24782
24783Usage: $0 [OPTIONS] [FILE]...
24784
24785 -h, --help print this help, then exit
f053c89f 24786 -V, --version print version number and configuration settings, then exit
19650fd6 24787 -q, --quiet do not print progress messages
503d2be0
AS
24788 -d, --debug don't remove temporary files
24789 --recheck update $as_me by reconfiguring in the same conditions
24790 --file=FILE[:TEMPLATE]
edfaf76d 24791 instantiate the configuration file FILE
503d2be0 24792 --header=FILE[:TEMPLATE]
edfaf76d 24793 instantiate the configuration header FILE
503d2be0
AS
24794
24795Configuration files:
24796$config_files
24797
24798Configuration headers:
24799$config_headers
24800
24801Configuration commands:
24802$config_commands
24803
24804Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24805
ca81d7a0 24806_ACEOF
c0d27fcc 24807cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24808ac_cs_version="\\
5d374ce1 24809emacs config.status 23.0.60
f053c89f 24810configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24811 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24812
ca81d7a0 24813Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24814This config.status script is free software; the Free Software Foundation
24815gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24816
24817ac_pwd='$ac_pwd'
24818srcdir='$srcdir'
24819INSTALL='$INSTALL'
c0d27fcc 24820_ACEOF
503d2be0 24821
c0d27fcc 24822cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24823# If no file are specified by the user, then we need to provide default
24824# value. By we need to know if files were specified by the user.
24825ac_need_defaults=:
24826while test $# != 0
ba4481b5 24827do
503d2be0
AS
24828 case $1 in
24829 --*=*)
ca81d7a0
JD
24830 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24831 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24832 ac_shift=:
24833 ;;
ca81d7a0 24834 *)
6bae0ccf
DL
24835 ac_option=$1
24836 ac_optarg=$2
24837 ac_shift=shift
503d2be0 24838 ;;
503d2be0
AS
24839 esac
24840
6bae0ccf 24841 case $ac_option in
503d2be0 24842 # Handling of the options.
19650fd6
AS
24843 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24844 ac_cs_recheck=: ;;
ca81d7a0
JD
24845 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24846 echo "$ac_cs_version"; exit ;;
24847 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24848 debug=: ;;
24849 --file | --fil | --fi | --f )
6bae0ccf
DL
24850 $ac_shift
24851 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24852 ac_need_defaults=false;;
24853 --header | --heade | --head | --hea )
6bae0ccf
DL
24854 $ac_shift
24855 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24856 ac_need_defaults=false;;
ca81d7a0
JD
24857 --he | --h)
24858 # Conflict between --help and --header
24859 { echo "$as_me: error: ambiguous option: $1
24860Try \`$0 --help' for more information." >&2
24861 { (exit 1); exit 1; }; };;
24862 --help | --hel | -h )
24863 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24864 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24865 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24866 ac_cs_silent=: ;;
503d2be0
AS
24867
24868 # This is an error.
ca81d7a0
JD
24869 -*) { echo "$as_me: error: unrecognized option: $1
24870Try \`$0 --help' for more information." >&2
503d2be0
AS
24871 { (exit 1); exit 1; }; } ;;
24872
ca81d7a0
JD
24873 *) ac_config_targets="$ac_config_targets $1"
24874 ac_need_defaults=false ;;
503d2be0 24875
ba4481b5 24876 esac
503d2be0 24877 shift
ba4481b5
DL
24878done
24879
19650fd6
AS
24880ac_configure_extra_args=
24881
24882if $ac_cs_silent; then
24883 exec 6>/dev/null
24884 ac_configure_extra_args="$ac_configure_extra_args --silent"
24885fi
24886
24887_ACEOF
24888cat >>$CONFIG_STATUS <<_ACEOF
24889if \$ac_cs_recheck; then
ca81d7a0
JD
24890 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24891 CONFIG_SHELL=$SHELL
24892 export CONFIG_SHELL
24893 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24894fi
24895
503d2be0 24896_ACEOF
ca81d7a0
JD
24897cat >>$CONFIG_STATUS <<\_ACEOF
24898exec 5>>config.log
24899{
24900 echo
24901 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24902## Running $as_me. ##
24903_ASBOX
24904 echo "$ac_log"
24905} >&5
ba4481b5 24906
ca81d7a0 24907_ACEOF
c0d27fcc 24908cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24909#
ca81d7a0 24910# INIT-COMMANDS
503d2be0 24911#
8acdcf6f 24912GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 24913
c0d27fcc
MR
24914_ACEOF
24915
c0d27fcc 24916cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24917
24918# Handling of arguments.
503d2be0
AS
24919for ac_config_target in $ac_config_targets
24920do
ca81d7a0
JD
24921 case $ac_config_target in
24922 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24923 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24924 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24925 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24926 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24927 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24928 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24929 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24930 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24931 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24932 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24933 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24934 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24935
c0d27fcc 24936 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24937echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24938 { (exit 1); exit 1; }; };;
24939 esac
ba4481b5 24940done
503d2be0 24941
ca81d7a0 24942
503d2be0
AS
24943# If the user did not use the arguments to specify the items to instantiate,
24944# then the envvar interface is used. Set only those that are not.
24945# We use the long form for the default assignment because of an extremely
24946# bizarre bug on SunOS 4.1.3.
24947if $ac_need_defaults; then
24948 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24949 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24950 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24951fi
503d2be0 24952
19650fd6 24953# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24954# simply because there is no reason against having it here, and in addition,
19650fd6 24955# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24956# Hook for its removal unless debugging.
24957# Note that there is a small window in which the directory will not be cleaned:
24958# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24959$debug ||
24960{
ca81d7a0
JD
24961 tmp=
24962 trap 'exit_status=$?
24963 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24964' 0
503d2be0
AS
24965 trap '{ (exit 1); exit 1; }' 1 2 13 15
24966}
503d2be0 24967# Create a (secure) tmp directory for tmp files.
19650fd6 24968
503d2be0 24969{
ca81d7a0 24970 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24971 test -n "$tmp" && test -d "$tmp"
24972} ||
24973{
ca81d7a0
JD
24974 tmp=./conf$$-$RANDOM
24975 (umask 077 && mkdir "$tmp")
503d2be0
AS
24976} ||
24977{
19650fd6 24978 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24979 { (exit 1); exit 1; }
24980}
24981
503d2be0 24982#
ca81d7a0 24983# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24984#
24985
24986# No need to generate the scripts if there are no CONFIG_FILES.
24987# This happens for instance when ./config.status config.h
ca81d7a0
JD
24988if test -n "$CONFIG_FILES"; then
24989
24990_ACEOF
24991
24992
24993
24994ac_delim='%!_!# '
24995for ac_last_try in false false false false false :; do
24996 cat >conf$$subs.sed <<_ACEOF
24997SHELL!$SHELL$ac_delim
24998PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24999PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25000PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25001PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25002PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25003PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25004exec_prefix!$exec_prefix$ac_delim
25005prefix!$prefix$ac_delim
25006program_transform_name!$program_transform_name$ac_delim
25007bindir!$bindir$ac_delim
25008sbindir!$sbindir$ac_delim
25009libexecdir!$libexecdir$ac_delim
25010datarootdir!$datarootdir$ac_delim
25011datadir!$datadir$ac_delim
25012sysconfdir!$sysconfdir$ac_delim
25013sharedstatedir!$sharedstatedir$ac_delim
25014localstatedir!$localstatedir$ac_delim
25015includedir!$includedir$ac_delim
25016oldincludedir!$oldincludedir$ac_delim
25017docdir!$docdir$ac_delim
25018infodir!$infodir$ac_delim
25019htmldir!$htmldir$ac_delim
25020dvidir!$dvidir$ac_delim
25021pdfdir!$pdfdir$ac_delim
25022psdir!$psdir$ac_delim
25023libdir!$libdir$ac_delim
25024localedir!$localedir$ac_delim
25025mandir!$mandir$ac_delim
25026DEFS!$DEFS$ac_delim
25027ECHO_C!$ECHO_C$ac_delim
25028ECHO_N!$ECHO_N$ac_delim
25029ECHO_T!$ECHO_T$ac_delim
25030LIBS!$LIBS$ac_delim
25031build_alias!$build_alias$ac_delim
25032host_alias!$host_alias$ac_delim
25033target_alias!$target_alias$ac_delim
25034MAINT!$MAINT$ac_delim
25035build!$build$ac_delim
25036build_cpu!$build_cpu$ac_delim
25037build_vendor!$build_vendor$ac_delim
25038build_os!$build_os$ac_delim
25039host!$host$ac_delim
25040host_cpu!$host_cpu$ac_delim
25041host_vendor!$host_vendor$ac_delim
25042host_os!$host_os$ac_delim
25043CC!$CC$ac_delim
25044CFLAGS!$CFLAGS$ac_delim
25045LDFLAGS!$LDFLAGS$ac_delim
25046CPPFLAGS!$CPPFLAGS$ac_delim
25047ac_ct_CC!$ac_ct_CC$ac_delim
25048EXEEXT!$EXEEXT$ac_delim
25049OBJEXT!$OBJEXT$ac_delim
25050CPP!$CPP$ac_delim
25051GREP!$GREP$ac_delim
25052EGREP!$EGREP$ac_delim
25053LN_S!$LN_S$ac_delim
25054INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25055INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25056INSTALL_DATA!$INSTALL_DATA$ac_delim
25057RANLIB!$RANLIB$ac_delim
25058INSTALL_INFO!$INSTALL_INFO$ac_delim
25059GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25060MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25061LIBSOUND!$LIBSOUND$ac_delim
25062PKG_CONFIG!$PKG_CONFIG$ac_delim
25063ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25064ALSA_LIBS!$ALSA_LIBS$ac_delim
25065CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25066SET_MAKE!$SET_MAKE$ac_delim
25067XMKMF!$XMKMF$ac_delim
cfe440b8 25068HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25069RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25070RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25071GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25072GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25073DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25074DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
25075XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25076XFT_LIBS!$XFT_LIBS$ac_delim
25077FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25078FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25079FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25080FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25081LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25082LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25083M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25084M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25085ALLOCA!$ALLOCA$ac_delim
25086liblockfile!$liblockfile$ac_delim
25087LIBOBJS!$LIBOBJS$ac_delim
25088NEED_SETGID!$NEED_SETGID$ac_delim
25089KMEM_GROUP!$KMEM_GROUP$ac_delim
25090GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25091GETOPT_H!$GETOPT_H$ac_delim
25092GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25093version!$version$ac_delim
ca81d7a0
JD
25094_ACEOF
25095
25096 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25097 break
25098 elif $ac_last_try; then
25099 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25100echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25101 { (exit 1); exit 1; }; }
25102 else
25103 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25104 fi
ca81d7a0
JD
25105done
25106
25107ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25108if test -n "$ac_eof"; then
25109 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25110 ac_eof=`expr $ac_eof + 1`
25111fi
503d2be0 25112
c0d27fcc 25113cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25114cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25115/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25116_ACEOF
25117sed '
25118s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25119s/^/s,@/; s/!/@,|#_!!_#|/
25120:n
25121t n
25122s/'"$ac_delim"'$/,g/; t
25123s/$/\\/; p
25124N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25125' >>$CONFIG_STATUS <conf$$subs.sed
25126rm -f conf$$subs.sed
25127cat >>$CONFIG_STATUS <<_ACEOF
25128CEOF$ac_eof
25129_ACEOF
503d2be0 25130
ca81d7a0
JD
25131
25132ac_delim='%!_!# '
25133for ac_last_try in false false false false false :; do
25134 cat >conf$$subs.sed <<_ACEOF
0bd50841 25135configuration!$configuration$ac_delim
7f0942ba
KH
25136canonical!$canonical$ac_delim
25137srcdir!$srcdir$ac_delim
1bb9a689
MB
25138lispdir!$lispdir$ac_delim
25139locallisppath!$locallisppath$ac_delim
25140lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25141x_default_search_path!$x_default_search_path$ac_delim
25142etcdir!$etcdir$ac_delim
25143archlibdir!$archlibdir$ac_delim
25144bitmapdir!$bitmapdir$ac_delim
25145gamedir!$gamedir$ac_delim
25146gameuser!$gameuser$ac_delim
25147c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25148c_switch_machine!$c_switch_machine$ac_delim
25149LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25150LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25151C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25152X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25153machfile!$machfile$ac_delim
25154opsysfile!$opsysfile$ac_delim
edfda783 25155ns_appdir!$ns_appdir$ac_delim
06b62770
AR
25156ns_appbindir!$ns_appbindir$ac_delim
25157ns_appresdir!$ns_appresdir$ac_delim
25158ns_appsrc!$ns_appsrc$ac_delim
facfbbbd 25159GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
ca81d7a0
JD
25160LTLIBOBJS!$LTLIBOBJS$ac_delim
25161_ACEOF
503d2be0 25162
9e2a2647 25163 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then
c24fa7dc
MB
25164 break
25165 elif $ac_last_try; then
25166 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25167echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25168 { (exit 1); exit 1; }; }
25169 else
25170 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25171 fi
ca81d7a0
JD
25172done
25173
25174ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25175if test -n "$ac_eof"; then
25176 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25177 ac_eof=`expr $ac_eof + 1`
25178fi
ba4481b5 25179
ca81d7a0
JD
25180cat >>$CONFIG_STATUS <<_ACEOF
25181cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25182/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25183_ACEOF
25184sed '
25185s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25186s/^/s,@/; s/!/@,|#_!!_#|/
25187:n
25188t n
25189s/'"$ac_delim"'$/,g/; t
25190s/$/\\/; p
25191N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25192' >>$CONFIG_STATUS <conf$$subs.sed
25193rm -f conf$$subs.sed
25194cat >>$CONFIG_STATUS <<_ACEOF
25195:end
25196s/|#_!!_#|//g
25197CEOF$ac_eof
c0d27fcc 25198_ACEOF
ca81d7a0
JD
25199
25200
25201# VPATH may cause trouble with some makes, so we remove $(srcdir),
25202# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25203# trailing colons and then remove the whole line if VPATH becomes empty
25204# (actually we leave an empty line to preserve line numbers).
25205if test "x$srcdir" = x.; then
25206 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25207s/:*\$(srcdir):*/:/
25208s/:*\${srcdir}:*/:/
25209s/:*@srcdir@:*/:/
25210s/^\([^=]*=[ ]*\):*/\1/
25211s/:*$//
25212s/^[^=]*=[ ]*$//
25213}'
25214fi
25215
c0d27fcc 25216cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25217fi # test -n "$CONFIG_FILES"
25218
25219
25220for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25221do
25222 case $ac_tag in
25223 :[FHLC]) ac_mode=$ac_tag; continue;;
25224 esac
25225 case $ac_mode$ac_tag in
25226 :[FHL]*:*);;
25227 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25228echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25229 { (exit 1); exit 1; }; };;
25230 :[FH]-) ac_tag=-:-;;
25231 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25232 esac
25233 ac_save_IFS=$IFS
25234 IFS=:
25235 set x $ac_tag
25236 IFS=$ac_save_IFS
25237 shift
25238 ac_file=$1
25239 shift
25240
25241 case $ac_mode in
25242 :L) ac_source=$1;;
25243 :[FH])
25244 ac_file_inputs=
25245 for ac_f
25246 do
25247 case $ac_f in
25248 -) ac_f="$tmp/stdin";;
25249 *) # Look for the file first in the build tree, then in the source tree
25250 # (if the path is not absolute). The absolute path cannot be DOS-style,
25251 # because $ac_f cannot contain `:'.
25252 test -f "$ac_f" ||
25253 case $ac_f in
25254 [\\/$]*) false;;
25255 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25256 esac ||
25257 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25258echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25259 { (exit 1); exit 1; }; };;
25260 esac
25261 ac_file_inputs="$ac_file_inputs $ac_f"
25262 done
25263
25264 # Let's still pretend it is `configure' which instantiates (i.e., don't
25265 # use $as_me), people would be surprised to read:
25266 # /* config.h. Generated by config.status. */
25267 configure_input="Generated from "`IFS=:
25268 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25269 if test x"$ac_file" != x-; then
25270 configure_input="$ac_file. $configure_input"
25271 { echo "$as_me:$LINENO: creating $ac_file" >&5
25272echo "$as_me: creating $ac_file" >&6;}
25273 fi
25274
25275 case $ac_tag in
25276 *:-:* | *:-) cat >"$tmp/stdin";;
25277 esac
25278 ;;
ba4481b5
DL
25279 esac
25280
ca81d7a0 25281 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25282$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25283 X"$ac_file" : 'X\(//\)[^/]' \| \
25284 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25285 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25286echo X"$ac_file" |
ca81d7a0
JD
25287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25288 s//\1/
25289 q
25290 }
25291 /^X\(\/\/\)[^/].*/{
25292 s//\1/
25293 q
25294 }
25295 /^X\(\/\/\)$/{
25296 s//\1/
25297 q
25298 }
25299 /^X\(\/\).*/{
25300 s//\1/
25301 q
25302 }
25303 s/.*/./; q'`
25304 { as_dir="$ac_dir"
25305 case $as_dir in #(
25306 -*) as_dir=./$as_dir;;
25307 esac
25308 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25309 as_dirs=
ca81d7a0
JD
25310 while :; do
25311 case $as_dir in #(
25312 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25313 *) as_qdir=$as_dir;;
25314 esac
25315 as_dirs="'$as_qdir' $as_dirs"
25316 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25317$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25318 X"$as_dir" : 'X\(//\)[^/]' \| \
25319 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25320 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25321echo X"$as_dir" |
ca81d7a0
JD
25322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25323 s//\1/
25324 q
25325 }
25326 /^X\(\/\/\)[^/].*/{
25327 s//\1/
25328 q
25329 }
25330 /^X\(\/\/\)$/{
25331 s//\1/
25332 q
25333 }
25334 /^X\(\/\).*/{
25335 s//\1/
25336 q
25337 }
25338 s/.*/./; q'`
25339 test -d "$as_dir" && break
6bae0ccf 25340 done
ca81d7a0
JD
25341 test -z "$as_dirs" || eval "mkdir $as_dirs"
25342 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25343echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25344 { (exit 1); exit 1; }; }; }
c0d27fcc 25345 ac_builddir=.
98418dba 25346
ca81d7a0
JD
25347case "$ac_dir" in
25348.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25349*)
c0d27fcc 25350 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25351 # A ".." for each directory in $ac_dir_suffix.
25352 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25353 case $ac_top_builddir_sub in
25354 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25355 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25356 esac ;;
25357esac
25358ac_abs_top_builddir=$ac_pwd
25359ac_abs_builddir=$ac_pwd$ac_dir_suffix
25360# for backward compatibility:
25361ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25362
25363case $srcdir in
ca81d7a0 25364 .) # We are building in place.
c0d27fcc 25365 ac_srcdir=.
ca81d7a0
JD
25366 ac_top_srcdir=$ac_top_builddir_sub
25367 ac_abs_top_srcdir=$ac_pwd ;;
25368 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25369 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25370 ac_top_srcdir=$srcdir
25371 ac_abs_top_srcdir=$srcdir ;;
25372 *) # Relative name.
25373 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25374 ac_top_srcdir=$ac_top_build_prefix$srcdir
25375 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25376esac
ca81d7a0 25377ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25378
c0d27fcc 25379
ca81d7a0
JD
25380 case $ac_mode in
25381 :F)
25382 #
25383 # CONFIG_FILE
25384 #
ba4481b5 25385
503d2be0
AS
25386 case $INSTALL in
25387 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25388 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25389 esac
ca81d7a0 25390_ACEOF
ba4481b5 25391
ca81d7a0
JD
25392cat >>$CONFIG_STATUS <<\_ACEOF
25393# If the template does not know about datarootdir, expand it.
25394# FIXME: This hack should be removed a few years after 2.60.
25395ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25396
ca81d7a0
JD
25397case `sed -n '/datarootdir/ {
25398 p
25399 q
25400}
25401/@datadir@/p
25402/@docdir@/p
25403/@infodir@/p
25404/@localedir@/p
25405/@mandir@/p
25406' $ac_file_inputs` in
25407*datarootdir*) ac_datarootdir_seen=yes;;
25408*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25409 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25410echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25411_ACEOF
ca81d7a0
JD
25412cat >>$CONFIG_STATUS <<_ACEOF
25413 ac_datarootdir_hack='
25414 s&@datadir@&$datadir&g
25415 s&@docdir@&$docdir&g
25416 s&@infodir@&$infodir&g
25417 s&@localedir@&$localedir&g
25418 s&@mandir@&$mandir&g
25419 s&\\\${datarootdir}&$datarootdir&g' ;;
25420esac
c0d27fcc 25421_ACEOF
ca81d7a0
JD
25422
25423# Neutralize VPATH when `$srcdir' = `.'.
25424# Shell code in configure.ac might set extrasub.
25425# FIXME: do we really want to maintain this feature?
c0d27fcc 25426cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25427 sed "$ac_vpsub
25428$extrasub
c0d27fcc
MR
25429_ACEOF
25430cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25431:t
25432/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25433s&@configure_input@&$configure_input&;t t
25434s&@top_builddir@&$ac_top_builddir_sub&;t t
25435s&@srcdir@&$ac_srcdir&;t t
25436s&@abs_srcdir@&$ac_abs_srcdir&;t t
25437s&@top_srcdir@&$ac_top_srcdir&;t t
25438s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25439s&@builddir@&$ac_builddir&;t t
25440s&@abs_builddir@&$ac_abs_builddir&;t t
25441s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25442s&@INSTALL@&$ac_INSTALL&;t t
25443$ac_datarootdir_hack
25444" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25445
25446test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25447 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25448 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25449 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25450which seems to be undefined. Please make sure it is defined." >&5
25451echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25452which seems to be undefined. Please make sure it is defined." >&2;}
25453
25454 rm -f "$tmp/stdin"
503d2be0 25455 case $ac_file in
ca81d7a0
JD
25456 -) cat "$tmp/out"; rm -f "$tmp/out";;
25457 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25458 esac
ca81d7a0
JD
25459 ;;
25460 :H)
25461 #
25462 # CONFIG_HEADER
25463 #
25464_ACEOF
25465
25466# Transform confdefs.h into a sed script `conftest.defines', that
25467# substitutes the proper values into config.h.in to produce config.h.
25468rm -f conftest.defines conftest.tail
25469# First, append a space to every undef/define line, to ease matching.
25470echo 's/$/ /' >conftest.defines
25471# Then, protect against being on the right side of a sed subst, or in
25472# an unquoted here document, in config.status. If some macros were
25473# called several times there might be several #defines for the same
25474# symbol, which is useless. But do not sort them, since the last
25475# AC_DEFINE must be honored.
25476ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25477# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25478# NAME is the cpp macro being defined, VALUE is the value it is being given.
25479# PARAMS is the parameter list in the macro definition--in most cases, it's
25480# just an empty string.
25481ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25482ac_dB='\\)[ (].*,\\1define\\2'
25483ac_dC=' '
25484ac_dD=' ,'
25485
25486uniq confdefs.h |
25487 sed -n '
25488 t rset
25489 :rset
25490 s/^[ ]*#[ ]*define[ ][ ]*//
25491 t ok
25492 d
25493 :ok
25494 s/[\\&,]/\\&/g
25495 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25496 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25497 ' >>conftest.defines
25498
25499# Remove the space that was appended to ease matching.
25500# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25501# example, in the case of _POSIX_SOURCE, which is predefined and required
25502# on some systems where configure will not decide to define it.
ca81d7a0
JD
25503# (The regexp can be short, since the line contains either #define or #undef.)
25504echo 's/ $//
25505s,^[ #]*u.*,/* & */,' >>conftest.defines
25506
25507# Break up conftest.defines:
25508ac_max_sed_lines=50
25509
25510# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25511# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25512# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25513# et cetera.
25514ac_in='$ac_file_inputs'
25515ac_out='"$tmp/out1"'
25516ac_nxt='"$tmp/out2"'
25517
25518while :
503d2be0 25519do
ca81d7a0
JD
25520 # Write a here document:
25521 cat >>$CONFIG_STATUS <<_ACEOF
25522 # First, check the format of the line:
25523 cat >"\$tmp/defines.sed" <<\\CEOF
25524/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25525/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25526b
25527:def
25528_ACEOF
25529 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25530 echo 'CEOF
ca81d7a0
JD
25531 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25532 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25533 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25534 grep . conftest.tail >/dev/null || break
503d2be0
AS
25535 rm -f conftest.defines
25536 mv conftest.tail conftest.defines
25537done
ca81d7a0 25538rm -f conftest.defines conftest.tail
503d2be0 25539
ca81d7a0 25540echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25541cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25542 if test x"$ac_file" != x-; then
ca81d7a0
JD
25543 echo "/* $configure_input */" >"$tmp/config.h"
25544 cat "$ac_result" >>"$tmp/config.h"
25545 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25546 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25547echo "$as_me: $ac_file is unchanged" >&6;}
25548 else
503d2be0 25549 rm -f $ac_file
ca81d7a0 25550 mv "$tmp/config.h" $ac_file
ba4481b5 25551 fi
503d2be0 25552 else
ca81d7a0
JD
25553 echo "/* $configure_input */"
25554 cat "$ac_result"
ba4481b5 25555 fi
ca81d7a0
JD
25556 rm -f "$tmp/out12"
25557 ;;
edfaf76d 25558
ca81d7a0
JD
25559 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25560echo "$as_me: executing $ac_file commands" >&6;}
25561 ;;
25562 esac
ba4481b5 25563
c0d27fcc 25564
ca81d7a0
JD
25565 case $ac_file$ac_mode in
25566 "default":C)
ba4481b5
DL
25567
25568### Make the necessary directories, if they don't exist.
25569for dir in etc lisp ; do
25570 test -d ${dir} || mkdir ${dir}
25571done
25572
25573# Build src/Makefile from ${srcdir}/src/Makefile.c
25574# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25575# This must be done after src/config.h is built, since we rely on that file.
25576
ba4481b5 25577echo creating src/epaths.h
4aa6b955 25578${MAKE-make} epaths-force
ba4481b5 25579
1c203d4c
DL
25580# As of 2000-11-19, newest development versions of GNU cpp preprocess
25581# `..' to `. .' unless invoked with -traditional
25582
d0e9bfd2 25583if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25584 CPPFLAGS="$CPPFLAGS -traditional"
25585fi
25586
ba4481b5
DL
25587echo creating lib-src/Makefile
25588( cd lib-src
25589 rm -f junk.c junk1.c junk2.c
25590 sed -e '/start of cpp stuff/q' \
25591 < Makefile.c > junk1.c
25592 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25593 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25594 < Makefile.c > junk.c
8acdcf6f 25595 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25596 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25597 cat junk1.c junk2.c > Makefile.new
25598 rm -f junk.c junk1.c junk2.c
25599 chmod 444 Makefile.new
25600 mv -f Makefile.new Makefile
25601)
25602
25603echo creating src/Makefile
25604( cd src
25605 rm -f junk.c junk1.c junk2.c
25606 sed -e '/start of cpp stuff/q' \
25607 < Makefile.c > junk1.c
25608 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25609 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25610 < Makefile.c > junk.c
8acdcf6f 25611 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25612 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25613 cat junk1.c junk2.c > Makefile.new
25614 rm -f junk.c junk1.c junk2.c
25615 chmod 444 Makefile.new
25616 mv -f Makefile.new Makefile
25617)
25618
503d2be0 25619if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25620 echo creating src/.gdbinit
503d2be0 25621 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25622fi
25623
503d2be0 25624 ;;
ca81d7a0 25625
503d2be0 25626 esac
ca81d7a0 25627done # for ac_tag
503d2be0 25628
ba4481b5 25629
503d2be0 25630{ (exit 0); exit 0; }
c0d27fcc 25631_ACEOF
ba4481b5 25632chmod +x $CONFIG_STATUS
503d2be0
AS
25633ac_clean_files=$ac_clean_files_save
25634
c0d27fcc 25635
503d2be0
AS
25636# configure is writing to config.log, and then calls config.status.
25637# config.status does its own redirection, appending to config.log.
25638# Unfortunately, on DOS this fails, as config.log is still kept open
25639# by configure, so config.status won't be able to write to it; its
25640# output is simply discarded. So we exec the FD to /dev/null,
25641# effectively closing config.log, so it can be properly (re)opened and
25642# appended to by config.status. When coming back to configure, we
25643# need to make the FD available again.
25644if test "$no_create" != yes; then
25645 ac_cs_success=:
19650fd6
AS
25646 ac_config_status_args=
25647 test "$silent" = yes &&
25648 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25649 exec 5>/dev/null
19650fd6 25650 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25651 exec 5>>config.log
25652 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25653 # would make configure fail if this is the last instruction.
25654 $ac_cs_success || { (exit 1); exit 1; }
25655fi
f5f47add 25656
c0d27fcc 25657