(clipboard-yank): avoid checking (x-selection-exists-p) if unbound in
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
b0448899 3# Generated by GNU Autoconf 2.61 for emacs 23.0.91.
ba4481b5 4#
ca81d7a0 5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
b0448899 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=:
b0448899 18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
6bae0ccf
DL
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
1e0093ea
MB
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
b0448899
CY
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.)
b0448899
CY
66as_nl='
67'
ca81d7a0
JD
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
b0448899 90 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ca81d7a0
JD
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.
b0448899
CY
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
107do
108 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109 eval $as_var=C; export $as_var
110 else
111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112 fi
113done
6bae0ccf
DL
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 ||
b0448899 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
b0448899 161 if test $as_have_required = yes && (eval ":
ca81d7a0
JD
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=:
b0448899 243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
ca81d7a0
JD
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=:
b0448899 264 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
ca81d7a0
JD
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
b0448899
CY
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+"$@"}
ca81d7a0
JD
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 415 echo No shell found that supports shell functions.
b0448899
CY
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" ||
b0448899 454 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
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
b0448899 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
b0448899
CY
495 mkdir conf$$.dir
496fi
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
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'
b0448899
CY
506elif ln conf$$.file conf$$ 2>/dev/null; then
507 as_ln_s=ln
503d2be0
AS
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
b0448899 532 test -d "$1/.";
f053c89f
CY
533 else
534 case $1 in
b0448899 535 -*)set "./$1";;
f053c89f
CY
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'
fa35ec36
CY
575PACKAGE_VERSION='23.0.91'
576PACKAGE_STRING='emacs 23.0.91'
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=
b0448899 619ac_subst_vars='SHELL
1e0093ea 620PATH_SEPARATOR
b0448899
CY
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
682MAKEINFO
683LIBSOUND
684PKG_CONFIG
685ALSA_CFLAGS
686ALSA_LIBS
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
690HAVE_XSERVER
691RSVG_CFLAGS
692RSVG_LIBS
693GTK_CFLAGS
694GTK_LIBS
695DBUS_CFLAGS
696DBUS_LIBS
697FONTCONFIG_CFLAGS
698FONTCONFIG_LIBS
699XFT_CFLAGS
700XFT_LIBS
701FREETYPE_CFLAGS
702FREETYPE_LIBS
703LIBOTF_CFLAGS
704LIBOTF_LIBS
705M17N_FLT_CFLAGS
706M17N_FLT_LIBS
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
736ns_appdir
737ns_appbindir
738ns_appresdir
739ns_appsrc
740GNUSTEP_MAKEFILES
741GNUSTEP_SYSTEM_HEADERS
742GNUSTEP_SYSTEM_LIBRARIES
743GNU_OBJC_CFLAGS
744LIB_SRC_EXTRA_INSTALLABLES
745LTLIBOBJS'
6bae0ccf 746ac_subst_files=''
ca81d7a0
JD
747 ac_precious_vars='build_alias
748host_alias
749target_alias
750CC
751CFLAGS
752LDFLAGS
f053c89f 753LIBS
ca81d7a0
JD
754CPPFLAGS
755CPP
756XMKMF'
757
c0d27fcc 758
ba4481b5 759# Initialize some variables set by options.
503d2be0
AS
760ac_init_help=
761ac_init_version=false
ba4481b5
DL
762# The variables have the same names as the options, with
763# dashes changed to underlines.
503d2be0 764cache_file=/dev/null
ba4481b5 765exec_prefix=NONE
ba4481b5 766no_create=
ba4481b5
DL
767no_recursion=
768prefix=NONE
769program_prefix=NONE
770program_suffix=NONE
771program_transform_name=s,x,x,
772silent=
773site=
774srcdir=
ba4481b5
DL
775verbose=
776x_includes=NONE
777x_libraries=NONE
503d2be0
AS
778
779# Installation directory options.
780# These are left unexpanded so users can "make install exec_prefix=/foo"
781# and all the variables that are supposed to be based on exec_prefix
782# by default will actually change.
783# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 784# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
785bindir='${exec_prefix}/bin'
786sbindir='${exec_prefix}/sbin'
787libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
788datarootdir='${prefix}/share'
789datadir='${datarootdir}'
ba4481b5
DL
790sysconfdir='${prefix}/etc'
791sharedstatedir='${prefix}/com'
792localstatedir='${prefix}/var'
ba4481b5
DL
793includedir='${prefix}/include'
794oldincludedir='/usr/include'
9cf8f393 795docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
796infodir='${datarootdir}/info'
797htmldir='${docdir}'
798dvidir='${docdir}'
799pdfdir='${docdir}'
800psdir='${docdir}'
801libdir='${exec_prefix}/lib'
802localedir='${datarootdir}/locale'
803mandir='${datarootdir}/man'
ba4481b5 804
ba4481b5 805ac_prev=
ca81d7a0 806ac_dashdash=
ba4481b5
DL
807for ac_option
808do
ba4481b5
DL
809 # If the previous option needs an argument, assign it.
810 if test -n "$ac_prev"; then
ca81d7a0 811 eval $ac_prev=\$ac_option
ba4481b5
DL
812 ac_prev=
813 continue
814 fi
815
ca81d7a0
JD
816 case $ac_option in
817 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
818 *) ac_optarg=yes ;;
819 esac
ba4481b5
DL
820
821 # Accept the important Cygnus configure options, so we can diagnose typos.
822
ca81d7a0
JD
823 case $ac_dashdash$ac_option in
824 --)
825 ac_dashdash=yes ;;
ba4481b5
DL
826
827 -bindir | --bindir | --bindi | --bind | --bin | --bi)
828 ac_prev=bindir ;;
829 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 830 bindir=$ac_optarg ;;
ba4481b5
DL
831
832 -build | --build | --buil | --bui | --bu)
503d2be0 833 ac_prev=build_alias ;;
ba4481b5 834 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 835 build_alias=$ac_optarg ;;
ba4481b5
DL
836
837 -cache-file | --cache-file | --cache-fil | --cache-fi \
838 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
839 ac_prev=cache_file ;;
840 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
841 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
842 cache_file=$ac_optarg ;;
843
844 --config-cache | -C)
845 cache_file=config.cache ;;
ba4481b5 846
ca81d7a0 847 -datadir | --datadir | --datadi | --datad)
ba4481b5 848 ac_prev=datadir ;;
ca81d7a0 849 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 850 datadir=$ac_optarg ;;
ba4481b5 851
ca81d7a0
JD
852 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
853 | --dataroo | --dataro | --datar)
854 ac_prev=datarootdir ;;
855 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
856 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
857 datarootdir=$ac_optarg ;;
858
ba4481b5 859 -disable-* | --disable-*)
b0448899 860 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 861 # Reject names that are not valid shell variable names.
b0448899
CY
862 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
863 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
503d2be0 864 { (exit 1); exit 1; }; }
b0448899
CY
865 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
866 eval enable_$ac_feature=no ;;
ca81d7a0
JD
867
868 -docdir | --docdir | --docdi | --doc | --do)
869 ac_prev=docdir ;;
870 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
871 docdir=$ac_optarg ;;
872
873 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
874 ac_prev=dvidir ;;
875 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
876 dvidir=$ac_optarg ;;
ba4481b5
DL
877
878 -enable-* | --enable-*)
b0448899 879 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 880 # Reject names that are not valid shell variable names.
b0448899
CY
881 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
882 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
503d2be0 883 { (exit 1); exit 1; }; }
b0448899
CY
884 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
885 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
886
887 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
888 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
889 | --exec | --exe | --ex)
890 ac_prev=exec_prefix ;;
891 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
892 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
893 | --exec=* | --exe=* | --ex=*)
503d2be0 894 exec_prefix=$ac_optarg ;;
ba4481b5
DL
895
896 -gas | --gas | --ga | --g)
897 # Obsolete; use --with-gas.
898 with_gas=yes ;;
899
503d2be0
AS
900 -help | --help | --hel | --he | -h)
901 ac_init_help=long ;;
902 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
903 ac_init_help=recursive ;;
904 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
905 ac_init_help=short ;;
ba4481b5
DL
906
907 -host | --host | --hos | --ho)
503d2be0 908 ac_prev=host_alias ;;
ba4481b5 909 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 910 host_alias=$ac_optarg ;;
ba4481b5 911
ca81d7a0
JD
912 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
913 ac_prev=htmldir ;;
914 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
915 | --ht=*)
916 htmldir=$ac_optarg ;;
917
ba4481b5
DL
918 -includedir | --includedir | --includedi | --included | --include \
919 | --includ | --inclu | --incl | --inc)
920 ac_prev=includedir ;;
921 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
922 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 923 includedir=$ac_optarg ;;
ba4481b5
DL
924
925 -infodir | --infodir | --infodi | --infod | --info | --inf)
926 ac_prev=infodir ;;
927 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 928 infodir=$ac_optarg ;;
ba4481b5
DL
929
930 -libdir | --libdir | --libdi | --libd)
931 ac_prev=libdir ;;
932 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 933 libdir=$ac_optarg ;;
ba4481b5
DL
934
935 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
936 | --libexe | --libex | --libe)
937 ac_prev=libexecdir ;;
938 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
939 | --libexe=* | --libex=* | --libe=*)
503d2be0 940 libexecdir=$ac_optarg ;;
ba4481b5 941
ca81d7a0
JD
942 -localedir | --localedir | --localedi | --localed | --locale)
943 ac_prev=localedir ;;
944 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
945 localedir=$ac_optarg ;;
946
ba4481b5 947 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 948 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
949 ac_prev=localstatedir ;;
950 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 951 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 952 localstatedir=$ac_optarg ;;
ba4481b5
DL
953
954 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
955 ac_prev=mandir ;;
956 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 957 mandir=$ac_optarg ;;
ba4481b5
DL
958
959 -nfp | --nfp | --nf)
960 # Obsolete; use --without-fp.
961 with_fp=no ;;
962
963 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 964 | --no-cr | --no-c | -n)
ba4481b5
DL
965 no_create=yes ;;
966
967 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
968 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
969 no_recursion=yes ;;
970
971 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
972 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
973 | --oldin | --oldi | --old | --ol | --o)
974 ac_prev=oldincludedir ;;
975 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
976 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
977 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 978 oldincludedir=$ac_optarg ;;
ba4481b5
DL
979
980 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
981 ac_prev=prefix ;;
982 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 983 prefix=$ac_optarg ;;
ba4481b5
DL
984
985 -program-prefix | --program-prefix | --program-prefi | --program-pref \
986 | --program-pre | --program-pr | --program-p)
987 ac_prev=program_prefix ;;
988 -program-prefix=* | --program-prefix=* | --program-prefi=* \
989 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 990 program_prefix=$ac_optarg ;;
ba4481b5
DL
991
992 -program-suffix | --program-suffix | --program-suffi | --program-suff \
993 | --program-suf | --program-su | --program-s)
994 ac_prev=program_suffix ;;
995 -program-suffix=* | --program-suffix=* | --program-suffi=* \
996 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 997 program_suffix=$ac_optarg ;;
ba4481b5
DL
998
999 -program-transform-name | --program-transform-name \
1000 | --program-transform-nam | --program-transform-na \
1001 | --program-transform-n | --program-transform- \
1002 | --program-transform | --program-transfor \
1003 | --program-transfo | --program-transf \
1004 | --program-trans | --program-tran \
1005 | --progr-tra | --program-tr | --program-t)
1006 ac_prev=program_transform_name ;;
1007 -program-transform-name=* | --program-transform-name=* \
1008 | --program-transform-nam=* | --program-transform-na=* \
1009 | --program-transform-n=* | --program-transform-=* \
1010 | --program-transform=* | --program-transfor=* \
1011 | --program-transfo=* | --program-transf=* \
1012 | --program-trans=* | --program-tran=* \
1013 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1014 program_transform_name=$ac_optarg ;;
ba4481b5 1015
ca81d7a0
JD
1016 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1017 ac_prev=pdfdir ;;
1018 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1019 pdfdir=$ac_optarg ;;
1020
1021 -psdir | --psdir | --psdi | --psd | --ps)
1022 ac_prev=psdir ;;
1023 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1024 psdir=$ac_optarg ;;
1025
ba4481b5
DL
1026 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1027 | -silent | --silent | --silen | --sile | --sil)
1028 silent=yes ;;
1029
1030 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1031 ac_prev=sbindir ;;
1032 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1033 | --sbi=* | --sb=*)
503d2be0 1034 sbindir=$ac_optarg ;;
ba4481b5
DL
1035
1036 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1037 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1038 | --sharedst | --shareds | --shared | --share | --shar \
1039 | --sha | --sh)
1040 ac_prev=sharedstatedir ;;
1041 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1042 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1043 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1044 | --sha=* | --sh=*)
503d2be0 1045 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1046
1047 -site | --site | --sit)
1048 ac_prev=site ;;
1049 -site=* | --site=* | --sit=*)
503d2be0 1050 site=$ac_optarg ;;
ba4481b5
DL
1051
1052 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1053 ac_prev=srcdir ;;
1054 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1055 srcdir=$ac_optarg ;;
ba4481b5
DL
1056
1057 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1058 | --syscon | --sysco | --sysc | --sys | --sy)
1059 ac_prev=sysconfdir ;;
1060 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1061 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1062 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1063
1064 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1065 ac_prev=target_alias ;;
ba4481b5 1066 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1067 target_alias=$ac_optarg ;;
ba4481b5
DL
1068
1069 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1070 verbose=yes ;;
1071
503d2be0
AS
1072 -version | --version | --versio | --versi | --vers | -V)
1073 ac_init_version=: ;;
ba4481b5
DL
1074
1075 -with-* | --with-*)
b0448899 1076 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1077 # Reject names that are not valid shell variable names.
b0448899
CY
1078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1079 { echo "$as_me: error: invalid package name: $ac_package" >&2
503d2be0 1080 { (exit 1); exit 1; }; }
b0448899
CY
1081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1083
1084 -without-* | --without-*)
b0448899 1085 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1086 # Reject names that are not valid shell variable names.
b0448899
CY
1087 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1088 { echo "$as_me: error: invalid package name: $ac_package" >&2
503d2be0 1089 { (exit 1); exit 1; }; }
b0448899
CY
1090 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1091 eval with_$ac_package=no ;;
ba4481b5
DL
1092
1093 --x)
1094 # Obsolete; use --with-x.
1095 with_x=yes ;;
1096
1097 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1098 | --x-incl | --x-inc | --x-in | --x-i)
1099 ac_prev=x_includes ;;
1100 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1101 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1102 x_includes=$ac_optarg ;;
ba4481b5
DL
1103
1104 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1105 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1106 ac_prev=x_libraries ;;
1107 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1108 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1109 x_libraries=$ac_optarg ;;
ba4481b5 1110
b0448899 1111 -*) { echo "$as_me: error: unrecognized option: $ac_option
503d2be0
AS
1112Try \`$0 --help' for more information." >&2
1113 { (exit 1); exit 1; }; }
ba4481b5
DL
1114 ;;
1115
503d2be0
AS
1116 *=*)
1117 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1118 # Reject names that are not valid shell variable names.
1119 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
b0448899 1120 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
503d2be0 1121 { (exit 1); exit 1; }; }
ca81d7a0 1122 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1123 export $ac_envvar ;;
1124
ba4481b5 1125 *)
503d2be0 1126 # FIXME: should be removed in autoconf 3.0.
b0448899 1127 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
503d2be0 1128 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
b0448899 1129 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503d2be0 1130 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1131 ;;
1132
1133 esac
1134done
1135
1136if test -n "$ac_prev"; then
503d2be0 1137 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
b0448899 1138 { echo "$as_me: error: missing argument to $ac_option" >&2
503d2be0 1139 { (exit 1); exit 1; }; }
ba4481b5 1140fi
ba4481b5 1141
b0448899 1142# Be sure to have absolute directory names.
ca81d7a0
JD
1143for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1144 datadir sysconfdir sharedstatedir localstatedir includedir \
1145 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1146 libdir localedir mandir
ba4481b5 1147do
ca81d7a0 1148 eval ac_val=\$$ac_var
503d2be0 1149 case $ac_val in
ca81d7a0
JD
1150 [\\/$]* | ?:[\\/]* ) continue;;
1151 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1152 esac
b0448899 1153 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
ca81d7a0 1154 { (exit 1); exit 1; }; }
ba4481b5
DL
1155done
1156
503d2be0
AS
1157# There might be people who depend on the old broken behavior: `$host'
1158# used to hold the argument of --host etc.
c0d27fcc 1159# FIXME: To remove some day.
503d2be0
AS
1160build=$build_alias
1161host=$host_alias
1162target=$target_alias
1163
c0d27fcc 1164# FIXME: To remove some day.
503d2be0
AS
1165if test "x$host_alias" != x; then
1166 if test "x$build_alias" = x; then
1167 cross_compiling=maybe
b0448899 1168 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
503d2be0
AS
1169 If a cross compiler is detected then cross compile mode will be used." >&2
1170 elif test "x$build_alias" != "x$host_alias"; then
1171 cross_compiling=yes
1172 fi
1173fi
ba4481b5 1174
503d2be0
AS
1175ac_tool_prefix=
1176test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1177
503d2be0 1178test "$silent" = yes && exec 6>/dev/null
ba4481b5 1179
c0d27fcc 1180
ca81d7a0
JD
1181ac_pwd=`pwd` && test -n "$ac_pwd" &&
1182ac_ls_di=`ls -di .` &&
1183ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
b0448899 1184 { echo "$as_me: error: Working directory cannot be determined" >&2
ca81d7a0
JD
1185 { (exit 1); exit 1; }; }
1186test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
b0448899 1187 { echo "$as_me: error: pwd does not report name of working directory" >&2
ca81d7a0
JD
1188 { (exit 1); exit 1; }; }
1189
1190
ba4481b5
DL
1191# Find the source files, if location was not specified.
1192if test -z "$srcdir"; then
1193 ac_srcdir_defaulted=yes
ca81d7a0 1194 # Try the directory containing this script, then the parent directory.
b0448899
CY
1195 ac_confdir=`$as_dirname -- "$0" ||
1196$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1197 X"$0" : 'X\(//\)[^/]' \| \
1198 X"$0" : 'X\(//\)$' \| \
1199 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1200echo X"$0" |
ca81d7a0
JD
1201 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\/\)[^/].*/{
1206 s//\1/
1207 q
1208 }
1209 /^X\(\/\/\)$/{
1210 s//\1/
1211 q
1212 }
1213 /^X\(\/\).*/{
1214 s//\1/
1215 q
1216 }
1217 s/.*/./; q'`
ba4481b5 1218 srcdir=$ac_confdir
ca81d7a0 1219 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1220 srcdir=..
1221 fi
1222else
1223 ac_srcdir_defaulted=no
1224fi
ca81d7a0
JD
1225if test ! -r "$srcdir/$ac_unique_file"; then
1226 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
b0448899 1227 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1228 { (exit 1); exit 1; }; }
ba4481b5 1229fi
ca81d7a0
JD
1230ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1231ac_abs_confdir=`(
b0448899 1232 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1233 { (exit 1); exit 1; }; }
ca81d7a0
JD
1234 pwd)`
1235# When building in place, set srcdir=.
1236if test "$ac_abs_confdir" = "$ac_pwd"; then
1237 srcdir=.
1238fi
1239# Remove unnecessary trailing slashes from srcdir.
1240# Double slashes in file names in object file debugging info
1241# mess up M-x gdb in Emacs.
1242case $srcdir in
1243*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1244esac
1245for ac_var in $ac_precious_vars; do
1246 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1247 eval ac_env_${ac_var}_value=\$${ac_var}
1248 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1249 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1250done
503d2be0
AS
1251
1252#
1253# Report the --help message.
1254#
1255if test "$ac_init_help" = "long"; then
1256 # Omit some internal or obsolete options to make the list less imposing.
1257 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1258 cat <<_ACEOF
fa35ec36 1259\`configure' configures emacs 23.0.91 to adapt to many kinds of systems.
503d2be0
AS
1260
1261Usage: $0 [OPTION]... [VAR=VALUE]...
1262
1263To assign environment variables (e.g., CC, CFLAGS...), specify them as
1264VAR=VALUE. See below for descriptions of some of the useful variables.
1265
1266Defaults for the options are specified in brackets.
1267
1268Configuration:
1269 -h, --help display this help and exit
1270 --help=short display options specific to this package
1271 --help=recursive display the short help of all the included packages
1272 -V, --version display version information and exit
1273 -q, --quiet, --silent do not print \`checking...' messages
1274 --cache-file=FILE cache test results in FILE [disabled]
1275 -C, --config-cache alias for \`--cache-file=config.cache'
1276 -n, --no-create do not create output files
1277 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1278
503d2be0
AS
1279Installation directories:
1280 --prefix=PREFIX install architecture-independent files in PREFIX
b0448899 1281 [$ac_default_prefix]
503d2be0 1282 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
b0448899 1283 [PREFIX]
503d2be0
AS
1284
1285By default, \`make install' will install all the files in
1286\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1287an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1288for instance \`--prefix=\$HOME'.
1289
1290For better control, use the options below.
1291
1292Fine tuning of the installation directories:
b0448899
CY
1293 --bindir=DIR user executables [EPREFIX/bin]
1294 --sbindir=DIR system admin executables [EPREFIX/sbin]
1295 --libexecdir=DIR program executables [EPREFIX/libexec]
1296 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1297 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1298 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1299 --libdir=DIR object code libraries [EPREFIX/lib]
1300 --includedir=DIR C header files [PREFIX/include]
1301 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1302 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1303 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1304 --infodir=DIR info documentation [DATAROOTDIR/info]
1305 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1306 --mandir=DIR man documentation [DATAROOTDIR/man]
1307 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1308 --htmldir=DIR html documentation [DOCDIR]
1309 --dvidir=DIR dvi documentation [DOCDIR]
1310 --pdfdir=DIR pdf documentation [DOCDIR]
1311 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1312_ACEOF
503d2be0 1313
c0d27fcc 1314 cat <<\_ACEOF
503d2be0 1315
ba5da88a
PJ
1316Program names:
1317 --program-prefix=PREFIX prepend PREFIX to installed program names
1318 --program-suffix=SUFFIX append SUFFIX to installed program names
1319 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1320
503d2be0
AS
1321X features:
1322 --x-includes=DIR X include files are in DIR
1323 --x-libraries=DIR X library files are in DIR
1324
1325System types:
1326 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1327 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1328_ACEOF
503d2be0
AS
1329fi
1330
1331if test -n "$ac_init_help"; then
9cf8f393 1332 case $ac_init_help in
fa35ec36 1333 short | recursive ) echo "Configuration of emacs 23.0.91:";;
9cf8f393 1334 esac
c0d27fcc 1335 cat <<\_ACEOF
503d2be0
AS
1336
1337Optional Features:
1338 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1339 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6b8bc489
AS
1340 --disable-ns-self-contained
1341 disable self contained build under NeXTstep
d0098f13 1342 --enable-asserts compile code with asserts enabled
709e90de
AS
1343 --enable-maintainer-mode
1344 enable make rules and dependencies not useful (and
1345 sometimes confusing) to the casual installer
9adfabc2
LK
1346 --enable-locallisppath=PATH
1347 directories Emacs should search for lisp files
1348 specific to this site
503d2be0
AS
1349 --disable-largefile omit support for large files
1350
1351Optional Packages:
1352 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1353 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1354 --without-pop don't support POP mail retrieval with movemail
1355 --with-kerberos support Kerberos-authenticated POP
1356 --with-kerberos5 support Kerberos version 5 authenticated POP
1357 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1358 --without-sound don't compile with sound support
ecd43cb9 1359 --without-sync-input process async input synchronously
49adb60f
TTN
1360 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1361 motif, gtk, no)
c8467c40
GM
1362 --without-xpm don't compile with XPM image support
1363 --without-jpeg don't compile with JPEG image support
1364 --without-tiff don't compile with TIFF image support
1365 --without-gif don't compile with GIF image support
1366 --without-png don't compile with PNG image support
1367 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1368 --without-freetype don't use Freetype for local font support
1369 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1370 --without-libotf don't use libotf for OpenType font support
1371 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1372 --without-toolkit-scroll-bars
cc227489 1373 don't use Motif or Xaw3d scroll bars
c982cf7d 1374 --without-xaw3d don't use Xaw3d
cc227489 1375 --without-xim don't use X11 XIM
edfda783 1376 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1377 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1378 console
b5a922de 1379 --without-dbus don't compile with D-Bus support
921fbdf0 1380 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1381
00b9c927 1382 --with-pkg-config-prog=PATH
ecd43cb9
GM
1383 path to pkg-config for finding GTK and librsvg
1384 --with-gnustep-conf=PATH
1385 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1386 or /etc/GNUstep/GNUstep.conf
503d2be0
AS
1387 --with-x use the X Window System
1388
1389Some influential environment variables:
1390 CC C compiler command
1391 CFLAGS C compiler flags
1392 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1393 nonstandard directory <lib dir>
f053c89f 1394 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1395 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1396 you have headers in a nonstandard directory <include dir>
503d2be0 1397 CPP C preprocessor
ca81d7a0 1398 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1399
1400Use these variables to override the choices made by `configure' or to help
1401it to find libraries and programs with nonstandard names/locations.
1402
c0d27fcc 1403_ACEOF
ca81d7a0 1404ac_status=$?
503d2be0
AS
1405fi
1406
1407if test "$ac_init_help" = "recursive"; then
1408 # If there are subdirs, report their specific --help.
c0d27fcc 1409 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b0448899 1410 test -d "$ac_dir" || continue
c0d27fcc
MR
1411 ac_builddir=.
1412
ca81d7a0
JD
1413case "$ac_dir" in
1414.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1415*)
b0448899 1416 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0 1417 # A ".." for each directory in $ac_dir_suffix.
b0448899 1418 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
ca81d7a0
JD
1419 case $ac_top_builddir_sub in
1420 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1421 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1422 esac ;;
1423esac
1424ac_abs_top_builddir=$ac_pwd
1425ac_abs_builddir=$ac_pwd$ac_dir_suffix
1426# for backward compatibility:
1427ac_top_builddir=$ac_top_build_prefix
503d2be0 1428
c0d27fcc 1429case $srcdir in
ca81d7a0 1430 .) # We are building in place.
c0d27fcc 1431 ac_srcdir=.
ca81d7a0
JD
1432 ac_top_srcdir=$ac_top_builddir_sub
1433 ac_abs_top_srcdir=$ac_pwd ;;
1434 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1435 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1436 ac_top_srcdir=$srcdir
1437 ac_abs_top_srcdir=$srcdir ;;
1438 *) # Relative name.
1439 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1440 ac_top_srcdir=$ac_top_build_prefix$srcdir
1441 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1442esac
ca81d7a0
JD
1443ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1444
1445 cd "$ac_dir" || { ac_status=$?; continue; }
1446 # Check for guested configure.
1447 if test -f "$ac_srcdir/configure.gnu"; then
1448 echo &&
1449 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1450 elif test -f "$ac_srcdir/configure"; then
1451 echo &&
1452 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1453 else
b0448899 1454 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1455 fi || ac_status=$?
1456 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1457 done
1458fi
1459
ca81d7a0 1460test -n "$ac_init_help" && exit $ac_status
503d2be0 1461if $ac_init_version; then
c0d27fcc 1462 cat <<\_ACEOF
fa35ec36 1463emacs configure 23.0.91
b0448899 1464generated by GNU Autoconf 2.61
503d2be0 1465
ca81d7a0 1466Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
b0448899 14672002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1468This configure script is free software; the Free Software Foundation
1469gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1470_ACEOF
ca81d7a0 1471 exit
503d2be0 1472fi
ca81d7a0 1473cat >config.log <<_ACEOF
503d2be0
AS
1474This file contains any messages produced by compilers while
1475running configure, to aid debugging if configure makes a mistake.
1476
fa35ec36 1477It was created by emacs $as_me 23.0.91, which was
b0448899 1478generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1479
1480 $ $0 $@
1481
c0d27fcc 1482_ACEOF
ca81d7a0 1483exec 5>>config.log
503d2be0
AS
1484{
1485cat <<_ASUNAME
c0d27fcc
MR
1486## --------- ##
1487## Platform. ##
1488## --------- ##
503d2be0
AS
1489
1490hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1491uname -m = `(uname -m) 2>/dev/null || echo unknown`
1492uname -r = `(uname -r) 2>/dev/null || echo unknown`
1493uname -s = `(uname -s) 2>/dev/null || echo unknown`
1494uname -v = `(uname -v) 2>/dev/null || echo unknown`
1495
1496/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1497/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1498
1499/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1500/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1501/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1502/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1503/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1504/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1505/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1506
925c2f3f 1507_ASUNAME
c0d27fcc
MR
1508
1509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1510for as_dir in $PATH
1511do
1512 IFS=$as_save_IFS
1513 test -z "$as_dir" && as_dir=.
b0448899 1514 echo "PATH: $as_dir"
c0d27fcc 1515done
ca81d7a0 1516IFS=$as_save_IFS
c0d27fcc 1517
503d2be0
AS
1518} >&5
1519
c0d27fcc
MR
1520cat >&5 <<_ACEOF
1521
1522
1523## ----------- ##
1524## Core tests. ##
1525## ----------- ##
1526
1527_ACEOF
503d2be0 1528
503d2be0
AS
1529
1530# Keep a trace of the command line.
1531# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1532# Strip out --silent because we don't want to record it for future runs.
503d2be0 1533# Also quote any args containing shell meta-characters.
19650fd6 1534# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1535ac_configure_args=
19650fd6
AS
1536ac_configure_args0=
1537ac_configure_args1=
19650fd6
AS
1538ac_must_keep_next=false
1539for ac_pass in 1 2
503d2be0 1540do
19650fd6
AS
1541 for ac_arg
1542 do
1543 case $ac_arg in
1544 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1545 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1546 | -silent | --silent | --silen | --sile | --sil)
1547 continue ;;
ca81d7a0 1548 *\'*)
b0448899 1549 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19650fd6
AS
1550 esac
1551 case $ac_pass in
1552 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1553 2)
1554 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1555 if test $ac_must_keep_next = true; then
edfaf76d 1556 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1557 else
edfaf76d
LK
1558 case $ac_arg in
1559 *=* | --config-cache | -C | -disable-* | --disable-* \
1560 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1561 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1562 | -with-* | --with-* | -without-* | --without-* | --x)
1563 case "$ac_configure_args0 " in
1564 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1565 esac
1566 ;;
1567 -* ) ac_must_keep_next=true ;;
1568 esac
19650fd6 1569 fi
ca81d7a0 1570 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1571 ;;
1572 esac
1573 done
503d2be0 1574done
19650fd6
AS
1575$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1576$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1577
1578# When interrupted or exit'd, cleanup temporary files, and complete
1579# config.log. We remove comments because anyway the quotes in there
1580# would cause problems or look ugly.
ca81d7a0
JD
1581# WARNING: Use '\'' to represent an apostrophe within the trap.
1582# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1583trap 'exit_status=$?
1584 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1585 {
1586 echo
6bae0ccf 1587
c0d27fcc
MR
1588 cat <<\_ASBOX
1589## ---------------- ##
1590## Cache variables. ##
1591## ---------------- ##
1592_ASBOX
1593 echo
1594 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1595(
1596 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1597 eval ac_val=\$$ac_var
1598 case $ac_val in #(
1599 *${as_nl}*)
1600 case $ac_var in #(
b0448899
CY
1601 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1602echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
ca81d7a0
JD
1603 esac
1604 case $ac_var in #(
1605 _ | IFS | as_nl) ;; #(
1606 *) $as_unset $ac_var ;;
1607 esac ;;
1608 esac
1609 done
503d2be0 1610 (set) 2>&1 |
ca81d7a0
JD
1611 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1612 *${as_nl}ac_space=\ *)
503d2be0 1613 sed -n \
ca81d7a0
JD
1614 "s/'\''/'\''\\\\'\'''\''/g;
1615 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1616 ;; #(
503d2be0 1617 *)
ca81d7a0 1618 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1619 ;;
ca81d7a0
JD
1620 esac |
1621 sort
1622)
c0d27fcc 1623 echo
6bae0ccf
DL
1624
1625 cat <<\_ASBOX
1626## ----------------- ##
1627## Output variables. ##
1628## ----------------- ##
1629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_vars
1632 do
ca81d7a0
JD
1633 eval ac_val=\$$ac_var
1634 case $ac_val in
b0448899 1635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ca81d7a0 1636 esac
b0448899 1637 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1638 done | sort
1639 echo
1640
1641 if test -n "$ac_subst_files"; then
1642 cat <<\_ASBOX
ca81d7a0
JD
1643## ------------------- ##
1644## File substitutions. ##
1645## ------------------- ##
6bae0ccf
DL
1646_ASBOX
1647 echo
1648 for ac_var in $ac_subst_files
1649 do
ca81d7a0
JD
1650 eval ac_val=\$$ac_var
1651 case $ac_val in
b0448899 1652 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ca81d7a0 1653 esac
b0448899 1654 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1655 done | sort
1656 echo
1657 fi
1658
c0d27fcc
MR
1659 if test -s confdefs.h; then
1660 cat <<\_ASBOX
1661## ----------- ##
1662## confdefs.h. ##
1663## ----------- ##
1664_ASBOX
1665 echo
ca81d7a0 1666 cat confdefs.h
c0d27fcc
MR
1667 echo
1668 fi
1669 test "$ac_signal" != 0 &&
b0448899
CY
1670 echo "$as_me: caught signal $ac_signal"
1671 echo "$as_me: exit $exit_status"
c0d27fcc 1672 } >&5
ca81d7a0
JD
1673 rm -f core *.core core.conftest.* &&
1674 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1675 exit $exit_status
ca81d7a0 1676' 0
503d2be0
AS
1677for ac_signal in 1 2 13 15; do
1678 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1679done
1680ac_signal=0
1681
1682# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1683rm -f -r conftest* confdefs.h
ba4481b5 1684
c0d27fcc
MR
1685# Predefined preprocessor variables.
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_NAME "$PACKAGE_NAME"
1689_ACEOF
1690
1691
1692cat >>confdefs.h <<_ACEOF
1693#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1694_ACEOF
1695
1696
1697cat >>confdefs.h <<_ACEOF
1698#define PACKAGE_VERSION "$PACKAGE_VERSION"
1699_ACEOF
1700
1701
1702cat >>confdefs.h <<_ACEOF
1703#define PACKAGE_STRING "$PACKAGE_STRING"
1704_ACEOF
1705
1706
1707cat >>confdefs.h <<_ACEOF
1708#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1709_ACEOF
1710
1711
503d2be0 1712# Let the site file select an alternate cache file if it wants to.
b0448899 1713# Prefer explicitly selected file to automatically selected ones.
ca81d7a0 1714if test -n "$CONFIG_SITE"; then
b0448899 1715 set x "$CONFIG_SITE"
ca81d7a0 1716elif test "x$prefix" != xNONE; then
b0448899 1717 set x "$prefix/share/config.site" "$prefix/etc/config.site"
ca81d7a0 1718else
b0448899
CY
1719 set x "$ac_default_prefix/share/config.site" \
1720 "$ac_default_prefix/etc/config.site"
ba4481b5 1721fi
b0448899
CY
1722shift
1723for ac_site_file
ca81d7a0 1724do
ba4481b5 1725 if test -r "$ac_site_file"; then
b0448899
CY
1726 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1727echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1728 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1729 . "$ac_site_file"
1730 fi
1731done
1732
1733if test -r "$cache_file"; then
503d2be0
AS
1734 # Some versions of bash will fail to source /dev/null (special
1735 # files actually), so we avoid doing that.
1736 if test -f "$cache_file"; then
b0448899
CY
1737 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1738echo "$as_me: loading cache $cache_file" >&6;}
503d2be0 1739 case $cache_file in
ca81d7a0
JD
1740 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1741 *) . "./$cache_file";;
503d2be0
AS
1742 esac
1743 fi
ba4481b5 1744else
b0448899
CY
1745 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1746echo "$as_me: creating cache $cache_file" >&6;}
503d2be0
AS
1747 >$cache_file
1748fi
1749
f053c89f
CY
1750ac_header_list="$ac_header_list sys/time.h"
1751ac_header_list="$ac_header_list unistd.h"
1752ac_func_list="$ac_func_list alarm"
503d2be0
AS
1753# Check that the precious variables saved in the cache have kept the same
1754# value.
1755ac_cache_corrupted=false
ca81d7a0 1756for ac_var in $ac_precious_vars; do
503d2be0
AS
1757 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1758 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1759 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1760 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1761 case $ac_old_set,$ac_new_set in
1762 set,)
b0448899
CY
1763 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1764echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
503d2be0
AS
1765 ac_cache_corrupted=: ;;
1766 ,set)
b0448899
CY
1767 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1768echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
503d2be0
AS
1769 ac_cache_corrupted=: ;;
1770 ,);;
1771 *)
1772 if test "x$ac_old_val" != "x$ac_new_val"; then
b0448899
CY
1773 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1774echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1775 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1776echo "$as_me: former value: $ac_old_val" >&2;}
1777 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1778echo "$as_me: current value: $ac_new_val" >&2;}
1779 ac_cache_corrupted=:
503d2be0
AS
1780 fi;;
1781 esac
c0d27fcc 1782 # Pass precious variables to config.status.
503d2be0
AS
1783 if test "$ac_new_set" = set; then
1784 case $ac_new_val in
b0448899 1785 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1786 *) ac_arg=$ac_var=$ac_new_val ;;
1787 esac
1788 case " $ac_configure_args " in
1789 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1790 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1791 esac
1792 fi
1793done
1794if $ac_cache_corrupted; then
b0448899
CY
1795 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1796echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1797 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1798echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
503d2be0 1799 { (exit 1); exit 1; }; }
ba4481b5
DL
1800fi
1801
c0d27fcc
MR
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
9cf8f393
JD
1813
1814
1815
1816
1817
1818
1819
1820
c0d27fcc
MR
1821
1822
1823
1824
1825
ca81d7a0
JD
1826ac_ext=c
1827ac_cpp='$CPP $CPPFLAGS'
1828ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1829ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1830ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1831
6bae0ccf 1832
ca81d7a0 1833ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1834
c0d27fcc 1835
9fb1ba80 1836
ba5da88a 1837test "$program_prefix" != NONE &&
ca81d7a0 1838 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1839# Use a double $ so make ignores it.
1840test "$program_suffix" != NONE &&
ca81d7a0 1841 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
b0448899 1842# Double any \ or $. echo might interpret backslashes.
ba5da88a 1843# By default was `s,x,x', remove it if useless.
b0448899
CY
1844cat <<\_ACEOF >conftest.sed
1845s/[\\$]/&&/g;s/;s,x,x,$//
1846_ACEOF
1847program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1848rm -f conftest.sed
ba5da88a 1849
c0d27fcc 1850
ba4481b5
DL
1851lispdir='${datadir}/emacs/${version}/lisp'
1852locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1853'${datadir}/emacs/site-lisp'
1854lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1855etcdir='${datadir}/emacs/${version}/etc'
1856archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1857docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1858gamedir='${localstatedir}/games/emacs'
98418dba
CW
1859
1860gameuser=games
1861
c0d27fcc 1862
49adb60f 1863
00b9c927 1864
ca81d7a0 1865# Check whether --with-pop was given.
ba4481b5 1866if test "${with_pop+set}" = set; then
00b9c927 1867 withval=$with_pop;
3d9fec71 1868else
00b9c927
MO
1869 with_pop=yes
1870fi
1871
1872if test "$with_pop" = yes; then
1873 cat >>confdefs.h <<\_ACEOF
3d9fec71 1874#define MAIL_USE_POP 1
c0d27fcc 1875_ACEOF
3d9fec71 1876
ca81d7a0 1877fi
ba4481b5 1878
c0d27fcc 1879
c0d27fcc 1880
ca81d7a0 1881# Check whether --with-kerberos was given.
a21616bd 1882if test "${with_kerberos+set}" = set; then
00b9c927
MO
1883 withval=$with_kerberos;
1884else
1885 with_kerberos=no
1886fi
1887
ff1095d1 1888if test "$with_kerberos" != no; then
54e6585f 1889 cat >>confdefs.h <<\_ACEOF
a21616bd 1890#define KERBEROS 1
c0d27fcc 1891_ACEOF
a21616bd 1892
ca81d7a0 1893fi
c0d27fcc 1894
c0d27fcc 1895
49adb60f 1896
ca81d7a0 1897# Check whether --with-kerberos5 was given.
a21616bd 1898if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1899 withval=$with_kerberos5;
1900else
1901 with_kerberos5=no
1902fi
1903
ff1095d1
AR
1904if test "${with_kerberos5}" != no; then
1905 if test "${with_kerberos}" = no; then
a21616bd 1906 with_kerberos=yes
c0d27fcc 1907 cat >>confdefs.h <<\_ACEOF
a21616bd 1908#define KERBEROS 1
c0d27fcc 1909_ACEOF
a21616bd
KR
1910
1911 fi
b936fae4 1912
c0d27fcc 1913cat >>confdefs.h <<\_ACEOF
a21616bd 1914#define KERBEROS5 1
c0d27fcc 1915_ACEOF
a21616bd 1916
ca81d7a0 1917fi
b936fae4 1918
49adb60f 1919
ca81d7a0
JD
1920# Check whether --with-hesiod was given.
1921if test "${with_hesiod+set}" = set; then
00b9c927
MO
1922 withval=$with_hesiod;
1923else
1924 with_hesiod=no
1925fi
1926
ff1095d1 1927if test "$with_hesiod" != no; then
54e6585f 1928
c0d27fcc 1929cat >>confdefs.h <<\_ACEOF
ba4481b5 1930#define HESIOD 1
c0d27fcc 1931_ACEOF
ba4481b5 1932
ca81d7a0 1933fi
c0d27fcc 1934
c0d27fcc 1935
ca81d7a0 1936# Check whether --with-sound was given.
2c9dccc9 1937if test "${with_sound+set}" = set; then
ca81d7a0 1938 withval=$with_sound;
00b9c927
MO
1939else
1940 with_sound=yes
ca81d7a0 1941fi
2c9dccc9 1942
2c9dccc9 1943
c0d27fcc 1944
a51f4969
SM
1945# Check whether --with-sync-input was given.
1946if test "${with_sync_input+set}" = set; then
1947 withval=$with_sync_input;
1948else
1949 with_sync_input=yes
1950fi
1951
1952if test "$with_sync_input" = yes; then
1953
1954cat >>confdefs.h <<\_ACEOF
1955#define SYNC_INPUT 1
1956_ACEOF
1957
1958fi
1959
1960
ca81d7a0 1961# Check whether --with-x-toolkit was given.
ba4481b5 1962if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1963 withval=$with_x_toolkit; case "${withval}" in
089a966d 1964 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1965 n | no ) val=no ;;
1966 l | lu | luc | luci | lucid ) val=lucid ;;
1967 a | at | ath | athe | athen | athena ) val=athena ;;
1968 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1969 g | gt | gtk ) val=gtk ;;
ba4481b5 1970 * )
b0448899 1971{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1972this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1973\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
b0448899 1974echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1975this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1976\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1977 { (exit 1); exit 1; }; }
ba4481b5
DL
1978 ;;
1979 esac
1980 with_x_toolkit=$val
1981
ca81d7a0 1982fi
8eeae1c9 1983
ba4481b5 1984
49adb60f 1985
ca81d7a0 1986# Check whether --with-xpm was given.
ba4481b5 1987if test "${with_xpm+set}" = set; then
ca81d7a0 1988 withval=$with_xpm;
00b9c927 1989else
c8467c40 1990 with_xpm=yes
ca81d7a0 1991fi
503d2be0 1992
ba4481b5 1993
ca81d7a0 1994# Check whether --with-jpeg was given.
ba4481b5 1995if test "${with_jpeg+set}" = set; then
ca81d7a0 1996 withval=$with_jpeg;
00b9c927 1997else
c8467c40 1998 with_jpeg=yes
ca81d7a0 1999fi
503d2be0 2000
ba4481b5 2001
ca81d7a0 2002# Check whether --with-tiff was given.
ba4481b5 2003if test "${with_tiff+set}" = set; then
ca81d7a0 2004 withval=$with_tiff;
00b9c927 2005else
c8467c40 2006 with_tiff=yes
ca81d7a0 2007fi
503d2be0 2008
ba4481b5 2009
ca81d7a0 2010# Check whether --with-gif was given.
ba4481b5 2011if test "${with_gif+set}" = set; then
ca81d7a0 2012 withval=$with_gif;
00b9c927 2013else
c8467c40 2014 with_gif=yes
ca81d7a0 2015fi
503d2be0 2016
ba4481b5 2017
ca81d7a0 2018# Check whether --with-png was given.
ba4481b5 2019if test "${with_png+set}" = set; then
ca81d7a0 2020 withval=$with_png;
00b9c927 2021else
c8467c40 2022 with_png=yes
ca81d7a0 2023fi
503d2be0 2024
ba4481b5 2025
0cfc0546
GM
2026# Check whether --with-rsvg was given.
2027if test "${with_rsvg+set}" = set; then
2028 withval=$with_rsvg;
00b9c927 2029else
c8467c40 2030 with_rsvg=yes
0cfc0546
GM
2031fi
2032
2033
c8467c40 2034
c24fa7dc 2035# Check whether --with-freetype was given.
45a4b03e 2036if test "${with_freetype+set}" = set; then
c24fa7dc 2037 withval=$with_freetype;
d235ca2f 2038else
4efcc8d1 2039 with_freetype=yes
c24fa7dc 2040fi
45a4b03e 2041
45a4b03e 2042
c24fa7dc 2043# Check whether --with-xft was given.
45a4b03e 2044if test "${with_xft+set}" = set; then
c24fa7dc 2045 withval=$with_xft;
d235ca2f 2046else
4efcc8d1 2047 with_xft=yes
c24fa7dc 2048fi
45a4b03e 2049
45a4b03e 2050
d235ca2f
MB
2051# Check whether --with-libotf was given.
2052if test "${with_libotf+set}" = set; then
2053 withval=$with_libotf;
2054else
2055 with_libotf=yes
79011b82
NR
2056fi
2057
2058
d235ca2f
MB
2059# Check whether --with-m17n-flt was given.
2060if test "${with_m17n_flt+set}" = set; then
2061 withval=$with_m17n_flt;
2062else
2063 with_m17n_flt=yes
0cfc0546
GM
2064fi
2065
2066
d235ca2f 2067
ca81d7a0 2068# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2069if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2070 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2071else
2072 with_toolkit_scroll_bars=yes
ca81d7a0 2073fi
503d2be0 2074
ba4481b5 2075
e35a28cd
TTN
2076# Check whether --with-xaw3d was given.
2077if test "${with_xaw3d+set}" = set; then
2078 withval=$with_xaw3d;
00b9c927
MO
2079else
2080 with_xaw3d=yes
c982cf7d
JD
2081fi
2082
2083
ca81d7a0 2084# Check whether --with-xim was given.
1d36487c 2085if test "${with_xim+set}" = set; then
ca81d7a0 2086 withval=$with_xim;
00b9c927
MO
2087else
2088 with_xim=yes
ca81d7a0 2089fi
1d36487c 2090
ba4481b5 2091
edfda783
AR
2092# Check whether --with-ns was given.
2093if test "${with_ns+set}" = set; then
2094 withval=$with_ns;
2095else
2096 with_ns=no
2097fi
2098
2099
c8467c40
GM
2100
2101# Check whether --with-gpm was given.
2102if test "${with_gpm+set}" = set; then
2103 withval=$with_gpm;
2104else
2105 with_gpm=yes
ca81d7a0 2106fi
e0f712ba 2107
49adb60f 2108
131e4133
MA
2109# Check whether --with-dbus was given.
2110if test "${with_dbus+set}" = set; then
2111 withval=$with_dbus;
00b9c927 2112else
b5a922de 2113 with_dbus=yes
131e4133
MA
2114fi
2115
2116
921fbdf0
GM
2117## For the times when you want to build Emacs but don't have
2118## a suitable makeinfo, and can live without the manuals.
2119
2120# Check whether --with-makeinfo was given.
2121if test "${with_makeinfo+set}" = set; then
2122 withval=$with_makeinfo;
2123else
2124 with_makeinfo=yes
2125fi
2126
2127
e70b2110 2128
9d2818d6
DN
2129# Check whether --with-gtk was given.
2130if test "${with_gtk+set}" = set; then
b0448899 2131 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
9d2818d6 2132specify a toolkit." >&5
b0448899 2133echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
9d2818d6
DN
2134specify a toolkit." >&2;}
2135 { (exit 1); exit 1; }; }
2136fi
2137
2138
2139
2140# Check whether --with-gcc was given.
2141if test "${with_gcc+set}" = set; then
b0448899 2142 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2143variable to specify a compiler." >&5
b0448899 2144echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2145variable to specify a compiler." >&2;}
9d2818d6
DN
2146 { (exit 1); exit 1; }; }
2147fi
2148
2149
2150
00b9c927
MO
2151# Check whether --with-pkg-config-prog was given.
2152if test "${with_pkg_config_prog+set}" = set; then
2153 withval=$with_pkg_config_prog;
e70b2110
KH
2154fi
2155
00b9c927
MO
2156if test "X${with_pkg_config_prog}" != X; then
2157 if test "${with_pkg_config_prog}" != yes; then
2158 PKG_CONFIG="${with_pkg_config_prog}"
2159 fi
2160fi
e70b2110 2161
ecd43cb9
GM
2162
2163# Check whether --with-gnustep-conf was given.
2164if test "${with_gnustep_conf+set}" = set; then
2165 withval=$with_gnustep_conf;
2166fi
2167
2168test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2169 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2170test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2171 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
2172
06b62770
AR
2173# Check whether --enable-ns-self-contained was given.
2174if test "${enable_ns_self_contained+set}" = set; then
6b8bc489 2175 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
06b62770
AR
2176else
2177 EN_NS_SELF_CONTAINED=yes
2178fi
2179
2180
c24fa7dc 2181# Check whether --enable-asserts was given.
d0098f13 2182if test "${enable_asserts+set}" = set; then
ca81d7a0 2183 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2184else
2185 USE_XASSERTS=no
ca81d7a0 2186fi
8eeae1c9 2187
d0098f13 2188
ca81d7a0 2189# Check whether --enable-maintainer-mode was given.
19650fd6 2190if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2191 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2192else
2193 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2194fi
2195
19650fd6
AS
2196if test $USE_MAINTAINER_MODE = yes; then
2197 MAINT=
2198else
2199 MAINT=#
2200fi
2201
2202
ca81d7a0 2203# Check whether --enable-locallisppath was given.
9adfabc2 2204if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2205 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2206 locallisppath=
2207elif test "${enableval}" != "yes"; then
2208 locallisppath=${enableval}
2209fi
ca81d7a0
JD
2210fi
2211
9adfabc2 2212
ba4481b5 2213#### Make srcdir absolute, if it isn't already. It's important to
17494071 2214#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2215#### give you automounter prefixes, which can go away. We do all this
2216#### so Emacs can find its files when run uninstalled.
17494071
GM
2217## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2218unset CDPATH
ba4481b5
DL
2219case "${srcdir}" in
2220 /* ) ;;
2221 . )
2222 ## We may be able to use the $PWD environment variable to make this
2223 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2224 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2225 ## but that tested only for a well-formed and valid PWD,
2226 ## it did not object when PWD was well-formed and valid but just wrong.
2227 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2228 then
2229 srcdir="$PWD"
2230 else
2231 srcdir="`(cd ${srcdir}; pwd)`"
2232 fi
2233 ;;
2234 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2235esac
2236
2237#### Check if the source directory already has a configured system in it.
2238if test `pwd` != `(cd ${srcdir} && pwd)` \
2239 && test -f "${srcdir}/src/config.h" ; then
b0448899 2240 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2241 as a build directory right now; it has been configured in its own
2242 right. To configure in another directory as well, you MUST
2243 use GNU make. If you do not have GNU make, then you must
2244 now do \`make distclean' in ${srcdir},
2245 and then run $0 again." >&5
b0448899 2246echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2247 as a build directory right now; it has been configured in its own
2248 right. To configure in another directory as well, you MUST
2249 use GNU make. If you do not have GNU make, then you must
2250 now do \`make distclean' in ${srcdir},
503d2be0 2251 and then run $0 again." >&2;}
ba4481b5
DL
2252fi
2253
2254#### Given the configuration name, set machfile and opsysfile to the
2255#### names of the m/*.h and s/*.h files we should use.
2256
2257### Canonicalize the configuration name.
2258
2259ac_aux_dir=
ca81d7a0
JD
2260for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2261 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2262 ac_aux_dir=$ac_dir
2263 ac_install_sh="$ac_aux_dir/install-sh -c"
2264 break
ca81d7a0 2265 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2266 ac_aux_dir=$ac_dir
2267 ac_install_sh="$ac_aux_dir/install.sh -c"
2268 break
ca81d7a0 2269 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2270 ac_aux_dir=$ac_dir
2271 ac_install_sh="$ac_aux_dir/shtool install -c"
2272 break
ba4481b5
DL
2273 fi
2274done
2275if test -z "$ac_aux_dir"; then
b0448899
CY
2276 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2277echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2278 { (exit 1); exit 1; }; }
ba4481b5 2279fi
ca81d7a0
JD
2280
2281# These three variables are undocumented and unsupported,
2282# and are intended to be withdrawn in a future Autoconf release.
2283# They can cause serious problems if a builder's source tree is in a directory
2284# whose full name contains unusual characters.
2285ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2286ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2287ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2288
ba4481b5
DL
2289
2290# Make sure we can run config.sub.
ca81d7a0 2291$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
b0448899
CY
2292 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2293echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2294 { (exit 1); exit 1; }; }
2295
b0448899
CY
2296{ echo "$as_me:$LINENO: checking build system type" >&5
2297echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0 2298if test "${ac_cv_build+set}" = set; then
b0448899 2299 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 2300else
ca81d7a0
JD
2301 ac_build_alias=$build_alias
2302test "x$ac_build_alias" = x &&
2303 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2304test "x$ac_build_alias" = x &&
b0448899
CY
2305 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2306echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
503d2be0 2307 { (exit 1); exit 1; }; }
ca81d7a0 2308ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
b0448899
CY
2309 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2310echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2311 { (exit 1); exit 1; }; }
2312
2313fi
b0448899
CY
2314{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2315echo "${ECHO_T}$ac_cv_build" >&6; }
ca81d7a0
JD
2316case $ac_cv_build in
2317*-*-*) ;;
b0448899
CY
2318*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2319echo "$as_me: error: invalid value of canonical build" >&2;}
ca81d7a0
JD
2320 { (exit 1); exit 1; }; };;
2321esac
503d2be0 2322build=$ac_cv_build
ca81d7a0
JD
2323ac_save_IFS=$IFS; IFS='-'
2324set x $ac_cv_build
2325shift
2326build_cpu=$1
2327build_vendor=$2
2328shift; shift
2329# Remember, the first character of IFS is used to create $*,
2330# except with old shells:
2331build_os=$*
2332IFS=$ac_save_IFS
2333case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2334
2335
b0448899
CY
2336{ echo "$as_me:$LINENO: checking host system type" >&5
2337echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0 2338if test "${ac_cv_host+set}" = set; then
b0448899 2339 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 2340else
ca81d7a0
JD
2341 if test "x$host_alias" = x; then
2342 ac_cv_host=$ac_cv_build
2343else
2344 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
b0448899
CY
2345 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2346echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2347 { (exit 1); exit 1; }; }
ca81d7a0 2348fi
503d2be0
AS
2349
2350fi
b0448899
CY
2351{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2352echo "${ECHO_T}$ac_cv_host" >&6; }
ca81d7a0
JD
2353case $ac_cv_host in
2354*-*-*) ;;
b0448899
CY
2355*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2356echo "$as_me: error: invalid value of canonical host" >&2;}
ca81d7a0
JD
2357 { (exit 1); exit 1; }; };;
2358esac
503d2be0 2359host=$ac_cv_host
ca81d7a0
JD
2360ac_save_IFS=$IFS; IFS='-'
2361set x $ac_cv_host
2362shift
2363host_cpu=$1
2364host_vendor=$2
2365shift; shift
2366# Remember, the first character of IFS is used to create $*,
2367# except with old shells:
2368host_os=$*
2369IFS=$ac_save_IFS
2370case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2371
c0d27fcc 2372
ba4481b5 2373canonical=$host
1770dcdc 2374configuration=${host_alias-${build_alias-$host}}
ba4481b5 2375
c0d27fcc 2376
22044edf 2377
ba4481b5
DL
2378### If you add support for a new configuration, add code to this
2379### switch statement to recognize your configuration name and select
2380### the appropriate operating system and machine description files.
2381
2382### You would hope that you could choose an m/*.h file pretty much
2383### based on the machine portion of the configuration name, and an s-
2384### file based on the operating system portion. However, it turns out
2385### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2386### example mips.h is MIPS
2387### So we basically have to have a special case for each
ba4481b5
DL
2388### configuration name.
2389###
2390### As far as handling version numbers on operating systems is
2391### concerned, make sure things will fail in a fixable way. If
2392### /etc/MACHINES doesn't say anything about version numbers, be
2393### prepared to handle anything reasonably. If version numbers
2394### matter, be sure /etc/MACHINES says something about it.
2395###
2396### Eric Raymond says we should accept strings like "sysvr4" to mean
2397### "System V Release 4"; he writes, "The old convention encouraged
2398### confusion between `system' and `release' levels'."
2399
2400machine='' opsys='' unported=no
2401case "${canonical}" in
2402
1096bcc0 2403 ## FreeBSD ports
6b0273cd 2404 *-*-freebsd* )
1096bcc0
GM
2405 opsys=freebsd
2406 case "${canonical}" in
2407 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2408 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2409 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2410 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2411 sparc64-*-freebsd*) machine=sparc ;;
2412 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2413 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2414 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2415 esac
2416 ;;
2417
1b275743
GM
2418 ## FreeBSD kernel + glibc based userland
2419 *-*-kfreebsd*gnu* )
2420 opsys=gnu-kfreebsd
2421 case "${canonical}" in
2422 alpha*-*-kfreebsd*) machine=alpha ;;
2423 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2424 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2425 sparc64-*-kfreebsd*) machine=sparc ;;
2426 powerpc-*-kfreebsd*) machine=macppc ;;
2427 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2428 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2429 esac
2430 ;;
2431
ba4481b5
DL
2432 ## NetBSD ports
2433 *-*-netbsd* )
2434 opsys=netbsd
dd038e26 2435 if test -f /usr/lib/crti.o; then
f57bd967
DL
2436
2437cat >>confdefs.h <<\_ACEOF
b0448899 2438#define HAVE_CRTIN
dd038e26
AS
2439_ACEOF
2440
2441 fi
2442
ba4481b5
DL
2443 case "${canonical}" in
2444 alpha*-*-netbsd*) machine=alpha ;;
2445 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2446 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2447 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2448 vax-*-netbsd*) machine=vax ;;
2df636f4 2449 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2450 x86_64-*-netbsd*) machine=amdx86-64 ;;
2451 hppa-*-netbsd*) machine=hp800 ;;
a078d6e5 2452 m68k-*-netbsd*) machine=m68k ;;
ba4481b5
DL
2453 esac
2454 ;;
2455
2456 ## OpenBSD ports
2457 *-*-openbsd* )
2458 opsys=openbsd
2459 case "${canonical}" in
2460 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2461 arm-*-openbsd*) machine=arm ;;
85410b02 2462 i386-*-openbsd*) machine=intel386 ;;
85410b02 2463 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2464 sparc*-*-openbsd*) machine=sparc ;;
2465 vax-*-openbsd*) machine=vax ;;
2466 x86_64-*-openbsd*) machine=amdx86-64 ;;
8bff6137 2467 hppa-*-openbsd*) machine=hp800 ;;
ba4481b5
DL
2468 esac
2469 ;;
2470
10a3b1a1
EZ
2471 ## LynxOS ports
2472 *-*-lynxos* )
2473 opsys=lynxos
2474 case "${canonical}" in
2475 i[3456]86-*-lynxos*) machine=intel386 ;;
2476 powerpc-*-lynxos*) machine=powerpc ;;
2477 esac
2478 ;;
2479
ba4481b5
DL
2480 alpha*-*-linux-gnu* )
2481 machine=alpha opsys=gnu-linux
2482 ;;
2483
c4bb2108
DL
2484 arm*-*-linux-gnu* )
2485 machine=arm opsys=gnu-linux
2486 ;;
2487
040c474e
CY
2488 ## Apple Darwin / Mac OS X
2489 *-apple-darwin* )
2490 case "${canonical}" in
2491 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2492 powerpc-* ) machine=macppc ;;
040c474e
CY
2493 * ) unported=yes ;;
2494 esac
2495 opsys=darwin
2496 # Define CPP as follows to make autoconf work correctly.
2497 CPP="${CC-cc} -E -no-cpp-precomp"
2498 # Use fink packages if available.
2499 if test -d /sw/include && test -d /sw/lib; then
2500 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2501 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2502 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2503 fi
2504 ;;
2505
6fbb6db1 2506 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2507 hppa*-hp-hpux10.2* )
2508 machine=hp800 opsys=hpux10-20
2509 ;;
6fbb6db1
GM
2510 hppa*-hp-hpux1[1-9]* )
2511 machine=hp800 opsys=hpux11
2512 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2513 ;;
2514
409d9577
GM
2515 hppa*-*-linux-gnu* )
2516 machine=hp800 opsys=gnu-linux
2517 ;;
2518
ba4481b5 2519 ## IBM machines
55597d70 2520 s390-*-linux-gnu* )
138f0859
GM
2521 machine=ibms390 opsys=gnu-linux
2522 ;;
bcdb1378
EZ
2523 s390x-*-linux-gnu* )
2524 machine=ibms390x opsys=gnu-linux
2525 ;;
ba4481b5
DL
2526 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2527 machine=ibmrs6000 opsys=aix4-2
2528 ;;
67bf991b
CY
2529 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2530 machine=ibmrs6000 opsys=aix4-2
2531 ;;
55597d70 2532 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2533 machine=ibmrs6000 opsys=aix4-2
2534 ;;
26a42dac
DN
2535 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2536 machine=ibmrs6000 opsys=aix4-2
2537 ;;
ba4481b5 2538
c76e04a8
GM
2539 ## Macintosh PowerPC
2540 powerpc*-*-linux-gnu* )
2541 machine=macppc opsys=gnu-linux
2542 ;;
2543
ba4481b5 2544 ## Silicon Graphics machines
ba4481b5 2545 ## Iris 4D
ba4481b5
DL
2546 mips-sgi-irix6.5 )
2547 machine=iris4d opsys=irix6-5
946173ad
DL
2548 # Without defining _LANGUAGE_C, things get masked out in the headers
2549 # so that, for instance, grepping for `free' in stdlib.h fails and
2550 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2551 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2552 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2553 ;;
ba4481b5 2554
ba4481b5
DL
2555 ## Suns
2556 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2557 machine=sparc opsys=gnu-linux
2558 ;;
2559
176fe5fc 2560 *-sun-solaris* \
7c54c0a0
DN
2561 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
2562 | x86_64-*-solaris2* | x86_64-*-sunos5* \
2563 | powerpc*-*-solaris2* | rs6000-*-solaris2*)
ba4481b5 2564 case "${canonical}" in
ba4481b5 2565 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2566 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2567 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2568 sparc* ) machine=sparc ;;
2569 * ) unported=yes ;;
2570 esac
2571 case "${canonical}" in
ba4481b5
DL
2572 *-sunos5.3* | *-solaris2.3* )
2573 opsys=sol2-3
2574 NON_GNU_CPP=/usr/ccs/lib/cpp
2575 ;;
2576 *-sunos5.4* | *-solaris2.4* )
2577 opsys=sol2-4
2578 NON_GNU_CPP=/usr/ccs/lib/cpp
2579 RANLIB="ar -ts"
2580 ;;
2581 *-sunos5.5* | *-solaris2.5* )
2582 opsys=sol2-5
2583 NON_GNU_CPP=/usr/ccs/lib/cpp
2584 RANLIB="ar -ts"
2585 ;;
8e967cf7
MR
2586 *-sunos5.6* | *-solaris2.6* )
2587 opsys=sol2-6
2588 NON_GNU_CPP=/usr/ccs/lib/cpp
2589 RANLIB="ar -ts"
2590 ;;
2194ea1c 2591 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
9e71690e 2592 opsys=sol2-6
089a966d
GM
2593 emacs_check_sunpro_c=yes
2594 NON_GNU_CPP=/usr/ccs/lib/cpp
6623890a 2595 ;;
9b3362b8
DN
2596 *-sunos5* | *-solaris* )
2597 opsys=sol2-10
2598 emacs_check_sunpro_c=yes
2599 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2600 ;;
ba4481b5
DL
2601 esac
2602 ## Watch out for a compiler that we know will not work.
2603 case "${canonical}" in
2604 *-solaris* | *-sunos5* )
2605 if [ "x$CC" = x/usr/ucb/cc ]; then
2606 ## /usr/ucb/cc doesn't work;
2607 ## we should find some other compiler that does work.
2608 unset CC
2609 fi
2610 ;;
2611 *) ;;
2612 esac
2613 ;;
ba4481b5 2614
ba4481b5
DL
2615 ## Vaxen.
2616 vax-dec-* )
2617 machine=vax
2618 case "${canonical}" in
ba4481b5
DL
2619 *-vms* ) opsys=vms ;;
2620 * ) unported=yes
2621 esac
2622 ;;
2623
f4988be7
GM
2624 ## IA-64
2625 ia64*-*-linux* )
2626 machine=ia64 opsys=gnu-linux
2627 ;;
2628
ba4481b5
DL
2629 ## Intel 386 machines where we don't care about the manufacturer
2630 i[3456]86-*-* )
2631 machine=intel386
2632 case "${canonical}" in
c60ee5e7 2633 *-cygwin ) opsys=cygwin ;;
eae54018 2634 *-darwin* ) opsys=darwin
23fd4483
ST
2635 CPP="${CC-cc} -E -no-cpp-precomp"
2636 ;;
ba4481b5 2637 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2638 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2639 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2640 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2641 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2642 esac
2643 ;;
2644
2645 ## m68k Linux-based GNU system
2646 m68k-*-linux-gnu* )
2647 machine=m68k opsys=gnu-linux
2648 ;;
2649
2650 ## Mips Linux-based GNU system
8bff6137
GM
2651 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
2652 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
ba4481b5
DL
2653 machine=mips opsys=gnu-linux
2654 ;;
2655
598a2813
AS
2656 ## AMD x86-64 Linux-based GNU system
2657 x86_64-*-linux-gnu* )
24b01ec4 2658 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2659 ;;
2660
94218e27 2661 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2662 xtensa*-*-linux-gnu* )
94218e27
DN
2663 machine=xtensa opsys=gnu-linux
2664 ;;
2665
fac5dc61
DN
2666 ## SuperH Linux-based GNU system
2667 sh[34]*-*-linux-gnu* )
2668 machine=sh3 opsys=gnu-linux
2669 ;;
2670
ba4481b5
DL
2671 * )
2672 unported=yes
2673 ;;
2674esac
2675
2676### If the code above didn't choose an operating system, just choose
2677### an operating system based on the configuration name. You really
2678### only want to use this when you have no idea what the right
2679### operating system is; if you know what operating systems a machine
2680### runs, it's cleaner to make it explicit in the case statement
2681### above.
2682if test x"${opsys}" = x; then
2683 case "${canonical}" in
2684 *-gnu* ) opsys=gnu ;;
ba4481b5 2685 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2686 *-sysv5uw* ) opsys=unixware ;;
2687 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2688 *-sysv4.1* | *-sysvr4.1* )
2689 NON_GNU_CPP=/usr/lib/cpp
2690 opsys=usg5-4 ;;
2691 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2692 if [ x$NON_GNU_CPP = x ]; then
2693 if [ -f /usr/ccs/lib/cpp ]; then
2694 NON_GNU_CPP=/usr/ccs/lib/cpp
2695 else
2696 NON_GNU_CPP=/lib/cpp
2697 fi
2698 fi
2699 opsys=usg5-4-2 ;;
2700 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2701 * )
2702 unported=yes
2703 ;;
2704 esac
2705fi
2706
c0d27fcc 2707
22044edf 2708
ba4481b5 2709if test $unported = yes; then
b0448899 2710 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0 2711Check \`etc/MACHINES' for recognized configuration names." >&5
b0448899 2712echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2713Check \`etc/MACHINES' for recognized configuration names." >&2;}
2714 { (exit 1); exit 1; }; }
ba4481b5
DL
2715fi
2716
2717machfile="m/${machine}.h"
2718opsysfile="s/${opsys}.h"
2719
c0d27fcc 2720
ba4481b5
DL
2721#### Choose a compiler.
2722test -n "$CC" && cc_specified=yes
2723
2724# Save the value of CFLAGS that the user specified.
2725SPECIFIED_CFLAGS="$CFLAGS"
2726
503d2be0
AS
2727ac_ext=c
2728ac_cpp='$CPP $CPPFLAGS'
2729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2731ac_compiler_gnu=$ac_cv_c_compiler_gnu
2732if test -n "$ac_tool_prefix"; then
2733 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2734set dummy ${ac_tool_prefix}gcc; ac_word=$2
b0448899
CY
2735{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2736echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2737if test "${ac_cv_prog_CC+set}" = set; then
b0448899 2738 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2739else
2740 if test -n "$CC"; then
2741 ac_cv_prog_CC="$CC" # Let the user override the test.
2742else
c0d27fcc
MR
2743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2744for as_dir in $PATH
2745do
2746 IFS=$as_save_IFS
2747 test -z "$as_dir" && as_dir=.
2748 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2749 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2750 ac_cv_prog_CC="${ac_tool_prefix}gcc"
b0448899 2751 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2752 break 2
2753 fi
2754done
503d2be0 2755done
ca81d7a0 2756IFS=$as_save_IFS
503d2be0 2757
ba4481b5
DL
2758fi
2759fi
503d2be0 2760CC=$ac_cv_prog_CC
ba4481b5 2761if test -n "$CC"; then
b0448899
CY
2762 { echo "$as_me:$LINENO: result: $CC" >&5
2763echo "${ECHO_T}$CC" >&6; }
503d2be0 2764else
b0448899
CY
2765 { echo "$as_me:$LINENO: result: no" >&5
2766echo "${ECHO_T}no" >&6; }
503d2be0
AS
2767fi
2768
ca81d7a0 2769
503d2be0
AS
2770fi
2771if test -z "$ac_cv_prog_CC"; then
2772 ac_ct_CC=$CC
2773 # Extract the first word of "gcc", so it can be a program name with args.
2774set dummy gcc; ac_word=$2
b0448899
CY
2775{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2776echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2777if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
b0448899 2778 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
2779else
2780 if test -n "$ac_ct_CC"; then
2781 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2782else
c0d27fcc
MR
2783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2784for as_dir in $PATH
2785do
2786 IFS=$as_save_IFS
2787 test -z "$as_dir" && as_dir=.
2788 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2789 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2790 ac_cv_prog_ac_ct_CC="gcc"
b0448899 2791 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2792 break 2
2793 fi
2794done
503d2be0 2795done
ca81d7a0 2796IFS=$as_save_IFS
503d2be0
AS
2797
2798fi
2799fi
2800ac_ct_CC=$ac_cv_prog_ac_ct_CC
2801if test -n "$ac_ct_CC"; then
b0448899
CY
2802 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2803echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2804else
b0448899
CY
2805 { echo "$as_me:$LINENO: result: no" >&5
2806echo "${ECHO_T}no" >&6; }
503d2be0
AS
2807fi
2808
ca81d7a0
JD
2809 if test "x$ac_ct_CC" = x; then
2810 CC=""
2811 else
2812 case $cross_compiling:$ac_tool_warned in
2813yes:)
b0448899
CY
2814{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2815whose name does not start with the host triplet. If you think this
2816configuration is useful to you, please write to autoconf@gnu.org." >&5
2817echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2818whose name does not start with the host triplet. If you think this
2819configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ca81d7a0
JD
2820ac_tool_warned=yes ;;
2821esac
2822 CC=$ac_ct_CC
2823 fi
503d2be0
AS
2824else
2825 CC="$ac_cv_prog_CC"
ba4481b5
DL
2826fi
2827
2828if test -z "$CC"; then
ca81d7a0
JD
2829 if test -n "$ac_tool_prefix"; then
2830 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2831set dummy ${ac_tool_prefix}cc; ac_word=$2
b0448899
CY
2832{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2833echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2834if test "${ac_cv_prog_CC+set}" = set; then
b0448899 2835 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2836else
2837 if test -n "$CC"; then
2838 ac_cv_prog_CC="$CC" # Let the user override the test.
2839else
c0d27fcc
MR
2840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2841for as_dir in $PATH
2842do
2843 IFS=$as_save_IFS
2844 test -z "$as_dir" && as_dir=.
2845 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2847 ac_cv_prog_CC="${ac_tool_prefix}cc"
b0448899 2848 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2849 break 2
2850 fi
2851done
503d2be0 2852done
ca81d7a0 2853IFS=$as_save_IFS
503d2be0
AS
2854
2855fi
2856fi
2857CC=$ac_cv_prog_CC
2858if test -n "$CC"; then
b0448899
CY
2859 { echo "$as_me:$LINENO: result: $CC" >&5
2860echo "${ECHO_T}$CC" >&6; }
503d2be0 2861else
b0448899
CY
2862 { echo "$as_me:$LINENO: result: no" >&5
2863echo "${ECHO_T}no" >&6; }
503d2be0
AS
2864fi
2865
503d2be0 2866
ca81d7a0 2867 fi
503d2be0
AS
2868fi
2869if test -z "$CC"; then
2870 # Extract the first word of "cc", so it can be a program name with args.
2871set dummy cc; ac_word=$2
b0448899
CY
2872{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2874if test "${ac_cv_prog_CC+set}" = set; then
b0448899 2875 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
2876else
2877 if test -n "$CC"; then
2878 ac_cv_prog_CC="$CC" # Let the user override the test.
2879else
2880 ac_prog_rejected=no
c0d27fcc
MR
2881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2882for as_dir in $PATH
2883do
2884 IFS=$as_save_IFS
2885 test -z "$as_dir" && as_dir=.
2886 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2888 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2889 ac_prog_rejected=yes
2890 continue
2891 fi
2892 ac_cv_prog_CC="cc"
b0448899 2893 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2894 break 2
2895 fi
2896done
503d2be0 2897done
ca81d7a0 2898IFS=$as_save_IFS
503d2be0 2899
ba4481b5
DL
2900if test $ac_prog_rejected = yes; then
2901 # We found a bogon in the path, so make sure we never use it.
2902 set dummy $ac_cv_prog_CC
2903 shift
503d2be0 2904 if test $# != 0; then
ba4481b5
DL
2905 # We chose a different compiler from the bogus one.
2906 # However, it has the same basename, so the bogon will be chosen
2907 # first if we set CC to just the basename; use the full file name.
2908 shift
6bae0ccf 2909 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2910 fi
2911fi
2912fi
2913fi
503d2be0 2914CC=$ac_cv_prog_CC
ba4481b5 2915if test -n "$CC"; then
b0448899
CY
2916 { echo "$as_me:$LINENO: result: $CC" >&5
2917echo "${ECHO_T}$CC" >&6; }
ba4481b5 2918else
b0448899
CY
2919 { echo "$as_me:$LINENO: result: no" >&5
2920echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2921fi
2922
ca81d7a0 2923
503d2be0
AS
2924fi
2925if test -z "$CC"; then
2926 if test -n "$ac_tool_prefix"; then
ca81d7a0 2927 for ac_prog in cl.exe
503d2be0
AS
2928 do
2929 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b0448899
CY
2931{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2932echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2933if test "${ac_cv_prog_CC+set}" = set; then
b0448899 2934 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2935else
2936 if test -n "$CC"; then
2937 ac_cv_prog_CC="$CC" # Let the user override the test.
2938else
c0d27fcc
MR
2939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940for as_dir in $PATH
2941do
2942 IFS=$as_save_IFS
2943 test -z "$as_dir" && as_dir=.
2944 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2945 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2946 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
b0448899 2947 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2948 break 2
2949 fi
2950done
503d2be0 2951done
ca81d7a0 2952IFS=$as_save_IFS
503d2be0 2953
c4bb2108
DL
2954fi
2955fi
503d2be0 2956CC=$ac_cv_prog_CC
c4bb2108 2957if test -n "$CC"; then
b0448899
CY
2958 { echo "$as_me:$LINENO: result: $CC" >&5
2959echo "${ECHO_T}$CC" >&6; }
c4bb2108 2960else
b0448899
CY
2961 { echo "$as_me:$LINENO: result: no" >&5
2962echo "${ECHO_T}no" >&6; }
503d2be0
AS
2963fi
2964
ca81d7a0 2965
503d2be0
AS
2966 test -n "$CC" && break
2967 done
2968fi
2969if test -z "$CC"; then
2970 ac_ct_CC=$CC
ca81d7a0 2971 for ac_prog in cl.exe
503d2be0
AS
2972do
2973 # Extract the first word of "$ac_prog", so it can be a program name with args.
2974set dummy $ac_prog; ac_word=$2
b0448899
CY
2975{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2976echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2977if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
b0448899 2978 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
2979else
2980 if test -n "$ac_ct_CC"; then
2981 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2982else
c0d27fcc
MR
2983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2984for as_dir in $PATH
2985do
2986 IFS=$as_save_IFS
2987 test -z "$as_dir" && as_dir=.
2988 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2990 ac_cv_prog_ac_ct_CC="$ac_prog"
b0448899 2991 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2992 break 2
2993 fi
2994done
503d2be0 2995done
ca81d7a0 2996IFS=$as_save_IFS
503d2be0 2997
c4bb2108 2998fi
503d2be0
AS
2999fi
3000ac_ct_CC=$ac_cv_prog_ac_ct_CC
3001if test -n "$ac_ct_CC"; then
b0448899
CY
3002 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3003echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3004else
b0448899
CY
3005 { echo "$as_me:$LINENO: result: no" >&5
3006echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3007fi
3008
ca81d7a0 3009
503d2be0
AS
3010 test -n "$ac_ct_CC" && break
3011done
ba4481b5 3012
ca81d7a0
JD
3013 if test "x$ac_ct_CC" = x; then
3014 CC=""
3015 else
3016 case $cross_compiling:$ac_tool_warned in
3017yes:)
b0448899
CY
3018{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3019whose name does not start with the host triplet. If you think this
3020configuration is useful to you, please write to autoconf@gnu.org." >&5
3021echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3022whose name does not start with the host triplet. If you think this
3023configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ca81d7a0
JD
3024ac_tool_warned=yes ;;
3025esac
3026 CC=$ac_ct_CC
3027 fi
503d2be0
AS
3028fi
3029
3030fi
ba4481b5 3031
c0d27fcc 3032
b0448899 3033test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
19650fd6 3034See \`config.log' for more details." >&5
b0448899 3035echo "$as_me: error: no acceptable C compiler found in \$PATH
19650fd6 3036See \`config.log' for more details." >&2;}
b0448899 3037 { (exit 1); exit 1; }; }
c4bb2108 3038
503d2be0 3039# Provide some information about the compiler.
b0448899
CY
3040echo "$as_me:$LINENO: checking for C compiler version" >&5
3041ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3042{ (ac_try="$ac_compiler --version >&5"
3043case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046esac
b0448899 3047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3048 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3049 ac_status=$?
b0448899 3050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3051 (exit $ac_status); }
ca81d7a0
JD
3052{ (ac_try="$ac_compiler -v >&5"
3053case "(($ac_try" in
3054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3055 *) ac_try_echo=$ac_try;;
3056esac
b0448899 3057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3058 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3059 ac_status=$?
b0448899 3060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3061 (exit $ac_status); }
ca81d7a0
JD
3062{ (ac_try="$ac_compiler -V >&5"
3063case "(($ac_try" in
3064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3065 *) ac_try_echo=$ac_try;;
3066esac
b0448899 3067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3068 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3069 ac_status=$?
b0448899 3070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3071 (exit $ac_status); }
3072
3073cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3074/* confdefs.h. */
3075_ACEOF
3076cat confdefs.h >>conftest.$ac_ext
3077cat >>conftest.$ac_ext <<_ACEOF
3078/* end confdefs.h. */
c4bb2108 3079
503d2be0
AS
3080int
3081main ()
3082{
3083
3084 ;
3085 return 0;
3086}
3087_ACEOF
3088ac_clean_files_save=$ac_clean_files
b0448899 3089ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3090# Try to create an executable without -o first, disregard a.out.
3091# It will help us diagnose broken compilers, and finding out an intuition
3092# of exeext.
b0448899
CY
3093{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3094echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
3095ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3096#
3097# List of possible output files, starting from the most likely.
3098# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3099# only as a last resort. b.out is created by i960 compilers.
3100ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3101#
3102# The IRIX 6 linker writes into existing files which may not be
3103# executable, retaining their permissions. Remove them first so a
3104# subsequent execution test works.
ca81d7a0
JD
3105ac_rmfiles=
3106for ac_file in $ac_files
3107do
3108 case $ac_file in
b0448899 3109 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
ca81d7a0
JD
3110 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3111 esac
3112done
3113rm -f $ac_rmfiles
3114
3115if { (ac_try="$ac_link_default"
3116case "(($ac_try" in
3117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3118 *) ac_try_echo=$ac_try;;
3119esac
b0448899 3120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3121 (eval "$ac_link_default") 2>&5
503d2be0 3122 ac_status=$?
b0448899 3123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3124 (exit $ac_status); }; then
ca81d7a0
JD
3125 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3126# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3127# in a Makefile. We should not override ac_cv_exeext if it was cached,
3128# so that the user can short-circuit this test for compilers unknown to
3129# Autoconf.
f053c89f 3130for ac_file in $ac_files ''
19650fd6 3131do
6bae0ccf 3132 test -f "$ac_file" || continue
503d2be0 3133 case $ac_file in
b0448899 3134 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3135 ;;
19650fd6 3136 [ab].out )
edfaf76d
LK
3137 # We found the default executable, but exeext='' is most
3138 # certainly right.
3139 break;;
19650fd6 3140 *.* )
ca81d7a0
JD
3141 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3142 then :; else
3143 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3144 fi
3145 # We set ac_cv_exeext here because the later test for it is not
3146 # safe: cross compilers may not add the suffix if given an `-o'
3147 # argument, so we may need to know it at that point already.
3148 # Even if this section looks crufty: it has the advantage of
3149 # actually working.
edfaf76d 3150 break;;
19650fd6 3151 * )
edfaf76d 3152 break;;
503d2be0
AS
3153 esac
3154done
ca81d7a0
JD
3155test "$ac_cv_exeext" = no && ac_cv_exeext=
3156
503d2be0 3157else
f053c89f
CY
3158 ac_file=''
3159fi
3160
b0448899
CY
3161{ echo "$as_me:$LINENO: result: $ac_file" >&5
3162echo "${ECHO_T}$ac_file" >&6; }
f053c89f 3163if test -z "$ac_file"; then
b0448899 3164 echo "$as_me: failed program was:" >&5
19650fd6
AS
3165sed 's/^/| /' conftest.$ac_ext >&5
3166
b0448899 3167{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3168See \`config.log' for more details." >&5
b0448899 3169echo "$as_me: error: C compiler cannot create executables
19650fd6 3170See \`config.log' for more details." >&2;}
b0448899 3171 { (exit 77); exit 77; }; }
503d2be0
AS
3172fi
3173
3174ac_exeext=$ac_cv_exeext
503d2be0 3175
ca81d7a0 3176# Check that the compiler produces executables we can run. If not, either
503d2be0 3177# the compiler is broken, or we cross compile.
b0448899
CY
3178{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3179echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3180# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3181# If not cross compiling, check that we can run a simple program.
3182if test "$cross_compiling" != yes; then
3183 if { ac_try='./$ac_file'
ca81d7a0
JD
3184 { (case "(($ac_try" in
3185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186 *) ac_try_echo=$ac_try;;
3187esac
b0448899 3188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3189 (eval "$ac_try") 2>&5
503d2be0 3190 ac_status=$?
b0448899 3191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3192 (exit $ac_status); }; }; then
3193 cross_compiling=no
ba4481b5 3194 else
503d2be0
AS
3195 if test "$cross_compiling" = maybe; then
3196 cross_compiling=yes
3197 else
b0448899 3198 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3199If you meant to cross compile, use \`--host'.
3200See \`config.log' for more details." >&5
b0448899 3201echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3202If you meant to cross compile, use \`--host'.
3203See \`config.log' for more details." >&2;}
b0448899 3204 { (exit 1); exit 1; }; }
503d2be0 3205 fi
ba4481b5 3206 fi
503d2be0 3207fi
b0448899
CY
3208{ echo "$as_me:$LINENO: result: yes" >&5
3209echo "${ECHO_T}yes" >&6; }
503d2be0 3210
b0448899 3211rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3212ac_clean_files=$ac_clean_files_save
ca81d7a0 3213# Check that the compiler produces executables we can run. If not, either
503d2be0 3214# the compiler is broken, or we cross compile.
b0448899
CY
3215{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3216echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3217{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3218echo "${ECHO_T}$cross_compiling" >&6; }
ca81d7a0 3219
b0448899
CY
3220{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3221echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
ca81d7a0
JD
3222if { (ac_try="$ac_link"
3223case "(($ac_try" in
3224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3225 *) ac_try_echo=$ac_try;;
3226esac
b0448899 3227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3228 (eval "$ac_link") 2>&5
503d2be0 3229 ac_status=$?
b0448899 3230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3231 (exit $ac_status); }; then
3232 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3233# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3234# work properly (i.e., refer to `conftest.exe'), while it won't with
3235# `rm'.
6bae0ccf
DL
3236for ac_file in conftest.exe conftest conftest.*; do
3237 test -f "$ac_file" || continue
503d2be0 3238 case $ac_file in
b0448899 3239 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3240 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3241 break;;
503d2be0
AS
3242 * ) break;;
3243 esac
3244done
ba4481b5 3245else
b0448899 3246 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
19650fd6 3247See \`config.log' for more details." >&5
b0448899 3248echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
19650fd6 3249See \`config.log' for more details." >&2;}
b0448899 3250 { (exit 1); exit 1; }; }
ba4481b5 3251fi
ba4481b5 3252
503d2be0 3253rm -f conftest$ac_cv_exeext
b0448899
CY
3254{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3255echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3256
503d2be0
AS
3257rm -f conftest.$ac_ext
3258EXEEXT=$ac_cv_exeext
3259ac_exeext=$EXEEXT
b0448899
CY
3260{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3261echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0 3262if test "${ac_cv_objext+set}" = set; then
b0448899 3263 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3264else
503d2be0 3265 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3266/* confdefs.h. */
3267_ACEOF
3268cat confdefs.h >>conftest.$ac_ext
3269cat >>conftest.$ac_ext <<_ACEOF
3270/* end confdefs.h. */
ba4481b5 3271
503d2be0
AS
3272int
3273main ()
3274{
ba4481b5 3275
503d2be0
AS
3276 ;
3277 return 0;
3278}
3279_ACEOF
3280rm -f conftest.o conftest.obj
ca81d7a0
JD
3281if { (ac_try="$ac_compile"
3282case "(($ac_try" in
3283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3284 *) ac_try_echo=$ac_try;;
3285esac
b0448899 3286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3287 (eval "$ac_compile") 2>&5
503d2be0 3288 ac_status=$?
b0448899 3289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3290 (exit $ac_status); }; then
ca81d7a0
JD
3291 for ac_file in conftest.o conftest.obj conftest.*; do
3292 test -f "$ac_file" || continue;
503d2be0 3293 case $ac_file in
b0448899 3294 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3295 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3296 break;;
3297 esac
3298done
c4bb2108 3299else
b0448899 3300 echo "$as_me: failed program was:" >&5
19650fd6
AS
3301sed 's/^/| /' conftest.$ac_ext >&5
3302
b0448899 3303{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
19650fd6 3304See \`config.log' for more details." >&5
b0448899 3305echo "$as_me: error: cannot compute suffix of object files: cannot compile
19650fd6 3306See \`config.log' for more details." >&2;}
b0448899 3307 { (exit 1); exit 1; }; }
c4bb2108
DL
3308fi
3309
503d2be0
AS
3310rm -f conftest.$ac_cv_objext conftest.$ac_ext
3311fi
b0448899
CY
3312{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3313echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3314OBJEXT=$ac_cv_objext
3315ac_objext=$OBJEXT
b0448899
CY
3316{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3317echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0 3318if test "${ac_cv_c_compiler_gnu+set}" = set; then
b0448899 3319 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3320else
503d2be0 3321 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3322/* confdefs.h. */
3323_ACEOF
3324cat confdefs.h >>conftest.$ac_ext
3325cat >>conftest.$ac_ext <<_ACEOF
3326/* end confdefs.h. */
503d2be0
AS
3327
3328int
3329main ()
3330{
3331#ifndef __GNUC__
3332 choke me
3333#endif
3334
3335 ;
3336 return 0;
3337}
3338_ACEOF
3339rm -f conftest.$ac_objext
ca81d7a0
JD
3340if { (ac_try="$ac_compile"
3341case "(($ac_try" in
3342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3343 *) ac_try_echo=$ac_try;;
3344esac
b0448899 3345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3346 (eval "$ac_compile") 2>conftest.er1
503d2be0 3347 ac_status=$?
edfaf76d
LK
3348 grep -v '^ *+' conftest.er1 >conftest.err
3349 rm -f conftest.er1
3350 cat conftest.err >&5
b0448899 3351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3352 (exit $ac_status); } && {
3353 test -z "$ac_c_werror_flag" ||
3354 test ! -s conftest.err
3355 } && test -s conftest.$ac_objext; then
503d2be0
AS
3356 ac_compiler_gnu=yes
3357else
b0448899 3358 echo "$as_me: failed program was:" >&5
19650fd6
AS
3359sed 's/^/| /' conftest.$ac_ext >&5
3360
ca81d7a0 3361 ac_compiler_gnu=no
503d2be0 3362fi
ca81d7a0
JD
3363
3364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3365ac_cv_c_compiler_gnu=$ac_compiler_gnu
3366
3367fi
b0448899
CY
3368{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3369echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3370GCC=`test $ac_compiler_gnu = yes && echo yes`
503d2be0
AS
3371ac_test_CFLAGS=${CFLAGS+set}
3372ac_save_CFLAGS=$CFLAGS
b0448899
CY
3373{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3374echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0 3375if test "${ac_cv_prog_cc_g+set}" = set; then
b0448899 3376 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 3377else
ca81d7a0
JD
3378 ac_save_c_werror_flag=$ac_c_werror_flag
3379 ac_c_werror_flag=yes
3380 ac_cv_prog_cc_g=no
3381 CFLAGS="-g"
3382 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3383/* confdefs.h. */
3384_ACEOF
3385cat confdefs.h >>conftest.$ac_ext
3386cat >>conftest.$ac_ext <<_ACEOF
3387/* end confdefs.h. */
503d2be0
AS
3388
3389int
3390main ()
3391{
3392
3393 ;
3394 return 0;
3395}
3396_ACEOF
3397rm -f conftest.$ac_objext
ca81d7a0
JD
3398if { (ac_try="$ac_compile"
3399case "(($ac_try" in
3400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401 *) ac_try_echo=$ac_try;;
3402esac
b0448899 3403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3404 (eval "$ac_compile") 2>conftest.er1
503d2be0 3405 ac_status=$?
edfaf76d
LK
3406 grep -v '^ *+' conftest.er1 >conftest.err
3407 rm -f conftest.er1
3408 cat conftest.err >&5
b0448899 3409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3410 (exit $ac_status); } && {
3411 test -z "$ac_c_werror_flag" ||
3412 test ! -s conftest.err
3413 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3414 ac_cv_prog_cc_g=yes
3415else
b0448899 3416 echo "$as_me: failed program was:" >&5
19650fd6
AS
3417sed 's/^/| /' conftest.$ac_ext >&5
3418
ca81d7a0
JD
3419 CFLAGS=""
3420 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3421/* confdefs.h. */
3422_ACEOF
3423cat confdefs.h >>conftest.$ac_ext
3424cat >>conftest.$ac_ext <<_ACEOF
3425/* end confdefs.h. */
edfaf76d 3426
6bae0ccf
DL
3427int
3428main ()
3429{
ca81d7a0 3430
6bae0ccf
DL
3431 ;
3432 return 0;
3433}
3434_ACEOF
ca81d7a0
JD
3435rm -f conftest.$ac_objext
3436if { (ac_try="$ac_compile"
3437case "(($ac_try" in
3438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439 *) ac_try_echo=$ac_try;;
3440esac
b0448899 3441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3442 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3443 ac_status=$?
edfaf76d
LK
3444 grep -v '^ *+' conftest.er1 >conftest.err
3445 rm -f conftest.er1
3446 cat conftest.err >&5
b0448899 3447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3448 (exit $ac_status); } && {
3449 test -z "$ac_c_werror_flag" ||
3450 test ! -s conftest.err
3451 } && test -s conftest.$ac_objext; then
ca81d7a0 3452 :
6bae0ccf 3453else
b0448899 3454 echo "$as_me: failed program was:" >&5
19650fd6
AS
3455sed 's/^/| /' conftest.$ac_ext >&5
3456
ca81d7a0
JD
3457 ac_c_werror_flag=$ac_save_c_werror_flag
3458 CFLAGS="-g"
3459 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3460/* confdefs.h. */
19650fd6
AS
3461_ACEOF
3462cat confdefs.h >>conftest.$ac_ext
3463cat >>conftest.$ac_ext <<_ACEOF
3464/* end confdefs.h. */
ca81d7a0 3465
503d2be0
AS
3466int
3467main ()
3468{
ca81d7a0 3469
503d2be0
AS
3470 ;
3471 return 0;
3472}
3473_ACEOF
3474rm -f conftest.$ac_objext
ca81d7a0
JD
3475if { (ac_try="$ac_compile"
3476case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
b0448899 3480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3481 (eval "$ac_compile") 2>conftest.er1
503d2be0 3482 ac_status=$?
edfaf76d
LK
3483 grep -v '^ *+' conftest.er1 >conftest.err
3484 rm -f conftest.er1
3485 cat conftest.err >&5
b0448899 3486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3487 (exit $ac_status); } && {
3488 test -z "$ac_c_werror_flag" ||
3489 test ! -s conftest.err
3490 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3491 ac_cv_prog_cc_g=yes
3492else
b0448899 3493 echo "$as_me: failed program was:" >&5
19650fd6
AS
3494sed 's/^/| /' conftest.$ac_ext >&5
3495
ca81d7a0 3496
ba4481b5 3497fi
ca81d7a0
JD
3498
3499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3500fi
3501
3502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3503fi
3504
3505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3506 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3507fi
b0448899
CY
3508{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3509echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3510if test "$ac_test_CFLAGS" = set; then
503d2be0 3511 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3512elif test $ac_cv_prog_cc_g = yes; then
3513 if test "$GCC" = yes; then
ba4481b5
DL
3514 CFLAGS="-g -O2"
3515 else
c4bb2108 3516 CFLAGS="-g"
ba4481b5 3517 fi
22afa6e8 3518else
c4bb2108
DL
3519 if test "$GCC" = yes; then
3520 CFLAGS="-O2"
3521 else
3522 CFLAGS=
3523 fi
ba4481b5 3524fi
b0448899
CY
3525{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3526echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
ca81d7a0 3527if test "${ac_cv_prog_cc_c89+set}" = set; then
b0448899 3528 echo $ECHO_N "(cached) $ECHO_C" >&6
6bae0ccf 3529else
ca81d7a0 3530 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3531ac_save_CC=$CC
3532cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3533/* confdefs.h. */
3534_ACEOF
3535cat confdefs.h >>conftest.$ac_ext
3536cat >>conftest.$ac_ext <<_ACEOF
3537/* end confdefs.h. */
6bae0ccf
DL
3538#include <stdarg.h>
3539#include <stdio.h>
3540#include <sys/types.h>
3541#include <sys/stat.h>
3542/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3543struct buf { int x; };
3544FILE * (*rcsopen) (struct buf *, struct stat *, int);
3545static char *e (p, i)
3546 char **p;
3547 int i;
3548{
3549 return p[i];
3550}
3551static char *f (char * (*g) (char **, int), char **p, ...)
3552{
3553 char *s;
3554 va_list v;
3555 va_start (v,p);
3556 s = g (p, va_arg (v,int));
3557 va_end (v);
3558 return s;
3559}
edfaf76d
LK
3560
3561/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3562 function prototypes and stuff, but not '\xHH' hex character constants.
3563 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3564 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3565 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3566 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3567 that's true only with -std. */
edfaf76d
LK
3568int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3569
ca81d7a0
JD
3570/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3571 inside strings and character constants. */
3572#define FOO(x) 'x'
3573int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3574
6bae0ccf
DL
3575int test (int i, double x);
3576struct s1 {int (*f) (int a);};
3577struct s2 {int (*f) (double a);};
3578int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3579int argc;
3580char **argv;
3581int
3582main ()
3583{
3584return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3585 ;
3586 return 0;
3587}
3588_ACEOF
ca81d7a0
JD
3589for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3590 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3591do
3592 CC="$ac_save_CC $ac_arg"
3593 rm -f conftest.$ac_objext
ca81d7a0
JD
3594if { (ac_try="$ac_compile"
3595case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598esac
b0448899 3599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3600 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3601 ac_status=$?
edfaf76d
LK
3602 grep -v '^ *+' conftest.er1 >conftest.err
3603 rm -f conftest.er1
3604 cat conftest.err >&5
b0448899 3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3606 (exit $ac_status); } && {
3607 test -z "$ac_c_werror_flag" ||
3608 test ! -s conftest.err
3609 } && test -s conftest.$ac_objext; then
ca81d7a0 3610 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf 3611else
b0448899 3612 echo "$as_me: failed program was:" >&5
19650fd6
AS
3613sed 's/^/| /' conftest.$ac_ext >&5
3614
ca81d7a0 3615
6bae0ccf 3616fi
ca81d7a0
JD
3617
3618rm -f core conftest.err conftest.$ac_objext
3619 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3620done
ca81d7a0 3621rm -f conftest.$ac_ext
6bae0ccf
DL
3622CC=$ac_save_CC
3623
3624fi
ca81d7a0
JD
3625# AC_CACHE_VAL
3626case "x$ac_cv_prog_cc_c89" in
3627 x)
b0448899
CY
3628 { echo "$as_me:$LINENO: result: none needed" >&5
3629echo "${ECHO_T}none needed" >&6; } ;;
ca81d7a0 3630 xno)
b0448899
CY
3631 { echo "$as_me:$LINENO: result: unsupported" >&5
3632echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3633 *)
ca81d7a0 3634 CC="$CC $ac_cv_prog_cc_c89"
b0448899
CY
3635 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3636echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3637esac
3638
19650fd6 3639
503d2be0
AS
3640ac_ext=c
3641ac_cpp='$CPP $CPPFLAGS'
3642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3644ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3645
c0d27fcc 3646
ba4481b5
DL
3647# On Suns, sometimes $CPP names a directory.
3648if test -n "$CPP" && test -d "$CPP"; then
3649 CPP=
3650fi
3651
089a966d
GM
3652## If not using gcc, and on Solaris, and no CPP specified, see if
3653## using a Sun compiler, which needs -Xs to prevent whitespace.
3654if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3655 test x"$CPP" = x; then
b0448899
CY
3656 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3657echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
089a966d
GM
3658
3659if test "${emacs_cv_sunpro_c+set}" = set; then
b0448899 3660 echo $ECHO_N "(cached) $ECHO_C" >&6
089a966d
GM
3661else
3662 cat >conftest.$ac_ext <<_ACEOF
3663/* confdefs.h. */
3664_ACEOF
3665cat confdefs.h >>conftest.$ac_ext
3666cat >>conftest.$ac_ext <<_ACEOF
3667/* end confdefs.h. */
3668
3669int
3670main ()
3671{
3672#ifndef __SUNPRO_C
3673fail;
3674#endif
3675
3676 ;
3677 return 0;
3678}
3679_ACEOF
3680rm -f conftest.$ac_objext conftest$ac_exeext
3681if { (ac_try="$ac_link"
3682case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
b0448899 3686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
089a966d
GM
3687 (eval "$ac_link") 2>conftest.er1
3688 ac_status=$?
3689 grep -v '^ *+' conftest.er1 >conftest.err
3690 rm -f conftest.er1
3691 cat conftest.err >&5
b0448899 3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
089a966d
GM
3693 (exit $ac_status); } && {
3694 test -z "$ac_c_werror_flag" ||
3695 test ! -s conftest.err
b0448899
CY
3696 } && test -s conftest$ac_exeext &&
3697 $as_test_x conftest$ac_exeext; then
089a966d
GM
3698 emacs_cv_sunpro_c=yes
3699else
b0448899 3700 echo "$as_me: failed program was:" >&5
089a966d
GM
3701sed 's/^/| /' conftest.$ac_ext >&5
3702
3703 emacs_cv_sunpro_c=no
3704fi
3705
3706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3707 conftest$ac_exeext conftest.$ac_ext
3708fi
3709
b0448899
CY
3710 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3711echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
089a966d
GM
3712
3713 if test x"$emacs_cv_sunpro_c" = xyes; then
3714 NON_GNU_CPP="$CC -E -Xs"
3715 fi
3716fi
3717
ba4481b5
DL
3718#### Some systems specify a CPP to use unless we are using GCC.
3719#### Now that we know whether we are using GCC, we can decide whether
3720#### to use that one.
3721if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3722then
3723 CPP="$NON_GNU_CPP"
3724fi
3725
3726#### Some systems specify a CC to use unless we are using GCC.
3727#### Now that we know whether we are using GCC, we can decide whether
3728#### to use that one.
3729if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3730 test x$cc_specified != xyes
3731then
3732 CC="$NON_GNU_CC"
3733fi
3734
3735if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3736then
3737 CC="$CC $GCC_TEST_OPTIONS"
3738fi
3739
3740if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3741then
3742 CC="$CC $NON_GCC_TEST_OPTIONS"
3743fi
3744
b0448899
CY
3745
3746cat >>confdefs.h <<\_ACEOF
3747#define _GNU_SOURCE 1
3748_ACEOF
3749
3750
e143ad11
AS
3751ac_ext=c
3752ac_cpp='$CPP $CPPFLAGS'
3753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3755ac_compiler_gnu=$ac_cv_c_compiler_gnu
b0448899
CY
3756{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3757echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3758# On Suns, sometimes $CPP names a directory.
3759if test -n "$CPP" && test -d "$CPP"; then
3760 CPP=
3761fi
3762if test -z "$CPP"; then
3763 if test "${ac_cv_prog_CPP+set}" = set; then
b0448899 3764 echo $ECHO_N "(cached) $ECHO_C" >&6
e143ad11
AS
3765else
3766 # Double quotes because CPP needs to be expanded
3767 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3768 do
3769 ac_preproc_ok=false
3770for ac_c_preproc_warn_flag in '' yes
3771do
3772 # Use a header file that comes with gcc, so configuring glibc
3773 # with a fresh cross-compiler works.
3774 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3775 # <limits.h> exists even on freestanding compilers.
3776 # On the NeXT, cc -E runs the code through the compiler's parser,
3777 # not just through cpp. "Syntax error" is here to catch this case.
3778 cat >conftest.$ac_ext <<_ACEOF
3779/* confdefs.h. */
3780_ACEOF
3781cat confdefs.h >>conftest.$ac_ext
3782cat >>conftest.$ac_ext <<_ACEOF
3783/* end confdefs.h. */
3784#ifdef __STDC__
3785# include <limits.h>
3786#else
3787# include <assert.h>
3788#endif
3789 Syntax error
3790_ACEOF
ca81d7a0
JD
3791if { (ac_try="$ac_cpp conftest.$ac_ext"
3792case "(($ac_try" in
3793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3794 *) ac_try_echo=$ac_try;;
3795esac
b0448899 3796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3797 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3798 ac_status=$?
3799 grep -v '^ *+' conftest.er1 >conftest.err
3800 rm -f conftest.er1
3801 cat conftest.err >&5
b0448899 3802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3803 (exit $ac_status); } >/dev/null && {
3804 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3805 test ! -s conftest.err
3806 }; then
e143ad11
AS
3807 :
3808else
b0448899 3809 echo "$as_me: failed program was:" >&5
e143ad11
AS
3810sed 's/^/| /' conftest.$ac_ext >&5
3811
3812 # Broken: fails on valid input.
3813continue
3814fi
ca81d7a0 3815
e143ad11
AS
3816rm -f conftest.err conftest.$ac_ext
3817
ca81d7a0 3818 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3819 # can be detected and how.
3820 cat >conftest.$ac_ext <<_ACEOF
3821/* confdefs.h. */
3822_ACEOF
3823cat confdefs.h >>conftest.$ac_ext
3824cat >>conftest.$ac_ext <<_ACEOF
3825/* end confdefs.h. */
3826#include <ac_nonexistent.h>
3827_ACEOF
ca81d7a0
JD
3828if { (ac_try="$ac_cpp conftest.$ac_ext"
3829case "(($ac_try" in
3830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3831 *) ac_try_echo=$ac_try;;
3832esac
b0448899 3833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3834 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3835 ac_status=$?
3836 grep -v '^ *+' conftest.er1 >conftest.err
3837 rm -f conftest.er1
3838 cat conftest.err >&5
b0448899 3839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3840 (exit $ac_status); } >/dev/null && {
3841 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3842 test ! -s conftest.err
3843 }; then
e143ad11
AS
3844 # Broken: success on invalid input.
3845continue
3846else
b0448899 3847 echo "$as_me: failed program was:" >&5
e143ad11
AS
3848sed 's/^/| /' conftest.$ac_ext >&5
3849
3850 # Passes both tests.
3851ac_preproc_ok=:
3852break
3853fi
ca81d7a0 3854
e143ad11
AS
3855rm -f conftest.err conftest.$ac_ext
3856
3857done
3858# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3859rm -f conftest.err conftest.$ac_ext
3860if $ac_preproc_ok; then
3861 break
3862fi
3863
3864 done
3865 ac_cv_prog_CPP=$CPP
3866
3867fi
3868 CPP=$ac_cv_prog_CPP
3869else
3870 ac_cv_prog_CPP=$CPP
3871fi
b0448899
CY
3872{ echo "$as_me:$LINENO: result: $CPP" >&5
3873echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3874ac_preproc_ok=false
3875for ac_c_preproc_warn_flag in '' yes
3876do
3877 # Use a header file that comes with gcc, so configuring glibc
3878 # with a fresh cross-compiler works.
3879 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3880 # <limits.h> exists even on freestanding compilers.
3881 # On the NeXT, cc -E runs the code through the compiler's parser,
3882 # not just through cpp. "Syntax error" is here to catch this case.
3883 cat >conftest.$ac_ext <<_ACEOF
3884/* confdefs.h. */
3885_ACEOF
3886cat confdefs.h >>conftest.$ac_ext
3887cat >>conftest.$ac_ext <<_ACEOF
3888/* end confdefs.h. */
3889#ifdef __STDC__
3890# include <limits.h>
3891#else
3892# include <assert.h>
3893#endif
3894 Syntax error
3895_ACEOF
ca81d7a0
JD
3896if { (ac_try="$ac_cpp conftest.$ac_ext"
3897case "(($ac_try" in
3898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3899 *) ac_try_echo=$ac_try;;
3900esac
b0448899 3901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3902 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3903 ac_status=$?
3904 grep -v '^ *+' conftest.er1 >conftest.err
3905 rm -f conftest.er1
3906 cat conftest.err >&5
b0448899 3907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3908 (exit $ac_status); } >/dev/null && {
3909 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3910 test ! -s conftest.err
3911 }; then
e143ad11
AS
3912 :
3913else
b0448899 3914 echo "$as_me: failed program was:" >&5
e143ad11
AS
3915sed 's/^/| /' conftest.$ac_ext >&5
3916
3917 # Broken: fails on valid input.
3918continue
3919fi
ca81d7a0 3920
e143ad11
AS
3921rm -f conftest.err conftest.$ac_ext
3922
ca81d7a0 3923 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3924 # can be detected and how.
3925 cat >conftest.$ac_ext <<_ACEOF
3926/* confdefs.h. */
3927_ACEOF
3928cat confdefs.h >>conftest.$ac_ext
3929cat >>conftest.$ac_ext <<_ACEOF
3930/* end confdefs.h. */
3931#include <ac_nonexistent.h>
3932_ACEOF
ca81d7a0
JD
3933if { (ac_try="$ac_cpp conftest.$ac_ext"
3934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
b0448899 3938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3940 ac_status=$?
3941 grep -v '^ *+' conftest.er1 >conftest.err
3942 rm -f conftest.er1
3943 cat conftest.err >&5
b0448899 3944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3945 (exit $ac_status); } >/dev/null && {
3946 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3947 test ! -s conftest.err
3948 }; then
e143ad11
AS
3949 # Broken: success on invalid input.
3950continue
3951else
b0448899 3952 echo "$as_me: failed program was:" >&5
e143ad11
AS
3953sed 's/^/| /' conftest.$ac_ext >&5
3954
3955 # Passes both tests.
3956ac_preproc_ok=:
3957break
3958fi
ca81d7a0 3959
e143ad11
AS
3960rm -f conftest.err conftest.$ac_ext
3961
3962done
3963# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3964rm -f conftest.err conftest.$ac_ext
3965if $ac_preproc_ok; then
3966 :
3967else
b0448899 3968 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
e143ad11 3969See \`config.log' for more details." >&5
b0448899 3970echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
e143ad11 3971See \`config.log' for more details." >&2;}
b0448899 3972 { (exit 1); exit 1; }; }
e143ad11
AS
3973fi
3974
3975ac_ext=c
3976ac_cpp='$CPP $CPPFLAGS'
3977ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3978ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3979ac_compiler_gnu=$ac_cv_c_compiler_gnu
3980
3981
b0448899
CY
3982{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3983echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
ca81d7a0 3984if test "${ac_cv_path_GREP+set}" = set; then
b0448899
CY
3985 echo $ECHO_N "(cached) $ECHO_C" >&6
3986else
3987 # Extract the first word of "grep ggrep" to use in msg output
3988if test -z "$GREP"; then
3989set dummy grep ggrep; ac_prog_name=$2
3990if test "${ac_cv_path_GREP+set}" = set; then
3991 echo $ECHO_N "(cached) $ECHO_C" >&6
ca81d7a0
JD
3992else
3993 ac_path_GREP_found=false
b0448899
CY
3994# Loop through the user's path and test for each of PROGNAME-LIST
3995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
3996for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3997do
3998 IFS=$as_save_IFS
3999 test -z "$as_dir" && as_dir=.
4000 for ac_prog in grep ggrep; do
b0448899
CY
4001 for ac_exec_ext in '' $ac_executable_extensions; do
4002 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4003 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4004 # Check for GNU ac_path_GREP and select it if it is found.
ca81d7a0
JD
4005 # Check for GNU $ac_path_GREP
4006case `"$ac_path_GREP" --version 2>&1` in
4007*GNU*)
4008 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4009*)
4010 ac_count=0
b0448899 4011 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
ca81d7a0
JD
4012 while :
4013 do
4014 cat "conftest.in" "conftest.in" >"conftest.tmp"
4015 mv "conftest.tmp" "conftest.in"
4016 cp "conftest.in" "conftest.nl"
b0448899 4017 echo 'GREP' >> "conftest.nl"
ca81d7a0
JD
4018 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4019 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4020 ac_count=`expr $ac_count + 1`
4021 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4022 # Best one so far, save it but keep looking for a better one
4023 ac_cv_path_GREP="$ac_path_GREP"
4024 ac_path_GREP_max=$ac_count
4025 fi
4026 # 10*(2^10) chars as input seems more than enough
4027 test $ac_count -gt 10 && break
4028 done
4029 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4030esac
4031
b0448899
CY
4032
4033 $ac_path_GREP_found && break 3
ca81d7a0
JD
4034 done
4035done
b0448899
CY
4036
4037done
ca81d7a0 4038IFS=$as_save_IFS
b0448899
CY
4039
4040
4041fi
4042
4043GREP="$ac_cv_path_GREP"
4044if test -z "$GREP"; then
4045 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4046echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
ca81d7a0 4047 { (exit 1); exit 1; }; }
b0448899
CY
4048fi
4049
ca81d7a0
JD
4050else
4051 ac_cv_path_GREP=$GREP
4052fi
4053
b0448899 4054
ca81d7a0 4055fi
b0448899
CY
4056{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4057echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
ca81d7a0
JD
4058 GREP="$ac_cv_path_GREP"
4059
4060
b0448899
CY
4061{ echo "$as_me:$LINENO: checking for egrep" >&5
4062echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
ca81d7a0 4063if test "${ac_cv_path_EGREP+set}" = set; then
b0448899 4064 echo $ECHO_N "(cached) $ECHO_C" >&6
e143ad11 4065else
ca81d7a0
JD
4066 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4067 then ac_cv_path_EGREP="$GREP -E"
4068 else
b0448899
CY
4069 # Extract the first word of "egrep" to use in msg output
4070if test -z "$EGREP"; then
4071set dummy egrep; ac_prog_name=$2
4072if test "${ac_cv_path_EGREP+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
4074else
ca81d7a0 4075 ac_path_EGREP_found=false
b0448899
CY
4076# Loop through the user's path and test for each of PROGNAME-LIST
4077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
4078for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4079do
4080 IFS=$as_save_IFS
4081 test -z "$as_dir" && as_dir=.
4082 for ac_prog in egrep; do
b0448899
CY
4083 for ac_exec_ext in '' $ac_executable_extensions; do
4084 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4085 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4086 # Check for GNU ac_path_EGREP and select it if it is found.
ca81d7a0
JD
4087 # Check for GNU $ac_path_EGREP
4088case `"$ac_path_EGREP" --version 2>&1` in
4089*GNU*)
4090 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4091*)
4092 ac_count=0
b0448899 4093 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
ca81d7a0
JD
4094 while :
4095 do
4096 cat "conftest.in" "conftest.in" >"conftest.tmp"
4097 mv "conftest.tmp" "conftest.in"
4098 cp "conftest.in" "conftest.nl"
b0448899 4099 echo 'EGREP' >> "conftest.nl"
ca81d7a0
JD
4100 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4101 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4102 ac_count=`expr $ac_count + 1`
4103 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4104 # Best one so far, save it but keep looking for a better one
4105 ac_cv_path_EGREP="$ac_path_EGREP"
4106 ac_path_EGREP_max=$ac_count
e143ad11 4107 fi
ca81d7a0
JD
4108 # 10*(2^10) chars as input seems more than enough
4109 test $ac_count -gt 10 && break
4110 done
4111 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4112esac
4113
b0448899
CY
4114
4115 $ac_path_EGREP_found && break 3
ca81d7a0
JD
4116 done
4117done
b0448899
CY
4118
4119done
ca81d7a0 4120IFS=$as_save_IFS
b0448899
CY
4121
4122
4123fi
4124
4125EGREP="$ac_cv_path_EGREP"
4126if test -z "$EGREP"; then
4127 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4128echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
ca81d7a0 4129 { (exit 1); exit 1; }; }
b0448899
CY
4130fi
4131
ca81d7a0
JD
4132else
4133 ac_cv_path_EGREP=$EGREP
4134fi
e143ad11 4135
b0448899 4136
ca81d7a0 4137 fi
8eeae1c9 4138fi
b0448899
CY
4139{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4140echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
ca81d7a0 4141 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4142
4143
b0448899
CY
4144
4145{ echo "$as_me:$LINENO: checking for AIX" >&5
4146echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
4147cat >conftest.$ac_ext <<_ACEOF
4148/* confdefs.h. */
4149_ACEOF
4150cat confdefs.h >>conftest.$ac_ext
4151cat >>conftest.$ac_ext <<_ACEOF
4152/* end confdefs.h. */
4153#ifdef _AIX
4154 yes
4155#endif
4156
4157_ACEOF
4158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4159 $EGREP "yes" >/dev/null 2>&1; then
4160 { echo "$as_me:$LINENO: result: yes" >&5
4161echo "${ECHO_T}yes" >&6; }
4162cat >>confdefs.h <<\_ACEOF
4163#define _ALL_SOURCE 1
4164_ACEOF
4165
4166else
4167 { echo "$as_me:$LINENO: result: no" >&5
4168echo "${ECHO_T}no" >&6; }
4169fi
4170rm -f conftest*
4171
4172
4173{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4174echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
a51f4969 4175if test "${ac_cv_header_stdc+set}" = set; then
b0448899 4176 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4177else
4178 cat >conftest.$ac_ext <<_ACEOF
4179/* confdefs.h. */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h. */
4184#include <stdlib.h>
4185#include <stdarg.h>
4186#include <string.h>
4187#include <float.h>
4188
4189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
4197rm -f conftest.$ac_objext
4198if { (ac_try="$ac_compile"
4199case "(($ac_try" in
4200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4201 *) ac_try_echo=$ac_try;;
4202esac
b0448899 4203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4204 (eval "$ac_compile") 2>conftest.er1
4205 ac_status=$?
4206 grep -v '^ *+' conftest.er1 >conftest.err
4207 rm -f conftest.er1
4208 cat conftest.err >&5
b0448899 4209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4210 (exit $ac_status); } && {
4211 test -z "$ac_c_werror_flag" ||
4212 test ! -s conftest.err
4213 } && test -s conftest.$ac_objext; then
4214 ac_cv_header_stdc=yes
4215else
b0448899 4216 echo "$as_me: failed program was:" >&5
a51f4969
SM
4217sed 's/^/| /' conftest.$ac_ext >&5
4218
4219 ac_cv_header_stdc=no
4220fi
4221
4222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4223
4224if test $ac_cv_header_stdc = yes; then
4225 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4226 cat >conftest.$ac_ext <<_ACEOF
4227/* confdefs.h. */
4228_ACEOF
4229cat confdefs.h >>conftest.$ac_ext
4230cat >>conftest.$ac_ext <<_ACEOF
4231/* end confdefs.h. */
4232#include <string.h>
4233
4234_ACEOF
4235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4236 $EGREP "memchr" >/dev/null 2>&1; then
4237 :
4238else
4239 ac_cv_header_stdc=no
4240fi
4241rm -f conftest*
4242
4243fi
4244
4245if test $ac_cv_header_stdc = yes; then
4246 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
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 <stdlib.h>
4254
4255_ACEOF
4256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4257 $EGREP "free" >/dev/null 2>&1; then
4258 :
4259else
4260 ac_cv_header_stdc=no
4261fi
4262rm -f conftest*
4263
4264fi
4265
4266if test $ac_cv_header_stdc = yes; then
4267 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4268 if test "$cross_compiling" = yes; then
4269 :
4270else
4271 cat >conftest.$ac_ext <<_ACEOF
4272/* confdefs.h. */
4273_ACEOF
4274cat confdefs.h >>conftest.$ac_ext
4275cat >>conftest.$ac_ext <<_ACEOF
4276/* end confdefs.h. */
4277#include <ctype.h>
4278#include <stdlib.h>
4279#if ((' ' & 0x0FF) == 0x020)
4280# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4281# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4282#else
4283# define ISLOWER(c) \
4284 (('a' <= (c) && (c) <= 'i') \
4285 || ('j' <= (c) && (c) <= 'r') \
4286 || ('s' <= (c) && (c) <= 'z'))
4287# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4288#endif
4289
4290#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4291int
4292main ()
4293{
4294 int i;
4295 for (i = 0; i < 256; i++)
4296 if (XOR (islower (i), ISLOWER (i))
4297 || toupper (i) != TOUPPER (i))
4298 return 2;
4299 return 0;
4300}
4301_ACEOF
4302rm -f conftest$ac_exeext
4303if { (ac_try="$ac_link"
4304case "(($ac_try" in
4305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4306 *) ac_try_echo=$ac_try;;
4307esac
b0448899 4308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4309 (eval "$ac_link") 2>&5
4310 ac_status=$?
b0448899 4311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4313 { (case "(($ac_try" in
4314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4315 *) ac_try_echo=$ac_try;;
4316esac
b0448899 4317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4318 (eval "$ac_try") 2>&5
4319 ac_status=$?
b0448899 4320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4321 (exit $ac_status); }; }; then
4322 :
4323else
b0448899
CY
4324 echo "$as_me: program exited with status $ac_status" >&5
4325echo "$as_me: failed program was:" >&5
a51f4969
SM
4326sed 's/^/| /' conftest.$ac_ext >&5
4327
4328( exit $ac_status )
4329ac_cv_header_stdc=no
4330fi
4331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4332fi
4333
4334
4335fi
4336fi
b0448899
CY
4337{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4338echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
a51f4969
SM
4339if test $ac_cv_header_stdc = yes; then
4340
4341cat >>confdefs.h <<\_ACEOF
4342#define STDC_HEADERS 1
4343_ACEOF
4344
4345fi
4346
4347# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4358 inttypes.h stdint.h unistd.h
4359do
b0448899
CY
4360as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4361{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4362echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
a51f4969 4363if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 4364 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4365else
4366 cat >conftest.$ac_ext <<_ACEOF
4367/* confdefs.h. */
4368_ACEOF
4369cat confdefs.h >>conftest.$ac_ext
4370cat >>conftest.$ac_ext <<_ACEOF
4371/* end confdefs.h. */
4372$ac_includes_default
4373
4374#include <$ac_header>
4375_ACEOF
4376rm -f conftest.$ac_objext
4377if { (ac_try="$ac_compile"
4378case "(($ac_try" in
4379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4380 *) ac_try_echo=$ac_try;;
4381esac
b0448899 4382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4383 (eval "$ac_compile") 2>conftest.er1
4384 ac_status=$?
4385 grep -v '^ *+' conftest.er1 >conftest.err
4386 rm -f conftest.er1
4387 cat conftest.err >&5
b0448899 4388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4389 (exit $ac_status); } && {
4390 test -z "$ac_c_werror_flag" ||
4391 test ! -s conftest.err
4392 } && test -s conftest.$ac_objext; then
4393 eval "$as_ac_Header=yes"
4394else
b0448899 4395 echo "$as_me: failed program was:" >&5
a51f4969
SM
4396sed 's/^/| /' conftest.$ac_ext >&5
4397
4398 eval "$as_ac_Header=no"
4399fi
4400
4401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4402fi
b0448899
CY
4403ac_res=`eval echo '${'$as_ac_Header'}'`
4404 { echo "$as_me:$LINENO: result: $ac_res" >&5
4405echo "${ECHO_T}$ac_res" >&6; }
4406if test `eval echo '${'$as_ac_Header'}'` = yes; then
a51f4969 4407 cat >>confdefs.h <<_ACEOF
b0448899 4408#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a51f4969
SM
4409_ACEOF
4410
4411fi
4412
4413done
4414
4415
4416if test "${ac_cv_header_minix_config_h+set}" = set; then
b0448899
CY
4417 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4418echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4419if test "${ac_cv_header_minix_config_h+set}" = set; then
4420 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969 4421fi
b0448899
CY
4422{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4423echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
a51f4969
SM
4424else
4425 # Is the header compilable?
b0448899
CY
4426{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4427echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
a51f4969
SM
4428cat >conftest.$ac_ext <<_ACEOF
4429/* confdefs.h. */
4430_ACEOF
4431cat confdefs.h >>conftest.$ac_ext
4432cat >>conftest.$ac_ext <<_ACEOF
4433/* end confdefs.h. */
4434$ac_includes_default
4435#include <minix/config.h>
4436_ACEOF
4437rm -f conftest.$ac_objext
4438if { (ac_try="$ac_compile"
4439case "(($ac_try" in
4440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4441 *) ac_try_echo=$ac_try;;
4442esac
b0448899 4443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4444 (eval "$ac_compile") 2>conftest.er1
4445 ac_status=$?
4446 grep -v '^ *+' conftest.er1 >conftest.err
4447 rm -f conftest.er1
4448 cat conftest.err >&5
b0448899 4449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4450 (exit $ac_status); } && {
4451 test -z "$ac_c_werror_flag" ||
4452 test ! -s conftest.err
4453 } && test -s conftest.$ac_objext; then
4454 ac_header_compiler=yes
4455else
b0448899 4456 echo "$as_me: failed program was:" >&5
a51f4969
SM
4457sed 's/^/| /' conftest.$ac_ext >&5
4458
4459 ac_header_compiler=no
4460fi
4461
4462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
4463{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4464echo "${ECHO_T}$ac_header_compiler" >&6; }
a51f4969
SM
4465
4466# Is the header present?
b0448899
CY
4467{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4468echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
a51f4969
SM
4469cat >conftest.$ac_ext <<_ACEOF
4470/* confdefs.h. */
4471_ACEOF
4472cat confdefs.h >>conftest.$ac_ext
4473cat >>conftest.$ac_ext <<_ACEOF
4474/* end confdefs.h. */
4475#include <minix/config.h>
4476_ACEOF
4477if { (ac_try="$ac_cpp conftest.$ac_ext"
4478case "(($ac_try" in
4479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4480 *) ac_try_echo=$ac_try;;
4481esac
b0448899 4482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4483 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4484 ac_status=$?
4485 grep -v '^ *+' conftest.er1 >conftest.err
4486 rm -f conftest.er1
4487 cat conftest.err >&5
b0448899 4488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4489 (exit $ac_status); } >/dev/null && {
4490 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4491 test ! -s conftest.err
4492 }; then
4493 ac_header_preproc=yes
4494else
b0448899 4495 echo "$as_me: failed program was:" >&5
a51f4969
SM
4496sed 's/^/| /' conftest.$ac_ext >&5
4497
4498 ac_header_preproc=no
4499fi
4500
4501rm -f conftest.err conftest.$ac_ext
b0448899
CY
4502{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4503echo "${ECHO_T}$ac_header_preproc" >&6; }
a51f4969
SM
4504
4505# So? What about this header?
4506case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4507 yes:no: )
b0448899
CY
4508 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4509echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4510 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4511echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
a51f4969
SM
4512 ac_header_preproc=yes
4513 ;;
4514 no:yes:* )
b0448899
CY
4515 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4516echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4517 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4518echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4519 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4520echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4521 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4522echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4523 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4524echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4525 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4526echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
a51f4969
SM
4527
4528 ;;
4529esac
b0448899
CY
4530{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4531echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
a51f4969 4532if test "${ac_cv_header_minix_config_h+set}" = set; then
b0448899 4533 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4534else
4535 ac_cv_header_minix_config_h=$ac_header_preproc
4536fi
b0448899
CY
4537{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4538echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
a51f4969
SM
4539
4540fi
b0448899 4541if test $ac_cv_header_minix_config_h = yes; then
a51f4969
SM
4542 MINIX=yes
4543else
4544 MINIX=
4545fi
4546
4547
b0448899 4548if test "$MINIX" = yes; then
a51f4969
SM
4549
4550cat >>confdefs.h <<\_ACEOF
4551#define _POSIX_SOURCE 1
4552_ACEOF
4553
4554
4555cat >>confdefs.h <<\_ACEOF
4556#define _POSIX_1_SOURCE 2
4557_ACEOF
4558
4559
4560cat >>confdefs.h <<\_ACEOF
4561#define _MINIX 1
4562_ACEOF
4563
b0448899
CY
4564fi
4565
4566
4567
4568
4569
4570
a51f4969
SM
4571
4572
4573
b0448899
CY
4574
4575
4576 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4577echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
a51f4969 4578if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
b0448899 4579 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4580else
4581 cat >conftest.$ac_ext <<_ACEOF
4582/* confdefs.h. */
4583_ACEOF
4584cat confdefs.h >>conftest.$ac_ext
4585cat >>conftest.$ac_ext <<_ACEOF
4586/* end confdefs.h. */
4587
4588# define __EXTENSIONS__ 1
4589 $ac_includes_default
4590int
4591main ()
4592{
4593
4594 ;
4595 return 0;
4596}
4597_ACEOF
4598rm -f conftest.$ac_objext
4599if { (ac_try="$ac_compile"
4600case "(($ac_try" in
4601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4602 *) ac_try_echo=$ac_try;;
4603esac
b0448899 4604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4605 (eval "$ac_compile") 2>conftest.er1
4606 ac_status=$?
4607 grep -v '^ *+' conftest.er1 >conftest.err
4608 rm -f conftest.er1
4609 cat conftest.err >&5
b0448899 4610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4611 (exit $ac_status); } && {
4612 test -z "$ac_c_werror_flag" ||
4613 test ! -s conftest.err
4614 } && test -s conftest.$ac_objext; then
4615 ac_cv_safe_to_define___extensions__=yes
4616else
b0448899 4617 echo "$as_me: failed program was:" >&5
a51f4969
SM
4618sed 's/^/| /' conftest.$ac_ext >&5
4619
4620 ac_cv_safe_to_define___extensions__=no
4621fi
e143ad11 4622
a51f4969
SM
4623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4624fi
b0448899
CY
4625{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4626echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
a51f4969
SM
4627 test $ac_cv_safe_to_define___extensions__ = yes &&
4628 cat >>confdefs.h <<\_ACEOF
4629#define __EXTENSIONS__ 1
4630_ACEOF
e143ad11 4631
a51f4969
SM
4632 cat >>confdefs.h <<\_ACEOF
4633#define _POSIX_PTHREAD_SEMANTICS 1
4634_ACEOF
e143ad11 4635
a51f4969
SM
4636 cat >>confdefs.h <<\_ACEOF
4637#define _TANDEM_SOURCE 1
e143ad11
AS
4638_ACEOF
4639
4640
4641
01abe918 4642### Use -Wno-pointer-sign if the compiler supports it
b0448899
CY
4643{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4644echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4645SAVE_CFLAGS="$CFLAGS"
4646CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4647cat >conftest.$ac_ext <<_ACEOF
4648/* confdefs.h. */
4649_ACEOF
4650cat confdefs.h >>conftest.$ac_ext
4651cat >>conftest.$ac_ext <<_ACEOF
4652/* end confdefs.h. */
4653
4654int
4655main ()
4656{
4657
4658 ;
4659 return 0;
4660}
4661_ACEOF
4662rm -f conftest.$ac_objext
ca81d7a0
JD
4663if { (ac_try="$ac_compile"
4664case "(($ac_try" in
4665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4666 *) ac_try_echo=$ac_try;;
4667esac
b0448899 4668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4669 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4670 ac_status=$?
4671 grep -v '^ *+' conftest.er1 >conftest.err
4672 rm -f conftest.er1
4673 cat conftest.err >&5
b0448899 4674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4675 (exit $ac_status); } && {
4676 test -z "$ac_c_werror_flag" ||
4677 test ! -s conftest.err
4678 } && test -s conftest.$ac_objext; then
01abe918
CY
4679 has_option=yes
4680else
b0448899 4681 echo "$as_me: failed program was:" >&5
01abe918
CY
4682sed 's/^/| /' conftest.$ac_ext >&5
4683
ca81d7a0 4684 has_option=no
01abe918 4685fi
ca81d7a0
JD
4686
4687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4688if test $has_option = yes; then
4689 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4690fi
b0448899
CY
4691{ echo "$as_me:$LINENO: result: $has_option" >&5
4692echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4693CFLAGS="$SAVE_CFLAGS"
4694unset has_option
4695unset SAVE_CFLAGS
4696
6a3a24fa 4697#### Some other nice autoconf tests.
ba4481b5 4698
b0448899
CY
4699{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4700echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4701LN_S=$as_ln_s
4702if test "$LN_S" = "ln -s"; then
b0448899
CY
4703 { echo "$as_me:$LINENO: result: yes" >&5
4704echo "${ECHO_T}yes" >&6; }
ba4481b5 4705else
b0448899
CY
4706 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4707echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4708fi
4709
503d2be0
AS
4710ac_ext=c
4711ac_cpp='$CPP $CPPFLAGS'
4712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4714ac_compiler_gnu=$ac_cv_c_compiler_gnu
b0448899
CY
4715{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4716echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4717# On Suns, sometimes $CPP names a directory.
4718if test -n "$CPP" && test -d "$CPP"; then
4719 CPP=
4720fi
4721if test -z "$CPP"; then
503d2be0 4722 if test "${ac_cv_prog_CPP+set}" = set; then
b0448899 4723 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
4724else
4725 # Double quotes because CPP needs to be expanded
4726 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4727 do
4728 ac_preproc_ok=false
4729for ac_c_preproc_warn_flag in '' yes
4730do
4731 # Use a header file that comes with gcc, so configuring glibc
4732 # with a fresh cross-compiler works.
19650fd6
AS
4733 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4734 # <limits.h> exists even on freestanding compilers.
ba4481b5 4735 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4736 # not just through cpp. "Syntax error" is here to catch this case.
4737 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4738/* confdefs.h. */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h. */
4743#ifdef __STDC__
4744# include <limits.h>
4745#else
4746# include <assert.h>
4747#endif
edfaf76d 4748 Syntax error
503d2be0 4749_ACEOF
ca81d7a0
JD
4750if { (ac_try="$ac_cpp conftest.$ac_ext"
4751case "(($ac_try" in
4752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4753 *) ac_try_echo=$ac_try;;
4754esac
b0448899 4755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4756 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4757 ac_status=$?
6bae0ccf 4758 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4759 rm -f conftest.er1
4760 cat conftest.err >&5
b0448899 4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4762 (exit $ac_status); } >/dev/null && {
4763 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4764 test ! -s conftest.err
4765 }; then
ba4481b5
DL
4766 :
4767else
b0448899 4768 echo "$as_me: failed program was:" >&5
19650fd6
AS
4769sed 's/^/| /' conftest.$ac_ext >&5
4770
503d2be0
AS
4771 # Broken: fails on valid input.
4772continue
4773fi
ca81d7a0 4774
503d2be0
AS
4775rm -f conftest.err conftest.$ac_ext
4776
ca81d7a0 4777 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4778 # can be detected and how.
4779 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4780/* confdefs.h. */
4781_ACEOF
4782cat confdefs.h >>conftest.$ac_ext
4783cat >>conftest.$ac_ext <<_ACEOF
4784/* end confdefs.h. */
503d2be0
AS
4785#include <ac_nonexistent.h>
4786_ACEOF
ca81d7a0
JD
4787if { (ac_try="$ac_cpp conftest.$ac_ext"
4788case "(($ac_try" in
4789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4790 *) ac_try_echo=$ac_try;;
4791esac
b0448899 4792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4793 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4794 ac_status=$?
6bae0ccf 4795 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4796 rm -f conftest.er1
4797 cat conftest.err >&5
b0448899 4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4799 (exit $ac_status); } >/dev/null && {
4800 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4801 test ! -s conftest.err
4802 }; then
503d2be0
AS
4803 # Broken: success on invalid input.
4804continue
c4bb2108 4805else
b0448899 4806 echo "$as_me: failed program was:" >&5
19650fd6
AS
4807sed 's/^/| /' conftest.$ac_ext >&5
4808
503d2be0
AS
4809 # Passes both tests.
4810ac_preproc_ok=:
4811break
4812fi
ca81d7a0 4813
503d2be0
AS
4814rm -f conftest.err conftest.$ac_ext
4815
4816done
4817# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4818rm -f conftest.err conftest.$ac_ext
4819if $ac_preproc_ok; then
4820 break
4821fi
4822
4823 done
4824 ac_cv_prog_CPP=$CPP
4825
4826fi
4827 CPP=$ac_cv_prog_CPP
4828else
4829 ac_cv_prog_CPP=$CPP
4830fi
b0448899
CY
4831{ echo "$as_me:$LINENO: result: $CPP" >&5
4832echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4833ac_preproc_ok=false
4834for ac_c_preproc_warn_flag in '' yes
4835do
4836 # Use a header file that comes with gcc, so configuring glibc
4837 # with a fresh cross-compiler works.
19650fd6
AS
4838 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4839 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4840 # On the NeXT, cc -E runs the code through the compiler's parser,
4841 # not just through cpp. "Syntax error" is here to catch this case.
4842 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4843/* confdefs.h. */
4844_ACEOF
4845cat confdefs.h >>conftest.$ac_ext
4846cat >>conftest.$ac_ext <<_ACEOF
4847/* end confdefs.h. */
4848#ifdef __STDC__
4849# include <limits.h>
4850#else
4851# include <assert.h>
4852#endif
edfaf76d 4853 Syntax error
503d2be0 4854_ACEOF
ca81d7a0
JD
4855if { (ac_try="$ac_cpp conftest.$ac_ext"
4856case "(($ac_try" in
4857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4858 *) ac_try_echo=$ac_try;;
4859esac
b0448899 4860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4861 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4862 ac_status=$?
6bae0ccf 4863 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4864 rm -f conftest.er1
4865 cat conftest.err >&5
b0448899 4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4867 (exit $ac_status); } >/dev/null && {
4868 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4869 test ! -s conftest.err
4870 }; then
ba4481b5
DL
4871 :
4872else
b0448899 4873 echo "$as_me: failed program was:" >&5
19650fd6
AS
4874sed 's/^/| /' conftest.$ac_ext >&5
4875
503d2be0
AS
4876 # Broken: fails on valid input.
4877continue
4878fi
ca81d7a0 4879
503d2be0
AS
4880rm -f conftest.err conftest.$ac_ext
4881
ca81d7a0 4882 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4883 # can be detected and how.
4884 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
503d2be0
AS
4890#include <ac_nonexistent.h>
4891_ACEOF
ca81d7a0
JD
4892if { (ac_try="$ac_cpp conftest.$ac_ext"
4893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
b0448899 4897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4898 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4899 ac_status=$?
6bae0ccf 4900 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4901 rm -f conftest.er1
4902 cat conftest.err >&5
b0448899 4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4904 (exit $ac_status); } >/dev/null && {
4905 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4906 test ! -s conftest.err
4907 }; then
503d2be0
AS
4908 # Broken: success on invalid input.
4909continue
4910else
b0448899 4911 echo "$as_me: failed program was:" >&5
19650fd6
AS
4912sed 's/^/| /' conftest.$ac_ext >&5
4913
503d2be0
AS
4914 # Passes both tests.
4915ac_preproc_ok=:
4916break
ba4481b5 4917fi
ca81d7a0 4918
503d2be0
AS
4919rm -f conftest.err conftest.$ac_ext
4920
4921done
4922# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4923rm -f conftest.err conftest.$ac_ext
4924if $ac_preproc_ok; then
4925 :
ba4481b5 4926else
b0448899 4927 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
19650fd6 4928See \`config.log' for more details." >&5
b0448899 4929echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
19650fd6 4930See \`config.log' for more details." >&2;}
b0448899 4931 { (exit 1); exit 1; }; }
ba4481b5 4932fi
503d2be0
AS
4933
4934ac_ext=c
4935ac_cpp='$CPP $CPPFLAGS'
4936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4938ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4939
4940# Find a good install program. We prefer a C program (faster),
4941# so one script is as good as another. But avoid the broken or
4942# incompatible versions:
4943# SysV /etc/install, /usr/sbin/install
4944# SunOS /usr/etc/install
4945# IRIX /sbin/install
4946# AIX /bin/install
503d2be0 4947# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4948# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4949# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4950# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4951# OS/2's system install, which has a completely different semantic
ba4481b5 4952# ./install, which can be erroneously created by make from ./install.sh.
b0448899
CY
4953{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4954echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4955if test -z "$INSTALL"; then
503d2be0 4956if test "${ac_cv_path_install+set}" = set; then
b0448899 4957 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4958else
c0d27fcc
MR
4959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
4964 # Account for people who put trailing slashes in PATH elements.
4965case $as_dir/ in
4966 ./ | .// | /cC/* | \
4967 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4968 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4969 /usr/ucb/* ) ;;
4970 *)
4971 # OSF1 and SCO ODT 3.0 have their own names for install.
4972 # Don't use installbsd from OSF since it installs stuff as root
4973 # by default.
4974 for ac_prog in ginstall scoinst install; do
4975 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4976 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4977 if test $ac_prog = install &&
4978 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4979 # AIX install. It has an incompatible calling convention.
4980 :
4981 elif test $ac_prog = install &&
4982 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4983 # program-specific install script used by HP pwplus--don't use.
4984 :
4985 else
b0448899
CY
4986 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4987 break 3
edfaf76d
LK
4988 fi
4989 fi
ba4481b5 4990 done
c0d27fcc
MR
4991 done
4992 ;;
4993esac
4994done
ca81d7a0 4995IFS=$as_save_IFS
c0d27fcc 4996
ba4481b5
DL
4997
4998fi
4999 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5000 INSTALL=$ac_cv_path_install
ba4481b5 5001 else
ca81d7a0
JD
5002 # As a last resort, use the slow shell script. Don't cache a
5003 # value for INSTALL within a source directory, because that will
ba4481b5 5004 # break other packages using the cache if that directory is
ca81d7a0 5005 # removed, or if the value is a relative name.
503d2be0 5006 INSTALL=$ac_install_sh
ba4481b5
DL
5007 fi
5008fi
b0448899
CY
5009{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5010echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5011
5012# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5013# It thinks the first close brace ends the variable substitution.
5014test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5015
503d2be0 5016test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5017
ba4481b5
DL
5018test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5019
c0d27fcc
MR
5020if test "x$RANLIB" = x; then
5021 if test -n "$ac_tool_prefix"; then
5022 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5023set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b0448899
CY
5024{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5025echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5026if test "${ac_cv_prog_RANLIB+set}" = set; then
b0448899 5027 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5028else
5029 if test -n "$RANLIB"; then
5030 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5031else
c0d27fcc
MR
5032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5033for as_dir in $PATH
5034do
5035 IFS=$as_save_IFS
5036 test -z "$as_dir" && as_dir=.
5037 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5039 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
b0448899 5040 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5041 break 2
5042 fi
5043done
503d2be0 5044done
ca81d7a0 5045IFS=$as_save_IFS
503d2be0 5046
7397acc4
DL
5047fi
5048fi
503d2be0 5049RANLIB=$ac_cv_prog_RANLIB
7397acc4 5050if test -n "$RANLIB"; then
b0448899
CY
5051 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5052echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5053else
b0448899
CY
5054 { echo "$as_me:$LINENO: result: no" >&5
5055echo "${ECHO_T}no" >&6; }
503d2be0
AS
5056fi
5057
ca81d7a0 5058
503d2be0
AS
5059fi
5060if test -z "$ac_cv_prog_RANLIB"; then
5061 ac_ct_RANLIB=$RANLIB
5062 # Extract the first word of "ranlib", so it can be a program name with args.
5063set dummy ranlib; ac_word=$2
b0448899
CY
5064{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5065echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 5066if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
b0448899 5067 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
5068else
5069 if test -n "$ac_ct_RANLIB"; then
5070 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5071else
c0d27fcc
MR
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075 IFS=$as_save_IFS
5076 test -z "$as_dir" && as_dir=.
5077 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5078 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5079 ac_cv_prog_ac_ct_RANLIB="ranlib"
b0448899 5080 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5081 break 2
5082 fi
5083done
503d2be0 5084done
ca81d7a0 5085IFS=$as_save_IFS
503d2be0 5086
503d2be0
AS
5087fi
5088fi
5089ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5090if test -n "$ac_ct_RANLIB"; then
b0448899
CY
5091 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5092echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5093else
b0448899
CY
5094 { echo "$as_me:$LINENO: result: no" >&5
5095echo "${ECHO_T}no" >&6; }
503d2be0
AS
5096fi
5097
ca81d7a0
JD
5098 if test "x$ac_ct_RANLIB" = x; then
5099 RANLIB=":"
5100 else
5101 case $cross_compiling:$ac_tool_warned in
5102yes:)
b0448899
CY
5103{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5104whose name does not start with the host triplet. If you think this
5105configuration is useful to you, please write to autoconf@gnu.org." >&5
5106echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5107whose name does not start with the host triplet. If you think this
5108configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ca81d7a0
JD
5109ac_tool_warned=yes ;;
5110esac
5111 RANLIB=$ac_ct_RANLIB
5112 fi
7397acc4 5113else
503d2be0 5114 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5115fi
5116
5117fi
9e71690e
DK
5118# Extract the first word of "install-info", so it can be a program name with args.
5119set dummy install-info; ac_word=$2
b0448899
CY
5120{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5121echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e 5122if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
b0448899 5123 echo $ECHO_N "(cached) $ECHO_C" >&6
9e71690e
DK
5124else
5125 case $INSTALL_INFO in
5126 [\\/]* | ?:[\\/]*)
5127 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5128 ;;
5129 *)
5130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133 IFS=$as_save_IFS
5134 test -z "$as_dir" && as_dir=.
5135 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5136 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5137 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
b0448899 5138 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5139 break 2
5140 fi
5141done
5142done
ca81d7a0 5143IFS=$as_save_IFS
9e71690e
DK
5144
5145 ;;
5146esac
5147fi
5148INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5149if test -n "$INSTALL_INFO"; then
b0448899
CY
5150 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5151echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5152else
b0448899
CY
5153 { echo "$as_me:$LINENO: result: no" >&5
5154echo "${ECHO_T}no" >&6; }
9e71690e
DK
5155fi
5156
ca81d7a0 5157
9e71690e
DK
5158# Extract the first word of "install-info", so it can be a program name with args.
5159set dummy install-info; ac_word=$2
b0448899
CY
5160{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e 5162if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
b0448899 5163 echo $ECHO_N "(cached) $ECHO_C" >&6
9e71690e
DK
5164else
5165 case $INSTALL_INFO in
5166 [\\/]* | ?:[\\/]*)
5167 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5168 ;;
5169 *)
5170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5171for as_dir in /usr/sbin
5172do
5173 IFS=$as_save_IFS
5174 test -z "$as_dir" && as_dir=.
5175 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5177 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
b0448899 5178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5179 break 2
5180 fi
5181done
5182done
ca81d7a0 5183IFS=$as_save_IFS
9e71690e
DK
5184
5185 ;;
5186esac
5187fi
5188INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5189if test -n "$INSTALL_INFO"; then
b0448899
CY
5190 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5191echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5192else
b0448899
CY
5193 { echo "$as_me:$LINENO: result: no" >&5
5194echo "${ECHO_T}no" >&6; }
9e71690e
DK
5195fi
5196
ca81d7a0 5197
9e71690e
DK
5198# Extract the first word of "install-info", so it can be a program name with args.
5199set dummy install-info; ac_word=$2
b0448899
CY
5200{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e 5202if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
b0448899 5203 echo $ECHO_N "(cached) $ECHO_C" >&6
9e71690e
DK
5204else
5205 case $INSTALL_INFO in
5206 [\\/]* | ?:[\\/]*)
5207 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5208 ;;
5209 *)
5210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in /sbin
5212do
5213 IFS=$as_save_IFS
5214 test -z "$as_dir" && as_dir=.
5215 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5217 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
b0448899 5218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5219 break 2
5220 fi
5221done
5222done
ca81d7a0 5223IFS=$as_save_IFS
9e71690e
DK
5224
5225 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5226 ;;
5227esac
5228fi
5229INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5230if test -n "$INSTALL_INFO"; then
b0448899
CY
5231 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5232echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5233else
b0448899
CY
5234 { echo "$as_me:$LINENO: result: no" >&5
5235echo "${ECHO_T}no" >&6; }
9e71690e
DK
5236fi
5237
ca81d7a0 5238
8ae52ca6
RF
5239# Extract the first word of "gzip", so it can be a program name with args.
5240set dummy gzip; ac_word=$2
b0448899
CY
5241{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5242echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5243if test "${ac_cv_path_GZIP_PROG+set}" = set; then
b0448899 5244 echo $ECHO_N "(cached) $ECHO_C" >&6
8ae52ca6 5245else
46e35e9f 5246 case $GZIP_PROG in
8ae52ca6 5247 [\\/]* | ?:[\\/]*)
46e35e9f 5248 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5249 ;;
5250 *)
5251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254 IFS=$as_save_IFS
5255 test -z "$as_dir" && as_dir=.
5256 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5257 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5258 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
b0448899 5259 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8ae52ca6
RF
5260 break 2
5261 fi
5262done
5263done
ca81d7a0 5264IFS=$as_save_IFS
8ae52ca6
RF
5265
5266 ;;
5267esac
5268fi
46e35e9f 5269GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5270if test -n "$GZIP_PROG"; then
b0448899
CY
5271 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5272echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5273else
b0448899
CY
5274 { echo "$as_me:$LINENO: result: no" >&5
5275echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5276fi
5277
ba4481b5 5278
c0d27fcc 5279
ca81d7a0 5280
1bb9a689
MB
5281## Need makeinfo >= 4.6 (?) to build the manuals.
5282# Extract the first word of "makeinfo", so it can be a program name with args.
5283set dummy makeinfo; ac_word=$2
b0448899
CY
5284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1bb9a689 5286if test "${ac_cv_path_MAKEINFO+set}" = set; then
b0448899 5287 echo $ECHO_N "(cached) $ECHO_C" >&6
1bb9a689
MB
5288else
5289 case $MAKEINFO in
5290 [\\/]* | ?:[\\/]*)
5291 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5292 ;;
5293 *)
5294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297 IFS=$as_save_IFS
5298 test -z "$as_dir" && as_dir=.
5299 for ac_exec_ext in '' $ac_executable_extensions; do
5300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5301 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
b0448899 5302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1bb9a689
MB
5303 break 2
5304 fi
5305done
5306done
5307IFS=$as_save_IFS
5308
5309 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5310 ;;
5311esac
5312fi
5313MAKEINFO=$ac_cv_path_MAKEINFO
5314if test -n "$MAKEINFO"; then
b0448899
CY
5315 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5316echo "${ECHO_T}$MAKEINFO" >&6; }
1bb9a689 5317else
b0448899
CY
5318 { echo "$as_me:$LINENO: result: no" >&5
5319echo "${ECHO_T}no" >&6; }
1bb9a689
MB
5320fi
5321
5322
5323if test "$MAKEINFO" != "no" && \
d4840f44 5324 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
5325 MAKEINFO=no
5326fi
5327
e1b89931
GM
5328## Makeinfo is unusual. For a released Emacs, the manuals are
5329## pre-built, and not deleted by the normal clean rules. makeinfo is
5330## therefore in the category of "special tools" not normally required, which
5331## configure does not have to check for (eg autoconf itself).
5332## In a CVS checkout on the other hand, the manuals are not included.
5333## So makeinfo is a requirement to build from CVS, and configure
5334## should test for it as it does for any other build requirement.
5335## We use the presence of $srcdir/info/emacs to distinguish a release,
5336## with pre-built manuals, from a CVS checkout.
5337if test "$MAKEINFO" = "no"; then
5338 if test "x${with_makeinfo}" = "xno"; then
5339 MAKEINFO=off
5340 elif ! test -e $srcdir/info/emacs; then
b0448899 5341 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
e1b89931 5342source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5343Either install a suitable version of makeinfo, or re-run configure
e1b89931 5344with the \`--without-makeinfo' option to build without the manuals. " >&5
b0448899 5345echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
e1b89931 5346source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5347Either install a suitable version of makeinfo, or re-run configure
e1b89931 5348with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5349 { (exit 1); exit 1; }; }
e1b89931 5350 fi
921fbdf0 5351fi
1bb9a689
MB
5352
5353
8e967cf7
MR
5354if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5355then
5356 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5357fi
5358
5359if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5360then
5361 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5362fi
5363
c0d27fcc 5364
fe239f0f 5365late_LDFLAGS=$LDFLAGS
4af002d6 5366if test "$GCC" = yes; then
fe239f0f
AS
5367 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5368else
5369 LDFLAGS="$LDFLAGS -znocombreloc"
5370fi
5371
b0448899
CY
5372{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5373echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5374cat >conftest.$ac_ext <<_ACEOF
5375main(){return 0;}
5376_ACEOF
5377rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5378if { (ac_try="$ac_link"
5379case "(($ac_try" in
5380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5381 *) ac_try_echo=$ac_try;;
5382esac
b0448899 5383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5384 (eval "$ac_link") 2>conftest.er1
fe239f0f 5385 ac_status=$?
edfaf76d
LK
5386 grep -v '^ *+' conftest.er1 >conftest.err
5387 rm -f conftest.er1
5388 cat conftest.err >&5
b0448899 5389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5390 (exit $ac_status); } && {
5391 test -z "$ac_c_werror_flag" ||
5392 test ! -s conftest.err
b0448899
CY
5393 } && test -s conftest$ac_exeext &&
5394 $as_test_x conftest$ac_exeext; then
5395 { echo "$as_me:$LINENO: result: yes" >&5
5396echo "${ECHO_T}yes" >&6; }
fe239f0f 5397else
b0448899 5398 echo "$as_me: failed program was:" >&5
fe239f0f
AS
5399sed 's/^/| /' conftest.$ac_ext >&5
5400
ca81d7a0 5401 LDFLAGS=$late_LDFLAGS
b0448899
CY
5402 { echo "$as_me:$LINENO: result: no" >&5
5403echo "${ECHO_T}no" >&6; }
fe239f0f 5404fi
ca81d7a0 5405
f053c89f 5406rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5407 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5408
3b33a005
DL
5409#### Extract some information from the operating system and machine files.
5410
b0448899 5411{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5412 - which libraries the lib-src programs will want, and
503d2be0 5413 - whether the GNU malloc routines are usable..." >&5
b0448899 5414echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5415 - which libraries the lib-src programs will want, and
503d2be0 5416 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5417
5418### First figure out CFLAGS (which we use for running the compiler here)
5419### and REAL_CFLAGS (which we use for real compilation).
5420### The two are the same except on a few systems, where they are made
5421### different to work around various lossages. For example,
5422### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5423### as implying static linking.
5424
5425### If the CFLAGS env var is specified, we use that value
5426### instead of the default.
5427
5428### It's not important that this name contain the PID; you can't run
5429### two configures in the same directory and have anything work
5430### anyway.
5431tempcname="conftest.c"
5432
5433echo '
5434#include "'${srcdir}'/src/'${opsysfile}'"
5435#include "'${srcdir}'/src/'${machfile}'"
5436#ifndef LIBS_MACHINE
5437#define LIBS_MACHINE
5438#endif
5439#ifndef LIBS_SYSTEM
5440#define LIBS_SYSTEM
5441#endif
5442#ifndef C_SWITCH_SYSTEM
5443#define C_SWITCH_SYSTEM
5444#endif
5445#ifndef C_SWITCH_MACHINE
5446#define C_SWITCH_MACHINE
5447#endif
5448configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5449configure___ c_switch_system=C_SWITCH_SYSTEM
5450configure___ c_switch_machine=C_SWITCH_MACHINE
5451
5452#ifndef LIB_X11_LIB
5453#define LIB_X11_LIB -lX11
5454#endif
5455
3b33a005
DL
5456#ifndef LIBX11_SYSTEM
5457#define LIBX11_SYSTEM
5458#endif
9d2818d6 5459configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5460
5461#ifdef UNEXEC
5462configure___ unexec=UNEXEC
5463#else
5464configure___ unexec=unexec.o
5465#endif
5466
5467#ifdef SYSTEM_MALLOC
5468configure___ system_malloc=yes
5469#else
5470configure___ system_malloc=no
5471#endif
5472
ef9e4345
GM
5473#ifdef USE_MMAP_FOR_BUFFERS
5474configure___ use_mmap_for_buffers=yes
73b77ee5 5475#else
ef9e4345 5476configure___ use_mmap_for_buffers=no
73b77ee5
GM
5477#endif
5478
3b33a005
DL
5479#ifndef C_DEBUG_SWITCH
5480#define C_DEBUG_SWITCH -g
5481#endif
5482
5483#ifndef C_OPTIMIZE_SWITCH
5484#ifdef __GNUC__
5485#define C_OPTIMIZE_SWITCH -O2
5486#else
5487#define C_OPTIMIZE_SWITCH -O
5488#endif
5489#endif
5490
01abe918
CY
5491#ifndef C_WARNINGS_SWITCH
5492#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5493#endif
5494
3b33a005
DL
5495#ifndef LD_SWITCH_MACHINE
5496#define LD_SWITCH_MACHINE
5497#endif
5498
5499#ifndef LD_SWITCH_SYSTEM
5500#define LD_SWITCH_SYSTEM
5501#endif
5502
5503#ifndef LD_SWITCH_X_SITE_AUX
5504#define LD_SWITCH_X_SITE_AUX
503d2be0 5505#endif
3b33a005
DL
5506
5507configure___ ld_switch_system=LD_SWITCH_SYSTEM
5508configure___ ld_switch_machine=LD_SWITCH_MACHINE
5509
5510#ifdef THIS_IS_CONFIGURE
5511
5512/* Get the CFLAGS for tests in configure. */
5513#ifdef __GNUC__
5514configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5515#else
5516configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5517#endif
5518
5519#else /* not THIS_IS_CONFIGURE */
5520
5521/* Get the CFLAGS for real compilation. */
5522#ifdef __GNUC__
01abe918 5523configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5524#else
5525configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5526#endif
5527
5528#endif /* not THIS_IS_CONFIGURE */
5529' > ${tempcname}
5530
5531# The value of CPP is a quoted variable reference, so we need to do this
5532# to get its actual value...
5533CPP=`eval "echo $CPP"`
5534eval `${CPP} -Isrc ${tempcname} \
5535 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5536if test "x$SPECIFIED_CFLAGS" = x; then
5537 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5538 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5539else
5540 REAL_CFLAGS="$CFLAGS"
5541fi
5542rm ${tempcname}
5543
5544ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5545
5546### Make sure subsequent tests use flags consistent with the build flags.
5547
5548if test x"${OVERRIDE_CPPFLAGS}" != x; then
5549 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5550else
5551 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5552fi
5553
6bae0ccf
DL
5554
5555
ca81d7a0 5556# Check whether --enable-largefile was given.
f4988be7 5557if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5558 enableval=$enable_largefile;
5559fi
f4988be7 5560
503d2be0 5561if test "$enable_largefile" != no; then
f4988be7 5562
b0448899
CY
5563 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5564echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0 5565if test "${ac_cv_sys_largefile_CC+set}" = set; then
b0448899 5566 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5567else
f4988be7 5568 ac_cv_sys_largefile_CC=no
503d2be0
AS
5569 if test "$GCC" != yes; then
5570 ac_save_CC=$CC
5571 while :; do
ca81d7a0
JD
5572 # IRIX 6.2 and later do not support large files by default,
5573 # so use the C compiler's -n32 option if that helps.
edfaf76d 5574 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5575/* confdefs.h. */
5576_ACEOF
5577cat confdefs.h >>conftest.$ac_ext
5578cat >>conftest.$ac_ext <<_ACEOF
5579/* end confdefs.h. */
f4988be7 5580#include <sys/types.h>
503d2be0
AS
5581 /* Check that off_t can represent 2**63 - 1 correctly.
5582 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5583 since some C++ compilers masquerading as C compilers
5584 incorrectly reject 9223372036854775807. */
5585#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5586 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5587 && LARGE_OFF_T % 2147483647 == 1)
5588 ? 1 : -1];
5589int
5590main ()
5591{
f4988be7 5592
503d2be0
AS
5593 ;
5594 return 0;
5595}
5596_ACEOF
ca81d7a0
JD
5597 rm -f conftest.$ac_objext
5598if { (ac_try="$ac_compile"
5599case "(($ac_try" in
5600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5601 *) ac_try_echo=$ac_try;;
5602esac
b0448899 5603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5604 (eval "$ac_compile") 2>conftest.er1
503d2be0 5605 ac_status=$?
edfaf76d
LK
5606 grep -v '^ *+' conftest.er1 >conftest.err
5607 rm -f conftest.er1
5608 cat conftest.err >&5
b0448899 5609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5610 (exit $ac_status); } && {
5611 test -z "$ac_c_werror_flag" ||
5612 test ! -s conftest.err
5613 } && test -s conftest.$ac_objext; then
503d2be0 5614 break
b192d653 5615else
b0448899 5616 echo "$as_me: failed program was:" >&5
19650fd6
AS
5617sed 's/^/| /' conftest.$ac_ext >&5
5618
ca81d7a0 5619
503d2be0 5620fi
ca81d7a0
JD
5621
5622rm -f core conftest.err conftest.$ac_objext
5623 CC="$CC -n32"
5624 rm -f conftest.$ac_objext
5625if { (ac_try="$ac_compile"
5626case "(($ac_try" in
5627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5628 *) ac_try_echo=$ac_try;;
5629esac
b0448899 5630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5631 (eval "$ac_compile") 2>conftest.er1
503d2be0 5632 ac_status=$?
edfaf76d
LK
5633 grep -v '^ *+' conftest.er1 >conftest.err
5634 rm -f conftest.er1
5635 cat conftest.err >&5
b0448899 5636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5637 (exit $ac_status); } && {
5638 test -z "$ac_c_werror_flag" ||
5639 test ! -s conftest.err
5640 } && test -s conftest.$ac_objext; then
503d2be0
AS
5641 ac_cv_sys_largefile_CC=' -n32'; break
5642else
b0448899 5643 echo "$as_me: failed program was:" >&5
19650fd6
AS
5644sed 's/^/| /' conftest.$ac_ext >&5
5645
ca81d7a0 5646
503d2be0 5647fi
ca81d7a0
JD
5648
5649rm -f core conftest.err conftest.$ac_objext
edfaf76d 5650 break
503d2be0
AS
5651 done
5652 CC=$ac_save_CC
5653 rm -f conftest.$ac_ext
5654 fi
b192d653 5655fi
b0448899
CY
5656{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5657echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5658 if test "$ac_cv_sys_largefile_CC" != no; then
5659 CC=$CC$ac_cv_sys_largefile_CC
5660 fi
b192d653 5661
b0448899
CY
5662 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5663echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0 5664if test "${ac_cv_sys_file_offset_bits+set}" = set; then
b0448899 5665 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5666else
503d2be0 5667 while :; do
503d2be0 5668 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5669/* confdefs.h. */
5670_ACEOF
5671cat confdefs.h >>conftest.$ac_ext
5672cat >>conftest.$ac_ext <<_ACEOF
5673/* end confdefs.h. */
f4988be7 5674#include <sys/types.h>
503d2be0
AS
5675 /* Check that off_t can represent 2**63 - 1 correctly.
5676 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5677 since some C++ compilers masquerading as C compilers
5678 incorrectly reject 9223372036854775807. */
5679#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5680 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5681 && LARGE_OFF_T % 2147483647 == 1)
5682 ? 1 : -1];
5683int
5684main ()
5685{
f4988be7 5686
503d2be0
AS
5687 ;
5688 return 0;
5689}
5690_ACEOF
5691rm -f conftest.$ac_objext
ca81d7a0
JD
5692if { (ac_try="$ac_compile"
5693case "(($ac_try" in
5694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5695 *) ac_try_echo=$ac_try;;
5696esac
b0448899 5697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5698 (eval "$ac_compile") 2>conftest.er1
503d2be0 5699 ac_status=$?
edfaf76d
LK
5700 grep -v '^ *+' conftest.er1 >conftest.err
5701 rm -f conftest.er1
5702 cat conftest.err >&5
b0448899 5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5704 (exit $ac_status); } && {
5705 test -z "$ac_c_werror_flag" ||
5706 test ! -s conftest.err
5707 } && test -s conftest.$ac_objext; then
5708 ac_cv_sys_file_offset_bits=no; break
f4988be7 5709else
b0448899 5710 echo "$as_me: failed program was:" >&5
19650fd6
AS
5711sed 's/^/| /' conftest.$ac_ext >&5
5712
ca81d7a0 5713
503d2be0 5714fi
ca81d7a0
JD
5715
5716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5718/* confdefs.h. */
5719_ACEOF
5720cat confdefs.h >>conftest.$ac_ext
5721cat >>conftest.$ac_ext <<_ACEOF
5722/* end confdefs.h. */
f4988be7
GM
5723#define _FILE_OFFSET_BITS 64
5724#include <sys/types.h>
503d2be0
AS
5725 /* Check that off_t can represent 2**63 - 1 correctly.
5726 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5727 since some C++ compilers masquerading as C compilers
5728 incorrectly reject 9223372036854775807. */
5729#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5730 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5731 && LARGE_OFF_T % 2147483647 == 1)
5732 ? 1 : -1];
5733int
5734main ()
5735{
5736
5737 ;
5738 return 0;
5739}
5740_ACEOF
5741rm -f conftest.$ac_objext
ca81d7a0
JD
5742if { (ac_try="$ac_compile"
5743case "(($ac_try" in
5744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5745 *) ac_try_echo=$ac_try;;
5746esac
b0448899 5747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5748 (eval "$ac_compile") 2>conftest.er1
503d2be0 5749 ac_status=$?
edfaf76d
LK
5750 grep -v '^ *+' conftest.er1 >conftest.err
5751 rm -f conftest.er1
5752 cat conftest.err >&5
b0448899 5753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5754 (exit $ac_status); } && {
5755 test -z "$ac_c_werror_flag" ||
5756 test ! -s conftest.err
5757 } && test -s conftest.$ac_objext; then
503d2be0
AS
5758 ac_cv_sys_file_offset_bits=64; break
5759else
b0448899 5760 echo "$as_me: failed program was:" >&5
19650fd6
AS
5761sed 's/^/| /' conftest.$ac_ext >&5
5762
ca81d7a0 5763
503d2be0 5764fi
ca81d7a0
JD
5765
5766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5767 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5768 break
5769done
ba4481b5 5770fi
b0448899
CY
5771{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5772echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5773case $ac_cv_sys_file_offset_bits in #(
5774 no | unknown) ;;
5775 *)
c0d27fcc 5776cat >>confdefs.h <<_ACEOF
f4988be7 5777#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5778_ACEOF
f053c89f
CY
5779;;
5780esac
b0448899 5781rm -f conftest*
f053c89f 5782 if test $ac_cv_sys_file_offset_bits = unknown; then
b0448899
CY
5783 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5784echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0 5785if test "${ac_cv_sys_large_files+set}" = set; then
b0448899 5786 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5787else
503d2be0 5788 while :; do
503d2be0 5789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5790/* confdefs.h. */
5791_ACEOF
5792cat confdefs.h >>conftest.$ac_ext
5793cat >>conftest.$ac_ext <<_ACEOF
5794/* end confdefs.h. */
503d2be0
AS
5795#include <sys/types.h>
5796 /* Check that off_t can represent 2**63 - 1 correctly.
5797 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5798 since some C++ compilers masquerading as C compilers
5799 incorrectly reject 9223372036854775807. */
5800#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5801 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5802 && LARGE_OFF_T % 2147483647 == 1)
5803 ? 1 : -1];
5804int
5805main ()
5806{
ba4481b5 5807
503d2be0
AS
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
ca81d7a0
JD
5813if { (ac_try="$ac_compile"
5814case "(($ac_try" in
5815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5816 *) ac_try_echo=$ac_try;;
5817esac
b0448899 5818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5819 (eval "$ac_compile") 2>conftest.er1
503d2be0 5820 ac_status=$?
edfaf76d
LK
5821 grep -v '^ *+' conftest.er1 >conftest.err
5822 rm -f conftest.er1
5823 cat conftest.err >&5
b0448899 5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5825 (exit $ac_status); } && {
5826 test -z "$ac_c_werror_flag" ||
5827 test ! -s conftest.err
5828 } && test -s conftest.$ac_objext; then
5829 ac_cv_sys_large_files=no; break
ba4481b5 5830else
b0448899 5831 echo "$as_me: failed program was:" >&5
19650fd6
AS
5832sed 's/^/| /' conftest.$ac_ext >&5
5833
ca81d7a0 5834
503d2be0 5835fi
ca81d7a0
JD
5836
5837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5839/* confdefs.h. */
5840_ACEOF
5841cat confdefs.h >>conftest.$ac_ext
5842cat >>conftest.$ac_ext <<_ACEOF
5843/* end confdefs.h. */
f4988be7 5844#define _LARGE_FILES 1
503d2be0
AS
5845#include <sys/types.h>
5846 /* Check that off_t can represent 2**63 - 1 correctly.
5847 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5848 since some C++ compilers masquerading as C compilers
5849 incorrectly reject 9223372036854775807. */
5850#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5851 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5852 && LARGE_OFF_T % 2147483647 == 1)
5853 ? 1 : -1];
5854int
5855main ()
5856{
f4988be7 5857
503d2be0
AS
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
ca81d7a0
JD
5863if { (ac_try="$ac_compile"
5864case "(($ac_try" in
5865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5866 *) ac_try_echo=$ac_try;;
5867esac
b0448899 5868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5869 (eval "$ac_compile") 2>conftest.er1
503d2be0 5870 ac_status=$?
edfaf76d
LK
5871 grep -v '^ *+' conftest.er1 >conftest.err
5872 rm -f conftest.er1
5873 cat conftest.err >&5
b0448899 5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5875 (exit $ac_status); } && {
5876 test -z "$ac_c_werror_flag" ||
5877 test ! -s conftest.err
5878 } && test -s conftest.$ac_objext; then
503d2be0
AS
5879 ac_cv_sys_large_files=1; break
5880else
b0448899 5881 echo "$as_me: failed program was:" >&5
19650fd6
AS
5882sed 's/^/| /' conftest.$ac_ext >&5
5883
ca81d7a0 5884
503d2be0 5885fi
ca81d7a0
JD
5886
5887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5888 ac_cv_sys_large_files=unknown
503d2be0
AS
5889 break
5890done
ba4481b5 5891fi
b0448899
CY
5892{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5893echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5894case $ac_cv_sys_large_files in #(
5895 no | unknown) ;;
5896 *)
c0d27fcc 5897cat >>confdefs.h <<_ACEOF
f4988be7 5898#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5899_ACEOF
f053c89f
CY
5900;;
5901esac
b0448899 5902rm -f conftest*
f053c89f 5903 fi
503d2be0 5904fi
ba4481b5 5905
c0d27fcc 5906
439f58ee 5907
55e6d9b2 5908### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888 5909### be located in either /usr/lib64 or /usr/lib.
076f0c7d
GM
5910### In some rare cases, /usr/lib64 exists but does not contain the
5911### relevant files (bug#1287). Hence test for crtn.o.
bc5d9888 5912case "${canonical}" in
55e6d9b2 5913 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
076f0c7d 5914 if test -e /usr/lib64/crtn.o; then
bc5d9888
CY
5915
5916cat >>confdefs.h <<\_ACEOF
55e6d9b2 5917#define HAVE_LIB64_DIR 1
bc5d9888
CY
5918_ACEOF
5919
5920fi
5921esac
5922
439f58ee
JD
5923
5924
5925
2c9dccc9
PJ
5926if test "${with_sound}" != "no"; then
5927 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5928
5929
5930
5931for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5932do
b0448899 5933as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 5934if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
5935 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5936echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 5937if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 5938 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 5939fi
b0448899
CY
5940ac_res=`eval echo '${'$as_ac_Header'}'`
5941 { echo "$as_me:$LINENO: result: $ac_res" >&5
5942echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5943else
5944 # Is the header compilable?
b0448899
CY
5945{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5946echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5947cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5948/* confdefs.h. */
5949_ACEOF
5950cat confdefs.h >>conftest.$ac_ext
5951cat >>conftest.$ac_ext <<_ACEOF
5952/* end confdefs.h. */
c0d27fcc 5953$ac_includes_default
98418dba 5954#include <$ac_header>
503d2be0 5955_ACEOF
c0d27fcc 5956rm -f conftest.$ac_objext
ca81d7a0
JD
5957if { (ac_try="$ac_compile"
5958case "(($ac_try" in
5959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5960 *) ac_try_echo=$ac_try;;
5961esac
b0448899 5962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5963 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5964 ac_status=$?
edfaf76d
LK
5965 grep -v '^ *+' conftest.er1 >conftest.err
5966 rm -f conftest.er1
5967 cat conftest.err >&5
b0448899 5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5969 (exit $ac_status); } && {
5970 test -z "$ac_c_werror_flag" ||
5971 test ! -s conftest.err
5972 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5973 ac_header_compiler=yes
5974else
b0448899 5975 echo "$as_me: failed program was:" >&5
19650fd6
AS
5976sed 's/^/| /' conftest.$ac_ext >&5
5977
ca81d7a0 5978 ac_header_compiler=no
c0d27fcc 5979fi
ca81d7a0
JD
5980
5981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
5982{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5983echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5984
5985# Is the header present?
b0448899
CY
5986{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5987echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5988cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5989/* confdefs.h. */
5990_ACEOF
5991cat confdefs.h >>conftest.$ac_ext
5992cat >>conftest.$ac_ext <<_ACEOF
5993/* end confdefs.h. */
c0d27fcc
MR
5994#include <$ac_header>
5995_ACEOF
ca81d7a0
JD
5996if { (ac_try="$ac_cpp conftest.$ac_ext"
5997case "(($ac_try" in
5998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5999 *) ac_try_echo=$ac_try;;
6000esac
b0448899 6001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6002 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6003 ac_status=$?
6bae0ccf 6004 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6005 rm -f conftest.er1
6006 cat conftest.err >&5
b0448899 6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6008 (exit $ac_status); } >/dev/null && {
6009 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6010 test ! -s conftest.err
6011 }; then
c0d27fcc 6012 ac_header_preproc=yes
f4988be7 6013else
b0448899 6014 echo "$as_me: failed program was:" >&5
19650fd6
AS
6015sed 's/^/| /' conftest.$ac_ext >&5
6016
c0d27fcc 6017 ac_header_preproc=no
f4988be7 6018fi
ca81d7a0 6019
98418dba 6020rm -f conftest.err conftest.$ac_ext
b0448899
CY
6021{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6022echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6023
6024# So? What about this header?
edfaf76d
LK
6025case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6026 yes:no: )
b0448899
CY
6027 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6028echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6029 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6030echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 6031 ac_header_preproc=yes
19650fd6 6032 ;;
edfaf76d 6033 no:yes:* )
b0448899
CY
6034 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6035echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6036 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6037echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6038 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6039echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6040 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6041echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6042 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6043echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6044 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6045echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6046
19650fd6 6047 ;;
c0d27fcc 6048esac
b0448899
CY
6049{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6050echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6051if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 6052 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6053else
edfaf76d 6054 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6055fi
b0448899
CY
6056ac_res=`eval echo '${'$as_ac_Header'}'`
6057 { echo "$as_me:$LINENO: result: $ac_res" >&5
6058echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6059
6060fi
b0448899 6061if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6062 cat >>confdefs.h <<_ACEOF
b0448899 6063#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6064_ACEOF
f4988be7
GM
6065
6066fi
c0d27fcc 6067
98418dba
CW
6068done
6069
6070 # Emulation library used on NetBSD.
b0448899
CY
6071 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6072echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6073if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
b0448899 6074 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6075else
98418dba
CW
6076 ac_check_lib_save_LIBS=$LIBS
6077LIBS="-lossaudio $LIBS"
6078cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6079/* confdefs.h. */
6080_ACEOF
6081cat confdefs.h >>conftest.$ac_ext
6082cat >>conftest.$ac_ext <<_ACEOF
6083/* end confdefs.h. */
98418dba 6084
ca81d7a0
JD
6085/* Override any GCC internal prototype to avoid an error.
6086 Use char because int might match the return type of a GCC
6087 builtin and then its argument prototype would still apply. */
98418dba
CW
6088#ifdef __cplusplus
6089extern "C"
f4988be7 6090#endif
98418dba 6091char _oss_ioctl ();
503d2be0
AS
6092int
6093main ()
6094{
ca81d7a0 6095return _oss_ioctl ();
503d2be0
AS
6096 ;
6097 return 0;
6098}
6099_ACEOF
98418dba 6100rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6101if { (ac_try="$ac_link"
6102case "(($ac_try" in
6103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6104 *) ac_try_echo=$ac_try;;
6105esac
b0448899 6106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6107 (eval "$ac_link") 2>conftest.er1
503d2be0 6108 ac_status=$?
edfaf76d
LK
6109 grep -v '^ *+' conftest.er1 >conftest.err
6110 rm -f conftest.er1
6111 cat conftest.err >&5
b0448899 6112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6113 (exit $ac_status); } && {
6114 test -z "$ac_c_werror_flag" ||
6115 test ! -s conftest.err
b0448899
CY
6116 } && test -s conftest$ac_exeext &&
6117 $as_test_x conftest$ac_exeext; then
98418dba 6118 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6119else
b0448899 6120 echo "$as_me: failed program was:" >&5
19650fd6
AS
6121sed 's/^/| /' conftest.$ac_ext >&5
6122
ca81d7a0 6123 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6124fi
ca81d7a0 6125
f053c89f 6126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6127 conftest$ac_exeext conftest.$ac_ext
98418dba 6128LIBS=$ac_check_lib_save_LIBS
f4988be7 6129fi
b0448899
CY
6130{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6131echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
6132if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
98418dba
CW
6133 LIBSOUND=-lossaudio
6134else
6135 LIBSOUND=
6136fi
6137
c0d27fcc 6138
439f58ee
JD
6139
6140 ALSA_REQUIRED=1.0.0
6141 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6142
6143 succeeded=no
6144
00b9c927 6145 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6146set dummy pkg-config; ac_word=$2
b0448899
CY
6147{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee 6149if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 6150 echo $ECHO_N "(cached) $ECHO_C" >&6
439f58ee
JD
6151else
6152 case $PKG_CONFIG in
6153 [\\/]* | ?:[\\/]*)
6154 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6155 ;;
6156 *)
6157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6158for as_dir in $PATH
6159do
6160 IFS=$as_save_IFS
6161 test -z "$as_dir" && as_dir=.
6162 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee 6164 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 6165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
439f58ee
JD
6166 break 2
6167 fi
6168done
6169done
ca81d7a0 6170IFS=$as_save_IFS
439f58ee
JD
6171
6172 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6173 ;;
6174esac
6175fi
6176PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6177if test -n "$PKG_CONFIG"; then
b0448899
CY
6178 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6179echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6180else
b0448899
CY
6181 { echo "$as_me:$LINENO: result: no" >&5
6182echo "${ECHO_T}no" >&6; }
439f58ee
JD
6183fi
6184
ca81d7a0 6185
439f58ee
JD
6186
6187 if test "$PKG_CONFIG" = "no" ; then
6188 HAVE_ALSA=no
6189 else
6190 PKG_CONFIG_MIN_VERSION=0.9.0
6191 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
6192 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6193echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6194
67db6aa2 6195 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
b0448899
CY
6196 { echo "$as_me:$LINENO: result: yes" >&5
6197echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6198 succeeded=yes
6199
b0448899
CY
6200 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6201echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6202 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
b0448899
CY
6203 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6204echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6205
b0448899
CY
6206 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6207echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6208 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
b0448899
CY
6209 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6210echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6211 else
b0448899
CY
6212 { echo "$as_me:$LINENO: result: no" >&5
6213echo "${ECHO_T}no" >&6; }
439f58ee
JD
6214 ALSA_CFLAGS=""
6215 ALSA_LIBS=""
6216 ## If we have a custom action on failure, don't print errors, but
6217 ## do set a variable so people can do so.
6218 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6219
6220 fi
6221
6222
6223
6224 else
6225 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6226 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6227 fi
6228 fi
6229
6230 if test $succeeded = yes; then
6231 HAVE_ALSA=yes
6232 else
6233 HAVE_ALSA=no
6234 fi
6235
6236 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6237 SAVE_CFLAGS="$CFLAGS"
6238 SAVE_LDFLAGS="$LDFLAGS"
6239 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6240 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6241 cat >conftest.$ac_ext <<_ACEOF
6242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
6247#include <asoundlib.h>
6248int
6249main ()
6250{
6251snd_lib_error_set_handler (0);
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256rm -f conftest.$ac_objext
6257if { (ac_try="$ac_compile"
6258case "(($ac_try" in
6259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6260 *) ac_try_echo=$ac_try;;
6261esac
b0448899 6262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0
JD
6263 (eval "$ac_compile") 2>conftest.er1
6264 ac_status=$?
6265 grep -v '^ *+' conftest.er1 >conftest.err
6266 rm -f conftest.er1
6267 cat conftest.err >&5
b0448899 6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6269 (exit $ac_status); } && {
6270 test -z "$ac_c_werror_flag" ||
6271 test ! -s conftest.err
6272 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6273 emacs_alsa_normal=yes
6274else
b0448899 6275 echo "$as_me: failed program was:" >&5
ca81d7a0
JD
6276sed 's/^/| /' conftest.$ac_ext >&5
6277
6278 emacs_alsa_normal=no
6279fi
6280
6281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6282 if test "$emacs_alsa_normal" != yes; then
6283 cat >conftest.$ac_ext <<_ACEOF
6284/* confdefs.h. */
6285_ACEOF
6286cat confdefs.h >>conftest.$ac_ext
6287cat >>conftest.$ac_ext <<_ACEOF
6288/* end confdefs.h. */
6289#include <alsa/asoundlib.h>
6290int
6291main ()
6292{
6293snd_lib_error_set_handler (0);
6294 ;
6295 return 0;
6296}
6297_ACEOF
6298rm -f conftest.$ac_objext
6299if { (ac_try="$ac_compile"
6300case "(($ac_try" in
6301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6302 *) ac_try_echo=$ac_try;;
6303esac
b0448899 6304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0
JD
6305 (eval "$ac_compile") 2>conftest.er1
6306 ac_status=$?
6307 grep -v '^ *+' conftest.er1 >conftest.err
6308 rm -f conftest.er1
6309 cat conftest.err >&5
b0448899 6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6311 (exit $ac_status); } && {
6312 test -z "$ac_c_werror_flag" ||
6313 test ! -s conftest.err
6314 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6315 emacs_alsa_subdir=yes
6316else
b0448899 6317 echo "$as_me: failed program was:" >&5
ca81d7a0
JD
6318sed 's/^/| /' conftest.$ac_ext >&5
6319
6320 emacs_alsa_subdir=no
6321fi
6322
6323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6324 if test "$emacs_alsa_subdir" != yes; then
b0448899
CY
6325 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6326echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
ca81d7a0
JD
6327 { (exit 1); exit 1; }; }
6328 fi
6329 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6330 fi
6331
6332 CFLAGS="$SAVE_CFLAGS"
6333 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6334 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6335 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6336
6337cat >>confdefs.h <<\_ACEOF
6338#define HAVE_ALSA 1
6339_ACEOF
6340
6341 fi
6342
f4988be7 6343fi
c0d27fcc
MR
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
22044edf
DL
6362
6363
973a76b1 6364
cffcede7 6365
551ffc27 6366
226e2359 6367
c0d27fcc 6368
f4988be7 6369
98418dba
CW
6370for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6371 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6372 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6373 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6374 sys/utsname.h pwd.h
98418dba 6375do
b0448899 6376as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 6377if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
6378 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6379echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6380if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 6381 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6382fi
b0448899
CY
6383ac_res=`eval echo '${'$as_ac_Header'}'`
6384 { echo "$as_me:$LINENO: result: $ac_res" >&5
6385echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6386else
c0d27fcc 6387 # Is the header compilable?
b0448899
CY
6388{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6389echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6390cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
c0d27fcc
MR
6396$ac_includes_default
6397#include <$ac_header>
6398_ACEOF
6399rm -f conftest.$ac_objext
ca81d7a0
JD
6400if { (ac_try="$ac_compile"
6401case "(($ac_try" in
6402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6403 *) ac_try_echo=$ac_try;;
6404esac
b0448899 6405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6406 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6407 ac_status=$?
edfaf76d
LK
6408 grep -v '^ *+' conftest.er1 >conftest.err
6409 rm -f conftest.er1
6410 cat conftest.err >&5
b0448899 6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6412 (exit $ac_status); } && {
6413 test -z "$ac_c_werror_flag" ||
6414 test ! -s conftest.err
6415 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6416 ac_header_compiler=yes
6417else
b0448899 6418 echo "$as_me: failed program was:" >&5
19650fd6
AS
6419sed 's/^/| /' conftest.$ac_ext >&5
6420
ca81d7a0 6421 ac_header_compiler=no
c0d27fcc 6422fi
ca81d7a0
JD
6423
6424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
6425{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6426echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6427
6428# Is the header present?
b0448899
CY
6429{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6430echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6431cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6432/* confdefs.h. */
6433_ACEOF
6434cat confdefs.h >>conftest.$ac_ext
6435cat >>conftest.$ac_ext <<_ACEOF
6436/* end confdefs.h. */
98418dba 6437#include <$ac_header>
503d2be0 6438_ACEOF
ca81d7a0
JD
6439if { (ac_try="$ac_cpp conftest.$ac_ext"
6440case "(($ac_try" in
6441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6442 *) ac_try_echo=$ac_try;;
6443esac
b0448899 6444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6445 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6446 ac_status=$?
6bae0ccf 6447 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6448 rm -f conftest.er1
6449 cat conftest.err >&5
b0448899 6450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6451 (exit $ac_status); } >/dev/null && {
6452 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6453 test ! -s conftest.err
6454 }; then
c0d27fcc 6455 ac_header_preproc=yes
34ec9ebe 6456else
b0448899 6457 echo "$as_me: failed program was:" >&5
19650fd6
AS
6458sed 's/^/| /' conftest.$ac_ext >&5
6459
c0d27fcc 6460 ac_header_preproc=no
34ec9ebe 6461fi
ca81d7a0 6462
98418dba 6463rm -f conftest.err conftest.$ac_ext
b0448899
CY
6464{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6465echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6466
6467# So? What about this header?
edfaf76d
LK
6468case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6469 yes:no: )
b0448899
CY
6470 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6471echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6472 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6473echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 6474 ac_header_preproc=yes
19650fd6 6475 ;;
edfaf76d 6476 no:yes:* )
b0448899
CY
6477 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6478echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6479 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6480echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6481 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6482echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6483 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6484echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6485 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6486echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6487 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6488echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6489
19650fd6 6490 ;;
c0d27fcc 6491esac
b0448899
CY
6492{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6493echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6494if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 6495 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6496else
edfaf76d 6497 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6498fi
b0448899
CY
6499ac_res=`eval echo '${'$as_ac_Header'}'`
6500 { echo "$as_me:$LINENO: result: $ac_res" >&5
6501echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6502
6503fi
b0448899 6504if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6505 cat >>confdefs.h <<_ACEOF
b0448899 6506#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6507_ACEOF
34ec9ebe 6508
98418dba 6509fi
c0d27fcc 6510
98418dba
CW
6511done
6512
22044edf 6513
b0448899
CY
6514{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6515echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6516cat >conftest.$ac_ext <<_ACEOF
6517/* confdefs.h. */
6518_ACEOF
6519cat confdefs.h >>conftest.$ac_ext
6520cat >>conftest.$ac_ext <<_ACEOF
6521/* end confdefs.h. */
6522#include <sys/personality.h>
6523int
6524main ()
6525{
6526personality (PER_LINUX32)
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
ca81d7a0
JD
6532if { (ac_try="$ac_compile"
6533case "(($ac_try" in
6534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6535 *) ac_try_echo=$ac_try;;
6536esac
b0448899 6537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6538 (eval "$ac_compile") 2>conftest.er1
f17e308a 6539 ac_status=$?
edfaf76d
LK
6540 grep -v '^ *+' conftest.er1 >conftest.err
6541 rm -f conftest.er1
6542 cat conftest.err >&5
b0448899 6543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6544 (exit $ac_status); } && {
6545 test -z "$ac_c_werror_flag" ||
6546 test ! -s conftest.err
6547 } && test -s conftest.$ac_objext; then
f17e308a
JD
6548 emacs_cv_personality_linux32=yes
6549else
b0448899 6550 echo "$as_me: failed program was:" >&5
f17e308a
JD
6551sed 's/^/| /' conftest.$ac_ext >&5
6552
ca81d7a0 6553 emacs_cv_personality_linux32=no
f17e308a 6554fi
ca81d7a0
JD
6555
6556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
6557{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6558echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6559
6560if test $emacs_cv_personality_linux32 = yes; then
6561
6562cat >>confdefs.h <<\_ACEOF
6563#define HAVE_PERSONALITY_LINUX32 1
6564_ACEOF
6565
6566fi
6567
6568
22044edf
DL
6569for ac_header in term.h
6570do
b0448899
CY
6571as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6572{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6573echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6574if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 6575 echo $ECHO_N "(cached) $ECHO_C" >&6
22044edf
DL
6576else
6577 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6578/* confdefs.h. */
6579_ACEOF
6580cat confdefs.h >>conftest.$ac_ext
6581cat >>conftest.$ac_ext <<_ACEOF
6582/* end confdefs.h. */
22044edf
DL
6583#include <$ac_header>
6584_ACEOF
ca81d7a0
JD
6585if { (ac_try="$ac_cpp conftest.$ac_ext"
6586case "(($ac_try" in
6587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6588 *) ac_try_echo=$ac_try;;
6589esac
b0448899 6590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6591 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6592 ac_status=$?
6593 grep -v '^ *+' conftest.er1 >conftest.err
6594 rm -f conftest.er1
6595 cat conftest.err >&5
b0448899 6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6597 (exit $ac_status); } >/dev/null && {
6598 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6599 test ! -s conftest.err
6600 }; then
22044edf
DL
6601 eval "$as_ac_Header=yes"
6602else
b0448899 6603 echo "$as_me: failed program was:" >&5
19650fd6
AS
6604sed 's/^/| /' conftest.$ac_ext >&5
6605
22044edf
DL
6606 eval "$as_ac_Header=no"
6607fi
ca81d7a0 6608
22044edf
DL
6609rm -f conftest.err conftest.$ac_ext
6610fi
b0448899
CY
6611ac_res=`eval echo '${'$as_ac_Header'}'`
6612 { echo "$as_me:$LINENO: result: $ac_res" >&5
6613echo "${ECHO_T}$ac_res" >&6; }
6614if test `eval echo '${'$as_ac_Header'}'` = yes; then
22044edf 6615 cat >>confdefs.h <<_ACEOF
b0448899 6616#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22044edf
DL
6617_ACEOF
6618
6619fi
6620
6621done
6622
b0448899
CY
6623{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6624echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6625if test "${ac_cv_header_stdc+set}" = set; then
b0448899 6626 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6627else
503d2be0 6628 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6629/* confdefs.h. */
6630_ACEOF
6631cat confdefs.h >>conftest.$ac_ext
6632cat >>conftest.$ac_ext <<_ACEOF
6633/* end confdefs.h. */
98418dba
CW
6634#include <stdlib.h>
6635#include <stdarg.h>
6636#include <string.h>
6637#include <float.h>
6638
19650fd6
AS
6639int
6640main ()
6641{
6642
6643 ;
6644 return 0;
6645}
98418dba 6646_ACEOF
19650fd6 6647rm -f conftest.$ac_objext
ca81d7a0
JD
6648if { (ac_try="$ac_compile"
6649case "(($ac_try" in
6650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6651 *) ac_try_echo=$ac_try;;
6652esac
b0448899 6653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6654 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6655 ac_status=$?
edfaf76d
LK
6656 grep -v '^ *+' conftest.er1 >conftest.err
6657 rm -f conftest.er1
6658 cat conftest.err >&5
b0448899 6659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6660 (exit $ac_status); } && {
6661 test -z "$ac_c_werror_flag" ||
6662 test ! -s conftest.err
6663 } && test -s conftest.$ac_objext; then
98418dba 6664 ac_cv_header_stdc=yes
ba4481b5 6665else
b0448899 6666 echo "$as_me: failed program was:" >&5
19650fd6
AS
6667sed 's/^/| /' conftest.$ac_ext >&5
6668
ca81d7a0 6669 ac_cv_header_stdc=no
ba4481b5 6670fi
ca81d7a0
JD
6671
6672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6673
6674if test $ac_cv_header_stdc = yes; then
6675 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6676 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6677/* confdefs.h. */
6678_ACEOF
6679cat confdefs.h >>conftest.$ac_ext
6680cat >>conftest.$ac_ext <<_ACEOF
6681/* end confdefs.h. */
98418dba
CW
6682#include <string.h>
6683
6684_ACEOF
6685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6686 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6687 :
6688else
6689 ac_cv_header_stdc=no
ba4481b5 6690fi
98418dba 6691rm -f conftest*
ba4481b5
DL
6692
6693fi
6694
98418dba
CW
6695if test $ac_cv_header_stdc = yes; then
6696 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6697 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6698/* confdefs.h. */
6699_ACEOF
6700cat confdefs.h >>conftest.$ac_ext
6701cat >>conftest.$ac_ext <<_ACEOF
6702/* end confdefs.h. */
98418dba
CW
6703#include <stdlib.h>
6704
6705_ACEOF
6706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6707 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6708 :
6709else
6710 ac_cv_header_stdc=no
6711fi
6712rm -f conftest*
6713
6714fi
6715
6716if test $ac_cv_header_stdc = yes; then
6717 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6718 if test "$cross_compiling" = yes; then
6719 :
d42122a3 6720else
503d2be0 6721 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6722/* confdefs.h. */
6723_ACEOF
6724cat confdefs.h >>conftest.$ac_ext
6725cat >>conftest.$ac_ext <<_ACEOF
6726/* end confdefs.h. */
98418dba 6727#include <ctype.h>
ca81d7a0 6728#include <stdlib.h>
98418dba
CW
6729#if ((' ' & 0x0FF) == 0x020)
6730# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6731# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6732#else
19650fd6 6733# define ISLOWER(c) \
edfaf76d
LK
6734 (('a' <= (c) && (c) <= 'i') \
6735 || ('j' <= (c) && (c) <= 'r') \
6736 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6737# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6738#endif
6739
6740#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6741int
6742main ()
6743{
98418dba
CW
6744 int i;
6745 for (i = 0; i < 256; i++)
6746 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6747 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6748 return 2;
6749 return 0;
503d2be0
AS
6750}
6751_ACEOF
98418dba 6752rm -f conftest$ac_exeext
ca81d7a0
JD
6753if { (ac_try="$ac_link"
6754case "(($ac_try" in
6755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6756 *) ac_try_echo=$ac_try;;
6757esac
b0448899 6758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6759 (eval "$ac_link") 2>&5
503d2be0 6760 ac_status=$?
b0448899 6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6763 { (case "(($ac_try" in
6764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6765 *) ac_try_echo=$ac_try;;
6766esac
b0448899 6767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6768 (eval "$ac_try") 2>&5
503d2be0 6769 ac_status=$?
b0448899 6770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6771 (exit $ac_status); }; }; then
98418dba 6772 :
d42122a3 6773else
b0448899
CY
6774 echo "$as_me: program exited with status $ac_status" >&5
6775echo "$as_me: failed program was:" >&5
19650fd6
AS
6776sed 's/^/| /' conftest.$ac_ext >&5
6777
c0d27fcc 6778( exit $ac_status )
98418dba 6779ac_cv_header_stdc=no
d42122a3 6780fi
ca81d7a0 6781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6782fi
ca81d7a0
JD
6783
6784
98418dba
CW
6785fi
6786fi
b0448899
CY
6787{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6788echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6789if test $ac_cv_header_stdc = yes; then
6790
c0d27fcc 6791cat >>confdefs.h <<\_ACEOF
98418dba 6792#define STDC_HEADERS 1
c0d27fcc 6793_ACEOF
d42122a3
DL
6794
6795fi
6796
b0448899
CY
6797{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6798echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6799if test "${ac_cv_header_time+set}" = set; then
b0448899 6800 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6801else
503d2be0 6802 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6803/* confdefs.h. */
6804_ACEOF
6805cat confdefs.h >>conftest.$ac_ext
6806cat >>conftest.$ac_ext <<_ACEOF
6807/* end confdefs.h. */
ba4481b5 6808#include <sys/types.h>
98418dba 6809#include <sys/time.h>
ba4481b5 6810#include <time.h>
503d2be0
AS
6811
6812int
6813main ()
6814{
98418dba
CW
6815if ((struct tm *) 0)
6816return 0;
503d2be0
AS
6817 ;
6818 return 0;
6819}
6820_ACEOF
6821rm -f conftest.$ac_objext
ca81d7a0
JD
6822if { (ac_try="$ac_compile"
6823case "(($ac_try" in
6824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6825 *) ac_try_echo=$ac_try;;
6826esac
b0448899 6827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6828 (eval "$ac_compile") 2>conftest.er1
503d2be0 6829 ac_status=$?
edfaf76d
LK
6830 grep -v '^ *+' conftest.er1 >conftest.err
6831 rm -f conftest.er1
6832 cat conftest.err >&5
b0448899 6833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6834 (exit $ac_status); } && {
6835 test -z "$ac_c_werror_flag" ||
6836 test ! -s conftest.err
6837 } && test -s conftest.$ac_objext; then
98418dba 6838 ac_cv_header_time=yes
ba4481b5 6839else
b0448899 6840 echo "$as_me: failed program was:" >&5
19650fd6
AS
6841sed 's/^/| /' conftest.$ac_ext >&5
6842
ca81d7a0 6843 ac_cv_header_time=no
ba4481b5 6844fi
ca81d7a0
JD
6845
6846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6847fi
b0448899
CY
6848{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6849echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6850if test $ac_cv_header_time = yes; then
503d2be0 6851
c0d27fcc 6852cat >>confdefs.h <<\_ACEOF
98418dba 6853#define TIME_WITH_SYS_TIME 1
c0d27fcc 6854_ACEOF
ba4481b5
DL
6855
6856fi
6857
b0448899
CY
6858{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6859echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6860if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
b0448899 6861 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6862else
503d2be0 6863 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6864/* confdefs.h. */
6865_ACEOF
6866cat confdefs.h >>conftest.$ac_ext
6867cat >>conftest.$ac_ext <<_ACEOF
6868/* end confdefs.h. */
cd958eb3
MB
6869$ac_includes_default
6870int
6871main ()
6872{
6873#ifndef sys_siglist
f053c89f 6874 (void) sys_siglist;
98418dba 6875#endif
503d2be0 6876
cd958eb3
MB
6877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
ca81d7a0
JD
6882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
b0448899 6887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6888 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6889 ac_status=$?
edfaf76d
LK
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
b0448899 6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6898 ac_cv_have_decl_sys_siglist=yes
6899else
b0448899 6900 echo "$as_me: failed program was:" >&5
19650fd6
AS
6901sed 's/^/| /' conftest.$ac_ext >&5
6902
ca81d7a0 6903 ac_cv_have_decl_sys_siglist=no
cd958eb3 6904fi
ca81d7a0
JD
6905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6907fi
b0448899
CY
6908{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6909echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
6910if test $ac_cv_have_decl_sys_siglist = yes; then
cd958eb3
MB
6911
6912cat >>confdefs.h <<_ACEOF
6913#define HAVE_DECL_SYS_SIGLIST 1
6914_ACEOF
6915
6916
6917else
6918 cat >>confdefs.h <<_ACEOF
6919#define HAVE_DECL_SYS_SIGLIST 0
6920_ACEOF
6921
6922
6923fi
6924
6925
6926if test $ac_cv_have_decl_sys_siglist != yes; then
6927 # For Tru64, at least:
b0448899
CY
6928 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6929echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6930if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
b0448899 6931 echo $ECHO_N "(cached) $ECHO_C" >&6
cd958eb3
MB
6932else
6933 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6934/* confdefs.h. */
6935_ACEOF
6936cat confdefs.h >>conftest.$ac_ext
6937cat >>conftest.$ac_ext <<_ACEOF
6938/* end confdefs.h. */
cd958eb3 6939$ac_includes_default
503d2be0
AS
6940int
6941main ()
6942{
cd958eb3 6943#ifndef __sys_siglist
f053c89f 6944 (void) __sys_siglist;
cd958eb3
MB
6945#endif
6946
503d2be0
AS
6947 ;
6948 return 0;
6949}
6950_ACEOF
6951rm -f conftest.$ac_objext
ca81d7a0
JD
6952if { (ac_try="$ac_compile"
6953case "(($ac_try" in
6954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6955 *) ac_try_echo=$ac_try;;
6956esac
b0448899 6957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6958 (eval "$ac_compile") 2>conftest.er1
503d2be0 6959 ac_status=$?
edfaf76d
LK
6960 grep -v '^ *+' conftest.er1 >conftest.err
6961 rm -f conftest.er1
6962 cat conftest.err >&5
b0448899 6963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6964 (exit $ac_status); } && {
6965 test -z "$ac_c_werror_flag" ||
6966 test ! -s conftest.err
6967 } && test -s conftest.$ac_objext; then
cd958eb3 6968 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6969else
b0448899 6970 echo "$as_me: failed program was:" >&5
19650fd6
AS
6971sed 's/^/| /' conftest.$ac_ext >&5
6972
ca81d7a0 6973 ac_cv_have_decl___sys_siglist=no
ba4481b5 6974fi
ca81d7a0
JD
6975
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6977fi
b0448899
CY
6978{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6979echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
6980if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6981
cd958eb3
MB
6982cat >>confdefs.h <<_ACEOF
6983#define HAVE_DECL___SYS_SIGLIST 1
6984_ACEOF
6985
6986
6987else
6988 cat >>confdefs.h <<_ACEOF
6989#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6990_ACEOF
503d2be0 6991
cd958eb3 6992
ba4481b5
DL
6993fi
6994
cd958eb3
MB
6995
6996 if test $ac_cv_have_decl___sys_siglist = yes; then
6997
6998cat >>confdefs.h <<\_ACEOF
6999#define sys_siglist __sys_siglist
7000_ACEOF
7001
7002 fi
7003fi
b0448899
CY
7004{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7005echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7006if test "${ac_cv_header_sys_wait_h+set}" = set; then
b0448899 7007 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7008else
503d2be0 7009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7010/* confdefs.h. */
7011_ACEOF
7012cat confdefs.h >>conftest.$ac_ext
7013cat >>conftest.$ac_ext <<_ACEOF
7014/* end confdefs.h. */
98418dba
CW
7015#include <sys/types.h>
7016#include <sys/wait.h>
7017#ifndef WEXITSTATUS
ca81d7a0 7018# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7019#endif
7020#ifndef WIFEXITED
7021# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7022#endif
503d2be0
AS
7023
7024int
7025main ()
7026{
98418dba
CW
7027 int s;
7028 wait (&s);
7029 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7030 ;
7031 return 0;
7032}
7033_ACEOF
98418dba 7034rm -f conftest.$ac_objext
ca81d7a0
JD
7035if { (ac_try="$ac_compile"
7036case "(($ac_try" in
7037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7038 *) ac_try_echo=$ac_try;;
7039esac
b0448899 7040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7041 (eval "$ac_compile") 2>conftest.er1
503d2be0 7042 ac_status=$?
edfaf76d
LK
7043 grep -v '^ *+' conftest.er1 >conftest.err
7044 rm -f conftest.er1
7045 cat conftest.err >&5
b0448899 7046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7047 (exit $ac_status); } && {
7048 test -z "$ac_c_werror_flag" ||
7049 test ! -s conftest.err
7050 } && test -s conftest.$ac_objext; then
98418dba 7051 ac_cv_header_sys_wait_h=yes
ba4481b5 7052else
b0448899 7053 echo "$as_me: failed program was:" >&5
19650fd6
AS
7054sed 's/^/| /' conftest.$ac_ext >&5
7055
ca81d7a0 7056 ac_cv_header_sys_wait_h=no
ba4481b5 7057fi
ca81d7a0
JD
7058
7059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7060fi
b0448899
CY
7061{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7062echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7063if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7064
c0d27fcc 7065cat >>confdefs.h <<\_ACEOF
98418dba 7066#define HAVE_SYS_WAIT_H 1
c0d27fcc 7067_ACEOF
ba4481b5 7068
ba4481b5
DL
7069fi
7070
c0d27fcc 7071
b0448899
CY
7072{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7073echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7074if test "${emacs_cv_struct_utimbuf+set}" = set; then
b0448899 7075 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7076else
503d2be0 7077 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7078/* confdefs.h. */
7079_ACEOF
7080cat confdefs.h >>conftest.$ac_ext
7081cat >>conftest.$ac_ext <<_ACEOF
7082/* end confdefs.h. */
98418dba
CW
7083#ifdef TIME_WITH_SYS_TIME
7084#include <sys/time.h>
7085#include <time.h>
7086#else
7087#ifdef HAVE_SYS_TIME_H
7088#include <sys/time.h>
7089#else
1113b624 7090#include <time.h>
98418dba
CW
7091#endif
7092#endif
7093#ifdef HAVE_UTIME_H
7094#include <utime.h>
7095#endif
503d2be0
AS
7096int
7097main ()
7098{
98418dba 7099static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7100 ;
7101 return 0;
7102}
7103_ACEOF
98418dba 7104rm -f conftest.$ac_objext
ca81d7a0
JD
7105if { (ac_try="$ac_compile"
7106case "(($ac_try" in
7107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108 *) ac_try_echo=$ac_try;;
7109esac
b0448899 7110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7111 (eval "$ac_compile") 2>conftest.er1
503d2be0 7112 ac_status=$?
edfaf76d
LK
7113 grep -v '^ *+' conftest.er1 >conftest.err
7114 rm -f conftest.er1
7115 cat conftest.err >&5
b0448899 7116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7117 (exit $ac_status); } && {
7118 test -z "$ac_c_werror_flag" ||
7119 test ! -s conftest.err
7120 } && test -s conftest.$ac_objext; then
98418dba 7121 emacs_cv_struct_utimbuf=yes
1113b624 7122else
b0448899 7123 echo "$as_me: failed program was:" >&5
19650fd6
AS
7124sed 's/^/| /' conftest.$ac_ext >&5
7125
ca81d7a0 7126 emacs_cv_struct_utimbuf=no
1113b624 7127fi
ca81d7a0
JD
7128
7129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7130fi
b0448899
CY
7131{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7132echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7133if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7134
c0d27fcc 7135cat >>confdefs.h <<\_ACEOF
98418dba 7136#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7137_ACEOF
1113b624
PE
7138
7139fi
ba4481b5 7140
b0448899
CY
7141{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7142echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7143if test "${ac_cv_type_signal+set}" = set; then
b0448899 7144 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7145else
98418dba 7146 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7147/* confdefs.h. */
7148_ACEOF
7149cat confdefs.h >>conftest.$ac_ext
7150cat >>conftest.$ac_ext <<_ACEOF
7151/* end confdefs.h. */
7397acc4 7152#include <sys/types.h>
98418dba 7153#include <signal.h>
98418dba 7154
503d2be0
AS
7155int
7156main ()
7157{
ca81d7a0 7158return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7159 ;
7160 return 0;
7161}
7162_ACEOF
98418dba 7163rm -f conftest.$ac_objext
ca81d7a0
JD
7164if { (ac_try="$ac_compile"
7165case "(($ac_try" in
7166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7167 *) ac_try_echo=$ac_try;;
7168esac
b0448899 7169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7170 (eval "$ac_compile") 2>conftest.er1
503d2be0 7171 ac_status=$?
edfaf76d
LK
7172 grep -v '^ *+' conftest.er1 >conftest.err
7173 rm -f conftest.er1
7174 cat conftest.err >&5
b0448899 7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7176 (exit $ac_status); } && {
7177 test -z "$ac_c_werror_flag" ||
7178 test ! -s conftest.err
7179 } && test -s conftest.$ac_objext; then
ca81d7a0 7180 ac_cv_type_signal=int
503d2be0 7181else
b0448899 7182 echo "$as_me: failed program was:" >&5
19650fd6
AS
7183sed 's/^/| /' conftest.$ac_ext >&5
7184
ca81d7a0 7185 ac_cv_type_signal=void
503d2be0 7186fi
ca81d7a0
JD
7187
7188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7189fi
b0448899
CY
7190{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7191echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7192
c0d27fcc 7193cat >>confdefs.h <<_ACEOF
98418dba 7194#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7195_ACEOF
7196
503d2be0 7197
c0d27fcc 7198
b0448899
CY
7199{ echo "$as_me:$LINENO: checking for speed_t" >&5
7200echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba 7201if test "${emacs_cv_speed_t+set}" = set; then
b0448899 7202 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7203else
98418dba 7204 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7205/* confdefs.h. */
7206_ACEOF
7207cat confdefs.h >>conftest.$ac_ext
7208cat >>conftest.$ac_ext <<_ACEOF
7209/* end confdefs.h. */
98418dba 7210#include <termios.h>
98418dba
CW
7211int
7212main ()
7213{
7214speed_t x = 1;
7215 ;
7216 return 0;
7217}
7218_ACEOF
7219rm -f conftest.$ac_objext
ca81d7a0
JD
7220if { (ac_try="$ac_compile"
7221case "(($ac_try" in
7222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7223 *) ac_try_echo=$ac_try;;
7224esac
b0448899 7225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7226 (eval "$ac_compile") 2>conftest.er1
98418dba 7227 ac_status=$?
edfaf76d
LK
7228 grep -v '^ *+' conftest.er1 >conftest.err
7229 rm -f conftest.er1
7230 cat conftest.err >&5
b0448899 7231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7232 (exit $ac_status); } && {
7233 test -z "$ac_c_werror_flag" ||
7234 test ! -s conftest.err
7235 } && test -s conftest.$ac_objext; then
98418dba
CW
7236 emacs_cv_speed_t=yes
7237else
b0448899 7238 echo "$as_me: failed program was:" >&5
19650fd6
AS
7239sed 's/^/| /' conftest.$ac_ext >&5
7240
ca81d7a0 7241 emacs_cv_speed_t=no
98418dba 7242fi
ca81d7a0
JD
7243
7244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7245fi
b0448899
CY
7246{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7247echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7248if test $emacs_cv_speed_t = yes; then
b936fae4 7249
c0d27fcc 7250cat >>confdefs.h <<\_ACEOF
98418dba 7251#define HAVE_SPEED_T 1
c0d27fcc 7252_ACEOF
98418dba 7253
7397acc4
DL
7254fi
7255
b0448899
CY
7256{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7257echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7258if test "${emacs_cv_struct_timeval+set}" = set; then
b0448899 7259 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7260else
503d2be0 7261 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7262/* confdefs.h. */
7263_ACEOF
7264cat confdefs.h >>conftest.$ac_ext
7265cat >>conftest.$ac_ext <<_ACEOF
7266/* end confdefs.h. */
98418dba
CW
7267#ifdef TIME_WITH_SYS_TIME
7268#include <sys/time.h>
7269#include <time.h>
7270#else
7271#ifdef HAVE_SYS_TIME_H
7272#include <sys/time.h>
7273#else
7274#include <time.h>
7275#endif
7276#endif
503d2be0
AS
7277int
7278main ()
7279{
98418dba 7280static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
ca81d7a0
JD
7286if { (ac_try="$ac_compile"
7287case "(($ac_try" in
7288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7289 *) ac_try_echo=$ac_try;;
7290esac
b0448899 7291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7292 (eval "$ac_compile") 2>conftest.er1
503d2be0 7293 ac_status=$?
edfaf76d
LK
7294 grep -v '^ *+' conftest.er1 >conftest.err
7295 rm -f conftest.er1
7296 cat conftest.err >&5
b0448899 7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7298 (exit $ac_status); } && {
7299 test -z "$ac_c_werror_flag" ||
7300 test ! -s conftest.err
7301 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7302 emacs_cv_struct_timeval=yes
7303else
b0448899 7304 echo "$as_me: failed program was:" >&5
19650fd6
AS
7305sed 's/^/| /' conftest.$ac_ext >&5
7306
ca81d7a0 7307 emacs_cv_struct_timeval=no
7397acc4 7308fi
ca81d7a0
JD
7309
7310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7311fi
b0448899
CY
7312{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7313echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7314HAVE_TIMEVAL=$emacs_cv_struct_timeval
7315if test $emacs_cv_struct_timeval = yes; then
b936fae4 7316
c0d27fcc 7317cat >>confdefs.h <<\_ACEOF
98418dba 7318#define HAVE_TIMEVAL 1
c0d27fcc 7319_ACEOF
7397acc4
DL
7320
7321fi
7322
b0448899
CY
7323{ echo "$as_me:$LINENO: checking for struct exception" >&5
7324echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7325if test "${emacs_cv_struct_exception+set}" = set; then
b0448899 7326 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7327else
503d2be0 7328 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7329/* confdefs.h. */
7330_ACEOF
7331cat confdefs.h >>conftest.$ac_ext
7332cat >>conftest.$ac_ext <<_ACEOF
7333/* end confdefs.h. */
98418dba 7334#include <math.h>
503d2be0
AS
7335int
7336main ()
7337{
98418dba 7338static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7339 ;
7340 return 0;
ba4481b5 7341}
503d2be0
AS
7342_ACEOF
7343rm -f conftest.$ac_objext
ca81d7a0
JD
7344if { (ac_try="$ac_compile"
7345case "(($ac_try" in
7346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7347 *) ac_try_echo=$ac_try;;
7348esac
b0448899 7349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7350 (eval "$ac_compile") 2>conftest.er1
503d2be0 7351 ac_status=$?
edfaf76d
LK
7352 grep -v '^ *+' conftest.er1 >conftest.err
7353 rm -f conftest.er1
7354 cat conftest.err >&5
b0448899 7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7356 (exit $ac_status); } && {
7357 test -z "$ac_c_werror_flag" ||
7358 test ! -s conftest.err
7359 } && test -s conftest.$ac_objext; then
98418dba 7360 emacs_cv_struct_exception=yes
ba4481b5 7361else
b0448899 7362 echo "$as_me: failed program was:" >&5
19650fd6
AS
7363sed 's/^/| /' conftest.$ac_ext >&5
7364
ca81d7a0 7365 emacs_cv_struct_exception=no
ba4481b5 7366fi
ca81d7a0
JD
7367
7368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7369fi
b0448899
CY
7370{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7371echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7372HAVE_EXCEPTION=$emacs_cv_struct_exception
7373if test $emacs_cv_struct_exception != yes; then
b936fae4 7374
c0d27fcc 7375cat >>confdefs.h <<\_ACEOF
98418dba 7376#define NO_MATHERR 1
c0d27fcc 7377_ACEOF
ba4481b5
DL
7378
7379fi
7380
7862d3a8
AS
7381
7382for ac_header in sys/socket.h
7383do
b0448899 7384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 7385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
7386 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7387echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 7388if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 7389 echo $ECHO_N "(cached) $ECHO_C" >&6
7862d3a8 7390fi
b0448899
CY
7391ac_res=`eval echo '${'$as_ac_Header'}'`
7392 { echo "$as_me:$LINENO: result: $ac_res" >&5
7393echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7394else
7395 # Is the header compilable?
b0448899
CY
7396{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7397echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7398cat >conftest.$ac_ext <<_ACEOF
7399/* confdefs.h. */
7400_ACEOF
7401cat confdefs.h >>conftest.$ac_ext
7402cat >>conftest.$ac_ext <<_ACEOF
7403/* end confdefs.h. */
7404$ac_includes_default
7405#include <$ac_header>
7406_ACEOF
7407rm -f conftest.$ac_objext
ca81d7a0
JD
7408if { (ac_try="$ac_compile"
7409case "(($ac_try" in
7410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7411 *) ac_try_echo=$ac_try;;
7412esac
b0448899 7413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7414 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7415 ac_status=$?
edfaf76d
LK
7416 grep -v '^ *+' conftest.er1 >conftest.err
7417 rm -f conftest.er1
7418 cat conftest.err >&5
b0448899 7419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7420 (exit $ac_status); } && {
7421 test -z "$ac_c_werror_flag" ||
7422 test ! -s conftest.err
7423 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7424 ac_header_compiler=yes
7425else
b0448899 7426 echo "$as_me: failed program was:" >&5
7862d3a8
AS
7427sed 's/^/| /' conftest.$ac_ext >&5
7428
ca81d7a0 7429 ac_header_compiler=no
7862d3a8 7430fi
ca81d7a0
JD
7431
7432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
7433{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7434echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7435
7436# Is the header present?
b0448899
CY
7437{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7438echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7439cat >conftest.$ac_ext <<_ACEOF
7440/* confdefs.h. */
7441_ACEOF
7442cat confdefs.h >>conftest.$ac_ext
7443cat >>conftest.$ac_ext <<_ACEOF
7444/* end confdefs.h. */
7445#include <$ac_header>
7446_ACEOF
ca81d7a0
JD
7447if { (ac_try="$ac_cpp conftest.$ac_ext"
7448case "(($ac_try" in
7449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7450 *) ac_try_echo=$ac_try;;
7451esac
b0448899 7452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7453 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7454 ac_status=$?
7455 grep -v '^ *+' conftest.er1 >conftest.err
7456 rm -f conftest.er1
7457 cat conftest.err >&5
b0448899 7458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7459 (exit $ac_status); } >/dev/null && {
7460 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7461 test ! -s conftest.err
7462 }; then
7862d3a8
AS
7463 ac_header_preproc=yes
7464else
b0448899 7465 echo "$as_me: failed program was:" >&5
7862d3a8
AS
7466sed 's/^/| /' conftest.$ac_ext >&5
7467
7468 ac_header_preproc=no
7469fi
ca81d7a0 7470
7862d3a8 7471rm -f conftest.err conftest.$ac_ext
b0448899
CY
7472{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7473echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7474
7475# So? What about this header?
edfaf76d
LK
7476case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7477 yes:no: )
b0448899
CY
7478 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7479echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7480 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7481echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 7482 ac_header_preproc=yes
7862d3a8 7483 ;;
edfaf76d 7484 no:yes:* )
b0448899
CY
7485 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7486echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7487 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7488echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7489 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7490echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7491 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7492echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7493 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7494echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7495 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7496echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7497
7862d3a8
AS
7498 ;;
7499esac
b0448899
CY
7500{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7501echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 7502if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 7503 echo $ECHO_N "(cached) $ECHO_C" >&6
7862d3a8 7504else
edfaf76d 7505 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7506fi
b0448899
CY
7507ac_res=`eval echo '${'$as_ac_Header'}'`
7508 { echo "$as_me:$LINENO: result: $ac_res" >&5
7509echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7510
7511fi
b0448899 7512if test `eval echo '${'$as_ac_Header'}'` = yes; then
7862d3a8 7513 cat >>confdefs.h <<_ACEOF
b0448899 7514#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7862d3a8
AS
7515_ACEOF
7516
7517fi
7518
7519done
7520
7521
7522for ac_header in net/if.h
7523do
b0448899
CY
7524as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7525{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 7527if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 7528 echo $ECHO_N "(cached) $ECHO_C" >&6
7862d3a8
AS
7529else
7530 cat >conftest.$ac_ext <<_ACEOF
7531/* confdefs.h. */
7532_ACEOF
7533cat confdefs.h >>conftest.$ac_ext
7534cat >>conftest.$ac_ext <<_ACEOF
7535/* end confdefs.h. */
7536$ac_includes_default
7537#if HAVE_SYS_SOCKET_H
7538#include <sys/socket.h>
7539#endif
7540
7541#include <$ac_header>
7542_ACEOF
7543rm -f conftest.$ac_objext
ca81d7a0
JD
7544if { (ac_try="$ac_compile"
7545case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548esac
b0448899 7549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7550 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7551 ac_status=$?
edfaf76d
LK
7552 grep -v '^ *+' conftest.er1 >conftest.err
7553 rm -f conftest.er1
7554 cat conftest.err >&5
b0448899 7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7556 (exit $ac_status); } && {
7557 test -z "$ac_c_werror_flag" ||
7558 test ! -s conftest.err
7559 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7560 eval "$as_ac_Header=yes"
7561else
b0448899 7562 echo "$as_me: failed program was:" >&5
7862d3a8
AS
7563sed 's/^/| /' conftest.$ac_ext >&5
7564
ca81d7a0 7565 eval "$as_ac_Header=no"
7862d3a8 7566fi
ca81d7a0
JD
7567
7568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7569fi
b0448899
CY
7570ac_res=`eval echo '${'$as_ac_Header'}'`
7571 { echo "$as_me:$LINENO: result: $ac_res" >&5
7572echo "${ECHO_T}$ac_res" >&6; }
7573if test `eval echo '${'$as_ac_Header'}'` = yes; then
7862d3a8 7574 cat >>confdefs.h <<_ACEOF
b0448899 7575#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7862d3a8
AS
7576_ACEOF
7577
7578fi
7579
7580done
7581
7582
b0448899
CY
7583{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7584echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7585if test "${ac_cv_struct_tm+set}" = set; then
b0448899 7586 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7587else
503d2be0 7588 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
98418dba
CW
7594#include <sys/types.h>
7595#include <time.h>
7397acc4 7596
503d2be0
AS
7597int
7598main ()
7599{
f053c89f
CY
7600struct tm tm;
7601 int *p = &tm.tm_sec;
b0448899 7602 return !p;
503d2be0
AS
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
ca81d7a0
JD
7608if { (ac_try="$ac_compile"
7609case "(($ac_try" in
7610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611 *) ac_try_echo=$ac_try;;
7612esac
b0448899 7613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7614 (eval "$ac_compile") 2>conftest.er1
503d2be0 7615 ac_status=$?
edfaf76d
LK
7616 grep -v '^ *+' conftest.er1 >conftest.err
7617 rm -f conftest.er1
7618 cat conftest.err >&5
b0448899 7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7620 (exit $ac_status); } && {
7621 test -z "$ac_c_werror_flag" ||
7622 test ! -s conftest.err
7623 } && test -s conftest.$ac_objext; then
35996d22
AS
7624 ac_cv_struct_tm=time.h
7625else
b0448899 7626 echo "$as_me: failed program was:" >&5
19650fd6
AS
7627sed 's/^/| /' conftest.$ac_ext >&5
7628
ca81d7a0 7629 ac_cv_struct_tm=sys/time.h
7397acc4 7630fi
ca81d7a0
JD
7631
7632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7633fi
b0448899
CY
7634{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7635echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7636if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7637
c0d27fcc 7638cat >>confdefs.h <<\_ACEOF
98418dba 7639#define TM_IN_SYS_TIME 1
c0d27fcc 7640_ACEOF
7397acc4
DL
7641
7642fi
ba4481b5 7643
b0448899
CY
7644{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7645echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7646if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
b0448899 7647 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7648else
98418dba 7649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7650/* confdefs.h. */
7651_ACEOF
7652cat confdefs.h >>conftest.$ac_ext
7653cat >>conftest.$ac_ext <<_ACEOF
7654/* end confdefs.h. */
98418dba
CW
7655#include <sys/types.h>
7656#include <$ac_cv_struct_tm>
ba4481b5 7657
c0d27fcc 7658
98418dba
CW
7659int
7660main ()
7661{
7662static struct tm ac_aggr;
7663if (ac_aggr.tm_zone)
7664return 0;
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669rm -f conftest.$ac_objext
ca81d7a0
JD
7670if { (ac_try="$ac_compile"
7671case "(($ac_try" in
7672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7673 *) ac_try_echo=$ac_try;;
7674esac
b0448899 7675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7676 (eval "$ac_compile") 2>conftest.er1
98418dba 7677 ac_status=$?
edfaf76d
LK
7678 grep -v '^ *+' conftest.er1 >conftest.err
7679 rm -f conftest.er1
7680 cat conftest.err >&5
b0448899 7681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7682 (exit $ac_status); } && {
7683 test -z "$ac_c_werror_flag" ||
7684 test ! -s conftest.err
7685 } && test -s conftest.$ac_objext; then
98418dba 7686 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7687else
b0448899 7688 echo "$as_me: failed program was:" >&5
19650fd6
AS
7689sed 's/^/| /' conftest.$ac_ext >&5
7690
ca81d7a0 7691 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7692/* confdefs.h. */
7693_ACEOF
7694cat confdefs.h >>conftest.$ac_ext
7695cat >>conftest.$ac_ext <<_ACEOF
7696/* end confdefs.h. */
6bae0ccf
DL
7697#include <sys/types.h>
7698#include <$ac_cv_struct_tm>
7699
7700
7701int
7702main ()
7703{
7704static struct tm ac_aggr;
7705if (sizeof ac_aggr.tm_zone)
7706return 0;
7707 ;
7708 return 0;
7709}
7710_ACEOF
7711rm -f conftest.$ac_objext
ca81d7a0
JD
7712if { (ac_try="$ac_compile"
7713case "(($ac_try" in
7714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7715 *) ac_try_echo=$ac_try;;
7716esac
b0448899 7717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7718 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7719 ac_status=$?
edfaf76d
LK
7720 grep -v '^ *+' conftest.er1 >conftest.err
7721 rm -f conftest.er1
7722 cat conftest.err >&5
b0448899 7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7724 (exit $ac_status); } && {
7725 test -z "$ac_c_werror_flag" ||
7726 test ! -s conftest.err
7727 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7728 ac_cv_member_struct_tm_tm_zone=yes
7729else
b0448899 7730 echo "$as_me: failed program was:" >&5
19650fd6
AS
7731sed 's/^/| /' conftest.$ac_ext >&5
7732
ca81d7a0 7733 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7734fi
ca81d7a0
JD
7735
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7737fi
ca81d7a0
JD
7738
7739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7740fi
b0448899
CY
7741{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7742echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
7743if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7744
c0d27fcc 7745cat >>confdefs.h <<_ACEOF
98418dba 7746#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7747_ACEOF
7748
ba4481b5 7749
98418dba 7750fi
ba4481b5 7751
98418dba 7752if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7753
c0d27fcc 7754cat >>confdefs.h <<\_ACEOF
98418dba 7755#define HAVE_TM_ZONE 1
c0d27fcc 7756_ACEOF
ba4481b5 7757
ba4481b5 7758else
b0448899
CY
7759 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7760echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
ca81d7a0 7761if test "${ac_cv_have_decl_tzname+set}" = set; then
b0448899 7762 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7763else
98418dba 7764 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7765/* confdefs.h. */
7766_ACEOF
7767cat confdefs.h >>conftest.$ac_ext
7768cat >>conftest.$ac_ext <<_ACEOF
7769/* end confdefs.h. */
98418dba 7770#include <time.h>
98418dba 7771
98418dba
CW
7772int
7773main ()
7774{
ca81d7a0 7775#ifndef tzname
f053c89f 7776 (void) tzname;
ca81d7a0
JD
7777#endif
7778
6bae0ccf
DL
7779 ;
7780 return 0;
7781}
7782_ACEOF
7783rm -f conftest.$ac_objext
ca81d7a0
JD
7784if { (ac_try="$ac_compile"
7785case "(($ac_try" in
7786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7787 *) ac_try_echo=$ac_try;;
7788esac
b0448899 7789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7790 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7791 ac_status=$?
edfaf76d
LK
7792 grep -v '^ *+' conftest.er1 >conftest.err
7793 rm -f conftest.er1
7794 cat conftest.err >&5
b0448899 7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7796 (exit $ac_status); } && {
7797 test -z "$ac_c_werror_flag" ||
7798 test ! -s conftest.err
7799 } && test -s conftest.$ac_objext; then
ca81d7a0 7800 ac_cv_have_decl_tzname=yes
6bae0ccf 7801else
b0448899 7802 echo "$as_me: failed program was:" >&5
19650fd6
AS
7803sed 's/^/| /' conftest.$ac_ext >&5
7804
ca81d7a0 7805 ac_cv_have_decl_tzname=no
ba4481b5 7806fi
ca81d7a0
JD
7807
7808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7809fi
b0448899
CY
7810{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7811echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7812if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7813
c0d27fcc 7814cat >>confdefs.h <<_ACEOF
ca81d7a0 7815#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7816_ACEOF
7817
ba4481b5 7818
ca81d7a0
JD
7819else
7820 cat >>confdefs.h <<_ACEOF
7821#define HAVE_DECL_TZNAME 0
7822_ACEOF
ba4481b5 7823
ba4481b5 7824
98418dba 7825fi
ba4481b5 7826
ca81d7a0 7827
b0448899
CY
7828 { echo "$as_me:$LINENO: checking for tzname" >&5
7829echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7830if test "${ac_cv_var_tzname+set}" = set; then
b0448899 7831 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7832else
98418dba 7833 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7834/* confdefs.h. */
7835_ACEOF
7836cat confdefs.h >>conftest.$ac_ext
7837cat >>conftest.$ac_ext <<_ACEOF
7838/* end confdefs.h. */
98418dba 7839#include <time.h>
ca81d7a0
JD
7840#if !HAVE_DECL_TZNAME
7841extern char *tzname[];
98418dba
CW
7842#endif
7843
98418dba
CW
7844int
7845main ()
7846{
ca81d7a0 7847return tzname[0][0];
98418dba
CW
7848 ;
7849 return 0;
7850}
7851_ACEOF
7852rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7853if { (ac_try="$ac_link"
7854case "(($ac_try" in
7855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7856 *) ac_try_echo=$ac_try;;
7857esac
b0448899 7858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7859 (eval "$ac_link") 2>conftest.er1
98418dba 7860 ac_status=$?
edfaf76d
LK
7861 grep -v '^ *+' conftest.er1 >conftest.err
7862 rm -f conftest.er1
7863 cat conftest.err >&5
b0448899 7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7865 (exit $ac_status); } && {
7866 test -z "$ac_c_werror_flag" ||
7867 test ! -s conftest.err
b0448899
CY
7868 } && test -s conftest$ac_exeext &&
7869 $as_test_x conftest$ac_exeext; then
98418dba
CW
7870 ac_cv_var_tzname=yes
7871else
b0448899 7872 echo "$as_me: failed program was:" >&5
19650fd6
AS
7873sed 's/^/| /' conftest.$ac_ext >&5
7874
ca81d7a0 7875 ac_cv_var_tzname=no
ba4481b5 7876fi
6bae0ccf 7877
f053c89f 7878rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7879 conftest$ac_exeext conftest.$ac_ext
98418dba 7880fi
b0448899
CY
7881{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7882echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7883 if test $ac_cv_var_tzname = yes; then
ba4481b5 7884
c0d27fcc 7885cat >>confdefs.h <<\_ACEOF
98418dba 7886#define HAVE_TZNAME 1
c0d27fcc 7887_ACEOF
503d2be0 7888
98418dba
CW
7889 fi
7890fi
503d2be0 7891
b0448899
CY
7892{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7893echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7894if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
b0448899 7895 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
7896else
7897 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7898/* confdefs.h. */
7899_ACEOF
7900cat confdefs.h >>conftest.$ac_ext
7901cat >>conftest.$ac_ext <<_ACEOF
7902/* end confdefs.h. */
98418dba 7903#include <time.h>
b936fae4 7904
98418dba
CW
7905int
7906main ()
7907{
b936fae4
AS
7908static struct tm ac_aggr;
7909if (ac_aggr.tm_gmtoff)
7910return 0;
98418dba
CW
7911 ;
7912 return 0;
7913}
7914_ACEOF
b936fae4 7915rm -f conftest.$ac_objext
ca81d7a0
JD
7916if { (ac_try="$ac_compile"
7917case "(($ac_try" in
7918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7919 *) ac_try_echo=$ac_try;;
7920esac
b0448899 7921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7922 (eval "$ac_compile") 2>conftest.er1
98418dba 7923 ac_status=$?
edfaf76d
LK
7924 grep -v '^ *+' conftest.er1 >conftest.err
7925 rm -f conftest.er1
7926 cat conftest.err >&5
b0448899 7927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7928 (exit $ac_status); } && {
7929 test -z "$ac_c_werror_flag" ||
7930 test ! -s conftest.err
7931 } && test -s conftest.$ac_objext; then
b936fae4 7932 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba 7933else
b0448899 7934 echo "$as_me: failed program was:" >&5
19650fd6
AS
7935sed 's/^/| /' conftest.$ac_ext >&5
7936
ca81d7a0 7937 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7938/* confdefs.h. */
7939_ACEOF
7940cat confdefs.h >>conftest.$ac_ext
7941cat >>conftest.$ac_ext <<_ACEOF
7942/* end confdefs.h. */
6bae0ccf
DL
7943#include <time.h>
7944
8799b3e4
CW
7945int
7946main ()
7947{
6bae0ccf
DL
7948static struct tm ac_aggr;
7949if (sizeof ac_aggr.tm_gmtoff)
7950return 0;
8799b3e4
CW
7951 ;
7952 return 0;
7953}
7954_ACEOF
6bae0ccf 7955rm -f conftest.$ac_objext
ca81d7a0
JD
7956if { (ac_try="$ac_compile"
7957case "(($ac_try" in
7958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7959 *) ac_try_echo=$ac_try;;
7960esac
b0448899 7961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7962 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7963 ac_status=$?
edfaf76d
LK
7964 grep -v '^ *+' conftest.er1 >conftest.err
7965 rm -f conftest.er1
7966 cat conftest.err >&5
b0448899 7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7968 (exit $ac_status); } && {
7969 test -z "$ac_c_werror_flag" ||
7970 test ! -s conftest.err
7971 } && test -s conftest.$ac_objext; then
6bae0ccf 7972 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4 7973else
b0448899 7974 echo "$as_me: failed program was:" >&5
19650fd6
AS
7975sed 's/^/| /' conftest.$ac_ext >&5
7976
ca81d7a0 7977 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7978fi
ca81d7a0
JD
7979
7980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7981fi
ca81d7a0
JD
7982
7983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7984fi
b0448899
CY
7985{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7986echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
7987if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6bae0ccf
DL
7988
7989cat >>confdefs.h <<\_ACEOF
7990#define HAVE_TM_GMTOFF 1
7991_ACEOF
7992
7993fi
7994
b0448899
CY
7995{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7996echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036 7997if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
b0448899 7998 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
7999else
8000 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8001/* confdefs.h. */
8002_ACEOF
8003cat confdefs.h >>conftest.$ac_ext
8004cat >>conftest.$ac_ext <<_ACEOF
8005/* end confdefs.h. */
7862d3a8
AS
8006$ac_includes_default
8007#if HAVE_SYS_SOCKET_H
8008#include <sys/socket.h>
8009#endif
8010#if HAVE_NET_IF_H
96f3a036 8011#include <net/if.h>
7862d3a8 8012#endif
96f3a036
DL
8013
8014int
8015main ()
8016{
8017static struct ifreq ac_aggr;
8018if (ac_aggr.ifr_flags)
8019return 0;
8020 ;
8021 return 0;
8022}
8023_ACEOF
8024rm -f conftest.$ac_objext
ca81d7a0
JD
8025if { (ac_try="$ac_compile"
8026case "(($ac_try" in
8027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8028 *) ac_try_echo=$ac_try;;
8029esac
b0448899 8030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8031 (eval "$ac_compile") 2>conftest.er1
96f3a036 8032 ac_status=$?
edfaf76d
LK
8033 grep -v '^ *+' conftest.er1 >conftest.err
8034 rm -f conftest.er1
8035 cat conftest.err >&5
b0448899 8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8037 (exit $ac_status); } && {
8038 test -z "$ac_c_werror_flag" ||
8039 test ! -s conftest.err
8040 } && test -s conftest.$ac_objext; then
96f3a036
DL
8041 ac_cv_member_struct_ifreq_ifr_flags=yes
8042else
b0448899 8043 echo "$as_me: failed program was:" >&5
96f3a036
DL
8044sed 's/^/| /' conftest.$ac_ext >&5
8045
ca81d7a0 8046 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8047/* confdefs.h. */
8048_ACEOF
8049cat confdefs.h >>conftest.$ac_ext
8050cat >>conftest.$ac_ext <<_ACEOF
8051/* end confdefs.h. */
7862d3a8
AS
8052$ac_includes_default
8053#if HAVE_SYS_SOCKET_H
8054#include <sys/socket.h>
8055#endif
8056#if HAVE_NET_IF_H
96f3a036 8057#include <net/if.h>
7862d3a8 8058#endif
96f3a036
DL
8059
8060int
8061main ()
8062{
8063static struct ifreq ac_aggr;
8064if (sizeof ac_aggr.ifr_flags)
8065return 0;
8066 ;
8067 return 0;
8068}
8069_ACEOF
8070rm -f conftest.$ac_objext
ca81d7a0
JD
8071if { (ac_try="$ac_compile"
8072case "(($ac_try" in
8073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8074 *) ac_try_echo=$ac_try;;
8075esac
b0448899 8076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8077 (eval "$ac_compile") 2>conftest.er1
96f3a036 8078 ac_status=$?
edfaf76d
LK
8079 grep -v '^ *+' conftest.er1 >conftest.err
8080 rm -f conftest.er1
8081 cat conftest.err >&5
b0448899 8082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8083 (exit $ac_status); } && {
8084 test -z "$ac_c_werror_flag" ||
8085 test ! -s conftest.err
8086 } && test -s conftest.$ac_objext; then
96f3a036
DL
8087 ac_cv_member_struct_ifreq_ifr_flags=yes
8088else
b0448899 8089 echo "$as_me: failed program was:" >&5
96f3a036
DL
8090sed 's/^/| /' conftest.$ac_ext >&5
8091
ca81d7a0 8092 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8093fi
ca81d7a0
JD
8094
8095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8096fi
ca81d7a0
JD
8097
8098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8099fi
b0448899
CY
8100{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8101echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
8102if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
96f3a036
DL
8103
8104cat >>confdefs.h <<_ACEOF
8105#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8106_ACEOF
8107
8108
8109fi
b0448899
CY
8110{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8111echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036 8112if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
b0448899 8113 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8114else
8115 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8116/* confdefs.h. */
8117_ACEOF
8118cat confdefs.h >>conftest.$ac_ext
8119cat >>conftest.$ac_ext <<_ACEOF
8120/* end confdefs.h. */
7862d3a8
AS
8121$ac_includes_default
8122#if HAVE_SYS_SOCKET_H
8123#include <sys/socket.h>
8124#endif
8125#if HAVE_NET_IF_H
96f3a036 8126#include <net/if.h>
7862d3a8 8127#endif
96f3a036
DL
8128
8129int
8130main ()
8131{
8132static struct ifreq ac_aggr;
8133if (ac_aggr.ifr_hwaddr)
8134return 0;
8135 ;
8136 return 0;
8137}
8138_ACEOF
8139rm -f conftest.$ac_objext
ca81d7a0
JD
8140if { (ac_try="$ac_compile"
8141case "(($ac_try" in
8142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8143 *) ac_try_echo=$ac_try;;
8144esac
b0448899 8145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8146 (eval "$ac_compile") 2>conftest.er1
96f3a036 8147 ac_status=$?
edfaf76d
LK
8148 grep -v '^ *+' conftest.er1 >conftest.err
8149 rm -f conftest.er1
8150 cat conftest.err >&5
b0448899 8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8152 (exit $ac_status); } && {
8153 test -z "$ac_c_werror_flag" ||
8154 test ! -s conftest.err
8155 } && test -s conftest.$ac_objext; then
96f3a036
DL
8156 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8157else
b0448899 8158 echo "$as_me: failed program was:" >&5
96f3a036
DL
8159sed 's/^/| /' conftest.$ac_ext >&5
8160
ca81d7a0 8161 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8162/* confdefs.h. */
8163_ACEOF
8164cat confdefs.h >>conftest.$ac_ext
8165cat >>conftest.$ac_ext <<_ACEOF
8166/* end confdefs.h. */
7862d3a8
AS
8167$ac_includes_default
8168#if HAVE_SYS_SOCKET_H
8169#include <sys/socket.h>
8170#endif
8171#if HAVE_NET_IF_H
96f3a036 8172#include <net/if.h>
7862d3a8 8173#endif
96f3a036
DL
8174
8175int
8176main ()
8177{
8178static struct ifreq ac_aggr;
8179if (sizeof ac_aggr.ifr_hwaddr)
8180return 0;
8181 ;
8182 return 0;
8183}
8184_ACEOF
8185rm -f conftest.$ac_objext
ca81d7a0
JD
8186if { (ac_try="$ac_compile"
8187case "(($ac_try" in
8188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8189 *) ac_try_echo=$ac_try;;
8190esac
b0448899 8191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8192 (eval "$ac_compile") 2>conftest.er1
96f3a036 8193 ac_status=$?
edfaf76d
LK
8194 grep -v '^ *+' conftest.er1 >conftest.err
8195 rm -f conftest.er1
8196 cat conftest.err >&5
b0448899 8197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8198 (exit $ac_status); } && {
8199 test -z "$ac_c_werror_flag" ||
8200 test ! -s conftest.err
8201 } && test -s conftest.$ac_objext; then
96f3a036
DL
8202 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8203else
b0448899 8204 echo "$as_me: failed program was:" >&5
96f3a036
DL
8205sed 's/^/| /' conftest.$ac_ext >&5
8206
ca81d7a0 8207 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8208fi
ca81d7a0
JD
8209
8210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8211fi
ca81d7a0
JD
8212
8213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8214fi
b0448899
CY
8215{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8216echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
8217if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
96f3a036
DL
8218
8219cat >>confdefs.h <<_ACEOF
8220#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8221_ACEOF
8222
8223
8224fi
b0448899
CY
8225{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8226echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036 8227if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
b0448899 8228 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8229else
8230 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8231/* confdefs.h. */
8232_ACEOF
8233cat confdefs.h >>conftest.$ac_ext
8234cat >>conftest.$ac_ext <<_ACEOF
8235/* end confdefs.h. */
7862d3a8
AS
8236$ac_includes_default
8237#if HAVE_SYS_SOCKET_H
8238#include <sys/socket.h>
8239#endif
8240#if HAVE_NET_IF_H
96f3a036 8241#include <net/if.h>
7862d3a8 8242#endif
96f3a036
DL
8243
8244int
8245main ()
8246{
8247static struct ifreq ac_aggr;
8248if (ac_aggr.ifr_netmask)
8249return 0;
8250 ;
8251 return 0;
8252}
8253_ACEOF
8254rm -f conftest.$ac_objext
ca81d7a0
JD
8255if { (ac_try="$ac_compile"
8256case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259esac
b0448899 8260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8261 (eval "$ac_compile") 2>conftest.er1
96f3a036 8262 ac_status=$?
edfaf76d
LK
8263 grep -v '^ *+' conftest.er1 >conftest.err
8264 rm -f conftest.er1
8265 cat conftest.err >&5
b0448899 8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8267 (exit $ac_status); } && {
8268 test -z "$ac_c_werror_flag" ||
8269 test ! -s conftest.err
8270 } && test -s conftest.$ac_objext; then
96f3a036
DL
8271 ac_cv_member_struct_ifreq_ifr_netmask=yes
8272else
b0448899 8273 echo "$as_me: failed program was:" >&5
96f3a036
DL
8274sed 's/^/| /' conftest.$ac_ext >&5
8275
ca81d7a0 8276 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8277/* confdefs.h. */
8278_ACEOF
8279cat confdefs.h >>conftest.$ac_ext
8280cat >>conftest.$ac_ext <<_ACEOF
8281/* end confdefs.h. */
7862d3a8
AS
8282$ac_includes_default
8283#if HAVE_SYS_SOCKET_H
8284#include <sys/socket.h>
8285#endif
8286#if HAVE_NET_IF_H
96f3a036 8287#include <net/if.h>
7862d3a8 8288#endif
96f3a036
DL
8289
8290int
8291main ()
8292{
8293static struct ifreq ac_aggr;
8294if (sizeof ac_aggr.ifr_netmask)
8295return 0;
8296 ;
8297 return 0;
8298}
8299_ACEOF
8300rm -f conftest.$ac_objext
ca81d7a0
JD
8301if { (ac_try="$ac_compile"
8302case "(($ac_try" in
8303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8304 *) ac_try_echo=$ac_try;;
8305esac
b0448899 8306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8307 (eval "$ac_compile") 2>conftest.er1
96f3a036 8308 ac_status=$?
edfaf76d
LK
8309 grep -v '^ *+' conftest.er1 >conftest.err
8310 rm -f conftest.er1
8311 cat conftest.err >&5
b0448899 8312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8313 (exit $ac_status); } && {
8314 test -z "$ac_c_werror_flag" ||
8315 test ! -s conftest.err
8316 } && test -s conftest.$ac_objext; then
96f3a036
DL
8317 ac_cv_member_struct_ifreq_ifr_netmask=yes
8318else
b0448899 8319 echo "$as_me: failed program was:" >&5
96f3a036
DL
8320sed 's/^/| /' conftest.$ac_ext >&5
8321
ca81d7a0 8322 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8323fi
ca81d7a0
JD
8324
8325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8326fi
ca81d7a0
JD
8327
8328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8329fi
b0448899
CY
8330{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8331echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
8332if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
96f3a036
DL
8333
8334cat >>confdefs.h <<_ACEOF
8335#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8336_ACEOF
8337
8338
8339fi
b0448899
CY
8340{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8341echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036 8342if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
b0448899 8343 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8344else
8345 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8346/* confdefs.h. */
8347_ACEOF
8348cat confdefs.h >>conftest.$ac_ext
8349cat >>conftest.$ac_ext <<_ACEOF
8350/* end confdefs.h. */
7862d3a8
AS
8351$ac_includes_default
8352#if HAVE_SYS_SOCKET_H
8353#include <sys/socket.h>
8354#endif
8355#if HAVE_NET_IF_H
96f3a036 8356#include <net/if.h>
7862d3a8 8357#endif
96f3a036
DL
8358
8359int
8360main ()
8361{
8362static struct ifreq ac_aggr;
8363if (ac_aggr.ifr_broadaddr)
8364return 0;
8365 ;
8366 return 0;
8367}
8368_ACEOF
8369rm -f conftest.$ac_objext
ca81d7a0
JD
8370if { (ac_try="$ac_compile"
8371case "(($ac_try" in
8372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8373 *) ac_try_echo=$ac_try;;
8374esac
b0448899 8375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8376 (eval "$ac_compile") 2>conftest.er1
96f3a036 8377 ac_status=$?
edfaf76d
LK
8378 grep -v '^ *+' conftest.er1 >conftest.err
8379 rm -f conftest.er1
8380 cat conftest.err >&5
b0448899 8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8382 (exit $ac_status); } && {
8383 test -z "$ac_c_werror_flag" ||
8384 test ! -s conftest.err
8385 } && test -s conftest.$ac_objext; then
96f3a036
DL
8386 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8387else
b0448899 8388 echo "$as_me: failed program was:" >&5
96f3a036
DL
8389sed 's/^/| /' conftest.$ac_ext >&5
8390
ca81d7a0 8391 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8392/* confdefs.h. */
8393_ACEOF
8394cat confdefs.h >>conftest.$ac_ext
8395cat >>conftest.$ac_ext <<_ACEOF
8396/* end confdefs.h. */
7862d3a8
AS
8397$ac_includes_default
8398#if HAVE_SYS_SOCKET_H
8399#include <sys/socket.h>
8400#endif
8401#if HAVE_NET_IF_H
96f3a036 8402#include <net/if.h>
7862d3a8 8403#endif
96f3a036
DL
8404
8405int
8406main ()
8407{
8408static struct ifreq ac_aggr;
8409if (sizeof ac_aggr.ifr_broadaddr)
8410return 0;
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
ca81d7a0
JD
8416if { (ac_try="$ac_compile"
8417case "(($ac_try" in
8418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8419 *) ac_try_echo=$ac_try;;
8420esac
b0448899 8421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8422 (eval "$ac_compile") 2>conftest.er1
96f3a036 8423 ac_status=$?
edfaf76d
LK
8424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
b0448899 8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
96f3a036
DL
8432 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8433else
b0448899 8434 echo "$as_me: failed program was:" >&5
96f3a036
DL
8435sed 's/^/| /' conftest.$ac_ext >&5
8436
ca81d7a0 8437 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8438fi
ca81d7a0
JD
8439
8440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8441fi
ca81d7a0
JD
8442
8443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8444fi
b0448899
CY
8445{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8446echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
8447if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
96f3a036
DL
8448
8449cat >>confdefs.h <<_ACEOF
8450#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8451_ACEOF
8452
8453
8454fi
b0448899
CY
8455{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8456echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036 8457if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
b0448899 8458 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8459else
8460 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8461/* confdefs.h. */
8462_ACEOF
8463cat confdefs.h >>conftest.$ac_ext
8464cat >>conftest.$ac_ext <<_ACEOF
8465/* end confdefs.h. */
7862d3a8
AS
8466$ac_includes_default
8467#if HAVE_SYS_SOCKET_H
8468#include <sys/socket.h>
8469#endif
8470#if HAVE_NET_IF_H
96f3a036 8471#include <net/if.h>
7862d3a8 8472#endif
96f3a036
DL
8473
8474int
8475main ()
8476{
8477static struct ifreq ac_aggr;
8478if (ac_aggr.ifr_addr)
8479return 0;
8480 ;
8481 return 0;
8482}
8483_ACEOF
8484rm -f conftest.$ac_objext
ca81d7a0
JD
8485if { (ac_try="$ac_compile"
8486case "(($ac_try" in
8487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8488 *) ac_try_echo=$ac_try;;
8489esac
b0448899 8490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8491 (eval "$ac_compile") 2>conftest.er1
96f3a036 8492 ac_status=$?
edfaf76d
LK
8493 grep -v '^ *+' conftest.er1 >conftest.err
8494 rm -f conftest.er1
8495 cat conftest.err >&5
b0448899 8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8497 (exit $ac_status); } && {
8498 test -z "$ac_c_werror_flag" ||
8499 test ! -s conftest.err
8500 } && test -s conftest.$ac_objext; then
96f3a036
DL
8501 ac_cv_member_struct_ifreq_ifr_addr=yes
8502else
b0448899 8503 echo "$as_me: failed program was:" >&5
96f3a036
DL
8504sed 's/^/| /' conftest.$ac_ext >&5
8505
ca81d7a0 8506 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8507/* confdefs.h. */
8508_ACEOF
8509cat confdefs.h >>conftest.$ac_ext
8510cat >>conftest.$ac_ext <<_ACEOF
8511/* end confdefs.h. */
7862d3a8
AS
8512$ac_includes_default
8513#if HAVE_SYS_SOCKET_H
8514#include <sys/socket.h>
8515#endif
8516#if HAVE_NET_IF_H
96f3a036 8517#include <net/if.h>
7862d3a8 8518#endif
96f3a036
DL
8519
8520int
8521main ()
8522{
8523static struct ifreq ac_aggr;
8524if (sizeof ac_aggr.ifr_addr)
8525return 0;
8526 ;
8527 return 0;
8528}
8529_ACEOF
8530rm -f conftest.$ac_objext
ca81d7a0
JD
8531if { (ac_try="$ac_compile"
8532case "(($ac_try" in
8533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8534 *) ac_try_echo=$ac_try;;
8535esac
b0448899 8536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8537 (eval "$ac_compile") 2>conftest.er1
96f3a036 8538 ac_status=$?
edfaf76d
LK
8539 grep -v '^ *+' conftest.er1 >conftest.err
8540 rm -f conftest.er1
8541 cat conftest.err >&5
b0448899 8542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8543 (exit $ac_status); } && {
8544 test -z "$ac_c_werror_flag" ||
8545 test ! -s conftest.err
8546 } && test -s conftest.$ac_objext; then
96f3a036
DL
8547 ac_cv_member_struct_ifreq_ifr_addr=yes
8548else
b0448899 8549 echo "$as_me: failed program was:" >&5
96f3a036
DL
8550sed 's/^/| /' conftest.$ac_ext >&5
8551
ca81d7a0 8552 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8553fi
ca81d7a0
JD
8554
8555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8556fi
ca81d7a0
JD
8557
8558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8559fi
b0448899
CY
8560{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8561echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
8562if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
96f3a036
DL
8563
8564cat >>confdefs.h <<_ACEOF
8565#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8566_ACEOF
8567
8568
8569fi
8570
8799b3e4 8571
8799b3e4 8572
b0448899
CY
8573{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8574echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
ca81d7a0 8575if test "$ac_cv_prog_cc_c89" != no; then
b0448899
CY
8576 { echo "$as_me:$LINENO: result: yes" >&5
8577echo "${ECHO_T}yes" >&6; }
98418dba 8578
c0d27fcc 8579cat >>confdefs.h <<\_ACEOF
98418dba 8580#define PROTOTYPES 1
c0d27fcc
MR
8581_ACEOF
8582
8583
8584cat >>confdefs.h <<\_ACEOF
8585#define __PROTOTYPES 1
8586_ACEOF
98418dba
CW
8587
8588else
b0448899
CY
8589 { echo "$as_me:$LINENO: result: no" >&5
8590echo "${ECHO_T}no" >&6; }
98418dba
CW
8591fi
8592
b0448899
CY
8593{ echo "$as_me:$LINENO: checking for working volatile" >&5
8594echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba 8595if test "${ac_cv_c_volatile+set}" = set; then
b0448899 8596 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8597else
8598 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8599/* confdefs.h. */
8600_ACEOF
8601cat confdefs.h >>conftest.$ac_ext
8602cat >>conftest.$ac_ext <<_ACEOF
8603/* end confdefs.h. */
98418dba 8604
98418dba
CW
8605int
8606main ()
8607{
8608
8609volatile int x;
ca81d7a0
JD
8610int * volatile y = (int *) 0;
8611return !x && !y;
98418dba
CW
8612 ;
8613 return 0;
8614}
8615_ACEOF
8616rm -f conftest.$ac_objext
ca81d7a0
JD
8617if { (ac_try="$ac_compile"
8618case "(($ac_try" in
8619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8620 *) ac_try_echo=$ac_try;;
8621esac
b0448899 8622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8623 (eval "$ac_compile") 2>conftest.er1
98418dba 8624 ac_status=$?
edfaf76d
LK
8625 grep -v '^ *+' conftest.er1 >conftest.err
8626 rm -f conftest.er1
8627 cat conftest.err >&5
b0448899 8628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8629 (exit $ac_status); } && {
8630 test -z "$ac_c_werror_flag" ||
8631 test ! -s conftest.err
8632 } && test -s conftest.$ac_objext; then
98418dba
CW
8633 ac_cv_c_volatile=yes
8634else
b0448899 8635 echo "$as_me: failed program was:" >&5
19650fd6
AS
8636sed 's/^/| /' conftest.$ac_ext >&5
8637
ca81d7a0 8638 ac_cv_c_volatile=no
98418dba 8639fi
ca81d7a0
JD
8640
8641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8642fi
b0448899
CY
8643{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8644echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8645if test $ac_cv_c_volatile = no; then
8646
c0d27fcc 8647cat >>confdefs.h <<\_ACEOF
b0448899 8648#define volatile
c0d27fcc 8649_ACEOF
98418dba
CW
8650
8651fi
8652
b0448899
CY
8653{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8654echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba 8655if test "${ac_cv_c_const+set}" = set; then
b0448899 8656 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8657else
8658 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8659/* confdefs.h. */
8660_ACEOF
8661cat confdefs.h >>conftest.$ac_ext
8662cat >>conftest.$ac_ext <<_ACEOF
8663/* end confdefs.h. */
98418dba 8664
98418dba
CW
8665int
8666main ()
8667{
8668/* FIXME: Include the comments suggested by Paul. */
8669#ifndef __cplusplus
8670 /* Ultrix mips cc rejects this. */
8671 typedef int charset[2];
f053c89f 8672 const charset cs;
98418dba 8673 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8674 char const *const *pcpcc;
8675 char **ppc;
98418dba
CW
8676 /* NEC SVR4.0.2 mips cc rejects this. */
8677 struct point {int x, y;};
8678 static struct point const zero = {0,0};
8679 /* AIX XL C 1.02.0.0 rejects this.
8680 It does not let you subtract one const X* pointer from another in
8681 an arm of an if-expression whose if-part is not a constant
8682 expression */
8683 const char *g = "string";
f053c89f 8684 pcpcc = &g + (g ? g-g : 0);
98418dba 8685 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8686 ++pcpcc;
8687 ppc = (char**) pcpcc;
8688 pcpcc = (char const *const *) ppc;
98418dba
CW
8689 { /* SCO 3.2v4 cc rejects this. */
8690 char *t;
8691 char const *s = 0 ? (char *) 0 : (char const *) 0;
8692
8693 *t++ = 0;
ca81d7a0 8694 if (s) return 0;
98418dba
CW
8695 }
8696 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8697 int x[] = {25, 17};
8698 const int *foo = &x[0];
8699 ++foo;
8700 }
8701 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8702 typedef const int *iptr;
8703 iptr p = 0;
8704 ++p;
8705 }
8706 { /* AIX XL C 1.02.0.0 rejects this saying
8707 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8708 struct s { int j; const int *ap[3]; };
8709 struct s *b; b->j = 5;
8710 }
8711 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8712 const int foo = 10;
ca81d7a0 8713 if (!foo) return 0;
98418dba 8714 }
f053c89f 8715 return !cs[0] && !zero.x;
98418dba
CW
8716#endif
8717
8718 ;
8719 return 0;
8720}
8721_ACEOF
8722rm -f conftest.$ac_objext
ca81d7a0
JD
8723if { (ac_try="$ac_compile"
8724case "(($ac_try" in
8725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8726 *) ac_try_echo=$ac_try;;
8727esac
b0448899 8728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8729 (eval "$ac_compile") 2>conftest.er1
98418dba 8730 ac_status=$?
edfaf76d
LK
8731 grep -v '^ *+' conftest.er1 >conftest.err
8732 rm -f conftest.er1
8733 cat conftest.err >&5
b0448899 8734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8735 (exit $ac_status); } && {
8736 test -z "$ac_c_werror_flag" ||
8737 test ! -s conftest.err
8738 } && test -s conftest.$ac_objext; then
98418dba
CW
8739 ac_cv_c_const=yes
8740else
b0448899 8741 echo "$as_me: failed program was:" >&5
19650fd6
AS
8742sed 's/^/| /' conftest.$ac_ext >&5
8743
ca81d7a0 8744 ac_cv_c_const=no
98418dba 8745fi
ca81d7a0
JD
8746
8747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8748fi
b0448899
CY
8749{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8750echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8751if test $ac_cv_c_const = no; then
8752
c0d27fcc 8753cat >>confdefs.h <<\_ACEOF
b0448899 8754#define const
c0d27fcc 8755_ACEOF
98418dba
CW
8756
8757fi
8758
b0448899
CY
8759{ echo "$as_me:$LINENO: checking for void * support" >&5
8760echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba 8761if test "${emacs_cv_void_star+set}" = set; then
b0448899 8762 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8763else
8764 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8765/* confdefs.h. */
8766_ACEOF
8767cat confdefs.h >>conftest.$ac_ext
8768cat >>conftest.$ac_ext <<_ACEOF
8769/* end confdefs.h. */
98418dba 8770
98418dba
CW
8771int
8772main ()
8773{
8774void * foo;
8775 ;
8776 return 0;
8777}
8778_ACEOF
8779rm -f conftest.$ac_objext
ca81d7a0
JD
8780if { (ac_try="$ac_compile"
8781case "(($ac_try" in
8782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8783 *) ac_try_echo=$ac_try;;
8784esac
b0448899 8785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8786 (eval "$ac_compile") 2>conftest.er1
98418dba 8787 ac_status=$?
edfaf76d
LK
8788 grep -v '^ *+' conftest.er1 >conftest.err
8789 rm -f conftest.er1
8790 cat conftest.err >&5
b0448899 8791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8792 (exit $ac_status); } && {
8793 test -z "$ac_c_werror_flag" ||
8794 test ! -s conftest.err
8795 } && test -s conftest.$ac_objext; then
98418dba
CW
8796 emacs_cv_void_star=yes
8797else
b0448899 8798 echo "$as_me: failed program was:" >&5
19650fd6
AS
8799sed 's/^/| /' conftest.$ac_ext >&5
8800
ca81d7a0 8801 emacs_cv_void_star=no
98418dba 8802fi
ca81d7a0
JD
8803
8804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8805fi
b0448899
CY
8806{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8807echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8808if test $emacs_cv_void_star = yes; then
c0d27fcc 8809 cat >>confdefs.h <<\_ACEOF
98418dba 8810#define POINTER_TYPE void
c0d27fcc 8811_ACEOF
98418dba
CW
8812
8813else
c0d27fcc 8814 cat >>confdefs.h <<\_ACEOF
98418dba 8815#define POINTER_TYPE char
c0d27fcc 8816_ACEOF
98418dba
CW
8817
8818fi
8819
c0d27fcc 8820
4494a266
JD
8821
8822
cd958eb3 8823
b0448899
CY
8824{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8825echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8826set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
ca81d7a0 8827if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 8828 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8829else
c0d27fcc 8830 cat >conftest.make <<\_ACEOF
ca81d7a0 8831SHELL = /bin/sh
98418dba 8832all:
ca81d7a0 8833 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8834_ACEOF
98418dba 8835# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8836case `${MAKE-make} -f conftest.make 2>/dev/null` in
8837 *@@@%%%=?*=@@@%%%*)
8838 eval ac_cv_prog_make_${ac_make}_set=yes;;
8839 *)
8840 eval ac_cv_prog_make_${ac_make}_set=no;;
8841esac
98418dba
CW
8842rm -f conftest.make
8843fi
ca81d7a0 8844if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
b0448899
CY
8845 { echo "$as_me:$LINENO: result: yes" >&5
8846echo "${ECHO_T}yes" >&6; }
98418dba
CW
8847 SET_MAKE=
8848else
b0448899
CY
8849 { echo "$as_me:$LINENO: result: no" >&5
8850echo "${ECHO_T}no" >&6; }
98418dba
CW
8851 SET_MAKE="MAKE=${MAKE-make}"
8852fi
8853
c0d27fcc 8854
b0448899
CY
8855{ echo "$as_me:$LINENO: checking for long file names" >&5
8856echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba 8857if test "${ac_cv_sys_long_file_names+set}" = set; then
b0448899 8858 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8859else
8860 ac_cv_sys_long_file_names=yes
8861# Test for long file names in all the places we know might matter:
8862# . the current directory, where building will happen
8863# $prefix/lib where we will be installing things
8864# $exec_prefix/lib likewise
98418dba 8865# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8866# /tmp where it might want to write temporary files
8867# /var/tmp likewise
8868# /usr/tmp likewise
ca81d7a0
JD
8869for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8870 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8871 # in the usual case where exec_prefix is '${prefix}'.
8872 case $ac_dir in #(
8873 . | /* | ?:[\\/]*) ;; #(
8874 *) continue;;
8875 esac
8876 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8877 ac_xdir=$ac_dir/cf$$
ca81d7a0 8878 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8879 ac_tf1=$ac_xdir/conftest9012345
8880 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8881 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8882 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8883 rm -f -r "$ac_xdir" 2>/dev/null
8884 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8885done
8886fi
b0448899
CY
8887{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8888echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8889if test $ac_cv_sys_long_file_names = yes; then
8890
c0d27fcc 8891cat >>confdefs.h <<\_ACEOF
98418dba 8892#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8893_ACEOF
98418dba
CW
8894
8895fi
8896
c0d27fcc 8897
98418dba
CW
8898#### Choose a window system.
8899
b0448899
CY
8900{ echo "$as_me:$LINENO: checking for X" >&5
8901echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8902
c0d27fcc 8903
ca81d7a0 8904# Check whether --with-x was given.
98418dba 8905if test "${with_x+set}" = set; then
ca81d7a0
JD
8906 withval=$with_x;
8907fi
98418dba 8908
98418dba
CW
8909# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8910if test "x$with_x" = xno; then
8911 # The user explicitly disabled X.
8912 have_x=disabled
8913else
ca81d7a0 8914 case $x_includes,$x_libraries in #(
b0448899
CY
8915 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8916echo "$as_me: error: Cannot use X directory names containing '" >&2;}
ca81d7a0
JD
8917 { (exit 1); exit 1; }; };; #(
8918 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
b0448899 8919 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8920else
8921 # One or both of the vars are not set, and there is no cached value.
8922ac_x_includes=no ac_x_libraries=no
ca81d7a0 8923rm -f -r conftest.dir
98418dba
CW
8924if mkdir conftest.dir; then
8925 cd conftest.dir
c0d27fcc 8926 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8927incroot:
8928 @echo incroot='${INCROOT}'
8929usrlibdir:
8930 @echo usrlibdir='${USRLIBDIR}'
8931libdir:
8932 @echo libdir='${LIBDIR}'
8933_ACEOF
8934 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8935 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8936 for ac_var in incroot usrlibdir libdir; do
8937 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8938 done
98418dba 8939 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
b0448899 8940 for ac_extension in a so sl; do
ca81d7a0
JD
8941 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8942 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8943 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8944 fi
8945 done
8946 # Screen out bogus values from the imake configuration. They are
8947 # bogus both because they are the default anyway, and because
8948 # using them would break gcc on systems where it needs fixed includes.
8949 case $ac_im_incroot in
ca81d7a0 8950 /usr/include) ac_x_includes= ;;
98418dba
CW
8951 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8952 esac
8953 case $ac_im_usrlibdir in
b0448899 8954 /usr/lib | /lib) ;;
98418dba
CW
8955 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8956 esac
8957 fi
8958 cd ..
ca81d7a0 8959 rm -f -r conftest.dir
98418dba
CW
8960fi
8961
8962# Standard set of common directories for X headers.
8963# Check X11 before X11Rn because it is often a symlink to the current release.
8964ac_x_header_dirs='
8965/usr/X11/include
8966/usr/X11R6/include
8967/usr/X11R5/include
8968/usr/X11R4/include
8969
8970/usr/include/X11
8971/usr/include/X11R6
8972/usr/include/X11R5
8973/usr/include/X11R4
8974
8975/usr/local/X11/include
8976/usr/local/X11R6/include
8977/usr/local/X11R5/include
8978/usr/local/X11R4/include
8979
8980/usr/local/include/X11
8981/usr/local/include/X11R6
8982/usr/local/include/X11R5
8983/usr/local/include/X11R4
8984
8985/usr/X386/include
8986/usr/x386/include
8987/usr/XFree86/include/X11
8988
8989/usr/include
8990/usr/local/include
8991/usr/unsupported/include
8992/usr/athena/include
8993/usr/local/x11r5/include
8994/usr/lpp/Xamples/include
8995
8996/usr/openwin/include
8997/usr/openwin/share/include'
8998
8999if test "$ac_x_includes" = no; then
ca81d7a0 9000 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9001 # First, try using that file with no special directory specified.
9002 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9003/* confdefs.h. */
9004_ACEOF
9005cat confdefs.h >>conftest.$ac_ext
9006cat >>conftest.$ac_ext <<_ACEOF
9007/* end confdefs.h. */
ca81d7a0 9008#include <X11/Xlib.h>
98418dba 9009_ACEOF
ca81d7a0
JD
9010if { (ac_try="$ac_cpp conftest.$ac_ext"
9011case "(($ac_try" in
9012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9013 *) ac_try_echo=$ac_try;;
9014esac
b0448899 9015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9016 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9017 ac_status=$?
6bae0ccf 9018 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9019 rm -f conftest.er1
9020 cat conftest.err >&5
b0448899 9021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9022 (exit $ac_status); } >/dev/null && {
9023 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9024 test ! -s conftest.err
9025 }; then
98418dba
CW
9026 # We can compile using X headers with no special include directory.
9027ac_x_includes=
9028else
b0448899 9029 echo "$as_me: failed program was:" >&5
19650fd6
AS
9030sed 's/^/| /' conftest.$ac_ext >&5
9031
98418dba 9032 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9033 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9034 ac_x_includes=$ac_dir
9035 break
9036 fi
9037done
9038fi
ca81d7a0 9039
98418dba
CW
9040rm -f conftest.err conftest.$ac_ext
9041fi # $ac_x_includes = no
9042
9043if test "$ac_x_libraries" = no; then
9044 # Check for the libraries.
9045 # See if we find them without any special options.
9046 # Don't add to $LIBS permanently.
9047 ac_save_LIBS=$LIBS
f053c89f 9048 LIBS="-lX11 $LIBS"
98418dba 9049 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9050/* confdefs.h. */
9051_ACEOF
9052cat confdefs.h >>conftest.$ac_ext
9053cat >>conftest.$ac_ext <<_ACEOF
9054/* end confdefs.h. */
ca81d7a0 9055#include <X11/Xlib.h>
98418dba
CW
9056int
9057main ()
9058{
ca81d7a0 9059XrmInitialize ()
98418dba
CW
9060 ;
9061 return 0;
9062}
9063_ACEOF
9064rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9065if { (ac_try="$ac_link"
9066case "(($ac_try" in
9067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9068 *) ac_try_echo=$ac_try;;
9069esac
b0448899 9070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9071 (eval "$ac_link") 2>conftest.er1
98418dba 9072 ac_status=$?
edfaf76d
LK
9073 grep -v '^ *+' conftest.er1 >conftest.err
9074 rm -f conftest.er1
9075 cat conftest.err >&5
b0448899 9076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9077 (exit $ac_status); } && {
9078 test -z "$ac_c_werror_flag" ||
9079 test ! -s conftest.err
b0448899
CY
9080 } && test -s conftest$ac_exeext &&
9081 $as_test_x conftest$ac_exeext; then
98418dba
CW
9082 LIBS=$ac_save_LIBS
9083# We can link X programs with no special library path.
9084ac_x_libraries=
9085else
b0448899 9086 echo "$as_me: failed program was:" >&5
19650fd6
AS
9087sed 's/^/| /' conftest.$ac_ext >&5
9088
ca81d7a0 9089 LIBS=$ac_save_LIBS
b0448899 9090for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
98418dba
CW
9091do
9092 # Don't even attempt the hair of trying to link an X program!
b0448899 9093 for ac_extension in a so sl; do
f053c89f 9094 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9095 ac_x_libraries=$ac_dir
9096 break 2
9097 fi
9098 done
9099done
9100fi
ca81d7a0 9101
f053c89f 9102rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9103 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9104fi # $ac_x_libraries = no
9105
ca81d7a0
JD
9106case $ac_x_includes,$ac_x_libraries in #(
9107 no,* | *,no | *\'*)
9108 # Didn't find X, or a directory has "'" in its name.
9109 ac_cv_have_x="have_x=no";; #(
9110 *)
9111 # Record where we found X for the cache.
9112 ac_cv_have_x="have_x=yes\
9113 ac_x_includes='$ac_x_includes'\
9114 ac_x_libraries='$ac_x_libraries'"
9115esac
98418dba 9116fi
ca81d7a0
JD
9117;; #(
9118 *) have_x=yes;;
9119 esac
98418dba
CW
9120 eval "$ac_cv_have_x"
9121fi # $with_x != no
9122
9123if test "$have_x" != yes; then
b0448899
CY
9124 { echo "$as_me:$LINENO: result: $have_x" >&5
9125echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9126 no_x=yes
9127else
9128 # If each of the values was on the command line, it overrides each guess.
9129 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9130 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9131 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9132 ac_cv_have_x="have_x=yes\
9133 ac_x_includes='$x_includes'\
9134 ac_x_libraries='$x_libraries'"
b0448899
CY
9135 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9136echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9137fi
9138
9139if test "$no_x" = yes; then
9140 window_system=none
9141else
9142 window_system=x11
9143fi
9144
a8cd2496
GM
9145## Workaround for bug in autoconf <= 2.62.
9146## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9147## No need to do anything special for these standard directories.
921fbdf0 9148## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9149if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9150
9151 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9152
9153fi
9154
92d1ccf4
AS
9155if test "${x_libraries}" != NONE; then
9156 if test -n "${x_libraries}"; then
9157 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9158 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9159 fi
98418dba 9160 x_default_search_path=""
92d1ccf4
AS
9161 x_search_path=${x_libraries}
9162 if test -z "${x_search_path}"; then
9163 x_search_path=/usr/lib
9164 fi
9165 for x_library in `echo ${x_search_path}: | \
9166 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9167 x_search_path="\
9168${x_library}/X11/%L/%T/%N%C%S:\
9169${x_library}/X11/%l/%T/%N%C%S:\
9170${x_library}/X11/%T/%N%C%S:\
9171${x_library}/X11/%L/%T/%N%S:\
9172${x_library}/X11/%l/%T/%N%S:\
9173${x_library}/X11/%T/%N%S"
9174 if test x"${x_default_search_path}" = x; then
9175 x_default_search_path=${x_search_path}
9176 else
9177 x_default_search_path="${x_search_path}:${x_default_search_path}"
9178 fi
9179 done
9180fi
9181if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9182 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9183fi
9184
9185if test x"${x_includes}" = x; then
9186 bitmapdir=/usr/include/X11/bitmaps
9187else
9188 # accumulate include directories that have X11 bitmap subdirectories
9189 bmd_acc="dummyval"
9190 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9191 if test -d "${bmd}/X11/bitmaps"; then
9192 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9193 fi
9194 if test -d "${bmd}/bitmaps"; then
9195 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9196 fi
9197 done
9198 if test ${bmd_acc} != "dummyval"; then
9199 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9200 fi
9201fi
9202
edfda783 9203HAVE_NS=no
ff1095d1
AR
9204NS_IMPL_COCOA=no
9205NS_IMPL_GNUSTEP=no
edfda783
AR
9206tmp_CPPFLAGS="$CPPFLAGS"
9207tmp_CFLAGS="$CFLAGS"
9208CPPFLAGS="$CPPFLAGS -x objective-c"
9209CFLAGS="$CFLAGS -x objective-c"
9210if test "${with_ns}" != no; then
9211 if test "${opsys}" = darwin; then
ff1095d1 9212 NS_IMPL_COCOA=yes
06b62770
AR
9213 ns_appdir=`pwd`/nextstep/Emacs.app
9214 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9215 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9216 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
ecd43cb9 9217 elif test -f $GNUSTEP_CONFIG_FILE; then
ff1095d1 9218 NS_IMPL_GNUSTEP=yes
06b62770
AR
9219 ns_appdir=`pwd`/nextstep/Emacs.app
9220 ns_appbindir=`pwd`/nextstep/Emacs.app
9221 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9222 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
ecd43cb9
GM
9223 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
9224 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9225 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
edfda783
AR
9226 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9227 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9228 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9229 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9230 fi
9231 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
b0448899
CY
9232 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9233echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
edfda783 9234if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
b0448899 9235 echo $ECHO_N "(cached) $ECHO_C" >&6
edfda783 9236fi
b0448899
CY
9237{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9238echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
edfda783
AR
9239else
9240 # Is the header compilable?
b0448899
CY
9241{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9242echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
edfda783
AR
9243cat >conftest.$ac_ext <<_ACEOF
9244/* confdefs.h. */
9245_ACEOF
9246cat confdefs.h >>conftest.$ac_ext
9247cat >>conftest.$ac_ext <<_ACEOF
9248/* end confdefs.h. */
9249$ac_includes_default
9250#include <AppKit/AppKit.h>
9251_ACEOF
9252rm -f conftest.$ac_objext
9253if { (ac_try="$ac_compile"
9254case "(($ac_try" in
9255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9256 *) ac_try_echo=$ac_try;;
9257esac
b0448899 9258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
edfda783
AR
9259 (eval "$ac_compile") 2>conftest.er1
9260 ac_status=$?
9261 grep -v '^ *+' conftest.er1 >conftest.err
9262 rm -f conftest.er1
9263 cat conftest.err >&5
b0448899 9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfda783
AR
9265 (exit $ac_status); } && {
9266 test -z "$ac_c_werror_flag" ||
9267 test ! -s conftest.err
9268 } && test -s conftest.$ac_objext; then
9269 ac_header_compiler=yes
9270else
b0448899 9271 echo "$as_me: failed program was:" >&5
edfda783
AR
9272sed 's/^/| /' conftest.$ac_ext >&5
9273
9274 ac_header_compiler=no
9275fi
9276
9277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
9278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9279echo "${ECHO_T}$ac_header_compiler" >&6; }
edfda783
AR
9280
9281# Is the header present?
b0448899
CY
9282{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9283echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
edfda783
AR
9284cat >conftest.$ac_ext <<_ACEOF
9285/* confdefs.h. */
9286_ACEOF
9287cat confdefs.h >>conftest.$ac_ext
9288cat >>conftest.$ac_ext <<_ACEOF
9289/* end confdefs.h. */
9290#include <AppKit/AppKit.h>
9291_ACEOF
9292if { (ac_try="$ac_cpp conftest.$ac_ext"
9293case "(($ac_try" in
9294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9295 *) ac_try_echo=$ac_try;;
9296esac
b0448899 9297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
edfda783
AR
9298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9299 ac_status=$?
9300 grep -v '^ *+' conftest.er1 >conftest.err
9301 rm -f conftest.er1
9302 cat conftest.err >&5
b0448899 9303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfda783
AR
9304 (exit $ac_status); } >/dev/null && {
9305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9306 test ! -s conftest.err
9307 }; then
9308 ac_header_preproc=yes
9309else
b0448899 9310 echo "$as_me: failed program was:" >&5
edfda783
AR
9311sed 's/^/| /' conftest.$ac_ext >&5
9312
9313 ac_header_preproc=no
9314fi
9315
9316rm -f conftest.err conftest.$ac_ext
b0448899
CY
9317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9318echo "${ECHO_T}$ac_header_preproc" >&6; }
edfda783
AR
9319
9320# So? What about this header?
9321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9322 yes:no: )
b0448899
CY
9323 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9324echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9325 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9326echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
edfda783
AR
9327 ac_header_preproc=yes
9328 ;;
9329 no:yes:* )
b0448899
CY
9330 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9331echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9332 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9333echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9334 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9335echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9336 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9337echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9338 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9339echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9340 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9341echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
edfda783
AR
9342
9343 ;;
9344esac
b0448899
CY
9345{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9346echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
edfda783 9347if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
b0448899 9348 echo $ECHO_N "(cached) $ECHO_C" >&6
edfda783
AR
9349else
9350 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9351fi
b0448899
CY
9352{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9353echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
edfda783
AR
9354
9355fi
b0448899 9356if test $ac_cv_header_AppKit_AppKit_h = yes; then
edfda783 9357 HAVE_NS=yes
ecd43cb9 9358else
b0448899 9359 { { echo "$as_me:$LINENO: error: \`--with-ns' was specified, but the include
ecd43cb9 9360 files are missing or cannot be compiled." >&5
b0448899 9361echo "$as_me: error: \`--with-ns' was specified, but the include
ecd43cb9
GM
9362 files are missing or cannot be compiled." >&2;}
9363 { (exit 1); exit 1; }; }
edfda783
AR
9364fi
9365
9366
d5e2f8fe 9367 NS_HAVE_NSINTEGER=yes
519c4a9a
CY
9368 cat >conftest.$ac_ext <<_ACEOF
9369/* confdefs.h. */
9370_ACEOF
9371cat confdefs.h >>conftest.$ac_ext
9372cat >>conftest.$ac_ext <<_ACEOF
9373/* end confdefs.h. */
9374#include <Foundation/NSObjCRuntime.h>
9375int
9376main ()
9377{
9378NSInteger i;
9379 ;
9380 return 0;
9381}
9382_ACEOF
9383rm -f conftest.$ac_objext
9384if { (ac_try="$ac_compile"
9385case "(($ac_try" in
9386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9387 *) ac_try_echo=$ac_try;;
9388esac
b0448899 9389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
519c4a9a
CY
9390 (eval "$ac_compile") 2>conftest.er1
9391 ac_status=$?
9392 grep -v '^ *+' conftest.er1 >conftest.err
9393 rm -f conftest.er1
9394 cat conftest.err >&5
b0448899 9395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
519c4a9a
CY
9396 (exit $ac_status); } && {
9397 test -z "$ac_c_werror_flag" ||
9398 test ! -s conftest.err
9399 } && test -s conftest.$ac_objext; then
d5e2f8fe 9400 ns_have_nsinteger=yes
519c4a9a 9401else
b0448899 9402 echo "$as_me: failed program was:" >&5
519c4a9a
CY
9403sed 's/^/| /' conftest.$ac_ext >&5
9404
d5e2f8fe 9405 ns_have_nsinteger=no
519c4a9a
CY
9406fi
9407
9408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d5e2f8fe
AR
9409 if test $ns_have_nsinteger = no; then
9410 NS_HAVE_NSINTEGER=no
519c4a9a 9411 fi
edfda783
AR
9412fi
9413if test "${HAVE_NS}" = yes; then
9414 window_system=nextstep
9415 with_xft=no
9416 with_freetype=no
06b62770
AR
9417 # set up packaging dirs
9418 exec_prefix=${ns_appbindir}
9419 libexecdir=${ns_appbindir}/libexec
9420 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9421 prefix=${ns_appresdir}
9422 fi
edfda783
AR
9423fi
9424CFLAGS="$tmp_CFLAGS"
9425CPPFLAGS="$tmp_CPPFLAGS"
9426
1d4d5604
YM
9427case "${window_system}" in
9428 x11 )
9429 HAVE_X_WINDOWS=yes
9430 HAVE_X11=yes
9431 case "${with_x_toolkit}" in
9432 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9433 motif ) USE_X_TOOLKIT=MOTIF ;;
9434 gtk ) with_gtk=yes
9435 USE_X_TOOLKIT=none ;;
9436 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9437 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9438 esac
9439 ;;
9e2a2647 9440 nextstep | none )
1d4d5604
YM
9441 HAVE_X_WINDOWS=no
9442 HAVE_X11=no
9443 USE_X_TOOLKIT=none
9444 ;;
9445esac
9446
cfe440b8
JD
9447if test "$window_system" = none && test "X$with_x" != "Xno"; then
9448 # Extract the first word of "X", so it can be a program name with args.
9449set dummy X; ac_word=$2
b0448899
CY
9450{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9451echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
cfe440b8 9452if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
b0448899 9453 echo $ECHO_N "(cached) $ECHO_C" >&6
cfe440b8
JD
9454else
9455 if test -n "$HAVE_XSERVER"; then
9456 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9457else
9458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461 IFS=$as_save_IFS
9462 test -z "$as_dir" && as_dir=.
9463 for ac_exec_ext in '' $ac_executable_extensions; do
9464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9465 ac_cv_prog_HAVE_XSERVER="true"
b0448899 9466 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
cfe440b8
JD
9467 break 2
9468 fi
9469done
9470done
9471IFS=$as_save_IFS
9472
9473 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9474fi
9475fi
9476HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9477if test -n "$HAVE_XSERVER"; then
b0448899
CY
9478 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9479echo "${ECHO_T}$HAVE_XSERVER" >&6; }
cfe440b8 9480else
b0448899
CY
9481 { echo "$as_me:$LINENO: result: no" >&5
9482echo "${ECHO_T}no" >&6; }
cfe440b8
JD
9483fi
9484
9485
9486 if test "$HAVE_XSERVER" = true ||
9487 test -n "$DISPLAY" ||
9488 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
b0448899 9489 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9490were found. You should install the relevant development files for X
9491and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9492sure you have development files for image handling, i.e.
9493tiff, gif, jpeg, png and xpm.
9494If you are sure you want Emacs compiled without X window support, pass
9495 --without-x
9496to configure." >&5
b0448899 9497echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9498were found. You should install the relevant development files for X
9499and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9500sure you have development files for image handling, i.e.
9501tiff, gif, jpeg, png and xpm.
9502If you are sure you want Emacs compiled without X window support, pass
9503 --without-x
9504to configure." >&2;}
9505 { (exit 1); exit 1; }; }
9506 fi
9507fi
9508
1d4d5604
YM
9509### If we're using X11, we should use the X menu package.
9510HAVE_MENUS=no
9511case ${HAVE_X11} in
9512 yes ) HAVE_MENUS=yes ;;
9513esac
9514
98418dba
CW
9515# Do the opsystem or machine files prohibit the use of the GNU malloc?
9516# Assume not, until told otherwise.
9517GNU_MALLOC=yes
9518doug_lea_malloc=yes
b0448899
CY
9519{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9520echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba 9521if test "${ac_cv_func_malloc_get_state+set}" = set; then
b0448899 9522 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9523else
9524 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9525/* confdefs.h. */
9526_ACEOF
9527cat confdefs.h >>conftest.$ac_ext
9528cat >>conftest.$ac_ext <<_ACEOF
9529/* end confdefs.h. */
edfaf76d
LK
9530/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9531 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9532#define malloc_get_state innocuous_malloc_get_state
9533
98418dba 9534/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9535 which can conflict with char malloc_get_state (); below.
9536 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9537 <limits.h> exists even on freestanding compilers. */
edfaf76d 9538
19650fd6
AS
9539#ifdef __STDC__
9540# include <limits.h>
9541#else
9542# include <assert.h>
9543#endif
edfaf76d
LK
9544
9545#undef malloc_get_state
9546
ca81d7a0
JD
9547/* Override any GCC internal prototype to avoid an error.
9548 Use char because int might match the return type of a GCC
9549 builtin and then its argument prototype would still apply. */
98418dba
CW
9550#ifdef __cplusplus
9551extern "C"
9552#endif
98418dba 9553char malloc_get_state ();
98418dba
CW
9554/* The GNU C library defines this for functions which it implements
9555 to always fail with ENOSYS. Some functions are actually named
9556 something starting with __ and the normal name is an alias. */
ca81d7a0 9557#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9558choke me
98418dba
CW
9559#endif
9560
19650fd6
AS
9561int
9562main ()
9563{
ca81d7a0 9564return malloc_get_state ();
98418dba
CW
9565 ;
9566 return 0;
9567}
9568_ACEOF
9569rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9570if { (ac_try="$ac_link"
9571case "(($ac_try" in
9572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9573 *) ac_try_echo=$ac_try;;
9574esac
b0448899 9575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9576 (eval "$ac_link") 2>conftest.er1
98418dba 9577 ac_status=$?
edfaf76d
LK
9578 grep -v '^ *+' conftest.er1 >conftest.err
9579 rm -f conftest.er1
9580 cat conftest.err >&5
b0448899 9581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9582 (exit $ac_status); } && {
9583 test -z "$ac_c_werror_flag" ||
9584 test ! -s conftest.err
b0448899
CY
9585 } && test -s conftest$ac_exeext &&
9586 $as_test_x conftest$ac_exeext; then
98418dba
CW
9587 ac_cv_func_malloc_get_state=yes
9588else
b0448899 9589 echo "$as_me: failed program was:" >&5
19650fd6
AS
9590sed 's/^/| /' conftest.$ac_ext >&5
9591
ca81d7a0 9592 ac_cv_func_malloc_get_state=no
98418dba 9593fi
ca81d7a0 9594
f053c89f 9595rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9596 conftest$ac_exeext conftest.$ac_ext
98418dba 9597fi
b0448899
CY
9598{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9599echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
9600if test $ac_cv_func_malloc_get_state = yes; then
98418dba
CW
9601 :
9602else
9603 doug_lea_malloc=no
9604fi
9605
b0448899
CY
9606{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9607echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba 9608if test "${ac_cv_func_malloc_set_state+set}" = set; then
b0448899 9609 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9610else
9611 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9612/* confdefs.h. */
9613_ACEOF
9614cat confdefs.h >>conftest.$ac_ext
9615cat >>conftest.$ac_ext <<_ACEOF
9616/* end confdefs.h. */
edfaf76d
LK
9617/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9618 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9619#define malloc_set_state innocuous_malloc_set_state
9620
98418dba 9621/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9622 which can conflict with char malloc_set_state (); below.
9623 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9624 <limits.h> exists even on freestanding compilers. */
edfaf76d 9625
19650fd6
AS
9626#ifdef __STDC__
9627# include <limits.h>
9628#else
9629# include <assert.h>
9630#endif
edfaf76d
LK
9631
9632#undef malloc_set_state
9633
ca81d7a0
JD
9634/* Override any GCC internal prototype to avoid an error.
9635 Use char because int might match the return type of a GCC
9636 builtin and then its argument prototype would still apply. */
98418dba
CW
9637#ifdef __cplusplus
9638extern "C"
9639#endif
98418dba 9640char malloc_set_state ();
98418dba
CW
9641/* The GNU C library defines this for functions which it implements
9642 to always fail with ENOSYS. Some functions are actually named
9643 something starting with __ and the normal name is an alias. */
ca81d7a0 9644#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9645choke me
98418dba
CW
9646#endif
9647
19650fd6
AS
9648int
9649main ()
9650{
ca81d7a0 9651return malloc_set_state ();
98418dba
CW
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9657if { (ac_try="$ac_link"
9658case "(($ac_try" in
9659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9660 *) ac_try_echo=$ac_try;;
9661esac
b0448899 9662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9663 (eval "$ac_link") 2>conftest.er1
98418dba 9664 ac_status=$?
edfaf76d
LK
9665 grep -v '^ *+' conftest.er1 >conftest.err
9666 rm -f conftest.er1
9667 cat conftest.err >&5
b0448899 9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9669 (exit $ac_status); } && {
9670 test -z "$ac_c_werror_flag" ||
9671 test ! -s conftest.err
b0448899
CY
9672 } && test -s conftest$ac_exeext &&
9673 $as_test_x conftest$ac_exeext; then
98418dba
CW
9674 ac_cv_func_malloc_set_state=yes
9675else
b0448899 9676 echo "$as_me: failed program was:" >&5
19650fd6
AS
9677sed 's/^/| /' conftest.$ac_ext >&5
9678
ca81d7a0 9679 ac_cv_func_malloc_set_state=no
98418dba 9680fi
ca81d7a0 9681
f053c89f 9682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9683 conftest$ac_exeext conftest.$ac_ext
98418dba 9684fi
b0448899
CY
9685{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9686echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
9687if test $ac_cv_func_malloc_set_state = yes; then
98418dba
CW
9688 :
9689else
9690 doug_lea_malloc=no
9691fi
9692
b0448899
CY
9693{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9694echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba 9695if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
b0448899 9696 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9697else
9698 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9699/* confdefs.h. */
9700_ACEOF
9701cat confdefs.h >>conftest.$ac_ext
9702cat >>conftest.$ac_ext <<_ACEOF
9703/* end confdefs.h. */
98418dba 9704extern void (* __after_morecore_hook)();
98418dba
CW
9705int
9706main ()
9707{
9708__after_morecore_hook = 0
9709 ;
9710 return 0;
9711}
9712_ACEOF
9713rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9714if { (ac_try="$ac_link"
9715case "(($ac_try" in
9716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9717 *) ac_try_echo=$ac_try;;
9718esac
b0448899 9719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9720 (eval "$ac_link") 2>conftest.er1
98418dba 9721 ac_status=$?
edfaf76d
LK
9722 grep -v '^ *+' conftest.er1 >conftest.err
9723 rm -f conftest.er1
9724 cat conftest.err >&5
b0448899 9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9726 (exit $ac_status); } && {
9727 test -z "$ac_c_werror_flag" ||
9728 test ! -s conftest.err
b0448899
CY
9729 } && test -s conftest$ac_exeext &&
9730 $as_test_x conftest$ac_exeext; then
98418dba
CW
9731 emacs_cv_var___after_morecore_hook=yes
9732else
b0448899 9733 echo "$as_me: failed program was:" >&5
19650fd6
AS
9734sed 's/^/| /' conftest.$ac_ext >&5
9735
ca81d7a0 9736 emacs_cv_var___after_morecore_hook=no
98418dba 9737fi
ca81d7a0 9738
f053c89f 9739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9740 conftest$ac_exeext conftest.$ac_ext
98418dba 9741fi
b0448899
CY
9742{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9743echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9744if test $emacs_cv_var___after_morecore_hook = no; then
9745 doug_lea_malloc=no
9746fi
9747if test "${system_malloc}" = "yes"; then
9748 GNU_MALLOC=no
9749 GNU_MALLOC_reason="
9750 (The GNU allocators don't work with this system configuration.)"
9751fi
9752if test "$doug_lea_malloc" = "yes" ; then
9753 if test "$GNU_MALLOC" = yes ; then
9754 GNU_MALLOC_reason="
9755 (Using Doug Lea's new malloc from the GNU C Library.)"
9756 fi
b936fae4 9757
c0d27fcc 9758cat >>confdefs.h <<\_ACEOF
98418dba 9759#define DOUG_LEA_MALLOC 1
c0d27fcc 9760_ACEOF
98418dba
CW
9761
9762fi
9763
9764if test x"${REL_ALLOC}" = x; then
9765 REL_ALLOC=${GNU_MALLOC}
9766fi
9767
9768
c0d27fcc
MR
9769
9770
9771for ac_header in stdlib.h unistd.h
98418dba 9772do
b0448899 9773as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 9774if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
9775 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9776echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 9777if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 9778 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9779fi
b0448899
CY
9780ac_res=`eval echo '${'$as_ac_Header'}'`
9781 { echo "$as_me:$LINENO: result: $ac_res" >&5
9782echo "${ECHO_T}$ac_res" >&6; }
98418dba 9783else
c0d27fcc 9784 # Is the header compilable?
b0448899
CY
9785{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9786echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9787cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
98418dba
CW
9793$ac_includes_default
9794#include <$ac_header>
9795_ACEOF
9796rm -f conftest.$ac_objext
ca81d7a0
JD
9797if { (ac_try="$ac_compile"
9798case "(($ac_try" in
9799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9800 *) ac_try_echo=$ac_try;;
9801esac
b0448899 9802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9803 (eval "$ac_compile") 2>conftest.er1
98418dba 9804 ac_status=$?
edfaf76d
LK
9805 grep -v '^ *+' conftest.er1 >conftest.err
9806 rm -f conftest.er1
9807 cat conftest.err >&5
b0448899 9808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9809 (exit $ac_status); } && {
9810 test -z "$ac_c_werror_flag" ||
9811 test ! -s conftest.err
9812 } && test -s conftest.$ac_objext; then
c0d27fcc 9813 ac_header_compiler=yes
98418dba 9814else
b0448899 9815 echo "$as_me: failed program was:" >&5
19650fd6
AS
9816sed 's/^/| /' conftest.$ac_ext >&5
9817
ca81d7a0 9818 ac_header_compiler=no
98418dba 9819fi
ca81d7a0
JD
9820
9821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
9822{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9823echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9824
c0d27fcc 9825# Is the header present?
b0448899
CY
9826{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9827echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9828cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9829/* confdefs.h. */
9830_ACEOF
9831cat confdefs.h >>conftest.$ac_ext
9832cat >>conftest.$ac_ext <<_ACEOF
9833/* end confdefs.h. */
98418dba
CW
9834#include <$ac_header>
9835_ACEOF
ca81d7a0
JD
9836if { (ac_try="$ac_cpp conftest.$ac_ext"
9837case "(($ac_try" in
9838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9839 *) ac_try_echo=$ac_try;;
9840esac
b0448899 9841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9843 ac_status=$?
6bae0ccf 9844 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9845 rm -f conftest.er1
9846 cat conftest.err >&5
b0448899 9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9848 (exit $ac_status); } >/dev/null && {
9849 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9850 test ! -s conftest.err
9851 }; then
c0d27fcc 9852 ac_header_preproc=yes
98418dba 9853else
b0448899 9854 echo "$as_me: failed program was:" >&5
19650fd6
AS
9855sed 's/^/| /' conftest.$ac_ext >&5
9856
c0d27fcc 9857 ac_header_preproc=no
98418dba 9858fi
ca81d7a0 9859
98418dba 9860rm -f conftest.err conftest.$ac_ext
b0448899
CY
9861{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9862echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9863
9864# So? What about this header?
edfaf76d
LK
9865case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9866 yes:no: )
b0448899
CY
9867 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9868echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9869 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9870echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d
LK
9871 ac_header_preproc=yes
9872 ;;
9873 no:yes:* )
b0448899
CY
9874 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9875echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9876 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9877echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9878 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9879echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9880 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9881echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9882 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9883echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9884 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9885echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9886
19650fd6 9887 ;;
c0d27fcc 9888esac
b0448899
CY
9889{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9890echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 9891if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 9892 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9893else
edfaf76d 9894 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9895fi
b0448899
CY
9896ac_res=`eval echo '${'$as_ac_Header'}'`
9897 { echo "$as_me:$LINENO: result: $ac_res" >&5
9898echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9899
9900fi
b0448899 9901if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9902 cat >>confdefs.h <<_ACEOF
b0448899 9903#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9904_ACEOF
98418dba
CW
9905
9906fi
c0d27fcc 9907
98418dba
CW
9908done
9909
c0d27fcc 9910
98418dba
CW
9911for ac_func in getpagesize
9912do
b0448899
CY
9913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9914{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 9916if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 9917 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9918else
9919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9920/* confdefs.h. */
9921_ACEOF
9922cat confdefs.h >>conftest.$ac_ext
9923cat >>conftest.$ac_ext <<_ACEOF
9924/* end confdefs.h. */
edfaf76d
LK
9925/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9927#define $ac_func innocuous_$ac_func
9928
98418dba 9929/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9930 which can conflict with char $ac_func (); below.
9931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9932 <limits.h> exists even on freestanding compilers. */
edfaf76d 9933
19650fd6
AS
9934#ifdef __STDC__
9935# include <limits.h>
9936#else
9937# include <assert.h>
9938#endif
edfaf76d
LK
9939
9940#undef $ac_func
9941
ca81d7a0
JD
9942/* Override any GCC internal prototype to avoid an error.
9943 Use char because int might match the return type of a GCC
9944 builtin and then its argument prototype would still apply. */
98418dba
CW
9945#ifdef __cplusplus
9946extern "C"
9947#endif
98418dba 9948char $ac_func ();
98418dba
CW
9949/* The GNU C library defines this for functions which it implements
9950 to always fail with ENOSYS. Some functions are actually named
9951 something starting with __ and the normal name is an alias. */
ca81d7a0 9952#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9953choke me
98418dba
CW
9954#endif
9955
19650fd6
AS
9956int
9957main ()
9958{
ca81d7a0 9959return $ac_func ();
98418dba
CW
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9965if { (ac_try="$ac_link"
9966case "(($ac_try" in
9967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9968 *) ac_try_echo=$ac_try;;
9969esac
b0448899 9970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9971 (eval "$ac_link") 2>conftest.er1
98418dba 9972 ac_status=$?
edfaf76d
LK
9973 grep -v '^ *+' conftest.er1 >conftest.err
9974 rm -f conftest.er1
9975 cat conftest.err >&5
b0448899 9976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9977 (exit $ac_status); } && {
9978 test -z "$ac_c_werror_flag" ||
9979 test ! -s conftest.err
b0448899
CY
9980 } && test -s conftest$ac_exeext &&
9981 $as_test_x conftest$ac_exeext; then
98418dba
CW
9982 eval "$as_ac_var=yes"
9983else
b0448899 9984 echo "$as_me: failed program was:" >&5
19650fd6
AS
9985sed 's/^/| /' conftest.$ac_ext >&5
9986
ca81d7a0 9987 eval "$as_ac_var=no"
98418dba 9988fi
ca81d7a0 9989
f053c89f 9990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9991 conftest$ac_exeext conftest.$ac_ext
98418dba 9992fi
b0448899
CY
9993ac_res=`eval echo '${'$as_ac_var'}'`
9994 { echo "$as_me:$LINENO: result: $ac_res" >&5
9995echo "${ECHO_T}$ac_res" >&6; }
9996if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9997 cat >>confdefs.h <<_ACEOF
b0448899 9998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9999_ACEOF
98418dba
CW
10000
10001fi
10002done
10003
b0448899
CY
10004{ echo "$as_me:$LINENO: checking for working mmap" >&5
10005echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba 10006if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
b0448899 10007 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10008else
10009 if test "$cross_compiling" = yes; then
10010 ac_cv_func_mmap_fixed_mapped=no
10011else
10012 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10013/* confdefs.h. */
10014_ACEOF
10015cat confdefs.h >>conftest.$ac_ext
10016cat >>conftest.$ac_ext <<_ACEOF
10017/* end confdefs.h. */
98418dba 10018$ac_includes_default
c0d27fcc
MR
10019/* malloc might have been renamed as rpl_malloc. */
10020#undef malloc
10021
98418dba
CW
10022/* Thanks to Mike Haertel and Jim Avera for this test.
10023 Here is a matrix of mmap possibilities:
10024 mmap private not fixed
10025 mmap private fixed at somewhere currently unmapped
10026 mmap private fixed at somewhere already mapped
10027 mmap shared not fixed
10028 mmap shared fixed at somewhere currently unmapped
10029 mmap shared fixed at somewhere already mapped
10030 For private mappings, we should verify that changes cannot be read()
10031 back from the file, nor mmap's back from the file at a different
10032 address. (There have been systems where private was not correctly
10033 implemented like the infamous i386 svr4.0, and systems where the
10034 VM page cache was not coherent with the file system buffer cache
10035 like early versions of FreeBSD and possibly contemporary NetBSD.)
10036 For shared mappings, we should conversely verify that changes get
c0d27fcc 10037 propagated back to all the places they're supposed to be.
98418dba
CW
10038
10039 Grep wants private fixed already mapped.
10040 The main things grep needs to know about mmap are:
10041 * does it exist and is it safe to write into the mmap'd area
10042 * how to use it (BSD variants) */
10043
10044#include <fcntl.h>
10045#include <sys/mman.h>
10046
f053c89f 10047#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10048char *malloc ();
10049#endif
10050
10051/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10052#ifndef HAVE_GETPAGESIZE
98418dba 10053/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10054# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10055# define HAVE_SYS_PARAM_H 1
10056# endif
10057
10058# ifdef _SC_PAGESIZE
10059# define getpagesize() sysconf(_SC_PAGESIZE)
10060# else /* no _SC_PAGESIZE */
f053c89f 10061# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10062# include <sys/param.h>
10063# ifdef EXEC_PAGESIZE
10064# define getpagesize() EXEC_PAGESIZE
10065# else /* no EXEC_PAGESIZE */
10066# ifdef NBPG
10067# define getpagesize() NBPG * CLSIZE
10068# ifndef CLSIZE
10069# define CLSIZE 1
10070# endif /* no CLSIZE */
10071# else /* no NBPG */
10072# ifdef NBPC
10073# define getpagesize() NBPC
10074# else /* no NBPC */
10075# ifdef PAGESIZE
10076# define getpagesize() PAGESIZE
10077# endif /* PAGESIZE */
10078# endif /* no NBPC */
10079# endif /* no NBPG */
10080# endif /* no EXEC_PAGESIZE */
10081# else /* no HAVE_SYS_PARAM_H */
10082# define getpagesize() 8192 /* punt totally */
10083# endif /* no HAVE_SYS_PARAM_H */
10084# endif /* no _SC_PAGESIZE */
10085
10086#endif /* no HAVE_GETPAGESIZE */
10087
10088int
10089main ()
10090{
10091 char *data, *data2, *data3;
10092 int i, pagesize;
10093 int fd;
10094
10095 pagesize = getpagesize ();
10096
10097 /* First, make a file with some known garbage in it. */
10098 data = (char *) malloc (pagesize);
10099 if (!data)
ca81d7a0 10100 return 1;
98418dba
CW
10101 for (i = 0; i < pagesize; ++i)
10102 *(data + i) = rand ();
10103 umask (0);
10104 fd = creat ("conftest.mmap", 0600);
10105 if (fd < 0)
ca81d7a0 10106 return 1;
98418dba 10107 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10108 return 1;
98418dba
CW
10109 close (fd);
10110
10111 /* Next, try to mmap the file at a fixed address which already has
10112 something else allocated at it. If we can, also make sure that
10113 we see the same garbage. */
10114 fd = open ("conftest.mmap", O_RDWR);
10115 if (fd < 0)
ca81d7a0 10116 return 1;
98418dba
CW
10117 data2 = (char *) malloc (2 * pagesize);
10118 if (!data2)
ca81d7a0
JD
10119 return 1;
10120 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10121 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10122 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10123 return 1;
98418dba
CW
10124 for (i = 0; i < pagesize; ++i)
10125 if (*(data + i) != *(data2 + i))
ca81d7a0 10126 return 1;
98418dba
CW
10127
10128 /* Finally, make sure that changes to the mapped area do not
10129 percolate back to the file as seen by read(). (This is a bug on
10130 some variants of i386 svr4.0.) */
10131 for (i = 0; i < pagesize; ++i)
10132 *(data2 + i) = *(data2 + i) + 1;
10133 data3 = (char *) malloc (pagesize);
10134 if (!data3)
ca81d7a0 10135 return 1;
98418dba 10136 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10137 return 1;
98418dba
CW
10138 for (i = 0; i < pagesize; ++i)
10139 if (*(data + i) != *(data3 + i))
ca81d7a0 10140 return 1;
98418dba 10141 close (fd);
ca81d7a0 10142 return 0;
98418dba
CW
10143}
10144_ACEOF
10145rm -f conftest$ac_exeext
ca81d7a0
JD
10146if { (ac_try="$ac_link"
10147case "(($ac_try" in
10148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10149 *) ac_try_echo=$ac_try;;
10150esac
b0448899 10151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10152 (eval "$ac_link") 2>&5
98418dba 10153 ac_status=$?
b0448899 10154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10156 { (case "(($ac_try" in
10157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10158 *) ac_try_echo=$ac_try;;
10159esac
b0448899 10160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10161 (eval "$ac_try") 2>&5
98418dba 10162 ac_status=$?
b0448899 10163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10164 (exit $ac_status); }; }; then
10165 ac_cv_func_mmap_fixed_mapped=yes
10166else
b0448899
CY
10167 echo "$as_me: program exited with status $ac_status" >&5
10168echo "$as_me: failed program was:" >&5
19650fd6
AS
10169sed 's/^/| /' conftest.$ac_ext >&5
10170
c0d27fcc 10171( exit $ac_status )
98418dba
CW
10172ac_cv_func_mmap_fixed_mapped=no
10173fi
ca81d7a0 10174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10175fi
ca81d7a0
JD
10176
10177
98418dba 10178fi
b0448899
CY
10179{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10180echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10181if test $ac_cv_func_mmap_fixed_mapped = yes; then
10182
c0d27fcc 10183cat >>confdefs.h <<\_ACEOF
98418dba 10184#define HAVE_MMAP 1
c0d27fcc 10185_ACEOF
98418dba
CW
10186
10187fi
10188rm -f conftest.mmap
10189
10190if test $use_mmap_for_buffers = yes; then
10191 REL_ALLOC=no
10192fi
10193
10194LIBS="$libsrc_libs $LIBS"
10195
c0d27fcc 10196
b0448899
CY
10197{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10198echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba 10199if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
b0448899 10200 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10201else
10202 ac_check_lib_save_LIBS=$LIBS
10203LIBS="-ldnet $LIBS"
10204cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10205/* confdefs.h. */
10206_ACEOF
10207cat confdefs.h >>conftest.$ac_ext
10208cat >>conftest.$ac_ext <<_ACEOF
10209/* end confdefs.h. */
98418dba 10210
ca81d7a0
JD
10211/* Override any GCC internal prototype to avoid an error.
10212 Use char because int might match the return type of a GCC
10213 builtin and then its argument prototype would still apply. */
98418dba
CW
10214#ifdef __cplusplus
10215extern "C"
10216#endif
98418dba 10217char dnet_ntoa ();
98418dba
CW
10218int
10219main ()
10220{
ca81d7a0 10221return dnet_ntoa ();
98418dba
CW
10222 ;
10223 return 0;
10224}
10225_ACEOF
10226rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10227if { (ac_try="$ac_link"
10228case "(($ac_try" in
10229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10230 *) ac_try_echo=$ac_try;;
10231esac
b0448899 10232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10233 (eval "$ac_link") 2>conftest.er1
98418dba 10234 ac_status=$?
edfaf76d
LK
10235 grep -v '^ *+' conftest.er1 >conftest.err
10236 rm -f conftest.er1
10237 cat conftest.err >&5
b0448899 10238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10239 (exit $ac_status); } && {
10240 test -z "$ac_c_werror_flag" ||
10241 test ! -s conftest.err
b0448899
CY
10242 } && test -s conftest$ac_exeext &&
10243 $as_test_x conftest$ac_exeext; then
98418dba
CW
10244 ac_cv_lib_dnet_dnet_ntoa=yes
10245else
b0448899 10246 echo "$as_me: failed program was:" >&5
19650fd6
AS
10247sed 's/^/| /' conftest.$ac_ext >&5
10248
ca81d7a0 10249 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10250fi
ca81d7a0 10251
f053c89f 10252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10253 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10254LIBS=$ac_check_lib_save_LIBS
10255fi
b0448899
CY
10256{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10257echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10258if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10259 cat >>confdefs.h <<_ACEOF
98418dba 10260#define HAVE_LIBDNET 1
c0d27fcc 10261_ACEOF
98418dba
CW
10262
10263 LIBS="-ldnet $LIBS"
10264
10265fi
10266
c0d27fcc 10267
b0448899
CY
10268{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10269echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba 10270if test "${ac_cv_lib_Xbsd_main+set}" = set; then
b0448899 10271 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10272else
10273 ac_check_lib_save_LIBS=$LIBS
10274LIBS="-lXbsd $LIBS"
10275cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10276/* confdefs.h. */
10277_ACEOF
10278cat confdefs.h >>conftest.$ac_ext
10279cat >>conftest.$ac_ext <<_ACEOF
10280/* end confdefs.h. */
98418dba 10281
c0d27fcc 10282
98418dba
CW
10283int
10284main ()
10285{
ca81d7a0 10286return main ();
98418dba
CW
10287 ;
10288 return 0;
10289}
10290_ACEOF
10291rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10292if { (ac_try="$ac_link"
10293case "(($ac_try" in
10294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10295 *) ac_try_echo=$ac_try;;
10296esac
b0448899 10297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10298 (eval "$ac_link") 2>conftest.er1
98418dba 10299 ac_status=$?
edfaf76d
LK
10300 grep -v '^ *+' conftest.er1 >conftest.err
10301 rm -f conftest.er1
10302 cat conftest.err >&5
b0448899 10303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10304 (exit $ac_status); } && {
10305 test -z "$ac_c_werror_flag" ||
10306 test ! -s conftest.err
b0448899
CY
10307 } && test -s conftest$ac_exeext &&
10308 $as_test_x conftest$ac_exeext; then
98418dba
CW
10309 ac_cv_lib_Xbsd_main=yes
10310else
b0448899 10311 echo "$as_me: failed program was:" >&5
19650fd6
AS
10312sed 's/^/| /' conftest.$ac_ext >&5
10313
ca81d7a0 10314 ac_cv_lib_Xbsd_main=no
98418dba 10315fi
ca81d7a0 10316
f053c89f 10317rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10318 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10319LIBS=$ac_check_lib_save_LIBS
10320fi
b0448899
CY
10321{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10322echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
10323if test $ac_cv_lib_Xbsd_main = yes; then
98418dba
CW
10324 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10325fi
10326
c0d27fcc
MR
10327
10328
b0448899
CY
10329{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10330echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba 10331if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
b0448899 10332 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10333else
10334 ac_check_lib_save_LIBS=$LIBS
10335LIBS="-lpthreads $LIBS"
10336cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10337/* confdefs.h. */
10338_ACEOF
10339cat confdefs.h >>conftest.$ac_ext
10340cat >>conftest.$ac_ext <<_ACEOF
10341/* end confdefs.h. */
98418dba 10342
ca81d7a0
JD
10343/* Override any GCC internal prototype to avoid an error.
10344 Use char because int might match the return type of a GCC
10345 builtin and then its argument prototype would still apply. */
98418dba
CW
10346#ifdef __cplusplus
10347extern "C"
10348#endif
98418dba 10349char cma_open ();
98418dba
CW
10350int
10351main ()
10352{
ca81d7a0 10353return cma_open ();
98418dba
CW
10354 ;
10355 return 0;
10356}
10357_ACEOF
10358rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10359if { (ac_try="$ac_link"
10360case "(($ac_try" in
10361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10362 *) ac_try_echo=$ac_try;;
10363esac
b0448899 10364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10365 (eval "$ac_link") 2>conftest.er1
98418dba 10366 ac_status=$?
edfaf76d
LK
10367 grep -v '^ *+' conftest.er1 >conftest.err
10368 rm -f conftest.er1
10369 cat conftest.err >&5
b0448899 10370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10371 (exit $ac_status); } && {
10372 test -z "$ac_c_werror_flag" ||
10373 test ! -s conftest.err
b0448899
CY
10374 } && test -s conftest$ac_exeext &&
10375 $as_test_x conftest$ac_exeext; then
98418dba
CW
10376 ac_cv_lib_pthreads_cma_open=yes
10377else
b0448899 10378 echo "$as_me: failed program was:" >&5
19650fd6
AS
10379sed 's/^/| /' conftest.$ac_ext >&5
10380
ca81d7a0 10381 ac_cv_lib_pthreads_cma_open=no
98418dba 10382fi
ca81d7a0 10383
f053c89f 10384rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10385 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10386LIBS=$ac_check_lib_save_LIBS
10387fi
b0448899
CY
10388{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10389echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
10390if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10391 cat >>confdefs.h <<_ACEOF
98418dba 10392#define HAVE_LIBPTHREADS 1
c0d27fcc 10393_ACEOF
98418dba
CW
10394
10395 LIBS="-lpthreads $LIBS"
10396
10397fi
10398
c0d27fcc 10399
55597d70
DL
10400
10401case ${host_os} in
10402aix*)
b0448899
CY
10403 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10404echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70 10405if test "${gdb_cv_bigtoc+set}" = set; then
b0448899 10406 echo $ECHO_N "(cached) $ECHO_C" >&6
55597d70
DL
10407else
10408
10409 case $GCC in
10410 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10411 *) gdb_cv_bigtoc=-bbigtoc ;;
10412 esac
10413
10414 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10415 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10416/* confdefs.h. */
10417_ACEOF
10418cat confdefs.h >>conftest.$ac_ext
10419cat >>conftest.$ac_ext <<_ACEOF
10420/* end confdefs.h. */
55597d70
DL
10421
10422int
10423main ()
10424{
10425int i;
10426 ;
10427 return 0;
10428}
10429_ACEOF
10430rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10431if { (ac_try="$ac_link"
10432case "(($ac_try" in
10433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10434 *) ac_try_echo=$ac_try;;
10435esac
b0448899 10436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10437 (eval "$ac_link") 2>conftest.er1
55597d70 10438 ac_status=$?
edfaf76d
LK
10439 grep -v '^ *+' conftest.er1 >conftest.err
10440 rm -f conftest.er1
10441 cat conftest.err >&5
b0448899 10442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10443 (exit $ac_status); } && {
10444 test -z "$ac_c_werror_flag" ||
10445 test ! -s conftest.err
b0448899
CY
10446 } && test -s conftest$ac_exeext &&
10447 $as_test_x conftest$ac_exeext; then
55597d70
DL
10448 :
10449else
b0448899 10450 echo "$as_me: failed program was:" >&5
19650fd6
AS
10451sed 's/^/| /' conftest.$ac_ext >&5
10452
ca81d7a0 10453 gdb_cv_bigtoc=
55597d70 10454fi
ca81d7a0 10455
f053c89f 10456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10457 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10458
10459fi
b0448899
CY
10460{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10461echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10462 ;;
10463esac
10464
ae1a998c
RS
10465# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10466# used for the tests that follow. We set them back to REAL_CFLAGS and
10467# REAL_CPPFLAGS later on.
98418dba
CW
10468
10469REAL_CPPFLAGS="$CPPFLAGS"
10470
10471if test "${HAVE_X11}" = "yes"; then
10472 DEFS="$C_SWITCH_X_SITE $DEFS"
10473 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10474 LIBS="$LIBX $LIBS"
10475 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10476 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10477
10478 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10479 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10480 # but it's more convenient here to set LD_RUN_PATH
10481 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10482 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10483 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10484 export LD_RUN_PATH
10485 fi
10486
10487 if test "${opsys}" = "gnu-linux"; then
b0448899
CY
10488 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10489echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10490 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10491/* confdefs.h. */
10492_ACEOF
10493cat confdefs.h >>conftest.$ac_ext
10494cat >>conftest.$ac_ext <<_ACEOF
10495/* end confdefs.h. */
98418dba 10496
98418dba
CW
10497int
10498main ()
10499{
10500XOpenDisplay ("foo");
10501 ;
10502 return 0;
10503}
10504_ACEOF
10505rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10506if { (ac_try="$ac_link"
10507case "(($ac_try" in
10508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10509 *) ac_try_echo=$ac_try;;
10510esac
b0448899 10511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10512 (eval "$ac_link") 2>conftest.er1
98418dba 10513 ac_status=$?
edfaf76d
LK
10514 grep -v '^ *+' conftest.er1 >conftest.err
10515 rm -f conftest.er1
10516 cat conftest.err >&5
b0448899 10517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10518 (exit $ac_status); } && {
10519 test -z "$ac_c_werror_flag" ||
10520 test ! -s conftest.err
b0448899
CY
10521 } && test -s conftest$ac_exeext &&
10522 $as_test_x conftest$ac_exeext; then
35996d22 10523 xlinux_first_failure=no
98418dba 10524else
b0448899 10525 echo "$as_me: failed program was:" >&5
19650fd6
AS
10526sed 's/^/| /' conftest.$ac_ext >&5
10527
ca81d7a0 10528 xlinux_first_failure=yes
98418dba 10529fi
ca81d7a0 10530
f053c89f 10531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10532 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10533 if test "${xlinux_first_failure}" = "yes"; then
10534 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10535 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10536 OLD_CPPFLAGS="$CPPFLAGS"
10537 OLD_LIBS="$LIBS"
10538 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10539 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10540 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10541 LIBS="$LIBS -b i486-linuxaout"
10542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10543/* confdefs.h. */
10544_ACEOF
10545cat confdefs.h >>conftest.$ac_ext
10546cat >>conftest.$ac_ext <<_ACEOF
10547/* end confdefs.h. */
98418dba 10548
98418dba
CW
10549int
10550main ()
10551{
10552XOpenDisplay ("foo");
10553 ;
10554 return 0;
10555}
10556_ACEOF
10557rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10558if { (ac_try="$ac_link"
10559case "(($ac_try" in
10560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10561 *) ac_try_echo=$ac_try;;
10562esac
b0448899 10563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10564 (eval "$ac_link") 2>conftest.er1
98418dba 10565 ac_status=$?
edfaf76d
LK
10566 grep -v '^ *+' conftest.er1 >conftest.err
10567 rm -f conftest.er1
10568 cat conftest.err >&5
b0448899 10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10570 (exit $ac_status); } && {
10571 test -z "$ac_c_werror_flag" ||
10572 test ! -s conftest.err
b0448899
CY
10573 } && test -s conftest$ac_exeext &&
10574 $as_test_x conftest$ac_exeext; then
98418dba
CW
10575 xlinux_second_failure=no
10576else
b0448899 10577 echo "$as_me: failed program was:" >&5
19650fd6
AS
10578sed 's/^/| /' conftest.$ac_ext >&5
10579
ca81d7a0 10580 xlinux_second_failure=yes
98418dba 10581fi
ca81d7a0 10582
f053c89f 10583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10584 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10585 if test "${xlinux_second_failure}" = "yes"; then
10586 # If we get the same failure with -b, there is no use adding -b.
10587 # So take it out. This plays safe.
10588 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10589 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10590 CPPFLAGS="$OLD_CPPFLAGS"
10591 LIBS="$OLD_LIBS"
b0448899
CY
10592 { echo "$as_me:$LINENO: result: no" >&5
10593echo "${ECHO_T}no" >&6; }
98418dba 10594 else
b0448899
CY
10595 { echo "$as_me:$LINENO: result: yes" >&5
10596echo "${ECHO_T}yes" >&6; }
98418dba
CW
10597 fi
10598 else
b0448899
CY
10599 { echo "$as_me:$LINENO: result: no" >&5
10600echo "${ECHO_T}no" >&6; }
98418dba
CW
10601 fi
10602 fi
10603
10604 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10605 # header files included from there.
b0448899
CY
10606 { echo "$as_me:$LINENO: checking for Xkb" >&5
10607echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10608 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10609/* confdefs.h. */
10610_ACEOF
10611cat confdefs.h >>conftest.$ac_ext
10612cat >>conftest.$ac_ext <<_ACEOF
10613/* end confdefs.h. */
98418dba
CW
10614#include <X11/Xlib.h>
10615#include <X11/XKBlib.h>
98418dba
CW
10616int
10617main ()
10618{
10619XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10620 ;
10621 return 0;
10622}
10623_ACEOF
10624rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10625if { (ac_try="$ac_link"
10626case "(($ac_try" in
10627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10628 *) ac_try_echo=$ac_try;;
10629esac
b0448899 10630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10631 (eval "$ac_link") 2>conftest.er1
98418dba 10632 ac_status=$?
edfaf76d
LK
10633 grep -v '^ *+' conftest.er1 >conftest.err
10634 rm -f conftest.er1
10635 cat conftest.err >&5
b0448899 10636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10637 (exit $ac_status); } && {
10638 test -z "$ac_c_werror_flag" ||
10639 test ! -s conftest.err
b0448899
CY
10640 } && test -s conftest$ac_exeext &&
10641 $as_test_x conftest$ac_exeext; then
98418dba
CW
10642 emacs_xkb=yes
10643else
b0448899 10644 echo "$as_me: failed program was:" >&5
19650fd6
AS
10645sed 's/^/| /' conftest.$ac_ext >&5
10646
ca81d7a0 10647 emacs_xkb=no
98418dba 10648fi
ca81d7a0 10649
f053c89f 10650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10651 conftest$ac_exeext conftest.$ac_ext
b0448899
CY
10652 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10653echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10654 if test $emacs_xkb = yes; then
b936fae4 10655
c0d27fcc 10656cat >>confdefs.h <<\_ACEOF
98418dba 10657#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10658_ACEOF
98418dba
CW
10659
10660 fi
10661
c0d27fcc
MR
10662
10663
10664
10665
98418dba
CW
10666for ac_func in XrmSetDatabase XScreenResourceString \
10667XScreenNumberOfScreen XSetWMProtocols
10668do
b0448899
CY
10669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10670{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 10672if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 10673 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10674else
10675 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10676/* confdefs.h. */
10677_ACEOF
10678cat confdefs.h >>conftest.$ac_ext
10679cat >>conftest.$ac_ext <<_ACEOF
10680/* end confdefs.h. */
edfaf76d
LK
10681/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10682 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10683#define $ac_func innocuous_$ac_func
10684
98418dba 10685/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10686 which can conflict with char $ac_func (); below.
10687 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10688 <limits.h> exists even on freestanding compilers. */
edfaf76d 10689
19650fd6
AS
10690#ifdef __STDC__
10691# include <limits.h>
10692#else
10693# include <assert.h>
10694#endif
edfaf76d
LK
10695
10696#undef $ac_func
10697
ca81d7a0
JD
10698/* Override any GCC internal prototype to avoid an error.
10699 Use char because int might match the return type of a GCC
10700 builtin and then its argument prototype would still apply. */
98418dba
CW
10701#ifdef __cplusplus
10702extern "C"
10703#endif
98418dba 10704char $ac_func ();
98418dba
CW
10705/* The GNU C library defines this for functions which it implements
10706 to always fail with ENOSYS. Some functions are actually named
10707 something starting with __ and the normal name is an alias. */
ca81d7a0 10708#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10709choke me
98418dba
CW
10710#endif
10711
19650fd6
AS
10712int
10713main ()
10714{
ca81d7a0 10715return $ac_func ();
98418dba
CW
10716 ;
10717 return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10721if { (ac_try="$ac_link"
10722case "(($ac_try" in
10723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10724 *) ac_try_echo=$ac_try;;
10725esac
b0448899 10726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10727 (eval "$ac_link") 2>conftest.er1
98418dba 10728 ac_status=$?
edfaf76d
LK
10729 grep -v '^ *+' conftest.er1 >conftest.err
10730 rm -f conftest.er1
10731 cat conftest.err >&5
b0448899 10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10733 (exit $ac_status); } && {
10734 test -z "$ac_c_werror_flag" ||
10735 test ! -s conftest.err
b0448899
CY
10736 } && test -s conftest$ac_exeext &&
10737 $as_test_x conftest$ac_exeext; then
98418dba
CW
10738 eval "$as_ac_var=yes"
10739else
b0448899 10740 echo "$as_me: failed program was:" >&5
19650fd6
AS
10741sed 's/^/| /' conftest.$ac_ext >&5
10742
ca81d7a0 10743 eval "$as_ac_var=no"
98418dba 10744fi
ca81d7a0 10745
f053c89f 10746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10747 conftest$ac_exeext conftest.$ac_ext
98418dba 10748fi
b0448899
CY
10749ac_res=`eval echo '${'$as_ac_var'}'`
10750 { echo "$as_me:$LINENO: result: $ac_res" >&5
10751echo "${ECHO_T}$ac_res" >&6; }
10752if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10753 cat >>confdefs.h <<_ACEOF
b0448899 10754#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10755_ACEOF
98418dba
CW
10756
10757fi
10758done
10759
10760fi
10761
10762if test "${window_system}" = "x11"; then
b0448899
CY
10763 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10764echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba 10765 if test "${emacs_cv_x11_version_6+set}" = set; then
b0448899 10766 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10767else
10768 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10769/* confdefs.h. */
10770_ACEOF
10771cat confdefs.h >>conftest.$ac_ext
10772cat >>conftest.$ac_ext <<_ACEOF
10773/* end confdefs.h. */
98418dba 10774#include <X11/Xlib.h>
98418dba
CW
10775int
10776main ()
10777{
10778#if XlibSpecificationRelease < 6
10779fail;
10780#endif
10781
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10787if { (ac_try="$ac_link"
10788case "(($ac_try" in
10789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790 *) ac_try_echo=$ac_try;;
10791esac
b0448899 10792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10793 (eval "$ac_link") 2>conftest.er1
98418dba 10794 ac_status=$?
edfaf76d
LK
10795 grep -v '^ *+' conftest.er1 >conftest.err
10796 rm -f conftest.er1
10797 cat conftest.err >&5
b0448899 10798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10799 (exit $ac_status); } && {
10800 test -z "$ac_c_werror_flag" ||
10801 test ! -s conftest.err
b0448899
CY
10802 } && test -s conftest$ac_exeext &&
10803 $as_test_x conftest$ac_exeext; then
98418dba
CW
10804 emacs_cv_x11_version_6=yes
10805else
b0448899 10806 echo "$as_me: failed program was:" >&5
19650fd6
AS
10807sed 's/^/| /' conftest.$ac_ext >&5
10808
ca81d7a0 10809 emacs_cv_x11_version_6=no
98418dba 10810fi
ca81d7a0 10811
f053c89f 10812rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10813 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10814fi
10815
10816 if test $emacs_cv_x11_version_6 = yes; then
b0448899
CY
10817 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10818echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10819
c0d27fcc 10820cat >>confdefs.h <<\_ACEOF
98418dba 10821#define HAVE_X11R6 1
c0d27fcc 10822_ACEOF
98418dba
CW
10823
10824 else
b0448899
CY
10825 { echo "$as_me:$LINENO: result: before 6" >&5
10826echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10827 fi
10828fi
10829
98418dba 10830
0cfc0546
GM
10831### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10832HAVE_RSVG=no
8bff6137 10833if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
0cfc0546 10834 if test "${with_rsvg}" != "no"; then
02cfaff4 10835 RSVG_REQUIRED=2.11.0
0cfc0546
GM
10836 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10837
10838
10839 succeeded=no
10840
00b9c927 10841 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546 10842set dummy pkg-config; ac_word=$2
b0448899
CY
10843{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10844echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
0cfc0546 10845if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 10846 echo $ECHO_N "(cached) $ECHO_C" >&6
0cfc0546
GM
10847else
10848 case $PKG_CONFIG in
10849 [\\/]* | ?:[\\/]*)
10850 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10851 ;;
10852 *)
10853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10854for as_dir in $PATH
10855do
10856 IFS=$as_save_IFS
10857 test -z "$as_dir" && as_dir=.
10858 for ac_exec_ext in '' $ac_executable_extensions; do
10859 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10860 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 10861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
0cfc0546
GM
10862 break 2
10863 fi
10864done
10865done
10866IFS=$as_save_IFS
10867
10868 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10869 ;;
10870esac
10871fi
10872PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10873if test -n "$PKG_CONFIG"; then
b0448899
CY
10874 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10875echo "${ECHO_T}$PKG_CONFIG" >&6; }
0cfc0546 10876else
b0448899
CY
10877 { echo "$as_me:$LINENO: result: no" >&5
10878echo "${ECHO_T}no" >&6; }
0cfc0546
GM
10879fi
10880
10881
0cfc0546
GM
10882
10883 if test "$PKG_CONFIG" = "no" ; then
10884 :
10885 else
10886 PKG_CONFIG_MIN_VERSION=0.9.0
10887 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
10888 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10889echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
0cfc0546
GM
10890
10891 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
b0448899
CY
10892 { echo "$as_me:$LINENO: result: yes" >&5
10893echo "${ECHO_T}yes" >&6; }
0cfc0546
GM
10894 succeeded=yes
10895
b0448899
CY
10896 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10897echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
0cfc0546 10898 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
b0448899
CY
10899 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10900echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
0cfc0546 10901
b0448899
CY
10902 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10903echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
0cfc0546 10904 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
b0448899
CY
10905 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10906echo "${ECHO_T}$RSVG_LIBS" >&6; }
0cfc0546 10907 else
b0448899
CY
10908 { echo "$as_me:$LINENO: result: no" >&5
10909echo "${ECHO_T}no" >&6; }
0cfc0546
GM
10910 RSVG_CFLAGS=""
10911 RSVG_LIBS=""
10912 ## If we have a custom action on failure, don't print errors, but
10913 ## do set a variable so people can do so.
10914 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10915
10916 fi
10917
10918
10919
10920 else
10921 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10922 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10923 fi
10924 fi
10925
10926 if test $succeeded = yes; then
10927 :
10928 else
10929 :
10930 fi
10931
10932
10933
10934
10935 if test ".${RSVG_CFLAGS}" != "."; then
10936 HAVE_RSVG=yes
10937
10938cat >>confdefs.h <<\_ACEOF
10939#define HAVE_RSVG 1
10940_ACEOF
10941
10942 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10943 LIBS="$RSVG_LIBS $LIBS"
10944 fi
10945 fi
10946fi
10947
10948
488dd4c4 10949HAVE_GTK=no
9d2818d6 10950if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10951 GLIB_REQUIRED=2.6
10952 GTK_REQUIRED=2.6
488dd4c4
JD
10953 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10954
488dd4c4
JD
10955
10956 succeeded=no
10957
00b9c927 10958 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10959set dummy pkg-config; ac_word=$2
b0448899
CY
10960{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10961echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4 10962if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 10963 echo $ECHO_N "(cached) $ECHO_C" >&6
488dd4c4
JD
10964else
10965 case $PKG_CONFIG in
10966 [\\/]* | ?:[\\/]*)
10967 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10968 ;;
10969 *)
10970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10971for as_dir in $PATH
10972do
10973 IFS=$as_save_IFS
10974 test -z "$as_dir" && as_dir=.
10975 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10976 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4 10977 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 10978 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
488dd4c4
JD
10979 break 2
10980 fi
10981done
10982done
ca81d7a0 10983IFS=$as_save_IFS
488dd4c4
JD
10984
10985 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10986 ;;
10987esac
10988fi
10989PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10990if test -n "$PKG_CONFIG"; then
b0448899
CY
10991 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10992echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10993else
b0448899
CY
10994 { echo "$as_me:$LINENO: result: no" >&5
10995echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10996fi
10997
ca81d7a0 10998
488dd4c4
JD
10999
11000 if test "$PKG_CONFIG" = "no" ; then
089a966d 11001 pkg_check_gtk=no
488dd4c4
JD
11002 else
11003 PKG_CONFIG_MIN_VERSION=0.9.0
11004 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
11005 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11006echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11007
67db6aa2 11008 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
b0448899
CY
11009 { echo "$as_me:$LINENO: result: yes" >&5
11010echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11011 succeeded=yes
11012
b0448899
CY
11013 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11014echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11015 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
b0448899
CY
11016 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11017echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11018
b0448899
CY
11019 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11020echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11021 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
b0448899
CY
11022 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11023echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11024 else
b0448899
CY
11025 { echo "$as_me:$LINENO: result: no" >&5
11026echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11027 GTK_CFLAGS=""
11028 GTK_LIBS=""
11029 ## If we have a custom action on failure, don't print errors, but
11030 ## do set a variable so people can do so.
11031 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11032
488dd4c4
JD
11033 fi
11034
11035
11036
11037 else
11038 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11039 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11040 fi
11041 fi
11042
11043 if test $succeeded = yes; then
089a966d 11044 pkg_check_gtk=yes
488dd4c4 11045 else
089a966d
GM
11046 pkg_check_gtk=no
11047 fi
11048
11049 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
b0448899
CY
11050 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11051echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11052 { (exit 1); exit 1; }; }
11053 fi
089a966d
GM
11054fi
11055
11056
11057if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11058
11059
11060
11061 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11062 CFLAGS="$CFLAGS $GTK_CFLAGS"
11063 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11064 GTK_COMPILES=no
57669b57 11065
8eeae1c9 11066for ac_func in gtk_main
57669b57 11067do
b0448899
CY
11068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11069{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11071if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 11072 echo $ECHO_N "(cached) $ECHO_C" >&6
57669b57
JD
11073else
11074 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11075/* confdefs.h. */
11076_ACEOF
11077cat confdefs.h >>conftest.$ac_ext
11078cat >>conftest.$ac_ext <<_ACEOF
11079/* end confdefs.h. */
edfaf76d
LK
11080/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11081 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11082#define $ac_func innocuous_$ac_func
11083
57669b57
JD
11084/* System header to define __stub macros and hopefully few prototypes,
11085 which can conflict with char $ac_func (); below.
11086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11087 <limits.h> exists even on freestanding compilers. */
edfaf76d 11088
57669b57
JD
11089#ifdef __STDC__
11090# include <limits.h>
11091#else
11092# include <assert.h>
11093#endif
edfaf76d
LK
11094
11095#undef $ac_func
11096
ca81d7a0
JD
11097/* Override any GCC internal prototype to avoid an error.
11098 Use char because int might match the return type of a GCC
11099 builtin and then its argument prototype would still apply. */
57669b57
JD
11100#ifdef __cplusplus
11101extern "C"
57669b57 11102#endif
57669b57
JD
11103char $ac_func ();
11104/* The GNU C library defines this for functions which it implements
11105 to always fail with ENOSYS. Some functions are actually named
11106 something starting with __ and the normal name is an alias. */
ca81d7a0 11107#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11108choke me
57669b57
JD
11109#endif
11110
11111int
11112main ()
11113{
ca81d7a0 11114return $ac_func ();
57669b57
JD
11115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11120if { (ac_try="$ac_link"
11121case "(($ac_try" in
11122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11123 *) ac_try_echo=$ac_try;;
11124esac
b0448899 11125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11126 (eval "$ac_link") 2>conftest.er1
57669b57 11127 ac_status=$?
edfaf76d
LK
11128 grep -v '^ *+' conftest.er1 >conftest.err
11129 rm -f conftest.er1
11130 cat conftest.err >&5
b0448899 11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11132 (exit $ac_status); } && {
11133 test -z "$ac_c_werror_flag" ||
11134 test ! -s conftest.err
b0448899
CY
11135 } && test -s conftest$ac_exeext &&
11136 $as_test_x conftest$ac_exeext; then
57669b57
JD
11137 eval "$as_ac_var=yes"
11138else
b0448899 11139 echo "$as_me: failed program was:" >&5
57669b57
JD
11140sed 's/^/| /' conftest.$ac_ext >&5
11141
ca81d7a0 11142 eval "$as_ac_var=no"
57669b57 11143fi
ca81d7a0 11144
f053c89f 11145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11146 conftest$ac_exeext conftest.$ac_ext
57669b57 11147fi
b0448899
CY
11148ac_res=`eval echo '${'$as_ac_var'}'`
11149 { echo "$as_me:$LINENO: result: $ac_res" >&5
11150echo "${ECHO_T}$ac_res" >&6; }
11151if test `eval echo '${'$as_ac_var'}'` = yes; then
57669b57 11152 cat >>confdefs.h <<_ACEOF
b0448899 11153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
57669b57 11154_ACEOF
8eeae1c9 11155 GTK_COMPILES=yes
57669b57
JD
11156fi
11157done
11158
8eeae1c9 11159 if test "${GTK_COMPILES}" != "yes"; then
089a966d 11160 if test "$USE_X_TOOLKIT" != "maybe"; then
b0448899
CY
11161 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
11162echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
8eeae1c9 11163 { (exit 1); exit 1; }; };
089a966d
GM
11164 fi
11165 else
11166 HAVE_GTK=yes
488dd4c4
JD
11167
11168cat >>confdefs.h <<\_ACEOF
a51f4969 11169#define USE_GTK 1
488dd4c4
JD
11170_ACEOF
11171
089a966d 11172 USE_X_TOOLKIT=none
f60c93db
JD
11173 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11174 :
11175 else
b0448899 11176 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
f60c93db
JD
11177 closing open displays. This is no problem if you just use
11178 one display, but if you use more than one and close one of them
11179 Emacs may crash." >&5
b0448899 11180echo "$as_me: WARNING: Your version of Gtk+ will have problems with
f60c93db
JD
11181 closing open displays. This is no problem if you just use
11182 one display, but if you use more than one and close one of them
11183 Emacs may crash." >&2;}
11184 sleep 3
11185 fi
089a966d
GM
11186 fi
11187
11188fi
11189
11190
11191if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11192
d0a80c21
JD
11193 if test "$with_toolkit_scroll_bars" != no; then
11194 with_toolkit_scroll_bars=yes
11195 fi
57669b57
JD
11196
11197 HAVE_GTK_MULTIDISPLAY=no
11198
11199for ac_func in gdk_display_open
11200do
b0448899
CY
11201as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11202{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11203echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11204if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 11205 echo $ECHO_N "(cached) $ECHO_C" >&6
57669b57
JD
11206else
11207 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11208/* confdefs.h. */
11209_ACEOF
11210cat confdefs.h >>conftest.$ac_ext
11211cat >>conftest.$ac_ext <<_ACEOF
11212/* end confdefs.h. */
edfaf76d
LK
11213/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11214 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11215#define $ac_func innocuous_$ac_func
11216
57669b57
JD
11217/* System header to define __stub macros and hopefully few prototypes,
11218 which can conflict with char $ac_func (); below.
11219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11220 <limits.h> exists even on freestanding compilers. */
edfaf76d 11221
57669b57
JD
11222#ifdef __STDC__
11223# include <limits.h>
11224#else
11225# include <assert.h>
11226#endif
edfaf76d
LK
11227
11228#undef $ac_func
11229
ca81d7a0
JD
11230/* Override any GCC internal prototype to avoid an error.
11231 Use char because int might match the return type of a GCC
11232 builtin and then its argument prototype would still apply. */
57669b57
JD
11233#ifdef __cplusplus
11234extern "C"
57669b57 11235#endif
57669b57
JD
11236char $ac_func ();
11237/* The GNU C library defines this for functions which it implements
11238 to always fail with ENOSYS. Some functions are actually named
11239 something starting with __ and the normal name is an alias. */
ca81d7a0 11240#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11241choke me
57669b57
JD
11242#endif
11243
11244int
11245main ()
11246{
ca81d7a0 11247return $ac_func ();
57669b57
JD
11248 ;
11249 return 0;
11250}
11251_ACEOF
11252rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11253if { (ac_try="$ac_link"
11254case "(($ac_try" in
11255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11256 *) ac_try_echo=$ac_try;;
11257esac
b0448899 11258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11259 (eval "$ac_link") 2>conftest.er1
57669b57 11260 ac_status=$?
edfaf76d
LK
11261 grep -v '^ *+' conftest.er1 >conftest.err
11262 rm -f conftest.er1
11263 cat conftest.err >&5
b0448899 11264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11265 (exit $ac_status); } && {
11266 test -z "$ac_c_werror_flag" ||
11267 test ! -s conftest.err
b0448899
CY
11268 } && test -s conftest$ac_exeext &&
11269 $as_test_x conftest$ac_exeext; then
57669b57
JD
11270 eval "$as_ac_var=yes"
11271else
b0448899 11272 echo "$as_me: failed program was:" >&5
57669b57
JD
11273sed 's/^/| /' conftest.$ac_ext >&5
11274
ca81d7a0 11275 eval "$as_ac_var=no"
57669b57 11276fi
ca81d7a0 11277
f053c89f 11278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11279 conftest$ac_exeext conftest.$ac_ext
57669b57 11280fi
b0448899
CY
11281ac_res=`eval echo '${'$as_ac_var'}'`
11282 { echo "$as_me:$LINENO: result: $ac_res" >&5
11283echo "${ECHO_T}$ac_res" >&6; }
11284if test `eval echo '${'$as_ac_var'}'` = yes; then
57669b57 11285 cat >>confdefs.h <<_ACEOF
b0448899 11286#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
57669b57
JD
11287_ACEOF
11288 HAVE_GTK_MULTIDISPLAY=yes
11289fi
11290done
11291
11292 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11293
11294cat >>confdefs.h <<\_ACEOF
11295#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11296_ACEOF
11297
11298 fi
57669b57 11299
572a3cc2
JD
11300 HAVE_GTK_FILE_SELECTION=no
11301
11302for ac_func in gtk_file_selection_new
11303do
b0448899
CY
11304as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11305{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11306echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11307if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 11308 echo $ECHO_N "(cached) $ECHO_C" >&6
572a3cc2
JD
11309else
11310 cat >conftest.$ac_ext <<_ACEOF
11311/* confdefs.h. */
11312_ACEOF
11313cat confdefs.h >>conftest.$ac_ext
11314cat >>conftest.$ac_ext <<_ACEOF
11315/* end confdefs.h. */
edfaf76d
LK
11316/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11317 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11318#define $ac_func innocuous_$ac_func
11319
572a3cc2
JD
11320/* System header to define __stub macros and hopefully few prototypes,
11321 which can conflict with char $ac_func (); below.
11322 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11323 <limits.h> exists even on freestanding compilers. */
edfaf76d 11324
572a3cc2
JD
11325#ifdef __STDC__
11326# include <limits.h>
11327#else
11328# include <assert.h>
11329#endif
edfaf76d
LK
11330
11331#undef $ac_func
11332
ca81d7a0
JD
11333/* Override any GCC internal prototype to avoid an error.
11334 Use char because int might match the return type of a GCC
11335 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11336#ifdef __cplusplus
11337extern "C"
572a3cc2 11338#endif
572a3cc2
JD
11339char $ac_func ();
11340/* The GNU C library defines this for functions which it implements
11341 to always fail with ENOSYS. Some functions are actually named
11342 something starting with __ and the normal name is an alias. */
ca81d7a0 11343#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11344choke me
572a3cc2
JD
11345#endif
11346
11347int
11348main ()
11349{
ca81d7a0 11350return $ac_func ();
572a3cc2
JD
11351 ;
11352 return 0;
11353}
11354_ACEOF
11355rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11356if { (ac_try="$ac_link"
11357case "(($ac_try" in
11358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11359 *) ac_try_echo=$ac_try;;
11360esac
b0448899 11361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11362 (eval "$ac_link") 2>conftest.er1
572a3cc2 11363 ac_status=$?
edfaf76d
LK
11364 grep -v '^ *+' conftest.er1 >conftest.err
11365 rm -f conftest.er1
11366 cat conftest.err >&5
b0448899 11367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11368 (exit $ac_status); } && {
11369 test -z "$ac_c_werror_flag" ||
11370 test ! -s conftest.err
b0448899
CY
11371 } && test -s conftest$ac_exeext &&
11372 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11373 eval "$as_ac_var=yes"
11374else
b0448899 11375 echo "$as_me: failed program was:" >&5
572a3cc2
JD
11376sed 's/^/| /' conftest.$ac_ext >&5
11377
ca81d7a0 11378 eval "$as_ac_var=no"
572a3cc2 11379fi
ca81d7a0 11380
f053c89f 11381rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11382 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11383fi
b0448899
CY
11384ac_res=`eval echo '${'$as_ac_var'}'`
11385 { echo "$as_me:$LINENO: result: $ac_res" >&5
11386echo "${ECHO_T}$ac_res" >&6; }
11387if test `eval echo '${'$as_ac_var'}'` = yes; then
572a3cc2 11388 cat >>confdefs.h <<_ACEOF
b0448899 11389#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
572a3cc2
JD
11390_ACEOF
11391 HAVE_GTK_FILE_SELECTION=yes
11392fi
11393done
11394
11395
11396 HAVE_GTK_FILE_CHOOSER=no
11397
11398for ac_func in gtk_file_chooser_dialog_new
11399do
b0448899
CY
11400as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11401{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11402echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11403if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 11404 echo $ECHO_N "(cached) $ECHO_C" >&6
572a3cc2
JD
11405else
11406 cat >conftest.$ac_ext <<_ACEOF
11407/* confdefs.h. */
11408_ACEOF
11409cat confdefs.h >>conftest.$ac_ext
11410cat >>conftest.$ac_ext <<_ACEOF
11411/* end confdefs.h. */
edfaf76d
LK
11412/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11413 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11414#define $ac_func innocuous_$ac_func
11415
572a3cc2
JD
11416/* System header to define __stub macros and hopefully few prototypes,
11417 which can conflict with char $ac_func (); below.
11418 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11419 <limits.h> exists even on freestanding compilers. */
edfaf76d 11420
572a3cc2
JD
11421#ifdef __STDC__
11422# include <limits.h>
11423#else
11424# include <assert.h>
11425#endif
edfaf76d
LK
11426
11427#undef $ac_func
11428
ca81d7a0
JD
11429/* Override any GCC internal prototype to avoid an error.
11430 Use char because int might match the return type of a GCC
11431 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11432#ifdef __cplusplus
11433extern "C"
572a3cc2 11434#endif
572a3cc2
JD
11435char $ac_func ();
11436/* The GNU C library defines this for functions which it implements
11437 to always fail with ENOSYS. Some functions are actually named
11438 something starting with __ and the normal name is an alias. */
ca81d7a0 11439#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11440choke me
572a3cc2
JD
11441#endif
11442
11443int
11444main ()
11445{
ca81d7a0 11446return $ac_func ();
572a3cc2
JD
11447 ;
11448 return 0;
11449}
11450_ACEOF
11451rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11452if { (ac_try="$ac_link"
11453case "(($ac_try" in
11454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11455 *) ac_try_echo=$ac_try;;
11456esac
b0448899 11457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11458 (eval "$ac_link") 2>conftest.er1
572a3cc2 11459 ac_status=$?
edfaf76d
LK
11460 grep -v '^ *+' conftest.er1 >conftest.err
11461 rm -f conftest.er1
11462 cat conftest.err >&5
b0448899 11463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11464 (exit $ac_status); } && {
11465 test -z "$ac_c_werror_flag" ||
11466 test ! -s conftest.err
b0448899
CY
11467 } && test -s conftest$ac_exeext &&
11468 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11469 eval "$as_ac_var=yes"
11470else
b0448899 11471 echo "$as_me: failed program was:" >&5
572a3cc2
JD
11472sed 's/^/| /' conftest.$ac_ext >&5
11473
ca81d7a0 11474 eval "$as_ac_var=no"
572a3cc2 11475fi
ca81d7a0 11476
f053c89f 11477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11478 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11479fi
b0448899
CY
11480ac_res=`eval echo '${'$as_ac_var'}'`
11481 { echo "$as_me:$LINENO: result: $ac_res" >&5
11482echo "${ECHO_T}$ac_res" >&6; }
11483if test `eval echo '${'$as_ac_var'}'` = yes; then
572a3cc2 11484 cat >>confdefs.h <<_ACEOF
b0448899 11485#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
572a3cc2
JD
11486_ACEOF
11487 HAVE_GTK_FILE_CHOOSER=yes
11488fi
11489done
11490
11491
11492 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11493 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11494
11495cat >>confdefs.h <<\_ACEOF
11496#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11497_ACEOF
11498
b8bdffbe
JD
11499 fi
11500
11501 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11502 HAVE_GTK_AND_PTHREAD=no
11503
11504for ac_header in pthread.h
11505do
b0448899 11506as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 11507if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
11508 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11509echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 11510if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 11511 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11512fi
b0448899
CY
11513ac_res=`eval echo '${'$as_ac_Header'}'`
11514 { echo "$as_me:$LINENO: result: $ac_res" >&5
11515echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11516else
11517 # Is the header compilable?
b0448899
CY
11518{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11519echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11520cat >conftest.$ac_ext <<_ACEOF
11521/* confdefs.h. */
11522_ACEOF
11523cat confdefs.h >>conftest.$ac_ext
11524cat >>conftest.$ac_ext <<_ACEOF
11525/* end confdefs.h. */
11526$ac_includes_default
11527#include <$ac_header>
11528_ACEOF
11529rm -f conftest.$ac_objext
ca81d7a0
JD
11530if { (ac_try="$ac_compile"
11531case "(($ac_try" in
11532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11533 *) ac_try_echo=$ac_try;;
11534esac
b0448899 11535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11536 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11537 ac_status=$?
edfaf76d
LK
11538 grep -v '^ *+' conftest.er1 >conftest.err
11539 rm -f conftest.er1
11540 cat conftest.err >&5
b0448899 11541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11542 (exit $ac_status); } && {
11543 test -z "$ac_c_werror_flag" ||
11544 test ! -s conftest.err
11545 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11546 ac_header_compiler=yes
11547else
b0448899 11548 echo "$as_me: failed program was:" >&5
b8bdffbe
JD
11549sed 's/^/| /' conftest.$ac_ext >&5
11550
ca81d7a0 11551 ac_header_compiler=no
b8bdffbe 11552fi
ca81d7a0
JD
11553
11554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
11555{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11556echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11557
11558# Is the header present?
b0448899
CY
11559{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11560echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11561cat >conftest.$ac_ext <<_ACEOF
11562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
11567#include <$ac_header>
11568_ACEOF
ca81d7a0
JD
11569if { (ac_try="$ac_cpp conftest.$ac_ext"
11570case "(($ac_try" in
11571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11572 *) ac_try_echo=$ac_try;;
11573esac
b0448899 11574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11576 ac_status=$?
11577 grep -v '^ *+' conftest.er1 >conftest.err
11578 rm -f conftest.er1
11579 cat conftest.err >&5
b0448899 11580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11581 (exit $ac_status); } >/dev/null && {
11582 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11583 test ! -s conftest.err
11584 }; then
b8bdffbe
JD
11585 ac_header_preproc=yes
11586else
b0448899 11587 echo "$as_me: failed program was:" >&5
b8bdffbe
JD
11588sed 's/^/| /' conftest.$ac_ext >&5
11589
11590 ac_header_preproc=no
11591fi
ca81d7a0 11592
b8bdffbe 11593rm -f conftest.err conftest.$ac_ext
b0448899
CY
11594{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11595echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11596
11597# So? What about this header?
edfaf76d
LK
11598case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11599 yes:no: )
b0448899
CY
11600 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11601echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11602 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11603echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 11604 ac_header_preproc=yes
b8bdffbe 11605 ;;
edfaf76d 11606 no:yes:* )
b0448899
CY
11607 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11608echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11609 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11610echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11611 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11612echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11613 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11614echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
11615 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11616echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11617 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11618echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11619
b8bdffbe
JD
11620 ;;
11621esac
b0448899
CY
11622{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11623echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 11624if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 11625 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11626else
edfaf76d 11627 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11628fi
b0448899
CY
11629ac_res=`eval echo '${'$as_ac_Header'}'`
11630 { echo "$as_me:$LINENO: result: $ac_res" >&5
11631echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11632
11633fi
b0448899 11634if test `eval echo '${'$as_ac_Header'}'` = yes; then
b8bdffbe 11635 cat >>confdefs.h <<_ACEOF
b0448899 11636#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b8bdffbe
JD
11637_ACEOF
11638
11639fi
11640
11641done
11642
11643 if test "$ac_cv_header_pthread_h"; then
b0448899
CY
11644 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11645echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe 11646if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
b0448899 11647 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe
JD
11648else
11649 ac_check_lib_save_LIBS=$LIBS
11650LIBS="-lpthread $LIBS"
11651cat >conftest.$ac_ext <<_ACEOF
11652/* confdefs.h. */
11653_ACEOF
11654cat confdefs.h >>conftest.$ac_ext
11655cat >>conftest.$ac_ext <<_ACEOF
11656/* end confdefs.h. */
11657
ca81d7a0
JD
11658/* Override any GCC internal prototype to avoid an error.
11659 Use char because int might match the return type of a GCC
11660 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11661#ifdef __cplusplus
11662extern "C"
11663#endif
b8bdffbe
JD
11664char pthread_self ();
11665int
11666main ()
11667{
ca81d7a0 11668return pthread_self ();
b8bdffbe
JD
11669 ;
11670 return 0;
11671}
11672_ACEOF
11673rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11674if { (ac_try="$ac_link"
11675case "(($ac_try" in
11676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11677 *) ac_try_echo=$ac_try;;
11678esac
b0448899 11679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11680 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11681 ac_status=$?
edfaf76d
LK
11682 grep -v '^ *+' conftest.er1 >conftest.err
11683 rm -f conftest.er1
11684 cat conftest.err >&5
b0448899 11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11686 (exit $ac_status); } && {
11687 test -z "$ac_c_werror_flag" ||
11688 test ! -s conftest.err
b0448899
CY
11689 } && test -s conftest$ac_exeext &&
11690 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11691 ac_cv_lib_pthread_pthread_self=yes
11692else
b0448899 11693 echo "$as_me: failed program was:" >&5
b8bdffbe
JD
11694sed 's/^/| /' conftest.$ac_ext >&5
11695
ca81d7a0 11696 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11697fi
ca81d7a0 11698
f053c89f 11699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11700 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11701LIBS=$ac_check_lib_save_LIBS
11702fi
b0448899
CY
11703{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11704echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
11705if test $ac_cv_lib_pthread_pthread_self = yes; then
b8bdffbe
JD
11706 HAVE_GTK_AND_PTHREAD=yes
11707fi
11708
11709 fi
11710 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11711 case "${canonical}" in
11712 *-hpux*) ;;
11713 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11714 esac
b8bdffbe
JD
11715
11716cat >>confdefs.h <<\_ACEOF
11717#define HAVE_GTK_AND_PTHREAD 1
11718_ACEOF
11719
11720 fi
57669b57 11721 fi
488dd4c4
JD
11722fi
11723
131e4133
MA
11724HAVE_DBUS=no
11725if test "${with_dbus}" = "yes"; then
cffe4909
MH
11726
11727 succeeded=no
11728
00b9c927 11729 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909 11730set dummy pkg-config; ac_word=$2
b0448899
CY
11731{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
cffe4909 11733if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 11734 echo $ECHO_N "(cached) $ECHO_C" >&6
131e4133 11735else
cffe4909
MH
11736 case $PKG_CONFIG in
11737 [\\/]* | ?:[\\/]*)
11738 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11739 ;;
11740 *)
11741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11742for as_dir in $PATH
11743do
11744 IFS=$as_save_IFS
11745 test -z "$as_dir" && as_dir=.
11746 for ac_exec_ext in '' $ac_executable_extensions; do
11747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11748 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 11749 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
cffe4909
MH
11750 break 2
11751 fi
11752done
11753done
11754IFS=$as_save_IFS
131e4133 11755
cffe4909
MH
11756 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11757 ;;
131e4133 11758esac
cffe4909
MH
11759fi
11760PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11761if test -n "$PKG_CONFIG"; then
b0448899
CY
11762 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11763echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11764else
b0448899
CY
11765 { echo "$as_me:$LINENO: result: no" >&5
11766echo "${ECHO_T}no" >&6; }
131e4133
MA
11767fi
11768
cffe4909 11769
cffe4909
MH
11770
11771 if test "$PKG_CONFIG" = "no" ; then
11772 HAVE_DBUS=no
11773 else
11774 PKG_CONFIG_MIN_VERSION=0.9.0
11775 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
11776 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11777echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
cffe4909
MH
11778
11779 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
b0448899
CY
11780 { echo "$as_me:$LINENO: result: yes" >&5
11781echo "${ECHO_T}yes" >&6; }
cffe4909
MH
11782 succeeded=yes
11783
b0448899
CY
11784 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11785echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
cffe4909 11786 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
b0448899
CY
11787 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11788echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
cffe4909 11789
b0448899
CY
11790 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11791echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
cffe4909 11792 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
b0448899
CY
11793 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11794echo "${ECHO_T}$DBUS_LIBS" >&6; }
cffe4909 11795 else
b0448899
CY
11796 { echo "$as_me:$LINENO: result: no" >&5
11797echo "${ECHO_T}no" >&6; }
cffe4909
MH
11798 DBUS_CFLAGS=""
11799 DBUS_LIBS=""
11800 ## If we have a custom action on failure, don't print errors, but
11801 ## do set a variable so people can do so.
11802 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11803
11804 fi
11805
11806
11807
11808 else
11809 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11810 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11811 fi
11812 fi
11813
11814 if test $succeeded = yes; then
11815 HAVE_DBUS=yes
11816 else
11817 HAVE_DBUS=no
11818 fi
131e4133
MA
11819
11820 if test "$HAVE_DBUS" = yes; then
11821
11822cat >>confdefs.h <<\_ACEOF
11823#define HAVE_DBUS 1
11824_ACEOF
11825
131e4133
MA
11826 fi
11827fi
11828
b3615392 11829HAVE_XAW3D=no
991a7602 11830if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd 11831 if test "$with_xaw3d" != no; then
b0448899
CY
11832 { echo "$as_me:$LINENO: checking for xaw3d" >&5
11833echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11834 if test "${emacs_cv_xaw3d+set}" = set; then
b0448899 11835 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
11836else
11837 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11838/* confdefs.h. */
11839_ACEOF
11840cat confdefs.h >>conftest.$ac_ext
11841cat >>conftest.$ac_ext <<_ACEOF
11842/* end confdefs.h. */
98418dba
CW
11843
11844#include <X11/Intrinsic.h>
b3615392 11845#include <X11/Xaw3d/Simple.h>
98418dba
CW
11846int
11847main ()
11848{
11849
11850 ;
11851 return 0;
11852}
11853_ACEOF
11854rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11855if { (ac_try="$ac_link"
11856case "(($ac_try" in
11857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11858 *) ac_try_echo=$ac_try;;
11859esac
b0448899 11860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11861 (eval "$ac_link") 2>conftest.er1
98418dba 11862 ac_status=$?
edfaf76d
LK
11863 grep -v '^ *+' conftest.er1 >conftest.err
11864 rm -f conftest.er1
11865 cat conftest.err >&5
b0448899 11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11867 (exit $ac_status); } && {
11868 test -z "$ac_c_werror_flag" ||
11869 test ! -s conftest.err
b0448899
CY
11870 } && test -s conftest$ac_exeext &&
11871 $as_test_x conftest$ac_exeext; then
b3615392 11872 emacs_cv_xaw3d=yes
98418dba 11873else
b0448899 11874 echo "$as_me: failed program was:" >&5
19650fd6
AS
11875sed 's/^/| /' conftest.$ac_ext >&5
11876
b3615392 11877 emacs_cv_xaw3d=no
98418dba 11878fi
ca81d7a0 11879
f053c89f 11880rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11881 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11882fi
11883
9d89ffd0 11884 else
f23d76bd 11885 emacs_cv_xaw3d=no
9d89ffd0 11886 fi
f23d76bd 11887 if test $emacs_cv_xaw3d = yes; then
b0448899
CY
11888 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
11889echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11890 USE_X_TOOLKIT=LUCID
11891 HAVE_XAW3D=yes
9d89ffd0 11892
b3615392
MB
11893cat >>confdefs.h <<\_ACEOF
11894#define HAVE_XAW3D 1
11895_ACEOF
9d89ffd0 11896
f23d76bd 11897 else
b0448899
CY
11898 { echo "$as_me:$LINENO: result: no" >&5
11899echo "${ECHO_T}no" >&6; }
11900 { echo "$as_me:$LINENO: checking for libXaw" >&5
11901echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11902 if test "${emacs_cv_xaw+set}" = set; then
b0448899 11903 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11904else
b3615392 11905 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11906/* confdefs.h. */
11907_ACEOF
11908cat confdefs.h >>conftest.$ac_ext
11909cat >>conftest.$ac_ext <<_ACEOF
11910/* end confdefs.h. */
b3615392
MB
11911
11912#include <X11/Intrinsic.h>
11913#include <X11/Xaw/Simple.h>
11914int
11915main ()
11916{
11917
11918 ;
11919 return 0;
11920}
9d89ffd0 11921_ACEOF
b3615392
MB
11922rm -f conftest.$ac_objext conftest$ac_exeext
11923if { (ac_try="$ac_link"
9d89ffd0
JD
11924case "(($ac_try" in
11925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11926 *) ac_try_echo=$ac_try;;
11927esac
b0448899 11928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11929 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11930 ac_status=$?
11931 grep -v '^ *+' conftest.er1 >conftest.err
11932 rm -f conftest.er1
11933 cat conftest.err >&5
b0448899 11934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9d89ffd0
JD
11935 (exit $ac_status); } && {
11936 test -z "$ac_c_werror_flag" ||
11937 test ! -s conftest.err
b0448899
CY
11938 } && test -s conftest$ac_exeext &&
11939 $as_test_x conftest$ac_exeext; then
b3615392 11940 emacs_cv_xaw=yes
9d89ffd0 11941else
b0448899 11942 echo "$as_me: failed program was:" >&5
9d89ffd0
JD
11943sed 's/^/| /' conftest.$ac_ext >&5
11944
b3615392 11945 emacs_cv_xaw=no
9d89ffd0
JD
11946fi
11947
b3615392
MB
11948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11949 conftest$ac_exeext conftest.$ac_ext
11950fi
9d89ffd0 11951
f23d76bd 11952 if test $emacs_cv_xaw = yes; then
b0448899
CY
11953 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
11954echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11955 USE_X_TOOLKIT=LUCID
11956 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
b0448899
CY
11957 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
11958echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
991a7602 11959 { (exit 1); exit 1; }; }
f23d76bd 11960 else
b0448899
CY
11961 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
11962echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11963 USE_X_TOOLKIT=none
98418dba 11964 fi
98418dba
CW
11965 fi
11966fi
11967
11968X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11969
11970if test "${USE_X_TOOLKIT}" != "none"; then
b0448899
CY
11971 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11972echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba 11973 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
b0448899 11974 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
11975else
11976 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11977/* confdefs.h. */
11978_ACEOF
11979cat confdefs.h >>conftest.$ac_ext
11980cat >>conftest.$ac_ext <<_ACEOF
11981/* end confdefs.h. */
98418dba 11982#include <X11/Intrinsic.h>
98418dba
CW
11983int
11984main ()
11985{
11986#if XtSpecificationRelease < 6
11987fail;
11988#endif
11989
11990 ;
11991 return 0;
11992}
11993_ACEOF
11994rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11995if { (ac_try="$ac_link"
11996case "(($ac_try" in
11997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11998 *) ac_try_echo=$ac_try;;
11999esac
b0448899 12000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12001 (eval "$ac_link") 2>conftest.er1
98418dba 12002 ac_status=$?
edfaf76d
LK
12003 grep -v '^ *+' conftest.er1 >conftest.err
12004 rm -f conftest.er1
12005 cat conftest.err >&5
b0448899 12006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12007 (exit $ac_status); } && {
12008 test -z "$ac_c_werror_flag" ||
12009 test ! -s conftest.err
b0448899
CY
12010 } && test -s conftest$ac_exeext &&
12011 $as_test_x conftest$ac_exeext; then
98418dba
CW
12012 emacs_cv_x11_toolkit_version_6=yes
12013else
b0448899 12014 echo "$as_me: failed program was:" >&5
19650fd6
AS
12015sed 's/^/| /' conftest.$ac_ext >&5
12016
ca81d7a0 12017 emacs_cv_x11_toolkit_version_6=no
98418dba 12018fi
ca81d7a0 12019
f053c89f 12020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12021 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12022fi
12023
12024 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12025 if test $emacs_cv_x11_toolkit_version_6 = yes; then
b0448899
CY
12026 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12027echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12028
c0d27fcc 12029cat >>confdefs.h <<\_ACEOF
98418dba 12030#define HAVE_X11XTR6 1
c0d27fcc 12031_ACEOF
98418dba
CW
12032
12033 else
b0448899
CY
12034 { echo "$as_me:$LINENO: result: before 6" >&5
12035echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12036 fi
12037
12038 OLDLIBS="$LIBS"
12039 if test x$HAVE_X11XTR6 = xyes; then
12040 LIBS="-lXt -lSM -lICE $LIBS"
12041 else
12042 LIBS="-lXt $LIBS"
12043 fi
12044
b0448899
CY
12045{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12046echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba 12047if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
b0448899 12048 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12049else
12050 ac_check_lib_save_LIBS=$LIBS
12051LIBS="-lXmu $LIBS"
12052cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12053/* confdefs.h. */
12054_ACEOF
12055cat confdefs.h >>conftest.$ac_ext
12056cat >>conftest.$ac_ext <<_ACEOF
12057/* end confdefs.h. */
98418dba 12058
ca81d7a0
JD
12059/* Override any GCC internal prototype to avoid an error.
12060 Use char because int might match the return type of a GCC
12061 builtin and then its argument prototype would still apply. */
98418dba
CW
12062#ifdef __cplusplus
12063extern "C"
12064#endif
98418dba 12065char XmuConvertStandardSelection ();
98418dba
CW
12066int
12067main ()
12068{
ca81d7a0 12069return XmuConvertStandardSelection ();
98418dba
CW
12070 ;
12071 return 0;
12072}
12073_ACEOF
12074rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12075if { (ac_try="$ac_link"
12076case "(($ac_try" in
12077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12078 *) ac_try_echo=$ac_try;;
12079esac
b0448899 12080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12081 (eval "$ac_link") 2>conftest.er1
98418dba 12082 ac_status=$?
edfaf76d
LK
12083 grep -v '^ *+' conftest.er1 >conftest.err
12084 rm -f conftest.er1
12085 cat conftest.err >&5
b0448899 12086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12087 (exit $ac_status); } && {
12088 test -z "$ac_c_werror_flag" ||
12089 test ! -s conftest.err
b0448899
CY
12090 } && test -s conftest$ac_exeext &&
12091 $as_test_x conftest$ac_exeext; then
98418dba
CW
12092 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12093else
b0448899 12094 echo "$as_me: failed program was:" >&5
19650fd6
AS
12095sed 's/^/| /' conftest.$ac_ext >&5
12096
ca81d7a0 12097 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12098fi
ca81d7a0 12099
f053c89f 12100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12101 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12102LIBS=$ac_check_lib_save_LIBS
12103fi
b0448899
CY
12104{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12105echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12106if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12107 cat >>confdefs.h <<_ACEOF
98418dba 12108#define HAVE_LIBXMU 1
c0d27fcc 12109_ACEOF
98418dba
CW
12110
12111 LIBS="-lXmu $LIBS"
12112
12113fi
12114
12115 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12116fi
12117
12118# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12119if test "${HAVE_X11}" = "yes"; then
12120 if test "${USE_X_TOOLKIT}" != "none"; then
12121
b0448899
CY
12122{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12123echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba 12124if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
b0448899 12125 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12126else
12127 ac_check_lib_save_LIBS=$LIBS
12128LIBS="-lXext $LIBS"
12129cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12130/* confdefs.h. */
12131_ACEOF
12132cat confdefs.h >>conftest.$ac_ext
12133cat >>conftest.$ac_ext <<_ACEOF
12134/* end confdefs.h. */
98418dba 12135
ca81d7a0
JD
12136/* Override any GCC internal prototype to avoid an error.
12137 Use char because int might match the return type of a GCC
12138 builtin and then its argument prototype would still apply. */
98418dba
CW
12139#ifdef __cplusplus
12140extern "C"
12141#endif
98418dba 12142char XShapeQueryExtension ();
98418dba
CW
12143int
12144main ()
12145{
ca81d7a0 12146return XShapeQueryExtension ();
98418dba
CW
12147 ;
12148 return 0;
12149}
12150_ACEOF
12151rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12152if { (ac_try="$ac_link"
12153case "(($ac_try" in
12154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12155 *) ac_try_echo=$ac_try;;
12156esac
b0448899 12157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12158 (eval "$ac_link") 2>conftest.er1
98418dba 12159 ac_status=$?
edfaf76d
LK
12160 grep -v '^ *+' conftest.er1 >conftest.err
12161 rm -f conftest.er1
12162 cat conftest.err >&5
b0448899 12163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12164 (exit $ac_status); } && {
12165 test -z "$ac_c_werror_flag" ||
12166 test ! -s conftest.err
b0448899
CY
12167 } && test -s conftest$ac_exeext &&
12168 $as_test_x conftest$ac_exeext; then
98418dba
CW
12169 ac_cv_lib_Xext_XShapeQueryExtension=yes
12170else
b0448899 12171 echo "$as_me: failed program was:" >&5
19650fd6
AS
12172sed 's/^/| /' conftest.$ac_ext >&5
12173
ca81d7a0 12174 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12175fi
ca81d7a0 12176
f053c89f 12177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12178 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12179LIBS=$ac_check_lib_save_LIBS
12180fi
b0448899
CY
12181{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12182echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12183if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12184 cat >>confdefs.h <<_ACEOF
98418dba 12185#define HAVE_LIBXEXT 1
c0d27fcc 12186_ACEOF
98418dba
CW
12187
12188 LIBS="-lXext $LIBS"
12189
12190fi
12191
12192 fi
12193fi
12194
12195if test "${USE_X_TOOLKIT}" = "MOTIF"; then
b0448899
CY
12196 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12197echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba 12198if test "${emacs_cv_motif_version_2_1+set}" = set; then
b0448899 12199 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12200else
12201 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12202/* confdefs.h. */
12203_ACEOF
12204cat confdefs.h >>conftest.$ac_ext
12205cat >>conftest.$ac_ext <<_ACEOF
12206/* end confdefs.h. */
98418dba 12207#include <Xm/Xm.h>
98418dba
CW
12208int
12209main ()
12210{
12211#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12212int x = 5;
12213#else
12214Motif version prior to 2.1.
12215#endif
12216 ;
12217 return 0;
12218}
12219_ACEOF
12220rm -f conftest.$ac_objext
ca81d7a0
JD
12221if { (ac_try="$ac_compile"
12222case "(($ac_try" in
12223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12224 *) ac_try_echo=$ac_try;;
12225esac
b0448899 12226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12227 (eval "$ac_compile") 2>conftest.er1
98418dba 12228 ac_status=$?
edfaf76d
LK
12229 grep -v '^ *+' conftest.er1 >conftest.err
12230 rm -f conftest.er1
12231 cat conftest.err >&5
b0448899 12232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12233 (exit $ac_status); } && {
12234 test -z "$ac_c_werror_flag" ||
12235 test ! -s conftest.err
12236 } && test -s conftest.$ac_objext; then
98418dba
CW
12237 emacs_cv_motif_version_2_1=yes
12238else
b0448899 12239 echo "$as_me: failed program was:" >&5
19650fd6
AS
12240sed 's/^/| /' conftest.$ac_ext >&5
12241
ca81d7a0 12242 emacs_cv_motif_version_2_1=no
98418dba 12243fi
ca81d7a0
JD
12244
12245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12246fi
b0448899
CY
12247{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12248echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12249 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12250 if test $emacs_cv_motif_version_2_1 = yes; then
12251 HAVE_LIBXP=no
b936fae4 12252
c0d27fcc 12253cat >>confdefs.h <<\_ACEOF
98418dba 12254#define HAVE_MOTIF_2_1 1
c0d27fcc 12255_ACEOF
98418dba 12256
b0448899
CY
12257 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12258echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba 12259if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
b0448899 12260 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12261else
12262 ac_check_lib_save_LIBS=$LIBS
12263LIBS="-lXp $LIBS"
12264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12265/* confdefs.h. */
12266_ACEOF
12267cat confdefs.h >>conftest.$ac_ext
12268cat >>conftest.$ac_ext <<_ACEOF
12269/* end confdefs.h. */
98418dba 12270
ca81d7a0
JD
12271/* Override any GCC internal prototype to avoid an error.
12272 Use char because int might match the return type of a GCC
12273 builtin and then its argument prototype would still apply. */
98418dba
CW
12274#ifdef __cplusplus
12275extern "C"
12276#endif
98418dba 12277char XpCreateContext ();
98418dba
CW
12278int
12279main ()
12280{
ca81d7a0 12281return XpCreateContext ();
98418dba
CW
12282 ;
12283 return 0;
12284}
12285_ACEOF
12286rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12287if { (ac_try="$ac_link"
12288case "(($ac_try" in
12289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12290 *) ac_try_echo=$ac_try;;
12291esac
b0448899 12292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12293 (eval "$ac_link") 2>conftest.er1
98418dba 12294 ac_status=$?
edfaf76d
LK
12295 grep -v '^ *+' conftest.er1 >conftest.err
12296 rm -f conftest.er1
12297 cat conftest.err >&5
b0448899 12298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12299 (exit $ac_status); } && {
12300 test -z "$ac_c_werror_flag" ||
12301 test ! -s conftest.err
b0448899
CY
12302 } && test -s conftest$ac_exeext &&
12303 $as_test_x conftest$ac_exeext; then
98418dba
CW
12304 ac_cv_lib_Xp_XpCreateContext=yes
12305else
b0448899 12306 echo "$as_me: failed program was:" >&5
19650fd6
AS
12307sed 's/^/| /' conftest.$ac_ext >&5
12308
ca81d7a0 12309 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12310fi
ca81d7a0 12311
f053c89f 12312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12313 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12314LIBS=$ac_check_lib_save_LIBS
12315fi
b0448899
CY
12316{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12317echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
12318if test $ac_cv_lib_Xp_XpCreateContext = yes; then
98418dba
CW
12319 HAVE_LIBXP=yes
12320fi
503d2be0 12321
98418dba 12322 if test ${HAVE_LIBXP} = yes; then
b936fae4 12323
c0d27fcc 12324cat >>confdefs.h <<\_ACEOF
98418dba 12325#define HAVE_LIBXP 1
c0d27fcc 12326_ACEOF
503d2be0 12327
98418dba 12328 fi
4693dbc9 12329 else
b0448899
CY
12330 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12331echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9 12332if test "${emacs_cv_lesstif+set}" = set; then
b0448899 12333 echo $ECHO_N "(cached) $ECHO_C" >&6
4693dbc9
SM
12334else
12335 # We put this in CFLAGS temporarily to precede other -I options
12336 # that might be in CFLAGS temporarily.
12337 # We put this in CPPFLAGS where it precedes the other -I options.
12338 OLD_CPPFLAGS=$CPPFLAGS
12339 OLD_CFLAGS=$CFLAGS
12340 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12341 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12342 cat >conftest.$ac_ext <<_ACEOF
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
12348#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12349int
12350main ()
12351{
12352int x = 5;
12353 ;
12354 return 0;
12355}
12356_ACEOF
12357rm -f conftest.$ac_objext
ca81d7a0
JD
12358if { (ac_try="$ac_compile"
12359case "(($ac_try" in
12360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12361 *) ac_try_echo=$ac_try;;
12362esac
b0448899 12363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12364 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12365 ac_status=$?
edfaf76d
LK
12366 grep -v '^ *+' conftest.er1 >conftest.err
12367 rm -f conftest.er1
12368 cat conftest.err >&5
b0448899 12369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12370 (exit $ac_status); } && {
12371 test -z "$ac_c_werror_flag" ||
12372 test ! -s conftest.err
12373 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12374 emacs_cv_lesstif=yes
12375else
b0448899 12376 echo "$as_me: failed program was:" >&5
4693dbc9
SM
12377sed 's/^/| /' conftest.$ac_ext >&5
12378
ca81d7a0 12379 emacs_cv_lesstif=no
4693dbc9 12380fi
ca81d7a0
JD
12381
12382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12383fi
b0448899
CY
12384{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12385echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12386 if test $emacs_cv_lesstif = yes; then
12387 # Make sure this -I option remains in CPPFLAGS after it is set
12388 # back to REAL_CPPFLAGS.
12389 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12390 # have those other -I options anyway. Ultimately, having this
12391 # directory ultimately in CPPFLAGS will be enough.
12392 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12393 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12394 else
12395 CFLAGS=$OLD_CFLAGS
12396 CPPFLAGS=$OLD_CPPFLAGS
12397 fi
98418dba
CW
12398 fi
12399fi
12400
c0d27fcc
MR
12401
12402
98418dba
CW
12403USE_TOOLKIT_SCROLL_BARS=no
12404if test "${with_toolkit_scroll_bars}" != "no"; then
12405 if test "${USE_X_TOOLKIT}" != "none"; then
12406 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12407 cat >>confdefs.h <<\_ACEOF
98418dba 12408#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12409_ACEOF
98418dba
CW
12410
12411 HAVE_XAW3D=no
12412 USE_TOOLKIT_SCROLL_BARS=yes
12413 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12414 cat >>confdefs.h <<\_ACEOF
98418dba 12415#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12416_ACEOF
98418dba
CW
12417
12418 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12419 fi
488dd4c4
JD
12420 elif test "${HAVE_GTK}" = "yes"; then
12421 cat >>confdefs.h <<\_ACEOF
12422#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12423_ACEOF
12424
12425 USE_TOOLKIT_SCROLL_BARS=yes
12426 elif test "${HAVE_NS}" = "yes"; then
12427 cat >>confdefs.h <<\_ACEOF
12428#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12429_ACEOF
12430
12431 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12432 fi
12433fi
12434
abd39b57 12435cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12436/* confdefs.h. */
12437_ACEOF
12438cat confdefs.h >>conftest.$ac_ext
12439cat >>conftest.$ac_ext <<_ACEOF
12440/* end confdefs.h. */
12441
12442 #include <X11/Xlib.h>
12443 #include <X11/Xresource.h>
12444int
12445main ()
12446{
12447XIMProc callback;
12448 ;
12449 return 0;
12450}
12451_ACEOF
12452rm -f conftest.$ac_objext
ca81d7a0
JD
12453if { (ac_try="$ac_compile"
12454case "(($ac_try" in
12455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12456 *) ac_try_echo=$ac_try;;
12457esac
b0448899 12458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12459 (eval "$ac_compile") 2>conftest.er1
abd39b57 12460 ac_status=$?
edfaf76d
LK
12461 grep -v '^ *+' conftest.er1 >conftest.err
12462 rm -f conftest.er1
12463 cat conftest.err >&5
b0448899 12464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12465 (exit $ac_status); } && {
12466 test -z "$ac_c_werror_flag" ||
12467 test ! -s conftest.err
12468 } && test -s conftest.$ac_objext; then
abd39b57
AC
12469 HAVE_XIM=yes
12470
12471cat >>confdefs.h <<\_ACEOF
12472#define HAVE_XIM 1
12473_ACEOF
12474
12475else
b0448899 12476 echo "$as_me: failed program was:" >&5
abd39b57
AC
12477sed 's/^/| /' conftest.$ac_ext >&5
12478
ca81d7a0 12479 HAVE_XIM=no
abd39b57 12480fi
ca81d7a0
JD
12481
12482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12483
c0d27fcc 12484
98418dba 12485if test "${with_xim}" != "no"; then
b936fae4 12486
c0d27fcc 12487cat >>confdefs.h <<\_ACEOF
98418dba 12488#define USE_XIM 1
c0d27fcc 12489_ACEOF
98418dba 12490
793fa0d7 12491fi
abd39b57
AC
12492
12493
12494if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12495 late_CFLAGS=$CFLAGS
12496 if test "$GCC" = yes; then
12497 CFLAGS="$CFLAGS --pedantic-errors"
12498 fi
cffcede7 12499 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12500/* confdefs.h. */
12501_ACEOF
12502cat confdefs.h >>conftest.$ac_ext
12503cat >>conftest.$ac_ext <<_ACEOF
12504/* end confdefs.h. */
cffcede7
JD
12505
12506#include <X11/Xlib.h>
12507#include <X11/Xresource.h>
12508int
12509main ()
12510{
12511Display *display;
12512XrmDatabase db;
12513char *res_name;
12514char *res_class;
12515XIMProc callback;
12516XPointer *client_data;
849d80cf
DL
12517#ifndef __GNUC__
12518/* If we're not using GCC, it's probably not XFree86, and this is
12519 probably right, but we can't use something like --pedantic-errors. */
12520extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12521 char*, XIMProc, XPointer*);
12522#endif
cffcede7
JD
12523(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12524 client_data);
12525 ;
12526 return 0;
12527}
12528_ACEOF
12529rm -f conftest.$ac_objext
ca81d7a0
JD
12530if { (ac_try="$ac_compile"
12531case "(($ac_try" in
12532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12533 *) ac_try_echo=$ac_try;;
12534esac
b0448899 12535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12536 (eval "$ac_compile") 2>conftest.er1
cffcede7 12537 ac_status=$?
edfaf76d
LK
12538 grep -v '^ *+' conftest.er1 >conftest.err
12539 rm -f conftest.er1
12540 cat conftest.err >&5
b0448899 12541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12542 (exit $ac_status); } && {
12543 test -z "$ac_c_werror_flag" ||
12544 test ! -s conftest.err
12545 } && test -s conftest.$ac_objext; then
cffcede7
JD
12546 emacs_cv_arg6_star=yes
12547else
b0448899 12548 echo "$as_me: failed program was:" >&5
19650fd6
AS
12549sed 's/^/| /' conftest.$ac_ext >&5
12550
ca81d7a0 12551
cffcede7 12552fi
ca81d7a0
JD
12553
12554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12555
12556 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12557 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12558#define XRegisterIMInstantiateCallback_arg6 XPointer*
12559_ACEOF
12560
12561 else
f57bd967 12562 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12563#define XRegisterIMInstantiateCallback_arg6 XPointer
12564_ACEOF
12565
12566 fi
849d80cf 12567 CFLAGS=$late_CFLAGS
45a4b03e
KH
12568fi
12569
02cfaff4
CY
12570### Start of font-backend (under any platform) section.
12571# (nothing here yet -- this is a placeholder)
12572### End of font-backend (under any platform) section.
12573
12574### Start of font-backend (under X11) section.
12575if test "${HAVE_X11}" = "yes"; then
45a4b03e 12576
44e5501c
GM
12577 succeeded=no
12578
12579 # Extract the first word of "pkg-config", so it can be a program name with args.
12580set dummy pkg-config; ac_word=$2
b0448899
CY
12581{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
44e5501c 12583if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 12584 echo $ECHO_N "(cached) $ECHO_C" >&6
44e5501c
GM
12585else
12586 case $PKG_CONFIG in
12587 [\\/]* | ?:[\\/]*)
12588 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12589 ;;
12590 *)
12591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12592for as_dir in $PATH
12593do
12594 IFS=$as_save_IFS
12595 test -z "$as_dir" && as_dir=.
12596 for ac_exec_ext in '' $ac_executable_extensions; do
12597 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12598 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 12599 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
44e5501c
GM
12600 break 2
12601 fi
12602done
12603done
12604IFS=$as_save_IFS
12605
12606 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12607 ;;
12608esac
12609fi
12610PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12611if test -n "$PKG_CONFIG"; then
b0448899
CY
12612 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12613echo "${ECHO_T}$PKG_CONFIG" >&6; }
44e5501c 12614else
b0448899
CY
12615 { echo "$as_me:$LINENO: result: no" >&5
12616echo "${ECHO_T}no" >&6; }
44e5501c
GM
12617fi
12618
12619
12620
12621 if test "$PKG_CONFIG" = "no" ; then
12622 HAVE_FC=no
12623 else
12624 PKG_CONFIG_MIN_VERSION=0.9.0
12625 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
12626 { echo "$as_me:$LINENO: checking for fontconfig >= 2.2.0" >&5
12627echo $ECHO_N "checking for fontconfig >= 2.2.0... $ECHO_C" >&6; }
44e5501c
GM
12628
12629 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
b0448899
CY
12630 { echo "$as_me:$LINENO: result: yes" >&5
12631echo "${ECHO_T}yes" >&6; }
44e5501c
GM
12632 succeeded=yes
12633
b0448899
CY
12634 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
12635echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
44e5501c 12636 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
b0448899
CY
12637 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
12638echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
44e5501c 12639
b0448899
CY
12640 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
12641echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
44e5501c 12642 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
b0448899
CY
12643 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
12644echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
44e5501c 12645 else
b0448899
CY
12646 { echo "$as_me:$LINENO: result: no" >&5
12647echo "${ECHO_T}no" >&6; }
44e5501c
GM
12648 FONTCONFIG_CFLAGS=""
12649 FONTCONFIG_LIBS=""
12650 ## If we have a custom action on failure, don't print errors, but
12651 ## do set a variable so people can do so.
12652 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
12653
12654 fi
12655
12656
12657
12658 else
12659 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12660 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12661 fi
12662 fi
12663
12664 if test $succeeded = yes; then
12665 HAVE_FC=yes
12666 else
12667 HAVE_FC=no
12668 fi
12669
02cfaff4 12670 test "${HAVE_FC}" = "no" && with_freetype=no
44e5501c 12671
b8bdd8c9 12672## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
02cfaff4
CY
12673 HAVE_XFT=maybe
12674 if test "x${with_freetype}" = "xno" || test "x${with_x}" = "xno"; then
12675 with_xft="no";
12676 fi
12677 if test "x${with_xft}" != "xno"; then
45a4b03e 12678
45a4b03e
KH
12679
12680 succeeded=no
12681
d235ca2f 12682 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12683set dummy pkg-config; ac_word=$2
b0448899
CY
12684{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12685echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e 12686if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 12687 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
12688else
12689 case $PKG_CONFIG in
12690 [\\/]* | ?:[\\/]*)
12691 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12692 ;;
12693 *)
12694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695for as_dir in $PATH
12696do
12697 IFS=$as_save_IFS
12698 test -z "$as_dir" && as_dir=.
12699 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12700 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e 12701 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 12702 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
45a4b03e
KH
12703 break 2
12704 fi
12705done
12706done
c24fa7dc 12707IFS=$as_save_IFS
45a4b03e
KH
12708
12709 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12710 ;;
12711esac
12712fi
12713PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12714if test -n "$PKG_CONFIG"; then
b0448899
CY
12715 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12716echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12717else
b0448899
CY
12718 { echo "$as_me:$LINENO: result: no" >&5
12719echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12720fi
12721
c24fa7dc 12722
45a4b03e
KH
12723
12724 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12725 HAVE_XFT=no
45a4b03e
KH
12726 else
12727 PKG_CONFIG_MIN_VERSION=0.9.0
12728 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
12729 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12730echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12731
c24fa7dc 12732 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
b0448899
CY
12733 { echo "$as_me:$LINENO: result: yes" >&5
12734echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12735 succeeded=yes
12736
b0448899
CY
12737 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12738echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12739 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
b0448899
CY
12740 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12741echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12742
b0448899
CY
12743 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12744echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12745 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
b0448899
CY
12746 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12747echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12748 else
b0448899
CY
12749 { echo "$as_me:$LINENO: result: no" >&5
12750echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12751 XFT_CFLAGS=""
12752 XFT_LIBS=""
12753 ## If we have a custom action on failure, don't print errors, but
12754 ## do set a variable so people can do so.
12755 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12756
12757 fi
12758
12759
12760
12761 else
12762 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12763 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12764 fi
12765 fi
12766
12767 if test $succeeded = yes; then
12768 :
12769 else
12770 HAVE_XFT=no
12771 fi
12772
02cfaff4
CY
12773 if test "$HAVE_XFT" != no; then
12774 OLD_CPPFLAGS="$CPPFLAGS"
12775 OLD_CFLAGS="$CFLAGS"
12776 OLD_LIBS="$LIBS"
12777 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12778 CFLAGS="$CFLAGS $XFT_CFLAGS"
12779 LIBS="$XFT_LIBS $LIBS"
12780 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
b0448899
CY
12781 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12782echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e 12783if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
b0448899 12784 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e 12785fi
b0448899
CY
12786{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12787echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12788else
12789 # Is the header compilable?
b0448899
CY
12790{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12791echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12792cat >conftest.$ac_ext <<_ACEOF
12793/* confdefs.h. */
12794_ACEOF
12795cat confdefs.h >>conftest.$ac_ext
12796cat >>conftest.$ac_ext <<_ACEOF
12797/* end confdefs.h. */
12798$ac_includes_default
12799#include <X11/Xft/Xft.h>
12800_ACEOF
12801rm -f conftest.$ac_objext
c24fa7dc
MB
12802if { (ac_try="$ac_compile"
12803case "(($ac_try" in
12804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12805 *) ac_try_echo=$ac_try;;
12806esac
b0448899 12807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
c24fa7dc 12808 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12809 ac_status=$?
12810 grep -v '^ *+' conftest.er1 >conftest.err
12811 rm -f conftest.er1
12812 cat conftest.err >&5
b0448899 12813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12814 (exit $ac_status); } && {
12815 test -z "$ac_c_werror_flag" ||
12816 test ! -s conftest.err
12817 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12818 ac_header_compiler=yes
12819else
b0448899 12820 echo "$as_me: failed program was:" >&5
45a4b03e
KH
12821sed 's/^/| /' conftest.$ac_ext >&5
12822
c24fa7dc 12823 ac_header_compiler=no
45a4b03e 12824fi
c24fa7dc
MB
12825
12826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
12827{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12828echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12829
12830# Is the header present?
b0448899
CY
12831{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12832echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12833cat >conftest.$ac_ext <<_ACEOF
12834/* confdefs.h. */
12835_ACEOF
12836cat confdefs.h >>conftest.$ac_ext
12837cat >>conftest.$ac_ext <<_ACEOF
12838/* end confdefs.h. */
12839#include <X11/Xft/Xft.h>
12840_ACEOF
c24fa7dc
MB
12841if { (ac_try="$ac_cpp conftest.$ac_ext"
12842case "(($ac_try" in
12843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12844 *) ac_try_echo=$ac_try;;
12845esac
b0448899 12846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
c24fa7dc 12847 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12848 ac_status=$?
12849 grep -v '^ *+' conftest.er1 >conftest.err
12850 rm -f conftest.er1
12851 cat conftest.err >&5
b0448899 12852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12853 (exit $ac_status); } >/dev/null && {
12854 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12855 test ! -s conftest.err
12856 }; then
45a4b03e
KH
12857 ac_header_preproc=yes
12858else
b0448899 12859 echo "$as_me: failed program was:" >&5
45a4b03e
KH
12860sed 's/^/| /' conftest.$ac_ext >&5
12861
12862 ac_header_preproc=no
12863fi
c24fa7dc 12864
45a4b03e 12865rm -f conftest.err conftest.$ac_ext
b0448899
CY
12866{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12867echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12868
12869# So? What about this header?
12870case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12871 yes:no: )
b0448899
CY
12872 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12873echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12874 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12875echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
45a4b03e
KH
12876 ac_header_preproc=yes
12877 ;;
12878 no:yes:* )
b0448899
CY
12879 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12880echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12881 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12882echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12883 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12884echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12885 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12886echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12887 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12888echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12889 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12890echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12891
45a4b03e
KH
12892 ;;
12893esac
b0448899
CY
12894{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12895echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e 12896if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
b0448899 12897 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
12898else
12899 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12900fi
b0448899
CY
12901{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12902echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12903
12904fi
b0448899
CY
12905if test $ac_cv_header_X11_Xft_Xft_h = yes; then
12906 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12907echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e 12908if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
b0448899 12909 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
12910else
12911 ac_check_lib_save_LIBS=$LIBS
12912LIBS="-lXft $XFT_LIBS $LIBS"
12913cat >conftest.$ac_ext <<_ACEOF
12914/* confdefs.h. */
12915_ACEOF
12916cat confdefs.h >>conftest.$ac_ext
12917cat >>conftest.$ac_ext <<_ACEOF
12918/* end confdefs.h. */
12919
c24fa7dc
MB
12920/* Override any GCC internal prototype to avoid an error.
12921 Use char because int might match the return type of a GCC
12922 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12923#ifdef __cplusplus
12924extern "C"
12925#endif
45a4b03e
KH
12926char XftFontOpen ();
12927int
12928main ()
12929{
c24fa7dc 12930return XftFontOpen ();
45a4b03e
KH
12931 ;
12932 return 0;
12933}
12934_ACEOF
12935rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12936if { (ac_try="$ac_link"
12937case "(($ac_try" in
12938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12939 *) ac_try_echo=$ac_try;;
12940esac
b0448899 12941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
c24fa7dc 12942 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12943 ac_status=$?
12944 grep -v '^ *+' conftest.er1 >conftest.err
12945 rm -f conftest.er1
12946 cat conftest.err >&5
b0448899 12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12948 (exit $ac_status); } && {
12949 test -z "$ac_c_werror_flag" ||
12950 test ! -s conftest.err
b0448899
CY
12951 } && test -s conftest$ac_exeext &&
12952 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12953 ac_cv_lib_Xft_XftFontOpen=yes
12954else
b0448899 12955 echo "$as_me: failed program was:" >&5
45a4b03e
KH
12956sed 's/^/| /' conftest.$ac_ext >&5
12957
c24fa7dc 12958 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12959fi
c24fa7dc
MB
12960
12961rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12962 conftest$ac_exeext conftest.$ac_ext
12963LIBS=$ac_check_lib_save_LIBS
12964fi
b0448899
CY
12965{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12966echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
12967if test $ac_cv_lib_Xft_XftFontOpen = yes; then
45a4b03e
KH
12968 HAVE_XFT=yes
12969fi
12970
12971fi
12972
12973
12974
02cfaff4 12975 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12976
12977cat >>confdefs.h <<\_ACEOF
12978#define HAVE_XFT 1
12979_ACEOF
12980
12981
02cfaff4
CY
12982 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12983 else
12984 CPPFLAGS="$OLD_CPPFLAGS"
12985 CFLAGS="$OLD_CFLAGS"
12986 LIBS="$OLD_LIBS"
12987 fi # "${HAVE_XFT}" = "yes"
12988 fi # "$HAVE_XFT" != no
12989 fi # "x${with_xft}" != "xno"
12990
12991 if test "$HAVE_XFT" != "yes"; then
12992 HAVE_XFT=no
12993 fi
45a4b03e 12994
b8bdd8c9 12995
02cfaff4
CY
12996 HAVE_FREETYPE=no
12997 ### Use -lfreetype if available, unless `--with-freetype=no'.
12998 if test "${HAVE_XFT}" = "yes"; then
12999 HAVE_FREETYPE=yes
13000 FONTCONFIG_CFLAGS=
13001 FONTCONFIG_LIBS=
13002 elif test "x${with_freetype}" != "xno" && test "x${with_x}" != "xno"; then
45a4b03e 13003
d235ca2f 13004
45a4b03e
KH
13005 succeeded=no
13006
d235ca2f 13007 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13008set dummy pkg-config; ac_word=$2
b0448899
CY
13009{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13010echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e 13011if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 13012 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
13013else
13014 case $PKG_CONFIG in
13015 [\\/]* | ?:[\\/]*)
13016 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13017 ;;
13018 *)
13019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13020for as_dir in $PATH
13021do
13022 IFS=$as_save_IFS
13023 test -z "$as_dir" && as_dir=.
13024 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e 13026 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 13027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
45a4b03e
KH
13028 break 2
13029 fi
13030done
13031done
c24fa7dc 13032IFS=$as_save_IFS
45a4b03e
KH
13033
13034 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13035 ;;
13036esac
13037fi
13038PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13039if test -n "$PKG_CONFIG"; then
b0448899
CY
13040 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13041echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13042else
b0448899
CY
13043 { echo "$as_me:$LINENO: result: no" >&5
13044echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13045fi
13046
c24fa7dc 13047
45a4b03e
KH
13048
13049 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13050 HAVE_FREETYPE=no
45a4b03e
KH
13051 else
13052 PKG_CONFIG_MIN_VERSION=0.9.0
13053 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
13054 { echo "$as_me:$LINENO: checking for freetype2" >&5
13055echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13056
c24fa7dc 13057 if $PKG_CONFIG --exists "freetype2" 2>&5; then
b0448899
CY
13058 { echo "$as_me:$LINENO: result: yes" >&5
13059echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13060 succeeded=yes
13061
b0448899
CY
13062 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13063echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13064 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
b0448899
CY
13065 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13066echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13067
b0448899
CY
13068 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13069echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13070 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
b0448899
CY
13071 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13072echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13073 else
b0448899
CY
13074 { echo "$as_me:$LINENO: result: no" >&5
13075echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13076 FREETYPE_CFLAGS=""
13077 FREETYPE_LIBS=""
13078 ## If we have a custom action on failure, don't print errors, but
13079 ## do set a variable so people can do so.
13080 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13081
13082 fi
13083
13084
13085
13086 else
13087 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13088 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13089 fi
13090 fi
13091
13092 if test $succeeded = yes; then
13093 HAVE_FREETYPE=yes
13094 else
13095 HAVE_FREETYPE=no
13096 fi
13097
02cfaff4 13098 fi
e70b2110 13099
02cfaff4
CY
13100 HAVE_LIBOTF=no
13101 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13102
13103cat >>confdefs.h <<\_ACEOF
13104#define HAVE_FREETYPE 1
13105_ACEOF
13106
02cfaff4 13107 if test "${with_libotf}" != "no"; then
e70b2110
KH
13108
13109 succeeded=no
13110
d235ca2f 13111 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13112set dummy pkg-config; ac_word=$2
b0448899
CY
13113{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13114echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13115if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 13116 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e 13117else
e70b2110
KH
13118 case $PKG_CONFIG in
13119 [\\/]* | ?:[\\/]*)
13120 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13121 ;;
13122 *)
13123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13124for as_dir in $PATH
13125do
13126 IFS=$as_save_IFS
13127 test -z "$as_dir" && as_dir=.
13128 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13129 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13130 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 13131 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
45a4b03e
KH
13132 break 2
13133 fi
13134done
13135done
c24fa7dc 13136IFS=$as_save_IFS
45a4b03e 13137
e70b2110
KH
13138 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13139 ;;
13140esac
45a4b03e 13141fi
e70b2110
KH
13142PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13143if test -n "$PKG_CONFIG"; then
b0448899
CY
13144 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13145echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13146else
b0448899
CY
13147 { echo "$as_me:$LINENO: result: no" >&5
13148echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13149fi
13150
c24fa7dc 13151
45a4b03e 13152
e70b2110 13153 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13154 HAVE_LIBOTF=no
e70b2110
KH
13155 else
13156 PKG_CONFIG_MIN_VERSION=0.9.0
13157 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
13158 { echo "$as_me:$LINENO: checking for libotf" >&5
13159echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13160
e70b2110 13161 if $PKG_CONFIG --exists "libotf" 2>&5; then
b0448899
CY
13162 { echo "$as_me:$LINENO: result: yes" >&5
13163echo "${ECHO_T}yes" >&6; }
e70b2110 13164 succeeded=yes
6ed29d7b 13165
b0448899
CY
13166 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13167echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
e70b2110 13168 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
b0448899
CY
13169 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13170echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
e70b2110 13171
b0448899
CY
13172 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13173echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
e70b2110 13174 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
b0448899
CY
13175 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13176echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
e70b2110 13177 else
b0448899
CY
13178 { echo "$as_me:$LINENO: result: no" >&5
13179echo "${ECHO_T}no" >&6; }
e70b2110
KH
13180 LIBOTF_CFLAGS=""
13181 LIBOTF_LIBS=""
13182 ## If we have a custom action on failure, don't print errors, but
13183 ## do set a variable so people can do so.
13184 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13185
e70b2110 13186 fi
6ed29d7b 13187
6ed29d7b 13188
6ed29d7b 13189
e70b2110
KH
13190 else
13191 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13192 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13193 fi
13194 fi
13195
13196 if test $succeeded = yes; then
435f8bc5 13197 HAVE_LIBOTF=yes
e70b2110 13198 else
435f8bc5 13199 HAVE_LIBOTF=no
e70b2110
KH
13200 fi
13201
02cfaff4 13202 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13203
45a4b03e
KH
13204cat >>confdefs.h <<\_ACEOF
13205#define HAVE_LIBOTF 1
13206_ACEOF
13207
b0448899
CY
13208 { echo "$as_me:$LINENO: checking for OTF_get_variation_glyphs in -lotf" >&5
13209echo $ECHO_N "checking for OTF_get_variation_glyphs in -lotf... $ECHO_C" >&6; }
8bff6137 13210if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then
b0448899 13211 echo $ECHO_N "(cached) $ECHO_C" >&6
8bff6137
GM
13212else
13213 ac_check_lib_save_LIBS=$LIBS
13214LIBS="-lotf $LIBS"
13215cat >conftest.$ac_ext <<_ACEOF
13216/* confdefs.h. */
13217_ACEOF
13218cat confdefs.h >>conftest.$ac_ext
13219cat >>conftest.$ac_ext <<_ACEOF
13220/* end confdefs.h. */
13221
13222/* Override any GCC internal prototype to avoid an error.
13223 Use char because int might match the return type of a GCC
13224 builtin and then its argument prototype would still apply. */
13225#ifdef __cplusplus
13226extern "C"
13227#endif
13228char OTF_get_variation_glyphs ();
13229int
13230main ()
13231{
13232return OTF_get_variation_glyphs ();
13233 ;
13234 return 0;
13235}
13236_ACEOF
13237rm -f conftest.$ac_objext conftest$ac_exeext
13238if { (ac_try="$ac_link"
13239case "(($ac_try" in
13240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13241 *) ac_try_echo=$ac_try;;
13242esac
b0448899 13243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8bff6137
GM
13244 (eval "$ac_link") 2>conftest.er1
13245 ac_status=$?
13246 grep -v '^ *+' conftest.er1 >conftest.err
13247 rm -f conftest.er1
13248 cat conftest.err >&5
b0448899 13249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8bff6137
GM
13250 (exit $ac_status); } && {
13251 test -z "$ac_c_werror_flag" ||
13252 test ! -s conftest.err
b0448899
CY
13253 } && test -s conftest$ac_exeext &&
13254 $as_test_x conftest$ac_exeext; then
8bff6137
GM
13255 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13256else
b0448899 13257 echo "$as_me: failed program was:" >&5
8bff6137
GM
13258sed 's/^/| /' conftest.$ac_ext >&5
13259
13260 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13261fi
13262
13263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13264 conftest$ac_exeext conftest.$ac_ext
13265LIBS=$ac_check_lib_save_LIBS
13266fi
b0448899
CY
13267{ echo "$as_me:$LINENO: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13268echo "${ECHO_T}$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13269if test $ac_cv_lib_otf_OTF_get_variation_glyphs = yes; then
8bff6137
GM
13270 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13271else
13272 HAVE_OTF_GET_VARIATION_GLYPHS=no
13273fi
13274
02cfaff4 13275 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
8bff6137
GM
13276
13277cat >>confdefs.h <<\_ACEOF
13278#define HAVE_OTF_GET_VARIATION_GLYPHS 1
13279_ACEOF
13280
02cfaff4
CY
13281 fi
13282 fi
8bff6137 13283 fi
02cfaff4 13284 fi
45a4b03e 13285
02cfaff4
CY
13286 HAVE_M17N_FLT=no
13287 if test "${HAVE_LIBOTF}" = yes; then
13288 if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13289
13290 succeeded=no
13291
d235ca2f 13292 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba 13293set dummy pkg-config; ac_word=$2
b0448899
CY
13294{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7f0942ba 13296if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
b0448899 13297 echo $ECHO_N "(cached) $ECHO_C" >&6
7f0942ba
KH
13298else
13299 case $PKG_CONFIG in
13300 [\\/]* | ?:[\\/]*)
13301 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13302 ;;
13303 *)
13304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13305for as_dir in $PATH
13306do
13307 IFS=$as_save_IFS
13308 test -z "$as_dir" && as_dir=.
13309 for ac_exec_ext in '' $ac_executable_extensions; do
13310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13311 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b0448899 13312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7f0942ba
KH
13313 break 2
13314 fi
13315done
13316done
13317IFS=$as_save_IFS
13318
13319 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13320 ;;
13321esac
13322fi
13323PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13324if test -n "$PKG_CONFIG"; then
b0448899
CY
13325 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13326echo "${ECHO_T}$PKG_CONFIG" >&6; }
7f0942ba 13327else
b0448899
CY
13328 { echo "$as_me:$LINENO: result: no" >&5
13329echo "${ECHO_T}no" >&6; }
7f0942ba
KH
13330fi
13331
13332
7f0942ba
KH
13333
13334 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13335 HAVE_M17N_FLT=no
7f0942ba
KH
13336 else
13337 PKG_CONFIG_MIN_VERSION=0.9.0
13338 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b0448899
CY
13339 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13340echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
7f0942ba
KH
13341
13342 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
b0448899
CY
13343 { echo "$as_me:$LINENO: result: yes" >&5
13344echo "${ECHO_T}yes" >&6; }
7f0942ba
KH
13345 succeeded=yes
13346
b0448899
CY
13347 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13348echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
7f0942ba 13349 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
b0448899
CY
13350 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13351echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
7f0942ba 13352
b0448899
CY
13353 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13354echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
7f0942ba 13355 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
b0448899
CY
13356 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13357echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
7f0942ba 13358 else
b0448899
CY
13359 { echo "$as_me:$LINENO: result: no" >&5
13360echo "${ECHO_T}no" >&6; }
7f0942ba
KH
13361 M17N_FLT_CFLAGS=""
13362 M17N_FLT_LIBS=""
13363 ## If we have a custom action on failure, don't print errors, but
13364 ## do set a variable so people can do so.
13365 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13366
13367 fi
13368
13369
13370
13371 else
13372 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13373 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13374 fi
13375 fi
13376
13377 if test $succeeded = yes; then
435f8bc5 13378 HAVE_M17N_FLT=yes
7f0942ba 13379 else
435f8bc5 13380 HAVE_M17N_FLT=no
7f0942ba
KH
13381 fi
13382
02cfaff4 13383 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13384
13385cat >>confdefs.h <<\_ACEOF
13386#define HAVE_M17N_FLT 1
13387_ACEOF
13388
02cfaff4
CY
13389 fi
13390 fi
6b0262c1 13391 fi
02cfaff4
CY
13392else
13393 HAVE_XFT=no
13394 HAVE_FREETYPE=no
13395 HAVE_LIBOTF=no
13396 HAVE_M17N_FLT=no
b8bdd8c9 13397fi
02cfaff4 13398### End of font-backend (under X11) section.
e70b2110
KH
13399
13400
13401
13402
13403
13404
13405
7f0942ba
KH
13406
13407
7f0942ba 13408
98418dba
CW
13409### Use -lXpm if available, unless `--with-xpm=no'.
13410HAVE_XPM=no
13411if test "${HAVE_X11}" = "yes"; then
13412 if test "${with_xpm}" != "no"; then
c0d27fcc 13413 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
b0448899
CY
13414 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13415echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba 13416if test "${ac_cv_header_X11_xpm_h+set}" = set; then
b0448899 13417 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13418fi
b0448899
CY
13419{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13420echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13421else
c0d27fcc 13422 # Is the header compilable?
b0448899
CY
13423{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13424echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13425cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13426/* confdefs.h. */
13427_ACEOF
13428cat confdefs.h >>conftest.$ac_ext
13429cat >>conftest.$ac_ext <<_ACEOF
13430/* end confdefs.h. */
c0d27fcc
MR
13431$ac_includes_default
13432#include <X11/xpm.h>
13433_ACEOF
13434rm -f conftest.$ac_objext
4c34eeee
MB
13435if { (ac_try="$ac_compile"
13436case "(($ac_try" in
13437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13438 *) ac_try_echo=$ac_try;;
13439esac
b0448899 13440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4c34eeee 13441 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13442 ac_status=$?
edfaf76d
LK
13443 grep -v '^ *+' conftest.er1 >conftest.err
13444 rm -f conftest.er1
13445 cat conftest.err >&5
b0448899 13446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13447 (exit $ac_status); } && {
13448 test -z "$ac_c_werror_flag" ||
13449 test ! -s conftest.err
13450 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13451 ac_header_compiler=yes
13452else
b0448899 13453 echo "$as_me: failed program was:" >&5
19650fd6
AS
13454sed 's/^/| /' conftest.$ac_ext >&5
13455
4c34eeee 13456 ac_header_compiler=no
c0d27fcc 13457fi
4c34eeee
MB
13458
13459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
13460{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13461echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13462
13463# Is the header present?
b0448899
CY
13464{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13465echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13467/* confdefs.h. */
13468_ACEOF
13469cat confdefs.h >>conftest.$ac_ext
13470cat >>conftest.$ac_ext <<_ACEOF
13471/* end confdefs.h. */
98418dba
CW
13472#include <X11/xpm.h>
13473_ACEOF
4c34eeee
MB
13474if { (ac_try="$ac_cpp conftest.$ac_ext"
13475case "(($ac_try" in
13476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13477 *) ac_try_echo=$ac_try;;
13478esac
b0448899 13479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4c34eeee 13480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13481 ac_status=$?
6bae0ccf 13482 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13483 rm -f conftest.er1
13484 cat conftest.err >&5
b0448899 13485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13486 (exit $ac_status); } >/dev/null && {
13487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13488 test ! -s conftest.err
13489 }; then
c0d27fcc 13490 ac_header_preproc=yes
98418dba 13491else
b0448899 13492 echo "$as_me: failed program was:" >&5
19650fd6
AS
13493sed 's/^/| /' conftest.$ac_ext >&5
13494
c0d27fcc 13495 ac_header_preproc=no
98418dba 13496fi
4c34eeee 13497
98418dba 13498rm -f conftest.err conftest.$ac_ext
b0448899
CY
13499{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13500echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13501
13502# So? What about this header?
edfaf76d
LK
13503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13504 yes:no: )
b0448899
CY
13505 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13506echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13507 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13508echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
edfaf76d
LK
13509 ac_header_preproc=yes
13510 ;;
13511 no:yes:* )
b0448899
CY
13512 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13513echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13514 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13515echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13516 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13517echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13518 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13519echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
13520 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13521echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
13522 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13523echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13524
19650fd6 13525 ;;
c0d27fcc 13526esac
b0448899
CY
13527{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13528echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc 13529if test "${ac_cv_header_X11_xpm_h+set}" = set; then
b0448899 13530 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13531else
13532 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13533fi
b0448899
CY
13534{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13535echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13536
13537fi
b0448899
CY
13538if test $ac_cv_header_X11_xpm_h = yes; then
13539 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13540echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13541if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
b0448899 13542 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13543else
98418dba
CW
13544 ac_check_lib_save_LIBS=$LIBS
13545LIBS="-lXpm -lX11 $LIBS"
13546cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13547/* confdefs.h. */
13548_ACEOF
13549cat confdefs.h >>conftest.$ac_ext
13550cat >>conftest.$ac_ext <<_ACEOF
13551/* end confdefs.h. */
98418dba 13552
4c34eeee
MB
13553/* Override any GCC internal prototype to avoid an error.
13554 Use char because int might match the return type of a GCC
13555 builtin and then its argument prototype would still apply. */
503d2be0
AS
13556#ifdef __cplusplus
13557extern "C"
13558#endif
98418dba 13559char XpmReadFileToPixmap ();
503d2be0
AS
13560int
13561main ()
13562{
4c34eeee 13563return XpmReadFileToPixmap ();
503d2be0
AS
13564 ;
13565 return 0;
13566}
13567_ACEOF
13568rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13569if { (ac_try="$ac_link"
13570case "(($ac_try" in
13571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13572 *) ac_try_echo=$ac_try;;
13573esac
b0448899 13574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4c34eeee 13575 (eval "$ac_link") 2>conftest.er1
503d2be0 13576 ac_status=$?
edfaf76d
LK
13577 grep -v '^ *+' conftest.er1 >conftest.err
13578 rm -f conftest.er1
13579 cat conftest.err >&5
b0448899 13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13581 (exit $ac_status); } && {
13582 test -z "$ac_c_werror_flag" ||
13583 test ! -s conftest.err
b0448899
CY
13584 } && test -s conftest$ac_exeext &&
13585 $as_test_x conftest$ac_exeext; then
98418dba 13586 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0 13587else
b0448899 13588 echo "$as_me: failed program was:" >&5
19650fd6
AS
13589sed 's/^/| /' conftest.$ac_ext >&5
13590
4c34eeee 13591 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13592fi
4c34eeee
MB
13593
13594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13595 conftest$ac_exeext conftest.$ac_ext
98418dba 13596LIBS=$ac_check_lib_save_LIBS
503d2be0 13597fi
b0448899
CY
13598{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13599echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13600if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
98418dba 13601 HAVE_XPM=yes
ba4481b5
DL
13602fi
13603
98418dba
CW
13604fi
13605
c0d27fcc 13606
98418dba 13607 if test "${HAVE_XPM}" = "yes"; then
b0448899
CY
13608 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13609echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13610 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13611/* confdefs.h. */
13612_ACEOF
13613cat confdefs.h >>conftest.$ac_ext
13614cat >>conftest.$ac_ext <<_ACEOF
13615/* end confdefs.h. */
98418dba
CW
13616#include "X11/xpm.h"
13617#ifndef XpmReturnAllocPixels
13618no_return_alloc_pixels
503d2be0 13619#endif
ba4481b5 13620
98418dba
CW
13621_ACEOF
13622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13623 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13624 HAVE_XPM=no
13625else
13626 HAVE_XPM=yes
13627fi
13628rm -f conftest*
ba4481b5 13629
c0d27fcc 13630
98418dba 13631 if test "${HAVE_XPM}" = "yes"; then
b0448899
CY
13632 { echo "$as_me:$LINENO: result: yes" >&5
13633echo "${ECHO_T}yes" >&6; }
98418dba 13634 else
b0448899
CY
13635 { echo "$as_me:$LINENO: result: no" >&5
13636echo "${ECHO_T}no" >&6; }
98418dba
CW
13637 fi
13638 fi
13639 fi
13640
13641 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13642
c0d27fcc 13643cat >>confdefs.h <<\_ACEOF
98418dba 13644#define HAVE_XPM 1
c0d27fcc 13645_ACEOF
98418dba
CW
13646
13647 fi
13648fi
13649
13650### Use -ljpeg if available, unless `--with-jpeg=no'.
13651HAVE_JPEG=no
13652if test "${HAVE_X11}" = "yes"; then
13653 if test "${with_jpeg}" != "no"; then
c0d27fcc 13654 if test "${ac_cv_header_jerror_h+set}" = set; then
b0448899
CY
13655 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13656echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba 13657if test "${ac_cv_header_jerror_h+set}" = set; then
b0448899 13658 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13659fi
b0448899
CY
13660{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13661echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13662else
c0d27fcc 13663 # Is the header compilable?
b0448899
CY
13664{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13665echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13666cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
c0d27fcc
MR
13672$ac_includes_default
13673#include <jerror.h>
13674_ACEOF
13675rm -f conftest.$ac_objext
ca81d7a0
JD
13676if { (ac_try="$ac_compile"
13677case "(($ac_try" in
13678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13679 *) ac_try_echo=$ac_try;;
13680esac
b0448899 13681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13682 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13683 ac_status=$?
edfaf76d
LK
13684 grep -v '^ *+' conftest.er1 >conftest.err
13685 rm -f conftest.er1
13686 cat conftest.err >&5
b0448899 13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13688 (exit $ac_status); } && {
13689 test -z "$ac_c_werror_flag" ||
13690 test ! -s conftest.err
13691 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13692 ac_header_compiler=yes
13693else
b0448899 13694 echo "$as_me: failed program was:" >&5
19650fd6
AS
13695sed 's/^/| /' conftest.$ac_ext >&5
13696
ca81d7a0 13697 ac_header_compiler=no
c0d27fcc 13698fi
ca81d7a0
JD
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
13701{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13702echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13703
13704# Is the header present?
b0448899
CY
13705{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13706echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13707cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13708/* confdefs.h. */
13709_ACEOF
13710cat confdefs.h >>conftest.$ac_ext
13711cat >>conftest.$ac_ext <<_ACEOF
13712/* end confdefs.h. */
98418dba
CW
13713#include <jerror.h>
13714_ACEOF
ca81d7a0
JD
13715if { (ac_try="$ac_cpp conftest.$ac_ext"
13716case "(($ac_try" in
13717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13718 *) ac_try_echo=$ac_try;;
13719esac
b0448899 13720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13721 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13722 ac_status=$?
6bae0ccf 13723 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13724 rm -f conftest.er1
13725 cat conftest.err >&5
b0448899 13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13727 (exit $ac_status); } >/dev/null && {
13728 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13729 test ! -s conftest.err
13730 }; then
c0d27fcc 13731 ac_header_preproc=yes
ba4481b5 13732else
b0448899 13733 echo "$as_me: failed program was:" >&5
19650fd6
AS
13734sed 's/^/| /' conftest.$ac_ext >&5
13735
c0d27fcc 13736 ac_header_preproc=no
98418dba 13737fi
ca81d7a0 13738
98418dba 13739rm -f conftest.err conftest.$ac_ext
b0448899
CY
13740{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13741echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13742
13743# So? What about this header?
edfaf76d
LK
13744case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13745 yes:no: )
b0448899
CY
13746 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13747echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13748 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13749echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
edfaf76d 13750 ac_header_preproc=yes
19650fd6 13751 ;;
edfaf76d 13752 no:yes:* )
b0448899
CY
13753 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13754echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
13755 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13756echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13757 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13758echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13759 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13760echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
13761 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
13762echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
13763 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13764echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13765
19650fd6 13766 ;;
c0d27fcc 13767esac
b0448899
CY
13768{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13769echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc 13770if test "${ac_cv_header_jerror_h+set}" = set; then
b0448899 13771 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13772else
13773 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13774fi
b0448899
CY
13775{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13776echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13777
13778fi
b0448899
CY
13779if test $ac_cv_header_jerror_h = yes; then
13780 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13781echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13782if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
b0448899 13783 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13784else
98418dba
CW
13785 ac_check_lib_save_LIBS=$LIBS
13786LIBS="-ljpeg $LIBS"
13787cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13788/* confdefs.h. */
13789_ACEOF
13790cat confdefs.h >>conftest.$ac_ext
13791cat >>conftest.$ac_ext <<_ACEOF
13792/* end confdefs.h. */
98418dba 13793
ca81d7a0
JD
13794/* Override any GCC internal prototype to avoid an error.
13795 Use char because int might match the return type of a GCC
13796 builtin and then its argument prototype would still apply. */
98418dba
CW
13797#ifdef __cplusplus
13798extern "C"
13799#endif
98418dba 13800char jpeg_destroy_compress ();
503d2be0
AS
13801int
13802main ()
13803{
ca81d7a0 13804return jpeg_destroy_compress ();
503d2be0
AS
13805 ;
13806 return 0;
13807}
13808_ACEOF
13809rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13810if { (ac_try="$ac_link"
13811case "(($ac_try" in
13812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13813 *) ac_try_echo=$ac_try;;
13814esac
b0448899 13815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13816 (eval "$ac_link") 2>conftest.er1
503d2be0 13817 ac_status=$?
edfaf76d
LK
13818 grep -v '^ *+' conftest.er1 >conftest.err
13819 rm -f conftest.er1
13820 cat conftest.err >&5
b0448899 13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13822 (exit $ac_status); } && {
13823 test -z "$ac_c_werror_flag" ||
13824 test ! -s conftest.err
b0448899
CY
13825 } && test -s conftest$ac_exeext &&
13826 $as_test_x conftest$ac_exeext; then
98418dba 13827 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13828else
b0448899 13829 echo "$as_me: failed program was:" >&5
19650fd6
AS
13830sed 's/^/| /' conftest.$ac_ext >&5
13831
ca81d7a0 13832 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13833fi
ca81d7a0 13834
f053c89f 13835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13836 conftest$ac_exeext conftest.$ac_ext
98418dba 13837LIBS=$ac_check_lib_save_LIBS
ba4481b5 13838fi
b0448899
CY
13839{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13840echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13841if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
98418dba 13842 HAVE_JPEG=yes
ba4481b5 13843fi
98418dba 13844
ba4481b5 13845fi
98418dba 13846
c0d27fcc 13847
ba4481b5 13848 fi
ba4481b5 13849
c0d27fcc 13850
98418dba 13851 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13852 cat >>confdefs.h <<\_ACEOF
98418dba 13853#define HAVE_JPEG 1
c0d27fcc 13854_ACEOF
98418dba
CW
13855
13856 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13857/* confdefs.h. */
13858_ACEOF
13859cat confdefs.h >>conftest.$ac_ext
13860cat >>conftest.$ac_ext <<_ACEOF
13861/* end confdefs.h. */
22044edf 13862#include <jpeglib.h>
98418dba
CW
13863 version=JPEG_LIB_VERSION
13864
13865_ACEOF
13866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13867 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13868 cat >>confdefs.h <<\_ACEOF
98418dba 13869#define HAVE_JPEG 1
c0d27fcc 13870_ACEOF
ba4481b5 13871
98418dba 13872else
b0448899
CY
13873 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
13874echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
98418dba 13875 HAVE_JPEG=no
ba4481b5 13876fi
98418dba 13877rm -f conftest*
ba4481b5 13878
98418dba
CW
13879 fi
13880fi
503d2be0 13881
98418dba
CW
13882### Use -lpng if available, unless `--with-png=no'.
13883HAVE_PNG=no
13884if test "${HAVE_X11}" = "yes"; then
13885 if test "${with_png}" != "no"; then
f57bd967
DL
13886 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13887 # in /usr/include/libpng.
13888
13889
13890for ac_header in png.h libpng/png.h
13891do
b0448899 13892as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 13893if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
13894 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13895echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 13896if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 13897 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13898fi
b0448899
CY
13899ac_res=`eval echo '${'$as_ac_Header'}'`
13900 { echo "$as_me:$LINENO: result: $ac_res" >&5
13901echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13902else
c0d27fcc 13903 # Is the header compilable?
b0448899
CY
13904{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13905echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13906cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13907/* confdefs.h. */
13908_ACEOF
13909cat confdefs.h >>conftest.$ac_ext
13910cat >>conftest.$ac_ext <<_ACEOF
13911/* end confdefs.h. */
c0d27fcc 13912$ac_includes_default
f57bd967 13913#include <$ac_header>
c0d27fcc
MR
13914_ACEOF
13915rm -f conftest.$ac_objext
ca81d7a0
JD
13916if { (ac_try="$ac_compile"
13917case "(($ac_try" in
13918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13919 *) ac_try_echo=$ac_try;;
13920esac
b0448899 13921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13922 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13923 ac_status=$?
edfaf76d
LK
13924 grep -v '^ *+' conftest.er1 >conftest.err
13925 rm -f conftest.er1
13926 cat conftest.err >&5
b0448899 13927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13928 (exit $ac_status); } && {
13929 test -z "$ac_c_werror_flag" ||
13930 test ! -s conftest.err
13931 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13932 ac_header_compiler=yes
13933else
b0448899 13934 echo "$as_me: failed program was:" >&5
19650fd6
AS
13935sed 's/^/| /' conftest.$ac_ext >&5
13936
ca81d7a0 13937 ac_header_compiler=no
c0d27fcc 13938fi
ca81d7a0
JD
13939
13940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
13941{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13942echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13943
13944# Is the header present?
b0448899
CY
13945{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13946echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13947cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13948/* confdefs.h. */
13949_ACEOF
13950cat confdefs.h >>conftest.$ac_ext
13951cat >>conftest.$ac_ext <<_ACEOF
13952/* end confdefs.h. */
f57bd967 13953#include <$ac_header>
503d2be0 13954_ACEOF
ca81d7a0
JD
13955if { (ac_try="$ac_cpp conftest.$ac_ext"
13956case "(($ac_try" in
13957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13958 *) ac_try_echo=$ac_try;;
13959esac
b0448899 13960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13961 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13962 ac_status=$?
6bae0ccf 13963 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13964 rm -f conftest.er1
13965 cat conftest.err >&5
b0448899 13966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13967 (exit $ac_status); } >/dev/null && {
13968 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13969 test ! -s conftest.err
13970 }; then
c0d27fcc 13971 ac_header_preproc=yes
503d2be0 13972else
b0448899 13973 echo "$as_me: failed program was:" >&5
19650fd6
AS
13974sed 's/^/| /' conftest.$ac_ext >&5
13975
c0d27fcc 13976 ac_header_preproc=no
ba4481b5 13977fi
ca81d7a0 13978
503d2be0 13979rm -f conftest.err conftest.$ac_ext
b0448899
CY
13980{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13981echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13982
13983# So? What about this header?
edfaf76d
LK
13984case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13985 yes:no: )
b0448899
CY
13986 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13987echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13988 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13989echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 13990 ac_header_preproc=yes
19650fd6 13991 ;;
edfaf76d 13992 no:yes:* )
b0448899
CY
13993 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13994echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13995 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13996echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13997 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13998echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13999 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14000echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14001 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14002echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14003 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14004echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14005
19650fd6 14006 ;;
c0d27fcc 14007esac
b0448899
CY
14008{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14009echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 14010if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 14011 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14012else
edfaf76d 14013 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 14014fi
b0448899
CY
14015ac_res=`eval echo '${'$as_ac_Header'}'`
14016 { echo "$as_me:$LINENO: result: $ac_res" >&5
14017echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14018
ba4481b5 14019fi
b0448899 14020if test `eval echo '${'$as_ac_Header'}'` = yes; then
f57bd967 14021 cat >>confdefs.h <<_ACEOF
b0448899 14022#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
f57bd967 14023_ACEOF
c0d27fcc
MR
14024
14025fi
f57bd967
DL
14026
14027done
14028
14029 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
b0448899
CY
14030 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14031echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14032if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
b0448899 14033 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14034else
98418dba
CW
14035 ac_check_lib_save_LIBS=$LIBS
14036LIBS="-lpng -lz -lm $LIBS"
14037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14038/* confdefs.h. */
14039_ACEOF
14040cat confdefs.h >>conftest.$ac_ext
14041cat >>conftest.$ac_ext <<_ACEOF
14042/* end confdefs.h. */
98418dba 14043
ca81d7a0
JD
14044/* Override any GCC internal prototype to avoid an error.
14045 Use char because int might match the return type of a GCC
14046 builtin and then its argument prototype would still apply. */
503d2be0
AS
14047#ifdef __cplusplus
14048extern "C"
14049#endif
98418dba 14050char png_get_channels ();
503d2be0
AS
14051int
14052main ()
14053{
ca81d7a0 14054return png_get_channels ();
503d2be0
AS
14055 ;
14056 return 0;
14057}
14058_ACEOF
14059rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14060if { (ac_try="$ac_link"
14061case "(($ac_try" in
14062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14063 *) ac_try_echo=$ac_try;;
14064esac
b0448899 14065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14066 (eval "$ac_link") 2>conftest.er1
503d2be0 14067 ac_status=$?
edfaf76d
LK
14068 grep -v '^ *+' conftest.er1 >conftest.err
14069 rm -f conftest.er1
14070 cat conftest.err >&5
b0448899 14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14072 (exit $ac_status); } && {
14073 test -z "$ac_c_werror_flag" ||
14074 test ! -s conftest.err
b0448899
CY
14075 } && test -s conftest$ac_exeext &&
14076 $as_test_x conftest$ac_exeext; then
98418dba 14077 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14078else
b0448899 14079 echo "$as_me: failed program was:" >&5
19650fd6
AS
14080sed 's/^/| /' conftest.$ac_ext >&5
14081
ca81d7a0 14082 ac_cv_lib_png_png_get_channels=no
73b77ee5 14083fi
ca81d7a0 14084
f053c89f 14085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14086 conftest$ac_exeext conftest.$ac_ext
98418dba 14087LIBS=$ac_check_lib_save_LIBS
73b77ee5 14088fi
b0448899
CY
14089{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14090echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
14091if test $ac_cv_lib_png_png_get_channels = yes; then
98418dba 14092 HAVE_PNG=yes
73b77ee5 14093fi
503d2be0 14094
f57bd967 14095 fi
98418dba
CW
14096 fi
14097
14098 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14099
c0d27fcc 14100cat >>confdefs.h <<\_ACEOF
98418dba 14101#define HAVE_PNG 1
c0d27fcc 14102_ACEOF
73b77ee5 14103
98418dba 14104 fi
73b77ee5
GM
14105fi
14106
98418dba
CW
14107### Use -ltiff if available, unless `--with-tiff=no'.
14108HAVE_TIFF=no
14109if test "${HAVE_X11}" = "yes"; then
14110 if test "${with_tiff}" != "no"; then
c0d27fcc 14111 if test "${ac_cv_header_tiffio_h+set}" = set; then
b0448899
CY
14112 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14113echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba 14114if test "${ac_cv_header_tiffio_h+set}" = set; then
b0448899 14115 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14116fi
b0448899
CY
14117{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14118echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14119else
c0d27fcc 14120 # Is the header compilable?
b0448899
CY
14121{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14122echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14124/* confdefs.h. */
14125_ACEOF
14126cat confdefs.h >>conftest.$ac_ext
14127cat >>conftest.$ac_ext <<_ACEOF
14128/* end confdefs.h. */
c0d27fcc
MR
14129$ac_includes_default
14130#include <tiffio.h>
14131_ACEOF
14132rm -f conftest.$ac_objext
ca81d7a0
JD
14133if { (ac_try="$ac_compile"
14134case "(($ac_try" in
14135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14136 *) ac_try_echo=$ac_try;;
14137esac
b0448899 14138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14139 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14140 ac_status=$?
edfaf76d
LK
14141 grep -v '^ *+' conftest.er1 >conftest.err
14142 rm -f conftest.er1
14143 cat conftest.err >&5
b0448899 14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14145 (exit $ac_status); } && {
14146 test -z "$ac_c_werror_flag" ||
14147 test ! -s conftest.err
14148 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14149 ac_header_compiler=yes
14150else
b0448899 14151 echo "$as_me: failed program was:" >&5
19650fd6
AS
14152sed 's/^/| /' conftest.$ac_ext >&5
14153
ca81d7a0 14154 ac_header_compiler=no
c0d27fcc 14155fi
ca81d7a0
JD
14156
14157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
14158{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14159echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14160
14161# Is the header present?
b0448899
CY
14162{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14163echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14164cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14165/* confdefs.h. */
14166_ACEOF
14167cat confdefs.h >>conftest.$ac_ext
14168cat >>conftest.$ac_ext <<_ACEOF
14169/* end confdefs.h. */
98418dba
CW
14170#include <tiffio.h>
14171_ACEOF
ca81d7a0
JD
14172if { (ac_try="$ac_cpp conftest.$ac_ext"
14173case "(($ac_try" in
14174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14175 *) ac_try_echo=$ac_try;;
14176esac
b0448899 14177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14178 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14179 ac_status=$?
6bae0ccf 14180 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14181 rm -f conftest.er1
14182 cat conftest.err >&5
b0448899 14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14184 (exit $ac_status); } >/dev/null && {
14185 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14186 test ! -s conftest.err
14187 }; then
c0d27fcc 14188 ac_header_preproc=yes
98418dba 14189else
b0448899 14190 echo "$as_me: failed program was:" >&5
19650fd6
AS
14191sed 's/^/| /' conftest.$ac_ext >&5
14192
c0d27fcc 14193 ac_header_preproc=no
98418dba 14194fi
ca81d7a0 14195
98418dba 14196rm -f conftest.err conftest.$ac_ext
b0448899
CY
14197{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14198echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14199
14200# So? What about this header?
edfaf76d
LK
14201case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14202 yes:no: )
b0448899
CY
14203 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14204echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14205 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14206echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
edfaf76d 14207 ac_header_preproc=yes
19650fd6 14208 ;;
edfaf76d 14209 no:yes:* )
b0448899
CY
14210 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14211echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
14212 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14213echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14214 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14215echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14216 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14217echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
14218 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
14219echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
14220 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14221echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14222
19650fd6 14223 ;;
c0d27fcc 14224esac
b0448899
CY
14225{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14226echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc 14227if test "${ac_cv_header_tiffio_h+set}" = set; then
b0448899 14228 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14229else
14230 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14231fi
b0448899
CY
14232{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14233echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14234
14235fi
b0448899 14236if test $ac_cv_header_tiffio_h = yes; then
98418dba
CW
14237 tifflibs="-lz -lm"
14238 # At least one tiff package requires the jpeg library.
14239 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
b0448899
CY
14240 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14241echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14242if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
b0448899 14243 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14244else
503d2be0 14245 ac_check_lib_save_LIBS=$LIBS
98418dba 14246LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14247cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14248/* confdefs.h. */
14249_ACEOF
14250cat confdefs.h >>conftest.$ac_ext
14251cat >>conftest.$ac_ext <<_ACEOF
14252/* end confdefs.h. */
503d2be0 14253
ca81d7a0
JD
14254/* Override any GCC internal prototype to avoid an error.
14255 Use char because int might match the return type of a GCC
14256 builtin and then its argument prototype would still apply. */
503d2be0
AS
14257#ifdef __cplusplus
14258extern "C"
14259#endif
98418dba 14260char TIFFGetVersion ();
503d2be0
AS
14261int
14262main ()
14263{
ca81d7a0 14264return TIFFGetVersion ();
503d2be0
AS
14265 ;
14266 return 0;
14267}
14268_ACEOF
14269rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14270if { (ac_try="$ac_link"
14271case "(($ac_try" in
14272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14273 *) ac_try_echo=$ac_try;;
14274esac
b0448899 14275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14276 (eval "$ac_link") 2>conftest.er1
503d2be0 14277 ac_status=$?
edfaf76d
LK
14278 grep -v '^ *+' conftest.er1 >conftest.err
14279 rm -f conftest.er1
14280 cat conftest.err >&5
b0448899 14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14282 (exit $ac_status); } && {
14283 test -z "$ac_c_werror_flag" ||
14284 test ! -s conftest.err
b0448899
CY
14285 } && test -s conftest$ac_exeext &&
14286 $as_test_x conftest$ac_exeext; then
98418dba 14287 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0 14288else
b0448899 14289 echo "$as_me: failed program was:" >&5
19650fd6
AS
14290sed 's/^/| /' conftest.$ac_ext >&5
14291
ca81d7a0 14292 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14293fi
ca81d7a0 14294
f053c89f 14295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14296 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14297LIBS=$ac_check_lib_save_LIBS
14298fi
b0448899
CY
14299{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14300echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
14301if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
98418dba
CW
14302 HAVE_TIFF=yes
14303fi
14304
14305fi
73b77ee5 14306
c0d27fcc 14307
98418dba
CW
14308 fi
14309
14310 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14311
c0d27fcc 14312cat >>confdefs.h <<\_ACEOF
98418dba 14313#define HAVE_TIFF 1
c0d27fcc 14314_ACEOF
98418dba
CW
14315
14316 fi
73b77ee5
GM
14317fi
14318
9aeb8aaa 14319### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14320HAVE_GIF=no
9aeb8aaa
GM
14321if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14322 if test "${ac_cv_header_gif_lib_h+set}" = set; then
b0448899
CY
14323 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14324echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba 14325if test "${ac_cv_header_gif_lib_h+set}" = set; then
b0448899 14326 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14327fi
b0448899
CY
14328{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14329echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14330else
c0d27fcc 14331 # Is the header compilable?
b0448899
CY
14332{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14333echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14334cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
c0d27fcc
MR
14340$ac_includes_default
14341#include <gif_lib.h>
14342_ACEOF
14343rm -f conftest.$ac_objext
ca81d7a0
JD
14344if { (ac_try="$ac_compile"
14345case "(($ac_try" in
14346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14347 *) ac_try_echo=$ac_try;;
14348esac
b0448899 14349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14350 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14351 ac_status=$?
edfaf76d
LK
14352 grep -v '^ *+' conftest.er1 >conftest.err
14353 rm -f conftest.er1
14354 cat conftest.err >&5
b0448899 14355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14356 (exit $ac_status); } && {
14357 test -z "$ac_c_werror_flag" ||
14358 test ! -s conftest.err
14359 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14360 ac_header_compiler=yes
14361else
b0448899 14362 echo "$as_me: failed program was:" >&5
19650fd6
AS
14363sed 's/^/| /' conftest.$ac_ext >&5
14364
ca81d7a0 14365 ac_header_compiler=no
c0d27fcc 14366fi
ca81d7a0
JD
14367
14368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
14369{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14370echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14371
14372# Is the header present?
b0448899
CY
14373{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14374echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14375cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14376/* confdefs.h. */
14377_ACEOF
14378cat confdefs.h >>conftest.$ac_ext
14379cat >>conftest.$ac_ext <<_ACEOF
14380/* end confdefs.h. */
98418dba
CW
14381#include <gif_lib.h>
14382_ACEOF
ca81d7a0
JD
14383if { (ac_try="$ac_cpp conftest.$ac_ext"
14384case "(($ac_try" in
14385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14386 *) ac_try_echo=$ac_try;;
14387esac
b0448899 14388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14390 ac_status=$?
6bae0ccf 14391 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14392 rm -f conftest.er1
14393 cat conftest.err >&5
b0448899 14394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14395 (exit $ac_status); } >/dev/null && {
14396 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14397 test ! -s conftest.err
14398 }; then
c0d27fcc 14399 ac_header_preproc=yes
98418dba 14400else
b0448899 14401 echo "$as_me: failed program was:" >&5
19650fd6
AS
14402sed 's/^/| /' conftest.$ac_ext >&5
14403
c0d27fcc 14404 ac_header_preproc=no
98418dba 14405fi
ca81d7a0 14406
98418dba 14407rm -f conftest.err conftest.$ac_ext
b0448899
CY
14408{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14409echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14410
14411# So? What about this header?
edfaf76d
LK
14412case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14413 yes:no: )
b0448899
CY
14414 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14415echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14416 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14417echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
edfaf76d 14418 ac_header_preproc=yes
19650fd6 14419 ;;
edfaf76d 14420 no:yes:* )
b0448899
CY
14421 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14422echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
14423 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14424echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14425 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14426echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14427 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14428echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
14429 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
14430echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
14431 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14432echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14433
19650fd6 14434 ;;
c0d27fcc 14435esac
b0448899
CY
14436{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14437echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc 14438if test "${ac_cv_header_gif_lib_h+set}" = set; then
b0448899 14439 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14440else
14441 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14442fi
b0448899
CY
14443{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14444echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14445
14446fi
b0448899 14447if test $ac_cv_header_gif_lib_h = yes; then
98418dba
CW
14448 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14449# Earlier versions can crash Emacs.
b0448899
CY
14450 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14451echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
63175cd2 14452if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
b0448899 14453 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14454else
503d2be0 14455 ac_check_lib_save_LIBS=$LIBS
63175cd2 14456LIBS="-lgif $LIBS"
503d2be0 14457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14458/* confdefs.h. */
14459_ACEOF
14460cat confdefs.h >>conftest.$ac_ext
14461cat >>conftest.$ac_ext <<_ACEOF
14462/* end confdefs.h. */
73b77ee5 14463
ca81d7a0
JD
14464/* Override any GCC internal prototype to avoid an error.
14465 Use char because int might match the return type of a GCC
14466 builtin and then its argument prototype would still apply. */
98418dba
CW
14467#ifdef __cplusplus
14468extern "C"
14469#endif
98418dba 14470char EGifPutExtensionLast ();
503d2be0
AS
14471int
14472main ()
14473{
ca81d7a0 14474return EGifPutExtensionLast ();
503d2be0
AS
14475 ;
14476 return 0;
14477}
14478_ACEOF
14479rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14480if { (ac_try="$ac_link"
14481case "(($ac_try" in
14482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14483 *) ac_try_echo=$ac_try;;
14484esac
b0448899 14485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14486 (eval "$ac_link") 2>conftest.er1
503d2be0 14487 ac_status=$?
edfaf76d
LK
14488 grep -v '^ *+' conftest.er1 >conftest.err
14489 rm -f conftest.er1
14490 cat conftest.err >&5
b0448899 14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14492 (exit $ac_status); } && {
14493 test -z "$ac_c_werror_flag" ||
14494 test ! -s conftest.err
b0448899
CY
14495 } && test -s conftest$ac_exeext &&
14496 $as_test_x conftest$ac_exeext; then
63175cd2 14497 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14498else
b0448899 14499 echo "$as_me: failed program was:" >&5
19650fd6
AS
14500sed 's/^/| /' conftest.$ac_ext >&5
14501
63175cd2 14502 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14503fi
ca81d7a0 14504
f053c89f 14505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14506 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14507LIBS=$ac_check_lib_save_LIBS
14508fi
b0448899
CY
14509{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14510echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14511if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14512 HAVE_GIF=yes
9aeb8aaa 14513else
63175cd2 14514 try_libungif=yes
98418dba
CW
14515fi
14516
14517fi
14518
c0d27fcc 14519
9aeb8aaa
GM
14520
14521 if test "$HAVE_GIF" = yes; then
63175cd2 14522 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14523 fi
14524
63175cd2
GM
14525# If gif_lib.h but no libgif, try libungif.
14526 if test x"$try_libungif" = xyes; then
b0448899
CY
14527 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14528echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
63175cd2 14529if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
b0448899 14530 echo $ECHO_N "(cached) $ECHO_C" >&6
9aeb8aaa
GM
14531else
14532 ac_check_lib_save_LIBS=$LIBS
63175cd2 14533LIBS="-lungif $LIBS"
9aeb8aaa
GM
14534cat >conftest.$ac_ext <<_ACEOF
14535/* confdefs.h. */
14536_ACEOF
14537cat confdefs.h >>conftest.$ac_ext
14538cat >>conftest.$ac_ext <<_ACEOF
14539/* end confdefs.h. */
14540
14541/* Override any GCC internal prototype to avoid an error.
14542 Use char because int might match the return type of a GCC
14543 builtin and then its argument prototype would still apply. */
14544#ifdef __cplusplus
14545extern "C"
14546#endif
14547char EGifPutExtensionLast ();
14548int
14549main ()
14550{
14551return EGifPutExtensionLast ();
14552 ;
14553 return 0;
14554}
14555_ACEOF
14556rm -f conftest.$ac_objext conftest$ac_exeext
14557if { (ac_try="$ac_link"
14558case "(($ac_try" in
14559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14560 *) ac_try_echo=$ac_try;;
14561esac
b0448899 14562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9aeb8aaa
GM
14563 (eval "$ac_link") 2>conftest.er1
14564 ac_status=$?
14565 grep -v '^ *+' conftest.er1 >conftest.err
14566 rm -f conftest.er1
14567 cat conftest.err >&5
b0448899 14568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9aeb8aaa
GM
14569 (exit $ac_status); } && {
14570 test -z "$ac_c_werror_flag" ||
14571 test ! -s conftest.err
b0448899
CY
14572 } && test -s conftest$ac_exeext &&
14573 $as_test_x conftest$ac_exeext; then
63175cd2 14574 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa 14575else
b0448899 14576 echo "$as_me: failed program was:" >&5
9aeb8aaa
GM
14577sed 's/^/| /' conftest.$ac_ext >&5
14578
63175cd2 14579 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14580fi
14581
9aeb8aaa
GM
14582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14583 conftest$ac_exeext conftest.$ac_ext
14584LIBS=$ac_check_lib_save_LIBS
14585fi
b0448899
CY
14586{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14587echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14588if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14589 HAVE_GIF=yes
98418dba
CW
14590fi
14591
c0d27fcc 14592
9aeb8aaa
GM
14593 if test "$HAVE_GIF" = yes; then
14594
14595cat >>confdefs.h <<\_ACEOF
63175cd2 14596#define LIBGIF -lungif
9aeb8aaa
GM
14597_ACEOF
14598
63175cd2 14599 ac_gif_lib_name="-lungif"
9aeb8aaa 14600 fi
98418dba
CW
14601 fi
14602
14603 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14604
c0d27fcc 14605cat >>confdefs.h <<\_ACEOF
98418dba 14606#define HAVE_GIF 1
c0d27fcc 14607_ACEOF
98418dba
CW
14608
14609 fi
14610fi
14611
5afbeb22
JD
14612if test "${HAVE_X11}" = "yes"; then
14613 MISSING=""
14614 WITH_NO=""
14615 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14616 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14617 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14618 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14619 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14620 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14621 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14622 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14623 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14624 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14625
14626 if test "X${MISSING}" != X; then
b0448899 14627 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14628 $MISSING
86e73516 14629Maybe some development libraries/packages are missing?
5afbeb22
JD
14630If you don't want to link with them give
14631 $WITH_NO
14632as options to configure" >&5
b0448899 14633echo "$as_me: error: The following required libraries were not found:
5afbeb22 14634 $MISSING
86e73516 14635Maybe some development libraries/packages are missing?
5afbeb22
JD
14636If you don't want to link with them give
14637 $WITH_NO
14638as options to configure" >&2;}
86e73516 14639 { (exit 1); exit 1; }; }
98418dba
CW
14640 fi
14641fi
14642
79011b82
NR
14643### Use -lgpm if available, unless `--with-gpm=no'.
14644HAVE_GPM=no
14645if test "${with_gpm}" != "no"; then
14646 if test "${ac_cv_header_gpm_h+set}" = set; then
b0448899
CY
14647 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14648echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
79011b82 14649if test "${ac_cv_header_gpm_h+set}" = set; then
b0448899 14650 echo $ECHO_N "(cached) $ECHO_C" >&6
79011b82 14651fi
b0448899
CY
14652{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14653echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
79011b82
NR
14654else
14655 # Is the header compilable?
b0448899
CY
14656{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14657echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
79011b82
NR
14658cat >conftest.$ac_ext <<_ACEOF
14659/* confdefs.h. */
14660_ACEOF
14661cat confdefs.h >>conftest.$ac_ext
14662cat >>conftest.$ac_ext <<_ACEOF
14663/* end confdefs.h. */
14664$ac_includes_default
14665#include <gpm.h>
14666_ACEOF
14667rm -f conftest.$ac_objext
14668if { (ac_try="$ac_compile"
14669case "(($ac_try" in
14670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14671 *) ac_try_echo=$ac_try;;
14672esac
b0448899 14673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79011b82
NR
14674 (eval "$ac_compile") 2>conftest.er1
14675 ac_status=$?
14676 grep -v '^ *+' conftest.er1 >conftest.err
14677 rm -f conftest.er1
14678 cat conftest.err >&5
b0448899 14679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79011b82
NR
14680 (exit $ac_status); } && {
14681 test -z "$ac_c_werror_flag" ||
14682 test ! -s conftest.err
14683 } && test -s conftest.$ac_objext; then
14684 ac_header_compiler=yes
14685else
b0448899 14686 echo "$as_me: failed program was:" >&5
79011b82
NR
14687sed 's/^/| /' conftest.$ac_ext >&5
14688
14689 ac_header_compiler=no
14690fi
14691
14692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
14693{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14694echo "${ECHO_T}$ac_header_compiler" >&6; }
79011b82
NR
14695
14696# Is the header present?
b0448899
CY
14697{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14698echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
79011b82
NR
14699cat >conftest.$ac_ext <<_ACEOF
14700/* confdefs.h. */
14701_ACEOF
14702cat confdefs.h >>conftest.$ac_ext
14703cat >>conftest.$ac_ext <<_ACEOF
14704/* end confdefs.h. */
14705#include <gpm.h>
14706_ACEOF
14707if { (ac_try="$ac_cpp conftest.$ac_ext"
14708case "(($ac_try" in
14709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14710 *) ac_try_echo=$ac_try;;
14711esac
b0448899 14712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79011b82
NR
14713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14714 ac_status=$?
14715 grep -v '^ *+' conftest.er1 >conftest.err
14716 rm -f conftest.er1
14717 cat conftest.err >&5
b0448899 14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79011b82
NR
14719 (exit $ac_status); } >/dev/null && {
14720 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14721 test ! -s conftest.err
14722 }; then
14723 ac_header_preproc=yes
14724else
b0448899 14725 echo "$as_me: failed program was:" >&5
79011b82
NR
14726sed 's/^/| /' conftest.$ac_ext >&5
14727
14728 ac_header_preproc=no
14729fi
14730
14731rm -f conftest.err conftest.$ac_ext
b0448899
CY
14732{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14733echo "${ECHO_T}$ac_header_preproc" >&6; }
79011b82
NR
14734
14735# So? What about this header?
14736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14737 yes:no: )
b0448899
CY
14738 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14739echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14740 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14741echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
79011b82
NR
14742 ac_header_preproc=yes
14743 ;;
14744 no:yes:* )
b0448899
CY
14745 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14746echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14747 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14748echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14749 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14750echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14751 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14752echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14753 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14754echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14755 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14756echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
79011b82
NR
14757
14758 ;;
14759esac
b0448899
CY
14760{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14761echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
79011b82 14762if test "${ac_cv_header_gpm_h+set}" = set; then
b0448899 14763 echo $ECHO_N "(cached) $ECHO_C" >&6
79011b82
NR
14764else
14765 ac_cv_header_gpm_h=$ac_header_preproc
14766fi
b0448899
CY
14767{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14768echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
79011b82
NR
14769
14770fi
b0448899
CY
14771if test $ac_cv_header_gpm_h = yes; then
14772 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14773echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
79011b82 14774if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
b0448899 14775 echo $ECHO_N "(cached) $ECHO_C" >&6
79011b82
NR
14776else
14777 ac_check_lib_save_LIBS=$LIBS
14778LIBS="-lgpm $LIBS"
14779cat >conftest.$ac_ext <<_ACEOF
14780/* confdefs.h. */
14781_ACEOF
14782cat confdefs.h >>conftest.$ac_ext
14783cat >>conftest.$ac_ext <<_ACEOF
14784/* end confdefs.h. */
14785
14786/* Override any GCC internal prototype to avoid an error.
14787 Use char because int might match the return type of a GCC
14788 builtin and then its argument prototype would still apply. */
14789#ifdef __cplusplus
14790extern "C"
14791#endif
14792char Gpm_Open ();
14793int
14794main ()
14795{
14796return Gpm_Open ();
14797 ;
14798 return 0;
14799}
14800_ACEOF
14801rm -f conftest.$ac_objext conftest$ac_exeext
14802if { (ac_try="$ac_link"
14803case "(($ac_try" in
14804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14805 *) ac_try_echo=$ac_try;;
14806esac
b0448899 14807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79011b82
NR
14808 (eval "$ac_link") 2>conftest.er1
14809 ac_status=$?
14810 grep -v '^ *+' conftest.er1 >conftest.err
14811 rm -f conftest.er1
14812 cat conftest.err >&5
b0448899 14813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79011b82
NR
14814 (exit $ac_status); } && {
14815 test -z "$ac_c_werror_flag" ||
14816 test ! -s conftest.err
b0448899
CY
14817 } && test -s conftest$ac_exeext &&
14818 $as_test_x conftest$ac_exeext; then
79011b82
NR
14819 ac_cv_lib_gpm_Gpm_Open=yes
14820else
b0448899 14821 echo "$as_me: failed program was:" >&5
79011b82
NR
14822sed 's/^/| /' conftest.$ac_ext >&5
14823
14824 ac_cv_lib_gpm_Gpm_Open=no
14825fi
14826
14827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14828 conftest$ac_exeext conftest.$ac_ext
14829LIBS=$ac_check_lib_save_LIBS
14830fi
b0448899
CY
14831{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14832echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14833if test $ac_cv_lib_gpm_Gpm_Open = yes; then
79011b82
NR
14834 HAVE_GPM=yes
14835fi
14836
14837fi
14838
14839
14840fi
14841
14842if test "${HAVE_GPM}" = "yes"; then
14843
14844cat >>confdefs.h <<\_ACEOF
14845#define HAVE_GPM 1
14846_ACEOF
14847
14848fi
14849
cef11da2 14850if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
b0448899
CY
14851 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14852echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2 14853if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
b0448899 14854 echo $ECHO_N "(cached) $ECHO_C" >&6
cef11da2 14855fi
b0448899
CY
14856{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14857echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14858else
14859 # Is the header compilable?
b0448899
CY
14860{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14861echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14862cat >conftest.$ac_ext <<_ACEOF
14863/* confdefs.h. */
14864_ACEOF
14865cat confdefs.h >>conftest.$ac_ext
14866cat >>conftest.$ac_ext <<_ACEOF
14867/* end confdefs.h. */
14868$ac_includes_default
14869#include <malloc/malloc.h>
14870_ACEOF
14871rm -f conftest.$ac_objext
ca81d7a0
JD
14872if { (ac_try="$ac_compile"
14873case "(($ac_try" in
14874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14875 *) ac_try_echo=$ac_try;;
14876esac
b0448899 14877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14878 (eval "$ac_compile") 2>conftest.er1
cef11da2 14879 ac_status=$?
edfaf76d
LK
14880 grep -v '^ *+' conftest.er1 >conftest.err
14881 rm -f conftest.er1
14882 cat conftest.err >&5
b0448899 14883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14884 (exit $ac_status); } && {
14885 test -z "$ac_c_werror_flag" ||
14886 test ! -s conftest.err
14887 } && test -s conftest.$ac_objext; then
cef11da2
ST
14888 ac_header_compiler=yes
14889else
b0448899 14890 echo "$as_me: failed program was:" >&5
cef11da2
ST
14891sed 's/^/| /' conftest.$ac_ext >&5
14892
ca81d7a0 14893 ac_header_compiler=no
cef11da2 14894fi
ca81d7a0
JD
14895
14896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
14897{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14898echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14899
14900# Is the header present?
b0448899
CY
14901{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14902echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14903cat >conftest.$ac_ext <<_ACEOF
14904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
14909#include <malloc/malloc.h>
14910_ACEOF
ca81d7a0
JD
14911if { (ac_try="$ac_cpp conftest.$ac_ext"
14912case "(($ac_try" in
14913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14914 *) ac_try_echo=$ac_try;;
14915esac
b0448899 14916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14917 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14918 ac_status=$?
14919 grep -v '^ *+' conftest.er1 >conftest.err
14920 rm -f conftest.er1
14921 cat conftest.err >&5
b0448899 14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14923 (exit $ac_status); } >/dev/null && {
14924 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14925 test ! -s conftest.err
14926 }; then
cef11da2
ST
14927 ac_header_preproc=yes
14928else
b0448899 14929 echo "$as_me: failed program was:" >&5
cef11da2
ST
14930sed 's/^/| /' conftest.$ac_ext >&5
14931
14932 ac_header_preproc=no
14933fi
ca81d7a0 14934
cef11da2 14935rm -f conftest.err conftest.$ac_ext
b0448899
CY
14936{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14937echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14938
14939# So? What about this header?
edfaf76d
LK
14940case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14941 yes:no: )
b0448899
CY
14942 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14943echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14944 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14945echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
edfaf76d 14946 ac_header_preproc=yes
cef11da2 14947 ;;
edfaf76d 14948 no:yes:* )
b0448899
CY
14949 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14950echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
14951 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14952echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14953 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14954echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14955 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14956echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
14957 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14958echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
14959 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14960echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14961
cef11da2
ST
14962 ;;
14963esac
b0448899
CY
14964{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14965echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2 14966if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
b0448899 14967 echo $ECHO_N "(cached) $ECHO_C" >&6
cef11da2
ST
14968else
14969 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14970fi
b0448899
CY
14971{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14972echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14973
7c9e5167 14974fi
b0448899 14975if test $ac_cv_header_malloc_malloc_h = yes; then
cef11da2
ST
14976
14977cat >>confdefs.h <<\_ACEOF
14978#define HAVE_MALLOC_MALLOC_H 1
14979_ACEOF
14980
7c9e5167
JD
14981fi
14982
cef11da2
ST
14983
14984
edfda783
AR
14985### Use NeXTstep API to implement GUI.
14986if test "${HAVE_NS}" = "yes"; then
14987
14988cat >>confdefs.h <<\_ACEOF
14989#define HAVE_NS 1
14990_ACEOF
14991
ff1095d1 14992 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
14993
14994cat >>confdefs.h <<\_ACEOF
14995#define NS_IMPL_COCOA 1
14996_ACEOF
14997
48fad8e8
DN
14998 GNU_OBJC_CFLAGS=
14999 LIB_SRC_EXTRA_INSTALLABLES=mac-fix-env
edfda783 15000 fi
ff1095d1 15001 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
15002
15003cat >>confdefs.h <<\_ACEOF
15004#define NS_IMPL_GNUSTEP 1
15005_ACEOF
15006
48fad8e8 15007 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
edfda783 15008 fi
d5e2f8fe 15009 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
519c4a9a
CY
15010
15011cat >>confdefs.h <<\_ACEOF
d5e2f8fe 15012#define NS_HAVE_NSINTEGER 1
519c4a9a
CY
15013_ACEOF
15014
177cd151
CY
15015 fi
15016 # We also have mouse menus.
edfda783
AR
15017 HAVE_MENUS=yes
15018fi
15019
e0f712ba 15020
98418dba
CW
15021### Use session management (-lSM -lICE) if available
15022HAVE_X_SM=no
15023if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15024 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
b0448899
CY
15025 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15026echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba 15027if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
b0448899 15028 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15029fi
b0448899
CY
15030{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15031echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15032else
c0d27fcc 15033 # Is the header compilable?
b0448899
CY
15034{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15035echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15037/* confdefs.h. */
15038_ACEOF
15039cat confdefs.h >>conftest.$ac_ext
15040cat >>conftest.$ac_ext <<_ACEOF
15041/* end confdefs.h. */
c0d27fcc
MR
15042$ac_includes_default
15043#include <X11/SM/SMlib.h>
15044_ACEOF
15045rm -f conftest.$ac_objext
ca81d7a0
JD
15046if { (ac_try="$ac_compile"
15047case "(($ac_try" in
15048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15049 *) ac_try_echo=$ac_try;;
15050esac
b0448899 15051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15052 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15053 ac_status=$?
edfaf76d
LK
15054 grep -v '^ *+' conftest.er1 >conftest.err
15055 rm -f conftest.er1
15056 cat conftest.err >&5
b0448899 15057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15058 (exit $ac_status); } && {
15059 test -z "$ac_c_werror_flag" ||
15060 test ! -s conftest.err
15061 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15062 ac_header_compiler=yes
15063else
b0448899 15064 echo "$as_me: failed program was:" >&5
19650fd6
AS
15065sed 's/^/| /' conftest.$ac_ext >&5
15066
ca81d7a0 15067 ac_header_compiler=no
c0d27fcc 15068fi
ca81d7a0
JD
15069
15070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
15071{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15072echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15073
15074# Is the header present?
b0448899
CY
15075{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15076echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15077cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15078/* confdefs.h. */
15079_ACEOF
15080cat confdefs.h >>conftest.$ac_ext
15081cat >>conftest.$ac_ext <<_ACEOF
15082/* end confdefs.h. */
98418dba
CW
15083#include <X11/SM/SMlib.h>
15084_ACEOF
ca81d7a0
JD
15085if { (ac_try="$ac_cpp conftest.$ac_ext"
15086case "(($ac_try" in
15087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15088 *) ac_try_echo=$ac_try;;
15089esac
b0448899 15090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15091 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15092 ac_status=$?
6bae0ccf 15093 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15094 rm -f conftest.er1
15095 cat conftest.err >&5
b0448899 15096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15097 (exit $ac_status); } >/dev/null && {
15098 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15099 test ! -s conftest.err
15100 }; then
c0d27fcc 15101 ac_header_preproc=yes
98418dba 15102else
b0448899 15103 echo "$as_me: failed program was:" >&5
19650fd6
AS
15104sed 's/^/| /' conftest.$ac_ext >&5
15105
c0d27fcc 15106 ac_header_preproc=no
98418dba 15107fi
ca81d7a0 15108
98418dba 15109rm -f conftest.err conftest.$ac_ext
b0448899
CY
15110{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15111echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15112
15113# So? What about this header?
edfaf76d
LK
15114case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15115 yes:no: )
b0448899
CY
15116 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15117echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15118 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15119echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
edfaf76d 15120 ac_header_preproc=yes
19650fd6 15121 ;;
edfaf76d 15122 no:yes:* )
b0448899
CY
15123 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15124echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
15125 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15126echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15127 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15128echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15129 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15130echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
15131 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
15132echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
15133 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15134echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15135
19650fd6 15136 ;;
c0d27fcc 15137esac
b0448899
CY
15138{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15139echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc 15140if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
b0448899 15141 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15142else
15143 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15144fi
b0448899
CY
15145{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15146echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15147
15148fi
b0448899
CY
15149if test $ac_cv_header_X11_SM_SMlib_h = yes; then
15150 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15151echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15152if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
b0448899 15153 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15154else
503d2be0 15155 ac_check_lib_save_LIBS=$LIBS
1660500f 15156LIBS="-lSM -lICE $LIBS"
503d2be0 15157cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15158/* confdefs.h. */
15159_ACEOF
15160cat confdefs.h >>conftest.$ac_ext
15161cat >>conftest.$ac_ext <<_ACEOF
15162/* end confdefs.h. */
503d2be0 15163
ca81d7a0
JD
15164/* Override any GCC internal prototype to avoid an error.
15165 Use char because int might match the return type of a GCC
15166 builtin and then its argument prototype would still apply. */
503d2be0
AS
15167#ifdef __cplusplus
15168extern "C"
15169#endif
98418dba 15170char SmcOpenConnection ();
503d2be0
AS
15171int
15172main ()
15173{
ca81d7a0 15174return SmcOpenConnection ();
503d2be0
AS
15175 ;
15176 return 0;
15177}
15178_ACEOF
15179rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15180if { (ac_try="$ac_link"
15181case "(($ac_try" in
15182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15183 *) ac_try_echo=$ac_try;;
15184esac
b0448899 15185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15186 (eval "$ac_link") 2>conftest.er1
503d2be0 15187 ac_status=$?
edfaf76d
LK
15188 grep -v '^ *+' conftest.er1 >conftest.err
15189 rm -f conftest.er1
15190 cat conftest.err >&5
b0448899 15191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15192 (exit $ac_status); } && {
15193 test -z "$ac_c_werror_flag" ||
15194 test ! -s conftest.err
b0448899
CY
15195 } && test -s conftest$ac_exeext &&
15196 $as_test_x conftest$ac_exeext; then
98418dba 15197 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0 15198else
b0448899 15199 echo "$as_me: failed program was:" >&5
19650fd6
AS
15200sed 's/^/| /' conftest.$ac_ext >&5
15201
ca81d7a0 15202 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15203fi
ca81d7a0 15204
f053c89f 15205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15206 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15207LIBS=$ac_check_lib_save_LIBS
15208fi
b0448899
CY
15209{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15210echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
15211if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
98418dba 15212 HAVE_X_SM=yes
73b77ee5
GM
15213fi
15214
73b77ee5 15215fi
73b77ee5 15216
c0d27fcc
MR
15217
15218
98418dba 15219 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15220
c0d27fcc 15221cat >>confdefs.h <<\_ACEOF
98418dba 15222#define HAVE_X_SM 1
c0d27fcc 15223_ACEOF
73b77ee5 15224
98418dba
CW
15225 case "$LIBS" in
15226 *-lSM*) ;;
15227 *) LIBS="-lSM -lICE $LIBS" ;;
15228 esac
73b77ee5 15229 fi
98418dba 15230fi
73b77ee5 15231
98418dba 15232# If netdb.h doesn't declare h_errno, we must declare it by hand.
b0448899
CY
15233{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15234echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba 15235if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
b0448899 15236 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15237else
15238 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15239/* confdefs.h. */
15240_ACEOF
15241cat confdefs.h >>conftest.$ac_ext
15242cat >>conftest.$ac_ext <<_ACEOF
15243/* end confdefs.h. */
98418dba 15244#include <netdb.h>
503d2be0
AS
15245int
15246main ()
15247{
98418dba 15248return h_errno;
503d2be0
AS
15249 ;
15250 return 0;
15251}
15252_ACEOF
15253rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15254if { (ac_try="$ac_link"
15255case "(($ac_try" in
15256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15257 *) ac_try_echo=$ac_try;;
15258esac
b0448899 15259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15260 (eval "$ac_link") 2>conftest.er1
503d2be0 15261 ac_status=$?
edfaf76d
LK
15262 grep -v '^ *+' conftest.er1 >conftest.err
15263 rm -f conftest.er1
15264 cat conftest.err >&5
b0448899 15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15266 (exit $ac_status); } && {
15267 test -z "$ac_c_werror_flag" ||
15268 test ! -s conftest.err
b0448899
CY
15269 } && test -s conftest$ac_exeext &&
15270 $as_test_x conftest$ac_exeext; then
98418dba 15271 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15272else
b0448899 15273 echo "$as_me: failed program was:" >&5
19650fd6
AS
15274sed 's/^/| /' conftest.$ac_ext >&5
15275
ca81d7a0 15276 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15277fi
ca81d7a0 15278
f053c89f 15279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15280 conftest$ac_exeext conftest.$ac_ext
98418dba 15281fi
b0448899
CY
15282{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15283echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15284if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15285
c0d27fcc 15286cat >>confdefs.h <<\_ACEOF
98418dba 15287#define HAVE_H_ERRNO 1
c0d27fcc 15288_ACEOF
73b77ee5 15289
98418dba
CW
15290fi
15291
15292# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15293# for constant arguments. Useless!
b0448899
CY
15294{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15295echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba 15296if test "${ac_cv_working_alloca_h+set}" = set; then
b0448899 15297 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15298else
15299 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15300/* confdefs.h. */
15301_ACEOF
15302cat confdefs.h >>conftest.$ac_ext
15303cat >>conftest.$ac_ext <<_ACEOF
15304/* end confdefs.h. */
98418dba 15305#include <alloca.h>
503d2be0
AS
15306int
15307main ()
15308{
98418dba 15309char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15310 if (p) return 0;
503d2be0
AS
15311 ;
15312 return 0;
15313}
15314_ACEOF
15315rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15316if { (ac_try="$ac_link"
15317case "(($ac_try" in
15318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15319 *) ac_try_echo=$ac_try;;
15320esac
b0448899 15321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15322 (eval "$ac_link") 2>conftest.er1
503d2be0 15323 ac_status=$?
edfaf76d
LK
15324 grep -v '^ *+' conftest.er1 >conftest.err
15325 rm -f conftest.er1
15326 cat conftest.err >&5
b0448899 15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15328 (exit $ac_status); } && {
15329 test -z "$ac_c_werror_flag" ||
15330 test ! -s conftest.err
b0448899
CY
15331 } && test -s conftest$ac_exeext &&
15332 $as_test_x conftest$ac_exeext; then
98418dba 15333 ac_cv_working_alloca_h=yes
73b77ee5 15334else
b0448899 15335 echo "$as_me: failed program was:" >&5
19650fd6
AS
15336sed 's/^/| /' conftest.$ac_ext >&5
15337
ca81d7a0 15338 ac_cv_working_alloca_h=no
73b77ee5 15339fi
ca81d7a0 15340
f053c89f 15341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15342 conftest$ac_exeext conftest.$ac_ext
98418dba 15343fi
b0448899
CY
15344{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15345echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15346if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15347
c0d27fcc 15348cat >>confdefs.h <<\_ACEOF
98418dba 15349#define HAVE_ALLOCA_H 1
c0d27fcc 15350_ACEOF
98418dba
CW
15351
15352fi
15353
b0448899
CY
15354{ echo "$as_me:$LINENO: checking for alloca" >&5
15355echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba 15356if test "${ac_cv_func_alloca_works+set}" = set; then
b0448899 15357 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 15358else
503d2be0 15359 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15360/* confdefs.h. */
15361_ACEOF
15362cat confdefs.h >>conftest.$ac_ext
15363cat >>conftest.$ac_ext <<_ACEOF
15364/* end confdefs.h. */
98418dba
CW
15365#ifdef __GNUC__
15366# define alloca __builtin_alloca
15367#else
15368# ifdef _MSC_VER
15369# include <malloc.h>
15370# define alloca _alloca
15371# else
f053c89f 15372# ifdef HAVE_ALLOCA_H
98418dba
CW
15373# include <alloca.h>
15374# else
15375# ifdef _AIX
15376 #pragma alloca
15377# else
15378# ifndef alloca /* predefined by HP cc +Olibcalls */
15379char *alloca ();
15380# endif
15381# endif
15382# endif
15383# endif
15384#endif
15385
503d2be0
AS
15386int
15387main ()
15388{
98418dba 15389char *p = (char *) alloca (1);
ca81d7a0 15390 if (p) return 0;
503d2be0
AS
15391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15396if { (ac_try="$ac_link"
15397case "(($ac_try" in
15398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15399 *) ac_try_echo=$ac_try;;
15400esac
b0448899 15401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15402 (eval "$ac_link") 2>conftest.er1
503d2be0 15403 ac_status=$?
edfaf76d
LK
15404 grep -v '^ *+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
b0448899 15407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15408 (exit $ac_status); } && {
15409 test -z "$ac_c_werror_flag" ||
15410 test ! -s conftest.err
b0448899
CY
15411 } && test -s conftest$ac_exeext &&
15412 $as_test_x conftest$ac_exeext; then
98418dba 15413 ac_cv_func_alloca_works=yes
ac95a621 15414else
b0448899 15415 echo "$as_me: failed program was:" >&5
19650fd6
AS
15416sed 's/^/| /' conftest.$ac_ext >&5
15417
ca81d7a0 15418 ac_cv_func_alloca_works=no
ac95a621 15419fi
ca81d7a0 15420
f053c89f 15421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15422 conftest$ac_exeext conftest.$ac_ext
98418dba 15423fi
b0448899
CY
15424{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15425echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15426
98418dba
CW
15427if test $ac_cv_func_alloca_works = yes; then
15428
c0d27fcc 15429cat >>confdefs.h <<\_ACEOF
98418dba 15430#define HAVE_ALLOCA 1
c0d27fcc 15431_ACEOF
98418dba
CW
15432
15433else
15434 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15435# that cause trouble. Some versions do not even contain alloca or
15436# contain a buggy version. If you still want to use their alloca,
15437# use ar to extract alloca.o from them instead of compiling alloca.c.
15438
ca81d7a0 15439ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15440
c0d27fcc 15441cat >>confdefs.h <<\_ACEOF
98418dba 15442#define C_ALLOCA 1
c0d27fcc 15443_ACEOF
98418dba 15444
c0d27fcc 15445
b0448899
CY
15446{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15447echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba 15448if test "${ac_cv_os_cray+set}" = set; then
b0448899 15449 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15450else
15451 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15452/* confdefs.h. */
15453_ACEOF
15454cat confdefs.h >>conftest.$ac_ext
15455cat >>conftest.$ac_ext <<_ACEOF
15456/* end confdefs.h. */
ca81d7a0 15457#if defined CRAY && ! defined CRAY2
98418dba
CW
15458webecray
15459#else
15460wenotbecray
15461#endif
15462
15463_ACEOF
15464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15465 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15466 ac_cv_os_cray=yes
15467else
15468 ac_cv_os_cray=no
15469fi
15470rm -f conftest*
ac95a621 15471
98418dba 15472fi
b0448899
CY
15473{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15474echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15475if test $ac_cv_os_cray = yes; then
15476 for ac_func in _getb67 GETB67 getb67; do
b0448899
CY
15477 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15478{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15479echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 15480if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 15481 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15482else
503d2be0 15483 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15484/* confdefs.h. */
15485_ACEOF
15486cat confdefs.h >>conftest.$ac_ext
15487cat >>conftest.$ac_ext <<_ACEOF
15488/* end confdefs.h. */
edfaf76d
LK
15489/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15490 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15491#define $ac_func innocuous_$ac_func
15492
73b77ee5 15493/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15494 which can conflict with char $ac_func (); below.
15495 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15496 <limits.h> exists even on freestanding compilers. */
edfaf76d 15497
19650fd6
AS
15498#ifdef __STDC__
15499# include <limits.h>
15500#else
15501# include <assert.h>
15502#endif
edfaf76d
LK
15503
15504#undef $ac_func
15505
ca81d7a0
JD
15506/* Override any GCC internal prototype to avoid an error.
15507 Use char because int might match the return type of a GCC
15508 builtin and then its argument prototype would still apply. */
503d2be0
AS
15509#ifdef __cplusplus
15510extern "C"
15511#endif
503d2be0 15512char $ac_func ();
73b77ee5
GM
15513/* The GNU C library defines this for functions which it implements
15514 to always fail with ENOSYS. Some functions are actually named
15515 something starting with __ and the normal name is an alias. */
ca81d7a0 15516#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15517choke me
73b77ee5
GM
15518#endif
15519
19650fd6
AS
15520int
15521main ()
15522{
ca81d7a0 15523return $ac_func ();
503d2be0
AS
15524 ;
15525 return 0;
15526}
15527_ACEOF
15528rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15529if { (ac_try="$ac_link"
15530case "(($ac_try" in
15531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15532 *) ac_try_echo=$ac_try;;
15533esac
b0448899 15534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15535 (eval "$ac_link") 2>conftest.er1
503d2be0 15536 ac_status=$?
edfaf76d
LK
15537 grep -v '^ *+' conftest.er1 >conftest.err
15538 rm -f conftest.er1
15539 cat conftest.err >&5
b0448899 15540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15541 (exit $ac_status); } && {
15542 test -z "$ac_c_werror_flag" ||
15543 test ! -s conftest.err
b0448899
CY
15544 } && test -s conftest$ac_exeext &&
15545 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15546 eval "$as_ac_var=yes"
15547else
b0448899 15548 echo "$as_me: failed program was:" >&5
19650fd6
AS
15549sed 's/^/| /' conftest.$ac_ext >&5
15550
ca81d7a0 15551 eval "$as_ac_var=no"
503d2be0 15552fi
ca81d7a0 15553
f053c89f 15554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15555 conftest$ac_exeext conftest.$ac_ext
503d2be0 15556fi
b0448899
CY
15557ac_res=`eval echo '${'$as_ac_var'}'`
15558 { echo "$as_me:$LINENO: result: $ac_res" >&5
15559echo "${ECHO_T}$ac_res" >&6; }
15560if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15561
c0d27fcc 15562cat >>confdefs.h <<_ACEOF
98418dba 15563#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15564_ACEOF
98418dba
CW
15565
15566 break
73b77ee5 15567fi
73b77ee5 15568
98418dba 15569 done
73b77ee5
GM
15570fi
15571
b0448899
CY
15572{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15573echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15574if test "${ac_cv_c_stack_direction+set}" = set; then
b0448899 15575 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15576else
15577 if test "$cross_compiling" = yes; then
15578 ac_cv_c_stack_direction=0
73b77ee5 15579else
503d2be0 15580 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15581/* confdefs.h. */
15582_ACEOF
15583cat confdefs.h >>conftest.$ac_ext
15584cat >>conftest.$ac_ext <<_ACEOF
15585/* end confdefs.h. */
ca81d7a0 15586$ac_includes_default
503d2be0 15587int
98418dba 15588find_stack_direction ()
503d2be0 15589{
98418dba
CW
15590 static char *addr = 0;
15591 auto char dummy;
15592 if (addr == 0)
15593 {
15594 addr = &dummy;
15595 return find_stack_direction ();
15596 }
73b77ee5 15597 else
98418dba
CW
15598 return (&dummy > addr) ? 1 : -1;
15599}
ba4481b5 15600
503d2be0
AS
15601int
15602main ()
15603{
ca81d7a0 15604 return find_stack_direction () < 0;
503d2be0
AS
15605}
15606_ACEOF
98418dba 15607rm -f conftest$ac_exeext
ca81d7a0
JD
15608if { (ac_try="$ac_link"
15609case "(($ac_try" in
15610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15611 *) ac_try_echo=$ac_try;;
15612esac
b0448899 15613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15614 (eval "$ac_link") 2>&5
503d2be0 15615 ac_status=$?
b0448899 15616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15618 { (case "(($ac_try" in
15619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15620 *) ac_try_echo=$ac_try;;
15621esac
b0448899 15622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15623 (eval "$ac_try") 2>&5
503d2be0 15624 ac_status=$?
b0448899 15625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15626 (exit $ac_status); }; }; then
98418dba 15627 ac_cv_c_stack_direction=1
ba4481b5 15628else
b0448899
CY
15629 echo "$as_me: program exited with status $ac_status" >&5
15630echo "$as_me: failed program was:" >&5
19650fd6
AS
15631sed 's/^/| /' conftest.$ac_ext >&5
15632
c0d27fcc 15633( exit $ac_status )
98418dba 15634ac_cv_c_stack_direction=-1
ba4481b5 15635fi
ca81d7a0 15636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15637fi
ca81d7a0
JD
15638
15639
98418dba 15640fi
b0448899
CY
15641{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15642echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15643
c0d27fcc 15644cat >>confdefs.h <<_ACEOF
98418dba 15645#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15646_ACEOF
15647
ba4481b5 15648
ba4481b5
DL
15649fi
15650
c0d27fcc 15651
611adb3e 15652if test x"$ac_cv_func_alloca_works" != xyes; then
b0448899
CY
15653 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15654echo "$as_me: error: a system implementation of alloca is required " >&2;}
611adb3e
GM
15655 { (exit 1); exit 1; }; }
15656fi
15657
98418dba
CW
15658# fmod, logb, and frexp are found in -lm on most systems.
15659# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15660
b0448899
CY
15661{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15662echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15663if test "${ac_cv_lib_m_sqrt+set}" = set; then
b0448899 15664 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15665else
98418dba
CW
15666 ac_check_lib_save_LIBS=$LIBS
15667LIBS="-lm $LIBS"
15668cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15669/* confdefs.h. */
15670_ACEOF
15671cat confdefs.h >>conftest.$ac_ext
15672cat >>conftest.$ac_ext <<_ACEOF
15673/* end confdefs.h. */
ba4481b5 15674
ca81d7a0
JD
15675/* Override any GCC internal prototype to avoid an error.
15676 Use char because int might match the return type of a GCC
15677 builtin and then its argument prototype would still apply. */
98418dba
CW
15678#ifdef __cplusplus
15679extern "C"
15680#endif
98418dba 15681char sqrt ();
503d2be0
AS
15682int
15683main ()
15684{
ca81d7a0 15685return sqrt ();
503d2be0
AS
15686 ;
15687 return 0;
15688}
15689_ACEOF
15690rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15691if { (ac_try="$ac_link"
15692case "(($ac_try" in
15693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15694 *) ac_try_echo=$ac_try;;
15695esac
b0448899 15696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15697 (eval "$ac_link") 2>conftest.er1
503d2be0 15698 ac_status=$?
edfaf76d
LK
15699 grep -v '^ *+' conftest.er1 >conftest.err
15700 rm -f conftest.er1
15701 cat conftest.err >&5
b0448899 15702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15703 (exit $ac_status); } && {
15704 test -z "$ac_c_werror_flag" ||
15705 test ! -s conftest.err
b0448899
CY
15706 } && test -s conftest$ac_exeext &&
15707 $as_test_x conftest$ac_exeext; then
98418dba 15708 ac_cv_lib_m_sqrt=yes
ba4481b5 15709else
b0448899 15710 echo "$as_me: failed program was:" >&5
19650fd6
AS
15711sed 's/^/| /' conftest.$ac_ext >&5
15712
ca81d7a0 15713 ac_cv_lib_m_sqrt=no
ba4481b5 15714fi
ca81d7a0 15715
f053c89f 15716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15717 conftest$ac_exeext conftest.$ac_ext
98418dba 15718LIBS=$ac_check_lib_save_LIBS
ba4481b5 15719fi
b0448899
CY
15720{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15721echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
15722if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15723 cat >>confdefs.h <<_ACEOF
98418dba 15724#define HAVE_LIBM 1
c0d27fcc 15725_ACEOF
98418dba
CW
15726
15727 LIBS="-lm $LIBS"
ba4481b5 15728
ba4481b5
DL
15729fi
15730
c0d27fcc 15731
55597d70
DL
15732# Check for mail-locking functions in a "mail" library. Probably this should
15733# have the same check as for liblockfile below.
98418dba 15734
b0448899
CY
15735{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15736echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15737if test "${ac_cv_lib_mail_maillock+set}" = set; then
b0448899 15738 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15739else
98418dba
CW
15740 ac_check_lib_save_LIBS=$LIBS
15741LIBS="-lmail $LIBS"
15742cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15743/* confdefs.h. */
15744_ACEOF
15745cat confdefs.h >>conftest.$ac_ext
15746cat >>conftest.$ac_ext <<_ACEOF
15747/* end confdefs.h. */
98418dba 15748
ca81d7a0
JD
15749/* Override any GCC internal prototype to avoid an error.
15750 Use char because int might match the return type of a GCC
15751 builtin and then its argument prototype would still apply. */
98418dba
CW
15752#ifdef __cplusplus
15753extern "C"
15754#endif
98418dba 15755char maillock ();
503d2be0
AS
15756int
15757main ()
15758{
ca81d7a0 15759return maillock ();
503d2be0
AS
15760 ;
15761 return 0;
15762}
15763_ACEOF
15764rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15765if { (ac_try="$ac_link"
15766case "(($ac_try" in
15767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15768 *) ac_try_echo=$ac_try;;
15769esac
b0448899 15770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15771 (eval "$ac_link") 2>conftest.er1
503d2be0 15772 ac_status=$?
edfaf76d
LK
15773 grep -v '^ *+' conftest.er1 >conftest.err
15774 rm -f conftest.er1
15775 cat conftest.err >&5
b0448899 15776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15777 (exit $ac_status); } && {
15778 test -z "$ac_c_werror_flag" ||
15779 test ! -s conftest.err
b0448899
CY
15780 } && test -s conftest$ac_exeext &&
15781 $as_test_x conftest$ac_exeext; then
98418dba 15782 ac_cv_lib_mail_maillock=yes
ba4481b5 15783else
b0448899 15784 echo "$as_me: failed program was:" >&5
19650fd6
AS
15785sed 's/^/| /' conftest.$ac_ext >&5
15786
ca81d7a0 15787 ac_cv_lib_mail_maillock=no
ba4481b5 15788fi
ca81d7a0 15789
f053c89f 15790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15791 conftest$ac_exeext conftest.$ac_ext
98418dba 15792LIBS=$ac_check_lib_save_LIBS
ba4481b5 15793fi
b0448899
CY
15794{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15795echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
15796if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15797 cat >>confdefs.h <<_ACEOF
98418dba 15798#define HAVE_LIBMAIL 1
c0d27fcc 15799_ACEOF
ba4481b5 15800
98418dba 15801 LIBS="-lmail $LIBS"
ba4481b5 15802
98418dba 15803fi
ba4481b5 15804
c0d27fcc 15805
b0448899
CY
15806{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15807echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15808if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
b0448899 15809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15810else
503d2be0 15811 ac_check_lib_save_LIBS=$LIBS
98418dba 15812LIBS="-llockfile $LIBS"
503d2be0 15813cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15814/* confdefs.h. */
15815_ACEOF
15816cat confdefs.h >>conftest.$ac_ext
15817cat >>conftest.$ac_ext <<_ACEOF
15818/* end confdefs.h. */
503d2be0 15819
ca81d7a0
JD
15820/* Override any GCC internal prototype to avoid an error.
15821 Use char because int might match the return type of a GCC
15822 builtin and then its argument prototype would still apply. */
503d2be0
AS
15823#ifdef __cplusplus
15824extern "C"
15825#endif
98418dba 15826char maillock ();
503d2be0
AS
15827int
15828main ()
15829{
ca81d7a0 15830return maillock ();
503d2be0
AS
15831 ;
15832 return 0;
15833}
15834_ACEOF
15835rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15836if { (ac_try="$ac_link"
15837case "(($ac_try" in
15838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15839 *) ac_try_echo=$ac_try;;
15840esac
b0448899 15841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15842 (eval "$ac_link") 2>conftest.er1
503d2be0 15843 ac_status=$?
edfaf76d
LK
15844 grep -v '^ *+' conftest.er1 >conftest.err
15845 rm -f conftest.er1
15846 cat conftest.err >&5
b0448899 15847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15848 (exit $ac_status); } && {
15849 test -z "$ac_c_werror_flag" ||
15850 test ! -s conftest.err
b0448899
CY
15851 } && test -s conftest$ac_exeext &&
15852 $as_test_x conftest$ac_exeext; then
98418dba 15853 ac_cv_lib_lockfile_maillock=yes
503d2be0 15854else
b0448899 15855 echo "$as_me: failed program was:" >&5
19650fd6
AS
15856sed 's/^/| /' conftest.$ac_ext >&5
15857
ca81d7a0 15858 ac_cv_lib_lockfile_maillock=no
98418dba 15859fi
ca81d7a0 15860
f053c89f 15861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15862 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15863LIBS=$ac_check_lib_save_LIBS
15864fi
b0448899
CY
15865{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15866echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
15867if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15868 cat >>confdefs.h <<_ACEOF
98418dba 15869#define HAVE_LIBLOCKFILE 1
c0d27fcc 15870_ACEOF
98418dba
CW
15871
15872 LIBS="-llockfile $LIBS"
15873
15874fi
15875
15876# If we have the shared liblockfile, assume we must use it for mail
15877# locking (e.g. Debian). If we couldn't link against liblockfile
15878# (no liblockfile.a installed), ensure that we don't need to.
15879if test "$ac_cv_lib_lockfile_maillock" = no; then
15880 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15881set dummy liblockfile.so; ac_word=$2
b0448899
CY
15882{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba 15884if test "${ac_cv_prog_liblockfile+set}" = set; then
b0448899 15885 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15886else
15887 if test -n "$liblockfile"; then
15888 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15889else
c0d27fcc 15890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15891as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15892for as_dir in $as_dummy
c0d27fcc
MR
15893do
15894 IFS=$as_save_IFS
15895 test -z "$as_dir" && as_dir=.
15896 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 15898 ac_cv_prog_liblockfile="yes"
b0448899 15899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
15900 break 2
15901 fi
15902done
98418dba 15903done
ca81d7a0 15904IFS=$as_save_IFS
98418dba
CW
15905
15906 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15907fi
503d2be0 15908fi
98418dba
CW
15909liblockfile=$ac_cv_prog_liblockfile
15910if test -n "$liblockfile"; then
b0448899
CY
15911 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15912echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15913else
b0448899
CY
15914 { echo "$as_me:$LINENO: result: no" >&5
15915echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15916fi
15917
ca81d7a0 15918
98418dba 15919 if test $ac_cv_prog_liblockfile = yes; then
b0448899 15920 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15921This probably means that movemail could lose mail.
15922There may be a \`development' package to install containing liblockfile." >&5
b0448899 15923echo "$as_me: error: Shared liblockfile found but can't link against it.
98418dba
CW
15924This probably means that movemail could lose mail.
15925There may be a \`development' package to install containing liblockfile." >&2;}
15926 { (exit 1); exit 1; }; }
98418dba 15927 else :
55597d70 15928 fi
98418dba 15929fi
503d2be0 15930
98418dba
CW
15931for ac_func in touchlock
15932do
b0448899
CY
15933as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15934{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15935echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 15936if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 15937 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15938else
98418dba 15939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15940/* confdefs.h. */
15941_ACEOF
15942cat confdefs.h >>conftest.$ac_ext
15943cat >>conftest.$ac_ext <<_ACEOF
15944/* end confdefs.h. */
edfaf76d
LK
15945/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15946 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15947#define $ac_func innocuous_$ac_func
15948
98418dba 15949/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15950 which can conflict with char $ac_func (); below.
15951 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15952 <limits.h> exists even on freestanding compilers. */
edfaf76d 15953
19650fd6
AS
15954#ifdef __STDC__
15955# include <limits.h>
15956#else
15957# include <assert.h>
15958#endif
edfaf76d
LK
15959
15960#undef $ac_func
15961
ca81d7a0
JD
15962/* Override any GCC internal prototype to avoid an error.
15963 Use char because int might match the return type of a GCC
15964 builtin and then its argument prototype would still apply. */
503d2be0
AS
15965#ifdef __cplusplus
15966extern "C"
15967#endif
98418dba 15968char $ac_func ();
98418dba
CW
15969/* The GNU C library defines this for functions which it implements
15970 to always fail with ENOSYS. Some functions are actually named
15971 something starting with __ and the normal name is an alias. */
ca81d7a0 15972#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15973choke me
cd958eb3
MB
15974#endif
15975
19650fd6
AS
15976int
15977main ()
15978{
ca81d7a0 15979return $ac_func ();
503d2be0
AS
15980 ;
15981 return 0;
15982}
15983_ACEOF
15984rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15985if { (ac_try="$ac_link"
15986case "(($ac_try" in
15987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15988 *) ac_try_echo=$ac_try;;
15989esac
b0448899 15990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15991 (eval "$ac_link") 2>conftest.er1
503d2be0 15992 ac_status=$?
edfaf76d
LK
15993 grep -v '^ *+' conftest.er1 >conftest.err
15994 rm -f conftest.er1
15995 cat conftest.err >&5
b0448899 15996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15997 (exit $ac_status); } && {
15998 test -z "$ac_c_werror_flag" ||
15999 test ! -s conftest.err
b0448899
CY
16000 } && test -s conftest$ac_exeext &&
16001 $as_test_x conftest$ac_exeext; then
98418dba 16002 eval "$as_ac_var=yes"
503d2be0 16003else
b0448899 16004 echo "$as_me: failed program was:" >&5
19650fd6
AS
16005sed 's/^/| /' conftest.$ac_ext >&5
16006
ca81d7a0 16007 eval "$as_ac_var=no"
503d2be0 16008fi
ca81d7a0 16009
f053c89f 16010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16011 conftest$ac_exeext conftest.$ac_ext
503d2be0 16012fi
b0448899
CY
16013ac_res=`eval echo '${'$as_ac_var'}'`
16014 { echo "$as_me:$LINENO: result: $ac_res" >&5
16015echo "${ECHO_T}$ac_res" >&6; }
16016if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16017 cat >>confdefs.h <<_ACEOF
b0448899 16018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16019_ACEOF
457b792c 16020
457b792c 16021fi
98418dba 16022done
457b792c 16023
c0d27fcc 16024
98418dba
CW
16025for ac_header in maillock.h
16026do
b0448899 16027as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 16028if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
16029 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16031if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16032 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16033fi
b0448899
CY
16034ac_res=`eval echo '${'$as_ac_Header'}'`
16035 { echo "$as_me:$LINENO: result: $ac_res" >&5
16036echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16037else
c0d27fcc 16038 # Is the header compilable?
b0448899
CY
16039{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16040echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16041cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16042/* confdefs.h. */
16043_ACEOF
16044cat confdefs.h >>conftest.$ac_ext
16045cat >>conftest.$ac_ext <<_ACEOF
16046/* end confdefs.h. */
c0d27fcc
MR
16047$ac_includes_default
16048#include <$ac_header>
16049_ACEOF
16050rm -f conftest.$ac_objext
ca81d7a0
JD
16051if { (ac_try="$ac_compile"
16052case "(($ac_try" in
16053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16054 *) ac_try_echo=$ac_try;;
16055esac
b0448899 16056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16057 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16058 ac_status=$?
edfaf76d
LK
16059 grep -v '^ *+' conftest.er1 >conftest.err
16060 rm -f conftest.er1
16061 cat conftest.err >&5
b0448899 16062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16063 (exit $ac_status); } && {
16064 test -z "$ac_c_werror_flag" ||
16065 test ! -s conftest.err
16066 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16067 ac_header_compiler=yes
16068else
b0448899 16069 echo "$as_me: failed program was:" >&5
19650fd6
AS
16070sed 's/^/| /' conftest.$ac_ext >&5
16071
ca81d7a0 16072 ac_header_compiler=no
c0d27fcc 16073fi
ca81d7a0
JD
16074
16075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
16076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16077echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16078
16079# Is the header present?
b0448899
CY
16080{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16081echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16082cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16083/* confdefs.h. */
16084_ACEOF
16085cat confdefs.h >>conftest.$ac_ext
16086cat >>conftest.$ac_ext <<_ACEOF
16087/* end confdefs.h. */
98418dba 16088#include <$ac_header>
503d2be0 16089_ACEOF
ca81d7a0
JD
16090if { (ac_try="$ac_cpp conftest.$ac_ext"
16091case "(($ac_try" in
16092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16093 *) ac_try_echo=$ac_try;;
16094esac
b0448899 16095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16097 ac_status=$?
6bae0ccf 16098 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16099 rm -f conftest.er1
16100 cat conftest.err >&5
b0448899 16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16102 (exit $ac_status); } >/dev/null && {
16103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16104 test ! -s conftest.err
16105 }; then
c0d27fcc 16106 ac_header_preproc=yes
98418dba 16107else
b0448899 16108 echo "$as_me: failed program was:" >&5
19650fd6
AS
16109sed 's/^/| /' conftest.$ac_ext >&5
16110
c0d27fcc 16111 ac_header_preproc=no
503d2be0 16112fi
ca81d7a0 16113
98418dba 16114rm -f conftest.err conftest.$ac_ext
b0448899
CY
16115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16116echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16117
16118# So? What about this header?
edfaf76d
LK
16119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16120 yes:no: )
b0448899
CY
16121 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16122echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16123 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16124echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 16125 ac_header_preproc=yes
19650fd6 16126 ;;
edfaf76d 16127 no:yes:* )
b0448899
CY
16128 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16129echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16130 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16131echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16132 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16133echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16134 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16135echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
16136 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16137echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16138 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16139echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16140
19650fd6 16141 ;;
c0d27fcc 16142esac
b0448899
CY
16143{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16144echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16145if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16146 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16147else
edfaf76d 16148 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16149fi
b0448899
CY
16150ac_res=`eval echo '${'$as_ac_Header'}'`
16151 { echo "$as_me:$LINENO: result: $ac_res" >&5
16152echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16153
16154fi
b0448899 16155if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16156 cat >>confdefs.h <<_ACEOF
b0448899 16157#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16158_ACEOF
48d4b120 16159
ba4481b5 16160fi
c0d27fcc 16161
98418dba
CW
16162done
16163
c0d27fcc
MR
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
22044edf
DL
16219
16220
c0d27fcc 16221
b0e44248
RB
16222
16223
973a76b1
DL
16224
16225
16226
cd958eb3 16227
25ca0bca 16228
ea92fc9f 16229
2d3c36ae
SM
16230
16231
e2fcf543 16232
5acf240e 16233
c0d27fcc
MR
16234
16235
98418dba 16236for ac_func in gethostname getdomainname dup2 \
e2fcf543 16237rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16238random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16239strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5acf240e 16240utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16241__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16242sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16243gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16244memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16245cfmakeraw cfsetspeed
98418dba 16246do
b0448899
CY
16247as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16248{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16249echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 16250if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16251 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16252else
503d2be0 16253 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16254/* confdefs.h. */
16255_ACEOF
16256cat confdefs.h >>conftest.$ac_ext
16257cat >>conftest.$ac_ext <<_ACEOF
16258/* end confdefs.h. */
edfaf76d
LK
16259/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16260 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16261#define $ac_func innocuous_$ac_func
16262
98418dba 16263/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16264 which can conflict with char $ac_func (); below.
16265 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16266 <limits.h> exists even on freestanding compilers. */
edfaf76d 16267
19650fd6
AS
16268#ifdef __STDC__
16269# include <limits.h>
16270#else
16271# include <assert.h>
16272#endif
edfaf76d
LK
16273
16274#undef $ac_func
16275
ca81d7a0
JD
16276/* Override any GCC internal prototype to avoid an error.
16277 Use char because int might match the return type of a GCC
16278 builtin and then its argument prototype would still apply. */
503d2be0
AS
16279#ifdef __cplusplus
16280extern "C"
16281#endif
98418dba 16282char $ac_func ();
98418dba
CW
16283/* The GNU C library defines this for functions which it implements
16284 to always fail with ENOSYS. Some functions are actually named
16285 something starting with __ and the normal name is an alias. */
ca81d7a0 16286#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16287choke me
98418dba
CW
16288#endif
16289
19650fd6
AS
16290int
16291main ()
16292{
ca81d7a0 16293return $ac_func ();
503d2be0
AS
16294 ;
16295 return 0;
16296}
16297_ACEOF
16298rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16299if { (ac_try="$ac_link"
16300case "(($ac_try" in
16301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16302 *) ac_try_echo=$ac_try;;
16303esac
b0448899 16304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16305 (eval "$ac_link") 2>conftest.er1
503d2be0 16306 ac_status=$?
edfaf76d
LK
16307 grep -v '^ *+' conftest.er1 >conftest.err
16308 rm -f conftest.er1
16309 cat conftest.err >&5
b0448899 16310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16311 (exit $ac_status); } && {
16312 test -z "$ac_c_werror_flag" ||
16313 test ! -s conftest.err
b0448899
CY
16314 } && test -s conftest$ac_exeext &&
16315 $as_test_x conftest$ac_exeext; then
98418dba 16316 eval "$as_ac_var=yes"
503d2be0 16317else
b0448899 16318 echo "$as_me: failed program was:" >&5
19650fd6
AS
16319sed 's/^/| /' conftest.$ac_ext >&5
16320
ca81d7a0 16321 eval "$as_ac_var=no"
503d2be0 16322fi
ca81d7a0 16323
f053c89f 16324rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16325 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16326fi
b0448899
CY
16327ac_res=`eval echo '${'$as_ac_var'}'`
16328 { echo "$as_me:$LINENO: result: $ac_res" >&5
16329echo "${ECHO_T}$ac_res" >&6; }
16330if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16331 cat >>confdefs.h <<_ACEOF
b0448899 16332#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16333_ACEOF
ba4481b5 16334
ba4481b5 16335fi
98418dba 16336done
ba4481b5 16337
c0d27fcc
MR
16338
16339
98418dba
CW
16340for ac_header in sys/un.h
16341do
b0448899 16342as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 16343if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
16344 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16345echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16346if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16347 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16348fi
b0448899
CY
16349ac_res=`eval echo '${'$as_ac_Header'}'`
16350 { echo "$as_me:$LINENO: result: $ac_res" >&5
16351echo "${ECHO_T}$ac_res" >&6; }
98418dba 16352else
c0d27fcc 16353 # Is the header compilable?
b0448899
CY
16354{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16355echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16356cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16357/* confdefs.h. */
16358_ACEOF
16359cat confdefs.h >>conftest.$ac_ext
16360cat >>conftest.$ac_ext <<_ACEOF
16361/* end confdefs.h. */
c0d27fcc
MR
16362$ac_includes_default
16363#include <$ac_header>
16364_ACEOF
16365rm -f conftest.$ac_objext
ca81d7a0
JD
16366if { (ac_try="$ac_compile"
16367case "(($ac_try" in
16368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16369 *) ac_try_echo=$ac_try;;
16370esac
b0448899 16371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16372 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16373 ac_status=$?
edfaf76d
LK
16374 grep -v '^ *+' conftest.er1 >conftest.err
16375 rm -f conftest.er1
16376 cat conftest.err >&5
b0448899 16377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16378 (exit $ac_status); } && {
16379 test -z "$ac_c_werror_flag" ||
16380 test ! -s conftest.err
16381 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16382 ac_header_compiler=yes
16383else
b0448899 16384 echo "$as_me: failed program was:" >&5
19650fd6
AS
16385sed 's/^/| /' conftest.$ac_ext >&5
16386
ca81d7a0 16387 ac_header_compiler=no
c0d27fcc 16388fi
ca81d7a0
JD
16389
16390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
16391{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16392echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16393
16394# Is the header present?
b0448899
CY
16395{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16396echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16397cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
98418dba 16403#include <$ac_header>
503d2be0 16404_ACEOF
ca81d7a0
JD
16405if { (ac_try="$ac_cpp conftest.$ac_ext"
16406case "(($ac_try" in
16407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16408 *) ac_try_echo=$ac_try;;
16409esac
b0448899 16410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16411 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16412 ac_status=$?
6bae0ccf 16413 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16414 rm -f conftest.er1
16415 cat conftest.err >&5
b0448899 16416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16417 (exit $ac_status); } >/dev/null && {
16418 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16419 test ! -s conftest.err
16420 }; then
c0d27fcc 16421 ac_header_preproc=yes
ba4481b5 16422else
b0448899 16423 echo "$as_me: failed program was:" >&5
19650fd6
AS
16424sed 's/^/| /' conftest.$ac_ext >&5
16425
c0d27fcc 16426 ac_header_preproc=no
ba4481b5 16427fi
ca81d7a0 16428
503d2be0 16429rm -f conftest.err conftest.$ac_ext
b0448899
CY
16430{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16431echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16432
16433# So? What about this header?
edfaf76d
LK
16434case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16435 yes:no: )
b0448899
CY
16436 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16437echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16438 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16439echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 16440 ac_header_preproc=yes
19650fd6 16441 ;;
edfaf76d 16442 no:yes:* )
b0448899
CY
16443 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16444echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16446echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16447 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16448echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16449 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16450echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
16451 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16452echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16453 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16454echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16455
19650fd6 16456 ;;
c0d27fcc 16457esac
b0448899
CY
16458{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16459echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16460if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16461 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16462else
edfaf76d 16463 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16464fi
b0448899
CY
16465ac_res=`eval echo '${'$as_ac_Header'}'`
16466 { echo "$as_me:$LINENO: result: $ac_res" >&5
16467echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16468
16469fi
b0448899 16470if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16471 cat >>confdefs.h <<_ACEOF
b0448899 16472#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16473_ACEOF
503d2be0 16474
925c2f3f 16475fi
c0d27fcc 16476
925c2f3f
EZ
16477done
16478
c0d27fcc
MR
16479
16480
16481
edfaf76d 16482
f053c89f
CY
16483
16484for ac_header in $ac_header_list
925c2f3f 16485do
b0448899 16486as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 16487if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
16488 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16491 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16492fi
b0448899
CY
16493ac_res=`eval echo '${'$as_ac_Header'}'`
16494 { echo "$as_me:$LINENO: result: $ac_res" >&5
16495echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16496else
c0d27fcc 16497 # Is the header compilable?
b0448899
CY
16498{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16499echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16500cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16501/* confdefs.h. */
16502_ACEOF
16503cat confdefs.h >>conftest.$ac_ext
16504cat >>conftest.$ac_ext <<_ACEOF
16505/* end confdefs.h. */
c0d27fcc
MR
16506$ac_includes_default
16507#include <$ac_header>
16508_ACEOF
16509rm -f conftest.$ac_objext
ca81d7a0
JD
16510if { (ac_try="$ac_compile"
16511case "(($ac_try" in
16512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16513 *) ac_try_echo=$ac_try;;
16514esac
b0448899 16515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16516 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16517 ac_status=$?
edfaf76d
LK
16518 grep -v '^ *+' conftest.er1 >conftest.err
16519 rm -f conftest.er1
16520 cat conftest.err >&5
b0448899 16521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16522 (exit $ac_status); } && {
16523 test -z "$ac_c_werror_flag" ||
16524 test ! -s conftest.err
16525 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16526 ac_header_compiler=yes
16527else
b0448899 16528 echo "$as_me: failed program was:" >&5
19650fd6
AS
16529sed 's/^/| /' conftest.$ac_ext >&5
16530
ca81d7a0 16531 ac_header_compiler=no
c0d27fcc 16532fi
ca81d7a0
JD
16533
16534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
16535{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16536echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16537
16538# Is the header present?
b0448899
CY
16539{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16540echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16541cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16542/* confdefs.h. */
16543_ACEOF
16544cat confdefs.h >>conftest.$ac_ext
16545cat >>conftest.$ac_ext <<_ACEOF
16546/* end confdefs.h. */
98418dba 16547#include <$ac_header>
503d2be0 16548_ACEOF
ca81d7a0
JD
16549if { (ac_try="$ac_cpp conftest.$ac_ext"
16550case "(($ac_try" in
16551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16552 *) ac_try_echo=$ac_try;;
16553esac
b0448899 16554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16555 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16556 ac_status=$?
6bae0ccf 16557 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16558 rm -f conftest.er1
16559 cat conftest.err >&5
b0448899 16560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16561 (exit $ac_status); } >/dev/null && {
16562 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16563 test ! -s conftest.err
16564 }; then
c0d27fcc 16565 ac_header_preproc=yes
98418dba 16566else
b0448899 16567 echo "$as_me: failed program was:" >&5
19650fd6
AS
16568sed 's/^/| /' conftest.$ac_ext >&5
16569
c0d27fcc 16570 ac_header_preproc=no
98418dba 16571fi
ca81d7a0 16572
98418dba 16573rm -f conftest.err conftest.$ac_ext
b0448899
CY
16574{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16575echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16576
16577# So? What about this header?
edfaf76d
LK
16578case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16579 yes:no: )
b0448899
CY
16580 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16581echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16582 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16583echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 16584 ac_header_preproc=yes
19650fd6 16585 ;;
edfaf76d 16586 no:yes:* )
b0448899
CY
16587 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16588echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16589 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16590echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16591 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16592echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16593 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16594echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
16595 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16596echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16597 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16598echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16599
19650fd6 16600 ;;
c0d27fcc 16601esac
b0448899
CY
16602{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16605 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16606else
edfaf76d 16607 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16608fi
b0448899
CY
16609ac_res=`eval echo '${'$as_ac_Header'}'`
16610 { echo "$as_me:$LINENO: result: $ac_res" >&5
16611echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16612
16613fi
b0448899 16614if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16615 cat >>confdefs.h <<_ACEOF
b0448899 16616#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16617_ACEOF
98418dba
CW
16618
16619fi
c0d27fcc 16620
98418dba
CW
16621done
16622
c0d27fcc 16623
f053c89f
CY
16624
16625
16626
16627
16628
16629
16630
16631for ac_func in $ac_func_list
98418dba 16632do
b0448899
CY
16633as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16634{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16635echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 16636if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 16637 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16638else
98418dba 16639 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16640/* confdefs.h. */
16641_ACEOF
16642cat confdefs.h >>conftest.$ac_ext
16643cat >>conftest.$ac_ext <<_ACEOF
16644/* end confdefs.h. */
edfaf76d
LK
16645/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16646 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16647#define $ac_func innocuous_$ac_func
16648
98418dba 16649/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16650 which can conflict with char $ac_func (); below.
16651 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16652 <limits.h> exists even on freestanding compilers. */
edfaf76d 16653
19650fd6
AS
16654#ifdef __STDC__
16655# include <limits.h>
16656#else
16657# include <assert.h>
16658#endif
edfaf76d
LK
16659
16660#undef $ac_func
16661
ca81d7a0
JD
16662/* Override any GCC internal prototype to avoid an error.
16663 Use char because int might match the return type of a GCC
16664 builtin and then its argument prototype would still apply. */
503d2be0
AS
16665#ifdef __cplusplus
16666extern "C"
16667#endif
98418dba 16668char $ac_func ();
98418dba
CW
16669/* The GNU C library defines this for functions which it implements
16670 to always fail with ENOSYS. Some functions are actually named
16671 something starting with __ and the normal name is an alias. */
ca81d7a0 16672#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16673choke me
98418dba
CW
16674#endif
16675
19650fd6
AS
16676int
16677main ()
16678{
ca81d7a0 16679return $ac_func ();
503d2be0
AS
16680 ;
16681 return 0;
16682}
16683_ACEOF
16684rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16685if { (ac_try="$ac_link"
16686case "(($ac_try" in
16687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16688 *) ac_try_echo=$ac_try;;
16689esac
b0448899 16690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16691 (eval "$ac_link") 2>conftest.er1
503d2be0 16692 ac_status=$?
edfaf76d
LK
16693 grep -v '^ *+' conftest.er1 >conftest.err
16694 rm -f conftest.er1
16695 cat conftest.err >&5
b0448899 16696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16697 (exit $ac_status); } && {
16698 test -z "$ac_c_werror_flag" ||
16699 test ! -s conftest.err
b0448899
CY
16700 } && test -s conftest$ac_exeext &&
16701 $as_test_x conftest$ac_exeext; then
98418dba 16702 eval "$as_ac_var=yes"
503d2be0 16703else
b0448899 16704 echo "$as_me: failed program was:" >&5
19650fd6
AS
16705sed 's/^/| /' conftest.$ac_ext >&5
16706
ca81d7a0 16707 eval "$as_ac_var=no"
503d2be0 16708fi
ca81d7a0 16709
f053c89f 16710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16711 conftest$ac_exeext conftest.$ac_ext
ffe36136 16712fi
b0448899
CY
16713ac_res=`eval echo '${'$as_ac_var'}'`
16714 { echo "$as_me:$LINENO: result: $ac_res" >&5
16715echo "${ECHO_T}$ac_res" >&6; }
16716if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16717 cat >>confdefs.h <<_ACEOF
b0448899 16718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16719_ACEOF
ffe36136 16720
ba4481b5 16721fi
98418dba 16722done
ba4481b5 16723
f053c89f
CY
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
b0448899
CY
16740{ echo "$as_me:$LINENO: checking for working mktime" >&5
16741echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba 16742if test "${ac_cv_func_working_mktime+set}" = set; then
b0448899 16743 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
16744else
16745 if test "$cross_compiling" = yes; then
16746 ac_cv_func_working_mktime=no
16747else
16748 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16749/* confdefs.h. */
16750_ACEOF
16751cat confdefs.h >>conftest.$ac_ext
16752cat >>conftest.$ac_ext <<_ACEOF
16753/* end confdefs.h. */
98418dba 16754/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16755#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16756# include <sys/time.h>
16757# include <time.h>
16758#else
f053c89f 16759# ifdef HAVE_SYS_TIME_H
98418dba
CW
16760# include <sys/time.h>
16761# else
16762# include <time.h>
16763# endif
16764#endif
ba4481b5 16765
1e0093ea 16766#include <limits.h>
f053c89f 16767#include <stdlib.h>
edfaf76d 16768
f053c89f 16769#ifdef HAVE_UNISTD_H
98418dba
CW
16770# include <unistd.h>
16771#endif
ba4481b5 16772
f053c89f 16773#ifndef HAVE_ALARM
98418dba
CW
16774# define alarm(X) /* empty */
16775#endif
df645f7c 16776
98418dba
CW
16777/* Work around redefinition to rpl_putenv by other config tests. */
16778#undef putenv
df645f7c 16779
98418dba 16780static time_t time_t_max;
edfaf76d 16781static time_t time_t_min;
df645f7c 16782
98418dba 16783/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16784static char *tz_strings[] = {
16785 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16786 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16787};
16788#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16789
ca81d7a0 16790/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16791 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16792static int
98418dba
CW
16793spring_forward_gap ()
16794{
16795 /* glibc (up to about 1998-10-07) failed this test. */
16796 struct tm tm;
16797
16798 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16799 instead of "TZ=America/Vancouver" in order to detect the bug even
16800 on systems that don't support the Olson extension, or don't have the
16801 full zoneinfo tables installed. */
16802 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16803
16804 tm.tm_year = 98;
16805 tm.tm_mon = 3;
16806 tm.tm_mday = 5;
16807 tm.tm_hour = 2;
16808 tm.tm_min = 0;
16809 tm.tm_sec = 0;
16810 tm.tm_isdst = -1;
ca81d7a0 16811 return mktime (&tm) != (time_t) -1;
98418dba
CW
16812}
16813
ca81d7a0 16814static int
edfaf76d 16815mktime_test1 (now)
98418dba
CW
16816 time_t now;
16817{
16818 struct tm *lt;
ca81d7a0 16819 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16820}
16821
ca81d7a0 16822static int
edfaf76d
LK
16823mktime_test (now)
16824 time_t now;
16825{
ca81d7a0
JD
16826 return (mktime_test1 (now)
16827 && mktime_test1 ((time_t) (time_t_max - now))
16828 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16829}
16830
ca81d7a0 16831static int
98418dba
CW
16832irix_6_4_bug ()
16833{
16834 /* Based on code from Ariel Faigon. */
16835 struct tm tm;
16836 tm.tm_year = 96;
16837 tm.tm_mon = 3;
16838 tm.tm_mday = 0;
16839 tm.tm_hour = 0;
16840 tm.tm_min = 0;
16841 tm.tm_sec = 0;
16842 tm.tm_isdst = -1;
16843 mktime (&tm);
ca81d7a0 16844 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16845}
16846
ca81d7a0 16847static int
98418dba
CW
16848bigtime_test (j)
16849 int j;
16850{
16851 struct tm tm;
16852 time_t now;
16853 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16854 now = mktime (&tm);
16855 if (now != (time_t) -1)
16856 {
16857 struct tm *lt = localtime (&now);
16858 if (! (lt
16859 && lt->tm_year == tm.tm_year
16860 && lt->tm_mon == tm.tm_mon
16861 && lt->tm_mday == tm.tm_mday
16862 && lt->tm_hour == tm.tm_hour
16863 && lt->tm_min == tm.tm_min
16864 && lt->tm_sec == tm.tm_sec
16865 && lt->tm_yday == tm.tm_yday
16866 && lt->tm_wday == tm.tm_wday
16867 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16868 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16869 return 0;
98418dba 16870 }
ca81d7a0 16871 return 1;
98418dba
CW
16872}
16873
f053c89f
CY
16874static int
16875year_2050_test ()
16876{
16877 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16878 ignoring leap seconds. */
16879 unsigned long int answer = 2527315200UL;
16880
16881 struct tm tm;
16882 time_t t;
16883 tm.tm_year = 2050 - 1900;
16884 tm.tm_mon = 2 - 1;
16885 tm.tm_mday = 1;
16886 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16887 tm.tm_isdst = -1;
16888
16889 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16890 instead of "TZ=America/Vancouver" in order to detect the bug even
16891 on systems that don't support the Olson extension, or don't have the
16892 full zoneinfo tables installed. */
16893 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16894
16895 t = mktime (&tm);
16896
16897 /* Check that the result is either a failure, or close enough
16898 to the correct answer that we can assume the discrepancy is
16899 due to leap seconds. */
16900 return (t == (time_t) -1
16901 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16902}
16903
16904int
16905main ()
16906{
16907 time_t t, delta;
16908 int i, j;
16909
16910 /* This test makes some buggy mktime implementations loop.
16911 Give up after 60 seconds; a mktime slower than that
16912 isn't worth using anyway. */
16913 alarm (60);
16914
1e0093ea
MB
16915 for (;;)
16916 {
16917 t = (time_t_max << 1) + 1;
16918 if (t <= time_t_max)
16919 break;
16920 time_t_max = t;
16921 }
16922 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
16923
98418dba
CW
16924 delta = time_t_max / 997; /* a suitable prime number */
16925 for (i = 0; i < N_STRINGS; i++)
16926 {
16927 if (tz_strings[i])
16928 putenv (tz_strings[i]);
503d2be0 16929
98418dba 16930 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16931 if (! mktime_test (t))
16932 return 1;
16933 if (! (mktime_test ((time_t) 1)
16934 && mktime_test ((time_t) (60 * 60))
16935 && mktime_test ((time_t) (60 * 60 * 24))))
16936 return 1;
98418dba 16937
1e0093ea 16938 for (j = 1; ; j <<= 1)
ca81d7a0
JD
16939 if (! bigtime_test (j))
16940 return 1;
1e0093ea
MB
16941 else if (INT_MAX / 2 < j)
16942 break;
16943 if (! bigtime_test (INT_MAX))
ca81d7a0 16944 return 1;
98418dba 16945 }
f053c89f 16946 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16947}
16948_ACEOF
98418dba 16949rm -f conftest$ac_exeext
ca81d7a0
JD
16950if { (ac_try="$ac_link"
16951case "(($ac_try" in
16952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16953 *) ac_try_echo=$ac_try;;
16954esac
b0448899 16955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16956 (eval "$ac_link") 2>&5
503d2be0 16957 ac_status=$?
b0448899 16958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16960 { (case "(($ac_try" in
16961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16962 *) ac_try_echo=$ac_try;;
16963esac
b0448899 16964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16965 (eval "$ac_try") 2>&5
503d2be0 16966 ac_status=$?
b0448899 16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16968 (exit $ac_status); }; }; then
98418dba 16969 ac_cv_func_working_mktime=yes
503d2be0 16970else
b0448899
CY
16971 echo "$as_me: program exited with status $ac_status" >&5
16972echo "$as_me: failed program was:" >&5
19650fd6
AS
16973sed 's/^/| /' conftest.$ac_ext >&5
16974
c0d27fcc 16975( exit $ac_status )
98418dba 16976ac_cv_func_working_mktime=no
503d2be0 16977fi
ca81d7a0 16978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16979fi
ca81d7a0
JD
16980
16981
ba4481b5 16982fi
b0448899
CY
16983{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16984echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16985if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16986 case " $LIBOBJS " in
edfaf76d 16987 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16988 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16989 ;;
edfaf76d
LK
16990esac
16991
ba4481b5
DL
16992fi
16993
98418dba 16994if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16995
c0d27fcc 16996cat >>confdefs.h <<\_ACEOF
98418dba 16997#define BROKEN_MKTIME 1
c0d27fcc 16998_ACEOF
ba4481b5 16999
ba4481b5 17000fi
503d2be0 17001
98418dba
CW
17002ac_have_func=no # yes means we've found a way to get the load average.
17003
6bae0ccf
DL
17004# Make sure getloadavg.c is where it belongs, at configure-time.
17005test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
b0448899
CY
17006 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17007echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
6bae0ccf
DL
17008 { (exit 1); exit 1; }; }
17009
98418dba
CW
17010ac_save_LIBS=$LIBS
17011
17012# Check for getloadavg, but be sure not to touch the cache variable.
b0448899
CY
17013({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17014echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17015if test "${ac_cv_func_getloadavg+set}" = set; then
b0448899 17016 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17017else
503d2be0 17018 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17019/* confdefs.h. */
17020_ACEOF
17021cat confdefs.h >>conftest.$ac_ext
17022cat >>conftest.$ac_ext <<_ACEOF
17023/* end confdefs.h. */
edfaf76d
LK
17024/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17025 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17026#define getloadavg innocuous_getloadavg
17027
98418dba 17028/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17029 which can conflict with char getloadavg (); below.
17030 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17031 <limits.h> exists even on freestanding compilers. */
edfaf76d 17032
19650fd6
AS
17033#ifdef __STDC__
17034# include <limits.h>
17035#else
17036# include <assert.h>
17037#endif
edfaf76d
LK
17038
17039#undef getloadavg
17040
ca81d7a0
JD
17041/* Override any GCC internal prototype to avoid an error.
17042 Use char because int might match the return type of a GCC
17043 builtin and then its argument prototype would still apply. */
503d2be0
AS
17044#ifdef __cplusplus
17045extern "C"
17046#endif
98418dba 17047char getloadavg ();
98418dba
CW
17048/* The GNU C library defines this for functions which it implements
17049 to always fail with ENOSYS. Some functions are actually named
17050 something starting with __ and the normal name is an alias. */
ca81d7a0 17051#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17052choke me
cd958eb3
MB
17053#endif
17054
19650fd6
AS
17055int
17056main ()
17057{
ca81d7a0 17058return getloadavg ();
503d2be0
AS
17059 ;
17060 return 0;
17061}
17062_ACEOF
17063rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17064if { (ac_try="$ac_link"
17065case "(($ac_try" in
17066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17067 *) ac_try_echo=$ac_try;;
17068esac
b0448899 17069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17070 (eval "$ac_link") 2>conftest.er1
503d2be0 17071 ac_status=$?
edfaf76d
LK
17072 grep -v '^ *+' conftest.er1 >conftest.err
17073 rm -f conftest.er1
17074 cat conftest.err >&5
b0448899 17075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17076 (exit $ac_status); } && {
17077 test -z "$ac_c_werror_flag" ||
17078 test ! -s conftest.err
b0448899
CY
17079 } && test -s conftest$ac_exeext &&
17080 $as_test_x conftest$ac_exeext; then
98418dba 17081 ac_cv_func_getloadavg=yes
503d2be0 17082else
b0448899 17083 echo "$as_me: failed program was:" >&5
19650fd6
AS
17084sed 's/^/| /' conftest.$ac_ext >&5
17085
ca81d7a0 17086 ac_cv_func_getloadavg=no
503d2be0 17087fi
ca81d7a0 17088
f053c89f 17089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17090 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17091fi
b0448899
CY
17092{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17093echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
17094if test $ac_cv_func_getloadavg = yes; then
98418dba
CW
17095 exit 0
17096else
17097 exit 1
ba4481b5 17098fi
98418dba 17099) && ac_have_func=yes
ba4481b5 17100
98418dba 17101# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17102
98418dba
CW
17103for ac_func in pstat_getdynamic
17104do
b0448899
CY
17105as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17106{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17107echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 17108if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 17109 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17110else
503d2be0 17111 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17112/* confdefs.h. */
17113_ACEOF
17114cat confdefs.h >>conftest.$ac_ext
17115cat >>conftest.$ac_ext <<_ACEOF
17116/* end confdefs.h. */
edfaf76d
LK
17117/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17118 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17119#define $ac_func innocuous_$ac_func
17120
98418dba 17121/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17122 which can conflict with char $ac_func (); below.
17123 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17124 <limits.h> exists even on freestanding compilers. */
edfaf76d 17125
19650fd6
AS
17126#ifdef __STDC__
17127# include <limits.h>
17128#else
17129# include <assert.h>
17130#endif
edfaf76d
LK
17131
17132#undef $ac_func
17133
ca81d7a0
JD
17134/* Override any GCC internal prototype to avoid an error.
17135 Use char because int might match the return type of a GCC
17136 builtin and then its argument prototype would still apply. */
503d2be0
AS
17137#ifdef __cplusplus
17138extern "C"
17139#endif
98418dba 17140char $ac_func ();
98418dba
CW
17141/* The GNU C library defines this for functions which it implements
17142 to always fail with ENOSYS. Some functions are actually named
17143 something starting with __ and the normal name is an alias. */
ca81d7a0 17144#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17145choke me
98418dba
CW
17146#endif
17147
19650fd6
AS
17148int
17149main ()
17150{
ca81d7a0 17151return $ac_func ();
98418dba
CW
17152 ;
17153 return 0;
17154}
f21fadcc 17155_ACEOF
98418dba 17156rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17157if { (ac_try="$ac_link"
17158case "(($ac_try" in
17159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17160 *) ac_try_echo=$ac_try;;
17161esac
b0448899 17162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17163 (eval "$ac_link") 2>conftest.er1
f21fadcc 17164 ac_status=$?
edfaf76d
LK
17165 grep -v '^ *+' conftest.er1 >conftest.err
17166 rm -f conftest.er1
17167 cat conftest.err >&5
b0448899 17168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17169 (exit $ac_status); } && {
17170 test -z "$ac_c_werror_flag" ||
17171 test ! -s conftest.err
b0448899
CY
17172 } && test -s conftest$ac_exeext &&
17173 $as_test_x conftest$ac_exeext; then
98418dba 17174 eval "$as_ac_var=yes"
f21fadcc 17175else
b0448899 17176 echo "$as_me: failed program was:" >&5
19650fd6
AS
17177sed 's/^/| /' conftest.$ac_ext >&5
17178
ca81d7a0 17179 eval "$as_ac_var=no"
f21fadcc 17180fi
ca81d7a0 17181
f053c89f 17182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17183 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17184fi
b0448899
CY
17185ac_res=`eval echo '${'$as_ac_var'}'`
17186 { echo "$as_me:$LINENO: result: $ac_res" >&5
17187echo "${ECHO_T}$ac_res" >&6; }
17188if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17189 cat >>confdefs.h <<_ACEOF
b0448899 17190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17191_ACEOF
98418dba
CW
17192
17193fi
17194done
17195
c0d27fcc 17196
98418dba
CW
17197# Solaris has libkstat which does not require root.
17198
b0448899
CY
17199{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17200echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17201if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
b0448899 17202 echo $ECHO_N "(cached) $ECHO_C" >&6
f21fadcc
JD
17203else
17204 ac_check_lib_save_LIBS=$LIBS
98418dba 17205LIBS="-lkstat $LIBS"
f21fadcc 17206cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17207/* confdefs.h. */
17208_ACEOF
17209cat confdefs.h >>conftest.$ac_ext
17210cat >>conftest.$ac_ext <<_ACEOF
17211/* end confdefs.h. */
f21fadcc 17212
ca81d7a0
JD
17213/* Override any GCC internal prototype to avoid an error.
17214 Use char because int might match the return type of a GCC
17215 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17216#ifdef __cplusplus
17217extern "C"
17218#endif
98418dba 17219char kstat_open ();
f21fadcc
JD
17220int
17221main ()
17222{
ca81d7a0 17223return kstat_open ();
f21fadcc
JD
17224 ;
17225 return 0;
17226}
17227_ACEOF
17228rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17229if { (ac_try="$ac_link"
17230case "(($ac_try" in
17231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17232 *) ac_try_echo=$ac_try;;
17233esac
b0448899 17234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17235 (eval "$ac_link") 2>conftest.er1
f21fadcc 17236 ac_status=$?
edfaf76d
LK
17237 grep -v '^ *+' conftest.er1 >conftest.err
17238 rm -f conftest.er1
17239 cat conftest.err >&5
b0448899 17240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17241 (exit $ac_status); } && {
17242 test -z "$ac_c_werror_flag" ||
17243 test ! -s conftest.err
b0448899
CY
17244 } && test -s conftest$ac_exeext &&
17245 $as_test_x conftest$ac_exeext; then
98418dba 17246 ac_cv_lib_kstat_kstat_open=yes
f21fadcc 17247else
b0448899 17248 echo "$as_me: failed program was:" >&5
19650fd6
AS
17249sed 's/^/| /' conftest.$ac_ext >&5
17250
ca81d7a0 17251 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17252fi
ca81d7a0 17253
f053c89f 17254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17255 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17256LIBS=$ac_check_lib_save_LIBS
17257fi
b0448899
CY
17258{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17259echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
17260if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17261 cat >>confdefs.h <<_ACEOF
98418dba 17262#define HAVE_LIBKSTAT 1
c0d27fcc 17263_ACEOF
f21fadcc 17264
98418dba 17265 LIBS="-lkstat $LIBS"
f21fadcc 17266
f21fadcc
JD
17267fi
17268
98418dba
CW
17269test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17270
17271# Some systems with -lutil have (and need) -lkvm as well, some do not.
17272# On Solaris, -lkvm requires nlist from -lelf, so check that first
17273# to get the right answer into the cache.
17274# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17275if test $ac_have_func = no; then
b0448899
CY
17276 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17277echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17278if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
b0448899 17279 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17280else
98418dba
CW
17281 ac_check_lib_save_LIBS=$LIBS
17282LIBS="-lelf $LIBS"
17283cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17284/* confdefs.h. */
17285_ACEOF
17286cat confdefs.h >>conftest.$ac_ext
17287cat >>conftest.$ac_ext <<_ACEOF
17288/* end confdefs.h. */
98418dba 17289
ca81d7a0
JD
17290/* Override any GCC internal prototype to avoid an error.
17291 Use char because int might match the return type of a GCC
17292 builtin and then its argument prototype would still apply. */
98418dba
CW
17293#ifdef __cplusplus
17294extern "C"
17295#endif
98418dba 17296char elf_begin ();
503d2be0
AS
17297int
17298main ()
17299{
ca81d7a0 17300return elf_begin ();
503d2be0
AS
17301 ;
17302 return 0;
17303}
17304_ACEOF
17305rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17306if { (ac_try="$ac_link"
17307case "(($ac_try" in
17308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17309 *) ac_try_echo=$ac_try;;
17310esac
b0448899 17311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17312 (eval "$ac_link") 2>conftest.er1
503d2be0 17313 ac_status=$?
edfaf76d
LK
17314 grep -v '^ *+' conftest.er1 >conftest.err
17315 rm -f conftest.er1
17316 cat conftest.err >&5
b0448899 17317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17318 (exit $ac_status); } && {
17319 test -z "$ac_c_werror_flag" ||
17320 test ! -s conftest.err
b0448899
CY
17321 } && test -s conftest$ac_exeext &&
17322 $as_test_x conftest$ac_exeext; then
98418dba 17323 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17324else
b0448899 17325 echo "$as_me: failed program was:" >&5
19650fd6
AS
17326sed 's/^/| /' conftest.$ac_ext >&5
17327
ca81d7a0 17328 ac_cv_lib_elf_elf_begin=no
ba4481b5 17329fi
ca81d7a0 17330
f053c89f 17331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17332 conftest$ac_exeext conftest.$ac_ext
98418dba 17333LIBS=$ac_check_lib_save_LIBS
ba4481b5 17334fi
b0448899
CY
17335{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17336echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
17337if test $ac_cv_lib_elf_elf_begin = yes; then
98418dba 17338 LIBS="-lelf $LIBS"
ba4481b5
DL
17339fi
17340
98418dba
CW
17341fi
17342if test $ac_have_func = no; then
b0448899
CY
17343 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17344echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17345if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
b0448899 17346 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17347else
98418dba
CW
17348 ac_check_lib_save_LIBS=$LIBS
17349LIBS="-lkvm $LIBS"
17350cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17351/* confdefs.h. */
17352_ACEOF
17353cat confdefs.h >>conftest.$ac_ext
17354cat >>conftest.$ac_ext <<_ACEOF
17355/* end confdefs.h. */
98418dba 17356
ca81d7a0
JD
17357/* Override any GCC internal prototype to avoid an error.
17358 Use char because int might match the return type of a GCC
17359 builtin and then its argument prototype would still apply. */
98418dba
CW
17360#ifdef __cplusplus
17361extern "C"
17362#endif
98418dba 17363char kvm_open ();
503d2be0
AS
17364int
17365main ()
17366{
ca81d7a0 17367return kvm_open ();
503d2be0
AS
17368 ;
17369 return 0;
17370}
17371_ACEOF
17372rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17373if { (ac_try="$ac_link"
17374case "(($ac_try" in
17375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17376 *) ac_try_echo=$ac_try;;
17377esac
b0448899 17378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17379 (eval "$ac_link") 2>conftest.er1
503d2be0 17380 ac_status=$?
edfaf76d
LK
17381 grep -v '^ *+' conftest.er1 >conftest.err
17382 rm -f conftest.er1
17383 cat conftest.err >&5
b0448899 17384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17385 (exit $ac_status); } && {
17386 test -z "$ac_c_werror_flag" ||
17387 test ! -s conftest.err
b0448899
CY
17388 } && test -s conftest$ac_exeext &&
17389 $as_test_x conftest$ac_exeext; then
98418dba 17390 ac_cv_lib_kvm_kvm_open=yes
503d2be0 17391else
b0448899 17392 echo "$as_me: failed program was:" >&5
19650fd6
AS
17393sed 's/^/| /' conftest.$ac_ext >&5
17394
ca81d7a0 17395 ac_cv_lib_kvm_kvm_open=no
503d2be0 17396fi
ca81d7a0 17397
f053c89f 17398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17399 conftest$ac_exeext conftest.$ac_ext
98418dba 17400LIBS=$ac_check_lib_save_LIBS
503d2be0 17401fi
b0448899
CY
17402{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17403echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
17404if test $ac_cv_lib_kvm_kvm_open = yes; then
98418dba 17405 LIBS="-lkvm $LIBS"
ba4481b5
DL
17406fi
17407
98418dba 17408 # Check for the 4.4BSD definition of getloadavg.
b0448899
CY
17409 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17410echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17411if test "${ac_cv_lib_util_getloadavg+set}" = set; then
b0448899 17412 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17413else
98418dba
CW
17414 ac_check_lib_save_LIBS=$LIBS
17415LIBS="-lutil $LIBS"
17416cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17417/* confdefs.h. */
17418_ACEOF
17419cat confdefs.h >>conftest.$ac_ext
17420cat >>conftest.$ac_ext <<_ACEOF
17421/* end confdefs.h. */
98418dba 17422
ca81d7a0
JD
17423/* Override any GCC internal prototype to avoid an error.
17424 Use char because int might match the return type of a GCC
17425 builtin and then its argument prototype would still apply. */
98418dba
CW
17426#ifdef __cplusplus
17427extern "C"
17428#endif
98418dba 17429char getloadavg ();
503d2be0
AS
17430int
17431main ()
17432{
ca81d7a0 17433return getloadavg ();
503d2be0
AS
17434 ;
17435 return 0;
17436}
17437_ACEOF
17438rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17439if { (ac_try="$ac_link"
17440case "(($ac_try" in
17441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17442 *) ac_try_echo=$ac_try;;
17443esac
b0448899 17444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17445 (eval "$ac_link") 2>conftest.er1
503d2be0 17446 ac_status=$?
edfaf76d
LK
17447 grep -v '^ *+' conftest.er1 >conftest.err
17448 rm -f conftest.er1
17449 cat conftest.err >&5
b0448899 17450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17451 (exit $ac_status); } && {
17452 test -z "$ac_c_werror_flag" ||
17453 test ! -s conftest.err
b0448899
CY
17454 } && test -s conftest$ac_exeext &&
17455 $as_test_x conftest$ac_exeext; then
35996d22
AS
17456 ac_cv_lib_util_getloadavg=yes
17457else
b0448899 17458 echo "$as_me: failed program was:" >&5
19650fd6
AS
17459sed 's/^/| /' conftest.$ac_ext >&5
17460
ca81d7a0 17461 ac_cv_lib_util_getloadavg=no
ba4481b5 17462fi
ca81d7a0 17463
f053c89f 17464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17465 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17466LIBS=$ac_check_lib_save_LIBS
17467fi
b0448899
CY
17468{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17469echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
17470if test $ac_cv_lib_util_getloadavg = yes; then
98418dba 17471 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17472fi
503d2be0 17473
98418dba 17474fi
ba4481b5 17475
98418dba
CW
17476if test $ac_have_func = no; then
17477 # There is a commonly available library for RS/6000 AIX.
17478 # Since it is not a standard part of AIX, it might be installed locally.
17479 ac_getloadavg_LIBS=$LIBS
17480 LIBS="-L/usr/local/lib $LIBS"
b0448899
CY
17481 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17482echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17483if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
b0448899 17484 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17485else
98418dba
CW
17486 ac_check_lib_save_LIBS=$LIBS
17487LIBS="-lgetloadavg $LIBS"
17488cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17489/* confdefs.h. */
17490_ACEOF
17491cat confdefs.h >>conftest.$ac_ext
17492cat >>conftest.$ac_ext <<_ACEOF
17493/* end confdefs.h. */
ba4481b5 17494
ca81d7a0
JD
17495/* Override any GCC internal prototype to avoid an error.
17496 Use char because int might match the return type of a GCC
17497 builtin and then its argument prototype would still apply. */
98418dba
CW
17498#ifdef __cplusplus
17499extern "C"
17500#endif
98418dba 17501char getloadavg ();
98418dba
CW
17502int
17503main ()
17504{
ca81d7a0 17505return getloadavg ();
98418dba
CW
17506 ;
17507 return 0;
17508}
503d2be0 17509_ACEOF
98418dba 17510rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17511if { (ac_try="$ac_link"
17512case "(($ac_try" in
17513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17514 *) ac_try_echo=$ac_try;;
17515esac
b0448899 17516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17517 (eval "$ac_link") 2>conftest.er1
98418dba 17518 ac_status=$?
edfaf76d
LK
17519 grep -v '^ *+' conftest.er1 >conftest.err
17520 rm -f conftest.er1
17521 cat conftest.err >&5
b0448899 17522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17523 (exit $ac_status); } && {
17524 test -z "$ac_c_werror_flag" ||
17525 test ! -s conftest.err
b0448899
CY
17526 } && test -s conftest$ac_exeext &&
17527 $as_test_x conftest$ac_exeext; then
98418dba 17528 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17529else
b0448899 17530 echo "$as_me: failed program was:" >&5
19650fd6
AS
17531sed 's/^/| /' conftest.$ac_ext >&5
17532
ca81d7a0 17533 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17534fi
ca81d7a0 17535
f053c89f 17536rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17537 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17538LIBS=$ac_check_lib_save_LIBS
17539fi
b0448899
CY
17540{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17541echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
17542if test $ac_cv_lib_getloadavg_getloadavg = yes; then
98418dba
CW
17543 LIBS="-lgetloadavg $LIBS"
17544else
17545 LIBS=$ac_getloadavg_LIBS
ba4481b5 17546fi
ba4481b5
DL
17547
17548fi
98418dba
CW
17549
17550# Make sure it is really in the library, if we think we found it,
17551# otherwise set up the replacement function.
17552
17553for ac_func in getloadavg
17554do
b0448899
CY
17555as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17556{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17557echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 17558if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 17559 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17560else
503d2be0 17561 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17562/* confdefs.h. */
17563_ACEOF
17564cat confdefs.h >>conftest.$ac_ext
17565cat >>conftest.$ac_ext <<_ACEOF
17566/* end confdefs.h. */
edfaf76d
LK
17567/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17568 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17569#define $ac_func innocuous_$ac_func
17570
ba4481b5 17571/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17572 which can conflict with char $ac_func (); below.
17573 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17574 <limits.h> exists even on freestanding compilers. */
edfaf76d 17575
19650fd6
AS
17576#ifdef __STDC__
17577# include <limits.h>
17578#else
17579# include <assert.h>
17580#endif
edfaf76d
LK
17581
17582#undef $ac_func
17583
ca81d7a0
JD
17584/* Override any GCC internal prototype to avoid an error.
17585 Use char because int might match the return type of a GCC
17586 builtin and then its argument prototype would still apply. */
503d2be0
AS
17587#ifdef __cplusplus
17588extern "C"
17589#endif
503d2be0 17590char $ac_func ();
ba4481b5
DL
17591/* The GNU C library defines this for functions which it implements
17592 to always fail with ENOSYS. Some functions are actually named
17593 something starting with __ and the normal name is an alias. */
ca81d7a0 17594#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17595choke me
cd958eb3
MB
17596#endif
17597
19650fd6
AS
17598int
17599main ()
17600{
ca81d7a0 17601return $ac_func ();
503d2be0
AS
17602 ;
17603 return 0;
17604}
17605_ACEOF
17606rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17607if { (ac_try="$ac_link"
17608case "(($ac_try" in
17609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17610 *) ac_try_echo=$ac_try;;
17611esac
b0448899 17612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17613 (eval "$ac_link") 2>conftest.er1
503d2be0 17614 ac_status=$?
edfaf76d
LK
17615 grep -v '^ *+' conftest.er1 >conftest.err
17616 rm -f conftest.er1
17617 cat conftest.err >&5
b0448899 17618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17619 (exit $ac_status); } && {
17620 test -z "$ac_c_werror_flag" ||
17621 test ! -s conftest.err
b0448899
CY
17622 } && test -s conftest$ac_exeext &&
17623 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17624 eval "$as_ac_var=yes"
17625else
b0448899 17626 echo "$as_me: failed program was:" >&5
19650fd6
AS
17627sed 's/^/| /' conftest.$ac_ext >&5
17628
ca81d7a0 17629 eval "$as_ac_var=no"
503d2be0 17630fi
ca81d7a0 17631
f053c89f 17632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17633 conftest$ac_exeext conftest.$ac_ext
503d2be0 17634fi
b0448899
CY
17635ac_res=`eval echo '${'$as_ac_var'}'`
17636 { echo "$as_me:$LINENO: result: $ac_res" >&5
17637echo "${ECHO_T}$ac_res" >&6; }
17638if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17639 cat >>confdefs.h <<_ACEOF
b0448899 17640#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17641_ACEOF
503d2be0 17642
98418dba 17643else
ca81d7a0 17644 case " $LIBOBJS " in
edfaf76d 17645 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17646 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17647 ;;
edfaf76d
LK
17648esac
17649
ba4481b5 17650
c0d27fcc 17651cat >>confdefs.h <<\_ACEOF
98418dba 17652#define C_GETLOADAVG 1
c0d27fcc 17653_ACEOF
ba4481b5 17654
98418dba
CW
17655# Figure out what our getloadavg.c needs.
17656ac_have_func=no
c0d27fcc 17657if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
b0448899
CY
17658 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17659echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17660if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
b0448899 17661 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17662fi
b0448899
CY
17663{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17664echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17665else
c0d27fcc 17666 # Is the header compilable?
b0448899
CY
17667{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17668echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17669cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17670/* confdefs.h. */
17671_ACEOF
17672cat confdefs.h >>conftest.$ac_ext
17673cat >>conftest.$ac_ext <<_ACEOF
17674/* end confdefs.h. */
c0d27fcc
MR
17675$ac_includes_default
17676#include <sys/dg_sys_info.h>
17677_ACEOF
17678rm -f conftest.$ac_objext
ca81d7a0
JD
17679if { (ac_try="$ac_compile"
17680case "(($ac_try" in
17681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17682 *) ac_try_echo=$ac_try;;
17683esac
b0448899 17684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17685 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17686 ac_status=$?
edfaf76d
LK
17687 grep -v '^ *+' conftest.er1 >conftest.err
17688 rm -f conftest.er1
17689 cat conftest.err >&5
b0448899 17690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17691 (exit $ac_status); } && {
17692 test -z "$ac_c_werror_flag" ||
17693 test ! -s conftest.err
17694 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17695 ac_header_compiler=yes
17696else
b0448899 17697 echo "$as_me: failed program was:" >&5
19650fd6
AS
17698sed 's/^/| /' conftest.$ac_ext >&5
17699
ca81d7a0 17700 ac_header_compiler=no
c0d27fcc 17701fi
ca81d7a0
JD
17702
17703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
17704{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17705echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17706
17707# Is the header present?
b0448899
CY
17708{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17709echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17710cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17711/* confdefs.h. */
17712_ACEOF
17713cat confdefs.h >>conftest.$ac_ext
17714cat >>conftest.$ac_ext <<_ACEOF
17715/* end confdefs.h. */
98418dba
CW
17716#include <sys/dg_sys_info.h>
17717_ACEOF
ca81d7a0
JD
17718if { (ac_try="$ac_cpp conftest.$ac_ext"
17719case "(($ac_try" in
17720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17721 *) ac_try_echo=$ac_try;;
17722esac
b0448899 17723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17724 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17725 ac_status=$?
6bae0ccf 17726 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17727 rm -f conftest.er1
17728 cat conftest.err >&5
b0448899 17729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17730 (exit $ac_status); } >/dev/null && {
17731 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17732 test ! -s conftest.err
17733 }; then
c0d27fcc 17734 ac_header_preproc=yes
98418dba 17735else
b0448899 17736 echo "$as_me: failed program was:" >&5
19650fd6
AS
17737sed 's/^/| /' conftest.$ac_ext >&5
17738
c0d27fcc 17739 ac_header_preproc=no
ba4481b5 17740fi
ca81d7a0 17741
98418dba 17742rm -f conftest.err conftest.$ac_ext
b0448899
CY
17743{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17744echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17745
17746# So? What about this header?
edfaf76d
LK
17747case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17748 yes:no: )
b0448899
CY
17749 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17750echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17751 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17752echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
edfaf76d 17753 ac_header_preproc=yes
19650fd6 17754 ;;
edfaf76d 17755 no:yes:* )
b0448899
CY
17756 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17757echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
17758 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17759echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17760 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17761echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17762 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17763echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
17764 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
17765echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
17766 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17767echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17768
19650fd6 17769 ;;
c0d27fcc 17770esac
b0448899
CY
17771{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17772echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc 17773if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
b0448899 17774 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17775else
17776 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17777fi
b0448899
CY
17778{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17779echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17780
17781fi
b0448899 17782if test $ac_cv_header_sys_dg_sys_info_h = yes; then
98418dba 17783 ac_have_func=yes
ba4481b5 17784
c0d27fcc 17785cat >>confdefs.h <<\_ACEOF
98418dba 17786#define DGUX 1
c0d27fcc
MR
17787_ACEOF
17788
503d2be0 17789
b0448899
CY
17790{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17791echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17792if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
b0448899 17793 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17794else
503d2be0 17795 ac_check_lib_save_LIBS=$LIBS
98418dba 17796LIBS="-ldgc $LIBS"
503d2be0 17797cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17798/* confdefs.h. */
17799_ACEOF
17800cat confdefs.h >>conftest.$ac_ext
17801cat >>conftest.$ac_ext <<_ACEOF
17802/* end confdefs.h. */
503d2be0 17803
ca81d7a0
JD
17804/* Override any GCC internal prototype to avoid an error.
17805 Use char because int might match the return type of a GCC
17806 builtin and then its argument prototype would still apply. */
503d2be0
AS
17807#ifdef __cplusplus
17808extern "C"
17809#endif
98418dba 17810char dg_sys_info ();
503d2be0
AS
17811int
17812main ()
17813{
ca81d7a0 17814return dg_sys_info ();
503d2be0
AS
17815 ;
17816 return 0;
17817}
17818_ACEOF
17819rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17820if { (ac_try="$ac_link"
17821case "(($ac_try" in
17822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17823 *) ac_try_echo=$ac_try;;
17824esac
b0448899 17825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17826 (eval "$ac_link") 2>conftest.er1
503d2be0 17827 ac_status=$?
edfaf76d
LK
17828 grep -v '^ *+' conftest.er1 >conftest.err
17829 rm -f conftest.er1
17830 cat conftest.err >&5
b0448899 17831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17832 (exit $ac_status); } && {
17833 test -z "$ac_c_werror_flag" ||
17834 test ! -s conftest.err
b0448899
CY
17835 } && test -s conftest$ac_exeext &&
17836 $as_test_x conftest$ac_exeext; then
98418dba 17837 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0 17838else
b0448899 17839 echo "$as_me: failed program was:" >&5
19650fd6
AS
17840sed 's/^/| /' conftest.$ac_ext >&5
17841
ca81d7a0 17842 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17843fi
ca81d7a0 17844
f053c89f 17845rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17846 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17847LIBS=$ac_check_lib_save_LIBS
17848fi
b0448899
CY
17849{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17850echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
17851if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17852 cat >>confdefs.h <<_ACEOF
98418dba 17853#define HAVE_LIBDGC 1
c0d27fcc 17854_ACEOF
ba4481b5 17855
98418dba 17856 LIBS="-ldgc $LIBS"
ba4481b5 17857
ba4481b5
DL
17858fi
17859
98418dba 17860fi
503d2be0 17861
c0d27fcc
MR
17862
17863
17864if test "${ac_cv_header_locale_h+set}" = set; then
b0448899
CY
17865 { echo "$as_me:$LINENO: checking for locale.h" >&5
17866echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17867if test "${ac_cv_header_locale_h+set}" = set; then
b0448899 17868 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17869fi
b0448899
CY
17870{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17871echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17872else
c0d27fcc 17873 # Is the header compilable?
b0448899
CY
17874{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17875echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17876cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17877/* confdefs.h. */
17878_ACEOF
17879cat confdefs.h >>conftest.$ac_ext
17880cat >>conftest.$ac_ext <<_ACEOF
17881/* end confdefs.h. */
c0d27fcc
MR
17882$ac_includes_default
17883#include <locale.h>
17884_ACEOF
17885rm -f conftest.$ac_objext
ca81d7a0
JD
17886if { (ac_try="$ac_compile"
17887case "(($ac_try" in
17888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17889 *) ac_try_echo=$ac_try;;
17890esac
b0448899 17891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17892 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17893 ac_status=$?
edfaf76d
LK
17894 grep -v '^ *+' conftest.er1 >conftest.err
17895 rm -f conftest.er1
17896 cat conftest.err >&5
b0448899 17897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17898 (exit $ac_status); } && {
17899 test -z "$ac_c_werror_flag" ||
17900 test ! -s conftest.err
17901 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17902 ac_header_compiler=yes
17903else
b0448899 17904 echo "$as_me: failed program was:" >&5
19650fd6
AS
17905sed 's/^/| /' conftest.$ac_ext >&5
17906
ca81d7a0 17907 ac_header_compiler=no
c0d27fcc 17908fi
ca81d7a0
JD
17909
17910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
17911{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17912echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17913
17914# Is the header present?
b0448899
CY
17915{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17916echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17917cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17918/* confdefs.h. */
17919_ACEOF
17920cat confdefs.h >>conftest.$ac_ext
17921cat >>conftest.$ac_ext <<_ACEOF
17922/* end confdefs.h. */
98418dba 17923#include <locale.h>
503d2be0 17924_ACEOF
ca81d7a0
JD
17925if { (ac_try="$ac_cpp conftest.$ac_ext"
17926case "(($ac_try" in
17927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17928 *) ac_try_echo=$ac_try;;
17929esac
b0448899 17930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17931 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17932 ac_status=$?
6bae0ccf 17933 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17934 rm -f conftest.er1
17935 cat conftest.err >&5
b0448899 17936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17937 (exit $ac_status); } >/dev/null && {
17938 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17939 test ! -s conftest.err
17940 }; then
c0d27fcc 17941 ac_header_preproc=yes
98418dba 17942else
b0448899 17943 echo "$as_me: failed program was:" >&5
19650fd6
AS
17944sed 's/^/| /' conftest.$ac_ext >&5
17945
c0d27fcc 17946 ac_header_preproc=no
ba4481b5 17947fi
ca81d7a0 17948
98418dba 17949rm -f conftest.err conftest.$ac_ext
b0448899
CY
17950{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17951echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17952
17953# So? What about this header?
edfaf76d
LK
17954case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17955 yes:no: )
b0448899
CY
17956 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17957echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17958 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17959echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
edfaf76d 17960 ac_header_preproc=yes
19650fd6 17961 ;;
edfaf76d 17962 no:yes:* )
b0448899
CY
17963 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17964echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
17965 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17966echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17967 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17968echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17969 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17970echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
17971 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
17972echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
17973 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17974echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17975
19650fd6 17976 ;;
c0d27fcc 17977esac
b0448899
CY
17978{ echo "$as_me:$LINENO: checking for locale.h" >&5
17979echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc 17980if test "${ac_cv_header_locale_h+set}" = set; then
b0448899 17981 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17982else
17983 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17984fi
b0448899
CY
17985{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17986echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17987
c0d27fcc
MR
17988fi
17989
17990
17991
98418dba 17992for ac_func in setlocale
ba4481b5 17993do
b0448899
CY
17994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17995{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 17997if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 17998 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17999else
503d2be0 18000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18001/* confdefs.h. */
18002_ACEOF
18003cat confdefs.h >>conftest.$ac_ext
18004cat >>conftest.$ac_ext <<_ACEOF
18005/* end confdefs.h. */
edfaf76d
LK
18006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18008#define $ac_func innocuous_$ac_func
18009
ba4481b5 18010/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18011 which can conflict with char $ac_func (); below.
18012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18013 <limits.h> exists even on freestanding compilers. */
edfaf76d 18014
19650fd6
AS
18015#ifdef __STDC__
18016# include <limits.h>
18017#else
18018# include <assert.h>
18019#endif
edfaf76d
LK
18020
18021#undef $ac_func
18022
ca81d7a0
JD
18023/* Override any GCC internal prototype to avoid an error.
18024 Use char because int might match the return type of a GCC
18025 builtin and then its argument prototype would still apply. */
503d2be0
AS
18026#ifdef __cplusplus
18027extern "C"
18028#endif
503d2be0 18029char $ac_func ();
ba4481b5
DL
18030/* The GNU C library defines this for functions which it implements
18031 to always fail with ENOSYS. Some functions are actually named
18032 something starting with __ and the normal name is an alias. */
ca81d7a0 18033#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18034choke me
ba4481b5
DL
18035#endif
18036
19650fd6
AS
18037int
18038main ()
18039{
ca81d7a0 18040return $ac_func ();
503d2be0
AS
18041 ;
18042 return 0;
18043}
18044_ACEOF
18045rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18046if { (ac_try="$ac_link"
18047case "(($ac_try" in
18048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18049 *) ac_try_echo=$ac_try;;
18050esac
b0448899 18051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18052 (eval "$ac_link") 2>conftest.er1
503d2be0 18053 ac_status=$?
edfaf76d
LK
18054 grep -v '^ *+' conftest.er1 >conftest.err
18055 rm -f conftest.er1
18056 cat conftest.err >&5
b0448899 18057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18058 (exit $ac_status); } && {
18059 test -z "$ac_c_werror_flag" ||
18060 test ! -s conftest.err
b0448899
CY
18061 } && test -s conftest$ac_exeext &&
18062 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18063 eval "$as_ac_var=yes"
18064else
b0448899 18065 echo "$as_me: failed program was:" >&5
19650fd6
AS
18066sed 's/^/| /' conftest.$ac_ext >&5
18067
ca81d7a0 18068 eval "$as_ac_var=no"
503d2be0 18069fi
ca81d7a0 18070
f053c89f 18071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18072 conftest$ac_exeext conftest.$ac_ext
503d2be0 18073fi
b0448899
CY
18074ac_res=`eval echo '${'$as_ac_var'}'`
18075 { echo "$as_me:$LINENO: result: $ac_res" >&5
18076echo "${ECHO_T}$ac_res" >&6; }
18077if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18078 cat >>confdefs.h <<_ACEOF
b0448899 18079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18080_ACEOF
ba4481b5 18081
ba4481b5
DL
18082fi
18083done
18084
c0d27fcc 18085
98418dba
CW
18086# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18087# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18088# Irix 4.0.5F has the header but not the library.
18089if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18090 ac_have_func=yes
18091
c0d27fcc 18092cat >>confdefs.h <<\_ACEOF
98418dba 18093#define SVR4 1
c0d27fcc 18094_ACEOF
98418dba
CW
18095
18096fi
18097
18098if test $ac_have_func = no; then
c0d27fcc 18099 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
b0448899
CY
18100 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18101echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18102if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
b0448899 18103 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18104fi
b0448899
CY
18105{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18106echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18107else
c0d27fcc 18108 # Is the header compilable?
b0448899
CY
18109{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18110echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18111cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18112/* confdefs.h. */
18113_ACEOF
18114cat confdefs.h >>conftest.$ac_ext
18115cat >>conftest.$ac_ext <<_ACEOF
18116/* end confdefs.h. */
c0d27fcc
MR
18117$ac_includes_default
18118#include <inq_stats/cpustats.h>
18119_ACEOF
18120rm -f conftest.$ac_objext
ca81d7a0
JD
18121if { (ac_try="$ac_compile"
18122case "(($ac_try" in
18123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18124 *) ac_try_echo=$ac_try;;
18125esac
b0448899 18126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18127 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18128 ac_status=$?
edfaf76d
LK
18129 grep -v '^ *+' conftest.er1 >conftest.err
18130 rm -f conftest.er1
18131 cat conftest.err >&5
b0448899 18132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18133 (exit $ac_status); } && {
18134 test -z "$ac_c_werror_flag" ||
18135 test ! -s conftest.err
18136 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18137 ac_header_compiler=yes
18138else
b0448899 18139 echo "$as_me: failed program was:" >&5
19650fd6
AS
18140sed 's/^/| /' conftest.$ac_ext >&5
18141
ca81d7a0 18142 ac_header_compiler=no
c0d27fcc 18143fi
ca81d7a0
JD
18144
18145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
18146{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18147echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18148
18149# Is the header present?
b0448899
CY
18150{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18151echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18152cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18153/* confdefs.h. */
18154_ACEOF
18155cat confdefs.h >>conftest.$ac_ext
18156cat >>conftest.$ac_ext <<_ACEOF
18157/* end confdefs.h. */
98418dba 18158#include <inq_stats/cpustats.h>
503d2be0 18159_ACEOF
ca81d7a0
JD
18160if { (ac_try="$ac_cpp conftest.$ac_ext"
18161case "(($ac_try" in
18162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18163 *) ac_try_echo=$ac_try;;
18164esac
b0448899 18165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18166 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18167 ac_status=$?
6bae0ccf 18168 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18169 rm -f conftest.er1
18170 cat conftest.err >&5
b0448899 18171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18172 (exit $ac_status); } >/dev/null && {
18173 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18174 test ! -s conftest.err
18175 }; then
c0d27fcc 18176 ac_header_preproc=yes
503d2be0 18177else
b0448899 18178 echo "$as_me: failed program was:" >&5
19650fd6
AS
18179sed 's/^/| /' conftest.$ac_ext >&5
18180
c0d27fcc 18181 ac_header_preproc=no
ba4481b5 18182fi
ca81d7a0 18183
503d2be0 18184rm -f conftest.err conftest.$ac_ext
b0448899
CY
18185{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18186echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18187
18188# So? What about this header?
edfaf76d
LK
18189case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18190 yes:no: )
b0448899
CY
18191 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18192echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18193 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18194echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
edfaf76d 18195 ac_header_preproc=yes
19650fd6 18196 ;;
edfaf76d 18197 no:yes:* )
b0448899
CY
18198 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18199echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
18200 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18201echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18202 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18203echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18204 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18205echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
18206 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
18207echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
18208 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18209echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18210
19650fd6 18211 ;;
c0d27fcc 18212esac
b0448899
CY
18213{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18214echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc 18215if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
b0448899 18216 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18217else
18218 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18219fi
b0448899
CY
18220{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18221echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18222
18223fi
b0448899 18224if test $ac_cv_header_inq_stats_cpustats_h = yes; then
98418dba 18225 ac_have_func=yes
ba4481b5 18226
c0d27fcc 18227cat >>confdefs.h <<\_ACEOF
98418dba 18228#define UMAX 1
c0d27fcc 18229_ACEOF
98418dba 18230
c0d27fcc
MR
18231
18232cat >>confdefs.h <<\_ACEOF
98418dba 18233#define UMAX4_3 1
c0d27fcc 18234_ACEOF
98418dba
CW
18235
18236fi
18237
c0d27fcc 18238
98418dba
CW
18239fi
18240
18241if test $ac_have_func = no; then
c0d27fcc 18242 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
b0448899
CY
18243 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18244echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18245if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
b0448899 18246 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18247fi
b0448899
CY
18248{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18249echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18250else
c0d27fcc 18251 # Is the header compilable?
b0448899
CY
18252{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18253echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18254cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18255/* confdefs.h. */
18256_ACEOF
18257cat confdefs.h >>conftest.$ac_ext
18258cat >>conftest.$ac_ext <<_ACEOF
18259/* end confdefs.h. */
c0d27fcc
MR
18260$ac_includes_default
18261#include <sys/cpustats.h>
18262_ACEOF
18263rm -f conftest.$ac_objext
ca81d7a0
JD
18264if { (ac_try="$ac_compile"
18265case "(($ac_try" in
18266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18267 *) ac_try_echo=$ac_try;;
18268esac
b0448899 18269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18270 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18271 ac_status=$?
edfaf76d
LK
18272 grep -v '^ *+' conftest.er1 >conftest.err
18273 rm -f conftest.er1
18274 cat conftest.err >&5
b0448899 18275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18276 (exit $ac_status); } && {
18277 test -z "$ac_c_werror_flag" ||
18278 test ! -s conftest.err
18279 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18280 ac_header_compiler=yes
18281else
b0448899 18282 echo "$as_me: failed program was:" >&5
19650fd6
AS
18283sed 's/^/| /' conftest.$ac_ext >&5
18284
ca81d7a0 18285 ac_header_compiler=no
c0d27fcc 18286fi
ca81d7a0
JD
18287
18288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
18289{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18290echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18291
18292# Is the header present?
b0448899
CY
18293{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18294echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18295cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18296/* confdefs.h. */
18297_ACEOF
18298cat confdefs.h >>conftest.$ac_ext
18299cat >>conftest.$ac_ext <<_ACEOF
18300/* end confdefs.h. */
98418dba
CW
18301#include <sys/cpustats.h>
18302_ACEOF
ca81d7a0
JD
18303if { (ac_try="$ac_cpp conftest.$ac_ext"
18304case "(($ac_try" in
18305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18306 *) ac_try_echo=$ac_try;;
18307esac
b0448899 18308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18309 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18310 ac_status=$?
6bae0ccf 18311 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18312 rm -f conftest.er1
18313 cat conftest.err >&5
b0448899 18314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18315 (exit $ac_status); } >/dev/null && {
18316 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18317 test ! -s conftest.err
18318 }; then
c0d27fcc 18319 ac_header_preproc=yes
98418dba 18320else
b0448899 18321 echo "$as_me: failed program was:" >&5
19650fd6
AS
18322sed 's/^/| /' conftest.$ac_ext >&5
18323
c0d27fcc 18324 ac_header_preproc=no
98418dba 18325fi
ca81d7a0 18326
98418dba 18327rm -f conftest.err conftest.$ac_ext
b0448899
CY
18328{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18329echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18330
18331# So? What about this header?
edfaf76d
LK
18332case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18333 yes:no: )
b0448899
CY
18334 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18335echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18336 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18337echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
edfaf76d 18338 ac_header_preproc=yes
19650fd6 18339 ;;
edfaf76d 18340 no:yes:* )
b0448899
CY
18341 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18342echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
18343 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18344echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18345 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18346echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18347 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18348echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
18349 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
18350echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
18351 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18352echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18353
19650fd6 18354 ;;
c0d27fcc 18355esac
b0448899
CY
18356{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18357echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc 18358if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
b0448899 18359 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18360else
18361 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18362fi
b0448899
CY
18363{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18364echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18365
18366fi
b0448899 18367if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18368 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18369#define UMAX 1
c0d27fcc 18370_ACEOF
ba4481b5 18371
98418dba
CW
18372fi
18373
c0d27fcc 18374
98418dba
CW
18375fi
18376
18377if test $ac_have_func = no; then
18378
18379for ac_header in mach/mach.h
2c9dccc9 18380do
b0448899 18381as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 18382if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
18383 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 18386 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18387fi
b0448899
CY
18388ac_res=`eval echo '${'$as_ac_Header'}'`
18389 { echo "$as_me:$LINENO: result: $ac_res" >&5
18390echo "${ECHO_T}$ac_res" >&6; }
98418dba 18391else
c0d27fcc 18392 # Is the header compilable?
b0448899
CY
18393{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18394echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18396/* confdefs.h. */
18397_ACEOF
18398cat confdefs.h >>conftest.$ac_ext
18399cat >>conftest.$ac_ext <<_ACEOF
18400/* end confdefs.h. */
c0d27fcc
MR
18401$ac_includes_default
18402#include <$ac_header>
18403_ACEOF
18404rm -f conftest.$ac_objext
ca81d7a0
JD
18405if { (ac_try="$ac_compile"
18406case "(($ac_try" in
18407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18408 *) ac_try_echo=$ac_try;;
18409esac
b0448899 18410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18411 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18412 ac_status=$?
edfaf76d
LK
18413 grep -v '^ *+' conftest.er1 >conftest.err
18414 rm -f conftest.er1
18415 cat conftest.err >&5
b0448899 18416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18417 (exit $ac_status); } && {
18418 test -z "$ac_c_werror_flag" ||
18419 test ! -s conftest.err
18420 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18421 ac_header_compiler=yes
18422else
b0448899 18423 echo "$as_me: failed program was:" >&5
19650fd6
AS
18424sed 's/^/| /' conftest.$ac_ext >&5
18425
ca81d7a0 18426 ac_header_compiler=no
c0d27fcc 18427fi
ca81d7a0
JD
18428
18429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
18430{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18431echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18432
18433# Is the header present?
b0448899
CY
18434{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18435echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18436cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18437/* confdefs.h. */
18438_ACEOF
18439cat confdefs.h >>conftest.$ac_ext
18440cat >>conftest.$ac_ext <<_ACEOF
18441/* end confdefs.h. */
2c9dccc9
PJ
18442#include <$ac_header>
18443_ACEOF
ca81d7a0
JD
18444if { (ac_try="$ac_cpp conftest.$ac_ext"
18445case "(($ac_try" in
18446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18447 *) ac_try_echo=$ac_try;;
18448esac
b0448899 18449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18450 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18451 ac_status=$?
6bae0ccf 18452 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18453 rm -f conftest.er1
18454 cat conftest.err >&5
b0448899 18455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18456 (exit $ac_status); } >/dev/null && {
18457 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18458 test ! -s conftest.err
18459 }; then
c0d27fcc
MR
18460 ac_header_preproc=yes
18461else
b0448899 18462 echo "$as_me: failed program was:" >&5
19650fd6
AS
18463sed 's/^/| /' conftest.$ac_ext >&5
18464
c0d27fcc
MR
18465 ac_header_preproc=no
18466fi
ca81d7a0 18467
c0d27fcc 18468rm -f conftest.err conftest.$ac_ext
b0448899
CY
18469{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18470echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18471
18472# So? What about this header?
edfaf76d
LK
18473case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18474 yes:no: )
b0448899
CY
18475 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18476echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18477 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18478echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 18479 ac_header_preproc=yes
19650fd6 18480 ;;
edfaf76d 18481 no:yes:* )
b0448899
CY
18482 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18483echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18484 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18485echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18486 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18487echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18488 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18489echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18490 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18491echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18492 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18493echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18494
19650fd6 18495 ;;
c0d27fcc 18496esac
b0448899
CY
18497{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18499if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 18500 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18501else
edfaf76d 18502 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18503fi
b0448899
CY
18504ac_res=`eval echo '${'$as_ac_Header'}'`
18505 { echo "$as_me:$LINENO: result: $ac_res" >&5
18506echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18507
18508fi
b0448899 18509if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18510 cat >>confdefs.h <<_ACEOF
b0448899 18511#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
18512_ACEOF
18513
18514fi
18515
18516done
18517
18518fi
18519
18520
18521for ac_header in nlist.h
18522do
b0448899 18523as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 18524if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
18525 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18527if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 18528 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18529fi
b0448899
CY
18530ac_res=`eval echo '${'$as_ac_Header'}'`
18531 { echo "$as_me:$LINENO: result: $ac_res" >&5
18532echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18533else
18534 # Is the header compilable?
b0448899
CY
18535{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18536echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18537cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18538/* confdefs.h. */
18539_ACEOF
18540cat confdefs.h >>conftest.$ac_ext
18541cat >>conftest.$ac_ext <<_ACEOF
18542/* end confdefs.h. */
c0d27fcc
MR
18543$ac_includes_default
18544#include <$ac_header>
18545_ACEOF
18546rm -f conftest.$ac_objext
ca81d7a0
JD
18547if { (ac_try="$ac_compile"
18548case "(($ac_try" in
18549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18550 *) ac_try_echo=$ac_try;;
18551esac
b0448899 18552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18553 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18554 ac_status=$?
edfaf76d
LK
18555 grep -v '^ *+' conftest.er1 >conftest.err
18556 rm -f conftest.er1
18557 cat conftest.err >&5
b0448899 18558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18559 (exit $ac_status); } && {
18560 test -z "$ac_c_werror_flag" ||
18561 test ! -s conftest.err
18562 } && test -s conftest.$ac_objext; then
c0d27fcc 18563 ac_header_compiler=yes
2c9dccc9 18564else
b0448899 18565 echo "$as_me: failed program was:" >&5
19650fd6
AS
18566sed 's/^/| /' conftest.$ac_ext >&5
18567
ca81d7a0 18568 ac_header_compiler=no
98418dba 18569fi
ca81d7a0
JD
18570
18571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
18572{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18573echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18574
c0d27fcc 18575# Is the header present?
b0448899
CY
18576{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18577echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18578cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18579/* confdefs.h. */
18580_ACEOF
18581cat confdefs.h >>conftest.$ac_ext
18582cat >>conftest.$ac_ext <<_ACEOF
18583/* end confdefs.h. */
503d2be0
AS
18584#include <$ac_header>
18585_ACEOF
ca81d7a0
JD
18586if { (ac_try="$ac_cpp conftest.$ac_ext"
18587case "(($ac_try" in
18588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18589 *) ac_try_echo=$ac_try;;
18590esac
b0448899 18591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18592 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18593 ac_status=$?
6bae0ccf 18594 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18595 rm -f conftest.er1
18596 cat conftest.err >&5
b0448899 18597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18598 (exit $ac_status); } >/dev/null && {
18599 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18600 test ! -s conftest.err
18601 }; then
c0d27fcc 18602 ac_header_preproc=yes
503d2be0 18603else
b0448899 18604 echo "$as_me: failed program was:" >&5
19650fd6
AS
18605sed 's/^/| /' conftest.$ac_ext >&5
18606
c0d27fcc 18607 ac_header_preproc=no
b5de8dc0 18608fi
ca81d7a0 18609
503d2be0 18610rm -f conftest.err conftest.$ac_ext
b0448899
CY
18611{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18612echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18613
18614# So? What about this header?
edfaf76d
LK
18615case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18616 yes:no: )
b0448899
CY
18617 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18618echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18619 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18620echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 18621 ac_header_preproc=yes
19650fd6 18622 ;;
edfaf76d 18623 no:yes:* )
b0448899
CY
18624 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18625echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18626 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18627echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18628 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18629echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18630 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18631echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18632 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18633echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18634 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18635echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18636
19650fd6 18637 ;;
c0d27fcc 18638esac
b0448899
CY
18639{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18640echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18641if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 18642 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18643else
edfaf76d 18644 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18645fi
b0448899
CY
18646ac_res=`eval echo '${'$as_ac_Header'}'`
18647 { echo "$as_me:$LINENO: result: $ac_res" >&5
18648echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18649
18650fi
b0448899 18651if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18652 cat >>confdefs.h <<_ACEOF
b0448899 18653#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18654_ACEOF
b0448899
CY
18655 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18656echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18657if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
b0448899 18658 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18659else
503d2be0 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. */
98418dba 18666#include <nlist.h>
b5de8dc0 18667
503d2be0
AS
18668int
18669main ()
18670{
98418dba
CW
18671static struct nlist ac_aggr;
18672if (ac_aggr.n_un.n_name)
18673return 0;
503d2be0
AS
18674 ;
18675 return 0;
18676}
18677_ACEOF
98418dba 18678rm -f conftest.$ac_objext
ca81d7a0
JD
18679if { (ac_try="$ac_compile"
18680case "(($ac_try" in
18681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18682 *) ac_try_echo=$ac_try;;
18683esac
b0448899 18684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18685 (eval "$ac_compile") 2>conftest.er1
503d2be0 18686 ac_status=$?
edfaf76d
LK
18687 grep -v '^ *+' conftest.er1 >conftest.err
18688 rm -f conftest.er1
18689 cat conftest.err >&5
b0448899 18690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18691 (exit $ac_status); } && {
18692 test -z "$ac_c_werror_flag" ||
18693 test ! -s conftest.err
18694 } && test -s conftest.$ac_objext; then
edfaf76d 18695 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0 18696else
b0448899 18697 echo "$as_me: failed program was:" >&5
19650fd6
AS
18698sed 's/^/| /' conftest.$ac_ext >&5
18699
ca81d7a0 18700 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18701/* confdefs.h. */
18702_ACEOF
18703cat confdefs.h >>conftest.$ac_ext
18704cat >>conftest.$ac_ext <<_ACEOF
18705/* end confdefs.h. */
6bae0ccf
DL
18706#include <nlist.h>
18707
18708int
18709main ()
18710{
18711static struct nlist ac_aggr;
18712if (sizeof ac_aggr.n_un.n_name)
18713return 0;
18714 ;
18715 return 0;
18716}
18717_ACEOF
18718rm -f conftest.$ac_objext
ca81d7a0
JD
18719if { (ac_try="$ac_compile"
18720case "(($ac_try" in
18721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18722 *) ac_try_echo=$ac_try;;
18723esac
b0448899 18724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18725 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18726 ac_status=$?
edfaf76d
LK
18727 grep -v '^ *+' conftest.er1 >conftest.err
18728 rm -f conftest.er1
18729 cat conftest.err >&5
b0448899 18730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18731 (exit $ac_status); } && {
18732 test -z "$ac_c_werror_flag" ||
18733 test ! -s conftest.err
18734 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18735 ac_cv_member_struct_nlist_n_un_n_name=yes
18736else
b0448899 18737 echo "$as_me: failed program was:" >&5
19650fd6
AS
18738sed 's/^/| /' conftest.$ac_ext >&5
18739
ca81d7a0 18740 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18741fi
ca81d7a0
JD
18742
18743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18744fi
ca81d7a0
JD
18745
18746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18747fi
b0448899
CY
18748{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18749echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
18750if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18751
c0d27fcc 18752cat >>confdefs.h <<_ACEOF
98418dba 18753#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18754_ACEOF
b5de8dc0 18755
c0d27fcc
MR
18756
18757cat >>confdefs.h <<\_ACEOF
98418dba 18758#define NLIST_NAME_UNION 1
c0d27fcc 18759_ACEOF
b5de8dc0 18760
98418dba 18761fi
b5de8dc0 18762
c0d27fcc 18763
98418dba 18764fi
c0d27fcc 18765
98418dba 18766done
b5de8dc0 18767
98418dba
CW
18768fi
18769done
b5de8dc0 18770
c0d27fcc 18771
98418dba 18772# Some definitions of getloadavg require that the program be installed setgid.
b0448899
CY
18773{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18774echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba 18775if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
b0448899 18776 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
18777else
18778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18779/* confdefs.h. */
18780_ACEOF
18781cat confdefs.h >>conftest.$ac_ext
18782cat >>conftest.$ac_ext <<_ACEOF
18783/* end confdefs.h. */
6bae0ccf 18784#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18785#ifdef LDAV_PRIVILEGED
18786Yowza Am I SETGID yet
18787#endif
18788_ACEOF
18789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18790 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18791 ac_cv_func_getloadavg_setgid=yes
18792else
18793 ac_cv_func_getloadavg_setgid=no
18794fi
18795rm -f conftest*
b5de8dc0 18796
98418dba 18797fi
b0448899
CY
18798{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18799echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18800if test $ac_cv_func_getloadavg_setgid = yes; then
18801 NEED_SETGID=true
b5de8dc0 18802
c0d27fcc 18803cat >>confdefs.h <<\_ACEOF
98418dba 18804#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18805_ACEOF
98418dba 18806
b5de8dc0 18807else
98418dba 18808 NEED_SETGID=false
b5de8dc0 18809fi
98418dba
CW
18810
18811if test $ac_cv_func_getloadavg_setgid = yes; then
b0448899
CY
18812 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18813echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba 18814if test "${ac_cv_group_kmem+set}" = set; then
b0448899 18815 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
18816else
18817 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18818 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18819 # If we got an error (system does not support symlinks), try without -L.
18820 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
b0448899 18821 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18822 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18823 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18824 / /s/.* //;p;'`
18825
b5de8dc0 18826fi
b0448899
CY
18827{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18828echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18829 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18830fi
98418dba
CW
18831if test "x$ac_save_LIBS" = x; then
18832 GETLOADAVG_LIBS=$LIBS
18833else
b0448899 18834 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18835fi
98418dba 18836LIBS=$ac_save_LIBS
b5de8dc0 18837
c0d27fcc
MR
18838
18839
b0448899
CY
18840{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18841echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18842if test "${ac_cv_sys_largefile_source+set}" = set; then
b0448899 18843 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18844else
b936fae4 18845 while :; do
503d2be0 18846 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18847/* confdefs.h. */
18848_ACEOF
18849cat confdefs.h >>conftest.$ac_ext
18850cat >>conftest.$ac_ext <<_ACEOF
18851/* end confdefs.h. */
b0448899 18852#include <stdio.h>
503d2be0
AS
18853int
18854main ()
18855{
b0448899 18856return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18857 ;
18858 return 0;
18859}
18860_ACEOF
f053c89f
CY
18861rm -f conftest.$ac_objext conftest$ac_exeext
18862if { (ac_try="$ac_link"
ca81d7a0
JD
18863case "(($ac_try" in
18864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18865 *) ac_try_echo=$ac_try;;
18866esac
b0448899 18867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18868 (eval "$ac_link") 2>conftest.er1
b936fae4 18869 ac_status=$?
edfaf76d
LK
18870 grep -v '^ *+' conftest.er1 >conftest.err
18871 rm -f conftest.er1
18872 cat conftest.err >&5
b0448899 18873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18874 (exit $ac_status); } && {
18875 test -z "$ac_c_werror_flag" ||
18876 test ! -s conftest.err
b0448899
CY
18877 } && test -s conftest$ac_exeext &&
18878 $as_test_x conftest$ac_exeext; then
f053c89f 18879 ac_cv_sys_largefile_source=no; break
b936fae4 18880else
b0448899 18881 echo "$as_me: failed program was:" >&5
19650fd6
AS
18882sed 's/^/| /' conftest.$ac_ext >&5
18883
ca81d7a0 18884
b936fae4 18885fi
ca81d7a0 18886
f053c89f
CY
18887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18888 conftest$ac_exeext conftest.$ac_ext
b936fae4 18889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18890/* confdefs.h. */
18891_ACEOF
18892cat confdefs.h >>conftest.$ac_ext
18893cat >>conftest.$ac_ext <<_ACEOF
18894/* end confdefs.h. */
b936fae4 18895#define _LARGEFILE_SOURCE 1
b0448899 18896#include <stdio.h>
b936fae4
AS
18897int
18898main ()
18899{
b0448899 18900return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18901 ;
18902 return 0;
18903}
18904_ACEOF
f053c89f
CY
18905rm -f conftest.$ac_objext conftest$ac_exeext
18906if { (ac_try="$ac_link"
ca81d7a0
JD
18907case "(($ac_try" in
18908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18909 *) ac_try_echo=$ac_try;;
18910esac
b0448899 18911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18912 (eval "$ac_link") 2>conftest.er1
b936fae4 18913 ac_status=$?
edfaf76d
LK
18914 grep -v '^ *+' conftest.er1 >conftest.err
18915 rm -f conftest.er1
18916 cat conftest.err >&5
b0448899 18917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18918 (exit $ac_status); } && {
18919 test -z "$ac_c_werror_flag" ||
18920 test ! -s conftest.err
b0448899
CY
18921 } && test -s conftest$ac_exeext &&
18922 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18923 ac_cv_sys_largefile_source=1; break
18924else
b0448899 18925 echo "$as_me: failed program was:" >&5
19650fd6
AS
18926sed 's/^/| /' conftest.$ac_ext >&5
18927
ca81d7a0 18928
b936fae4 18929fi
ca81d7a0 18930
f053c89f
CY
18931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18932 conftest$ac_exeext conftest.$ac_ext
18933 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18934 break
18935done
18936fi
b0448899
CY
18937{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18938echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18939case $ac_cv_sys_largefile_source in #(
18940 no | unknown) ;;
18941 *)
c0d27fcc 18942cat >>confdefs.h <<_ACEOF
b936fae4 18943#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18944_ACEOF
f053c89f
CY
18945;;
18946esac
b0448899 18947rm -f conftest*
4c343001 18948
b936fae4
AS
18949# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18950# in glibc 2.1.3, but that breaks too many other things.
18951# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18952if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18953
c0d27fcc 18954cat >>confdefs.h <<\_ACEOF
b936fae4 18955#define HAVE_FSEEKO 1
c0d27fcc 18956_ACEOF
b936fae4 18957
4c343001
DL
18958fi
18959
c0d27fcc 18960
52dbaac8
PE
18961# Configure getopt.
18962# getopt.m4 serial 10
18963
18964# The getopt module assume you want GNU getopt, with getopt_long etc,
18965# rather than vanilla POSIX getopt. This means your your code should
18966# always include <getopt.h> for the getopt prototypes.
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978# Prerequisites of lib/getopt*.
18979
18980
18981
10a3b1a1 18982
52dbaac8
PE
18983 GETOPT_H=
18984
18985for ac_header in getopt.h
18986do
b0448899 18987as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 18988if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
18989 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18990echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18991if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 18992 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8 18993fi
b0448899
CY
18994ac_res=`eval echo '${'$as_ac_Header'}'`
18995 { echo "$as_me:$LINENO: result: $ac_res" >&5
18996echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18997else
18998 # Is the header compilable?
b0448899
CY
18999{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19000echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19001cat >conftest.$ac_ext <<_ACEOF
19002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
19007$ac_includes_default
19008#include <$ac_header>
19009_ACEOF
19010rm -f conftest.$ac_objext
ca81d7a0
JD
19011if { (ac_try="$ac_compile"
19012case "(($ac_try" in
19013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19014 *) ac_try_echo=$ac_try;;
19015esac
b0448899 19016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19017 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19018 ac_status=$?
19019 grep -v '^ *+' conftest.er1 >conftest.err
19020 rm -f conftest.er1
19021 cat conftest.err >&5
b0448899 19022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19023 (exit $ac_status); } && {
19024 test -z "$ac_c_werror_flag" ||
19025 test ! -s conftest.err
19026 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19027 ac_header_compiler=yes
19028else
b0448899 19029 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19030sed 's/^/| /' conftest.$ac_ext >&5
19031
ca81d7a0 19032 ac_header_compiler=no
52dbaac8 19033fi
ca81d7a0
JD
19034
19035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
19036{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19037echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19038
19039# Is the header present?
b0448899
CY
19040{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19041echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19042cat >conftest.$ac_ext <<_ACEOF
19043/* confdefs.h. */
19044_ACEOF
19045cat confdefs.h >>conftest.$ac_ext
19046cat >>conftest.$ac_ext <<_ACEOF
19047/* end confdefs.h. */
19048#include <$ac_header>
19049_ACEOF
ca81d7a0
JD
19050if { (ac_try="$ac_cpp conftest.$ac_ext"
19051case "(($ac_try" in
19052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19053 *) ac_try_echo=$ac_try;;
19054esac
b0448899 19055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19056 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19057 ac_status=$?
19058 grep -v '^ *+' conftest.er1 >conftest.err
19059 rm -f conftest.er1
19060 cat conftest.err >&5
b0448899 19061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19062 (exit $ac_status); } >/dev/null && {
19063 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19064 test ! -s conftest.err
19065 }; then
52dbaac8
PE
19066 ac_header_preproc=yes
19067else
b0448899 19068 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19069sed 's/^/| /' conftest.$ac_ext >&5
19070
19071 ac_header_preproc=no
19072fi
ca81d7a0 19073
52dbaac8 19074rm -f conftest.err conftest.$ac_ext
b0448899
CY
19075{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19076echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19077
19078# So? What about this header?
19079case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19080 yes:no: )
b0448899
CY
19081 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19082echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19083 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19084echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
52dbaac8
PE
19085 ac_header_preproc=yes
19086 ;;
19087 no:yes:* )
b0448899
CY
19088 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19089echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19090 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19091echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19092 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19093echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19094 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19095echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19096 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19097echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19098 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19099echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19100
52dbaac8
PE
19101 ;;
19102esac
b0448899
CY
19103{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19104echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 19105if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 19106 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19107else
19108 eval "$as_ac_Header=\$ac_header_preproc"
19109fi
b0448899
CY
19110ac_res=`eval echo '${'$as_ac_Header'}'`
19111 { echo "$as_me:$LINENO: result: $ac_res" >&5
19112echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19113
19114fi
b0448899 19115if test `eval echo '${'$as_ac_Header'}'` = yes; then
52dbaac8 19116 cat >>confdefs.h <<_ACEOF
b0448899 19117#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
52dbaac8
PE
19118_ACEOF
19119
19120else
19121 GETOPT_H=getopt.h
19122fi
19123
19124done
19125
19126 if test -z "$GETOPT_H"; then
19127
19128for ac_func in getopt_long_only
19129do
b0448899
CY
19130as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19131{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19132echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19133if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 19134 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19135else
19136 cat >conftest.$ac_ext <<_ACEOF
19137/* confdefs.h. */
19138_ACEOF
19139cat confdefs.h >>conftest.$ac_ext
19140cat >>conftest.$ac_ext <<_ACEOF
19141/* end confdefs.h. */
19142/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19143 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19144#define $ac_func innocuous_$ac_func
19145
19146/* System header to define __stub macros and hopefully few prototypes,
19147 which can conflict with char $ac_func (); below.
19148 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19149 <limits.h> exists even on freestanding compilers. */
19150
19151#ifdef __STDC__
19152# include <limits.h>
19153#else
19154# include <assert.h>
19155#endif
19156
19157#undef $ac_func
19158
ca81d7a0
JD
19159/* Override any GCC internal prototype to avoid an error.
19160 Use char because int might match the return type of a GCC
19161 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19162#ifdef __cplusplus
19163extern "C"
52dbaac8 19164#endif
52dbaac8
PE
19165char $ac_func ();
19166/* The GNU C library defines this for functions which it implements
19167 to always fail with ENOSYS. Some functions are actually named
19168 something starting with __ and the normal name is an alias. */
ca81d7a0 19169#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19170choke me
52dbaac8
PE
19171#endif
19172
19173int
19174main ()
19175{
ca81d7a0 19176return $ac_func ();
52dbaac8
PE
19177 ;
19178 return 0;
19179}
19180_ACEOF
19181rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19182if { (ac_try="$ac_link"
19183case "(($ac_try" in
19184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19185 *) ac_try_echo=$ac_try;;
19186esac
b0448899 19187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19188 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19189 ac_status=$?
19190 grep -v '^ *+' conftest.er1 >conftest.err
19191 rm -f conftest.er1
19192 cat conftest.err >&5
b0448899 19193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19194 (exit $ac_status); } && {
19195 test -z "$ac_c_werror_flag" ||
19196 test ! -s conftest.err
b0448899
CY
19197 } && test -s conftest$ac_exeext &&
19198 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19199 eval "$as_ac_var=yes"
19200else
b0448899 19201 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19202sed 's/^/| /' conftest.$ac_ext >&5
19203
ca81d7a0 19204 eval "$as_ac_var=no"
52dbaac8 19205fi
ca81d7a0 19206
f053c89f 19207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19208 conftest$ac_exeext conftest.$ac_ext
19209fi
b0448899
CY
19210ac_res=`eval echo '${'$as_ac_var'}'`
19211 { echo "$as_me:$LINENO: result: $ac_res" >&5
19212echo "${ECHO_T}$ac_res" >&6; }
19213if test `eval echo '${'$as_ac_var'}'` = yes; then
52dbaac8 19214 cat >>confdefs.h <<_ACEOF
b0448899 19215#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
52dbaac8
PE
19216_ACEOF
19217
19218else
19219 GETOPT_H=getopt.h
19220fi
19221done
19222
19223 fi
19224
19225 if test -z "$GETOPT_H"; then
b0448899
CY
19226 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19227echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8 19228if test "${ac_cv_have_decl_optreset+set}" = set; then
b0448899 19229 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19230else
19231 cat >conftest.$ac_ext <<_ACEOF
19232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
19237#include <getopt.h>
19238
19239int
19240main ()
19241{
19242#ifndef optreset
f053c89f 19243 (void) optreset;
52dbaac8
PE
19244#endif
19245
19246 ;
19247 return 0;
19248}
19249_ACEOF
19250rm -f conftest.$ac_objext
ca81d7a0
JD
19251if { (ac_try="$ac_compile"
19252case "(($ac_try" in
19253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19254 *) ac_try_echo=$ac_try;;
19255esac
b0448899 19256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19257 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19258 ac_status=$?
19259 grep -v '^ *+' conftest.er1 >conftest.err
19260 rm -f conftest.er1
19261 cat conftest.err >&5
b0448899 19262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19263 (exit $ac_status); } && {
19264 test -z "$ac_c_werror_flag" ||
19265 test ! -s conftest.err
19266 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19267 ac_cv_have_decl_optreset=yes
19268else
b0448899 19269 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19270sed 's/^/| /' conftest.$ac_ext >&5
19271
ca81d7a0 19272 ac_cv_have_decl_optreset=no
52dbaac8 19273fi
ca81d7a0
JD
19274
19275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19276fi
b0448899
CY
19277{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19278echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
19279if test $ac_cv_have_decl_optreset = yes; then
52dbaac8
PE
19280 GETOPT_H=getopt.h
19281fi
19282
19283 fi
19284
19285 if test -z "$GETOPT_H"; then
b0448899
CY
19286 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19287echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8 19288if test "${gl_cv_func_gnu_getopt+set}" = set; then
b0448899 19289 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19290else
19291 if test "$cross_compiling" = yes; then
b0448899
CY
19292 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19293echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8 19294if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
b0448899 19295 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19296else
19297 cat >conftest.$ac_ext <<_ACEOF
19298/* confdefs.h. */
19299_ACEOF
19300cat confdefs.h >>conftest.$ac_ext
19301cat >>conftest.$ac_ext <<_ACEOF
19302/* end confdefs.h. */
19303#include <getopt.h>
19304
19305int
19306main ()
19307{
19308#ifndef getopt_clip
f053c89f 19309 (void) getopt_clip;
52dbaac8
PE
19310#endif
19311
19312 ;
19313 return 0;
19314}
19315_ACEOF
19316rm -f conftest.$ac_objext
ca81d7a0
JD
19317if { (ac_try="$ac_compile"
19318case "(($ac_try" in
19319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19320 *) ac_try_echo=$ac_try;;
19321esac
b0448899 19322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19323 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19324 ac_status=$?
19325 grep -v '^ *+' conftest.er1 >conftest.err
19326 rm -f conftest.er1
19327 cat conftest.err >&5
b0448899 19328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19329 (exit $ac_status); } && {
19330 test -z "$ac_c_werror_flag" ||
19331 test ! -s conftest.err
19332 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19333 ac_cv_have_decl_getopt_clip=yes
19334else
b0448899 19335 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19336sed 's/^/| /' conftest.$ac_ext >&5
19337
ca81d7a0 19338 ac_cv_have_decl_getopt_clip=no
52dbaac8 19339fi
ca81d7a0
JD
19340
19341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19342fi
b0448899
CY
19343{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19344echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
19345if test $ac_cv_have_decl_getopt_clip = yes; then
52dbaac8
PE
19346 gl_cv_func_gnu_getopt=no
19347else
19348 gl_cv_func_gnu_getopt=yes
19349fi
19350
19351else
19352 cat >conftest.$ac_ext <<_ACEOF
19353/* confdefs.h. */
19354_ACEOF
19355cat confdefs.h >>conftest.$ac_ext
19356cat >>conftest.$ac_ext <<_ACEOF
19357/* end confdefs.h. */
19358#include <getopt.h>
19359int
19360main ()
19361{
19362
19363 char *myargv[3];
19364 myargv[0] = "conftest";
19365 myargv[1] = "-+";
19366 myargv[2] = 0;
19367 return getopt (2, myargv, "+a") != '?';
19368
19369 ;
19370 return 0;
19371}
19372_ACEOF
19373rm -f conftest$ac_exeext
ca81d7a0
JD
19374if { (ac_try="$ac_link"
19375case "(($ac_try" in
19376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19377 *) ac_try_echo=$ac_try;;
19378esac
b0448899 19379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19380 (eval "$ac_link") 2>&5
52dbaac8 19381 ac_status=$?
b0448899 19382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
52dbaac8 19383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19384 { (case "(($ac_try" in
19385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19386 *) ac_try_echo=$ac_try;;
19387esac
b0448899 19388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19389 (eval "$ac_try") 2>&5
52dbaac8 19390 ac_status=$?
b0448899 19391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
52dbaac8
PE
19392 (exit $ac_status); }; }; then
19393 gl_cv_func_gnu_getopt=yes
19394else
b0448899
CY
19395 echo "$as_me: program exited with status $ac_status" >&5
19396echo "$as_me: failed program was:" >&5
52dbaac8
PE
19397sed 's/^/| /' conftest.$ac_ext >&5
19398
19399( exit $ac_status )
19400gl_cv_func_gnu_getopt=no
19401fi
ca81d7a0 19402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19403fi
ca81d7a0
JD
19404
19405
52dbaac8 19406fi
b0448899
CY
19407{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19408echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19409 if test "$gl_cv_func_gnu_getopt" = "no"; then
19410 GETOPT_H=getopt.h
19411 fi
19412 fi
19413
19414
19415
19416 if test -n "$GETOPT_H"; then
19417
19418
19419 GETOPT_H=getopt.h
19420
19421cat >>confdefs.h <<\_ACEOF
19422#define __GETOPT_PREFIX rpl_
19423_ACEOF
19424
19425
19426
19427 :
19428 GETOPTOBJS='getopt.o getopt1.o'
19429
19430fi
19431
19432
19433
19434
b0448899
CY
19435{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19436echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3 19437if test "${ac_cv_func_getpgrp_void+set}" = set; then
b0448899 19438 echo $ECHO_N "(cached) $ECHO_C" >&6
cd958eb3
MB
19439else
19440 # Use it with a single arg.
19441cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19442/* confdefs.h. */
19443_ACEOF
19444cat confdefs.h >>conftest.$ac_ext
19445cat >>conftest.$ac_ext <<_ACEOF
19446/* end confdefs.h. */
cd958eb3
MB
19447$ac_includes_default
19448int
19449main ()
19450{
19451getpgrp (0);
19452 ;
19453 return 0;
19454}
19455_ACEOF
19456rm -f conftest.$ac_objext
ca81d7a0
JD
19457if { (ac_try="$ac_compile"
19458case "(($ac_try" in
19459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19460 *) ac_try_echo=$ac_try;;
19461esac
b0448899 19462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19463 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19464 ac_status=$?
edfaf76d
LK
19465 grep -v '^ *+' conftest.er1 >conftest.err
19466 rm -f conftest.er1
19467 cat conftest.err >&5
b0448899 19468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19469 (exit $ac_status); } && {
19470 test -z "$ac_c_werror_flag" ||
19471 test ! -s conftest.err
19472 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19473 ac_cv_func_getpgrp_void=no
19474else
b0448899 19475 echo "$as_me: failed program was:" >&5
19650fd6
AS
19476sed 's/^/| /' conftest.$ac_ext >&5
19477
ca81d7a0 19478 ac_cv_func_getpgrp_void=yes
cd958eb3 19479fi
ca81d7a0
JD
19480
19481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19482
19483fi
b0448899
CY
19484{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19485echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19486if test $ac_cv_func_getpgrp_void = yes; then
19487
19488cat >>confdefs.h <<\_ACEOF
19489#define GETPGRP_VOID 1
19490_ACEOF
19491
19492fi
19493
19494
973a76b1
DL
19495
19496for ac_func in strftime
19497do
b0448899
CY
19498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19499{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19501if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 19502 echo $ECHO_N "(cached) $ECHO_C" >&6
973a76b1
DL
19503else
19504 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19505/* confdefs.h. */
19506_ACEOF
19507cat confdefs.h >>conftest.$ac_ext
19508cat >>conftest.$ac_ext <<_ACEOF
19509/* end confdefs.h. */
edfaf76d
LK
19510/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19511 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19512#define $ac_func innocuous_$ac_func
19513
973a76b1 19514/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19515 which can conflict with char $ac_func (); below.
19516 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19517 <limits.h> exists even on freestanding compilers. */
edfaf76d 19518
19650fd6
AS
19519#ifdef __STDC__
19520# include <limits.h>
19521#else
19522# include <assert.h>
19523#endif
edfaf76d
LK
19524
19525#undef $ac_func
19526
ca81d7a0
JD
19527/* Override any GCC internal prototype to avoid an error.
19528 Use char because int might match the return type of a GCC
19529 builtin and then its argument prototype would still apply. */
973a76b1
DL
19530#ifdef __cplusplus
19531extern "C"
973a76b1 19532#endif
973a76b1
DL
19533char $ac_func ();
19534/* The GNU C library defines this for functions which it implements
19535 to always fail with ENOSYS. Some functions are actually named
19536 something starting with __ and the normal name is an alias. */
ca81d7a0 19537#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19538choke me
973a76b1
DL
19539#endif
19540
19650fd6
AS
19541int
19542main ()
19543{
ca81d7a0 19544return $ac_func ();
973a76b1
DL
19545 ;
19546 return 0;
19547}
19548_ACEOF
19549rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19550if { (ac_try="$ac_link"
19551case "(($ac_try" in
19552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19553 *) ac_try_echo=$ac_try;;
19554esac
b0448899 19555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19556 (eval "$ac_link") 2>conftest.er1
973a76b1 19557 ac_status=$?
edfaf76d
LK
19558 grep -v '^ *+' conftest.er1 >conftest.err
19559 rm -f conftest.er1
19560 cat conftest.err >&5
b0448899 19561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19562 (exit $ac_status); } && {
19563 test -z "$ac_c_werror_flag" ||
19564 test ! -s conftest.err
b0448899
CY
19565 } && test -s conftest$ac_exeext &&
19566 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19567 eval "$as_ac_var=yes"
19568else
b0448899 19569 echo "$as_me: failed program was:" >&5
19650fd6
AS
19570sed 's/^/| /' conftest.$ac_ext >&5
19571
ca81d7a0 19572 eval "$as_ac_var=no"
973a76b1 19573fi
ca81d7a0 19574
f053c89f 19575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19576 conftest$ac_exeext conftest.$ac_ext
973a76b1 19577fi
b0448899
CY
19578ac_res=`eval echo '${'$as_ac_var'}'`
19579 { echo "$as_me:$LINENO: result: $ac_res" >&5
19580echo "${ECHO_T}$ac_res" >&6; }
19581if test `eval echo '${'$as_ac_var'}'` = yes; then
973a76b1 19582 cat >>confdefs.h <<_ACEOF
b0448899 19583#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
973a76b1
DL
19584_ACEOF
19585
19586else
19587 # strftime is in -lintl on SCO UNIX.
b0448899
CY
19588{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19589echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1 19590if test "${ac_cv_lib_intl_strftime+set}" = set; then
b0448899 19591 echo $ECHO_N "(cached) $ECHO_C" >&6
973a76b1
DL
19592else
19593 ac_check_lib_save_LIBS=$LIBS
19594LIBS="-lintl $LIBS"
19595cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19596/* confdefs.h. */
19597_ACEOF
19598cat confdefs.h >>conftest.$ac_ext
19599cat >>conftest.$ac_ext <<_ACEOF
19600/* end confdefs.h. */
973a76b1 19601
ca81d7a0
JD
19602/* Override any GCC internal prototype to avoid an error.
19603 Use char because int might match the return type of a GCC
19604 builtin and then its argument prototype would still apply. */
973a76b1
DL
19605#ifdef __cplusplus
19606extern "C"
19607#endif
973a76b1
DL
19608char strftime ();
19609int
19610main ()
19611{
ca81d7a0 19612return strftime ();
973a76b1
DL
19613 ;
19614 return 0;
19615}
19616_ACEOF
19617rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19618if { (ac_try="$ac_link"
19619case "(($ac_try" in
19620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19621 *) ac_try_echo=$ac_try;;
19622esac
b0448899 19623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19624 (eval "$ac_link") 2>conftest.er1
973a76b1 19625 ac_status=$?
edfaf76d
LK
19626 grep -v '^ *+' conftest.er1 >conftest.err
19627 rm -f conftest.er1
19628 cat conftest.err >&5
b0448899 19629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19630 (exit $ac_status); } && {
19631 test -z "$ac_c_werror_flag" ||
19632 test ! -s conftest.err
b0448899
CY
19633 } && test -s conftest$ac_exeext &&
19634 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19635 ac_cv_lib_intl_strftime=yes
19636else
b0448899 19637 echo "$as_me: failed program was:" >&5
19650fd6
AS
19638sed 's/^/| /' conftest.$ac_ext >&5
19639
ca81d7a0 19640 ac_cv_lib_intl_strftime=no
973a76b1 19641fi
ca81d7a0 19642
f053c89f 19643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19644 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19645LIBS=$ac_check_lib_save_LIBS
19646fi
b0448899
CY
19647{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19648echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
19649if test $ac_cv_lib_intl_strftime = yes; then
973a76b1
DL
19650 cat >>confdefs.h <<\_ACEOF
19651#define HAVE_STRFTIME 1
19652_ACEOF
19653
19654LIBS="-lintl $LIBS"
19655fi
19656
19657fi
19658done
19659
19660
b936fae4
AS
19661# UNIX98 PTYs.
19662
19663for ac_func in grantpt
503d2be0 19664do
b0448899
CY
19665as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19666{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19667echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19668if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 19669 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19670else
503d2be0 19671 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19672/* confdefs.h. */
19673_ACEOF
19674cat confdefs.h >>conftest.$ac_ext
19675cat >>conftest.$ac_ext <<_ACEOF
19676/* end confdefs.h. */
edfaf76d
LK
19677/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19678 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19679#define $ac_func innocuous_$ac_func
19680
503d2be0 19681/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19682 which can conflict with char $ac_func (); below.
19683 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19684 <limits.h> exists even on freestanding compilers. */
edfaf76d 19685
19650fd6
AS
19686#ifdef __STDC__
19687# include <limits.h>
19688#else
19689# include <assert.h>
19690#endif
edfaf76d
LK
19691
19692#undef $ac_func
19693
ca81d7a0
JD
19694/* Override any GCC internal prototype to avoid an error.
19695 Use char because int might match the return type of a GCC
19696 builtin and then its argument prototype would still apply. */
503d2be0
AS
19697#ifdef __cplusplus
19698extern "C"
19699#endif
503d2be0 19700char $ac_func ();
503d2be0
AS
19701/* The GNU C library defines this for functions which it implements
19702 to always fail with ENOSYS. Some functions are actually named
19703 something starting with __ and the normal name is an alias. */
ca81d7a0 19704#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19705choke me
503d2be0 19706#endif
4c343001 19707
19650fd6
AS
19708int
19709main ()
19710{
ca81d7a0 19711return $ac_func ();
503d2be0
AS
19712 ;
19713 return 0;
19714}
19715_ACEOF
19716rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19717if { (ac_try="$ac_link"
19718case "(($ac_try" in
19719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19720 *) ac_try_echo=$ac_try;;
19721esac
b0448899 19722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19723 (eval "$ac_link") 2>conftest.er1
503d2be0 19724 ac_status=$?
edfaf76d
LK
19725 grep -v '^ *+' conftest.er1 >conftest.err
19726 rm -f conftest.er1
19727 cat conftest.err >&5
b0448899 19728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19729 (exit $ac_status); } && {
19730 test -z "$ac_c_werror_flag" ||
19731 test ! -s conftest.err
b0448899
CY
19732 } && test -s conftest$ac_exeext &&
19733 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19734 eval "$as_ac_var=yes"
19735else
b0448899 19736 echo "$as_me: failed program was:" >&5
19650fd6
AS
19737sed 's/^/| /' conftest.$ac_ext >&5
19738
ca81d7a0 19739 eval "$as_ac_var=no"
503d2be0 19740fi
ca81d7a0 19741
f053c89f 19742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19743 conftest$ac_exeext conftest.$ac_ext
503d2be0 19744fi
b0448899
CY
19745ac_res=`eval echo '${'$as_ac_var'}'`
19746 { echo "$as_me:$LINENO: result: $ac_res" >&5
19747echo "${ECHO_T}$ac_res" >&6; }
19748if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19749 cat >>confdefs.h <<_ACEOF
b0448899 19750#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19751_ACEOF
4c343001
DL
19752
19753fi
503d2be0
AS
19754done
19755
c0d27fcc 19756
b936fae4 19757# PTY-related GNU extensions.
4c343001 19758
b936fae4
AS
19759for ac_func in getpt
19760do
b0448899
CY
19761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19762{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19764if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 19765 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19766else
b936fae4 19767 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19768/* confdefs.h. */
19769_ACEOF
19770cat confdefs.h >>conftest.$ac_ext
19771cat >>conftest.$ac_ext <<_ACEOF
19772/* end confdefs.h. */
edfaf76d
LK
19773/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19774 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19775#define $ac_func innocuous_$ac_func
19776
087121cc 19777/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19778 which can conflict with char $ac_func (); below.
19779 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19780 <limits.h> exists even on freestanding compilers. */
edfaf76d 19781
19650fd6
AS
19782#ifdef __STDC__
19783# include <limits.h>
19784#else
19785# include <assert.h>
19786#endif
edfaf76d
LK
19787
19788#undef $ac_func
19789
ca81d7a0
JD
19790/* Override any GCC internal prototype to avoid an error.
19791 Use char because int might match the return type of a GCC
19792 builtin and then its argument prototype would still apply. */
503d2be0
AS
19793#ifdef __cplusplus
19794extern "C"
19795#endif
503d2be0 19796char $ac_func ();
087121cc
GM
19797/* The GNU C library defines this for functions which it implements
19798 to always fail with ENOSYS. Some functions are actually named
19799 something starting with __ and the normal name is an alias. */
ca81d7a0 19800#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19801choke me
087121cc
GM
19802#endif
19803
19650fd6
AS
19804int
19805main ()
19806{
ca81d7a0 19807return $ac_func ();
503d2be0
AS
19808 ;
19809 return 0;
19810}
19811_ACEOF
19812rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19813if { (ac_try="$ac_link"
19814case "(($ac_try" in
19815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19816 *) ac_try_echo=$ac_try;;
19817esac
b0448899 19818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19819 (eval "$ac_link") 2>conftest.er1
503d2be0 19820 ac_status=$?
edfaf76d
LK
19821 grep -v '^ *+' conftest.er1 >conftest.err
19822 rm -f conftest.er1
19823 cat conftest.err >&5
b0448899 19824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19825 (exit $ac_status); } && {
19826 test -z "$ac_c_werror_flag" ||
19827 test ! -s conftest.err
b0448899
CY
19828 } && test -s conftest$ac_exeext &&
19829 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19830 eval "$as_ac_var=yes"
19831else
b0448899 19832 echo "$as_me: failed program was:" >&5
19650fd6
AS
19833sed 's/^/| /' conftest.$ac_ext >&5
19834
ca81d7a0 19835 eval "$as_ac_var=no"
503d2be0 19836fi
ca81d7a0 19837
f053c89f 19838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19839 conftest$ac_exeext conftest.$ac_ext
503d2be0 19840fi
b0448899
CY
19841ac_res=`eval echo '${'$as_ac_var'}'`
19842 { echo "$as_me:$LINENO: result: $ac_res" >&5
19843echo "${ECHO_T}$ac_res" >&6; }
19844if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19845 cat >>confdefs.h <<_ACEOF
b0448899 19846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19847_ACEOF
087121cc 19848
087121cc
GM
19849fi
19850done
19851
c0d27fcc 19852
ba4481b5
DL
19853# Check this now, so that we will NOT find the above functions in ncurses.
19854# That is because we have not set up to link ncurses in lib-src.
19855# It's better to believe a function is not available
19856# than to expect to find it in ncurses.
503d2be0 19857
b0448899
CY
19858{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19859echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0 19860if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
b0448899 19861 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19862else
503d2be0 19863 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19864LIBS="-lncurses $LIBS"
503d2be0 19865cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19866/* confdefs.h. */
19867_ACEOF
19868cat confdefs.h >>conftest.$ac_ext
19869cat >>conftest.$ac_ext <<_ACEOF
19870/* end confdefs.h. */
503d2be0 19871
ca81d7a0
JD
19872/* Override any GCC internal prototype to avoid an error.
19873 Use char because int might match the return type of a GCC
19874 builtin and then its argument prototype would still apply. */
503d2be0
AS
19875#ifdef __cplusplus
19876extern "C"
19877#endif
503d2be0
AS
19878char tparm ();
19879int
19880main ()
19881{
ca81d7a0 19882return tparm ();
503d2be0
AS
19883 ;
19884 return 0;
19885}
19886_ACEOF
19887rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19888if { (ac_try="$ac_link"
19889case "(($ac_try" in
19890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19891 *) ac_try_echo=$ac_try;;
19892esac
b0448899 19893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19894 (eval "$ac_link") 2>conftest.er1
503d2be0 19895 ac_status=$?
edfaf76d
LK
19896 grep -v '^ *+' conftest.er1 >conftest.err
19897 rm -f conftest.er1
19898 cat conftest.err >&5
b0448899 19899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19900 (exit $ac_status); } && {
19901 test -z "$ac_c_werror_flag" ||
19902 test ! -s conftest.err
b0448899
CY
19903 } && test -s conftest$ac_exeext &&
19904 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19905 ac_cv_lib_ncurses_tparm=yes
19906else
b0448899 19907 echo "$as_me: failed program was:" >&5
19650fd6
AS
19908sed 's/^/| /' conftest.$ac_ext >&5
19909
ca81d7a0 19910 ac_cv_lib_ncurses_tparm=no
503d2be0 19911fi
ca81d7a0 19912
f053c89f 19913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19914 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19915LIBS=$ac_check_lib_save_LIBS
19916fi
b0448899
CY
19917{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19918echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
19919if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19920 cat >>confdefs.h <<_ACEOF
503d2be0 19921#define HAVE_LIBNCURSES 1
c0d27fcc 19922_ACEOF
ba4481b5
DL
19923
19924 LIBS="-lncurses $LIBS"
19925
ba4481b5
DL
19926fi
19927
c0d27fcc 19928
bc3512d0
CY
19929# Do we have res_init, for detecting changes in /etc/resolv.conf?
19930
19931resolv=no
074767f2 19932cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19933/* confdefs.h. */
19934_ACEOF
19935cat confdefs.h >>conftest.$ac_ext
19936cat >>conftest.$ac_ext <<_ACEOF
19937/* end confdefs.h. */
074767f2
AS
19938#include <netinet/in.h>
19939#include <arpa/nameser.h>
19940#include <resolv.h>
bc3512d0
CY
19941int
19942main ()
19943{
074767f2 19944return res_init();
bc3512d0
CY
19945 ;
19946 return 0;
19947}
19948_ACEOF
19949rm -f conftest.$ac_objext conftest$ac_exeext
19950if { (ac_try="$ac_link"
19951case "(($ac_try" in
19952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19953 *) ac_try_echo=$ac_try;;
19954esac
b0448899 19955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
bc3512d0
CY
19956 (eval "$ac_link") 2>conftest.er1
19957 ac_status=$?
19958 grep -v '^ *+' conftest.er1 >conftest.err
19959 rm -f conftest.er1
19960 cat conftest.err >&5
b0448899 19961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
bc3512d0
CY
19962 (exit $ac_status); } && {
19963 test -z "$ac_c_werror_flag" ||
19964 test ! -s conftest.err
b0448899
CY
19965 } && test -s conftest$ac_exeext &&
19966 $as_test_x conftest$ac_exeext; then
074767f2 19967 have_res_init=yes
bc3512d0 19968else
b0448899 19969 echo "$as_me: failed program was:" >&5
bc3512d0
CY
19970sed 's/^/| /' conftest.$ac_ext >&5
19971
074767f2 19972 have_res_init=no
bc3512d0
CY
19973fi
19974
19975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19976 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19977if test "$have_res_init" = no; then
19978 OLIBS="$LIBS"
19979 LIBS="$LIBS -lresolv"
b0448899
CY
19980 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19981echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
bc3512d0
CY
19982 cat >conftest.$ac_ext <<_ACEOF
19983/* confdefs.h. */
19984_ACEOF
19985cat confdefs.h >>conftest.$ac_ext
19986cat >>conftest.$ac_ext <<_ACEOF
19987/* end confdefs.h. */
19988#include <netinet/in.h>
19989#include <arpa/nameser.h>
19990#include <resolv.h>
19991int
19992main ()
19993{
074767f2 19994return res_init();
bc3512d0
CY
19995 ;
19996 return 0;
19997}
19998_ACEOF
19999rm -f conftest.$ac_objext conftest$ac_exeext
20000if { (ac_try="$ac_link"
20001case "(($ac_try" in
20002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20003 *) ac_try_echo=$ac_try;;
20004esac
b0448899 20005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
bc3512d0
CY
20006 (eval "$ac_link") 2>conftest.er1
20007 ac_status=$?
20008 grep -v '^ *+' conftest.er1 >conftest.err
20009 rm -f conftest.er1
20010 cat conftest.err >&5
b0448899 20011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
bc3512d0
CY
20012 (exit $ac_status); } && {
20013 test -z "$ac_c_werror_flag" ||
20014 test ! -s conftest.err
b0448899
CY
20015 } && test -s conftest$ac_exeext &&
20016 $as_test_x conftest$ac_exeext; then
bc3512d0
CY
20017 have_res_init=yes
20018else
b0448899 20019 echo "$as_me: failed program was:" >&5
bc3512d0
CY
20020sed 's/^/| /' conftest.$ac_ext >&5
20021
20022 have_res_init=no
20023fi
20024
20025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20026 conftest$ac_exeext conftest.$ac_ext
b0448899
CY
20027 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20028echo "${ECHO_T}$have_res_init" >&6; }
bc3512d0
CY
20029 if test "$have_res_init" = yes ; then
20030 resolv=yes
20031 fi
20032 LIBS="$OLIBS"
20033fi
20034
20035if test "$have_res_init" = yes; then
20036
20037cat >>confdefs.h <<\_ACEOF
20038#define HAVE_RES_INIT 1
20039_ACEOF
20040
20041fi
20042
84e70f78 20043# Do we need the Hesiod library to provide the support routines?
ff1095d1 20044if test "$with_hesiod" != no ; then
84e70f78 20045 # Don't set $LIBS here -- see comments above.
b0448899
CY
20046 { echo "$as_me:$LINENO: checking for res_send" >&5
20047echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78 20048if test "${ac_cv_func_res_send+set}" = set; then
b0448899 20049 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20050else
20051 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20052/* confdefs.h. */
20053_ACEOF
20054cat confdefs.h >>conftest.$ac_ext
20055cat >>conftest.$ac_ext <<_ACEOF
20056/* end confdefs.h. */
edfaf76d
LK
20057/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20058 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20059#define res_send innocuous_res_send
20060
84e70f78 20061/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20062 which can conflict with char res_send (); below.
20063 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20064 <limits.h> exists even on freestanding compilers. */
edfaf76d 20065
19650fd6
AS
20066#ifdef __STDC__
20067# include <limits.h>
20068#else
20069# include <assert.h>
20070#endif
edfaf76d
LK
20071
20072#undef res_send
20073
ca81d7a0
JD
20074/* Override any GCC internal prototype to avoid an error.
20075 Use char because int might match the return type of a GCC
20076 builtin and then its argument prototype would still apply. */
84e70f78
KR
20077#ifdef __cplusplus
20078extern "C"
20079#endif
84e70f78 20080char res_send ();
84e70f78
KR
20081/* The GNU C library defines this for functions which it implements
20082 to always fail with ENOSYS. Some functions are actually named
20083 something starting with __ and the normal name is an alias. */
ca81d7a0 20084#if defined __stub_res_send || defined __stub___res_send
84e70f78 20085choke me
cd958eb3
MB
20086#endif
20087
19650fd6
AS
20088int
20089main ()
20090{
ca81d7a0 20091return res_send ();
84e70f78
KR
20092 ;
20093 return 0;
20094}
20095_ACEOF
20096rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20097if { (ac_try="$ac_link"
20098case "(($ac_try" in
20099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20100 *) ac_try_echo=$ac_try;;
20101esac
b0448899 20102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20103 (eval "$ac_link") 2>conftest.er1
84e70f78 20104 ac_status=$?
edfaf76d
LK
20105 grep -v '^ *+' conftest.er1 >conftest.err
20106 rm -f conftest.er1
20107 cat conftest.err >&5
b0448899 20108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20109 (exit $ac_status); } && {
20110 test -z "$ac_c_werror_flag" ||
20111 test ! -s conftest.err
b0448899
CY
20112 } && test -s conftest$ac_exeext &&
20113 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20114 ac_cv_func_res_send=yes
20115else
b0448899 20116 echo "$as_me: failed program was:" >&5
19650fd6
AS
20117sed 's/^/| /' conftest.$ac_ext >&5
20118
ca81d7a0 20119 ac_cv_func_res_send=no
84e70f78 20120fi
ca81d7a0 20121
f053c89f 20122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20123 conftest$ac_exeext conftest.$ac_ext
84e70f78 20124fi
b0448899
CY
20125{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20126echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
20127if test $ac_cv_func_res_send = yes; then
84e70f78
KR
20128 :
20129else
b0448899
CY
20130 { echo "$as_me:$LINENO: checking for __res_send" >&5
20131echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78 20132if test "${ac_cv_func___res_send+set}" = set; then
b0448899 20133 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20134else
20135 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20136/* confdefs.h. */
20137_ACEOF
20138cat confdefs.h >>conftest.$ac_ext
20139cat >>conftest.$ac_ext <<_ACEOF
20140/* end confdefs.h. */
edfaf76d
LK
20141/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20142 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20143#define __res_send innocuous___res_send
20144
84e70f78 20145/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20146 which can conflict with char __res_send (); below.
20147 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20148 <limits.h> exists even on freestanding compilers. */
edfaf76d 20149
19650fd6
AS
20150#ifdef __STDC__
20151# include <limits.h>
20152#else
20153# include <assert.h>
20154#endif
edfaf76d
LK
20155
20156#undef __res_send
20157
ca81d7a0
JD
20158/* Override any GCC internal prototype to avoid an error.
20159 Use char because int might match the return type of a GCC
20160 builtin and then its argument prototype would still apply. */
84e70f78
KR
20161#ifdef __cplusplus
20162extern "C"
20163#endif
84e70f78 20164char __res_send ();
84e70f78
KR
20165/* The GNU C library defines this for functions which it implements
20166 to always fail with ENOSYS. Some functions are actually named
20167 something starting with __ and the normal name is an alias. */
ca81d7a0 20168#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20169choke me
84e70f78
KR
20170#endif
20171
19650fd6
AS
20172int
20173main ()
20174{
ca81d7a0 20175return __res_send ();
84e70f78
KR
20176 ;
20177 return 0;
20178}
20179_ACEOF
20180rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20181if { (ac_try="$ac_link"
20182case "(($ac_try" in
20183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20184 *) ac_try_echo=$ac_try;;
20185esac
b0448899 20186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20187 (eval "$ac_link") 2>conftest.er1
84e70f78 20188 ac_status=$?
edfaf76d
LK
20189 grep -v '^ *+' conftest.er1 >conftest.err
20190 rm -f conftest.er1
20191 cat conftest.err >&5
b0448899 20192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20193 (exit $ac_status); } && {
20194 test -z "$ac_c_werror_flag" ||
20195 test ! -s conftest.err
b0448899
CY
20196 } && test -s conftest$ac_exeext &&
20197 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20198 ac_cv_func___res_send=yes
20199else
b0448899 20200 echo "$as_me: failed program was:" >&5
19650fd6
AS
20201sed 's/^/| /' conftest.$ac_ext >&5
20202
ca81d7a0 20203 ac_cv_func___res_send=no
84e70f78 20204fi
ca81d7a0 20205
f053c89f 20206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20207 conftest$ac_exeext conftest.$ac_ext
84e70f78 20208fi
b0448899
CY
20209{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20210echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
20211if test $ac_cv_func___res_send = yes; then
84e70f78
KR
20212 :
20213else
b0448899
CY
20214 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20215echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78 20216if test "${ac_cv_lib_resolv_res_send+set}" = set; then
b0448899 20217 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20218else
20219 ac_check_lib_save_LIBS=$LIBS
20220LIBS="-lresolv $LIBS"
20221cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20222/* confdefs.h. */
20223_ACEOF
20224cat confdefs.h >>conftest.$ac_ext
20225cat >>conftest.$ac_ext <<_ACEOF
20226/* end confdefs.h. */
84e70f78 20227
ca81d7a0
JD
20228/* Override any GCC internal prototype to avoid an error.
20229 Use char because int might match the return type of a GCC
20230 builtin and then its argument prototype would still apply. */
84e70f78
KR
20231#ifdef __cplusplus
20232extern "C"
20233#endif
84e70f78
KR
20234char res_send ();
20235int
20236main ()
20237{
ca81d7a0 20238return res_send ();
84e70f78
KR
20239 ;
20240 return 0;
20241}
20242_ACEOF
20243rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20244if { (ac_try="$ac_link"
20245case "(($ac_try" in
20246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20247 *) ac_try_echo=$ac_try;;
20248esac
b0448899 20249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20250 (eval "$ac_link") 2>conftest.er1
84e70f78 20251 ac_status=$?
edfaf76d
LK
20252 grep -v '^ *+' conftest.er1 >conftest.err
20253 rm -f conftest.er1
20254 cat conftest.err >&5
b0448899 20255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20256 (exit $ac_status); } && {
20257 test -z "$ac_c_werror_flag" ||
20258 test ! -s conftest.err
b0448899
CY
20259 } && test -s conftest$ac_exeext &&
20260 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20261 ac_cv_lib_resolv_res_send=yes
20262else
b0448899 20263 echo "$as_me: failed program was:" >&5
19650fd6
AS
20264sed 's/^/| /' conftest.$ac_ext >&5
20265
ca81d7a0 20266 ac_cv_lib_resolv_res_send=no
84e70f78 20267fi
ca81d7a0 20268
f053c89f 20269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20270 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20271LIBS=$ac_check_lib_save_LIBS
20272fi
b0448899
CY
20273{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20274echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
20275if test $ac_cv_lib_resolv_res_send = yes; then
84e70f78
KR
20276 resolv=yes
20277else
b0448899
CY
20278 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20279echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78 20280if test "${ac_cv_lib_resolv___res_send+set}" = set; then
b0448899 20281 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20282else
20283 ac_check_lib_save_LIBS=$LIBS
20284LIBS="-lresolv $LIBS"
20285cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20286/* confdefs.h. */
20287_ACEOF
20288cat confdefs.h >>conftest.$ac_ext
20289cat >>conftest.$ac_ext <<_ACEOF
20290/* end confdefs.h. */
84e70f78 20291
ca81d7a0
JD
20292/* Override any GCC internal prototype to avoid an error.
20293 Use char because int might match the return type of a GCC
20294 builtin and then its argument prototype would still apply. */
84e70f78
KR
20295#ifdef __cplusplus
20296extern "C"
20297#endif
84e70f78
KR
20298char __res_send ();
20299int
20300main ()
20301{
ca81d7a0 20302return __res_send ();
84e70f78
KR
20303 ;
20304 return 0;
20305}
20306_ACEOF
20307rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20308if { (ac_try="$ac_link"
20309case "(($ac_try" in
20310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20311 *) ac_try_echo=$ac_try;;
20312esac
b0448899 20313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20314 (eval "$ac_link") 2>conftest.er1
84e70f78 20315 ac_status=$?
edfaf76d
LK
20316 grep -v '^ *+' conftest.er1 >conftest.err
20317 rm -f conftest.er1
20318 cat conftest.err >&5
b0448899 20319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20320 (exit $ac_status); } && {
20321 test -z "$ac_c_werror_flag" ||
20322 test ! -s conftest.err
b0448899
CY
20323 } && test -s conftest$ac_exeext &&
20324 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20325 ac_cv_lib_resolv___res_send=yes
20326else
b0448899 20327 echo "$as_me: failed program was:" >&5
19650fd6
AS
20328sed 's/^/| /' conftest.$ac_ext >&5
20329
ca81d7a0 20330 ac_cv_lib_resolv___res_send=no
84e70f78 20331fi
ca81d7a0 20332
f053c89f 20333rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20334 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20335LIBS=$ac_check_lib_save_LIBS
20336fi
b0448899
CY
20337{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20338echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
20339if test $ac_cv_lib_resolv___res_send = yes; then
84e70f78
KR
20340 resolv=yes
20341fi
20342
20343fi
20344
20345fi
20346
20347fi
20348
20349 if test "$resolv" = yes ; then
20350 RESOLVLIB=-lresolv
84e70f78
KR
20351 else
20352 RESOLVLIB=
20353 fi
b0448899
CY
20354 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20355echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78 20356if test "${ac_cv_func_hes_getmailhost+set}" = set; then
b0448899 20357 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20358else
20359 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20360/* confdefs.h. */
20361_ACEOF
20362cat confdefs.h >>conftest.$ac_ext
20363cat >>conftest.$ac_ext <<_ACEOF
20364/* end confdefs.h. */
edfaf76d
LK
20365/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20366 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20367#define hes_getmailhost innocuous_hes_getmailhost
20368
84e70f78 20369/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20370 which can conflict with char hes_getmailhost (); below.
20371 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20372 <limits.h> exists even on freestanding compilers. */
edfaf76d 20373
19650fd6
AS
20374#ifdef __STDC__
20375# include <limits.h>
20376#else
20377# include <assert.h>
20378#endif
edfaf76d
LK
20379
20380#undef hes_getmailhost
20381
ca81d7a0
JD
20382/* Override any GCC internal prototype to avoid an error.
20383 Use char because int might match the return type of a GCC
20384 builtin and then its argument prototype would still apply. */
84e70f78
KR
20385#ifdef __cplusplus
20386extern "C"
20387#endif
84e70f78 20388char hes_getmailhost ();
84e70f78
KR
20389/* The GNU C library defines this for functions which it implements
20390 to always fail with ENOSYS. Some functions are actually named
20391 something starting with __ and the normal name is an alias. */
ca81d7a0 20392#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20393choke me
cd958eb3
MB
20394#endif
20395
19650fd6
AS
20396int
20397main ()
20398{
ca81d7a0 20399return hes_getmailhost ();
84e70f78
KR
20400 ;
20401 return 0;
20402}
20403_ACEOF
20404rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20405if { (ac_try="$ac_link"
20406case "(($ac_try" in
20407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20408 *) ac_try_echo=$ac_try;;
20409esac
b0448899 20410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20411 (eval "$ac_link") 2>conftest.er1
84e70f78 20412 ac_status=$?
edfaf76d
LK
20413 grep -v '^ *+' conftest.er1 >conftest.err
20414 rm -f conftest.er1
20415 cat conftest.err >&5
b0448899 20416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20417 (exit $ac_status); } && {
20418 test -z "$ac_c_werror_flag" ||
20419 test ! -s conftest.err
b0448899
CY
20420 } && test -s conftest$ac_exeext &&
20421 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20422 ac_cv_func_hes_getmailhost=yes
20423else
b0448899 20424 echo "$as_me: failed program was:" >&5
19650fd6
AS
20425sed 's/^/| /' conftest.$ac_ext >&5
20426
ca81d7a0 20427 ac_cv_func_hes_getmailhost=no
84e70f78 20428fi
ca81d7a0 20429
f053c89f 20430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20431 conftest$ac_exeext conftest.$ac_ext
84e70f78 20432fi
b0448899
CY
20433{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20434echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
20435if test $ac_cv_func_hes_getmailhost = yes; then
84e70f78
KR
20436 :
20437else
b0448899
CY
20438 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20439echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78 20440if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
b0448899 20441 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20442else
20443 ac_check_lib_save_LIBS=$LIBS
20444LIBS="-lhesiod $RESOLVLIB $LIBS"
20445cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20446/* confdefs.h. */
20447_ACEOF
20448cat confdefs.h >>conftest.$ac_ext
20449cat >>conftest.$ac_ext <<_ACEOF
20450/* end confdefs.h. */
84e70f78 20451
ca81d7a0
JD
20452/* Override any GCC internal prototype to avoid an error.
20453 Use char because int might match the return type of a GCC
20454 builtin and then its argument prototype would still apply. */
84e70f78
KR
20455#ifdef __cplusplus
20456extern "C"
20457#endif
84e70f78
KR
20458char hes_getmailhost ();
20459int
20460main ()
20461{
ca81d7a0 20462return hes_getmailhost ();
84e70f78
KR
20463 ;
20464 return 0;
20465}
20466_ACEOF
20467rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20468if { (ac_try="$ac_link"
20469case "(($ac_try" in
20470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20471 *) ac_try_echo=$ac_try;;
20472esac
b0448899 20473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20474 (eval "$ac_link") 2>conftest.er1
84e70f78 20475 ac_status=$?
edfaf76d
LK
20476 grep -v '^ *+' conftest.er1 >conftest.err
20477 rm -f conftest.er1
20478 cat conftest.err >&5
b0448899 20479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20480 (exit $ac_status); } && {
20481 test -z "$ac_c_werror_flag" ||
20482 test ! -s conftest.err
b0448899
CY
20483 } && test -s conftest$ac_exeext &&
20484 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20485 ac_cv_lib_hesiod_hes_getmailhost=yes
20486else
b0448899 20487 echo "$as_me: failed program was:" >&5
19650fd6
AS
20488sed 's/^/| /' conftest.$ac_ext >&5
20489
ca81d7a0 20490 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20491fi
ca81d7a0 20492
f053c89f 20493rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20494 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20495LIBS=$ac_check_lib_save_LIBS
20496fi
b0448899
CY
20497{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20498echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
20499if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20500
c0d27fcc 20501cat >>confdefs.h <<\_ACEOF
84e70f78 20502#define HAVE_LIBHESIOD 1
c0d27fcc 20503_ACEOF
84e70f78
KR
20504
20505else
20506 :
20507fi
20508
20509fi
20510
20511fi
20512
bc3512d0
CY
20513# Do we need libresolv (due to res_init or Hesiod)?
20514if test "$resolv" = yes ; then
20515
20516cat >>confdefs.h <<\_ACEOF
20517#define HAVE_LIBRESOLV 1
20518_ACEOF
20519
20520fi
20521
a21616bd 20522# These tell us which Kerberos-related libraries to use.
ff1095d1 20523if test "${with_kerberos}" != no; then
503d2be0 20524
b0448899
CY
20525{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20526echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0 20527if test "${ac_cv_lib_com_err_com_err+set}" = set; then
b0448899 20528 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20529else
503d2be0 20530 ac_check_lib_save_LIBS=$LIBS
a21616bd 20531LIBS="-lcom_err $LIBS"
503d2be0 20532cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20533/* confdefs.h. */
20534_ACEOF
20535cat confdefs.h >>conftest.$ac_ext
20536cat >>conftest.$ac_ext <<_ACEOF
20537/* end confdefs.h. */
503d2be0 20538
ca81d7a0
JD
20539/* Override any GCC internal prototype to avoid an error.
20540 Use char because int might match the return type of a GCC
20541 builtin and then its argument prototype would still apply. */
503d2be0
AS
20542#ifdef __cplusplus
20543extern "C"
20544#endif
503d2be0
AS
20545char com_err ();
20546int
20547main ()
20548{
ca81d7a0 20549return com_err ();
503d2be0
AS
20550 ;
20551 return 0;
20552}
20553_ACEOF
20554rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20555if { (ac_try="$ac_link"
20556case "(($ac_try" in
20557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20558 *) ac_try_echo=$ac_try;;
20559esac
b0448899 20560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20561 (eval "$ac_link") 2>conftest.er1
503d2be0 20562 ac_status=$?
edfaf76d
LK
20563 grep -v '^ *+' conftest.er1 >conftest.err
20564 rm -f conftest.er1
20565 cat conftest.err >&5
b0448899 20566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20567 (exit $ac_status); } && {
20568 test -z "$ac_c_werror_flag" ||
20569 test ! -s conftest.err
b0448899
CY
20570 } && test -s conftest$ac_exeext &&
20571 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20572 ac_cv_lib_com_err_com_err=yes
20573else
b0448899 20574 echo "$as_me: failed program was:" >&5
19650fd6
AS
20575sed 's/^/| /' conftest.$ac_ext >&5
20576
ca81d7a0 20577 ac_cv_lib_com_err_com_err=no
503d2be0 20578fi
ca81d7a0 20579
f053c89f 20580rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20581 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20582LIBS=$ac_check_lib_save_LIBS
20583fi
b0448899
CY
20584{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20585echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
20586if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20587 cat >>confdefs.h <<_ACEOF
503d2be0 20588#define HAVE_LIBCOM_ERR 1
c0d27fcc 20589_ACEOF
a21616bd
KR
20590
20591 LIBS="-lcom_err $LIBS"
20592
a21616bd
KR
20593fi
20594
c0d27fcc 20595
b0448899
CY
20596{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20597echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0 20598if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
b0448899 20599 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20600else
503d2be0 20601 ac_check_lib_save_LIBS=$LIBS
a21616bd 20602LIBS="-lk5crypto $LIBS"
503d2be0 20603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20604/* confdefs.h. */
20605_ACEOF
20606cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */
503d2be0 20609
ca81d7a0
JD
20610/* Override any GCC internal prototype to avoid an error.
20611 Use char because int might match the return type of a GCC
20612 builtin and then its argument prototype would still apply. */
503d2be0
AS
20613#ifdef __cplusplus
20614extern "C"
20615#endif
503d2be0
AS
20616char mit_des_cbc_encrypt ();
20617int
20618main ()
20619{
ca81d7a0 20620return mit_des_cbc_encrypt ();
503d2be0
AS
20621 ;
20622 return 0;
20623}
20624_ACEOF
20625rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20626if { (ac_try="$ac_link"
20627case "(($ac_try" in
20628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20629 *) ac_try_echo=$ac_try;;
20630esac
b0448899 20631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20632 (eval "$ac_link") 2>conftest.er1
503d2be0 20633 ac_status=$?
edfaf76d
LK
20634 grep -v '^ *+' conftest.er1 >conftest.err
20635 rm -f conftest.er1
20636 cat conftest.err >&5
b0448899 20637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20638 (exit $ac_status); } && {
20639 test -z "$ac_c_werror_flag" ||
20640 test ! -s conftest.err
b0448899
CY
20641 } && test -s conftest$ac_exeext &&
20642 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20643 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20644else
b0448899 20645 echo "$as_me: failed program was:" >&5
19650fd6
AS
20646sed 's/^/| /' conftest.$ac_ext >&5
20647
ca81d7a0 20648 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20649fi
ca81d7a0 20650
f053c89f 20651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20652 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20653LIBS=$ac_check_lib_save_LIBS
20654fi
b0448899
CY
20655{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20656echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
20657if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20658 cat >>confdefs.h <<_ACEOF
503d2be0 20659#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20660_ACEOF
a21616bd
KR
20661
20662 LIBS="-lk5crypto $LIBS"
20663
a21616bd
KR
20664fi
20665
c0d27fcc 20666
b0448899
CY
20667{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20668echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0 20669if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
b0448899 20670 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20671else
503d2be0 20672 ac_check_lib_save_LIBS=$LIBS
a21616bd 20673LIBS="-lcrypto $LIBS"
503d2be0 20674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20675/* confdefs.h. */
20676_ACEOF
20677cat confdefs.h >>conftest.$ac_ext
20678cat >>conftest.$ac_ext <<_ACEOF
20679/* end confdefs.h. */
503d2be0 20680
ca81d7a0
JD
20681/* Override any GCC internal prototype to avoid an error.
20682 Use char because int might match the return type of a GCC
20683 builtin and then its argument prototype would still apply. */
503d2be0
AS
20684#ifdef __cplusplus
20685extern "C"
20686#endif
503d2be0
AS
20687char mit_des_cbc_encrypt ();
20688int
20689main ()
20690{
ca81d7a0 20691return mit_des_cbc_encrypt ();
503d2be0
AS
20692 ;
20693 return 0;
20694}
20695_ACEOF
20696rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20697if { (ac_try="$ac_link"
20698case "(($ac_try" in
20699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20700 *) ac_try_echo=$ac_try;;
20701esac
b0448899 20702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20703 (eval "$ac_link") 2>conftest.er1
503d2be0 20704 ac_status=$?
edfaf76d
LK
20705 grep -v '^ *+' conftest.er1 >conftest.err
20706 rm -f conftest.er1
20707 cat conftest.err >&5
b0448899 20708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20709 (exit $ac_status); } && {
20710 test -z "$ac_c_werror_flag" ||
20711 test ! -s conftest.err
b0448899
CY
20712 } && test -s conftest$ac_exeext &&
20713 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20714 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20715else
b0448899 20716 echo "$as_me: failed program was:" >&5
19650fd6
AS
20717sed 's/^/| /' conftest.$ac_ext >&5
20718
ca81d7a0 20719 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20720fi
ca81d7a0 20721
f053c89f 20722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20723 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20724LIBS=$ac_check_lib_save_LIBS
20725fi
b0448899
CY
20726{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20727echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
20728if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20729 cat >>confdefs.h <<_ACEOF
503d2be0 20730#define HAVE_LIBCRYPTO 1
c0d27fcc 20731_ACEOF
a21616bd
KR
20732
20733 LIBS="-lcrypto $LIBS"
20734
a21616bd
KR
20735fi
20736
c0d27fcc 20737
b0448899
CY
20738{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20739echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0 20740if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
b0448899 20741 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20742else
503d2be0 20743 ac_check_lib_save_LIBS=$LIBS
a21616bd 20744LIBS="-lkrb5 $LIBS"
503d2be0 20745cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20746/* confdefs.h. */
20747_ACEOF
20748cat confdefs.h >>conftest.$ac_ext
20749cat >>conftest.$ac_ext <<_ACEOF
20750/* end confdefs.h. */
a21616bd 20751
ca81d7a0
JD
20752/* Override any GCC internal prototype to avoid an error.
20753 Use char because int might match the return type of a GCC
20754 builtin and then its argument prototype would still apply. */
503d2be0
AS
20755#ifdef __cplusplus
20756extern "C"
20757#endif
503d2be0
AS
20758char krb5_init_context ();
20759int
20760main ()
20761{
ca81d7a0 20762return krb5_init_context ();
503d2be0
AS
20763 ;
20764 return 0;
20765}
20766_ACEOF
20767rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20768if { (ac_try="$ac_link"
20769case "(($ac_try" in
20770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20771 *) ac_try_echo=$ac_try;;
20772esac
b0448899 20773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20774 (eval "$ac_link") 2>conftest.er1
503d2be0 20775 ac_status=$?
edfaf76d
LK
20776 grep -v '^ *+' conftest.er1 >conftest.err
20777 rm -f conftest.er1
20778 cat conftest.err >&5
b0448899 20779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20780 (exit $ac_status); } && {
20781 test -z "$ac_c_werror_flag" ||
20782 test ! -s conftest.err
b0448899
CY
20783 } && test -s conftest$ac_exeext &&
20784 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20785 ac_cv_lib_krb5_krb5_init_context=yes
20786else
b0448899 20787 echo "$as_me: failed program was:" >&5
19650fd6
AS
20788sed 's/^/| /' conftest.$ac_ext >&5
20789
ca81d7a0 20790 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20791fi
ca81d7a0 20792
f053c89f 20793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20794 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20795LIBS=$ac_check_lib_save_LIBS
20796fi
b0448899
CY
20797{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20798echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
20799if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20800 cat >>confdefs.h <<_ACEOF
503d2be0 20801#define HAVE_LIBKRB5 1
c0d27fcc 20802_ACEOF
a21616bd
KR
20803
20804 LIBS="-lkrb5 $LIBS"
20805
a21616bd
KR
20806fi
20807
ff1095d1 20808 if test "${with_kerberos5}" = no; then
503d2be0 20809
b0448899
CY
20810{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20811echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0 20812if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
b0448899 20813 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20814else
503d2be0 20815 ac_check_lib_save_LIBS=$LIBS
a21616bd 20816LIBS="-ldes425 $LIBS"
503d2be0 20817cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20818/* confdefs.h. */
20819_ACEOF
20820cat confdefs.h >>conftest.$ac_ext
20821cat >>conftest.$ac_ext <<_ACEOF
20822/* end confdefs.h. */
503d2be0 20823
ca81d7a0
JD
20824/* Override any GCC internal prototype to avoid an error.
20825 Use char because int might match the return type of a GCC
20826 builtin and then its argument prototype would still apply. */
503d2be0
AS
20827#ifdef __cplusplus
20828extern "C"
20829#endif
503d2be0
AS
20830char des_cbc_encrypt ();
20831int
20832main ()
20833{
ca81d7a0 20834return des_cbc_encrypt ();
503d2be0
AS
20835 ;
20836 return 0;
20837}
20838_ACEOF
20839rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20840if { (ac_try="$ac_link"
20841case "(($ac_try" in
20842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20843 *) ac_try_echo=$ac_try;;
20844esac
b0448899 20845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20846 (eval "$ac_link") 2>conftest.er1
503d2be0 20847 ac_status=$?
edfaf76d
LK
20848 grep -v '^ *+' conftest.er1 >conftest.err
20849 rm -f conftest.er1
20850 cat conftest.err >&5
b0448899 20851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20852 (exit $ac_status); } && {
20853 test -z "$ac_c_werror_flag" ||
20854 test ! -s conftest.err
b0448899
CY
20855 } && test -s conftest$ac_exeext &&
20856 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20857 ac_cv_lib_des425_des_cbc_encrypt=yes
20858else
b0448899 20859 echo "$as_me: failed program was:" >&5
19650fd6
AS
20860sed 's/^/| /' conftest.$ac_ext >&5
20861
ca81d7a0 20862 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20863fi
ca81d7a0 20864
f053c89f 20865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20866 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20867LIBS=$ac_check_lib_save_LIBS
20868fi
b0448899
CY
20869{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20870echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
20871if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20872 cat >>confdefs.h <<_ACEOF
503d2be0 20873#define HAVE_LIBDES425 1
c0d27fcc 20874_ACEOF
a21616bd
KR
20875
20876 LIBS="-ldes425 $LIBS"
20877
20878else
503d2be0 20879
b0448899
CY
20880{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20881echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0 20882if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
b0448899 20883 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20884else
503d2be0 20885 ac_check_lib_save_LIBS=$LIBS
a21616bd 20886LIBS="-ldes $LIBS"
503d2be0 20887cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20888/* confdefs.h. */
20889_ACEOF
20890cat confdefs.h >>conftest.$ac_ext
20891cat >>conftest.$ac_ext <<_ACEOF
20892/* end confdefs.h. */
503d2be0 20893
ca81d7a0
JD
20894/* Override any GCC internal prototype to avoid an error.
20895 Use char because int might match the return type of a GCC
20896 builtin and then its argument prototype would still apply. */
503d2be0
AS
20897#ifdef __cplusplus
20898extern "C"
20899#endif
503d2be0
AS
20900char des_cbc_encrypt ();
20901int
20902main ()
20903{
ca81d7a0 20904return des_cbc_encrypt ();
503d2be0
AS
20905 ;
20906 return 0;
20907}
20908_ACEOF
20909rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20910if { (ac_try="$ac_link"
20911case "(($ac_try" in
20912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20913 *) ac_try_echo=$ac_try;;
20914esac
b0448899 20915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20916 (eval "$ac_link") 2>conftest.er1
503d2be0 20917 ac_status=$?
edfaf76d
LK
20918 grep -v '^ *+' conftest.er1 >conftest.err
20919 rm -f conftest.er1
20920 cat conftest.err >&5
b0448899 20921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20922 (exit $ac_status); } && {
20923 test -z "$ac_c_werror_flag" ||
20924 test ! -s conftest.err
b0448899
CY
20925 } && test -s conftest$ac_exeext &&
20926 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20927 ac_cv_lib_des_des_cbc_encrypt=yes
20928else
b0448899 20929 echo "$as_me: failed program was:" >&5
19650fd6
AS
20930sed 's/^/| /' conftest.$ac_ext >&5
20931
ca81d7a0 20932 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20933fi
ca81d7a0 20934
f053c89f 20935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20936 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20937LIBS=$ac_check_lib_save_LIBS
20938fi
b0448899
CY
20939{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20940echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
20941if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20942 cat >>confdefs.h <<_ACEOF
503d2be0 20943#define HAVE_LIBDES 1
c0d27fcc 20944_ACEOF
a21616bd
KR
20945
20946 LIBS="-ldes $LIBS"
20947
a21616bd
KR
20948fi
20949
20950fi
20951
c0d27fcc 20952
b0448899
CY
20953{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20954echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0 20955if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
b0448899 20956 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20957else
503d2be0 20958 ac_check_lib_save_LIBS=$LIBS
a21616bd 20959LIBS="-lkrb4 $LIBS"
503d2be0 20960cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20961/* confdefs.h. */
20962_ACEOF
20963cat confdefs.h >>conftest.$ac_ext
20964cat >>conftest.$ac_ext <<_ACEOF
20965/* end confdefs.h. */
503d2be0 20966
ca81d7a0
JD
20967/* Override any GCC internal prototype to avoid an error.
20968 Use char because int might match the return type of a GCC
20969 builtin and then its argument prototype would still apply. */
503d2be0
AS
20970#ifdef __cplusplus
20971extern "C"
20972#endif
503d2be0
AS
20973char krb_get_cred ();
20974int
20975main ()
20976{
f053c89f 20977return krb_get_cred ();
503d2be0
AS
20978 ;
20979 return 0;
20980}
20981_ACEOF
20982rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20983if { (ac_try="$ac_link"
20984case "(($ac_try" in
ca81d7a0
JD
20985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20986 *) ac_try_echo=$ac_try;;
20987esac
b0448899 20988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20989 (eval "$ac_link") 2>conftest.er1
503d2be0 20990 ac_status=$?
edfaf76d
LK
20991 grep -v '^ *+' conftest.er1 >conftest.err
20992 rm -f conftest.er1
20993 cat conftest.err >&5
b0448899 20994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20995 (exit $ac_status); } && {
20996 test -z "$ac_c_werror_flag" ||
20997 test ! -s conftest.err
b0448899
CY
20998 } && test -s conftest$ac_exeext &&
20999 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21000 ac_cv_lib_krb4_krb_get_cred=yes
21001else
b0448899 21002 echo "$as_me: failed program was:" >&5
19650fd6
AS
21003sed 's/^/| /' conftest.$ac_ext >&5
21004
ca81d7a0 21005 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21006fi
ca81d7a0 21007
f053c89f 21008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21009 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21010LIBS=$ac_check_lib_save_LIBS
21011fi
b0448899
CY
21012{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21013echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
21014if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21015 cat >>confdefs.h <<_ACEOF
503d2be0 21016#define HAVE_LIBKRB4 1
c0d27fcc 21017_ACEOF
a21616bd
KR
21018
21019 LIBS="-lkrb4 $LIBS"
21020
21021else
503d2be0 21022
b0448899
CY
21023{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21024echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0 21025if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
b0448899 21026 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21027else
503d2be0 21028 ac_check_lib_save_LIBS=$LIBS
a21616bd 21029LIBS="-lkrb $LIBS"
503d2be0 21030cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21031/* confdefs.h. */
21032_ACEOF
21033cat confdefs.h >>conftest.$ac_ext
21034cat >>conftest.$ac_ext <<_ACEOF
21035/* end confdefs.h. */
503d2be0 21036
ca81d7a0
JD
21037/* Override any GCC internal prototype to avoid an error.
21038 Use char because int might match the return type of a GCC
21039 builtin and then its argument prototype would still apply. */
503d2be0
AS
21040#ifdef __cplusplus
21041extern "C"
21042#endif
503d2be0
AS
21043char krb_get_cred ();
21044int
21045main ()
21046{
ca81d7a0 21047return krb_get_cred ();
503d2be0
AS
21048 ;
21049 return 0;
21050}
21051_ACEOF
21052rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21053if { (ac_try="$ac_link"
21054case "(($ac_try" in
21055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21056 *) ac_try_echo=$ac_try;;
21057esac
b0448899 21058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21059 (eval "$ac_link") 2>conftest.er1
503d2be0 21060 ac_status=$?
edfaf76d
LK
21061 grep -v '^ *+' conftest.er1 >conftest.err
21062 rm -f conftest.er1
21063 cat conftest.err >&5
b0448899 21064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21065 (exit $ac_status); } && {
21066 test -z "$ac_c_werror_flag" ||
21067 test ! -s conftest.err
b0448899
CY
21068 } && test -s conftest$ac_exeext &&
21069 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21070 ac_cv_lib_krb_krb_get_cred=yes
21071else
b0448899 21072 echo "$as_me: failed program was:" >&5
19650fd6
AS
21073sed 's/^/| /' conftest.$ac_ext >&5
21074
ca81d7a0 21075 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21076fi
ca81d7a0 21077
f053c89f 21078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21079 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21080LIBS=$ac_check_lib_save_LIBS
21081fi
b0448899
CY
21082{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21083echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
21084if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21085 cat >>confdefs.h <<_ACEOF
503d2be0 21086#define HAVE_LIBKRB 1
c0d27fcc 21087_ACEOF
a21616bd
KR
21088
21089 LIBS="-lkrb $LIBS"
21090
a21616bd
KR
21091fi
21092
21093fi
21094
21095 fi
21096
ff1095d1 21097 if test "${with_kerberos5}" != no; then
503d2be0
AS
21098
21099for ac_header in krb5.h
a21616bd 21100do
b0448899 21101as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21102if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
21103 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21104echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21105if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21106 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21107fi
b0448899
CY
21108ac_res=`eval echo '${'$as_ac_Header'}'`
21109 { echo "$as_me:$LINENO: result: $ac_res" >&5
21110echo "${ECHO_T}$ac_res" >&6; }
98418dba 21111else
c0d27fcc 21112 # Is the header compilable?
b0448899
CY
21113{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21114echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21115cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21116/* confdefs.h. */
21117_ACEOF
21118cat confdefs.h >>conftest.$ac_ext
21119cat >>conftest.$ac_ext <<_ACEOF
21120/* end confdefs.h. */
c0d27fcc
MR
21121$ac_includes_default
21122#include <$ac_header>
21123_ACEOF
21124rm -f conftest.$ac_objext
ca81d7a0
JD
21125if { (ac_try="$ac_compile"
21126case "(($ac_try" in
21127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21128 *) ac_try_echo=$ac_try;;
21129esac
b0448899 21130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21131 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21132 ac_status=$?
edfaf76d
LK
21133 grep -v '^ *+' conftest.er1 >conftest.err
21134 rm -f conftest.er1
21135 cat conftest.err >&5
b0448899 21136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21137 (exit $ac_status); } && {
21138 test -z "$ac_c_werror_flag" ||
21139 test ! -s conftest.err
21140 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21141 ac_header_compiler=yes
21142else
b0448899 21143 echo "$as_me: failed program was:" >&5
19650fd6
AS
21144sed 's/^/| /' conftest.$ac_ext >&5
21145
ca81d7a0 21146 ac_header_compiler=no
c0d27fcc 21147fi
ca81d7a0
JD
21148
21149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
21150{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21151echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21152
21153# Is the header present?
b0448899
CY
21154{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21155echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21156cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21157/* confdefs.h. */
21158_ACEOF
21159cat confdefs.h >>conftest.$ac_ext
21160cat >>conftest.$ac_ext <<_ACEOF
21161/* end confdefs.h. */
503d2be0
AS
21162#include <$ac_header>
21163_ACEOF
ca81d7a0
JD
21164if { (ac_try="$ac_cpp conftest.$ac_ext"
21165case "(($ac_try" in
21166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21167 *) ac_try_echo=$ac_try;;
21168esac
b0448899 21169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21170 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21171 ac_status=$?
6bae0ccf 21172 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21173 rm -f conftest.er1
21174 cat conftest.err >&5
b0448899 21175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21176 (exit $ac_status); } >/dev/null && {
21177 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21178 test ! -s conftest.err
21179 }; then
c0d27fcc 21180 ac_header_preproc=yes
503d2be0 21181else
b0448899 21182 echo "$as_me: failed program was:" >&5
19650fd6
AS
21183sed 's/^/| /' conftest.$ac_ext >&5
21184
c0d27fcc 21185 ac_header_preproc=no
a21616bd 21186fi
ca81d7a0 21187
503d2be0 21188rm -f conftest.err conftest.$ac_ext
b0448899
CY
21189{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21190echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21191
21192# So? What about this header?
edfaf76d
LK
21193case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21194 yes:no: )
b0448899
CY
21195 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21196echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21197 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21198echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21199 ac_header_preproc=yes
19650fd6 21200 ;;
edfaf76d 21201 no:yes:* )
b0448899
CY
21202 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21203echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21204 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21205echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21206 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21207echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21208 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21209echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21210 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21211echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21212 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21213echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21214
19650fd6 21215 ;;
c0d27fcc 21216esac
b0448899
CY
21217{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21218echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21219if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21220 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21221else
edfaf76d 21222 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21223fi
b0448899
CY
21224ac_res=`eval echo '${'$as_ac_Header'}'`
21225 { echo "$as_me:$LINENO: result: $ac_res" >&5
21226echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21227
21228fi
b0448899 21229if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21230 cat >>confdefs.h <<_ACEOF
b0448899 21231#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21232_ACEOF
b0448899
CY
21233 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
21234echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
21287a21 21235if test "${ac_cv_member_krb5_error_text+set}" = set; then
b0448899 21236 echo $ECHO_N "(cached) $ECHO_C" >&6
21287a21
CY
21237else
21238 cat >conftest.$ac_ext <<_ACEOF
21239/* confdefs.h. */
21240_ACEOF
21241cat confdefs.h >>conftest.$ac_ext
21242cat >>conftest.$ac_ext <<_ACEOF
21243/* end confdefs.h. */
21244#include <krb5.h>
21245
21246int
21247main ()
21248{
21249static krb5_error ac_aggr;
21250if (ac_aggr.text)
21251return 0;
21252 ;
21253 return 0;
21254}
21255_ACEOF
21256rm -f conftest.$ac_objext
21257if { (ac_try="$ac_compile"
21258case "(($ac_try" in
21259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21260 *) ac_try_echo=$ac_try;;
21261esac
b0448899 21262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21263 (eval "$ac_compile") 2>conftest.er1
21264 ac_status=$?
21265 grep -v '^ *+' conftest.er1 >conftest.err
21266 rm -f conftest.er1
21267 cat conftest.err >&5
b0448899 21268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21269 (exit $ac_status); } && {
21270 test -z "$ac_c_werror_flag" ||
21271 test ! -s conftest.err
21272 } && test -s conftest.$ac_objext; then
21273 ac_cv_member_krb5_error_text=yes
21274else
b0448899 21275 echo "$as_me: failed program was:" >&5
21287a21
CY
21276sed 's/^/| /' conftest.$ac_ext >&5
21277
21278 cat >conftest.$ac_ext <<_ACEOF
21279/* confdefs.h. */
21280_ACEOF
21281cat confdefs.h >>conftest.$ac_ext
21282cat >>conftest.$ac_ext <<_ACEOF
21283/* end confdefs.h. */
21284#include <krb5.h>
21285
21286int
21287main ()
21288{
21289static krb5_error ac_aggr;
21290if (sizeof ac_aggr.text)
21291return 0;
21292 ;
21293 return 0;
21294}
21295_ACEOF
21296rm -f conftest.$ac_objext
21297if { (ac_try="$ac_compile"
21298case "(($ac_try" in
21299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21300 *) ac_try_echo=$ac_try;;
21301esac
b0448899 21302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21303 (eval "$ac_compile") 2>conftest.er1
21304 ac_status=$?
21305 grep -v '^ *+' conftest.er1 >conftest.err
21306 rm -f conftest.er1
21307 cat conftest.err >&5
b0448899 21308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21309 (exit $ac_status); } && {
21310 test -z "$ac_c_werror_flag" ||
21311 test ! -s conftest.err
21312 } && test -s conftest.$ac_objext; then
21313 ac_cv_member_krb5_error_text=yes
21314else
b0448899 21315 echo "$as_me: failed program was:" >&5
21287a21
CY
21316sed 's/^/| /' conftest.$ac_ext >&5
21317
21318 ac_cv_member_krb5_error_text=no
21319fi
21320
21321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21322fi
21323
21324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21325fi
b0448899
CY
21326{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
21327echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
21328if test $ac_cv_member_krb5_error_text = yes; then
21287a21
CY
21329
21330cat >>confdefs.h <<_ACEOF
21331#define HAVE_KRB5_ERROR_TEXT 1
21332_ACEOF
21333
21334
21335fi
b0448899
CY
21336{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
21337echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
21287a21 21338if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
b0448899 21339 echo $ECHO_N "(cached) $ECHO_C" >&6
21287a21
CY
21340else
21341 cat >conftest.$ac_ext <<_ACEOF
21342/* confdefs.h. */
21343_ACEOF
21344cat confdefs.h >>conftest.$ac_ext
21345cat >>conftest.$ac_ext <<_ACEOF
21346/* end confdefs.h. */
21347#include <krb5.h>
21348
21349int
21350main ()
21351{
21352static krb5_error ac_aggr;
21353if (ac_aggr.e_text)
21354return 0;
21355 ;
21356 return 0;
21357}
21358_ACEOF
21359rm -f conftest.$ac_objext
21360if { (ac_try="$ac_compile"
21361case "(($ac_try" in
21362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21363 *) ac_try_echo=$ac_try;;
21364esac
b0448899 21365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21366 (eval "$ac_compile") 2>conftest.er1
21367 ac_status=$?
21368 grep -v '^ *+' conftest.er1 >conftest.err
21369 rm -f conftest.er1
21370 cat conftest.err >&5
b0448899 21371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21372 (exit $ac_status); } && {
21373 test -z "$ac_c_werror_flag" ||
21374 test ! -s conftest.err
21375 } && test -s conftest.$ac_objext; then
21376 ac_cv_member_krb5_error_e_text=yes
21377else
b0448899 21378 echo "$as_me: failed program was:" >&5
21287a21
CY
21379sed 's/^/| /' conftest.$ac_ext >&5
21380
21381 cat >conftest.$ac_ext <<_ACEOF
21382/* confdefs.h. */
21383_ACEOF
21384cat confdefs.h >>conftest.$ac_ext
21385cat >>conftest.$ac_ext <<_ACEOF
21386/* end confdefs.h. */
21387#include <krb5.h>
21388
21389int
21390main ()
21391{
21392static krb5_error ac_aggr;
21393if (sizeof ac_aggr.e_text)
21394return 0;
21395 ;
21396 return 0;
21397}
21398_ACEOF
21399rm -f conftest.$ac_objext
21400if { (ac_try="$ac_compile"
21401case "(($ac_try" in
21402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21403 *) ac_try_echo=$ac_try;;
21404esac
b0448899 21405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21406 (eval "$ac_compile") 2>conftest.er1
21407 ac_status=$?
21408 grep -v '^ *+' conftest.er1 >conftest.err
21409 rm -f conftest.er1
21410 cat conftest.err >&5
b0448899 21411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21412 (exit $ac_status); } && {
21413 test -z "$ac_c_werror_flag" ||
21414 test ! -s conftest.err
21415 } && test -s conftest.$ac_objext; then
21416 ac_cv_member_krb5_error_e_text=yes
21417else
b0448899 21418 echo "$as_me: failed program was:" >&5
21287a21
CY
21419sed 's/^/| /' conftest.$ac_ext >&5
21420
21421 ac_cv_member_krb5_error_e_text=no
21422fi
21423
21424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21425fi
21426
21427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21428fi
b0448899
CY
21429{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
21430echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
21431if test $ac_cv_member_krb5_error_e_text = yes; then
21287a21
CY
21432
21433cat >>confdefs.h <<_ACEOF
21434#define HAVE_KRB5_ERROR_E_TEXT 1
21435_ACEOF
21436
21437
21438fi
503d2be0 21439
a21616bd 21440fi
c0d27fcc 21441
a21616bd
KR
21442done
21443
21444 else
503d2be0
AS
21445
21446for ac_header in des.h
a21616bd 21447do
b0448899 21448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21449if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
21450 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21453 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21454fi
b0448899
CY
21455ac_res=`eval echo '${'$as_ac_Header'}'`
21456 { echo "$as_me:$LINENO: result: $ac_res" >&5
21457echo "${ECHO_T}$ac_res" >&6; }
98418dba 21458else
c0d27fcc 21459 # Is the header compilable?
b0448899
CY
21460{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21461echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21462cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21463/* confdefs.h. */
21464_ACEOF
21465cat confdefs.h >>conftest.$ac_ext
21466cat >>conftest.$ac_ext <<_ACEOF
21467/* end confdefs.h. */
c0d27fcc
MR
21468$ac_includes_default
21469#include <$ac_header>
21470_ACEOF
21471rm -f conftest.$ac_objext
ca81d7a0
JD
21472if { (ac_try="$ac_compile"
21473case "(($ac_try" in
21474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21475 *) ac_try_echo=$ac_try;;
21476esac
b0448899 21477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21478 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21479 ac_status=$?
edfaf76d
LK
21480 grep -v '^ *+' conftest.er1 >conftest.err
21481 rm -f conftest.er1
21482 cat conftest.err >&5
b0448899 21483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21484 (exit $ac_status); } && {
21485 test -z "$ac_c_werror_flag" ||
21486 test ! -s conftest.err
21487 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21488 ac_header_compiler=yes
21489else
b0448899 21490 echo "$as_me: failed program was:" >&5
19650fd6
AS
21491sed 's/^/| /' conftest.$ac_ext >&5
21492
ca81d7a0 21493 ac_header_compiler=no
c0d27fcc 21494fi
ca81d7a0
JD
21495
21496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
21497{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21498echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21499
21500# Is the header present?
b0448899
CY
21501{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21502echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21503cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21504/* confdefs.h. */
21505_ACEOF
21506cat confdefs.h >>conftest.$ac_ext
21507cat >>conftest.$ac_ext <<_ACEOF
21508/* end confdefs.h. */
503d2be0
AS
21509#include <$ac_header>
21510_ACEOF
ca81d7a0
JD
21511if { (ac_try="$ac_cpp conftest.$ac_ext"
21512case "(($ac_try" in
21513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21514 *) ac_try_echo=$ac_try;;
21515esac
b0448899 21516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21517 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21518 ac_status=$?
6bae0ccf 21519 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21520 rm -f conftest.er1
21521 cat conftest.err >&5
b0448899 21522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21523 (exit $ac_status); } >/dev/null && {
21524 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21525 test ! -s conftest.err
21526 }; then
c0d27fcc 21527 ac_header_preproc=yes
503d2be0 21528else
b0448899 21529 echo "$as_me: failed program was:" >&5
19650fd6
AS
21530sed 's/^/| /' conftest.$ac_ext >&5
21531
c0d27fcc 21532 ac_header_preproc=no
a21616bd 21533fi
ca81d7a0 21534
503d2be0 21535rm -f conftest.err conftest.$ac_ext
b0448899
CY
21536{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21537echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21538
21539# So? What about this header?
edfaf76d
LK
21540case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21541 yes:no: )
b0448899
CY
21542 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21543echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21544 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21545echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21546 ac_header_preproc=yes
19650fd6 21547 ;;
edfaf76d 21548 no:yes:* )
b0448899
CY
21549 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21550echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21551 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21552echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21553 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21554echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21555 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21556echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21557 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21558echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21559 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21560echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21561
19650fd6 21562 ;;
c0d27fcc 21563esac
b0448899
CY
21564{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21565echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21566if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21567 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21568else
edfaf76d 21569 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21570fi
b0448899
CY
21571ac_res=`eval echo '${'$as_ac_Header'}'`
21572 { echo "$as_me:$LINENO: result: $ac_res" >&5
21573echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21574
21575fi
b0448899 21576if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21577 cat >>confdefs.h <<_ACEOF
b0448899 21578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21579_ACEOF
503d2be0 21580
a21616bd 21581else
503d2be0
AS
21582
21583for ac_header in kerberosIV/des.h
a21616bd 21584do
b0448899 21585as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21586if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
21587 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21588echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21589if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21590 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21591fi
b0448899
CY
21592ac_res=`eval echo '${'$as_ac_Header'}'`
21593 { echo "$as_me:$LINENO: result: $ac_res" >&5
21594echo "${ECHO_T}$ac_res" >&6; }
98418dba 21595else
c0d27fcc 21596 # Is the header compilable?
b0448899
CY
21597{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21598echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21599cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21600/* confdefs.h. */
21601_ACEOF
21602cat confdefs.h >>conftest.$ac_ext
21603cat >>conftest.$ac_ext <<_ACEOF
21604/* end confdefs.h. */
c0d27fcc
MR
21605$ac_includes_default
21606#include <$ac_header>
21607_ACEOF
21608rm -f conftest.$ac_objext
ca81d7a0
JD
21609if { (ac_try="$ac_compile"
21610case "(($ac_try" in
21611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21612 *) ac_try_echo=$ac_try;;
21613esac
b0448899 21614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21615 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21616 ac_status=$?
edfaf76d
LK
21617 grep -v '^ *+' conftest.er1 >conftest.err
21618 rm -f conftest.er1
21619 cat conftest.err >&5
b0448899 21620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21621 (exit $ac_status); } && {
21622 test -z "$ac_c_werror_flag" ||
21623 test ! -s conftest.err
21624 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21625 ac_header_compiler=yes
21626else
b0448899 21627 echo "$as_me: failed program was:" >&5
19650fd6
AS
21628sed 's/^/| /' conftest.$ac_ext >&5
21629
ca81d7a0 21630 ac_header_compiler=no
c0d27fcc 21631fi
ca81d7a0
JD
21632
21633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
21634{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21635echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21636
21637# Is the header present?
b0448899
CY
21638{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21639echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21640cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21641/* confdefs.h. */
21642_ACEOF
21643cat confdefs.h >>conftest.$ac_ext
21644cat >>conftest.$ac_ext <<_ACEOF
21645/* end confdefs.h. */
503d2be0
AS
21646#include <$ac_header>
21647_ACEOF
ca81d7a0
JD
21648if { (ac_try="$ac_cpp conftest.$ac_ext"
21649case "(($ac_try" in
21650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21651 *) ac_try_echo=$ac_try;;
21652esac
b0448899 21653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21654 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21655 ac_status=$?
6bae0ccf 21656 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21657 rm -f conftest.er1
21658 cat conftest.err >&5
b0448899 21659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21660 (exit $ac_status); } >/dev/null && {
21661 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21662 test ! -s conftest.err
21663 }; then
c0d27fcc 21664 ac_header_preproc=yes
503d2be0 21665else
b0448899 21666 echo "$as_me: failed program was:" >&5
19650fd6
AS
21667sed 's/^/| /' conftest.$ac_ext >&5
21668
c0d27fcc 21669 ac_header_preproc=no
a21616bd 21670fi
ca81d7a0 21671
503d2be0 21672rm -f conftest.err conftest.$ac_ext
b0448899
CY
21673{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21674echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21675
21676# So? What about this header?
edfaf76d
LK
21677case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21678 yes:no: )
b0448899
CY
21679 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21680echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21681 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21682echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21683 ac_header_preproc=yes
19650fd6 21684 ;;
edfaf76d 21685 no:yes:* )
b0448899
CY
21686 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21687echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21688 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21689echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21690 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21691echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21692 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21693echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21694 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21695echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21696 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21697echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21698
19650fd6 21699 ;;
c0d27fcc 21700esac
b0448899
CY
21701{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21702echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21703if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21704 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21705else
edfaf76d 21706 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21707fi
b0448899
CY
21708ac_res=`eval echo '${'$as_ac_Header'}'`
21709 { echo "$as_me:$LINENO: result: $ac_res" >&5
21710echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21711
21712fi
b0448899 21713if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21714 cat >>confdefs.h <<_ACEOF
b0448899 21715#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21716_ACEOF
503d2be0 21717
a21616bd 21718else
503d2be0
AS
21719
21720for ac_header in kerberos/des.h
a21616bd 21721do
b0448899 21722as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
21724 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21725echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21726if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21727 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21728fi
b0448899
CY
21729ac_res=`eval echo '${'$as_ac_Header'}'`
21730 { echo "$as_me:$LINENO: result: $ac_res" >&5
21731echo "${ECHO_T}$ac_res" >&6; }
98418dba 21732else
c0d27fcc 21733 # Is the header compilable?
b0448899
CY
21734{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21735echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21736cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21737/* confdefs.h. */
21738_ACEOF
21739cat confdefs.h >>conftest.$ac_ext
21740cat >>conftest.$ac_ext <<_ACEOF
21741/* end confdefs.h. */
c0d27fcc
MR
21742$ac_includes_default
21743#include <$ac_header>
21744_ACEOF
21745rm -f conftest.$ac_objext
ca81d7a0
JD
21746if { (ac_try="$ac_compile"
21747case "(($ac_try" in
21748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21749 *) ac_try_echo=$ac_try;;
21750esac
b0448899 21751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21752 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21753 ac_status=$?
edfaf76d
LK
21754 grep -v '^ *+' conftest.er1 >conftest.err
21755 rm -f conftest.er1
21756 cat conftest.err >&5
b0448899 21757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21758 (exit $ac_status); } && {
21759 test -z "$ac_c_werror_flag" ||
21760 test ! -s conftest.err
21761 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21762 ac_header_compiler=yes
21763else
b0448899 21764 echo "$as_me: failed program was:" >&5
19650fd6
AS
21765sed 's/^/| /' conftest.$ac_ext >&5
21766
ca81d7a0 21767 ac_header_compiler=no
c0d27fcc 21768fi
ca81d7a0
JD
21769
21770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
21771{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21772echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21773
21774# Is the header present?
b0448899
CY
21775{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21776echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21777cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21778/* confdefs.h. */
21779_ACEOF
21780cat confdefs.h >>conftest.$ac_ext
21781cat >>conftest.$ac_ext <<_ACEOF
21782/* end confdefs.h. */
503d2be0
AS
21783#include <$ac_header>
21784_ACEOF
ca81d7a0
JD
21785if { (ac_try="$ac_cpp conftest.$ac_ext"
21786case "(($ac_try" in
21787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21788 *) ac_try_echo=$ac_try;;
21789esac
b0448899 21790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21791 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21792 ac_status=$?
6bae0ccf 21793 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21794 rm -f conftest.er1
21795 cat conftest.err >&5
b0448899 21796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21797 (exit $ac_status); } >/dev/null && {
21798 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21799 test ! -s conftest.err
21800 }; then
c0d27fcc 21801 ac_header_preproc=yes
503d2be0 21802else
b0448899 21803 echo "$as_me: failed program was:" >&5
19650fd6
AS
21804sed 's/^/| /' conftest.$ac_ext >&5
21805
c0d27fcc 21806 ac_header_preproc=no
a21616bd 21807fi
ca81d7a0 21808
503d2be0 21809rm -f conftest.err conftest.$ac_ext
b0448899
CY
21810{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21811echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21812
21813# So? What about this header?
edfaf76d
LK
21814case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21815 yes:no: )
b0448899
CY
21816 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21817echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21818 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21819echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21820 ac_header_preproc=yes
19650fd6 21821 ;;
edfaf76d 21822 no:yes:* )
b0448899
CY
21823 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21824echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21825 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21826echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21827 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21828echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21829 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21830echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21831 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21832echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21833 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21834echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21835
19650fd6 21836 ;;
c0d27fcc 21837esac
b0448899
CY
21838{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21839echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21840if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21841 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21842else
edfaf76d 21843 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21844fi
b0448899
CY
21845ac_res=`eval echo '${'$as_ac_Header'}'`
21846 { echo "$as_me:$LINENO: result: $ac_res" >&5
21847echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21848
21849fi
b0448899 21850if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21851 cat >>confdefs.h <<_ACEOF
b0448899 21852#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21853_ACEOF
a21616bd
KR
21854
21855fi
c0d27fcc 21856
a21616bd
KR
21857done
21858
98418dba 21859fi
c0d27fcc 21860
925c2f3f
EZ
21861done
21862
98418dba 21863fi
c0d27fcc 21864
925c2f3f 21865done
98418dba 21866
c0d27fcc 21867
925c2f3f
EZ
21868for ac_header in krb.h
21869do
b0448899 21870as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21871if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
21872 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21873echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21874if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21875 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21876fi
b0448899
CY
21877ac_res=`eval echo '${'$as_ac_Header'}'`
21878 { echo "$as_me:$LINENO: result: $ac_res" >&5
21879echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21880else
21881 # Is the header compilable?
b0448899
CY
21882{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21883echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21884cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21885/* confdefs.h. */
21886_ACEOF
21887cat confdefs.h >>conftest.$ac_ext
21888cat >>conftest.$ac_ext <<_ACEOF
21889/* end confdefs.h. */
c0d27fcc
MR
21890$ac_includes_default
21891#include <$ac_header>
21892_ACEOF
21893rm -f conftest.$ac_objext
ca81d7a0
JD
21894if { (ac_try="$ac_compile"
21895case "(($ac_try" in
21896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21897 *) ac_try_echo=$ac_try;;
21898esac
b0448899 21899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21900 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21901 ac_status=$?
edfaf76d
LK
21902 grep -v '^ *+' conftest.er1 >conftest.err
21903 rm -f conftest.er1
21904 cat conftest.err >&5
b0448899 21905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21906 (exit $ac_status); } && {
21907 test -z "$ac_c_werror_flag" ||
21908 test ! -s conftest.err
21909 } && test -s conftest.$ac_objext; then
c0d27fcc 21910 ac_header_compiler=yes
925c2f3f 21911else
b0448899 21912 echo "$as_me: failed program was:" >&5
19650fd6
AS
21913sed 's/^/| /' conftest.$ac_ext >&5
21914
ca81d7a0 21915 ac_header_compiler=no
c0d27fcc 21916fi
ca81d7a0
JD
21917
21918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
21919{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21920echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21921
21922# Is the header present?
b0448899
CY
21923{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21924echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21925cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21926/* confdefs.h. */
21927_ACEOF
21928cat confdefs.h >>conftest.$ac_ext
21929cat >>conftest.$ac_ext <<_ACEOF
21930/* end confdefs.h. */
503d2be0
AS
21931#include <$ac_header>
21932_ACEOF
ca81d7a0
JD
21933if { (ac_try="$ac_cpp conftest.$ac_ext"
21934case "(($ac_try" in
21935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21936 *) ac_try_echo=$ac_try;;
21937esac
b0448899 21938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21940 ac_status=$?
6bae0ccf 21941 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21942 rm -f conftest.er1
21943 cat conftest.err >&5
b0448899 21944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21945 (exit $ac_status); } >/dev/null && {
21946 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21947 test ! -s conftest.err
21948 }; then
c0d27fcc 21949 ac_header_preproc=yes
503d2be0 21950else
b0448899 21951 echo "$as_me: failed program was:" >&5
19650fd6
AS
21952sed 's/^/| /' conftest.$ac_ext >&5
21953
c0d27fcc 21954 ac_header_preproc=no
a21616bd 21955fi
ca81d7a0 21956
503d2be0 21957rm -f conftest.err conftest.$ac_ext
b0448899
CY
21958{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21959echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21960
21961# So? What about this header?
edfaf76d
LK
21962case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21963 yes:no: )
b0448899
CY
21964 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21965echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21966 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21967echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21968 ac_header_preproc=yes
19650fd6 21969 ;;
edfaf76d 21970 no:yes:* )
b0448899
CY
21971 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21972echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21973 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21974echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21975 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21976echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21977 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21978echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21979 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21980echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21981 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21982echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21983
19650fd6 21984 ;;
c0d27fcc 21985esac
b0448899
CY
21986{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21987echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21988if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 21989 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21990else
edfaf76d 21991 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21992fi
b0448899
CY
21993ac_res=`eval echo '${'$as_ac_Header'}'`
21994 { echo "$as_me:$LINENO: result: $ac_res" >&5
21995echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21996
21997fi
b0448899 21998if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21999 cat >>confdefs.h <<_ACEOF
b0448899 22000#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22001_ACEOF
503d2be0 22002
a21616bd 22003else
503d2be0
AS
22004
22005for ac_header in kerberosIV/krb.h
a21616bd 22006do
b0448899 22007as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 22008if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
22009 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22010echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22011if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22012 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22013fi
b0448899
CY
22014ac_res=`eval echo '${'$as_ac_Header'}'`
22015 { echo "$as_me:$LINENO: result: $ac_res" >&5
22016echo "${ECHO_T}$ac_res" >&6; }
98418dba 22017else
c0d27fcc 22018 # Is the header compilable?
b0448899
CY
22019{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22020echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22021cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22022/* confdefs.h. */
22023_ACEOF
22024cat confdefs.h >>conftest.$ac_ext
22025cat >>conftest.$ac_ext <<_ACEOF
22026/* end confdefs.h. */
c0d27fcc
MR
22027$ac_includes_default
22028#include <$ac_header>
22029_ACEOF
22030rm -f conftest.$ac_objext
ca81d7a0
JD
22031if { (ac_try="$ac_compile"
22032case "(($ac_try" in
22033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22034 *) ac_try_echo=$ac_try;;
22035esac
b0448899 22036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22037 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22038 ac_status=$?
edfaf76d
LK
22039 grep -v '^ *+' conftest.er1 >conftest.err
22040 rm -f conftest.er1
22041 cat conftest.err >&5
b0448899 22042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22043 (exit $ac_status); } && {
22044 test -z "$ac_c_werror_flag" ||
22045 test ! -s conftest.err
22046 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22047 ac_header_compiler=yes
22048else
b0448899 22049 echo "$as_me: failed program was:" >&5
19650fd6
AS
22050sed 's/^/| /' conftest.$ac_ext >&5
22051
ca81d7a0 22052 ac_header_compiler=no
c0d27fcc 22053fi
ca81d7a0
JD
22054
22055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
22056{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22057echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22058
22059# Is the header present?
b0448899
CY
22060{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22061echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22062cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22063/* confdefs.h. */
22064_ACEOF
22065cat confdefs.h >>conftest.$ac_ext
22066cat >>conftest.$ac_ext <<_ACEOF
22067/* end confdefs.h. */
503d2be0
AS
22068#include <$ac_header>
22069_ACEOF
ca81d7a0
JD
22070if { (ac_try="$ac_cpp conftest.$ac_ext"
22071case "(($ac_try" in
22072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22073 *) ac_try_echo=$ac_try;;
22074esac
b0448899 22075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22076 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22077 ac_status=$?
6bae0ccf 22078 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22079 rm -f conftest.er1
22080 cat conftest.err >&5
b0448899 22081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22082 (exit $ac_status); } >/dev/null && {
22083 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22084 test ! -s conftest.err
22085 }; then
c0d27fcc 22086 ac_header_preproc=yes
503d2be0 22087else
b0448899 22088 echo "$as_me: failed program was:" >&5
19650fd6
AS
22089sed 's/^/| /' conftest.$ac_ext >&5
22090
c0d27fcc 22091 ac_header_preproc=no
a21616bd 22092fi
ca81d7a0 22093
503d2be0 22094rm -f conftest.err conftest.$ac_ext
b0448899
CY
22095{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22096echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22097
22098# So? What about this header?
edfaf76d
LK
22099case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22100 yes:no: )
b0448899
CY
22101 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22102echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22103 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22104echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 22105 ac_header_preproc=yes
19650fd6 22106 ;;
edfaf76d 22107 no:yes:* )
b0448899
CY
22108 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22109echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22110 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22111echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22112 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22113echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22114 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22115echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22116 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22117echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22118 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22119echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22120
19650fd6 22121 ;;
c0d27fcc 22122esac
b0448899
CY
22123{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22124echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22125if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22126 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22127else
edfaf76d 22128 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22129fi
b0448899
CY
22130ac_res=`eval echo '${'$as_ac_Header'}'`
22131 { echo "$as_me:$LINENO: result: $ac_res" >&5
22132echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22133
22134fi
b0448899 22135if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22136 cat >>confdefs.h <<_ACEOF
b0448899 22137#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22138_ACEOF
503d2be0 22139
a21616bd 22140else
503d2be0
AS
22141
22142for ac_header in kerberos/krb.h
a21616bd 22143do
b0448899 22144as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 22145if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
22146 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22147echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22148if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22149 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22150fi
b0448899
CY
22151ac_res=`eval echo '${'$as_ac_Header'}'`
22152 { echo "$as_me:$LINENO: result: $ac_res" >&5
22153echo "${ECHO_T}$ac_res" >&6; }
98418dba 22154else
c0d27fcc 22155 # Is the header compilable?
b0448899
CY
22156{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22157echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22158cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22159/* confdefs.h. */
22160_ACEOF
22161cat confdefs.h >>conftest.$ac_ext
22162cat >>conftest.$ac_ext <<_ACEOF
22163/* end confdefs.h. */
c0d27fcc
MR
22164$ac_includes_default
22165#include <$ac_header>
22166_ACEOF
22167rm -f conftest.$ac_objext
ca81d7a0
JD
22168if { (ac_try="$ac_compile"
22169case "(($ac_try" in
22170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22171 *) ac_try_echo=$ac_try;;
22172esac
b0448899 22173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22174 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22175 ac_status=$?
edfaf76d
LK
22176 grep -v '^ *+' conftest.er1 >conftest.err
22177 rm -f conftest.er1
22178 cat conftest.err >&5
b0448899 22179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22180 (exit $ac_status); } && {
22181 test -z "$ac_c_werror_flag" ||
22182 test ! -s conftest.err
22183 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22184 ac_header_compiler=yes
22185else
b0448899 22186 echo "$as_me: failed program was:" >&5
19650fd6
AS
22187sed 's/^/| /' conftest.$ac_ext >&5
22188
ca81d7a0 22189 ac_header_compiler=no
c0d27fcc 22190fi
ca81d7a0
JD
22191
22192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
22193{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22194echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22195
22196# Is the header present?
b0448899
CY
22197{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22198echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22199cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22200/* confdefs.h. */
22201_ACEOF
22202cat confdefs.h >>conftest.$ac_ext
22203cat >>conftest.$ac_ext <<_ACEOF
22204/* end confdefs.h. */
503d2be0
AS
22205#include <$ac_header>
22206_ACEOF
ca81d7a0
JD
22207if { (ac_try="$ac_cpp conftest.$ac_ext"
22208case "(($ac_try" in
22209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22210 *) ac_try_echo=$ac_try;;
22211esac
b0448899 22212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22213 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22214 ac_status=$?
6bae0ccf 22215 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22216 rm -f conftest.er1
22217 cat conftest.err >&5
b0448899 22218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22219 (exit $ac_status); } >/dev/null && {
22220 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22221 test ! -s conftest.err
22222 }; then
c0d27fcc 22223 ac_header_preproc=yes
503d2be0 22224else
b0448899 22225 echo "$as_me: failed program was:" >&5
19650fd6
AS
22226sed 's/^/| /' conftest.$ac_ext >&5
22227
c0d27fcc 22228 ac_header_preproc=no
a21616bd 22229fi
ca81d7a0 22230
503d2be0 22231rm -f conftest.err conftest.$ac_ext
b0448899
CY
22232{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22233echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22234
22235# So? What about this header?
edfaf76d
LK
22236case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22237 yes:no: )
b0448899
CY
22238 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22239echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22240 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22241echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 22242 ac_header_preproc=yes
19650fd6 22243 ;;
edfaf76d 22244 no:yes:* )
b0448899
CY
22245 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22246echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22247 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22248echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22249 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22250echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22251 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22252echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22253 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22254echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22255 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22256echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22257
19650fd6 22258 ;;
c0d27fcc 22259esac
b0448899
CY
22260{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22261echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22262if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22263 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22264else
edfaf76d 22265 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22266fi
b0448899
CY
22267ac_res=`eval echo '${'$as_ac_Header'}'`
22268 { echo "$as_me:$LINENO: result: $ac_res" >&5
22269echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22270
22271fi
b0448899 22272if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22273 cat >>confdefs.h <<_ACEOF
b0448899 22274#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22275_ACEOF
503d2be0 22276
a21616bd 22277fi
c0d27fcc 22278
a21616bd
KR
22279done
22280
22281fi
c0d27fcc 22282
a21616bd
KR
22283done
22284
22285fi
c0d27fcc 22286
a21616bd
KR
22287done
22288
22289 fi
503d2be0
AS
22290
22291for ac_header in com_err.h
a21616bd 22292do
b0448899 22293as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 22294if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
22295 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22296echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22297if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22298 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22299fi
b0448899
CY
22300ac_res=`eval echo '${'$as_ac_Header'}'`
22301 { echo "$as_me:$LINENO: result: $ac_res" >&5
22302echo "${ECHO_T}$ac_res" >&6; }
98418dba 22303else
c0d27fcc 22304 # Is the header compilable?
b0448899
CY
22305{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22306echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22307cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22308/* confdefs.h. */
22309_ACEOF
22310cat confdefs.h >>conftest.$ac_ext
22311cat >>conftest.$ac_ext <<_ACEOF
22312/* end confdefs.h. */
c0d27fcc
MR
22313$ac_includes_default
22314#include <$ac_header>
22315_ACEOF
22316rm -f conftest.$ac_objext
ca81d7a0
JD
22317if { (ac_try="$ac_compile"
22318case "(($ac_try" in
22319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22320 *) ac_try_echo=$ac_try;;
22321esac
b0448899 22322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22323 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22324 ac_status=$?
22325 grep -v '^ *+' conftest.er1 >conftest.err
22326 rm -f conftest.er1
22327 cat conftest.err >&5
b0448899 22328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22329 (exit $ac_status); } && {
22330 test -z "$ac_c_werror_flag" ||
22331 test ! -s conftest.err
22332 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22333 ac_header_compiler=yes
22334else
b0448899 22335 echo "$as_me: failed program was:" >&5
19650fd6
AS
22336sed 's/^/| /' conftest.$ac_ext >&5
22337
ca81d7a0 22338 ac_header_compiler=no
c0d27fcc 22339fi
ca81d7a0
JD
22340
22341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
22342{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22343echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22344
22345# Is the header present?
b0448899
CY
22346{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22347echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22348cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22349/* confdefs.h. */
22350_ACEOF
22351cat confdefs.h >>conftest.$ac_ext
22352cat >>conftest.$ac_ext <<_ACEOF
22353/* end confdefs.h. */
503d2be0
AS
22354#include <$ac_header>
22355_ACEOF
ca81d7a0
JD
22356if { (ac_try="$ac_cpp conftest.$ac_ext"
22357case "(($ac_try" in
22358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22359 *) ac_try_echo=$ac_try;;
22360esac
b0448899 22361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22362 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22363 ac_status=$?
6bae0ccf 22364 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22365 rm -f conftest.er1
22366 cat conftest.err >&5
b0448899 22367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22368 (exit $ac_status); } >/dev/null && {
22369 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22370 test ! -s conftest.err
22371 }; then
c0d27fcc 22372 ac_header_preproc=yes
503d2be0 22373else
b0448899 22374 echo "$as_me: failed program was:" >&5
19650fd6
AS
22375sed 's/^/| /' conftest.$ac_ext >&5
22376
c0d27fcc 22377 ac_header_preproc=no
a21616bd 22378fi
ca81d7a0 22379
503d2be0 22380rm -f conftest.err conftest.$ac_ext
b0448899
CY
22381{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22382echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22383
22384# So? What about this header?
edfaf76d
LK
22385case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22386 yes:no: )
b0448899
CY
22387 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22388echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22389 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22390echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 22391 ac_header_preproc=yes
19650fd6 22392 ;;
edfaf76d 22393 no:yes:* )
b0448899
CY
22394 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22395echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22396 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22397echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22398 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22399echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22400 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22401echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22402 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22403echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22404 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22405echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22406
19650fd6 22407 ;;
c0d27fcc 22408esac
b0448899
CY
22409{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22410echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22411if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22412 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22413else
edfaf76d 22414 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22415fi
b0448899
CY
22416ac_res=`eval echo '${'$as_ac_Header'}'`
22417 { echo "$as_me:$LINENO: result: $ac_res" >&5
22418echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22419
22420fi
b0448899 22421if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22422 cat >>confdefs.h <<_ACEOF
b0448899 22423#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22424_ACEOF
503d2be0 22425
a21616bd 22426fi
c0d27fcc 22427
a21616bd
KR
22428done
22429
22430fi
22431
ba4481b5
DL
22432# Solaris requires -lintl if you want strerror (which calls dgettext)
22433# to return localized messages.
503d2be0 22434
b0448899
CY
22435{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22436echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0 22437if test "${ac_cv_lib_intl_dgettext+set}" = set; then
b0448899 22438 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22439else
503d2be0 22440 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22441LIBS="-lintl $LIBS"
503d2be0 22442cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22443/* confdefs.h. */
22444_ACEOF
22445cat confdefs.h >>conftest.$ac_ext
22446cat >>conftest.$ac_ext <<_ACEOF
22447/* end confdefs.h. */
503d2be0 22448
ca81d7a0
JD
22449/* Override any GCC internal prototype to avoid an error.
22450 Use char because int might match the return type of a GCC
22451 builtin and then its argument prototype would still apply. */
503d2be0
AS
22452#ifdef __cplusplus
22453extern "C"
22454#endif
503d2be0
AS
22455char dgettext ();
22456int
22457main ()
22458{
ca81d7a0 22459return dgettext ();
503d2be0
AS
22460 ;
22461 return 0;
22462}
22463_ACEOF
22464rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22465if { (ac_try="$ac_link"
22466case "(($ac_try" in
22467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22468 *) ac_try_echo=$ac_try;;
22469esac
b0448899 22470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22471 (eval "$ac_link") 2>conftest.er1
503d2be0 22472 ac_status=$?
edfaf76d
LK
22473 grep -v '^ *+' conftest.er1 >conftest.err
22474 rm -f conftest.er1
22475 cat conftest.err >&5
b0448899 22476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22477 (exit $ac_status); } && {
22478 test -z "$ac_c_werror_flag" ||
22479 test ! -s conftest.err
b0448899
CY
22480 } && test -s conftest$ac_exeext &&
22481 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22482 ac_cv_lib_intl_dgettext=yes
22483else
b0448899 22484 echo "$as_me: failed program was:" >&5
19650fd6
AS
22485sed 's/^/| /' conftest.$ac_ext >&5
22486
ca81d7a0 22487 ac_cv_lib_intl_dgettext=no
503d2be0 22488fi
ca81d7a0 22489
f053c89f 22490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22491 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22492LIBS=$ac_check_lib_save_LIBS
22493fi
b0448899
CY
22494{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22495echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
22496if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22497 cat >>confdefs.h <<_ACEOF
503d2be0 22498#define HAVE_LIBINTL 1
c0d27fcc 22499_ACEOF
ba4481b5
DL
22500
22501 LIBS="-lintl $LIBS"
22502
ba4481b5
DL
22503fi
22504
c0d27fcc 22505
b0448899
CY
22506{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22507echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0 22508if test "${emacs_cv_localtime_cache+set}" = set; then
b0448899 22509 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22510else
22511 if test x$ac_cv_func_tzset = xyes; then
22512if test "$cross_compiling" = yes; then
22513 # If we have tzset, assume the worst when cross-compiling.
22514emacs_cv_localtime_cache=yes
22515else
503d2be0 22516 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22517/* confdefs.h. */
22518_ACEOF
22519cat confdefs.h >>conftest.$ac_ext
22520cat >>conftest.$ac_ext <<_ACEOF
22521/* end confdefs.h. */
ba4481b5 22522#include <time.h>
ba4481b5
DL
22523extern char **environ;
22524unset_TZ ()
22525{
22526 char **from, **to;
22527 for (to = from = environ; (*to = *from); from++)
22528 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22529 to++;
22530}
22531char TZ_GMT0[] = "TZ=GMT0";
22532char TZ_PST8[] = "TZ=PST8";
22533main()
22534{
22535 time_t now = time ((time_t *) 0);
22536 int hour_GMT0, hour_unset;
22537 if (putenv (TZ_GMT0) != 0)
22538 exit (1);
22539 hour_GMT0 = localtime (&now)->tm_hour;
22540 unset_TZ ();
22541 hour_unset = localtime (&now)->tm_hour;
22542 if (putenv (TZ_PST8) != 0)
22543 exit (1);
22544 if (localtime (&now)->tm_hour == hour_GMT0)
22545 exit (1);
22546 unset_TZ ();
22547 if (localtime (&now)->tm_hour != hour_unset)
22548 exit (1);
22549 exit (0);
22550}
503d2be0
AS
22551_ACEOF
22552rm -f conftest$ac_exeext
ca81d7a0
JD
22553if { (ac_try="$ac_link"
22554case "(($ac_try" in
22555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22556 *) ac_try_echo=$ac_try;;
22557esac
b0448899 22558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22559 (eval "$ac_link") 2>&5
503d2be0 22560 ac_status=$?
b0448899 22561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22563 { (case "(($ac_try" in
22564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22565 *) ac_try_echo=$ac_try;;
22566esac
b0448899 22567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22568 (eval "$ac_try") 2>&5
503d2be0 22569 ac_status=$?
b0448899 22570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22571 (exit $ac_status); }; }; then
ba4481b5
DL
22572 emacs_cv_localtime_cache=no
22573else
b0448899
CY
22574 echo "$as_me: program exited with status $ac_status" >&5
22575echo "$as_me: failed program was:" >&5
19650fd6
AS
22576sed 's/^/| /' conftest.$ac_ext >&5
22577
c0d27fcc 22578( exit $ac_status )
503d2be0 22579emacs_cv_localtime_cache=yes
ba4481b5 22580fi
ca81d7a0 22581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22582fi
ca81d7a0
JD
22583
22584
ba4481b5
DL
22585else
22586 # If we lack tzset, report that localtime does not cache TZ,
22587 # since we can't invalidate the cache if we don't have tzset.
22588 emacs_cv_localtime_cache=no
22589fi
22590fi
b0448899
CY
22591{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22592echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22593if test $emacs_cv_localtime_cache = yes; then
b936fae4 22594
c0d27fcc 22595cat >>confdefs.h <<\_ACEOF
ba4481b5 22596#define LOCALTIME_CACHE 1
c0d27fcc 22597_ACEOF
ba4481b5
DL
22598
22599fi
22600
22601if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22602
22603for ac_func in gettimeofday
48d4b120 22604do
b0448899
CY
22605as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22606{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22607echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 22608if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 22609 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22610else
503d2be0 22611 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22612/* confdefs.h. */
22613_ACEOF
22614cat confdefs.h >>conftest.$ac_ext
22615cat >>conftest.$ac_ext <<_ACEOF
22616/* end confdefs.h. */
edfaf76d
LK
22617/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22618 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22619#define $ac_func innocuous_$ac_func
22620
48d4b120 22621/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22622 which can conflict with char $ac_func (); below.
22623 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22624 <limits.h> exists even on freestanding compilers. */
edfaf76d 22625
19650fd6
AS
22626#ifdef __STDC__
22627# include <limits.h>
22628#else
22629# include <assert.h>
22630#endif
edfaf76d
LK
22631
22632#undef $ac_func
22633
ca81d7a0
JD
22634/* Override any GCC internal prototype to avoid an error.
22635 Use char because int might match the return type of a GCC
22636 builtin and then its argument prototype would still apply. */
503d2be0
AS
22637#ifdef __cplusplus
22638extern "C"
22639#endif
503d2be0 22640char $ac_func ();
48d4b120
DL
22641/* The GNU C library defines this for functions which it implements
22642 to always fail with ENOSYS. Some functions are actually named
22643 something starting with __ and the normal name is an alias. */
ca81d7a0 22644#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22645choke me
cd958eb3
MB
22646#endif
22647
19650fd6
AS
22648int
22649main ()
22650{
ca81d7a0 22651return $ac_func ();
503d2be0
AS
22652 ;
22653 return 0;
22654}
22655_ACEOF
22656rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22657if { (ac_try="$ac_link"
22658case "(($ac_try" in
22659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22660 *) ac_try_echo=$ac_try;;
22661esac
b0448899 22662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22663 (eval "$ac_link") 2>conftest.er1
503d2be0 22664 ac_status=$?
edfaf76d
LK
22665 grep -v '^ *+' conftest.er1 >conftest.err
22666 rm -f conftest.er1
22667 cat conftest.err >&5
b0448899 22668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22669 (exit $ac_status); } && {
22670 test -z "$ac_c_werror_flag" ||
22671 test ! -s conftest.err
b0448899
CY
22672 } && test -s conftest$ac_exeext &&
22673 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22674 eval "$as_ac_var=yes"
22675else
b0448899 22676 echo "$as_me: failed program was:" >&5
19650fd6
AS
22677sed 's/^/| /' conftest.$ac_ext >&5
22678
ca81d7a0 22679 eval "$as_ac_var=no"
503d2be0 22680fi
ca81d7a0 22681
f053c89f 22682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22683 conftest$ac_exeext conftest.$ac_ext
503d2be0 22684fi
b0448899
CY
22685ac_res=`eval echo '${'$as_ac_var'}'`
22686 { echo "$as_me:$LINENO: result: $ac_res" >&5
22687echo "${ECHO_T}$ac_res" >&6; }
22688if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22689 cat >>confdefs.h <<_ACEOF
b0448899 22690#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22691_ACEOF
48d4b120 22692
48d4b120
DL
22693fi
22694done
22695
b936fae4 22696 if test $ac_cv_func_gettimeofday = yes; then
b0448899
CY
22697 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22698echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0 22699if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
b0448899 22700 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22701else
503d2be0 22702 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22703/* confdefs.h. */
22704_ACEOF
22705cat confdefs.h >>conftest.$ac_ext
22706cat >>conftest.$ac_ext <<_ACEOF
22707/* end confdefs.h. */
ba4481b5 22708
a3f08d9e
DL
22709#ifdef TIME_WITH_SYS_TIME
22710#include <sys/time.h>
22711#include <time.h>
22712#else
22713#ifdef HAVE_SYS_TIME_H
22714#include <sys/time.h>
22715#else
22716#include <time.h>
22717#endif
22718#endif
503d2be0
AS
22719int
22720main ()
22721{
a3f08d9e 22722struct timeval time;
b936fae4 22723 gettimeofday (&time, 0);
503d2be0
AS
22724 ;
22725 return 0;
22726}
22727_ACEOF
22728rm -f conftest.$ac_objext
f053c89f
CY
22729if { (ac_try="$ac_compile"
22730case "(($ac_try" in
ca81d7a0
JD
22731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22732 *) ac_try_echo=$ac_try;;
22733esac
b0448899 22734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22735 (eval "$ac_compile") 2>conftest.er1
503d2be0 22736 ac_status=$?
edfaf76d
LK
22737 grep -v '^ *+' conftest.er1 >conftest.err
22738 rm -f conftest.er1
22739 cat conftest.err >&5
b0448899 22740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22741 (exit $ac_status); } && {
22742 test -z "$ac_c_werror_flag" ||
22743 test ! -s conftest.err
22744 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22745 emacs_cv_gettimeofday_two_arguments=yes
22746else
b0448899 22747 echo "$as_me: failed program was:" >&5
19650fd6
AS
22748sed 's/^/| /' conftest.$ac_ext >&5
22749
ca81d7a0 22750 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22751fi
ca81d7a0
JD
22752
22753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22754fi
b0448899
CY
22755{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22756echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22757 if test $emacs_cv_gettimeofday_two_arguments = no; then
22758
c0d27fcc 22759cat >>confdefs.h <<\_ACEOF
ba4481b5 22760#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22761_ACEOF
ba4481b5 22762
b936fae4 22763 fi
ba4481b5
DL
22764 fi
22765fi
22766
22767ok_so_far=yes
b0448899
CY
22768{ echo "$as_me:$LINENO: checking for socket" >&5
22769echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0 22770if test "${ac_cv_func_socket+set}" = set; then
b0448899 22771 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22772else
503d2be0 22773 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22774/* confdefs.h. */
22775_ACEOF
22776cat confdefs.h >>conftest.$ac_ext
22777cat >>conftest.$ac_ext <<_ACEOF
22778/* end confdefs.h. */
edfaf76d
LK
22779/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22780 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22781#define socket innocuous_socket
22782
ba4481b5 22783/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22784 which can conflict with char socket (); below.
22785 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22786 <limits.h> exists even on freestanding compilers. */
edfaf76d 22787
19650fd6
AS
22788#ifdef __STDC__
22789# include <limits.h>
22790#else
22791# include <assert.h>
22792#endif
edfaf76d
LK
22793
22794#undef socket
22795
ca81d7a0
JD
22796/* Override any GCC internal prototype to avoid an error.
22797 Use char because int might match the return type of a GCC
22798 builtin and then its argument prototype would still apply. */
503d2be0
AS
22799#ifdef __cplusplus
22800extern "C"
22801#endif
503d2be0 22802char socket ();
ba4481b5
DL
22803/* The GNU C library defines this for functions which it implements
22804 to always fail with ENOSYS. Some functions are actually named
22805 something starting with __ and the normal name is an alias. */
ca81d7a0 22806#if defined __stub_socket || defined __stub___socket
ba4481b5 22807choke me
cd958eb3
MB
22808#endif
22809
19650fd6
AS
22810int
22811main ()
22812{
ca81d7a0 22813return socket ();
503d2be0
AS
22814 ;
22815 return 0;
22816}
22817_ACEOF
22818rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22819if { (ac_try="$ac_link"
22820case "(($ac_try" in
22821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22822 *) ac_try_echo=$ac_try;;
22823esac
b0448899 22824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22825 (eval "$ac_link") 2>conftest.er1
503d2be0 22826 ac_status=$?
edfaf76d
LK
22827 grep -v '^ *+' conftest.er1 >conftest.err
22828 rm -f conftest.er1
22829 cat conftest.err >&5
b0448899 22830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22831 (exit $ac_status); } && {
22832 test -z "$ac_c_werror_flag" ||
22833 test ! -s conftest.err
b0448899
CY
22834 } && test -s conftest$ac_exeext &&
22835 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22836 ac_cv_func_socket=yes
22837else
b0448899 22838 echo "$as_me: failed program was:" >&5
19650fd6
AS
22839sed 's/^/| /' conftest.$ac_ext >&5
22840
ca81d7a0 22841 ac_cv_func_socket=no
503d2be0 22842fi
ca81d7a0 22843
f053c89f 22844rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22845 conftest$ac_exeext conftest.$ac_ext
503d2be0 22846fi
b0448899
CY
22847{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22848echo "${ECHO_T}$ac_cv_func_socket" >&6; }
22849if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22850 :
22851else
503d2be0 22852 ok_so_far=no
ba4481b5
DL
22853fi
22854
22855if test $ok_so_far = yes; then
c0d27fcc 22856 if test "${ac_cv_header_netinet_in_h+set}" = set; then
b0448899
CY
22857 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22858echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0 22859if test "${ac_cv_header_netinet_in_h+set}" = set; then
b0448899 22860 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22861fi
b0448899
CY
22862{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22863echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22864else
c0d27fcc 22865 # Is the header compilable?
b0448899
CY
22866{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22867echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22868cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22869/* confdefs.h. */
22870_ACEOF
22871cat confdefs.h >>conftest.$ac_ext
22872cat >>conftest.$ac_ext <<_ACEOF
22873/* end confdefs.h. */
c0d27fcc
MR
22874$ac_includes_default
22875#include <netinet/in.h>
22876_ACEOF
22877rm -f conftest.$ac_objext
ca81d7a0
JD
22878if { (ac_try="$ac_compile"
22879case "(($ac_try" in
22880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22881 *) ac_try_echo=$ac_try;;
22882esac
b0448899 22883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22884 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22885 ac_status=$?
edfaf76d
LK
22886 grep -v '^ *+' conftest.er1 >conftest.err
22887 rm -f conftest.er1
22888 cat conftest.err >&5
b0448899 22889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22890 (exit $ac_status); } && {
22891 test -z "$ac_c_werror_flag" ||
22892 test ! -s conftest.err
22893 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22894 ac_header_compiler=yes
22895else
b0448899 22896 echo "$as_me: failed program was:" >&5
19650fd6
AS
22897sed 's/^/| /' conftest.$ac_ext >&5
22898
ca81d7a0 22899 ac_header_compiler=no
c0d27fcc 22900fi
ca81d7a0
JD
22901
22902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
22903{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22904echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22905
22906# Is the header present?
b0448899
CY
22907{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22908echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22909cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22910/* confdefs.h. */
22911_ACEOF
22912cat confdefs.h >>conftest.$ac_ext
22913cat >>conftest.$ac_ext <<_ACEOF
22914/* end confdefs.h. */
ba4481b5 22915#include <netinet/in.h>
503d2be0 22916_ACEOF
ca81d7a0
JD
22917if { (ac_try="$ac_cpp conftest.$ac_ext"
22918case "(($ac_try" in
22919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22920 *) ac_try_echo=$ac_try;;
22921esac
b0448899 22922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22923 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22924 ac_status=$?
6bae0ccf 22925 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22926 rm -f conftest.er1
22927 cat conftest.err >&5
b0448899 22928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22929 (exit $ac_status); } >/dev/null && {
22930 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22931 test ! -s conftest.err
22932 }; then
c0d27fcc 22933 ac_header_preproc=yes
ba4481b5 22934else
b0448899 22935 echo "$as_me: failed program was:" >&5
19650fd6
AS
22936sed 's/^/| /' conftest.$ac_ext >&5
22937
c0d27fcc 22938 ac_header_preproc=no
ba4481b5 22939fi
ca81d7a0 22940
503d2be0 22941rm -f conftest.err conftest.$ac_ext
b0448899
CY
22942{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22943echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22944
22945# So? What about this header?
edfaf76d
LK
22946case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22947 yes:no: )
b0448899
CY
22948 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22949echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22950 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22951echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
edfaf76d 22952 ac_header_preproc=yes
19650fd6 22953 ;;
edfaf76d 22954 no:yes:* )
b0448899
CY
22955 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22956echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
22957 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22958echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22959 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22960echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22961 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22962echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
22963 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
22964echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
22965 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22966echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22967
19650fd6 22968 ;;
c0d27fcc 22969esac
b0448899
CY
22970{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22971echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc 22972if test "${ac_cv_header_netinet_in_h+set}" = set; then
b0448899 22973 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
22974else
22975 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22976fi
b0448899
CY
22977{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22978echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22979
22980fi
b0448899 22981if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22982 :
22983else
503d2be0 22984 ok_so_far=no
ba4481b5
DL
22985fi
22986
c0d27fcc 22987
ba4481b5
DL
22988fi
22989if test $ok_so_far = yes; then
c0d27fcc 22990 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
b0448899
CY
22991 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22992echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0 22993if test "${ac_cv_header_arpa_inet_h+set}" = set; then
b0448899 22994 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22995fi
b0448899
CY
22996{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22997echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22998else
c0d27fcc 22999 # Is the header compilable?
b0448899
CY
23000{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
23001echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 23002cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23003/* confdefs.h. */
23004_ACEOF
23005cat confdefs.h >>conftest.$ac_ext
23006cat >>conftest.$ac_ext <<_ACEOF
23007/* end confdefs.h. */
c0d27fcc
MR
23008$ac_includes_default
23009#include <arpa/inet.h>
23010_ACEOF
23011rm -f conftest.$ac_objext
ca81d7a0
JD
23012if { (ac_try="$ac_compile"
23013case "(($ac_try" in
23014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23015 *) ac_try_echo=$ac_try;;
23016esac
b0448899 23017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23018 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23019 ac_status=$?
edfaf76d
LK
23020 grep -v '^ *+' conftest.er1 >conftest.err
23021 rm -f conftest.er1
23022 cat conftest.err >&5
b0448899 23023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23024 (exit $ac_status); } && {
23025 test -z "$ac_c_werror_flag" ||
23026 test ! -s conftest.err
23027 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23028 ac_header_compiler=yes
23029else
b0448899 23030 echo "$as_me: failed program was:" >&5
19650fd6
AS
23031sed 's/^/| /' conftest.$ac_ext >&5
23032
ca81d7a0 23033 ac_header_compiler=no
c0d27fcc 23034fi
ca81d7a0
JD
23035
23036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
23037{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23038echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23039
23040# Is the header present?
b0448899
CY
23041{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
23042echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 23043cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23044/* confdefs.h. */
23045_ACEOF
23046cat confdefs.h >>conftest.$ac_ext
23047cat >>conftest.$ac_ext <<_ACEOF
23048/* end confdefs.h. */
ba4481b5 23049#include <arpa/inet.h>
503d2be0 23050_ACEOF
ca81d7a0
JD
23051if { (ac_try="$ac_cpp conftest.$ac_ext"
23052case "(($ac_try" in
23053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23054 *) ac_try_echo=$ac_try;;
23055esac
b0448899 23056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23057 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23058 ac_status=$?
6bae0ccf 23059 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23060 rm -f conftest.er1
23061 cat conftest.err >&5
b0448899 23062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23063 (exit $ac_status); } >/dev/null && {
23064 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23065 test ! -s conftest.err
23066 }; then
c0d27fcc 23067 ac_header_preproc=yes
ba4481b5 23068else
b0448899 23069 echo "$as_me: failed program was:" >&5
19650fd6
AS
23070sed 's/^/| /' conftest.$ac_ext >&5
23071
c0d27fcc 23072 ac_header_preproc=no
ba4481b5 23073fi
ca81d7a0 23074
503d2be0 23075rm -f conftest.err conftest.$ac_ext
b0448899
CY
23076{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23077echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23078
23079# So? What about this header?
edfaf76d
LK
23080case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23081 yes:no: )
b0448899
CY
23082 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23083echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23084 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23085echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
edfaf76d 23086 ac_header_preproc=yes
19650fd6 23087 ;;
edfaf76d 23088 no:yes:* )
b0448899
CY
23089 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23090echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
23091 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23092echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23093 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23094echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23095 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23096echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
23097 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
23098echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
23099 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23100echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23101
19650fd6 23102 ;;
c0d27fcc 23103esac
b0448899
CY
23104{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23105echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc 23106if test "${ac_cv_header_arpa_inet_h+set}" = set; then
b0448899 23107 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
23108else
23109 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23110fi
b0448899
CY
23111{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23112echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23113
23114fi
b0448899 23115if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23116 :
23117else
503d2be0 23118 ok_so_far=no
ba4481b5
DL
23119fi
23120
c0d27fcc 23121
ba4481b5
DL
23122fi
23123if test $ok_so_far = yes; then
b936fae4 23124
c0d27fcc 23125cat >>confdefs.h <<\_ACEOF
ba4481b5 23126#define HAVE_INET_SOCKETS 1
c0d27fcc 23127_ACEOF
ba4481b5
DL
23128
23129fi
23130
2d2b6695 23131
7862d3a8 23132for ac_header in sys/ioctl.h
2d2b6695 23133do
b0448899 23134as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 23135if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
23136 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23137echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23138if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 23139 echo $ECHO_N "(cached) $ECHO_C" >&6
2d2b6695 23140fi
b0448899
CY
23141ac_res=`eval echo '${'$as_ac_Header'}'`
23142 { echo "$as_me:$LINENO: result: $ac_res" >&5
23143echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23144else
23145 # Is the header compilable?
b0448899
CY
23146{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23147echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23148cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23149/* confdefs.h. */
23150_ACEOF
23151cat confdefs.h >>conftest.$ac_ext
23152cat >>conftest.$ac_ext <<_ACEOF
23153/* end confdefs.h. */
23154$ac_includes_default
23155#include <$ac_header>
23156_ACEOF
23157rm -f conftest.$ac_objext
ca81d7a0
JD
23158if { (ac_try="$ac_compile"
23159case "(($ac_try" in
23160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23161 *) ac_try_echo=$ac_try;;
23162esac
b0448899 23163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23164 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23165 ac_status=$?
edfaf76d
LK
23166 grep -v '^ *+' conftest.er1 >conftest.err
23167 rm -f conftest.er1
23168 cat conftest.err >&5
b0448899 23169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23170 (exit $ac_status); } && {
23171 test -z "$ac_c_werror_flag" ||
23172 test ! -s conftest.err
23173 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23174 ac_header_compiler=yes
23175else
b0448899 23176 echo "$as_me: failed program was:" >&5
2d2b6695
KS
23177sed 's/^/| /' conftest.$ac_ext >&5
23178
ca81d7a0 23179 ac_header_compiler=no
2d2b6695 23180fi
ca81d7a0
JD
23181
23182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
23183{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23184echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23185
23186# Is the header present?
b0448899
CY
23187{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23188echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23189cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23190/* confdefs.h. */
23191_ACEOF
23192cat confdefs.h >>conftest.$ac_ext
23193cat >>conftest.$ac_ext <<_ACEOF
23194/* end confdefs.h. */
23195#include <$ac_header>
23196_ACEOF
ca81d7a0
JD
23197if { (ac_try="$ac_cpp conftest.$ac_ext"
23198case "(($ac_try" in
23199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23200 *) ac_try_echo=$ac_try;;
23201esac
b0448899 23202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23203 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23204 ac_status=$?
23205 grep -v '^ *+' conftest.er1 >conftest.err
23206 rm -f conftest.er1
23207 cat conftest.err >&5
b0448899 23208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23209 (exit $ac_status); } >/dev/null && {
23210 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23211 test ! -s conftest.err
23212 }; then
2d2b6695
KS
23213 ac_header_preproc=yes
23214else
b0448899 23215 echo "$as_me: failed program was:" >&5
2d2b6695
KS
23216sed 's/^/| /' conftest.$ac_ext >&5
23217
23218 ac_header_preproc=no
23219fi
ca81d7a0 23220
2d2b6695 23221rm -f conftest.err conftest.$ac_ext
b0448899
CY
23222{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23223echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23224
23225# So? What about this header?
edfaf76d
LK
23226case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23227 yes:no: )
b0448899
CY
23228 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23229echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
23230 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23231echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 23232 ac_header_preproc=yes
2d2b6695 23233 ;;
edfaf76d 23234 no:yes:* )
b0448899
CY
23235 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23236echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
23237 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23238echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23239 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23240echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23241 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23242echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
23243 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23244echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23245 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23246echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23247
2d2b6695
KS
23248 ;;
23249esac
b0448899
CY
23250{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23251echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23252if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 23253 echo $ECHO_N "(cached) $ECHO_C" >&6
2d2b6695 23254else
edfaf76d 23255 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23256fi
b0448899
CY
23257ac_res=`eval echo '${'$as_ac_Header'}'`
23258 { echo "$as_me:$LINENO: result: $ac_res" >&5
23259echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23260
23261fi
b0448899 23262if test `eval echo '${'$as_ac_Header'}'` = yes; then
2d2b6695 23263 cat >>confdefs.h <<_ACEOF
b0448899 23264#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2d2b6695
KS
23265_ACEOF
23266
23267fi
23268
23269done
23270
23271
ba4481b5 23272if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23273
c0d27fcc 23274cat >>confdefs.h <<\_ACEOF
ba4481b5 23275#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23276_ACEOF
ba4481b5
DL
23277
23278fi
23279
b0448899
CY
23280{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23281echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23282if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
b0448899
CY
23283 { echo "$as_me:$LINENO: result: yes" >&5
23284echo "${ECHO_T}yes" >&6; }
b936fae4 23285
c0d27fcc 23286cat >>confdefs.h <<\_ACEOF
3d9fec71 23287#define HAVE_DEV_PTMX 1
c0d27fcc 23288_ACEOF
3d9fec71
DL
23289
23290else
b0448899
CY
23291 { echo "$as_me:$LINENO: result: no" >&5
23292echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23293fi
23294
b0448899
CY
23295{ echo "$as_me:$LINENO: checking for pid_t" >&5
23296echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0 23297if test "${ac_cv_type_pid_t+set}" = set; then
b0448899 23298 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23299else
1e0093ea
MB
23300 cat >conftest.$ac_ext <<_ACEOF
23301/* confdefs.h. */
23302_ACEOF
23303cat confdefs.h >>conftest.$ac_ext
23304cat >>conftest.$ac_ext <<_ACEOF
23305/* end confdefs.h. */
23306$ac_includes_default
b0448899 23307typedef pid_t ac__type_new_;
1e0093ea
MB
23308int
23309main ()
23310{
b0448899
CY
23311if ((ac__type_new_ *) 0)
23312 return 0;
23313if (sizeof (ac__type_new_))
23314 return 0;
503d2be0
AS
23315 ;
23316 return 0;
23317}
23318_ACEOF
23319rm -f conftest.$ac_objext
ca81d7a0
JD
23320if { (ac_try="$ac_compile"
23321case "(($ac_try" in
23322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323 *) ac_try_echo=$ac_try;;
23324esac
b0448899 23325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23326 (eval "$ac_compile") 2>conftest.er1
503d2be0 23327 ac_status=$?
edfaf76d
LK
23328 grep -v '^ *+' conftest.er1 >conftest.err
23329 rm -f conftest.er1
23330 cat conftest.err >&5
b0448899 23331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23332 (exit $ac_status); } && {
23333 test -z "$ac_c_werror_flag" ||
23334 test ! -s conftest.err
23335 } && test -s conftest.$ac_objext; then
b0448899 23336 ac_cv_type_pid_t=yes
647847ea 23337else
b0448899 23338 echo "$as_me: failed program was:" >&5
19650fd6
AS
23339sed 's/^/| /' conftest.$ac_ext >&5
23340
b0448899 23341 ac_cv_type_pid_t=no
647847ea 23342fi
ca81d7a0
JD
23343
23344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23345fi
b0448899
CY
23346{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23347echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
23348if test $ac_cv_type_pid_t = yes; then
503d2be0
AS
23349 :
23350else
23351
c0d27fcc 23352cat >>confdefs.h <<_ACEOF
647847ea 23353#define pid_t int
c0d27fcc 23354_ACEOF
647847ea
DL
23355
23356fi
23357
c0d27fcc 23358
ca81d7a0 23359for ac_header in vfork.h
503d2be0 23360do
b0448899 23361as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 23362if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899
CY
23363 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23364echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23365if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 23366 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23367fi
b0448899
CY
23368ac_res=`eval echo '${'$as_ac_Header'}'`
23369 { echo "$as_me:$LINENO: result: $ac_res" >&5
23370echo "${ECHO_T}$ac_res" >&6; }
98418dba 23371else
c0d27fcc 23372 # Is the header compilable?
b0448899
CY
23373{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23374echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23375cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23376/* confdefs.h. */
23377_ACEOF
23378cat confdefs.h >>conftest.$ac_ext
23379cat >>conftest.$ac_ext <<_ACEOF
23380/* end confdefs.h. */
c0d27fcc
MR
23381$ac_includes_default
23382#include <$ac_header>
23383_ACEOF
23384rm -f conftest.$ac_objext
ca81d7a0
JD
23385if { (ac_try="$ac_compile"
23386case "(($ac_try" in
23387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23388 *) ac_try_echo=$ac_try;;
23389esac
b0448899 23390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23391 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23392 ac_status=$?
edfaf76d
LK
23393 grep -v '^ *+' conftest.er1 >conftest.err
23394 rm -f conftest.er1
23395 cat conftest.err >&5
b0448899 23396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23397 (exit $ac_status); } && {
23398 test -z "$ac_c_werror_flag" ||
23399 test ! -s conftest.err
23400 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23401 ac_header_compiler=yes
23402else
b0448899 23403 echo "$as_me: failed program was:" >&5
19650fd6
AS
23404sed 's/^/| /' conftest.$ac_ext >&5
23405
ca81d7a0 23406 ac_header_compiler=no
c0d27fcc 23407fi
ca81d7a0
JD
23408
23409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b0448899
CY
23410{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23411echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23412
23413# Is the header present?
b0448899
CY
23414{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23415echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23416cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23417/* confdefs.h. */
23418_ACEOF
23419cat confdefs.h >>conftest.$ac_ext
23420cat >>conftest.$ac_ext <<_ACEOF
23421/* end confdefs.h. */
503d2be0
AS
23422#include <$ac_header>
23423_ACEOF
ca81d7a0
JD
23424if { (ac_try="$ac_cpp conftest.$ac_ext"
23425case "(($ac_try" in
23426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23427 *) ac_try_echo=$ac_try;;
23428esac
b0448899 23429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23430 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23431 ac_status=$?
6bae0ccf 23432 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23433 rm -f conftest.er1
23434 cat conftest.err >&5
b0448899 23435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23436 (exit $ac_status); } >/dev/null && {
23437 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23438 test ! -s conftest.err
23439 }; then
c0d27fcc 23440 ac_header_preproc=yes
647847ea 23441else
b0448899 23442 echo "$as_me: failed program was:" >&5
19650fd6
AS
23443sed 's/^/| /' conftest.$ac_ext >&5
23444
c0d27fcc 23445 ac_header_preproc=no
647847ea 23446fi
ca81d7a0 23447
503d2be0 23448rm -f conftest.err conftest.$ac_ext
b0448899
CY
23449{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23450echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23451
23452# So? What about this header?
edfaf76d
LK
23453case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23454 yes:no: )
b0448899
CY
23455 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23456echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
23457 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23458echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 23459 ac_header_preproc=yes
19650fd6 23460 ;;
edfaf76d 23461 no:yes:* )
b0448899
CY
23462 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23463echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
23464 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23465echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23466 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23467echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23468 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23469echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
23470 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23471echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23472 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23473echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23474
19650fd6 23475 ;;
c0d27fcc 23476esac
b0448899
CY
23477{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23478echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23479if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 23480 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23481else
edfaf76d 23482 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23483fi
b0448899
CY
23484ac_res=`eval echo '${'$as_ac_Header'}'`
23485 { echo "$as_me:$LINENO: result: $ac_res" >&5
23486echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23487
23488fi
b0448899 23489if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23490 cat >>confdefs.h <<_ACEOF
b0448899 23491#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23492_ACEOF
647847ea 23493
73b77ee5 23494fi
c0d27fcc 23495
503d2be0 23496done
73b77ee5 23497
c0d27fcc
MR
23498
23499
503d2be0
AS
23500for ac_func in fork vfork
23501do
b0448899
CY
23502as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23503{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23504echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 23505if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b0448899 23506 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23507else
503d2be0 23508 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23509/* confdefs.h. */
23510_ACEOF
23511cat confdefs.h >>conftest.$ac_ext
23512cat >>conftest.$ac_ext <<_ACEOF
23513/* end confdefs.h. */
edfaf76d
LK
23514/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23515 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23516#define $ac_func innocuous_$ac_func
23517
fa0b693c 23518/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23519 which can conflict with char $ac_func (); below.
23520 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23521 <limits.h> exists even on freestanding compilers. */
edfaf76d 23522
19650fd6
AS
23523#ifdef __STDC__
23524# include <limits.h>
23525#else
23526# include <assert.h>
23527#endif
edfaf76d
LK
23528
23529#undef $ac_func
23530
ca81d7a0
JD
23531/* Override any GCC internal prototype to avoid an error.
23532 Use char because int might match the return type of a GCC
23533 builtin and then its argument prototype would still apply. */
503d2be0
AS
23534#ifdef __cplusplus
23535extern "C"
23536#endif
503d2be0 23537char $ac_func ();
fa0b693c
GM
23538/* The GNU C library defines this for functions which it implements
23539 to always fail with ENOSYS. Some functions are actually named
23540 something starting with __ and the normal name is an alias. */
ca81d7a0 23541#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23542choke me
fa0b693c
GM
23543#endif
23544
19650fd6
AS
23545int
23546main ()
23547{
ca81d7a0 23548return $ac_func ();
503d2be0
AS
23549 ;
23550 return 0;
23551}
23552_ACEOF
23553rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23554if { (ac_try="$ac_link"
23555case "(($ac_try" in
23556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23557 *) ac_try_echo=$ac_try;;
23558esac
b0448899 23559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23560 (eval "$ac_link") 2>conftest.er1
503d2be0 23561 ac_status=$?
edfaf76d
LK
23562 grep -v '^ *+' conftest.er1 >conftest.err
23563 rm -f conftest.er1
23564 cat conftest.err >&5
b0448899 23565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23566 (exit $ac_status); } && {
23567 test -z "$ac_c_werror_flag" ||
23568 test ! -s conftest.err
b0448899
CY
23569 } && test -s conftest$ac_exeext &&
23570 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23571 eval "$as_ac_var=yes"
23572else
b0448899 23573 echo "$as_me: failed program was:" >&5
19650fd6
AS
23574sed 's/^/| /' conftest.$ac_ext >&5
23575
ca81d7a0 23576 eval "$as_ac_var=no"
503d2be0 23577fi
ca81d7a0 23578
f053c89f 23579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23580 conftest$ac_exeext conftest.$ac_ext
503d2be0 23581fi
b0448899
CY
23582ac_res=`eval echo '${'$as_ac_var'}'`
23583 { echo "$as_me:$LINENO: result: $ac_res" >&5
23584echo "${ECHO_T}$ac_res" >&6; }
23585if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23586 cat >>confdefs.h <<_ACEOF
b0448899 23587#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23588_ACEOF
503d2be0 23589
fa0b693c 23590fi
503d2be0 23591done
fa0b693c 23592
503d2be0 23593if test "x$ac_cv_func_fork" = xyes; then
b0448899
CY
23594 { echo "$as_me:$LINENO: checking for working fork" >&5
23595echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0 23596if test "${ac_cv_func_fork_works+set}" = set; then
b0448899 23597 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23598else
503d2be0
AS
23599 if test "$cross_compiling" = yes; then
23600 ac_cv_func_fork_works=cross
23601else
23602 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23603/* confdefs.h. */
23604_ACEOF
23605cat confdefs.h >>conftest.$ac_ext
23606cat >>conftest.$ac_ext <<_ACEOF
23607/* end confdefs.h. */
23608$ac_includes_default
23609int
23610main ()
23611{
23612
23613 /* By Ruediger Kuhlmann. */
23614 return fork () < 0;
23615
23616 ;
23617 return 0;
23618}
503d2be0
AS
23619_ACEOF
23620rm -f conftest$ac_exeext
ca81d7a0
JD
23621if { (ac_try="$ac_link"
23622case "(($ac_try" in
23623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23624 *) ac_try_echo=$ac_try;;
23625esac
b0448899 23626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23627 (eval "$ac_link") 2>&5
503d2be0 23628 ac_status=$?
b0448899 23629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23630 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23631 { (case "(($ac_try" in
23632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23633 *) ac_try_echo=$ac_try;;
23634esac
b0448899 23635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23636 (eval "$ac_try") 2>&5
503d2be0 23637 ac_status=$?
b0448899 23638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23639 (exit $ac_status); }; }; then
23640 ac_cv_func_fork_works=yes
23641else
b0448899
CY
23642 echo "$as_me: program exited with status $ac_status" >&5
23643echo "$as_me: failed program was:" >&5
19650fd6
AS
23644sed 's/^/| /' conftest.$ac_ext >&5
23645
c0d27fcc 23646( exit $ac_status )
503d2be0
AS
23647ac_cv_func_fork_works=no
23648fi
ca81d7a0 23649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23650fi
ca81d7a0
JD
23651
23652
503d2be0 23653fi
b0448899
CY
23654{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23655echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23656
6bae0ccf
DL
23657else
23658 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23659fi
23660if test "x$ac_cv_func_fork_works" = xcross; then
23661 case $host in
23662 *-*-amigaos* | *-*-msdosdjgpp*)
23663 # Override, as these systems have only a dummy fork() stub
23664 ac_cv_func_fork_works=no
23665 ;;
23666 *)
23667 ac_cv_func_fork_works=yes
23668 ;;
23669 esac
b0448899
CY
23670 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23671echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23672fi
73b77ee5 23673ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23674if test "x$ac_cv_func_vfork" = xyes; then
b0448899
CY
23675 { echo "$as_me:$LINENO: checking for working vfork" >&5
23676echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0 23677if test "${ac_cv_func_vfork_works+set}" = set; then
b0448899 23678 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
23679else
23680 if test "$cross_compiling" = yes; then
23681 ac_cv_func_vfork_works=cross
fa0b693c 23682else
503d2be0 23683 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23684/* confdefs.h. */
23685_ACEOF
23686cat confdefs.h >>conftest.$ac_ext
23687cat >>conftest.$ac_ext <<_ACEOF
23688/* end confdefs.h. */
73b77ee5 23689/* Thanks to Paul Eggert for this test. */
ca81d7a0 23690$ac_includes_default
19650fd6 23691#include <sys/wait.h>
f053c89f 23692#ifdef HAVE_VFORK_H
503d2be0 23693# include <vfork.h>
73b77ee5
GM
23694#endif
23695/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23696 argument registers are propagated back to the parent. The compiler
23697 is told about this with #include <vfork.h>, but some compilers
23698 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23699 static variable whose address is put into a register that is
23700 clobbered by the vfork. */
19650fd6 23701static void
fa0b693c 23702#ifdef __cplusplus
73b77ee5 23703sparc_address_test (int arg)
503d2be0 23704# else
73b77ee5 23705sparc_address_test (arg) int arg;
fa0b693c 23706#endif
fa0b693c 23707{
73b77ee5
GM
23708 static pid_t child;
23709 if (!child) {
23710 child = vfork ();
23711 if (child < 0) {
23712 perror ("vfork");
23713 _exit(2);
23714 }
23715 if (!child) {
23716 arg = getpid();
23717 write(-1, "", 0);
23718 _exit (arg);
23719 }
23720 }
23721}
503d2be0
AS
23722
23723int
23724main ()
23725{
73b77ee5
GM
23726 pid_t parent = getpid ();
23727 pid_t child;
fa0b693c 23728
19650fd6 23729 sparc_address_test (0);
fa0b693c 23730
73b77ee5 23731 child = vfork ();
fa0b693c 23732
73b77ee5 23733 if (child == 0) {
503d2be0
AS
23734 /* Here is another test for sparc vfork register problems. This
23735 test uses lots of local variables, at least as many local
23736 variables as main has allocated so far including compiler
23737 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23738 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23739 reuse the register of parent for one of the local variables,
23740 since it will think that parent can't possibly be used any more
23741 in this routine. Assigning to the local variable will thus
23742 munge parent in the parent process. */
73b77ee5
GM
23743 pid_t
23744 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23745 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23746 /* Convince the compiler that p..p7 are live; otherwise, it might
23747 use the same hardware register for all 8 local variables. */
23748 if (p != p1 || p != p2 || p != p3 || p != p4
23749 || p != p5 || p != p6 || p != p7)
23750 _exit(1);
fa0b693c 23751
503d2be0
AS
23752 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23753 from child file descriptors. If the child closes a descriptor
23754 before it execs or exits, this munges the parent's descriptor
23755 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23756 _exit(close(fileno(stdout)) != 0);
23757 } else {
23758 int status;
23759 struct stat st;
23760
23761 while (wait(&status) != child)
23762 ;
ca81d7a0 23763 return (
73b77ee5
GM
23764 /* Was there some problem with vforking? */
23765 child < 0
23766
23767 /* Did the child fail? (This shouldn't happen.) */
23768 || status
23769
23770 /* Did the vfork/compiler bug occur? */
23771 || parent != getpid()
fa0b693c 23772
73b77ee5
GM
23773 /* Did the file descriptor bug occur? */
23774 || fstat(fileno(stdout), &st) != 0
23775 );
23776 }
23777}
503d2be0
AS
23778_ACEOF
23779rm -f conftest$ac_exeext
ca81d7a0
JD
23780if { (ac_try="$ac_link"
23781case "(($ac_try" in
23782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23783 *) ac_try_echo=$ac_try;;
23784esac
b0448899 23785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23786 (eval "$ac_link") 2>&5
503d2be0 23787 ac_status=$?
b0448899 23788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23790 { (case "(($ac_try" in
23791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23792 *) ac_try_echo=$ac_try;;
23793esac
b0448899 23794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23795 (eval "$ac_try") 2>&5
503d2be0 23796 ac_status=$?
b0448899 23797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23798 (exit $ac_status); }; }; then
73b77ee5 23799 ac_cv_func_vfork_works=yes
fa0b693c 23800else
b0448899
CY
23801 echo "$as_me: program exited with status $ac_status" >&5
23802echo "$as_me: failed program was:" >&5
19650fd6
AS
23803sed 's/^/| /' conftest.$ac_ext >&5
23804
c0d27fcc 23805( exit $ac_status )
503d2be0
AS
23806ac_cv_func_vfork_works=no
23807fi
ca81d7a0 23808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23809fi
ca81d7a0
JD
23810
23811
fa0b693c 23812fi
b0448899
CY
23813{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23814echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23815
503d2be0
AS
23816fi;
23817if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23818 ac_cv_func_vfork_works=$ac_cv_func_vfork
b0448899
CY
23819 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23820echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23821fi
23822
503d2be0
AS
23823if test "x$ac_cv_func_vfork_works" = xyes; then
23824
c0d27fcc 23825cat >>confdefs.h <<\_ACEOF
503d2be0 23826#define HAVE_WORKING_VFORK 1
c0d27fcc 23827_ACEOF
503d2be0
AS
23828
23829else
23830
c0d27fcc 23831cat >>confdefs.h <<\_ACEOF
73b77ee5 23832#define vfork fork
c0d27fcc 23833_ACEOF
fa0b693c
GM
23834
23835fi
503d2be0
AS
23836if test "x$ac_cv_func_fork_works" = xyes; then
23837
c0d27fcc 23838cat >>confdefs.h <<\_ACEOF
503d2be0 23839#define HAVE_WORKING_FORK 1
c0d27fcc 23840_ACEOF
fa0b693c 23841
503d2be0 23842fi
647847ea 23843
c0d27fcc 23844
b0448899
CY
23845{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23846echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa 23847if test "${emacs_cv_langinfo_codeset+set}" = set; then
b0448899 23848 echo $ECHO_N "(cached) $ECHO_C" >&6
6a3a24fa
JD
23849else
23850 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23851/* confdefs.h. */
23852_ACEOF
23853cat confdefs.h >>conftest.$ac_ext
23854cat >>conftest.$ac_ext <<_ACEOF
23855/* end confdefs.h. */
6a3a24fa
JD
23856#include <langinfo.h>
23857int
23858main ()
23859{
23860char* cs = nl_langinfo(CODESET);
23861 ;
23862 return 0;
23863}
23864_ACEOF
23865rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23866if { (ac_try="$ac_link"
23867case "(($ac_try" in
23868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23869 *) ac_try_echo=$ac_try;;
23870esac
b0448899 23871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23872 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23873 ac_status=$?
edfaf76d
LK
23874 grep -v '^ *+' conftest.er1 >conftest.err
23875 rm -f conftest.er1
23876 cat conftest.err >&5
b0448899 23877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23878 (exit $ac_status); } && {
23879 test -z "$ac_c_werror_flag" ||
23880 test ! -s conftest.err
b0448899
CY
23881 } && test -s conftest$ac_exeext &&
23882 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23883 emacs_cv_langinfo_codeset=yes
23884else
b0448899 23885 echo "$as_me: failed program was:" >&5
19650fd6
AS
23886sed 's/^/| /' conftest.$ac_ext >&5
23887
ca81d7a0 23888 emacs_cv_langinfo_codeset=no
6a3a24fa 23889fi
ca81d7a0 23890
f053c89f 23891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23892 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23893
23894fi
b0448899
CY
23895{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23896echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23897if test $emacs_cv_langinfo_codeset = yes; then
23898
23899cat >>confdefs.h <<\_ACEOF
23900#define HAVE_LANGINFO_CODESET 1
23901_ACEOF
23902
23903fi
23904
b0448899
CY
23905{ echo "$as_me:$LINENO: checking for size_t" >&5
23906echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0 23907if test "${ac_cv_type_size_t+set}" = set; then
b0448899 23908 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23909else
1e0093ea
MB
23910 cat >conftest.$ac_ext <<_ACEOF
23911/* confdefs.h. */
23912_ACEOF
23913cat confdefs.h >>conftest.$ac_ext
23914cat >>conftest.$ac_ext <<_ACEOF
23915/* end confdefs.h. */
23916$ac_includes_default
b0448899 23917typedef size_t ac__type_new_;
1e0093ea
MB
23918int
23919main ()
23920{
b0448899
CY
23921if ((ac__type_new_ *) 0)
23922 return 0;
23923if (sizeof (ac__type_new_))
23924 return 0;
503d2be0
AS
23925 ;
23926 return 0;
23927}
23928_ACEOF
23929rm -f conftest.$ac_objext
ca81d7a0
JD
23930if { (ac_try="$ac_compile"
23931case "(($ac_try" in
23932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23933 *) ac_try_echo=$ac_try;;
23934esac
b0448899 23935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23936 (eval "$ac_compile") 2>conftest.er1
503d2be0 23937 ac_status=$?
edfaf76d
LK
23938 grep -v '^ *+' conftest.er1 >conftest.err
23939 rm -f conftest.er1
23940 cat conftest.err >&5
b0448899 23941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23942 (exit $ac_status); } && {
23943 test -z "$ac_c_werror_flag" ||
23944 test ! -s conftest.err
23945 } && test -s conftest.$ac_objext; then
b0448899 23946 ac_cv_type_size_t=yes
8730a8da 23947else
b0448899 23948 echo "$as_me: failed program was:" >&5
19650fd6
AS
23949sed 's/^/| /' conftest.$ac_ext >&5
23950
b0448899 23951 ac_cv_type_size_t=no
8730a8da 23952fi
ca81d7a0
JD
23953
23954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23955fi
b0448899
CY
23956{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23957echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
23958if test $ac_cv_type_size_t = yes; then
503d2be0 23959
c0d27fcc
MR
23960cat >>confdefs.h <<_ACEOF
23961#define HAVE_SIZE_T 1
23962_ACEOF
23963
8730a8da
DL
23964
23965fi
23966
c0d27fcc 23967
b0448899
CY
23968{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23969echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1 23970if test "${ac_cv_type_mbstate_t+set}" = set; then
b0448899 23971 echo $ECHO_N "(cached) $ECHO_C" >&6
973a76b1
DL
23972else
23973 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23974/* confdefs.h. */
23975_ACEOF
23976cat confdefs.h >>conftest.$ac_ext
23977cat >>conftest.$ac_ext <<_ACEOF
23978/* end confdefs.h. */
973a76b1
DL
23979$ac_includes_default
23980# include <wchar.h>
23981int
23982main ()
23983{
23984mbstate_t x; return sizeof x;
23985 ;
23986 return 0;
23987}
23988_ACEOF
23989rm -f conftest.$ac_objext
ca81d7a0
JD
23990if { (ac_try="$ac_compile"
23991case "(($ac_try" in
23992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23993 *) ac_try_echo=$ac_try;;
23994esac
b0448899 23995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23996 (eval "$ac_compile") 2>conftest.er1
973a76b1 23997 ac_status=$?
edfaf76d
LK
23998 grep -v '^ *+' conftest.er1 >conftest.err
23999 rm -f conftest.er1
24000 cat conftest.err >&5
b0448899 24001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
24002 (exit $ac_status); } && {
24003 test -z "$ac_c_werror_flag" ||
24004 test ! -s conftest.err
24005 } && test -s conftest.$ac_objext; then
973a76b1
DL
24006 ac_cv_type_mbstate_t=yes
24007else
b0448899 24008 echo "$as_me: failed program was:" >&5
19650fd6
AS
24009sed 's/^/| /' conftest.$ac_ext >&5
24010
ca81d7a0 24011 ac_cv_type_mbstate_t=no
973a76b1 24012fi
ca81d7a0
JD
24013
24014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 24015fi
b0448899
CY
24016{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
24017echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
24018 if test $ac_cv_type_mbstate_t = yes; then
24019
24020cat >>confdefs.h <<\_ACEOF
24021#define HAVE_MBSTATE_T 1
24022_ACEOF
24023
24024 else
24025
24026cat >>confdefs.h <<\_ACEOF
24027#define mbstate_t int
24028_ACEOF
24029
24030 fi
24031
b0448899
CY
24032{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
24033echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf 24034if test "${emacs_cv_c_restrict+set}" = set; then
b0448899 24035 echo $ECHO_N "(cached) $ECHO_C" >&6
22044edf
DL
24036else
24037 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24038/* confdefs.h. */
24039_ACEOF
24040cat confdefs.h >>conftest.$ac_ext
24041cat >>conftest.$ac_ext <<_ACEOF
24042/* end confdefs.h. */
22044edf
DL
24043void fred (int *restrict x);
24044int
24045main ()
24046{
b936fae4 24047
22044edf
DL
24048 ;
24049 return 0;
24050}
c0d27fcc 24051_ACEOF
22044edf 24052rm -f conftest.$ac_objext
ca81d7a0
JD
24053if { (ac_try="$ac_compile"
24054case "(($ac_try" in
24055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24056 *) ac_try_echo=$ac_try;;
24057esac
b0448899 24058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24059 (eval "$ac_compile") 2>conftest.er1
22044edf 24060 ac_status=$?
edfaf76d
LK
24061 grep -v '^ *+' conftest.er1 >conftest.err
24062 rm -f conftest.er1
24063 cat conftest.err >&5
b0448899 24064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24065 (exit $ac_status); } && {
24066 test -z "$ac_c_werror_flag" ||
24067 test ! -s conftest.err
24068 } && test -s conftest.$ac_objext; then
22044edf
DL
24069 emacs_cv_c_restrict=yes
24070else
b0448899 24071 echo "$as_me: failed program was:" >&5
19650fd6
AS
24072sed 's/^/| /' conftest.$ac_ext >&5
24073
ca81d7a0 24074 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24075/* confdefs.h. */
24076_ACEOF
24077cat confdefs.h >>conftest.$ac_ext
24078cat >>conftest.$ac_ext <<_ACEOF
24079/* end confdefs.h. */
22044edf
DL
24080void fred (int *__restrict x);
24081int
24082main ()
24083{
c0d27fcc 24084
22044edf
DL
24085 ;
24086 return 0;
24087}
c0d27fcc 24088_ACEOF
22044edf 24089rm -f conftest.$ac_objext
ca81d7a0
JD
24090if { (ac_try="$ac_compile"
24091case "(($ac_try" in
24092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24093 *) ac_try_echo=$ac_try;;
24094esac
b0448899 24095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24096 (eval "$ac_compile") 2>conftest.er1
22044edf 24097 ac_status=$?
edfaf76d
LK
24098 grep -v '^ *+' conftest.er1 >conftest.err
24099 rm -f conftest.er1
24100 cat conftest.err >&5
b0448899 24101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24102 (exit $ac_status); } && {
24103 test -z "$ac_c_werror_flag" ||
24104 test ! -s conftest.err
24105 } && test -s conftest.$ac_objext; then
22044edf
DL
24106 emacs_cv_c_restrict=__restrict
24107else
b0448899 24108 echo "$as_me: failed program was:" >&5
19650fd6
AS
24109sed 's/^/| /' conftest.$ac_ext >&5
24110
ca81d7a0 24111 emacs_cv_c_restrict=no
ba4481b5 24112fi
ca81d7a0
JD
24113
24114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24115fi
ca81d7a0
JD
24116
24117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24118fi
b0448899
CY
24119{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24120echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24121case "$emacs_cv_c_restrict" in
24122 yes) emacs_restrict=restrict;;
24123 no) emacs_restrict="";;
24124 *) emacs_restrict="$emacs_cv_c_restrict";;
24125esac
24126if test "$emacs_restrict" != __restrict; then
b936fae4 24127
22044edf
DL
24128cat >>confdefs.h <<_ACEOF
24129#define __restrict $emacs_restrict
c0d27fcc 24130_ACEOF
ba4481b5
DL
24131
24132fi
ba4481b5 24133
b0448899
CY
24134{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24135echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf 24136if test "${emacs_cv_c_restrict_arr+set}" = set; then
b0448899 24137 echo $ECHO_N "(cached) $ECHO_C" >&6
22044edf
DL
24138else
24139 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24140/* confdefs.h. */
24141_ACEOF
24142cat confdefs.h >>conftest.$ac_ext
24143cat >>conftest.$ac_ext <<_ACEOF
24144/* end confdefs.h. */
22044edf
DL
24145void fred (int x[__restrict]);
24146int
24147main ()
24148{
b936fae4 24149
22044edf
DL
24150 ;
24151 return 0;
24152}
c0d27fcc 24153_ACEOF
22044edf 24154rm -f conftest.$ac_objext
ca81d7a0
JD
24155if { (ac_try="$ac_compile"
24156case "(($ac_try" in
24157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24158 *) ac_try_echo=$ac_try;;
24159esac
b0448899 24160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24161 (eval "$ac_compile") 2>conftest.er1
22044edf 24162 ac_status=$?
edfaf76d
LK
24163 grep -v '^ *+' conftest.er1 >conftest.err
24164 rm -f conftest.er1
24165 cat conftest.err >&5
b0448899 24166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24167 (exit $ac_status); } && {
24168 test -z "$ac_c_werror_flag" ||
24169 test ! -s conftest.err
24170 } && test -s conftest.$ac_objext; then
22044edf
DL
24171 emacs_cv_c_restrict_arr=yes
24172else
b0448899 24173 echo "$as_me: failed program was:" >&5
19650fd6
AS
24174sed 's/^/| /' conftest.$ac_ext >&5
24175
ca81d7a0 24176 emacs_cv_c_restrict_arr=no
ba4481b5 24177fi
ca81d7a0
JD
24178
24179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24180fi
b0448899
CY
24181{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24182echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24183if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24184
c0d27fcc 24185cat >>confdefs.h <<\_ACEOF
22044edf 24186#define __restrict_arr __restrict
c0d27fcc 24187_ACEOF
ba4481b5 24188
ba4481b5
DL
24189fi
24190
c0d27fcc 24191
c0d27fcc 24192
22044edf
DL
24193# Set up the CFLAGS for real compilation, so we can substitute it.
24194CFLAGS="$REAL_CFLAGS"
24195CPPFLAGS="$REAL_CPPFLAGS"
24196
24197#### Find out which version of Emacs this is.
24198version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24199 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24200if test x"${version}" = x; then
b0448899
CY
24201 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24202echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22044edf
DL
24203 { (exit 1); exit 1; }; }
24204fi
24205
24206### Specify what sort of things we'll be editing into Makefile and config.h.
24207### Use configuration here uncanonicalized to avoid exceeding size limits.
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
6a3a24fa 24240
06b62770
AR
24241
24242
24243
48fad8e8
DN
24244
24245
5e159d07
CY
24246
24247
edfda783 24248
22044edf
DL
24249
24250
24251cat >>confdefs.h <<_ACEOF
24252#define EMACS_CONFIGURATION "${canonical}"
24253_ACEOF
24254
24255
24256cat >>confdefs.h <<_ACEOF
24257#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24258_ACEOF
24259
24260
24261cat >>confdefs.h <<_ACEOF
24262#define config_machfile "${machfile}"
24263_ACEOF
24264
24265
24266cat >>confdefs.h <<_ACEOF
24267#define config_opsysfile "${opsysfile}"
24268_ACEOF
24269
24270
24271cat >>confdefs.h <<_ACEOF
24272#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24273_ACEOF
24274
24275
24276cat >>confdefs.h <<_ACEOF
24277#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24278_ACEOF
24279
24280
24281cat >>confdefs.h <<_ACEOF
24282#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24283_ACEOF
24284
24285
24286cat >>confdefs.h <<_ACEOF
24287#define UNEXEC_SRC ${UNEXEC_SRC}
24288_ACEOF
24289
24290
24291if test "${HAVE_X_WINDOWS}" = "yes" ; then
24292
24293cat >>confdefs.h <<\_ACEOF
24294#define HAVE_X_WINDOWS 1
24295_ACEOF
24296
24297fi
24298if test "${USE_X_TOOLKIT}" != "none" ; then
24299
24300cat >>confdefs.h <<\_ACEOF
24301#define USE_X_TOOLKIT 1
24302_ACEOF
24303
39dd4d52 24304 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24305
24306cat >>confdefs.h <<\_ACEOF
24307#define USE_LUCID 1
24308_ACEOF
24309
39dd4d52 24310 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24311
24312cat >>confdefs.h <<\_ACEOF
24313#define USE_MOTIF 1
24314_ACEOF
24315
24316 fi
22044edf
DL
24317fi
24318if test "${HAVE_X11}" = "yes" ; then
24319
24320cat >>confdefs.h <<\_ACEOF
24321#define HAVE_X11 1
24322_ACEOF
24323
22044edf
DL
24324fi
24325if test "${HAVE_MENUS}" = "yes" ; then
24326
24327cat >>confdefs.h <<\_ACEOF
24328#define HAVE_MENUS 1
24329_ACEOF
24330
24331fi
24332if test "${GNU_MALLOC}" = "yes" ; then
24333
24334cat >>confdefs.h <<\_ACEOF
24335#define GNU_MALLOC 1
24336_ACEOF
24337
24338fi
24339if test "${REL_ALLOC}" = "yes" ; then
24340
24341cat >>confdefs.h <<\_ACEOF
24342#define REL_ALLOC 1
24343_ACEOF
24344
24345fi
24346
24347
24348
c0d27fcc
MR
24349
24350
5afbeb22 24351
ba4481b5 24352#### Report on what we decided to do.
488dd4c4
JD
24353#### Report GTK as a toolkit, even if it doesn't use Xt.
24354#### It makes printing result more understandable as using GTK sets
24355#### toolkit_scroll_bars to yes by default.
24356if test "${HAVE_GTK}" = "yes"; then
24357 USE_X_TOOLKIT=GTK
24358fi
24359
ba4481b5
DL
24360echo "
24361Configured for \`${canonical}'.
24362
24363 Where should the build process find the source code? ${srcdir}
24364 What operating system and machine description files should Emacs use?
24365 \`${opsysfile}' and \`${machfile}'
24366 What compiler should emacs be built with? ${CC} ${CFLAGS}
24367 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24368 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24369 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24370 What window system should Emacs use? ${window_system}
8e967cf7 24371 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24372
24373if test -n "${x_includes}"; then
24374echo " Where do we find X Windows header files? ${x_includes}"
24375else
24376echo " Where do we find X Windows header files? Standard dirs"
24377fi
24378if test -n "${x_libraries}"; then
24379echo " Where do we find X Windows libraries? ${x_libraries}"
24380else
24381echo " Where do we find X Windows libraries? Standard dirs"
24382fi
24383
24384echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24385echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24386echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24387echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24388echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24389echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24390echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24391echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24392echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24393
edfda783
AR
24394echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24395echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24396echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24397echo " Does Emacs use -lxft? ${HAVE_XFT}"
24398
8d87199b 24399echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
24400echo
24401
d0098f13
JD
24402if test $USE_XASSERTS = yes; then
24403 echo " Compiling with asserts turned on."
d0098f13 24404 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24405fi
05cf15c6 24406
ca34d75a
JD
24407echo
24408
a2d3b5bd
JD
24409if test "$USE_X_TOOLKIT" = GTK; then
24410 case "$canonical" in
24411 *cygwin*)
24412 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24413 will probably get a crash on startup. If this happens, please use another
24414 toolkit for Emacs. See etc/PROBLEMS for more information."
24415 ;;
24416 esac
24417fi
24418
06b62770
AR
24419if test "$HAVE_NS" = "yes"; then
24420 echo
24421 echo "You must run \"make install\" in order to test the built application.
24422The installed application will go to nextstep/Emacs.app and can be
24423run or moved from there."
24424 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24425 echo "The application will be fully self-contained."
24426 else
24427 echo "The lisp resources for the application will be installed under ${prefix}.
24428You may need to run \"make install\" with sudo. The application will fail
24429to run if these resources are not installed."
24430 fi
24431 echo
24432fi
24433
131e4133
MA
24434if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24435 echo "D-Bus integration has been tested for GNU/Linux only."
24436 echo
24437fi
24438
05cf15c6 24439
ba4481b5
DL
24440# Remove any trailing slashes in these variables.
24441test "${prefix}" != NONE &&
24442 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24443test "${exec_prefix}" != NONE &&
24444 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24445
8acdcf6f
GM
24446# Now get this: Some word that is part of the ${srcdir} directory name
24447# or the ${configuration} value might, just might, happen to be an
24448# identifier like `sun4' or `i386' or something, and be predefined by
24449# the C preprocessor to some helpful value like 1, or maybe the empty
24450# string. Needless to say consequent macro substitutions are less
24451# than conducive to the makefile finding the correct directory.
24452cpp_undefs="`echo $srcdir $configuration $canonical |
24453 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24454 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24455
d0e9bfd2
GM
24456## Check if the C preprocessor will convert `..' to `. .'. If so, set
24457## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24458## from Makefile.c can correctly provide the arg `-traditional' to the
24459## C preprocessor.
24460
503d2be0 24461cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24462/* confdefs.h. */
24463_ACEOF
24464cat confdefs.h >>conftest.$ac_ext
24465cat >>conftest.$ac_ext <<_ACEOF
24466/* end confdefs.h. */
d0e9bfd2 24467yes..yes
503d2be0 24468_ACEOF
d0e9bfd2 24469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24470 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24471 CPP_NEED_TRADITIONAL=no
24472else
d0e9bfd2
GM
24473 CPP_NEED_TRADITIONAL=yes
24474fi
24475rm -f conftest*
24476
c0d27fcc 24477
f657c21b 24478ac_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
24479
24480ac_config_commands="$ac_config_commands default"
24481
503d2be0 24482cat >confcache <<\_ACEOF
ba4481b5
DL
24483# This file is a shell script that caches the results of configure
24484# tests run on this system so they can be shared between configure
503d2be0
AS
24485# scripts and configure runs, see configure's option --config-cache.
24486# It is not useful on other systems. If it contains results you don't
24487# want to keep, you may remove or edit it.
ba4481b5 24488#
503d2be0
AS
24489# config.status only pays attention to the cache file if you give it
24490# the --recheck option to rerun configure.
ba4481b5 24491#
6bae0ccf 24492# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24493# loading this file, other *unset* `ac_cv_foo' will be assigned the
24494# following values.
24495
24496_ACEOF
24497
ba4481b5
DL
24498# The following way of writing the cache mishandles newlines in values,
24499# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24500# So, we kill variables containing newlines.
ba4481b5
DL
24501# Ultrix sh set writes to stderr and can't be redirected directly,
24502# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24503(
24504 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24505 eval ac_val=\$$ac_var
24506 case $ac_val in #(
24507 *${as_nl}*)
24508 case $ac_var in #(
b0448899
CY
24509 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24510echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
ca81d7a0
JD
24511 esac
24512 case $ac_var in #(
24513 _ | IFS | as_nl) ;; #(
24514 *) $as_unset $ac_var ;;
24515 esac ;;
24516 esac
24517 done
24518
503d2be0 24519 (set) 2>&1 |
ca81d7a0
JD
24520 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24521 *${as_nl}ac_space=\ *)
503d2be0
AS
24522 # `set' does not quote correctly, so add quotes (double-quote
24523 # substitution turns \\\\ into \\, and sed turns \\ into \).
24524 sed -n \
edfaf76d
LK
24525 "s/'/'\\\\''/g;
24526 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24527 ;; #(
503d2be0
AS
24528 *)
24529 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24530 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24531 ;;
ca81d7a0
JD
24532 esac |
24533 sort
24534) |
503d2be0 24535 sed '
ca81d7a0 24536 /^ac_cv_env_/b end
503d2be0 24537 t clear
ca81d7a0 24538 :clear
503d2be0
AS
24539 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24540 t end
ca81d7a0
JD
24541 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24542 :end' >>confcache
24543if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24544 if test -w "$cache_file"; then
24545 test "x$cache_file" != "x/dev/null" &&
b0448899
CY
24546 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24547echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24548 cat confcache >$cache_file
ba4481b5 24549 else
b0448899
CY
24550 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24551echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24552 fi
24553fi
24554rm -f confcache
24555
ba4481b5
DL
24556test "x$prefix" = xNONE && prefix=$ac_default_prefix
24557# Let make expand exec_prefix.
24558test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24559
ba4481b5
DL
24560DEFS=-DHAVE_CONFIG_H
24561
6bae0ccf
DL
24562ac_libobjs=
24563ac_ltlibobjs=
24564for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24565 # 1. Remove the extension, and $U if already installed.
ca81d7a0 24566 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
b0448899 24567 ac_i=`echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
24568 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24569 # will be set to the directory where LIBOBJS objects are built.
24570 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24571 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24572done
24573LIBOBJS=$ac_libobjs
24574
24575LTLIBOBJS=$ac_ltlibobjs
24576
24577
c0d27fcc 24578
ba4481b5 24579: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24580ac_clean_files_save=$ac_clean_files
24581ac_clean_files="$ac_clean_files $CONFIG_STATUS"
b0448899
CY
24582{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24583echo "$as_me: creating $CONFIG_STATUS" >&6;}
24584cat >$CONFIG_STATUS <<_ACEOF
503d2be0 24585#! $SHELL
c0d27fcc 24586# Generated by $as_me.
ba4481b5 24587# Run this file to recreate the current configuration.
ba4481b5 24588# Compiler output produced by configure, useful for debugging
503d2be0 24589# configure, is in config.log if it exists.
ba4481b5 24590
503d2be0 24591debug=false
19650fd6
AS
24592ac_cs_recheck=false
24593ac_cs_silent=false
503d2be0 24594SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24595_ACEOF
24596
b0448899 24597cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24598## --------------------- ##
24599## M4sh Initialization. ##
24600## --------------------- ##
24601
f053c89f
CY
24602# Be more Bourne compatible
24603DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24604if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24605 emulate sh
24606 NULLCMD=:
b0448899 24607 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
6bae0ccf
DL
24608 # is contrary to our usage. Disable this feature.
24609 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24610 setopt NO_GLOB_SUBST
24611else
f053c89f
CY
24612 case `(set -o) 2>/dev/null` in
24613 *posix*) set -o posix ;;
24614esac
24615
503d2be0 24616fi
f053c89f
CY
24617
24618
503d2be0 24619
ca81d7a0
JD
24620
24621# PATH needs CR
24622# Avoid depending upon Character Ranges.
24623as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24624as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24625as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24626as_cr_digits='0123456789'
24627as_cr_alnum=$as_cr_Letters$as_cr_digits
24628
1e0093ea
MB
24629# The user is always right.
24630if test "${PATH_SEPARATOR+set}" != set; then
b0448899
CY
24631 echo "#! /bin/sh" >conf$$.sh
24632 echo "exit 0" >>conf$$.sh
24633 chmod +x conf$$.sh
24634 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24635 PATH_SEPARATOR=';'
24636 else
24637 PATH_SEPARATOR=:
24638 fi
24639 rm -f conf$$.sh
503d2be0
AS
24640fi
24641
c0d27fcc 24642# Support unset when possible.
edfaf76d 24643if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24644 as_unset=unset
24645else
24646 as_unset=false
24647fi
24648
6bae0ccf 24649
ca81d7a0
JD
24650# IFS
24651# We need space, tab and new line, in precisely that order. Quoting is
24652# there to prevent editors from complaining about space-tab.
24653# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24654# splitting by setting IFS to empty value.)
b0448899
CY
24655as_nl='
24656'
ca81d7a0
JD
24657IFS=" "" $as_nl"
24658
24659# Find who we are. Look in the path if we contain no directory separator.
24660case $0 in
24661 *[\\/]* ) as_myself=$0 ;;
24662 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24663for as_dir in $PATH
24664do
24665 IFS=$as_save_IFS
24666 test -z "$as_dir" && as_dir=.
24667 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24668done
24669IFS=$as_save_IFS
24670
24671 ;;
24672esac
24673# We did not find ourselves, most probably we were run as `sh COMMAND'
24674# in which case we are not to be found in the path.
24675if test "x$as_myself" = x; then
24676 as_myself=$0
24677fi
24678if test ! -f "$as_myself"; then
b0448899 24679 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ca81d7a0
JD
24680 { (exit 1); exit 1; }
24681fi
24682
6bae0ccf 24683# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24684for as_var in ENV MAIL MAILPATH
24685do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24686done
6bae0ccf
DL
24687PS1='$ '
24688PS2='> '
24689PS4='+ '
24690
24691# NLS nuisances.
b0448899
CY
24692for as_var in \
24693 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24694 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24695 LC_TELEPHONE LC_TIME
24696do
24697 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24698 eval $as_var=C; export $as_var
24699 else
24700 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24701 fi
24702done
6bae0ccf
DL
24703
24704# Required to use basename.
ca81d7a0
JD
24705if expr a : '\(a\)' >/dev/null 2>&1 &&
24706 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24707 as_expr=expr
24708else
24709 as_expr=false
24710fi
24711
ca81d7a0 24712if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24713 as_basename=basename
24714else
24715 as_basename=false
24716fi
c0d27fcc
MR
24717
24718
503d2be0 24719# Name of the executable.
ca81d7a0 24720as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24721$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24722 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24723 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
b0448899 24724echo X/"$0" |
ca81d7a0
JD
24725 sed '/^.*\/\([^/][^/]*\)\/*$/{
24726 s//\1/
24727 q
24728 }
24729 /^X\/\(\/\/\)$/{
24730 s//\1/
24731 q
24732 }
24733 /^X\/\(\/\).*/{
24734 s//\1/
24735 q
24736 }
24737 s/.*/./; q'`
c0d27fcc 24738
ca81d7a0
JD
24739# CDPATH.
24740$as_unset CDPATH
c0d27fcc
MR
24741
24742
c0d27fcc 24743
c0d27fcc 24744 as_lineno_1=$LINENO
c0d27fcc 24745 as_lineno_2=$LINENO
c0d27fcc 24746 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24747 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24748
24749 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24750 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24751 # line-number line after each line using $LINENO; the second 'sed'
24752 # does the real work. The second script uses 'N' to pair each
24753 # line-number line with the line containing $LINENO, and appends
24754 # trailing '-' during substitution so that $LINENO is not a special
24755 # case at line end.
c0d27fcc 24756 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24757 # scripts with optimization help from Paolo Bonzini. Blame Lee
24758 # E. McMahon (1931-1989) for sed's syntax. :-)
24759 sed -n '
24760 p
24761 /[$]LINENO/=
24762 ' <$as_myself |
c0d27fcc 24763 sed '
ca81d7a0
JD
24764 s/[$]LINENO.*/&-/
24765 t lineno
24766 b
24767 :lineno
c0d27fcc 24768 N
ca81d7a0
JD
24769 :loop
24770 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24771 t loop
ca81d7a0 24772 s/-\n.*//
c0d27fcc 24773 ' >$as_me.lineno &&
ca81d7a0 24774 chmod +x "$as_me.lineno" ||
b0448899 24775 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24776 { (exit 1); exit 1; }; }
24777
24778 # Don't try to exec as it changes $[0], causing all sort of problems
24779 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24780 # original and so on. Autoconf is especially sensitive to this).
24781 . "./$as_me.lineno"
c0d27fcc
MR
24782 # Exit status is that of the last command.
24783 exit
24784}
24785
24786
ca81d7a0
JD
24787if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24788 as_dirname=dirname
24789else
24790 as_dirname=false
24791fi
24792
24793ECHO_C= ECHO_N= ECHO_T=
24794case `echo -n x` in
24795-n*)
24796 case `echo 'x\c'` in
24797 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24798 *) ECHO_C='\c';;
24799 esac;;
24800*)
24801 ECHO_N='-n';;
c0d27fcc 24802esac
b0448899 24803
ca81d7a0
JD
24804if expr a : '\(a\)' >/dev/null 2>&1 &&
24805 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24806 as_expr=expr
24807else
24808 as_expr=false
24809fi
24810
24811rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24812if test -d conf$$.dir; then
24813 rm -f conf$$.dir/conf$$.file
24814else
24815 rm -f conf$$.dir
b0448899
CY
24816 mkdir conf$$.dir
24817fi
24818echo >conf$$.file
24819if ln -s conf$$.file conf$$ 2>/dev/null; then
24820 as_ln_s='ln -s'
24821 # ... but there are two gotchas:
24822 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24823 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24824 # In both cases, we have to default to `cp -p'.
24825 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24826 as_ln_s='cp -p'
b0448899
CY
24827elif ln conf$$.file conf$$ 2>/dev/null; then
24828 as_ln_s=ln
503d2be0
AS
24829else
24830 as_ln_s='cp -p'
24831fi
ca81d7a0
JD
24832rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24833rmdir conf$$.dir 2>/dev/null
503d2be0 24834
6bae0ccf
DL
24835if mkdir -p . 2>/dev/null; then
24836 as_mkdir_p=:
24837else
edfaf76d 24838 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24839 as_mkdir_p=false
24840fi
24841
f053c89f
CY
24842if test -x / >/dev/null 2>&1; then
24843 as_test_x='test -x'
ca81d7a0 24844else
f053c89f
CY
24845 if ls -dL / >/dev/null 2>&1; then
24846 as_ls_L_option=L
24847 else
24848 as_ls_L_option=
24849 fi
24850 as_test_x='
24851 eval sh -c '\''
24852 if test -d "$1"; then
b0448899 24853 test -d "$1/.";
f053c89f
CY
24854 else
24855 case $1 in
b0448899 24856 -*)set "./$1";;
f053c89f
CY
24857 esac;
24858 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24859 ???[sx]*):;;*)false;;esac;fi
24860 '\'' sh
24861 '
ca81d7a0 24862fi
f053c89f 24863as_executable_p=$as_test_x
503d2be0 24864
c0d27fcc 24865# Sed expression to map a string onto a valid CPP name.
edfaf76d 24866as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24867
24868# Sed expression to map a string onto a valid variable name.
edfaf76d 24869as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24870
503d2be0 24871
503d2be0
AS
24872exec 6>&1
24873
ca81d7a0 24874# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24875# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24876# values after options handling.
24877ac_log="
fa35ec36 24878This file was extended by emacs $as_me 23.0.91, which was
b0448899 24879generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24880
24881 CONFIG_FILES = $CONFIG_FILES
24882 CONFIG_HEADERS = $CONFIG_HEADERS
24883 CONFIG_LINKS = $CONFIG_LINKS
24884 CONFIG_COMMANDS = $CONFIG_COMMANDS
24885 $ $0 $@
24886
ca81d7a0
JD
24887on `(hostname || uname -n) 2>/dev/null | sed 1q`
24888"
24889
503d2be0
AS
24890_ACEOF
24891
b0448899 24892cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24893# Files that config.status was made for.
ca81d7a0
JD
24894config_files="$ac_config_files"
24895config_headers="$ac_config_headers"
24896config_commands="$ac_config_commands"
503d2be0 24897
ca81d7a0 24898_ACEOF
503d2be0 24899
b0448899 24900cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24901ac_cs_usage="\
24902\`$as_me' instantiates files from templates according to the
24903current configuration.
24904
b0448899 24905Usage: $0 [OPTIONS] [FILE]...
503d2be0
AS
24906
24907 -h, --help print this help, then exit
f053c89f 24908 -V, --version print version number and configuration settings, then exit
b0448899 24909 -q, --quiet do not print progress messages
503d2be0
AS
24910 -d, --debug don't remove temporary files
24911 --recheck update $as_me by reconfiguring in the same conditions
b0448899
CY
24912 --file=FILE[:TEMPLATE]
24913 instantiate the configuration file FILE
24914 --header=FILE[:TEMPLATE]
24915 instantiate the configuration header FILE
503d2be0
AS
24916
24917Configuration files:
24918$config_files
24919
24920Configuration headers:
24921$config_headers
24922
24923Configuration commands:
24924$config_commands
24925
24926Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24927
ca81d7a0 24928_ACEOF
b0448899 24929cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24930ac_cs_version="\\
fa35ec36 24931emacs config.status 23.0.91
b0448899
CY
24932configured by $0, generated by GNU Autoconf 2.61,
24933 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24934
b0448899 24935Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24936This config.status script is free software; the Free Software Foundation
24937gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24938
24939ac_pwd='$ac_pwd'
24940srcdir='$srcdir'
24941INSTALL='$INSTALL'
c0d27fcc 24942_ACEOF
503d2be0 24943
b0448899
CY
24944cat >>$CONFIG_STATUS <<\_ACEOF
24945# If no file are specified by the user, then we need to provide default
24946# value. By we need to know if files were specified by the user.
503d2be0
AS
24947ac_need_defaults=:
24948while test $# != 0
ba4481b5 24949do
503d2be0
AS
24950 case $1 in
24951 --*=*)
ca81d7a0
JD
24952 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24953 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24954 ac_shift=:
24955 ;;
ca81d7a0 24956 *)
6bae0ccf
DL
24957 ac_option=$1
24958 ac_optarg=$2
24959 ac_shift=shift
503d2be0 24960 ;;
503d2be0
AS
24961 esac
24962
6bae0ccf 24963 case $ac_option in
503d2be0 24964 # Handling of the options.
19650fd6
AS
24965 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24966 ac_cs_recheck=: ;;
ca81d7a0 24967 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
b0448899 24968 echo "$ac_cs_version"; exit ;;
ca81d7a0 24969 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24970 debug=: ;;
24971 --file | --fil | --fi | --f )
6bae0ccf 24972 $ac_shift
b0448899 24973 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24974 ac_need_defaults=false;;
24975 --header | --heade | --head | --hea )
6bae0ccf 24976 $ac_shift
b0448899 24977 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24978 ac_need_defaults=false;;
ca81d7a0
JD
24979 --he | --h)
24980 # Conflict between --help and --header
b0448899 24981 { echo "$as_me: error: ambiguous option: $1
ca81d7a0
JD
24982Try \`$0 --help' for more information." >&2
24983 { (exit 1); exit 1; }; };;
24984 --help | --hel | -h )
b0448899 24985 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24986 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24987 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24988 ac_cs_silent=: ;;
503d2be0
AS
24989
24990 # This is an error.
b0448899 24991 -*) { echo "$as_me: error: unrecognized option: $1
ca81d7a0 24992Try \`$0 --help' for more information." >&2
503d2be0
AS
24993 { (exit 1); exit 1; }; } ;;
24994
ca81d7a0
JD
24995 *) ac_config_targets="$ac_config_targets $1"
24996 ac_need_defaults=false ;;
503d2be0 24997
ba4481b5 24998 esac
503d2be0 24999 shift
ba4481b5
DL
25000done
25001
19650fd6
AS
25002ac_configure_extra_args=
25003
25004if $ac_cs_silent; then
25005 exec 6>/dev/null
25006 ac_configure_extra_args="$ac_configure_extra_args --silent"
25007fi
25008
25009_ACEOF
b0448899 25010cat >>$CONFIG_STATUS <<_ACEOF
19650fd6 25011if \$ac_cs_recheck; then
b0448899
CY
25012 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25013 CONFIG_SHELL=$SHELL
ca81d7a0 25014 export CONFIG_SHELL
b0448899 25015 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
25016fi
25017
503d2be0 25018_ACEOF
b0448899 25019cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25020exec 5>>config.log
25021{
25022 echo
25023 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25024## Running $as_me. ##
25025_ASBOX
b0448899 25026 echo "$ac_log"
ca81d7a0 25027} >&5
ba4481b5 25028
ca81d7a0 25029_ACEOF
b0448899 25030cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 25031#
ca81d7a0 25032# INIT-COMMANDS
503d2be0 25033#
8acdcf6f 25034GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 25035
c0d27fcc
MR
25036_ACEOF
25037
b0448899 25038cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25039
25040# Handling of arguments.
503d2be0
AS
25041for ac_config_target in $ac_config_targets
25042do
ca81d7a0
JD
25043 case $ac_config_target in
25044 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
25045 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25046 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
25047 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
25048 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
25049 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
25050 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25051 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 25052 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 25053 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 25054 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
25055 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25056 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25057
b0448899
CY
25058 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25059echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
503d2be0
AS
25060 { (exit 1); exit 1; }; };;
25061 esac
ba4481b5 25062done
503d2be0 25063
ca81d7a0 25064
503d2be0
AS
25065# If the user did not use the arguments to specify the items to instantiate,
25066# then the envvar interface is used. Set only those that are not.
25067# We use the long form for the default assignment because of an extremely
25068# bizarre bug on SunOS 4.1.3.
25069if $ac_need_defaults; then
25070 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25071 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25072 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 25073fi
503d2be0 25074
19650fd6 25075# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 25076# simply because there is no reason against having it here, and in addition,
19650fd6 25077# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
25078# Hook for its removal unless debugging.
25079# Note that there is a small window in which the directory will not be cleaned:
25080# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
25081$debug ||
25082{
ca81d7a0
JD
25083 tmp=
25084 trap 'exit_status=$?
25085 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25086' 0
503d2be0
AS
25087 trap '{ (exit 1); exit 1; }' 1 2 13 15
25088}
503d2be0 25089# Create a (secure) tmp directory for tmp files.
19650fd6 25090
503d2be0 25091{
ca81d7a0 25092 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25093 test -n "$tmp" && test -d "$tmp"
25094} ||
25095{
ca81d7a0
JD
25096 tmp=./conf$$-$RANDOM
25097 (umask 077 && mkdir "$tmp")
503d2be0
AS
25098} ||
25099{
b0448899 25100 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25101 { (exit 1); exit 1; }
25102}
25103
b0448899
CY
25104#
25105# Set up the sed scripts for CONFIG_FILES section.
25106#
25107
25108# No need to generate the scripts if there are no CONFIG_FILES.
25109# This happens for instance when ./config.status config.h
ca81d7a0
JD
25110if test -n "$CONFIG_FILES"; then
25111
b0448899
CY
25112_ACEOF
25113
ca81d7a0 25114
b0448899
CY
25115
25116ac_delim='%!_!# '
25117for ac_last_try in false false false false false :; do
25118 cat >conf$$subs.sed <<_ACEOF
25119SHELL!$SHELL$ac_delim
25120PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25121PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25122PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25123PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25124PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25125PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25126exec_prefix!$exec_prefix$ac_delim
25127prefix!$prefix$ac_delim
25128program_transform_name!$program_transform_name$ac_delim
25129bindir!$bindir$ac_delim
25130sbindir!$sbindir$ac_delim
25131libexecdir!$libexecdir$ac_delim
25132datarootdir!$datarootdir$ac_delim
25133datadir!$datadir$ac_delim
25134sysconfdir!$sysconfdir$ac_delim
25135sharedstatedir!$sharedstatedir$ac_delim
25136localstatedir!$localstatedir$ac_delim
25137includedir!$includedir$ac_delim
25138oldincludedir!$oldincludedir$ac_delim
25139docdir!$docdir$ac_delim
25140infodir!$infodir$ac_delim
25141htmldir!$htmldir$ac_delim
25142dvidir!$dvidir$ac_delim
25143pdfdir!$pdfdir$ac_delim
25144psdir!$psdir$ac_delim
25145libdir!$libdir$ac_delim
25146localedir!$localedir$ac_delim
25147mandir!$mandir$ac_delim
25148DEFS!$DEFS$ac_delim
25149ECHO_C!$ECHO_C$ac_delim
25150ECHO_N!$ECHO_N$ac_delim
25151ECHO_T!$ECHO_T$ac_delim
25152LIBS!$LIBS$ac_delim
25153build_alias!$build_alias$ac_delim
25154host_alias!$host_alias$ac_delim
25155target_alias!$target_alias$ac_delim
25156MAINT!$MAINT$ac_delim
25157build!$build$ac_delim
25158build_cpu!$build_cpu$ac_delim
25159build_vendor!$build_vendor$ac_delim
25160build_os!$build_os$ac_delim
25161host!$host$ac_delim
25162host_cpu!$host_cpu$ac_delim
25163host_vendor!$host_vendor$ac_delim
25164host_os!$host_os$ac_delim
25165CC!$CC$ac_delim
25166CFLAGS!$CFLAGS$ac_delim
25167LDFLAGS!$LDFLAGS$ac_delim
25168CPPFLAGS!$CPPFLAGS$ac_delim
25169ac_ct_CC!$ac_ct_CC$ac_delim
25170EXEEXT!$EXEEXT$ac_delim
25171OBJEXT!$OBJEXT$ac_delim
25172CPP!$CPP$ac_delim
25173GREP!$GREP$ac_delim
25174EGREP!$EGREP$ac_delim
25175LN_S!$LN_S$ac_delim
25176INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25177INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25178INSTALL_DATA!$INSTALL_DATA$ac_delim
25179RANLIB!$RANLIB$ac_delim
25180INSTALL_INFO!$INSTALL_INFO$ac_delim
25181GZIP_PROG!$GZIP_PROG$ac_delim
25182MAKEINFO!$MAKEINFO$ac_delim
25183LIBSOUND!$LIBSOUND$ac_delim
25184PKG_CONFIG!$PKG_CONFIG$ac_delim
25185ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25186ALSA_LIBS!$ALSA_LIBS$ac_delim
25187CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25188SET_MAKE!$SET_MAKE$ac_delim
25189XMKMF!$XMKMF$ac_delim
25190HAVE_XSERVER!$HAVE_XSERVER$ac_delim
25191RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25192RSVG_LIBS!$RSVG_LIBS$ac_delim
25193GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25194GTK_LIBS!$GTK_LIBS$ac_delim
25195DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25196DBUS_LIBS!$DBUS_LIBS$ac_delim
25197FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25198FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
25199XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25200XFT_LIBS!$XFT_LIBS$ac_delim
25201FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25202FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25203LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25204LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
25205M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25206M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
25207ALLOCA!$ALLOCA$ac_delim
25208liblockfile!$liblockfile$ac_delim
25209LIBOBJS!$LIBOBJS$ac_delim
25210NEED_SETGID!$NEED_SETGID$ac_delim
25211KMEM_GROUP!$KMEM_GROUP$ac_delim
25212GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25213GETOPT_H!$GETOPT_H$ac_delim
25214GETOPTOBJS!$GETOPTOBJS$ac_delim
25215version!$version$ac_delim
25216_ACEOF
25217
25218 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25219 break
25220 elif $ac_last_try; then
25221 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25222echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25223 { (exit 1); exit 1; }; }
25224 else
25225 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25226 fi
25227done
25228
25229ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25230if test -n "$ac_eof"; then
25231 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25232 ac_eof=`expr $ac_eof + 1`
ca81d7a0 25233fi
503d2be0 25234
b0448899
CY
25235cat >>$CONFIG_STATUS <<_ACEOF
25236cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25237/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25238_ACEOF
25239sed '
25240s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25241s/^/s,@/; s/!/@,|#_!!_#|/
25242:n
25243t n
25244s/'"$ac_delim"'$/,g/; t
25245s/$/\\/; p
25246N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25247' >>$CONFIG_STATUS <conf$$subs.sed
25248rm -f conf$$subs.sed
25249cat >>$CONFIG_STATUS <<_ACEOF
25250CEOF$ac_eof
ca81d7a0 25251_ACEOF
503d2be0 25252
ca81d7a0
JD
25253
25254ac_delim='%!_!# '
25255for ac_last_try in false false false false false :; do
b0448899
CY
25256 cat >conf$$subs.sed <<_ACEOF
25257configuration!$configuration$ac_delim
25258canonical!$canonical$ac_delim
25259srcdir!$srcdir$ac_delim
25260lispdir!$lispdir$ac_delim
25261locallisppath!$locallisppath$ac_delim
25262lisppath!$lisppath$ac_delim
25263x_default_search_path!$x_default_search_path$ac_delim
25264etcdir!$etcdir$ac_delim
25265archlibdir!$archlibdir$ac_delim
25266bitmapdir!$bitmapdir$ac_delim
25267gamedir!$gamedir$ac_delim
25268gameuser!$gameuser$ac_delim
25269c_switch_system!$c_switch_system$ac_delim
25270c_switch_machine!$c_switch_machine$ac_delim
25271LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25272LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
25273C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25274X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25275machfile!$machfile$ac_delim
25276opsysfile!$opsysfile$ac_delim
25277ns_appdir!$ns_appdir$ac_delim
25278ns_appbindir!$ns_appbindir$ac_delim
25279ns_appresdir!$ns_appresdir$ac_delim
25280ns_appsrc!$ns_appsrc$ac_delim
25281GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
25282GNUSTEP_SYSTEM_HEADERS!$GNUSTEP_SYSTEM_HEADERS$ac_delim
25283GNUSTEP_SYSTEM_LIBRARIES!$GNUSTEP_SYSTEM_LIBRARIES$ac_delim
25284GNU_OBJC_CFLAGS!$GNU_OBJC_CFLAGS$ac_delim
25285LIB_SRC_EXTRA_INSTALLABLES!$LIB_SRC_EXTRA_INSTALLABLES$ac_delim
25286LTLIBOBJS!$LTLIBOBJS$ac_delim
25287_ACEOF
25288
25289 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
c24fa7dc
MB
25290 break
25291 elif $ac_last_try; then
b0448899
CY
25292 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25293echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
c24fa7dc
MB
25294 { (exit 1); exit 1; }; }
25295 else
25296 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25297 fi
ca81d7a0 25298done
1e0093ea 25299
b0448899
CY
25300ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25301if test -n "$ac_eof"; then
25302 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25303 ac_eof=`expr $ac_eof + 1`
25304fi
ba4481b5 25305
b0448899
CY
25306cat >>$CONFIG_STATUS <<_ACEOF
25307cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25308/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
ca81d7a0 25309_ACEOF
b0448899
CY
25310sed '
25311s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25312s/^/s,@/; s/!/@,|#_!!_#|/
25313:n
25314t n
25315s/'"$ac_delim"'$/,g/; t
25316s/$/\\/; p
25317N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25318' >>$CONFIG_STATUS <conf$$subs.sed
25319rm -f conf$$subs.sed
25320cat >>$CONFIG_STATUS <<_ACEOF
25321:end
25322s/|#_!!_#|//g
25323CEOF$ac_eof
c0d27fcc 25324_ACEOF
ca81d7a0 25325
b0448899 25326
ca81d7a0
JD
25327# VPATH may cause trouble with some makes, so we remove $(srcdir),
25328# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25329# trailing colons and then remove the whole line if VPATH becomes empty
25330# (actually we leave an empty line to preserve line numbers).
25331if test "x$srcdir" = x.; then
25332 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25333s/:*\$(srcdir):*/:/
25334s/:*\${srcdir}:*/:/
25335s/:*@srcdir@:*/:/
25336s/^\([^=]*=[ ]*\):*/\1/
25337s/:*$//
25338s/^[^=]*=[ ]*$//
25339}'
25340fi
25341
b0448899 25342cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25343fi # test -n "$CONFIG_FILES"
25344
25345
b0448899 25346for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
ca81d7a0
JD
25347do
25348 case $ac_tag in
25349 :[FHLC]) ac_mode=$ac_tag; continue;;
25350 esac
25351 case $ac_mode$ac_tag in
25352 :[FHL]*:*);;
b0448899
CY
25353 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25354echo "$as_me: error: Invalid tag $ac_tag." >&2;}
ca81d7a0
JD
25355 { (exit 1); exit 1; }; };;
25356 :[FH]-) ac_tag=-:-;;
25357 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25358 esac
25359 ac_save_IFS=$IFS
25360 IFS=:
25361 set x $ac_tag
25362 IFS=$ac_save_IFS
25363 shift
25364 ac_file=$1
25365 shift
25366
25367 case $ac_mode in
25368 :L) ac_source=$1;;
25369 :[FH])
25370 ac_file_inputs=
25371 for ac_f
25372 do
25373 case $ac_f in
25374 -) ac_f="$tmp/stdin";;
25375 *) # Look for the file first in the build tree, then in the source tree
25376 # (if the path is not absolute). The absolute path cannot be DOS-style,
25377 # because $ac_f cannot contain `:'.
25378 test -f "$ac_f" ||
25379 case $ac_f in
25380 [\\/$]*) false;;
25381 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25382 esac ||
b0448899
CY
25383 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25384echo "$as_me: error: cannot find input file: $ac_f" >&2;}
ca81d7a0
JD
25385 { (exit 1); exit 1; }; };;
25386 esac
b0448899 25387 ac_file_inputs="$ac_file_inputs $ac_f"
ca81d7a0
JD
25388 done
25389
25390 # Let's still pretend it is `configure' which instantiates (i.e., don't
25391 # use $as_me), people would be surprised to read:
25392 # /* config.h. Generated by config.status. */
b0448899
CY
25393 configure_input="Generated from "`IFS=:
25394 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
ca81d7a0
JD
25395 if test x"$ac_file" != x-; then
25396 configure_input="$ac_file. $configure_input"
b0448899
CY
25397 { echo "$as_me:$LINENO: creating $ac_file" >&5
25398echo "$as_me: creating $ac_file" >&6;}
ca81d7a0
JD
25399 fi
25400
25401 case $ac_tag in
b0448899 25402 *:-:* | *:-) cat >"$tmp/stdin";;
ca81d7a0
JD
25403 esac
25404 ;;
ba4481b5
DL
25405 esac
25406
ca81d7a0 25407 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25408$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25409 X"$ac_file" : 'X\(//\)[^/]' \| \
25410 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25411 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
b0448899 25412echo X"$ac_file" |
ca81d7a0
JD
25413 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25414 s//\1/
25415 q
25416 }
25417 /^X\(\/\/\)[^/].*/{
25418 s//\1/
25419 q
25420 }
25421 /^X\(\/\/\)$/{
25422 s//\1/
25423 q
25424 }
25425 /^X\(\/\).*/{
25426 s//\1/
25427 q
25428 }
25429 s/.*/./; q'`
25430 { as_dir="$ac_dir"
25431 case $as_dir in #(
25432 -*) as_dir=./$as_dir;;
25433 esac
25434 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25435 as_dirs=
ca81d7a0
JD
25436 while :; do
25437 case $as_dir in #(
b0448899 25438 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
ca81d7a0
JD
25439 *) as_qdir=$as_dir;;
25440 esac
25441 as_dirs="'$as_qdir' $as_dirs"
25442 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25443$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25444 X"$as_dir" : 'X\(//\)[^/]' \| \
25445 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25446 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
b0448899 25447echo X"$as_dir" |
ca81d7a0
JD
25448 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25449 s//\1/
25450 q
25451 }
25452 /^X\(\/\/\)[^/].*/{
25453 s//\1/
25454 q
25455 }
25456 /^X\(\/\/\)$/{
25457 s//\1/
25458 q
25459 }
25460 /^X\(\/\).*/{
25461 s//\1/
25462 q
25463 }
25464 s/.*/./; q'`
25465 test -d "$as_dir" && break
6bae0ccf 25466 done
ca81d7a0 25467 test -z "$as_dirs" || eval "mkdir $as_dirs"
b0448899
CY
25468 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25469echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25470 { (exit 1); exit 1; }; }; }
c0d27fcc 25471 ac_builddir=.
98418dba 25472
ca81d7a0
JD
25473case "$ac_dir" in
25474.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25475*)
b0448899 25476 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0 25477 # A ".." for each directory in $ac_dir_suffix.
b0448899 25478 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
ca81d7a0
JD
25479 case $ac_top_builddir_sub in
25480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25482 esac ;;
25483esac
25484ac_abs_top_builddir=$ac_pwd
25485ac_abs_builddir=$ac_pwd$ac_dir_suffix
25486# for backward compatibility:
25487ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25488
25489case $srcdir in
ca81d7a0 25490 .) # We are building in place.
c0d27fcc 25491 ac_srcdir=.
ca81d7a0
JD
25492 ac_top_srcdir=$ac_top_builddir_sub
25493 ac_abs_top_srcdir=$ac_pwd ;;
25494 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25495 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25496 ac_top_srcdir=$srcdir
25497 ac_abs_top_srcdir=$srcdir ;;
25498 *) # Relative name.
25499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25500 ac_top_srcdir=$ac_top_build_prefix$srcdir
25501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25502esac
ca81d7a0 25503ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25504
c0d27fcc 25505
ca81d7a0
JD
25506 case $ac_mode in
25507 :F)
25508 #
25509 # CONFIG_FILE
25510 #
ba4481b5 25511
503d2be0
AS
25512 case $INSTALL in
25513 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25514 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25515 esac
ca81d7a0 25516_ACEOF
ba4481b5 25517
b0448899 25518cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25519# If the template does not know about datarootdir, expand it.
25520# FIXME: This hack should be removed a few years after 2.60.
25521ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25522
b0448899 25523case `sed -n '/datarootdir/ {
ca81d7a0
JD
25524 p
25525 q
25526}
25527/@datadir@/p
25528/@docdir@/p
25529/@infodir@/p
25530/@localedir@/p
25531/@mandir@/p
b0448899 25532' $ac_file_inputs` in
ca81d7a0
JD
25533*datarootdir*) ac_datarootdir_seen=yes;;
25534*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
b0448899
CY
25535 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25536echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25537_ACEOF
b0448899 25538cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25539 ac_datarootdir_hack='
25540 s&@datadir@&$datadir&g
25541 s&@docdir@&$docdir&g
25542 s&@infodir@&$infodir&g
25543 s&@localedir@&$localedir&g
25544 s&@mandir@&$mandir&g
25545 s&\\\${datarootdir}&$datarootdir&g' ;;
25546esac
c0d27fcc 25547_ACEOF
ca81d7a0
JD
25548
25549# Neutralize VPATH when `$srcdir' = `.'.
25550# Shell code in configure.ac might set extrasub.
25551# FIXME: do we really want to maintain this feature?
b0448899
CY
25552cat >>$CONFIG_STATUS <<_ACEOF
25553 sed "$ac_vpsub
503d2be0 25554$extrasub
c0d27fcc 25555_ACEOF
b0448899 25556cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25557:t
25558/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b0448899 25559s&@configure_input@&$configure_input&;t t
ca81d7a0
JD
25560s&@top_builddir@&$ac_top_builddir_sub&;t t
25561s&@srcdir@&$ac_srcdir&;t t
25562s&@abs_srcdir@&$ac_abs_srcdir&;t t
25563s&@top_srcdir@&$ac_top_srcdir&;t t
25564s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25565s&@builddir@&$ac_builddir&;t t
25566s&@abs_builddir@&$ac_abs_builddir&;t t
25567s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25568s&@INSTALL@&$ac_INSTALL&;t t
25569$ac_datarootdir_hack
b0448899 25570" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
ca81d7a0
JD
25571
25572test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25573 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25574 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
b0448899 25575 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0 25576which seems to be undefined. Please make sure it is defined." >&5
b0448899 25577echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0
JD
25578which seems to be undefined. Please make sure it is defined." >&2;}
25579
25580 rm -f "$tmp/stdin"
503d2be0 25581 case $ac_file in
b0448899
CY
25582 -) cat "$tmp/out"; rm -f "$tmp/out";;
25583 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
25584 esac
ca81d7a0
JD
25585 ;;
25586 :H)
25587 #
25588 # CONFIG_HEADER
25589 #
b0448899
CY
25590_ACEOF
25591
25592# Transform confdefs.h into a sed script `conftest.defines', that
25593# substitutes the proper values into config.h.in to produce config.h.
25594rm -f conftest.defines conftest.tail
25595# First, append a space to every undef/define line, to ease matching.
25596echo 's/$/ /' >conftest.defines
25597# Then, protect against being on the right side of a sed subst, or in
25598# an unquoted here document, in config.status. If some macros were
25599# called several times there might be several #defines for the same
25600# symbol, which is useless. But do not sort them, since the last
25601# AC_DEFINE must be honored.
25602ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25603# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25604# NAME is the cpp macro being defined, VALUE is the value it is being given.
25605# PARAMS is the parameter list in the macro definition--in most cases, it's
25606# just an empty string.
25607ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25608ac_dB='\\)[ (].*,\\1define\\2'
25609ac_dC=' '
25610ac_dD=' ,'
25611
25612uniq confdefs.h |
25613 sed -n '
25614 t rset
25615 :rset
25616 s/^[ ]*#[ ]*define[ ][ ]*//
25617 t ok
25618 d
25619 :ok
25620 s/[\\&,]/\\&/g
25621 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25622 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25623 ' >>conftest.defines
25624
25625# Remove the space that was appended to ease matching.
25626# Then replace #undef with comments. This is necessary, for
25627# example, in the case of _POSIX_SOURCE, which is predefined and required
25628# on some systems where configure will not decide to define it.
25629# (The regexp can be short, since the line contains either #define or #undef.)
25630echo 's/ $//
25631s,^[ #]*u.*,/* & */,' >>conftest.defines
25632
25633# Break up conftest.defines:
25634ac_max_sed_lines=50
25635
25636# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25637# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25638# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25639# et cetera.
25640ac_in='$ac_file_inputs'
25641ac_out='"$tmp/out1"'
25642ac_nxt='"$tmp/out2"'
25643
25644while :
25645do
25646 # Write a here document:
25647 cat >>$CONFIG_STATUS <<_ACEOF
25648 # First, check the format of the line:
25649 cat >"\$tmp/defines.sed" <<\\CEOF
25650/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25651/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25652b
25653:def
25654_ACEOF
25655 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
25656 echo 'CEOF
25657 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25658 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25659 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25660 grep . conftest.tail >/dev/null || break
25661 rm -f conftest.defines
25662 mv conftest.tail conftest.defines
25663done
25664rm -f conftest.defines conftest.tail
25665
25666echo "ac_result=$ac_in" >>$CONFIG_STATUS
25667cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25668 if test x"$ac_file" != x-; then
b0448899
CY
25669 echo "/* $configure_input */" >"$tmp/config.h"
25670 cat "$ac_result" >>"$tmp/config.h"
25671 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
25672 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25673echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 25674 else
b0448899
CY
25675 rm -f $ac_file
25676 mv "$tmp/config.h" $ac_file
ba4481b5 25677 fi
503d2be0 25678 else
b0448899
CY
25679 echo "/* $configure_input */"
25680 cat "$ac_result"
ba4481b5 25681 fi
b0448899 25682 rm -f "$tmp/out12"
ca81d7a0 25683 ;;
edfaf76d 25684
b0448899
CY
25685 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25686echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
25687 ;;
25688 esac
ba4481b5 25689
c0d27fcc 25690
ca81d7a0
JD
25691 case $ac_file$ac_mode in
25692 "default":C)
ba4481b5
DL
25693
25694### Make the necessary directories, if they don't exist.
25695for dir in etc lisp ; do
25696 test -d ${dir} || mkdir ${dir}
25697done
25698
25699# Build src/Makefile from ${srcdir}/src/Makefile.c
25700# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25701# This must be done after src/config.h is built, since we rely on that file.
25702
ba4481b5 25703echo creating src/epaths.h
4aa6b955 25704${MAKE-make} epaths-force
ba4481b5 25705
1c203d4c
DL
25706# As of 2000-11-19, newest development versions of GNU cpp preprocess
25707# `..' to `. .' unless invoked with -traditional
25708
d0e9bfd2 25709if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25710 CPPFLAGS="$CPPFLAGS -traditional"
25711fi
25712
ba4481b5
DL
25713echo creating lib-src/Makefile
25714( cd lib-src
25715 rm -f junk.c junk1.c junk2.c
25716 sed -e '/start of cpp stuff/q' \
25717 < Makefile.c > junk1.c
25718 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25719 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25720 < Makefile.c > junk.c
8acdcf6f 25721 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25722 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25723 cat junk1.c junk2.c > Makefile.new
25724 rm -f junk.c junk1.c junk2.c
25725 chmod 444 Makefile.new
25726 mv -f Makefile.new Makefile
25727)
25728
25729echo creating src/Makefile
25730( cd src
25731 rm -f junk.c junk1.c junk2.c
25732 sed -e '/start of cpp stuff/q' \
25733 < Makefile.c > junk1.c
25734 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25735 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25736 < Makefile.c > junk.c
8acdcf6f 25737 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25738 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25739 cat junk1.c junk2.c > Makefile.new
25740 rm -f junk.c junk1.c junk2.c
25741 chmod 444 Makefile.new
25742 mv -f Makefile.new Makefile
25743)
25744
503d2be0 25745if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25746 echo creating src/.gdbinit
503d2be0 25747 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25748fi
25749
503d2be0 25750 ;;
ca81d7a0 25751
503d2be0 25752 esac
ca81d7a0 25753done # for ac_tag
503d2be0 25754
ba4481b5 25755
503d2be0 25756{ (exit 0); exit 0; }
c0d27fcc 25757_ACEOF
ba4481b5 25758chmod +x $CONFIG_STATUS
503d2be0
AS
25759ac_clean_files=$ac_clean_files_save
25760
c0d27fcc 25761
503d2be0
AS
25762# configure is writing to config.log, and then calls config.status.
25763# config.status does its own redirection, appending to config.log.
25764# Unfortunately, on DOS this fails, as config.log is still kept open
25765# by configure, so config.status won't be able to write to it; its
25766# output is simply discarded. So we exec the FD to /dev/null,
25767# effectively closing config.log, so it can be properly (re)opened and
25768# appended to by config.status. When coming back to configure, we
25769# need to make the FD available again.
25770if test "$no_create" != yes; then
25771 ac_cs_success=:
19650fd6
AS
25772 ac_config_status_args=
25773 test "$silent" = yes &&
25774 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25775 exec 5>/dev/null
19650fd6 25776 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25777 exec 5>>config.log
25778 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25779 # would make configure fail if this is the last instruction.
25780 $ac_cs_success || { (exit 1); exit 1; }
25781fi
f5f47add 25782
c0d27fcc 25783