*** empty log message ***
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
7bbec45b 3# Generated by GNU Autoconf 2.61 for emacs 23.0.92.
ba4481b5 4#
ca81d7a0 5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7bbec45b 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=:
7bbec45b 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
dc2933eb
JD
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
7bbec45b
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.)
7bbec45b
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
7bbec45b 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.
7bbec45b
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 ||
7bbec45b 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
7bbec45b 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=:
7bbec45b 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=:
7bbec45b 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
7bbec45b
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.
7bbec45b
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" ||
7bbec45b 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
7bbec45b 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
7bbec45b
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'
7bbec45b
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
7bbec45b 532 test -d "$1/.";
f053c89f
CY
533 else
534 case $1 in
7bbec45b 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'
c962d7bf
AS
575PACKAGE_VERSION='23.0.92'
576PACKAGE_STRING='emacs 23.0.92'
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
b0448899
CY
701LIBOTF_CFLAGS
702LIBOTF_LIBS
703M17N_FLT_CFLAGS
704M17N_FLT_LIBS
7bbec45b
CY
705FREETYPE_CFLAGS
706FREETYPE_LIBS
b0448899
CY
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-*)
7bbec45b 860 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 861 # Reject names that are not valid shell variable names.
7bbec45b
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; }; }
7bbec45b
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-*)
7bbec45b 879 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 880 # Reject names that are not valid shell variable names.
7bbec45b
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; }; }
7bbec45b
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-*)
7bbec45b 1076 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1077 # Reject names that are not valid shell variable names.
7bbec45b
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; }; }
7bbec45b
CY
1081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1083
1084 -without-* | --without-*)
7bbec45b 1085 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1086 # Reject names that are not valid shell variable names.
7bbec45b
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; }; }
7bbec45b
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
7bbec45b 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 &&
7bbec45b 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.
7bbec45b 1127 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
503d2be0 1128 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
7bbec45b 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'`
7bbec45b 1138 { echo "$as_me: error: missing argument to $ac_option" >&2
503d2be0 1139 { (exit 1); exit 1; }; }
ba4481b5 1140fi
ba4481b5 1141
7bbec45b 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
7bbec45b 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
7bbec45b 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 .` ||
7bbec45b 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" ||
7bbec45b 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.
7bbec45b
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 .."
7bbec45b 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=`(
7bbec45b 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
c962d7bf 1259\`configure' configures emacs 23.0.92 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
7bbec45b 1281 [$ac_default_prefix]
503d2be0 1282 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
7bbec45b 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:
7bbec45b
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
c962d7bf 1333 short | recursive ) echo "Configuration of emacs 23.0.92:";;
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 1368 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1369 --without-libotf don't use libotf for OpenType font support
1370 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1371 --without-toolkit-scroll-bars
cc227489 1372 don't use Motif or Xaw3d scroll bars
c982cf7d 1373 --without-xaw3d don't use Xaw3d
cc227489 1374 --without-xim don't use X11 XIM
edfda783 1375 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1376 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1377 console
b5a922de 1378 --without-dbus don't compile with D-Bus support
921fbdf0 1379 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1380
00b9c927 1381 --with-pkg-config-prog=PATH
ecd43cb9
GM
1382 path to pkg-config for finding GTK and librsvg
1383 --with-gnustep-conf=PATH
1384 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1385 or /etc/GNUstep/GNUstep.conf
503d2be0
AS
1386 --with-x use the X Window System
1387
1388Some influential environment variables:
1389 CC C compiler command
1390 CFLAGS C compiler flags
1391 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1392 nonstandard directory <lib dir>
f053c89f 1393 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1394 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1395 you have headers in a nonstandard directory <include dir>
503d2be0 1396 CPP C preprocessor
ca81d7a0 1397 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1398
1399Use these variables to override the choices made by `configure' or to help
1400it to find libraries and programs with nonstandard names/locations.
1401
c0d27fcc 1402_ACEOF
ca81d7a0 1403ac_status=$?
503d2be0
AS
1404fi
1405
1406if test "$ac_init_help" = "recursive"; then
1407 # If there are subdirs, report their specific --help.
c0d27fcc 1408 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
7bbec45b 1409 test -d "$ac_dir" || continue
c0d27fcc
MR
1410 ac_builddir=.
1411
ca81d7a0
JD
1412case "$ac_dir" in
1413.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1414*)
7bbec45b 1415 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0 1416 # A ".." for each directory in $ac_dir_suffix.
7bbec45b 1417 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
ca81d7a0
JD
1418 case $ac_top_builddir_sub in
1419 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1420 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1421 esac ;;
1422esac
1423ac_abs_top_builddir=$ac_pwd
1424ac_abs_builddir=$ac_pwd$ac_dir_suffix
1425# for backward compatibility:
1426ac_top_builddir=$ac_top_build_prefix
503d2be0 1427
c0d27fcc 1428case $srcdir in
ca81d7a0 1429 .) # We are building in place.
c0d27fcc 1430 ac_srcdir=.
ca81d7a0
JD
1431 ac_top_srcdir=$ac_top_builddir_sub
1432 ac_abs_top_srcdir=$ac_pwd ;;
1433 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1434 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1435 ac_top_srcdir=$srcdir
1436 ac_abs_top_srcdir=$srcdir ;;
1437 *) # Relative name.
1438 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1439 ac_top_srcdir=$ac_top_build_prefix$srcdir
1440 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1441esac
ca81d7a0
JD
1442ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1443
1444 cd "$ac_dir" || { ac_status=$?; continue; }
1445 # Check for guested configure.
1446 if test -f "$ac_srcdir/configure.gnu"; then
1447 echo &&
1448 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1449 elif test -f "$ac_srcdir/configure"; then
1450 echo &&
1451 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1452 else
7bbec45b 1453 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1454 fi || ac_status=$?
1455 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1456 done
1457fi
1458
ca81d7a0 1459test -n "$ac_init_help" && exit $ac_status
503d2be0 1460if $ac_init_version; then
c0d27fcc 1461 cat <<\_ACEOF
c962d7bf 1462emacs configure 23.0.92
7bbec45b 1463generated by GNU Autoconf 2.61
503d2be0 1464
ca81d7a0 1465Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7bbec45b 14662002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1467This configure script is free software; the Free Software Foundation
1468gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1469_ACEOF
ca81d7a0 1470 exit
503d2be0 1471fi
ca81d7a0 1472cat >config.log <<_ACEOF
503d2be0
AS
1473This file contains any messages produced by compilers while
1474running configure, to aid debugging if configure makes a mistake.
1475
c962d7bf 1476It was created by emacs $as_me 23.0.92, which was
7bbec45b 1477generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1478
1479 $ $0 $@
1480
c0d27fcc 1481_ACEOF
ca81d7a0 1482exec 5>>config.log
503d2be0
AS
1483{
1484cat <<_ASUNAME
c0d27fcc
MR
1485## --------- ##
1486## Platform. ##
1487## --------- ##
503d2be0
AS
1488
1489hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1490uname -m = `(uname -m) 2>/dev/null || echo unknown`
1491uname -r = `(uname -r) 2>/dev/null || echo unknown`
1492uname -s = `(uname -s) 2>/dev/null || echo unknown`
1493uname -v = `(uname -v) 2>/dev/null || echo unknown`
1494
1495/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1496/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1497
1498/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1499/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1500/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1501/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1502/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1503/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1504/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1505
925c2f3f 1506_ASUNAME
c0d27fcc
MR
1507
1508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509for as_dir in $PATH
1510do
1511 IFS=$as_save_IFS
1512 test -z "$as_dir" && as_dir=.
7bbec45b 1513 echo "PATH: $as_dir"
c0d27fcc 1514done
ca81d7a0 1515IFS=$as_save_IFS
c0d27fcc 1516
503d2be0
AS
1517} >&5
1518
c0d27fcc
MR
1519cat >&5 <<_ACEOF
1520
1521
1522## ----------- ##
1523## Core tests. ##
1524## ----------- ##
1525
1526_ACEOF
503d2be0 1527
503d2be0
AS
1528
1529# Keep a trace of the command line.
1530# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1531# Strip out --silent because we don't want to record it for future runs.
503d2be0 1532# Also quote any args containing shell meta-characters.
19650fd6 1533# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1534ac_configure_args=
19650fd6
AS
1535ac_configure_args0=
1536ac_configure_args1=
19650fd6
AS
1537ac_must_keep_next=false
1538for ac_pass in 1 2
503d2be0 1539do
19650fd6
AS
1540 for ac_arg
1541 do
1542 case $ac_arg in
1543 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1544 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1545 | -silent | --silent | --silen | --sile | --sil)
1546 continue ;;
ca81d7a0 1547 *\'*)
7bbec45b 1548 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19650fd6
AS
1549 esac
1550 case $ac_pass in
1551 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1552 2)
1553 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1554 if test $ac_must_keep_next = true; then
edfaf76d 1555 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1556 else
edfaf76d
LK
1557 case $ac_arg in
1558 *=* | --config-cache | -C | -disable-* | --disable-* \
1559 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1560 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1561 | -with-* | --with-* | -without-* | --without-* | --x)
1562 case "$ac_configure_args0 " in
1563 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1564 esac
1565 ;;
1566 -* ) ac_must_keep_next=true ;;
1567 esac
19650fd6 1568 fi
ca81d7a0 1569 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1570 ;;
1571 esac
1572 done
503d2be0 1573done
19650fd6
AS
1574$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1575$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1576
1577# When interrupted or exit'd, cleanup temporary files, and complete
1578# config.log. We remove comments because anyway the quotes in there
1579# would cause problems or look ugly.
ca81d7a0
JD
1580# WARNING: Use '\'' to represent an apostrophe within the trap.
1581# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1582trap 'exit_status=$?
1583 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1584 {
1585 echo
6bae0ccf 1586
c0d27fcc
MR
1587 cat <<\_ASBOX
1588## ---------------- ##
1589## Cache variables. ##
1590## ---------------- ##
1591_ASBOX
1592 echo
1593 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1594(
1595 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1596 eval ac_val=\$$ac_var
1597 case $ac_val in #(
1598 *${as_nl}*)
1599 case $ac_var in #(
7bbec45b
CY
1600 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1601echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
ca81d7a0
JD
1602 esac
1603 case $ac_var in #(
1604 _ | IFS | as_nl) ;; #(
1605 *) $as_unset $ac_var ;;
1606 esac ;;
1607 esac
1608 done
503d2be0 1609 (set) 2>&1 |
ca81d7a0
JD
1610 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1611 *${as_nl}ac_space=\ *)
503d2be0 1612 sed -n \
ca81d7a0
JD
1613 "s/'\''/'\''\\\\'\'''\''/g;
1614 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1615 ;; #(
503d2be0 1616 *)
ca81d7a0 1617 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1618 ;;
ca81d7a0
JD
1619 esac |
1620 sort
1621)
c0d27fcc 1622 echo
6bae0ccf
DL
1623
1624 cat <<\_ASBOX
1625## ----------------- ##
1626## Output variables. ##
1627## ----------------- ##
1628_ASBOX
1629 echo
1630 for ac_var in $ac_subst_vars
1631 do
ca81d7a0
JD
1632 eval ac_val=\$$ac_var
1633 case $ac_val in
7bbec45b 1634 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ca81d7a0 1635 esac
7bbec45b 1636 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1637 done | sort
1638 echo
1639
1640 if test -n "$ac_subst_files"; then
1641 cat <<\_ASBOX
ca81d7a0
JD
1642## ------------------- ##
1643## File substitutions. ##
1644## ------------------- ##
6bae0ccf
DL
1645_ASBOX
1646 echo
1647 for ac_var in $ac_subst_files
1648 do
ca81d7a0
JD
1649 eval ac_val=\$$ac_var
1650 case $ac_val in
7bbec45b 1651 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ca81d7a0 1652 esac
7bbec45b 1653 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1654 done | sort
1655 echo
1656 fi
1657
c0d27fcc
MR
1658 if test -s confdefs.h; then
1659 cat <<\_ASBOX
1660## ----------- ##
1661## confdefs.h. ##
1662## ----------- ##
1663_ASBOX
1664 echo
ca81d7a0 1665 cat confdefs.h
c0d27fcc
MR
1666 echo
1667 fi
1668 test "$ac_signal" != 0 &&
7bbec45b
CY
1669 echo "$as_me: caught signal $ac_signal"
1670 echo "$as_me: exit $exit_status"
c0d27fcc 1671 } >&5
ca81d7a0
JD
1672 rm -f core *.core core.conftest.* &&
1673 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1674 exit $exit_status
ca81d7a0 1675' 0
503d2be0
AS
1676for ac_signal in 1 2 13 15; do
1677 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1678done
1679ac_signal=0
1680
1681# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1682rm -f -r conftest* confdefs.h
ba4481b5 1683
c0d27fcc
MR
1684# Predefined preprocessor variables.
1685
1686cat >>confdefs.h <<_ACEOF
1687#define PACKAGE_NAME "$PACKAGE_NAME"
1688_ACEOF
1689
1690
1691cat >>confdefs.h <<_ACEOF
1692#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1693_ACEOF
1694
1695
1696cat >>confdefs.h <<_ACEOF
1697#define PACKAGE_VERSION "$PACKAGE_VERSION"
1698_ACEOF
1699
1700
1701cat >>confdefs.h <<_ACEOF
1702#define PACKAGE_STRING "$PACKAGE_STRING"
1703_ACEOF
1704
1705
1706cat >>confdefs.h <<_ACEOF
1707#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1708_ACEOF
1709
1710
503d2be0 1711# Let the site file select an alternate cache file if it wants to.
7bbec45b 1712# Prefer explicitly selected file to automatically selected ones.
ca81d7a0 1713if test -n "$CONFIG_SITE"; then
7bbec45b 1714 set x "$CONFIG_SITE"
ca81d7a0 1715elif test "x$prefix" != xNONE; then
7bbec45b 1716 set x "$prefix/share/config.site" "$prefix/etc/config.site"
ca81d7a0 1717else
7bbec45b
CY
1718 set x "$ac_default_prefix/share/config.site" \
1719 "$ac_default_prefix/etc/config.site"
ba4481b5 1720fi
7bbec45b
CY
1721shift
1722for ac_site_file
ca81d7a0 1723do
ba4481b5 1724 if test -r "$ac_site_file"; then
7bbec45b
CY
1725 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1726echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1727 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1728 . "$ac_site_file"
1729 fi
1730done
1731
1732if test -r "$cache_file"; then
503d2be0
AS
1733 # Some versions of bash will fail to source /dev/null (special
1734 # files actually), so we avoid doing that.
1735 if test -f "$cache_file"; then
7bbec45b
CY
1736 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1737echo "$as_me: loading cache $cache_file" >&6;}
503d2be0 1738 case $cache_file in
ca81d7a0
JD
1739 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1740 *) . "./$cache_file";;
503d2be0
AS
1741 esac
1742 fi
ba4481b5 1743else
7bbec45b
CY
1744 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1745echo "$as_me: creating cache $cache_file" >&6;}
503d2be0
AS
1746 >$cache_file
1747fi
1748
f053c89f
CY
1749ac_header_list="$ac_header_list sys/time.h"
1750ac_header_list="$ac_header_list unistd.h"
1751ac_func_list="$ac_func_list alarm"
503d2be0
AS
1752# Check that the precious variables saved in the cache have kept the same
1753# value.
1754ac_cache_corrupted=false
ca81d7a0 1755for ac_var in $ac_precious_vars; do
503d2be0
AS
1756 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1757 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1758 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1759 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1760 case $ac_old_set,$ac_new_set in
1761 set,)
7bbec45b
CY
1762 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1763echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
503d2be0
AS
1764 ac_cache_corrupted=: ;;
1765 ,set)
7bbec45b
CY
1766 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1767echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
503d2be0
AS
1768 ac_cache_corrupted=: ;;
1769 ,);;
1770 *)
1771 if test "x$ac_old_val" != "x$ac_new_val"; then
7bbec45b
CY
1772 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1773echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1774 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1775echo "$as_me: former value: $ac_old_val" >&2;}
1776 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1777echo "$as_me: current value: $ac_new_val" >&2;}
1778 ac_cache_corrupted=:
503d2be0
AS
1779 fi;;
1780 esac
c0d27fcc 1781 # Pass precious variables to config.status.
503d2be0
AS
1782 if test "$ac_new_set" = set; then
1783 case $ac_new_val in
7bbec45b 1784 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1785 *) ac_arg=$ac_var=$ac_new_val ;;
1786 esac
1787 case " $ac_configure_args " in
1788 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1789 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1790 esac
1791 fi
1792done
1793if $ac_cache_corrupted; then
7bbec45b
CY
1794 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1795echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1796 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1797echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
503d2be0 1798 { (exit 1); exit 1; }; }
ba4481b5
DL
1799fi
1800
c0d27fcc
MR
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
9cf8f393
JD
1812
1813
1814
1815
1816
1817
1818
1819
c0d27fcc
MR
1820
1821
1822
1823
1824
ca81d7a0
JD
1825ac_ext=c
1826ac_cpp='$CPP $CPPFLAGS'
1827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1829ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1830
6bae0ccf 1831
ca81d7a0 1832ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1833
c0d27fcc 1834
9fb1ba80 1835
ba5da88a 1836test "$program_prefix" != NONE &&
ca81d7a0 1837 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1838# Use a double $ so make ignores it.
1839test "$program_suffix" != NONE &&
ca81d7a0 1840 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
7bbec45b 1841# Double any \ or $. echo might interpret backslashes.
ba5da88a 1842# By default was `s,x,x', remove it if useless.
7bbec45b
CY
1843cat <<\_ACEOF >conftest.sed
1844s/[\\$]/&&/g;s/;s,x,x,$//
1845_ACEOF
1846program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1847rm -f conftest.sed
ba5da88a 1848
c0d27fcc 1849
ba4481b5
DL
1850lispdir='${datadir}/emacs/${version}/lisp'
1851locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1852'${datadir}/emacs/site-lisp'
1853lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1854etcdir='${datadir}/emacs/${version}/etc'
1855archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1856docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1857gamedir='${localstatedir}/games/emacs'
98418dba
CW
1858
1859gameuser=games
1860
c0d27fcc 1861
49adb60f 1862
00b9c927 1863
ca81d7a0 1864# Check whether --with-pop was given.
ba4481b5 1865if test "${with_pop+set}" = set; then
00b9c927 1866 withval=$with_pop;
3d9fec71 1867else
00b9c927
MO
1868 with_pop=yes
1869fi
1870
1871if test "$with_pop" = yes; then
1872 cat >>confdefs.h <<\_ACEOF
3d9fec71 1873#define MAIL_USE_POP 1
c0d27fcc 1874_ACEOF
3d9fec71 1875
ca81d7a0 1876fi
ba4481b5 1877
c0d27fcc 1878
c0d27fcc 1879
ca81d7a0 1880# Check whether --with-kerberos was given.
a21616bd 1881if test "${with_kerberos+set}" = set; then
00b9c927
MO
1882 withval=$with_kerberos;
1883else
1884 with_kerberos=no
1885fi
1886
ff1095d1 1887if test "$with_kerberos" != no; then
54e6585f 1888 cat >>confdefs.h <<\_ACEOF
a21616bd 1889#define KERBEROS 1
c0d27fcc 1890_ACEOF
a21616bd 1891
ca81d7a0 1892fi
c0d27fcc 1893
c0d27fcc 1894
49adb60f 1895
ca81d7a0 1896# Check whether --with-kerberos5 was given.
a21616bd 1897if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1898 withval=$with_kerberos5;
1899else
1900 with_kerberos5=no
1901fi
1902
ff1095d1
AR
1903if test "${with_kerberos5}" != no; then
1904 if test "${with_kerberos}" = no; then
a21616bd 1905 with_kerberos=yes
c0d27fcc 1906 cat >>confdefs.h <<\_ACEOF
a21616bd 1907#define KERBEROS 1
c0d27fcc 1908_ACEOF
a21616bd
KR
1909
1910 fi
b936fae4 1911
c0d27fcc 1912cat >>confdefs.h <<\_ACEOF
a21616bd 1913#define KERBEROS5 1
c0d27fcc 1914_ACEOF
a21616bd 1915
ca81d7a0 1916fi
b936fae4 1917
49adb60f 1918
ca81d7a0
JD
1919# Check whether --with-hesiod was given.
1920if test "${with_hesiod+set}" = set; then
00b9c927
MO
1921 withval=$with_hesiod;
1922else
1923 with_hesiod=no
1924fi
1925
ff1095d1 1926if test "$with_hesiod" != no; then
54e6585f 1927
c0d27fcc 1928cat >>confdefs.h <<\_ACEOF
ba4481b5 1929#define HESIOD 1
c0d27fcc 1930_ACEOF
ba4481b5 1931
ca81d7a0 1932fi
c0d27fcc 1933
c0d27fcc 1934
ca81d7a0 1935# Check whether --with-sound was given.
2c9dccc9 1936if test "${with_sound+set}" = set; then
ca81d7a0 1937 withval=$with_sound;
00b9c927
MO
1938else
1939 with_sound=yes
ca81d7a0 1940fi
2c9dccc9 1941
2c9dccc9 1942
c0d27fcc 1943
a51f4969
SM
1944# Check whether --with-sync-input was given.
1945if test "${with_sync_input+set}" = set; then
1946 withval=$with_sync_input;
1947else
1948 with_sync_input=yes
1949fi
1950
1951if test "$with_sync_input" = yes; then
1952
1953cat >>confdefs.h <<\_ACEOF
1954#define SYNC_INPUT 1
1955_ACEOF
1956
1957fi
1958
1959
ca81d7a0 1960# Check whether --with-x-toolkit was given.
ba4481b5 1961if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1962 withval=$with_x_toolkit; case "${withval}" in
089a966d 1963 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1964 n | no ) val=no ;;
1965 l | lu | luc | luci | lucid ) val=lucid ;;
1966 a | at | ath | athe | athen | athena ) val=athena ;;
1967 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1968 g | gt | gtk ) val=gtk ;;
ba4481b5 1969 * )
7bbec45b 1970{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1971this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1972\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
7bbec45b 1973echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1974this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1975\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1976 { (exit 1); exit 1; }; }
ba4481b5
DL
1977 ;;
1978 esac
1979 with_x_toolkit=$val
1980
ca81d7a0 1981fi
8eeae1c9 1982
ba4481b5 1983
49adb60f 1984
ca81d7a0 1985# Check whether --with-xpm was given.
ba4481b5 1986if test "${with_xpm+set}" = set; then
ca81d7a0 1987 withval=$with_xpm;
00b9c927 1988else
c8467c40 1989 with_xpm=yes
ca81d7a0 1990fi
503d2be0 1991
ba4481b5 1992
ca81d7a0 1993# Check whether --with-jpeg was given.
ba4481b5 1994if test "${with_jpeg+set}" = set; then
ca81d7a0 1995 withval=$with_jpeg;
00b9c927 1996else
c8467c40 1997 with_jpeg=yes
ca81d7a0 1998fi
503d2be0 1999
ba4481b5 2000
ca81d7a0 2001# Check whether --with-tiff was given.
ba4481b5 2002if test "${with_tiff+set}" = set; then
ca81d7a0 2003 withval=$with_tiff;
00b9c927 2004else
c8467c40 2005 with_tiff=yes
ca81d7a0 2006fi
503d2be0 2007
ba4481b5 2008
ca81d7a0 2009# Check whether --with-gif was given.
ba4481b5 2010if test "${with_gif+set}" = set; then
ca81d7a0 2011 withval=$with_gif;
00b9c927 2012else
c8467c40 2013 with_gif=yes
ca81d7a0 2014fi
503d2be0 2015
ba4481b5 2016
ca81d7a0 2017# Check whether --with-png was given.
ba4481b5 2018if test "${with_png+set}" = set; then
ca81d7a0 2019 withval=$with_png;
00b9c927 2020else
c8467c40 2021 with_png=yes
ca81d7a0 2022fi
503d2be0 2023
ba4481b5 2024
0cfc0546
GM
2025# Check whether --with-rsvg was given.
2026if test "${with_rsvg+set}" = set; then
2027 withval=$with_rsvg;
00b9c927 2028else
c8467c40 2029 with_rsvg=yes
0cfc0546
GM
2030fi
2031
2032
c8467c40 2033
c24fa7dc 2034# Check whether --with-xft was given.
45a4b03e 2035if test "${with_xft+set}" = set; then
c24fa7dc 2036 withval=$with_xft;
d235ca2f 2037else
4efcc8d1 2038 with_xft=yes
c24fa7dc 2039fi
45a4b03e 2040
45a4b03e 2041
d235ca2f
MB
2042# Check whether --with-libotf was given.
2043if test "${with_libotf+set}" = set; then
2044 withval=$with_libotf;
2045else
2046 with_libotf=yes
79011b82
NR
2047fi
2048
2049
d235ca2f
MB
2050# Check whether --with-m17n-flt was given.
2051if test "${with_m17n_flt+set}" = set; then
2052 withval=$with_m17n_flt;
2053else
2054 with_m17n_flt=yes
0cfc0546
GM
2055fi
2056
2057
d235ca2f 2058
ca81d7a0 2059# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2060if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2061 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2062else
2063 with_toolkit_scroll_bars=yes
ca81d7a0 2064fi
503d2be0 2065
ba4481b5 2066
e35a28cd
TTN
2067# Check whether --with-xaw3d was given.
2068if test "${with_xaw3d+set}" = set; then
2069 withval=$with_xaw3d;
00b9c927
MO
2070else
2071 with_xaw3d=yes
c982cf7d
JD
2072fi
2073
2074
ca81d7a0 2075# Check whether --with-xim was given.
1d36487c 2076if test "${with_xim+set}" = set; then
ca81d7a0 2077 withval=$with_xim;
00b9c927
MO
2078else
2079 with_xim=yes
ca81d7a0 2080fi
1d36487c 2081
ba4481b5 2082
edfda783
AR
2083# Check whether --with-ns was given.
2084if test "${with_ns+set}" = set; then
2085 withval=$with_ns;
2086else
2087 with_ns=no
2088fi
2089
2090
c8467c40
GM
2091
2092# Check whether --with-gpm was given.
2093if test "${with_gpm+set}" = set; then
2094 withval=$with_gpm;
2095else
2096 with_gpm=yes
ca81d7a0 2097fi
e0f712ba 2098
49adb60f 2099
131e4133
MA
2100# Check whether --with-dbus was given.
2101if test "${with_dbus+set}" = set; then
2102 withval=$with_dbus;
00b9c927 2103else
b5a922de 2104 with_dbus=yes
131e4133
MA
2105fi
2106
2107
921fbdf0
GM
2108## For the times when you want to build Emacs but don't have
2109## a suitable makeinfo, and can live without the manuals.
2110
2111# Check whether --with-makeinfo was given.
2112if test "${with_makeinfo+set}" = set; then
2113 withval=$with_makeinfo;
2114else
2115 with_makeinfo=yes
2116fi
2117
2118
e70b2110 2119
9d2818d6
DN
2120# Check whether --with-gtk was given.
2121if test "${with_gtk+set}" = set; then
7bbec45b 2122 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
9d2818d6 2123specify a toolkit." >&5
7bbec45b 2124echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
9d2818d6
DN
2125specify a toolkit." >&2;}
2126 { (exit 1); exit 1; }; }
2127fi
2128
2129
2130
2131# Check whether --with-gcc was given.
2132if test "${with_gcc+set}" = set; then
7bbec45b 2133 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2134variable to specify a compiler." >&5
7bbec45b 2135echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2136variable to specify a compiler." >&2;}
9d2818d6
DN
2137 { (exit 1); exit 1; }; }
2138fi
2139
2140
2141
00b9c927
MO
2142# Check whether --with-pkg-config-prog was given.
2143if test "${with_pkg_config_prog+set}" = set; then
2144 withval=$with_pkg_config_prog;
e70b2110
KH
2145fi
2146
00b9c927
MO
2147if test "X${with_pkg_config_prog}" != X; then
2148 if test "${with_pkg_config_prog}" != yes; then
2149 PKG_CONFIG="${with_pkg_config_prog}"
2150 fi
2151fi
e70b2110 2152
ecd43cb9
GM
2153
2154# Check whether --with-gnustep-conf was given.
2155if test "${with_gnustep_conf+set}" = set; then
2156 withval=$with_gnustep_conf;
2157fi
2158
2159test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2160 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2161test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2162 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
2163
06b62770
AR
2164# Check whether --enable-ns-self-contained was given.
2165if test "${enable_ns_self_contained+set}" = set; then
6b8bc489 2166 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
06b62770
AR
2167else
2168 EN_NS_SELF_CONTAINED=yes
2169fi
2170
2171
c24fa7dc 2172# Check whether --enable-asserts was given.
d0098f13 2173if test "${enable_asserts+set}" = set; then
ca81d7a0 2174 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2175else
2176 USE_XASSERTS=no
ca81d7a0 2177fi
8eeae1c9 2178
d0098f13 2179
ca81d7a0 2180# Check whether --enable-maintainer-mode was given.
19650fd6 2181if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2182 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2183else
2184 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2185fi
2186
19650fd6
AS
2187if test $USE_MAINTAINER_MODE = yes; then
2188 MAINT=
2189else
2190 MAINT=#
2191fi
2192
2193
ca81d7a0 2194# Check whether --enable-locallisppath was given.
9adfabc2 2195if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2196 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2197 locallisppath=
2198elif test "${enableval}" != "yes"; then
2199 locallisppath=${enableval}
2200fi
ca81d7a0
JD
2201fi
2202
9adfabc2 2203
ba4481b5 2204#### Make srcdir absolute, if it isn't already. It's important to
17494071 2205#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2206#### give you automounter prefixes, which can go away. We do all this
2207#### so Emacs can find its files when run uninstalled.
17494071
GM
2208## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2209unset CDPATH
ba4481b5
DL
2210case "${srcdir}" in
2211 /* ) ;;
2212 . )
2213 ## We may be able to use the $PWD environment variable to make this
2214 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2215 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2216 ## but that tested only for a well-formed and valid PWD,
2217 ## it did not object when PWD was well-formed and valid but just wrong.
2218 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2219 then
2220 srcdir="$PWD"
2221 else
2222 srcdir="`(cd ${srcdir}; pwd)`"
2223 fi
2224 ;;
2225 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2226esac
2227
2228#### Check if the source directory already has a configured system in it.
2229if test `pwd` != `(cd ${srcdir} && pwd)` \
2230 && test -f "${srcdir}/src/config.h" ; then
7bbec45b 2231 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2232 as a build directory right now; it has been configured in its own
2233 right. To configure in another directory as well, you MUST
2234 use GNU make. If you do not have GNU make, then you must
2235 now do \`make distclean' in ${srcdir},
2236 and then run $0 again." >&5
7bbec45b 2237echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2238 as a build directory right now; it has been configured in its own
2239 right. To configure in another directory as well, you MUST
2240 use GNU make. If you do not have GNU make, then you must
2241 now do \`make distclean' in ${srcdir},
503d2be0 2242 and then run $0 again." >&2;}
ba4481b5
DL
2243fi
2244
2245#### Given the configuration name, set machfile and opsysfile to the
2246#### names of the m/*.h and s/*.h files we should use.
2247
2248### Canonicalize the configuration name.
2249
2250ac_aux_dir=
ca81d7a0
JD
2251for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2252 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2253 ac_aux_dir=$ac_dir
2254 ac_install_sh="$ac_aux_dir/install-sh -c"
2255 break
ca81d7a0 2256 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2257 ac_aux_dir=$ac_dir
2258 ac_install_sh="$ac_aux_dir/install.sh -c"
2259 break
ca81d7a0 2260 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2261 ac_aux_dir=$ac_dir
2262 ac_install_sh="$ac_aux_dir/shtool install -c"
2263 break
ba4481b5
DL
2264 fi
2265done
2266if test -z "$ac_aux_dir"; then
7bbec45b
CY
2267 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2268echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2269 { (exit 1); exit 1; }; }
ba4481b5 2270fi
ca81d7a0
JD
2271
2272# These three variables are undocumented and unsupported,
2273# and are intended to be withdrawn in a future Autoconf release.
2274# They can cause serious problems if a builder's source tree is in a directory
2275# whose full name contains unusual characters.
2276ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2277ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2278ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2279
ba4481b5
DL
2280
2281# Make sure we can run config.sub.
ca81d7a0 2282$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
7bbec45b
CY
2283 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2284echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2285 { (exit 1); exit 1; }; }
2286
7bbec45b
CY
2287{ echo "$as_me:$LINENO: checking build system type" >&5
2288echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0 2289if test "${ac_cv_build+set}" = set; then
7bbec45b 2290 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 2291else
ca81d7a0
JD
2292 ac_build_alias=$build_alias
2293test "x$ac_build_alias" = x &&
2294 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2295test "x$ac_build_alias" = x &&
7bbec45b
CY
2296 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2297echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
503d2be0 2298 { (exit 1); exit 1; }; }
ca81d7a0 2299ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
7bbec45b
CY
2300 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2301echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2302 { (exit 1); exit 1; }; }
2303
2304fi
7bbec45b
CY
2305{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2306echo "${ECHO_T}$ac_cv_build" >&6; }
ca81d7a0
JD
2307case $ac_cv_build in
2308*-*-*) ;;
7bbec45b
CY
2309*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2310echo "$as_me: error: invalid value of canonical build" >&2;}
ca81d7a0
JD
2311 { (exit 1); exit 1; }; };;
2312esac
503d2be0 2313build=$ac_cv_build
ca81d7a0
JD
2314ac_save_IFS=$IFS; IFS='-'
2315set x $ac_cv_build
2316shift
2317build_cpu=$1
2318build_vendor=$2
2319shift; shift
2320# Remember, the first character of IFS is used to create $*,
2321# except with old shells:
2322build_os=$*
2323IFS=$ac_save_IFS
2324case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2325
2326
7bbec45b
CY
2327{ echo "$as_me:$LINENO: checking host system type" >&5
2328echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0 2329if test "${ac_cv_host+set}" = set; then
7bbec45b 2330 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 2331else
ca81d7a0
JD
2332 if test "x$host_alias" = x; then
2333 ac_cv_host=$ac_cv_build
2334else
2335 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
7bbec45b
CY
2336 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2337echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2338 { (exit 1); exit 1; }; }
ca81d7a0 2339fi
503d2be0
AS
2340
2341fi
7bbec45b
CY
2342{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2343echo "${ECHO_T}$ac_cv_host" >&6; }
ca81d7a0
JD
2344case $ac_cv_host in
2345*-*-*) ;;
7bbec45b
CY
2346*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2347echo "$as_me: error: invalid value of canonical host" >&2;}
ca81d7a0
JD
2348 { (exit 1); exit 1; }; };;
2349esac
503d2be0 2350host=$ac_cv_host
ca81d7a0
JD
2351ac_save_IFS=$IFS; IFS='-'
2352set x $ac_cv_host
2353shift
2354host_cpu=$1
2355host_vendor=$2
2356shift; shift
2357# Remember, the first character of IFS is used to create $*,
2358# except with old shells:
2359host_os=$*
2360IFS=$ac_save_IFS
2361case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2362
c0d27fcc 2363
ba4481b5 2364canonical=$host
1770dcdc 2365configuration=${host_alias-${build_alias-$host}}
ba4481b5 2366
c0d27fcc 2367
22044edf 2368
ba4481b5
DL
2369### If you add support for a new configuration, add code to this
2370### switch statement to recognize your configuration name and select
2371### the appropriate operating system and machine description files.
2372
2373### You would hope that you could choose an m/*.h file pretty much
2374### based on the machine portion of the configuration name, and an s-
2375### file based on the operating system portion. However, it turns out
2376### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2377### example mips.h is MIPS
2378### So we basically have to have a special case for each
ba4481b5
DL
2379### configuration name.
2380###
2381### As far as handling version numbers on operating systems is
2382### concerned, make sure things will fail in a fixable way. If
2383### /etc/MACHINES doesn't say anything about version numbers, be
2384### prepared to handle anything reasonably. If version numbers
2385### matter, be sure /etc/MACHINES says something about it.
2386###
2387### Eric Raymond says we should accept strings like "sysvr4" to mean
2388### "System V Release 4"; he writes, "The old convention encouraged
2389### confusion between `system' and `release' levels'."
2390
2391machine='' opsys='' unported=no
2392case "${canonical}" in
2393
1096bcc0 2394 ## FreeBSD ports
6b0273cd 2395 *-*-freebsd* )
1096bcc0
GM
2396 opsys=freebsd
2397 case "${canonical}" in
2398 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2399 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2400 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2401 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2402 sparc64-*-freebsd*) machine=sparc ;;
2403 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2404 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2405 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2406 esac
2407 ;;
2408
1b275743
GM
2409 ## FreeBSD kernel + glibc based userland
2410 *-*-kfreebsd*gnu* )
2411 opsys=gnu-kfreebsd
2412 case "${canonical}" in
2413 alpha*-*-kfreebsd*) machine=alpha ;;
2414 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2415 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2416 sparc64-*-kfreebsd*) machine=sparc ;;
2417 powerpc-*-kfreebsd*) machine=macppc ;;
2418 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2419 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2420 esac
2421 ;;
2422
ba4481b5
DL
2423 ## NetBSD ports
2424 *-*-netbsd* )
2425 opsys=netbsd
dd038e26 2426 if test -f /usr/lib/crti.o; then
f57bd967
DL
2427
2428cat >>confdefs.h <<\_ACEOF
7bbec45b 2429#define HAVE_CRTIN
dd038e26
AS
2430_ACEOF
2431
2432 fi
2433
ba4481b5
DL
2434 case "${canonical}" in
2435 alpha*-*-netbsd*) machine=alpha ;;
2436 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2437 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2438 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2439 vax-*-netbsd*) machine=vax ;;
2df636f4 2440 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2441 x86_64-*-netbsd*) machine=amdx86-64 ;;
2442 hppa-*-netbsd*) machine=hp800 ;;
a078d6e5 2443 m68k-*-netbsd*) machine=m68k ;;
ba4481b5
DL
2444 esac
2445 ;;
2446
2447 ## OpenBSD ports
2448 *-*-openbsd* )
2449 opsys=openbsd
2450 case "${canonical}" in
2451 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2452 arm-*-openbsd*) machine=arm ;;
85410b02 2453 i386-*-openbsd*) machine=intel386 ;;
85410b02 2454 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2455 sparc*-*-openbsd*) machine=sparc ;;
2456 vax-*-openbsd*) machine=vax ;;
2457 x86_64-*-openbsd*) machine=amdx86-64 ;;
8bff6137 2458 hppa-*-openbsd*) machine=hp800 ;;
ba4481b5
DL
2459 esac
2460 ;;
2461
10a3b1a1
EZ
2462 ## LynxOS ports
2463 *-*-lynxos* )
2464 opsys=lynxos
2465 case "${canonical}" in
2466 i[3456]86-*-lynxos*) machine=intel386 ;;
2467 powerpc-*-lynxos*) machine=powerpc ;;
2468 esac
2469 ;;
2470
ba4481b5
DL
2471 alpha*-*-linux-gnu* )
2472 machine=alpha opsys=gnu-linux
2473 ;;
2474
c4bb2108
DL
2475 arm*-*-linux-gnu* )
2476 machine=arm opsys=gnu-linux
2477 ;;
2478
040c474e
CY
2479 ## Apple Darwin / Mac OS X
2480 *-apple-darwin* )
2481 case "${canonical}" in
2482 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2483 powerpc-* ) machine=macppc ;;
040c474e
CY
2484 * ) unported=yes ;;
2485 esac
2486 opsys=darwin
2487 # Define CPP as follows to make autoconf work correctly.
2488 CPP="${CC-cc} -E -no-cpp-precomp"
2489 # Use fink packages if available.
2490 if test -d /sw/include && test -d /sw/lib; then
2491 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2492 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2493 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2494 fi
2495 ;;
2496
6fbb6db1 2497 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2498 hppa*-hp-hpux10.2* )
2499 machine=hp800 opsys=hpux10-20
2500 ;;
6fbb6db1
GM
2501 hppa*-hp-hpux1[1-9]* )
2502 machine=hp800 opsys=hpux11
2503 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2504 ;;
2505
409d9577
GM
2506 hppa*-*-linux-gnu* )
2507 machine=hp800 opsys=gnu-linux
2508 ;;
2509
ba4481b5 2510 ## IBM machines
55597d70 2511 s390-*-linux-gnu* )
138f0859
GM
2512 machine=ibms390 opsys=gnu-linux
2513 ;;
bcdb1378
EZ
2514 s390x-*-linux-gnu* )
2515 machine=ibms390x opsys=gnu-linux
2516 ;;
ba4481b5
DL
2517 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2518 machine=ibmrs6000 opsys=aix4-2
2519 ;;
67bf991b
CY
2520 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2521 machine=ibmrs6000 opsys=aix4-2
2522 ;;
55597d70 2523 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2524 machine=ibmrs6000 opsys=aix4-2
2525 ;;
1e447232 2526 rs6000-ibm-aix6* | powerpc-ibm-aix6* )
26a42dac
DN
2527 machine=ibmrs6000 opsys=aix4-2
2528 ;;
ba4481b5 2529
c76e04a8
GM
2530 ## Macintosh PowerPC
2531 powerpc*-*-linux-gnu* )
2532 machine=macppc opsys=gnu-linux
2533 ;;
2534
ba4481b5 2535 ## Silicon Graphics machines
ba4481b5 2536 ## Iris 4D
ba4481b5
DL
2537 mips-sgi-irix6.5 )
2538 machine=iris4d opsys=irix6-5
946173ad
DL
2539 # Without defining _LANGUAGE_C, things get masked out in the headers
2540 # so that, for instance, grepping for `free' in stdlib.h fails and
2541 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2542 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2543 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2544 ;;
ba4481b5 2545
ba4481b5
DL
2546 ## Suns
2547 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2548 machine=sparc opsys=gnu-linux
2549 ;;
2550
176fe5fc 2551 *-sun-solaris* \
7c54c0a0
DN
2552 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
2553 | x86_64-*-solaris2* | x86_64-*-sunos5* \
2554 | powerpc*-*-solaris2* | rs6000-*-solaris2*)
ba4481b5 2555 case "${canonical}" in
ba4481b5 2556 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2557 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2558 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2559 sparc* ) machine=sparc ;;
2560 * ) unported=yes ;;
2561 esac
2562 case "${canonical}" in
ba4481b5
DL
2563 *-sunos5.3* | *-solaris2.3* )
2564 opsys=sol2-3
2565 NON_GNU_CPP=/usr/ccs/lib/cpp
2566 ;;
2567 *-sunos5.4* | *-solaris2.4* )
2568 opsys=sol2-4
2569 NON_GNU_CPP=/usr/ccs/lib/cpp
2570 RANLIB="ar -ts"
2571 ;;
2572 *-sunos5.5* | *-solaris2.5* )
2573 opsys=sol2-5
2574 NON_GNU_CPP=/usr/ccs/lib/cpp
2575 RANLIB="ar -ts"
2576 ;;
8e967cf7
MR
2577 *-sunos5.6* | *-solaris2.6* )
2578 opsys=sol2-6
2579 NON_GNU_CPP=/usr/ccs/lib/cpp
2580 RANLIB="ar -ts"
2581 ;;
2194ea1c 2582 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
9e71690e 2583 opsys=sol2-6
089a966d
GM
2584 emacs_check_sunpro_c=yes
2585 NON_GNU_CPP=/usr/ccs/lib/cpp
6623890a 2586 ;;
9b3362b8
DN
2587 *-sunos5* | *-solaris* )
2588 opsys=sol2-10
2589 emacs_check_sunpro_c=yes
2590 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2591 ;;
ba4481b5
DL
2592 esac
2593 ## Watch out for a compiler that we know will not work.
2594 case "${canonical}" in
2595 *-solaris* | *-sunos5* )
2596 if [ "x$CC" = x/usr/ucb/cc ]; then
2597 ## /usr/ucb/cc doesn't work;
2598 ## we should find some other compiler that does work.
2599 unset CC
2600 fi
2601 ;;
2602 *) ;;
2603 esac
2604 ;;
ba4481b5 2605
ba4481b5
DL
2606 ## Vaxen.
2607 vax-dec-* )
2608 machine=vax
2609 case "${canonical}" in
ba4481b5
DL
2610 *-vms* ) opsys=vms ;;
2611 * ) unported=yes
2612 esac
2613 ;;
2614
f4988be7
GM
2615 ## IA-64
2616 ia64*-*-linux* )
2617 machine=ia64 opsys=gnu-linux
2618 ;;
2619
ba4481b5
DL
2620 ## Intel 386 machines where we don't care about the manufacturer
2621 i[3456]86-*-* )
2622 machine=intel386
2623 case "${canonical}" in
c60ee5e7 2624 *-cygwin ) opsys=cygwin ;;
eae54018 2625 *-darwin* ) opsys=darwin
23fd4483
ST
2626 CPP="${CC-cc} -E -no-cpp-precomp"
2627 ;;
ba4481b5 2628 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2629 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2630 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2631 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2632 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2633 esac
2634 ;;
2635
2636 ## m68k Linux-based GNU system
2637 m68k-*-linux-gnu* )
2638 machine=m68k opsys=gnu-linux
2639 ;;
2640
2641 ## Mips Linux-based GNU system
8bff6137
GM
2642 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
2643 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
ba4481b5
DL
2644 machine=mips opsys=gnu-linux
2645 ;;
2646
598a2813
AS
2647 ## AMD x86-64 Linux-based GNU system
2648 x86_64-*-linux-gnu* )
24b01ec4 2649 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2650 ;;
2651
94218e27 2652 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2653 xtensa*-*-linux-gnu* )
94218e27
DN
2654 machine=xtensa opsys=gnu-linux
2655 ;;
2656
fac5dc61
DN
2657 ## SuperH Linux-based GNU system
2658 sh[34]*-*-linux-gnu* )
2659 machine=sh3 opsys=gnu-linux
2660 ;;
2661
ba4481b5
DL
2662 * )
2663 unported=yes
2664 ;;
2665esac
2666
2667### If the code above didn't choose an operating system, just choose
2668### an operating system based on the configuration name. You really
2669### only want to use this when you have no idea what the right
2670### operating system is; if you know what operating systems a machine
2671### runs, it's cleaner to make it explicit in the case statement
2672### above.
2673if test x"${opsys}" = x; then
2674 case "${canonical}" in
2675 *-gnu* ) opsys=gnu ;;
ba4481b5 2676 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2677 *-sysv5uw* ) opsys=unixware ;;
2678 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2679 *-sysv4.1* | *-sysvr4.1* )
2680 NON_GNU_CPP=/usr/lib/cpp
2681 opsys=usg5-4 ;;
2682 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2683 if [ x$NON_GNU_CPP = x ]; then
2684 if [ -f /usr/ccs/lib/cpp ]; then
2685 NON_GNU_CPP=/usr/ccs/lib/cpp
2686 else
2687 NON_GNU_CPP=/lib/cpp
2688 fi
2689 fi
2690 opsys=usg5-4-2 ;;
2691 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2692 * )
2693 unported=yes
2694 ;;
2695 esac
2696fi
2697
c0d27fcc 2698
22044edf 2699
ba4481b5 2700if test $unported = yes; then
7bbec45b 2701 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0 2702Check \`etc/MACHINES' for recognized configuration names." >&5
7bbec45b 2703echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2704Check \`etc/MACHINES' for recognized configuration names." >&2;}
2705 { (exit 1); exit 1; }; }
ba4481b5
DL
2706fi
2707
2708machfile="m/${machine}.h"
2709opsysfile="s/${opsys}.h"
2710
c0d27fcc 2711
ba4481b5
DL
2712#### Choose a compiler.
2713test -n "$CC" && cc_specified=yes
2714
2715# Save the value of CFLAGS that the user specified.
2716SPECIFIED_CFLAGS="$CFLAGS"
2717
503d2be0
AS
2718ac_ext=c
2719ac_cpp='$CPP $CPPFLAGS'
2720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2722ac_compiler_gnu=$ac_cv_c_compiler_gnu
2723if test -n "$ac_tool_prefix"; then
2724 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2725set dummy ${ac_tool_prefix}gcc; ac_word=$2
7bbec45b
CY
2726{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2728if test "${ac_cv_prog_CC+set}" = set; then
7bbec45b 2729 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2730else
2731 if test -n "$CC"; then
2732 ac_cv_prog_CC="$CC" # Let the user override the test.
2733else
c0d27fcc
MR
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2741 ac_cv_prog_CC="${ac_tool_prefix}gcc"
7bbec45b 2742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2743 break 2
2744 fi
2745done
503d2be0 2746done
ca81d7a0 2747IFS=$as_save_IFS
503d2be0 2748
ba4481b5
DL
2749fi
2750fi
503d2be0 2751CC=$ac_cv_prog_CC
ba4481b5 2752if test -n "$CC"; then
7bbec45b
CY
2753 { echo "$as_me:$LINENO: result: $CC" >&5
2754echo "${ECHO_T}$CC" >&6; }
503d2be0 2755else
7bbec45b
CY
2756 { echo "$as_me:$LINENO: result: no" >&5
2757echo "${ECHO_T}no" >&6; }
503d2be0
AS
2758fi
2759
ca81d7a0 2760
503d2be0
AS
2761fi
2762if test -z "$ac_cv_prog_CC"; then
2763 ac_ct_CC=$CC
2764 # Extract the first word of "gcc", so it can be a program name with args.
2765set dummy gcc; ac_word=$2
7bbec45b
CY
2766{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2767echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2768if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7bbec45b 2769 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
2770else
2771 if test -n "$ac_ct_CC"; then
2772 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2773else
c0d27fcc
MR
2774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2775for as_dir in $PATH
2776do
2777 IFS=$as_save_IFS
2778 test -z "$as_dir" && as_dir=.
2779 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2780 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2781 ac_cv_prog_ac_ct_CC="gcc"
7bbec45b 2782 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2783 break 2
2784 fi
2785done
503d2be0 2786done
ca81d7a0 2787IFS=$as_save_IFS
503d2be0
AS
2788
2789fi
2790fi
2791ac_ct_CC=$ac_cv_prog_ac_ct_CC
2792if test -n "$ac_ct_CC"; then
7bbec45b
CY
2793 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2794echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2795else
7bbec45b
CY
2796 { echo "$as_me:$LINENO: result: no" >&5
2797echo "${ECHO_T}no" >&6; }
503d2be0
AS
2798fi
2799
ca81d7a0
JD
2800 if test "x$ac_ct_CC" = x; then
2801 CC=""
2802 else
2803 case $cross_compiling:$ac_tool_warned in
2804yes:)
7bbec45b 2805{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
b0448899
CY
2806whose name does not start with the host triplet. If you think this
2807configuration is useful to you, please write to autoconf@gnu.org." >&5
7bbec45b 2808echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
b0448899
CY
2809whose name does not start with the host triplet. If you think this
2810configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ca81d7a0
JD
2811ac_tool_warned=yes ;;
2812esac
2813 CC=$ac_ct_CC
2814 fi
503d2be0
AS
2815else
2816 CC="$ac_cv_prog_CC"
ba4481b5
DL
2817fi
2818
2819if test -z "$CC"; then
ca81d7a0
JD
2820 if test -n "$ac_tool_prefix"; then
2821 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2822set dummy ${ac_tool_prefix}cc; ac_word=$2
7bbec45b
CY
2823{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2824echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2825if test "${ac_cv_prog_CC+set}" = set; then
7bbec45b 2826 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2827else
2828 if test -n "$CC"; then
2829 ac_cv_prog_CC="$CC" # Let the user override the test.
2830else
c0d27fcc
MR
2831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2832for as_dir in $PATH
2833do
2834 IFS=$as_save_IFS
2835 test -z "$as_dir" && as_dir=.
2836 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2837 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2838 ac_cv_prog_CC="${ac_tool_prefix}cc"
7bbec45b 2839 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2840 break 2
2841 fi
2842done
503d2be0 2843done
ca81d7a0 2844IFS=$as_save_IFS
503d2be0
AS
2845
2846fi
2847fi
2848CC=$ac_cv_prog_CC
2849if test -n "$CC"; then
7bbec45b
CY
2850 { echo "$as_me:$LINENO: result: $CC" >&5
2851echo "${ECHO_T}$CC" >&6; }
503d2be0 2852else
7bbec45b
CY
2853 { echo "$as_me:$LINENO: result: no" >&5
2854echo "${ECHO_T}no" >&6; }
503d2be0
AS
2855fi
2856
503d2be0 2857
ca81d7a0 2858 fi
503d2be0
AS
2859fi
2860if test -z "$CC"; then
2861 # Extract the first word of "cc", so it can be a program name with args.
2862set dummy cc; ac_word=$2
7bbec45b
CY
2863{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2865if test "${ac_cv_prog_CC+set}" = set; then
7bbec45b 2866 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
2867else
2868 if test -n "$CC"; then
2869 ac_cv_prog_CC="$CC" # Let the user override the test.
2870else
2871 ac_prog_rejected=no
c0d27fcc
MR
2872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2873for as_dir in $PATH
2874do
2875 IFS=$as_save_IFS
2876 test -z "$as_dir" && as_dir=.
2877 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2879 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2880 ac_prog_rejected=yes
2881 continue
2882 fi
2883 ac_cv_prog_CC="cc"
7bbec45b 2884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2885 break 2
2886 fi
2887done
503d2be0 2888done
ca81d7a0 2889IFS=$as_save_IFS
503d2be0 2890
ba4481b5
DL
2891if test $ac_prog_rejected = yes; then
2892 # We found a bogon in the path, so make sure we never use it.
2893 set dummy $ac_cv_prog_CC
2894 shift
503d2be0 2895 if test $# != 0; then
ba4481b5
DL
2896 # We chose a different compiler from the bogus one.
2897 # However, it has the same basename, so the bogon will be chosen
2898 # first if we set CC to just the basename; use the full file name.
2899 shift
6bae0ccf 2900 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2901 fi
2902fi
2903fi
2904fi
503d2be0 2905CC=$ac_cv_prog_CC
ba4481b5 2906if test -n "$CC"; then
7bbec45b
CY
2907 { echo "$as_me:$LINENO: result: $CC" >&5
2908echo "${ECHO_T}$CC" >&6; }
ba4481b5 2909else
7bbec45b
CY
2910 { echo "$as_me:$LINENO: result: no" >&5
2911echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2912fi
2913
ca81d7a0 2914
503d2be0
AS
2915fi
2916if test -z "$CC"; then
2917 if test -n "$ac_tool_prefix"; then
ca81d7a0 2918 for ac_prog in cl.exe
503d2be0
AS
2919 do
2920 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2921set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7bbec45b
CY
2922{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2923echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2924if test "${ac_cv_prog_CC+set}" = set; then
7bbec45b 2925 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2926else
2927 if test -n "$CC"; then
2928 ac_cv_prog_CC="$CC" # Let the user override the test.
2929else
c0d27fcc
MR
2930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2931for as_dir in $PATH
2932do
2933 IFS=$as_save_IFS
2934 test -z "$as_dir" && as_dir=.
2935 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2936 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2937 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
7bbec45b 2938 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2939 break 2
2940 fi
2941done
503d2be0 2942done
ca81d7a0 2943IFS=$as_save_IFS
503d2be0 2944
c4bb2108
DL
2945fi
2946fi
503d2be0 2947CC=$ac_cv_prog_CC
c4bb2108 2948if test -n "$CC"; then
7bbec45b
CY
2949 { echo "$as_me:$LINENO: result: $CC" >&5
2950echo "${ECHO_T}$CC" >&6; }
c4bb2108 2951else
7bbec45b
CY
2952 { echo "$as_me:$LINENO: result: no" >&5
2953echo "${ECHO_T}no" >&6; }
503d2be0
AS
2954fi
2955
ca81d7a0 2956
503d2be0
AS
2957 test -n "$CC" && break
2958 done
2959fi
2960if test -z "$CC"; then
2961 ac_ct_CC=$CC
ca81d7a0 2962 for ac_prog in cl.exe
503d2be0
AS
2963do
2964 # Extract the first word of "$ac_prog", so it can be a program name with args.
2965set dummy $ac_prog; ac_word=$2
7bbec45b
CY
2966{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2967echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 2968if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7bbec45b 2969 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
2970else
2971 if test -n "$ac_ct_CC"; then
2972 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2973else
c0d27fcc
MR
2974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2975for as_dir in $PATH
2976do
2977 IFS=$as_save_IFS
2978 test -z "$as_dir" && as_dir=.
2979 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 2981 ac_cv_prog_ac_ct_CC="$ac_prog"
7bbec45b 2982 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
2983 break 2
2984 fi
2985done
503d2be0 2986done
ca81d7a0 2987IFS=$as_save_IFS
503d2be0 2988
c4bb2108 2989fi
503d2be0
AS
2990fi
2991ac_ct_CC=$ac_cv_prog_ac_ct_CC
2992if test -n "$ac_ct_CC"; then
7bbec45b
CY
2993 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2994echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 2995else
7bbec45b
CY
2996 { echo "$as_me:$LINENO: result: no" >&5
2997echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2998fi
2999
ca81d7a0 3000
503d2be0
AS
3001 test -n "$ac_ct_CC" && break
3002done
ba4481b5 3003
ca81d7a0
JD
3004 if test "x$ac_ct_CC" = x; then
3005 CC=""
3006 else
3007 case $cross_compiling:$ac_tool_warned in
3008yes:)
7bbec45b 3009{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
b0448899
CY
3010whose name does not start with the host triplet. If you think this
3011configuration is useful to you, please write to autoconf@gnu.org." >&5
7bbec45b 3012echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
b0448899
CY
3013whose name does not start with the host triplet. If you think this
3014configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ca81d7a0
JD
3015ac_tool_warned=yes ;;
3016esac
3017 CC=$ac_ct_CC
3018 fi
503d2be0
AS
3019fi
3020
3021fi
ba4481b5 3022
c0d27fcc 3023
7bbec45b 3024test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
19650fd6 3025See \`config.log' for more details." >&5
7bbec45b 3026echo "$as_me: error: no acceptable C compiler found in \$PATH
19650fd6 3027See \`config.log' for more details." >&2;}
b0448899 3028 { (exit 1); exit 1; }; }
c4bb2108 3029
503d2be0 3030# Provide some information about the compiler.
7bbec45b
CY
3031echo "$as_me:$LINENO: checking for C compiler version" >&5
3032ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3033{ (ac_try="$ac_compiler --version >&5"
3034case "(($ac_try" in
3035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036 *) ac_try_echo=$ac_try;;
3037esac
7bbec45b 3038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3039 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3040 ac_status=$?
7bbec45b 3041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3042 (exit $ac_status); }
ca81d7a0
JD
3043{ (ac_try="$ac_compiler -v >&5"
3044case "(($ac_try" in
3045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046 *) ac_try_echo=$ac_try;;
3047esac
7bbec45b 3048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3049 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3050 ac_status=$?
7bbec45b 3051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3052 (exit $ac_status); }
ca81d7a0
JD
3053{ (ac_try="$ac_compiler -V >&5"
3054case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057esac
7bbec45b 3058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3059 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3060 ac_status=$?
7bbec45b 3061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3062 (exit $ac_status); }
3063
3064cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3065/* confdefs.h. */
3066_ACEOF
3067cat confdefs.h >>conftest.$ac_ext
3068cat >>conftest.$ac_ext <<_ACEOF
3069/* end confdefs.h. */
c4bb2108 3070
503d2be0
AS
3071int
3072main ()
3073{
3074
3075 ;
3076 return 0;
3077}
3078_ACEOF
3079ac_clean_files_save=$ac_clean_files
7bbec45b 3080ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3081# Try to create an executable without -o first, disregard a.out.
3082# It will help us diagnose broken compilers, and finding out an intuition
3083# of exeext.
7bbec45b
CY
3084{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3085echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
3086ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3087#
3088# List of possible output files, starting from the most likely.
3089# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3090# only as a last resort. b.out is created by i960 compilers.
3091ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3092#
3093# The IRIX 6 linker writes into existing files which may not be
3094# executable, retaining their permissions. Remove them first so a
3095# subsequent execution test works.
ca81d7a0
JD
3096ac_rmfiles=
3097for ac_file in $ac_files
3098do
3099 case $ac_file in
7bbec45b 3100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
ca81d7a0
JD
3101 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3102 esac
3103done
3104rm -f $ac_rmfiles
3105
3106if { (ac_try="$ac_link_default"
3107case "(($ac_try" in
3108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109 *) ac_try_echo=$ac_try;;
3110esac
7bbec45b 3111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3112 (eval "$ac_link_default") 2>&5
503d2be0 3113 ac_status=$?
7bbec45b 3114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3115 (exit $ac_status); }; then
ca81d7a0
JD
3116 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3117# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3118# in a Makefile. We should not override ac_cv_exeext if it was cached,
3119# so that the user can short-circuit this test for compilers unknown to
3120# Autoconf.
f053c89f 3121for ac_file in $ac_files ''
19650fd6 3122do
6bae0ccf 3123 test -f "$ac_file" || continue
503d2be0 3124 case $ac_file in
7bbec45b 3125 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3126 ;;
19650fd6 3127 [ab].out )
edfaf76d
LK
3128 # We found the default executable, but exeext='' is most
3129 # certainly right.
3130 break;;
19650fd6 3131 *.* )
ca81d7a0
JD
3132 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3133 then :; else
3134 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3135 fi
3136 # We set ac_cv_exeext here because the later test for it is not
3137 # safe: cross compilers may not add the suffix if given an `-o'
3138 # argument, so we may need to know it at that point already.
3139 # Even if this section looks crufty: it has the advantage of
3140 # actually working.
edfaf76d 3141 break;;
19650fd6 3142 * )
edfaf76d 3143 break;;
503d2be0
AS
3144 esac
3145done
ca81d7a0
JD
3146test "$ac_cv_exeext" = no && ac_cv_exeext=
3147
503d2be0 3148else
f053c89f
CY
3149 ac_file=''
3150fi
3151
7bbec45b
CY
3152{ echo "$as_me:$LINENO: result: $ac_file" >&5
3153echo "${ECHO_T}$ac_file" >&6; }
f053c89f 3154if test -z "$ac_file"; then
7bbec45b 3155 echo "$as_me: failed program was:" >&5
19650fd6
AS
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
7bbec45b 3158{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3159See \`config.log' for more details." >&5
7bbec45b 3160echo "$as_me: error: C compiler cannot create executables
19650fd6 3161See \`config.log' for more details." >&2;}
b0448899 3162 { (exit 77); exit 77; }; }
503d2be0
AS
3163fi
3164
3165ac_exeext=$ac_cv_exeext
503d2be0 3166
ca81d7a0 3167# Check that the compiler produces executables we can run. If not, either
503d2be0 3168# the compiler is broken, or we cross compile.
7bbec45b
CY
3169{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3170echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3171# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3172# If not cross compiling, check that we can run a simple program.
3173if test "$cross_compiling" != yes; then
3174 if { ac_try='./$ac_file'
ca81d7a0
JD
3175 { (case "(($ac_try" in
3176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3177 *) ac_try_echo=$ac_try;;
3178esac
7bbec45b 3179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3180 (eval "$ac_try") 2>&5
503d2be0 3181 ac_status=$?
7bbec45b 3182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3183 (exit $ac_status); }; }; then
3184 cross_compiling=no
ba4481b5 3185 else
503d2be0
AS
3186 if test "$cross_compiling" = maybe; then
3187 cross_compiling=yes
3188 else
7bbec45b 3189 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3190If you meant to cross compile, use \`--host'.
3191See \`config.log' for more details." >&5
7bbec45b 3192echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3193If you meant to cross compile, use \`--host'.
3194See \`config.log' for more details." >&2;}
b0448899 3195 { (exit 1); exit 1; }; }
503d2be0 3196 fi
ba4481b5 3197 fi
503d2be0 3198fi
7bbec45b
CY
3199{ echo "$as_me:$LINENO: result: yes" >&5
3200echo "${ECHO_T}yes" >&6; }
503d2be0 3201
7bbec45b 3202rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3203ac_clean_files=$ac_clean_files_save
ca81d7a0 3204# Check that the compiler produces executables we can run. If not, either
503d2be0 3205# the compiler is broken, or we cross compile.
7bbec45b
CY
3206{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3207echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3208{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3209echo "${ECHO_T}$cross_compiling" >&6; }
ca81d7a0 3210
7bbec45b
CY
3211{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3212echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
ca81d7a0
JD
3213if { (ac_try="$ac_link"
3214case "(($ac_try" in
3215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216 *) ac_try_echo=$ac_try;;
3217esac
7bbec45b 3218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3219 (eval "$ac_link") 2>&5
503d2be0 3220 ac_status=$?
7bbec45b 3221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3222 (exit $ac_status); }; then
3223 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3224# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3225# work properly (i.e., refer to `conftest.exe'), while it won't with
3226# `rm'.
6bae0ccf
DL
3227for ac_file in conftest.exe conftest conftest.*; do
3228 test -f "$ac_file" || continue
503d2be0 3229 case $ac_file in
7bbec45b 3230 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3231 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3232 break;;
503d2be0
AS
3233 * ) break;;
3234 esac
3235done
ba4481b5 3236else
7bbec45b 3237 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
19650fd6 3238See \`config.log' for more details." >&5
7bbec45b 3239echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
19650fd6 3240See \`config.log' for more details." >&2;}
b0448899 3241 { (exit 1); exit 1; }; }
ba4481b5 3242fi
ba4481b5 3243
503d2be0 3244rm -f conftest$ac_cv_exeext
7bbec45b
CY
3245{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3246echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3247
503d2be0
AS
3248rm -f conftest.$ac_ext
3249EXEEXT=$ac_cv_exeext
3250ac_exeext=$EXEEXT
7bbec45b
CY
3251{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3252echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0 3253if test "${ac_cv_objext+set}" = set; then
7bbec45b 3254 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3255else
503d2be0 3256 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3257/* confdefs.h. */
3258_ACEOF
3259cat confdefs.h >>conftest.$ac_ext
3260cat >>conftest.$ac_ext <<_ACEOF
3261/* end confdefs.h. */
ba4481b5 3262
503d2be0
AS
3263int
3264main ()
3265{
ba4481b5 3266
503d2be0
AS
3267 ;
3268 return 0;
3269}
3270_ACEOF
3271rm -f conftest.o conftest.obj
ca81d7a0
JD
3272if { (ac_try="$ac_compile"
3273case "(($ac_try" in
3274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3275 *) ac_try_echo=$ac_try;;
3276esac
7bbec45b 3277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3278 (eval "$ac_compile") 2>&5
503d2be0 3279 ac_status=$?
7bbec45b 3280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3281 (exit $ac_status); }; then
ca81d7a0
JD
3282 for ac_file in conftest.o conftest.obj conftest.*; do
3283 test -f "$ac_file" || continue;
503d2be0 3284 case $ac_file in
7bbec45b 3285 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3286 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3287 break;;
3288 esac
3289done
c4bb2108 3290else
7bbec45b 3291 echo "$as_me: failed program was:" >&5
19650fd6
AS
3292sed 's/^/| /' conftest.$ac_ext >&5
3293
7bbec45b 3294{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
19650fd6 3295See \`config.log' for more details." >&5
7bbec45b 3296echo "$as_me: error: cannot compute suffix of object files: cannot compile
19650fd6 3297See \`config.log' for more details." >&2;}
b0448899 3298 { (exit 1); exit 1; }; }
c4bb2108
DL
3299fi
3300
503d2be0
AS
3301rm -f conftest.$ac_cv_objext conftest.$ac_ext
3302fi
7bbec45b
CY
3303{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3304echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3305OBJEXT=$ac_cv_objext
3306ac_objext=$OBJEXT
7bbec45b
CY
3307{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3308echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0 3309if test "${ac_cv_c_compiler_gnu+set}" = set; then
7bbec45b 3310 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3311else
503d2be0 3312 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3313/* confdefs.h. */
3314_ACEOF
3315cat confdefs.h >>conftest.$ac_ext
3316cat >>conftest.$ac_ext <<_ACEOF
3317/* end confdefs.h. */
503d2be0
AS
3318
3319int
3320main ()
3321{
3322#ifndef __GNUC__
3323 choke me
3324#endif
3325
3326 ;
3327 return 0;
3328}
3329_ACEOF
3330rm -f conftest.$ac_objext
ca81d7a0
JD
3331if { (ac_try="$ac_compile"
3332case "(($ac_try" in
3333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3334 *) ac_try_echo=$ac_try;;
3335esac
7bbec45b 3336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3337 (eval "$ac_compile") 2>conftest.er1
503d2be0 3338 ac_status=$?
edfaf76d
LK
3339 grep -v '^ *+' conftest.er1 >conftest.err
3340 rm -f conftest.er1
3341 cat conftest.err >&5
7bbec45b 3342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3343 (exit $ac_status); } && {
3344 test -z "$ac_c_werror_flag" ||
3345 test ! -s conftest.err
3346 } && test -s conftest.$ac_objext; then
503d2be0
AS
3347 ac_compiler_gnu=yes
3348else
7bbec45b 3349 echo "$as_me: failed program was:" >&5
19650fd6
AS
3350sed 's/^/| /' conftest.$ac_ext >&5
3351
ca81d7a0 3352 ac_compiler_gnu=no
503d2be0 3353fi
ca81d7a0
JD
3354
3355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3356ac_cv_c_compiler_gnu=$ac_compiler_gnu
3357
3358fi
7bbec45b
CY
3359{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3360echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3361GCC=`test $ac_compiler_gnu = yes && echo yes`
503d2be0
AS
3362ac_test_CFLAGS=${CFLAGS+set}
3363ac_save_CFLAGS=$CFLAGS
7bbec45b
CY
3364{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3365echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0 3366if test "${ac_cv_prog_cc_g+set}" = set; then
7bbec45b 3367 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0 3368else
ca81d7a0
JD
3369 ac_save_c_werror_flag=$ac_c_werror_flag
3370 ac_c_werror_flag=yes
3371 ac_cv_prog_cc_g=no
3372 CFLAGS="-g"
3373 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3374/* confdefs.h. */
3375_ACEOF
3376cat confdefs.h >>conftest.$ac_ext
3377cat >>conftest.$ac_ext <<_ACEOF
3378/* end confdefs.h. */
503d2be0
AS
3379
3380int
3381main ()
3382{
3383
3384 ;
3385 return 0;
3386}
3387_ACEOF
3388rm -f conftest.$ac_objext
ca81d7a0
JD
3389if { (ac_try="$ac_compile"
3390case "(($ac_try" in
3391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392 *) ac_try_echo=$ac_try;;
3393esac
7bbec45b 3394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3395 (eval "$ac_compile") 2>conftest.er1
503d2be0 3396 ac_status=$?
edfaf76d
LK
3397 grep -v '^ *+' conftest.er1 >conftest.err
3398 rm -f conftest.er1
3399 cat conftest.err >&5
7bbec45b 3400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3401 (exit $ac_status); } && {
3402 test -z "$ac_c_werror_flag" ||
3403 test ! -s conftest.err
3404 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3405 ac_cv_prog_cc_g=yes
3406else
7bbec45b 3407 echo "$as_me: failed program was:" >&5
19650fd6
AS
3408sed 's/^/| /' conftest.$ac_ext >&5
3409
ca81d7a0
JD
3410 CFLAGS=""
3411 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3412/* confdefs.h. */
3413_ACEOF
3414cat confdefs.h >>conftest.$ac_ext
3415cat >>conftest.$ac_ext <<_ACEOF
3416/* end confdefs.h. */
edfaf76d 3417
6bae0ccf
DL
3418int
3419main ()
3420{
ca81d7a0 3421
6bae0ccf
DL
3422 ;
3423 return 0;
3424}
3425_ACEOF
ca81d7a0
JD
3426rm -f conftest.$ac_objext
3427if { (ac_try="$ac_compile"
3428case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431esac
7bbec45b 3432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3433 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3434 ac_status=$?
edfaf76d
LK
3435 grep -v '^ *+' conftest.er1 >conftest.err
3436 rm -f conftest.er1
3437 cat conftest.err >&5
7bbec45b 3438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3439 (exit $ac_status); } && {
3440 test -z "$ac_c_werror_flag" ||
3441 test ! -s conftest.err
3442 } && test -s conftest.$ac_objext; then
ca81d7a0 3443 :
6bae0ccf 3444else
7bbec45b 3445 echo "$as_me: failed program was:" >&5
19650fd6
AS
3446sed 's/^/| /' conftest.$ac_ext >&5
3447
ca81d7a0
JD
3448 ac_c_werror_flag=$ac_save_c_werror_flag
3449 CFLAGS="-g"
3450 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3451/* confdefs.h. */
19650fd6
AS
3452_ACEOF
3453cat confdefs.h >>conftest.$ac_ext
3454cat >>conftest.$ac_ext <<_ACEOF
3455/* end confdefs.h. */
ca81d7a0 3456
503d2be0
AS
3457int
3458main ()
3459{
ca81d7a0 3460
503d2be0
AS
3461 ;
3462 return 0;
3463}
3464_ACEOF
3465rm -f conftest.$ac_objext
ca81d7a0
JD
3466if { (ac_try="$ac_compile"
3467case "(($ac_try" in
3468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469 *) ac_try_echo=$ac_try;;
3470esac
7bbec45b 3471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3472 (eval "$ac_compile") 2>conftest.er1
503d2be0 3473 ac_status=$?
edfaf76d
LK
3474 grep -v '^ *+' conftest.er1 >conftest.err
3475 rm -f conftest.er1
3476 cat conftest.err >&5
7bbec45b 3477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3478 (exit $ac_status); } && {
3479 test -z "$ac_c_werror_flag" ||
3480 test ! -s conftest.err
3481 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3482 ac_cv_prog_cc_g=yes
3483else
7bbec45b 3484 echo "$as_me: failed program was:" >&5
19650fd6
AS
3485sed 's/^/| /' conftest.$ac_ext >&5
3486
ca81d7a0 3487
ba4481b5 3488fi
ca81d7a0
JD
3489
3490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3491fi
3492
3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3494fi
3495
3496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3497 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3498fi
7bbec45b
CY
3499{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3500echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3501if test "$ac_test_CFLAGS" = set; then
503d2be0 3502 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3503elif test $ac_cv_prog_cc_g = yes; then
3504 if test "$GCC" = yes; then
ba4481b5
DL
3505 CFLAGS="-g -O2"
3506 else
c4bb2108 3507 CFLAGS="-g"
ba4481b5 3508 fi
22afa6e8 3509else
c4bb2108
DL
3510 if test "$GCC" = yes; then
3511 CFLAGS="-O2"
3512 else
3513 CFLAGS=
3514 fi
ba4481b5 3515fi
7bbec45b
CY
3516{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3517echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
ca81d7a0 3518if test "${ac_cv_prog_cc_c89+set}" = set; then
7bbec45b 3519 echo $ECHO_N "(cached) $ECHO_C" >&6
6bae0ccf 3520else
ca81d7a0 3521 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3522ac_save_CC=$CC
3523cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3524/* confdefs.h. */
3525_ACEOF
3526cat confdefs.h >>conftest.$ac_ext
3527cat >>conftest.$ac_ext <<_ACEOF
3528/* end confdefs.h. */
6bae0ccf
DL
3529#include <stdarg.h>
3530#include <stdio.h>
3531#include <sys/types.h>
3532#include <sys/stat.h>
3533/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3534struct buf { int x; };
3535FILE * (*rcsopen) (struct buf *, struct stat *, int);
3536static char *e (p, i)
3537 char **p;
3538 int i;
3539{
3540 return p[i];
3541}
3542static char *f (char * (*g) (char **, int), char **p, ...)
3543{
3544 char *s;
3545 va_list v;
3546 va_start (v,p);
3547 s = g (p, va_arg (v,int));
3548 va_end (v);
3549 return s;
3550}
edfaf76d
LK
3551
3552/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3553 function prototypes and stuff, but not '\xHH' hex character constants.
3554 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3555 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3556 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3557 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3558 that's true only with -std. */
edfaf76d
LK
3559int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3560
ca81d7a0
JD
3561/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3562 inside strings and character constants. */
3563#define FOO(x) 'x'
3564int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3565
6bae0ccf
DL
3566int test (int i, double x);
3567struct s1 {int (*f) (int a);};
3568struct s2 {int (*f) (double a);};
3569int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3570int argc;
3571char **argv;
3572int
3573main ()
3574{
3575return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3576 ;
3577 return 0;
3578}
3579_ACEOF
ca81d7a0
JD
3580for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3581 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3582do
3583 CC="$ac_save_CC $ac_arg"
3584 rm -f conftest.$ac_objext
ca81d7a0
JD
3585if { (ac_try="$ac_compile"
3586case "(($ac_try" in
3587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3588 *) ac_try_echo=$ac_try;;
3589esac
7bbec45b 3590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3591 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3592 ac_status=$?
edfaf76d
LK
3593 grep -v '^ *+' conftest.er1 >conftest.err
3594 rm -f conftest.er1
3595 cat conftest.err >&5
7bbec45b 3596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3597 (exit $ac_status); } && {
3598 test -z "$ac_c_werror_flag" ||
3599 test ! -s conftest.err
3600 } && test -s conftest.$ac_objext; then
ca81d7a0 3601 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf 3602else
7bbec45b 3603 echo "$as_me: failed program was:" >&5
19650fd6
AS
3604sed 's/^/| /' conftest.$ac_ext >&5
3605
ca81d7a0 3606
6bae0ccf 3607fi
ca81d7a0
JD
3608
3609rm -f core conftest.err conftest.$ac_objext
3610 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3611done
ca81d7a0 3612rm -f conftest.$ac_ext
6bae0ccf
DL
3613CC=$ac_save_CC
3614
3615fi
ca81d7a0
JD
3616# AC_CACHE_VAL
3617case "x$ac_cv_prog_cc_c89" in
3618 x)
7bbec45b
CY
3619 { echo "$as_me:$LINENO: result: none needed" >&5
3620echo "${ECHO_T}none needed" >&6; } ;;
ca81d7a0 3621 xno)
7bbec45b
CY
3622 { echo "$as_me:$LINENO: result: unsupported" >&5
3623echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3624 *)
ca81d7a0 3625 CC="$CC $ac_cv_prog_cc_c89"
7bbec45b
CY
3626 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3627echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3628esac
3629
19650fd6 3630
503d2be0
AS
3631ac_ext=c
3632ac_cpp='$CPP $CPPFLAGS'
3633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3636
c0d27fcc 3637
ba4481b5
DL
3638# On Suns, sometimes $CPP names a directory.
3639if test -n "$CPP" && test -d "$CPP"; then
3640 CPP=
3641fi
3642
089a966d
GM
3643## If not using gcc, and on Solaris, and no CPP specified, see if
3644## using a Sun compiler, which needs -Xs to prevent whitespace.
3645if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3646 test x"$CPP" = x; then
7bbec45b
CY
3647 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3648echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
089a966d
GM
3649
3650if test "${emacs_cv_sunpro_c+set}" = set; then
7bbec45b 3651 echo $ECHO_N "(cached) $ECHO_C" >&6
089a966d
GM
3652else
3653 cat >conftest.$ac_ext <<_ACEOF
3654/* confdefs.h. */
3655_ACEOF
3656cat confdefs.h >>conftest.$ac_ext
3657cat >>conftest.$ac_ext <<_ACEOF
3658/* end confdefs.h. */
3659
3660int
3661main ()
3662{
3663#ifndef __SUNPRO_C
3664fail;
3665#endif
3666
3667 ;
3668 return 0;
3669}
3670_ACEOF
3671rm -f conftest.$ac_objext conftest$ac_exeext
3672if { (ac_try="$ac_link"
3673case "(($ac_try" in
3674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3675 *) ac_try_echo=$ac_try;;
3676esac
7bbec45b 3677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
089a966d
GM
3678 (eval "$ac_link") 2>conftest.er1
3679 ac_status=$?
3680 grep -v '^ *+' conftest.er1 >conftest.err
3681 rm -f conftest.er1
3682 cat conftest.err >&5
7bbec45b 3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
089a966d
GM
3684 (exit $ac_status); } && {
3685 test -z "$ac_c_werror_flag" ||
3686 test ! -s conftest.err
7bbec45b
CY
3687 } && test -s conftest$ac_exeext &&
3688 $as_test_x conftest$ac_exeext; then
089a966d
GM
3689 emacs_cv_sunpro_c=yes
3690else
7bbec45b 3691 echo "$as_me: failed program was:" >&5
089a966d
GM
3692sed 's/^/| /' conftest.$ac_ext >&5
3693
3694 emacs_cv_sunpro_c=no
3695fi
3696
3697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3698 conftest$ac_exeext conftest.$ac_ext
3699fi
3700
7bbec45b
CY
3701 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3702echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
089a966d
GM
3703
3704 if test x"$emacs_cv_sunpro_c" = xyes; then
3705 NON_GNU_CPP="$CC -E -Xs"
3706 fi
3707fi
3708
ba4481b5
DL
3709#### Some systems specify a CPP to use unless we are using GCC.
3710#### Now that we know whether we are using GCC, we can decide whether
3711#### to use that one.
3712if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3713then
3714 CPP="$NON_GNU_CPP"
3715fi
3716
3717#### Some systems specify a CC to use unless we are using GCC.
3718#### Now that we know whether we are using GCC, we can decide whether
3719#### to use that one.
3720if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3721 test x$cc_specified != xyes
3722then
3723 CC="$NON_GNU_CC"
3724fi
3725
3726if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3727then
3728 CC="$CC $GCC_TEST_OPTIONS"
3729fi
3730
3731if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3732then
3733 CC="$CC $NON_GCC_TEST_OPTIONS"
3734fi
3735
7bbec45b
CY
3736
3737cat >>confdefs.h <<\_ACEOF
3738#define _GNU_SOURCE 1
3739_ACEOF
3740
3741
e143ad11
AS
3742ac_ext=c
3743ac_cpp='$CPP $CPPFLAGS'
3744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3746ac_compiler_gnu=$ac_cv_c_compiler_gnu
7bbec45b
CY
3747{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3748echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3749# On Suns, sometimes $CPP names a directory.
3750if test -n "$CPP" && test -d "$CPP"; then
3751 CPP=
3752fi
3753if test -z "$CPP"; then
3754 if test "${ac_cv_prog_CPP+set}" = set; then
7bbec45b 3755 echo $ECHO_N "(cached) $ECHO_C" >&6
e143ad11
AS
3756else
3757 # Double quotes because CPP needs to be expanded
3758 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3759 do
3760 ac_preproc_ok=false
3761for ac_c_preproc_warn_flag in '' yes
3762do
3763 # Use a header file that comes with gcc, so configuring glibc
3764 # with a fresh cross-compiler works.
3765 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3766 # <limits.h> exists even on freestanding compilers.
3767 # On the NeXT, cc -E runs the code through the compiler's parser,
3768 # not just through cpp. "Syntax error" is here to catch this case.
3769 cat >conftest.$ac_ext <<_ACEOF
3770/* confdefs.h. */
3771_ACEOF
3772cat confdefs.h >>conftest.$ac_ext
3773cat >>conftest.$ac_ext <<_ACEOF
3774/* end confdefs.h. */
3775#ifdef __STDC__
3776# include <limits.h>
3777#else
3778# include <assert.h>
3779#endif
3780 Syntax error
3781_ACEOF
ca81d7a0
JD
3782if { (ac_try="$ac_cpp conftest.$ac_ext"
3783case "(($ac_try" in
3784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3785 *) ac_try_echo=$ac_try;;
3786esac
7bbec45b 3787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3788 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3789 ac_status=$?
3790 grep -v '^ *+' conftest.er1 >conftest.err
3791 rm -f conftest.er1
3792 cat conftest.err >&5
7bbec45b 3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3794 (exit $ac_status); } >/dev/null && {
3795 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3796 test ! -s conftest.err
3797 }; then
e143ad11
AS
3798 :
3799else
7bbec45b 3800 echo "$as_me: failed program was:" >&5
e143ad11
AS
3801sed 's/^/| /' conftest.$ac_ext >&5
3802
3803 # Broken: fails on valid input.
3804continue
3805fi
ca81d7a0 3806
e143ad11
AS
3807rm -f conftest.err conftest.$ac_ext
3808
ca81d7a0 3809 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3810 # can be detected and how.
3811 cat >conftest.$ac_ext <<_ACEOF
3812/* confdefs.h. */
3813_ACEOF
3814cat confdefs.h >>conftest.$ac_ext
3815cat >>conftest.$ac_ext <<_ACEOF
3816/* end confdefs.h. */
3817#include <ac_nonexistent.h>
3818_ACEOF
ca81d7a0
JD
3819if { (ac_try="$ac_cpp conftest.$ac_ext"
3820case "(($ac_try" in
3821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822 *) ac_try_echo=$ac_try;;
3823esac
7bbec45b 3824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3825 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3826 ac_status=$?
3827 grep -v '^ *+' conftest.er1 >conftest.err
3828 rm -f conftest.er1
3829 cat conftest.err >&5
7bbec45b 3830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3831 (exit $ac_status); } >/dev/null && {
3832 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3833 test ! -s conftest.err
3834 }; then
e143ad11
AS
3835 # Broken: success on invalid input.
3836continue
3837else
7bbec45b 3838 echo "$as_me: failed program was:" >&5
e143ad11
AS
3839sed 's/^/| /' conftest.$ac_ext >&5
3840
3841 # Passes both tests.
3842ac_preproc_ok=:
3843break
3844fi
ca81d7a0 3845
e143ad11
AS
3846rm -f conftest.err conftest.$ac_ext
3847
3848done
3849# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3850rm -f conftest.err conftest.$ac_ext
3851if $ac_preproc_ok; then
3852 break
3853fi
3854
3855 done
3856 ac_cv_prog_CPP=$CPP
3857
3858fi
3859 CPP=$ac_cv_prog_CPP
3860else
3861 ac_cv_prog_CPP=$CPP
3862fi
7bbec45b
CY
3863{ echo "$as_me:$LINENO: result: $CPP" >&5
3864echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3865ac_preproc_ok=false
3866for ac_c_preproc_warn_flag in '' yes
3867do
3868 # Use a header file that comes with gcc, so configuring glibc
3869 # with a fresh cross-compiler works.
3870 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3871 # <limits.h> exists even on freestanding compilers.
3872 # On the NeXT, cc -E runs the code through the compiler's parser,
3873 # not just through cpp. "Syntax error" is here to catch this case.
3874 cat >conftest.$ac_ext <<_ACEOF
3875/* confdefs.h. */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h. */
3880#ifdef __STDC__
3881# include <limits.h>
3882#else
3883# include <assert.h>
3884#endif
3885 Syntax error
3886_ACEOF
ca81d7a0
JD
3887if { (ac_try="$ac_cpp conftest.$ac_ext"
3888case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
7bbec45b 3892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3894 ac_status=$?
3895 grep -v '^ *+' conftest.er1 >conftest.err
3896 rm -f conftest.er1
3897 cat conftest.err >&5
7bbec45b 3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3899 (exit $ac_status); } >/dev/null && {
3900 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3901 test ! -s conftest.err
3902 }; then
e143ad11
AS
3903 :
3904else
7bbec45b 3905 echo "$as_me: failed program was:" >&5
e143ad11
AS
3906sed 's/^/| /' conftest.$ac_ext >&5
3907
3908 # Broken: fails on valid input.
3909continue
3910fi
ca81d7a0 3911
e143ad11
AS
3912rm -f conftest.err conftest.$ac_ext
3913
ca81d7a0 3914 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3915 # can be detected and how.
3916 cat >conftest.$ac_ext <<_ACEOF
3917/* confdefs.h. */
3918_ACEOF
3919cat confdefs.h >>conftest.$ac_ext
3920cat >>conftest.$ac_ext <<_ACEOF
3921/* end confdefs.h. */
3922#include <ac_nonexistent.h>
3923_ACEOF
ca81d7a0
JD
3924if { (ac_try="$ac_cpp conftest.$ac_ext"
3925case "(($ac_try" in
3926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3927 *) ac_try_echo=$ac_try;;
3928esac
7bbec45b 3929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 3930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3931 ac_status=$?
3932 grep -v '^ *+' conftest.er1 >conftest.err
3933 rm -f conftest.er1
3934 cat conftest.err >&5
7bbec45b 3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3936 (exit $ac_status); } >/dev/null && {
3937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3938 test ! -s conftest.err
3939 }; then
e143ad11
AS
3940 # Broken: success on invalid input.
3941continue
3942else
7bbec45b 3943 echo "$as_me: failed program was:" >&5
e143ad11
AS
3944sed 's/^/| /' conftest.$ac_ext >&5
3945
3946 # Passes both tests.
3947ac_preproc_ok=:
3948break
3949fi
ca81d7a0 3950
e143ad11
AS
3951rm -f conftest.err conftest.$ac_ext
3952
3953done
3954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3955rm -f conftest.err conftest.$ac_ext
3956if $ac_preproc_ok; then
3957 :
3958else
7bbec45b 3959 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
e143ad11 3960See \`config.log' for more details." >&5
7bbec45b 3961echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
e143ad11 3962See \`config.log' for more details." >&2;}
b0448899 3963 { (exit 1); exit 1; }; }
e143ad11
AS
3964fi
3965
3966ac_ext=c
3967ac_cpp='$CPP $CPPFLAGS'
3968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3970ac_compiler_gnu=$ac_cv_c_compiler_gnu
3971
3972
7bbec45b
CY
3973{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3974echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
b0448899 3975if test "${ac_cv_path_GREP+set}" = set; then
7bbec45b
CY
3976 echo $ECHO_N "(cached) $ECHO_C" >&6
3977else
3978 # Extract the first word of "grep ggrep" to use in msg output
3979if test -z "$GREP"; then
3980set dummy grep ggrep; ac_prog_name=$2
3981if test "${ac_cv_path_GREP+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
ca81d7a0
JD
3983else
3984 ac_path_GREP_found=false
7bbec45b
CY
3985# Loop through the user's path and test for each of PROGNAME-LIST
3986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
3987for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3988do
3989 IFS=$as_save_IFS
3990 test -z "$as_dir" && as_dir=.
3991 for ac_prog in grep ggrep; do
7bbec45b
CY
3992 for ac_exec_ext in '' $ac_executable_extensions; do
3993 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3994 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3995 # Check for GNU ac_path_GREP and select it if it is found.
ca81d7a0
JD
3996 # Check for GNU $ac_path_GREP
3997case `"$ac_path_GREP" --version 2>&1` in
3998*GNU*)
3999 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4000*)
4001 ac_count=0
7bbec45b 4002 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
ca81d7a0
JD
4003 while :
4004 do
4005 cat "conftest.in" "conftest.in" >"conftest.tmp"
4006 mv "conftest.tmp" "conftest.in"
4007 cp "conftest.in" "conftest.nl"
7bbec45b 4008 echo 'GREP' >> "conftest.nl"
ca81d7a0
JD
4009 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4010 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4011 ac_count=`expr $ac_count + 1`
4012 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4013 # Best one so far, save it but keep looking for a better one
4014 ac_cv_path_GREP="$ac_path_GREP"
4015 ac_path_GREP_max=$ac_count
4016 fi
4017 # 10*(2^10) chars as input seems more than enough
4018 test $ac_count -gt 10 && break
4019 done
4020 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4021esac
4022
7bbec45b
CY
4023
4024 $ac_path_GREP_found && break 3
ca81d7a0
JD
4025 done
4026done
7bbec45b
CY
4027
4028done
ca81d7a0 4029IFS=$as_save_IFS
7bbec45b
CY
4030
4031
4032fi
4033
4034GREP="$ac_cv_path_GREP"
4035if test -z "$GREP"; then
4036 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4037echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
ca81d7a0 4038 { (exit 1); exit 1; }; }
7bbec45b
CY
4039fi
4040
ca81d7a0
JD
4041else
4042 ac_cv_path_GREP=$GREP
4043fi
4044
7bbec45b 4045
ca81d7a0 4046fi
7bbec45b
CY
4047{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4048echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
ca81d7a0
JD
4049 GREP="$ac_cv_path_GREP"
4050
4051
7bbec45b
CY
4052{ echo "$as_me:$LINENO: checking for egrep" >&5
4053echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
ca81d7a0 4054if test "${ac_cv_path_EGREP+set}" = set; then
7bbec45b 4055 echo $ECHO_N "(cached) $ECHO_C" >&6
e143ad11 4056else
ca81d7a0
JD
4057 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4058 then ac_cv_path_EGREP="$GREP -E"
4059 else
7bbec45b
CY
4060 # Extract the first word of "egrep" to use in msg output
4061if test -z "$EGREP"; then
4062set dummy egrep; ac_prog_name=$2
4063if test "${ac_cv_path_EGREP+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
4065else
ca81d7a0 4066 ac_path_EGREP_found=false
7bbec45b
CY
4067# Loop through the user's path and test for each of PROGNAME-LIST
4068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
4069for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
4073 for ac_prog in egrep; do
7bbec45b
CY
4074 for ac_exec_ext in '' $ac_executable_extensions; do
4075 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4076 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4077 # Check for GNU ac_path_EGREP and select it if it is found.
ca81d7a0
JD
4078 # Check for GNU $ac_path_EGREP
4079case `"$ac_path_EGREP" --version 2>&1` in
4080*GNU*)
4081 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4082*)
4083 ac_count=0
7bbec45b 4084 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
ca81d7a0
JD
4085 while :
4086 do
4087 cat "conftest.in" "conftest.in" >"conftest.tmp"
4088 mv "conftest.tmp" "conftest.in"
4089 cp "conftest.in" "conftest.nl"
7bbec45b 4090 echo 'EGREP' >> "conftest.nl"
ca81d7a0
JD
4091 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4092 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4093 ac_count=`expr $ac_count + 1`
4094 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4095 # Best one so far, save it but keep looking for a better one
4096 ac_cv_path_EGREP="$ac_path_EGREP"
4097 ac_path_EGREP_max=$ac_count
e143ad11 4098 fi
ca81d7a0
JD
4099 # 10*(2^10) chars as input seems more than enough
4100 test $ac_count -gt 10 && break
4101 done
4102 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4103esac
4104
7bbec45b
CY
4105
4106 $ac_path_EGREP_found && break 3
ca81d7a0
JD
4107 done
4108done
7bbec45b
CY
4109
4110done
ca81d7a0 4111IFS=$as_save_IFS
7bbec45b
CY
4112
4113
4114fi
4115
4116EGREP="$ac_cv_path_EGREP"
4117if test -z "$EGREP"; then
4118 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4119echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
ca81d7a0 4120 { (exit 1); exit 1; }; }
7bbec45b
CY
4121fi
4122
ca81d7a0
JD
4123else
4124 ac_cv_path_EGREP=$EGREP
4125fi
e143ad11 4126
7bbec45b 4127
ca81d7a0 4128 fi
8eeae1c9 4129fi
7bbec45b
CY
4130{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4131echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
ca81d7a0 4132 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4133
4134
7bbec45b
CY
4135
4136{ echo "$as_me:$LINENO: checking for AIX" >&5
4137echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
4138cat >conftest.$ac_ext <<_ACEOF
4139/* confdefs.h. */
4140_ACEOF
4141cat confdefs.h >>conftest.$ac_ext
4142cat >>conftest.$ac_ext <<_ACEOF
4143/* end confdefs.h. */
4144#ifdef _AIX
4145 yes
4146#endif
4147
4148_ACEOF
4149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4150 $EGREP "yes" >/dev/null 2>&1; then
4151 { echo "$as_me:$LINENO: result: yes" >&5
4152echo "${ECHO_T}yes" >&6; }
4153cat >>confdefs.h <<\_ACEOF
4154#define _ALL_SOURCE 1
4155_ACEOF
4156
4157else
4158 { echo "$as_me:$LINENO: result: no" >&5
4159echo "${ECHO_T}no" >&6; }
4160fi
4161rm -f conftest*
4162
4163
4164{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4165echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
a51f4969 4166if test "${ac_cv_header_stdc+set}" = set; then
7bbec45b 4167 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4168else
4169 cat >conftest.$ac_ext <<_ACEOF
4170/* confdefs.h. */
4171_ACEOF
4172cat confdefs.h >>conftest.$ac_ext
4173cat >>conftest.$ac_ext <<_ACEOF
4174/* end confdefs.h. */
4175#include <stdlib.h>
4176#include <stdarg.h>
4177#include <string.h>
4178#include <float.h>
4179
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
4188rm -f conftest.$ac_objext
4189if { (ac_try="$ac_compile"
4190case "(($ac_try" in
4191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192 *) ac_try_echo=$ac_try;;
4193esac
7bbec45b 4194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4195 (eval "$ac_compile") 2>conftest.er1
4196 ac_status=$?
4197 grep -v '^ *+' conftest.er1 >conftest.err
4198 rm -f conftest.er1
4199 cat conftest.err >&5
7bbec45b 4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4201 (exit $ac_status); } && {
4202 test -z "$ac_c_werror_flag" ||
4203 test ! -s conftest.err
4204 } && test -s conftest.$ac_objext; then
4205 ac_cv_header_stdc=yes
4206else
7bbec45b 4207 echo "$as_me: failed program was:" >&5
a51f4969
SM
4208sed 's/^/| /' conftest.$ac_ext >&5
4209
4210 ac_cv_header_stdc=no
4211fi
4212
4213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4214
4215if test $ac_cv_header_stdc = yes; then
4216 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4217 cat >conftest.$ac_ext <<_ACEOF
4218/* confdefs.h. */
4219_ACEOF
4220cat confdefs.h >>conftest.$ac_ext
4221cat >>conftest.$ac_ext <<_ACEOF
4222/* end confdefs.h. */
4223#include <string.h>
4224
4225_ACEOF
4226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4227 $EGREP "memchr" >/dev/null 2>&1; then
4228 :
4229else
4230 ac_cv_header_stdc=no
4231fi
4232rm -f conftest*
4233
4234fi
4235
4236if test $ac_cv_header_stdc = yes; then
4237 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4238 cat >conftest.$ac_ext <<_ACEOF
4239/* confdefs.h. */
4240_ACEOF
4241cat confdefs.h >>conftest.$ac_ext
4242cat >>conftest.$ac_ext <<_ACEOF
4243/* end confdefs.h. */
4244#include <stdlib.h>
4245
4246_ACEOF
4247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4248 $EGREP "free" >/dev/null 2>&1; then
4249 :
4250else
4251 ac_cv_header_stdc=no
4252fi
4253rm -f conftest*
4254
4255fi
4256
4257if test $ac_cv_header_stdc = yes; then
4258 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4259 if test "$cross_compiling" = yes; then
4260 :
4261else
4262 cat >conftest.$ac_ext <<_ACEOF
4263/* confdefs.h. */
4264_ACEOF
4265cat confdefs.h >>conftest.$ac_ext
4266cat >>conftest.$ac_ext <<_ACEOF
4267/* end confdefs.h. */
4268#include <ctype.h>
4269#include <stdlib.h>
4270#if ((' ' & 0x0FF) == 0x020)
4271# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4272# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4273#else
4274# define ISLOWER(c) \
4275 (('a' <= (c) && (c) <= 'i') \
4276 || ('j' <= (c) && (c) <= 'r') \
4277 || ('s' <= (c) && (c) <= 'z'))
4278# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4279#endif
4280
4281#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4282int
4283main ()
4284{
4285 int i;
4286 for (i = 0; i < 256; i++)
4287 if (XOR (islower (i), ISLOWER (i))
4288 || toupper (i) != TOUPPER (i))
4289 return 2;
4290 return 0;
4291}
4292_ACEOF
4293rm -f conftest$ac_exeext
4294if { (ac_try="$ac_link"
4295case "(($ac_try" in
4296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4297 *) ac_try_echo=$ac_try;;
4298esac
7bbec45b 4299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4300 (eval "$ac_link") 2>&5
4301 ac_status=$?
7bbec45b 4302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4304 { (case "(($ac_try" in
4305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4306 *) ac_try_echo=$ac_try;;
4307esac
7bbec45b 4308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4309 (eval "$ac_try") 2>&5
4310 ac_status=$?
7bbec45b 4311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4312 (exit $ac_status); }; }; then
4313 :
4314else
7bbec45b
CY
4315 echo "$as_me: program exited with status $ac_status" >&5
4316echo "$as_me: failed program was:" >&5
a51f4969
SM
4317sed 's/^/| /' conftest.$ac_ext >&5
4318
4319( exit $ac_status )
4320ac_cv_header_stdc=no
4321fi
4322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4323fi
4324
4325
4326fi
4327fi
7bbec45b
CY
4328{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4329echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
a51f4969
SM
4330if test $ac_cv_header_stdc = yes; then
4331
4332cat >>confdefs.h <<\_ACEOF
4333#define STDC_HEADERS 1
4334_ACEOF
4335
4336fi
4337
4338# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4349 inttypes.h stdint.h unistd.h
4350do
7bbec45b
CY
4351as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4352{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
a51f4969 4354if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 4355 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4356else
4357 cat >conftest.$ac_ext <<_ACEOF
4358/* confdefs.h. */
4359_ACEOF
4360cat confdefs.h >>conftest.$ac_ext
4361cat >>conftest.$ac_ext <<_ACEOF
4362/* end confdefs.h. */
4363$ac_includes_default
4364
4365#include <$ac_header>
4366_ACEOF
4367rm -f conftest.$ac_objext
4368if { (ac_try="$ac_compile"
4369case "(($ac_try" in
4370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4371 *) ac_try_echo=$ac_try;;
4372esac
7bbec45b 4373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4374 (eval "$ac_compile") 2>conftest.er1
4375 ac_status=$?
4376 grep -v '^ *+' conftest.er1 >conftest.err
4377 rm -f conftest.er1
4378 cat conftest.err >&5
7bbec45b 4379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4380 (exit $ac_status); } && {
4381 test -z "$ac_c_werror_flag" ||
4382 test ! -s conftest.err
4383 } && test -s conftest.$ac_objext; then
4384 eval "$as_ac_Header=yes"
4385else
7bbec45b 4386 echo "$as_me: failed program was:" >&5
a51f4969
SM
4387sed 's/^/| /' conftest.$ac_ext >&5
4388
4389 eval "$as_ac_Header=no"
4390fi
4391
4392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4393fi
7bbec45b
CY
4394ac_res=`eval echo '${'$as_ac_Header'}'`
4395 { echo "$as_me:$LINENO: result: $ac_res" >&5
4396echo "${ECHO_T}$ac_res" >&6; }
4397if test `eval echo '${'$as_ac_Header'}'` = yes; then
a51f4969 4398 cat >>confdefs.h <<_ACEOF
7bbec45b 4399#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a51f4969
SM
4400_ACEOF
4401
4402fi
4403
4404done
4405
4406
4407if test "${ac_cv_header_minix_config_h+set}" = set; then
7bbec45b
CY
4408 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4409echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4410if test "${ac_cv_header_minix_config_h+set}" = set; then
4411 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969 4412fi
7bbec45b
CY
4413{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4414echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
a51f4969
SM
4415else
4416 # Is the header compilable?
7bbec45b
CY
4417{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4418echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
a51f4969
SM
4419cat >conftest.$ac_ext <<_ACEOF
4420/* confdefs.h. */
4421_ACEOF
4422cat confdefs.h >>conftest.$ac_ext
4423cat >>conftest.$ac_ext <<_ACEOF
4424/* end confdefs.h. */
4425$ac_includes_default
4426#include <minix/config.h>
4427_ACEOF
4428rm -f conftest.$ac_objext
4429if { (ac_try="$ac_compile"
4430case "(($ac_try" in
4431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4432 *) ac_try_echo=$ac_try;;
4433esac
7bbec45b 4434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4435 (eval "$ac_compile") 2>conftest.er1
4436 ac_status=$?
4437 grep -v '^ *+' conftest.er1 >conftest.err
4438 rm -f conftest.er1
4439 cat conftest.err >&5
7bbec45b 4440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4441 (exit $ac_status); } && {
4442 test -z "$ac_c_werror_flag" ||
4443 test ! -s conftest.err
4444 } && test -s conftest.$ac_objext; then
4445 ac_header_compiler=yes
4446else
7bbec45b 4447 echo "$as_me: failed program was:" >&5
a51f4969
SM
4448sed 's/^/| /' conftest.$ac_ext >&5
4449
4450 ac_header_compiler=no
4451fi
4452
4453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
4454{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4455echo "${ECHO_T}$ac_header_compiler" >&6; }
a51f4969
SM
4456
4457# Is the header present?
7bbec45b
CY
4458{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4459echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
a51f4969
SM
4460cat >conftest.$ac_ext <<_ACEOF
4461/* confdefs.h. */
4462_ACEOF
4463cat confdefs.h >>conftest.$ac_ext
4464cat >>conftest.$ac_ext <<_ACEOF
4465/* end confdefs.h. */
4466#include <minix/config.h>
4467_ACEOF
4468if { (ac_try="$ac_cpp conftest.$ac_ext"
4469case "(($ac_try" in
4470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4471 *) ac_try_echo=$ac_try;;
4472esac
7bbec45b 4473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4475 ac_status=$?
4476 grep -v '^ *+' conftest.er1 >conftest.err
4477 rm -f conftest.er1
4478 cat conftest.err >&5
7bbec45b 4479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4480 (exit $ac_status); } >/dev/null && {
4481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4482 test ! -s conftest.err
4483 }; then
4484 ac_header_preproc=yes
4485else
7bbec45b 4486 echo "$as_me: failed program was:" >&5
a51f4969
SM
4487sed 's/^/| /' conftest.$ac_ext >&5
4488
4489 ac_header_preproc=no
4490fi
4491
4492rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
4493{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4494echo "${ECHO_T}$ac_header_preproc" >&6; }
a51f4969
SM
4495
4496# So? What about this header?
4497case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4498 yes:no: )
7bbec45b
CY
4499 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4500echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4501 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4502echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
a51f4969
SM
4503 ac_header_preproc=yes
4504 ;;
4505 no:yes:* )
7bbec45b
CY
4506 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4507echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4508 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4509echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4510 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4511echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4512 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4513echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4514 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4515echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4516 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4517echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
a51f4969
SM
4518
4519 ;;
4520esac
7bbec45b
CY
4521{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4522echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
a51f4969 4523if test "${ac_cv_header_minix_config_h+set}" = set; then
7bbec45b 4524 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4525else
4526 ac_cv_header_minix_config_h=$ac_header_preproc
4527fi
7bbec45b
CY
4528{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4529echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
a51f4969
SM
4530
4531fi
b0448899 4532if test $ac_cv_header_minix_config_h = yes; then
a51f4969
SM
4533 MINIX=yes
4534else
4535 MINIX=
4536fi
4537
4538
7bbec45b 4539if test "$MINIX" = yes; then
a51f4969
SM
4540
4541cat >>confdefs.h <<\_ACEOF
4542#define _POSIX_SOURCE 1
4543_ACEOF
4544
4545
4546cat >>confdefs.h <<\_ACEOF
4547#define _POSIX_1_SOURCE 2
4548_ACEOF
4549
4550
4551cat >>confdefs.h <<\_ACEOF
4552#define _MINIX 1
4553_ACEOF
4554
7bbec45b
CY
4555fi
4556
4557
4558
4559
a51f4969 4560
b0448899
CY
4561
4562
7bbec45b
CY
4563
4564
4565
4566
4567 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4568echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
a51f4969 4569if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
7bbec45b 4570 echo $ECHO_N "(cached) $ECHO_C" >&6
a51f4969
SM
4571else
4572 cat >conftest.$ac_ext <<_ACEOF
4573/* confdefs.h. */
4574_ACEOF
4575cat confdefs.h >>conftest.$ac_ext
4576cat >>conftest.$ac_ext <<_ACEOF
4577/* end confdefs.h. */
4578
4579# define __EXTENSIONS__ 1
4580 $ac_includes_default
4581int
4582main ()
4583{
4584
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589rm -f conftest.$ac_objext
4590if { (ac_try="$ac_compile"
4591case "(($ac_try" in
4592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4593 *) ac_try_echo=$ac_try;;
4594esac
7bbec45b 4595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
a51f4969
SM
4596 (eval "$ac_compile") 2>conftest.er1
4597 ac_status=$?
4598 grep -v '^ *+' conftest.er1 >conftest.err
4599 rm -f conftest.er1
4600 cat conftest.err >&5
7bbec45b 4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a51f4969
SM
4602 (exit $ac_status); } && {
4603 test -z "$ac_c_werror_flag" ||
4604 test ! -s conftest.err
4605 } && test -s conftest.$ac_objext; then
4606 ac_cv_safe_to_define___extensions__=yes
4607else
7bbec45b 4608 echo "$as_me: failed program was:" >&5
a51f4969
SM
4609sed 's/^/| /' conftest.$ac_ext >&5
4610
4611 ac_cv_safe_to_define___extensions__=no
4612fi
e143ad11 4613
a51f4969
SM
4614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615fi
7bbec45b
CY
4616{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4617echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
a51f4969
SM
4618 test $ac_cv_safe_to_define___extensions__ = yes &&
4619 cat >>confdefs.h <<\_ACEOF
4620#define __EXTENSIONS__ 1
4621_ACEOF
e143ad11 4622
a51f4969
SM
4623 cat >>confdefs.h <<\_ACEOF
4624#define _POSIX_PTHREAD_SEMANTICS 1
4625_ACEOF
e143ad11 4626
a51f4969
SM
4627 cat >>confdefs.h <<\_ACEOF
4628#define _TANDEM_SOURCE 1
e143ad11
AS
4629_ACEOF
4630
4631
4632
01abe918 4633### Use -Wno-pointer-sign if the compiler supports it
7bbec45b
CY
4634{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4635echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4636SAVE_CFLAGS="$CFLAGS"
4637CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4638cat >conftest.$ac_ext <<_ACEOF
4639/* confdefs.h. */
4640_ACEOF
4641cat confdefs.h >>conftest.$ac_ext
4642cat >>conftest.$ac_ext <<_ACEOF
4643/* end confdefs.h. */
4644
4645int
4646main ()
4647{
4648
4649 ;
4650 return 0;
4651}
4652_ACEOF
4653rm -f conftest.$ac_objext
ca81d7a0
JD
4654if { (ac_try="$ac_compile"
4655case "(($ac_try" in
4656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4657 *) ac_try_echo=$ac_try;;
4658esac
7bbec45b 4659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4660 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4661 ac_status=$?
4662 grep -v '^ *+' conftest.er1 >conftest.err
4663 rm -f conftest.er1
4664 cat conftest.err >&5
7bbec45b 4665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4666 (exit $ac_status); } && {
4667 test -z "$ac_c_werror_flag" ||
4668 test ! -s conftest.err
4669 } && test -s conftest.$ac_objext; then
01abe918
CY
4670 has_option=yes
4671else
7bbec45b 4672 echo "$as_me: failed program was:" >&5
01abe918
CY
4673sed 's/^/| /' conftest.$ac_ext >&5
4674
ca81d7a0 4675 has_option=no
01abe918 4676fi
ca81d7a0
JD
4677
4678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4679if test $has_option = yes; then
4680 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4681fi
7bbec45b
CY
4682{ echo "$as_me:$LINENO: result: $has_option" >&5
4683echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4684CFLAGS="$SAVE_CFLAGS"
4685unset has_option
4686unset SAVE_CFLAGS
4687
6a3a24fa 4688#### Some other nice autoconf tests.
ba4481b5 4689
7bbec45b
CY
4690{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4691echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4692LN_S=$as_ln_s
4693if test "$LN_S" = "ln -s"; then
7bbec45b
CY
4694 { echo "$as_me:$LINENO: result: yes" >&5
4695echo "${ECHO_T}yes" >&6; }
ba4481b5 4696else
7bbec45b
CY
4697 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4698echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4699fi
4700
503d2be0
AS
4701ac_ext=c
4702ac_cpp='$CPP $CPPFLAGS'
4703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4705ac_compiler_gnu=$ac_cv_c_compiler_gnu
7bbec45b
CY
4706{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4707echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4708# On Suns, sometimes $CPP names a directory.
4709if test -n "$CPP" && test -d "$CPP"; then
4710 CPP=
4711fi
4712if test -z "$CPP"; then
503d2be0 4713 if test "${ac_cv_prog_CPP+set}" = set; then
7bbec45b 4714 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
4715else
4716 # Double quotes because CPP needs to be expanded
4717 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4718 do
4719 ac_preproc_ok=false
4720for ac_c_preproc_warn_flag in '' yes
4721do
4722 # Use a header file that comes with gcc, so configuring glibc
4723 # with a fresh cross-compiler works.
19650fd6
AS
4724 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4725 # <limits.h> exists even on freestanding compilers.
ba4481b5 4726 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4727 # not just through cpp. "Syntax error" is here to catch this case.
4728 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4729/* confdefs.h. */
4730_ACEOF
4731cat confdefs.h >>conftest.$ac_ext
4732cat >>conftest.$ac_ext <<_ACEOF
4733/* end confdefs.h. */
4734#ifdef __STDC__
4735# include <limits.h>
4736#else
4737# include <assert.h>
4738#endif
edfaf76d 4739 Syntax error
503d2be0 4740_ACEOF
ca81d7a0
JD
4741if { (ac_try="$ac_cpp conftest.$ac_ext"
4742case "(($ac_try" in
4743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4744 *) ac_try_echo=$ac_try;;
4745esac
7bbec45b 4746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4747 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4748 ac_status=$?
6bae0ccf 4749 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4750 rm -f conftest.er1
4751 cat conftest.err >&5
7bbec45b 4752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4753 (exit $ac_status); } >/dev/null && {
4754 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4755 test ! -s conftest.err
4756 }; then
ba4481b5
DL
4757 :
4758else
7bbec45b 4759 echo "$as_me: failed program was:" >&5
19650fd6
AS
4760sed 's/^/| /' conftest.$ac_ext >&5
4761
503d2be0
AS
4762 # Broken: fails on valid input.
4763continue
4764fi
ca81d7a0 4765
503d2be0
AS
4766rm -f conftest.err conftest.$ac_ext
4767
ca81d7a0 4768 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4769 # can be detected and how.
4770 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4771/* confdefs.h. */
4772_ACEOF
4773cat confdefs.h >>conftest.$ac_ext
4774cat >>conftest.$ac_ext <<_ACEOF
4775/* end confdefs.h. */
503d2be0
AS
4776#include <ac_nonexistent.h>
4777_ACEOF
ca81d7a0
JD
4778if { (ac_try="$ac_cpp conftest.$ac_ext"
4779case "(($ac_try" in
4780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4781 *) ac_try_echo=$ac_try;;
4782esac
7bbec45b 4783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4784 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4785 ac_status=$?
6bae0ccf 4786 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4787 rm -f conftest.er1
4788 cat conftest.err >&5
7bbec45b 4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4790 (exit $ac_status); } >/dev/null && {
4791 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4792 test ! -s conftest.err
4793 }; then
503d2be0
AS
4794 # Broken: success on invalid input.
4795continue
c4bb2108 4796else
7bbec45b 4797 echo "$as_me: failed program was:" >&5
19650fd6
AS
4798sed 's/^/| /' conftest.$ac_ext >&5
4799
503d2be0
AS
4800 # Passes both tests.
4801ac_preproc_ok=:
4802break
4803fi
ca81d7a0 4804
503d2be0
AS
4805rm -f conftest.err conftest.$ac_ext
4806
4807done
4808# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4809rm -f conftest.err conftest.$ac_ext
4810if $ac_preproc_ok; then
4811 break
4812fi
4813
4814 done
4815 ac_cv_prog_CPP=$CPP
4816
4817fi
4818 CPP=$ac_cv_prog_CPP
4819else
4820 ac_cv_prog_CPP=$CPP
4821fi
7bbec45b
CY
4822{ echo "$as_me:$LINENO: result: $CPP" >&5
4823echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4824ac_preproc_ok=false
4825for ac_c_preproc_warn_flag in '' yes
4826do
4827 # Use a header file that comes with gcc, so configuring glibc
4828 # with a fresh cross-compiler works.
19650fd6
AS
4829 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4830 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4831 # On the NeXT, cc -E runs the code through the compiler's parser,
4832 # not just through cpp. "Syntax error" is here to catch this case.
4833 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4834/* confdefs.h. */
4835_ACEOF
4836cat confdefs.h >>conftest.$ac_ext
4837cat >>conftest.$ac_ext <<_ACEOF
4838/* end confdefs.h. */
4839#ifdef __STDC__
4840# include <limits.h>
4841#else
4842# include <assert.h>
4843#endif
edfaf76d 4844 Syntax error
503d2be0 4845_ACEOF
ca81d7a0
JD
4846if { (ac_try="$ac_cpp conftest.$ac_ext"
4847case "(($ac_try" in
4848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4849 *) ac_try_echo=$ac_try;;
4850esac
7bbec45b 4851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4852 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4853 ac_status=$?
6bae0ccf 4854 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4855 rm -f conftest.er1
4856 cat conftest.err >&5
7bbec45b 4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4858 (exit $ac_status); } >/dev/null && {
4859 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4860 test ! -s conftest.err
4861 }; then
ba4481b5
DL
4862 :
4863else
7bbec45b 4864 echo "$as_me: failed program was:" >&5
19650fd6
AS
4865sed 's/^/| /' conftest.$ac_ext >&5
4866
503d2be0
AS
4867 # Broken: fails on valid input.
4868continue
4869fi
ca81d7a0 4870
503d2be0
AS
4871rm -f conftest.err conftest.$ac_ext
4872
ca81d7a0 4873 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4874 # can be detected and how.
4875 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4876/* confdefs.h. */
4877_ACEOF
4878cat confdefs.h >>conftest.$ac_ext
4879cat >>conftest.$ac_ext <<_ACEOF
4880/* end confdefs.h. */
503d2be0
AS
4881#include <ac_nonexistent.h>
4882_ACEOF
ca81d7a0
JD
4883if { (ac_try="$ac_cpp conftest.$ac_ext"
4884case "(($ac_try" in
4885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4886 *) ac_try_echo=$ac_try;;
4887esac
7bbec45b 4888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 4889 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4890 ac_status=$?
6bae0ccf 4891 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4892 rm -f conftest.er1
4893 cat conftest.err >&5
7bbec45b 4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4895 (exit $ac_status); } >/dev/null && {
4896 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4897 test ! -s conftest.err
4898 }; then
503d2be0
AS
4899 # Broken: success on invalid input.
4900continue
4901else
7bbec45b 4902 echo "$as_me: failed program was:" >&5
19650fd6
AS
4903sed 's/^/| /' conftest.$ac_ext >&5
4904
503d2be0
AS
4905 # Passes both tests.
4906ac_preproc_ok=:
4907break
ba4481b5 4908fi
ca81d7a0 4909
503d2be0
AS
4910rm -f conftest.err conftest.$ac_ext
4911
4912done
4913# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4914rm -f conftest.err conftest.$ac_ext
4915if $ac_preproc_ok; then
4916 :
ba4481b5 4917else
7bbec45b 4918 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
19650fd6 4919See \`config.log' for more details." >&5
7bbec45b 4920echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
19650fd6 4921See \`config.log' for more details." >&2;}
b0448899 4922 { (exit 1); exit 1; }; }
ba4481b5 4923fi
503d2be0
AS
4924
4925ac_ext=c
4926ac_cpp='$CPP $CPPFLAGS'
4927ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4928ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4929ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4930
4931# Find a good install program. We prefer a C program (faster),
4932# so one script is as good as another. But avoid the broken or
4933# incompatible versions:
4934# SysV /etc/install, /usr/sbin/install
4935# SunOS /usr/etc/install
4936# IRIX /sbin/install
4937# AIX /bin/install
503d2be0 4938# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4939# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4940# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4941# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4942# OS/2's system install, which has a completely different semantic
ba4481b5 4943# ./install, which can be erroneously created by make from ./install.sh.
7bbec45b
CY
4944{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4945echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4946if test -z "$INSTALL"; then
503d2be0 4947if test "${ac_cv_path_install+set}" = set; then
7bbec45b 4948 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4949else
c0d27fcc
MR
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in $PATH
4952do
4953 IFS=$as_save_IFS
4954 test -z "$as_dir" && as_dir=.
4955 # Account for people who put trailing slashes in PATH elements.
4956case $as_dir/ in
4957 ./ | .// | /cC/* | \
4958 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4959 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4960 /usr/ucb/* ) ;;
4961 *)
4962 # OSF1 and SCO ODT 3.0 have their own names for install.
4963 # Don't use installbsd from OSF since it installs stuff as root
4964 # by default.
4965 for ac_prog in ginstall scoinst install; do
4966 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4967 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4968 if test $ac_prog = install &&
4969 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4970 # AIX install. It has an incompatible calling convention.
4971 :
4972 elif test $ac_prog = install &&
4973 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4974 # program-specific install script used by HP pwplus--don't use.
4975 :
4976 else
7bbec45b
CY
4977 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4978 break 3
edfaf76d
LK
4979 fi
4980 fi
ba4481b5 4981 done
c0d27fcc
MR
4982 done
4983 ;;
4984esac
4985done
ca81d7a0 4986IFS=$as_save_IFS
c0d27fcc 4987
ba4481b5
DL
4988
4989fi
4990 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4991 INSTALL=$ac_cv_path_install
ba4481b5 4992 else
ca81d7a0
JD
4993 # As a last resort, use the slow shell script. Don't cache a
4994 # value for INSTALL within a source directory, because that will
ba4481b5 4995 # break other packages using the cache if that directory is
ca81d7a0 4996 # removed, or if the value is a relative name.
503d2be0 4997 INSTALL=$ac_install_sh
ba4481b5
DL
4998 fi
4999fi
7bbec45b
CY
5000{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5001echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5002
5003# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5004# It thinks the first close brace ends the variable substitution.
5005test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5006
503d2be0 5007test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5008
ba4481b5
DL
5009test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5010
c0d27fcc
MR
5011if test "x$RANLIB" = x; then
5012 if test -n "$ac_tool_prefix"; then
5013 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5014set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7bbec45b
CY
5015{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5016echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5017if test "${ac_cv_prog_RANLIB+set}" = set; then
7bbec45b 5018 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5019else
5020 if test -n "$RANLIB"; then
5021 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5022else
c0d27fcc
MR
5023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
5028 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5029 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5030 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7bbec45b 5031 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5032 break 2
5033 fi
5034done
503d2be0 5035done
ca81d7a0 5036IFS=$as_save_IFS
503d2be0 5037
7397acc4
DL
5038fi
5039fi
503d2be0 5040RANLIB=$ac_cv_prog_RANLIB
7397acc4 5041if test -n "$RANLIB"; then
7bbec45b
CY
5042 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5043echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5044else
7bbec45b
CY
5045 { echo "$as_me:$LINENO: result: no" >&5
5046echo "${ECHO_T}no" >&6; }
503d2be0
AS
5047fi
5048
ca81d7a0 5049
503d2be0
AS
5050fi
5051if test -z "$ac_cv_prog_RANLIB"; then
5052 ac_ct_RANLIB=$RANLIB
5053 # Extract the first word of "ranlib", so it can be a program name with args.
5054set dummy ranlib; ac_word=$2
7bbec45b
CY
5055{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5056echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0 5057if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7bbec45b 5058 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
5059else
5060 if test -n "$ac_ct_RANLIB"; then
5061 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5062else
c0d27fcc
MR
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
5068 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5070 ac_cv_prog_ac_ct_RANLIB="ranlib"
7bbec45b 5071 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5072 break 2
5073 fi
5074done
503d2be0 5075done
ca81d7a0 5076IFS=$as_save_IFS
503d2be0 5077
503d2be0
AS
5078fi
5079fi
5080ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5081if test -n "$ac_ct_RANLIB"; then
7bbec45b
CY
5082 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5083echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5084else
7bbec45b
CY
5085 { echo "$as_me:$LINENO: result: no" >&5
5086echo "${ECHO_T}no" >&6; }
503d2be0
AS
5087fi
5088
ca81d7a0
JD
5089 if test "x$ac_ct_RANLIB" = x; then
5090 RANLIB=":"
5091 else
5092 case $cross_compiling:$ac_tool_warned in
5093yes:)
7bbec45b 5094{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
b0448899
CY
5095whose name does not start with the host triplet. If you think this
5096configuration is useful to you, please write to autoconf@gnu.org." >&5
7bbec45b 5097echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
b0448899
CY
5098whose name does not start with the host triplet. If you think this
5099configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ca81d7a0
JD
5100ac_tool_warned=yes ;;
5101esac
5102 RANLIB=$ac_ct_RANLIB
5103 fi
7397acc4 5104else
503d2be0 5105 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5106fi
5107
5108fi
9e71690e
DK
5109# Extract the first word of "install-info", so it can be a program name with args.
5110set dummy install-info; ac_word=$2
7bbec45b
CY
5111{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5112echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e 5113if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
7bbec45b 5114 echo $ECHO_N "(cached) $ECHO_C" >&6
9e71690e
DK
5115else
5116 case $INSTALL_INFO in
5117 [\\/]* | ?:[\\/]*)
5118 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5119 ;;
5120 *)
5121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124 IFS=$as_save_IFS
5125 test -z "$as_dir" && as_dir=.
5126 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5127 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5128 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 5129 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5130 break 2
5131 fi
5132done
5133done
ca81d7a0 5134IFS=$as_save_IFS
9e71690e
DK
5135
5136 ;;
5137esac
5138fi
5139INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5140if test -n "$INSTALL_INFO"; then
7bbec45b
CY
5141 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5142echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5143else
7bbec45b
CY
5144 { echo "$as_me:$LINENO: result: no" >&5
5145echo "${ECHO_T}no" >&6; }
9e71690e
DK
5146fi
5147
ca81d7a0 5148
9e71690e
DK
5149# Extract the first word of "install-info", so it can be a program name with args.
5150set dummy install-info; ac_word=$2
7bbec45b
CY
5151{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5152echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e 5153if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
7bbec45b 5154 echo $ECHO_N "(cached) $ECHO_C" >&6
9e71690e
DK
5155else
5156 case $INSTALL_INFO in
5157 [\\/]* | ?:[\\/]*)
5158 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5159 ;;
5160 *)
5161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162for as_dir in /usr/sbin
5163do
5164 IFS=$as_save_IFS
5165 test -z "$as_dir" && as_dir=.
5166 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5167 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5168 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 5169 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5170 break 2
5171 fi
5172done
5173done
ca81d7a0 5174IFS=$as_save_IFS
9e71690e
DK
5175
5176 ;;
5177esac
5178fi
5179INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5180if test -n "$INSTALL_INFO"; then
7bbec45b
CY
5181 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5182echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5183else
7bbec45b
CY
5184 { echo "$as_me:$LINENO: result: no" >&5
5185echo "${ECHO_T}no" >&6; }
9e71690e
DK
5186fi
5187
ca81d7a0 5188
9e71690e
DK
5189# Extract the first word of "install-info", so it can be a program name with args.
5190set dummy install-info; ac_word=$2
7bbec45b
CY
5191{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5192echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e 5193if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
7bbec45b 5194 echo $ECHO_N "(cached) $ECHO_C" >&6
9e71690e
DK
5195else
5196 case $INSTALL_INFO in
5197 [\\/]* | ?:[\\/]*)
5198 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5199 ;;
5200 *)
5201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5202for as_dir in /sbin
5203do
5204 IFS=$as_save_IFS
5205 test -z "$as_dir" && as_dir=.
5206 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5207 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5208 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 5209 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5210 break 2
5211 fi
5212done
5213done
ca81d7a0 5214IFS=$as_save_IFS
9e71690e
DK
5215
5216 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5217 ;;
5218esac
5219fi
5220INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5221if test -n "$INSTALL_INFO"; then
7bbec45b
CY
5222 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5223echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5224else
7bbec45b
CY
5225 { echo "$as_me:$LINENO: result: no" >&5
5226echo "${ECHO_T}no" >&6; }
9e71690e
DK
5227fi
5228
ca81d7a0 5229
8ae52ca6
RF
5230# Extract the first word of "gzip", so it can be a program name with args.
5231set dummy gzip; ac_word=$2
7bbec45b
CY
5232{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5234if test "${ac_cv_path_GZIP_PROG+set}" = set; then
7bbec45b 5235 echo $ECHO_N "(cached) $ECHO_C" >&6
8ae52ca6 5236else
46e35e9f 5237 case $GZIP_PROG in
8ae52ca6 5238 [\\/]* | ?:[\\/]*)
46e35e9f 5239 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5240 ;;
5241 *)
5242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5243for as_dir in $PATH
5244do
5245 IFS=$as_save_IFS
5246 test -z "$as_dir" && as_dir=.
5247 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5248 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5249 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 5250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8ae52ca6
RF
5251 break 2
5252 fi
5253done
5254done
ca81d7a0 5255IFS=$as_save_IFS
8ae52ca6
RF
5256
5257 ;;
5258esac
5259fi
46e35e9f 5260GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5261if test -n "$GZIP_PROG"; then
7bbec45b
CY
5262 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5263echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5264else
7bbec45b
CY
5265 { echo "$as_me:$LINENO: result: no" >&5
5266echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5267fi
5268
ba4481b5 5269
c0d27fcc 5270
ca81d7a0 5271
1bb9a689
MB
5272## Need makeinfo >= 4.6 (?) to build the manuals.
5273# Extract the first word of "makeinfo", so it can be a program name with args.
5274set dummy makeinfo; ac_word=$2
7bbec45b
CY
5275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1bb9a689 5277if test "${ac_cv_path_MAKEINFO+set}" = set; then
7bbec45b 5278 echo $ECHO_N "(cached) $ECHO_C" >&6
1bb9a689
MB
5279else
5280 case $MAKEINFO in
5281 [\\/]* | ?:[\\/]*)
5282 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5283 ;;
5284 *)
5285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5286for as_dir in $PATH
5287do
5288 IFS=$as_save_IFS
5289 test -z "$as_dir" && as_dir=.
5290 for ac_exec_ext in '' $ac_executable_extensions; do
5291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5292 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 5293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1bb9a689
MB
5294 break 2
5295 fi
5296done
5297done
5298IFS=$as_save_IFS
5299
5300 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5301 ;;
5302esac
5303fi
5304MAKEINFO=$ac_cv_path_MAKEINFO
5305if test -n "$MAKEINFO"; then
7bbec45b
CY
5306 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5307echo "${ECHO_T}$MAKEINFO" >&6; }
1bb9a689 5308else
7bbec45b
CY
5309 { echo "$as_me:$LINENO: result: no" >&5
5310echo "${ECHO_T}no" >&6; }
1bb9a689
MB
5311fi
5312
5313
5314if test "$MAKEINFO" != "no" && \
d4840f44 5315 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
5316 MAKEINFO=no
5317fi
5318
e1b89931
GM
5319## Makeinfo is unusual. For a released Emacs, the manuals are
5320## pre-built, and not deleted by the normal clean rules. makeinfo is
5321## therefore in the category of "special tools" not normally required, which
5322## configure does not have to check for (eg autoconf itself).
5323## In a CVS checkout on the other hand, the manuals are not included.
5324## So makeinfo is a requirement to build from CVS, and configure
5325## should test for it as it does for any other build requirement.
5326## We use the presence of $srcdir/info/emacs to distinguish a release,
5327## with pre-built manuals, from a CVS checkout.
5328if test "$MAKEINFO" = "no"; then
5329 if test "x${with_makeinfo}" = "xno"; then
5330 MAKEINFO=off
5331 elif ! test -e $srcdir/info/emacs; then
7bbec45b 5332 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
e1b89931 5333source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5334Either install a suitable version of makeinfo, or re-run configure
e1b89931 5335with the \`--without-makeinfo' option to build without the manuals. " >&5
7bbec45b 5336echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
e1b89931 5337source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5338Either install a suitable version of makeinfo, or re-run configure
e1b89931 5339with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5340 { (exit 1); exit 1; }; }
e1b89931 5341 fi
921fbdf0 5342fi
1bb9a689
MB
5343
5344
8e967cf7
MR
5345if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5346then
5347 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5348fi
5349
5350if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5351then
5352 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5353fi
5354
c0d27fcc 5355
fe239f0f 5356late_LDFLAGS=$LDFLAGS
4af002d6 5357if test "$GCC" = yes; then
fe239f0f
AS
5358 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5359else
5360 LDFLAGS="$LDFLAGS -znocombreloc"
5361fi
5362
7bbec45b
CY
5363{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5364echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5365cat >conftest.$ac_ext <<_ACEOF
5366main(){return 0;}
5367_ACEOF
5368rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5369if { (ac_try="$ac_link"
5370case "(($ac_try" in
5371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5372 *) ac_try_echo=$ac_try;;
5373esac
7bbec45b 5374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5375 (eval "$ac_link") 2>conftest.er1
fe239f0f 5376 ac_status=$?
edfaf76d
LK
5377 grep -v '^ *+' conftest.er1 >conftest.err
5378 rm -f conftest.er1
5379 cat conftest.err >&5
7bbec45b 5380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5381 (exit $ac_status); } && {
5382 test -z "$ac_c_werror_flag" ||
5383 test ! -s conftest.err
7bbec45b
CY
5384 } && test -s conftest$ac_exeext &&
5385 $as_test_x conftest$ac_exeext; then
5386 { echo "$as_me:$LINENO: result: yes" >&5
5387echo "${ECHO_T}yes" >&6; }
fe239f0f 5388else
7bbec45b 5389 echo "$as_me: failed program was:" >&5
fe239f0f
AS
5390sed 's/^/| /' conftest.$ac_ext >&5
5391
ca81d7a0 5392 LDFLAGS=$late_LDFLAGS
7bbec45b
CY
5393 { echo "$as_me:$LINENO: result: no" >&5
5394echo "${ECHO_T}no" >&6; }
fe239f0f 5395fi
ca81d7a0 5396
f053c89f 5397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5398 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5399
3b33a005
DL
5400#### Extract some information from the operating system and machine files.
5401
7bbec45b 5402{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5403 - which libraries the lib-src programs will want, and
503d2be0 5404 - whether the GNU malloc routines are usable..." >&5
7bbec45b 5405echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5406 - which libraries the lib-src programs will want, and
503d2be0 5407 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5408
5409### First figure out CFLAGS (which we use for running the compiler here)
5410### and REAL_CFLAGS (which we use for real compilation).
5411### The two are the same except on a few systems, where they are made
5412### different to work around various lossages. For example,
5413### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5414### as implying static linking.
5415
5416### If the CFLAGS env var is specified, we use that value
5417### instead of the default.
5418
5419### It's not important that this name contain the PID; you can't run
5420### two configures in the same directory and have anything work
5421### anyway.
5422tempcname="conftest.c"
5423
5424echo '
5425#include "'${srcdir}'/src/'${opsysfile}'"
5426#include "'${srcdir}'/src/'${machfile}'"
5427#ifndef LIBS_MACHINE
5428#define LIBS_MACHINE
5429#endif
5430#ifndef LIBS_SYSTEM
5431#define LIBS_SYSTEM
5432#endif
5433#ifndef C_SWITCH_SYSTEM
5434#define C_SWITCH_SYSTEM
5435#endif
5436#ifndef C_SWITCH_MACHINE
5437#define C_SWITCH_MACHINE
5438#endif
5439configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5440configure___ c_switch_system=C_SWITCH_SYSTEM
5441configure___ c_switch_machine=C_SWITCH_MACHINE
5442
5443#ifndef LIB_X11_LIB
5444#define LIB_X11_LIB -lX11
5445#endif
5446
3b33a005
DL
5447#ifndef LIBX11_SYSTEM
5448#define LIBX11_SYSTEM
5449#endif
9d2818d6 5450configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5451
5452#ifdef UNEXEC
5453configure___ unexec=UNEXEC
5454#else
5455configure___ unexec=unexec.o
5456#endif
5457
5458#ifdef SYSTEM_MALLOC
5459configure___ system_malloc=yes
5460#else
5461configure___ system_malloc=no
5462#endif
5463
ef9e4345
GM
5464#ifdef USE_MMAP_FOR_BUFFERS
5465configure___ use_mmap_for_buffers=yes
73b77ee5 5466#else
ef9e4345 5467configure___ use_mmap_for_buffers=no
73b77ee5
GM
5468#endif
5469
3b33a005
DL
5470#ifndef C_DEBUG_SWITCH
5471#define C_DEBUG_SWITCH -g
5472#endif
5473
5474#ifndef C_OPTIMIZE_SWITCH
5475#ifdef __GNUC__
5476#define C_OPTIMIZE_SWITCH -O2
5477#else
5478#define C_OPTIMIZE_SWITCH -O
5479#endif
5480#endif
5481
01abe918
CY
5482#ifndef C_WARNINGS_SWITCH
5483#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5484#endif
5485
3b33a005
DL
5486#ifndef LD_SWITCH_MACHINE
5487#define LD_SWITCH_MACHINE
5488#endif
5489
5490#ifndef LD_SWITCH_SYSTEM
5491#define LD_SWITCH_SYSTEM
5492#endif
5493
5494#ifndef LD_SWITCH_X_SITE_AUX
5495#define LD_SWITCH_X_SITE_AUX
503d2be0 5496#endif
3b33a005
DL
5497
5498configure___ ld_switch_system=LD_SWITCH_SYSTEM
5499configure___ ld_switch_machine=LD_SWITCH_MACHINE
5500
5501#ifdef THIS_IS_CONFIGURE
5502
5503/* Get the CFLAGS for tests in configure. */
5504#ifdef __GNUC__
5505configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5506#else
5507configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5508#endif
5509
5510#else /* not THIS_IS_CONFIGURE */
5511
5512/* Get the CFLAGS for real compilation. */
5513#ifdef __GNUC__
01abe918 5514configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5515#else
5516configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5517#endif
5518
5519#endif /* not THIS_IS_CONFIGURE */
5520' > ${tempcname}
5521
5522# The value of CPP is a quoted variable reference, so we need to do this
5523# to get its actual value...
5524CPP=`eval "echo $CPP"`
5525eval `${CPP} -Isrc ${tempcname} \
5526 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5527if test "x$SPECIFIED_CFLAGS" = x; then
5528 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5529 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5530else
5531 REAL_CFLAGS="$CFLAGS"
5532fi
5533rm ${tempcname}
5534
5535ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5536
5537### Make sure subsequent tests use flags consistent with the build flags.
5538
5539if test x"${OVERRIDE_CPPFLAGS}" != x; then
5540 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5541else
5542 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5543fi
5544
6bae0ccf
DL
5545
5546
ca81d7a0 5547# Check whether --enable-largefile was given.
f4988be7 5548if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5549 enableval=$enable_largefile;
5550fi
f4988be7 5551
503d2be0 5552if test "$enable_largefile" != no; then
f4988be7 5553
7bbec45b
CY
5554 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5555echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0 5556if test "${ac_cv_sys_largefile_CC+set}" = set; then
7bbec45b 5557 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5558else
f4988be7 5559 ac_cv_sys_largefile_CC=no
503d2be0
AS
5560 if test "$GCC" != yes; then
5561 ac_save_CC=$CC
5562 while :; do
ca81d7a0
JD
5563 # IRIX 6.2 and later do not support large files by default,
5564 # so use the C compiler's -n32 option if that helps.
edfaf76d 5565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5566/* confdefs.h. */
5567_ACEOF
5568cat confdefs.h >>conftest.$ac_ext
5569cat >>conftest.$ac_ext <<_ACEOF
5570/* end confdefs.h. */
f4988be7 5571#include <sys/types.h>
503d2be0
AS
5572 /* Check that off_t can represent 2**63 - 1 correctly.
5573 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5574 since some C++ compilers masquerading as C compilers
5575 incorrectly reject 9223372036854775807. */
5576#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5577 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5578 && LARGE_OFF_T % 2147483647 == 1)
5579 ? 1 : -1];
5580int
5581main ()
5582{
f4988be7 5583
503d2be0
AS
5584 ;
5585 return 0;
5586}
5587_ACEOF
ca81d7a0
JD
5588 rm -f conftest.$ac_objext
5589if { (ac_try="$ac_compile"
5590case "(($ac_try" in
5591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5592 *) ac_try_echo=$ac_try;;
5593esac
7bbec45b 5594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5595 (eval "$ac_compile") 2>conftest.er1
503d2be0 5596 ac_status=$?
edfaf76d
LK
5597 grep -v '^ *+' conftest.er1 >conftest.err
5598 rm -f conftest.er1
5599 cat conftest.err >&5
7bbec45b 5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5601 (exit $ac_status); } && {
5602 test -z "$ac_c_werror_flag" ||
5603 test ! -s conftest.err
5604 } && test -s conftest.$ac_objext; then
503d2be0 5605 break
b192d653 5606else
7bbec45b 5607 echo "$as_me: failed program was:" >&5
19650fd6
AS
5608sed 's/^/| /' conftest.$ac_ext >&5
5609
ca81d7a0 5610
503d2be0 5611fi
ca81d7a0
JD
5612
5613rm -f core conftest.err conftest.$ac_objext
5614 CC="$CC -n32"
5615 rm -f conftest.$ac_objext
5616if { (ac_try="$ac_compile"
5617case "(($ac_try" in
5618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5619 *) ac_try_echo=$ac_try;;
5620esac
7bbec45b 5621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5622 (eval "$ac_compile") 2>conftest.er1
503d2be0 5623 ac_status=$?
edfaf76d
LK
5624 grep -v '^ *+' conftest.er1 >conftest.err
5625 rm -f conftest.er1
5626 cat conftest.err >&5
7bbec45b 5627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5628 (exit $ac_status); } && {
5629 test -z "$ac_c_werror_flag" ||
5630 test ! -s conftest.err
5631 } && test -s conftest.$ac_objext; then
503d2be0
AS
5632 ac_cv_sys_largefile_CC=' -n32'; break
5633else
7bbec45b 5634 echo "$as_me: failed program was:" >&5
19650fd6
AS
5635sed 's/^/| /' conftest.$ac_ext >&5
5636
ca81d7a0 5637
503d2be0 5638fi
ca81d7a0
JD
5639
5640rm -f core conftest.err conftest.$ac_objext
edfaf76d 5641 break
503d2be0
AS
5642 done
5643 CC=$ac_save_CC
5644 rm -f conftest.$ac_ext
5645 fi
b192d653 5646fi
7bbec45b
CY
5647{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5648echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5649 if test "$ac_cv_sys_largefile_CC" != no; then
5650 CC=$CC$ac_cv_sys_largefile_CC
5651 fi
b192d653 5652
7bbec45b
CY
5653 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5654echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0 5655if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7bbec45b 5656 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5657else
503d2be0 5658 while :; do
503d2be0 5659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5660/* confdefs.h. */
5661_ACEOF
5662cat confdefs.h >>conftest.$ac_ext
5663cat >>conftest.$ac_ext <<_ACEOF
5664/* end confdefs.h. */
f4988be7 5665#include <sys/types.h>
503d2be0
AS
5666 /* Check that off_t can represent 2**63 - 1 correctly.
5667 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5668 since some C++ compilers masquerading as C compilers
5669 incorrectly reject 9223372036854775807. */
5670#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5671 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5672 && LARGE_OFF_T % 2147483647 == 1)
5673 ? 1 : -1];
5674int
5675main ()
5676{
f4988be7 5677
503d2be0
AS
5678 ;
5679 return 0;
5680}
5681_ACEOF
5682rm -f conftest.$ac_objext
ca81d7a0
JD
5683if { (ac_try="$ac_compile"
5684case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
7bbec45b 5688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5689 (eval "$ac_compile") 2>conftest.er1
503d2be0 5690 ac_status=$?
edfaf76d
LK
5691 grep -v '^ *+' conftest.er1 >conftest.err
5692 rm -f conftest.er1
5693 cat conftest.err >&5
7bbec45b 5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5695 (exit $ac_status); } && {
5696 test -z "$ac_c_werror_flag" ||
5697 test ! -s conftest.err
5698 } && test -s conftest.$ac_objext; then
5699 ac_cv_sys_file_offset_bits=no; break
f4988be7 5700else
7bbec45b 5701 echo "$as_me: failed program was:" >&5
19650fd6
AS
5702sed 's/^/| /' conftest.$ac_ext >&5
5703
ca81d7a0 5704
503d2be0 5705fi
ca81d7a0
JD
5706
5707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5708 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
f4988be7
GM
5714#define _FILE_OFFSET_BITS 64
5715#include <sys/types.h>
503d2be0
AS
5716 /* Check that off_t can represent 2**63 - 1 correctly.
5717 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5718 since some C++ compilers masquerading as C compilers
5719 incorrectly reject 9223372036854775807. */
5720#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5721 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5722 && LARGE_OFF_T % 2147483647 == 1)
5723 ? 1 : -1];
5724int
5725main ()
5726{
5727
5728 ;
5729 return 0;
5730}
5731_ACEOF
5732rm -f conftest.$ac_objext
ca81d7a0
JD
5733if { (ac_try="$ac_compile"
5734case "(($ac_try" in
5735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5736 *) ac_try_echo=$ac_try;;
5737esac
7bbec45b 5738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5739 (eval "$ac_compile") 2>conftest.er1
503d2be0 5740 ac_status=$?
edfaf76d
LK
5741 grep -v '^ *+' conftest.er1 >conftest.err
5742 rm -f conftest.er1
5743 cat conftest.err >&5
7bbec45b 5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5745 (exit $ac_status); } && {
5746 test -z "$ac_c_werror_flag" ||
5747 test ! -s conftest.err
5748 } && test -s conftest.$ac_objext; then
503d2be0
AS
5749 ac_cv_sys_file_offset_bits=64; break
5750else
7bbec45b 5751 echo "$as_me: failed program was:" >&5
19650fd6
AS
5752sed 's/^/| /' conftest.$ac_ext >&5
5753
ca81d7a0 5754
503d2be0 5755fi
ca81d7a0
JD
5756
5757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5758 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5759 break
5760done
ba4481b5 5761fi
7bbec45b
CY
5762{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5763echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5764case $ac_cv_sys_file_offset_bits in #(
5765 no | unknown) ;;
5766 *)
c0d27fcc 5767cat >>confdefs.h <<_ACEOF
f4988be7 5768#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5769_ACEOF
f053c89f
CY
5770;;
5771esac
7bbec45b 5772rm -f conftest*
f053c89f 5773 if test $ac_cv_sys_file_offset_bits = unknown; then
7bbec45b
CY
5774 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5775echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0 5776if test "${ac_cv_sys_large_files+set}" = set; then
7bbec45b 5777 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5778else
503d2be0 5779 while :; do
503d2be0 5780 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5781/* confdefs.h. */
5782_ACEOF
5783cat confdefs.h >>conftest.$ac_ext
5784cat >>conftest.$ac_ext <<_ACEOF
5785/* end confdefs.h. */
503d2be0
AS
5786#include <sys/types.h>
5787 /* Check that off_t can represent 2**63 - 1 correctly.
5788 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5789 since some C++ compilers masquerading as C compilers
5790 incorrectly reject 9223372036854775807. */
5791#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5792 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5793 && LARGE_OFF_T % 2147483647 == 1)
5794 ? 1 : -1];
5795int
5796main ()
5797{
ba4481b5 5798
503d2be0
AS
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803rm -f conftest.$ac_objext
ca81d7a0
JD
5804if { (ac_try="$ac_compile"
5805case "(($ac_try" in
5806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5807 *) ac_try_echo=$ac_try;;
5808esac
7bbec45b 5809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5810 (eval "$ac_compile") 2>conftest.er1
503d2be0 5811 ac_status=$?
edfaf76d
LK
5812 grep -v '^ *+' conftest.er1 >conftest.err
5813 rm -f conftest.er1
5814 cat conftest.err >&5
7bbec45b 5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5816 (exit $ac_status); } && {
5817 test -z "$ac_c_werror_flag" ||
5818 test ! -s conftest.err
5819 } && test -s conftest.$ac_objext; then
5820 ac_cv_sys_large_files=no; break
ba4481b5 5821else
7bbec45b 5822 echo "$as_me: failed program was:" >&5
19650fd6
AS
5823sed 's/^/| /' conftest.$ac_ext >&5
5824
ca81d7a0 5825
503d2be0 5826fi
ca81d7a0
JD
5827
5828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5829 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5830/* confdefs.h. */
5831_ACEOF
5832cat confdefs.h >>conftest.$ac_ext
5833cat >>conftest.$ac_ext <<_ACEOF
5834/* end confdefs.h. */
f4988be7 5835#define _LARGE_FILES 1
503d2be0
AS
5836#include <sys/types.h>
5837 /* Check that off_t can represent 2**63 - 1 correctly.
5838 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5839 since some C++ compilers masquerading as C compilers
5840 incorrectly reject 9223372036854775807. */
5841#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5842 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5843 && LARGE_OFF_T % 2147483647 == 1)
5844 ? 1 : -1];
5845int
5846main ()
5847{
f4988be7 5848
503d2be0
AS
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
ca81d7a0
JD
5854if { (ac_try="$ac_compile"
5855case "(($ac_try" in
5856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5857 *) ac_try_echo=$ac_try;;
5858esac
7bbec45b 5859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5860 (eval "$ac_compile") 2>conftest.er1
503d2be0 5861 ac_status=$?
edfaf76d
LK
5862 grep -v '^ *+' conftest.er1 >conftest.err
5863 rm -f conftest.er1
5864 cat conftest.err >&5
7bbec45b 5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5866 (exit $ac_status); } && {
5867 test -z "$ac_c_werror_flag" ||
5868 test ! -s conftest.err
5869 } && test -s conftest.$ac_objext; then
503d2be0
AS
5870 ac_cv_sys_large_files=1; break
5871else
7bbec45b 5872 echo "$as_me: failed program was:" >&5
19650fd6
AS
5873sed 's/^/| /' conftest.$ac_ext >&5
5874
ca81d7a0 5875
503d2be0 5876fi
ca81d7a0
JD
5877
5878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5879 ac_cv_sys_large_files=unknown
503d2be0
AS
5880 break
5881done
ba4481b5 5882fi
7bbec45b
CY
5883{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5884echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5885case $ac_cv_sys_large_files in #(
5886 no | unknown) ;;
5887 *)
c0d27fcc 5888cat >>confdefs.h <<_ACEOF
f4988be7 5889#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5890_ACEOF
f053c89f
CY
5891;;
5892esac
7bbec45b 5893rm -f conftest*
f053c89f 5894 fi
503d2be0 5895fi
ba4481b5 5896
c0d27fcc 5897
439f58ee 5898
55e6d9b2 5899### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888 5900### be located in either /usr/lib64 or /usr/lib.
076f0c7d
GM
5901### In some rare cases, /usr/lib64 exists but does not contain the
5902### relevant files (bug#1287). Hence test for crtn.o.
bc5d9888 5903case "${canonical}" in
55e6d9b2 5904 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
076f0c7d 5905 if test -e /usr/lib64/crtn.o; then
bc5d9888
CY
5906
5907cat >>confdefs.h <<\_ACEOF
55e6d9b2 5908#define HAVE_LIB64_DIR 1
bc5d9888
CY
5909_ACEOF
5910
5911fi
5912esac
5913
439f58ee
JD
5914
5915
5916
2c9dccc9
PJ
5917if test "${with_sound}" != "no"; then
5918 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5919
5920
5921
5922for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5923do
7bbec45b 5924as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 5925if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
5926 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5927echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 5928if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 5929 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 5930fi
7bbec45b
CY
5931ac_res=`eval echo '${'$as_ac_Header'}'`
5932 { echo "$as_me:$LINENO: result: $ac_res" >&5
5933echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5934else
5935 # Is the header compilable?
7bbec45b
CY
5936{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5937echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5938cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5939/* confdefs.h. */
5940_ACEOF
5941cat confdefs.h >>conftest.$ac_ext
5942cat >>conftest.$ac_ext <<_ACEOF
5943/* end confdefs.h. */
c0d27fcc 5944$ac_includes_default
98418dba 5945#include <$ac_header>
503d2be0 5946_ACEOF
c0d27fcc 5947rm -f conftest.$ac_objext
ca81d7a0
JD
5948if { (ac_try="$ac_compile"
5949case "(($ac_try" in
5950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5951 *) ac_try_echo=$ac_try;;
5952esac
7bbec45b 5953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5954 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5955 ac_status=$?
edfaf76d
LK
5956 grep -v '^ *+' conftest.er1 >conftest.err
5957 rm -f conftest.er1
5958 cat conftest.err >&5
7bbec45b 5959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5960 (exit $ac_status); } && {
5961 test -z "$ac_c_werror_flag" ||
5962 test ! -s conftest.err
5963 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5964 ac_header_compiler=yes
5965else
7bbec45b 5966 echo "$as_me: failed program was:" >&5
19650fd6
AS
5967sed 's/^/| /' conftest.$ac_ext >&5
5968
ca81d7a0 5969 ac_header_compiler=no
c0d27fcc 5970fi
ca81d7a0
JD
5971
5972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
5973{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5974echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5975
5976# Is the header present?
7bbec45b
CY
5977{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5978echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5979cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5980/* confdefs.h. */
5981_ACEOF
5982cat confdefs.h >>conftest.$ac_ext
5983cat >>conftest.$ac_ext <<_ACEOF
5984/* end confdefs.h. */
c0d27fcc
MR
5985#include <$ac_header>
5986_ACEOF
ca81d7a0
JD
5987if { (ac_try="$ac_cpp conftest.$ac_ext"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
7bbec45b 5992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 5993 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5994 ac_status=$?
6bae0ccf 5995 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5996 rm -f conftest.er1
5997 cat conftest.err >&5
7bbec45b 5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5999 (exit $ac_status); } >/dev/null && {
6000 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6001 test ! -s conftest.err
6002 }; then
c0d27fcc 6003 ac_header_preproc=yes
f4988be7 6004else
7bbec45b 6005 echo "$as_me: failed program was:" >&5
19650fd6
AS
6006sed 's/^/| /' conftest.$ac_ext >&5
6007
c0d27fcc 6008 ac_header_preproc=no
f4988be7 6009fi
ca81d7a0 6010
98418dba 6011rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
6012{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6013echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6014
6015# So? What about this header?
edfaf76d
LK
6016case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6017 yes:no: )
7bbec45b
CY
6018 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6019echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6020 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6021echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 6022 ac_header_preproc=yes
19650fd6 6023 ;;
edfaf76d 6024 no:yes:* )
7bbec45b
CY
6025 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6026echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6027 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6028echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6029 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6030echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6031 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6032echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6033 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6034echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6035 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6036echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6037
19650fd6 6038 ;;
c0d27fcc 6039esac
7bbec45b
CY
6040{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6041echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6042if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 6043 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6044else
edfaf76d 6045 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6046fi
7bbec45b
CY
6047ac_res=`eval echo '${'$as_ac_Header'}'`
6048 { echo "$as_me:$LINENO: result: $ac_res" >&5
6049echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6050
6051fi
7bbec45b 6052if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6053 cat >>confdefs.h <<_ACEOF
7bbec45b 6054#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6055_ACEOF
f4988be7
GM
6056
6057fi
c0d27fcc 6058
98418dba
CW
6059done
6060
6061 # Emulation library used on NetBSD.
7bbec45b
CY
6062 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6063echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6064if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
7bbec45b 6065 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6066else
98418dba
CW
6067 ac_check_lib_save_LIBS=$LIBS
6068LIBS="-lossaudio $LIBS"
6069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6070/* confdefs.h. */
6071_ACEOF
6072cat confdefs.h >>conftest.$ac_ext
6073cat >>conftest.$ac_ext <<_ACEOF
6074/* end confdefs.h. */
98418dba 6075
ca81d7a0
JD
6076/* Override any GCC internal prototype to avoid an error.
6077 Use char because int might match the return type of a GCC
6078 builtin and then its argument prototype would still apply. */
98418dba
CW
6079#ifdef __cplusplus
6080extern "C"
f4988be7 6081#endif
98418dba 6082char _oss_ioctl ();
503d2be0
AS
6083int
6084main ()
6085{
ca81d7a0 6086return _oss_ioctl ();
503d2be0
AS
6087 ;
6088 return 0;
6089}
6090_ACEOF
98418dba 6091rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6092if { (ac_try="$ac_link"
6093case "(($ac_try" in
6094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6095 *) ac_try_echo=$ac_try;;
6096esac
7bbec45b 6097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6098 (eval "$ac_link") 2>conftest.er1
503d2be0 6099 ac_status=$?
edfaf76d
LK
6100 grep -v '^ *+' conftest.er1 >conftest.err
6101 rm -f conftest.er1
6102 cat conftest.err >&5
7bbec45b 6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6104 (exit $ac_status); } && {
6105 test -z "$ac_c_werror_flag" ||
6106 test ! -s conftest.err
7bbec45b
CY
6107 } && test -s conftest$ac_exeext &&
6108 $as_test_x conftest$ac_exeext; then
98418dba 6109 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6110else
7bbec45b 6111 echo "$as_me: failed program was:" >&5
19650fd6
AS
6112sed 's/^/| /' conftest.$ac_ext >&5
6113
ca81d7a0 6114 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6115fi
ca81d7a0 6116
f053c89f 6117rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6118 conftest$ac_exeext conftest.$ac_ext
98418dba 6119LIBS=$ac_check_lib_save_LIBS
f4988be7 6120fi
7bbec45b
CY
6121{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6122echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
b0448899 6123if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
98418dba
CW
6124 LIBSOUND=-lossaudio
6125else
6126 LIBSOUND=
6127fi
6128
c0d27fcc 6129
439f58ee
JD
6130
6131 ALSA_REQUIRED=1.0.0
6132 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6133
6134 succeeded=no
6135
00b9c927 6136 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6137set dummy pkg-config; ac_word=$2
7bbec45b
CY
6138{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee 6140if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 6141 echo $ECHO_N "(cached) $ECHO_C" >&6
439f58ee
JD
6142else
6143 case $PKG_CONFIG in
6144 [\\/]* | ?:[\\/]*)
6145 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6146 ;;
6147 *)
6148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6149for as_dir in $PATH
6150do
6151 IFS=$as_save_IFS
6152 test -z "$as_dir" && as_dir=.
6153 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6154 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee 6155 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 6156 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
439f58ee
JD
6157 break 2
6158 fi
6159done
6160done
ca81d7a0 6161IFS=$as_save_IFS
439f58ee
JD
6162
6163 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6164 ;;
6165esac
6166fi
6167PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6168if test -n "$PKG_CONFIG"; then
7bbec45b
CY
6169 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6170echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6171else
7bbec45b
CY
6172 { echo "$as_me:$LINENO: result: no" >&5
6173echo "${ECHO_T}no" >&6; }
439f58ee
JD
6174fi
6175
ca81d7a0 6176
439f58ee
JD
6177
6178 if test "$PKG_CONFIG" = "no" ; then
6179 HAVE_ALSA=no
6180 else
6181 PKG_CONFIG_MIN_VERSION=0.9.0
6182 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
6183 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6184echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6185
67db6aa2 6186 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
7bbec45b
CY
6187 { echo "$as_me:$LINENO: result: yes" >&5
6188echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6189 succeeded=yes
6190
7bbec45b
CY
6191 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6192echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6193 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
7bbec45b
CY
6194 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6195echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6196
7bbec45b
CY
6197 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6198echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6199 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
7bbec45b
CY
6200 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6201echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6202 else
7bbec45b
CY
6203 { echo "$as_me:$LINENO: result: no" >&5
6204echo "${ECHO_T}no" >&6; }
439f58ee
JD
6205 ALSA_CFLAGS=""
6206 ALSA_LIBS=""
6207 ## If we have a custom action on failure, don't print errors, but
6208 ## do set a variable so people can do so.
6209 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6210
6211 fi
6212
6213
6214
6215 else
6216 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6217 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6218 fi
6219 fi
6220
6221 if test $succeeded = yes; then
6222 HAVE_ALSA=yes
6223 else
6224 HAVE_ALSA=no
6225 fi
6226
6227 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6228 SAVE_CFLAGS="$CFLAGS"
6229 SAVE_LDFLAGS="$LDFLAGS"
6230 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6231 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6232 cat >conftest.$ac_ext <<_ACEOF
6233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
6238#include <asoundlib.h>
6239int
6240main ()
6241{
6242snd_lib_error_set_handler (0);
6243 ;
6244 return 0;
6245}
6246_ACEOF
6247rm -f conftest.$ac_objext
6248if { (ac_try="$ac_compile"
6249case "(($ac_try" in
6250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6251 *) ac_try_echo=$ac_try;;
6252esac
7bbec45b 6253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0
JD
6254 (eval "$ac_compile") 2>conftest.er1
6255 ac_status=$?
6256 grep -v '^ *+' conftest.er1 >conftest.err
6257 rm -f conftest.er1
6258 cat conftest.err >&5
7bbec45b 6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6260 (exit $ac_status); } && {
6261 test -z "$ac_c_werror_flag" ||
6262 test ! -s conftest.err
6263 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6264 emacs_alsa_normal=yes
6265else
7bbec45b 6266 echo "$as_me: failed program was:" >&5
ca81d7a0
JD
6267sed 's/^/| /' conftest.$ac_ext >&5
6268
6269 emacs_alsa_normal=no
6270fi
6271
6272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6273 if test "$emacs_alsa_normal" != yes; then
6274 cat >conftest.$ac_ext <<_ACEOF
6275/* confdefs.h. */
6276_ACEOF
6277cat confdefs.h >>conftest.$ac_ext
6278cat >>conftest.$ac_ext <<_ACEOF
6279/* end confdefs.h. */
6280#include <alsa/asoundlib.h>
6281int
6282main ()
6283{
6284snd_lib_error_set_handler (0);
6285 ;
6286 return 0;
6287}
6288_ACEOF
6289rm -f conftest.$ac_objext
6290if { (ac_try="$ac_compile"
6291case "(($ac_try" in
6292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6293 *) ac_try_echo=$ac_try;;
6294esac
7bbec45b 6295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0
JD
6296 (eval "$ac_compile") 2>conftest.er1
6297 ac_status=$?
6298 grep -v '^ *+' conftest.er1 >conftest.err
6299 rm -f conftest.er1
6300 cat conftest.err >&5
7bbec45b 6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6302 (exit $ac_status); } && {
6303 test -z "$ac_c_werror_flag" ||
6304 test ! -s conftest.err
6305 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6306 emacs_alsa_subdir=yes
6307else
7bbec45b 6308 echo "$as_me: failed program was:" >&5
ca81d7a0
JD
6309sed 's/^/| /' conftest.$ac_ext >&5
6310
6311 emacs_alsa_subdir=no
6312fi
6313
6314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6315 if test "$emacs_alsa_subdir" != yes; then
7bbec45b
CY
6316 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6317echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
ca81d7a0
JD
6318 { (exit 1); exit 1; }; }
6319 fi
6320 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6321 fi
6322
6323 CFLAGS="$SAVE_CFLAGS"
6324 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6325 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6326 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6327
6328cat >>confdefs.h <<\_ACEOF
6329#define HAVE_ALSA 1
6330_ACEOF
6331
6332 fi
6333
f4988be7 6334fi
c0d27fcc
MR
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
22044edf
DL
6353
6354
973a76b1 6355
cffcede7 6356
551ffc27 6357
226e2359 6358
c0d27fcc 6359
f4988be7 6360
98418dba
CW
6361for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6362 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6363 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6364 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6365 sys/utsname.h pwd.h
98418dba 6366do
7bbec45b 6367as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 6368if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
6369 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6370echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6371if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 6372 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6373fi
7bbec45b
CY
6374ac_res=`eval echo '${'$as_ac_Header'}'`
6375 { echo "$as_me:$LINENO: result: $ac_res" >&5
6376echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6377else
c0d27fcc 6378 # Is the header compilable?
7bbec45b
CY
6379{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6380echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6381cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6382/* confdefs.h. */
6383_ACEOF
6384cat confdefs.h >>conftest.$ac_ext
6385cat >>conftest.$ac_ext <<_ACEOF
6386/* end confdefs.h. */
c0d27fcc
MR
6387$ac_includes_default
6388#include <$ac_header>
6389_ACEOF
6390rm -f conftest.$ac_objext
ca81d7a0
JD
6391if { (ac_try="$ac_compile"
6392case "(($ac_try" in
6393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6394 *) ac_try_echo=$ac_try;;
6395esac
7bbec45b 6396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6397 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6398 ac_status=$?
edfaf76d
LK
6399 grep -v '^ *+' conftest.er1 >conftest.err
6400 rm -f conftest.er1
6401 cat conftest.err >&5
7bbec45b 6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6403 (exit $ac_status); } && {
6404 test -z "$ac_c_werror_flag" ||
6405 test ! -s conftest.err
6406 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6407 ac_header_compiler=yes
6408else
7bbec45b 6409 echo "$as_me: failed program was:" >&5
19650fd6
AS
6410sed 's/^/| /' conftest.$ac_ext >&5
6411
ca81d7a0 6412 ac_header_compiler=no
c0d27fcc 6413fi
ca81d7a0
JD
6414
6415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
6416{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6417echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6418
6419# Is the header present?
7bbec45b
CY
6420{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6421echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6422cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6423/* confdefs.h. */
6424_ACEOF
6425cat confdefs.h >>conftest.$ac_ext
6426cat >>conftest.$ac_ext <<_ACEOF
6427/* end confdefs.h. */
98418dba 6428#include <$ac_header>
503d2be0 6429_ACEOF
ca81d7a0
JD
6430if { (ac_try="$ac_cpp conftest.$ac_ext"
6431case "(($ac_try" in
6432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6433 *) ac_try_echo=$ac_try;;
6434esac
7bbec45b 6435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6436 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6437 ac_status=$?
6bae0ccf 6438 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6439 rm -f conftest.er1
6440 cat conftest.err >&5
7bbec45b 6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6442 (exit $ac_status); } >/dev/null && {
6443 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6444 test ! -s conftest.err
6445 }; then
c0d27fcc 6446 ac_header_preproc=yes
34ec9ebe 6447else
7bbec45b 6448 echo "$as_me: failed program was:" >&5
19650fd6
AS
6449sed 's/^/| /' conftest.$ac_ext >&5
6450
c0d27fcc 6451 ac_header_preproc=no
34ec9ebe 6452fi
ca81d7a0 6453
98418dba 6454rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
6455{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6456echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6457
6458# So? What about this header?
edfaf76d
LK
6459case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6460 yes:no: )
7bbec45b
CY
6461 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6462echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6464echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 6465 ac_header_preproc=yes
19650fd6 6466 ;;
edfaf76d 6467 no:yes:* )
7bbec45b
CY
6468 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6469echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6470 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6471echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6472 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6473echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6474 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6475echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6476 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6477echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6478 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6479echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6480
19650fd6 6481 ;;
c0d27fcc 6482esac
7bbec45b
CY
6483{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6485if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 6486 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6487else
edfaf76d 6488 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6489fi
7bbec45b
CY
6490ac_res=`eval echo '${'$as_ac_Header'}'`
6491 { echo "$as_me:$LINENO: result: $ac_res" >&5
6492echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6493
6494fi
7bbec45b 6495if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6496 cat >>confdefs.h <<_ACEOF
7bbec45b 6497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6498_ACEOF
34ec9ebe 6499
98418dba 6500fi
c0d27fcc 6501
98418dba
CW
6502done
6503
22044edf 6504
7bbec45b
CY
6505{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6506echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6507cat >conftest.$ac_ext <<_ACEOF
6508/* confdefs.h. */
6509_ACEOF
6510cat confdefs.h >>conftest.$ac_ext
6511cat >>conftest.$ac_ext <<_ACEOF
6512/* end confdefs.h. */
6513#include <sys/personality.h>
6514int
6515main ()
6516{
6517personality (PER_LINUX32)
6518 ;
6519 return 0;
6520}
6521_ACEOF
6522rm -f conftest.$ac_objext
ca81d7a0
JD
6523if { (ac_try="$ac_compile"
6524case "(($ac_try" in
6525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6526 *) ac_try_echo=$ac_try;;
6527esac
7bbec45b 6528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6529 (eval "$ac_compile") 2>conftest.er1
f17e308a 6530 ac_status=$?
edfaf76d
LK
6531 grep -v '^ *+' conftest.er1 >conftest.err
6532 rm -f conftest.er1
6533 cat conftest.err >&5
7bbec45b 6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6535 (exit $ac_status); } && {
6536 test -z "$ac_c_werror_flag" ||
6537 test ! -s conftest.err
6538 } && test -s conftest.$ac_objext; then
f17e308a
JD
6539 emacs_cv_personality_linux32=yes
6540else
7bbec45b 6541 echo "$as_me: failed program was:" >&5
f17e308a
JD
6542sed 's/^/| /' conftest.$ac_ext >&5
6543
ca81d7a0 6544 emacs_cv_personality_linux32=no
f17e308a 6545fi
ca81d7a0
JD
6546
6547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
6548{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6549echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6550
6551if test $emacs_cv_personality_linux32 = yes; then
6552
6553cat >>confdefs.h <<\_ACEOF
6554#define HAVE_PERSONALITY_LINUX32 1
6555_ACEOF
6556
6557fi
6558
6559
22044edf
DL
6560for ac_header in term.h
6561do
7bbec45b
CY
6562as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6563{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6564echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 6565if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 6566 echo $ECHO_N "(cached) $ECHO_C" >&6
22044edf
DL
6567else
6568 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6569/* confdefs.h. */
6570_ACEOF
6571cat confdefs.h >>conftest.$ac_ext
6572cat >>conftest.$ac_ext <<_ACEOF
6573/* end confdefs.h. */
22044edf
DL
6574#include <$ac_header>
6575_ACEOF
ca81d7a0
JD
6576if { (ac_try="$ac_cpp conftest.$ac_ext"
6577case "(($ac_try" in
6578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6579 *) ac_try_echo=$ac_try;;
6580esac
7bbec45b 6581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6582 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6583 ac_status=$?
6584 grep -v '^ *+' conftest.er1 >conftest.err
6585 rm -f conftest.er1
6586 cat conftest.err >&5
7bbec45b 6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6588 (exit $ac_status); } >/dev/null && {
6589 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6590 test ! -s conftest.err
6591 }; then
22044edf
DL
6592 eval "$as_ac_Header=yes"
6593else
7bbec45b 6594 echo "$as_me: failed program was:" >&5
19650fd6
AS
6595sed 's/^/| /' conftest.$ac_ext >&5
6596
22044edf
DL
6597 eval "$as_ac_Header=no"
6598fi
ca81d7a0 6599
22044edf
DL
6600rm -f conftest.err conftest.$ac_ext
6601fi
7bbec45b
CY
6602ac_res=`eval echo '${'$as_ac_Header'}'`
6603 { echo "$as_me:$LINENO: result: $ac_res" >&5
6604echo "${ECHO_T}$ac_res" >&6; }
6605if test `eval echo '${'$as_ac_Header'}'` = yes; then
22044edf 6606 cat >>confdefs.h <<_ACEOF
7bbec45b 6607#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22044edf
DL
6608_ACEOF
6609
6610fi
6611
6612done
6613
7bbec45b
CY
6614{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6615echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6616if test "${ac_cv_header_stdc+set}" = set; then
7bbec45b 6617 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6618else
503d2be0 6619 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6620/* confdefs.h. */
6621_ACEOF
6622cat confdefs.h >>conftest.$ac_ext
6623cat >>conftest.$ac_ext <<_ACEOF
6624/* end confdefs.h. */
98418dba
CW
6625#include <stdlib.h>
6626#include <stdarg.h>
6627#include <string.h>
6628#include <float.h>
6629
19650fd6
AS
6630int
6631main ()
6632{
6633
6634 ;
6635 return 0;
6636}
98418dba 6637_ACEOF
19650fd6 6638rm -f conftest.$ac_objext
ca81d7a0
JD
6639if { (ac_try="$ac_compile"
6640case "(($ac_try" in
6641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6642 *) ac_try_echo=$ac_try;;
6643esac
7bbec45b 6644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6645 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6646 ac_status=$?
edfaf76d
LK
6647 grep -v '^ *+' conftest.er1 >conftest.err
6648 rm -f conftest.er1
6649 cat conftest.err >&5
7bbec45b 6650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6651 (exit $ac_status); } && {
6652 test -z "$ac_c_werror_flag" ||
6653 test ! -s conftest.err
6654 } && test -s conftest.$ac_objext; then
98418dba 6655 ac_cv_header_stdc=yes
ba4481b5 6656else
7bbec45b 6657 echo "$as_me: failed program was:" >&5
19650fd6
AS
6658sed 's/^/| /' conftest.$ac_ext >&5
6659
ca81d7a0 6660 ac_cv_header_stdc=no
ba4481b5 6661fi
ca81d7a0
JD
6662
6663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6664
6665if test $ac_cv_header_stdc = yes; then
6666 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6668/* confdefs.h. */
6669_ACEOF
6670cat confdefs.h >>conftest.$ac_ext
6671cat >>conftest.$ac_ext <<_ACEOF
6672/* end confdefs.h. */
98418dba
CW
6673#include <string.h>
6674
6675_ACEOF
6676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6677 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6678 :
6679else
6680 ac_cv_header_stdc=no
ba4481b5 6681fi
98418dba 6682rm -f conftest*
ba4481b5
DL
6683
6684fi
6685
98418dba
CW
6686if test $ac_cv_header_stdc = yes; then
6687 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6688 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6689/* confdefs.h. */
6690_ACEOF
6691cat confdefs.h >>conftest.$ac_ext
6692cat >>conftest.$ac_ext <<_ACEOF
6693/* end confdefs.h. */
98418dba
CW
6694#include <stdlib.h>
6695
6696_ACEOF
6697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6698 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6699 :
6700else
6701 ac_cv_header_stdc=no
6702fi
6703rm -f conftest*
6704
6705fi
6706
6707if test $ac_cv_header_stdc = yes; then
6708 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6709 if test "$cross_compiling" = yes; then
6710 :
d42122a3 6711else
503d2be0 6712 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6713/* confdefs.h. */
6714_ACEOF
6715cat confdefs.h >>conftest.$ac_ext
6716cat >>conftest.$ac_ext <<_ACEOF
6717/* end confdefs.h. */
98418dba 6718#include <ctype.h>
ca81d7a0 6719#include <stdlib.h>
98418dba
CW
6720#if ((' ' & 0x0FF) == 0x020)
6721# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6722# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6723#else
19650fd6 6724# define ISLOWER(c) \
edfaf76d
LK
6725 (('a' <= (c) && (c) <= 'i') \
6726 || ('j' <= (c) && (c) <= 'r') \
6727 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6728# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6729#endif
6730
6731#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6732int
6733main ()
6734{
98418dba
CW
6735 int i;
6736 for (i = 0; i < 256; i++)
6737 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6738 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6739 return 2;
6740 return 0;
503d2be0
AS
6741}
6742_ACEOF
98418dba 6743rm -f conftest$ac_exeext
ca81d7a0
JD
6744if { (ac_try="$ac_link"
6745case "(($ac_try" in
6746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6747 *) ac_try_echo=$ac_try;;
6748esac
7bbec45b 6749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6750 (eval "$ac_link") 2>&5
503d2be0 6751 ac_status=$?
7bbec45b 6752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6754 { (case "(($ac_try" in
6755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6756 *) ac_try_echo=$ac_try;;
6757esac
7bbec45b 6758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6759 (eval "$ac_try") 2>&5
503d2be0 6760 ac_status=$?
7bbec45b 6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6762 (exit $ac_status); }; }; then
98418dba 6763 :
d42122a3 6764else
7bbec45b
CY
6765 echo "$as_me: program exited with status $ac_status" >&5
6766echo "$as_me: failed program was:" >&5
19650fd6
AS
6767sed 's/^/| /' conftest.$ac_ext >&5
6768
c0d27fcc 6769( exit $ac_status )
98418dba 6770ac_cv_header_stdc=no
d42122a3 6771fi
ca81d7a0 6772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6773fi
ca81d7a0
JD
6774
6775
98418dba
CW
6776fi
6777fi
7bbec45b
CY
6778{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6779echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6780if test $ac_cv_header_stdc = yes; then
6781
c0d27fcc 6782cat >>confdefs.h <<\_ACEOF
98418dba 6783#define STDC_HEADERS 1
c0d27fcc 6784_ACEOF
d42122a3
DL
6785
6786fi
6787
7bbec45b
CY
6788{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6789echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6790if test "${ac_cv_header_time+set}" = set; then
7bbec45b 6791 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6792else
503d2be0 6793 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
ba4481b5 6799#include <sys/types.h>
98418dba 6800#include <sys/time.h>
ba4481b5 6801#include <time.h>
503d2be0
AS
6802
6803int
6804main ()
6805{
98418dba
CW
6806if ((struct tm *) 0)
6807return 0;
503d2be0
AS
6808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
ca81d7a0
JD
6813if { (ac_try="$ac_compile"
6814case "(($ac_try" in
6815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6816 *) ac_try_echo=$ac_try;;
6817esac
7bbec45b 6818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6819 (eval "$ac_compile") 2>conftest.er1
503d2be0 6820 ac_status=$?
edfaf76d
LK
6821 grep -v '^ *+' conftest.er1 >conftest.err
6822 rm -f conftest.er1
6823 cat conftest.err >&5
7bbec45b 6824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6825 (exit $ac_status); } && {
6826 test -z "$ac_c_werror_flag" ||
6827 test ! -s conftest.err
6828 } && test -s conftest.$ac_objext; then
98418dba 6829 ac_cv_header_time=yes
ba4481b5 6830else
7bbec45b 6831 echo "$as_me: failed program was:" >&5
19650fd6
AS
6832sed 's/^/| /' conftest.$ac_ext >&5
6833
ca81d7a0 6834 ac_cv_header_time=no
ba4481b5 6835fi
ca81d7a0
JD
6836
6837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6838fi
7bbec45b
CY
6839{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6840echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6841if test $ac_cv_header_time = yes; then
503d2be0 6842
c0d27fcc 6843cat >>confdefs.h <<\_ACEOF
98418dba 6844#define TIME_WITH_SYS_TIME 1
c0d27fcc 6845_ACEOF
ba4481b5
DL
6846
6847fi
6848
7bbec45b
CY
6849{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6850echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6851if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
7bbec45b 6852 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6853else
503d2be0 6854 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6855/* confdefs.h. */
6856_ACEOF
6857cat confdefs.h >>conftest.$ac_ext
6858cat >>conftest.$ac_ext <<_ACEOF
6859/* end confdefs.h. */
cd958eb3
MB
6860$ac_includes_default
6861int
6862main ()
6863{
6864#ifndef sys_siglist
f053c89f 6865 (void) sys_siglist;
98418dba 6866#endif
503d2be0 6867
cd958eb3
MB
6868 ;
6869 return 0;
6870}
6871_ACEOF
6872rm -f conftest.$ac_objext
ca81d7a0
JD
6873if { (ac_try="$ac_compile"
6874case "(($ac_try" in
6875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6876 *) ac_try_echo=$ac_try;;
6877esac
7bbec45b 6878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6879 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6880 ac_status=$?
edfaf76d
LK
6881 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1
6883 cat conftest.err >&5
7bbec45b 6884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6885 (exit $ac_status); } && {
6886 test -z "$ac_c_werror_flag" ||
6887 test ! -s conftest.err
6888 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6889 ac_cv_have_decl_sys_siglist=yes
6890else
7bbec45b 6891 echo "$as_me: failed program was:" >&5
19650fd6
AS
6892sed 's/^/| /' conftest.$ac_ext >&5
6893
ca81d7a0 6894 ac_cv_have_decl_sys_siglist=no
cd958eb3 6895fi
ca81d7a0
JD
6896
6897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6898fi
7bbec45b
CY
6899{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6900echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
b0448899 6901if test $ac_cv_have_decl_sys_siglist = yes; then
cd958eb3
MB
6902
6903cat >>confdefs.h <<_ACEOF
6904#define HAVE_DECL_SYS_SIGLIST 1
6905_ACEOF
6906
6907
6908else
6909 cat >>confdefs.h <<_ACEOF
6910#define HAVE_DECL_SYS_SIGLIST 0
6911_ACEOF
6912
6913
6914fi
6915
6916
6917if test $ac_cv_have_decl_sys_siglist != yes; then
6918 # For Tru64, at least:
7bbec45b
CY
6919 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6920echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6921if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7bbec45b 6922 echo $ECHO_N "(cached) $ECHO_C" >&6
cd958eb3
MB
6923else
6924 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6925/* confdefs.h. */
6926_ACEOF
6927cat confdefs.h >>conftest.$ac_ext
6928cat >>conftest.$ac_ext <<_ACEOF
6929/* end confdefs.h. */
cd958eb3 6930$ac_includes_default
503d2be0
AS
6931int
6932main ()
6933{
cd958eb3 6934#ifndef __sys_siglist
f053c89f 6935 (void) __sys_siglist;
cd958eb3
MB
6936#endif
6937
503d2be0
AS
6938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
ca81d7a0
JD
6943if { (ac_try="$ac_compile"
6944case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
7bbec45b 6948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 6949 (eval "$ac_compile") 2>conftest.er1
503d2be0 6950 ac_status=$?
edfaf76d
LK
6951 grep -v '^ *+' conftest.er1 >conftest.err
6952 rm -f conftest.er1
6953 cat conftest.err >&5
7bbec45b 6954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6955 (exit $ac_status); } && {
6956 test -z "$ac_c_werror_flag" ||
6957 test ! -s conftest.err
6958 } && test -s conftest.$ac_objext; then
cd958eb3 6959 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6960else
7bbec45b 6961 echo "$as_me: failed program was:" >&5
19650fd6
AS
6962sed 's/^/| /' conftest.$ac_ext >&5
6963
ca81d7a0 6964 ac_cv_have_decl___sys_siglist=no
ba4481b5 6965fi
ca81d7a0
JD
6966
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6968fi
7bbec45b
CY
6969{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6970echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
b0448899 6971if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6972
cd958eb3
MB
6973cat >>confdefs.h <<_ACEOF
6974#define HAVE_DECL___SYS_SIGLIST 1
6975_ACEOF
6976
6977
6978else
6979 cat >>confdefs.h <<_ACEOF
6980#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6981_ACEOF
503d2be0 6982
cd958eb3 6983
ba4481b5
DL
6984fi
6985
cd958eb3
MB
6986
6987 if test $ac_cv_have_decl___sys_siglist = yes; then
6988
6989cat >>confdefs.h <<\_ACEOF
6990#define sys_siglist __sys_siglist
6991_ACEOF
6992
6993 fi
6994fi
7bbec45b
CY
6995{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6996echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6997if test "${ac_cv_header_sys_wait_h+set}" = set; then
7bbec45b 6998 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6999else
503d2be0 7000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7001/* confdefs.h. */
7002_ACEOF
7003cat confdefs.h >>conftest.$ac_ext
7004cat >>conftest.$ac_ext <<_ACEOF
7005/* end confdefs.h. */
98418dba
CW
7006#include <sys/types.h>
7007#include <sys/wait.h>
7008#ifndef WEXITSTATUS
ca81d7a0 7009# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7010#endif
7011#ifndef WIFEXITED
7012# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7013#endif
503d2be0
AS
7014
7015int
7016main ()
7017{
98418dba
CW
7018 int s;
7019 wait (&s);
7020 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7021 ;
7022 return 0;
7023}
7024_ACEOF
98418dba 7025rm -f conftest.$ac_objext
ca81d7a0
JD
7026if { (ac_try="$ac_compile"
7027case "(($ac_try" in
7028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7029 *) ac_try_echo=$ac_try;;
7030esac
7bbec45b 7031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7032 (eval "$ac_compile") 2>conftest.er1
503d2be0 7033 ac_status=$?
edfaf76d
LK
7034 grep -v '^ *+' conftest.er1 >conftest.err
7035 rm -f conftest.er1
7036 cat conftest.err >&5
7bbec45b 7037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7038 (exit $ac_status); } && {
7039 test -z "$ac_c_werror_flag" ||
7040 test ! -s conftest.err
7041 } && test -s conftest.$ac_objext; then
98418dba 7042 ac_cv_header_sys_wait_h=yes
ba4481b5 7043else
7bbec45b 7044 echo "$as_me: failed program was:" >&5
19650fd6
AS
7045sed 's/^/| /' conftest.$ac_ext >&5
7046
ca81d7a0 7047 ac_cv_header_sys_wait_h=no
ba4481b5 7048fi
ca81d7a0
JD
7049
7050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7051fi
7bbec45b
CY
7052{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7053echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7054if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7055
c0d27fcc 7056cat >>confdefs.h <<\_ACEOF
98418dba 7057#define HAVE_SYS_WAIT_H 1
c0d27fcc 7058_ACEOF
ba4481b5 7059
ba4481b5
DL
7060fi
7061
c0d27fcc 7062
7bbec45b
CY
7063{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7064echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7065if test "${emacs_cv_struct_utimbuf+set}" = set; then
7bbec45b 7066 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7067else
503d2be0 7068 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7069/* confdefs.h. */
7070_ACEOF
7071cat confdefs.h >>conftest.$ac_ext
7072cat >>conftest.$ac_ext <<_ACEOF
7073/* end confdefs.h. */
98418dba
CW
7074#ifdef TIME_WITH_SYS_TIME
7075#include <sys/time.h>
7076#include <time.h>
7077#else
7078#ifdef HAVE_SYS_TIME_H
7079#include <sys/time.h>
7080#else
1113b624 7081#include <time.h>
98418dba
CW
7082#endif
7083#endif
7084#ifdef HAVE_UTIME_H
7085#include <utime.h>
7086#endif
503d2be0
AS
7087int
7088main ()
7089{
98418dba 7090static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7091 ;
7092 return 0;
7093}
7094_ACEOF
98418dba 7095rm -f conftest.$ac_objext
ca81d7a0
JD
7096if { (ac_try="$ac_compile"
7097case "(($ac_try" in
7098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7099 *) ac_try_echo=$ac_try;;
7100esac
7bbec45b 7101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7102 (eval "$ac_compile") 2>conftest.er1
503d2be0 7103 ac_status=$?
edfaf76d
LK
7104 grep -v '^ *+' conftest.er1 >conftest.err
7105 rm -f conftest.er1
7106 cat conftest.err >&5
7bbec45b 7107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7108 (exit $ac_status); } && {
7109 test -z "$ac_c_werror_flag" ||
7110 test ! -s conftest.err
7111 } && test -s conftest.$ac_objext; then
98418dba 7112 emacs_cv_struct_utimbuf=yes
1113b624 7113else
7bbec45b 7114 echo "$as_me: failed program was:" >&5
19650fd6
AS
7115sed 's/^/| /' conftest.$ac_ext >&5
7116
ca81d7a0 7117 emacs_cv_struct_utimbuf=no
1113b624 7118fi
ca81d7a0
JD
7119
7120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7121fi
7bbec45b
CY
7122{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7123echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7124if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7125
c0d27fcc 7126cat >>confdefs.h <<\_ACEOF
98418dba 7127#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7128_ACEOF
1113b624
PE
7129
7130fi
ba4481b5 7131
7bbec45b
CY
7132{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7133echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7134if test "${ac_cv_type_signal+set}" = set; then
7bbec45b 7135 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7136else
98418dba 7137 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7138/* confdefs.h. */
7139_ACEOF
7140cat confdefs.h >>conftest.$ac_ext
7141cat >>conftest.$ac_ext <<_ACEOF
7142/* end confdefs.h. */
7397acc4 7143#include <sys/types.h>
98418dba 7144#include <signal.h>
98418dba 7145
503d2be0
AS
7146int
7147main ()
7148{
ca81d7a0 7149return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7150 ;
7151 return 0;
7152}
7153_ACEOF
98418dba 7154rm -f conftest.$ac_objext
ca81d7a0
JD
7155if { (ac_try="$ac_compile"
7156case "(($ac_try" in
7157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7158 *) ac_try_echo=$ac_try;;
7159esac
7bbec45b 7160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7161 (eval "$ac_compile") 2>conftest.er1
503d2be0 7162 ac_status=$?
edfaf76d
LK
7163 grep -v '^ *+' conftest.er1 >conftest.err
7164 rm -f conftest.er1
7165 cat conftest.err >&5
7bbec45b 7166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7167 (exit $ac_status); } && {
7168 test -z "$ac_c_werror_flag" ||
7169 test ! -s conftest.err
7170 } && test -s conftest.$ac_objext; then
ca81d7a0 7171 ac_cv_type_signal=int
503d2be0 7172else
7bbec45b 7173 echo "$as_me: failed program was:" >&5
19650fd6
AS
7174sed 's/^/| /' conftest.$ac_ext >&5
7175
ca81d7a0 7176 ac_cv_type_signal=void
503d2be0 7177fi
ca81d7a0
JD
7178
7179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7180fi
7bbec45b
CY
7181{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7182echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7183
c0d27fcc 7184cat >>confdefs.h <<_ACEOF
98418dba 7185#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7186_ACEOF
7187
503d2be0 7188
c0d27fcc 7189
7bbec45b
CY
7190{ echo "$as_me:$LINENO: checking for speed_t" >&5
7191echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba 7192if test "${emacs_cv_speed_t+set}" = set; then
7bbec45b 7193 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7194else
98418dba 7195 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7196/* confdefs.h. */
7197_ACEOF
7198cat confdefs.h >>conftest.$ac_ext
7199cat >>conftest.$ac_ext <<_ACEOF
7200/* end confdefs.h. */
98418dba 7201#include <termios.h>
98418dba
CW
7202int
7203main ()
7204{
7205speed_t x = 1;
7206 ;
7207 return 0;
7208}
7209_ACEOF
7210rm -f conftest.$ac_objext
ca81d7a0
JD
7211if { (ac_try="$ac_compile"
7212case "(($ac_try" in
7213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7214 *) ac_try_echo=$ac_try;;
7215esac
7bbec45b 7216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7217 (eval "$ac_compile") 2>conftest.er1
98418dba 7218 ac_status=$?
edfaf76d
LK
7219 grep -v '^ *+' conftest.er1 >conftest.err
7220 rm -f conftest.er1
7221 cat conftest.err >&5
7bbec45b 7222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7223 (exit $ac_status); } && {
7224 test -z "$ac_c_werror_flag" ||
7225 test ! -s conftest.err
7226 } && test -s conftest.$ac_objext; then
98418dba
CW
7227 emacs_cv_speed_t=yes
7228else
7bbec45b 7229 echo "$as_me: failed program was:" >&5
19650fd6
AS
7230sed 's/^/| /' conftest.$ac_ext >&5
7231
ca81d7a0 7232 emacs_cv_speed_t=no
98418dba 7233fi
ca81d7a0
JD
7234
7235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7236fi
7bbec45b
CY
7237{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7238echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7239if test $emacs_cv_speed_t = yes; then
b936fae4 7240
c0d27fcc 7241cat >>confdefs.h <<\_ACEOF
98418dba 7242#define HAVE_SPEED_T 1
c0d27fcc 7243_ACEOF
98418dba 7244
7397acc4
DL
7245fi
7246
7bbec45b
CY
7247{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7248echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7249if test "${emacs_cv_struct_timeval+set}" = set; then
7bbec45b 7250 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7251else
503d2be0 7252 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7253/* confdefs.h. */
7254_ACEOF
7255cat confdefs.h >>conftest.$ac_ext
7256cat >>conftest.$ac_ext <<_ACEOF
7257/* end confdefs.h. */
98418dba
CW
7258#ifdef TIME_WITH_SYS_TIME
7259#include <sys/time.h>
7260#include <time.h>
7261#else
7262#ifdef HAVE_SYS_TIME_H
7263#include <sys/time.h>
7264#else
7265#include <time.h>
7266#endif
7267#endif
503d2be0
AS
7268int
7269main ()
7270{
98418dba 7271static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7272 ;
7273 return 0;
7274}
7275_ACEOF
7276rm -f conftest.$ac_objext
ca81d7a0
JD
7277if { (ac_try="$ac_compile"
7278case "(($ac_try" in
7279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7280 *) ac_try_echo=$ac_try;;
7281esac
7bbec45b 7282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7283 (eval "$ac_compile") 2>conftest.er1
503d2be0 7284 ac_status=$?
edfaf76d
LK
7285 grep -v '^ *+' conftest.er1 >conftest.err
7286 rm -f conftest.er1
7287 cat conftest.err >&5
7bbec45b 7288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7289 (exit $ac_status); } && {
7290 test -z "$ac_c_werror_flag" ||
7291 test ! -s conftest.err
7292 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7293 emacs_cv_struct_timeval=yes
7294else
7bbec45b 7295 echo "$as_me: failed program was:" >&5
19650fd6
AS
7296sed 's/^/| /' conftest.$ac_ext >&5
7297
ca81d7a0 7298 emacs_cv_struct_timeval=no
7397acc4 7299fi
ca81d7a0
JD
7300
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7302fi
7bbec45b
CY
7303{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7304echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7305HAVE_TIMEVAL=$emacs_cv_struct_timeval
7306if test $emacs_cv_struct_timeval = yes; then
b936fae4 7307
c0d27fcc 7308cat >>confdefs.h <<\_ACEOF
98418dba 7309#define HAVE_TIMEVAL 1
c0d27fcc 7310_ACEOF
7397acc4
DL
7311
7312fi
7313
7bbec45b
CY
7314{ echo "$as_me:$LINENO: checking for struct exception" >&5
7315echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7316if test "${emacs_cv_struct_exception+set}" = set; then
7bbec45b 7317 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7318else
503d2be0 7319 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7320/* confdefs.h. */
7321_ACEOF
7322cat confdefs.h >>conftest.$ac_ext
7323cat >>conftest.$ac_ext <<_ACEOF
7324/* end confdefs.h. */
98418dba 7325#include <math.h>
503d2be0
AS
7326int
7327main ()
7328{
98418dba 7329static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7330 ;
7331 return 0;
ba4481b5 7332}
503d2be0
AS
7333_ACEOF
7334rm -f conftest.$ac_objext
ca81d7a0
JD
7335if { (ac_try="$ac_compile"
7336case "(($ac_try" in
7337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7338 *) ac_try_echo=$ac_try;;
7339esac
7bbec45b 7340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7341 (eval "$ac_compile") 2>conftest.er1
503d2be0 7342 ac_status=$?
edfaf76d
LK
7343 grep -v '^ *+' conftest.er1 >conftest.err
7344 rm -f conftest.er1
7345 cat conftest.err >&5
7bbec45b 7346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7347 (exit $ac_status); } && {
7348 test -z "$ac_c_werror_flag" ||
7349 test ! -s conftest.err
7350 } && test -s conftest.$ac_objext; then
98418dba 7351 emacs_cv_struct_exception=yes
ba4481b5 7352else
7bbec45b 7353 echo "$as_me: failed program was:" >&5
19650fd6
AS
7354sed 's/^/| /' conftest.$ac_ext >&5
7355
ca81d7a0 7356 emacs_cv_struct_exception=no
ba4481b5 7357fi
ca81d7a0
JD
7358
7359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7360fi
7bbec45b
CY
7361{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7362echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7363HAVE_EXCEPTION=$emacs_cv_struct_exception
7364if test $emacs_cv_struct_exception != yes; then
b936fae4 7365
c0d27fcc 7366cat >>confdefs.h <<\_ACEOF
98418dba 7367#define NO_MATHERR 1
c0d27fcc 7368_ACEOF
ba4481b5
DL
7369
7370fi
7371
7862d3a8
AS
7372
7373for ac_header in sys/socket.h
7374do
7bbec45b 7375as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 7376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
7377 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7378echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 7379if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 7380 echo $ECHO_N "(cached) $ECHO_C" >&6
7862d3a8 7381fi
7bbec45b
CY
7382ac_res=`eval echo '${'$as_ac_Header'}'`
7383 { echo "$as_me:$LINENO: result: $ac_res" >&5
7384echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7385else
7386 # Is the header compilable?
7bbec45b
CY
7387{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7388echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7389cat >conftest.$ac_ext <<_ACEOF
7390/* confdefs.h. */
7391_ACEOF
7392cat confdefs.h >>conftest.$ac_ext
7393cat >>conftest.$ac_ext <<_ACEOF
7394/* end confdefs.h. */
7395$ac_includes_default
7396#include <$ac_header>
7397_ACEOF
7398rm -f conftest.$ac_objext
ca81d7a0
JD
7399if { (ac_try="$ac_compile"
7400case "(($ac_try" in
7401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7402 *) ac_try_echo=$ac_try;;
7403esac
7bbec45b 7404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7405 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7406 ac_status=$?
edfaf76d
LK
7407 grep -v '^ *+' conftest.er1 >conftest.err
7408 rm -f conftest.er1
7409 cat conftest.err >&5
7bbec45b 7410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7411 (exit $ac_status); } && {
7412 test -z "$ac_c_werror_flag" ||
7413 test ! -s conftest.err
7414 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7415 ac_header_compiler=yes
7416else
7bbec45b 7417 echo "$as_me: failed program was:" >&5
7862d3a8
AS
7418sed 's/^/| /' conftest.$ac_ext >&5
7419
ca81d7a0 7420 ac_header_compiler=no
7862d3a8 7421fi
ca81d7a0
JD
7422
7423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
7424{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7425echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7426
7427# Is the header present?
7bbec45b
CY
7428{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7429echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7430cat >conftest.$ac_ext <<_ACEOF
7431/* confdefs.h. */
7432_ACEOF
7433cat confdefs.h >>conftest.$ac_ext
7434cat >>conftest.$ac_ext <<_ACEOF
7435/* end confdefs.h. */
7436#include <$ac_header>
7437_ACEOF
ca81d7a0
JD
7438if { (ac_try="$ac_cpp conftest.$ac_ext"
7439case "(($ac_try" in
7440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7441 *) ac_try_echo=$ac_try;;
7442esac
7bbec45b 7443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7444 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7445 ac_status=$?
7446 grep -v '^ *+' conftest.er1 >conftest.err
7447 rm -f conftest.er1
7448 cat conftest.err >&5
7bbec45b 7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7450 (exit $ac_status); } >/dev/null && {
7451 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7452 test ! -s conftest.err
7453 }; then
7862d3a8
AS
7454 ac_header_preproc=yes
7455else
7bbec45b 7456 echo "$as_me: failed program was:" >&5
7862d3a8
AS
7457sed 's/^/| /' conftest.$ac_ext >&5
7458
7459 ac_header_preproc=no
7460fi
ca81d7a0 7461
7862d3a8 7462rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
7463{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7464echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7465
7466# So? What about this header?
edfaf76d
LK
7467case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7468 yes:no: )
7bbec45b
CY
7469 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7470echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7471 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7472echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 7473 ac_header_preproc=yes
7862d3a8 7474 ;;
edfaf76d 7475 no:yes:* )
7bbec45b
CY
7476 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7477echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7478 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7479echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7480 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7481echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7482 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7483echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7484 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7485echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7486 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7487echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7488
7862d3a8
AS
7489 ;;
7490esac
7bbec45b
CY
7491{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7492echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 7493if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 7494 echo $ECHO_N "(cached) $ECHO_C" >&6
7862d3a8 7495else
edfaf76d 7496 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7497fi
7bbec45b
CY
7498ac_res=`eval echo '${'$as_ac_Header'}'`
7499 { echo "$as_me:$LINENO: result: $ac_res" >&5
7500echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7501
7502fi
7bbec45b 7503if test `eval echo '${'$as_ac_Header'}'` = yes; then
7862d3a8 7504 cat >>confdefs.h <<_ACEOF
7bbec45b 7505#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7862d3a8
AS
7506_ACEOF
7507
7508fi
7509
7510done
7511
7512
7513for ac_header in net/if.h
7514do
7bbec45b
CY
7515as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7516{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7517echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 7518if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7862d3a8
AS
7520else
7521 cat >conftest.$ac_ext <<_ACEOF
7522/* confdefs.h. */
7523_ACEOF
7524cat confdefs.h >>conftest.$ac_ext
7525cat >>conftest.$ac_ext <<_ACEOF
7526/* end confdefs.h. */
7527$ac_includes_default
7528#if HAVE_SYS_SOCKET_H
7529#include <sys/socket.h>
7530#endif
7531
7532#include <$ac_header>
7533_ACEOF
7534rm -f conftest.$ac_objext
ca81d7a0
JD
7535if { (ac_try="$ac_compile"
7536case "(($ac_try" in
7537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538 *) ac_try_echo=$ac_try;;
7539esac
7bbec45b 7540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7541 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7542 ac_status=$?
edfaf76d
LK
7543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
7bbec45b 7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7547 (exit $ac_status); } && {
7548 test -z "$ac_c_werror_flag" ||
7549 test ! -s conftest.err
7550 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7551 eval "$as_ac_Header=yes"
7552else
7bbec45b 7553 echo "$as_me: failed program was:" >&5
7862d3a8
AS
7554sed 's/^/| /' conftest.$ac_ext >&5
7555
ca81d7a0 7556 eval "$as_ac_Header=no"
7862d3a8 7557fi
ca81d7a0
JD
7558
7559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7560fi
7bbec45b
CY
7561ac_res=`eval echo '${'$as_ac_Header'}'`
7562 { echo "$as_me:$LINENO: result: $ac_res" >&5
7563echo "${ECHO_T}$ac_res" >&6; }
7564if test `eval echo '${'$as_ac_Header'}'` = yes; then
7862d3a8 7565 cat >>confdefs.h <<_ACEOF
7bbec45b 7566#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7862d3a8
AS
7567_ACEOF
7568
7569fi
7570
7571done
7572
7573
7bbec45b
CY
7574{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7575echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7576if test "${ac_cv_struct_tm+set}" = set; then
7bbec45b 7577 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7578else
503d2be0 7579 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7580/* confdefs.h. */
7581_ACEOF
7582cat confdefs.h >>conftest.$ac_ext
7583cat >>conftest.$ac_ext <<_ACEOF
7584/* end confdefs.h. */
98418dba
CW
7585#include <sys/types.h>
7586#include <time.h>
7397acc4 7587
503d2be0
AS
7588int
7589main ()
7590{
f053c89f
CY
7591struct tm tm;
7592 int *p = &tm.tm_sec;
7bbec45b 7593 return !p;
503d2be0
AS
7594 ;
7595 return 0;
7596}
7597_ACEOF
7598rm -f conftest.$ac_objext
ca81d7a0
JD
7599if { (ac_try="$ac_compile"
7600case "(($ac_try" in
7601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7602 *) ac_try_echo=$ac_try;;
7603esac
7bbec45b 7604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7605 (eval "$ac_compile") 2>conftest.er1
503d2be0 7606 ac_status=$?
edfaf76d
LK
7607 grep -v '^ *+' conftest.er1 >conftest.err
7608 rm -f conftest.er1
7609 cat conftest.err >&5
7bbec45b 7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7611 (exit $ac_status); } && {
7612 test -z "$ac_c_werror_flag" ||
7613 test ! -s conftest.err
7614 } && test -s conftest.$ac_objext; then
35996d22
AS
7615 ac_cv_struct_tm=time.h
7616else
7bbec45b 7617 echo "$as_me: failed program was:" >&5
19650fd6
AS
7618sed 's/^/| /' conftest.$ac_ext >&5
7619
ca81d7a0 7620 ac_cv_struct_tm=sys/time.h
7397acc4 7621fi
ca81d7a0
JD
7622
7623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7624fi
7bbec45b
CY
7625{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7626echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7627if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7628
c0d27fcc 7629cat >>confdefs.h <<\_ACEOF
98418dba 7630#define TM_IN_SYS_TIME 1
c0d27fcc 7631_ACEOF
7397acc4
DL
7632
7633fi
ba4481b5 7634
7bbec45b
CY
7635{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7636echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7637if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
7bbec45b 7638 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7639else
98418dba 7640 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7641/* confdefs.h. */
7642_ACEOF
7643cat confdefs.h >>conftest.$ac_ext
7644cat >>conftest.$ac_ext <<_ACEOF
7645/* end confdefs.h. */
98418dba
CW
7646#include <sys/types.h>
7647#include <$ac_cv_struct_tm>
ba4481b5 7648
c0d27fcc 7649
98418dba
CW
7650int
7651main ()
7652{
7653static struct tm ac_aggr;
7654if (ac_aggr.tm_zone)
7655return 0;
7656 ;
7657 return 0;
7658}
7659_ACEOF
7660rm -f conftest.$ac_objext
ca81d7a0
JD
7661if { (ac_try="$ac_compile"
7662case "(($ac_try" in
7663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7664 *) ac_try_echo=$ac_try;;
7665esac
7bbec45b 7666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7667 (eval "$ac_compile") 2>conftest.er1
98418dba 7668 ac_status=$?
edfaf76d
LK
7669 grep -v '^ *+' conftest.er1 >conftest.err
7670 rm -f conftest.er1
7671 cat conftest.err >&5
7bbec45b 7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7673 (exit $ac_status); } && {
7674 test -z "$ac_c_werror_flag" ||
7675 test ! -s conftest.err
7676 } && test -s conftest.$ac_objext; then
98418dba 7677 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7678else
7bbec45b 7679 echo "$as_me: failed program was:" >&5
19650fd6
AS
7680sed 's/^/| /' conftest.$ac_ext >&5
7681
ca81d7a0 7682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
6bae0ccf
DL
7688#include <sys/types.h>
7689#include <$ac_cv_struct_tm>
7690
7691
7692int
7693main ()
7694{
7695static struct tm ac_aggr;
7696if (sizeof ac_aggr.tm_zone)
7697return 0;
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
ca81d7a0
JD
7703if { (ac_try="$ac_compile"
7704case "(($ac_try" in
7705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7706 *) ac_try_echo=$ac_try;;
7707esac
7bbec45b 7708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7709 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7710 ac_status=$?
edfaf76d
LK
7711 grep -v '^ *+' conftest.er1 >conftest.err
7712 rm -f conftest.er1
7713 cat conftest.err >&5
7bbec45b 7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7715 (exit $ac_status); } && {
7716 test -z "$ac_c_werror_flag" ||
7717 test ! -s conftest.err
7718 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7719 ac_cv_member_struct_tm_tm_zone=yes
7720else
7bbec45b 7721 echo "$as_me: failed program was:" >&5
19650fd6
AS
7722sed 's/^/| /' conftest.$ac_ext >&5
7723
ca81d7a0 7724 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7725fi
ca81d7a0
JD
7726
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7728fi
ca81d7a0
JD
7729
7730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7731fi
7bbec45b
CY
7732{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7733echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
b0448899 7734if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7735
c0d27fcc 7736cat >>confdefs.h <<_ACEOF
98418dba 7737#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7738_ACEOF
7739
ba4481b5 7740
98418dba 7741fi
ba4481b5 7742
98418dba 7743if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7744
c0d27fcc 7745cat >>confdefs.h <<\_ACEOF
98418dba 7746#define HAVE_TM_ZONE 1
c0d27fcc 7747_ACEOF
ba4481b5 7748
ba4481b5 7749else
7bbec45b
CY
7750 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7751echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
ca81d7a0 7752if test "${ac_cv_have_decl_tzname+set}" = set; then
7bbec45b 7753 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7754else
98418dba 7755 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7756/* confdefs.h. */
7757_ACEOF
7758cat confdefs.h >>conftest.$ac_ext
7759cat >>conftest.$ac_ext <<_ACEOF
7760/* end confdefs.h. */
98418dba 7761#include <time.h>
98418dba 7762
98418dba
CW
7763int
7764main ()
7765{
ca81d7a0 7766#ifndef tzname
f053c89f 7767 (void) tzname;
ca81d7a0
JD
7768#endif
7769
6bae0ccf
DL
7770 ;
7771 return 0;
7772}
7773_ACEOF
7774rm -f conftest.$ac_objext
ca81d7a0
JD
7775if { (ac_try="$ac_compile"
7776case "(($ac_try" in
7777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7778 *) ac_try_echo=$ac_try;;
7779esac
7bbec45b 7780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7781 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7782 ac_status=$?
edfaf76d
LK
7783 grep -v '^ *+' conftest.er1 >conftest.err
7784 rm -f conftest.er1
7785 cat conftest.err >&5
7bbec45b 7786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7787 (exit $ac_status); } && {
7788 test -z "$ac_c_werror_flag" ||
7789 test ! -s conftest.err
7790 } && test -s conftest.$ac_objext; then
ca81d7a0 7791 ac_cv_have_decl_tzname=yes
6bae0ccf 7792else
7bbec45b 7793 echo "$as_me: failed program was:" >&5
19650fd6
AS
7794sed 's/^/| /' conftest.$ac_ext >&5
7795
ca81d7a0 7796 ac_cv_have_decl_tzname=no
ba4481b5 7797fi
ca81d7a0
JD
7798
7799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7800fi
7bbec45b
CY
7801{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7802echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
b0448899 7803if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7804
c0d27fcc 7805cat >>confdefs.h <<_ACEOF
ca81d7a0 7806#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7807_ACEOF
7808
ba4481b5 7809
ca81d7a0
JD
7810else
7811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_DECL_TZNAME 0
7813_ACEOF
ba4481b5 7814
ba4481b5 7815
98418dba 7816fi
ba4481b5 7817
ca81d7a0 7818
7bbec45b
CY
7819 { echo "$as_me:$LINENO: checking for tzname" >&5
7820echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7821if test "${ac_cv_var_tzname+set}" = set; then
7bbec45b 7822 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7823else
98418dba 7824 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7825/* confdefs.h. */
7826_ACEOF
7827cat confdefs.h >>conftest.$ac_ext
7828cat >>conftest.$ac_ext <<_ACEOF
7829/* end confdefs.h. */
98418dba 7830#include <time.h>
ca81d7a0
JD
7831#if !HAVE_DECL_TZNAME
7832extern char *tzname[];
98418dba
CW
7833#endif
7834
98418dba
CW
7835int
7836main ()
7837{
ca81d7a0 7838return tzname[0][0];
98418dba
CW
7839 ;
7840 return 0;
7841}
7842_ACEOF
7843rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7844if { (ac_try="$ac_link"
7845case "(($ac_try" in
7846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7847 *) ac_try_echo=$ac_try;;
7848esac
7bbec45b 7849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7850 (eval "$ac_link") 2>conftest.er1
98418dba 7851 ac_status=$?
edfaf76d
LK
7852 grep -v '^ *+' conftest.er1 >conftest.err
7853 rm -f conftest.er1
7854 cat conftest.err >&5
7bbec45b 7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7856 (exit $ac_status); } && {
7857 test -z "$ac_c_werror_flag" ||
7858 test ! -s conftest.err
7bbec45b
CY
7859 } && test -s conftest$ac_exeext &&
7860 $as_test_x conftest$ac_exeext; then
98418dba
CW
7861 ac_cv_var_tzname=yes
7862else
7bbec45b 7863 echo "$as_me: failed program was:" >&5
19650fd6
AS
7864sed 's/^/| /' conftest.$ac_ext >&5
7865
ca81d7a0 7866 ac_cv_var_tzname=no
ba4481b5 7867fi
6bae0ccf 7868
f053c89f 7869rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7870 conftest$ac_exeext conftest.$ac_ext
98418dba 7871fi
7bbec45b
CY
7872{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7873echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7874 if test $ac_cv_var_tzname = yes; then
ba4481b5 7875
c0d27fcc 7876cat >>confdefs.h <<\_ACEOF
98418dba 7877#define HAVE_TZNAME 1
c0d27fcc 7878_ACEOF
503d2be0 7879
98418dba
CW
7880 fi
7881fi
503d2be0 7882
7bbec45b
CY
7883{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7884echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7885if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
7bbec45b 7886 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
7887else
7888 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7889/* confdefs.h. */
7890_ACEOF
7891cat confdefs.h >>conftest.$ac_ext
7892cat >>conftest.$ac_ext <<_ACEOF
7893/* end confdefs.h. */
98418dba 7894#include <time.h>
b936fae4 7895
98418dba
CW
7896int
7897main ()
7898{
b936fae4
AS
7899static struct tm ac_aggr;
7900if (ac_aggr.tm_gmtoff)
7901return 0;
98418dba
CW
7902 ;
7903 return 0;
7904}
7905_ACEOF
b936fae4 7906rm -f conftest.$ac_objext
ca81d7a0
JD
7907if { (ac_try="$ac_compile"
7908case "(($ac_try" in
7909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7910 *) ac_try_echo=$ac_try;;
7911esac
7bbec45b 7912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7913 (eval "$ac_compile") 2>conftest.er1
98418dba 7914 ac_status=$?
edfaf76d
LK
7915 grep -v '^ *+' conftest.er1 >conftest.err
7916 rm -f conftest.er1
7917 cat conftest.err >&5
7bbec45b 7918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7919 (exit $ac_status); } && {
7920 test -z "$ac_c_werror_flag" ||
7921 test ! -s conftest.err
7922 } && test -s conftest.$ac_objext; then
b936fae4 7923 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba 7924else
7bbec45b 7925 echo "$as_me: failed program was:" >&5
19650fd6
AS
7926sed 's/^/| /' conftest.$ac_ext >&5
7927
ca81d7a0 7928 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7929/* confdefs.h. */
7930_ACEOF
7931cat confdefs.h >>conftest.$ac_ext
7932cat >>conftest.$ac_ext <<_ACEOF
7933/* end confdefs.h. */
6bae0ccf
DL
7934#include <time.h>
7935
8799b3e4
CW
7936int
7937main ()
7938{
6bae0ccf
DL
7939static struct tm ac_aggr;
7940if (sizeof ac_aggr.tm_gmtoff)
7941return 0;
8799b3e4
CW
7942 ;
7943 return 0;
7944}
7945_ACEOF
6bae0ccf 7946rm -f conftest.$ac_objext
ca81d7a0
JD
7947if { (ac_try="$ac_compile"
7948case "(($ac_try" in
7949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7950 *) ac_try_echo=$ac_try;;
7951esac
7bbec45b 7952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 7953 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7954 ac_status=$?
edfaf76d
LK
7955 grep -v '^ *+' conftest.er1 >conftest.err
7956 rm -f conftest.er1
7957 cat conftest.err >&5
7bbec45b 7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7959 (exit $ac_status); } && {
7960 test -z "$ac_c_werror_flag" ||
7961 test ! -s conftest.err
7962 } && test -s conftest.$ac_objext; then
6bae0ccf 7963 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4 7964else
7bbec45b 7965 echo "$as_me: failed program was:" >&5
19650fd6
AS
7966sed 's/^/| /' conftest.$ac_ext >&5
7967
ca81d7a0 7968 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7969fi
ca81d7a0
JD
7970
7971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7972fi
ca81d7a0
JD
7973
7974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7975fi
7bbec45b
CY
7976{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7977echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
b0448899 7978if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6bae0ccf
DL
7979
7980cat >>confdefs.h <<\_ACEOF
7981#define HAVE_TM_GMTOFF 1
7982_ACEOF
7983
7984fi
7985
7bbec45b
CY
7986{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7987echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036 7988if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7bbec45b 7989 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
7990else
7991 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7992/* confdefs.h. */
7993_ACEOF
7994cat confdefs.h >>conftest.$ac_ext
7995cat >>conftest.$ac_ext <<_ACEOF
7996/* end confdefs.h. */
7862d3a8
AS
7997$ac_includes_default
7998#if HAVE_SYS_SOCKET_H
7999#include <sys/socket.h>
8000#endif
8001#if HAVE_NET_IF_H
96f3a036 8002#include <net/if.h>
7862d3a8 8003#endif
96f3a036
DL
8004
8005int
8006main ()
8007{
8008static struct ifreq ac_aggr;
8009if (ac_aggr.ifr_flags)
8010return 0;
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext
ca81d7a0
JD
8016if { (ac_try="$ac_compile"
8017case "(($ac_try" in
8018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8019 *) ac_try_echo=$ac_try;;
8020esac
7bbec45b 8021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8022 (eval "$ac_compile") 2>conftest.er1
96f3a036 8023 ac_status=$?
edfaf76d
LK
8024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
7bbec45b 8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8028 (exit $ac_status); } && {
8029 test -z "$ac_c_werror_flag" ||
8030 test ! -s conftest.err
8031 } && test -s conftest.$ac_objext; then
96f3a036
DL
8032 ac_cv_member_struct_ifreq_ifr_flags=yes
8033else
7bbec45b 8034 echo "$as_me: failed program was:" >&5
96f3a036
DL
8035sed 's/^/| /' conftest.$ac_ext >&5
8036
ca81d7a0 8037 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8038/* confdefs.h. */
8039_ACEOF
8040cat confdefs.h >>conftest.$ac_ext
8041cat >>conftest.$ac_ext <<_ACEOF
8042/* end confdefs.h. */
7862d3a8
AS
8043$ac_includes_default
8044#if HAVE_SYS_SOCKET_H
8045#include <sys/socket.h>
8046#endif
8047#if HAVE_NET_IF_H
96f3a036 8048#include <net/if.h>
7862d3a8 8049#endif
96f3a036
DL
8050
8051int
8052main ()
8053{
8054static struct ifreq ac_aggr;
8055if (sizeof ac_aggr.ifr_flags)
8056return 0;
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
ca81d7a0
JD
8062if { (ac_try="$ac_compile"
8063case "(($ac_try" in
8064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8065 *) ac_try_echo=$ac_try;;
8066esac
7bbec45b 8067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8068 (eval "$ac_compile") 2>conftest.er1
96f3a036 8069 ac_status=$?
edfaf76d
LK
8070 grep -v '^ *+' conftest.er1 >conftest.err
8071 rm -f conftest.er1
8072 cat conftest.err >&5
7bbec45b 8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8074 (exit $ac_status); } && {
8075 test -z "$ac_c_werror_flag" ||
8076 test ! -s conftest.err
8077 } && test -s conftest.$ac_objext; then
96f3a036
DL
8078 ac_cv_member_struct_ifreq_ifr_flags=yes
8079else
7bbec45b 8080 echo "$as_me: failed program was:" >&5
96f3a036
DL
8081sed 's/^/| /' conftest.$ac_ext >&5
8082
ca81d7a0 8083 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8084fi
ca81d7a0
JD
8085
8086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8087fi
ca81d7a0
JD
8088
8089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8090fi
7bbec45b
CY
8091{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8092echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
b0448899 8093if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
96f3a036
DL
8094
8095cat >>confdefs.h <<_ACEOF
8096#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8097_ACEOF
8098
8099
8100fi
7bbec45b
CY
8101{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8102echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036 8103if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7bbec45b 8104 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8105else
8106 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8107/* confdefs.h. */
8108_ACEOF
8109cat confdefs.h >>conftest.$ac_ext
8110cat >>conftest.$ac_ext <<_ACEOF
8111/* end confdefs.h. */
7862d3a8
AS
8112$ac_includes_default
8113#if HAVE_SYS_SOCKET_H
8114#include <sys/socket.h>
8115#endif
8116#if HAVE_NET_IF_H
96f3a036 8117#include <net/if.h>
7862d3a8 8118#endif
96f3a036
DL
8119
8120int
8121main ()
8122{
8123static struct ifreq ac_aggr;
8124if (ac_aggr.ifr_hwaddr)
8125return 0;
8126 ;
8127 return 0;
8128}
8129_ACEOF
8130rm -f conftest.$ac_objext
ca81d7a0
JD
8131if { (ac_try="$ac_compile"
8132case "(($ac_try" in
8133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8134 *) ac_try_echo=$ac_try;;
8135esac
7bbec45b 8136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8137 (eval "$ac_compile") 2>conftest.er1
96f3a036 8138 ac_status=$?
edfaf76d
LK
8139 grep -v '^ *+' conftest.er1 >conftest.err
8140 rm -f conftest.er1
8141 cat conftest.err >&5
7bbec45b 8142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8143 (exit $ac_status); } && {
8144 test -z "$ac_c_werror_flag" ||
8145 test ! -s conftest.err
8146 } && test -s conftest.$ac_objext; then
96f3a036
DL
8147 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8148else
7bbec45b 8149 echo "$as_me: failed program was:" >&5
96f3a036
DL
8150sed 's/^/| /' conftest.$ac_ext >&5
8151
ca81d7a0 8152 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8153/* confdefs.h. */
8154_ACEOF
8155cat confdefs.h >>conftest.$ac_ext
8156cat >>conftest.$ac_ext <<_ACEOF
8157/* end confdefs.h. */
7862d3a8
AS
8158$ac_includes_default
8159#if HAVE_SYS_SOCKET_H
8160#include <sys/socket.h>
8161#endif
8162#if HAVE_NET_IF_H
96f3a036 8163#include <net/if.h>
7862d3a8 8164#endif
96f3a036
DL
8165
8166int
8167main ()
8168{
8169static struct ifreq ac_aggr;
8170if (sizeof ac_aggr.ifr_hwaddr)
8171return 0;
8172 ;
8173 return 0;
8174}
8175_ACEOF
8176rm -f conftest.$ac_objext
ca81d7a0
JD
8177if { (ac_try="$ac_compile"
8178case "(($ac_try" in
8179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8180 *) ac_try_echo=$ac_try;;
8181esac
7bbec45b 8182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8183 (eval "$ac_compile") 2>conftest.er1
96f3a036 8184 ac_status=$?
edfaf76d
LK
8185 grep -v '^ *+' conftest.er1 >conftest.err
8186 rm -f conftest.er1
8187 cat conftest.err >&5
7bbec45b 8188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8189 (exit $ac_status); } && {
8190 test -z "$ac_c_werror_flag" ||
8191 test ! -s conftest.err
8192 } && test -s conftest.$ac_objext; then
96f3a036
DL
8193 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8194else
7bbec45b 8195 echo "$as_me: failed program was:" >&5
96f3a036
DL
8196sed 's/^/| /' conftest.$ac_ext >&5
8197
ca81d7a0 8198 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8199fi
ca81d7a0
JD
8200
8201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8202fi
ca81d7a0
JD
8203
8204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8205fi
7bbec45b
CY
8206{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8207echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
b0448899 8208if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
96f3a036
DL
8209
8210cat >>confdefs.h <<_ACEOF
8211#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8212_ACEOF
8213
8214
8215fi
7bbec45b
CY
8216{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8217echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036 8218if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7bbec45b 8219 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8220else
8221 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8222/* confdefs.h. */
8223_ACEOF
8224cat confdefs.h >>conftest.$ac_ext
8225cat >>conftest.$ac_ext <<_ACEOF
8226/* end confdefs.h. */
7862d3a8
AS
8227$ac_includes_default
8228#if HAVE_SYS_SOCKET_H
8229#include <sys/socket.h>
8230#endif
8231#if HAVE_NET_IF_H
96f3a036 8232#include <net/if.h>
7862d3a8 8233#endif
96f3a036
DL
8234
8235int
8236main ()
8237{
8238static struct ifreq ac_aggr;
8239if (ac_aggr.ifr_netmask)
8240return 0;
8241 ;
8242 return 0;
8243}
8244_ACEOF
8245rm -f conftest.$ac_objext
ca81d7a0
JD
8246if { (ac_try="$ac_compile"
8247case "(($ac_try" in
8248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8249 *) ac_try_echo=$ac_try;;
8250esac
7bbec45b 8251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8252 (eval "$ac_compile") 2>conftest.er1
96f3a036 8253 ac_status=$?
edfaf76d
LK
8254 grep -v '^ *+' conftest.er1 >conftest.err
8255 rm -f conftest.er1
8256 cat conftest.err >&5
7bbec45b 8257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8258 (exit $ac_status); } && {
8259 test -z "$ac_c_werror_flag" ||
8260 test ! -s conftest.err
8261 } && test -s conftest.$ac_objext; then
96f3a036
DL
8262 ac_cv_member_struct_ifreq_ifr_netmask=yes
8263else
7bbec45b 8264 echo "$as_me: failed program was:" >&5
96f3a036
DL
8265sed 's/^/| /' conftest.$ac_ext >&5
8266
ca81d7a0 8267 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8268/* confdefs.h. */
8269_ACEOF
8270cat confdefs.h >>conftest.$ac_ext
8271cat >>conftest.$ac_ext <<_ACEOF
8272/* end confdefs.h. */
7862d3a8
AS
8273$ac_includes_default
8274#if HAVE_SYS_SOCKET_H
8275#include <sys/socket.h>
8276#endif
8277#if HAVE_NET_IF_H
96f3a036 8278#include <net/if.h>
7862d3a8 8279#endif
96f3a036
DL
8280
8281int
8282main ()
8283{
8284static struct ifreq ac_aggr;
8285if (sizeof ac_aggr.ifr_netmask)
8286return 0;
8287 ;
8288 return 0;
8289}
8290_ACEOF
8291rm -f conftest.$ac_objext
ca81d7a0
JD
8292if { (ac_try="$ac_compile"
8293case "(($ac_try" in
8294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8295 *) ac_try_echo=$ac_try;;
8296esac
7bbec45b 8297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8298 (eval "$ac_compile") 2>conftest.er1
96f3a036 8299 ac_status=$?
edfaf76d
LK
8300 grep -v '^ *+' conftest.er1 >conftest.err
8301 rm -f conftest.er1
8302 cat conftest.err >&5
7bbec45b 8303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8304 (exit $ac_status); } && {
8305 test -z "$ac_c_werror_flag" ||
8306 test ! -s conftest.err
8307 } && test -s conftest.$ac_objext; then
96f3a036
DL
8308 ac_cv_member_struct_ifreq_ifr_netmask=yes
8309else
7bbec45b 8310 echo "$as_me: failed program was:" >&5
96f3a036
DL
8311sed 's/^/| /' conftest.$ac_ext >&5
8312
ca81d7a0 8313 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8314fi
ca81d7a0
JD
8315
8316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8317fi
ca81d7a0
JD
8318
8319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8320fi
7bbec45b
CY
8321{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8322echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
b0448899 8323if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
96f3a036
DL
8324
8325cat >>confdefs.h <<_ACEOF
8326#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8327_ACEOF
8328
8329
8330fi
7bbec45b
CY
8331{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8332echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036 8333if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7bbec45b 8334 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8335else
8336 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8337/* confdefs.h. */
8338_ACEOF
8339cat confdefs.h >>conftest.$ac_ext
8340cat >>conftest.$ac_ext <<_ACEOF
8341/* end confdefs.h. */
7862d3a8
AS
8342$ac_includes_default
8343#if HAVE_SYS_SOCKET_H
8344#include <sys/socket.h>
8345#endif
8346#if HAVE_NET_IF_H
96f3a036 8347#include <net/if.h>
7862d3a8 8348#endif
96f3a036
DL
8349
8350int
8351main ()
8352{
8353static struct ifreq ac_aggr;
8354if (ac_aggr.ifr_broadaddr)
8355return 0;
8356 ;
8357 return 0;
8358}
8359_ACEOF
8360rm -f conftest.$ac_objext
ca81d7a0
JD
8361if { (ac_try="$ac_compile"
8362case "(($ac_try" in
8363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8364 *) ac_try_echo=$ac_try;;
8365esac
7bbec45b 8366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8367 (eval "$ac_compile") 2>conftest.er1
96f3a036 8368 ac_status=$?
edfaf76d
LK
8369 grep -v '^ *+' conftest.er1 >conftest.err
8370 rm -f conftest.er1
8371 cat conftest.err >&5
7bbec45b 8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8373 (exit $ac_status); } && {
8374 test -z "$ac_c_werror_flag" ||
8375 test ! -s conftest.err
8376 } && test -s conftest.$ac_objext; then
96f3a036
DL
8377 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8378else
7bbec45b 8379 echo "$as_me: failed program was:" >&5
96f3a036
DL
8380sed 's/^/| /' conftest.$ac_ext >&5
8381
ca81d7a0 8382 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8383/* confdefs.h. */
8384_ACEOF
8385cat confdefs.h >>conftest.$ac_ext
8386cat >>conftest.$ac_ext <<_ACEOF
8387/* end confdefs.h. */
7862d3a8
AS
8388$ac_includes_default
8389#if HAVE_SYS_SOCKET_H
8390#include <sys/socket.h>
8391#endif
8392#if HAVE_NET_IF_H
96f3a036 8393#include <net/if.h>
7862d3a8 8394#endif
96f3a036
DL
8395
8396int
8397main ()
8398{
8399static struct ifreq ac_aggr;
8400if (sizeof ac_aggr.ifr_broadaddr)
8401return 0;
8402 ;
8403 return 0;
8404}
8405_ACEOF
8406rm -f conftest.$ac_objext
ca81d7a0
JD
8407if { (ac_try="$ac_compile"
8408case "(($ac_try" in
8409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8410 *) ac_try_echo=$ac_try;;
8411esac
7bbec45b 8412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8413 (eval "$ac_compile") 2>conftest.er1
96f3a036 8414 ac_status=$?
edfaf76d
LK
8415 grep -v '^ *+' conftest.er1 >conftest.err
8416 rm -f conftest.er1
8417 cat conftest.err >&5
7bbec45b 8418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8419 (exit $ac_status); } && {
8420 test -z "$ac_c_werror_flag" ||
8421 test ! -s conftest.err
8422 } && test -s conftest.$ac_objext; then
96f3a036
DL
8423 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8424else
7bbec45b 8425 echo "$as_me: failed program was:" >&5
96f3a036
DL
8426sed 's/^/| /' conftest.$ac_ext >&5
8427
ca81d7a0 8428 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8429fi
ca81d7a0
JD
8430
8431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8432fi
ca81d7a0
JD
8433
8434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8435fi
7bbec45b
CY
8436{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8437echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
b0448899 8438if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
96f3a036
DL
8439
8440cat >>confdefs.h <<_ACEOF
8441#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8442_ACEOF
8443
8444
8445fi
7bbec45b
CY
8446{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8447echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036 8448if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7bbec45b 8449 echo $ECHO_N "(cached) $ECHO_C" >&6
96f3a036
DL
8450else
8451 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8452/* confdefs.h. */
8453_ACEOF
8454cat confdefs.h >>conftest.$ac_ext
8455cat >>conftest.$ac_ext <<_ACEOF
8456/* end confdefs.h. */
7862d3a8
AS
8457$ac_includes_default
8458#if HAVE_SYS_SOCKET_H
8459#include <sys/socket.h>
8460#endif
8461#if HAVE_NET_IF_H
96f3a036 8462#include <net/if.h>
7862d3a8 8463#endif
96f3a036
DL
8464
8465int
8466main ()
8467{
8468static struct ifreq ac_aggr;
8469if (ac_aggr.ifr_addr)
8470return 0;
8471 ;
8472 return 0;
8473}
8474_ACEOF
8475rm -f conftest.$ac_objext
ca81d7a0
JD
8476if { (ac_try="$ac_compile"
8477case "(($ac_try" in
8478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8479 *) ac_try_echo=$ac_try;;
8480esac
7bbec45b 8481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8482 (eval "$ac_compile") 2>conftest.er1
96f3a036 8483 ac_status=$?
edfaf76d
LK
8484 grep -v '^ *+' conftest.er1 >conftest.err
8485 rm -f conftest.er1
8486 cat conftest.err >&5
7bbec45b 8487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8488 (exit $ac_status); } && {
8489 test -z "$ac_c_werror_flag" ||
8490 test ! -s conftest.err
8491 } && test -s conftest.$ac_objext; then
96f3a036
DL
8492 ac_cv_member_struct_ifreq_ifr_addr=yes
8493else
7bbec45b 8494 echo "$as_me: failed program was:" >&5
96f3a036
DL
8495sed 's/^/| /' conftest.$ac_ext >&5
8496
ca81d7a0 8497 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8498/* confdefs.h. */
8499_ACEOF
8500cat confdefs.h >>conftest.$ac_ext
8501cat >>conftest.$ac_ext <<_ACEOF
8502/* end confdefs.h. */
7862d3a8
AS
8503$ac_includes_default
8504#if HAVE_SYS_SOCKET_H
8505#include <sys/socket.h>
8506#endif
8507#if HAVE_NET_IF_H
96f3a036 8508#include <net/if.h>
7862d3a8 8509#endif
96f3a036
DL
8510
8511int
8512main ()
8513{
8514static struct ifreq ac_aggr;
8515if (sizeof ac_aggr.ifr_addr)
8516return 0;
8517 ;
8518 return 0;
8519}
8520_ACEOF
8521rm -f conftest.$ac_objext
ca81d7a0
JD
8522if { (ac_try="$ac_compile"
8523case "(($ac_try" in
8524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8525 *) ac_try_echo=$ac_try;;
8526esac
7bbec45b 8527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8528 (eval "$ac_compile") 2>conftest.er1
96f3a036 8529 ac_status=$?
edfaf76d
LK
8530 grep -v '^ *+' conftest.er1 >conftest.err
8531 rm -f conftest.er1
8532 cat conftest.err >&5
7bbec45b 8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8534 (exit $ac_status); } && {
8535 test -z "$ac_c_werror_flag" ||
8536 test ! -s conftest.err
8537 } && test -s conftest.$ac_objext; then
96f3a036
DL
8538 ac_cv_member_struct_ifreq_ifr_addr=yes
8539else
7bbec45b 8540 echo "$as_me: failed program was:" >&5
96f3a036
DL
8541sed 's/^/| /' conftest.$ac_ext >&5
8542
ca81d7a0 8543 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8544fi
ca81d7a0
JD
8545
8546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8547fi
ca81d7a0
JD
8548
8549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8550fi
7bbec45b
CY
8551{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8552echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
b0448899 8553if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
96f3a036
DL
8554
8555cat >>confdefs.h <<_ACEOF
8556#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8557_ACEOF
8558
8559
8560fi
8561
8799b3e4 8562
8799b3e4 8563
7bbec45b
CY
8564{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8565echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
ca81d7a0 8566if test "$ac_cv_prog_cc_c89" != no; then
7bbec45b
CY
8567 { echo "$as_me:$LINENO: result: yes" >&5
8568echo "${ECHO_T}yes" >&6; }
98418dba 8569
c0d27fcc 8570cat >>confdefs.h <<\_ACEOF
98418dba 8571#define PROTOTYPES 1
c0d27fcc
MR
8572_ACEOF
8573
8574
8575cat >>confdefs.h <<\_ACEOF
8576#define __PROTOTYPES 1
8577_ACEOF
98418dba
CW
8578
8579else
7bbec45b
CY
8580 { echo "$as_me:$LINENO: result: no" >&5
8581echo "${ECHO_T}no" >&6; }
98418dba
CW
8582fi
8583
7bbec45b
CY
8584{ echo "$as_me:$LINENO: checking for working volatile" >&5
8585echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba 8586if test "${ac_cv_c_volatile+set}" = set; then
7bbec45b 8587 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8588else
8589 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
98418dba 8595
98418dba
CW
8596int
8597main ()
8598{
8599
8600volatile int x;
ca81d7a0
JD
8601int * volatile y = (int *) 0;
8602return !x && !y;
98418dba
CW
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
ca81d7a0
JD
8608if { (ac_try="$ac_compile"
8609case "(($ac_try" in
8610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8611 *) ac_try_echo=$ac_try;;
8612esac
7bbec45b 8613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8614 (eval "$ac_compile") 2>conftest.er1
98418dba 8615 ac_status=$?
edfaf76d
LK
8616 grep -v '^ *+' conftest.er1 >conftest.err
8617 rm -f conftest.er1
8618 cat conftest.err >&5
7bbec45b 8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8620 (exit $ac_status); } && {
8621 test -z "$ac_c_werror_flag" ||
8622 test ! -s conftest.err
8623 } && test -s conftest.$ac_objext; then
98418dba
CW
8624 ac_cv_c_volatile=yes
8625else
7bbec45b 8626 echo "$as_me: failed program was:" >&5
19650fd6
AS
8627sed 's/^/| /' conftest.$ac_ext >&5
8628
ca81d7a0 8629 ac_cv_c_volatile=no
98418dba 8630fi
ca81d7a0
JD
8631
8632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8633fi
7bbec45b
CY
8634{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8635echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8636if test $ac_cv_c_volatile = no; then
8637
c0d27fcc 8638cat >>confdefs.h <<\_ACEOF
7bbec45b 8639#define volatile
c0d27fcc 8640_ACEOF
98418dba
CW
8641
8642fi
8643
7bbec45b
CY
8644{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8645echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba 8646if test "${ac_cv_c_const+set}" = set; then
7bbec45b 8647 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8648else
8649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
98418dba 8655
98418dba
CW
8656int
8657main ()
8658{
8659/* FIXME: Include the comments suggested by Paul. */
8660#ifndef __cplusplus
8661 /* Ultrix mips cc rejects this. */
8662 typedef int charset[2];
f053c89f 8663 const charset cs;
98418dba 8664 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8665 char const *const *pcpcc;
8666 char **ppc;
98418dba
CW
8667 /* NEC SVR4.0.2 mips cc rejects this. */
8668 struct point {int x, y;};
8669 static struct point const zero = {0,0};
8670 /* AIX XL C 1.02.0.0 rejects this.
8671 It does not let you subtract one const X* pointer from another in
8672 an arm of an if-expression whose if-part is not a constant
8673 expression */
8674 const char *g = "string";
f053c89f 8675 pcpcc = &g + (g ? g-g : 0);
98418dba 8676 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8677 ++pcpcc;
8678 ppc = (char**) pcpcc;
8679 pcpcc = (char const *const *) ppc;
98418dba
CW
8680 { /* SCO 3.2v4 cc rejects this. */
8681 char *t;
8682 char const *s = 0 ? (char *) 0 : (char const *) 0;
8683
8684 *t++ = 0;
ca81d7a0 8685 if (s) return 0;
98418dba
CW
8686 }
8687 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8688 int x[] = {25, 17};
8689 const int *foo = &x[0];
8690 ++foo;
8691 }
8692 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8693 typedef const int *iptr;
8694 iptr p = 0;
8695 ++p;
8696 }
8697 { /* AIX XL C 1.02.0.0 rejects this saying
8698 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8699 struct s { int j; const int *ap[3]; };
8700 struct s *b; b->j = 5;
8701 }
8702 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8703 const int foo = 10;
ca81d7a0 8704 if (!foo) return 0;
98418dba 8705 }
f053c89f 8706 return !cs[0] && !zero.x;
98418dba
CW
8707#endif
8708
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713rm -f conftest.$ac_objext
ca81d7a0
JD
8714if { (ac_try="$ac_compile"
8715case "(($ac_try" in
8716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8717 *) ac_try_echo=$ac_try;;
8718esac
7bbec45b 8719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8720 (eval "$ac_compile") 2>conftest.er1
98418dba 8721 ac_status=$?
edfaf76d
LK
8722 grep -v '^ *+' conftest.er1 >conftest.err
8723 rm -f conftest.er1
8724 cat conftest.err >&5
7bbec45b 8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8726 (exit $ac_status); } && {
8727 test -z "$ac_c_werror_flag" ||
8728 test ! -s conftest.err
8729 } && test -s conftest.$ac_objext; then
98418dba
CW
8730 ac_cv_c_const=yes
8731else
7bbec45b 8732 echo "$as_me: failed program was:" >&5
19650fd6
AS
8733sed 's/^/| /' conftest.$ac_ext >&5
8734
ca81d7a0 8735 ac_cv_c_const=no
98418dba 8736fi
ca81d7a0
JD
8737
8738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8739fi
7bbec45b
CY
8740{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8741echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8742if test $ac_cv_c_const = no; then
8743
c0d27fcc 8744cat >>confdefs.h <<\_ACEOF
7bbec45b 8745#define const
c0d27fcc 8746_ACEOF
98418dba
CW
8747
8748fi
8749
7bbec45b
CY
8750{ echo "$as_me:$LINENO: checking for void * support" >&5
8751echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba 8752if test "${emacs_cv_void_star+set}" = set; then
7bbec45b 8753 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8754else
8755 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8756/* confdefs.h. */
8757_ACEOF
8758cat confdefs.h >>conftest.$ac_ext
8759cat >>conftest.$ac_ext <<_ACEOF
8760/* end confdefs.h. */
98418dba 8761
98418dba
CW
8762int
8763main ()
8764{
8765void * foo;
8766 ;
8767 return 0;
8768}
8769_ACEOF
8770rm -f conftest.$ac_objext
ca81d7a0
JD
8771if { (ac_try="$ac_compile"
8772case "(($ac_try" in
8773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8774 *) ac_try_echo=$ac_try;;
8775esac
7bbec45b 8776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 8777 (eval "$ac_compile") 2>conftest.er1
98418dba 8778 ac_status=$?
edfaf76d
LK
8779 grep -v '^ *+' conftest.er1 >conftest.err
8780 rm -f conftest.er1
8781 cat conftest.err >&5
7bbec45b 8782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8783 (exit $ac_status); } && {
8784 test -z "$ac_c_werror_flag" ||
8785 test ! -s conftest.err
8786 } && test -s conftest.$ac_objext; then
98418dba
CW
8787 emacs_cv_void_star=yes
8788else
7bbec45b 8789 echo "$as_me: failed program was:" >&5
19650fd6
AS
8790sed 's/^/| /' conftest.$ac_ext >&5
8791
ca81d7a0 8792 emacs_cv_void_star=no
98418dba 8793fi
ca81d7a0
JD
8794
8795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8796fi
7bbec45b
CY
8797{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8798echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8799if test $emacs_cv_void_star = yes; then
c0d27fcc 8800 cat >>confdefs.h <<\_ACEOF
98418dba 8801#define POINTER_TYPE void
c0d27fcc 8802_ACEOF
98418dba
CW
8803
8804else
c0d27fcc 8805 cat >>confdefs.h <<\_ACEOF
98418dba 8806#define POINTER_TYPE char
c0d27fcc 8807_ACEOF
98418dba
CW
8808
8809fi
8810
c0d27fcc 8811
4494a266
JD
8812
8813
cd958eb3 8814
7bbec45b
CY
8815{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8816echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8817set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
ca81d7a0 8818if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 8819 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8820else
c0d27fcc 8821 cat >conftest.make <<\_ACEOF
ca81d7a0 8822SHELL = /bin/sh
98418dba 8823all:
ca81d7a0 8824 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8825_ACEOF
98418dba 8826# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8827case `${MAKE-make} -f conftest.make 2>/dev/null` in
8828 *@@@%%%=?*=@@@%%%*)
8829 eval ac_cv_prog_make_${ac_make}_set=yes;;
8830 *)
8831 eval ac_cv_prog_make_${ac_make}_set=no;;
8832esac
98418dba
CW
8833rm -f conftest.make
8834fi
ca81d7a0 8835if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7bbec45b
CY
8836 { echo "$as_me:$LINENO: result: yes" >&5
8837echo "${ECHO_T}yes" >&6; }
98418dba
CW
8838 SET_MAKE=
8839else
7bbec45b
CY
8840 { echo "$as_me:$LINENO: result: no" >&5
8841echo "${ECHO_T}no" >&6; }
98418dba
CW
8842 SET_MAKE="MAKE=${MAKE-make}"
8843fi
8844
c0d27fcc 8845
7bbec45b
CY
8846{ echo "$as_me:$LINENO: checking for long file names" >&5
8847echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba 8848if test "${ac_cv_sys_long_file_names+set}" = set; then
7bbec45b 8849 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8850else
8851 ac_cv_sys_long_file_names=yes
8852# Test for long file names in all the places we know might matter:
8853# . the current directory, where building will happen
8854# $prefix/lib where we will be installing things
8855# $exec_prefix/lib likewise
98418dba 8856# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8857# /tmp where it might want to write temporary files
8858# /var/tmp likewise
8859# /usr/tmp likewise
ca81d7a0
JD
8860for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8861 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8862 # in the usual case where exec_prefix is '${prefix}'.
8863 case $ac_dir in #(
8864 . | /* | ?:[\\/]*) ;; #(
8865 *) continue;;
8866 esac
8867 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8868 ac_xdir=$ac_dir/cf$$
ca81d7a0 8869 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8870 ac_tf1=$ac_xdir/conftest9012345
8871 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8872 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8873 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8874 rm -f -r "$ac_xdir" 2>/dev/null
8875 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8876done
8877fi
7bbec45b
CY
8878{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8879echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8880if test $ac_cv_sys_long_file_names = yes; then
8881
c0d27fcc 8882cat >>confdefs.h <<\_ACEOF
98418dba 8883#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8884_ACEOF
98418dba
CW
8885
8886fi
8887
c0d27fcc 8888
98418dba
CW
8889#### Choose a window system.
8890
7bbec45b
CY
8891{ echo "$as_me:$LINENO: checking for X" >&5
8892echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8893
c0d27fcc 8894
ca81d7a0 8895# Check whether --with-x was given.
98418dba 8896if test "${with_x+set}" = set; then
ca81d7a0
JD
8897 withval=$with_x;
8898fi
98418dba 8899
98418dba
CW
8900# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8901if test "x$with_x" = xno; then
8902 # The user explicitly disabled X.
8903 have_x=disabled
8904else
ca81d7a0 8905 case $x_includes,$x_libraries in #(
7bbec45b
CY
8906 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8907echo "$as_me: error: Cannot use X directory names containing '" >&2;}
ca81d7a0
JD
8908 { (exit 1); exit 1; }; };; #(
8909 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
7bbec45b 8910 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
8911else
8912 # One or both of the vars are not set, and there is no cached value.
8913ac_x_includes=no ac_x_libraries=no
ca81d7a0 8914rm -f -r conftest.dir
98418dba
CW
8915if mkdir conftest.dir; then
8916 cd conftest.dir
c0d27fcc 8917 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8918incroot:
8919 @echo incroot='${INCROOT}'
8920usrlibdir:
8921 @echo usrlibdir='${USRLIBDIR}'
8922libdir:
8923 @echo libdir='${LIBDIR}'
8924_ACEOF
8925 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8926 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8927 for ac_var in incroot usrlibdir libdir; do
8928 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8929 done
98418dba 8930 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7bbec45b 8931 for ac_extension in a so sl; do
ca81d7a0
JD
8932 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8933 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8934 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8935 fi
8936 done
8937 # Screen out bogus values from the imake configuration. They are
8938 # bogus both because they are the default anyway, and because
8939 # using them would break gcc on systems where it needs fixed includes.
8940 case $ac_im_incroot in
ca81d7a0 8941 /usr/include) ac_x_includes= ;;
98418dba
CW
8942 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8943 esac
8944 case $ac_im_usrlibdir in
b0448899 8945 /usr/lib | /lib) ;;
98418dba
CW
8946 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8947 esac
8948 fi
8949 cd ..
ca81d7a0 8950 rm -f -r conftest.dir
98418dba
CW
8951fi
8952
8953# Standard set of common directories for X headers.
8954# Check X11 before X11Rn because it is often a symlink to the current release.
8955ac_x_header_dirs='
8956/usr/X11/include
8957/usr/X11R6/include
8958/usr/X11R5/include
8959/usr/X11R4/include
8960
8961/usr/include/X11
8962/usr/include/X11R6
8963/usr/include/X11R5
8964/usr/include/X11R4
8965
8966/usr/local/X11/include
8967/usr/local/X11R6/include
8968/usr/local/X11R5/include
8969/usr/local/X11R4/include
8970
8971/usr/local/include/X11
8972/usr/local/include/X11R6
8973/usr/local/include/X11R5
8974/usr/local/include/X11R4
8975
8976/usr/X386/include
8977/usr/x386/include
8978/usr/XFree86/include/X11
8979
8980/usr/include
8981/usr/local/include
8982/usr/unsupported/include
8983/usr/athena/include
8984/usr/local/x11r5/include
8985/usr/lpp/Xamples/include
8986
8987/usr/openwin/include
8988/usr/openwin/share/include'
8989
8990if test "$ac_x_includes" = no; then
ca81d7a0 8991 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8992 # First, try using that file with no special directory specified.
8993 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8994/* confdefs.h. */
8995_ACEOF
8996cat confdefs.h >>conftest.$ac_ext
8997cat >>conftest.$ac_ext <<_ACEOF
8998/* end confdefs.h. */
ca81d7a0 8999#include <X11/Xlib.h>
98418dba 9000_ACEOF
ca81d7a0
JD
9001if { (ac_try="$ac_cpp conftest.$ac_ext"
9002case "(($ac_try" in
9003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9004 *) ac_try_echo=$ac_try;;
9005esac
7bbec45b 9006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9007 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9008 ac_status=$?
6bae0ccf 9009 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9010 rm -f conftest.er1
9011 cat conftest.err >&5
7bbec45b 9012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9013 (exit $ac_status); } >/dev/null && {
9014 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9015 test ! -s conftest.err
9016 }; then
98418dba
CW
9017 # We can compile using X headers with no special include directory.
9018ac_x_includes=
9019else
7bbec45b 9020 echo "$as_me: failed program was:" >&5
19650fd6
AS
9021sed 's/^/| /' conftest.$ac_ext >&5
9022
98418dba 9023 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9024 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9025 ac_x_includes=$ac_dir
9026 break
9027 fi
9028done
9029fi
ca81d7a0 9030
98418dba
CW
9031rm -f conftest.err conftest.$ac_ext
9032fi # $ac_x_includes = no
9033
9034if test "$ac_x_libraries" = no; then
9035 # Check for the libraries.
9036 # See if we find them without any special options.
9037 # Don't add to $LIBS permanently.
9038 ac_save_LIBS=$LIBS
f053c89f 9039 LIBS="-lX11 $LIBS"
98418dba 9040 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9041/* confdefs.h. */
9042_ACEOF
9043cat confdefs.h >>conftest.$ac_ext
9044cat >>conftest.$ac_ext <<_ACEOF
9045/* end confdefs.h. */
ca81d7a0 9046#include <X11/Xlib.h>
98418dba
CW
9047int
9048main ()
9049{
ca81d7a0 9050XrmInitialize ()
98418dba
CW
9051 ;
9052 return 0;
9053}
9054_ACEOF
9055rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9056if { (ac_try="$ac_link"
9057case "(($ac_try" in
9058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9059 *) ac_try_echo=$ac_try;;
9060esac
7bbec45b 9061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9062 (eval "$ac_link") 2>conftest.er1
98418dba 9063 ac_status=$?
edfaf76d
LK
9064 grep -v '^ *+' conftest.er1 >conftest.err
9065 rm -f conftest.er1
9066 cat conftest.err >&5
7bbec45b 9067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9068 (exit $ac_status); } && {
9069 test -z "$ac_c_werror_flag" ||
9070 test ! -s conftest.err
7bbec45b
CY
9071 } && test -s conftest$ac_exeext &&
9072 $as_test_x conftest$ac_exeext; then
98418dba
CW
9073 LIBS=$ac_save_LIBS
9074# We can link X programs with no special library path.
9075ac_x_libraries=
9076else
7bbec45b 9077 echo "$as_me: failed program was:" >&5
19650fd6
AS
9078sed 's/^/| /' conftest.$ac_ext >&5
9079
ca81d7a0 9080 LIBS=$ac_save_LIBS
7bbec45b 9081for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
98418dba
CW
9082do
9083 # Don't even attempt the hair of trying to link an X program!
7bbec45b 9084 for ac_extension in a so sl; do
f053c89f 9085 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9086 ac_x_libraries=$ac_dir
9087 break 2
9088 fi
9089 done
9090done
9091fi
ca81d7a0 9092
f053c89f 9093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9094 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9095fi # $ac_x_libraries = no
9096
ca81d7a0
JD
9097case $ac_x_includes,$ac_x_libraries in #(
9098 no,* | *,no | *\'*)
9099 # Didn't find X, or a directory has "'" in its name.
9100 ac_cv_have_x="have_x=no";; #(
9101 *)
9102 # Record where we found X for the cache.
9103 ac_cv_have_x="have_x=yes\
9104 ac_x_includes='$ac_x_includes'\
9105 ac_x_libraries='$ac_x_libraries'"
9106esac
98418dba 9107fi
ca81d7a0
JD
9108;; #(
9109 *) have_x=yes;;
9110 esac
98418dba
CW
9111 eval "$ac_cv_have_x"
9112fi # $with_x != no
9113
9114if test "$have_x" != yes; then
7bbec45b
CY
9115 { echo "$as_me:$LINENO: result: $have_x" >&5
9116echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9117 no_x=yes
9118else
9119 # If each of the values was on the command line, it overrides each guess.
9120 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9121 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9122 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9123 ac_cv_have_x="have_x=yes\
9124 ac_x_includes='$x_includes'\
9125 ac_x_libraries='$x_libraries'"
7bbec45b
CY
9126 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9127echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9128fi
9129
9130if test "$no_x" = yes; then
9131 window_system=none
9132else
9133 window_system=x11
9134fi
9135
a8cd2496
GM
9136## Workaround for bug in autoconf <= 2.62.
9137## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9138## No need to do anything special for these standard directories.
921fbdf0 9139## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9140if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9141
9142 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9143
9144fi
9145
92d1ccf4
AS
9146if test "${x_libraries}" != NONE; then
9147 if test -n "${x_libraries}"; then
9148 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9149 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9150 fi
98418dba 9151 x_default_search_path=""
92d1ccf4
AS
9152 x_search_path=${x_libraries}
9153 if test -z "${x_search_path}"; then
9154 x_search_path=/usr/lib
9155 fi
9156 for x_library in `echo ${x_search_path}: | \
9157 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9158 x_search_path="\
9159${x_library}/X11/%L/%T/%N%C%S:\
9160${x_library}/X11/%l/%T/%N%C%S:\
9161${x_library}/X11/%T/%N%C%S:\
9162${x_library}/X11/%L/%T/%N%S:\
9163${x_library}/X11/%l/%T/%N%S:\
9164${x_library}/X11/%T/%N%S"
9165 if test x"${x_default_search_path}" = x; then
9166 x_default_search_path=${x_search_path}
9167 else
9168 x_default_search_path="${x_search_path}:${x_default_search_path}"
9169 fi
9170 done
9171fi
9172if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9173 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9174fi
9175
9176if test x"${x_includes}" = x; then
9177 bitmapdir=/usr/include/X11/bitmaps
9178else
9179 # accumulate include directories that have X11 bitmap subdirectories
9180 bmd_acc="dummyval"
9181 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9182 if test -d "${bmd}/X11/bitmaps"; then
9183 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9184 fi
9185 if test -d "${bmd}/bitmaps"; then
9186 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9187 fi
9188 done
9189 if test ${bmd_acc} != "dummyval"; then
9190 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9191 fi
9192fi
9193
edfda783 9194HAVE_NS=no
ff1095d1
AR
9195NS_IMPL_COCOA=no
9196NS_IMPL_GNUSTEP=no
edfda783
AR
9197tmp_CPPFLAGS="$CPPFLAGS"
9198tmp_CFLAGS="$CFLAGS"
9199CPPFLAGS="$CPPFLAGS -x objective-c"
9200CFLAGS="$CFLAGS -x objective-c"
9201if test "${with_ns}" != no; then
9202 if test "${opsys}" = darwin; then
ff1095d1 9203 NS_IMPL_COCOA=yes
06b62770
AR
9204 ns_appdir=`pwd`/nextstep/Emacs.app
9205 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9206 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9207 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
ecd43cb9 9208 elif test -f $GNUSTEP_CONFIG_FILE; then
ff1095d1 9209 NS_IMPL_GNUSTEP=yes
06b62770
AR
9210 ns_appdir=`pwd`/nextstep/Emacs.app
9211 ns_appbindir=`pwd`/nextstep/Emacs.app
9212 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9213 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
ecd43cb9
GM
9214 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
9215 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9216 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
edfda783
AR
9217 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9218 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9219 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9220 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9221 fi
9222 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
7bbec45b
CY
9223 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9224echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
edfda783 9225if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
7bbec45b 9226 echo $ECHO_N "(cached) $ECHO_C" >&6
edfda783 9227fi
7bbec45b
CY
9228{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9229echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
edfda783
AR
9230else
9231 # Is the header compilable?
7bbec45b
CY
9232{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9233echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
edfda783
AR
9234cat >conftest.$ac_ext <<_ACEOF
9235/* confdefs.h. */
9236_ACEOF
9237cat confdefs.h >>conftest.$ac_ext
9238cat >>conftest.$ac_ext <<_ACEOF
9239/* end confdefs.h. */
9240$ac_includes_default
9241#include <AppKit/AppKit.h>
9242_ACEOF
9243rm -f conftest.$ac_objext
9244if { (ac_try="$ac_compile"
9245case "(($ac_try" in
9246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9247 *) ac_try_echo=$ac_try;;
9248esac
7bbec45b 9249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
edfda783
AR
9250 (eval "$ac_compile") 2>conftest.er1
9251 ac_status=$?
9252 grep -v '^ *+' conftest.er1 >conftest.err
9253 rm -f conftest.er1
9254 cat conftest.err >&5
7bbec45b 9255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfda783
AR
9256 (exit $ac_status); } && {
9257 test -z "$ac_c_werror_flag" ||
9258 test ! -s conftest.err
9259 } && test -s conftest.$ac_objext; then
9260 ac_header_compiler=yes
9261else
7bbec45b 9262 echo "$as_me: failed program was:" >&5
edfda783
AR
9263sed 's/^/| /' conftest.$ac_ext >&5
9264
9265 ac_header_compiler=no
9266fi
9267
9268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
9269{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9270echo "${ECHO_T}$ac_header_compiler" >&6; }
edfda783
AR
9271
9272# Is the header present?
7bbec45b
CY
9273{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9274echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
edfda783
AR
9275cat >conftest.$ac_ext <<_ACEOF
9276/* confdefs.h. */
9277_ACEOF
9278cat confdefs.h >>conftest.$ac_ext
9279cat >>conftest.$ac_ext <<_ACEOF
9280/* end confdefs.h. */
9281#include <AppKit/AppKit.h>
9282_ACEOF
9283if { (ac_try="$ac_cpp conftest.$ac_ext"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
7bbec45b 9288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
edfda783
AR
9289 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9290 ac_status=$?
9291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
7bbec45b 9294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfda783
AR
9295 (exit $ac_status); } >/dev/null && {
9296 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9297 test ! -s conftest.err
9298 }; then
9299 ac_header_preproc=yes
9300else
7bbec45b 9301 echo "$as_me: failed program was:" >&5
edfda783
AR
9302sed 's/^/| /' conftest.$ac_ext >&5
9303
9304 ac_header_preproc=no
9305fi
9306
9307rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
9308{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9309echo "${ECHO_T}$ac_header_preproc" >&6; }
edfda783
AR
9310
9311# So? What about this header?
9312case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9313 yes:no: )
7bbec45b
CY
9314 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9315echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9316 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9317echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
edfda783
AR
9318 ac_header_preproc=yes
9319 ;;
9320 no:yes:* )
7bbec45b
CY
9321 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9322echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9323 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9324echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9325 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9326echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9327 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9328echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9329 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9330echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9331 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9332echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
edfda783
AR
9333
9334 ;;
9335esac
7bbec45b
CY
9336{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9337echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
edfda783 9338if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
7bbec45b 9339 echo $ECHO_N "(cached) $ECHO_C" >&6
edfda783
AR
9340else
9341 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9342fi
7bbec45b
CY
9343{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9344echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
edfda783
AR
9345
9346fi
b0448899 9347if test $ac_cv_header_AppKit_AppKit_h = yes; then
edfda783 9348 HAVE_NS=yes
ecd43cb9 9349else
7bbec45b 9350 { { echo "$as_me:$LINENO: error: \`--with-ns' was specified, but the include
ecd43cb9 9351 files are missing or cannot be compiled." >&5
7bbec45b 9352echo "$as_me: error: \`--with-ns' was specified, but the include
ecd43cb9
GM
9353 files are missing or cannot be compiled." >&2;}
9354 { (exit 1); exit 1; }; }
edfda783
AR
9355fi
9356
9357
d5e2f8fe 9358 NS_HAVE_NSINTEGER=yes
519c4a9a
CY
9359 cat >conftest.$ac_ext <<_ACEOF
9360/* confdefs.h. */
9361_ACEOF
9362cat confdefs.h >>conftest.$ac_ext
9363cat >>conftest.$ac_ext <<_ACEOF
9364/* end confdefs.h. */
9365#include <Foundation/NSObjCRuntime.h>
9366int
9367main ()
9368{
9369NSInteger i;
9370 ;
9371 return 0;
9372}
9373_ACEOF
9374rm -f conftest.$ac_objext
9375if { (ac_try="$ac_compile"
9376case "(($ac_try" in
9377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9378 *) ac_try_echo=$ac_try;;
9379esac
7bbec45b 9380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
519c4a9a
CY
9381 (eval "$ac_compile") 2>conftest.er1
9382 ac_status=$?
9383 grep -v '^ *+' conftest.er1 >conftest.err
9384 rm -f conftest.er1
9385 cat conftest.err >&5
7bbec45b 9386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
519c4a9a
CY
9387 (exit $ac_status); } && {
9388 test -z "$ac_c_werror_flag" ||
9389 test ! -s conftest.err
9390 } && test -s conftest.$ac_objext; then
d5e2f8fe 9391 ns_have_nsinteger=yes
519c4a9a 9392else
7bbec45b 9393 echo "$as_me: failed program was:" >&5
519c4a9a
CY
9394sed 's/^/| /' conftest.$ac_ext >&5
9395
d5e2f8fe 9396 ns_have_nsinteger=no
519c4a9a
CY
9397fi
9398
9399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d5e2f8fe
AR
9400 if test $ns_have_nsinteger = no; then
9401 NS_HAVE_NSINTEGER=no
519c4a9a 9402 fi
edfda783
AR
9403fi
9404if test "${HAVE_NS}" = yes; then
9405 window_system=nextstep
9406 with_xft=no
06b62770
AR
9407 # set up packaging dirs
9408 exec_prefix=${ns_appbindir}
9409 libexecdir=${ns_appbindir}/libexec
9410 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9411 prefix=${ns_appresdir}
9412 fi
edfda783
AR
9413fi
9414CFLAGS="$tmp_CFLAGS"
9415CPPFLAGS="$tmp_CPPFLAGS"
9416
1d4d5604
YM
9417case "${window_system}" in
9418 x11 )
9419 HAVE_X_WINDOWS=yes
9420 HAVE_X11=yes
9421 case "${with_x_toolkit}" in
9422 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9423 motif ) USE_X_TOOLKIT=MOTIF ;;
9424 gtk ) with_gtk=yes
9425 USE_X_TOOLKIT=none ;;
9426 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9427 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9428 esac
9429 ;;
9e2a2647 9430 nextstep | none )
1d4d5604
YM
9431 HAVE_X_WINDOWS=no
9432 HAVE_X11=no
9433 USE_X_TOOLKIT=none
9434 ;;
9435esac
9436
cfe440b8
JD
9437if test "$window_system" = none && test "X$with_x" != "Xno"; then
9438 # Extract the first word of "X", so it can be a program name with args.
9439set dummy X; ac_word=$2
7bbec45b
CY
9440{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9441echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
cfe440b8 9442if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
7bbec45b 9443 echo $ECHO_N "(cached) $ECHO_C" >&6
cfe440b8
JD
9444else
9445 if test -n "$HAVE_XSERVER"; then
9446 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9447else
9448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9449for as_dir in $PATH
9450do
9451 IFS=$as_save_IFS
9452 test -z "$as_dir" && as_dir=.
9453 for ac_exec_ext in '' $ac_executable_extensions; do
9454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9455 ac_cv_prog_HAVE_XSERVER="true"
7bbec45b 9456 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
cfe440b8
JD
9457 break 2
9458 fi
9459done
9460done
9461IFS=$as_save_IFS
9462
9463 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9464fi
9465fi
9466HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9467if test -n "$HAVE_XSERVER"; then
7bbec45b
CY
9468 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9469echo "${ECHO_T}$HAVE_XSERVER" >&6; }
cfe440b8 9470else
7bbec45b
CY
9471 { echo "$as_me:$LINENO: result: no" >&5
9472echo "${ECHO_T}no" >&6; }
cfe440b8
JD
9473fi
9474
9475
9476 if test "$HAVE_XSERVER" = true ||
9477 test -n "$DISPLAY" ||
9478 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
7bbec45b 9479 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9480were found. You should install the relevant development files for X
9481and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9482sure you have development files for image handling, i.e.
9483tiff, gif, jpeg, png and xpm.
9484If you are sure you want Emacs compiled without X window support, pass
9485 --without-x
9486to configure." >&5
7bbec45b 9487echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9488were found. You should install the relevant development files for X
9489and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9490sure you have development files for image handling, i.e.
9491tiff, gif, jpeg, png and xpm.
9492If you are sure you want Emacs compiled without X window support, pass
9493 --without-x
9494to configure." >&2;}
9495 { (exit 1); exit 1; }; }
9496 fi
9497fi
9498
1d4d5604
YM
9499### If we're using X11, we should use the X menu package.
9500HAVE_MENUS=no
9501case ${HAVE_X11} in
9502 yes ) HAVE_MENUS=yes ;;
9503esac
9504
98418dba
CW
9505# Do the opsystem or machine files prohibit the use of the GNU malloc?
9506# Assume not, until told otherwise.
9507GNU_MALLOC=yes
9508doug_lea_malloc=yes
7bbec45b
CY
9509{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9510echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba 9511if test "${ac_cv_func_malloc_get_state+set}" = set; then
7bbec45b 9512 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9513else
9514 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9515/* confdefs.h. */
9516_ACEOF
9517cat confdefs.h >>conftest.$ac_ext
9518cat >>conftest.$ac_ext <<_ACEOF
9519/* end confdefs.h. */
edfaf76d
LK
9520/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9521 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9522#define malloc_get_state innocuous_malloc_get_state
9523
98418dba 9524/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9525 which can conflict with char malloc_get_state (); below.
9526 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9527 <limits.h> exists even on freestanding compilers. */
edfaf76d 9528
19650fd6
AS
9529#ifdef __STDC__
9530# include <limits.h>
9531#else
9532# include <assert.h>
9533#endif
edfaf76d
LK
9534
9535#undef malloc_get_state
9536
ca81d7a0
JD
9537/* Override any GCC internal prototype to avoid an error.
9538 Use char because int might match the return type of a GCC
9539 builtin and then its argument prototype would still apply. */
98418dba
CW
9540#ifdef __cplusplus
9541extern "C"
9542#endif
98418dba 9543char malloc_get_state ();
98418dba
CW
9544/* The GNU C library defines this for functions which it implements
9545 to always fail with ENOSYS. Some functions are actually named
9546 something starting with __ and the normal name is an alias. */
ca81d7a0 9547#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9548choke me
98418dba
CW
9549#endif
9550
19650fd6
AS
9551int
9552main ()
9553{
ca81d7a0 9554return malloc_get_state ();
98418dba
CW
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9560if { (ac_try="$ac_link"
9561case "(($ac_try" in
9562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9563 *) ac_try_echo=$ac_try;;
9564esac
7bbec45b 9565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9566 (eval "$ac_link") 2>conftest.er1
98418dba 9567 ac_status=$?
edfaf76d
LK
9568 grep -v '^ *+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
7bbec45b 9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9572 (exit $ac_status); } && {
9573 test -z "$ac_c_werror_flag" ||
9574 test ! -s conftest.err
7bbec45b
CY
9575 } && test -s conftest$ac_exeext &&
9576 $as_test_x conftest$ac_exeext; then
98418dba
CW
9577 ac_cv_func_malloc_get_state=yes
9578else
7bbec45b 9579 echo "$as_me: failed program was:" >&5
19650fd6
AS
9580sed 's/^/| /' conftest.$ac_ext >&5
9581
ca81d7a0 9582 ac_cv_func_malloc_get_state=no
98418dba 9583fi
ca81d7a0 9584
f053c89f 9585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9586 conftest$ac_exeext conftest.$ac_ext
98418dba 9587fi
7bbec45b
CY
9588{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9589echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
b0448899 9590if test $ac_cv_func_malloc_get_state = yes; then
98418dba
CW
9591 :
9592else
9593 doug_lea_malloc=no
9594fi
9595
7bbec45b
CY
9596{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9597echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba 9598if test "${ac_cv_func_malloc_set_state+set}" = set; then
7bbec45b 9599 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9600else
9601 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9602/* confdefs.h. */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h. */
edfaf76d
LK
9607/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9608 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9609#define malloc_set_state innocuous_malloc_set_state
9610
98418dba 9611/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9612 which can conflict with char malloc_set_state (); below.
9613 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9614 <limits.h> exists even on freestanding compilers. */
edfaf76d 9615
19650fd6
AS
9616#ifdef __STDC__
9617# include <limits.h>
9618#else
9619# include <assert.h>
9620#endif
edfaf76d
LK
9621
9622#undef malloc_set_state
9623
ca81d7a0
JD
9624/* Override any GCC internal prototype to avoid an error.
9625 Use char because int might match the return type of a GCC
9626 builtin and then its argument prototype would still apply. */
98418dba
CW
9627#ifdef __cplusplus
9628extern "C"
9629#endif
98418dba 9630char malloc_set_state ();
98418dba
CW
9631/* The GNU C library defines this for functions which it implements
9632 to always fail with ENOSYS. Some functions are actually named
9633 something starting with __ and the normal name is an alias. */
ca81d7a0 9634#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9635choke me
98418dba
CW
9636#endif
9637
19650fd6
AS
9638int
9639main ()
9640{
ca81d7a0 9641return malloc_set_state ();
98418dba
CW
9642 ;
9643 return 0;
9644}
9645_ACEOF
9646rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9647if { (ac_try="$ac_link"
9648case "(($ac_try" in
9649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9650 *) ac_try_echo=$ac_try;;
9651esac
7bbec45b 9652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9653 (eval "$ac_link") 2>conftest.er1
98418dba 9654 ac_status=$?
edfaf76d
LK
9655 grep -v '^ *+' conftest.er1 >conftest.err
9656 rm -f conftest.er1
9657 cat conftest.err >&5
7bbec45b 9658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9659 (exit $ac_status); } && {
9660 test -z "$ac_c_werror_flag" ||
9661 test ! -s conftest.err
7bbec45b
CY
9662 } && test -s conftest$ac_exeext &&
9663 $as_test_x conftest$ac_exeext; then
98418dba
CW
9664 ac_cv_func_malloc_set_state=yes
9665else
7bbec45b 9666 echo "$as_me: failed program was:" >&5
19650fd6
AS
9667sed 's/^/| /' conftest.$ac_ext >&5
9668
ca81d7a0 9669 ac_cv_func_malloc_set_state=no
98418dba 9670fi
ca81d7a0 9671
f053c89f 9672rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9673 conftest$ac_exeext conftest.$ac_ext
98418dba 9674fi
7bbec45b
CY
9675{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9676echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
b0448899 9677if test $ac_cv_func_malloc_set_state = yes; then
98418dba
CW
9678 :
9679else
9680 doug_lea_malloc=no
9681fi
9682
7bbec45b
CY
9683{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9684echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba 9685if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
7bbec45b 9686 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9687else
9688 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9689/* confdefs.h. */
9690_ACEOF
9691cat confdefs.h >>conftest.$ac_ext
9692cat >>conftest.$ac_ext <<_ACEOF
9693/* end confdefs.h. */
98418dba 9694extern void (* __after_morecore_hook)();
98418dba
CW
9695int
9696main ()
9697{
9698__after_morecore_hook = 0
9699 ;
9700 return 0;
9701}
9702_ACEOF
9703rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9704if { (ac_try="$ac_link"
9705case "(($ac_try" in
9706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9707 *) ac_try_echo=$ac_try;;
9708esac
7bbec45b 9709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9710 (eval "$ac_link") 2>conftest.er1
98418dba 9711 ac_status=$?
edfaf76d
LK
9712 grep -v '^ *+' conftest.er1 >conftest.err
9713 rm -f conftest.er1
9714 cat conftest.err >&5
7bbec45b 9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9716 (exit $ac_status); } && {
9717 test -z "$ac_c_werror_flag" ||
9718 test ! -s conftest.err
7bbec45b
CY
9719 } && test -s conftest$ac_exeext &&
9720 $as_test_x conftest$ac_exeext; then
98418dba
CW
9721 emacs_cv_var___after_morecore_hook=yes
9722else
7bbec45b 9723 echo "$as_me: failed program was:" >&5
19650fd6
AS
9724sed 's/^/| /' conftest.$ac_ext >&5
9725
ca81d7a0 9726 emacs_cv_var___after_morecore_hook=no
98418dba 9727fi
ca81d7a0 9728
f053c89f 9729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9730 conftest$ac_exeext conftest.$ac_ext
98418dba 9731fi
7bbec45b
CY
9732{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9733echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9734if test $emacs_cv_var___after_morecore_hook = no; then
9735 doug_lea_malloc=no
9736fi
9737if test "${system_malloc}" = "yes"; then
9738 GNU_MALLOC=no
9739 GNU_MALLOC_reason="
9740 (The GNU allocators don't work with this system configuration.)"
9741fi
9742if test "$doug_lea_malloc" = "yes" ; then
9743 if test "$GNU_MALLOC" = yes ; then
9744 GNU_MALLOC_reason="
9745 (Using Doug Lea's new malloc from the GNU C Library.)"
9746 fi
b936fae4 9747
c0d27fcc 9748cat >>confdefs.h <<\_ACEOF
98418dba 9749#define DOUG_LEA_MALLOC 1
c0d27fcc 9750_ACEOF
98418dba
CW
9751
9752fi
9753
9754if test x"${REL_ALLOC}" = x; then
9755 REL_ALLOC=${GNU_MALLOC}
9756fi
9757
9758
c0d27fcc
MR
9759
9760
9761for ac_header in stdlib.h unistd.h
98418dba 9762do
7bbec45b 9763as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 9764if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
9765 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 9767if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 9768 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9769fi
7bbec45b
CY
9770ac_res=`eval echo '${'$as_ac_Header'}'`
9771 { echo "$as_me:$LINENO: result: $ac_res" >&5
9772echo "${ECHO_T}$ac_res" >&6; }
98418dba 9773else
c0d27fcc 9774 # Is the header compilable?
7bbec45b
CY
9775{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9776echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9777cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9778/* confdefs.h. */
9779_ACEOF
9780cat confdefs.h >>conftest.$ac_ext
9781cat >>conftest.$ac_ext <<_ACEOF
9782/* end confdefs.h. */
98418dba
CW
9783$ac_includes_default
9784#include <$ac_header>
9785_ACEOF
9786rm -f conftest.$ac_objext
ca81d7a0
JD
9787if { (ac_try="$ac_compile"
9788case "(($ac_try" in
9789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9790 *) ac_try_echo=$ac_try;;
9791esac
7bbec45b 9792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9793 (eval "$ac_compile") 2>conftest.er1
98418dba 9794 ac_status=$?
edfaf76d
LK
9795 grep -v '^ *+' conftest.er1 >conftest.err
9796 rm -f conftest.er1
9797 cat conftest.err >&5
7bbec45b 9798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9799 (exit $ac_status); } && {
9800 test -z "$ac_c_werror_flag" ||
9801 test ! -s conftest.err
9802 } && test -s conftest.$ac_objext; then
c0d27fcc 9803 ac_header_compiler=yes
98418dba 9804else
7bbec45b 9805 echo "$as_me: failed program was:" >&5
19650fd6
AS
9806sed 's/^/| /' conftest.$ac_ext >&5
9807
ca81d7a0 9808 ac_header_compiler=no
98418dba 9809fi
ca81d7a0
JD
9810
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
9812{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9813echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9814
c0d27fcc 9815# Is the header present?
7bbec45b
CY
9816{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9817echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9819/* confdefs.h. */
9820_ACEOF
9821cat confdefs.h >>conftest.$ac_ext
9822cat >>conftest.$ac_ext <<_ACEOF
9823/* end confdefs.h. */
98418dba
CW
9824#include <$ac_header>
9825_ACEOF
ca81d7a0
JD
9826if { (ac_try="$ac_cpp conftest.$ac_ext"
9827case "(($ac_try" in
9828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9829 *) ac_try_echo=$ac_try;;
9830esac
7bbec45b 9831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9832 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9833 ac_status=$?
6bae0ccf 9834 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9835 rm -f conftest.er1
9836 cat conftest.err >&5
7bbec45b 9837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9838 (exit $ac_status); } >/dev/null && {
9839 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9840 test ! -s conftest.err
9841 }; then
c0d27fcc 9842 ac_header_preproc=yes
98418dba 9843else
7bbec45b 9844 echo "$as_me: failed program was:" >&5
19650fd6
AS
9845sed 's/^/| /' conftest.$ac_ext >&5
9846
c0d27fcc 9847 ac_header_preproc=no
98418dba 9848fi
ca81d7a0 9849
98418dba 9850rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
9851{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9852echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9853
9854# So? What about this header?
edfaf76d
LK
9855case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9856 yes:no: )
7bbec45b
CY
9857 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9858echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9859 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9860echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d
LK
9861 ac_header_preproc=yes
9862 ;;
9863 no:yes:* )
7bbec45b
CY
9864 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9865echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9866 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9867echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9868 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9869echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9870 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9871echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9872 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9873echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9874 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9875echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9876
19650fd6 9877 ;;
c0d27fcc 9878esac
7bbec45b
CY
9879{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9880echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 9881if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 9882 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9883else
edfaf76d 9884 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9885fi
7bbec45b
CY
9886ac_res=`eval echo '${'$as_ac_Header'}'`
9887 { echo "$as_me:$LINENO: result: $ac_res" >&5
9888echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9889
9890fi
7bbec45b 9891if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9892 cat >>confdefs.h <<_ACEOF
7bbec45b 9893#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9894_ACEOF
98418dba
CW
9895
9896fi
c0d27fcc 9897
98418dba
CW
9898done
9899
c0d27fcc 9900
98418dba
CW
9901for ac_func in getpagesize
9902do
7bbec45b
CY
9903as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9904{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9905echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 9906if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 9907 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9908else
9909 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9910/* confdefs.h. */
9911_ACEOF
9912cat confdefs.h >>conftest.$ac_ext
9913cat >>conftest.$ac_ext <<_ACEOF
9914/* end confdefs.h. */
edfaf76d
LK
9915/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9916 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9917#define $ac_func innocuous_$ac_func
9918
98418dba 9919/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9920 which can conflict with char $ac_func (); below.
9921 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9922 <limits.h> exists even on freestanding compilers. */
edfaf76d 9923
19650fd6
AS
9924#ifdef __STDC__
9925# include <limits.h>
9926#else
9927# include <assert.h>
9928#endif
edfaf76d
LK
9929
9930#undef $ac_func
9931
ca81d7a0
JD
9932/* Override any GCC internal prototype to avoid an error.
9933 Use char because int might match the return type of a GCC
9934 builtin and then its argument prototype would still apply. */
98418dba
CW
9935#ifdef __cplusplus
9936extern "C"
9937#endif
98418dba 9938char $ac_func ();
98418dba
CW
9939/* The GNU C library defines this for functions which it implements
9940 to always fail with ENOSYS. Some functions are actually named
9941 something starting with __ and the normal name is an alias. */
ca81d7a0 9942#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9943choke me
98418dba
CW
9944#endif
9945
19650fd6
AS
9946int
9947main ()
9948{
ca81d7a0 9949return $ac_func ();
98418dba
CW
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9955if { (ac_try="$ac_link"
9956case "(($ac_try" in
9957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9958 *) ac_try_echo=$ac_try;;
9959esac
7bbec45b 9960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 9961 (eval "$ac_link") 2>conftest.er1
98418dba 9962 ac_status=$?
edfaf76d
LK
9963 grep -v '^ *+' conftest.er1 >conftest.err
9964 rm -f conftest.er1
9965 cat conftest.err >&5
7bbec45b 9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9967 (exit $ac_status); } && {
9968 test -z "$ac_c_werror_flag" ||
9969 test ! -s conftest.err
7bbec45b
CY
9970 } && test -s conftest$ac_exeext &&
9971 $as_test_x conftest$ac_exeext; then
98418dba
CW
9972 eval "$as_ac_var=yes"
9973else
7bbec45b 9974 echo "$as_me: failed program was:" >&5
19650fd6
AS
9975sed 's/^/| /' conftest.$ac_ext >&5
9976
ca81d7a0 9977 eval "$as_ac_var=no"
98418dba 9978fi
ca81d7a0 9979
f053c89f 9980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9981 conftest$ac_exeext conftest.$ac_ext
98418dba 9982fi
7bbec45b
CY
9983ac_res=`eval echo '${'$as_ac_var'}'`
9984 { echo "$as_me:$LINENO: result: $ac_res" >&5
9985echo "${ECHO_T}$ac_res" >&6; }
9986if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9987 cat >>confdefs.h <<_ACEOF
7bbec45b 9988#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9989_ACEOF
98418dba
CW
9990
9991fi
9992done
9993
7bbec45b
CY
9994{ echo "$as_me:$LINENO: checking for working mmap" >&5
9995echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba 9996if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7bbec45b 9997 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
9998else
9999 if test "$cross_compiling" = yes; then
10000 ac_cv_func_mmap_fixed_mapped=no
10001else
10002 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10003/* confdefs.h. */
10004_ACEOF
10005cat confdefs.h >>conftest.$ac_ext
10006cat >>conftest.$ac_ext <<_ACEOF
10007/* end confdefs.h. */
98418dba 10008$ac_includes_default
c0d27fcc
MR
10009/* malloc might have been renamed as rpl_malloc. */
10010#undef malloc
10011
98418dba
CW
10012/* Thanks to Mike Haertel and Jim Avera for this test.
10013 Here is a matrix of mmap possibilities:
10014 mmap private not fixed
10015 mmap private fixed at somewhere currently unmapped
10016 mmap private fixed at somewhere already mapped
10017 mmap shared not fixed
10018 mmap shared fixed at somewhere currently unmapped
10019 mmap shared fixed at somewhere already mapped
10020 For private mappings, we should verify that changes cannot be read()
10021 back from the file, nor mmap's back from the file at a different
10022 address. (There have been systems where private was not correctly
10023 implemented like the infamous i386 svr4.0, and systems where the
10024 VM page cache was not coherent with the file system buffer cache
10025 like early versions of FreeBSD and possibly contemporary NetBSD.)
10026 For shared mappings, we should conversely verify that changes get
c0d27fcc 10027 propagated back to all the places they're supposed to be.
98418dba
CW
10028
10029 Grep wants private fixed already mapped.
10030 The main things grep needs to know about mmap are:
10031 * does it exist and is it safe to write into the mmap'd area
10032 * how to use it (BSD variants) */
10033
10034#include <fcntl.h>
10035#include <sys/mman.h>
10036
f053c89f 10037#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10038char *malloc ();
10039#endif
10040
10041/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10042#ifndef HAVE_GETPAGESIZE
98418dba 10043/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10044# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10045# define HAVE_SYS_PARAM_H 1
10046# endif
10047
10048# ifdef _SC_PAGESIZE
10049# define getpagesize() sysconf(_SC_PAGESIZE)
10050# else /* no _SC_PAGESIZE */
f053c89f 10051# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10052# include <sys/param.h>
10053# ifdef EXEC_PAGESIZE
10054# define getpagesize() EXEC_PAGESIZE
10055# else /* no EXEC_PAGESIZE */
10056# ifdef NBPG
10057# define getpagesize() NBPG * CLSIZE
10058# ifndef CLSIZE
10059# define CLSIZE 1
10060# endif /* no CLSIZE */
10061# else /* no NBPG */
10062# ifdef NBPC
10063# define getpagesize() NBPC
10064# else /* no NBPC */
10065# ifdef PAGESIZE
10066# define getpagesize() PAGESIZE
10067# endif /* PAGESIZE */
10068# endif /* no NBPC */
10069# endif /* no NBPG */
10070# endif /* no EXEC_PAGESIZE */
10071# else /* no HAVE_SYS_PARAM_H */
10072# define getpagesize() 8192 /* punt totally */
10073# endif /* no HAVE_SYS_PARAM_H */
10074# endif /* no _SC_PAGESIZE */
10075
10076#endif /* no HAVE_GETPAGESIZE */
10077
10078int
10079main ()
10080{
10081 char *data, *data2, *data3;
10082 int i, pagesize;
10083 int fd;
10084
10085 pagesize = getpagesize ();
10086
10087 /* First, make a file with some known garbage in it. */
10088 data = (char *) malloc (pagesize);
10089 if (!data)
ca81d7a0 10090 return 1;
98418dba
CW
10091 for (i = 0; i < pagesize; ++i)
10092 *(data + i) = rand ();
10093 umask (0);
10094 fd = creat ("conftest.mmap", 0600);
10095 if (fd < 0)
ca81d7a0 10096 return 1;
98418dba 10097 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10098 return 1;
98418dba
CW
10099 close (fd);
10100
10101 /* Next, try to mmap the file at a fixed address which already has
10102 something else allocated at it. If we can, also make sure that
10103 we see the same garbage. */
10104 fd = open ("conftest.mmap", O_RDWR);
10105 if (fd < 0)
ca81d7a0 10106 return 1;
98418dba
CW
10107 data2 = (char *) malloc (2 * pagesize);
10108 if (!data2)
ca81d7a0
JD
10109 return 1;
10110 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10111 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10112 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10113 return 1;
98418dba
CW
10114 for (i = 0; i < pagesize; ++i)
10115 if (*(data + i) != *(data2 + i))
ca81d7a0 10116 return 1;
98418dba
CW
10117
10118 /* Finally, make sure that changes to the mapped area do not
10119 percolate back to the file as seen by read(). (This is a bug on
10120 some variants of i386 svr4.0.) */
10121 for (i = 0; i < pagesize; ++i)
10122 *(data2 + i) = *(data2 + i) + 1;
10123 data3 = (char *) malloc (pagesize);
10124 if (!data3)
ca81d7a0 10125 return 1;
98418dba 10126 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10127 return 1;
98418dba
CW
10128 for (i = 0; i < pagesize; ++i)
10129 if (*(data + i) != *(data3 + i))
ca81d7a0 10130 return 1;
98418dba 10131 close (fd);
ca81d7a0 10132 return 0;
98418dba
CW
10133}
10134_ACEOF
10135rm -f conftest$ac_exeext
ca81d7a0
JD
10136if { (ac_try="$ac_link"
10137case "(($ac_try" in
10138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10139 *) ac_try_echo=$ac_try;;
10140esac
7bbec45b 10141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10142 (eval "$ac_link") 2>&5
98418dba 10143 ac_status=$?
7bbec45b 10144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10146 { (case "(($ac_try" in
10147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10148 *) ac_try_echo=$ac_try;;
10149esac
7bbec45b 10150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10151 (eval "$ac_try") 2>&5
98418dba 10152 ac_status=$?
7bbec45b 10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10154 (exit $ac_status); }; }; then
10155 ac_cv_func_mmap_fixed_mapped=yes
10156else
7bbec45b
CY
10157 echo "$as_me: program exited with status $ac_status" >&5
10158echo "$as_me: failed program was:" >&5
19650fd6
AS
10159sed 's/^/| /' conftest.$ac_ext >&5
10160
c0d27fcc 10161( exit $ac_status )
98418dba
CW
10162ac_cv_func_mmap_fixed_mapped=no
10163fi
ca81d7a0 10164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10165fi
ca81d7a0
JD
10166
10167
98418dba 10168fi
7bbec45b
CY
10169{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10170echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10171if test $ac_cv_func_mmap_fixed_mapped = yes; then
10172
c0d27fcc 10173cat >>confdefs.h <<\_ACEOF
98418dba 10174#define HAVE_MMAP 1
c0d27fcc 10175_ACEOF
98418dba
CW
10176
10177fi
10178rm -f conftest.mmap
10179
10180if test $use_mmap_for_buffers = yes; then
10181 REL_ALLOC=no
10182fi
10183
10184LIBS="$libsrc_libs $LIBS"
10185
c0d27fcc 10186
7bbec45b
CY
10187{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10188echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba 10189if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7bbec45b 10190 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10191else
10192 ac_check_lib_save_LIBS=$LIBS
10193LIBS="-ldnet $LIBS"
10194cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10195/* confdefs.h. */
10196_ACEOF
10197cat confdefs.h >>conftest.$ac_ext
10198cat >>conftest.$ac_ext <<_ACEOF
10199/* end confdefs.h. */
98418dba 10200
ca81d7a0
JD
10201/* Override any GCC internal prototype to avoid an error.
10202 Use char because int might match the return type of a GCC
10203 builtin and then its argument prototype would still apply. */
98418dba
CW
10204#ifdef __cplusplus
10205extern "C"
10206#endif
98418dba 10207char dnet_ntoa ();
98418dba
CW
10208int
10209main ()
10210{
ca81d7a0 10211return dnet_ntoa ();
98418dba
CW
10212 ;
10213 return 0;
10214}
10215_ACEOF
10216rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10217if { (ac_try="$ac_link"
10218case "(($ac_try" in
10219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10220 *) ac_try_echo=$ac_try;;
10221esac
7bbec45b 10222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10223 (eval "$ac_link") 2>conftest.er1
98418dba 10224 ac_status=$?
edfaf76d
LK
10225 grep -v '^ *+' conftest.er1 >conftest.err
10226 rm -f conftest.er1
10227 cat conftest.err >&5
7bbec45b 10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10229 (exit $ac_status); } && {
10230 test -z "$ac_c_werror_flag" ||
10231 test ! -s conftest.err
7bbec45b
CY
10232 } && test -s conftest$ac_exeext &&
10233 $as_test_x conftest$ac_exeext; then
98418dba
CW
10234 ac_cv_lib_dnet_dnet_ntoa=yes
10235else
7bbec45b 10236 echo "$as_me: failed program was:" >&5
19650fd6
AS
10237sed 's/^/| /' conftest.$ac_ext >&5
10238
ca81d7a0 10239 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10240fi
ca81d7a0 10241
f053c89f 10242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10243 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10244LIBS=$ac_check_lib_save_LIBS
10245fi
7bbec45b
CY
10246{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10247echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
b0448899 10248if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10249 cat >>confdefs.h <<_ACEOF
98418dba 10250#define HAVE_LIBDNET 1
c0d27fcc 10251_ACEOF
98418dba
CW
10252
10253 LIBS="-ldnet $LIBS"
10254
10255fi
10256
c0d27fcc 10257
7bbec45b
CY
10258{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10259echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba 10260if test "${ac_cv_lib_Xbsd_main+set}" = set; then
7bbec45b 10261 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10262else
10263 ac_check_lib_save_LIBS=$LIBS
10264LIBS="-lXbsd $LIBS"
10265cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10266/* confdefs.h. */
10267_ACEOF
10268cat confdefs.h >>conftest.$ac_ext
10269cat >>conftest.$ac_ext <<_ACEOF
10270/* end confdefs.h. */
98418dba 10271
c0d27fcc 10272
98418dba
CW
10273int
10274main ()
10275{
ca81d7a0 10276return main ();
98418dba
CW
10277 ;
10278 return 0;
10279}
10280_ACEOF
10281rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10282if { (ac_try="$ac_link"
10283case "(($ac_try" in
10284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10285 *) ac_try_echo=$ac_try;;
10286esac
7bbec45b 10287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10288 (eval "$ac_link") 2>conftest.er1
98418dba 10289 ac_status=$?
edfaf76d
LK
10290 grep -v '^ *+' conftest.er1 >conftest.err
10291 rm -f conftest.er1
10292 cat conftest.err >&5
7bbec45b 10293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10294 (exit $ac_status); } && {
10295 test -z "$ac_c_werror_flag" ||
10296 test ! -s conftest.err
7bbec45b
CY
10297 } && test -s conftest$ac_exeext &&
10298 $as_test_x conftest$ac_exeext; then
98418dba
CW
10299 ac_cv_lib_Xbsd_main=yes
10300else
7bbec45b 10301 echo "$as_me: failed program was:" >&5
19650fd6
AS
10302sed 's/^/| /' conftest.$ac_ext >&5
10303
ca81d7a0 10304 ac_cv_lib_Xbsd_main=no
98418dba 10305fi
ca81d7a0 10306
f053c89f 10307rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10308 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10309LIBS=$ac_check_lib_save_LIBS
10310fi
7bbec45b
CY
10311{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10312echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
b0448899 10313if test $ac_cv_lib_Xbsd_main = yes; then
98418dba
CW
10314 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10315fi
10316
c0d27fcc
MR
10317
10318
7bbec45b
CY
10319{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10320echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba 10321if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
7bbec45b 10322 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10323else
10324 ac_check_lib_save_LIBS=$LIBS
10325LIBS="-lpthreads $LIBS"
10326cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10327/* confdefs.h. */
10328_ACEOF
10329cat confdefs.h >>conftest.$ac_ext
10330cat >>conftest.$ac_ext <<_ACEOF
10331/* end confdefs.h. */
98418dba 10332
ca81d7a0
JD
10333/* Override any GCC internal prototype to avoid an error.
10334 Use char because int might match the return type of a GCC
10335 builtin and then its argument prototype would still apply. */
98418dba
CW
10336#ifdef __cplusplus
10337extern "C"
10338#endif
98418dba 10339char cma_open ();
98418dba
CW
10340int
10341main ()
10342{
ca81d7a0 10343return cma_open ();
98418dba
CW
10344 ;
10345 return 0;
10346}
10347_ACEOF
10348rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10349if { (ac_try="$ac_link"
10350case "(($ac_try" in
10351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10352 *) ac_try_echo=$ac_try;;
10353esac
7bbec45b 10354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10355 (eval "$ac_link") 2>conftest.er1
98418dba 10356 ac_status=$?
edfaf76d
LK
10357 grep -v '^ *+' conftest.er1 >conftest.err
10358 rm -f conftest.er1
10359 cat conftest.err >&5
7bbec45b 10360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10361 (exit $ac_status); } && {
10362 test -z "$ac_c_werror_flag" ||
10363 test ! -s conftest.err
7bbec45b
CY
10364 } && test -s conftest$ac_exeext &&
10365 $as_test_x conftest$ac_exeext; then
98418dba
CW
10366 ac_cv_lib_pthreads_cma_open=yes
10367else
7bbec45b 10368 echo "$as_me: failed program was:" >&5
19650fd6
AS
10369sed 's/^/| /' conftest.$ac_ext >&5
10370
ca81d7a0 10371 ac_cv_lib_pthreads_cma_open=no
98418dba 10372fi
ca81d7a0 10373
f053c89f 10374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10375 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10376LIBS=$ac_check_lib_save_LIBS
10377fi
7bbec45b
CY
10378{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10379echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
b0448899 10380if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10381 cat >>confdefs.h <<_ACEOF
98418dba 10382#define HAVE_LIBPTHREADS 1
c0d27fcc 10383_ACEOF
98418dba
CW
10384
10385 LIBS="-lpthreads $LIBS"
10386
10387fi
10388
c0d27fcc 10389
55597d70
DL
10390
10391case ${host_os} in
10392aix*)
7bbec45b
CY
10393 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10394echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70 10395if test "${gdb_cv_bigtoc+set}" = set; then
7bbec45b 10396 echo $ECHO_N "(cached) $ECHO_C" >&6
55597d70
DL
10397else
10398
10399 case $GCC in
10400 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10401 *) gdb_cv_bigtoc=-bbigtoc ;;
10402 esac
10403
10404 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10405 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10406/* confdefs.h. */
10407_ACEOF
10408cat confdefs.h >>conftest.$ac_ext
10409cat >>conftest.$ac_ext <<_ACEOF
10410/* end confdefs.h. */
55597d70
DL
10411
10412int
10413main ()
10414{
10415int i;
10416 ;
10417 return 0;
10418}
10419_ACEOF
10420rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10421if { (ac_try="$ac_link"
10422case "(($ac_try" in
10423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10424 *) ac_try_echo=$ac_try;;
10425esac
7bbec45b 10426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10427 (eval "$ac_link") 2>conftest.er1
55597d70 10428 ac_status=$?
edfaf76d
LK
10429 grep -v '^ *+' conftest.er1 >conftest.err
10430 rm -f conftest.er1
10431 cat conftest.err >&5
7bbec45b 10432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10433 (exit $ac_status); } && {
10434 test -z "$ac_c_werror_flag" ||
10435 test ! -s conftest.err
7bbec45b
CY
10436 } && test -s conftest$ac_exeext &&
10437 $as_test_x conftest$ac_exeext; then
55597d70
DL
10438 :
10439else
7bbec45b 10440 echo "$as_me: failed program was:" >&5
19650fd6
AS
10441sed 's/^/| /' conftest.$ac_ext >&5
10442
ca81d7a0 10443 gdb_cv_bigtoc=
55597d70 10444fi
ca81d7a0 10445
f053c89f 10446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10447 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10448
10449fi
7bbec45b
CY
10450{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10451echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10452 ;;
10453esac
10454
ae1a998c
RS
10455# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10456# used for the tests that follow. We set them back to REAL_CFLAGS and
10457# REAL_CPPFLAGS later on.
98418dba
CW
10458
10459REAL_CPPFLAGS="$CPPFLAGS"
10460
10461if test "${HAVE_X11}" = "yes"; then
10462 DEFS="$C_SWITCH_X_SITE $DEFS"
10463 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10464 LIBS="$LIBX $LIBS"
10465 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10466 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10467
10468 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10469 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10470 # but it's more convenient here to set LD_RUN_PATH
10471 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10472 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10473 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10474 export LD_RUN_PATH
10475 fi
10476
10477 if test "${opsys}" = "gnu-linux"; then
7bbec45b
CY
10478 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10479echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10480 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10481/* confdefs.h. */
10482_ACEOF
10483cat confdefs.h >>conftest.$ac_ext
10484cat >>conftest.$ac_ext <<_ACEOF
10485/* end confdefs.h. */
98418dba 10486
98418dba
CW
10487int
10488main ()
10489{
10490XOpenDisplay ("foo");
10491 ;
10492 return 0;
10493}
10494_ACEOF
10495rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10496if { (ac_try="$ac_link"
10497case "(($ac_try" in
10498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10499 *) ac_try_echo=$ac_try;;
10500esac
7bbec45b 10501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10502 (eval "$ac_link") 2>conftest.er1
98418dba 10503 ac_status=$?
edfaf76d
LK
10504 grep -v '^ *+' conftest.er1 >conftest.err
10505 rm -f conftest.er1
10506 cat conftest.err >&5
7bbec45b 10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10508 (exit $ac_status); } && {
10509 test -z "$ac_c_werror_flag" ||
10510 test ! -s conftest.err
7bbec45b
CY
10511 } && test -s conftest$ac_exeext &&
10512 $as_test_x conftest$ac_exeext; then
35996d22 10513 xlinux_first_failure=no
98418dba 10514else
7bbec45b 10515 echo "$as_me: failed program was:" >&5
19650fd6
AS
10516sed 's/^/| /' conftest.$ac_ext >&5
10517
ca81d7a0 10518 xlinux_first_failure=yes
98418dba 10519fi
ca81d7a0 10520
f053c89f 10521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10522 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10523 if test "${xlinux_first_failure}" = "yes"; then
10524 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10525 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10526 OLD_CPPFLAGS="$CPPFLAGS"
10527 OLD_LIBS="$LIBS"
10528 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10529 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10530 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10531 LIBS="$LIBS -b i486-linuxaout"
10532 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10533/* confdefs.h. */
10534_ACEOF
10535cat confdefs.h >>conftest.$ac_ext
10536cat >>conftest.$ac_ext <<_ACEOF
10537/* end confdefs.h. */
98418dba 10538
98418dba
CW
10539int
10540main ()
10541{
10542XOpenDisplay ("foo");
10543 ;
10544 return 0;
10545}
10546_ACEOF
10547rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10548if { (ac_try="$ac_link"
10549case "(($ac_try" in
10550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10551 *) ac_try_echo=$ac_try;;
10552esac
7bbec45b 10553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10554 (eval "$ac_link") 2>conftest.er1
98418dba 10555 ac_status=$?
edfaf76d
LK
10556 grep -v '^ *+' conftest.er1 >conftest.err
10557 rm -f conftest.er1
10558 cat conftest.err >&5
7bbec45b 10559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10560 (exit $ac_status); } && {
10561 test -z "$ac_c_werror_flag" ||
10562 test ! -s conftest.err
7bbec45b
CY
10563 } && test -s conftest$ac_exeext &&
10564 $as_test_x conftest$ac_exeext; then
98418dba
CW
10565 xlinux_second_failure=no
10566else
7bbec45b 10567 echo "$as_me: failed program was:" >&5
19650fd6
AS
10568sed 's/^/| /' conftest.$ac_ext >&5
10569
ca81d7a0 10570 xlinux_second_failure=yes
98418dba 10571fi
ca81d7a0 10572
f053c89f 10573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10574 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10575 if test "${xlinux_second_failure}" = "yes"; then
10576 # If we get the same failure with -b, there is no use adding -b.
10577 # So take it out. This plays safe.
10578 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10579 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10580 CPPFLAGS="$OLD_CPPFLAGS"
10581 LIBS="$OLD_LIBS"
7bbec45b
CY
10582 { echo "$as_me:$LINENO: result: no" >&5
10583echo "${ECHO_T}no" >&6; }
98418dba 10584 else
7bbec45b
CY
10585 { echo "$as_me:$LINENO: result: yes" >&5
10586echo "${ECHO_T}yes" >&6; }
98418dba
CW
10587 fi
10588 else
7bbec45b
CY
10589 { echo "$as_me:$LINENO: result: no" >&5
10590echo "${ECHO_T}no" >&6; }
98418dba
CW
10591 fi
10592 fi
10593
10594 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10595 # header files included from there.
7bbec45b
CY
10596 { echo "$as_me:$LINENO: checking for Xkb" >&5
10597echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10598 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10599/* confdefs.h. */
10600_ACEOF
10601cat confdefs.h >>conftest.$ac_ext
10602cat >>conftest.$ac_ext <<_ACEOF
10603/* end confdefs.h. */
98418dba
CW
10604#include <X11/Xlib.h>
10605#include <X11/XKBlib.h>
98418dba
CW
10606int
10607main ()
10608{
10609XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10610 ;
10611 return 0;
10612}
10613_ACEOF
10614rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10615if { (ac_try="$ac_link"
10616case "(($ac_try" in
10617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10618 *) ac_try_echo=$ac_try;;
10619esac
7bbec45b 10620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10621 (eval "$ac_link") 2>conftest.er1
98418dba 10622 ac_status=$?
edfaf76d
LK
10623 grep -v '^ *+' conftest.er1 >conftest.err
10624 rm -f conftest.er1
10625 cat conftest.err >&5
7bbec45b 10626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10627 (exit $ac_status); } && {
10628 test -z "$ac_c_werror_flag" ||
10629 test ! -s conftest.err
7bbec45b
CY
10630 } && test -s conftest$ac_exeext &&
10631 $as_test_x conftest$ac_exeext; then
98418dba
CW
10632 emacs_xkb=yes
10633else
7bbec45b 10634 echo "$as_me: failed program was:" >&5
19650fd6
AS
10635sed 's/^/| /' conftest.$ac_ext >&5
10636
ca81d7a0 10637 emacs_xkb=no
98418dba 10638fi
ca81d7a0 10639
f053c89f 10640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10641 conftest$ac_exeext conftest.$ac_ext
7bbec45b
CY
10642 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10643echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10644 if test $emacs_xkb = yes; then
b936fae4 10645
c0d27fcc 10646cat >>confdefs.h <<\_ACEOF
98418dba 10647#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10648_ACEOF
98418dba
CW
10649
10650 fi
10651
c0d27fcc
MR
10652
10653
10654
10655
98418dba
CW
10656for ac_func in XrmSetDatabase XScreenResourceString \
10657XScreenNumberOfScreen XSetWMProtocols
10658do
7bbec45b
CY
10659as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10660{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10661echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 10662if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 10663 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10664else
10665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10666/* confdefs.h. */
10667_ACEOF
10668cat confdefs.h >>conftest.$ac_ext
10669cat >>conftest.$ac_ext <<_ACEOF
10670/* end confdefs.h. */
edfaf76d
LK
10671/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10672 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10673#define $ac_func innocuous_$ac_func
10674
98418dba 10675/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10676 which can conflict with char $ac_func (); below.
10677 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10678 <limits.h> exists even on freestanding compilers. */
edfaf76d 10679
19650fd6
AS
10680#ifdef __STDC__
10681# include <limits.h>
10682#else
10683# include <assert.h>
10684#endif
edfaf76d
LK
10685
10686#undef $ac_func
10687
ca81d7a0
JD
10688/* Override any GCC internal prototype to avoid an error.
10689 Use char because int might match the return type of a GCC
10690 builtin and then its argument prototype would still apply. */
98418dba
CW
10691#ifdef __cplusplus
10692extern "C"
10693#endif
98418dba 10694char $ac_func ();
98418dba
CW
10695/* The GNU C library defines this for functions which it implements
10696 to always fail with ENOSYS. Some functions are actually named
10697 something starting with __ and the normal name is an alias. */
ca81d7a0 10698#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10699choke me
98418dba
CW
10700#endif
10701
19650fd6
AS
10702int
10703main ()
10704{
ca81d7a0 10705return $ac_func ();
98418dba
CW
10706 ;
10707 return 0;
10708}
10709_ACEOF
10710rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10711if { (ac_try="$ac_link"
10712case "(($ac_try" in
10713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10714 *) ac_try_echo=$ac_try;;
10715esac
7bbec45b 10716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10717 (eval "$ac_link") 2>conftest.er1
98418dba 10718 ac_status=$?
edfaf76d
LK
10719 grep -v '^ *+' conftest.er1 >conftest.err
10720 rm -f conftest.er1
10721 cat conftest.err >&5
7bbec45b 10722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10723 (exit $ac_status); } && {
10724 test -z "$ac_c_werror_flag" ||
10725 test ! -s conftest.err
7bbec45b
CY
10726 } && test -s conftest$ac_exeext &&
10727 $as_test_x conftest$ac_exeext; then
98418dba
CW
10728 eval "$as_ac_var=yes"
10729else
7bbec45b 10730 echo "$as_me: failed program was:" >&5
19650fd6
AS
10731sed 's/^/| /' conftest.$ac_ext >&5
10732
ca81d7a0 10733 eval "$as_ac_var=no"
98418dba 10734fi
ca81d7a0 10735
f053c89f 10736rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10737 conftest$ac_exeext conftest.$ac_ext
98418dba 10738fi
7bbec45b
CY
10739ac_res=`eval echo '${'$as_ac_var'}'`
10740 { echo "$as_me:$LINENO: result: $ac_res" >&5
10741echo "${ECHO_T}$ac_res" >&6; }
10742if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10743 cat >>confdefs.h <<_ACEOF
7bbec45b 10744#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10745_ACEOF
98418dba
CW
10746
10747fi
10748done
10749
10750fi
10751
10752if test "${window_system}" = "x11"; then
7bbec45b
CY
10753 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10754echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba 10755 if test "${emacs_cv_x11_version_6+set}" = set; then
7bbec45b 10756 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10757else
10758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
98418dba 10764#include <X11/Xlib.h>
98418dba
CW
10765int
10766main ()
10767{
10768#if XlibSpecificationRelease < 6
10769fail;
10770#endif
10771
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10777if { (ac_try="$ac_link"
10778case "(($ac_try" in
10779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10780 *) ac_try_echo=$ac_try;;
10781esac
7bbec45b 10782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 10783 (eval "$ac_link") 2>conftest.er1
98418dba 10784 ac_status=$?
edfaf76d
LK
10785 grep -v '^ *+' conftest.er1 >conftest.err
10786 rm -f conftest.er1
10787 cat conftest.err >&5
7bbec45b 10788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10789 (exit $ac_status); } && {
10790 test -z "$ac_c_werror_flag" ||
10791 test ! -s conftest.err
7bbec45b
CY
10792 } && test -s conftest$ac_exeext &&
10793 $as_test_x conftest$ac_exeext; then
98418dba
CW
10794 emacs_cv_x11_version_6=yes
10795else
7bbec45b 10796 echo "$as_me: failed program was:" >&5
19650fd6
AS
10797sed 's/^/| /' conftest.$ac_ext >&5
10798
ca81d7a0 10799 emacs_cv_x11_version_6=no
98418dba 10800fi
ca81d7a0 10801
f053c89f 10802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10803 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10804fi
10805
10806 if test $emacs_cv_x11_version_6 = yes; then
7bbec45b
CY
10807 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10808echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10809
c0d27fcc 10810cat >>confdefs.h <<\_ACEOF
98418dba 10811#define HAVE_X11R6 1
c0d27fcc 10812_ACEOF
98418dba
CW
10813
10814 else
7bbec45b
CY
10815 { echo "$as_me:$LINENO: result: before 6" >&5
10816echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10817 fi
10818fi
10819
98418dba 10820
0cfc0546
GM
10821### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10822HAVE_RSVG=no
8bff6137 10823if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
0cfc0546 10824 if test "${with_rsvg}" != "no"; then
02cfaff4 10825 RSVG_REQUIRED=2.11.0
0cfc0546
GM
10826 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10827
10828
10829 succeeded=no
10830
00b9c927 10831 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546 10832set dummy pkg-config; ac_word=$2
7bbec45b
CY
10833{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10834echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
0cfc0546 10835if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 10836 echo $ECHO_N "(cached) $ECHO_C" >&6
0cfc0546
GM
10837else
10838 case $PKG_CONFIG in
10839 [\\/]* | ?:[\\/]*)
10840 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10841 ;;
10842 *)
10843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10844for as_dir in $PATH
10845do
10846 IFS=$as_save_IFS
10847 test -z "$as_dir" && as_dir=.
10848 for ac_exec_ext in '' $ac_executable_extensions; do
10849 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10850 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 10851 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
0cfc0546
GM
10852 break 2
10853 fi
10854done
10855done
10856IFS=$as_save_IFS
10857
10858 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10859 ;;
10860esac
10861fi
10862PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10863if test -n "$PKG_CONFIG"; then
7bbec45b
CY
10864 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10865echo "${ECHO_T}$PKG_CONFIG" >&6; }
0cfc0546 10866else
7bbec45b
CY
10867 { echo "$as_me:$LINENO: result: no" >&5
10868echo "${ECHO_T}no" >&6; }
0cfc0546
GM
10869fi
10870
10871
0cfc0546
GM
10872
10873 if test "$PKG_CONFIG" = "no" ; then
10874 :
10875 else
10876 PKG_CONFIG_MIN_VERSION=0.9.0
10877 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
10878 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10879echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
0cfc0546
GM
10880
10881 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
7bbec45b
CY
10882 { echo "$as_me:$LINENO: result: yes" >&5
10883echo "${ECHO_T}yes" >&6; }
0cfc0546
GM
10884 succeeded=yes
10885
7bbec45b
CY
10886 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10887echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
0cfc0546 10888 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
7bbec45b
CY
10889 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10890echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
0cfc0546 10891
7bbec45b
CY
10892 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10893echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
0cfc0546 10894 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
7bbec45b
CY
10895 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10896echo "${ECHO_T}$RSVG_LIBS" >&6; }
0cfc0546 10897 else
7bbec45b
CY
10898 { echo "$as_me:$LINENO: result: no" >&5
10899echo "${ECHO_T}no" >&6; }
0cfc0546
GM
10900 RSVG_CFLAGS=""
10901 RSVG_LIBS=""
10902 ## If we have a custom action on failure, don't print errors, but
10903 ## do set a variable so people can do so.
10904 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10905
10906 fi
10907
10908
10909
10910 else
10911 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10912 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10913 fi
10914 fi
10915
10916 if test $succeeded = yes; then
10917 :
10918 else
10919 :
10920 fi
10921
10922
10923
10924
10925 if test ".${RSVG_CFLAGS}" != "."; then
10926 HAVE_RSVG=yes
10927
10928cat >>confdefs.h <<\_ACEOF
10929#define HAVE_RSVG 1
10930_ACEOF
10931
10932 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10933 LIBS="$RSVG_LIBS $LIBS"
10934 fi
10935 fi
10936fi
10937
10938
488dd4c4 10939HAVE_GTK=no
9d2818d6 10940if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10941 GLIB_REQUIRED=2.6
10942 GTK_REQUIRED=2.6
488dd4c4
JD
10943 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10944
488dd4c4
JD
10945
10946 succeeded=no
10947
00b9c927 10948 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10949set dummy pkg-config; ac_word=$2
7bbec45b
CY
10950{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10951echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4 10952if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 10953 echo $ECHO_N "(cached) $ECHO_C" >&6
488dd4c4
JD
10954else
10955 case $PKG_CONFIG in
10956 [\\/]* | ?:[\\/]*)
10957 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10958 ;;
10959 *)
10960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10961for as_dir in $PATH
10962do
10963 IFS=$as_save_IFS
10964 test -z "$as_dir" && as_dir=.
10965 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10966 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4 10967 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 10968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
488dd4c4
JD
10969 break 2
10970 fi
10971done
10972done
ca81d7a0 10973IFS=$as_save_IFS
488dd4c4
JD
10974
10975 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10976 ;;
10977esac
10978fi
10979PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10980if test -n "$PKG_CONFIG"; then
7bbec45b
CY
10981 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10982echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10983else
7bbec45b
CY
10984 { echo "$as_me:$LINENO: result: no" >&5
10985echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10986fi
10987
ca81d7a0 10988
488dd4c4
JD
10989
10990 if test "$PKG_CONFIG" = "no" ; then
089a966d 10991 pkg_check_gtk=no
488dd4c4
JD
10992 else
10993 PKG_CONFIG_MIN_VERSION=0.9.0
10994 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
10995 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10996echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10997
67db6aa2 10998 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
7bbec45b
CY
10999 { echo "$as_me:$LINENO: result: yes" >&5
11000echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11001 succeeded=yes
11002
7bbec45b
CY
11003 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11004echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11005 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
7bbec45b
CY
11006 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11007echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11008
7bbec45b
CY
11009 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11010echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11011 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
7bbec45b
CY
11012 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11013echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11014 else
7bbec45b
CY
11015 { echo "$as_me:$LINENO: result: no" >&5
11016echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11017 GTK_CFLAGS=""
11018 GTK_LIBS=""
11019 ## If we have a custom action on failure, don't print errors, but
11020 ## do set a variable so people can do so.
11021 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11022
488dd4c4
JD
11023 fi
11024
11025
11026
11027 else
11028 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11029 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11030 fi
11031 fi
11032
11033 if test $succeeded = yes; then
089a966d 11034 pkg_check_gtk=yes
488dd4c4 11035 else
089a966d
GM
11036 pkg_check_gtk=no
11037 fi
11038
11039 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
7bbec45b
CY
11040 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11041echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11042 { (exit 1); exit 1; }; }
11043 fi
089a966d
GM
11044fi
11045
11046
11047if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11048
11049
11050
11051 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11052 CFLAGS="$CFLAGS $GTK_CFLAGS"
11053 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11054 GTK_COMPILES=no
57669b57 11055
8eeae1c9 11056for ac_func in gtk_main
57669b57 11057do
7bbec45b
CY
11058as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11059{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11060echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11061if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 11062 echo $ECHO_N "(cached) $ECHO_C" >&6
57669b57
JD
11063else
11064 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11065/* confdefs.h. */
11066_ACEOF
11067cat confdefs.h >>conftest.$ac_ext
11068cat >>conftest.$ac_ext <<_ACEOF
11069/* end confdefs.h. */
edfaf76d
LK
11070/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11071 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11072#define $ac_func innocuous_$ac_func
11073
57669b57
JD
11074/* System header to define __stub macros and hopefully few prototypes,
11075 which can conflict with char $ac_func (); below.
11076 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11077 <limits.h> exists even on freestanding compilers. */
edfaf76d 11078
57669b57
JD
11079#ifdef __STDC__
11080# include <limits.h>
11081#else
11082# include <assert.h>
11083#endif
edfaf76d
LK
11084
11085#undef $ac_func
11086
ca81d7a0
JD
11087/* Override any GCC internal prototype to avoid an error.
11088 Use char because int might match the return type of a GCC
11089 builtin and then its argument prototype would still apply. */
57669b57
JD
11090#ifdef __cplusplus
11091extern "C"
57669b57 11092#endif
57669b57
JD
11093char $ac_func ();
11094/* The GNU C library defines this for functions which it implements
11095 to always fail with ENOSYS. Some functions are actually named
11096 something starting with __ and the normal name is an alias. */
ca81d7a0 11097#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11098choke me
57669b57
JD
11099#endif
11100
11101int
11102main ()
11103{
ca81d7a0 11104return $ac_func ();
57669b57
JD
11105 ;
11106 return 0;
11107}
11108_ACEOF
11109rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11110if { (ac_try="$ac_link"
11111case "(($ac_try" in
11112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11113 *) ac_try_echo=$ac_try;;
11114esac
7bbec45b 11115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11116 (eval "$ac_link") 2>conftest.er1
57669b57 11117 ac_status=$?
edfaf76d
LK
11118 grep -v '^ *+' conftest.er1 >conftest.err
11119 rm -f conftest.er1
11120 cat conftest.err >&5
7bbec45b 11121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11122 (exit $ac_status); } && {
11123 test -z "$ac_c_werror_flag" ||
11124 test ! -s conftest.err
7bbec45b
CY
11125 } && test -s conftest$ac_exeext &&
11126 $as_test_x conftest$ac_exeext; then
57669b57
JD
11127 eval "$as_ac_var=yes"
11128else
7bbec45b 11129 echo "$as_me: failed program was:" >&5
57669b57
JD
11130sed 's/^/| /' conftest.$ac_ext >&5
11131
ca81d7a0 11132 eval "$as_ac_var=no"
57669b57 11133fi
ca81d7a0 11134
f053c89f 11135rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11136 conftest$ac_exeext conftest.$ac_ext
57669b57 11137fi
7bbec45b
CY
11138ac_res=`eval echo '${'$as_ac_var'}'`
11139 { echo "$as_me:$LINENO: result: $ac_res" >&5
11140echo "${ECHO_T}$ac_res" >&6; }
11141if test `eval echo '${'$as_ac_var'}'` = yes; then
57669b57 11142 cat >>confdefs.h <<_ACEOF
7bbec45b 11143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
57669b57 11144_ACEOF
8eeae1c9 11145 GTK_COMPILES=yes
57669b57
JD
11146fi
11147done
11148
8eeae1c9 11149 if test "${GTK_COMPILES}" != "yes"; then
089a966d 11150 if test "$USE_X_TOOLKIT" != "maybe"; then
7bbec45b
CY
11151 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
11152echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
8eeae1c9 11153 { (exit 1); exit 1; }; };
089a966d
GM
11154 fi
11155 else
11156 HAVE_GTK=yes
488dd4c4
JD
11157
11158cat >>confdefs.h <<\_ACEOF
a51f4969 11159#define USE_GTK 1
488dd4c4
JD
11160_ACEOF
11161
089a966d 11162 USE_X_TOOLKIT=none
f60c93db
JD
11163 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11164 :
11165 else
7bbec45b 11166 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
f60c93db
JD
11167 closing open displays. This is no problem if you just use
11168 one display, but if you use more than one and close one of them
11169 Emacs may crash." >&5
7bbec45b 11170echo "$as_me: WARNING: Your version of Gtk+ will have problems with
f60c93db
JD
11171 closing open displays. This is no problem if you just use
11172 one display, but if you use more than one and close one of them
11173 Emacs may crash." >&2;}
11174 sleep 3
11175 fi
089a966d
GM
11176 fi
11177
11178fi
11179
11180
11181if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11182
d0a80c21
JD
11183 if test "$with_toolkit_scroll_bars" != no; then
11184 with_toolkit_scroll_bars=yes
11185 fi
57669b57
JD
11186
11187 HAVE_GTK_MULTIDISPLAY=no
11188
11189for ac_func in gdk_display_open
11190do
7bbec45b
CY
11191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11192{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11194if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 11195 echo $ECHO_N "(cached) $ECHO_C" >&6
57669b57
JD
11196else
11197 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11198/* confdefs.h. */
11199_ACEOF
11200cat confdefs.h >>conftest.$ac_ext
11201cat >>conftest.$ac_ext <<_ACEOF
11202/* end confdefs.h. */
edfaf76d
LK
11203/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11204 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11205#define $ac_func innocuous_$ac_func
11206
57669b57
JD
11207/* System header to define __stub macros and hopefully few prototypes,
11208 which can conflict with char $ac_func (); below.
11209 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11210 <limits.h> exists even on freestanding compilers. */
edfaf76d 11211
57669b57
JD
11212#ifdef __STDC__
11213# include <limits.h>
11214#else
11215# include <assert.h>
11216#endif
edfaf76d
LK
11217
11218#undef $ac_func
11219
ca81d7a0
JD
11220/* Override any GCC internal prototype to avoid an error.
11221 Use char because int might match the return type of a GCC
11222 builtin and then its argument prototype would still apply. */
57669b57
JD
11223#ifdef __cplusplus
11224extern "C"
57669b57 11225#endif
57669b57
JD
11226char $ac_func ();
11227/* The GNU C library defines this for functions which it implements
11228 to always fail with ENOSYS. Some functions are actually named
11229 something starting with __ and the normal name is an alias. */
ca81d7a0 11230#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11231choke me
57669b57
JD
11232#endif
11233
11234int
11235main ()
11236{
ca81d7a0 11237return $ac_func ();
57669b57
JD
11238 ;
11239 return 0;
11240}
11241_ACEOF
11242rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11243if { (ac_try="$ac_link"
11244case "(($ac_try" in
11245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11246 *) ac_try_echo=$ac_try;;
11247esac
7bbec45b 11248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11249 (eval "$ac_link") 2>conftest.er1
57669b57 11250 ac_status=$?
edfaf76d
LK
11251 grep -v '^ *+' conftest.er1 >conftest.err
11252 rm -f conftest.er1
11253 cat conftest.err >&5
7bbec45b 11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11255 (exit $ac_status); } && {
11256 test -z "$ac_c_werror_flag" ||
11257 test ! -s conftest.err
7bbec45b
CY
11258 } && test -s conftest$ac_exeext &&
11259 $as_test_x conftest$ac_exeext; then
57669b57
JD
11260 eval "$as_ac_var=yes"
11261else
7bbec45b 11262 echo "$as_me: failed program was:" >&5
57669b57
JD
11263sed 's/^/| /' conftest.$ac_ext >&5
11264
ca81d7a0 11265 eval "$as_ac_var=no"
57669b57 11266fi
ca81d7a0 11267
f053c89f 11268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11269 conftest$ac_exeext conftest.$ac_ext
57669b57 11270fi
7bbec45b
CY
11271ac_res=`eval echo '${'$as_ac_var'}'`
11272 { echo "$as_me:$LINENO: result: $ac_res" >&5
11273echo "${ECHO_T}$ac_res" >&6; }
11274if test `eval echo '${'$as_ac_var'}'` = yes; then
57669b57 11275 cat >>confdefs.h <<_ACEOF
7bbec45b 11276#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
57669b57
JD
11277_ACEOF
11278 HAVE_GTK_MULTIDISPLAY=yes
11279fi
11280done
11281
11282 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11283
11284cat >>confdefs.h <<\_ACEOF
11285#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11286_ACEOF
11287
11288 fi
57669b57 11289
dc2933eb 11290 HAVE_GTK_FILE_SELECTION=no
7bbec45b
CY
11291 { echo "$as_me:$LINENO: checking whether GTK_TYPE_FILE_SELECTION is declared" >&5
11292echo $ECHO_N "checking whether GTK_TYPE_FILE_SELECTION is declared... $ECHO_C" >&6; }
dc2933eb 11293if test "${ac_cv_have_decl_GTK_TYPE_FILE_SELECTION+set}" = set; then
7bbec45b 11294 echo $ECHO_N "(cached) $ECHO_C" >&6
dc2933eb
JD
11295else
11296 cat >conftest.$ac_ext <<_ACEOF
11297/* confdefs.h. */
11298_ACEOF
11299cat confdefs.h >>conftest.$ac_ext
11300cat >>conftest.$ac_ext <<_ACEOF
11301/* end confdefs.h. */
11302$ac_includes_default
11303#include <gtk/gtk.h>
11304
11305int
11306main ()
11307{
11308#ifndef GTK_TYPE_FILE_SELECTION
11309 (void) GTK_TYPE_FILE_SELECTION;
11310#endif
11311
11312 ;
11313 return 0;
11314}
11315_ACEOF
11316rm -f conftest.$ac_objext
11317if { (ac_try="$ac_compile"
11318case "(($ac_try" in
11319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11320 *) ac_try_echo=$ac_try;;
11321esac
7bbec45b 11322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
dc2933eb
JD
11323 (eval "$ac_compile") 2>conftest.er1
11324 ac_status=$?
11325 grep -v '^ *+' conftest.er1 >conftest.err
11326 rm -f conftest.er1
11327 cat conftest.err >&5
7bbec45b 11328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
dc2933eb
JD
11329 (exit $ac_status); } && {
11330 test -z "$ac_c_werror_flag" ||
11331 test ! -s conftest.err
11332 } && test -s conftest.$ac_objext; then
11333 ac_cv_have_decl_GTK_TYPE_FILE_SELECTION=yes
11334else
7bbec45b 11335 echo "$as_me: failed program was:" >&5
dc2933eb
JD
11336sed 's/^/| /' conftest.$ac_ext >&5
11337
11338 ac_cv_have_decl_GTK_TYPE_FILE_SELECTION=no
11339fi
11340
11341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11342fi
7bbec45b
CY
11343{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" >&5
11344echo "${ECHO_T}$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" >&6; }
dc2933eb
JD
11345if test $ac_cv_have_decl_GTK_TYPE_FILE_SELECTION = yes; then
11346 HAVE_GTK_FILE_SELECTION=yes
11347else
11348 HAVE_GTK_FILE_SELECTION=no
11349fi
11350
11351 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
572a3cc2
JD
11352
11353for ac_func in gtk_file_selection_new
11354do
7bbec45b
CY
11355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11356{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11358if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 11359 echo $ECHO_N "(cached) $ECHO_C" >&6
572a3cc2
JD
11360else
11361 cat >conftest.$ac_ext <<_ACEOF
11362/* confdefs.h. */
11363_ACEOF
11364cat confdefs.h >>conftest.$ac_ext
11365cat >>conftest.$ac_ext <<_ACEOF
11366/* end confdefs.h. */
edfaf76d
LK
11367/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11368 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11369#define $ac_func innocuous_$ac_func
11370
572a3cc2
JD
11371/* System header to define __stub macros and hopefully few prototypes,
11372 which can conflict with char $ac_func (); below.
11373 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11374 <limits.h> exists even on freestanding compilers. */
edfaf76d 11375
572a3cc2
JD
11376#ifdef __STDC__
11377# include <limits.h>
11378#else
11379# include <assert.h>
11380#endif
edfaf76d
LK
11381
11382#undef $ac_func
11383
ca81d7a0
JD
11384/* Override any GCC internal prototype to avoid an error.
11385 Use char because int might match the return type of a GCC
11386 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11387#ifdef __cplusplus
11388extern "C"
572a3cc2 11389#endif
572a3cc2
JD
11390char $ac_func ();
11391/* The GNU C library defines this for functions which it implements
11392 to always fail with ENOSYS. Some functions are actually named
11393 something starting with __ and the normal name is an alias. */
ca81d7a0 11394#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11395choke me
572a3cc2
JD
11396#endif
11397
11398int
11399main ()
11400{
ca81d7a0 11401return $ac_func ();
572a3cc2
JD
11402 ;
11403 return 0;
11404}
11405_ACEOF
11406rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11407if { (ac_try="$ac_link"
11408case "(($ac_try" in
11409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11410 *) ac_try_echo=$ac_try;;
11411esac
7bbec45b 11412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11413 (eval "$ac_link") 2>conftest.er1
572a3cc2 11414 ac_status=$?
edfaf76d
LK
11415 grep -v '^ *+' conftest.er1 >conftest.err
11416 rm -f conftest.er1
11417 cat conftest.err >&5
7bbec45b 11418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11419 (exit $ac_status); } && {
11420 test -z "$ac_c_werror_flag" ||
11421 test ! -s conftest.err
7bbec45b
CY
11422 } && test -s conftest$ac_exeext &&
11423 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11424 eval "$as_ac_var=yes"
11425else
7bbec45b 11426 echo "$as_me: failed program was:" >&5
572a3cc2
JD
11427sed 's/^/| /' conftest.$ac_ext >&5
11428
ca81d7a0 11429 eval "$as_ac_var=no"
572a3cc2 11430fi
ca81d7a0 11431
f053c89f 11432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11433 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11434fi
7bbec45b
CY
11435ac_res=`eval echo '${'$as_ac_var'}'`
11436 { echo "$as_me:$LINENO: result: $ac_res" >&5
11437echo "${ECHO_T}$ac_res" >&6; }
11438if test `eval echo '${'$as_ac_var'}'` = yes; then
572a3cc2 11439 cat >>confdefs.h <<_ACEOF
7bbec45b 11440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
572a3cc2
JD
11441_ACEOF
11442 HAVE_GTK_FILE_SELECTION=yes
dc2933eb
JD
11443else
11444 HAVE_GTK_FILE_SELECTION=no
572a3cc2
JD
11445fi
11446done
11447
dc2933eb 11448 fi
572a3cc2 11449
dc2933eb 11450 HAVE_GTK_FILE_CHOOSER=no
7bbec45b
CY
11451 { echo "$as_me:$LINENO: checking whether GTK_TYPE_FILE_CHOOSER is declared" >&5
11452echo $ECHO_N "checking whether GTK_TYPE_FILE_CHOOSER is declared... $ECHO_C" >&6; }
dc2933eb 11453if test "${ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER+set}" = set; then
7bbec45b 11454 echo $ECHO_N "(cached) $ECHO_C" >&6
dc2933eb
JD
11455else
11456 cat >conftest.$ac_ext <<_ACEOF
11457/* confdefs.h. */
11458_ACEOF
11459cat confdefs.h >>conftest.$ac_ext
11460cat >>conftest.$ac_ext <<_ACEOF
11461/* end confdefs.h. */
11462$ac_includes_default
11463#include <gtk/gtk.h>
11464
11465int
11466main ()
11467{
11468#ifndef GTK_TYPE_FILE_CHOOSER
11469 (void) GTK_TYPE_FILE_CHOOSER;
11470#endif
11471
11472 ;
11473 return 0;
11474}
11475_ACEOF
11476rm -f conftest.$ac_objext
11477if { (ac_try="$ac_compile"
11478case "(($ac_try" in
11479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11480 *) ac_try_echo=$ac_try;;
11481esac
7bbec45b 11482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
dc2933eb
JD
11483 (eval "$ac_compile") 2>conftest.er1
11484 ac_status=$?
11485 grep -v '^ *+' conftest.er1 >conftest.err
11486 rm -f conftest.er1
11487 cat conftest.err >&5
7bbec45b 11488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
dc2933eb
JD
11489 (exit $ac_status); } && {
11490 test -z "$ac_c_werror_flag" ||
11491 test ! -s conftest.err
11492 } && test -s conftest.$ac_objext; then
11493 ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER=yes
11494else
7bbec45b 11495 echo "$as_me: failed program was:" >&5
dc2933eb
JD
11496sed 's/^/| /' conftest.$ac_ext >&5
11497
11498 ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER=no
11499fi
11500
11501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502fi
7bbec45b
CY
11503{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" >&5
11504echo "${ECHO_T}$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" >&6; }
dc2933eb
JD
11505if test $ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER = yes; then
11506 HAVE_GTK_FILE_CHOOSER=yes
11507else
11508 HAVE_GTK_FILE_CHOOSER=no
11509fi
11510
11511 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
572a3cc2
JD
11512
11513for ac_func in gtk_file_chooser_dialog_new
11514do
7bbec45b
CY
11515as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11516{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11517echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 11518if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 11519 echo $ECHO_N "(cached) $ECHO_C" >&6
572a3cc2
JD
11520else
11521 cat >conftest.$ac_ext <<_ACEOF
11522/* confdefs.h. */
11523_ACEOF
11524cat confdefs.h >>conftest.$ac_ext
11525cat >>conftest.$ac_ext <<_ACEOF
11526/* end confdefs.h. */
edfaf76d
LK
11527/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11528 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11529#define $ac_func innocuous_$ac_func
11530
572a3cc2
JD
11531/* System header to define __stub macros and hopefully few prototypes,
11532 which can conflict with char $ac_func (); below.
11533 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11534 <limits.h> exists even on freestanding compilers. */
edfaf76d 11535
572a3cc2
JD
11536#ifdef __STDC__
11537# include <limits.h>
11538#else
11539# include <assert.h>
11540#endif
edfaf76d
LK
11541
11542#undef $ac_func
11543
ca81d7a0
JD
11544/* Override any GCC internal prototype to avoid an error.
11545 Use char because int might match the return type of a GCC
11546 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11547#ifdef __cplusplus
11548extern "C"
572a3cc2 11549#endif
572a3cc2
JD
11550char $ac_func ();
11551/* The GNU C library defines this for functions which it implements
11552 to always fail with ENOSYS. Some functions are actually named
11553 something starting with __ and the normal name is an alias. */
ca81d7a0 11554#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11555choke me
572a3cc2
JD
11556#endif
11557
11558int
11559main ()
11560{
ca81d7a0 11561return $ac_func ();
572a3cc2
JD
11562 ;
11563 return 0;
11564}
11565_ACEOF
11566rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11567if { (ac_try="$ac_link"
11568case "(($ac_try" in
11569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11570 *) ac_try_echo=$ac_try;;
11571esac
7bbec45b 11572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11573 (eval "$ac_link") 2>conftest.er1
572a3cc2 11574 ac_status=$?
edfaf76d
LK
11575 grep -v '^ *+' conftest.er1 >conftest.err
11576 rm -f conftest.er1
11577 cat conftest.err >&5
7bbec45b 11578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11579 (exit $ac_status); } && {
11580 test -z "$ac_c_werror_flag" ||
11581 test ! -s conftest.err
7bbec45b
CY
11582 } && test -s conftest$ac_exeext &&
11583 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11584 eval "$as_ac_var=yes"
11585else
7bbec45b 11586 echo "$as_me: failed program was:" >&5
572a3cc2
JD
11587sed 's/^/| /' conftest.$ac_ext >&5
11588
ca81d7a0 11589 eval "$as_ac_var=no"
572a3cc2 11590fi
ca81d7a0 11591
f053c89f 11592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11593 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11594fi
7bbec45b
CY
11595ac_res=`eval echo '${'$as_ac_var'}'`
11596 { echo "$as_me:$LINENO: result: $ac_res" >&5
11597echo "${ECHO_T}$ac_res" >&6; }
11598if test `eval echo '${'$as_ac_var'}'` = yes; then
572a3cc2 11599 cat >>confdefs.h <<_ACEOF
7bbec45b 11600#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
572a3cc2
JD
11601_ACEOF
11602 HAVE_GTK_FILE_CHOOSER=yes
dc2933eb
JD
11603else
11604 HAVE_GTK_FILE_CHOOSER=no
572a3cc2
JD
11605fi
11606done
11607
dc2933eb 11608 fi
572a3cc2
JD
11609
11610 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11611 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11612
11613cat >>confdefs.h <<\_ACEOF
11614#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11615_ACEOF
11616
b8bdffbe
JD
11617 fi
11618
11619 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11620 HAVE_GTK_AND_PTHREAD=no
11621
11622for ac_header in pthread.h
11623do
7bbec45b 11624as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 11625if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
11626 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11627echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 11628if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 11629 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11630fi
7bbec45b
CY
11631ac_res=`eval echo '${'$as_ac_Header'}'`
11632 { echo "$as_me:$LINENO: result: $ac_res" >&5
11633echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11634else
11635 # Is the header compilable?
7bbec45b
CY
11636{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11637echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11638cat >conftest.$ac_ext <<_ACEOF
11639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
11644$ac_includes_default
11645#include <$ac_header>
11646_ACEOF
11647rm -f conftest.$ac_objext
ca81d7a0
JD
11648if { (ac_try="$ac_compile"
11649case "(($ac_try" in
11650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11651 *) ac_try_echo=$ac_try;;
11652esac
7bbec45b 11653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11654 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11655 ac_status=$?
edfaf76d
LK
11656 grep -v '^ *+' conftest.er1 >conftest.err
11657 rm -f conftest.er1
11658 cat conftest.err >&5
7bbec45b 11659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11660 (exit $ac_status); } && {
11661 test -z "$ac_c_werror_flag" ||
11662 test ! -s conftest.err
11663 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11664 ac_header_compiler=yes
11665else
7bbec45b 11666 echo "$as_me: failed program was:" >&5
b8bdffbe
JD
11667sed 's/^/| /' conftest.$ac_ext >&5
11668
ca81d7a0 11669 ac_header_compiler=no
b8bdffbe 11670fi
ca81d7a0
JD
11671
11672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
11673{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11674echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11675
11676# Is the header present?
7bbec45b
CY
11677{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11678echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11679cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685#include <$ac_header>
11686_ACEOF
ca81d7a0
JD
11687if { (ac_try="$ac_cpp conftest.$ac_ext"
11688case "(($ac_try" in
11689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11690 *) ac_try_echo=$ac_try;;
11691esac
7bbec45b 11692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11693 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11694 ac_status=$?
11695 grep -v '^ *+' conftest.er1 >conftest.err
11696 rm -f conftest.er1
11697 cat conftest.err >&5
7bbec45b 11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11699 (exit $ac_status); } >/dev/null && {
11700 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11701 test ! -s conftest.err
11702 }; then
b8bdffbe
JD
11703 ac_header_preproc=yes
11704else
7bbec45b 11705 echo "$as_me: failed program was:" >&5
b8bdffbe
JD
11706sed 's/^/| /' conftest.$ac_ext >&5
11707
11708 ac_header_preproc=no
11709fi
ca81d7a0 11710
b8bdffbe 11711rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
11712{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11713echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11714
11715# So? What about this header?
edfaf76d
LK
11716case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11717 yes:no: )
7bbec45b
CY
11718 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11719echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11720 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11721echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 11722 ac_header_preproc=yes
b8bdffbe 11723 ;;
edfaf76d 11724 no:yes:* )
7bbec45b
CY
11725 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11726echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11727 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11728echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11729 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11730echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11731 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11732echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
11733 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11734echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11735 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11736echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11737
b8bdffbe
JD
11738 ;;
11739esac
7bbec45b
CY
11740{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11741echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 11742if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 11743 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11744else
edfaf76d 11745 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11746fi
7bbec45b
CY
11747ac_res=`eval echo '${'$as_ac_Header'}'`
11748 { echo "$as_me:$LINENO: result: $ac_res" >&5
11749echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11750
11751fi
7bbec45b 11752if test `eval echo '${'$as_ac_Header'}'` = yes; then
b8bdffbe 11753 cat >>confdefs.h <<_ACEOF
7bbec45b 11754#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
b8bdffbe
JD
11755_ACEOF
11756
11757fi
11758
11759done
11760
11761 if test "$ac_cv_header_pthread_h"; then
7bbec45b
CY
11762 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11763echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe 11764if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
7bbec45b 11765 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe
JD
11766else
11767 ac_check_lib_save_LIBS=$LIBS
11768LIBS="-lpthread $LIBS"
11769cat >conftest.$ac_ext <<_ACEOF
11770/* confdefs.h. */
11771_ACEOF
11772cat confdefs.h >>conftest.$ac_ext
11773cat >>conftest.$ac_ext <<_ACEOF
11774/* end confdefs.h. */
11775
ca81d7a0
JD
11776/* Override any GCC internal prototype to avoid an error.
11777 Use char because int might match the return type of a GCC
11778 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11779#ifdef __cplusplus
11780extern "C"
11781#endif
b8bdffbe
JD
11782char pthread_self ();
11783int
11784main ()
11785{
ca81d7a0 11786return pthread_self ();
b8bdffbe
JD
11787 ;
11788 return 0;
11789}
11790_ACEOF
11791rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11792if { (ac_try="$ac_link"
11793case "(($ac_try" in
11794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11795 *) ac_try_echo=$ac_try;;
11796esac
7bbec45b 11797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11798 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11799 ac_status=$?
edfaf76d
LK
11800 grep -v '^ *+' conftest.er1 >conftest.err
11801 rm -f conftest.er1
11802 cat conftest.err >&5
7bbec45b 11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11804 (exit $ac_status); } && {
11805 test -z "$ac_c_werror_flag" ||
11806 test ! -s conftest.err
7bbec45b
CY
11807 } && test -s conftest$ac_exeext &&
11808 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11809 ac_cv_lib_pthread_pthread_self=yes
11810else
7bbec45b 11811 echo "$as_me: failed program was:" >&5
b8bdffbe
JD
11812sed 's/^/| /' conftest.$ac_ext >&5
11813
ca81d7a0 11814 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11815fi
ca81d7a0 11816
f053c89f 11817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11818 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11819LIBS=$ac_check_lib_save_LIBS
11820fi
7bbec45b
CY
11821{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11822echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b0448899 11823if test $ac_cv_lib_pthread_pthread_self = yes; then
b8bdffbe
JD
11824 HAVE_GTK_AND_PTHREAD=yes
11825fi
11826
11827 fi
11828 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11829 case "${canonical}" in
11830 *-hpux*) ;;
11831 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11832 esac
b8bdffbe
JD
11833
11834cat >>confdefs.h <<\_ACEOF
11835#define HAVE_GTK_AND_PTHREAD 1
11836_ACEOF
11837
11838 fi
57669b57 11839 fi
488dd4c4
JD
11840fi
11841
131e4133
MA
11842HAVE_DBUS=no
11843if test "${with_dbus}" = "yes"; then
cffe4909
MH
11844
11845 succeeded=no
11846
00b9c927 11847 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909 11848set dummy pkg-config; ac_word=$2
7bbec45b
CY
11849{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11850echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
cffe4909 11851if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 11852 echo $ECHO_N "(cached) $ECHO_C" >&6
131e4133 11853else
cffe4909
MH
11854 case $PKG_CONFIG in
11855 [\\/]* | ?:[\\/]*)
11856 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11857 ;;
11858 *)
11859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11860for as_dir in $PATH
11861do
11862 IFS=$as_save_IFS
11863 test -z "$as_dir" && as_dir=.
11864 for ac_exec_ext in '' $ac_executable_extensions; do
11865 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11866 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 11867 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
cffe4909
MH
11868 break 2
11869 fi
11870done
11871done
11872IFS=$as_save_IFS
131e4133 11873
cffe4909
MH
11874 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11875 ;;
131e4133 11876esac
cffe4909
MH
11877fi
11878PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11879if test -n "$PKG_CONFIG"; then
7bbec45b
CY
11880 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11881echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11882else
7bbec45b
CY
11883 { echo "$as_me:$LINENO: result: no" >&5
11884echo "${ECHO_T}no" >&6; }
131e4133
MA
11885fi
11886
cffe4909 11887
cffe4909
MH
11888
11889 if test "$PKG_CONFIG" = "no" ; then
11890 HAVE_DBUS=no
11891 else
11892 PKG_CONFIG_MIN_VERSION=0.9.0
11893 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
11894 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11895echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
cffe4909
MH
11896
11897 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
7bbec45b
CY
11898 { echo "$as_me:$LINENO: result: yes" >&5
11899echo "${ECHO_T}yes" >&6; }
cffe4909
MH
11900 succeeded=yes
11901
7bbec45b
CY
11902 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11903echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
cffe4909 11904 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
7bbec45b
CY
11905 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11906echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
cffe4909 11907
7bbec45b
CY
11908 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11909echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
cffe4909 11910 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
7bbec45b
CY
11911 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11912echo "${ECHO_T}$DBUS_LIBS" >&6; }
cffe4909 11913 else
7bbec45b
CY
11914 { echo "$as_me:$LINENO: result: no" >&5
11915echo "${ECHO_T}no" >&6; }
cffe4909
MH
11916 DBUS_CFLAGS=""
11917 DBUS_LIBS=""
11918 ## If we have a custom action on failure, don't print errors, but
11919 ## do set a variable so people can do so.
11920 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11921
11922 fi
11923
11924
11925
11926 else
11927 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11928 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11929 fi
11930 fi
11931
11932 if test $succeeded = yes; then
11933 HAVE_DBUS=yes
11934 else
11935 HAVE_DBUS=no
11936 fi
131e4133
MA
11937
11938 if test "$HAVE_DBUS" = yes; then
11939
11940cat >>confdefs.h <<\_ACEOF
11941#define HAVE_DBUS 1
11942_ACEOF
11943
131e4133
MA
11944 fi
11945fi
11946
b3615392 11947HAVE_XAW3D=no
991a7602 11948if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd 11949 if test "$with_xaw3d" != no; then
7bbec45b
CY
11950 { echo "$as_me:$LINENO: checking for xaw3d" >&5
11951echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11952 if test "${emacs_cv_xaw3d+set}" = set; then
7bbec45b 11953 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
11954else
11955 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11956/* confdefs.h. */
11957_ACEOF
11958cat confdefs.h >>conftest.$ac_ext
11959cat >>conftest.$ac_ext <<_ACEOF
11960/* end confdefs.h. */
98418dba
CW
11961
11962#include <X11/Intrinsic.h>
b3615392 11963#include <X11/Xaw3d/Simple.h>
98418dba
CW
11964int
11965main ()
11966{
11967
11968 ;
11969 return 0;
11970}
11971_ACEOF
11972rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11973if { (ac_try="$ac_link"
11974case "(($ac_try" in
11975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11976 *) ac_try_echo=$ac_try;;
11977esac
7bbec45b 11978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 11979 (eval "$ac_link") 2>conftest.er1
98418dba 11980 ac_status=$?
edfaf76d
LK
11981 grep -v '^ *+' conftest.er1 >conftest.err
11982 rm -f conftest.er1
11983 cat conftest.err >&5
7bbec45b 11984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11985 (exit $ac_status); } && {
11986 test -z "$ac_c_werror_flag" ||
11987 test ! -s conftest.err
7bbec45b
CY
11988 } && test -s conftest$ac_exeext &&
11989 $as_test_x conftest$ac_exeext; then
b3615392 11990 emacs_cv_xaw3d=yes
98418dba 11991else
7bbec45b 11992 echo "$as_me: failed program was:" >&5
19650fd6
AS
11993sed 's/^/| /' conftest.$ac_ext >&5
11994
b3615392 11995 emacs_cv_xaw3d=no
98418dba 11996fi
ca81d7a0 11997
f053c89f 11998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11999 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12000fi
12001
9d89ffd0 12002 else
f23d76bd 12003 emacs_cv_xaw3d=no
9d89ffd0 12004 fi
f23d76bd 12005 if test $emacs_cv_xaw3d = yes; then
7bbec45b
CY
12006 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12007echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
12008 USE_X_TOOLKIT=LUCID
12009 HAVE_XAW3D=yes
9d89ffd0 12010
b3615392
MB
12011cat >>confdefs.h <<\_ACEOF
12012#define HAVE_XAW3D 1
12013_ACEOF
9d89ffd0 12014
f23d76bd 12015 else
7bbec45b
CY
12016 { echo "$as_me:$LINENO: result: no" >&5
12017echo "${ECHO_T}no" >&6; }
12018 { echo "$as_me:$LINENO: checking for libXaw" >&5
12019echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 12020 if test "${emacs_cv_xaw+set}" = set; then
7bbec45b 12021 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 12022else
b3615392 12023 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
12024/* confdefs.h. */
12025_ACEOF
12026cat confdefs.h >>conftest.$ac_ext
12027cat >>conftest.$ac_ext <<_ACEOF
12028/* end confdefs.h. */
b3615392
MB
12029
12030#include <X11/Intrinsic.h>
12031#include <X11/Xaw/Simple.h>
12032int
12033main ()
12034{
12035
12036 ;
12037 return 0;
12038}
9d89ffd0 12039_ACEOF
b3615392
MB
12040rm -f conftest.$ac_objext conftest$ac_exeext
12041if { (ac_try="$ac_link"
9d89ffd0
JD
12042case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;;
12045esac
7bbec45b 12046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 12047 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
12048 ac_status=$?
12049 grep -v '^ *+' conftest.er1 >conftest.err
12050 rm -f conftest.er1
12051 cat conftest.err >&5
7bbec45b 12052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9d89ffd0
JD
12053 (exit $ac_status); } && {
12054 test -z "$ac_c_werror_flag" ||
12055 test ! -s conftest.err
7bbec45b
CY
12056 } && test -s conftest$ac_exeext &&
12057 $as_test_x conftest$ac_exeext; then
b3615392 12058 emacs_cv_xaw=yes
9d89ffd0 12059else
7bbec45b 12060 echo "$as_me: failed program was:" >&5
9d89ffd0
JD
12061sed 's/^/| /' conftest.$ac_ext >&5
12062
b3615392 12063 emacs_cv_xaw=no
9d89ffd0
JD
12064fi
12065
b3615392
MB
12066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12067 conftest$ac_exeext conftest.$ac_ext
12068fi
9d89ffd0 12069
f23d76bd 12070 if test $emacs_cv_xaw = yes; then
7bbec45b
CY
12071 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12072echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
12073 USE_X_TOOLKIT=LUCID
12074 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
7bbec45b
CY
12075 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
12076echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
991a7602 12077 { (exit 1); exit 1; }; }
f23d76bd 12078 else
7bbec45b
CY
12079 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
12080echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 12081 USE_X_TOOLKIT=none
98418dba 12082 fi
98418dba
CW
12083 fi
12084fi
12085
12086X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12087
12088if test "${USE_X_TOOLKIT}" != "none"; then
7bbec45b
CY
12089 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12090echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba 12091 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
7bbec45b 12092 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12093else
12094 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
98418dba 12100#include <X11/Intrinsic.h>
98418dba
CW
12101int
12102main ()
12103{
12104#if XtSpecificationRelease < 6
12105fail;
12106#endif
12107
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12113if { (ac_try="$ac_link"
12114case "(($ac_try" in
12115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12116 *) ac_try_echo=$ac_try;;
12117esac
7bbec45b 12118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12119 (eval "$ac_link") 2>conftest.er1
98418dba 12120 ac_status=$?
edfaf76d
LK
12121 grep -v '^ *+' conftest.er1 >conftest.err
12122 rm -f conftest.er1
12123 cat conftest.err >&5
7bbec45b 12124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12125 (exit $ac_status); } && {
12126 test -z "$ac_c_werror_flag" ||
12127 test ! -s conftest.err
7bbec45b
CY
12128 } && test -s conftest$ac_exeext &&
12129 $as_test_x conftest$ac_exeext; then
98418dba
CW
12130 emacs_cv_x11_toolkit_version_6=yes
12131else
7bbec45b 12132 echo "$as_me: failed program was:" >&5
19650fd6
AS
12133sed 's/^/| /' conftest.$ac_ext >&5
12134
ca81d7a0 12135 emacs_cv_x11_toolkit_version_6=no
98418dba 12136fi
ca81d7a0 12137
f053c89f 12138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12139 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12140fi
12141
12142 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12143 if test $emacs_cv_x11_toolkit_version_6 = yes; then
7bbec45b
CY
12144 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12145echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12146
c0d27fcc 12147cat >>confdefs.h <<\_ACEOF
98418dba 12148#define HAVE_X11XTR6 1
c0d27fcc 12149_ACEOF
98418dba
CW
12150
12151 else
7bbec45b
CY
12152 { echo "$as_me:$LINENO: result: before 6" >&5
12153echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12154 fi
12155
12156 OLDLIBS="$LIBS"
12157 if test x$HAVE_X11XTR6 = xyes; then
12158 LIBS="-lXt -lSM -lICE $LIBS"
12159 else
12160 LIBS="-lXt $LIBS"
12161 fi
12162
7bbec45b
CY
12163{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12164echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba 12165if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
7bbec45b 12166 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12167else
12168 ac_check_lib_save_LIBS=$LIBS
12169LIBS="-lXmu $LIBS"
12170cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12171/* confdefs.h. */
12172_ACEOF
12173cat confdefs.h >>conftest.$ac_ext
12174cat >>conftest.$ac_ext <<_ACEOF
12175/* end confdefs.h. */
98418dba 12176
ca81d7a0
JD
12177/* Override any GCC internal prototype to avoid an error.
12178 Use char because int might match the return type of a GCC
12179 builtin and then its argument prototype would still apply. */
98418dba
CW
12180#ifdef __cplusplus
12181extern "C"
12182#endif
98418dba 12183char XmuConvertStandardSelection ();
98418dba
CW
12184int
12185main ()
12186{
ca81d7a0 12187return XmuConvertStandardSelection ();
98418dba
CW
12188 ;
12189 return 0;
12190}
12191_ACEOF
12192rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12193if { (ac_try="$ac_link"
12194case "(($ac_try" in
12195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12196 *) ac_try_echo=$ac_try;;
12197esac
7bbec45b 12198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12199 (eval "$ac_link") 2>conftest.er1
98418dba 12200 ac_status=$?
edfaf76d
LK
12201 grep -v '^ *+' conftest.er1 >conftest.err
12202 rm -f conftest.er1
12203 cat conftest.err >&5
7bbec45b 12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12205 (exit $ac_status); } && {
12206 test -z "$ac_c_werror_flag" ||
12207 test ! -s conftest.err
7bbec45b
CY
12208 } && test -s conftest$ac_exeext &&
12209 $as_test_x conftest$ac_exeext; then
98418dba
CW
12210 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12211else
7bbec45b 12212 echo "$as_me: failed program was:" >&5
19650fd6
AS
12213sed 's/^/| /' conftest.$ac_ext >&5
12214
ca81d7a0 12215 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12216fi
ca81d7a0 12217
f053c89f 12218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12219 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12220LIBS=$ac_check_lib_save_LIBS
12221fi
7bbec45b
CY
12222{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12223echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
b0448899 12224if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12225 cat >>confdefs.h <<_ACEOF
98418dba 12226#define HAVE_LIBXMU 1
c0d27fcc 12227_ACEOF
98418dba
CW
12228
12229 LIBS="-lXmu $LIBS"
12230
12231fi
12232
12233 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12234fi
12235
12236# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12237if test "${HAVE_X11}" = "yes"; then
12238 if test "${USE_X_TOOLKIT}" != "none"; then
12239
7bbec45b
CY
12240{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12241echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba 12242if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
7bbec45b 12243 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12244else
12245 ac_check_lib_save_LIBS=$LIBS
12246LIBS="-lXext $LIBS"
12247cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12248/* confdefs.h. */
12249_ACEOF
12250cat confdefs.h >>conftest.$ac_ext
12251cat >>conftest.$ac_ext <<_ACEOF
12252/* end confdefs.h. */
98418dba 12253
ca81d7a0
JD
12254/* Override any GCC internal prototype to avoid an error.
12255 Use char because int might match the return type of a GCC
12256 builtin and then its argument prototype would still apply. */
98418dba
CW
12257#ifdef __cplusplus
12258extern "C"
12259#endif
98418dba 12260char XShapeQueryExtension ();
98418dba
CW
12261int
12262main ()
12263{
ca81d7a0 12264return XShapeQueryExtension ();
98418dba
CW
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12270if { (ac_try="$ac_link"
12271case "(($ac_try" in
12272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12273 *) ac_try_echo=$ac_try;;
12274esac
7bbec45b 12275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12276 (eval "$ac_link") 2>conftest.er1
98418dba 12277 ac_status=$?
edfaf76d
LK
12278 grep -v '^ *+' conftest.er1 >conftest.err
12279 rm -f conftest.er1
12280 cat conftest.err >&5
7bbec45b 12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12282 (exit $ac_status); } && {
12283 test -z "$ac_c_werror_flag" ||
12284 test ! -s conftest.err
7bbec45b
CY
12285 } && test -s conftest$ac_exeext &&
12286 $as_test_x conftest$ac_exeext; then
98418dba
CW
12287 ac_cv_lib_Xext_XShapeQueryExtension=yes
12288else
7bbec45b 12289 echo "$as_me: failed program was:" >&5
19650fd6
AS
12290sed 's/^/| /' conftest.$ac_ext >&5
12291
ca81d7a0 12292 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12293fi
ca81d7a0 12294
f053c89f 12295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12296 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12297LIBS=$ac_check_lib_save_LIBS
12298fi
7bbec45b
CY
12299{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12300echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
b0448899 12301if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12302 cat >>confdefs.h <<_ACEOF
98418dba 12303#define HAVE_LIBXEXT 1
c0d27fcc 12304_ACEOF
98418dba
CW
12305
12306 LIBS="-lXext $LIBS"
12307
12308fi
12309
12310 fi
12311fi
12312
12313if test "${USE_X_TOOLKIT}" = "MOTIF"; then
7bbec45b
CY
12314 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12315echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba 12316if test "${emacs_cv_motif_version_2_1+set}" = set; then
7bbec45b 12317 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12318else
12319 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12320/* confdefs.h. */
12321_ACEOF
12322cat confdefs.h >>conftest.$ac_ext
12323cat >>conftest.$ac_ext <<_ACEOF
12324/* end confdefs.h. */
98418dba 12325#include <Xm/Xm.h>
98418dba
CW
12326int
12327main ()
12328{
12329#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12330int x = 5;
12331#else
12332Motif version prior to 2.1.
12333#endif
12334 ;
12335 return 0;
12336}
12337_ACEOF
12338rm -f conftest.$ac_objext
ca81d7a0
JD
12339if { (ac_try="$ac_compile"
12340case "(($ac_try" in
12341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12342 *) ac_try_echo=$ac_try;;
12343esac
7bbec45b 12344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12345 (eval "$ac_compile") 2>conftest.er1
98418dba 12346 ac_status=$?
edfaf76d
LK
12347 grep -v '^ *+' conftest.er1 >conftest.err
12348 rm -f conftest.er1
12349 cat conftest.err >&5
7bbec45b 12350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12351 (exit $ac_status); } && {
12352 test -z "$ac_c_werror_flag" ||
12353 test ! -s conftest.err
12354 } && test -s conftest.$ac_objext; then
98418dba
CW
12355 emacs_cv_motif_version_2_1=yes
12356else
7bbec45b 12357 echo "$as_me: failed program was:" >&5
19650fd6
AS
12358sed 's/^/| /' conftest.$ac_ext >&5
12359
ca81d7a0 12360 emacs_cv_motif_version_2_1=no
98418dba 12361fi
ca81d7a0
JD
12362
12363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12364fi
7bbec45b
CY
12365{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12366echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12367 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12368 if test $emacs_cv_motif_version_2_1 = yes; then
12369 HAVE_LIBXP=no
b936fae4 12370
c0d27fcc 12371cat >>confdefs.h <<\_ACEOF
98418dba 12372#define HAVE_MOTIF_2_1 1
c0d27fcc 12373_ACEOF
98418dba 12374
7bbec45b
CY
12375 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12376echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba 12377if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
7bbec45b 12378 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
12379else
12380 ac_check_lib_save_LIBS=$LIBS
12381LIBS="-lXp $LIBS"
12382cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12383/* confdefs.h. */
12384_ACEOF
12385cat confdefs.h >>conftest.$ac_ext
12386cat >>conftest.$ac_ext <<_ACEOF
12387/* end confdefs.h. */
98418dba 12388
ca81d7a0
JD
12389/* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
98418dba
CW
12392#ifdef __cplusplus
12393extern "C"
12394#endif
98418dba 12395char XpCreateContext ();
98418dba
CW
12396int
12397main ()
12398{
ca81d7a0 12399return XpCreateContext ();
98418dba
CW
12400 ;
12401 return 0;
12402}
12403_ACEOF
12404rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12405if { (ac_try="$ac_link"
12406case "(($ac_try" in
12407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12408 *) ac_try_echo=$ac_try;;
12409esac
7bbec45b 12410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12411 (eval "$ac_link") 2>conftest.er1
98418dba 12412 ac_status=$?
edfaf76d
LK
12413 grep -v '^ *+' conftest.er1 >conftest.err
12414 rm -f conftest.er1
12415 cat conftest.err >&5
7bbec45b 12416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12417 (exit $ac_status); } && {
12418 test -z "$ac_c_werror_flag" ||
12419 test ! -s conftest.err
7bbec45b
CY
12420 } && test -s conftest$ac_exeext &&
12421 $as_test_x conftest$ac_exeext; then
98418dba
CW
12422 ac_cv_lib_Xp_XpCreateContext=yes
12423else
7bbec45b 12424 echo "$as_me: failed program was:" >&5
19650fd6
AS
12425sed 's/^/| /' conftest.$ac_ext >&5
12426
ca81d7a0 12427 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12428fi
ca81d7a0 12429
f053c89f 12430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12431 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12432LIBS=$ac_check_lib_save_LIBS
12433fi
7bbec45b
CY
12434{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12435echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
b0448899 12436if test $ac_cv_lib_Xp_XpCreateContext = yes; then
98418dba
CW
12437 HAVE_LIBXP=yes
12438fi
503d2be0 12439
98418dba 12440 if test ${HAVE_LIBXP} = yes; then
b936fae4 12441
c0d27fcc 12442cat >>confdefs.h <<\_ACEOF
98418dba 12443#define HAVE_LIBXP 1
c0d27fcc 12444_ACEOF
503d2be0 12445
98418dba 12446 fi
4693dbc9 12447 else
7bbec45b
CY
12448 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12449echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9 12450if test "${emacs_cv_lesstif+set}" = set; then
7bbec45b 12451 echo $ECHO_N "(cached) $ECHO_C" >&6
4693dbc9
SM
12452else
12453 # We put this in CFLAGS temporarily to precede other -I options
12454 # that might be in CFLAGS temporarily.
12455 # We put this in CPPFLAGS where it precedes the other -I options.
12456 OLD_CPPFLAGS=$CPPFLAGS
12457 OLD_CFLAGS=$CFLAGS
12458 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12459 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12460 cat >conftest.$ac_ext <<_ACEOF
12461/* confdefs.h. */
12462_ACEOF
12463cat confdefs.h >>conftest.$ac_ext
12464cat >>conftest.$ac_ext <<_ACEOF
12465/* end confdefs.h. */
12466#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12467int
12468main ()
12469{
12470int x = 5;
12471 ;
12472 return 0;
12473}
12474_ACEOF
12475rm -f conftest.$ac_objext
ca81d7a0
JD
12476if { (ac_try="$ac_compile"
12477case "(($ac_try" in
12478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12479 *) ac_try_echo=$ac_try;;
12480esac
7bbec45b 12481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12482 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12483 ac_status=$?
edfaf76d
LK
12484 grep -v '^ *+' conftest.er1 >conftest.err
12485 rm -f conftest.er1
12486 cat conftest.err >&5
7bbec45b 12487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12488 (exit $ac_status); } && {
12489 test -z "$ac_c_werror_flag" ||
12490 test ! -s conftest.err
12491 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12492 emacs_cv_lesstif=yes
12493else
7bbec45b 12494 echo "$as_me: failed program was:" >&5
4693dbc9
SM
12495sed 's/^/| /' conftest.$ac_ext >&5
12496
ca81d7a0 12497 emacs_cv_lesstif=no
4693dbc9 12498fi
ca81d7a0
JD
12499
12500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12501fi
7bbec45b
CY
12502{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12503echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12504 if test $emacs_cv_lesstif = yes; then
12505 # Make sure this -I option remains in CPPFLAGS after it is set
12506 # back to REAL_CPPFLAGS.
12507 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12508 # have those other -I options anyway. Ultimately, having this
12509 # directory ultimately in CPPFLAGS will be enough.
12510 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12511 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12512 else
12513 CFLAGS=$OLD_CFLAGS
12514 CPPFLAGS=$OLD_CPPFLAGS
12515 fi
98418dba
CW
12516 fi
12517fi
12518
c0d27fcc
MR
12519
12520
98418dba
CW
12521USE_TOOLKIT_SCROLL_BARS=no
12522if test "${with_toolkit_scroll_bars}" != "no"; then
12523 if test "${USE_X_TOOLKIT}" != "none"; then
12524 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12525 cat >>confdefs.h <<\_ACEOF
98418dba 12526#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12527_ACEOF
98418dba
CW
12528
12529 HAVE_XAW3D=no
12530 USE_TOOLKIT_SCROLL_BARS=yes
12531 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12532 cat >>confdefs.h <<\_ACEOF
98418dba 12533#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12534_ACEOF
98418dba
CW
12535
12536 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12537 fi
488dd4c4
JD
12538 elif test "${HAVE_GTK}" = "yes"; then
12539 cat >>confdefs.h <<\_ACEOF
12540#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12541_ACEOF
12542
12543 USE_TOOLKIT_SCROLL_BARS=yes
12544 elif test "${HAVE_NS}" = "yes"; then
12545 cat >>confdefs.h <<\_ACEOF
12546#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12547_ACEOF
12548
12549 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12550 fi
12551fi
12552
abd39b57 12553cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12554/* confdefs.h. */
12555_ACEOF
12556cat confdefs.h >>conftest.$ac_ext
12557cat >>conftest.$ac_ext <<_ACEOF
12558/* end confdefs.h. */
12559
12560 #include <X11/Xlib.h>
12561 #include <X11/Xresource.h>
12562int
12563main ()
12564{
12565XIMProc callback;
12566 ;
12567 return 0;
12568}
12569_ACEOF
12570rm -f conftest.$ac_objext
ca81d7a0
JD
12571if { (ac_try="$ac_compile"
12572case "(($ac_try" in
12573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12574 *) ac_try_echo=$ac_try;;
12575esac
7bbec45b 12576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12577 (eval "$ac_compile") 2>conftest.er1
abd39b57 12578 ac_status=$?
edfaf76d
LK
12579 grep -v '^ *+' conftest.er1 >conftest.err
12580 rm -f conftest.er1
12581 cat conftest.err >&5
7bbec45b 12582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12583 (exit $ac_status); } && {
12584 test -z "$ac_c_werror_flag" ||
12585 test ! -s conftest.err
12586 } && test -s conftest.$ac_objext; then
abd39b57
AC
12587 HAVE_XIM=yes
12588
12589cat >>confdefs.h <<\_ACEOF
12590#define HAVE_XIM 1
12591_ACEOF
12592
12593else
7bbec45b 12594 echo "$as_me: failed program was:" >&5
abd39b57
AC
12595sed 's/^/| /' conftest.$ac_ext >&5
12596
ca81d7a0 12597 HAVE_XIM=no
abd39b57 12598fi
ca81d7a0
JD
12599
12600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12601
c0d27fcc 12602
98418dba 12603if test "${with_xim}" != "no"; then
b936fae4 12604
c0d27fcc 12605cat >>confdefs.h <<\_ACEOF
98418dba 12606#define USE_XIM 1
c0d27fcc 12607_ACEOF
98418dba 12608
793fa0d7 12609fi
abd39b57
AC
12610
12611
12612if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12613 late_CFLAGS=$CFLAGS
12614 if test "$GCC" = yes; then
12615 CFLAGS="$CFLAGS --pedantic-errors"
12616 fi
cffcede7 12617 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12618/* confdefs.h. */
12619_ACEOF
12620cat confdefs.h >>conftest.$ac_ext
12621cat >>conftest.$ac_ext <<_ACEOF
12622/* end confdefs.h. */
cffcede7
JD
12623
12624#include <X11/Xlib.h>
12625#include <X11/Xresource.h>
12626int
12627main ()
12628{
12629Display *display;
12630XrmDatabase db;
12631char *res_name;
12632char *res_class;
12633XIMProc callback;
12634XPointer *client_data;
849d80cf
DL
12635#ifndef __GNUC__
12636/* If we're not using GCC, it's probably not XFree86, and this is
12637 probably right, but we can't use something like --pedantic-errors. */
12638extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12639 char*, XIMProc, XPointer*);
12640#endif
cffcede7
JD
12641(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12642 client_data);
12643 ;
12644 return 0;
12645}
12646_ACEOF
12647rm -f conftest.$ac_objext
ca81d7a0
JD
12648if { (ac_try="$ac_compile"
12649case "(($ac_try" in
12650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12651 *) ac_try_echo=$ac_try;;
12652esac
7bbec45b 12653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 12654 (eval "$ac_compile") 2>conftest.er1
cffcede7 12655 ac_status=$?
edfaf76d
LK
12656 grep -v '^ *+' conftest.er1 >conftest.err
12657 rm -f conftest.er1
12658 cat conftest.err >&5
7bbec45b 12659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12660 (exit $ac_status); } && {
12661 test -z "$ac_c_werror_flag" ||
12662 test ! -s conftest.err
12663 } && test -s conftest.$ac_objext; then
cffcede7
JD
12664 emacs_cv_arg6_star=yes
12665else
7bbec45b 12666 echo "$as_me: failed program was:" >&5
19650fd6
AS
12667sed 's/^/| /' conftest.$ac_ext >&5
12668
ca81d7a0 12669
cffcede7 12670fi
ca81d7a0
JD
12671
12672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12673
12674 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12675 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12676#define XRegisterIMInstantiateCallback_arg6 XPointer*
12677_ACEOF
12678
12679 else
f57bd967 12680 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12681#define XRegisterIMInstantiateCallback_arg6 XPointer
12682_ACEOF
12683
12684 fi
849d80cf 12685 CFLAGS=$late_CFLAGS
45a4b03e
KH
12686fi
12687
02cfaff4
CY
12688### Start of font-backend (under any platform) section.
12689# (nothing here yet -- this is a placeholder)
12690### End of font-backend (under any platform) section.
12691
12692### Start of font-backend (under X11) section.
12693if test "${HAVE_X11}" = "yes"; then
45a4b03e 12694
44e5501c
GM
12695 succeeded=no
12696
12697 # Extract the first word of "pkg-config", so it can be a program name with args.
12698set dummy pkg-config; ac_word=$2
7bbec45b
CY
12699{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12700echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
44e5501c 12701if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 12702 echo $ECHO_N "(cached) $ECHO_C" >&6
44e5501c
GM
12703else
12704 case $PKG_CONFIG in
12705 [\\/]* | ?:[\\/]*)
12706 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12707 ;;
12708 *)
12709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712 IFS=$as_save_IFS
12713 test -z "$as_dir" && as_dir=.
12714 for ac_exec_ext in '' $ac_executable_extensions; do
12715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12716 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 12717 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
44e5501c
GM
12718 break 2
12719 fi
12720done
12721done
12722IFS=$as_save_IFS
12723
12724 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12725 ;;
12726esac
12727fi
12728PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12729if test -n "$PKG_CONFIG"; then
7bbec45b
CY
12730 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12731echo "${ECHO_T}$PKG_CONFIG" >&6; }
44e5501c 12732else
7bbec45b
CY
12733 { echo "$as_me:$LINENO: result: no" >&5
12734echo "${ECHO_T}no" >&6; }
44e5501c
GM
12735fi
12736
12737
12738
12739 if test "$PKG_CONFIG" = "no" ; then
12740 HAVE_FC=no
12741 else
12742 PKG_CONFIG_MIN_VERSION=0.9.0
12743 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
12744 { echo "$as_me:$LINENO: checking for fontconfig >= 2.2.0" >&5
12745echo $ECHO_N "checking for fontconfig >= 2.2.0... $ECHO_C" >&6; }
44e5501c
GM
12746
12747 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
7bbec45b
CY
12748 { echo "$as_me:$LINENO: result: yes" >&5
12749echo "${ECHO_T}yes" >&6; }
44e5501c
GM
12750 succeeded=yes
12751
7bbec45b
CY
12752 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
12753echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
44e5501c 12754 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
7bbec45b
CY
12755 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
12756echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
44e5501c 12757
7bbec45b
CY
12758 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
12759echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
44e5501c 12760 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
7bbec45b
CY
12761 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
12762echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
44e5501c 12763 else
7bbec45b
CY
12764 { echo "$as_me:$LINENO: result: no" >&5
12765echo "${ECHO_T}no" >&6; }
44e5501c
GM
12766 FONTCONFIG_CFLAGS=""
12767 FONTCONFIG_LIBS=""
12768 ## If we have a custom action on failure, don't print errors, but
12769 ## do set a variable so people can do so.
12770 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
12771
12772 fi
12773
12774
12775
12776 else
12777 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12778 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12779 fi
12780 fi
12781
12782 if test $succeeded = yes; then
12783 HAVE_FC=yes
12784 else
12785 HAVE_FC=no
12786 fi
12787
44e5501c 12788
7bbec45b 12789 ## Use -lXft if available, unless `--with-xft=no'.
02cfaff4 12790 HAVE_XFT=maybe
7bbec45b 12791 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
02cfaff4
CY
12792 with_xft="no";
12793 fi
12794 if test "x${with_xft}" != "xno"; then
45a4b03e 12795
45a4b03e
KH
12796
12797 succeeded=no
12798
d235ca2f 12799 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12800set dummy pkg-config; ac_word=$2
7bbec45b
CY
12801{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12802echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e 12803if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 12804 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
12805else
12806 case $PKG_CONFIG in
12807 [\\/]* | ?:[\\/]*)
12808 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12809 ;;
12810 *)
12811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12812for as_dir in $PATH
12813do
12814 IFS=$as_save_IFS
12815 test -z "$as_dir" && as_dir=.
12816 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12817 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e 12818 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 12819 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
45a4b03e
KH
12820 break 2
12821 fi
12822done
12823done
c24fa7dc 12824IFS=$as_save_IFS
45a4b03e
KH
12825
12826 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12827 ;;
12828esac
12829fi
12830PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12831if test -n "$PKG_CONFIG"; then
7bbec45b
CY
12832 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12833echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12834else
7bbec45b
CY
12835 { echo "$as_me:$LINENO: result: no" >&5
12836echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12837fi
12838
c24fa7dc 12839
45a4b03e
KH
12840
12841 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12842 HAVE_XFT=no
45a4b03e
KH
12843 else
12844 PKG_CONFIG_MIN_VERSION=0.9.0
12845 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
12846 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12847echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12848
c24fa7dc 12849 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
7bbec45b
CY
12850 { echo "$as_me:$LINENO: result: yes" >&5
12851echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12852 succeeded=yes
12853
7bbec45b
CY
12854 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12855echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12856 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
7bbec45b
CY
12857 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12858echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12859
7bbec45b
CY
12860 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12861echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12862 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
7bbec45b
CY
12863 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12864echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12865 else
7bbec45b
CY
12866 { echo "$as_me:$LINENO: result: no" >&5
12867echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12868 XFT_CFLAGS=""
12869 XFT_LIBS=""
12870 ## If we have a custom action on failure, don't print errors, but
12871 ## do set a variable so people can do so.
12872 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12873
12874 fi
12875
12876
12877
12878 else
12879 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12880 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12881 fi
12882 fi
12883
12884 if test $succeeded = yes; then
12885 :
12886 else
12887 HAVE_XFT=no
12888 fi
12889
02cfaff4
CY
12890 if test "$HAVE_XFT" != no; then
12891 OLD_CPPFLAGS="$CPPFLAGS"
12892 OLD_CFLAGS="$CFLAGS"
12893 OLD_LIBS="$LIBS"
12894 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12895 CFLAGS="$CFLAGS $XFT_CFLAGS"
12896 LIBS="$XFT_LIBS $LIBS"
12897 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
7bbec45b
CY
12898 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12899echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e 12900if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
7bbec45b 12901 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e 12902fi
7bbec45b
CY
12903{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12904echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12905else
12906 # Is the header compilable?
7bbec45b
CY
12907{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12908echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12909cat >conftest.$ac_ext <<_ACEOF
12910/* confdefs.h. */
12911_ACEOF
12912cat confdefs.h >>conftest.$ac_ext
12913cat >>conftest.$ac_ext <<_ACEOF
12914/* end confdefs.h. */
12915$ac_includes_default
12916#include <X11/Xft/Xft.h>
12917_ACEOF
12918rm -f conftest.$ac_objext
c24fa7dc
MB
12919if { (ac_try="$ac_compile"
12920case "(($ac_try" in
12921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12922 *) ac_try_echo=$ac_try;;
12923esac
7bbec45b 12924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
c24fa7dc 12925 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12926 ac_status=$?
12927 grep -v '^ *+' conftest.er1 >conftest.err
12928 rm -f conftest.er1
12929 cat conftest.err >&5
7bbec45b 12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12931 (exit $ac_status); } && {
12932 test -z "$ac_c_werror_flag" ||
12933 test ! -s conftest.err
12934 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12935 ac_header_compiler=yes
12936else
7bbec45b 12937 echo "$as_me: failed program was:" >&5
45a4b03e
KH
12938sed 's/^/| /' conftest.$ac_ext >&5
12939
c24fa7dc 12940 ac_header_compiler=no
45a4b03e 12941fi
c24fa7dc
MB
12942
12943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
12944{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12945echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12946
12947# Is the header present?
7bbec45b
CY
12948{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12949echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12950cat >conftest.$ac_ext <<_ACEOF
12951/* confdefs.h. */
12952_ACEOF
12953cat confdefs.h >>conftest.$ac_ext
12954cat >>conftest.$ac_ext <<_ACEOF
12955/* end confdefs.h. */
12956#include <X11/Xft/Xft.h>
12957_ACEOF
c24fa7dc
MB
12958if { (ac_try="$ac_cpp conftest.$ac_ext"
12959case "(($ac_try" in
12960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12961 *) ac_try_echo=$ac_try;;
12962esac
7bbec45b 12963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
c24fa7dc 12964 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12965 ac_status=$?
12966 grep -v '^ *+' conftest.er1 >conftest.err
12967 rm -f conftest.er1
12968 cat conftest.err >&5
7bbec45b 12969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12970 (exit $ac_status); } >/dev/null && {
12971 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12972 test ! -s conftest.err
12973 }; then
45a4b03e
KH
12974 ac_header_preproc=yes
12975else
7bbec45b 12976 echo "$as_me: failed program was:" >&5
45a4b03e
KH
12977sed 's/^/| /' conftest.$ac_ext >&5
12978
12979 ac_header_preproc=no
12980fi
c24fa7dc 12981
45a4b03e 12982rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
12983{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12984echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12985
12986# So? What about this header?
12987case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12988 yes:no: )
7bbec45b
CY
12989 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12990echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12991 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12992echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
45a4b03e
KH
12993 ac_header_preproc=yes
12994 ;;
12995 no:yes:* )
7bbec45b
CY
12996 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12997echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12998 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12999echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
13000 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
13001echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
13002 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
13003echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
13004 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
13005echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
13006 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
13007echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 13008
45a4b03e
KH
13009 ;;
13010esac
7bbec45b
CY
13011{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
13012echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e 13013if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
7bbec45b 13014 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
13015else
13016 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
13017fi
7bbec45b
CY
13018{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
13019echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
13020
13021fi
b0448899 13022if test $ac_cv_header_X11_Xft_Xft_h = yes; then
7bbec45b
CY
13023 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
13024echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e 13025if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
7bbec45b 13026 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e
KH
13027else
13028 ac_check_lib_save_LIBS=$LIBS
13029LIBS="-lXft $XFT_LIBS $LIBS"
13030cat >conftest.$ac_ext <<_ACEOF
13031/* confdefs.h. */
13032_ACEOF
13033cat confdefs.h >>conftest.$ac_ext
13034cat >>conftest.$ac_ext <<_ACEOF
13035/* end confdefs.h. */
13036
c24fa7dc
MB
13037/* Override any GCC internal prototype to avoid an error.
13038 Use char because int might match the return type of a GCC
13039 builtin and then its argument prototype would still apply. */
45a4b03e
KH
13040#ifdef __cplusplus
13041extern "C"
13042#endif
45a4b03e
KH
13043char XftFontOpen ();
13044int
13045main ()
13046{
c24fa7dc 13047return XftFontOpen ();
45a4b03e
KH
13048 ;
13049 return 0;
13050}
13051_ACEOF
13052rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
13053if { (ac_try="$ac_link"
13054case "(($ac_try" in
13055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13056 *) ac_try_echo=$ac_try;;
13057esac
7bbec45b 13058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
c24fa7dc 13059 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
13060 ac_status=$?
13061 grep -v '^ *+' conftest.er1 >conftest.err
13062 rm -f conftest.er1
13063 cat conftest.err >&5
7bbec45b 13064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
13065 (exit $ac_status); } && {
13066 test -z "$ac_c_werror_flag" ||
13067 test ! -s conftest.err
7bbec45b
CY
13068 } && test -s conftest$ac_exeext &&
13069 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
13070 ac_cv_lib_Xft_XftFontOpen=yes
13071else
7bbec45b 13072 echo "$as_me: failed program was:" >&5
45a4b03e
KH
13073sed 's/^/| /' conftest.$ac_ext >&5
13074
c24fa7dc 13075 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 13076fi
c24fa7dc
MB
13077
13078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
13079 conftest$ac_exeext conftest.$ac_ext
13080LIBS=$ac_check_lib_save_LIBS
13081fi
7bbec45b
CY
13082{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
13083echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
b0448899 13084if test $ac_cv_lib_Xft_XftFontOpen = yes; then
45a4b03e
KH
13085 HAVE_XFT=yes
13086fi
13087
13088fi
13089
13090
13091
02cfaff4 13092 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
13093
13094cat >>confdefs.h <<\_ACEOF
13095#define HAVE_XFT 1
13096_ACEOF
13097
13098
02cfaff4
CY
13099 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
13100 else
13101 CPPFLAGS="$OLD_CPPFLAGS"
13102 CFLAGS="$OLD_CFLAGS"
13103 LIBS="$OLD_LIBS"
13104 fi # "${HAVE_XFT}" = "yes"
13105 fi # "$HAVE_XFT" != no
13106 fi # "x${with_xft}" != "xno"
13107
13108 if test "$HAVE_XFT" != "yes"; then
13109 HAVE_XFT=no
13110 fi
45a4b03e 13111
b8bdd8c9 13112
02cfaff4
CY
13113 HAVE_FREETYPE=no
13114 ### Use -lfreetype if available, unless `--with-freetype=no'.
13115 if test "${HAVE_XFT}" = "yes"; then
13116 HAVE_FREETYPE=yes
13117 FONTCONFIG_CFLAGS=
13118 FONTCONFIG_LIBS=
02cfaff4 13119 fi
e70b2110 13120
02cfaff4
CY
13121 HAVE_LIBOTF=no
13122 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13123
13124cat >>confdefs.h <<\_ACEOF
13125#define HAVE_FREETYPE 1
13126_ACEOF
13127
02cfaff4 13128 if test "${with_libotf}" != "no"; then
e70b2110
KH
13129
13130 succeeded=no
13131
d235ca2f 13132 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13133set dummy pkg-config; ac_word=$2
7bbec45b
CY
13134{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13135echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13136if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 13137 echo $ECHO_N "(cached) $ECHO_C" >&6
45a4b03e 13138else
e70b2110
KH
13139 case $PKG_CONFIG in
13140 [\\/]* | ?:[\\/]*)
13141 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13142 ;;
13143 *)
13144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13145for as_dir in $PATH
13146do
13147 IFS=$as_save_IFS
13148 test -z "$as_dir" && as_dir=.
13149 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13150 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13151 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 13152 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
45a4b03e
KH
13153 break 2
13154 fi
13155done
13156done
c24fa7dc 13157IFS=$as_save_IFS
45a4b03e 13158
e70b2110
KH
13159 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13160 ;;
13161esac
45a4b03e 13162fi
e70b2110
KH
13163PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13164if test -n "$PKG_CONFIG"; then
7bbec45b
CY
13165 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13166echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13167else
7bbec45b
CY
13168 { echo "$as_me:$LINENO: result: no" >&5
13169echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13170fi
13171
c24fa7dc 13172
45a4b03e 13173
e70b2110 13174 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13175 HAVE_LIBOTF=no
e70b2110
KH
13176 else
13177 PKG_CONFIG_MIN_VERSION=0.9.0
13178 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
13179 { echo "$as_me:$LINENO: checking for libotf" >&5
13180echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13181
e70b2110 13182 if $PKG_CONFIG --exists "libotf" 2>&5; then
7bbec45b
CY
13183 { echo "$as_me:$LINENO: result: yes" >&5
13184echo "${ECHO_T}yes" >&6; }
e70b2110 13185 succeeded=yes
6ed29d7b 13186
7bbec45b
CY
13187 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13188echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
e70b2110 13189 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
7bbec45b
CY
13190 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13191echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
e70b2110 13192
7bbec45b
CY
13193 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13194echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
e70b2110 13195 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
7bbec45b
CY
13196 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13197echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
e70b2110 13198 else
7bbec45b
CY
13199 { echo "$as_me:$LINENO: result: no" >&5
13200echo "${ECHO_T}no" >&6; }
e70b2110
KH
13201 LIBOTF_CFLAGS=""
13202 LIBOTF_LIBS=""
13203 ## If we have a custom action on failure, don't print errors, but
13204 ## do set a variable so people can do so.
13205 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13206
e70b2110 13207 fi
6ed29d7b 13208
6ed29d7b 13209
6ed29d7b 13210
e70b2110
KH
13211 else
13212 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13213 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13214 fi
13215 fi
13216
13217 if test $succeeded = yes; then
435f8bc5 13218 HAVE_LIBOTF=yes
e70b2110 13219 else
435f8bc5 13220 HAVE_LIBOTF=no
e70b2110
KH
13221 fi
13222
02cfaff4 13223 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13224
45a4b03e
KH
13225cat >>confdefs.h <<\_ACEOF
13226#define HAVE_LIBOTF 1
13227_ACEOF
13228
7bbec45b
CY
13229 { echo "$as_me:$LINENO: checking for OTF_get_variation_glyphs in -lotf" >&5
13230echo $ECHO_N "checking for OTF_get_variation_glyphs in -lotf... $ECHO_C" >&6; }
8bff6137 13231if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then
7bbec45b 13232 echo $ECHO_N "(cached) $ECHO_C" >&6
8bff6137
GM
13233else
13234 ac_check_lib_save_LIBS=$LIBS
13235LIBS="-lotf $LIBS"
13236cat >conftest.$ac_ext <<_ACEOF
13237/* confdefs.h. */
13238_ACEOF
13239cat confdefs.h >>conftest.$ac_ext
13240cat >>conftest.$ac_ext <<_ACEOF
13241/* end confdefs.h. */
13242
13243/* Override any GCC internal prototype to avoid an error.
13244 Use char because int might match the return type of a GCC
13245 builtin and then its argument prototype would still apply. */
13246#ifdef __cplusplus
13247extern "C"
13248#endif
13249char OTF_get_variation_glyphs ();
13250int
13251main ()
13252{
13253return OTF_get_variation_glyphs ();
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext conftest$ac_exeext
13259if { (ac_try="$ac_link"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
7bbec45b 13264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8bff6137
GM
13265 (eval "$ac_link") 2>conftest.er1
13266 ac_status=$?
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
7bbec45b 13270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8bff6137
GM
13271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
7bbec45b
CY
13274 } && test -s conftest$ac_exeext &&
13275 $as_test_x conftest$ac_exeext; then
8bff6137
GM
13276 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13277else
7bbec45b 13278 echo "$as_me: failed program was:" >&5
8bff6137
GM
13279sed 's/^/| /' conftest.$ac_ext >&5
13280
13281 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13282fi
13283
13284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13285 conftest$ac_exeext conftest.$ac_ext
13286LIBS=$ac_check_lib_save_LIBS
13287fi
7bbec45b
CY
13288{ echo "$as_me:$LINENO: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13289echo "${ECHO_T}$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
b0448899 13290if test $ac_cv_lib_otf_OTF_get_variation_glyphs = yes; then
8bff6137
GM
13291 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13292else
13293 HAVE_OTF_GET_VARIATION_GLYPHS=no
13294fi
13295
02cfaff4 13296 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
8bff6137
GM
13297
13298cat >>confdefs.h <<\_ACEOF
13299#define HAVE_OTF_GET_VARIATION_GLYPHS 1
13300_ACEOF
13301
02cfaff4
CY
13302 fi
13303 fi
8bff6137 13304 fi
02cfaff4 13305 fi
45a4b03e 13306
02cfaff4
CY
13307 HAVE_M17N_FLT=no
13308 if test "${HAVE_LIBOTF}" = yes; then
13309 if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13310
13311 succeeded=no
13312
d235ca2f 13313 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba 13314set dummy pkg-config; ac_word=$2
7bbec45b
CY
13315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7f0942ba 13317if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7bbec45b 13318 echo $ECHO_N "(cached) $ECHO_C" >&6
7f0942ba
KH
13319else
13320 case $PKG_CONFIG in
13321 [\\/]* | ?:[\\/]*)
13322 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13323 ;;
13324 *)
13325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326for as_dir in $PATH
13327do
13328 IFS=$as_save_IFS
13329 test -z "$as_dir" && as_dir=.
13330 for ac_exec_ext in '' $ac_executable_extensions; do
13331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13332 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7bbec45b 13333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7f0942ba
KH
13334 break 2
13335 fi
13336done
13337done
13338IFS=$as_save_IFS
13339
13340 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13341 ;;
13342esac
13343fi
13344PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13345if test -n "$PKG_CONFIG"; then
7bbec45b
CY
13346 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13347echo "${ECHO_T}$PKG_CONFIG" >&6; }
7f0942ba 13348else
7bbec45b
CY
13349 { echo "$as_me:$LINENO: result: no" >&5
13350echo "${ECHO_T}no" >&6; }
7f0942ba
KH
13351fi
13352
13353
7f0942ba
KH
13354
13355 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13356 HAVE_M17N_FLT=no
7f0942ba
KH
13357 else
13358 PKG_CONFIG_MIN_VERSION=0.9.0
13359 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7bbec45b
CY
13360 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13361echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
7f0942ba
KH
13362
13363 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
7bbec45b
CY
13364 { echo "$as_me:$LINENO: result: yes" >&5
13365echo "${ECHO_T}yes" >&6; }
7f0942ba
KH
13366 succeeded=yes
13367
7bbec45b
CY
13368 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13369echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
7f0942ba 13370 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
7bbec45b
CY
13371 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13372echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
7f0942ba 13373
7bbec45b
CY
13374 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13375echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
7f0942ba 13376 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
7bbec45b
CY
13377 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13378echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
7f0942ba 13379 else
7bbec45b
CY
13380 { echo "$as_me:$LINENO: result: no" >&5
13381echo "${ECHO_T}no" >&6; }
7f0942ba
KH
13382 M17N_FLT_CFLAGS=""
13383 M17N_FLT_LIBS=""
13384 ## If we have a custom action on failure, don't print errors, but
13385 ## do set a variable so people can do so.
13386 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13387
13388 fi
13389
13390
13391
13392 else
13393 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13394 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13395 fi
13396 fi
13397
13398 if test $succeeded = yes; then
435f8bc5 13399 HAVE_M17N_FLT=yes
7f0942ba 13400 else
435f8bc5 13401 HAVE_M17N_FLT=no
7f0942ba
KH
13402 fi
13403
02cfaff4 13404 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13405
13406cat >>confdefs.h <<\_ACEOF
13407#define HAVE_M17N_FLT 1
13408_ACEOF
13409
02cfaff4
CY
13410 fi
13411 fi
6b0262c1 13412 fi
02cfaff4
CY
13413else
13414 HAVE_XFT=no
13415 HAVE_FREETYPE=no
13416 HAVE_LIBOTF=no
13417 HAVE_M17N_FLT=no
b8bdd8c9 13418fi
02cfaff4 13419### End of font-backend (under X11) section.
e70b2110
KH
13420
13421
13422
13423
13424
13425
13426
7f0942ba
KH
13427
13428
7f0942ba 13429
98418dba
CW
13430### Use -lXpm if available, unless `--with-xpm=no'.
13431HAVE_XPM=no
13432if test "${HAVE_X11}" = "yes"; then
13433 if test "${with_xpm}" != "no"; then
c0d27fcc 13434 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
7bbec45b
CY
13435 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13436echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba 13437if test "${ac_cv_header_X11_xpm_h+set}" = set; then
7bbec45b 13438 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13439fi
7bbec45b
CY
13440{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13441echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13442else
c0d27fcc 13443 # Is the header compilable?
7bbec45b
CY
13444{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13445echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13446cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13447/* confdefs.h. */
13448_ACEOF
13449cat confdefs.h >>conftest.$ac_ext
13450cat >>conftest.$ac_ext <<_ACEOF
13451/* end confdefs.h. */
c0d27fcc
MR
13452$ac_includes_default
13453#include <X11/xpm.h>
13454_ACEOF
13455rm -f conftest.$ac_objext
4c34eeee
MB
13456if { (ac_try="$ac_compile"
13457case "(($ac_try" in
13458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13459 *) ac_try_echo=$ac_try;;
13460esac
7bbec45b 13461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4c34eeee 13462 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13463 ac_status=$?
edfaf76d
LK
13464 grep -v '^ *+' conftest.er1 >conftest.err
13465 rm -f conftest.er1
13466 cat conftest.err >&5
7bbec45b 13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13468 (exit $ac_status); } && {
13469 test -z "$ac_c_werror_flag" ||
13470 test ! -s conftest.err
13471 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13472 ac_header_compiler=yes
13473else
7bbec45b 13474 echo "$as_me: failed program was:" >&5
19650fd6
AS
13475sed 's/^/| /' conftest.$ac_ext >&5
13476
4c34eeee 13477 ac_header_compiler=no
c0d27fcc 13478fi
4c34eeee
MB
13479
13480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
13481{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13482echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13483
13484# Is the header present?
7bbec45b
CY
13485{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13486echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13487cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13488/* confdefs.h. */
13489_ACEOF
13490cat confdefs.h >>conftest.$ac_ext
13491cat >>conftest.$ac_ext <<_ACEOF
13492/* end confdefs.h. */
98418dba
CW
13493#include <X11/xpm.h>
13494_ACEOF
4c34eeee
MB
13495if { (ac_try="$ac_cpp conftest.$ac_ext"
13496case "(($ac_try" in
13497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13498 *) ac_try_echo=$ac_try;;
13499esac
7bbec45b 13500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4c34eeee 13501 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13502 ac_status=$?
6bae0ccf 13503 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13504 rm -f conftest.er1
13505 cat conftest.err >&5
7bbec45b 13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13507 (exit $ac_status); } >/dev/null && {
13508 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13509 test ! -s conftest.err
13510 }; then
c0d27fcc 13511 ac_header_preproc=yes
98418dba 13512else
7bbec45b 13513 echo "$as_me: failed program was:" >&5
19650fd6
AS
13514sed 's/^/| /' conftest.$ac_ext >&5
13515
c0d27fcc 13516 ac_header_preproc=no
98418dba 13517fi
4c34eeee 13518
98418dba 13519rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
13520{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13521echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13522
13523# So? What about this header?
edfaf76d
LK
13524case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13525 yes:no: )
7bbec45b
CY
13526 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13527echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13528 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13529echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
edfaf76d
LK
13530 ac_header_preproc=yes
13531 ;;
13532 no:yes:* )
7bbec45b
CY
13533 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13534echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13535 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13536echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13537 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13538echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13539 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13540echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
13541 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13542echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
13543 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13544echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13545
19650fd6 13546 ;;
c0d27fcc 13547esac
7bbec45b
CY
13548{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13549echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc 13550if test "${ac_cv_header_X11_xpm_h+set}" = set; then
7bbec45b 13551 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13552else
13553 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13554fi
7bbec45b
CY
13555{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13556echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13557
13558fi
b0448899 13559if test $ac_cv_header_X11_xpm_h = yes; then
7bbec45b
CY
13560 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13561echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13562if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
7bbec45b 13563 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13564else
98418dba
CW
13565 ac_check_lib_save_LIBS=$LIBS
13566LIBS="-lXpm -lX11 $LIBS"
13567cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13568/* confdefs.h. */
13569_ACEOF
13570cat confdefs.h >>conftest.$ac_ext
13571cat >>conftest.$ac_ext <<_ACEOF
13572/* end confdefs.h. */
98418dba 13573
4c34eeee
MB
13574/* Override any GCC internal prototype to avoid an error.
13575 Use char because int might match the return type of a GCC
13576 builtin and then its argument prototype would still apply. */
503d2be0
AS
13577#ifdef __cplusplus
13578extern "C"
13579#endif
98418dba 13580char XpmReadFileToPixmap ();
503d2be0
AS
13581int
13582main ()
13583{
4c34eeee 13584return XpmReadFileToPixmap ();
503d2be0
AS
13585 ;
13586 return 0;
13587}
13588_ACEOF
13589rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13590if { (ac_try="$ac_link"
13591case "(($ac_try" in
13592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13593 *) ac_try_echo=$ac_try;;
13594esac
7bbec45b 13595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4c34eeee 13596 (eval "$ac_link") 2>conftest.er1
503d2be0 13597 ac_status=$?
edfaf76d
LK
13598 grep -v '^ *+' conftest.er1 >conftest.err
13599 rm -f conftest.er1
13600 cat conftest.err >&5
7bbec45b 13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13602 (exit $ac_status); } && {
13603 test -z "$ac_c_werror_flag" ||
13604 test ! -s conftest.err
7bbec45b
CY
13605 } && test -s conftest$ac_exeext &&
13606 $as_test_x conftest$ac_exeext; then
98418dba 13607 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0 13608else
7bbec45b 13609 echo "$as_me: failed program was:" >&5
19650fd6
AS
13610sed 's/^/| /' conftest.$ac_ext >&5
13611
4c34eeee 13612 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13613fi
4c34eeee
MB
13614
13615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13616 conftest$ac_exeext conftest.$ac_ext
98418dba 13617LIBS=$ac_check_lib_save_LIBS
503d2be0 13618fi
7bbec45b
CY
13619{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13620echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
b0448899 13621if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
98418dba 13622 HAVE_XPM=yes
ba4481b5
DL
13623fi
13624
98418dba
CW
13625fi
13626
c0d27fcc 13627
98418dba 13628 if test "${HAVE_XPM}" = "yes"; then
7bbec45b
CY
13629 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13630echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13631 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13632/* confdefs.h. */
13633_ACEOF
13634cat confdefs.h >>conftest.$ac_ext
13635cat >>conftest.$ac_ext <<_ACEOF
13636/* end confdefs.h. */
98418dba
CW
13637#include "X11/xpm.h"
13638#ifndef XpmReturnAllocPixels
13639no_return_alloc_pixels
503d2be0 13640#endif
ba4481b5 13641
98418dba
CW
13642_ACEOF
13643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13644 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13645 HAVE_XPM=no
13646else
13647 HAVE_XPM=yes
13648fi
13649rm -f conftest*
ba4481b5 13650
c0d27fcc 13651
98418dba 13652 if test "${HAVE_XPM}" = "yes"; then
7bbec45b
CY
13653 { echo "$as_me:$LINENO: result: yes" >&5
13654echo "${ECHO_T}yes" >&6; }
98418dba 13655 else
7bbec45b
CY
13656 { echo "$as_me:$LINENO: result: no" >&5
13657echo "${ECHO_T}no" >&6; }
98418dba
CW
13658 fi
13659 fi
13660 fi
13661
13662 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13663
c0d27fcc 13664cat >>confdefs.h <<\_ACEOF
98418dba 13665#define HAVE_XPM 1
c0d27fcc 13666_ACEOF
98418dba
CW
13667
13668 fi
13669fi
13670
13671### Use -ljpeg if available, unless `--with-jpeg=no'.
13672HAVE_JPEG=no
13673if test "${HAVE_X11}" = "yes"; then
13674 if test "${with_jpeg}" != "no"; then
c0d27fcc 13675 if test "${ac_cv_header_jerror_h+set}" = set; then
7bbec45b
CY
13676 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13677echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba 13678if test "${ac_cv_header_jerror_h+set}" = set; then
7bbec45b 13679 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13680fi
7bbec45b
CY
13681{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13682echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13683else
c0d27fcc 13684 # Is the header compilable?
7bbec45b
CY
13685{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13686echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13687cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13688/* confdefs.h. */
13689_ACEOF
13690cat confdefs.h >>conftest.$ac_ext
13691cat >>conftest.$ac_ext <<_ACEOF
13692/* end confdefs.h. */
c0d27fcc
MR
13693$ac_includes_default
13694#include <jerror.h>
13695_ACEOF
13696rm -f conftest.$ac_objext
ca81d7a0
JD
13697if { (ac_try="$ac_compile"
13698case "(($ac_try" in
13699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13700 *) ac_try_echo=$ac_try;;
13701esac
7bbec45b 13702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13703 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13704 ac_status=$?
edfaf76d
LK
13705 grep -v '^ *+' conftest.er1 >conftest.err
13706 rm -f conftest.er1
13707 cat conftest.err >&5
7bbec45b 13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13709 (exit $ac_status); } && {
13710 test -z "$ac_c_werror_flag" ||
13711 test ! -s conftest.err
13712 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13713 ac_header_compiler=yes
13714else
7bbec45b 13715 echo "$as_me: failed program was:" >&5
19650fd6
AS
13716sed 's/^/| /' conftest.$ac_ext >&5
13717
ca81d7a0 13718 ac_header_compiler=no
c0d27fcc 13719fi
ca81d7a0
JD
13720
13721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
13722{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13723echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13724
13725# Is the header present?
7bbec45b
CY
13726{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13727echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13728cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13729/* confdefs.h. */
13730_ACEOF
13731cat confdefs.h >>conftest.$ac_ext
13732cat >>conftest.$ac_ext <<_ACEOF
13733/* end confdefs.h. */
98418dba
CW
13734#include <jerror.h>
13735_ACEOF
ca81d7a0
JD
13736if { (ac_try="$ac_cpp conftest.$ac_ext"
13737case "(($ac_try" in
13738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13739 *) ac_try_echo=$ac_try;;
13740esac
7bbec45b 13741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13742 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13743 ac_status=$?
6bae0ccf 13744 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13745 rm -f conftest.er1
13746 cat conftest.err >&5
7bbec45b 13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13748 (exit $ac_status); } >/dev/null && {
13749 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13750 test ! -s conftest.err
13751 }; then
c0d27fcc 13752 ac_header_preproc=yes
ba4481b5 13753else
7bbec45b 13754 echo "$as_me: failed program was:" >&5
19650fd6
AS
13755sed 's/^/| /' conftest.$ac_ext >&5
13756
c0d27fcc 13757 ac_header_preproc=no
98418dba 13758fi
ca81d7a0 13759
98418dba 13760rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
13761{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13762echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13763
13764# So? What about this header?
edfaf76d
LK
13765case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13766 yes:no: )
7bbec45b
CY
13767 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13768echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13769 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13770echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
edfaf76d 13771 ac_header_preproc=yes
19650fd6 13772 ;;
edfaf76d 13773 no:yes:* )
7bbec45b
CY
13774 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13775echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
13776 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13777echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13778 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13779echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13780 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13781echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
13782 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
13783echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
13784 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13785echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13786
19650fd6 13787 ;;
c0d27fcc 13788esac
7bbec45b
CY
13789{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13790echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc 13791if test "${ac_cv_header_jerror_h+set}" = set; then
7bbec45b 13792 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13793else
13794 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13795fi
7bbec45b
CY
13796{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13797echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13798
13799fi
b0448899 13800if test $ac_cv_header_jerror_h = yes; then
7bbec45b
CY
13801 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13802echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13803if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
7bbec45b 13804 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13805else
98418dba
CW
13806 ac_check_lib_save_LIBS=$LIBS
13807LIBS="-ljpeg $LIBS"
13808cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13809/* confdefs.h. */
13810_ACEOF
13811cat confdefs.h >>conftest.$ac_ext
13812cat >>conftest.$ac_ext <<_ACEOF
13813/* end confdefs.h. */
98418dba 13814
ca81d7a0
JD
13815/* Override any GCC internal prototype to avoid an error.
13816 Use char because int might match the return type of a GCC
13817 builtin and then its argument prototype would still apply. */
98418dba
CW
13818#ifdef __cplusplus
13819extern "C"
13820#endif
98418dba 13821char jpeg_destroy_compress ();
503d2be0
AS
13822int
13823main ()
13824{
ca81d7a0 13825return jpeg_destroy_compress ();
503d2be0
AS
13826 ;
13827 return 0;
13828}
13829_ACEOF
13830rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13831if { (ac_try="$ac_link"
13832case "(($ac_try" in
13833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13834 *) ac_try_echo=$ac_try;;
13835esac
7bbec45b 13836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13837 (eval "$ac_link") 2>conftest.er1
503d2be0 13838 ac_status=$?
edfaf76d
LK
13839 grep -v '^ *+' conftest.er1 >conftest.err
13840 rm -f conftest.er1
13841 cat conftest.err >&5
7bbec45b 13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13843 (exit $ac_status); } && {
13844 test -z "$ac_c_werror_flag" ||
13845 test ! -s conftest.err
7bbec45b
CY
13846 } && test -s conftest$ac_exeext &&
13847 $as_test_x conftest$ac_exeext; then
98418dba 13848 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13849else
7bbec45b 13850 echo "$as_me: failed program was:" >&5
19650fd6
AS
13851sed 's/^/| /' conftest.$ac_ext >&5
13852
ca81d7a0 13853 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13854fi
ca81d7a0 13855
f053c89f 13856rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13857 conftest$ac_exeext conftest.$ac_ext
98418dba 13858LIBS=$ac_check_lib_save_LIBS
ba4481b5 13859fi
7bbec45b
CY
13860{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13861echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
b0448899 13862if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
98418dba 13863 HAVE_JPEG=yes
ba4481b5 13864fi
98418dba 13865
ba4481b5 13866fi
98418dba 13867
c0d27fcc 13868
ba4481b5 13869 fi
ba4481b5 13870
c0d27fcc 13871
98418dba 13872 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13873 cat >>confdefs.h <<\_ACEOF
98418dba 13874#define HAVE_JPEG 1
c0d27fcc 13875_ACEOF
98418dba
CW
13876
13877 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13878/* confdefs.h. */
13879_ACEOF
13880cat confdefs.h >>conftest.$ac_ext
13881cat >>conftest.$ac_ext <<_ACEOF
13882/* end confdefs.h. */
22044edf 13883#include <jpeglib.h>
98418dba
CW
13884 version=JPEG_LIB_VERSION
13885
13886_ACEOF
13887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13888 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13889 cat >>confdefs.h <<\_ACEOF
98418dba 13890#define HAVE_JPEG 1
c0d27fcc 13891_ACEOF
ba4481b5 13892
98418dba 13893else
7bbec45b
CY
13894 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
13895echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
98418dba 13896 HAVE_JPEG=no
ba4481b5 13897fi
98418dba 13898rm -f conftest*
ba4481b5 13899
98418dba
CW
13900 fi
13901fi
503d2be0 13902
98418dba
CW
13903### Use -lpng if available, unless `--with-png=no'.
13904HAVE_PNG=no
13905if test "${HAVE_X11}" = "yes"; then
13906 if test "${with_png}" != "no"; then
f57bd967
DL
13907 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13908 # in /usr/include/libpng.
13909
13910
13911for ac_header in png.h libpng/png.h
13912do
7bbec45b 13913as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 13914if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
13915 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13916echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 13917if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 13918 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13919fi
7bbec45b
CY
13920ac_res=`eval echo '${'$as_ac_Header'}'`
13921 { echo "$as_me:$LINENO: result: $ac_res" >&5
13922echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13923else
c0d27fcc 13924 # Is the header compilable?
7bbec45b
CY
13925{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13926echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13927cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13928/* confdefs.h. */
13929_ACEOF
13930cat confdefs.h >>conftest.$ac_ext
13931cat >>conftest.$ac_ext <<_ACEOF
13932/* end confdefs.h. */
c0d27fcc 13933$ac_includes_default
f57bd967 13934#include <$ac_header>
c0d27fcc
MR
13935_ACEOF
13936rm -f conftest.$ac_objext
ca81d7a0
JD
13937if { (ac_try="$ac_compile"
13938case "(($ac_try" in
13939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13940 *) ac_try_echo=$ac_try;;
13941esac
7bbec45b 13942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13943 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13944 ac_status=$?
edfaf76d
LK
13945 grep -v '^ *+' conftest.er1 >conftest.err
13946 rm -f conftest.er1
13947 cat conftest.err >&5
7bbec45b 13948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13949 (exit $ac_status); } && {
13950 test -z "$ac_c_werror_flag" ||
13951 test ! -s conftest.err
13952 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13953 ac_header_compiler=yes
13954else
7bbec45b 13955 echo "$as_me: failed program was:" >&5
19650fd6
AS
13956sed 's/^/| /' conftest.$ac_ext >&5
13957
ca81d7a0 13958 ac_header_compiler=no
c0d27fcc 13959fi
ca81d7a0
JD
13960
13961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
13962{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13963echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13964
13965# Is the header present?
7bbec45b
CY
13966{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13967echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13968cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13969/* confdefs.h. */
13970_ACEOF
13971cat confdefs.h >>conftest.$ac_ext
13972cat >>conftest.$ac_ext <<_ACEOF
13973/* end confdefs.h. */
f57bd967 13974#include <$ac_header>
503d2be0 13975_ACEOF
ca81d7a0
JD
13976if { (ac_try="$ac_cpp conftest.$ac_ext"
13977case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
7bbec45b 13981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 13982 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13983 ac_status=$?
6bae0ccf 13984 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13985 rm -f conftest.er1
13986 cat conftest.err >&5
7bbec45b 13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13988 (exit $ac_status); } >/dev/null && {
13989 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13990 test ! -s conftest.err
13991 }; then
c0d27fcc 13992 ac_header_preproc=yes
503d2be0 13993else
7bbec45b 13994 echo "$as_me: failed program was:" >&5
19650fd6
AS
13995sed 's/^/| /' conftest.$ac_ext >&5
13996
c0d27fcc 13997 ac_header_preproc=no
ba4481b5 13998fi
ca81d7a0 13999
503d2be0 14000rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
14001{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14002echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14003
14004# So? What about this header?
edfaf76d
LK
14005case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14006 yes:no: )
7bbec45b
CY
14007 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14008echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14009 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14010echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 14011 ac_header_preproc=yes
19650fd6 14012 ;;
edfaf76d 14013 no:yes:* )
7bbec45b
CY
14014 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14015echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14016 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14017echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14018 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14019echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14020 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14021echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14022 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14023echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14024 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14025echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14026
19650fd6 14027 ;;
c0d27fcc 14028esac
7bbec45b
CY
14029{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 14031if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 14032 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14033else
edfaf76d 14034 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 14035fi
7bbec45b
CY
14036ac_res=`eval echo '${'$as_ac_Header'}'`
14037 { echo "$as_me:$LINENO: result: $ac_res" >&5
14038echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14039
ba4481b5 14040fi
7bbec45b 14041if test `eval echo '${'$as_ac_Header'}'` = yes; then
f57bd967 14042 cat >>confdefs.h <<_ACEOF
7bbec45b 14043#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
f57bd967 14044_ACEOF
c0d27fcc
MR
14045
14046fi
f57bd967
DL
14047
14048done
14049
14050 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
7bbec45b
CY
14051 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14052echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14053if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
7bbec45b 14054 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14055else
98418dba
CW
14056 ac_check_lib_save_LIBS=$LIBS
14057LIBS="-lpng -lz -lm $LIBS"
14058cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14059/* confdefs.h. */
14060_ACEOF
14061cat confdefs.h >>conftest.$ac_ext
14062cat >>conftest.$ac_ext <<_ACEOF
14063/* end confdefs.h. */
98418dba 14064
ca81d7a0
JD
14065/* Override any GCC internal prototype to avoid an error.
14066 Use char because int might match the return type of a GCC
14067 builtin and then its argument prototype would still apply. */
503d2be0
AS
14068#ifdef __cplusplus
14069extern "C"
14070#endif
98418dba 14071char png_get_channels ();
503d2be0
AS
14072int
14073main ()
14074{
ca81d7a0 14075return png_get_channels ();
503d2be0
AS
14076 ;
14077 return 0;
14078}
14079_ACEOF
14080rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14081if { (ac_try="$ac_link"
14082case "(($ac_try" in
14083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14084 *) ac_try_echo=$ac_try;;
14085esac
7bbec45b 14086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14087 (eval "$ac_link") 2>conftest.er1
503d2be0 14088 ac_status=$?
edfaf76d
LK
14089 grep -v '^ *+' conftest.er1 >conftest.err
14090 rm -f conftest.er1
14091 cat conftest.err >&5
7bbec45b 14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14093 (exit $ac_status); } && {
14094 test -z "$ac_c_werror_flag" ||
14095 test ! -s conftest.err
7bbec45b
CY
14096 } && test -s conftest$ac_exeext &&
14097 $as_test_x conftest$ac_exeext; then
98418dba 14098 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14099else
7bbec45b 14100 echo "$as_me: failed program was:" >&5
19650fd6
AS
14101sed 's/^/| /' conftest.$ac_ext >&5
14102
ca81d7a0 14103 ac_cv_lib_png_png_get_channels=no
73b77ee5 14104fi
ca81d7a0 14105
f053c89f 14106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14107 conftest$ac_exeext conftest.$ac_ext
98418dba 14108LIBS=$ac_check_lib_save_LIBS
73b77ee5 14109fi
7bbec45b
CY
14110{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14111echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
b0448899 14112if test $ac_cv_lib_png_png_get_channels = yes; then
98418dba 14113 HAVE_PNG=yes
73b77ee5 14114fi
503d2be0 14115
f57bd967 14116 fi
98418dba
CW
14117 fi
14118
14119 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14120
c0d27fcc 14121cat >>confdefs.h <<\_ACEOF
98418dba 14122#define HAVE_PNG 1
c0d27fcc 14123_ACEOF
73b77ee5 14124
98418dba 14125 fi
73b77ee5
GM
14126fi
14127
98418dba
CW
14128### Use -ltiff if available, unless `--with-tiff=no'.
14129HAVE_TIFF=no
14130if test "${HAVE_X11}" = "yes"; then
14131 if test "${with_tiff}" != "no"; then
c0d27fcc 14132 if test "${ac_cv_header_tiffio_h+set}" = set; then
7bbec45b
CY
14133 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14134echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba 14135if test "${ac_cv_header_tiffio_h+set}" = set; then
7bbec45b 14136 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14137fi
7bbec45b
CY
14138{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14139echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14140else
c0d27fcc 14141 # Is the header compilable?
7bbec45b
CY
14142{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14143echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14144cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14145/* confdefs.h. */
14146_ACEOF
14147cat confdefs.h >>conftest.$ac_ext
14148cat >>conftest.$ac_ext <<_ACEOF
14149/* end confdefs.h. */
c0d27fcc
MR
14150$ac_includes_default
14151#include <tiffio.h>
14152_ACEOF
14153rm -f conftest.$ac_objext
ca81d7a0
JD
14154if { (ac_try="$ac_compile"
14155case "(($ac_try" in
14156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14157 *) ac_try_echo=$ac_try;;
14158esac
7bbec45b 14159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14160 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14161 ac_status=$?
edfaf76d
LK
14162 grep -v '^ *+' conftest.er1 >conftest.err
14163 rm -f conftest.er1
14164 cat conftest.err >&5
7bbec45b 14165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14166 (exit $ac_status); } && {
14167 test -z "$ac_c_werror_flag" ||
14168 test ! -s conftest.err
14169 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14170 ac_header_compiler=yes
14171else
7bbec45b 14172 echo "$as_me: failed program was:" >&5
19650fd6
AS
14173sed 's/^/| /' conftest.$ac_ext >&5
14174
ca81d7a0 14175 ac_header_compiler=no
c0d27fcc 14176fi
ca81d7a0
JD
14177
14178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
14179{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14180echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14181
14182# Is the header present?
7bbec45b
CY
14183{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14184echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14185cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14186/* confdefs.h. */
14187_ACEOF
14188cat confdefs.h >>conftest.$ac_ext
14189cat >>conftest.$ac_ext <<_ACEOF
14190/* end confdefs.h. */
98418dba
CW
14191#include <tiffio.h>
14192_ACEOF
ca81d7a0
JD
14193if { (ac_try="$ac_cpp conftest.$ac_ext"
14194case "(($ac_try" in
14195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14196 *) ac_try_echo=$ac_try;;
14197esac
7bbec45b 14198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14199 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14200 ac_status=$?
6bae0ccf 14201 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14202 rm -f conftest.er1
14203 cat conftest.err >&5
7bbec45b 14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14205 (exit $ac_status); } >/dev/null && {
14206 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14207 test ! -s conftest.err
14208 }; then
c0d27fcc 14209 ac_header_preproc=yes
98418dba 14210else
7bbec45b 14211 echo "$as_me: failed program was:" >&5
19650fd6
AS
14212sed 's/^/| /' conftest.$ac_ext >&5
14213
c0d27fcc 14214 ac_header_preproc=no
98418dba 14215fi
ca81d7a0 14216
98418dba 14217rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
14218{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14219echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14220
14221# So? What about this header?
edfaf76d
LK
14222case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14223 yes:no: )
7bbec45b
CY
14224 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14225echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14226 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14227echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
edfaf76d 14228 ac_header_preproc=yes
19650fd6 14229 ;;
edfaf76d 14230 no:yes:* )
7bbec45b
CY
14231 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14232echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
14233 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14234echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14235 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14236echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14237 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14238echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
14239 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
14240echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
14241 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14242echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14243
19650fd6 14244 ;;
c0d27fcc 14245esac
7bbec45b
CY
14246{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14247echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc 14248if test "${ac_cv_header_tiffio_h+set}" = set; then
7bbec45b 14249 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14250else
14251 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14252fi
7bbec45b
CY
14253{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14254echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14255
14256fi
b0448899 14257if test $ac_cv_header_tiffio_h = yes; then
98418dba
CW
14258 tifflibs="-lz -lm"
14259 # At least one tiff package requires the jpeg library.
14260 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
7bbec45b
CY
14261 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14262echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14263if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
7bbec45b 14264 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14265else
503d2be0 14266 ac_check_lib_save_LIBS=$LIBS
98418dba 14267LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14268cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14269/* confdefs.h. */
14270_ACEOF
14271cat confdefs.h >>conftest.$ac_ext
14272cat >>conftest.$ac_ext <<_ACEOF
14273/* end confdefs.h. */
503d2be0 14274
ca81d7a0
JD
14275/* Override any GCC internal prototype to avoid an error.
14276 Use char because int might match the return type of a GCC
14277 builtin and then its argument prototype would still apply. */
503d2be0
AS
14278#ifdef __cplusplus
14279extern "C"
14280#endif
98418dba 14281char TIFFGetVersion ();
503d2be0
AS
14282int
14283main ()
14284{
ca81d7a0 14285return TIFFGetVersion ();
503d2be0
AS
14286 ;
14287 return 0;
14288}
14289_ACEOF
14290rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14291if { (ac_try="$ac_link"
14292case "(($ac_try" in
14293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14294 *) ac_try_echo=$ac_try;;
14295esac
7bbec45b 14296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14297 (eval "$ac_link") 2>conftest.er1
503d2be0 14298 ac_status=$?
edfaf76d
LK
14299 grep -v '^ *+' conftest.er1 >conftest.err
14300 rm -f conftest.er1
14301 cat conftest.err >&5
7bbec45b 14302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14303 (exit $ac_status); } && {
14304 test -z "$ac_c_werror_flag" ||
14305 test ! -s conftest.err
7bbec45b
CY
14306 } && test -s conftest$ac_exeext &&
14307 $as_test_x conftest$ac_exeext; then
98418dba 14308 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0 14309else
7bbec45b 14310 echo "$as_me: failed program was:" >&5
19650fd6
AS
14311sed 's/^/| /' conftest.$ac_ext >&5
14312
ca81d7a0 14313 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14314fi
ca81d7a0 14315
f053c89f 14316rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14317 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14318LIBS=$ac_check_lib_save_LIBS
14319fi
7bbec45b
CY
14320{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14321echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
b0448899 14322if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
98418dba
CW
14323 HAVE_TIFF=yes
14324fi
14325
14326fi
73b77ee5 14327
c0d27fcc 14328
98418dba
CW
14329 fi
14330
14331 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14332
c0d27fcc 14333cat >>confdefs.h <<\_ACEOF
98418dba 14334#define HAVE_TIFF 1
c0d27fcc 14335_ACEOF
98418dba
CW
14336
14337 fi
73b77ee5
GM
14338fi
14339
9aeb8aaa 14340### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14341HAVE_GIF=no
9aeb8aaa
GM
14342if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14343 if test "${ac_cv_header_gif_lib_h+set}" = set; then
7bbec45b
CY
14344 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14345echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba 14346if test "${ac_cv_header_gif_lib_h+set}" = set; then
7bbec45b 14347 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14348fi
7bbec45b
CY
14349{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14350echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14351else
c0d27fcc 14352 # Is the header compilable?
7bbec45b
CY
14353{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14354echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14355cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14356/* confdefs.h. */
14357_ACEOF
14358cat confdefs.h >>conftest.$ac_ext
14359cat >>conftest.$ac_ext <<_ACEOF
14360/* end confdefs.h. */
c0d27fcc
MR
14361$ac_includes_default
14362#include <gif_lib.h>
14363_ACEOF
14364rm -f conftest.$ac_objext
ca81d7a0
JD
14365if { (ac_try="$ac_compile"
14366case "(($ac_try" in
14367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14368 *) ac_try_echo=$ac_try;;
14369esac
7bbec45b 14370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14371 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14372 ac_status=$?
edfaf76d
LK
14373 grep -v '^ *+' conftest.er1 >conftest.err
14374 rm -f conftest.er1
14375 cat conftest.err >&5
7bbec45b 14376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14377 (exit $ac_status); } && {
14378 test -z "$ac_c_werror_flag" ||
14379 test ! -s conftest.err
14380 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14381 ac_header_compiler=yes
14382else
7bbec45b 14383 echo "$as_me: failed program was:" >&5
19650fd6
AS
14384sed 's/^/| /' conftest.$ac_ext >&5
14385
ca81d7a0 14386 ac_header_compiler=no
c0d27fcc 14387fi
ca81d7a0
JD
14388
14389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
14390{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14391echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14392
14393# Is the header present?
7bbec45b
CY
14394{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14395echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14397/* confdefs.h. */
14398_ACEOF
14399cat confdefs.h >>conftest.$ac_ext
14400cat >>conftest.$ac_ext <<_ACEOF
14401/* end confdefs.h. */
98418dba
CW
14402#include <gif_lib.h>
14403_ACEOF
ca81d7a0
JD
14404if { (ac_try="$ac_cpp conftest.$ac_ext"
14405case "(($ac_try" in
14406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14407 *) ac_try_echo=$ac_try;;
14408esac
7bbec45b 14409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14410 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14411 ac_status=$?
6bae0ccf 14412 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14413 rm -f conftest.er1
14414 cat conftest.err >&5
7bbec45b 14415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14416 (exit $ac_status); } >/dev/null && {
14417 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14418 test ! -s conftest.err
14419 }; then
c0d27fcc 14420 ac_header_preproc=yes
98418dba 14421else
7bbec45b 14422 echo "$as_me: failed program was:" >&5
19650fd6
AS
14423sed 's/^/| /' conftest.$ac_ext >&5
14424
c0d27fcc 14425 ac_header_preproc=no
98418dba 14426fi
ca81d7a0 14427
98418dba 14428rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
14429{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14430echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14431
14432# So? What about this header?
edfaf76d
LK
14433case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14434 yes:no: )
7bbec45b
CY
14435 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14436echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14437 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14438echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
edfaf76d 14439 ac_header_preproc=yes
19650fd6 14440 ;;
edfaf76d 14441 no:yes:* )
7bbec45b
CY
14442 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14443echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
14444 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14445echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14446 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14447echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14448 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14449echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
14450 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
14451echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
14452 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14453echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14454
19650fd6 14455 ;;
c0d27fcc 14456esac
7bbec45b
CY
14457{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14458echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc 14459if test "${ac_cv_header_gif_lib_h+set}" = set; then
7bbec45b 14460 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14461else
14462 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14463fi
7bbec45b
CY
14464{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14465echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14466
14467fi
b0448899 14468if test $ac_cv_header_gif_lib_h = yes; then
98418dba
CW
14469 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14470# Earlier versions can crash Emacs.
7bbec45b
CY
14471 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14472echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
63175cd2 14473if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
7bbec45b 14474 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14475else
503d2be0 14476 ac_check_lib_save_LIBS=$LIBS
63175cd2 14477LIBS="-lgif $LIBS"
503d2be0 14478cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14479/* confdefs.h. */
14480_ACEOF
14481cat confdefs.h >>conftest.$ac_ext
14482cat >>conftest.$ac_ext <<_ACEOF
14483/* end confdefs.h. */
73b77ee5 14484
ca81d7a0
JD
14485/* Override any GCC internal prototype to avoid an error.
14486 Use char because int might match the return type of a GCC
14487 builtin and then its argument prototype would still apply. */
98418dba
CW
14488#ifdef __cplusplus
14489extern "C"
14490#endif
98418dba 14491char EGifPutExtensionLast ();
503d2be0
AS
14492int
14493main ()
14494{
ca81d7a0 14495return EGifPutExtensionLast ();
503d2be0
AS
14496 ;
14497 return 0;
14498}
14499_ACEOF
14500rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14501if { (ac_try="$ac_link"
14502case "(($ac_try" in
14503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14504 *) ac_try_echo=$ac_try;;
14505esac
7bbec45b 14506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14507 (eval "$ac_link") 2>conftest.er1
503d2be0 14508 ac_status=$?
edfaf76d
LK
14509 grep -v '^ *+' conftest.er1 >conftest.err
14510 rm -f conftest.er1
14511 cat conftest.err >&5
7bbec45b 14512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14513 (exit $ac_status); } && {
14514 test -z "$ac_c_werror_flag" ||
14515 test ! -s conftest.err
7bbec45b
CY
14516 } && test -s conftest$ac_exeext &&
14517 $as_test_x conftest$ac_exeext; then
63175cd2 14518 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14519else
7bbec45b 14520 echo "$as_me: failed program was:" >&5
19650fd6
AS
14521sed 's/^/| /' conftest.$ac_ext >&5
14522
63175cd2 14523 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14524fi
ca81d7a0 14525
f053c89f 14526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14527 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14528LIBS=$ac_check_lib_save_LIBS
14529fi
7bbec45b
CY
14530{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14531echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
b0448899 14532if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14533 HAVE_GIF=yes
9aeb8aaa 14534else
63175cd2 14535 try_libungif=yes
98418dba
CW
14536fi
14537
14538fi
14539
c0d27fcc 14540
9aeb8aaa
GM
14541
14542 if test "$HAVE_GIF" = yes; then
63175cd2 14543 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14544 fi
14545
63175cd2
GM
14546# If gif_lib.h but no libgif, try libungif.
14547 if test x"$try_libungif" = xyes; then
7bbec45b
CY
14548 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14549echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
63175cd2 14550if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
7bbec45b 14551 echo $ECHO_N "(cached) $ECHO_C" >&6
9aeb8aaa
GM
14552else
14553 ac_check_lib_save_LIBS=$LIBS
63175cd2 14554LIBS="-lungif $LIBS"
9aeb8aaa
GM
14555cat >conftest.$ac_ext <<_ACEOF
14556/* confdefs.h. */
14557_ACEOF
14558cat confdefs.h >>conftest.$ac_ext
14559cat >>conftest.$ac_ext <<_ACEOF
14560/* end confdefs.h. */
14561
14562/* Override any GCC internal prototype to avoid an error.
14563 Use char because int might match the return type of a GCC
14564 builtin and then its argument prototype would still apply. */
14565#ifdef __cplusplus
14566extern "C"
14567#endif
14568char EGifPutExtensionLast ();
14569int
14570main ()
14571{
14572return EGifPutExtensionLast ();
14573 ;
14574 return 0;
14575}
14576_ACEOF
14577rm -f conftest.$ac_objext conftest$ac_exeext
14578if { (ac_try="$ac_link"
14579case "(($ac_try" in
14580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14581 *) ac_try_echo=$ac_try;;
14582esac
7bbec45b 14583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9aeb8aaa
GM
14584 (eval "$ac_link") 2>conftest.er1
14585 ac_status=$?
14586 grep -v '^ *+' conftest.er1 >conftest.err
14587 rm -f conftest.er1
14588 cat conftest.err >&5
7bbec45b 14589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9aeb8aaa
GM
14590 (exit $ac_status); } && {
14591 test -z "$ac_c_werror_flag" ||
14592 test ! -s conftest.err
7bbec45b
CY
14593 } && test -s conftest$ac_exeext &&
14594 $as_test_x conftest$ac_exeext; then
63175cd2 14595 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa 14596else
7bbec45b 14597 echo "$as_me: failed program was:" >&5
9aeb8aaa
GM
14598sed 's/^/| /' conftest.$ac_ext >&5
14599
63175cd2 14600 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14601fi
14602
9aeb8aaa
GM
14603rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14604 conftest$ac_exeext conftest.$ac_ext
14605LIBS=$ac_check_lib_save_LIBS
14606fi
7bbec45b
CY
14607{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14608echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
b0448899 14609if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14610 HAVE_GIF=yes
98418dba
CW
14611fi
14612
c0d27fcc 14613
9aeb8aaa
GM
14614 if test "$HAVE_GIF" = yes; then
14615
14616cat >>confdefs.h <<\_ACEOF
63175cd2 14617#define LIBGIF -lungif
9aeb8aaa
GM
14618_ACEOF
14619
63175cd2 14620 ac_gif_lib_name="-lungif"
9aeb8aaa 14621 fi
98418dba
CW
14622 fi
14623
14624 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14625
c0d27fcc 14626cat >>confdefs.h <<\_ACEOF
98418dba 14627#define HAVE_GIF 1
c0d27fcc 14628_ACEOF
98418dba
CW
14629
14630 fi
14631fi
14632
5afbeb22
JD
14633if test "${HAVE_X11}" = "yes"; then
14634 MISSING=""
14635 WITH_NO=""
14636 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14637 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14638 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14639 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14640 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14641 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14642 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14643 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14644 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14645 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14646
14647 if test "X${MISSING}" != X; then
7bbec45b 14648 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14649 $MISSING
86e73516 14650Maybe some development libraries/packages are missing?
5afbeb22
JD
14651If you don't want to link with them give
14652 $WITH_NO
14653as options to configure" >&5
7bbec45b 14654echo "$as_me: error: The following required libraries were not found:
5afbeb22 14655 $MISSING
86e73516 14656Maybe some development libraries/packages are missing?
5afbeb22
JD
14657If you don't want to link with them give
14658 $WITH_NO
14659as options to configure" >&2;}
86e73516 14660 { (exit 1); exit 1; }; }
98418dba
CW
14661 fi
14662fi
14663
79011b82
NR
14664### Use -lgpm if available, unless `--with-gpm=no'.
14665HAVE_GPM=no
14666if test "${with_gpm}" != "no"; then
14667 if test "${ac_cv_header_gpm_h+set}" = set; then
7bbec45b
CY
14668 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14669echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
79011b82 14670if test "${ac_cv_header_gpm_h+set}" = set; then
7bbec45b 14671 echo $ECHO_N "(cached) $ECHO_C" >&6
79011b82 14672fi
7bbec45b
CY
14673{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14674echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
79011b82
NR
14675else
14676 # Is the header compilable?
7bbec45b
CY
14677{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14678echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
79011b82
NR
14679cat >conftest.$ac_ext <<_ACEOF
14680/* confdefs.h. */
14681_ACEOF
14682cat confdefs.h >>conftest.$ac_ext
14683cat >>conftest.$ac_ext <<_ACEOF
14684/* end confdefs.h. */
14685$ac_includes_default
14686#include <gpm.h>
14687_ACEOF
14688rm -f conftest.$ac_objext
14689if { (ac_try="$ac_compile"
14690case "(($ac_try" in
14691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14692 *) ac_try_echo=$ac_try;;
14693esac
7bbec45b 14694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79011b82
NR
14695 (eval "$ac_compile") 2>conftest.er1
14696 ac_status=$?
14697 grep -v '^ *+' conftest.er1 >conftest.err
14698 rm -f conftest.er1
14699 cat conftest.err >&5
7bbec45b 14700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79011b82
NR
14701 (exit $ac_status); } && {
14702 test -z "$ac_c_werror_flag" ||
14703 test ! -s conftest.err
14704 } && test -s conftest.$ac_objext; then
14705 ac_header_compiler=yes
14706else
7bbec45b 14707 echo "$as_me: failed program was:" >&5
79011b82
NR
14708sed 's/^/| /' conftest.$ac_ext >&5
14709
14710 ac_header_compiler=no
14711fi
14712
14713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
14714{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14715echo "${ECHO_T}$ac_header_compiler" >&6; }
79011b82
NR
14716
14717# Is the header present?
7bbec45b
CY
14718{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14719echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
79011b82
NR
14720cat >conftest.$ac_ext <<_ACEOF
14721/* confdefs.h. */
14722_ACEOF
14723cat confdefs.h >>conftest.$ac_ext
14724cat >>conftest.$ac_ext <<_ACEOF
14725/* end confdefs.h. */
14726#include <gpm.h>
14727_ACEOF
14728if { (ac_try="$ac_cpp conftest.$ac_ext"
14729case "(($ac_try" in
14730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14731 *) ac_try_echo=$ac_try;;
14732esac
7bbec45b 14733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79011b82
NR
14734 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14735 ac_status=$?
14736 grep -v '^ *+' conftest.er1 >conftest.err
14737 rm -f conftest.er1
14738 cat conftest.err >&5
7bbec45b 14739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79011b82
NR
14740 (exit $ac_status); } >/dev/null && {
14741 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14742 test ! -s conftest.err
14743 }; then
14744 ac_header_preproc=yes
14745else
7bbec45b 14746 echo "$as_me: failed program was:" >&5
79011b82
NR
14747sed 's/^/| /' conftest.$ac_ext >&5
14748
14749 ac_header_preproc=no
14750fi
14751
14752rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
14753{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14754echo "${ECHO_T}$ac_header_preproc" >&6; }
79011b82
NR
14755
14756# So? What about this header?
14757case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14758 yes:no: )
7bbec45b
CY
14759 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14760echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14761 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14762echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
79011b82
NR
14763 ac_header_preproc=yes
14764 ;;
14765 no:yes:* )
7bbec45b
CY
14766 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14767echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14768 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14769echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14770 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14771echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14772 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14773echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14774 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14775echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14776 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14777echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
79011b82
NR
14778
14779 ;;
14780esac
7bbec45b
CY
14781{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14782echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
79011b82 14783if test "${ac_cv_header_gpm_h+set}" = set; then
7bbec45b 14784 echo $ECHO_N "(cached) $ECHO_C" >&6
79011b82
NR
14785else
14786 ac_cv_header_gpm_h=$ac_header_preproc
14787fi
7bbec45b
CY
14788{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14789echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
79011b82
NR
14790
14791fi
b0448899 14792if test $ac_cv_header_gpm_h = yes; then
7bbec45b
CY
14793 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14794echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
79011b82 14795if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7bbec45b 14796 echo $ECHO_N "(cached) $ECHO_C" >&6
79011b82
NR
14797else
14798 ac_check_lib_save_LIBS=$LIBS
14799LIBS="-lgpm $LIBS"
14800cat >conftest.$ac_ext <<_ACEOF
14801/* confdefs.h. */
14802_ACEOF
14803cat confdefs.h >>conftest.$ac_ext
14804cat >>conftest.$ac_ext <<_ACEOF
14805/* end confdefs.h. */
14806
14807/* Override any GCC internal prototype to avoid an error.
14808 Use char because int might match the return type of a GCC
14809 builtin and then its argument prototype would still apply. */
14810#ifdef __cplusplus
14811extern "C"
14812#endif
14813char Gpm_Open ();
14814int
14815main ()
14816{
14817return Gpm_Open ();
14818 ;
14819 return 0;
14820}
14821_ACEOF
14822rm -f conftest.$ac_objext conftest$ac_exeext
14823if { (ac_try="$ac_link"
14824case "(($ac_try" in
14825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14826 *) ac_try_echo=$ac_try;;
14827esac
7bbec45b 14828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
79011b82
NR
14829 (eval "$ac_link") 2>conftest.er1
14830 ac_status=$?
14831 grep -v '^ *+' conftest.er1 >conftest.err
14832 rm -f conftest.er1
14833 cat conftest.err >&5
7bbec45b 14834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79011b82
NR
14835 (exit $ac_status); } && {
14836 test -z "$ac_c_werror_flag" ||
14837 test ! -s conftest.err
7bbec45b
CY
14838 } && test -s conftest$ac_exeext &&
14839 $as_test_x conftest$ac_exeext; then
79011b82
NR
14840 ac_cv_lib_gpm_Gpm_Open=yes
14841else
7bbec45b 14842 echo "$as_me: failed program was:" >&5
79011b82
NR
14843sed 's/^/| /' conftest.$ac_ext >&5
14844
14845 ac_cv_lib_gpm_Gpm_Open=no
14846fi
14847
14848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14849 conftest$ac_exeext conftest.$ac_ext
14850LIBS=$ac_check_lib_save_LIBS
14851fi
7bbec45b
CY
14852{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14853echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
b0448899 14854if test $ac_cv_lib_gpm_Gpm_Open = yes; then
79011b82
NR
14855 HAVE_GPM=yes
14856fi
14857
14858fi
14859
14860
14861fi
14862
14863if test "${HAVE_GPM}" = "yes"; then
14864
14865cat >>confdefs.h <<\_ACEOF
14866#define HAVE_GPM 1
14867_ACEOF
14868
14869fi
14870
cef11da2 14871if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
7bbec45b
CY
14872 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14873echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2 14874if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
7bbec45b 14875 echo $ECHO_N "(cached) $ECHO_C" >&6
cef11da2 14876fi
7bbec45b
CY
14877{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14878echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14879else
14880 # Is the header compilable?
7bbec45b
CY
14881{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14882echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14883cat >conftest.$ac_ext <<_ACEOF
14884/* confdefs.h. */
14885_ACEOF
14886cat confdefs.h >>conftest.$ac_ext
14887cat >>conftest.$ac_ext <<_ACEOF
14888/* end confdefs.h. */
14889$ac_includes_default
14890#include <malloc/malloc.h>
14891_ACEOF
14892rm -f conftest.$ac_objext
ca81d7a0
JD
14893if { (ac_try="$ac_compile"
14894case "(($ac_try" in
14895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14896 *) ac_try_echo=$ac_try;;
14897esac
7bbec45b 14898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14899 (eval "$ac_compile") 2>conftest.er1
cef11da2 14900 ac_status=$?
edfaf76d
LK
14901 grep -v '^ *+' conftest.er1 >conftest.err
14902 rm -f conftest.er1
14903 cat conftest.err >&5
7bbec45b 14904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14905 (exit $ac_status); } && {
14906 test -z "$ac_c_werror_flag" ||
14907 test ! -s conftest.err
14908 } && test -s conftest.$ac_objext; then
cef11da2
ST
14909 ac_header_compiler=yes
14910else
7bbec45b 14911 echo "$as_me: failed program was:" >&5
cef11da2
ST
14912sed 's/^/| /' conftest.$ac_ext >&5
14913
ca81d7a0 14914 ac_header_compiler=no
cef11da2 14915fi
ca81d7a0
JD
14916
14917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
14918{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14919echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14920
14921# Is the header present?
7bbec45b
CY
14922{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14923echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14924cat >conftest.$ac_ext <<_ACEOF
14925/* confdefs.h. */
14926_ACEOF
14927cat confdefs.h >>conftest.$ac_ext
14928cat >>conftest.$ac_ext <<_ACEOF
14929/* end confdefs.h. */
14930#include <malloc/malloc.h>
14931_ACEOF
ca81d7a0
JD
14932if { (ac_try="$ac_cpp conftest.$ac_ext"
14933case "(($ac_try" in
14934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14935 *) ac_try_echo=$ac_try;;
14936esac
7bbec45b 14937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 14938 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14939 ac_status=$?
14940 grep -v '^ *+' conftest.er1 >conftest.err
14941 rm -f conftest.er1
14942 cat conftest.err >&5
7bbec45b 14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14944 (exit $ac_status); } >/dev/null && {
14945 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14946 test ! -s conftest.err
14947 }; then
cef11da2
ST
14948 ac_header_preproc=yes
14949else
7bbec45b 14950 echo "$as_me: failed program was:" >&5
cef11da2
ST
14951sed 's/^/| /' conftest.$ac_ext >&5
14952
14953 ac_header_preproc=no
14954fi
ca81d7a0 14955
cef11da2 14956rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
14957{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14958echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14959
14960# So? What about this header?
edfaf76d
LK
14961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14962 yes:no: )
7bbec45b
CY
14963 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14964echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14965 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14966echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
edfaf76d 14967 ac_header_preproc=yes
cef11da2 14968 ;;
edfaf76d 14969 no:yes:* )
7bbec45b
CY
14970 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14971echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
14972 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14973echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14974 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14975echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14976 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14977echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
14978 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14979echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
14980 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14981echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14982
cef11da2
ST
14983 ;;
14984esac
7bbec45b
CY
14985{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14986echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2 14987if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
7bbec45b 14988 echo $ECHO_N "(cached) $ECHO_C" >&6
cef11da2
ST
14989else
14990 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14991fi
7bbec45b
CY
14992{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14993echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14994
7c9e5167 14995fi
b0448899 14996if test $ac_cv_header_malloc_malloc_h = yes; then
cef11da2
ST
14997
14998cat >>confdefs.h <<\_ACEOF
14999#define HAVE_MALLOC_MALLOC_H 1
15000_ACEOF
15001
7c9e5167
JD
15002fi
15003
cef11da2
ST
15004
15005
edfda783
AR
15006### Use NeXTstep API to implement GUI.
15007if test "${HAVE_NS}" = "yes"; then
15008
15009cat >>confdefs.h <<\_ACEOF
15010#define HAVE_NS 1
15011_ACEOF
15012
ff1095d1 15013 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
15014
15015cat >>confdefs.h <<\_ACEOF
15016#define NS_IMPL_COCOA 1
15017_ACEOF
15018
48fad8e8
DN
15019 GNU_OBJC_CFLAGS=
15020 LIB_SRC_EXTRA_INSTALLABLES=mac-fix-env
edfda783 15021 fi
ff1095d1 15022 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
15023
15024cat >>confdefs.h <<\_ACEOF
15025#define NS_IMPL_GNUSTEP 1
15026_ACEOF
15027
48fad8e8 15028 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 15029 fi
d5e2f8fe 15030 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
519c4a9a
CY
15031
15032cat >>confdefs.h <<\_ACEOF
d5e2f8fe 15033#define NS_HAVE_NSINTEGER 1
519c4a9a
CY
15034_ACEOF
15035
177cd151
CY
15036 fi
15037 # We also have mouse menus.
edfda783
AR
15038 HAVE_MENUS=yes
15039fi
15040
e0f712ba 15041
98418dba
CW
15042### Use session management (-lSM -lICE) if available
15043HAVE_X_SM=no
15044if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15045 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
7bbec45b
CY
15046 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15047echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba 15048if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
7bbec45b 15049 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15050fi
7bbec45b
CY
15051{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15052echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15053else
c0d27fcc 15054 # Is the header compilable?
7bbec45b
CY
15055{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15056echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15057cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15058/* confdefs.h. */
15059_ACEOF
15060cat confdefs.h >>conftest.$ac_ext
15061cat >>conftest.$ac_ext <<_ACEOF
15062/* end confdefs.h. */
c0d27fcc
MR
15063$ac_includes_default
15064#include <X11/SM/SMlib.h>
15065_ACEOF
15066rm -f conftest.$ac_objext
ca81d7a0
JD
15067if { (ac_try="$ac_compile"
15068case "(($ac_try" in
15069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15070 *) ac_try_echo=$ac_try;;
15071esac
7bbec45b 15072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15073 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15074 ac_status=$?
edfaf76d
LK
15075 grep -v '^ *+' conftest.er1 >conftest.err
15076 rm -f conftest.er1
15077 cat conftest.err >&5
7bbec45b 15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15079 (exit $ac_status); } && {
15080 test -z "$ac_c_werror_flag" ||
15081 test ! -s conftest.err
15082 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15083 ac_header_compiler=yes
15084else
7bbec45b 15085 echo "$as_me: failed program was:" >&5
19650fd6
AS
15086sed 's/^/| /' conftest.$ac_ext >&5
15087
ca81d7a0 15088 ac_header_compiler=no
c0d27fcc 15089fi
ca81d7a0
JD
15090
15091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
15092{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15093echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15094
15095# Is the header present?
7bbec45b
CY
15096{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15097echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15098cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15099/* confdefs.h. */
15100_ACEOF
15101cat confdefs.h >>conftest.$ac_ext
15102cat >>conftest.$ac_ext <<_ACEOF
15103/* end confdefs.h. */
98418dba
CW
15104#include <X11/SM/SMlib.h>
15105_ACEOF
ca81d7a0
JD
15106if { (ac_try="$ac_cpp conftest.$ac_ext"
15107case "(($ac_try" in
15108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15109 *) ac_try_echo=$ac_try;;
15110esac
7bbec45b 15111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15112 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15113 ac_status=$?
6bae0ccf 15114 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15115 rm -f conftest.er1
15116 cat conftest.err >&5
7bbec45b 15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15118 (exit $ac_status); } >/dev/null && {
15119 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15120 test ! -s conftest.err
15121 }; then
c0d27fcc 15122 ac_header_preproc=yes
98418dba 15123else
7bbec45b 15124 echo "$as_me: failed program was:" >&5
19650fd6
AS
15125sed 's/^/| /' conftest.$ac_ext >&5
15126
c0d27fcc 15127 ac_header_preproc=no
98418dba 15128fi
ca81d7a0 15129
98418dba 15130rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
15131{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15132echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15133
15134# So? What about this header?
edfaf76d
LK
15135case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15136 yes:no: )
7bbec45b
CY
15137 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15138echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15139 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15140echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
edfaf76d 15141 ac_header_preproc=yes
19650fd6 15142 ;;
edfaf76d 15143 no:yes:* )
7bbec45b
CY
15144 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15145echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
15146 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15147echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15148 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15149echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15150 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15151echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
15152 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
15153echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
15154 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15155echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15156
19650fd6 15157 ;;
c0d27fcc 15158esac
7bbec45b
CY
15159{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15160echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc 15161if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
7bbec45b 15162 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15163else
15164 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15165fi
7bbec45b
CY
15166{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15167echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15168
15169fi
b0448899 15170if test $ac_cv_header_X11_SM_SMlib_h = yes; then
7bbec45b
CY
15171 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15172echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15173if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
7bbec45b 15174 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15175else
503d2be0 15176 ac_check_lib_save_LIBS=$LIBS
1660500f 15177LIBS="-lSM -lICE $LIBS"
503d2be0 15178cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15179/* confdefs.h. */
15180_ACEOF
15181cat confdefs.h >>conftest.$ac_ext
15182cat >>conftest.$ac_ext <<_ACEOF
15183/* end confdefs.h. */
503d2be0 15184
ca81d7a0
JD
15185/* Override any GCC internal prototype to avoid an error.
15186 Use char because int might match the return type of a GCC
15187 builtin and then its argument prototype would still apply. */
503d2be0
AS
15188#ifdef __cplusplus
15189extern "C"
15190#endif
98418dba 15191char SmcOpenConnection ();
503d2be0
AS
15192int
15193main ()
15194{
ca81d7a0 15195return SmcOpenConnection ();
503d2be0
AS
15196 ;
15197 return 0;
15198}
15199_ACEOF
15200rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15201if { (ac_try="$ac_link"
15202case "(($ac_try" in
15203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15204 *) ac_try_echo=$ac_try;;
15205esac
7bbec45b 15206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15207 (eval "$ac_link") 2>conftest.er1
503d2be0 15208 ac_status=$?
edfaf76d
LK
15209 grep -v '^ *+' conftest.er1 >conftest.err
15210 rm -f conftest.er1
15211 cat conftest.err >&5
7bbec45b 15212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15213 (exit $ac_status); } && {
15214 test -z "$ac_c_werror_flag" ||
15215 test ! -s conftest.err
7bbec45b
CY
15216 } && test -s conftest$ac_exeext &&
15217 $as_test_x conftest$ac_exeext; then
98418dba 15218 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0 15219else
7bbec45b 15220 echo "$as_me: failed program was:" >&5
19650fd6
AS
15221sed 's/^/| /' conftest.$ac_ext >&5
15222
ca81d7a0 15223 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15224fi
ca81d7a0 15225
f053c89f 15226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15227 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15228LIBS=$ac_check_lib_save_LIBS
15229fi
7bbec45b
CY
15230{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15231echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
b0448899 15232if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
98418dba 15233 HAVE_X_SM=yes
73b77ee5
GM
15234fi
15235
73b77ee5 15236fi
73b77ee5 15237
c0d27fcc
MR
15238
15239
98418dba 15240 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15241
c0d27fcc 15242cat >>confdefs.h <<\_ACEOF
98418dba 15243#define HAVE_X_SM 1
c0d27fcc 15244_ACEOF
73b77ee5 15245
98418dba
CW
15246 case "$LIBS" in
15247 *-lSM*) ;;
15248 *) LIBS="-lSM -lICE $LIBS" ;;
15249 esac
73b77ee5 15250 fi
98418dba 15251fi
73b77ee5 15252
98418dba 15253# If netdb.h doesn't declare h_errno, we must declare it by hand.
7bbec45b
CY
15254{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15255echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba 15256if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
7bbec45b 15257 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15258else
15259 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15260/* confdefs.h. */
15261_ACEOF
15262cat confdefs.h >>conftest.$ac_ext
15263cat >>conftest.$ac_ext <<_ACEOF
15264/* end confdefs.h. */
98418dba 15265#include <netdb.h>
503d2be0
AS
15266int
15267main ()
15268{
98418dba 15269return h_errno;
503d2be0
AS
15270 ;
15271 return 0;
15272}
15273_ACEOF
15274rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15275if { (ac_try="$ac_link"
15276case "(($ac_try" in
15277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15278 *) ac_try_echo=$ac_try;;
15279esac
7bbec45b 15280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15281 (eval "$ac_link") 2>conftest.er1
503d2be0 15282 ac_status=$?
edfaf76d
LK
15283 grep -v '^ *+' conftest.er1 >conftest.err
15284 rm -f conftest.er1
15285 cat conftest.err >&5
7bbec45b 15286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15287 (exit $ac_status); } && {
15288 test -z "$ac_c_werror_flag" ||
15289 test ! -s conftest.err
7bbec45b
CY
15290 } && test -s conftest$ac_exeext &&
15291 $as_test_x conftest$ac_exeext; then
98418dba 15292 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15293else
7bbec45b 15294 echo "$as_me: failed program was:" >&5
19650fd6
AS
15295sed 's/^/| /' conftest.$ac_ext >&5
15296
ca81d7a0 15297 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15298fi
ca81d7a0 15299
f053c89f 15300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15301 conftest$ac_exeext conftest.$ac_ext
98418dba 15302fi
7bbec45b
CY
15303{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15304echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15305if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15306
c0d27fcc 15307cat >>confdefs.h <<\_ACEOF
98418dba 15308#define HAVE_H_ERRNO 1
c0d27fcc 15309_ACEOF
73b77ee5 15310
98418dba
CW
15311fi
15312
15313# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15314# for constant arguments. Useless!
7bbec45b
CY
15315{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15316echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba 15317if test "${ac_cv_working_alloca_h+set}" = set; then
7bbec45b 15318 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15319else
15320 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15321/* confdefs.h. */
15322_ACEOF
15323cat confdefs.h >>conftest.$ac_ext
15324cat >>conftest.$ac_ext <<_ACEOF
15325/* end confdefs.h. */
98418dba 15326#include <alloca.h>
503d2be0
AS
15327int
15328main ()
15329{
98418dba 15330char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15331 if (p) return 0;
503d2be0
AS
15332 ;
15333 return 0;
15334}
15335_ACEOF
15336rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15337if { (ac_try="$ac_link"
15338case "(($ac_try" in
15339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15340 *) ac_try_echo=$ac_try;;
15341esac
7bbec45b 15342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15343 (eval "$ac_link") 2>conftest.er1
503d2be0 15344 ac_status=$?
edfaf76d
LK
15345 grep -v '^ *+' conftest.er1 >conftest.err
15346 rm -f conftest.er1
15347 cat conftest.err >&5
7bbec45b 15348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15349 (exit $ac_status); } && {
15350 test -z "$ac_c_werror_flag" ||
15351 test ! -s conftest.err
7bbec45b
CY
15352 } && test -s conftest$ac_exeext &&
15353 $as_test_x conftest$ac_exeext; then
98418dba 15354 ac_cv_working_alloca_h=yes
73b77ee5 15355else
7bbec45b 15356 echo "$as_me: failed program was:" >&5
19650fd6
AS
15357sed 's/^/| /' conftest.$ac_ext >&5
15358
ca81d7a0 15359 ac_cv_working_alloca_h=no
73b77ee5 15360fi
ca81d7a0 15361
f053c89f 15362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15363 conftest$ac_exeext conftest.$ac_ext
98418dba 15364fi
7bbec45b
CY
15365{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15366echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15367if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15368
c0d27fcc 15369cat >>confdefs.h <<\_ACEOF
98418dba 15370#define HAVE_ALLOCA_H 1
c0d27fcc 15371_ACEOF
98418dba
CW
15372
15373fi
15374
7bbec45b
CY
15375{ echo "$as_me:$LINENO: checking for alloca" >&5
15376echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba 15377if test "${ac_cv_func_alloca_works+set}" = set; then
7bbec45b 15378 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 15379else
503d2be0 15380 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15381/* confdefs.h. */
15382_ACEOF
15383cat confdefs.h >>conftest.$ac_ext
15384cat >>conftest.$ac_ext <<_ACEOF
15385/* end confdefs.h. */
98418dba
CW
15386#ifdef __GNUC__
15387# define alloca __builtin_alloca
15388#else
15389# ifdef _MSC_VER
15390# include <malloc.h>
15391# define alloca _alloca
15392# else
f053c89f 15393# ifdef HAVE_ALLOCA_H
98418dba
CW
15394# include <alloca.h>
15395# else
15396# ifdef _AIX
15397 #pragma alloca
15398# else
15399# ifndef alloca /* predefined by HP cc +Olibcalls */
15400char *alloca ();
15401# endif
15402# endif
15403# endif
15404# endif
15405#endif
15406
503d2be0
AS
15407int
15408main ()
15409{
98418dba 15410char *p = (char *) alloca (1);
ca81d7a0 15411 if (p) return 0;
503d2be0
AS
15412 ;
15413 return 0;
15414}
15415_ACEOF
15416rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15417if { (ac_try="$ac_link"
15418case "(($ac_try" in
15419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15420 *) ac_try_echo=$ac_try;;
15421esac
7bbec45b 15422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15423 (eval "$ac_link") 2>conftest.er1
503d2be0 15424 ac_status=$?
edfaf76d
LK
15425 grep -v '^ *+' conftest.er1 >conftest.err
15426 rm -f conftest.er1
15427 cat conftest.err >&5
7bbec45b 15428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15429 (exit $ac_status); } && {
15430 test -z "$ac_c_werror_flag" ||
15431 test ! -s conftest.err
7bbec45b
CY
15432 } && test -s conftest$ac_exeext &&
15433 $as_test_x conftest$ac_exeext; then
98418dba 15434 ac_cv_func_alloca_works=yes
ac95a621 15435else
7bbec45b 15436 echo "$as_me: failed program was:" >&5
19650fd6
AS
15437sed 's/^/| /' conftest.$ac_ext >&5
15438
ca81d7a0 15439 ac_cv_func_alloca_works=no
ac95a621 15440fi
ca81d7a0 15441
f053c89f 15442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15443 conftest$ac_exeext conftest.$ac_ext
98418dba 15444fi
7bbec45b
CY
15445{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15446echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15447
98418dba
CW
15448if test $ac_cv_func_alloca_works = yes; then
15449
c0d27fcc 15450cat >>confdefs.h <<\_ACEOF
98418dba 15451#define HAVE_ALLOCA 1
c0d27fcc 15452_ACEOF
98418dba
CW
15453
15454else
15455 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15456# that cause trouble. Some versions do not even contain alloca or
15457# contain a buggy version. If you still want to use their alloca,
15458# use ar to extract alloca.o from them instead of compiling alloca.c.
15459
ca81d7a0 15460ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15461
c0d27fcc 15462cat >>confdefs.h <<\_ACEOF
98418dba 15463#define C_ALLOCA 1
c0d27fcc 15464_ACEOF
98418dba 15465
c0d27fcc 15466
7bbec45b
CY
15467{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15468echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba 15469if test "${ac_cv_os_cray+set}" = set; then
7bbec45b 15470 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15471else
15472 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15473/* confdefs.h. */
15474_ACEOF
15475cat confdefs.h >>conftest.$ac_ext
15476cat >>conftest.$ac_ext <<_ACEOF
15477/* end confdefs.h. */
ca81d7a0 15478#if defined CRAY && ! defined CRAY2
98418dba
CW
15479webecray
15480#else
15481wenotbecray
15482#endif
15483
15484_ACEOF
15485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15486 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15487 ac_cv_os_cray=yes
15488else
15489 ac_cv_os_cray=no
15490fi
15491rm -f conftest*
ac95a621 15492
98418dba 15493fi
7bbec45b
CY
15494{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15495echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15496if test $ac_cv_os_cray = yes; then
15497 for ac_func in _getb67 GETB67 getb67; do
7bbec45b
CY
15498 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15499{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 15501if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 15502 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15503else
503d2be0 15504 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
edfaf76d
LK
15510/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15511 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15512#define $ac_func innocuous_$ac_func
15513
73b77ee5 15514/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15515 which can conflict with char $ac_func (); below.
15516 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15517 <limits.h> exists even on freestanding compilers. */
edfaf76d 15518
19650fd6
AS
15519#ifdef __STDC__
15520# include <limits.h>
15521#else
15522# include <assert.h>
15523#endif
edfaf76d
LK
15524
15525#undef $ac_func
15526
ca81d7a0
JD
15527/* Override any GCC internal prototype to avoid an error.
15528 Use char because int might match the return type of a GCC
15529 builtin and then its argument prototype would still apply. */
503d2be0
AS
15530#ifdef __cplusplus
15531extern "C"
15532#endif
503d2be0 15533char $ac_func ();
73b77ee5
GM
15534/* The GNU C library defines this for functions which it implements
15535 to always fail with ENOSYS. Some functions are actually named
15536 something starting with __ and the normal name is an alias. */
ca81d7a0 15537#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15538choke me
73b77ee5
GM
15539#endif
15540
19650fd6
AS
15541int
15542main ()
15543{
ca81d7a0 15544return $ac_func ();
503d2be0
AS
15545 ;
15546 return 0;
15547}
15548_ACEOF
15549rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15550if { (ac_try="$ac_link"
15551case "(($ac_try" in
15552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15553 *) ac_try_echo=$ac_try;;
15554esac
7bbec45b 15555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15556 (eval "$ac_link") 2>conftest.er1
503d2be0 15557 ac_status=$?
edfaf76d
LK
15558 grep -v '^ *+' conftest.er1 >conftest.err
15559 rm -f conftest.er1
15560 cat conftest.err >&5
7bbec45b 15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15562 (exit $ac_status); } && {
15563 test -z "$ac_c_werror_flag" ||
15564 test ! -s conftest.err
7bbec45b
CY
15565 } && test -s conftest$ac_exeext &&
15566 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15567 eval "$as_ac_var=yes"
15568else
7bbec45b 15569 echo "$as_me: failed program was:" >&5
19650fd6
AS
15570sed 's/^/| /' conftest.$ac_ext >&5
15571
ca81d7a0 15572 eval "$as_ac_var=no"
503d2be0 15573fi
ca81d7a0 15574
f053c89f 15575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15576 conftest$ac_exeext conftest.$ac_ext
503d2be0 15577fi
7bbec45b
CY
15578ac_res=`eval echo '${'$as_ac_var'}'`
15579 { echo "$as_me:$LINENO: result: $ac_res" >&5
15580echo "${ECHO_T}$ac_res" >&6; }
15581if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15582
c0d27fcc 15583cat >>confdefs.h <<_ACEOF
98418dba 15584#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15585_ACEOF
98418dba
CW
15586
15587 break
73b77ee5 15588fi
73b77ee5 15589
98418dba 15590 done
73b77ee5
GM
15591fi
15592
7bbec45b
CY
15593{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15594echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15595if test "${ac_cv_c_stack_direction+set}" = set; then
7bbec45b 15596 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15597else
15598 if test "$cross_compiling" = yes; then
15599 ac_cv_c_stack_direction=0
73b77ee5 15600else
503d2be0 15601 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15602/* confdefs.h. */
15603_ACEOF
15604cat confdefs.h >>conftest.$ac_ext
15605cat >>conftest.$ac_ext <<_ACEOF
15606/* end confdefs.h. */
ca81d7a0 15607$ac_includes_default
503d2be0 15608int
98418dba 15609find_stack_direction ()
503d2be0 15610{
98418dba
CW
15611 static char *addr = 0;
15612 auto char dummy;
15613 if (addr == 0)
15614 {
15615 addr = &dummy;
15616 return find_stack_direction ();
15617 }
73b77ee5 15618 else
98418dba
CW
15619 return (&dummy > addr) ? 1 : -1;
15620}
ba4481b5 15621
503d2be0
AS
15622int
15623main ()
15624{
ca81d7a0 15625 return find_stack_direction () < 0;
503d2be0
AS
15626}
15627_ACEOF
98418dba 15628rm -f conftest$ac_exeext
ca81d7a0
JD
15629if { (ac_try="$ac_link"
15630case "(($ac_try" in
15631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15632 *) ac_try_echo=$ac_try;;
15633esac
7bbec45b 15634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15635 (eval "$ac_link") 2>&5
503d2be0 15636 ac_status=$?
7bbec45b 15637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15639 { (case "(($ac_try" in
15640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15641 *) ac_try_echo=$ac_try;;
15642esac
7bbec45b 15643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15644 (eval "$ac_try") 2>&5
503d2be0 15645 ac_status=$?
7bbec45b 15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15647 (exit $ac_status); }; }; then
98418dba 15648 ac_cv_c_stack_direction=1
ba4481b5 15649else
7bbec45b
CY
15650 echo "$as_me: program exited with status $ac_status" >&5
15651echo "$as_me: failed program was:" >&5
19650fd6
AS
15652sed 's/^/| /' conftest.$ac_ext >&5
15653
c0d27fcc 15654( exit $ac_status )
98418dba 15655ac_cv_c_stack_direction=-1
ba4481b5 15656fi
ca81d7a0 15657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15658fi
ca81d7a0
JD
15659
15660
98418dba 15661fi
7bbec45b
CY
15662{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15663echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15664
c0d27fcc 15665cat >>confdefs.h <<_ACEOF
98418dba 15666#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15667_ACEOF
15668
ba4481b5 15669
ba4481b5
DL
15670fi
15671
c0d27fcc 15672
611adb3e 15673if test x"$ac_cv_func_alloca_works" != xyes; then
7bbec45b
CY
15674 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15675echo "$as_me: error: a system implementation of alloca is required " >&2;}
611adb3e
GM
15676 { (exit 1); exit 1; }; }
15677fi
15678
98418dba
CW
15679# fmod, logb, and frexp are found in -lm on most systems.
15680# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15681
7bbec45b
CY
15682{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15683echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15684if test "${ac_cv_lib_m_sqrt+set}" = set; then
7bbec45b 15685 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15686else
98418dba
CW
15687 ac_check_lib_save_LIBS=$LIBS
15688LIBS="-lm $LIBS"
15689cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15690/* confdefs.h. */
15691_ACEOF
15692cat confdefs.h >>conftest.$ac_ext
15693cat >>conftest.$ac_ext <<_ACEOF
15694/* end confdefs.h. */
ba4481b5 15695
ca81d7a0
JD
15696/* Override any GCC internal prototype to avoid an error.
15697 Use char because int might match the return type of a GCC
15698 builtin and then its argument prototype would still apply. */
98418dba
CW
15699#ifdef __cplusplus
15700extern "C"
15701#endif
98418dba 15702char sqrt ();
503d2be0
AS
15703int
15704main ()
15705{
ca81d7a0 15706return sqrt ();
503d2be0
AS
15707 ;
15708 return 0;
15709}
15710_ACEOF
15711rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15712if { (ac_try="$ac_link"
15713case "(($ac_try" in
15714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15715 *) ac_try_echo=$ac_try;;
15716esac
7bbec45b 15717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15718 (eval "$ac_link") 2>conftest.er1
503d2be0 15719 ac_status=$?
edfaf76d
LK
15720 grep -v '^ *+' conftest.er1 >conftest.err
15721 rm -f conftest.er1
15722 cat conftest.err >&5
7bbec45b 15723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15724 (exit $ac_status); } && {
15725 test -z "$ac_c_werror_flag" ||
15726 test ! -s conftest.err
7bbec45b
CY
15727 } && test -s conftest$ac_exeext &&
15728 $as_test_x conftest$ac_exeext; then
98418dba 15729 ac_cv_lib_m_sqrt=yes
ba4481b5 15730else
7bbec45b 15731 echo "$as_me: failed program was:" >&5
19650fd6
AS
15732sed 's/^/| /' conftest.$ac_ext >&5
15733
ca81d7a0 15734 ac_cv_lib_m_sqrt=no
ba4481b5 15735fi
ca81d7a0 15736
f053c89f 15737rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15738 conftest$ac_exeext conftest.$ac_ext
98418dba 15739LIBS=$ac_check_lib_save_LIBS
ba4481b5 15740fi
7bbec45b
CY
15741{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15742echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
b0448899 15743if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15744 cat >>confdefs.h <<_ACEOF
98418dba 15745#define HAVE_LIBM 1
c0d27fcc 15746_ACEOF
98418dba
CW
15747
15748 LIBS="-lm $LIBS"
ba4481b5 15749
ba4481b5
DL
15750fi
15751
c0d27fcc 15752
55597d70
DL
15753# Check for mail-locking functions in a "mail" library. Probably this should
15754# have the same check as for liblockfile below.
98418dba 15755
7bbec45b
CY
15756{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15757echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15758if test "${ac_cv_lib_mail_maillock+set}" = set; then
7bbec45b 15759 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15760else
98418dba
CW
15761 ac_check_lib_save_LIBS=$LIBS
15762LIBS="-lmail $LIBS"
15763cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15764/* confdefs.h. */
15765_ACEOF
15766cat confdefs.h >>conftest.$ac_ext
15767cat >>conftest.$ac_ext <<_ACEOF
15768/* end confdefs.h. */
98418dba 15769
ca81d7a0
JD
15770/* Override any GCC internal prototype to avoid an error.
15771 Use char because int might match the return type of a GCC
15772 builtin and then its argument prototype would still apply. */
98418dba
CW
15773#ifdef __cplusplus
15774extern "C"
15775#endif
98418dba 15776char maillock ();
503d2be0
AS
15777int
15778main ()
15779{
ca81d7a0 15780return maillock ();
503d2be0
AS
15781 ;
15782 return 0;
15783}
15784_ACEOF
15785rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15786if { (ac_try="$ac_link"
15787case "(($ac_try" in
15788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15789 *) ac_try_echo=$ac_try;;
15790esac
7bbec45b 15791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15792 (eval "$ac_link") 2>conftest.er1
503d2be0 15793 ac_status=$?
edfaf76d
LK
15794 grep -v '^ *+' conftest.er1 >conftest.err
15795 rm -f conftest.er1
15796 cat conftest.err >&5
7bbec45b 15797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15798 (exit $ac_status); } && {
15799 test -z "$ac_c_werror_flag" ||
15800 test ! -s conftest.err
7bbec45b
CY
15801 } && test -s conftest$ac_exeext &&
15802 $as_test_x conftest$ac_exeext; then
98418dba 15803 ac_cv_lib_mail_maillock=yes
ba4481b5 15804else
7bbec45b 15805 echo "$as_me: failed program was:" >&5
19650fd6
AS
15806sed 's/^/| /' conftest.$ac_ext >&5
15807
ca81d7a0 15808 ac_cv_lib_mail_maillock=no
ba4481b5 15809fi
ca81d7a0 15810
f053c89f 15811rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15812 conftest$ac_exeext conftest.$ac_ext
98418dba 15813LIBS=$ac_check_lib_save_LIBS
ba4481b5 15814fi
7bbec45b
CY
15815{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15816echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
b0448899 15817if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15818 cat >>confdefs.h <<_ACEOF
98418dba 15819#define HAVE_LIBMAIL 1
c0d27fcc 15820_ACEOF
ba4481b5 15821
98418dba 15822 LIBS="-lmail $LIBS"
ba4481b5 15823
98418dba 15824fi
ba4481b5 15825
c0d27fcc 15826
7bbec45b
CY
15827{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15828echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15829if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
7bbec45b 15830 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15831else
503d2be0 15832 ac_check_lib_save_LIBS=$LIBS
98418dba 15833LIBS="-llockfile $LIBS"
503d2be0 15834cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
503d2be0 15840
ca81d7a0
JD
15841/* Override any GCC internal prototype to avoid an error.
15842 Use char because int might match the return type of a GCC
15843 builtin and then its argument prototype would still apply. */
503d2be0
AS
15844#ifdef __cplusplus
15845extern "C"
15846#endif
98418dba 15847char maillock ();
503d2be0
AS
15848int
15849main ()
15850{
ca81d7a0 15851return maillock ();
503d2be0
AS
15852 ;
15853 return 0;
15854}
15855_ACEOF
15856rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15857if { (ac_try="$ac_link"
15858case "(($ac_try" in
15859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15860 *) ac_try_echo=$ac_try;;
15861esac
7bbec45b 15862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 15863 (eval "$ac_link") 2>conftest.er1
503d2be0 15864 ac_status=$?
edfaf76d
LK
15865 grep -v '^ *+' conftest.er1 >conftest.err
15866 rm -f conftest.er1
15867 cat conftest.err >&5
7bbec45b 15868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15869 (exit $ac_status); } && {
15870 test -z "$ac_c_werror_flag" ||
15871 test ! -s conftest.err
7bbec45b
CY
15872 } && test -s conftest$ac_exeext &&
15873 $as_test_x conftest$ac_exeext; then
98418dba 15874 ac_cv_lib_lockfile_maillock=yes
503d2be0 15875else
7bbec45b 15876 echo "$as_me: failed program was:" >&5
19650fd6
AS
15877sed 's/^/| /' conftest.$ac_ext >&5
15878
ca81d7a0 15879 ac_cv_lib_lockfile_maillock=no
98418dba 15880fi
ca81d7a0 15881
f053c89f 15882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15883 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15884LIBS=$ac_check_lib_save_LIBS
15885fi
7bbec45b
CY
15886{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15887echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
b0448899 15888if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15889 cat >>confdefs.h <<_ACEOF
98418dba 15890#define HAVE_LIBLOCKFILE 1
c0d27fcc 15891_ACEOF
98418dba
CW
15892
15893 LIBS="-llockfile $LIBS"
15894
15895fi
15896
15897# If we have the shared liblockfile, assume we must use it for mail
15898# locking (e.g. Debian). If we couldn't link against liblockfile
15899# (no liblockfile.a installed), ensure that we don't need to.
15900if test "$ac_cv_lib_lockfile_maillock" = no; then
15901 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15902set dummy liblockfile.so; ac_word=$2
7bbec45b
CY
15903{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba 15905if test "${ac_cv_prog_liblockfile+set}" = set; then
7bbec45b 15906 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15907else
15908 if test -n "$liblockfile"; then
15909 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15910else
c0d27fcc 15911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15912as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15913for as_dir in $as_dummy
c0d27fcc
MR
15914do
15915 IFS=$as_save_IFS
15916 test -z "$as_dir" && as_dir=.
15917 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15918 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 15919 ac_cv_prog_liblockfile="yes"
7bbec45b 15920 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
15921 break 2
15922 fi
15923done
98418dba 15924done
ca81d7a0 15925IFS=$as_save_IFS
98418dba
CW
15926
15927 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15928fi
503d2be0 15929fi
98418dba
CW
15930liblockfile=$ac_cv_prog_liblockfile
15931if test -n "$liblockfile"; then
7bbec45b
CY
15932 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15933echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15934else
7bbec45b
CY
15935 { echo "$as_me:$LINENO: result: no" >&5
15936echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15937fi
15938
ca81d7a0 15939
98418dba 15940 if test $ac_cv_prog_liblockfile = yes; then
7bbec45b 15941 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15942This probably means that movemail could lose mail.
15943There may be a \`development' package to install containing liblockfile." >&5
7bbec45b 15944echo "$as_me: error: Shared liblockfile found but can't link against it.
98418dba
CW
15945This probably means that movemail could lose mail.
15946There may be a \`development' package to install containing liblockfile." >&2;}
15947 { (exit 1); exit 1; }; }
98418dba 15948 else :
55597d70 15949 fi
98418dba 15950fi
503d2be0 15951
98418dba
CW
15952for ac_func in touchlock
15953do
7bbec45b
CY
15954as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15955{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15956echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 15957if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 15958 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15959else
98418dba 15960 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15961/* confdefs.h. */
15962_ACEOF
15963cat confdefs.h >>conftest.$ac_ext
15964cat >>conftest.$ac_ext <<_ACEOF
15965/* end confdefs.h. */
edfaf76d
LK
15966/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15968#define $ac_func innocuous_$ac_func
15969
98418dba 15970/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15971 which can conflict with char $ac_func (); below.
15972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15973 <limits.h> exists even on freestanding compilers. */
edfaf76d 15974
19650fd6
AS
15975#ifdef __STDC__
15976# include <limits.h>
15977#else
15978# include <assert.h>
15979#endif
edfaf76d
LK
15980
15981#undef $ac_func
15982
ca81d7a0
JD
15983/* Override any GCC internal prototype to avoid an error.
15984 Use char because int might match the return type of a GCC
15985 builtin and then its argument prototype would still apply. */
503d2be0
AS
15986#ifdef __cplusplus
15987extern "C"
15988#endif
98418dba 15989char $ac_func ();
98418dba
CW
15990/* The GNU C library defines this for functions which it implements
15991 to always fail with ENOSYS. Some functions are actually named
15992 something starting with __ and the normal name is an alias. */
ca81d7a0 15993#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15994choke me
cd958eb3
MB
15995#endif
15996
19650fd6
AS
15997int
15998main ()
15999{
ca81d7a0 16000return $ac_func ();
503d2be0
AS
16001 ;
16002 return 0;
16003}
16004_ACEOF
16005rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16006if { (ac_try="$ac_link"
16007case "(($ac_try" in
16008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16009 *) ac_try_echo=$ac_try;;
16010esac
7bbec45b 16011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16012 (eval "$ac_link") 2>conftest.er1
503d2be0 16013 ac_status=$?
edfaf76d
LK
16014 grep -v '^ *+' conftest.er1 >conftest.err
16015 rm -f conftest.er1
16016 cat conftest.err >&5
7bbec45b 16017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16018 (exit $ac_status); } && {
16019 test -z "$ac_c_werror_flag" ||
16020 test ! -s conftest.err
7bbec45b
CY
16021 } && test -s conftest$ac_exeext &&
16022 $as_test_x conftest$ac_exeext; then
98418dba 16023 eval "$as_ac_var=yes"
503d2be0 16024else
7bbec45b 16025 echo "$as_me: failed program was:" >&5
19650fd6
AS
16026sed 's/^/| /' conftest.$ac_ext >&5
16027
ca81d7a0 16028 eval "$as_ac_var=no"
503d2be0 16029fi
ca81d7a0 16030
f053c89f 16031rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16032 conftest$ac_exeext conftest.$ac_ext
503d2be0 16033fi
7bbec45b
CY
16034ac_res=`eval echo '${'$as_ac_var'}'`
16035 { echo "$as_me:$LINENO: result: $ac_res" >&5
16036echo "${ECHO_T}$ac_res" >&6; }
16037if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16038 cat >>confdefs.h <<_ACEOF
7bbec45b 16039#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16040_ACEOF
457b792c 16041
457b792c 16042fi
98418dba 16043done
457b792c 16044
c0d27fcc 16045
98418dba
CW
16046for ac_header in maillock.h
16047do
7bbec45b 16048as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 16049if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
16050 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16051echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16052if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16053 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16054fi
7bbec45b
CY
16055ac_res=`eval echo '${'$as_ac_Header'}'`
16056 { echo "$as_me:$LINENO: result: $ac_res" >&5
16057echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16058else
c0d27fcc 16059 # Is the header compilable?
7bbec45b
CY
16060{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16061echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16062cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16063/* confdefs.h. */
16064_ACEOF
16065cat confdefs.h >>conftest.$ac_ext
16066cat >>conftest.$ac_ext <<_ACEOF
16067/* end confdefs.h. */
c0d27fcc
MR
16068$ac_includes_default
16069#include <$ac_header>
16070_ACEOF
16071rm -f conftest.$ac_objext
ca81d7a0
JD
16072if { (ac_try="$ac_compile"
16073case "(($ac_try" in
16074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16075 *) ac_try_echo=$ac_try;;
16076esac
7bbec45b 16077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16078 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16079 ac_status=$?
edfaf76d
LK
16080 grep -v '^ *+' conftest.er1 >conftest.err
16081 rm -f conftest.er1
16082 cat conftest.err >&5
7bbec45b 16083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16084 (exit $ac_status); } && {
16085 test -z "$ac_c_werror_flag" ||
16086 test ! -s conftest.err
16087 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16088 ac_header_compiler=yes
16089else
7bbec45b 16090 echo "$as_me: failed program was:" >&5
19650fd6
AS
16091sed 's/^/| /' conftest.$ac_ext >&5
16092
ca81d7a0 16093 ac_header_compiler=no
c0d27fcc 16094fi
ca81d7a0
JD
16095
16096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
16097{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16098echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16099
16100# Is the header present?
7bbec45b
CY
16101{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16102echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16103cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16104/* confdefs.h. */
16105_ACEOF
16106cat confdefs.h >>conftest.$ac_ext
16107cat >>conftest.$ac_ext <<_ACEOF
16108/* end confdefs.h. */
98418dba 16109#include <$ac_header>
503d2be0 16110_ACEOF
ca81d7a0
JD
16111if { (ac_try="$ac_cpp conftest.$ac_ext"
16112case "(($ac_try" in
16113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16114 *) ac_try_echo=$ac_try;;
16115esac
7bbec45b 16116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16117 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16118 ac_status=$?
6bae0ccf 16119 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16120 rm -f conftest.er1
16121 cat conftest.err >&5
7bbec45b 16122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16123 (exit $ac_status); } >/dev/null && {
16124 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16125 test ! -s conftest.err
16126 }; then
c0d27fcc 16127 ac_header_preproc=yes
98418dba 16128else
7bbec45b 16129 echo "$as_me: failed program was:" >&5
19650fd6
AS
16130sed 's/^/| /' conftest.$ac_ext >&5
16131
c0d27fcc 16132 ac_header_preproc=no
503d2be0 16133fi
ca81d7a0 16134
98418dba 16135rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
16136{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16137echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16138
16139# So? What about this header?
edfaf76d
LK
16140case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16141 yes:no: )
7bbec45b
CY
16142 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16143echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16144 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16145echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 16146 ac_header_preproc=yes
19650fd6 16147 ;;
edfaf76d 16148 no:yes:* )
7bbec45b
CY
16149 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16150echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16151 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16152echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16153 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16154echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16155 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16156echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
16157 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16158echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16159 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16160echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16161
19650fd6 16162 ;;
c0d27fcc 16163esac
7bbec45b
CY
16164{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16165echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16166if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16167 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16168else
edfaf76d 16169 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16170fi
7bbec45b
CY
16171ac_res=`eval echo '${'$as_ac_Header'}'`
16172 { echo "$as_me:$LINENO: result: $ac_res" >&5
16173echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16174
16175fi
7bbec45b 16176if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16177 cat >>confdefs.h <<_ACEOF
7bbec45b 16178#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16179_ACEOF
48d4b120 16180
ba4481b5 16181fi
c0d27fcc 16182
98418dba
CW
16183done
16184
c0d27fcc
MR
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
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
22044edf
DL
16240
16241
c0d27fcc 16242
b0e44248
RB
16243
16244
973a76b1
DL
16245
16246
16247
cd958eb3 16248
25ca0bca 16249
ea92fc9f 16250
2d3c36ae
SM
16251
16252
e2fcf543 16253
5acf240e 16254
c0d27fcc
MR
16255
16256
98418dba 16257for ac_func in gethostname getdomainname dup2 \
e2fcf543 16258rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16259random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16260strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5acf240e 16261utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16262__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16263sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16264gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16265memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16266cfmakeraw cfsetspeed
98418dba 16267do
7bbec45b
CY
16268as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16269{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16270echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 16271if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16272 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16273else
503d2be0 16274 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16275/* confdefs.h. */
16276_ACEOF
16277cat confdefs.h >>conftest.$ac_ext
16278cat >>conftest.$ac_ext <<_ACEOF
16279/* end confdefs.h. */
edfaf76d
LK
16280/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16281 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16282#define $ac_func innocuous_$ac_func
16283
98418dba 16284/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16285 which can conflict with char $ac_func (); below.
16286 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16287 <limits.h> exists even on freestanding compilers. */
edfaf76d 16288
19650fd6
AS
16289#ifdef __STDC__
16290# include <limits.h>
16291#else
16292# include <assert.h>
16293#endif
edfaf76d
LK
16294
16295#undef $ac_func
16296
ca81d7a0
JD
16297/* Override any GCC internal prototype to avoid an error.
16298 Use char because int might match the return type of a GCC
16299 builtin and then its argument prototype would still apply. */
503d2be0
AS
16300#ifdef __cplusplus
16301extern "C"
16302#endif
98418dba 16303char $ac_func ();
98418dba
CW
16304/* The GNU C library defines this for functions which it implements
16305 to always fail with ENOSYS. Some functions are actually named
16306 something starting with __ and the normal name is an alias. */
ca81d7a0 16307#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16308choke me
98418dba
CW
16309#endif
16310
19650fd6
AS
16311int
16312main ()
16313{
ca81d7a0 16314return $ac_func ();
503d2be0
AS
16315 ;
16316 return 0;
16317}
16318_ACEOF
16319rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16320if { (ac_try="$ac_link"
16321case "(($ac_try" in
16322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16323 *) ac_try_echo=$ac_try;;
16324esac
7bbec45b 16325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16326 (eval "$ac_link") 2>conftest.er1
503d2be0 16327 ac_status=$?
edfaf76d
LK
16328 grep -v '^ *+' conftest.er1 >conftest.err
16329 rm -f conftest.er1
16330 cat conftest.err >&5
7bbec45b 16331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16332 (exit $ac_status); } && {
16333 test -z "$ac_c_werror_flag" ||
16334 test ! -s conftest.err
7bbec45b
CY
16335 } && test -s conftest$ac_exeext &&
16336 $as_test_x conftest$ac_exeext; then
98418dba 16337 eval "$as_ac_var=yes"
503d2be0 16338else
7bbec45b 16339 echo "$as_me: failed program was:" >&5
19650fd6
AS
16340sed 's/^/| /' conftest.$ac_ext >&5
16341
ca81d7a0 16342 eval "$as_ac_var=no"
503d2be0 16343fi
ca81d7a0 16344
f053c89f 16345rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16346 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16347fi
7bbec45b
CY
16348ac_res=`eval echo '${'$as_ac_var'}'`
16349 { echo "$as_me:$LINENO: result: $ac_res" >&5
16350echo "${ECHO_T}$ac_res" >&6; }
16351if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16352 cat >>confdefs.h <<_ACEOF
7bbec45b 16353#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16354_ACEOF
ba4481b5 16355
ba4481b5 16356fi
98418dba 16357done
ba4481b5 16358
c0d27fcc
MR
16359
16360
98418dba
CW
16361for ac_header in sys/un.h
16362do
7bbec45b 16363as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 16364if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
16365 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16368 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16369fi
7bbec45b
CY
16370ac_res=`eval echo '${'$as_ac_Header'}'`
16371 { echo "$as_me:$LINENO: result: $ac_res" >&5
16372echo "${ECHO_T}$ac_res" >&6; }
98418dba 16373else
c0d27fcc 16374 # Is the header compilable?
7bbec45b
CY
16375{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16376echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16377cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16378/* confdefs.h. */
16379_ACEOF
16380cat confdefs.h >>conftest.$ac_ext
16381cat >>conftest.$ac_ext <<_ACEOF
16382/* end confdefs.h. */
c0d27fcc
MR
16383$ac_includes_default
16384#include <$ac_header>
16385_ACEOF
16386rm -f conftest.$ac_objext
ca81d7a0
JD
16387if { (ac_try="$ac_compile"
16388case "(($ac_try" in
16389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16390 *) ac_try_echo=$ac_try;;
16391esac
7bbec45b 16392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16393 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16394 ac_status=$?
edfaf76d
LK
16395 grep -v '^ *+' conftest.er1 >conftest.err
16396 rm -f conftest.er1
16397 cat conftest.err >&5
7bbec45b 16398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16399 (exit $ac_status); } && {
16400 test -z "$ac_c_werror_flag" ||
16401 test ! -s conftest.err
16402 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16403 ac_header_compiler=yes
16404else
7bbec45b 16405 echo "$as_me: failed program was:" >&5
19650fd6
AS
16406sed 's/^/| /' conftest.$ac_ext >&5
16407
ca81d7a0 16408 ac_header_compiler=no
c0d27fcc 16409fi
ca81d7a0
JD
16410
16411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
16412{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16413echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16414
16415# Is the header present?
7bbec45b
CY
16416{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16417echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16418cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16419/* confdefs.h. */
16420_ACEOF
16421cat confdefs.h >>conftest.$ac_ext
16422cat >>conftest.$ac_ext <<_ACEOF
16423/* end confdefs.h. */
98418dba 16424#include <$ac_header>
503d2be0 16425_ACEOF
ca81d7a0
JD
16426if { (ac_try="$ac_cpp conftest.$ac_ext"
16427case "(($ac_try" in
16428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16429 *) ac_try_echo=$ac_try;;
16430esac
7bbec45b 16431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16432 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16433 ac_status=$?
6bae0ccf 16434 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16435 rm -f conftest.er1
16436 cat conftest.err >&5
7bbec45b 16437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16438 (exit $ac_status); } >/dev/null && {
16439 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16440 test ! -s conftest.err
16441 }; then
c0d27fcc 16442 ac_header_preproc=yes
ba4481b5 16443else
7bbec45b 16444 echo "$as_me: failed program was:" >&5
19650fd6
AS
16445sed 's/^/| /' conftest.$ac_ext >&5
16446
c0d27fcc 16447 ac_header_preproc=no
ba4481b5 16448fi
ca81d7a0 16449
503d2be0 16450rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
16451{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16452echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16453
16454# So? What about this header?
edfaf76d
LK
16455case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16456 yes:no: )
7bbec45b
CY
16457 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16458echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16459 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16460echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 16461 ac_header_preproc=yes
19650fd6 16462 ;;
edfaf76d 16463 no:yes:* )
7bbec45b
CY
16464 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16465echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16466 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16467echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16468 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16469echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16470 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16471echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
16472 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16473echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16474 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16475echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16476
19650fd6 16477 ;;
c0d27fcc 16478esac
7bbec45b
CY
16479{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16480echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16481if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16482 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16483else
edfaf76d 16484 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16485fi
7bbec45b
CY
16486ac_res=`eval echo '${'$as_ac_Header'}'`
16487 { echo "$as_me:$LINENO: result: $ac_res" >&5
16488echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16489
16490fi
7bbec45b 16491if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16492 cat >>confdefs.h <<_ACEOF
7bbec45b 16493#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16494_ACEOF
503d2be0 16495
925c2f3f 16496fi
c0d27fcc 16497
925c2f3f
EZ
16498done
16499
c0d27fcc
MR
16500
16501
16502
edfaf76d 16503
f053c89f
CY
16504
16505for ac_header in $ac_header_list
925c2f3f 16506do
7bbec45b 16507as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 16508if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
16509 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16510echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16511if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16512 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16513fi
7bbec45b
CY
16514ac_res=`eval echo '${'$as_ac_Header'}'`
16515 { echo "$as_me:$LINENO: result: $ac_res" >&5
16516echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16517else
c0d27fcc 16518 # Is the header compilable?
7bbec45b
CY
16519{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16520echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16521cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16522/* confdefs.h. */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h. */
c0d27fcc
MR
16527$ac_includes_default
16528#include <$ac_header>
16529_ACEOF
16530rm -f conftest.$ac_objext
ca81d7a0
JD
16531if { (ac_try="$ac_compile"
16532case "(($ac_try" in
16533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16534 *) ac_try_echo=$ac_try;;
16535esac
7bbec45b 16536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16537 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16538 ac_status=$?
edfaf76d
LK
16539 grep -v '^ *+' conftest.er1 >conftest.err
16540 rm -f conftest.er1
16541 cat conftest.err >&5
7bbec45b 16542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16543 (exit $ac_status); } && {
16544 test -z "$ac_c_werror_flag" ||
16545 test ! -s conftest.err
16546 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16547 ac_header_compiler=yes
16548else
7bbec45b 16549 echo "$as_me: failed program was:" >&5
19650fd6
AS
16550sed 's/^/| /' conftest.$ac_ext >&5
16551
ca81d7a0 16552 ac_header_compiler=no
c0d27fcc 16553fi
ca81d7a0
JD
16554
16555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
16556{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16557echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16558
16559# Is the header present?
7bbec45b
CY
16560{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16561echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16562cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16563/* confdefs.h. */
16564_ACEOF
16565cat confdefs.h >>conftest.$ac_ext
16566cat >>conftest.$ac_ext <<_ACEOF
16567/* end confdefs.h. */
98418dba 16568#include <$ac_header>
503d2be0 16569_ACEOF
ca81d7a0
JD
16570if { (ac_try="$ac_cpp conftest.$ac_ext"
16571case "(($ac_try" in
16572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16573 *) ac_try_echo=$ac_try;;
16574esac
7bbec45b 16575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16576 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16577 ac_status=$?
6bae0ccf 16578 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16579 rm -f conftest.er1
16580 cat conftest.err >&5
7bbec45b 16581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16582 (exit $ac_status); } >/dev/null && {
16583 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16584 test ! -s conftest.err
16585 }; then
c0d27fcc 16586 ac_header_preproc=yes
98418dba 16587else
7bbec45b 16588 echo "$as_me: failed program was:" >&5
19650fd6
AS
16589sed 's/^/| /' conftest.$ac_ext >&5
16590
c0d27fcc 16591 ac_header_preproc=no
98418dba 16592fi
ca81d7a0 16593
98418dba 16594rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
16595{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16596echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16597
16598# So? What about this header?
edfaf76d
LK
16599case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16600 yes:no: )
7bbec45b
CY
16601 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16602echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16603 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16604echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 16605 ac_header_preproc=yes
19650fd6 16606 ;;
edfaf76d 16607 no:yes:* )
7bbec45b
CY
16608 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16609echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16610 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16611echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16612 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16613echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16614 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16615echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
16616 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16617echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16618 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16619echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16620
19650fd6 16621 ;;
c0d27fcc 16622esac
7bbec45b
CY
16623{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16624echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 16625if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16626 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16627else
edfaf76d 16628 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16629fi
7bbec45b
CY
16630ac_res=`eval echo '${'$as_ac_Header'}'`
16631 { echo "$as_me:$LINENO: result: $ac_res" >&5
16632echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16633
16634fi
7bbec45b 16635if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16636 cat >>confdefs.h <<_ACEOF
7bbec45b 16637#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16638_ACEOF
98418dba
CW
16639
16640fi
c0d27fcc 16641
98418dba
CW
16642done
16643
c0d27fcc 16644
f053c89f
CY
16645
16646
16647
16648
16649
16650
16651
16652for ac_func in $ac_func_list
98418dba 16653do
7bbec45b
CY
16654as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16655{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16656echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 16657if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 16658 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16659else
98418dba 16660 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16661/* confdefs.h. */
16662_ACEOF
16663cat confdefs.h >>conftest.$ac_ext
16664cat >>conftest.$ac_ext <<_ACEOF
16665/* end confdefs.h. */
edfaf76d
LK
16666/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16667 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16668#define $ac_func innocuous_$ac_func
16669
98418dba 16670/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16671 which can conflict with char $ac_func (); below.
16672 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16673 <limits.h> exists even on freestanding compilers. */
edfaf76d 16674
19650fd6
AS
16675#ifdef __STDC__
16676# include <limits.h>
16677#else
16678# include <assert.h>
16679#endif
edfaf76d
LK
16680
16681#undef $ac_func
16682
ca81d7a0
JD
16683/* Override any GCC internal prototype to avoid an error.
16684 Use char because int might match the return type of a GCC
16685 builtin and then its argument prototype would still apply. */
503d2be0
AS
16686#ifdef __cplusplus
16687extern "C"
16688#endif
98418dba 16689char $ac_func ();
98418dba
CW
16690/* The GNU C library defines this for functions which it implements
16691 to always fail with ENOSYS. Some functions are actually named
16692 something starting with __ and the normal name is an alias. */
ca81d7a0 16693#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16694choke me
98418dba
CW
16695#endif
16696
19650fd6
AS
16697int
16698main ()
16699{
ca81d7a0 16700return $ac_func ();
503d2be0
AS
16701 ;
16702 return 0;
16703}
16704_ACEOF
16705rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16706if { (ac_try="$ac_link"
16707case "(($ac_try" in
16708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16709 *) ac_try_echo=$ac_try;;
16710esac
7bbec45b 16711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16712 (eval "$ac_link") 2>conftest.er1
503d2be0 16713 ac_status=$?
edfaf76d
LK
16714 grep -v '^ *+' conftest.er1 >conftest.err
16715 rm -f conftest.er1
16716 cat conftest.err >&5
7bbec45b 16717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16718 (exit $ac_status); } && {
16719 test -z "$ac_c_werror_flag" ||
16720 test ! -s conftest.err
7bbec45b
CY
16721 } && test -s conftest$ac_exeext &&
16722 $as_test_x conftest$ac_exeext; then
98418dba 16723 eval "$as_ac_var=yes"
503d2be0 16724else
7bbec45b 16725 echo "$as_me: failed program was:" >&5
19650fd6
AS
16726sed 's/^/| /' conftest.$ac_ext >&5
16727
ca81d7a0 16728 eval "$as_ac_var=no"
503d2be0 16729fi
ca81d7a0 16730
f053c89f 16731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16732 conftest$ac_exeext conftest.$ac_ext
ffe36136 16733fi
7bbec45b
CY
16734ac_res=`eval echo '${'$as_ac_var'}'`
16735 { echo "$as_me:$LINENO: result: $ac_res" >&5
16736echo "${ECHO_T}$ac_res" >&6; }
16737if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16738 cat >>confdefs.h <<_ACEOF
7bbec45b 16739#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16740_ACEOF
ffe36136 16741
ba4481b5 16742fi
98418dba 16743done
ba4481b5 16744
f053c89f
CY
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
7bbec45b
CY
16761{ echo "$as_me:$LINENO: checking for working mktime" >&5
16762echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba 16763if test "${ac_cv_func_working_mktime+set}" = set; then
7bbec45b 16764 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
16765else
16766 if test "$cross_compiling" = yes; then
16767 ac_cv_func_working_mktime=no
16768else
16769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16770/* confdefs.h. */
16771_ACEOF
16772cat confdefs.h >>conftest.$ac_ext
16773cat >>conftest.$ac_ext <<_ACEOF
16774/* end confdefs.h. */
98418dba 16775/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16776#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16777# include <sys/time.h>
16778# include <time.h>
16779#else
f053c89f 16780# ifdef HAVE_SYS_TIME_H
98418dba
CW
16781# include <sys/time.h>
16782# else
16783# include <time.h>
16784# endif
16785#endif
ba4481b5 16786
1e0093ea 16787#include <limits.h>
f053c89f 16788#include <stdlib.h>
edfaf76d 16789
f053c89f 16790#ifdef HAVE_UNISTD_H
98418dba
CW
16791# include <unistd.h>
16792#endif
ba4481b5 16793
f053c89f 16794#ifndef HAVE_ALARM
98418dba
CW
16795# define alarm(X) /* empty */
16796#endif
df645f7c 16797
98418dba
CW
16798/* Work around redefinition to rpl_putenv by other config tests. */
16799#undef putenv
df645f7c 16800
98418dba 16801static time_t time_t_max;
edfaf76d 16802static time_t time_t_min;
df645f7c 16803
98418dba 16804/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16805static char *tz_strings[] = {
16806 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16807 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16808};
16809#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16810
ca81d7a0 16811/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16812 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16813static int
98418dba
CW
16814spring_forward_gap ()
16815{
16816 /* glibc (up to about 1998-10-07) failed this test. */
16817 struct tm tm;
16818
16819 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16820 instead of "TZ=America/Vancouver" in order to detect the bug even
16821 on systems that don't support the Olson extension, or don't have the
16822 full zoneinfo tables installed. */
16823 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16824
16825 tm.tm_year = 98;
16826 tm.tm_mon = 3;
16827 tm.tm_mday = 5;
16828 tm.tm_hour = 2;
16829 tm.tm_min = 0;
16830 tm.tm_sec = 0;
16831 tm.tm_isdst = -1;
ca81d7a0 16832 return mktime (&tm) != (time_t) -1;
98418dba
CW
16833}
16834
ca81d7a0 16835static int
edfaf76d 16836mktime_test1 (now)
98418dba
CW
16837 time_t now;
16838{
16839 struct tm *lt;
ca81d7a0 16840 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16841}
16842
ca81d7a0 16843static int
edfaf76d
LK
16844mktime_test (now)
16845 time_t now;
16846{
ca81d7a0
JD
16847 return (mktime_test1 (now)
16848 && mktime_test1 ((time_t) (time_t_max - now))
16849 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16850}
16851
ca81d7a0 16852static int
98418dba
CW
16853irix_6_4_bug ()
16854{
16855 /* Based on code from Ariel Faigon. */
16856 struct tm tm;
16857 tm.tm_year = 96;
16858 tm.tm_mon = 3;
16859 tm.tm_mday = 0;
16860 tm.tm_hour = 0;
16861 tm.tm_min = 0;
16862 tm.tm_sec = 0;
16863 tm.tm_isdst = -1;
16864 mktime (&tm);
ca81d7a0 16865 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16866}
16867
ca81d7a0 16868static int
98418dba
CW
16869bigtime_test (j)
16870 int j;
16871{
16872 struct tm tm;
16873 time_t now;
16874 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16875 now = mktime (&tm);
16876 if (now != (time_t) -1)
16877 {
16878 struct tm *lt = localtime (&now);
16879 if (! (lt
16880 && lt->tm_year == tm.tm_year
16881 && lt->tm_mon == tm.tm_mon
16882 && lt->tm_mday == tm.tm_mday
16883 && lt->tm_hour == tm.tm_hour
16884 && lt->tm_min == tm.tm_min
16885 && lt->tm_sec == tm.tm_sec
16886 && lt->tm_yday == tm.tm_yday
16887 && lt->tm_wday == tm.tm_wday
16888 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16889 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16890 return 0;
98418dba 16891 }
ca81d7a0 16892 return 1;
98418dba
CW
16893}
16894
f053c89f
CY
16895static int
16896year_2050_test ()
16897{
16898 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16899 ignoring leap seconds. */
16900 unsigned long int answer = 2527315200UL;
16901
16902 struct tm tm;
16903 time_t t;
16904 tm.tm_year = 2050 - 1900;
16905 tm.tm_mon = 2 - 1;
16906 tm.tm_mday = 1;
16907 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16908 tm.tm_isdst = -1;
16909
16910 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16911 instead of "TZ=America/Vancouver" in order to detect the bug even
16912 on systems that don't support the Olson extension, or don't have the
16913 full zoneinfo tables installed. */
16914 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16915
16916 t = mktime (&tm);
16917
16918 /* Check that the result is either a failure, or close enough
16919 to the correct answer that we can assume the discrepancy is
16920 due to leap seconds. */
16921 return (t == (time_t) -1
16922 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16923}
16924
16925int
16926main ()
16927{
16928 time_t t, delta;
16929 int i, j;
16930
16931 /* This test makes some buggy mktime implementations loop.
16932 Give up after 60 seconds; a mktime slower than that
16933 isn't worth using anyway. */
16934 alarm (60);
16935
1e0093ea
MB
16936 for (;;)
16937 {
16938 t = (time_t_max << 1) + 1;
16939 if (t <= time_t_max)
16940 break;
16941 time_t_max = t;
16942 }
16943 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
16944
98418dba
CW
16945 delta = time_t_max / 997; /* a suitable prime number */
16946 for (i = 0; i < N_STRINGS; i++)
16947 {
16948 if (tz_strings[i])
16949 putenv (tz_strings[i]);
503d2be0 16950
98418dba 16951 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16952 if (! mktime_test (t))
16953 return 1;
16954 if (! (mktime_test ((time_t) 1)
16955 && mktime_test ((time_t) (60 * 60))
16956 && mktime_test ((time_t) (60 * 60 * 24))))
16957 return 1;
98418dba 16958
1e0093ea 16959 for (j = 1; ; j <<= 1)
ca81d7a0
JD
16960 if (! bigtime_test (j))
16961 return 1;
1e0093ea
MB
16962 else if (INT_MAX / 2 < j)
16963 break;
16964 if (! bigtime_test (INT_MAX))
ca81d7a0 16965 return 1;
98418dba 16966 }
f053c89f 16967 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16968}
16969_ACEOF
98418dba 16970rm -f conftest$ac_exeext
ca81d7a0
JD
16971if { (ac_try="$ac_link"
16972case "(($ac_try" in
16973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16974 *) ac_try_echo=$ac_try;;
16975esac
7bbec45b 16976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16977 (eval "$ac_link") 2>&5
503d2be0 16978 ac_status=$?
7bbec45b 16979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16981 { (case "(($ac_try" in
16982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16983 *) ac_try_echo=$ac_try;;
16984esac
7bbec45b 16985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 16986 (eval "$ac_try") 2>&5
503d2be0 16987 ac_status=$?
7bbec45b 16988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16989 (exit $ac_status); }; }; then
98418dba 16990 ac_cv_func_working_mktime=yes
503d2be0 16991else
7bbec45b
CY
16992 echo "$as_me: program exited with status $ac_status" >&5
16993echo "$as_me: failed program was:" >&5
19650fd6
AS
16994sed 's/^/| /' conftest.$ac_ext >&5
16995
c0d27fcc 16996( exit $ac_status )
98418dba 16997ac_cv_func_working_mktime=no
503d2be0 16998fi
ca81d7a0 16999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 17000fi
ca81d7a0
JD
17001
17002
ba4481b5 17003fi
7bbec45b
CY
17004{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
17005echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 17006if test $ac_cv_func_working_mktime = no; then
ca81d7a0 17007 case " $LIBOBJS " in
edfaf76d 17008 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
17009 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
17010 ;;
edfaf76d
LK
17011esac
17012
ba4481b5
DL
17013fi
17014
98418dba 17015if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17016
c0d27fcc 17017cat >>confdefs.h <<\_ACEOF
98418dba 17018#define BROKEN_MKTIME 1
c0d27fcc 17019_ACEOF
ba4481b5 17020
ba4481b5 17021fi
503d2be0 17022
98418dba
CW
17023ac_have_func=no # yes means we've found a way to get the load average.
17024
6bae0ccf
DL
17025# Make sure getloadavg.c is where it belongs, at configure-time.
17026test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
7bbec45b
CY
17027 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17028echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
6bae0ccf
DL
17029 { (exit 1); exit 1; }; }
17030
98418dba
CW
17031ac_save_LIBS=$LIBS
17032
17033# Check for getloadavg, but be sure not to touch the cache variable.
7bbec45b
CY
17034({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17035echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17036if test "${ac_cv_func_getloadavg+set}" = set; then
7bbec45b 17037 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17038else
503d2be0 17039 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17040/* confdefs.h. */
17041_ACEOF
17042cat confdefs.h >>conftest.$ac_ext
17043cat >>conftest.$ac_ext <<_ACEOF
17044/* end confdefs.h. */
edfaf76d
LK
17045/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17046 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17047#define getloadavg innocuous_getloadavg
17048
98418dba 17049/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17050 which can conflict with char getloadavg (); below.
17051 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17052 <limits.h> exists even on freestanding compilers. */
edfaf76d 17053
19650fd6
AS
17054#ifdef __STDC__
17055# include <limits.h>
17056#else
17057# include <assert.h>
17058#endif
edfaf76d
LK
17059
17060#undef getloadavg
17061
ca81d7a0
JD
17062/* Override any GCC internal prototype to avoid an error.
17063 Use char because int might match the return type of a GCC
17064 builtin and then its argument prototype would still apply. */
503d2be0
AS
17065#ifdef __cplusplus
17066extern "C"
17067#endif
98418dba 17068char getloadavg ();
98418dba
CW
17069/* The GNU C library defines this for functions which it implements
17070 to always fail with ENOSYS. Some functions are actually named
17071 something starting with __ and the normal name is an alias. */
ca81d7a0 17072#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17073choke me
cd958eb3
MB
17074#endif
17075
19650fd6
AS
17076int
17077main ()
17078{
ca81d7a0 17079return getloadavg ();
503d2be0
AS
17080 ;
17081 return 0;
17082}
17083_ACEOF
17084rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17085if { (ac_try="$ac_link"
17086case "(($ac_try" in
17087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17088 *) ac_try_echo=$ac_try;;
17089esac
7bbec45b 17090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17091 (eval "$ac_link") 2>conftest.er1
503d2be0 17092 ac_status=$?
edfaf76d
LK
17093 grep -v '^ *+' conftest.er1 >conftest.err
17094 rm -f conftest.er1
17095 cat conftest.err >&5
7bbec45b 17096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17097 (exit $ac_status); } && {
17098 test -z "$ac_c_werror_flag" ||
17099 test ! -s conftest.err
7bbec45b
CY
17100 } && test -s conftest$ac_exeext &&
17101 $as_test_x conftest$ac_exeext; then
98418dba 17102 ac_cv_func_getloadavg=yes
503d2be0 17103else
7bbec45b 17104 echo "$as_me: failed program was:" >&5
19650fd6
AS
17105sed 's/^/| /' conftest.$ac_ext >&5
17106
ca81d7a0 17107 ac_cv_func_getloadavg=no
503d2be0 17108fi
ca81d7a0 17109
f053c89f 17110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17111 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17112fi
7bbec45b
CY
17113{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17114echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
b0448899 17115if test $ac_cv_func_getloadavg = yes; then
98418dba
CW
17116 exit 0
17117else
17118 exit 1
ba4481b5 17119fi
98418dba 17120) && ac_have_func=yes
ba4481b5 17121
98418dba 17122# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17123
98418dba
CW
17124for ac_func in pstat_getdynamic
17125do
7bbec45b
CY
17126as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17127{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17128echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 17129if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 17130 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17131else
503d2be0 17132 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17133/* confdefs.h. */
17134_ACEOF
17135cat confdefs.h >>conftest.$ac_ext
17136cat >>conftest.$ac_ext <<_ACEOF
17137/* end confdefs.h. */
edfaf76d
LK
17138/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17139 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17140#define $ac_func innocuous_$ac_func
17141
98418dba 17142/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17143 which can conflict with char $ac_func (); below.
17144 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17145 <limits.h> exists even on freestanding compilers. */
edfaf76d 17146
19650fd6
AS
17147#ifdef __STDC__
17148# include <limits.h>
17149#else
17150# include <assert.h>
17151#endif
edfaf76d
LK
17152
17153#undef $ac_func
17154
ca81d7a0
JD
17155/* Override any GCC internal prototype to avoid an error.
17156 Use char because int might match the return type of a GCC
17157 builtin and then its argument prototype would still apply. */
503d2be0
AS
17158#ifdef __cplusplus
17159extern "C"
17160#endif
98418dba 17161char $ac_func ();
98418dba
CW
17162/* The GNU C library defines this for functions which it implements
17163 to always fail with ENOSYS. Some functions are actually named
17164 something starting with __ and the normal name is an alias. */
ca81d7a0 17165#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17166choke me
98418dba
CW
17167#endif
17168
19650fd6
AS
17169int
17170main ()
17171{
ca81d7a0 17172return $ac_func ();
98418dba
CW
17173 ;
17174 return 0;
17175}
f21fadcc 17176_ACEOF
98418dba 17177rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17178if { (ac_try="$ac_link"
17179case "(($ac_try" in
17180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17181 *) ac_try_echo=$ac_try;;
17182esac
7bbec45b 17183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17184 (eval "$ac_link") 2>conftest.er1
f21fadcc 17185 ac_status=$?
edfaf76d
LK
17186 grep -v '^ *+' conftest.er1 >conftest.err
17187 rm -f conftest.er1
17188 cat conftest.err >&5
7bbec45b 17189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17190 (exit $ac_status); } && {
17191 test -z "$ac_c_werror_flag" ||
17192 test ! -s conftest.err
7bbec45b
CY
17193 } && test -s conftest$ac_exeext &&
17194 $as_test_x conftest$ac_exeext; then
98418dba 17195 eval "$as_ac_var=yes"
f21fadcc 17196else
7bbec45b 17197 echo "$as_me: failed program was:" >&5
19650fd6
AS
17198sed 's/^/| /' conftest.$ac_ext >&5
17199
ca81d7a0 17200 eval "$as_ac_var=no"
f21fadcc 17201fi
ca81d7a0 17202
f053c89f 17203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17204 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17205fi
7bbec45b
CY
17206ac_res=`eval echo '${'$as_ac_var'}'`
17207 { echo "$as_me:$LINENO: result: $ac_res" >&5
17208echo "${ECHO_T}$ac_res" >&6; }
17209if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17210 cat >>confdefs.h <<_ACEOF
7bbec45b 17211#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17212_ACEOF
98418dba
CW
17213
17214fi
17215done
17216
c0d27fcc 17217
98418dba
CW
17218# Solaris has libkstat which does not require root.
17219
7bbec45b
CY
17220{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17221echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17222if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
7bbec45b 17223 echo $ECHO_N "(cached) $ECHO_C" >&6
f21fadcc
JD
17224else
17225 ac_check_lib_save_LIBS=$LIBS
98418dba 17226LIBS="-lkstat $LIBS"
f21fadcc 17227cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17228/* confdefs.h. */
17229_ACEOF
17230cat confdefs.h >>conftest.$ac_ext
17231cat >>conftest.$ac_ext <<_ACEOF
17232/* end confdefs.h. */
f21fadcc 17233
ca81d7a0
JD
17234/* Override any GCC internal prototype to avoid an error.
17235 Use char because int might match the return type of a GCC
17236 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17237#ifdef __cplusplus
17238extern "C"
17239#endif
98418dba 17240char kstat_open ();
f21fadcc
JD
17241int
17242main ()
17243{
ca81d7a0 17244return kstat_open ();
f21fadcc
JD
17245 ;
17246 return 0;
17247}
17248_ACEOF
17249rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17250if { (ac_try="$ac_link"
17251case "(($ac_try" in
17252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17253 *) ac_try_echo=$ac_try;;
17254esac
7bbec45b 17255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17256 (eval "$ac_link") 2>conftest.er1
f21fadcc 17257 ac_status=$?
edfaf76d
LK
17258 grep -v '^ *+' conftest.er1 >conftest.err
17259 rm -f conftest.er1
17260 cat conftest.err >&5
7bbec45b 17261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17262 (exit $ac_status); } && {
17263 test -z "$ac_c_werror_flag" ||
17264 test ! -s conftest.err
7bbec45b
CY
17265 } && test -s conftest$ac_exeext &&
17266 $as_test_x conftest$ac_exeext; then
98418dba 17267 ac_cv_lib_kstat_kstat_open=yes
f21fadcc 17268else
7bbec45b 17269 echo "$as_me: failed program was:" >&5
19650fd6
AS
17270sed 's/^/| /' conftest.$ac_ext >&5
17271
ca81d7a0 17272 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17273fi
ca81d7a0 17274
f053c89f 17275rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17276 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17277LIBS=$ac_check_lib_save_LIBS
17278fi
7bbec45b
CY
17279{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17280echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
b0448899 17281if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17282 cat >>confdefs.h <<_ACEOF
98418dba 17283#define HAVE_LIBKSTAT 1
c0d27fcc 17284_ACEOF
f21fadcc 17285
98418dba 17286 LIBS="-lkstat $LIBS"
f21fadcc 17287
f21fadcc
JD
17288fi
17289
98418dba
CW
17290test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17291
17292# Some systems with -lutil have (and need) -lkvm as well, some do not.
17293# On Solaris, -lkvm requires nlist from -lelf, so check that first
17294# to get the right answer into the cache.
17295# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17296if test $ac_have_func = no; then
7bbec45b
CY
17297 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17298echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17299if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
7bbec45b 17300 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17301else
98418dba
CW
17302 ac_check_lib_save_LIBS=$LIBS
17303LIBS="-lelf $LIBS"
17304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17305/* confdefs.h. */
17306_ACEOF
17307cat confdefs.h >>conftest.$ac_ext
17308cat >>conftest.$ac_ext <<_ACEOF
17309/* end confdefs.h. */
98418dba 17310
ca81d7a0
JD
17311/* Override any GCC internal prototype to avoid an error.
17312 Use char because int might match the return type of a GCC
17313 builtin and then its argument prototype would still apply. */
98418dba
CW
17314#ifdef __cplusplus
17315extern "C"
17316#endif
98418dba 17317char elf_begin ();
503d2be0
AS
17318int
17319main ()
17320{
ca81d7a0 17321return elf_begin ();
503d2be0
AS
17322 ;
17323 return 0;
17324}
17325_ACEOF
17326rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17327if { (ac_try="$ac_link"
17328case "(($ac_try" in
17329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17330 *) ac_try_echo=$ac_try;;
17331esac
7bbec45b 17332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17333 (eval "$ac_link") 2>conftest.er1
503d2be0 17334 ac_status=$?
edfaf76d
LK
17335 grep -v '^ *+' conftest.er1 >conftest.err
17336 rm -f conftest.er1
17337 cat conftest.err >&5
7bbec45b 17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17339 (exit $ac_status); } && {
17340 test -z "$ac_c_werror_flag" ||
17341 test ! -s conftest.err
7bbec45b
CY
17342 } && test -s conftest$ac_exeext &&
17343 $as_test_x conftest$ac_exeext; then
98418dba 17344 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17345else
7bbec45b 17346 echo "$as_me: failed program was:" >&5
19650fd6
AS
17347sed 's/^/| /' conftest.$ac_ext >&5
17348
ca81d7a0 17349 ac_cv_lib_elf_elf_begin=no
ba4481b5 17350fi
ca81d7a0 17351
f053c89f 17352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17353 conftest$ac_exeext conftest.$ac_ext
98418dba 17354LIBS=$ac_check_lib_save_LIBS
ba4481b5 17355fi
7bbec45b
CY
17356{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17357echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
b0448899 17358if test $ac_cv_lib_elf_elf_begin = yes; then
98418dba 17359 LIBS="-lelf $LIBS"
ba4481b5
DL
17360fi
17361
98418dba
CW
17362fi
17363if test $ac_have_func = no; then
7bbec45b
CY
17364 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17365echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17366if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
7bbec45b 17367 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17368else
98418dba
CW
17369 ac_check_lib_save_LIBS=$LIBS
17370LIBS="-lkvm $LIBS"
17371cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17372/* confdefs.h. */
17373_ACEOF
17374cat confdefs.h >>conftest.$ac_ext
17375cat >>conftest.$ac_ext <<_ACEOF
17376/* end confdefs.h. */
98418dba 17377
ca81d7a0
JD
17378/* Override any GCC internal prototype to avoid an error.
17379 Use char because int might match the return type of a GCC
17380 builtin and then its argument prototype would still apply. */
98418dba
CW
17381#ifdef __cplusplus
17382extern "C"
17383#endif
98418dba 17384char kvm_open ();
503d2be0
AS
17385int
17386main ()
17387{
ca81d7a0 17388return kvm_open ();
503d2be0
AS
17389 ;
17390 return 0;
17391}
17392_ACEOF
17393rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17394if { (ac_try="$ac_link"
17395case "(($ac_try" in
17396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17397 *) ac_try_echo=$ac_try;;
17398esac
7bbec45b 17399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17400 (eval "$ac_link") 2>conftest.er1
503d2be0 17401 ac_status=$?
edfaf76d
LK
17402 grep -v '^ *+' conftest.er1 >conftest.err
17403 rm -f conftest.er1
17404 cat conftest.err >&5
7bbec45b 17405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17406 (exit $ac_status); } && {
17407 test -z "$ac_c_werror_flag" ||
17408 test ! -s conftest.err
7bbec45b
CY
17409 } && test -s conftest$ac_exeext &&
17410 $as_test_x conftest$ac_exeext; then
98418dba 17411 ac_cv_lib_kvm_kvm_open=yes
503d2be0 17412else
7bbec45b 17413 echo "$as_me: failed program was:" >&5
19650fd6
AS
17414sed 's/^/| /' conftest.$ac_ext >&5
17415
ca81d7a0 17416 ac_cv_lib_kvm_kvm_open=no
503d2be0 17417fi
ca81d7a0 17418
f053c89f 17419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17420 conftest$ac_exeext conftest.$ac_ext
98418dba 17421LIBS=$ac_check_lib_save_LIBS
503d2be0 17422fi
7bbec45b
CY
17423{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17424echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
b0448899 17425if test $ac_cv_lib_kvm_kvm_open = yes; then
98418dba 17426 LIBS="-lkvm $LIBS"
ba4481b5
DL
17427fi
17428
98418dba 17429 # Check for the 4.4BSD definition of getloadavg.
7bbec45b
CY
17430 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17431echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17432if test "${ac_cv_lib_util_getloadavg+set}" = set; then
7bbec45b 17433 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17434else
98418dba
CW
17435 ac_check_lib_save_LIBS=$LIBS
17436LIBS="-lutil $LIBS"
17437cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17438/* confdefs.h. */
17439_ACEOF
17440cat confdefs.h >>conftest.$ac_ext
17441cat >>conftest.$ac_ext <<_ACEOF
17442/* end confdefs.h. */
98418dba 17443
ca81d7a0
JD
17444/* Override any GCC internal prototype to avoid an error.
17445 Use char because int might match the return type of a GCC
17446 builtin and then its argument prototype would still apply. */
98418dba
CW
17447#ifdef __cplusplus
17448extern "C"
17449#endif
98418dba 17450char getloadavg ();
503d2be0
AS
17451int
17452main ()
17453{
ca81d7a0 17454return getloadavg ();
503d2be0
AS
17455 ;
17456 return 0;
17457}
17458_ACEOF
17459rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17460if { (ac_try="$ac_link"
17461case "(($ac_try" in
17462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17463 *) ac_try_echo=$ac_try;;
17464esac
7bbec45b 17465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17466 (eval "$ac_link") 2>conftest.er1
503d2be0 17467 ac_status=$?
edfaf76d
LK
17468 grep -v '^ *+' conftest.er1 >conftest.err
17469 rm -f conftest.er1
17470 cat conftest.err >&5
7bbec45b 17471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17472 (exit $ac_status); } && {
17473 test -z "$ac_c_werror_flag" ||
17474 test ! -s conftest.err
7bbec45b
CY
17475 } && test -s conftest$ac_exeext &&
17476 $as_test_x conftest$ac_exeext; then
35996d22
AS
17477 ac_cv_lib_util_getloadavg=yes
17478else
7bbec45b 17479 echo "$as_me: failed program was:" >&5
19650fd6
AS
17480sed 's/^/| /' conftest.$ac_ext >&5
17481
ca81d7a0 17482 ac_cv_lib_util_getloadavg=no
ba4481b5 17483fi
ca81d7a0 17484
f053c89f 17485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17486 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17487LIBS=$ac_check_lib_save_LIBS
17488fi
7bbec45b
CY
17489{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17490echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
b0448899 17491if test $ac_cv_lib_util_getloadavg = yes; then
98418dba 17492 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17493fi
503d2be0 17494
98418dba 17495fi
ba4481b5 17496
98418dba
CW
17497if test $ac_have_func = no; then
17498 # There is a commonly available library for RS/6000 AIX.
17499 # Since it is not a standard part of AIX, it might be installed locally.
17500 ac_getloadavg_LIBS=$LIBS
17501 LIBS="-L/usr/local/lib $LIBS"
7bbec45b
CY
17502 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17503echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17504if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
7bbec45b 17505 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17506else
98418dba
CW
17507 ac_check_lib_save_LIBS=$LIBS
17508LIBS="-lgetloadavg $LIBS"
17509cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17510/* confdefs.h. */
17511_ACEOF
17512cat confdefs.h >>conftest.$ac_ext
17513cat >>conftest.$ac_ext <<_ACEOF
17514/* end confdefs.h. */
ba4481b5 17515
ca81d7a0
JD
17516/* Override any GCC internal prototype to avoid an error.
17517 Use char because int might match the return type of a GCC
17518 builtin and then its argument prototype would still apply. */
98418dba
CW
17519#ifdef __cplusplus
17520extern "C"
17521#endif
98418dba 17522char getloadavg ();
98418dba
CW
17523int
17524main ()
17525{
ca81d7a0 17526return getloadavg ();
98418dba
CW
17527 ;
17528 return 0;
17529}
503d2be0 17530_ACEOF
98418dba 17531rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17532if { (ac_try="$ac_link"
17533case "(($ac_try" in
17534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17535 *) ac_try_echo=$ac_try;;
17536esac
7bbec45b 17537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17538 (eval "$ac_link") 2>conftest.er1
98418dba 17539 ac_status=$?
edfaf76d
LK
17540 grep -v '^ *+' conftest.er1 >conftest.err
17541 rm -f conftest.er1
17542 cat conftest.err >&5
7bbec45b 17543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17544 (exit $ac_status); } && {
17545 test -z "$ac_c_werror_flag" ||
17546 test ! -s conftest.err
7bbec45b
CY
17547 } && test -s conftest$ac_exeext &&
17548 $as_test_x conftest$ac_exeext; then
98418dba 17549 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17550else
7bbec45b 17551 echo "$as_me: failed program was:" >&5
19650fd6
AS
17552sed 's/^/| /' conftest.$ac_ext >&5
17553
ca81d7a0 17554 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17555fi
ca81d7a0 17556
f053c89f 17557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17558 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17559LIBS=$ac_check_lib_save_LIBS
17560fi
7bbec45b
CY
17561{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17562echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
b0448899 17563if test $ac_cv_lib_getloadavg_getloadavg = yes; then
98418dba
CW
17564 LIBS="-lgetloadavg $LIBS"
17565else
17566 LIBS=$ac_getloadavg_LIBS
ba4481b5 17567fi
ba4481b5
DL
17568
17569fi
98418dba
CW
17570
17571# Make sure it is really in the library, if we think we found it,
17572# otherwise set up the replacement function.
17573
17574for ac_func in getloadavg
17575do
7bbec45b
CY
17576as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17577{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 17579if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 17580 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17581else
503d2be0 17582 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17583/* confdefs.h. */
17584_ACEOF
17585cat confdefs.h >>conftest.$ac_ext
17586cat >>conftest.$ac_ext <<_ACEOF
17587/* end confdefs.h. */
edfaf76d
LK
17588/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17590#define $ac_func innocuous_$ac_func
17591
ba4481b5 17592/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17593 which can conflict with char $ac_func (); below.
17594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17595 <limits.h> exists even on freestanding compilers. */
edfaf76d 17596
19650fd6
AS
17597#ifdef __STDC__
17598# include <limits.h>
17599#else
17600# include <assert.h>
17601#endif
edfaf76d
LK
17602
17603#undef $ac_func
17604
ca81d7a0
JD
17605/* Override any GCC internal prototype to avoid an error.
17606 Use char because int might match the return type of a GCC
17607 builtin and then its argument prototype would still apply. */
503d2be0
AS
17608#ifdef __cplusplus
17609extern "C"
17610#endif
503d2be0 17611char $ac_func ();
ba4481b5
DL
17612/* The GNU C library defines this for functions which it implements
17613 to always fail with ENOSYS. Some functions are actually named
17614 something starting with __ and the normal name is an alias. */
ca81d7a0 17615#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17616choke me
cd958eb3
MB
17617#endif
17618
19650fd6
AS
17619int
17620main ()
17621{
ca81d7a0 17622return $ac_func ();
503d2be0
AS
17623 ;
17624 return 0;
17625}
17626_ACEOF
17627rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17628if { (ac_try="$ac_link"
17629case "(($ac_try" in
17630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17631 *) ac_try_echo=$ac_try;;
17632esac
7bbec45b 17633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17634 (eval "$ac_link") 2>conftest.er1
503d2be0 17635 ac_status=$?
edfaf76d
LK
17636 grep -v '^ *+' conftest.er1 >conftest.err
17637 rm -f conftest.er1
17638 cat conftest.err >&5
7bbec45b 17639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17640 (exit $ac_status); } && {
17641 test -z "$ac_c_werror_flag" ||
17642 test ! -s conftest.err
7bbec45b
CY
17643 } && test -s conftest$ac_exeext &&
17644 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17645 eval "$as_ac_var=yes"
17646else
7bbec45b 17647 echo "$as_me: failed program was:" >&5
19650fd6
AS
17648sed 's/^/| /' conftest.$ac_ext >&5
17649
ca81d7a0 17650 eval "$as_ac_var=no"
503d2be0 17651fi
ca81d7a0 17652
f053c89f 17653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17654 conftest$ac_exeext conftest.$ac_ext
503d2be0 17655fi
7bbec45b
CY
17656ac_res=`eval echo '${'$as_ac_var'}'`
17657 { echo "$as_me:$LINENO: result: $ac_res" >&5
17658echo "${ECHO_T}$ac_res" >&6; }
17659if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17660 cat >>confdefs.h <<_ACEOF
7bbec45b 17661#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17662_ACEOF
503d2be0 17663
98418dba 17664else
ca81d7a0 17665 case " $LIBOBJS " in
edfaf76d 17666 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17667 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17668 ;;
edfaf76d
LK
17669esac
17670
ba4481b5 17671
c0d27fcc 17672cat >>confdefs.h <<\_ACEOF
98418dba 17673#define C_GETLOADAVG 1
c0d27fcc 17674_ACEOF
ba4481b5 17675
98418dba
CW
17676# Figure out what our getloadavg.c needs.
17677ac_have_func=no
c0d27fcc 17678if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
7bbec45b
CY
17679 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17680echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17681if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
7bbec45b 17682 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17683fi
7bbec45b
CY
17684{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17685echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17686else
c0d27fcc 17687 # Is the header compilable?
7bbec45b
CY
17688{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17689echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17690cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17691/* confdefs.h. */
17692_ACEOF
17693cat confdefs.h >>conftest.$ac_ext
17694cat >>conftest.$ac_ext <<_ACEOF
17695/* end confdefs.h. */
c0d27fcc
MR
17696$ac_includes_default
17697#include <sys/dg_sys_info.h>
17698_ACEOF
17699rm -f conftest.$ac_objext
ca81d7a0
JD
17700if { (ac_try="$ac_compile"
17701case "(($ac_try" in
17702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17703 *) ac_try_echo=$ac_try;;
17704esac
7bbec45b 17705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17706 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17707 ac_status=$?
edfaf76d
LK
17708 grep -v '^ *+' conftest.er1 >conftest.err
17709 rm -f conftest.er1
17710 cat conftest.err >&5
7bbec45b 17711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17712 (exit $ac_status); } && {
17713 test -z "$ac_c_werror_flag" ||
17714 test ! -s conftest.err
17715 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17716 ac_header_compiler=yes
17717else
7bbec45b 17718 echo "$as_me: failed program was:" >&5
19650fd6
AS
17719sed 's/^/| /' conftest.$ac_ext >&5
17720
ca81d7a0 17721 ac_header_compiler=no
c0d27fcc 17722fi
ca81d7a0
JD
17723
17724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
17725{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17726echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17727
17728# Is the header present?
7bbec45b
CY
17729{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17730echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17731cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17732/* confdefs.h. */
17733_ACEOF
17734cat confdefs.h >>conftest.$ac_ext
17735cat >>conftest.$ac_ext <<_ACEOF
17736/* end confdefs.h. */
98418dba
CW
17737#include <sys/dg_sys_info.h>
17738_ACEOF
ca81d7a0
JD
17739if { (ac_try="$ac_cpp conftest.$ac_ext"
17740case "(($ac_try" in
17741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17742 *) ac_try_echo=$ac_try;;
17743esac
7bbec45b 17744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17745 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17746 ac_status=$?
6bae0ccf 17747 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17748 rm -f conftest.er1
17749 cat conftest.err >&5
7bbec45b 17750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17751 (exit $ac_status); } >/dev/null && {
17752 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17753 test ! -s conftest.err
17754 }; then
c0d27fcc 17755 ac_header_preproc=yes
98418dba 17756else
7bbec45b 17757 echo "$as_me: failed program was:" >&5
19650fd6
AS
17758sed 's/^/| /' conftest.$ac_ext >&5
17759
c0d27fcc 17760 ac_header_preproc=no
ba4481b5 17761fi
ca81d7a0 17762
98418dba 17763rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
17764{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17765echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17766
17767# So? What about this header?
edfaf76d
LK
17768case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17769 yes:no: )
7bbec45b
CY
17770 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17771echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17772 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17773echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
edfaf76d 17774 ac_header_preproc=yes
19650fd6 17775 ;;
edfaf76d 17776 no:yes:* )
7bbec45b
CY
17777 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17778echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
17779 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17780echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17781 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17782echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17783 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17784echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
17785 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
17786echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
17787 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17788echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17789
19650fd6 17790 ;;
c0d27fcc 17791esac
7bbec45b
CY
17792{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17793echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc 17794if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
7bbec45b 17795 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17796else
17797 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17798fi
7bbec45b
CY
17799{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17800echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17801
17802fi
b0448899 17803if test $ac_cv_header_sys_dg_sys_info_h = yes; then
98418dba 17804 ac_have_func=yes
ba4481b5 17805
c0d27fcc 17806cat >>confdefs.h <<\_ACEOF
98418dba 17807#define DGUX 1
c0d27fcc
MR
17808_ACEOF
17809
503d2be0 17810
7bbec45b
CY
17811{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17812echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17813if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
7bbec45b 17814 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17815else
503d2be0 17816 ac_check_lib_save_LIBS=$LIBS
98418dba 17817LIBS="-ldgc $LIBS"
503d2be0 17818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17819/* confdefs.h. */
17820_ACEOF
17821cat confdefs.h >>conftest.$ac_ext
17822cat >>conftest.$ac_ext <<_ACEOF
17823/* end confdefs.h. */
503d2be0 17824
ca81d7a0
JD
17825/* Override any GCC internal prototype to avoid an error.
17826 Use char because int might match the return type of a GCC
17827 builtin and then its argument prototype would still apply. */
503d2be0
AS
17828#ifdef __cplusplus
17829extern "C"
17830#endif
98418dba 17831char dg_sys_info ();
503d2be0
AS
17832int
17833main ()
17834{
ca81d7a0 17835return dg_sys_info ();
503d2be0
AS
17836 ;
17837 return 0;
17838}
17839_ACEOF
17840rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17841if { (ac_try="$ac_link"
17842case "(($ac_try" in
17843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17844 *) ac_try_echo=$ac_try;;
17845esac
7bbec45b 17846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17847 (eval "$ac_link") 2>conftest.er1
503d2be0 17848 ac_status=$?
edfaf76d
LK
17849 grep -v '^ *+' conftest.er1 >conftest.err
17850 rm -f conftest.er1
17851 cat conftest.err >&5
7bbec45b 17852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17853 (exit $ac_status); } && {
17854 test -z "$ac_c_werror_flag" ||
17855 test ! -s conftest.err
7bbec45b
CY
17856 } && test -s conftest$ac_exeext &&
17857 $as_test_x conftest$ac_exeext; then
98418dba 17858 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0 17859else
7bbec45b 17860 echo "$as_me: failed program was:" >&5
19650fd6
AS
17861sed 's/^/| /' conftest.$ac_ext >&5
17862
ca81d7a0 17863 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17864fi
ca81d7a0 17865
f053c89f 17866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17867 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17868LIBS=$ac_check_lib_save_LIBS
17869fi
7bbec45b
CY
17870{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17871echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
b0448899 17872if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17873 cat >>confdefs.h <<_ACEOF
98418dba 17874#define HAVE_LIBDGC 1
c0d27fcc 17875_ACEOF
ba4481b5 17876
98418dba 17877 LIBS="-ldgc $LIBS"
ba4481b5 17878
ba4481b5
DL
17879fi
17880
98418dba 17881fi
503d2be0 17882
c0d27fcc
MR
17883
17884
17885if test "${ac_cv_header_locale_h+set}" = set; then
7bbec45b
CY
17886 { echo "$as_me:$LINENO: checking for locale.h" >&5
17887echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17888if test "${ac_cv_header_locale_h+set}" = set; then
7bbec45b 17889 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17890fi
7bbec45b
CY
17891{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17892echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17893else
c0d27fcc 17894 # Is the header compilable?
7bbec45b
CY
17895{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17896echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17897cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17898/* confdefs.h. */
17899_ACEOF
17900cat confdefs.h >>conftest.$ac_ext
17901cat >>conftest.$ac_ext <<_ACEOF
17902/* end confdefs.h. */
c0d27fcc
MR
17903$ac_includes_default
17904#include <locale.h>
17905_ACEOF
17906rm -f conftest.$ac_objext
ca81d7a0
JD
17907if { (ac_try="$ac_compile"
17908case "(($ac_try" in
17909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17910 *) ac_try_echo=$ac_try;;
17911esac
7bbec45b 17912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17913 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17914 ac_status=$?
edfaf76d
LK
17915 grep -v '^ *+' conftest.er1 >conftest.err
17916 rm -f conftest.er1
17917 cat conftest.err >&5
7bbec45b 17918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17919 (exit $ac_status); } && {
17920 test -z "$ac_c_werror_flag" ||
17921 test ! -s conftest.err
17922 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17923 ac_header_compiler=yes
17924else
7bbec45b 17925 echo "$as_me: failed program was:" >&5
19650fd6
AS
17926sed 's/^/| /' conftest.$ac_ext >&5
17927
ca81d7a0 17928 ac_header_compiler=no
c0d27fcc 17929fi
ca81d7a0
JD
17930
17931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
17932{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17933echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17934
17935# Is the header present?
7bbec45b
CY
17936{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17937echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17938cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17939/* confdefs.h. */
17940_ACEOF
17941cat confdefs.h >>conftest.$ac_ext
17942cat >>conftest.$ac_ext <<_ACEOF
17943/* end confdefs.h. */
98418dba 17944#include <locale.h>
503d2be0 17945_ACEOF
ca81d7a0
JD
17946if { (ac_try="$ac_cpp conftest.$ac_ext"
17947case "(($ac_try" in
17948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17949 *) ac_try_echo=$ac_try;;
17950esac
7bbec45b 17951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 17952 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17953 ac_status=$?
6bae0ccf 17954 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17955 rm -f conftest.er1
17956 cat conftest.err >&5
7bbec45b 17957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17958 (exit $ac_status); } >/dev/null && {
17959 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17960 test ! -s conftest.err
17961 }; then
c0d27fcc 17962 ac_header_preproc=yes
98418dba 17963else
7bbec45b 17964 echo "$as_me: failed program was:" >&5
19650fd6
AS
17965sed 's/^/| /' conftest.$ac_ext >&5
17966
c0d27fcc 17967 ac_header_preproc=no
ba4481b5 17968fi
ca81d7a0 17969
98418dba 17970rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
17971{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17972echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17973
17974# So? What about this header?
edfaf76d
LK
17975case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17976 yes:no: )
7bbec45b
CY
17977 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17978echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17979 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17980echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
edfaf76d 17981 ac_header_preproc=yes
19650fd6 17982 ;;
edfaf76d 17983 no:yes:* )
7bbec45b
CY
17984 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17985echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
17986 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17987echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17988 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17989echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17990 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17991echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
17992 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
17993echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
17994 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17995echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17996
19650fd6 17997 ;;
c0d27fcc 17998esac
7bbec45b
CY
17999{ echo "$as_me:$LINENO: checking for locale.h" >&5
18000echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc 18001if test "${ac_cv_header_locale_h+set}" = set; then
7bbec45b 18002 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18003else
18004 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 18005fi
7bbec45b
CY
18006{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18007echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 18008
c0d27fcc
MR
18009fi
18010
18011
18012
98418dba 18013for ac_func in setlocale
ba4481b5 18014do
7bbec45b
CY
18015as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18016{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18017echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 18018if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 18019 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18020else
503d2be0 18021 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18022/* confdefs.h. */
18023_ACEOF
18024cat confdefs.h >>conftest.$ac_ext
18025cat >>conftest.$ac_ext <<_ACEOF
18026/* end confdefs.h. */
edfaf76d
LK
18027/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18029#define $ac_func innocuous_$ac_func
18030
ba4481b5 18031/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18032 which can conflict with char $ac_func (); below.
18033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18034 <limits.h> exists even on freestanding compilers. */
edfaf76d 18035
19650fd6
AS
18036#ifdef __STDC__
18037# include <limits.h>
18038#else
18039# include <assert.h>
18040#endif
edfaf76d
LK
18041
18042#undef $ac_func
18043
ca81d7a0
JD
18044/* Override any GCC internal prototype to avoid an error.
18045 Use char because int might match the return type of a GCC
18046 builtin and then its argument prototype would still apply. */
503d2be0
AS
18047#ifdef __cplusplus
18048extern "C"
18049#endif
503d2be0 18050char $ac_func ();
ba4481b5
DL
18051/* The GNU C library defines this for functions which it implements
18052 to always fail with ENOSYS. Some functions are actually named
18053 something starting with __ and the normal name is an alias. */
ca81d7a0 18054#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18055choke me
ba4481b5
DL
18056#endif
18057
19650fd6
AS
18058int
18059main ()
18060{
ca81d7a0 18061return $ac_func ();
503d2be0
AS
18062 ;
18063 return 0;
18064}
18065_ACEOF
18066rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18067if { (ac_try="$ac_link"
18068case "(($ac_try" in
18069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18070 *) ac_try_echo=$ac_try;;
18071esac
7bbec45b 18072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18073 (eval "$ac_link") 2>conftest.er1
503d2be0 18074 ac_status=$?
edfaf76d
LK
18075 grep -v '^ *+' conftest.er1 >conftest.err
18076 rm -f conftest.er1
18077 cat conftest.err >&5
7bbec45b 18078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18079 (exit $ac_status); } && {
18080 test -z "$ac_c_werror_flag" ||
18081 test ! -s conftest.err
7bbec45b
CY
18082 } && test -s conftest$ac_exeext &&
18083 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18084 eval "$as_ac_var=yes"
18085else
7bbec45b 18086 echo "$as_me: failed program was:" >&5
19650fd6
AS
18087sed 's/^/| /' conftest.$ac_ext >&5
18088
ca81d7a0 18089 eval "$as_ac_var=no"
503d2be0 18090fi
ca81d7a0 18091
f053c89f 18092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18093 conftest$ac_exeext conftest.$ac_ext
503d2be0 18094fi
7bbec45b
CY
18095ac_res=`eval echo '${'$as_ac_var'}'`
18096 { echo "$as_me:$LINENO: result: $ac_res" >&5
18097echo "${ECHO_T}$ac_res" >&6; }
18098if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18099 cat >>confdefs.h <<_ACEOF
7bbec45b 18100#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18101_ACEOF
ba4481b5 18102
ba4481b5
DL
18103fi
18104done
18105
c0d27fcc 18106
98418dba
CW
18107# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18108# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18109# Irix 4.0.5F has the header but not the library.
18110if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18111 ac_have_func=yes
18112
c0d27fcc 18113cat >>confdefs.h <<\_ACEOF
98418dba 18114#define SVR4 1
c0d27fcc 18115_ACEOF
98418dba
CW
18116
18117fi
18118
18119if test $ac_have_func = no; then
c0d27fcc 18120 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
7bbec45b
CY
18121 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18122echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18123if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
7bbec45b 18124 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18125fi
7bbec45b
CY
18126{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18127echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18128else
c0d27fcc 18129 # Is the header compilable?
7bbec45b
CY
18130{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18131echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18132cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18133/* confdefs.h. */
18134_ACEOF
18135cat confdefs.h >>conftest.$ac_ext
18136cat >>conftest.$ac_ext <<_ACEOF
18137/* end confdefs.h. */
c0d27fcc
MR
18138$ac_includes_default
18139#include <inq_stats/cpustats.h>
18140_ACEOF
18141rm -f conftest.$ac_objext
ca81d7a0
JD
18142if { (ac_try="$ac_compile"
18143case "(($ac_try" in
18144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18145 *) ac_try_echo=$ac_try;;
18146esac
7bbec45b 18147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18148 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18149 ac_status=$?
edfaf76d
LK
18150 grep -v '^ *+' conftest.er1 >conftest.err
18151 rm -f conftest.er1
18152 cat conftest.err >&5
7bbec45b 18153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18154 (exit $ac_status); } && {
18155 test -z "$ac_c_werror_flag" ||
18156 test ! -s conftest.err
18157 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18158 ac_header_compiler=yes
18159else
7bbec45b 18160 echo "$as_me: failed program was:" >&5
19650fd6
AS
18161sed 's/^/| /' conftest.$ac_ext >&5
18162
ca81d7a0 18163 ac_header_compiler=no
c0d27fcc 18164fi
ca81d7a0
JD
18165
18166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
18167{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18168echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18169
18170# Is the header present?
7bbec45b
CY
18171{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18172echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18173cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18174/* confdefs.h. */
18175_ACEOF
18176cat confdefs.h >>conftest.$ac_ext
18177cat >>conftest.$ac_ext <<_ACEOF
18178/* end confdefs.h. */
98418dba 18179#include <inq_stats/cpustats.h>
503d2be0 18180_ACEOF
ca81d7a0
JD
18181if { (ac_try="$ac_cpp conftest.$ac_ext"
18182case "(($ac_try" in
18183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18184 *) ac_try_echo=$ac_try;;
18185esac
7bbec45b 18186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18187 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18188 ac_status=$?
6bae0ccf 18189 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18190 rm -f conftest.er1
18191 cat conftest.err >&5
7bbec45b 18192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18193 (exit $ac_status); } >/dev/null && {
18194 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18195 test ! -s conftest.err
18196 }; then
c0d27fcc 18197 ac_header_preproc=yes
503d2be0 18198else
7bbec45b 18199 echo "$as_me: failed program was:" >&5
19650fd6
AS
18200sed 's/^/| /' conftest.$ac_ext >&5
18201
c0d27fcc 18202 ac_header_preproc=no
ba4481b5 18203fi
ca81d7a0 18204
503d2be0 18205rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
18206{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18207echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18208
18209# So? What about this header?
edfaf76d
LK
18210case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18211 yes:no: )
7bbec45b
CY
18212 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18213echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18214 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18215echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
edfaf76d 18216 ac_header_preproc=yes
19650fd6 18217 ;;
edfaf76d 18218 no:yes:* )
7bbec45b
CY
18219 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18220echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
18221 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18222echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18223 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18224echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18225 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18226echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
18227 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
18228echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
18229 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18230echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18231
19650fd6 18232 ;;
c0d27fcc 18233esac
7bbec45b
CY
18234{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18235echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc 18236if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
7bbec45b 18237 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18238else
18239 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18240fi
7bbec45b
CY
18241{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18242echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18243
18244fi
b0448899 18245if test $ac_cv_header_inq_stats_cpustats_h = yes; then
98418dba 18246 ac_have_func=yes
ba4481b5 18247
c0d27fcc 18248cat >>confdefs.h <<\_ACEOF
98418dba 18249#define UMAX 1
c0d27fcc 18250_ACEOF
98418dba 18251
c0d27fcc
MR
18252
18253cat >>confdefs.h <<\_ACEOF
98418dba 18254#define UMAX4_3 1
c0d27fcc 18255_ACEOF
98418dba
CW
18256
18257fi
18258
c0d27fcc 18259
98418dba
CW
18260fi
18261
18262if test $ac_have_func = no; then
c0d27fcc 18263 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
7bbec45b
CY
18264 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18265echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18266if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
7bbec45b 18267 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18268fi
7bbec45b
CY
18269{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18270echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18271else
c0d27fcc 18272 # Is the header compilable?
7bbec45b
CY
18273{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18274echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18275cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18276/* confdefs.h. */
18277_ACEOF
18278cat confdefs.h >>conftest.$ac_ext
18279cat >>conftest.$ac_ext <<_ACEOF
18280/* end confdefs.h. */
c0d27fcc
MR
18281$ac_includes_default
18282#include <sys/cpustats.h>
18283_ACEOF
18284rm -f conftest.$ac_objext
ca81d7a0
JD
18285if { (ac_try="$ac_compile"
18286case "(($ac_try" in
18287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18288 *) ac_try_echo=$ac_try;;
18289esac
7bbec45b 18290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18291 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18292 ac_status=$?
edfaf76d
LK
18293 grep -v '^ *+' conftest.er1 >conftest.err
18294 rm -f conftest.er1
18295 cat conftest.err >&5
7bbec45b 18296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18297 (exit $ac_status); } && {
18298 test -z "$ac_c_werror_flag" ||
18299 test ! -s conftest.err
18300 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18301 ac_header_compiler=yes
18302else
7bbec45b 18303 echo "$as_me: failed program was:" >&5
19650fd6
AS
18304sed 's/^/| /' conftest.$ac_ext >&5
18305
ca81d7a0 18306 ac_header_compiler=no
c0d27fcc 18307fi
ca81d7a0
JD
18308
18309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
18310{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18311echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18312
18313# Is the header present?
7bbec45b
CY
18314{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18315echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18316cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
98418dba
CW
18322#include <sys/cpustats.h>
18323_ACEOF
ca81d7a0
JD
18324if { (ac_try="$ac_cpp conftest.$ac_ext"
18325case "(($ac_try" in
18326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18327 *) ac_try_echo=$ac_try;;
18328esac
7bbec45b 18329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18330 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18331 ac_status=$?
6bae0ccf 18332 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18333 rm -f conftest.er1
18334 cat conftest.err >&5
7bbec45b 18335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18336 (exit $ac_status); } >/dev/null && {
18337 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18338 test ! -s conftest.err
18339 }; then
c0d27fcc 18340 ac_header_preproc=yes
98418dba 18341else
7bbec45b 18342 echo "$as_me: failed program was:" >&5
19650fd6
AS
18343sed 's/^/| /' conftest.$ac_ext >&5
18344
c0d27fcc 18345 ac_header_preproc=no
98418dba 18346fi
ca81d7a0 18347
98418dba 18348rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
18349{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18350echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18351
18352# So? What about this header?
edfaf76d
LK
18353case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18354 yes:no: )
7bbec45b
CY
18355 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18356echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18357 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18358echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
edfaf76d 18359 ac_header_preproc=yes
19650fd6 18360 ;;
edfaf76d 18361 no:yes:* )
7bbec45b
CY
18362 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18363echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
18364 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18365echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18366 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18367echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18368 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18369echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
18370 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
18371echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
18372 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18373echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18374
19650fd6 18375 ;;
c0d27fcc 18376esac
7bbec45b
CY
18377{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18378echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc 18379if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
7bbec45b 18380 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18381else
18382 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18383fi
7bbec45b
CY
18384{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18385echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18386
18387fi
b0448899 18388if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18389 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18390#define UMAX 1
c0d27fcc 18391_ACEOF
ba4481b5 18392
98418dba
CW
18393fi
18394
c0d27fcc 18395
98418dba
CW
18396fi
18397
18398if test $ac_have_func = no; then
18399
18400for ac_header in mach/mach.h
2c9dccc9 18401do
7bbec45b 18402as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 18403if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
18404 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18405echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18406if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 18407 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18408fi
7bbec45b
CY
18409ac_res=`eval echo '${'$as_ac_Header'}'`
18410 { echo "$as_me:$LINENO: result: $ac_res" >&5
18411echo "${ECHO_T}$ac_res" >&6; }
98418dba 18412else
c0d27fcc 18413 # Is the header compilable?
7bbec45b
CY
18414{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18415echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18416cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18417/* confdefs.h. */
18418_ACEOF
18419cat confdefs.h >>conftest.$ac_ext
18420cat >>conftest.$ac_ext <<_ACEOF
18421/* end confdefs.h. */
c0d27fcc
MR
18422$ac_includes_default
18423#include <$ac_header>
18424_ACEOF
18425rm -f conftest.$ac_objext
ca81d7a0
JD
18426if { (ac_try="$ac_compile"
18427case "(($ac_try" in
18428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18429 *) ac_try_echo=$ac_try;;
18430esac
7bbec45b 18431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18432 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18433 ac_status=$?
edfaf76d
LK
18434 grep -v '^ *+' conftest.er1 >conftest.err
18435 rm -f conftest.er1
18436 cat conftest.err >&5
7bbec45b 18437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18438 (exit $ac_status); } && {
18439 test -z "$ac_c_werror_flag" ||
18440 test ! -s conftest.err
18441 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18442 ac_header_compiler=yes
18443else
7bbec45b 18444 echo "$as_me: failed program was:" >&5
19650fd6
AS
18445sed 's/^/| /' conftest.$ac_ext >&5
18446
ca81d7a0 18447 ac_header_compiler=no
c0d27fcc 18448fi
ca81d7a0
JD
18449
18450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
18451{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18452echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18453
18454# Is the header present?
7bbec45b
CY
18455{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18456echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18458/* confdefs.h. */
18459_ACEOF
18460cat confdefs.h >>conftest.$ac_ext
18461cat >>conftest.$ac_ext <<_ACEOF
18462/* end confdefs.h. */
2c9dccc9
PJ
18463#include <$ac_header>
18464_ACEOF
ca81d7a0
JD
18465if { (ac_try="$ac_cpp conftest.$ac_ext"
18466case "(($ac_try" in
18467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18468 *) ac_try_echo=$ac_try;;
18469esac
7bbec45b 18470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18471 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18472 ac_status=$?
6bae0ccf 18473 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18474 rm -f conftest.er1
18475 cat conftest.err >&5
7bbec45b 18476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18477 (exit $ac_status); } >/dev/null && {
18478 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18479 test ! -s conftest.err
18480 }; then
c0d27fcc
MR
18481 ac_header_preproc=yes
18482else
7bbec45b 18483 echo "$as_me: failed program was:" >&5
19650fd6
AS
18484sed 's/^/| /' conftest.$ac_ext >&5
18485
c0d27fcc
MR
18486 ac_header_preproc=no
18487fi
ca81d7a0 18488
c0d27fcc 18489rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
18490{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18491echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18492
18493# So? What about this header?
edfaf76d
LK
18494case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18495 yes:no: )
7bbec45b
CY
18496 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18497echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18498 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18499echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 18500 ac_header_preproc=yes
19650fd6 18501 ;;
edfaf76d 18502 no:yes:* )
7bbec45b
CY
18503 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18504echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18505 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18506echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18507 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18508echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18509 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18510echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18511 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18512echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18513 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18514echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18515
19650fd6 18516 ;;
c0d27fcc 18517esac
7bbec45b
CY
18518{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18519echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18520if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 18521 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18522else
edfaf76d 18523 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18524fi
7bbec45b
CY
18525ac_res=`eval echo '${'$as_ac_Header'}'`
18526 { echo "$as_me:$LINENO: result: $ac_res" >&5
18527echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18528
18529fi
7bbec45b 18530if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18531 cat >>confdefs.h <<_ACEOF
7bbec45b 18532#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
18533_ACEOF
18534
18535fi
18536
18537done
18538
18539fi
18540
18541
18542for ac_header in nlist.h
18543do
7bbec45b 18544as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 18545if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
18546 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18547echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18548if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 18549 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18550fi
7bbec45b
CY
18551ac_res=`eval echo '${'$as_ac_Header'}'`
18552 { echo "$as_me:$LINENO: result: $ac_res" >&5
18553echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18554else
18555 # Is the header compilable?
7bbec45b
CY
18556{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18557echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18558cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18559/* confdefs.h. */
18560_ACEOF
18561cat confdefs.h >>conftest.$ac_ext
18562cat >>conftest.$ac_ext <<_ACEOF
18563/* end confdefs.h. */
c0d27fcc
MR
18564$ac_includes_default
18565#include <$ac_header>
18566_ACEOF
18567rm -f conftest.$ac_objext
ca81d7a0
JD
18568if { (ac_try="$ac_compile"
18569case "(($ac_try" in
18570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18571 *) ac_try_echo=$ac_try;;
18572esac
7bbec45b 18573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18574 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18575 ac_status=$?
edfaf76d
LK
18576 grep -v '^ *+' conftest.er1 >conftest.err
18577 rm -f conftest.er1
18578 cat conftest.err >&5
7bbec45b 18579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18580 (exit $ac_status); } && {
18581 test -z "$ac_c_werror_flag" ||
18582 test ! -s conftest.err
18583 } && test -s conftest.$ac_objext; then
c0d27fcc 18584 ac_header_compiler=yes
2c9dccc9 18585else
7bbec45b 18586 echo "$as_me: failed program was:" >&5
19650fd6
AS
18587sed 's/^/| /' conftest.$ac_ext >&5
18588
ca81d7a0 18589 ac_header_compiler=no
98418dba 18590fi
ca81d7a0
JD
18591
18592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
18593{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18594echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18595
c0d27fcc 18596# Is the header present?
7bbec45b
CY
18597{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18598echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18599cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18600/* confdefs.h. */
18601_ACEOF
18602cat confdefs.h >>conftest.$ac_ext
18603cat >>conftest.$ac_ext <<_ACEOF
18604/* end confdefs.h. */
503d2be0
AS
18605#include <$ac_header>
18606_ACEOF
ca81d7a0
JD
18607if { (ac_try="$ac_cpp conftest.$ac_ext"
18608case "(($ac_try" in
18609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18610 *) ac_try_echo=$ac_try;;
18611esac
7bbec45b 18612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18613 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18614 ac_status=$?
6bae0ccf 18615 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18616 rm -f conftest.er1
18617 cat conftest.err >&5
7bbec45b 18618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18619 (exit $ac_status); } >/dev/null && {
18620 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18621 test ! -s conftest.err
18622 }; then
c0d27fcc 18623 ac_header_preproc=yes
503d2be0 18624else
7bbec45b 18625 echo "$as_me: failed program was:" >&5
19650fd6
AS
18626sed 's/^/| /' conftest.$ac_ext >&5
18627
c0d27fcc 18628 ac_header_preproc=no
b5de8dc0 18629fi
ca81d7a0 18630
503d2be0 18631rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
18632{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18633echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18634
18635# So? What about this header?
edfaf76d
LK
18636case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18637 yes:no: )
7bbec45b
CY
18638 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18639echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18640 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18641echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 18642 ac_header_preproc=yes
19650fd6 18643 ;;
edfaf76d 18644 no:yes:* )
7bbec45b
CY
18645 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18646echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18647 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18648echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18649 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18650echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18651 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18652echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18653 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18654echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18655 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18656echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18657
19650fd6 18658 ;;
c0d27fcc 18659esac
7bbec45b
CY
18660{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18661echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 18662if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 18663 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18664else
edfaf76d 18665 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18666fi
7bbec45b
CY
18667ac_res=`eval echo '${'$as_ac_Header'}'`
18668 { echo "$as_me:$LINENO: result: $ac_res" >&5
18669echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18670
18671fi
7bbec45b 18672if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18673 cat >>confdefs.h <<_ACEOF
7bbec45b 18674#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18675_ACEOF
7bbec45b
CY
18676 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18677echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18678if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
7bbec45b 18679 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18680else
503d2be0 18681 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18682/* confdefs.h. */
18683_ACEOF
18684cat confdefs.h >>conftest.$ac_ext
18685cat >>conftest.$ac_ext <<_ACEOF
18686/* end confdefs.h. */
98418dba 18687#include <nlist.h>
b5de8dc0 18688
503d2be0
AS
18689int
18690main ()
18691{
98418dba
CW
18692static struct nlist ac_aggr;
18693if (ac_aggr.n_un.n_name)
18694return 0;
503d2be0
AS
18695 ;
18696 return 0;
18697}
18698_ACEOF
98418dba 18699rm -f conftest.$ac_objext
ca81d7a0
JD
18700if { (ac_try="$ac_compile"
18701case "(($ac_try" in
18702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18703 *) ac_try_echo=$ac_try;;
18704esac
7bbec45b 18705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18706 (eval "$ac_compile") 2>conftest.er1
503d2be0 18707 ac_status=$?
edfaf76d
LK
18708 grep -v '^ *+' conftest.er1 >conftest.err
18709 rm -f conftest.er1
18710 cat conftest.err >&5
7bbec45b 18711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18712 (exit $ac_status); } && {
18713 test -z "$ac_c_werror_flag" ||
18714 test ! -s conftest.err
18715 } && test -s conftest.$ac_objext; then
edfaf76d 18716 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0 18717else
7bbec45b 18718 echo "$as_me: failed program was:" >&5
19650fd6
AS
18719sed 's/^/| /' conftest.$ac_ext >&5
18720
ca81d7a0 18721 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18722/* confdefs.h. */
18723_ACEOF
18724cat confdefs.h >>conftest.$ac_ext
18725cat >>conftest.$ac_ext <<_ACEOF
18726/* end confdefs.h. */
6bae0ccf
DL
18727#include <nlist.h>
18728
18729int
18730main ()
18731{
18732static struct nlist ac_aggr;
18733if (sizeof ac_aggr.n_un.n_name)
18734return 0;
18735 ;
18736 return 0;
18737}
18738_ACEOF
18739rm -f conftest.$ac_objext
ca81d7a0
JD
18740if { (ac_try="$ac_compile"
18741case "(($ac_try" in
18742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18743 *) ac_try_echo=$ac_try;;
18744esac
7bbec45b 18745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 18746 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18747 ac_status=$?
edfaf76d
LK
18748 grep -v '^ *+' conftest.er1 >conftest.err
18749 rm -f conftest.er1
18750 cat conftest.err >&5
7bbec45b 18751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18752 (exit $ac_status); } && {
18753 test -z "$ac_c_werror_flag" ||
18754 test ! -s conftest.err
18755 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18756 ac_cv_member_struct_nlist_n_un_n_name=yes
18757else
7bbec45b 18758 echo "$as_me: failed program was:" >&5
19650fd6
AS
18759sed 's/^/| /' conftest.$ac_ext >&5
18760
ca81d7a0 18761 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18762fi
ca81d7a0
JD
18763
18764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18765fi
ca81d7a0
JD
18766
18767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18768fi
7bbec45b
CY
18769{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18770echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
b0448899 18771if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18772
c0d27fcc 18773cat >>confdefs.h <<_ACEOF
98418dba 18774#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18775_ACEOF
b5de8dc0 18776
c0d27fcc
MR
18777
18778cat >>confdefs.h <<\_ACEOF
98418dba 18779#define NLIST_NAME_UNION 1
c0d27fcc 18780_ACEOF
b5de8dc0 18781
98418dba 18782fi
b5de8dc0 18783
c0d27fcc 18784
98418dba 18785fi
c0d27fcc 18786
98418dba 18787done
b5de8dc0 18788
98418dba
CW
18789fi
18790done
b5de8dc0 18791
c0d27fcc 18792
98418dba 18793# Some definitions of getloadavg require that the program be installed setgid.
7bbec45b
CY
18794{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18795echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba 18796if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
7bbec45b 18797 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
18798else
18799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18800/* confdefs.h. */
18801_ACEOF
18802cat confdefs.h >>conftest.$ac_ext
18803cat >>conftest.$ac_ext <<_ACEOF
18804/* end confdefs.h. */
6bae0ccf 18805#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18806#ifdef LDAV_PRIVILEGED
18807Yowza Am I SETGID yet
18808#endif
18809_ACEOF
18810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18811 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18812 ac_cv_func_getloadavg_setgid=yes
18813else
18814 ac_cv_func_getloadavg_setgid=no
18815fi
18816rm -f conftest*
b5de8dc0 18817
98418dba 18818fi
7bbec45b
CY
18819{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18820echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18821if test $ac_cv_func_getloadavg_setgid = yes; then
18822 NEED_SETGID=true
b5de8dc0 18823
c0d27fcc 18824cat >>confdefs.h <<\_ACEOF
98418dba 18825#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18826_ACEOF
98418dba 18827
b5de8dc0 18828else
98418dba 18829 NEED_SETGID=false
b5de8dc0 18830fi
98418dba
CW
18831
18832if test $ac_cv_func_getloadavg_setgid = yes; then
7bbec45b
CY
18833 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18834echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba 18835if test "${ac_cv_group_kmem+set}" = set; then
7bbec45b 18836 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
18837else
18838 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18839 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18840 # If we got an error (system does not support symlinks), try without -L.
18841 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
7bbec45b 18842 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18843 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18844 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18845 / /s/.* //;p;'`
18846
b5de8dc0 18847fi
7bbec45b
CY
18848{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18849echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18850 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18851fi
98418dba
CW
18852if test "x$ac_save_LIBS" = x; then
18853 GETLOADAVG_LIBS=$LIBS
18854else
7bbec45b 18855 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18856fi
98418dba 18857LIBS=$ac_save_LIBS
b5de8dc0 18858
c0d27fcc
MR
18859
18860
7bbec45b
CY
18861{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18862echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18863if test "${ac_cv_sys_largefile_source+set}" = set; then
7bbec45b 18864 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18865else
b936fae4 18866 while :; do
503d2be0 18867 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18868/* confdefs.h. */
18869_ACEOF
18870cat confdefs.h >>conftest.$ac_ext
18871cat >>conftest.$ac_ext <<_ACEOF
18872/* end confdefs.h. */
7bbec45b 18873#include <stdio.h>
503d2be0
AS
18874int
18875main ()
18876{
7bbec45b 18877return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18878 ;
18879 return 0;
18880}
18881_ACEOF
f053c89f
CY
18882rm -f conftest.$ac_objext conftest$ac_exeext
18883if { (ac_try="$ac_link"
ca81d7a0
JD
18884case "(($ac_try" in
18885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18886 *) ac_try_echo=$ac_try;;
18887esac
7bbec45b 18888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18889 (eval "$ac_link") 2>conftest.er1
b936fae4 18890 ac_status=$?
edfaf76d
LK
18891 grep -v '^ *+' conftest.er1 >conftest.err
18892 rm -f conftest.er1
18893 cat conftest.err >&5
7bbec45b 18894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18895 (exit $ac_status); } && {
18896 test -z "$ac_c_werror_flag" ||
18897 test ! -s conftest.err
7bbec45b
CY
18898 } && test -s conftest$ac_exeext &&
18899 $as_test_x conftest$ac_exeext; then
f053c89f 18900 ac_cv_sys_largefile_source=no; break
b936fae4 18901else
7bbec45b 18902 echo "$as_me: failed program was:" >&5
19650fd6
AS
18903sed 's/^/| /' conftest.$ac_ext >&5
18904
ca81d7a0 18905
b936fae4 18906fi
ca81d7a0 18907
f053c89f
CY
18908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18909 conftest$ac_exeext conftest.$ac_ext
b936fae4 18910 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18911/* confdefs.h. */
18912_ACEOF
18913cat confdefs.h >>conftest.$ac_ext
18914cat >>conftest.$ac_ext <<_ACEOF
18915/* end confdefs.h. */
b936fae4 18916#define _LARGEFILE_SOURCE 1
7bbec45b 18917#include <stdio.h>
b936fae4
AS
18918int
18919main ()
18920{
7bbec45b 18921return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18922 ;
18923 return 0;
18924}
18925_ACEOF
f053c89f
CY
18926rm -f conftest.$ac_objext conftest$ac_exeext
18927if { (ac_try="$ac_link"
ca81d7a0
JD
18928case "(($ac_try" in
18929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18930 *) ac_try_echo=$ac_try;;
18931esac
7bbec45b 18932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18933 (eval "$ac_link") 2>conftest.er1
b936fae4 18934 ac_status=$?
edfaf76d
LK
18935 grep -v '^ *+' conftest.er1 >conftest.err
18936 rm -f conftest.er1
18937 cat conftest.err >&5
7bbec45b 18938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18939 (exit $ac_status); } && {
18940 test -z "$ac_c_werror_flag" ||
18941 test ! -s conftest.err
7bbec45b
CY
18942 } && test -s conftest$ac_exeext &&
18943 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18944 ac_cv_sys_largefile_source=1; break
18945else
7bbec45b 18946 echo "$as_me: failed program was:" >&5
19650fd6
AS
18947sed 's/^/| /' conftest.$ac_ext >&5
18948
ca81d7a0 18949
b936fae4 18950fi
ca81d7a0 18951
f053c89f
CY
18952rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18953 conftest$ac_exeext conftest.$ac_ext
18954 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18955 break
18956done
18957fi
7bbec45b
CY
18958{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18959echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18960case $ac_cv_sys_largefile_source in #(
18961 no | unknown) ;;
18962 *)
c0d27fcc 18963cat >>confdefs.h <<_ACEOF
b936fae4 18964#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18965_ACEOF
f053c89f
CY
18966;;
18967esac
7bbec45b 18968rm -f conftest*
4c343001 18969
b936fae4
AS
18970# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18971# in glibc 2.1.3, but that breaks too many other things.
18972# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18973if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18974
c0d27fcc 18975cat >>confdefs.h <<\_ACEOF
b936fae4 18976#define HAVE_FSEEKO 1
c0d27fcc 18977_ACEOF
b936fae4 18978
4c343001
DL
18979fi
18980
c0d27fcc 18981
52dbaac8
PE
18982# Configure getopt.
18983# getopt.m4 serial 10
18984
18985# The getopt module assume you want GNU getopt, with getopt_long etc,
18986# rather than vanilla POSIX getopt. This means your your code should
18987# always include <getopt.h> for the getopt prototypes.
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999# Prerequisites of lib/getopt*.
19000
19001
19002
10a3b1a1 19003
52dbaac8
PE
19004 GETOPT_H=
19005
19006for ac_header in getopt.h
19007do
7bbec45b 19008as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 19009if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
19010 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19011echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 19012if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 19013 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8 19014fi
7bbec45b
CY
19015ac_res=`eval echo '${'$as_ac_Header'}'`
19016 { echo "$as_me:$LINENO: result: $ac_res" >&5
19017echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19018else
19019 # Is the header compilable?
7bbec45b
CY
19020{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19021echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19022cat >conftest.$ac_ext <<_ACEOF
19023/* confdefs.h. */
19024_ACEOF
19025cat confdefs.h >>conftest.$ac_ext
19026cat >>conftest.$ac_ext <<_ACEOF
19027/* end confdefs.h. */
19028$ac_includes_default
19029#include <$ac_header>
19030_ACEOF
19031rm -f conftest.$ac_objext
ca81d7a0
JD
19032if { (ac_try="$ac_compile"
19033case "(($ac_try" in
19034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19035 *) ac_try_echo=$ac_try;;
19036esac
7bbec45b 19037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19038 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19039 ac_status=$?
19040 grep -v '^ *+' conftest.er1 >conftest.err
19041 rm -f conftest.er1
19042 cat conftest.err >&5
7bbec45b 19043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19044 (exit $ac_status); } && {
19045 test -z "$ac_c_werror_flag" ||
19046 test ! -s conftest.err
19047 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19048 ac_header_compiler=yes
19049else
7bbec45b 19050 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19051sed 's/^/| /' conftest.$ac_ext >&5
19052
ca81d7a0 19053 ac_header_compiler=no
52dbaac8 19054fi
ca81d7a0
JD
19055
19056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
19057{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19058echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19059
19060# Is the header present?
7bbec45b
CY
19061{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19062echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19063cat >conftest.$ac_ext <<_ACEOF
19064/* confdefs.h. */
19065_ACEOF
19066cat confdefs.h >>conftest.$ac_ext
19067cat >>conftest.$ac_ext <<_ACEOF
19068/* end confdefs.h. */
19069#include <$ac_header>
19070_ACEOF
ca81d7a0
JD
19071if { (ac_try="$ac_cpp conftest.$ac_ext"
19072case "(($ac_try" in
19073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19074 *) ac_try_echo=$ac_try;;
19075esac
7bbec45b 19076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19077 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19078 ac_status=$?
19079 grep -v '^ *+' conftest.er1 >conftest.err
19080 rm -f conftest.er1
19081 cat conftest.err >&5
7bbec45b 19082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19083 (exit $ac_status); } >/dev/null && {
19084 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19085 test ! -s conftest.err
19086 }; then
52dbaac8
PE
19087 ac_header_preproc=yes
19088else
7bbec45b 19089 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19090sed 's/^/| /' conftest.$ac_ext >&5
19091
19092 ac_header_preproc=no
19093fi
ca81d7a0 19094
52dbaac8 19095rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
19096{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19097echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19098
19099# So? What about this header?
19100case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19101 yes:no: )
7bbec45b
CY
19102 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19103echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19104 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19105echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
52dbaac8
PE
19106 ac_header_preproc=yes
19107 ;;
19108 no:yes:* )
7bbec45b
CY
19109 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19110echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19111 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19112echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19113 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19114echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19115 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19116echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19117 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19118echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19119 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19120echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19121
52dbaac8
PE
19122 ;;
19123esac
7bbec45b
CY
19124{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19125echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 19126if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 19127 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19128else
19129 eval "$as_ac_Header=\$ac_header_preproc"
19130fi
7bbec45b
CY
19131ac_res=`eval echo '${'$as_ac_Header'}'`
19132 { echo "$as_me:$LINENO: result: $ac_res" >&5
19133echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19134
19135fi
7bbec45b 19136if test `eval echo '${'$as_ac_Header'}'` = yes; then
52dbaac8 19137 cat >>confdefs.h <<_ACEOF
7bbec45b 19138#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
52dbaac8
PE
19139_ACEOF
19140
19141else
19142 GETOPT_H=getopt.h
19143fi
19144
19145done
19146
19147 if test -z "$GETOPT_H"; then
19148
19149for ac_func in getopt_long_only
19150do
7bbec45b
CY
19151as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19152{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19153echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19154if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 19155 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19156else
19157 cat >conftest.$ac_ext <<_ACEOF
19158/* confdefs.h. */
19159_ACEOF
19160cat confdefs.h >>conftest.$ac_ext
19161cat >>conftest.$ac_ext <<_ACEOF
19162/* end confdefs.h. */
19163/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19164 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19165#define $ac_func innocuous_$ac_func
19166
19167/* System header to define __stub macros and hopefully few prototypes,
19168 which can conflict with char $ac_func (); below.
19169 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19170 <limits.h> exists even on freestanding compilers. */
19171
19172#ifdef __STDC__
19173# include <limits.h>
19174#else
19175# include <assert.h>
19176#endif
19177
19178#undef $ac_func
19179
ca81d7a0
JD
19180/* Override any GCC internal prototype to avoid an error.
19181 Use char because int might match the return type of a GCC
19182 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19183#ifdef __cplusplus
19184extern "C"
52dbaac8 19185#endif
52dbaac8
PE
19186char $ac_func ();
19187/* The GNU C library defines this for functions which it implements
19188 to always fail with ENOSYS. Some functions are actually named
19189 something starting with __ and the normal name is an alias. */
ca81d7a0 19190#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19191choke me
52dbaac8
PE
19192#endif
19193
19194int
19195main ()
19196{
ca81d7a0 19197return $ac_func ();
52dbaac8
PE
19198 ;
19199 return 0;
19200}
19201_ACEOF
19202rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19203if { (ac_try="$ac_link"
19204case "(($ac_try" in
19205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19206 *) ac_try_echo=$ac_try;;
19207esac
7bbec45b 19208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19209 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19210 ac_status=$?
19211 grep -v '^ *+' conftest.er1 >conftest.err
19212 rm -f conftest.er1
19213 cat conftest.err >&5
7bbec45b 19214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19215 (exit $ac_status); } && {
19216 test -z "$ac_c_werror_flag" ||
19217 test ! -s conftest.err
7bbec45b
CY
19218 } && test -s conftest$ac_exeext &&
19219 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19220 eval "$as_ac_var=yes"
19221else
7bbec45b 19222 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19223sed 's/^/| /' conftest.$ac_ext >&5
19224
ca81d7a0 19225 eval "$as_ac_var=no"
52dbaac8 19226fi
ca81d7a0 19227
f053c89f 19228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19229 conftest$ac_exeext conftest.$ac_ext
19230fi
7bbec45b
CY
19231ac_res=`eval echo '${'$as_ac_var'}'`
19232 { echo "$as_me:$LINENO: result: $ac_res" >&5
19233echo "${ECHO_T}$ac_res" >&6; }
19234if test `eval echo '${'$as_ac_var'}'` = yes; then
52dbaac8 19235 cat >>confdefs.h <<_ACEOF
7bbec45b 19236#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
52dbaac8
PE
19237_ACEOF
19238
19239else
19240 GETOPT_H=getopt.h
19241fi
19242done
19243
19244 fi
19245
19246 if test -z "$GETOPT_H"; then
7bbec45b
CY
19247 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19248echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8 19249if test "${ac_cv_have_decl_optreset+set}" = set; then
7bbec45b 19250 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19251else
19252 cat >conftest.$ac_ext <<_ACEOF
19253/* confdefs.h. */
19254_ACEOF
19255cat confdefs.h >>conftest.$ac_ext
19256cat >>conftest.$ac_ext <<_ACEOF
19257/* end confdefs.h. */
19258#include <getopt.h>
19259
19260int
19261main ()
19262{
19263#ifndef optreset
f053c89f 19264 (void) optreset;
52dbaac8
PE
19265#endif
19266
19267 ;
19268 return 0;
19269}
19270_ACEOF
19271rm -f conftest.$ac_objext
ca81d7a0
JD
19272if { (ac_try="$ac_compile"
19273case "(($ac_try" in
19274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19275 *) ac_try_echo=$ac_try;;
19276esac
7bbec45b 19277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19278 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19279 ac_status=$?
19280 grep -v '^ *+' conftest.er1 >conftest.err
19281 rm -f conftest.er1
19282 cat conftest.err >&5
7bbec45b 19283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19284 (exit $ac_status); } && {
19285 test -z "$ac_c_werror_flag" ||
19286 test ! -s conftest.err
19287 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19288 ac_cv_have_decl_optreset=yes
19289else
7bbec45b 19290 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19291sed 's/^/| /' conftest.$ac_ext >&5
19292
ca81d7a0 19293 ac_cv_have_decl_optreset=no
52dbaac8 19294fi
ca81d7a0
JD
19295
19296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19297fi
7bbec45b
CY
19298{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19299echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
b0448899 19300if test $ac_cv_have_decl_optreset = yes; then
52dbaac8
PE
19301 GETOPT_H=getopt.h
19302fi
19303
19304 fi
19305
19306 if test -z "$GETOPT_H"; then
7bbec45b
CY
19307 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19308echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8 19309if test "${gl_cv_func_gnu_getopt+set}" = set; then
7bbec45b 19310 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19311else
19312 if test "$cross_compiling" = yes; then
7bbec45b
CY
19313 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19314echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8 19315if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
7bbec45b 19316 echo $ECHO_N "(cached) $ECHO_C" >&6
52dbaac8
PE
19317else
19318 cat >conftest.$ac_ext <<_ACEOF
19319/* confdefs.h. */
19320_ACEOF
19321cat confdefs.h >>conftest.$ac_ext
19322cat >>conftest.$ac_ext <<_ACEOF
19323/* end confdefs.h. */
19324#include <getopt.h>
19325
19326int
19327main ()
19328{
19329#ifndef getopt_clip
f053c89f 19330 (void) getopt_clip;
52dbaac8
PE
19331#endif
19332
19333 ;
19334 return 0;
19335}
19336_ACEOF
19337rm -f conftest.$ac_objext
ca81d7a0
JD
19338if { (ac_try="$ac_compile"
19339case "(($ac_try" in
19340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19341 *) ac_try_echo=$ac_try;;
19342esac
7bbec45b 19343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19344 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19345 ac_status=$?
19346 grep -v '^ *+' conftest.er1 >conftest.err
19347 rm -f conftest.er1
19348 cat conftest.err >&5
7bbec45b 19349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19350 (exit $ac_status); } && {
19351 test -z "$ac_c_werror_flag" ||
19352 test ! -s conftest.err
19353 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19354 ac_cv_have_decl_getopt_clip=yes
19355else
7bbec45b 19356 echo "$as_me: failed program was:" >&5
52dbaac8
PE
19357sed 's/^/| /' conftest.$ac_ext >&5
19358
ca81d7a0 19359 ac_cv_have_decl_getopt_clip=no
52dbaac8 19360fi
ca81d7a0
JD
19361
19362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19363fi
7bbec45b
CY
19364{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19365echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
b0448899 19366if test $ac_cv_have_decl_getopt_clip = yes; then
52dbaac8
PE
19367 gl_cv_func_gnu_getopt=no
19368else
19369 gl_cv_func_gnu_getopt=yes
19370fi
19371
19372else
19373 cat >conftest.$ac_ext <<_ACEOF
19374/* confdefs.h. */
19375_ACEOF
19376cat confdefs.h >>conftest.$ac_ext
19377cat >>conftest.$ac_ext <<_ACEOF
19378/* end confdefs.h. */
19379#include <getopt.h>
19380int
19381main ()
19382{
19383
19384 char *myargv[3];
19385 myargv[0] = "conftest";
19386 myargv[1] = "-+";
19387 myargv[2] = 0;
19388 return getopt (2, myargv, "+a") != '?';
19389
19390 ;
19391 return 0;
19392}
19393_ACEOF
19394rm -f conftest$ac_exeext
ca81d7a0
JD
19395if { (ac_try="$ac_link"
19396case "(($ac_try" in
19397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19398 *) ac_try_echo=$ac_try;;
19399esac
7bbec45b 19400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19401 (eval "$ac_link") 2>&5
52dbaac8 19402 ac_status=$?
7bbec45b 19403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
52dbaac8 19404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19405 { (case "(($ac_try" in
19406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19407 *) ac_try_echo=$ac_try;;
19408esac
7bbec45b 19409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19410 (eval "$ac_try") 2>&5
52dbaac8 19411 ac_status=$?
7bbec45b 19412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
52dbaac8
PE
19413 (exit $ac_status); }; }; then
19414 gl_cv_func_gnu_getopt=yes
19415else
7bbec45b
CY
19416 echo "$as_me: program exited with status $ac_status" >&5
19417echo "$as_me: failed program was:" >&5
52dbaac8
PE
19418sed 's/^/| /' conftest.$ac_ext >&5
19419
19420( exit $ac_status )
19421gl_cv_func_gnu_getopt=no
19422fi
ca81d7a0 19423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19424fi
ca81d7a0
JD
19425
19426
52dbaac8 19427fi
7bbec45b
CY
19428{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19429echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19430 if test "$gl_cv_func_gnu_getopt" = "no"; then
19431 GETOPT_H=getopt.h
19432 fi
19433 fi
19434
19435
19436
19437 if test -n "$GETOPT_H"; then
19438
19439
19440 GETOPT_H=getopt.h
19441
19442cat >>confdefs.h <<\_ACEOF
19443#define __GETOPT_PREFIX rpl_
19444_ACEOF
19445
19446
19447
19448 :
19449 GETOPTOBJS='getopt.o getopt1.o'
19450
19451fi
19452
19453
19454
19455
7bbec45b
CY
19456{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19457echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3 19458if test "${ac_cv_func_getpgrp_void+set}" = set; then
7bbec45b 19459 echo $ECHO_N "(cached) $ECHO_C" >&6
cd958eb3
MB
19460else
19461 # Use it with a single arg.
19462cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19463/* confdefs.h. */
19464_ACEOF
19465cat confdefs.h >>conftest.$ac_ext
19466cat >>conftest.$ac_ext <<_ACEOF
19467/* end confdefs.h. */
cd958eb3
MB
19468$ac_includes_default
19469int
19470main ()
19471{
19472getpgrp (0);
19473 ;
19474 return 0;
19475}
19476_ACEOF
19477rm -f conftest.$ac_objext
ca81d7a0
JD
19478if { (ac_try="$ac_compile"
19479case "(($ac_try" in
19480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19481 *) ac_try_echo=$ac_try;;
19482esac
7bbec45b 19483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19484 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19485 ac_status=$?
edfaf76d
LK
19486 grep -v '^ *+' conftest.er1 >conftest.err
19487 rm -f conftest.er1
19488 cat conftest.err >&5
7bbec45b 19489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19490 (exit $ac_status); } && {
19491 test -z "$ac_c_werror_flag" ||
19492 test ! -s conftest.err
19493 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19494 ac_cv_func_getpgrp_void=no
19495else
7bbec45b 19496 echo "$as_me: failed program was:" >&5
19650fd6
AS
19497sed 's/^/| /' conftest.$ac_ext >&5
19498
ca81d7a0 19499 ac_cv_func_getpgrp_void=yes
cd958eb3 19500fi
ca81d7a0
JD
19501
19502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19503
19504fi
7bbec45b
CY
19505{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19506echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19507if test $ac_cv_func_getpgrp_void = yes; then
19508
19509cat >>confdefs.h <<\_ACEOF
19510#define GETPGRP_VOID 1
19511_ACEOF
19512
19513fi
19514
19515
973a76b1
DL
19516
19517for ac_func in strftime
19518do
7bbec45b
CY
19519as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19520{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19521echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19522if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 19523 echo $ECHO_N "(cached) $ECHO_C" >&6
973a76b1
DL
19524else
19525 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19526/* confdefs.h. */
19527_ACEOF
19528cat confdefs.h >>conftest.$ac_ext
19529cat >>conftest.$ac_ext <<_ACEOF
19530/* end confdefs.h. */
edfaf76d
LK
19531/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19532 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19533#define $ac_func innocuous_$ac_func
19534
973a76b1 19535/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19536 which can conflict with char $ac_func (); below.
19537 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19538 <limits.h> exists even on freestanding compilers. */
edfaf76d 19539
19650fd6
AS
19540#ifdef __STDC__
19541# include <limits.h>
19542#else
19543# include <assert.h>
19544#endif
edfaf76d
LK
19545
19546#undef $ac_func
19547
ca81d7a0
JD
19548/* Override any GCC internal prototype to avoid an error.
19549 Use char because int might match the return type of a GCC
19550 builtin and then its argument prototype would still apply. */
973a76b1
DL
19551#ifdef __cplusplus
19552extern "C"
973a76b1 19553#endif
973a76b1
DL
19554char $ac_func ();
19555/* The GNU C library defines this for functions which it implements
19556 to always fail with ENOSYS. Some functions are actually named
19557 something starting with __ and the normal name is an alias. */
ca81d7a0 19558#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19559choke me
973a76b1
DL
19560#endif
19561
19650fd6
AS
19562int
19563main ()
19564{
ca81d7a0 19565return $ac_func ();
973a76b1
DL
19566 ;
19567 return 0;
19568}
19569_ACEOF
19570rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19571if { (ac_try="$ac_link"
19572case "(($ac_try" in
19573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19574 *) ac_try_echo=$ac_try;;
19575esac
7bbec45b 19576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19577 (eval "$ac_link") 2>conftest.er1
973a76b1 19578 ac_status=$?
edfaf76d
LK
19579 grep -v '^ *+' conftest.er1 >conftest.err
19580 rm -f conftest.er1
19581 cat conftest.err >&5
7bbec45b 19582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19583 (exit $ac_status); } && {
19584 test -z "$ac_c_werror_flag" ||
19585 test ! -s conftest.err
7bbec45b
CY
19586 } && test -s conftest$ac_exeext &&
19587 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19588 eval "$as_ac_var=yes"
19589else
7bbec45b 19590 echo "$as_me: failed program was:" >&5
19650fd6
AS
19591sed 's/^/| /' conftest.$ac_ext >&5
19592
ca81d7a0 19593 eval "$as_ac_var=no"
973a76b1 19594fi
ca81d7a0 19595
f053c89f 19596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19597 conftest$ac_exeext conftest.$ac_ext
973a76b1 19598fi
7bbec45b
CY
19599ac_res=`eval echo '${'$as_ac_var'}'`
19600 { echo "$as_me:$LINENO: result: $ac_res" >&5
19601echo "${ECHO_T}$ac_res" >&6; }
19602if test `eval echo '${'$as_ac_var'}'` = yes; then
973a76b1 19603 cat >>confdefs.h <<_ACEOF
7bbec45b 19604#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
973a76b1
DL
19605_ACEOF
19606
19607else
19608 # strftime is in -lintl on SCO UNIX.
7bbec45b
CY
19609{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19610echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1 19611if test "${ac_cv_lib_intl_strftime+set}" = set; then
7bbec45b 19612 echo $ECHO_N "(cached) $ECHO_C" >&6
973a76b1
DL
19613else
19614 ac_check_lib_save_LIBS=$LIBS
19615LIBS="-lintl $LIBS"
19616cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19617/* confdefs.h. */
19618_ACEOF
19619cat confdefs.h >>conftest.$ac_ext
19620cat >>conftest.$ac_ext <<_ACEOF
19621/* end confdefs.h. */
973a76b1 19622
ca81d7a0
JD
19623/* Override any GCC internal prototype to avoid an error.
19624 Use char because int might match the return type of a GCC
19625 builtin and then its argument prototype would still apply. */
973a76b1
DL
19626#ifdef __cplusplus
19627extern "C"
19628#endif
973a76b1
DL
19629char strftime ();
19630int
19631main ()
19632{
ca81d7a0 19633return strftime ();
973a76b1
DL
19634 ;
19635 return 0;
19636}
19637_ACEOF
19638rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19639if { (ac_try="$ac_link"
19640case "(($ac_try" in
19641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19642 *) ac_try_echo=$ac_try;;
19643esac
7bbec45b 19644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19645 (eval "$ac_link") 2>conftest.er1
973a76b1 19646 ac_status=$?
edfaf76d
LK
19647 grep -v '^ *+' conftest.er1 >conftest.err
19648 rm -f conftest.er1
19649 cat conftest.err >&5
7bbec45b 19650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19651 (exit $ac_status); } && {
19652 test -z "$ac_c_werror_flag" ||
19653 test ! -s conftest.err
7bbec45b
CY
19654 } && test -s conftest$ac_exeext &&
19655 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19656 ac_cv_lib_intl_strftime=yes
19657else
7bbec45b 19658 echo "$as_me: failed program was:" >&5
19650fd6
AS
19659sed 's/^/| /' conftest.$ac_ext >&5
19660
ca81d7a0 19661 ac_cv_lib_intl_strftime=no
973a76b1 19662fi
ca81d7a0 19663
f053c89f 19664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19665 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19666LIBS=$ac_check_lib_save_LIBS
19667fi
7bbec45b
CY
19668{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19669echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
b0448899 19670if test $ac_cv_lib_intl_strftime = yes; then
973a76b1
DL
19671 cat >>confdefs.h <<\_ACEOF
19672#define HAVE_STRFTIME 1
19673_ACEOF
19674
19675LIBS="-lintl $LIBS"
19676fi
19677
19678fi
19679done
19680
19681
b936fae4
AS
19682# UNIX98 PTYs.
19683
19684for ac_func in grantpt
503d2be0 19685do
7bbec45b
CY
19686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19687{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19689if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 19690 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19691else
503d2be0 19692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19693/* confdefs.h. */
19694_ACEOF
19695cat confdefs.h >>conftest.$ac_ext
19696cat >>conftest.$ac_ext <<_ACEOF
19697/* end confdefs.h. */
edfaf76d
LK
19698/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19699 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19700#define $ac_func innocuous_$ac_func
19701
503d2be0 19702/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19703 which can conflict with char $ac_func (); below.
19704 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19705 <limits.h> exists even on freestanding compilers. */
edfaf76d 19706
19650fd6
AS
19707#ifdef __STDC__
19708# include <limits.h>
19709#else
19710# include <assert.h>
19711#endif
edfaf76d
LK
19712
19713#undef $ac_func
19714
ca81d7a0
JD
19715/* Override any GCC internal prototype to avoid an error.
19716 Use char because int might match the return type of a GCC
19717 builtin and then its argument prototype would still apply. */
503d2be0
AS
19718#ifdef __cplusplus
19719extern "C"
19720#endif
503d2be0 19721char $ac_func ();
503d2be0
AS
19722/* The GNU C library defines this for functions which it implements
19723 to always fail with ENOSYS. Some functions are actually named
19724 something starting with __ and the normal name is an alias. */
ca81d7a0 19725#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19726choke me
503d2be0 19727#endif
4c343001 19728
19650fd6
AS
19729int
19730main ()
19731{
ca81d7a0 19732return $ac_func ();
503d2be0
AS
19733 ;
19734 return 0;
19735}
19736_ACEOF
19737rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19738if { (ac_try="$ac_link"
19739case "(($ac_try" in
19740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19741 *) ac_try_echo=$ac_try;;
19742esac
7bbec45b 19743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19744 (eval "$ac_link") 2>conftest.er1
503d2be0 19745 ac_status=$?
edfaf76d
LK
19746 grep -v '^ *+' conftest.er1 >conftest.err
19747 rm -f conftest.er1
19748 cat conftest.err >&5
7bbec45b 19749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19750 (exit $ac_status); } && {
19751 test -z "$ac_c_werror_flag" ||
19752 test ! -s conftest.err
7bbec45b
CY
19753 } && test -s conftest$ac_exeext &&
19754 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19755 eval "$as_ac_var=yes"
19756else
7bbec45b 19757 echo "$as_me: failed program was:" >&5
19650fd6
AS
19758sed 's/^/| /' conftest.$ac_ext >&5
19759
ca81d7a0 19760 eval "$as_ac_var=no"
503d2be0 19761fi
ca81d7a0 19762
f053c89f 19763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19764 conftest$ac_exeext conftest.$ac_ext
503d2be0 19765fi
7bbec45b
CY
19766ac_res=`eval echo '${'$as_ac_var'}'`
19767 { echo "$as_me:$LINENO: result: $ac_res" >&5
19768echo "${ECHO_T}$ac_res" >&6; }
19769if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19770 cat >>confdefs.h <<_ACEOF
7bbec45b 19771#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19772_ACEOF
4c343001
DL
19773
19774fi
503d2be0
AS
19775done
19776
c0d27fcc 19777
b936fae4 19778# PTY-related GNU extensions.
4c343001 19779
b936fae4
AS
19780for ac_func in getpt
19781do
7bbec45b
CY
19782as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19783{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19784echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 19785if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 19786 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19787else
b936fae4 19788 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19789/* confdefs.h. */
19790_ACEOF
19791cat confdefs.h >>conftest.$ac_ext
19792cat >>conftest.$ac_ext <<_ACEOF
19793/* end confdefs.h. */
edfaf76d
LK
19794/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19795 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19796#define $ac_func innocuous_$ac_func
19797
087121cc 19798/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19799 which can conflict with char $ac_func (); below.
19800 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19801 <limits.h> exists even on freestanding compilers. */
edfaf76d 19802
19650fd6
AS
19803#ifdef __STDC__
19804# include <limits.h>
19805#else
19806# include <assert.h>
19807#endif
edfaf76d
LK
19808
19809#undef $ac_func
19810
ca81d7a0
JD
19811/* Override any GCC internal prototype to avoid an error.
19812 Use char because int might match the return type of a GCC
19813 builtin and then its argument prototype would still apply. */
503d2be0
AS
19814#ifdef __cplusplus
19815extern "C"
19816#endif
503d2be0 19817char $ac_func ();
087121cc
GM
19818/* The GNU C library defines this for functions which it implements
19819 to always fail with ENOSYS. Some functions are actually named
19820 something starting with __ and the normal name is an alias. */
ca81d7a0 19821#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19822choke me
087121cc
GM
19823#endif
19824
19650fd6
AS
19825int
19826main ()
19827{
ca81d7a0 19828return $ac_func ();
503d2be0
AS
19829 ;
19830 return 0;
19831}
19832_ACEOF
19833rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19834if { (ac_try="$ac_link"
19835case "(($ac_try" in
19836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19837 *) ac_try_echo=$ac_try;;
19838esac
7bbec45b 19839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19840 (eval "$ac_link") 2>conftest.er1
503d2be0 19841 ac_status=$?
edfaf76d
LK
19842 grep -v '^ *+' conftest.er1 >conftest.err
19843 rm -f conftest.er1
19844 cat conftest.err >&5
7bbec45b 19845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19846 (exit $ac_status); } && {
19847 test -z "$ac_c_werror_flag" ||
19848 test ! -s conftest.err
7bbec45b
CY
19849 } && test -s conftest$ac_exeext &&
19850 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19851 eval "$as_ac_var=yes"
19852else
7bbec45b 19853 echo "$as_me: failed program was:" >&5
19650fd6
AS
19854sed 's/^/| /' conftest.$ac_ext >&5
19855
ca81d7a0 19856 eval "$as_ac_var=no"
503d2be0 19857fi
ca81d7a0 19858
f053c89f 19859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19860 conftest$ac_exeext conftest.$ac_ext
503d2be0 19861fi
7bbec45b
CY
19862ac_res=`eval echo '${'$as_ac_var'}'`
19863 { echo "$as_me:$LINENO: result: $ac_res" >&5
19864echo "${ECHO_T}$ac_res" >&6; }
19865if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19866 cat >>confdefs.h <<_ACEOF
7bbec45b 19867#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19868_ACEOF
087121cc 19869
087121cc
GM
19870fi
19871done
19872
c0d27fcc 19873
ba4481b5
DL
19874# Check this now, so that we will NOT find the above functions in ncurses.
19875# That is because we have not set up to link ncurses in lib-src.
19876# It's better to believe a function is not available
19877# than to expect to find it in ncurses.
503d2be0 19878
7bbec45b
CY
19879{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19880echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0 19881if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
7bbec45b 19882 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19883else
503d2be0 19884 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19885LIBS="-lncurses $LIBS"
503d2be0 19886cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19887/* confdefs.h. */
19888_ACEOF
19889cat confdefs.h >>conftest.$ac_ext
19890cat >>conftest.$ac_ext <<_ACEOF
19891/* end confdefs.h. */
503d2be0 19892
ca81d7a0
JD
19893/* Override any GCC internal prototype to avoid an error.
19894 Use char because int might match the return type of a GCC
19895 builtin and then its argument prototype would still apply. */
503d2be0
AS
19896#ifdef __cplusplus
19897extern "C"
19898#endif
503d2be0
AS
19899char tparm ();
19900int
19901main ()
19902{
ca81d7a0 19903return tparm ();
503d2be0
AS
19904 ;
19905 return 0;
19906}
19907_ACEOF
19908rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19909if { (ac_try="$ac_link"
19910case "(($ac_try" in
19911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19912 *) ac_try_echo=$ac_try;;
19913esac
7bbec45b 19914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 19915 (eval "$ac_link") 2>conftest.er1
503d2be0 19916 ac_status=$?
edfaf76d
LK
19917 grep -v '^ *+' conftest.er1 >conftest.err
19918 rm -f conftest.er1
19919 cat conftest.err >&5
7bbec45b 19920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19921 (exit $ac_status); } && {
19922 test -z "$ac_c_werror_flag" ||
19923 test ! -s conftest.err
7bbec45b
CY
19924 } && test -s conftest$ac_exeext &&
19925 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19926 ac_cv_lib_ncurses_tparm=yes
19927else
7bbec45b 19928 echo "$as_me: failed program was:" >&5
19650fd6
AS
19929sed 's/^/| /' conftest.$ac_ext >&5
19930
ca81d7a0 19931 ac_cv_lib_ncurses_tparm=no
503d2be0 19932fi
ca81d7a0 19933
f053c89f 19934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19935 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19936LIBS=$ac_check_lib_save_LIBS
19937fi
7bbec45b
CY
19938{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19939echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
b0448899 19940if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19941 cat >>confdefs.h <<_ACEOF
503d2be0 19942#define HAVE_LIBNCURSES 1
c0d27fcc 19943_ACEOF
ba4481b5
DL
19944
19945 LIBS="-lncurses $LIBS"
19946
ba4481b5
DL
19947fi
19948
c0d27fcc 19949
bc3512d0
CY
19950# Do we have res_init, for detecting changes in /etc/resolv.conf?
19951
19952resolv=no
074767f2 19953cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19954/* confdefs.h. */
19955_ACEOF
19956cat confdefs.h >>conftest.$ac_ext
19957cat >>conftest.$ac_ext <<_ACEOF
19958/* end confdefs.h. */
074767f2
AS
19959#include <netinet/in.h>
19960#include <arpa/nameser.h>
19961#include <resolv.h>
bc3512d0
CY
19962int
19963main ()
19964{
074767f2 19965return res_init();
bc3512d0
CY
19966 ;
19967 return 0;
19968}
19969_ACEOF
19970rm -f conftest.$ac_objext conftest$ac_exeext
19971if { (ac_try="$ac_link"
19972case "(($ac_try" in
19973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19974 *) ac_try_echo=$ac_try;;
19975esac
7bbec45b 19976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
bc3512d0
CY
19977 (eval "$ac_link") 2>conftest.er1
19978 ac_status=$?
19979 grep -v '^ *+' conftest.er1 >conftest.err
19980 rm -f conftest.er1
19981 cat conftest.err >&5
7bbec45b 19982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
bc3512d0
CY
19983 (exit $ac_status); } && {
19984 test -z "$ac_c_werror_flag" ||
19985 test ! -s conftest.err
7bbec45b
CY
19986 } && test -s conftest$ac_exeext &&
19987 $as_test_x conftest$ac_exeext; then
074767f2 19988 have_res_init=yes
bc3512d0 19989else
7bbec45b 19990 echo "$as_me: failed program was:" >&5
bc3512d0
CY
19991sed 's/^/| /' conftest.$ac_ext >&5
19992
074767f2 19993 have_res_init=no
bc3512d0
CY
19994fi
19995
19996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19997 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19998if test "$have_res_init" = no; then
19999 OLIBS="$LIBS"
20000 LIBS="$LIBS -lresolv"
7bbec45b
CY
20001 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
20002echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
bc3512d0
CY
20003 cat >conftest.$ac_ext <<_ACEOF
20004/* confdefs.h. */
20005_ACEOF
20006cat confdefs.h >>conftest.$ac_ext
20007cat >>conftest.$ac_ext <<_ACEOF
20008/* end confdefs.h. */
20009#include <netinet/in.h>
20010#include <arpa/nameser.h>
20011#include <resolv.h>
20012int
20013main ()
20014{
074767f2 20015return res_init();
bc3512d0
CY
20016 ;
20017 return 0;
20018}
20019_ACEOF
20020rm -f conftest.$ac_objext conftest$ac_exeext
20021if { (ac_try="$ac_link"
20022case "(($ac_try" in
20023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20024 *) ac_try_echo=$ac_try;;
20025esac
7bbec45b 20026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
bc3512d0
CY
20027 (eval "$ac_link") 2>conftest.er1
20028 ac_status=$?
20029 grep -v '^ *+' conftest.er1 >conftest.err
20030 rm -f conftest.er1
20031 cat conftest.err >&5
7bbec45b 20032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
bc3512d0
CY
20033 (exit $ac_status); } && {
20034 test -z "$ac_c_werror_flag" ||
20035 test ! -s conftest.err
7bbec45b
CY
20036 } && test -s conftest$ac_exeext &&
20037 $as_test_x conftest$ac_exeext; then
bc3512d0
CY
20038 have_res_init=yes
20039else
7bbec45b 20040 echo "$as_me: failed program was:" >&5
bc3512d0
CY
20041sed 's/^/| /' conftest.$ac_ext >&5
20042
20043 have_res_init=no
20044fi
20045
20046rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20047 conftest$ac_exeext conftest.$ac_ext
7bbec45b
CY
20048 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20049echo "${ECHO_T}$have_res_init" >&6; }
bc3512d0
CY
20050 if test "$have_res_init" = yes ; then
20051 resolv=yes
20052 fi
20053 LIBS="$OLIBS"
20054fi
20055
20056if test "$have_res_init" = yes; then
20057
20058cat >>confdefs.h <<\_ACEOF
20059#define HAVE_RES_INIT 1
20060_ACEOF
20061
20062fi
20063
84e70f78 20064# Do we need the Hesiod library to provide the support routines?
ff1095d1 20065if test "$with_hesiod" != no ; then
84e70f78 20066 # Don't set $LIBS here -- see comments above.
7bbec45b
CY
20067 { echo "$as_me:$LINENO: checking for res_send" >&5
20068echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78 20069if test "${ac_cv_func_res_send+set}" = set; then
7bbec45b 20070 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20071else
20072 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20073/* confdefs.h. */
20074_ACEOF
20075cat confdefs.h >>conftest.$ac_ext
20076cat >>conftest.$ac_ext <<_ACEOF
20077/* end confdefs.h. */
edfaf76d
LK
20078/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20079 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20080#define res_send innocuous_res_send
20081
84e70f78 20082/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20083 which can conflict with char res_send (); below.
20084 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20085 <limits.h> exists even on freestanding compilers. */
edfaf76d 20086
19650fd6
AS
20087#ifdef __STDC__
20088# include <limits.h>
20089#else
20090# include <assert.h>
20091#endif
edfaf76d
LK
20092
20093#undef res_send
20094
ca81d7a0
JD
20095/* Override any GCC internal prototype to avoid an error.
20096 Use char because int might match the return type of a GCC
20097 builtin and then its argument prototype would still apply. */
84e70f78
KR
20098#ifdef __cplusplus
20099extern "C"
20100#endif
84e70f78 20101char res_send ();
84e70f78
KR
20102/* The GNU C library defines this for functions which it implements
20103 to always fail with ENOSYS. Some functions are actually named
20104 something starting with __ and the normal name is an alias. */
ca81d7a0 20105#if defined __stub_res_send || defined __stub___res_send
84e70f78 20106choke me
cd958eb3
MB
20107#endif
20108
19650fd6
AS
20109int
20110main ()
20111{
ca81d7a0 20112return res_send ();
84e70f78
KR
20113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20118if { (ac_try="$ac_link"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
7bbec45b 20123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20124 (eval "$ac_link") 2>conftest.er1
84e70f78 20125 ac_status=$?
edfaf76d
LK
20126 grep -v '^ *+' conftest.er1 >conftest.err
20127 rm -f conftest.er1
20128 cat conftest.err >&5
7bbec45b 20129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20130 (exit $ac_status); } && {
20131 test -z "$ac_c_werror_flag" ||
20132 test ! -s conftest.err
7bbec45b
CY
20133 } && test -s conftest$ac_exeext &&
20134 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20135 ac_cv_func_res_send=yes
20136else
7bbec45b 20137 echo "$as_me: failed program was:" >&5
19650fd6
AS
20138sed 's/^/| /' conftest.$ac_ext >&5
20139
ca81d7a0 20140 ac_cv_func_res_send=no
84e70f78 20141fi
ca81d7a0 20142
f053c89f 20143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20144 conftest$ac_exeext conftest.$ac_ext
84e70f78 20145fi
7bbec45b
CY
20146{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20147echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
b0448899 20148if test $ac_cv_func_res_send = yes; then
84e70f78
KR
20149 :
20150else
7bbec45b
CY
20151 { echo "$as_me:$LINENO: checking for __res_send" >&5
20152echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78 20153if test "${ac_cv_func___res_send+set}" = set; then
7bbec45b 20154 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20155else
20156 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20157/* confdefs.h. */
20158_ACEOF
20159cat confdefs.h >>conftest.$ac_ext
20160cat >>conftest.$ac_ext <<_ACEOF
20161/* end confdefs.h. */
edfaf76d
LK
20162/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20163 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20164#define __res_send innocuous___res_send
20165
84e70f78 20166/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20167 which can conflict with char __res_send (); below.
20168 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20169 <limits.h> exists even on freestanding compilers. */
edfaf76d 20170
19650fd6
AS
20171#ifdef __STDC__
20172# include <limits.h>
20173#else
20174# include <assert.h>
20175#endif
edfaf76d
LK
20176
20177#undef __res_send
20178
ca81d7a0
JD
20179/* Override any GCC internal prototype to avoid an error.
20180 Use char because int might match the return type of a GCC
20181 builtin and then its argument prototype would still apply. */
84e70f78
KR
20182#ifdef __cplusplus
20183extern "C"
20184#endif
84e70f78 20185char __res_send ();
84e70f78
KR
20186/* The GNU C library defines this for functions which it implements
20187 to always fail with ENOSYS. Some functions are actually named
20188 something starting with __ and the normal name is an alias. */
ca81d7a0 20189#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20190choke me
84e70f78
KR
20191#endif
20192
19650fd6
AS
20193int
20194main ()
20195{
ca81d7a0 20196return __res_send ();
84e70f78
KR
20197 ;
20198 return 0;
20199}
20200_ACEOF
20201rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20202if { (ac_try="$ac_link"
20203case "(($ac_try" in
20204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20205 *) ac_try_echo=$ac_try;;
20206esac
7bbec45b 20207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20208 (eval "$ac_link") 2>conftest.er1
84e70f78 20209 ac_status=$?
edfaf76d
LK
20210 grep -v '^ *+' conftest.er1 >conftest.err
20211 rm -f conftest.er1
20212 cat conftest.err >&5
7bbec45b 20213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20214 (exit $ac_status); } && {
20215 test -z "$ac_c_werror_flag" ||
20216 test ! -s conftest.err
7bbec45b
CY
20217 } && test -s conftest$ac_exeext &&
20218 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20219 ac_cv_func___res_send=yes
20220else
7bbec45b 20221 echo "$as_me: failed program was:" >&5
19650fd6
AS
20222sed 's/^/| /' conftest.$ac_ext >&5
20223
ca81d7a0 20224 ac_cv_func___res_send=no
84e70f78 20225fi
ca81d7a0 20226
f053c89f 20227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20228 conftest$ac_exeext conftest.$ac_ext
84e70f78 20229fi
7bbec45b
CY
20230{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20231echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
b0448899 20232if test $ac_cv_func___res_send = yes; then
84e70f78
KR
20233 :
20234else
7bbec45b
CY
20235 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20236echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78 20237if test "${ac_cv_lib_resolv_res_send+set}" = set; then
7bbec45b 20238 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20239else
20240 ac_check_lib_save_LIBS=$LIBS
20241LIBS="-lresolv $LIBS"
20242cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20243/* confdefs.h. */
20244_ACEOF
20245cat confdefs.h >>conftest.$ac_ext
20246cat >>conftest.$ac_ext <<_ACEOF
20247/* end confdefs.h. */
84e70f78 20248
ca81d7a0
JD
20249/* Override any GCC internal prototype to avoid an error.
20250 Use char because int might match the return type of a GCC
20251 builtin and then its argument prototype would still apply. */
84e70f78
KR
20252#ifdef __cplusplus
20253extern "C"
20254#endif
84e70f78
KR
20255char res_send ();
20256int
20257main ()
20258{
ca81d7a0 20259return res_send ();
84e70f78
KR
20260 ;
20261 return 0;
20262}
20263_ACEOF
20264rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20265if { (ac_try="$ac_link"
20266case "(($ac_try" in
20267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20268 *) ac_try_echo=$ac_try;;
20269esac
7bbec45b 20270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20271 (eval "$ac_link") 2>conftest.er1
84e70f78 20272 ac_status=$?
edfaf76d
LK
20273 grep -v '^ *+' conftest.er1 >conftest.err
20274 rm -f conftest.er1
20275 cat conftest.err >&5
7bbec45b 20276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20277 (exit $ac_status); } && {
20278 test -z "$ac_c_werror_flag" ||
20279 test ! -s conftest.err
7bbec45b
CY
20280 } && test -s conftest$ac_exeext &&
20281 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20282 ac_cv_lib_resolv_res_send=yes
20283else
7bbec45b 20284 echo "$as_me: failed program was:" >&5
19650fd6
AS
20285sed 's/^/| /' conftest.$ac_ext >&5
20286
ca81d7a0 20287 ac_cv_lib_resolv_res_send=no
84e70f78 20288fi
ca81d7a0 20289
f053c89f 20290rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20291 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20292LIBS=$ac_check_lib_save_LIBS
20293fi
7bbec45b
CY
20294{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20295echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
b0448899 20296if test $ac_cv_lib_resolv_res_send = yes; then
84e70f78
KR
20297 resolv=yes
20298else
7bbec45b
CY
20299 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20300echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78 20301if test "${ac_cv_lib_resolv___res_send+set}" = set; then
7bbec45b 20302 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20303else
20304 ac_check_lib_save_LIBS=$LIBS
20305LIBS="-lresolv $LIBS"
20306cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20307/* confdefs.h. */
20308_ACEOF
20309cat confdefs.h >>conftest.$ac_ext
20310cat >>conftest.$ac_ext <<_ACEOF
20311/* end confdefs.h. */
84e70f78 20312
ca81d7a0
JD
20313/* Override any GCC internal prototype to avoid an error.
20314 Use char because int might match the return type of a GCC
20315 builtin and then its argument prototype would still apply. */
84e70f78
KR
20316#ifdef __cplusplus
20317extern "C"
20318#endif
84e70f78
KR
20319char __res_send ();
20320int
20321main ()
20322{
ca81d7a0 20323return __res_send ();
84e70f78
KR
20324 ;
20325 return 0;
20326}
20327_ACEOF
20328rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20329if { (ac_try="$ac_link"
20330case "(($ac_try" in
20331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332 *) ac_try_echo=$ac_try;;
20333esac
7bbec45b 20334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20335 (eval "$ac_link") 2>conftest.er1
84e70f78 20336 ac_status=$?
edfaf76d
LK
20337 grep -v '^ *+' conftest.er1 >conftest.err
20338 rm -f conftest.er1
20339 cat conftest.err >&5
7bbec45b 20340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20341 (exit $ac_status); } && {
20342 test -z "$ac_c_werror_flag" ||
20343 test ! -s conftest.err
7bbec45b
CY
20344 } && test -s conftest$ac_exeext &&
20345 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20346 ac_cv_lib_resolv___res_send=yes
20347else
7bbec45b 20348 echo "$as_me: failed program was:" >&5
19650fd6
AS
20349sed 's/^/| /' conftest.$ac_ext >&5
20350
ca81d7a0 20351 ac_cv_lib_resolv___res_send=no
84e70f78 20352fi
ca81d7a0 20353
f053c89f 20354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20355 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20356LIBS=$ac_check_lib_save_LIBS
20357fi
7bbec45b
CY
20358{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20359echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
b0448899 20360if test $ac_cv_lib_resolv___res_send = yes; then
84e70f78
KR
20361 resolv=yes
20362fi
20363
20364fi
20365
20366fi
20367
20368fi
20369
20370 if test "$resolv" = yes ; then
20371 RESOLVLIB=-lresolv
84e70f78
KR
20372 else
20373 RESOLVLIB=
20374 fi
7bbec45b
CY
20375 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20376echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78 20377if test "${ac_cv_func_hes_getmailhost+set}" = set; then
7bbec45b 20378 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20379else
20380 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20381/* confdefs.h. */
20382_ACEOF
20383cat confdefs.h >>conftest.$ac_ext
20384cat >>conftest.$ac_ext <<_ACEOF
20385/* end confdefs.h. */
edfaf76d
LK
20386/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20387 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20388#define hes_getmailhost innocuous_hes_getmailhost
20389
84e70f78 20390/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20391 which can conflict with char hes_getmailhost (); below.
20392 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20393 <limits.h> exists even on freestanding compilers. */
edfaf76d 20394
19650fd6
AS
20395#ifdef __STDC__
20396# include <limits.h>
20397#else
20398# include <assert.h>
20399#endif
edfaf76d
LK
20400
20401#undef hes_getmailhost
20402
ca81d7a0
JD
20403/* Override any GCC internal prototype to avoid an error.
20404 Use char because int might match the return type of a GCC
20405 builtin and then its argument prototype would still apply. */
84e70f78
KR
20406#ifdef __cplusplus
20407extern "C"
20408#endif
84e70f78 20409char hes_getmailhost ();
84e70f78
KR
20410/* The GNU C library defines this for functions which it implements
20411 to always fail with ENOSYS. Some functions are actually named
20412 something starting with __ and the normal name is an alias. */
ca81d7a0 20413#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20414choke me
cd958eb3
MB
20415#endif
20416
19650fd6
AS
20417int
20418main ()
20419{
ca81d7a0 20420return hes_getmailhost ();
84e70f78
KR
20421 ;
20422 return 0;
20423}
20424_ACEOF
20425rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20426if { (ac_try="$ac_link"
20427case "(($ac_try" in
20428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20429 *) ac_try_echo=$ac_try;;
20430esac
7bbec45b 20431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20432 (eval "$ac_link") 2>conftest.er1
84e70f78 20433 ac_status=$?
edfaf76d
LK
20434 grep -v '^ *+' conftest.er1 >conftest.err
20435 rm -f conftest.er1
20436 cat conftest.err >&5
7bbec45b 20437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20438 (exit $ac_status); } && {
20439 test -z "$ac_c_werror_flag" ||
20440 test ! -s conftest.err
7bbec45b
CY
20441 } && test -s conftest$ac_exeext &&
20442 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20443 ac_cv_func_hes_getmailhost=yes
20444else
7bbec45b 20445 echo "$as_me: failed program was:" >&5
19650fd6
AS
20446sed 's/^/| /' conftest.$ac_ext >&5
20447
ca81d7a0 20448 ac_cv_func_hes_getmailhost=no
84e70f78 20449fi
ca81d7a0 20450
f053c89f 20451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20452 conftest$ac_exeext conftest.$ac_ext
84e70f78 20453fi
7bbec45b
CY
20454{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20455echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
b0448899 20456if test $ac_cv_func_hes_getmailhost = yes; then
84e70f78
KR
20457 :
20458else
7bbec45b
CY
20459 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20460echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78 20461if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
7bbec45b 20462 echo $ECHO_N "(cached) $ECHO_C" >&6
84e70f78
KR
20463else
20464 ac_check_lib_save_LIBS=$LIBS
20465LIBS="-lhesiod $RESOLVLIB $LIBS"
20466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
84e70f78 20472
ca81d7a0
JD
20473/* Override any GCC internal prototype to avoid an error.
20474 Use char because int might match the return type of a GCC
20475 builtin and then its argument prototype would still apply. */
84e70f78
KR
20476#ifdef __cplusplus
20477extern "C"
20478#endif
84e70f78
KR
20479char hes_getmailhost ();
20480int
20481main ()
20482{
ca81d7a0 20483return hes_getmailhost ();
84e70f78
KR
20484 ;
20485 return 0;
20486}
20487_ACEOF
20488rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20489if { (ac_try="$ac_link"
20490case "(($ac_try" in
20491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20492 *) ac_try_echo=$ac_try;;
20493esac
7bbec45b 20494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20495 (eval "$ac_link") 2>conftest.er1
84e70f78 20496 ac_status=$?
edfaf76d
LK
20497 grep -v '^ *+' conftest.er1 >conftest.err
20498 rm -f conftest.er1
20499 cat conftest.err >&5
7bbec45b 20500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20501 (exit $ac_status); } && {
20502 test -z "$ac_c_werror_flag" ||
20503 test ! -s conftest.err
7bbec45b
CY
20504 } && test -s conftest$ac_exeext &&
20505 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20506 ac_cv_lib_hesiod_hes_getmailhost=yes
20507else
7bbec45b 20508 echo "$as_me: failed program was:" >&5
19650fd6
AS
20509sed 's/^/| /' conftest.$ac_ext >&5
20510
ca81d7a0 20511 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20512fi
ca81d7a0 20513
f053c89f 20514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20515 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20516LIBS=$ac_check_lib_save_LIBS
20517fi
7bbec45b
CY
20518{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20519echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
b0448899 20520if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20521
c0d27fcc 20522cat >>confdefs.h <<\_ACEOF
84e70f78 20523#define HAVE_LIBHESIOD 1
c0d27fcc 20524_ACEOF
84e70f78
KR
20525
20526else
20527 :
20528fi
20529
20530fi
20531
20532fi
20533
bc3512d0
CY
20534# Do we need libresolv (due to res_init or Hesiod)?
20535if test "$resolv" = yes ; then
20536
20537cat >>confdefs.h <<\_ACEOF
20538#define HAVE_LIBRESOLV 1
20539_ACEOF
20540
20541fi
20542
a21616bd 20543# These tell us which Kerberos-related libraries to use.
ff1095d1 20544if test "${with_kerberos}" != no; then
503d2be0 20545
7bbec45b
CY
20546{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20547echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0 20548if test "${ac_cv_lib_com_err_com_err+set}" = set; then
7bbec45b 20549 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20550else
503d2be0 20551 ac_check_lib_save_LIBS=$LIBS
a21616bd 20552LIBS="-lcom_err $LIBS"
503d2be0 20553cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20554/* confdefs.h. */
20555_ACEOF
20556cat confdefs.h >>conftest.$ac_ext
20557cat >>conftest.$ac_ext <<_ACEOF
20558/* end confdefs.h. */
503d2be0 20559
ca81d7a0
JD
20560/* Override any GCC internal prototype to avoid an error.
20561 Use char because int might match the return type of a GCC
20562 builtin and then its argument prototype would still apply. */
503d2be0
AS
20563#ifdef __cplusplus
20564extern "C"
20565#endif
503d2be0
AS
20566char com_err ();
20567int
20568main ()
20569{
ca81d7a0 20570return com_err ();
503d2be0
AS
20571 ;
20572 return 0;
20573}
20574_ACEOF
20575rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20576if { (ac_try="$ac_link"
20577case "(($ac_try" in
20578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20579 *) ac_try_echo=$ac_try;;
20580esac
7bbec45b 20581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20582 (eval "$ac_link") 2>conftest.er1
503d2be0 20583 ac_status=$?
edfaf76d
LK
20584 grep -v '^ *+' conftest.er1 >conftest.err
20585 rm -f conftest.er1
20586 cat conftest.err >&5
7bbec45b 20587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20588 (exit $ac_status); } && {
20589 test -z "$ac_c_werror_flag" ||
20590 test ! -s conftest.err
7bbec45b
CY
20591 } && test -s conftest$ac_exeext &&
20592 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20593 ac_cv_lib_com_err_com_err=yes
20594else
7bbec45b 20595 echo "$as_me: failed program was:" >&5
19650fd6
AS
20596sed 's/^/| /' conftest.$ac_ext >&5
20597
ca81d7a0 20598 ac_cv_lib_com_err_com_err=no
503d2be0 20599fi
ca81d7a0 20600
f053c89f 20601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20602 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20603LIBS=$ac_check_lib_save_LIBS
20604fi
7bbec45b
CY
20605{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20606echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
b0448899 20607if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20608 cat >>confdefs.h <<_ACEOF
503d2be0 20609#define HAVE_LIBCOM_ERR 1
c0d27fcc 20610_ACEOF
a21616bd
KR
20611
20612 LIBS="-lcom_err $LIBS"
20613
a21616bd
KR
20614fi
20615
c0d27fcc 20616
7bbec45b
CY
20617{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20618echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0 20619if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
7bbec45b 20620 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20621else
503d2be0 20622 ac_check_lib_save_LIBS=$LIBS
a21616bd 20623LIBS="-lk5crypto $LIBS"
503d2be0 20624cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20625/* confdefs.h. */
20626_ACEOF
20627cat confdefs.h >>conftest.$ac_ext
20628cat >>conftest.$ac_ext <<_ACEOF
20629/* end confdefs.h. */
503d2be0 20630
ca81d7a0
JD
20631/* Override any GCC internal prototype to avoid an error.
20632 Use char because int might match the return type of a GCC
20633 builtin and then its argument prototype would still apply. */
503d2be0
AS
20634#ifdef __cplusplus
20635extern "C"
20636#endif
503d2be0
AS
20637char mit_des_cbc_encrypt ();
20638int
20639main ()
20640{
ca81d7a0 20641return mit_des_cbc_encrypt ();
503d2be0
AS
20642 ;
20643 return 0;
20644}
20645_ACEOF
20646rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20647if { (ac_try="$ac_link"
20648case "(($ac_try" in
20649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20650 *) ac_try_echo=$ac_try;;
20651esac
7bbec45b 20652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20653 (eval "$ac_link") 2>conftest.er1
503d2be0 20654 ac_status=$?
edfaf76d
LK
20655 grep -v '^ *+' conftest.er1 >conftest.err
20656 rm -f conftest.er1
20657 cat conftest.err >&5
7bbec45b 20658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20659 (exit $ac_status); } && {
20660 test -z "$ac_c_werror_flag" ||
20661 test ! -s conftest.err
7bbec45b
CY
20662 } && test -s conftest$ac_exeext &&
20663 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20664 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20665else
7bbec45b 20666 echo "$as_me: failed program was:" >&5
19650fd6
AS
20667sed 's/^/| /' conftest.$ac_ext >&5
20668
ca81d7a0 20669 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20670fi
ca81d7a0 20671
f053c89f 20672rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20673 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20674LIBS=$ac_check_lib_save_LIBS
20675fi
7bbec45b
CY
20676{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20677echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
b0448899 20678if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20679 cat >>confdefs.h <<_ACEOF
503d2be0 20680#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20681_ACEOF
a21616bd
KR
20682
20683 LIBS="-lk5crypto $LIBS"
20684
a21616bd
KR
20685fi
20686
c0d27fcc 20687
7bbec45b
CY
20688{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20689echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0 20690if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
7bbec45b 20691 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20692else
503d2be0 20693 ac_check_lib_save_LIBS=$LIBS
a21616bd 20694LIBS="-lcrypto $LIBS"
503d2be0 20695cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20696/* confdefs.h. */
20697_ACEOF
20698cat confdefs.h >>conftest.$ac_ext
20699cat >>conftest.$ac_ext <<_ACEOF
20700/* end confdefs.h. */
503d2be0 20701
ca81d7a0
JD
20702/* Override any GCC internal prototype to avoid an error.
20703 Use char because int might match the return type of a GCC
20704 builtin and then its argument prototype would still apply. */
503d2be0
AS
20705#ifdef __cplusplus
20706extern "C"
20707#endif
503d2be0
AS
20708char mit_des_cbc_encrypt ();
20709int
20710main ()
20711{
ca81d7a0 20712return mit_des_cbc_encrypt ();
503d2be0
AS
20713 ;
20714 return 0;
20715}
20716_ACEOF
20717rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20718if { (ac_try="$ac_link"
20719case "(($ac_try" in
20720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20721 *) ac_try_echo=$ac_try;;
20722esac
7bbec45b 20723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20724 (eval "$ac_link") 2>conftest.er1
503d2be0 20725 ac_status=$?
edfaf76d
LK
20726 grep -v '^ *+' conftest.er1 >conftest.err
20727 rm -f conftest.er1
20728 cat conftest.err >&5
7bbec45b 20729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20730 (exit $ac_status); } && {
20731 test -z "$ac_c_werror_flag" ||
20732 test ! -s conftest.err
7bbec45b
CY
20733 } && test -s conftest$ac_exeext &&
20734 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20735 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20736else
7bbec45b 20737 echo "$as_me: failed program was:" >&5
19650fd6
AS
20738sed 's/^/| /' conftest.$ac_ext >&5
20739
ca81d7a0 20740 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20741fi
ca81d7a0 20742
f053c89f 20743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20744 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20745LIBS=$ac_check_lib_save_LIBS
20746fi
7bbec45b
CY
20747{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20748echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
b0448899 20749if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20750 cat >>confdefs.h <<_ACEOF
503d2be0 20751#define HAVE_LIBCRYPTO 1
c0d27fcc 20752_ACEOF
a21616bd
KR
20753
20754 LIBS="-lcrypto $LIBS"
20755
a21616bd
KR
20756fi
20757
c0d27fcc 20758
7bbec45b
CY
20759{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20760echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0 20761if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
7bbec45b 20762 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20763else
503d2be0 20764 ac_check_lib_save_LIBS=$LIBS
a21616bd 20765LIBS="-lkrb5 $LIBS"
503d2be0 20766cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
a21616bd 20772
ca81d7a0
JD
20773/* Override any GCC internal prototype to avoid an error.
20774 Use char because int might match the return type of a GCC
20775 builtin and then its argument prototype would still apply. */
503d2be0
AS
20776#ifdef __cplusplus
20777extern "C"
20778#endif
503d2be0
AS
20779char krb5_init_context ();
20780int
20781main ()
20782{
ca81d7a0 20783return krb5_init_context ();
503d2be0
AS
20784 ;
20785 return 0;
20786}
20787_ACEOF
20788rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20789if { (ac_try="$ac_link"
20790case "(($ac_try" in
20791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20792 *) ac_try_echo=$ac_try;;
20793esac
7bbec45b 20794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20795 (eval "$ac_link") 2>conftest.er1
503d2be0 20796 ac_status=$?
edfaf76d
LK
20797 grep -v '^ *+' conftest.er1 >conftest.err
20798 rm -f conftest.er1
20799 cat conftest.err >&5
7bbec45b 20800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20801 (exit $ac_status); } && {
20802 test -z "$ac_c_werror_flag" ||
20803 test ! -s conftest.err
7bbec45b
CY
20804 } && test -s conftest$ac_exeext &&
20805 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20806 ac_cv_lib_krb5_krb5_init_context=yes
20807else
7bbec45b 20808 echo "$as_me: failed program was:" >&5
19650fd6
AS
20809sed 's/^/| /' conftest.$ac_ext >&5
20810
ca81d7a0 20811 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20812fi
ca81d7a0 20813
f053c89f 20814rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20815 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20816LIBS=$ac_check_lib_save_LIBS
20817fi
7bbec45b
CY
20818{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20819echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
b0448899 20820if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20821 cat >>confdefs.h <<_ACEOF
503d2be0 20822#define HAVE_LIBKRB5 1
c0d27fcc 20823_ACEOF
a21616bd
KR
20824
20825 LIBS="-lkrb5 $LIBS"
20826
a21616bd
KR
20827fi
20828
ff1095d1 20829 if test "${with_kerberos5}" = no; then
503d2be0 20830
7bbec45b
CY
20831{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20832echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0 20833if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
7bbec45b 20834 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20835else
503d2be0 20836 ac_check_lib_save_LIBS=$LIBS
a21616bd 20837LIBS="-ldes425 $LIBS"
503d2be0 20838cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20839/* confdefs.h. */
20840_ACEOF
20841cat confdefs.h >>conftest.$ac_ext
20842cat >>conftest.$ac_ext <<_ACEOF
20843/* end confdefs.h. */
503d2be0 20844
ca81d7a0
JD
20845/* Override any GCC internal prototype to avoid an error.
20846 Use char because int might match the return type of a GCC
20847 builtin and then its argument prototype would still apply. */
503d2be0
AS
20848#ifdef __cplusplus
20849extern "C"
20850#endif
503d2be0
AS
20851char des_cbc_encrypt ();
20852int
20853main ()
20854{
ca81d7a0 20855return des_cbc_encrypt ();
503d2be0
AS
20856 ;
20857 return 0;
20858}
20859_ACEOF
20860rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20861if { (ac_try="$ac_link"
20862case "(($ac_try" in
20863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20864 *) ac_try_echo=$ac_try;;
20865esac
7bbec45b 20866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20867 (eval "$ac_link") 2>conftest.er1
503d2be0 20868 ac_status=$?
edfaf76d
LK
20869 grep -v '^ *+' conftest.er1 >conftest.err
20870 rm -f conftest.er1
20871 cat conftest.err >&5
7bbec45b 20872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20873 (exit $ac_status); } && {
20874 test -z "$ac_c_werror_flag" ||
20875 test ! -s conftest.err
7bbec45b
CY
20876 } && test -s conftest$ac_exeext &&
20877 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20878 ac_cv_lib_des425_des_cbc_encrypt=yes
20879else
7bbec45b 20880 echo "$as_me: failed program was:" >&5
19650fd6
AS
20881sed 's/^/| /' conftest.$ac_ext >&5
20882
ca81d7a0 20883 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20884fi
ca81d7a0 20885
f053c89f 20886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20887 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20888LIBS=$ac_check_lib_save_LIBS
20889fi
7bbec45b
CY
20890{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20891echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
b0448899 20892if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20893 cat >>confdefs.h <<_ACEOF
503d2be0 20894#define HAVE_LIBDES425 1
c0d27fcc 20895_ACEOF
a21616bd
KR
20896
20897 LIBS="-ldes425 $LIBS"
20898
20899else
503d2be0 20900
7bbec45b
CY
20901{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20902echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0 20903if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
7bbec45b 20904 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20905else
503d2be0 20906 ac_check_lib_save_LIBS=$LIBS
a21616bd 20907LIBS="-ldes $LIBS"
503d2be0 20908cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20909/* confdefs.h. */
20910_ACEOF
20911cat confdefs.h >>conftest.$ac_ext
20912cat >>conftest.$ac_ext <<_ACEOF
20913/* end confdefs.h. */
503d2be0 20914
ca81d7a0
JD
20915/* Override any GCC internal prototype to avoid an error.
20916 Use char because int might match the return type of a GCC
20917 builtin and then its argument prototype would still apply. */
503d2be0
AS
20918#ifdef __cplusplus
20919extern "C"
20920#endif
503d2be0
AS
20921char des_cbc_encrypt ();
20922int
20923main ()
20924{
ca81d7a0 20925return des_cbc_encrypt ();
503d2be0
AS
20926 ;
20927 return 0;
20928}
20929_ACEOF
20930rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20931if { (ac_try="$ac_link"
20932case "(($ac_try" in
20933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20934 *) ac_try_echo=$ac_try;;
20935esac
7bbec45b 20936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 20937 (eval "$ac_link") 2>conftest.er1
503d2be0 20938 ac_status=$?
edfaf76d
LK
20939 grep -v '^ *+' conftest.er1 >conftest.err
20940 rm -f conftest.er1
20941 cat conftest.err >&5
7bbec45b 20942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20943 (exit $ac_status); } && {
20944 test -z "$ac_c_werror_flag" ||
20945 test ! -s conftest.err
7bbec45b
CY
20946 } && test -s conftest$ac_exeext &&
20947 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20948 ac_cv_lib_des_des_cbc_encrypt=yes
20949else
7bbec45b 20950 echo "$as_me: failed program was:" >&5
19650fd6
AS
20951sed 's/^/| /' conftest.$ac_ext >&5
20952
ca81d7a0 20953 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20954fi
ca81d7a0 20955
f053c89f 20956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20957 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20958LIBS=$ac_check_lib_save_LIBS
20959fi
7bbec45b
CY
20960{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20961echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
b0448899 20962if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20963 cat >>confdefs.h <<_ACEOF
503d2be0 20964#define HAVE_LIBDES 1
c0d27fcc 20965_ACEOF
a21616bd
KR
20966
20967 LIBS="-ldes $LIBS"
20968
a21616bd
KR
20969fi
20970
20971fi
20972
c0d27fcc 20973
7bbec45b
CY
20974{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20975echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0 20976if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
7bbec45b 20977 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20978else
503d2be0 20979 ac_check_lib_save_LIBS=$LIBS
a21616bd 20980LIBS="-lkrb4 $LIBS"
503d2be0 20981cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20982/* confdefs.h. */
20983_ACEOF
20984cat confdefs.h >>conftest.$ac_ext
20985cat >>conftest.$ac_ext <<_ACEOF
20986/* end confdefs.h. */
503d2be0 20987
ca81d7a0
JD
20988/* Override any GCC internal prototype to avoid an error.
20989 Use char because int might match the return type of a GCC
20990 builtin and then its argument prototype would still apply. */
503d2be0
AS
20991#ifdef __cplusplus
20992extern "C"
20993#endif
503d2be0
AS
20994char krb_get_cred ();
20995int
20996main ()
20997{
f053c89f 20998return krb_get_cred ();
503d2be0
AS
20999 ;
21000 return 0;
21001}
21002_ACEOF
21003rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
21004if { (ac_try="$ac_link"
21005case "(($ac_try" in
ca81d7a0
JD
21006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21007 *) ac_try_echo=$ac_try;;
21008esac
7bbec45b 21009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21010 (eval "$ac_link") 2>conftest.er1
503d2be0 21011 ac_status=$?
edfaf76d
LK
21012 grep -v '^ *+' conftest.er1 >conftest.err
21013 rm -f conftest.er1
21014 cat conftest.err >&5
7bbec45b 21015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21016 (exit $ac_status); } && {
21017 test -z "$ac_c_werror_flag" ||
21018 test ! -s conftest.err
7bbec45b
CY
21019 } && test -s conftest$ac_exeext &&
21020 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21021 ac_cv_lib_krb4_krb_get_cred=yes
21022else
7bbec45b 21023 echo "$as_me: failed program was:" >&5
19650fd6
AS
21024sed 's/^/| /' conftest.$ac_ext >&5
21025
ca81d7a0 21026 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21027fi
ca81d7a0 21028
f053c89f 21029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21030 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21031LIBS=$ac_check_lib_save_LIBS
21032fi
7bbec45b
CY
21033{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21034echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
b0448899 21035if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21036 cat >>confdefs.h <<_ACEOF
503d2be0 21037#define HAVE_LIBKRB4 1
c0d27fcc 21038_ACEOF
a21616bd
KR
21039
21040 LIBS="-lkrb4 $LIBS"
21041
21042else
503d2be0 21043
7bbec45b
CY
21044{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21045echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0 21046if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
7bbec45b 21047 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21048else
503d2be0 21049 ac_check_lib_save_LIBS=$LIBS
a21616bd 21050LIBS="-lkrb $LIBS"
503d2be0 21051cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21052/* confdefs.h. */
21053_ACEOF
21054cat confdefs.h >>conftest.$ac_ext
21055cat >>conftest.$ac_ext <<_ACEOF
21056/* end confdefs.h. */
503d2be0 21057
ca81d7a0
JD
21058/* Override any GCC internal prototype to avoid an error.
21059 Use char because int might match the return type of a GCC
21060 builtin and then its argument prototype would still apply. */
503d2be0
AS
21061#ifdef __cplusplus
21062extern "C"
21063#endif
503d2be0
AS
21064char krb_get_cred ();
21065int
21066main ()
21067{
ca81d7a0 21068return krb_get_cred ();
503d2be0
AS
21069 ;
21070 return 0;
21071}
21072_ACEOF
21073rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21074if { (ac_try="$ac_link"
21075case "(($ac_try" in
21076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21077 *) ac_try_echo=$ac_try;;
21078esac
7bbec45b 21079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21080 (eval "$ac_link") 2>conftest.er1
503d2be0 21081 ac_status=$?
edfaf76d
LK
21082 grep -v '^ *+' conftest.er1 >conftest.err
21083 rm -f conftest.er1
21084 cat conftest.err >&5
7bbec45b 21085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21086 (exit $ac_status); } && {
21087 test -z "$ac_c_werror_flag" ||
21088 test ! -s conftest.err
7bbec45b
CY
21089 } && test -s conftest$ac_exeext &&
21090 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21091 ac_cv_lib_krb_krb_get_cred=yes
21092else
7bbec45b 21093 echo "$as_me: failed program was:" >&5
19650fd6
AS
21094sed 's/^/| /' conftest.$ac_ext >&5
21095
ca81d7a0 21096 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21097fi
ca81d7a0 21098
f053c89f 21099rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21100 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21101LIBS=$ac_check_lib_save_LIBS
21102fi
7bbec45b
CY
21103{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21104echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
b0448899 21105if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21106 cat >>confdefs.h <<_ACEOF
503d2be0 21107#define HAVE_LIBKRB 1
c0d27fcc 21108_ACEOF
a21616bd
KR
21109
21110 LIBS="-lkrb $LIBS"
21111
a21616bd
KR
21112fi
21113
21114fi
21115
21116 fi
21117
ff1095d1 21118 if test "${with_kerberos5}" != no; then
503d2be0
AS
21119
21120for ac_header in krb5.h
a21616bd 21121do
7bbec45b 21122as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21123if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
21124 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21125echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21126if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21127 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21128fi
7bbec45b
CY
21129ac_res=`eval echo '${'$as_ac_Header'}'`
21130 { echo "$as_me:$LINENO: result: $ac_res" >&5
21131echo "${ECHO_T}$ac_res" >&6; }
98418dba 21132else
c0d27fcc 21133 # Is the header compilable?
7bbec45b
CY
21134{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21135echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21136cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21137/* confdefs.h. */
21138_ACEOF
21139cat confdefs.h >>conftest.$ac_ext
21140cat >>conftest.$ac_ext <<_ACEOF
21141/* end confdefs.h. */
c0d27fcc
MR
21142$ac_includes_default
21143#include <$ac_header>
21144_ACEOF
21145rm -f conftest.$ac_objext
ca81d7a0
JD
21146if { (ac_try="$ac_compile"
21147case "(($ac_try" in
21148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21149 *) ac_try_echo=$ac_try;;
21150esac
7bbec45b 21151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21152 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21153 ac_status=$?
edfaf76d
LK
21154 grep -v '^ *+' conftest.er1 >conftest.err
21155 rm -f conftest.er1
21156 cat conftest.err >&5
7bbec45b 21157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21158 (exit $ac_status); } && {
21159 test -z "$ac_c_werror_flag" ||
21160 test ! -s conftest.err
21161 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21162 ac_header_compiler=yes
21163else
7bbec45b 21164 echo "$as_me: failed program was:" >&5
19650fd6
AS
21165sed 's/^/| /' conftest.$ac_ext >&5
21166
ca81d7a0 21167 ac_header_compiler=no
c0d27fcc 21168fi
ca81d7a0
JD
21169
21170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
21171{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21172echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21173
21174# Is the header present?
7bbec45b
CY
21175{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21176echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21178/* confdefs.h. */
21179_ACEOF
21180cat confdefs.h >>conftest.$ac_ext
21181cat >>conftest.$ac_ext <<_ACEOF
21182/* end confdefs.h. */
503d2be0
AS
21183#include <$ac_header>
21184_ACEOF
ca81d7a0
JD
21185if { (ac_try="$ac_cpp conftest.$ac_ext"
21186case "(($ac_try" in
21187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21188 *) ac_try_echo=$ac_try;;
21189esac
7bbec45b 21190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21191 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21192 ac_status=$?
6bae0ccf 21193 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21194 rm -f conftest.er1
21195 cat conftest.err >&5
7bbec45b 21196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21197 (exit $ac_status); } >/dev/null && {
21198 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21199 test ! -s conftest.err
21200 }; then
c0d27fcc 21201 ac_header_preproc=yes
503d2be0 21202else
7bbec45b 21203 echo "$as_me: failed program was:" >&5
19650fd6
AS
21204sed 's/^/| /' conftest.$ac_ext >&5
21205
c0d27fcc 21206 ac_header_preproc=no
a21616bd 21207fi
ca81d7a0 21208
503d2be0 21209rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
21210{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21211echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21212
21213# So? What about this header?
edfaf76d
LK
21214case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21215 yes:no: )
7bbec45b
CY
21216 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21217echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21218 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21219echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21220 ac_header_preproc=yes
19650fd6 21221 ;;
edfaf76d 21222 no:yes:* )
7bbec45b
CY
21223 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21224echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21225 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21226echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21227 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21228echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21229 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21230echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21231 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21232echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21233 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21234echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21235
19650fd6 21236 ;;
c0d27fcc 21237esac
7bbec45b
CY
21238{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21239echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21240if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21241 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21242else
edfaf76d 21243 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21244fi
7bbec45b
CY
21245ac_res=`eval echo '${'$as_ac_Header'}'`
21246 { echo "$as_me:$LINENO: result: $ac_res" >&5
21247echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21248
21249fi
7bbec45b 21250if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21251 cat >>confdefs.h <<_ACEOF
7bbec45b 21252#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21253_ACEOF
7bbec45b
CY
21254 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
21255echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
21287a21 21256if test "${ac_cv_member_krb5_error_text+set}" = set; then
7bbec45b 21257 echo $ECHO_N "(cached) $ECHO_C" >&6
21287a21
CY
21258else
21259 cat >conftest.$ac_ext <<_ACEOF
21260/* confdefs.h. */
21261_ACEOF
21262cat confdefs.h >>conftest.$ac_ext
21263cat >>conftest.$ac_ext <<_ACEOF
21264/* end confdefs.h. */
21265#include <krb5.h>
21266
21267int
21268main ()
21269{
21270static krb5_error ac_aggr;
21271if (ac_aggr.text)
21272return 0;
21273 ;
21274 return 0;
21275}
21276_ACEOF
21277rm -f conftest.$ac_objext
21278if { (ac_try="$ac_compile"
21279case "(($ac_try" in
21280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21281 *) ac_try_echo=$ac_try;;
21282esac
7bbec45b 21283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21284 (eval "$ac_compile") 2>conftest.er1
21285 ac_status=$?
21286 grep -v '^ *+' conftest.er1 >conftest.err
21287 rm -f conftest.er1
21288 cat conftest.err >&5
7bbec45b 21289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21290 (exit $ac_status); } && {
21291 test -z "$ac_c_werror_flag" ||
21292 test ! -s conftest.err
21293 } && test -s conftest.$ac_objext; then
21294 ac_cv_member_krb5_error_text=yes
21295else
7bbec45b 21296 echo "$as_me: failed program was:" >&5
21287a21
CY
21297sed 's/^/| /' conftest.$ac_ext >&5
21298
21299 cat >conftest.$ac_ext <<_ACEOF
21300/* confdefs.h. */
21301_ACEOF
21302cat confdefs.h >>conftest.$ac_ext
21303cat >>conftest.$ac_ext <<_ACEOF
21304/* end confdefs.h. */
21305#include <krb5.h>
21306
21307int
21308main ()
21309{
21310static krb5_error ac_aggr;
21311if (sizeof ac_aggr.text)
21312return 0;
21313 ;
21314 return 0;
21315}
21316_ACEOF
21317rm -f conftest.$ac_objext
21318if { (ac_try="$ac_compile"
21319case "(($ac_try" in
21320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21321 *) ac_try_echo=$ac_try;;
21322esac
7bbec45b 21323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21324 (eval "$ac_compile") 2>conftest.er1
21325 ac_status=$?
21326 grep -v '^ *+' conftest.er1 >conftest.err
21327 rm -f conftest.er1
21328 cat conftest.err >&5
7bbec45b 21329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21330 (exit $ac_status); } && {
21331 test -z "$ac_c_werror_flag" ||
21332 test ! -s conftest.err
21333 } && test -s conftest.$ac_objext; then
21334 ac_cv_member_krb5_error_text=yes
21335else
7bbec45b 21336 echo "$as_me: failed program was:" >&5
21287a21
CY
21337sed 's/^/| /' conftest.$ac_ext >&5
21338
21339 ac_cv_member_krb5_error_text=no
21340fi
21341
21342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21343fi
21344
21345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21346fi
7bbec45b
CY
21347{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
21348echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
b0448899 21349if test $ac_cv_member_krb5_error_text = yes; then
21287a21
CY
21350
21351cat >>confdefs.h <<_ACEOF
21352#define HAVE_KRB5_ERROR_TEXT 1
21353_ACEOF
21354
21355
21356fi
7bbec45b
CY
21357{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
21358echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
21287a21 21359if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
7bbec45b 21360 echo $ECHO_N "(cached) $ECHO_C" >&6
21287a21
CY
21361else
21362 cat >conftest.$ac_ext <<_ACEOF
21363/* confdefs.h. */
21364_ACEOF
21365cat confdefs.h >>conftest.$ac_ext
21366cat >>conftest.$ac_ext <<_ACEOF
21367/* end confdefs.h. */
21368#include <krb5.h>
21369
21370int
21371main ()
21372{
21373static krb5_error ac_aggr;
21374if (ac_aggr.e_text)
21375return 0;
21376 ;
21377 return 0;
21378}
21379_ACEOF
21380rm -f conftest.$ac_objext
21381if { (ac_try="$ac_compile"
21382case "(($ac_try" in
21383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21384 *) ac_try_echo=$ac_try;;
21385esac
7bbec45b 21386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21387 (eval "$ac_compile") 2>conftest.er1
21388 ac_status=$?
21389 grep -v '^ *+' conftest.er1 >conftest.err
21390 rm -f conftest.er1
21391 cat conftest.err >&5
7bbec45b 21392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21393 (exit $ac_status); } && {
21394 test -z "$ac_c_werror_flag" ||
21395 test ! -s conftest.err
21396 } && test -s conftest.$ac_objext; then
21397 ac_cv_member_krb5_error_e_text=yes
21398else
7bbec45b 21399 echo "$as_me: failed program was:" >&5
21287a21
CY
21400sed 's/^/| /' conftest.$ac_ext >&5
21401
21402 cat >conftest.$ac_ext <<_ACEOF
21403/* confdefs.h. */
21404_ACEOF
21405cat confdefs.h >>conftest.$ac_ext
21406cat >>conftest.$ac_ext <<_ACEOF
21407/* end confdefs.h. */
21408#include <krb5.h>
21409
21410int
21411main ()
21412{
21413static krb5_error ac_aggr;
21414if (sizeof ac_aggr.e_text)
21415return 0;
21416 ;
21417 return 0;
21418}
21419_ACEOF
21420rm -f conftest.$ac_objext
21421if { (ac_try="$ac_compile"
21422case "(($ac_try" in
21423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21424 *) ac_try_echo=$ac_try;;
21425esac
7bbec45b 21426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287a21
CY
21427 (eval "$ac_compile") 2>conftest.er1
21428 ac_status=$?
21429 grep -v '^ *+' conftest.er1 >conftest.err
21430 rm -f conftest.er1
21431 cat conftest.err >&5
7bbec45b 21432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287a21
CY
21433 (exit $ac_status); } && {
21434 test -z "$ac_c_werror_flag" ||
21435 test ! -s conftest.err
21436 } && test -s conftest.$ac_objext; then
21437 ac_cv_member_krb5_error_e_text=yes
21438else
7bbec45b 21439 echo "$as_me: failed program was:" >&5
21287a21
CY
21440sed 's/^/| /' conftest.$ac_ext >&5
21441
21442 ac_cv_member_krb5_error_e_text=no
21443fi
21444
21445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21446fi
21447
21448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21449fi
7bbec45b
CY
21450{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
21451echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
b0448899 21452if test $ac_cv_member_krb5_error_e_text = yes; then
21287a21
CY
21453
21454cat >>confdefs.h <<_ACEOF
21455#define HAVE_KRB5_ERROR_E_TEXT 1
21456_ACEOF
21457
21458
21459fi
503d2be0 21460
a21616bd 21461fi
c0d27fcc 21462
a21616bd
KR
21463done
21464
21465 else
503d2be0
AS
21466
21467for ac_header in des.h
a21616bd 21468do
7bbec45b 21469as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21470if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
21471 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21473if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21474 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21475fi
7bbec45b
CY
21476ac_res=`eval echo '${'$as_ac_Header'}'`
21477 { echo "$as_me:$LINENO: result: $ac_res" >&5
21478echo "${ECHO_T}$ac_res" >&6; }
98418dba 21479else
c0d27fcc 21480 # Is the header compilable?
7bbec45b
CY
21481{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21482echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21483cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21484/* confdefs.h. */
21485_ACEOF
21486cat confdefs.h >>conftest.$ac_ext
21487cat >>conftest.$ac_ext <<_ACEOF
21488/* end confdefs.h. */
c0d27fcc
MR
21489$ac_includes_default
21490#include <$ac_header>
21491_ACEOF
21492rm -f conftest.$ac_objext
ca81d7a0
JD
21493if { (ac_try="$ac_compile"
21494case "(($ac_try" in
21495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21496 *) ac_try_echo=$ac_try;;
21497esac
7bbec45b 21498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21499 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21500 ac_status=$?
edfaf76d
LK
21501 grep -v '^ *+' conftest.er1 >conftest.err
21502 rm -f conftest.er1
21503 cat conftest.err >&5
7bbec45b 21504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21505 (exit $ac_status); } && {
21506 test -z "$ac_c_werror_flag" ||
21507 test ! -s conftest.err
21508 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21509 ac_header_compiler=yes
21510else
7bbec45b 21511 echo "$as_me: failed program was:" >&5
19650fd6
AS
21512sed 's/^/| /' conftest.$ac_ext >&5
21513
ca81d7a0 21514 ac_header_compiler=no
c0d27fcc 21515fi
ca81d7a0
JD
21516
21517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
21518{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21519echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21520
21521# Is the header present?
7bbec45b
CY
21522{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21523echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21524cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21525/* confdefs.h. */
21526_ACEOF
21527cat confdefs.h >>conftest.$ac_ext
21528cat >>conftest.$ac_ext <<_ACEOF
21529/* end confdefs.h. */
503d2be0
AS
21530#include <$ac_header>
21531_ACEOF
ca81d7a0
JD
21532if { (ac_try="$ac_cpp conftest.$ac_ext"
21533case "(($ac_try" in
21534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21535 *) ac_try_echo=$ac_try;;
21536esac
7bbec45b 21537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21538 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21539 ac_status=$?
6bae0ccf 21540 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21541 rm -f conftest.er1
21542 cat conftest.err >&5
7bbec45b 21543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21544 (exit $ac_status); } >/dev/null && {
21545 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21546 test ! -s conftest.err
21547 }; then
c0d27fcc 21548 ac_header_preproc=yes
503d2be0 21549else
7bbec45b 21550 echo "$as_me: failed program was:" >&5
19650fd6
AS
21551sed 's/^/| /' conftest.$ac_ext >&5
21552
c0d27fcc 21553 ac_header_preproc=no
a21616bd 21554fi
ca81d7a0 21555
503d2be0 21556rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
21557{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21558echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21559
21560# So? What about this header?
edfaf76d
LK
21561case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21562 yes:no: )
7bbec45b
CY
21563 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21564echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21565 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21566echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21567 ac_header_preproc=yes
19650fd6 21568 ;;
edfaf76d 21569 no:yes:* )
7bbec45b
CY
21570 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21571echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21572 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21573echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21574 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21575echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21576 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21577echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21578 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21579echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21580 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21581echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21582
19650fd6 21583 ;;
c0d27fcc 21584esac
7bbec45b
CY
21585{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21586echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21588 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21589else
edfaf76d 21590 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21591fi
7bbec45b
CY
21592ac_res=`eval echo '${'$as_ac_Header'}'`
21593 { echo "$as_me:$LINENO: result: $ac_res" >&5
21594echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21595
21596fi
7bbec45b 21597if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21598 cat >>confdefs.h <<_ACEOF
7bbec45b 21599#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21600_ACEOF
503d2be0 21601
a21616bd 21602else
503d2be0
AS
21603
21604for ac_header in kerberosIV/des.h
a21616bd 21605do
7bbec45b 21606as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21607if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
21608 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21609echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21610if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21611 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21612fi
7bbec45b
CY
21613ac_res=`eval echo '${'$as_ac_Header'}'`
21614 { echo "$as_me:$LINENO: result: $ac_res" >&5
21615echo "${ECHO_T}$ac_res" >&6; }
98418dba 21616else
c0d27fcc 21617 # Is the header compilable?
7bbec45b
CY
21618{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21619echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21620cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21621/* confdefs.h. */
21622_ACEOF
21623cat confdefs.h >>conftest.$ac_ext
21624cat >>conftest.$ac_ext <<_ACEOF
21625/* end confdefs.h. */
c0d27fcc
MR
21626$ac_includes_default
21627#include <$ac_header>
21628_ACEOF
21629rm -f conftest.$ac_objext
ca81d7a0
JD
21630if { (ac_try="$ac_compile"
21631case "(($ac_try" in
21632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21633 *) ac_try_echo=$ac_try;;
21634esac
7bbec45b 21635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21636 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21637 ac_status=$?
edfaf76d
LK
21638 grep -v '^ *+' conftest.er1 >conftest.err
21639 rm -f conftest.er1
21640 cat conftest.err >&5
7bbec45b 21641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21642 (exit $ac_status); } && {
21643 test -z "$ac_c_werror_flag" ||
21644 test ! -s conftest.err
21645 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21646 ac_header_compiler=yes
21647else
7bbec45b 21648 echo "$as_me: failed program was:" >&5
19650fd6
AS
21649sed 's/^/| /' conftest.$ac_ext >&5
21650
ca81d7a0 21651 ac_header_compiler=no
c0d27fcc 21652fi
ca81d7a0
JD
21653
21654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
21655{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21656echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21657
21658# Is the header present?
7bbec45b
CY
21659{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21660echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21661cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21662/* confdefs.h. */
21663_ACEOF
21664cat confdefs.h >>conftest.$ac_ext
21665cat >>conftest.$ac_ext <<_ACEOF
21666/* end confdefs.h. */
503d2be0
AS
21667#include <$ac_header>
21668_ACEOF
ca81d7a0
JD
21669if { (ac_try="$ac_cpp conftest.$ac_ext"
21670case "(($ac_try" in
21671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21672 *) ac_try_echo=$ac_try;;
21673esac
7bbec45b 21674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21675 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21676 ac_status=$?
6bae0ccf 21677 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21678 rm -f conftest.er1
21679 cat conftest.err >&5
7bbec45b 21680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21681 (exit $ac_status); } >/dev/null && {
21682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21683 test ! -s conftest.err
21684 }; then
c0d27fcc 21685 ac_header_preproc=yes
503d2be0 21686else
7bbec45b 21687 echo "$as_me: failed program was:" >&5
19650fd6
AS
21688sed 's/^/| /' conftest.$ac_ext >&5
21689
c0d27fcc 21690 ac_header_preproc=no
a21616bd 21691fi
ca81d7a0 21692
503d2be0 21693rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
21694{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21695echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21696
21697# So? What about this header?
edfaf76d
LK
21698case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21699 yes:no: )
7bbec45b
CY
21700 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21701echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21702 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21703echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21704 ac_header_preproc=yes
19650fd6 21705 ;;
edfaf76d 21706 no:yes:* )
7bbec45b
CY
21707 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21708echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21709 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21710echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21711 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21712echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21713 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21714echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21715 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21716echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21717 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21718echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21719
19650fd6 21720 ;;
c0d27fcc 21721esac
7bbec45b
CY
21722{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21723echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21724if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21725 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21726else
edfaf76d 21727 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21728fi
7bbec45b
CY
21729ac_res=`eval echo '${'$as_ac_Header'}'`
21730 { echo "$as_me:$LINENO: result: $ac_res" >&5
21731echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21732
21733fi
7bbec45b 21734if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21735 cat >>confdefs.h <<_ACEOF
7bbec45b 21736#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21737_ACEOF
503d2be0 21738
a21616bd 21739else
503d2be0
AS
21740
21741for ac_header in kerberos/des.h
a21616bd 21742do
7bbec45b 21743as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21744if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
21745 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21747if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21748 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21749fi
7bbec45b
CY
21750ac_res=`eval echo '${'$as_ac_Header'}'`
21751 { echo "$as_me:$LINENO: result: $ac_res" >&5
21752echo "${ECHO_T}$ac_res" >&6; }
98418dba 21753else
c0d27fcc 21754 # Is the header compilable?
7bbec45b
CY
21755{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21756echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21757cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21758/* confdefs.h. */
21759_ACEOF
21760cat confdefs.h >>conftest.$ac_ext
21761cat >>conftest.$ac_ext <<_ACEOF
21762/* end confdefs.h. */
c0d27fcc
MR
21763$ac_includes_default
21764#include <$ac_header>
21765_ACEOF
21766rm -f conftest.$ac_objext
ca81d7a0
JD
21767if { (ac_try="$ac_compile"
21768case "(($ac_try" in
21769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21770 *) ac_try_echo=$ac_try;;
21771esac
7bbec45b 21772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21773 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21774 ac_status=$?
edfaf76d
LK
21775 grep -v '^ *+' conftest.er1 >conftest.err
21776 rm -f conftest.er1
21777 cat conftest.err >&5
7bbec45b 21778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21779 (exit $ac_status); } && {
21780 test -z "$ac_c_werror_flag" ||
21781 test ! -s conftest.err
21782 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21783 ac_header_compiler=yes
21784else
7bbec45b 21785 echo "$as_me: failed program was:" >&5
19650fd6
AS
21786sed 's/^/| /' conftest.$ac_ext >&5
21787
ca81d7a0 21788 ac_header_compiler=no
c0d27fcc 21789fi
ca81d7a0
JD
21790
21791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
21792{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21793echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21794
21795# Is the header present?
7bbec45b
CY
21796{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21797echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21798cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21799/* confdefs.h. */
21800_ACEOF
21801cat confdefs.h >>conftest.$ac_ext
21802cat >>conftest.$ac_ext <<_ACEOF
21803/* end confdefs.h. */
503d2be0
AS
21804#include <$ac_header>
21805_ACEOF
ca81d7a0
JD
21806if { (ac_try="$ac_cpp conftest.$ac_ext"
21807case "(($ac_try" in
21808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21809 *) ac_try_echo=$ac_try;;
21810esac
7bbec45b 21811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21812 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21813 ac_status=$?
6bae0ccf 21814 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21815 rm -f conftest.er1
21816 cat conftest.err >&5
7bbec45b 21817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21818 (exit $ac_status); } >/dev/null && {
21819 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21820 test ! -s conftest.err
21821 }; then
c0d27fcc 21822 ac_header_preproc=yes
503d2be0 21823else
7bbec45b 21824 echo "$as_me: failed program was:" >&5
19650fd6
AS
21825sed 's/^/| /' conftest.$ac_ext >&5
21826
c0d27fcc 21827 ac_header_preproc=no
a21616bd 21828fi
ca81d7a0 21829
503d2be0 21830rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
21831{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21832echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21833
21834# So? What about this header?
edfaf76d
LK
21835case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21836 yes:no: )
7bbec45b
CY
21837 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21838echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21839 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21840echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21841 ac_header_preproc=yes
19650fd6 21842 ;;
edfaf76d 21843 no:yes:* )
7bbec45b
CY
21844 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21845echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21846 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21847echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21848 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21849echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21850 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21851echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21852 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21853echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21854 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21855echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21856
19650fd6 21857 ;;
c0d27fcc 21858esac
7bbec45b
CY
21859{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21860echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21861if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21862 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21863else
edfaf76d 21864 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21865fi
7bbec45b
CY
21866ac_res=`eval echo '${'$as_ac_Header'}'`
21867 { echo "$as_me:$LINENO: result: $ac_res" >&5
21868echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21869
21870fi
7bbec45b 21871if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21872 cat >>confdefs.h <<_ACEOF
7bbec45b 21873#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21874_ACEOF
a21616bd
KR
21875
21876fi
c0d27fcc 21877
a21616bd
KR
21878done
21879
98418dba 21880fi
c0d27fcc 21881
925c2f3f
EZ
21882done
21883
98418dba 21884fi
c0d27fcc 21885
925c2f3f 21886done
98418dba 21887
c0d27fcc 21888
925c2f3f
EZ
21889for ac_header in krb.h
21890do
7bbec45b 21891as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 21892if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
21893 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21894echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 21895if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 21896 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21897fi
7bbec45b
CY
21898ac_res=`eval echo '${'$as_ac_Header'}'`
21899 { echo "$as_me:$LINENO: result: $ac_res" >&5
21900echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21901else
21902 # Is the header compilable?
7bbec45b
CY
21903{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21904echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21905cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21906/* confdefs.h. */
21907_ACEOF
21908cat confdefs.h >>conftest.$ac_ext
21909cat >>conftest.$ac_ext <<_ACEOF
21910/* end confdefs.h. */
c0d27fcc
MR
21911$ac_includes_default
21912#include <$ac_header>
21913_ACEOF
21914rm -f conftest.$ac_objext
ca81d7a0
JD
21915if { (ac_try="$ac_compile"
21916case "(($ac_try" in
21917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21918 *) ac_try_echo=$ac_try;;
21919esac
7bbec45b 21920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21921 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21922 ac_status=$?
edfaf76d
LK
21923 grep -v '^ *+' conftest.er1 >conftest.err
21924 rm -f conftest.er1
21925 cat conftest.err >&5
7bbec45b 21926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21927 (exit $ac_status); } && {
21928 test -z "$ac_c_werror_flag" ||
21929 test ! -s conftest.err
21930 } && test -s conftest.$ac_objext; then
c0d27fcc 21931 ac_header_compiler=yes
925c2f3f 21932else
7bbec45b 21933 echo "$as_me: failed program was:" >&5
19650fd6
AS
21934sed 's/^/| /' conftest.$ac_ext >&5
21935
ca81d7a0 21936 ac_header_compiler=no
c0d27fcc 21937fi
ca81d7a0
JD
21938
21939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
21940{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21941echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21942
21943# Is the header present?
7bbec45b
CY
21944{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21945echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21946cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21947/* confdefs.h. */
21948_ACEOF
21949cat confdefs.h >>conftest.$ac_ext
21950cat >>conftest.$ac_ext <<_ACEOF
21951/* end confdefs.h. */
503d2be0
AS
21952#include <$ac_header>
21953_ACEOF
ca81d7a0
JD
21954if { (ac_try="$ac_cpp conftest.$ac_ext"
21955case "(($ac_try" in
21956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21957 *) ac_try_echo=$ac_try;;
21958esac
7bbec45b 21959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 21960 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21961 ac_status=$?
6bae0ccf 21962 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21963 rm -f conftest.er1
21964 cat conftest.err >&5
7bbec45b 21965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21966 (exit $ac_status); } >/dev/null && {
21967 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21968 test ! -s conftest.err
21969 }; then
c0d27fcc 21970 ac_header_preproc=yes
503d2be0 21971else
7bbec45b 21972 echo "$as_me: failed program was:" >&5
19650fd6
AS
21973sed 's/^/| /' conftest.$ac_ext >&5
21974
c0d27fcc 21975 ac_header_preproc=no
a21616bd 21976fi
ca81d7a0 21977
503d2be0 21978rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
21979{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21980echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21981
21982# So? What about this header?
edfaf76d
LK
21983case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21984 yes:no: )
7bbec45b
CY
21985 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21986echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21987 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21988echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 21989 ac_header_preproc=yes
19650fd6 21990 ;;
edfaf76d 21991 no:yes:* )
7bbec45b
CY
21992 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21993echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21994 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21995echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21996 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21997echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21998 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21999echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22000 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22001echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22002 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22003echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22004
19650fd6 22005 ;;
c0d27fcc 22006esac
7bbec45b
CY
22007{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22008echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22009if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22010 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22011else
edfaf76d 22012 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22013fi
7bbec45b
CY
22014ac_res=`eval echo '${'$as_ac_Header'}'`
22015 { echo "$as_me:$LINENO: result: $ac_res" >&5
22016echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22017
22018fi
7bbec45b 22019if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22020 cat >>confdefs.h <<_ACEOF
7bbec45b 22021#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22022_ACEOF
503d2be0 22023
a21616bd 22024else
503d2be0
AS
22025
22026for ac_header in kerberosIV/krb.h
a21616bd 22027do
7bbec45b 22028as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 22029if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
22030 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22031echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22032if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22033 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22034fi
7bbec45b
CY
22035ac_res=`eval echo '${'$as_ac_Header'}'`
22036 { echo "$as_me:$LINENO: result: $ac_res" >&5
22037echo "${ECHO_T}$ac_res" >&6; }
98418dba 22038else
c0d27fcc 22039 # Is the header compilable?
7bbec45b
CY
22040{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22041echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22043/* confdefs.h. */
22044_ACEOF
22045cat confdefs.h >>conftest.$ac_ext
22046cat >>conftest.$ac_ext <<_ACEOF
22047/* end confdefs.h. */
c0d27fcc
MR
22048$ac_includes_default
22049#include <$ac_header>
22050_ACEOF
22051rm -f conftest.$ac_objext
ca81d7a0
JD
22052if { (ac_try="$ac_compile"
22053case "(($ac_try" in
22054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22055 *) ac_try_echo=$ac_try;;
22056esac
7bbec45b 22057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22058 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22059 ac_status=$?
edfaf76d
LK
22060 grep -v '^ *+' conftest.er1 >conftest.err
22061 rm -f conftest.er1
22062 cat conftest.err >&5
7bbec45b 22063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22064 (exit $ac_status); } && {
22065 test -z "$ac_c_werror_flag" ||
22066 test ! -s conftest.err
22067 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22068 ac_header_compiler=yes
22069else
7bbec45b 22070 echo "$as_me: failed program was:" >&5
19650fd6
AS
22071sed 's/^/| /' conftest.$ac_ext >&5
22072
ca81d7a0 22073 ac_header_compiler=no
c0d27fcc 22074fi
ca81d7a0
JD
22075
22076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
22077{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22078echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22079
22080# Is the header present?
7bbec45b
CY
22081{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22082echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22084/* confdefs.h. */
22085_ACEOF
22086cat confdefs.h >>conftest.$ac_ext
22087cat >>conftest.$ac_ext <<_ACEOF
22088/* end confdefs.h. */
503d2be0
AS
22089#include <$ac_header>
22090_ACEOF
ca81d7a0
JD
22091if { (ac_try="$ac_cpp conftest.$ac_ext"
22092case "(($ac_try" in
22093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22094 *) ac_try_echo=$ac_try;;
22095esac
7bbec45b 22096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22098 ac_status=$?
6bae0ccf 22099 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22100 rm -f conftest.er1
22101 cat conftest.err >&5
7bbec45b 22102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22103 (exit $ac_status); } >/dev/null && {
22104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22105 test ! -s conftest.err
22106 }; then
c0d27fcc 22107 ac_header_preproc=yes
503d2be0 22108else
7bbec45b 22109 echo "$as_me: failed program was:" >&5
19650fd6
AS
22110sed 's/^/| /' conftest.$ac_ext >&5
22111
c0d27fcc 22112 ac_header_preproc=no
a21616bd 22113fi
ca81d7a0 22114
503d2be0 22115rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
22116{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22117echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22118
22119# So? What about this header?
edfaf76d
LK
22120case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22121 yes:no: )
7bbec45b
CY
22122 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22123echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22124 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22125echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 22126 ac_header_preproc=yes
19650fd6 22127 ;;
edfaf76d 22128 no:yes:* )
7bbec45b
CY
22129 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22130echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22131 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22132echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22133 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22134echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22135 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22136echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22137 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22138echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22139 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22140echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22141
19650fd6 22142 ;;
c0d27fcc 22143esac
7bbec45b
CY
22144{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22146if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22147 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22148else
edfaf76d 22149 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22150fi
7bbec45b
CY
22151ac_res=`eval echo '${'$as_ac_Header'}'`
22152 { echo "$as_me:$LINENO: result: $ac_res" >&5
22153echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22154
22155fi
7bbec45b 22156if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22157 cat >>confdefs.h <<_ACEOF
7bbec45b 22158#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22159_ACEOF
503d2be0 22160
a21616bd 22161else
503d2be0
AS
22162
22163for ac_header in kerberos/krb.h
a21616bd 22164do
7bbec45b 22165as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 22166if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
22167 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22168echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22169if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22170 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22171fi
7bbec45b
CY
22172ac_res=`eval echo '${'$as_ac_Header'}'`
22173 { echo "$as_me:$LINENO: result: $ac_res" >&5
22174echo "${ECHO_T}$ac_res" >&6; }
98418dba 22175else
c0d27fcc 22176 # Is the header compilable?
7bbec45b
CY
22177{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22178echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22179cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22180/* confdefs.h. */
22181_ACEOF
22182cat confdefs.h >>conftest.$ac_ext
22183cat >>conftest.$ac_ext <<_ACEOF
22184/* end confdefs.h. */
c0d27fcc
MR
22185$ac_includes_default
22186#include <$ac_header>
22187_ACEOF
22188rm -f conftest.$ac_objext
ca81d7a0
JD
22189if { (ac_try="$ac_compile"
22190case "(($ac_try" in
22191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22192 *) ac_try_echo=$ac_try;;
22193esac
7bbec45b 22194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22195 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22196 ac_status=$?
edfaf76d
LK
22197 grep -v '^ *+' conftest.er1 >conftest.err
22198 rm -f conftest.er1
22199 cat conftest.err >&5
7bbec45b 22200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22201 (exit $ac_status); } && {
22202 test -z "$ac_c_werror_flag" ||
22203 test ! -s conftest.err
22204 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22205 ac_header_compiler=yes
22206else
7bbec45b 22207 echo "$as_me: failed program was:" >&5
19650fd6
AS
22208sed 's/^/| /' conftest.$ac_ext >&5
22209
ca81d7a0 22210 ac_header_compiler=no
c0d27fcc 22211fi
ca81d7a0
JD
22212
22213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
22214{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22215echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22216
22217# Is the header present?
7bbec45b
CY
22218{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22219echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22220cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22221/* confdefs.h. */
22222_ACEOF
22223cat confdefs.h >>conftest.$ac_ext
22224cat >>conftest.$ac_ext <<_ACEOF
22225/* end confdefs.h. */
503d2be0
AS
22226#include <$ac_header>
22227_ACEOF
ca81d7a0
JD
22228if { (ac_try="$ac_cpp conftest.$ac_ext"
22229case "(($ac_try" in
22230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22231 *) ac_try_echo=$ac_try;;
22232esac
7bbec45b 22233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22234 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22235 ac_status=$?
6bae0ccf 22236 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22237 rm -f conftest.er1
22238 cat conftest.err >&5
7bbec45b 22239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22240 (exit $ac_status); } >/dev/null && {
22241 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22242 test ! -s conftest.err
22243 }; then
c0d27fcc 22244 ac_header_preproc=yes
503d2be0 22245else
7bbec45b 22246 echo "$as_me: failed program was:" >&5
19650fd6
AS
22247sed 's/^/| /' conftest.$ac_ext >&5
22248
c0d27fcc 22249 ac_header_preproc=no
a21616bd 22250fi
ca81d7a0 22251
503d2be0 22252rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
22253{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22254echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22255
22256# So? What about this header?
edfaf76d
LK
22257case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22258 yes:no: )
7bbec45b
CY
22259 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22260echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22261 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22262echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 22263 ac_header_preproc=yes
19650fd6 22264 ;;
edfaf76d 22265 no:yes:* )
7bbec45b
CY
22266 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22267echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22268 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22269echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22270 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22271echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22272 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22273echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22274 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22275echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22276 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22277echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22278
19650fd6 22279 ;;
c0d27fcc 22280esac
7bbec45b
CY
22281{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22282echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22283if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22284 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22285else
edfaf76d 22286 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22287fi
7bbec45b
CY
22288ac_res=`eval echo '${'$as_ac_Header'}'`
22289 { echo "$as_me:$LINENO: result: $ac_res" >&5
22290echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22291
22292fi
7bbec45b 22293if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22294 cat >>confdefs.h <<_ACEOF
7bbec45b 22295#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22296_ACEOF
503d2be0 22297
a21616bd 22298fi
c0d27fcc 22299
a21616bd
KR
22300done
22301
22302fi
c0d27fcc 22303
a21616bd
KR
22304done
22305
22306fi
c0d27fcc 22307
a21616bd
KR
22308done
22309
22310 fi
503d2be0
AS
22311
22312for ac_header in com_err.h
a21616bd 22313do
7bbec45b 22314as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 22315if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
22316 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22317echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22318if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22319 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22320fi
7bbec45b
CY
22321ac_res=`eval echo '${'$as_ac_Header'}'`
22322 { echo "$as_me:$LINENO: result: $ac_res" >&5
22323echo "${ECHO_T}$ac_res" >&6; }
98418dba 22324else
c0d27fcc 22325 # Is the header compilable?
7bbec45b
CY
22326{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22327echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22328cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22329/* confdefs.h. */
22330_ACEOF
22331cat confdefs.h >>conftest.$ac_ext
22332cat >>conftest.$ac_ext <<_ACEOF
22333/* end confdefs.h. */
c0d27fcc
MR
22334$ac_includes_default
22335#include <$ac_header>
22336_ACEOF
22337rm -f conftest.$ac_objext
ca81d7a0
JD
22338if { (ac_try="$ac_compile"
22339case "(($ac_try" in
22340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22341 *) ac_try_echo=$ac_try;;
22342esac
7bbec45b 22343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22344 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22345 ac_status=$?
22346 grep -v '^ *+' conftest.er1 >conftest.err
22347 rm -f conftest.er1
22348 cat conftest.err >&5
7bbec45b 22349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22350 (exit $ac_status); } && {
22351 test -z "$ac_c_werror_flag" ||
22352 test ! -s conftest.err
22353 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22354 ac_header_compiler=yes
22355else
7bbec45b 22356 echo "$as_me: failed program was:" >&5
19650fd6
AS
22357sed 's/^/| /' conftest.$ac_ext >&5
22358
ca81d7a0 22359 ac_header_compiler=no
c0d27fcc 22360fi
ca81d7a0
JD
22361
22362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
22363{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22364echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22365
22366# Is the header present?
7bbec45b
CY
22367{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22368echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22369cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22370/* confdefs.h. */
22371_ACEOF
22372cat confdefs.h >>conftest.$ac_ext
22373cat >>conftest.$ac_ext <<_ACEOF
22374/* end confdefs.h. */
503d2be0
AS
22375#include <$ac_header>
22376_ACEOF
ca81d7a0
JD
22377if { (ac_try="$ac_cpp conftest.$ac_ext"
22378case "(($ac_try" in
22379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22380 *) ac_try_echo=$ac_try;;
22381esac
7bbec45b 22382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22383 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22384 ac_status=$?
6bae0ccf 22385 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22386 rm -f conftest.er1
22387 cat conftest.err >&5
7bbec45b 22388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22389 (exit $ac_status); } >/dev/null && {
22390 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22391 test ! -s conftest.err
22392 }; then
c0d27fcc 22393 ac_header_preproc=yes
503d2be0 22394else
7bbec45b 22395 echo "$as_me: failed program was:" >&5
19650fd6
AS
22396sed 's/^/| /' conftest.$ac_ext >&5
22397
c0d27fcc 22398 ac_header_preproc=no
a21616bd 22399fi
ca81d7a0 22400
503d2be0 22401rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
22402{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22403echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22404
22405# So? What about this header?
edfaf76d
LK
22406case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22407 yes:no: )
7bbec45b
CY
22408 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22409echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22410 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22411echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 22412 ac_header_preproc=yes
19650fd6 22413 ;;
edfaf76d 22414 no:yes:* )
7bbec45b
CY
22415 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22416echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22417 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22418echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22419 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22420echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22421 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22422echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22423 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22424echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22425 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22426echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22427
19650fd6 22428 ;;
c0d27fcc 22429esac
7bbec45b
CY
22430{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22431echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 22432if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22433 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22434else
edfaf76d 22435 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22436fi
7bbec45b
CY
22437ac_res=`eval echo '${'$as_ac_Header'}'`
22438 { echo "$as_me:$LINENO: result: $ac_res" >&5
22439echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22440
22441fi
7bbec45b 22442if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22443 cat >>confdefs.h <<_ACEOF
7bbec45b 22444#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22445_ACEOF
503d2be0 22446
a21616bd 22447fi
c0d27fcc 22448
a21616bd
KR
22449done
22450
22451fi
22452
ba4481b5
DL
22453# Solaris requires -lintl if you want strerror (which calls dgettext)
22454# to return localized messages.
503d2be0 22455
7bbec45b
CY
22456{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22457echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0 22458if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7bbec45b 22459 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22460else
503d2be0 22461 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22462LIBS="-lintl $LIBS"
503d2be0 22463cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22464/* confdefs.h. */
22465_ACEOF
22466cat confdefs.h >>conftest.$ac_ext
22467cat >>conftest.$ac_ext <<_ACEOF
22468/* end confdefs.h. */
503d2be0 22469
ca81d7a0
JD
22470/* Override any GCC internal prototype to avoid an error.
22471 Use char because int might match the return type of a GCC
22472 builtin and then its argument prototype would still apply. */
503d2be0
AS
22473#ifdef __cplusplus
22474extern "C"
22475#endif
503d2be0
AS
22476char dgettext ();
22477int
22478main ()
22479{
ca81d7a0 22480return dgettext ();
503d2be0
AS
22481 ;
22482 return 0;
22483}
22484_ACEOF
22485rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22486if { (ac_try="$ac_link"
22487case "(($ac_try" in
22488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22489 *) ac_try_echo=$ac_try;;
22490esac
7bbec45b 22491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22492 (eval "$ac_link") 2>conftest.er1
503d2be0 22493 ac_status=$?
edfaf76d
LK
22494 grep -v '^ *+' conftest.er1 >conftest.err
22495 rm -f conftest.er1
22496 cat conftest.err >&5
7bbec45b 22497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22498 (exit $ac_status); } && {
22499 test -z "$ac_c_werror_flag" ||
22500 test ! -s conftest.err
7bbec45b
CY
22501 } && test -s conftest$ac_exeext &&
22502 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22503 ac_cv_lib_intl_dgettext=yes
22504else
7bbec45b 22505 echo "$as_me: failed program was:" >&5
19650fd6
AS
22506sed 's/^/| /' conftest.$ac_ext >&5
22507
ca81d7a0 22508 ac_cv_lib_intl_dgettext=no
503d2be0 22509fi
ca81d7a0 22510
f053c89f 22511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22512 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22513LIBS=$ac_check_lib_save_LIBS
22514fi
7bbec45b
CY
22515{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22516echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
b0448899 22517if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22518 cat >>confdefs.h <<_ACEOF
503d2be0 22519#define HAVE_LIBINTL 1
c0d27fcc 22520_ACEOF
ba4481b5
DL
22521
22522 LIBS="-lintl $LIBS"
22523
ba4481b5
DL
22524fi
22525
c0d27fcc 22526
7bbec45b
CY
22527{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22528echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0 22529if test "${emacs_cv_localtime_cache+set}" = set; then
7bbec45b 22530 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22531else
22532 if test x$ac_cv_func_tzset = xyes; then
22533if test "$cross_compiling" = yes; then
22534 # If we have tzset, assume the worst when cross-compiling.
22535emacs_cv_localtime_cache=yes
22536else
503d2be0 22537 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22538/* confdefs.h. */
22539_ACEOF
22540cat confdefs.h >>conftest.$ac_ext
22541cat >>conftest.$ac_ext <<_ACEOF
22542/* end confdefs.h. */
ba4481b5 22543#include <time.h>
ba4481b5
DL
22544extern char **environ;
22545unset_TZ ()
22546{
22547 char **from, **to;
22548 for (to = from = environ; (*to = *from); from++)
22549 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22550 to++;
22551}
22552char TZ_GMT0[] = "TZ=GMT0";
22553char TZ_PST8[] = "TZ=PST8";
22554main()
22555{
22556 time_t now = time ((time_t *) 0);
22557 int hour_GMT0, hour_unset;
22558 if (putenv (TZ_GMT0) != 0)
22559 exit (1);
22560 hour_GMT0 = localtime (&now)->tm_hour;
22561 unset_TZ ();
22562 hour_unset = localtime (&now)->tm_hour;
22563 if (putenv (TZ_PST8) != 0)
22564 exit (1);
22565 if (localtime (&now)->tm_hour == hour_GMT0)
22566 exit (1);
22567 unset_TZ ();
22568 if (localtime (&now)->tm_hour != hour_unset)
22569 exit (1);
22570 exit (0);
22571}
503d2be0
AS
22572_ACEOF
22573rm -f conftest$ac_exeext
ca81d7a0
JD
22574if { (ac_try="$ac_link"
22575case "(($ac_try" in
22576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22577 *) ac_try_echo=$ac_try;;
22578esac
7bbec45b 22579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22580 (eval "$ac_link") 2>&5
503d2be0 22581 ac_status=$?
7bbec45b 22582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22584 { (case "(($ac_try" in
22585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22586 *) ac_try_echo=$ac_try;;
22587esac
7bbec45b 22588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22589 (eval "$ac_try") 2>&5
503d2be0 22590 ac_status=$?
7bbec45b 22591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22592 (exit $ac_status); }; }; then
ba4481b5
DL
22593 emacs_cv_localtime_cache=no
22594else
7bbec45b
CY
22595 echo "$as_me: program exited with status $ac_status" >&5
22596echo "$as_me: failed program was:" >&5
19650fd6
AS
22597sed 's/^/| /' conftest.$ac_ext >&5
22598
c0d27fcc 22599( exit $ac_status )
503d2be0 22600emacs_cv_localtime_cache=yes
ba4481b5 22601fi
ca81d7a0 22602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22603fi
ca81d7a0
JD
22604
22605
ba4481b5
DL
22606else
22607 # If we lack tzset, report that localtime does not cache TZ,
22608 # since we can't invalidate the cache if we don't have tzset.
22609 emacs_cv_localtime_cache=no
22610fi
22611fi
7bbec45b
CY
22612{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22613echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22614if test $emacs_cv_localtime_cache = yes; then
b936fae4 22615
c0d27fcc 22616cat >>confdefs.h <<\_ACEOF
ba4481b5 22617#define LOCALTIME_CACHE 1
c0d27fcc 22618_ACEOF
ba4481b5
DL
22619
22620fi
22621
22622if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22623
22624for ac_func in gettimeofday
48d4b120 22625do
7bbec45b
CY
22626as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22627{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22628echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 22629if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 22630 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22631else
503d2be0 22632 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22633/* confdefs.h. */
22634_ACEOF
22635cat confdefs.h >>conftest.$ac_ext
22636cat >>conftest.$ac_ext <<_ACEOF
22637/* end confdefs.h. */
edfaf76d
LK
22638/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22639 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22640#define $ac_func innocuous_$ac_func
22641
48d4b120 22642/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22643 which can conflict with char $ac_func (); below.
22644 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22645 <limits.h> exists even on freestanding compilers. */
edfaf76d 22646
19650fd6
AS
22647#ifdef __STDC__
22648# include <limits.h>
22649#else
22650# include <assert.h>
22651#endif
edfaf76d
LK
22652
22653#undef $ac_func
22654
ca81d7a0
JD
22655/* Override any GCC internal prototype to avoid an error.
22656 Use char because int might match the return type of a GCC
22657 builtin and then its argument prototype would still apply. */
503d2be0
AS
22658#ifdef __cplusplus
22659extern "C"
22660#endif
503d2be0 22661char $ac_func ();
48d4b120
DL
22662/* The GNU C library defines this for functions which it implements
22663 to always fail with ENOSYS. Some functions are actually named
22664 something starting with __ and the normal name is an alias. */
ca81d7a0 22665#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22666choke me
cd958eb3
MB
22667#endif
22668
19650fd6
AS
22669int
22670main ()
22671{
ca81d7a0 22672return $ac_func ();
503d2be0
AS
22673 ;
22674 return 0;
22675}
22676_ACEOF
22677rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22678if { (ac_try="$ac_link"
22679case "(($ac_try" in
22680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22681 *) ac_try_echo=$ac_try;;
22682esac
7bbec45b 22683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22684 (eval "$ac_link") 2>conftest.er1
503d2be0 22685 ac_status=$?
edfaf76d
LK
22686 grep -v '^ *+' conftest.er1 >conftest.err
22687 rm -f conftest.er1
22688 cat conftest.err >&5
7bbec45b 22689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22690 (exit $ac_status); } && {
22691 test -z "$ac_c_werror_flag" ||
22692 test ! -s conftest.err
7bbec45b
CY
22693 } && test -s conftest$ac_exeext &&
22694 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22695 eval "$as_ac_var=yes"
22696else
7bbec45b 22697 echo "$as_me: failed program was:" >&5
19650fd6
AS
22698sed 's/^/| /' conftest.$ac_ext >&5
22699
ca81d7a0 22700 eval "$as_ac_var=no"
503d2be0 22701fi
ca81d7a0 22702
f053c89f 22703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22704 conftest$ac_exeext conftest.$ac_ext
503d2be0 22705fi
7bbec45b
CY
22706ac_res=`eval echo '${'$as_ac_var'}'`
22707 { echo "$as_me:$LINENO: result: $ac_res" >&5
22708echo "${ECHO_T}$ac_res" >&6; }
22709if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22710 cat >>confdefs.h <<_ACEOF
7bbec45b 22711#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22712_ACEOF
48d4b120 22713
48d4b120
DL
22714fi
22715done
22716
b936fae4 22717 if test $ac_cv_func_gettimeofday = yes; then
7bbec45b
CY
22718 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22719echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0 22720if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
7bbec45b 22721 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22722else
503d2be0 22723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22724/* confdefs.h. */
22725_ACEOF
22726cat confdefs.h >>conftest.$ac_ext
22727cat >>conftest.$ac_ext <<_ACEOF
22728/* end confdefs.h. */
ba4481b5 22729
a3f08d9e
DL
22730#ifdef TIME_WITH_SYS_TIME
22731#include <sys/time.h>
22732#include <time.h>
22733#else
22734#ifdef HAVE_SYS_TIME_H
22735#include <sys/time.h>
22736#else
22737#include <time.h>
22738#endif
22739#endif
503d2be0
AS
22740int
22741main ()
22742{
a3f08d9e 22743struct timeval time;
b936fae4 22744 gettimeofday (&time, 0);
503d2be0
AS
22745 ;
22746 return 0;
22747}
22748_ACEOF
22749rm -f conftest.$ac_objext
f053c89f
CY
22750if { (ac_try="$ac_compile"
22751case "(($ac_try" in
ca81d7a0
JD
22752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22753 *) ac_try_echo=$ac_try;;
22754esac
7bbec45b 22755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22756 (eval "$ac_compile") 2>conftest.er1
503d2be0 22757 ac_status=$?
edfaf76d
LK
22758 grep -v '^ *+' conftest.er1 >conftest.err
22759 rm -f conftest.er1
22760 cat conftest.err >&5
7bbec45b 22761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22762 (exit $ac_status); } && {
22763 test -z "$ac_c_werror_flag" ||
22764 test ! -s conftest.err
22765 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22766 emacs_cv_gettimeofday_two_arguments=yes
22767else
7bbec45b 22768 echo "$as_me: failed program was:" >&5
19650fd6
AS
22769sed 's/^/| /' conftest.$ac_ext >&5
22770
ca81d7a0 22771 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22772fi
ca81d7a0
JD
22773
22774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22775fi
7bbec45b
CY
22776{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22777echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22778 if test $emacs_cv_gettimeofday_two_arguments = no; then
22779
c0d27fcc 22780cat >>confdefs.h <<\_ACEOF
ba4481b5 22781#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22782_ACEOF
ba4481b5 22783
b936fae4 22784 fi
ba4481b5
DL
22785 fi
22786fi
22787
22788ok_so_far=yes
7bbec45b
CY
22789{ echo "$as_me:$LINENO: checking for socket" >&5
22790echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0 22791if test "${ac_cv_func_socket+set}" = set; then
7bbec45b 22792 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22793else
503d2be0 22794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22795/* confdefs.h. */
22796_ACEOF
22797cat confdefs.h >>conftest.$ac_ext
22798cat >>conftest.$ac_ext <<_ACEOF
22799/* end confdefs.h. */
edfaf76d
LK
22800/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22802#define socket innocuous_socket
22803
ba4481b5 22804/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22805 which can conflict with char socket (); below.
22806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22807 <limits.h> exists even on freestanding compilers. */
edfaf76d 22808
19650fd6
AS
22809#ifdef __STDC__
22810# include <limits.h>
22811#else
22812# include <assert.h>
22813#endif
edfaf76d
LK
22814
22815#undef socket
22816
ca81d7a0
JD
22817/* Override any GCC internal prototype to avoid an error.
22818 Use char because int might match the return type of a GCC
22819 builtin and then its argument prototype would still apply. */
503d2be0
AS
22820#ifdef __cplusplus
22821extern "C"
22822#endif
503d2be0 22823char socket ();
ba4481b5
DL
22824/* The GNU C library defines this for functions which it implements
22825 to always fail with ENOSYS. Some functions are actually named
22826 something starting with __ and the normal name is an alias. */
ca81d7a0 22827#if defined __stub_socket || defined __stub___socket
ba4481b5 22828choke me
cd958eb3
MB
22829#endif
22830
19650fd6
AS
22831int
22832main ()
22833{
ca81d7a0 22834return socket ();
503d2be0
AS
22835 ;
22836 return 0;
22837}
22838_ACEOF
22839rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22840if { (ac_try="$ac_link"
22841case "(($ac_try" in
22842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22843 *) ac_try_echo=$ac_try;;
22844esac
7bbec45b 22845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22846 (eval "$ac_link") 2>conftest.er1
503d2be0 22847 ac_status=$?
edfaf76d
LK
22848 grep -v '^ *+' conftest.er1 >conftest.err
22849 rm -f conftest.er1
22850 cat conftest.err >&5
7bbec45b 22851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22852 (exit $ac_status); } && {
22853 test -z "$ac_c_werror_flag" ||
22854 test ! -s conftest.err
7bbec45b
CY
22855 } && test -s conftest$ac_exeext &&
22856 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22857 ac_cv_func_socket=yes
22858else
7bbec45b 22859 echo "$as_me: failed program was:" >&5
19650fd6
AS
22860sed 's/^/| /' conftest.$ac_ext >&5
22861
ca81d7a0 22862 ac_cv_func_socket=no
503d2be0 22863fi
ca81d7a0 22864
f053c89f 22865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22866 conftest$ac_exeext conftest.$ac_ext
503d2be0 22867fi
7bbec45b
CY
22868{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22869echo "${ECHO_T}$ac_cv_func_socket" >&6; }
b0448899 22870if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22871 :
22872else
503d2be0 22873 ok_so_far=no
ba4481b5
DL
22874fi
22875
22876if test $ok_so_far = yes; then
c0d27fcc 22877 if test "${ac_cv_header_netinet_in_h+set}" = set; then
7bbec45b
CY
22878 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22879echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0 22880if test "${ac_cv_header_netinet_in_h+set}" = set; then
7bbec45b 22881 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22882fi
7bbec45b
CY
22883{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22884echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22885else
c0d27fcc 22886 # Is the header compilable?
7bbec45b
CY
22887{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22888echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22889cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22890/* confdefs.h. */
22891_ACEOF
22892cat confdefs.h >>conftest.$ac_ext
22893cat >>conftest.$ac_ext <<_ACEOF
22894/* end confdefs.h. */
c0d27fcc
MR
22895$ac_includes_default
22896#include <netinet/in.h>
22897_ACEOF
22898rm -f conftest.$ac_objext
ca81d7a0
JD
22899if { (ac_try="$ac_compile"
22900case "(($ac_try" in
22901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22902 *) ac_try_echo=$ac_try;;
22903esac
7bbec45b 22904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22905 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22906 ac_status=$?
edfaf76d
LK
22907 grep -v '^ *+' conftest.er1 >conftest.err
22908 rm -f conftest.er1
22909 cat conftest.err >&5
7bbec45b 22910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22911 (exit $ac_status); } && {
22912 test -z "$ac_c_werror_flag" ||
22913 test ! -s conftest.err
22914 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22915 ac_header_compiler=yes
22916else
7bbec45b 22917 echo "$as_me: failed program was:" >&5
19650fd6
AS
22918sed 's/^/| /' conftest.$ac_ext >&5
22919
ca81d7a0 22920 ac_header_compiler=no
c0d27fcc 22921fi
ca81d7a0
JD
22922
22923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
22924{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22925echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22926
22927# Is the header present?
7bbec45b
CY
22928{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22929echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22930cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22931/* confdefs.h. */
22932_ACEOF
22933cat confdefs.h >>conftest.$ac_ext
22934cat >>conftest.$ac_ext <<_ACEOF
22935/* end confdefs.h. */
ba4481b5 22936#include <netinet/in.h>
503d2be0 22937_ACEOF
ca81d7a0
JD
22938if { (ac_try="$ac_cpp conftest.$ac_ext"
22939case "(($ac_try" in
22940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22941 *) ac_try_echo=$ac_try;;
22942esac
7bbec45b 22943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 22944 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22945 ac_status=$?
6bae0ccf 22946 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22947 rm -f conftest.er1
22948 cat conftest.err >&5
7bbec45b 22949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22950 (exit $ac_status); } >/dev/null && {
22951 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22952 test ! -s conftest.err
22953 }; then
c0d27fcc 22954 ac_header_preproc=yes
ba4481b5 22955else
7bbec45b 22956 echo "$as_me: failed program was:" >&5
19650fd6
AS
22957sed 's/^/| /' conftest.$ac_ext >&5
22958
c0d27fcc 22959 ac_header_preproc=no
ba4481b5 22960fi
ca81d7a0 22961
503d2be0 22962rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
22963{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22964echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22965
22966# So? What about this header?
edfaf76d
LK
22967case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22968 yes:no: )
7bbec45b
CY
22969 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22970echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22971 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22972echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
edfaf76d 22973 ac_header_preproc=yes
19650fd6 22974 ;;
edfaf76d 22975 no:yes:* )
7bbec45b
CY
22976 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22977echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
22978 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22979echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22980 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22981echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22982 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22983echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
22984 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
22985echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
22986 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22987echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22988
19650fd6 22989 ;;
c0d27fcc 22990esac
7bbec45b
CY
22991{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22992echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc 22993if test "${ac_cv_header_netinet_in_h+set}" = set; then
7bbec45b 22994 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
22995else
22996 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22997fi
7bbec45b
CY
22998{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22999echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
23000
23001fi
b0448899 23002if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
23003 :
23004else
503d2be0 23005 ok_so_far=no
ba4481b5
DL
23006fi
23007
c0d27fcc 23008
ba4481b5
DL
23009fi
23010if test $ok_so_far = yes; then
c0d27fcc 23011 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
7bbec45b
CY
23012 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23013echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0 23014if test "${ac_cv_header_arpa_inet_h+set}" = set; then
7bbec45b 23015 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23016fi
7bbec45b
CY
23017{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23018echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 23019else
c0d27fcc 23020 # Is the header compilable?
7bbec45b
CY
23021{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
23022echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 23023cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23024/* confdefs.h. */
23025_ACEOF
23026cat confdefs.h >>conftest.$ac_ext
23027cat >>conftest.$ac_ext <<_ACEOF
23028/* end confdefs.h. */
c0d27fcc
MR
23029$ac_includes_default
23030#include <arpa/inet.h>
23031_ACEOF
23032rm -f conftest.$ac_objext
ca81d7a0
JD
23033if { (ac_try="$ac_compile"
23034case "(($ac_try" in
23035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23036 *) ac_try_echo=$ac_try;;
23037esac
7bbec45b 23038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23039 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23040 ac_status=$?
edfaf76d
LK
23041 grep -v '^ *+' conftest.er1 >conftest.err
23042 rm -f conftest.er1
23043 cat conftest.err >&5
7bbec45b 23044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23045 (exit $ac_status); } && {
23046 test -z "$ac_c_werror_flag" ||
23047 test ! -s conftest.err
23048 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23049 ac_header_compiler=yes
23050else
7bbec45b 23051 echo "$as_me: failed program was:" >&5
19650fd6
AS
23052sed 's/^/| /' conftest.$ac_ext >&5
23053
ca81d7a0 23054 ac_header_compiler=no
c0d27fcc 23055fi
ca81d7a0
JD
23056
23057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
23058{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23059echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23060
23061# Is the header present?
7bbec45b
CY
23062{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
23063echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 23064cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23065/* confdefs.h. */
23066_ACEOF
23067cat confdefs.h >>conftest.$ac_ext
23068cat >>conftest.$ac_ext <<_ACEOF
23069/* end confdefs.h. */
ba4481b5 23070#include <arpa/inet.h>
503d2be0 23071_ACEOF
ca81d7a0
JD
23072if { (ac_try="$ac_cpp conftest.$ac_ext"
23073case "(($ac_try" in
23074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23075 *) ac_try_echo=$ac_try;;
23076esac
7bbec45b 23077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23078 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23079 ac_status=$?
6bae0ccf 23080 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23081 rm -f conftest.er1
23082 cat conftest.err >&5
7bbec45b 23083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23084 (exit $ac_status); } >/dev/null && {
23085 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23086 test ! -s conftest.err
23087 }; then
c0d27fcc 23088 ac_header_preproc=yes
ba4481b5 23089else
7bbec45b 23090 echo "$as_me: failed program was:" >&5
19650fd6
AS
23091sed 's/^/| /' conftest.$ac_ext >&5
23092
c0d27fcc 23093 ac_header_preproc=no
ba4481b5 23094fi
ca81d7a0 23095
503d2be0 23096rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
23097{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23098echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23099
23100# So? What about this header?
edfaf76d
LK
23101case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23102 yes:no: )
7bbec45b
CY
23103 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23104echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23105 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23106echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
edfaf76d 23107 ac_header_preproc=yes
19650fd6 23108 ;;
edfaf76d 23109 no:yes:* )
7bbec45b
CY
23110 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23111echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
23112 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23113echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23114 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23115echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23116 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23117echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
23118 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
23119echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
23120 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23121echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23122
19650fd6 23123 ;;
c0d27fcc 23124esac
7bbec45b
CY
23125{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23126echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc 23127if test "${ac_cv_header_arpa_inet_h+set}" = set; then
7bbec45b 23128 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
23129else
23130 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23131fi
7bbec45b
CY
23132{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23133echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23134
23135fi
b0448899 23136if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23137 :
23138else
503d2be0 23139 ok_so_far=no
ba4481b5
DL
23140fi
23141
c0d27fcc 23142
ba4481b5
DL
23143fi
23144if test $ok_so_far = yes; then
b936fae4 23145
c0d27fcc 23146cat >>confdefs.h <<\_ACEOF
ba4481b5 23147#define HAVE_INET_SOCKETS 1
c0d27fcc 23148_ACEOF
ba4481b5
DL
23149
23150fi
23151
2d2b6695 23152
7862d3a8 23153for ac_header in sys/ioctl.h
2d2b6695 23154do
7bbec45b 23155as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 23156if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
23157 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23158echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23159if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 23160 echo $ECHO_N "(cached) $ECHO_C" >&6
2d2b6695 23161fi
7bbec45b
CY
23162ac_res=`eval echo '${'$as_ac_Header'}'`
23163 { echo "$as_me:$LINENO: result: $ac_res" >&5
23164echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23165else
23166 # Is the header compilable?
7bbec45b
CY
23167{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23168echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23169cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23170/* confdefs.h. */
23171_ACEOF
23172cat confdefs.h >>conftest.$ac_ext
23173cat >>conftest.$ac_ext <<_ACEOF
23174/* end confdefs.h. */
23175$ac_includes_default
23176#include <$ac_header>
23177_ACEOF
23178rm -f conftest.$ac_objext
ca81d7a0
JD
23179if { (ac_try="$ac_compile"
23180case "(($ac_try" in
23181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23182 *) ac_try_echo=$ac_try;;
23183esac
7bbec45b 23184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23185 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23186 ac_status=$?
edfaf76d
LK
23187 grep -v '^ *+' conftest.er1 >conftest.err
23188 rm -f conftest.er1
23189 cat conftest.err >&5
7bbec45b 23190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23191 (exit $ac_status); } && {
23192 test -z "$ac_c_werror_flag" ||
23193 test ! -s conftest.err
23194 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23195 ac_header_compiler=yes
23196else
7bbec45b 23197 echo "$as_me: failed program was:" >&5
2d2b6695
KS
23198sed 's/^/| /' conftest.$ac_ext >&5
23199
ca81d7a0 23200 ac_header_compiler=no
2d2b6695 23201fi
ca81d7a0
JD
23202
23203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
23204{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23205echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23206
23207# Is the header present?
7bbec45b
CY
23208{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23209echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23210cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23211/* confdefs.h. */
23212_ACEOF
23213cat confdefs.h >>conftest.$ac_ext
23214cat >>conftest.$ac_ext <<_ACEOF
23215/* end confdefs.h. */
23216#include <$ac_header>
23217_ACEOF
ca81d7a0
JD
23218if { (ac_try="$ac_cpp conftest.$ac_ext"
23219case "(($ac_try" in
23220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23221 *) ac_try_echo=$ac_try;;
23222esac
7bbec45b 23223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23224 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23225 ac_status=$?
23226 grep -v '^ *+' conftest.er1 >conftest.err
23227 rm -f conftest.er1
23228 cat conftest.err >&5
7bbec45b 23229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23230 (exit $ac_status); } >/dev/null && {
23231 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23232 test ! -s conftest.err
23233 }; then
2d2b6695
KS
23234 ac_header_preproc=yes
23235else
7bbec45b 23236 echo "$as_me: failed program was:" >&5
2d2b6695
KS
23237sed 's/^/| /' conftest.$ac_ext >&5
23238
23239 ac_header_preproc=no
23240fi
ca81d7a0 23241
2d2b6695 23242rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
23243{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23244echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23245
23246# So? What about this header?
edfaf76d
LK
23247case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23248 yes:no: )
7bbec45b
CY
23249 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23250echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
23251 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23252echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 23253 ac_header_preproc=yes
2d2b6695 23254 ;;
edfaf76d 23255 no:yes:* )
7bbec45b
CY
23256 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23257echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
23258 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23259echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23260 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23261echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23262 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23263echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
23264 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23265echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23266 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23267echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23268
2d2b6695
KS
23269 ;;
23270esac
7bbec45b
CY
23271{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23272echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23273if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 23274 echo $ECHO_N "(cached) $ECHO_C" >&6
2d2b6695 23275else
edfaf76d 23276 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23277fi
7bbec45b
CY
23278ac_res=`eval echo '${'$as_ac_Header'}'`
23279 { echo "$as_me:$LINENO: result: $ac_res" >&5
23280echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23281
23282fi
7bbec45b 23283if test `eval echo '${'$as_ac_Header'}'` = yes; then
2d2b6695 23284 cat >>confdefs.h <<_ACEOF
7bbec45b 23285#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2d2b6695
KS
23286_ACEOF
23287
23288fi
23289
23290done
23291
23292
ba4481b5 23293if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23294
c0d27fcc 23295cat >>confdefs.h <<\_ACEOF
ba4481b5 23296#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23297_ACEOF
ba4481b5
DL
23298
23299fi
23300
7bbec45b
CY
23301{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23302echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23303if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
7bbec45b
CY
23304 { echo "$as_me:$LINENO: result: yes" >&5
23305echo "${ECHO_T}yes" >&6; }
b936fae4 23306
c0d27fcc 23307cat >>confdefs.h <<\_ACEOF
3d9fec71 23308#define HAVE_DEV_PTMX 1
c0d27fcc 23309_ACEOF
3d9fec71
DL
23310
23311else
7bbec45b
CY
23312 { echo "$as_me:$LINENO: result: no" >&5
23313echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23314fi
23315
7bbec45b
CY
23316{ echo "$as_me:$LINENO: checking for pid_t" >&5
23317echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0 23318if test "${ac_cv_type_pid_t+set}" = set; then
7bbec45b 23319 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23320else
dc2933eb
JD
23321 cat >conftest.$ac_ext <<_ACEOF
23322/* confdefs.h. */
23323_ACEOF
23324cat confdefs.h >>conftest.$ac_ext
23325cat >>conftest.$ac_ext <<_ACEOF
23326/* end confdefs.h. */
23327$ac_includes_default
7bbec45b 23328typedef pid_t ac__type_new_;
dc2933eb
JD
23329int
23330main ()
23331{
7bbec45b
CY
23332if ((ac__type_new_ *) 0)
23333 return 0;
23334if (sizeof (ac__type_new_))
23335 return 0;
503d2be0
AS
23336 ;
23337 return 0;
23338}
23339_ACEOF
23340rm -f conftest.$ac_objext
ca81d7a0
JD
23341if { (ac_try="$ac_compile"
23342case "(($ac_try" in
23343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23344 *) ac_try_echo=$ac_try;;
23345esac
7bbec45b 23346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23347 (eval "$ac_compile") 2>conftest.er1
503d2be0 23348 ac_status=$?
edfaf76d
LK
23349 grep -v '^ *+' conftest.er1 >conftest.err
23350 rm -f conftest.er1
23351 cat conftest.err >&5
7bbec45b 23352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23353 (exit $ac_status); } && {
23354 test -z "$ac_c_werror_flag" ||
23355 test ! -s conftest.err
23356 } && test -s conftest.$ac_objext; then
7bbec45b 23357 ac_cv_type_pid_t=yes
647847ea 23358else
7bbec45b 23359 echo "$as_me: failed program was:" >&5
19650fd6
AS
23360sed 's/^/| /' conftest.$ac_ext >&5
23361
7bbec45b 23362 ac_cv_type_pid_t=no
647847ea 23363fi
ca81d7a0
JD
23364
23365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23366fi
7bbec45b
CY
23367{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23368echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
b0448899 23369if test $ac_cv_type_pid_t = yes; then
503d2be0
AS
23370 :
23371else
23372
c0d27fcc 23373cat >>confdefs.h <<_ACEOF
647847ea 23374#define pid_t int
c0d27fcc 23375_ACEOF
647847ea
DL
23376
23377fi
23378
c0d27fcc 23379
ca81d7a0 23380for ac_header in vfork.h
503d2be0 23381do
7bbec45b 23382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0 23383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b
CY
23384 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 23387 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23388fi
7bbec45b
CY
23389ac_res=`eval echo '${'$as_ac_Header'}'`
23390 { echo "$as_me:$LINENO: result: $ac_res" >&5
23391echo "${ECHO_T}$ac_res" >&6; }
98418dba 23392else
c0d27fcc 23393 # Is the header compilable?
7bbec45b
CY
23394{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23395echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23397/* confdefs.h. */
23398_ACEOF
23399cat confdefs.h >>conftest.$ac_ext
23400cat >>conftest.$ac_ext <<_ACEOF
23401/* end confdefs.h. */
c0d27fcc
MR
23402$ac_includes_default
23403#include <$ac_header>
23404_ACEOF
23405rm -f conftest.$ac_objext
ca81d7a0
JD
23406if { (ac_try="$ac_compile"
23407case "(($ac_try" in
23408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23409 *) ac_try_echo=$ac_try;;
23410esac
7bbec45b 23411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23412 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23413 ac_status=$?
edfaf76d
LK
23414 grep -v '^ *+' conftest.er1 >conftest.err
23415 rm -f conftest.er1
23416 cat conftest.err >&5
7bbec45b 23417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23418 (exit $ac_status); } && {
23419 test -z "$ac_c_werror_flag" ||
23420 test ! -s conftest.err
23421 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23422 ac_header_compiler=yes
23423else
7bbec45b 23424 echo "$as_me: failed program was:" >&5
19650fd6
AS
23425sed 's/^/| /' conftest.$ac_ext >&5
23426
ca81d7a0 23427 ac_header_compiler=no
c0d27fcc 23428fi
ca81d7a0
JD
23429
23430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7bbec45b
CY
23431{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23432echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23433
23434# Is the header present?
7bbec45b
CY
23435{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23436echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23437cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23438/* confdefs.h. */
23439_ACEOF
23440cat confdefs.h >>conftest.$ac_ext
23441cat >>conftest.$ac_ext <<_ACEOF
23442/* end confdefs.h. */
503d2be0
AS
23443#include <$ac_header>
23444_ACEOF
ca81d7a0
JD
23445if { (ac_try="$ac_cpp conftest.$ac_ext"
23446case "(($ac_try" in
23447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23448 *) ac_try_echo=$ac_try;;
23449esac
7bbec45b 23450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23451 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23452 ac_status=$?
6bae0ccf 23453 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23454 rm -f conftest.er1
23455 cat conftest.err >&5
7bbec45b 23456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23457 (exit $ac_status); } >/dev/null && {
23458 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23459 test ! -s conftest.err
23460 }; then
c0d27fcc 23461 ac_header_preproc=yes
647847ea 23462else
7bbec45b 23463 echo "$as_me: failed program was:" >&5
19650fd6
AS
23464sed 's/^/| /' conftest.$ac_ext >&5
23465
c0d27fcc 23466 ac_header_preproc=no
647847ea 23467fi
ca81d7a0 23468
503d2be0 23469rm -f conftest.err conftest.$ac_ext
7bbec45b
CY
23470{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23471echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23472
23473# So? What about this header?
edfaf76d
LK
23474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23475 yes:no: )
7bbec45b
CY
23476 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23477echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
23478 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23479echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
edfaf76d 23480 ac_header_preproc=yes
19650fd6 23481 ;;
edfaf76d 23482 no:yes:* )
7bbec45b
CY
23483 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23484echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
23485 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23486echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23487 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23488echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23489 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23490echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
23491 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23492echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23493 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23494echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23495
19650fd6 23496 ;;
c0d27fcc 23497esac
7bbec45b
CY
23498{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23499echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
ca81d7a0 23500if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 23501 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23502else
edfaf76d 23503 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23504fi
7bbec45b
CY
23505ac_res=`eval echo '${'$as_ac_Header'}'`
23506 { echo "$as_me:$LINENO: result: $ac_res" >&5
23507echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23508
23509fi
7bbec45b 23510if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23511 cat >>confdefs.h <<_ACEOF
7bbec45b 23512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23513_ACEOF
647847ea 23514
73b77ee5 23515fi
c0d27fcc 23516
503d2be0 23517done
73b77ee5 23518
c0d27fcc
MR
23519
23520
503d2be0
AS
23521for ac_func in fork vfork
23522do
7bbec45b
CY
23523as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23524{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23525echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
ca81d7a0 23526if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7bbec45b 23527 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23528else
503d2be0 23529 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23530/* confdefs.h. */
23531_ACEOF
23532cat confdefs.h >>conftest.$ac_ext
23533cat >>conftest.$ac_ext <<_ACEOF
23534/* end confdefs.h. */
edfaf76d
LK
23535/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23536 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23537#define $ac_func innocuous_$ac_func
23538
fa0b693c 23539/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23540 which can conflict with char $ac_func (); below.
23541 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23542 <limits.h> exists even on freestanding compilers. */
edfaf76d 23543
19650fd6
AS
23544#ifdef __STDC__
23545# include <limits.h>
23546#else
23547# include <assert.h>
23548#endif
edfaf76d
LK
23549
23550#undef $ac_func
23551
ca81d7a0
JD
23552/* Override any GCC internal prototype to avoid an error.
23553 Use char because int might match the return type of a GCC
23554 builtin and then its argument prototype would still apply. */
503d2be0
AS
23555#ifdef __cplusplus
23556extern "C"
23557#endif
503d2be0 23558char $ac_func ();
fa0b693c
GM
23559/* The GNU C library defines this for functions which it implements
23560 to always fail with ENOSYS. Some functions are actually named
23561 something starting with __ and the normal name is an alias. */
ca81d7a0 23562#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23563choke me
fa0b693c
GM
23564#endif
23565
19650fd6
AS
23566int
23567main ()
23568{
ca81d7a0 23569return $ac_func ();
503d2be0
AS
23570 ;
23571 return 0;
23572}
23573_ACEOF
23574rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23575if { (ac_try="$ac_link"
23576case "(($ac_try" in
23577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23578 *) ac_try_echo=$ac_try;;
23579esac
7bbec45b 23580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23581 (eval "$ac_link") 2>conftest.er1
503d2be0 23582 ac_status=$?
edfaf76d
LK
23583 grep -v '^ *+' conftest.er1 >conftest.err
23584 rm -f conftest.er1
23585 cat conftest.err >&5
7bbec45b 23586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23587 (exit $ac_status); } && {
23588 test -z "$ac_c_werror_flag" ||
23589 test ! -s conftest.err
7bbec45b
CY
23590 } && test -s conftest$ac_exeext &&
23591 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23592 eval "$as_ac_var=yes"
23593else
7bbec45b 23594 echo "$as_me: failed program was:" >&5
19650fd6
AS
23595sed 's/^/| /' conftest.$ac_ext >&5
23596
ca81d7a0 23597 eval "$as_ac_var=no"
503d2be0 23598fi
ca81d7a0 23599
f053c89f 23600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23601 conftest$ac_exeext conftest.$ac_ext
503d2be0 23602fi
7bbec45b
CY
23603ac_res=`eval echo '${'$as_ac_var'}'`
23604 { echo "$as_me:$LINENO: result: $ac_res" >&5
23605echo "${ECHO_T}$ac_res" >&6; }
23606if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23607 cat >>confdefs.h <<_ACEOF
7bbec45b 23608#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23609_ACEOF
503d2be0 23610
fa0b693c 23611fi
503d2be0 23612done
fa0b693c 23613
503d2be0 23614if test "x$ac_cv_func_fork" = xyes; then
7bbec45b
CY
23615 { echo "$as_me:$LINENO: checking for working fork" >&5
23616echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0 23617if test "${ac_cv_func_fork_works+set}" = set; then
7bbec45b 23618 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23619else
503d2be0
AS
23620 if test "$cross_compiling" = yes; then
23621 ac_cv_func_fork_works=cross
23622else
23623 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23624/* confdefs.h. */
23625_ACEOF
23626cat confdefs.h >>conftest.$ac_ext
23627cat >>conftest.$ac_ext <<_ACEOF
23628/* end confdefs.h. */
23629$ac_includes_default
23630int
23631main ()
23632{
23633
23634 /* By Ruediger Kuhlmann. */
23635 return fork () < 0;
23636
23637 ;
23638 return 0;
23639}
503d2be0
AS
23640_ACEOF
23641rm -f conftest$ac_exeext
ca81d7a0
JD
23642if { (ac_try="$ac_link"
23643case "(($ac_try" in
23644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23645 *) ac_try_echo=$ac_try;;
23646esac
7bbec45b 23647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23648 (eval "$ac_link") 2>&5
503d2be0 23649 ac_status=$?
7bbec45b 23650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23652 { (case "(($ac_try" in
23653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23654 *) ac_try_echo=$ac_try;;
23655esac
7bbec45b 23656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23657 (eval "$ac_try") 2>&5
503d2be0 23658 ac_status=$?
7bbec45b 23659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23660 (exit $ac_status); }; }; then
23661 ac_cv_func_fork_works=yes
23662else
7bbec45b
CY
23663 echo "$as_me: program exited with status $ac_status" >&5
23664echo "$as_me: failed program was:" >&5
19650fd6
AS
23665sed 's/^/| /' conftest.$ac_ext >&5
23666
c0d27fcc 23667( exit $ac_status )
503d2be0
AS
23668ac_cv_func_fork_works=no
23669fi
ca81d7a0 23670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23671fi
ca81d7a0
JD
23672
23673
503d2be0 23674fi
7bbec45b
CY
23675{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23676echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23677
6bae0ccf
DL
23678else
23679 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23680fi
23681if test "x$ac_cv_func_fork_works" = xcross; then
23682 case $host in
23683 *-*-amigaos* | *-*-msdosdjgpp*)
23684 # Override, as these systems have only a dummy fork() stub
23685 ac_cv_func_fork_works=no
23686 ;;
23687 *)
23688 ac_cv_func_fork_works=yes
23689 ;;
23690 esac
7bbec45b
CY
23691 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23692echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23693fi
73b77ee5 23694ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23695if test "x$ac_cv_func_vfork" = xyes; then
7bbec45b
CY
23696 { echo "$as_me:$LINENO: checking for working vfork" >&5
23697echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0 23698if test "${ac_cv_func_vfork_works+set}" = set; then
7bbec45b 23699 echo $ECHO_N "(cached) $ECHO_C" >&6
503d2be0
AS
23700else
23701 if test "$cross_compiling" = yes; then
23702 ac_cv_func_vfork_works=cross
fa0b693c 23703else
503d2be0 23704 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23705/* confdefs.h. */
23706_ACEOF
23707cat confdefs.h >>conftest.$ac_ext
23708cat >>conftest.$ac_ext <<_ACEOF
23709/* end confdefs.h. */
73b77ee5 23710/* Thanks to Paul Eggert for this test. */
ca81d7a0 23711$ac_includes_default
19650fd6 23712#include <sys/wait.h>
f053c89f 23713#ifdef HAVE_VFORK_H
503d2be0 23714# include <vfork.h>
73b77ee5
GM
23715#endif
23716/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23717 argument registers are propagated back to the parent. The compiler
23718 is told about this with #include <vfork.h>, but some compilers
23719 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23720 static variable whose address is put into a register that is
23721 clobbered by the vfork. */
19650fd6 23722static void
fa0b693c 23723#ifdef __cplusplus
73b77ee5 23724sparc_address_test (int arg)
503d2be0 23725# else
73b77ee5 23726sparc_address_test (arg) int arg;
fa0b693c 23727#endif
fa0b693c 23728{
73b77ee5
GM
23729 static pid_t child;
23730 if (!child) {
23731 child = vfork ();
23732 if (child < 0) {
23733 perror ("vfork");
23734 _exit(2);
23735 }
23736 if (!child) {
23737 arg = getpid();
23738 write(-1, "", 0);
23739 _exit (arg);
23740 }
23741 }
23742}
503d2be0
AS
23743
23744int
23745main ()
23746{
73b77ee5
GM
23747 pid_t parent = getpid ();
23748 pid_t child;
fa0b693c 23749
19650fd6 23750 sparc_address_test (0);
fa0b693c 23751
73b77ee5 23752 child = vfork ();
fa0b693c 23753
73b77ee5 23754 if (child == 0) {
503d2be0
AS
23755 /* Here is another test for sparc vfork register problems. This
23756 test uses lots of local variables, at least as many local
23757 variables as main has allocated so far including compiler
23758 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23759 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23760 reuse the register of parent for one of the local variables,
23761 since it will think that parent can't possibly be used any more
23762 in this routine. Assigning to the local variable will thus
23763 munge parent in the parent process. */
73b77ee5
GM
23764 pid_t
23765 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23766 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23767 /* Convince the compiler that p..p7 are live; otherwise, it might
23768 use the same hardware register for all 8 local variables. */
23769 if (p != p1 || p != p2 || p != p3 || p != p4
23770 || p != p5 || p != p6 || p != p7)
23771 _exit(1);
fa0b693c 23772
503d2be0
AS
23773 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23774 from child file descriptors. If the child closes a descriptor
23775 before it execs or exits, this munges the parent's descriptor
23776 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23777 _exit(close(fileno(stdout)) != 0);
23778 } else {
23779 int status;
23780 struct stat st;
23781
23782 while (wait(&status) != child)
23783 ;
ca81d7a0 23784 return (
73b77ee5
GM
23785 /* Was there some problem with vforking? */
23786 child < 0
23787
23788 /* Did the child fail? (This shouldn't happen.) */
23789 || status
23790
23791 /* Did the vfork/compiler bug occur? */
23792 || parent != getpid()
fa0b693c 23793
73b77ee5
GM
23794 /* Did the file descriptor bug occur? */
23795 || fstat(fileno(stdout), &st) != 0
23796 );
23797 }
23798}
503d2be0
AS
23799_ACEOF
23800rm -f conftest$ac_exeext
ca81d7a0
JD
23801if { (ac_try="$ac_link"
23802case "(($ac_try" in
23803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23804 *) ac_try_echo=$ac_try;;
23805esac
7bbec45b 23806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23807 (eval "$ac_link") 2>&5
503d2be0 23808 ac_status=$?
7bbec45b 23809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23811 { (case "(($ac_try" in
23812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23813 *) ac_try_echo=$ac_try;;
23814esac
7bbec45b 23815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23816 (eval "$ac_try") 2>&5
503d2be0 23817 ac_status=$?
7bbec45b 23818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23819 (exit $ac_status); }; }; then
73b77ee5 23820 ac_cv_func_vfork_works=yes
fa0b693c 23821else
7bbec45b
CY
23822 echo "$as_me: program exited with status $ac_status" >&5
23823echo "$as_me: failed program was:" >&5
19650fd6
AS
23824sed 's/^/| /' conftest.$ac_ext >&5
23825
c0d27fcc 23826( exit $ac_status )
503d2be0
AS
23827ac_cv_func_vfork_works=no
23828fi
ca81d7a0 23829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23830fi
ca81d7a0
JD
23831
23832
fa0b693c 23833fi
7bbec45b
CY
23834{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23835echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23836
503d2be0
AS
23837fi;
23838if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23839 ac_cv_func_vfork_works=$ac_cv_func_vfork
7bbec45b
CY
23840 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23841echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23842fi
23843
503d2be0
AS
23844if test "x$ac_cv_func_vfork_works" = xyes; then
23845
c0d27fcc 23846cat >>confdefs.h <<\_ACEOF
503d2be0 23847#define HAVE_WORKING_VFORK 1
c0d27fcc 23848_ACEOF
503d2be0
AS
23849
23850else
23851
c0d27fcc 23852cat >>confdefs.h <<\_ACEOF
73b77ee5 23853#define vfork fork
c0d27fcc 23854_ACEOF
fa0b693c
GM
23855
23856fi
503d2be0
AS
23857if test "x$ac_cv_func_fork_works" = xyes; then
23858
c0d27fcc 23859cat >>confdefs.h <<\_ACEOF
503d2be0 23860#define HAVE_WORKING_FORK 1
c0d27fcc 23861_ACEOF
fa0b693c 23862
503d2be0 23863fi
647847ea 23864
c0d27fcc 23865
7bbec45b
CY
23866{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23867echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa 23868if test "${emacs_cv_langinfo_codeset+set}" = set; then
7bbec45b 23869 echo $ECHO_N "(cached) $ECHO_C" >&6
6a3a24fa
JD
23870else
23871 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23872/* confdefs.h. */
23873_ACEOF
23874cat confdefs.h >>conftest.$ac_ext
23875cat >>conftest.$ac_ext <<_ACEOF
23876/* end confdefs.h. */
6a3a24fa
JD
23877#include <langinfo.h>
23878int
23879main ()
23880{
23881char* cs = nl_langinfo(CODESET);
23882 ;
23883 return 0;
23884}
23885_ACEOF
23886rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23887if { (ac_try="$ac_link"
23888case "(($ac_try" in
23889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23890 *) ac_try_echo=$ac_try;;
23891esac
7bbec45b 23892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23893 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23894 ac_status=$?
edfaf76d
LK
23895 grep -v '^ *+' conftest.er1 >conftest.err
23896 rm -f conftest.er1
23897 cat conftest.err >&5
7bbec45b 23898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23899 (exit $ac_status); } && {
23900 test -z "$ac_c_werror_flag" ||
23901 test ! -s conftest.err
7bbec45b
CY
23902 } && test -s conftest$ac_exeext &&
23903 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23904 emacs_cv_langinfo_codeset=yes
23905else
7bbec45b 23906 echo "$as_me: failed program was:" >&5
19650fd6
AS
23907sed 's/^/| /' conftest.$ac_ext >&5
23908
ca81d7a0 23909 emacs_cv_langinfo_codeset=no
6a3a24fa 23910fi
ca81d7a0 23911
f053c89f 23912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23913 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23914
23915fi
7bbec45b
CY
23916{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23917echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23918if test $emacs_cv_langinfo_codeset = yes; then
23919
23920cat >>confdefs.h <<\_ACEOF
23921#define HAVE_LANGINFO_CODESET 1
23922_ACEOF
23923
23924fi
23925
7bbec45b
CY
23926{ echo "$as_me:$LINENO: checking for size_t" >&5
23927echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0 23928if test "${ac_cv_type_size_t+set}" = set; then
7bbec45b 23929 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23930else
dc2933eb
JD
23931 cat >conftest.$ac_ext <<_ACEOF
23932/* confdefs.h. */
23933_ACEOF
23934cat confdefs.h >>conftest.$ac_ext
23935cat >>conftest.$ac_ext <<_ACEOF
23936/* end confdefs.h. */
23937$ac_includes_default
7bbec45b 23938typedef size_t ac__type_new_;
dc2933eb
JD
23939int
23940main ()
23941{
7bbec45b
CY
23942if ((ac__type_new_ *) 0)
23943 return 0;
23944if (sizeof (ac__type_new_))
23945 return 0;
503d2be0
AS
23946 ;
23947 return 0;
23948}
23949_ACEOF
23950rm -f conftest.$ac_objext
ca81d7a0
JD
23951if { (ac_try="$ac_compile"
23952case "(($ac_try" in
23953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23954 *) ac_try_echo=$ac_try;;
23955esac
7bbec45b 23956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 23957 (eval "$ac_compile") 2>conftest.er1
503d2be0 23958 ac_status=$?
edfaf76d
LK
23959 grep -v '^ *+' conftest.er1 >conftest.err
23960 rm -f conftest.er1
23961 cat conftest.err >&5
7bbec45b 23962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23963 (exit $ac_status); } && {
23964 test -z "$ac_c_werror_flag" ||
23965 test ! -s conftest.err
23966 } && test -s conftest.$ac_objext; then
7bbec45b 23967 ac_cv_type_size_t=yes
8730a8da 23968else
7bbec45b 23969 echo "$as_me: failed program was:" >&5
19650fd6
AS
23970sed 's/^/| /' conftest.$ac_ext >&5
23971
7bbec45b 23972 ac_cv_type_size_t=no
8730a8da 23973fi
dc2933eb
JD
23974
23975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23976fi
7bbec45b
CY
23977{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23978echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
b0448899 23979if test $ac_cv_type_size_t = yes; then
503d2be0 23980
c0d27fcc
MR
23981cat >>confdefs.h <<_ACEOF
23982#define HAVE_SIZE_T 1
23983_ACEOF
23984
8730a8da
DL
23985
23986fi
23987
c0d27fcc 23988
7bbec45b
CY
23989{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23990echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1 23991if test "${ac_cv_type_mbstate_t+set}" = set; then
7bbec45b 23992 echo $ECHO_N "(cached) $ECHO_C" >&6
973a76b1
DL
23993else
23994 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23995/* confdefs.h. */
23996_ACEOF
23997cat confdefs.h >>conftest.$ac_ext
23998cat >>conftest.$ac_ext <<_ACEOF
23999/* end confdefs.h. */
973a76b1
DL
24000$ac_includes_default
24001# include <wchar.h>
24002int
24003main ()
24004{
24005mbstate_t x; return sizeof x;
24006 ;
24007 return 0;
24008}
24009_ACEOF
24010rm -f conftest.$ac_objext
ca81d7a0
JD
24011if { (ac_try="$ac_compile"
24012case "(($ac_try" in
24013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24014 *) ac_try_echo=$ac_try;;
24015esac
7bbec45b 24016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24017 (eval "$ac_compile") 2>conftest.er1
973a76b1 24018 ac_status=$?
edfaf76d
LK
24019 grep -v '^ *+' conftest.er1 >conftest.err
24020 rm -f conftest.er1
24021 cat conftest.err >&5
7bbec45b 24022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
24023 (exit $ac_status); } && {
24024 test -z "$ac_c_werror_flag" ||
24025 test ! -s conftest.err
24026 } && test -s conftest.$ac_objext; then
973a76b1
DL
24027 ac_cv_type_mbstate_t=yes
24028else
7bbec45b 24029 echo "$as_me: failed program was:" >&5
19650fd6
AS
24030sed 's/^/| /' conftest.$ac_ext >&5
24031
ca81d7a0 24032 ac_cv_type_mbstate_t=no
973a76b1 24033fi
ca81d7a0
JD
24034
24035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 24036fi
7bbec45b
CY
24037{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
24038echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
24039 if test $ac_cv_type_mbstate_t = yes; then
24040
24041cat >>confdefs.h <<\_ACEOF
24042#define HAVE_MBSTATE_T 1
24043_ACEOF
24044
24045 else
24046
24047cat >>confdefs.h <<\_ACEOF
24048#define mbstate_t int
24049_ACEOF
24050
24051 fi
24052
7bbec45b
CY
24053{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
24054echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf 24055if test "${emacs_cv_c_restrict+set}" = set; then
7bbec45b 24056 echo $ECHO_N "(cached) $ECHO_C" >&6
22044edf
DL
24057else
24058 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24059/* confdefs.h. */
24060_ACEOF
24061cat confdefs.h >>conftest.$ac_ext
24062cat >>conftest.$ac_ext <<_ACEOF
24063/* end confdefs.h. */
22044edf
DL
24064void fred (int *restrict x);
24065int
24066main ()
24067{
b936fae4 24068
22044edf
DL
24069 ;
24070 return 0;
24071}
c0d27fcc 24072_ACEOF
22044edf 24073rm -f conftest.$ac_objext
ca81d7a0
JD
24074if { (ac_try="$ac_compile"
24075case "(($ac_try" in
24076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24077 *) ac_try_echo=$ac_try;;
24078esac
7bbec45b 24079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24080 (eval "$ac_compile") 2>conftest.er1
22044edf 24081 ac_status=$?
edfaf76d
LK
24082 grep -v '^ *+' conftest.er1 >conftest.err
24083 rm -f conftest.er1
24084 cat conftest.err >&5
7bbec45b 24085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24086 (exit $ac_status); } && {
24087 test -z "$ac_c_werror_flag" ||
24088 test ! -s conftest.err
24089 } && test -s conftest.$ac_objext; then
22044edf
DL
24090 emacs_cv_c_restrict=yes
24091else
7bbec45b 24092 echo "$as_me: failed program was:" >&5
19650fd6
AS
24093sed 's/^/| /' conftest.$ac_ext >&5
24094
ca81d7a0 24095 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24096/* confdefs.h. */
24097_ACEOF
24098cat confdefs.h >>conftest.$ac_ext
24099cat >>conftest.$ac_ext <<_ACEOF
24100/* end confdefs.h. */
22044edf
DL
24101void fred (int *__restrict x);
24102int
24103main ()
24104{
c0d27fcc 24105
22044edf
DL
24106 ;
24107 return 0;
24108}
c0d27fcc 24109_ACEOF
22044edf 24110rm -f conftest.$ac_objext
ca81d7a0
JD
24111if { (ac_try="$ac_compile"
24112case "(($ac_try" in
24113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24114 *) ac_try_echo=$ac_try;;
24115esac
7bbec45b 24116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24117 (eval "$ac_compile") 2>conftest.er1
22044edf 24118 ac_status=$?
edfaf76d
LK
24119 grep -v '^ *+' conftest.er1 >conftest.err
24120 rm -f conftest.er1
24121 cat conftest.err >&5
7bbec45b 24122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24123 (exit $ac_status); } && {
24124 test -z "$ac_c_werror_flag" ||
24125 test ! -s conftest.err
24126 } && test -s conftest.$ac_objext; then
22044edf
DL
24127 emacs_cv_c_restrict=__restrict
24128else
7bbec45b 24129 echo "$as_me: failed program was:" >&5
19650fd6
AS
24130sed 's/^/| /' conftest.$ac_ext >&5
24131
ca81d7a0 24132 emacs_cv_c_restrict=no
ba4481b5 24133fi
ca81d7a0
JD
24134
24135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24136fi
ca81d7a0
JD
24137
24138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24139fi
7bbec45b
CY
24140{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24141echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24142case "$emacs_cv_c_restrict" in
24143 yes) emacs_restrict=restrict;;
24144 no) emacs_restrict="";;
24145 *) emacs_restrict="$emacs_cv_c_restrict";;
24146esac
24147if test "$emacs_restrict" != __restrict; then
b936fae4 24148
22044edf
DL
24149cat >>confdefs.h <<_ACEOF
24150#define __restrict $emacs_restrict
c0d27fcc 24151_ACEOF
ba4481b5
DL
24152
24153fi
ba4481b5 24154
7bbec45b
CY
24155{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24156echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf 24157if test "${emacs_cv_c_restrict_arr+set}" = set; then
7bbec45b 24158 echo $ECHO_N "(cached) $ECHO_C" >&6
22044edf
DL
24159else
24160 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24161/* confdefs.h. */
24162_ACEOF
24163cat confdefs.h >>conftest.$ac_ext
24164cat >>conftest.$ac_ext <<_ACEOF
24165/* end confdefs.h. */
22044edf
DL
24166void fred (int x[__restrict]);
24167int
24168main ()
24169{
b936fae4 24170
22044edf
DL
24171 ;
24172 return 0;
24173}
c0d27fcc 24174_ACEOF
22044edf 24175rm -f conftest.$ac_objext
ca81d7a0
JD
24176if { (ac_try="$ac_compile"
24177case "(($ac_try" in
24178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24179 *) ac_try_echo=$ac_try;;
24180esac
7bbec45b 24181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
ca81d7a0 24182 (eval "$ac_compile") 2>conftest.er1
22044edf 24183 ac_status=$?
edfaf76d
LK
24184 grep -v '^ *+' conftest.er1 >conftest.err
24185 rm -f conftest.er1
24186 cat conftest.err >&5
7bbec45b 24187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24188 (exit $ac_status); } && {
24189 test -z "$ac_c_werror_flag" ||
24190 test ! -s conftest.err
24191 } && test -s conftest.$ac_objext; then
22044edf
DL
24192 emacs_cv_c_restrict_arr=yes
24193else
7bbec45b 24194 echo "$as_me: failed program was:" >&5
19650fd6
AS
24195sed 's/^/| /' conftest.$ac_ext >&5
24196
ca81d7a0 24197 emacs_cv_c_restrict_arr=no
ba4481b5 24198fi
ca81d7a0
JD
24199
24200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24201fi
7bbec45b
CY
24202{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24203echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24204if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24205
c0d27fcc 24206cat >>confdefs.h <<\_ACEOF
22044edf 24207#define __restrict_arr __restrict
c0d27fcc 24208_ACEOF
ba4481b5 24209
ba4481b5
DL
24210fi
24211
c0d27fcc 24212
c0d27fcc 24213
22044edf
DL
24214# Set up the CFLAGS for real compilation, so we can substitute it.
24215CFLAGS="$REAL_CFLAGS"
24216CPPFLAGS="$REAL_CPPFLAGS"
24217
24218#### Find out which version of Emacs this is.
24219version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24220 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24221if test x"${version}" = x; then
7bbec45b
CY
24222 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24223echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22044edf
DL
24224 { (exit 1); exit 1; }; }
24225fi
24226
24227### Specify what sort of things we'll be editing into Makefile and config.h.
24228### Use configuration here uncanonicalized to avoid exceeding size limits.
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
6a3a24fa 24261
06b62770
AR
24262
24263
24264
48fad8e8
DN
24265
24266
5e159d07
CY
24267
24268
edfda783 24269
22044edf
DL
24270
24271
24272cat >>confdefs.h <<_ACEOF
24273#define EMACS_CONFIGURATION "${canonical}"
24274_ACEOF
24275
24276
24277cat >>confdefs.h <<_ACEOF
24278#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24279_ACEOF
24280
24281
24282cat >>confdefs.h <<_ACEOF
24283#define config_machfile "${machfile}"
24284_ACEOF
24285
24286
24287cat >>confdefs.h <<_ACEOF
24288#define config_opsysfile "${opsysfile}"
24289_ACEOF
24290
24291
24292cat >>confdefs.h <<_ACEOF
24293#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24294_ACEOF
24295
24296
24297cat >>confdefs.h <<_ACEOF
24298#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24299_ACEOF
24300
24301
24302cat >>confdefs.h <<_ACEOF
24303#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24304_ACEOF
24305
24306
24307cat >>confdefs.h <<_ACEOF
24308#define UNEXEC_SRC ${UNEXEC_SRC}
24309_ACEOF
24310
24311
24312if test "${HAVE_X_WINDOWS}" = "yes" ; then
24313
24314cat >>confdefs.h <<\_ACEOF
24315#define HAVE_X_WINDOWS 1
24316_ACEOF
24317
24318fi
24319if test "${USE_X_TOOLKIT}" != "none" ; then
24320
24321cat >>confdefs.h <<\_ACEOF
24322#define USE_X_TOOLKIT 1
24323_ACEOF
24324
39dd4d52 24325 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24326
24327cat >>confdefs.h <<\_ACEOF
24328#define USE_LUCID 1
24329_ACEOF
24330
39dd4d52 24331 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24332
24333cat >>confdefs.h <<\_ACEOF
24334#define USE_MOTIF 1
24335_ACEOF
24336
24337 fi
22044edf
DL
24338fi
24339if test "${HAVE_X11}" = "yes" ; then
24340
24341cat >>confdefs.h <<\_ACEOF
24342#define HAVE_X11 1
24343_ACEOF
24344
22044edf
DL
24345fi
24346if test "${HAVE_MENUS}" = "yes" ; then
24347
24348cat >>confdefs.h <<\_ACEOF
24349#define HAVE_MENUS 1
24350_ACEOF
24351
24352fi
24353if test "${GNU_MALLOC}" = "yes" ; then
24354
24355cat >>confdefs.h <<\_ACEOF
24356#define GNU_MALLOC 1
24357_ACEOF
24358
24359fi
24360if test "${REL_ALLOC}" = "yes" ; then
24361
24362cat >>confdefs.h <<\_ACEOF
24363#define REL_ALLOC 1
24364_ACEOF
24365
24366fi
24367
24368
24369
c0d27fcc
MR
24370
24371
5afbeb22 24372
ba4481b5 24373#### Report on what we decided to do.
488dd4c4
JD
24374#### Report GTK as a toolkit, even if it doesn't use Xt.
24375#### It makes printing result more understandable as using GTK sets
24376#### toolkit_scroll_bars to yes by default.
24377if test "${HAVE_GTK}" = "yes"; then
24378 USE_X_TOOLKIT=GTK
24379fi
24380
ba4481b5
DL
24381echo "
24382Configured for \`${canonical}'.
24383
24384 Where should the build process find the source code? ${srcdir}
24385 What operating system and machine description files should Emacs use?
24386 \`${opsysfile}' and \`${machfile}'
24387 What compiler should emacs be built with? ${CC} ${CFLAGS}
24388 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24389 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24390 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24391 What window system should Emacs use? ${window_system}
8e967cf7 24392 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24393
24394if test -n "${x_includes}"; then
24395echo " Where do we find X Windows header files? ${x_includes}"
24396else
24397echo " Where do we find X Windows header files? Standard dirs"
24398fi
24399if test -n "${x_libraries}"; then
24400echo " Where do we find X Windows libraries? ${x_libraries}"
24401else
24402echo " Where do we find X Windows libraries? Standard dirs"
24403fi
24404
24405echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24406echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24407echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24408echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24409echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24410echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24411echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24412echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24413echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24414
edfda783
AR
24415echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24416echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24417echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24418echo " Does Emacs use -lxft? ${HAVE_XFT}"
24419
8d87199b 24420echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
24421echo
24422
d0098f13
JD
24423if test $USE_XASSERTS = yes; then
24424 echo " Compiling with asserts turned on."
d0098f13 24425 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24426fi
05cf15c6 24427
ca34d75a
JD
24428echo
24429
a2d3b5bd
JD
24430if test "$USE_X_TOOLKIT" = GTK; then
24431 case "$canonical" in
24432 *cygwin*)
24433 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24434 will probably get a crash on startup. If this happens, please use another
24435 toolkit for Emacs. See etc/PROBLEMS for more information."
24436 ;;
24437 esac
24438fi
24439
06b62770
AR
24440if test "$HAVE_NS" = "yes"; then
24441 echo
24442 echo "You must run \"make install\" in order to test the built application.
24443The installed application will go to nextstep/Emacs.app and can be
24444run or moved from there."
24445 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24446 echo "The application will be fully self-contained."
24447 else
24448 echo "The lisp resources for the application will be installed under ${prefix}.
24449You may need to run \"make install\" with sudo. The application will fail
24450to run if these resources are not installed."
24451 fi
24452 echo
24453fi
24454
131e4133
MA
24455if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24456 echo "D-Bus integration has been tested for GNU/Linux only."
24457 echo
24458fi
24459
05cf15c6 24460
ba4481b5
DL
24461# Remove any trailing slashes in these variables.
24462test "${prefix}" != NONE &&
24463 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24464test "${exec_prefix}" != NONE &&
24465 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24466
8acdcf6f
GM
24467# Now get this: Some word that is part of the ${srcdir} directory name
24468# or the ${configuration} value might, just might, happen to be an
24469# identifier like `sun4' or `i386' or something, and be predefined by
24470# the C preprocessor to some helpful value like 1, or maybe the empty
24471# string. Needless to say consequent macro substitutions are less
24472# than conducive to the makefile finding the correct directory.
24473cpp_undefs="`echo $srcdir $configuration $canonical |
24474 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24475 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24476
d0e9bfd2
GM
24477## Check if the C preprocessor will convert `..' to `. .'. If so, set
24478## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24479## from Makefile.c can correctly provide the arg `-traditional' to the
24480## C preprocessor.
24481
503d2be0 24482cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24483/* confdefs.h. */
24484_ACEOF
24485cat confdefs.h >>conftest.$ac_ext
24486cat >>conftest.$ac_ext <<_ACEOF
24487/* end confdefs.h. */
d0e9bfd2 24488yes..yes
503d2be0 24489_ACEOF
d0e9bfd2 24490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24491 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24492 CPP_NEED_TRADITIONAL=no
24493else
d0e9bfd2
GM
24494 CPP_NEED_TRADITIONAL=yes
24495fi
24496rm -f conftest*
24497
c0d27fcc 24498
f657c21b 24499ac_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
24500
24501ac_config_commands="$ac_config_commands default"
24502
503d2be0 24503cat >confcache <<\_ACEOF
ba4481b5
DL
24504# This file is a shell script that caches the results of configure
24505# tests run on this system so they can be shared between configure
503d2be0
AS
24506# scripts and configure runs, see configure's option --config-cache.
24507# It is not useful on other systems. If it contains results you don't
24508# want to keep, you may remove or edit it.
ba4481b5 24509#
503d2be0
AS
24510# config.status only pays attention to the cache file if you give it
24511# the --recheck option to rerun configure.
ba4481b5 24512#
6bae0ccf 24513# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24514# loading this file, other *unset* `ac_cv_foo' will be assigned the
24515# following values.
24516
24517_ACEOF
24518
ba4481b5
DL
24519# The following way of writing the cache mishandles newlines in values,
24520# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24521# So, we kill variables containing newlines.
ba4481b5
DL
24522# Ultrix sh set writes to stderr and can't be redirected directly,
24523# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24524(
24525 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24526 eval ac_val=\$$ac_var
24527 case $ac_val in #(
24528 *${as_nl}*)
24529 case $ac_var in #(
7bbec45b
CY
24530 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24531echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
ca81d7a0
JD
24532 esac
24533 case $ac_var in #(
24534 _ | IFS | as_nl) ;; #(
24535 *) $as_unset $ac_var ;;
24536 esac ;;
24537 esac
24538 done
24539
503d2be0 24540 (set) 2>&1 |
ca81d7a0
JD
24541 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24542 *${as_nl}ac_space=\ *)
503d2be0
AS
24543 # `set' does not quote correctly, so add quotes (double-quote
24544 # substitution turns \\\\ into \\, and sed turns \\ into \).
24545 sed -n \
edfaf76d
LK
24546 "s/'/'\\\\''/g;
24547 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24548 ;; #(
503d2be0
AS
24549 *)
24550 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24551 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24552 ;;
ca81d7a0
JD
24553 esac |
24554 sort
24555) |
503d2be0 24556 sed '
ca81d7a0 24557 /^ac_cv_env_/b end
503d2be0 24558 t clear
ca81d7a0 24559 :clear
503d2be0
AS
24560 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24561 t end
ca81d7a0
JD
24562 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24563 :end' >>confcache
24564if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24565 if test -w "$cache_file"; then
24566 test "x$cache_file" != "x/dev/null" &&
7bbec45b
CY
24567 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24568echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24569 cat confcache >$cache_file
ba4481b5 24570 else
7bbec45b
CY
24571 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24572echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24573 fi
24574fi
24575rm -f confcache
24576
ba4481b5
DL
24577test "x$prefix" = xNONE && prefix=$ac_default_prefix
24578# Let make expand exec_prefix.
24579test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24580
ba4481b5
DL
24581DEFS=-DHAVE_CONFIG_H
24582
6bae0ccf
DL
24583ac_libobjs=
24584ac_ltlibobjs=
24585for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24586 # 1. Remove the extension, and $U if already installed.
ca81d7a0 24587 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
7bbec45b 24588 ac_i=`echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
24589 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24590 # will be set to the directory where LIBOBJS objects are built.
24591 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24592 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24593done
24594LIBOBJS=$ac_libobjs
24595
24596LTLIBOBJS=$ac_ltlibobjs
24597
24598
c0d27fcc 24599
ba4481b5 24600: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24601ac_clean_files_save=$ac_clean_files
24602ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7bbec45b
CY
24603{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24604echo "$as_me: creating $CONFIG_STATUS" >&6;}
24605cat >$CONFIG_STATUS <<_ACEOF
503d2be0 24606#! $SHELL
c0d27fcc 24607# Generated by $as_me.
ba4481b5 24608# Run this file to recreate the current configuration.
ba4481b5 24609# Compiler output produced by configure, useful for debugging
503d2be0 24610# configure, is in config.log if it exists.
ba4481b5 24611
503d2be0 24612debug=false
19650fd6
AS
24613ac_cs_recheck=false
24614ac_cs_silent=false
503d2be0 24615SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24616_ACEOF
24617
7bbec45b 24618cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24619## --------------------- ##
24620## M4sh Initialization. ##
24621## --------------------- ##
24622
f053c89f
CY
24623# Be more Bourne compatible
24624DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24625if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24626 emulate sh
24627 NULLCMD=:
7bbec45b 24628 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
6bae0ccf
DL
24629 # is contrary to our usage. Disable this feature.
24630 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24631 setopt NO_GLOB_SUBST
24632else
f053c89f
CY
24633 case `(set -o) 2>/dev/null` in
24634 *posix*) set -o posix ;;
24635esac
24636
503d2be0 24637fi
f053c89f
CY
24638
24639
503d2be0 24640
ca81d7a0
JD
24641
24642# PATH needs CR
24643# Avoid depending upon Character Ranges.
24644as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24645as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24646as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24647as_cr_digits='0123456789'
24648as_cr_alnum=$as_cr_Letters$as_cr_digits
24649
dc2933eb
JD
24650# The user is always right.
24651if test "${PATH_SEPARATOR+set}" != set; then
7bbec45b
CY
24652 echo "#! /bin/sh" >conf$$.sh
24653 echo "exit 0" >>conf$$.sh
24654 chmod +x conf$$.sh
24655 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24656 PATH_SEPARATOR=';'
24657 else
24658 PATH_SEPARATOR=:
24659 fi
24660 rm -f conf$$.sh
503d2be0
AS
24661fi
24662
c0d27fcc 24663# Support unset when possible.
edfaf76d 24664if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24665 as_unset=unset
24666else
24667 as_unset=false
24668fi
24669
6bae0ccf 24670
ca81d7a0
JD
24671# IFS
24672# We need space, tab and new line, in precisely that order. Quoting is
24673# there to prevent editors from complaining about space-tab.
24674# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24675# splitting by setting IFS to empty value.)
7bbec45b
CY
24676as_nl='
24677'
ca81d7a0
JD
24678IFS=" "" $as_nl"
24679
24680# Find who we are. Look in the path if we contain no directory separator.
24681case $0 in
24682 *[\\/]* ) as_myself=$0 ;;
24683 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24684for as_dir in $PATH
24685do
24686 IFS=$as_save_IFS
24687 test -z "$as_dir" && as_dir=.
24688 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24689done
24690IFS=$as_save_IFS
24691
24692 ;;
24693esac
24694# We did not find ourselves, most probably we were run as `sh COMMAND'
24695# in which case we are not to be found in the path.
24696if test "x$as_myself" = x; then
24697 as_myself=$0
24698fi
24699if test ! -f "$as_myself"; then
7bbec45b 24700 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ca81d7a0
JD
24701 { (exit 1); exit 1; }
24702fi
24703
6bae0ccf 24704# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24705for as_var in ENV MAIL MAILPATH
24706do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24707done
6bae0ccf
DL
24708PS1='$ '
24709PS2='> '
24710PS4='+ '
24711
24712# NLS nuisances.
7bbec45b
CY
24713for as_var in \
24714 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24715 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24716 LC_TELEPHONE LC_TIME
24717do
24718 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24719 eval $as_var=C; export $as_var
24720 else
24721 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24722 fi
24723done
6bae0ccf
DL
24724
24725# Required to use basename.
ca81d7a0
JD
24726if expr a : '\(a\)' >/dev/null 2>&1 &&
24727 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24728 as_expr=expr
24729else
24730 as_expr=false
24731fi
24732
ca81d7a0 24733if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24734 as_basename=basename
24735else
24736 as_basename=false
24737fi
c0d27fcc
MR
24738
24739
503d2be0 24740# Name of the executable.
ca81d7a0 24741as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24742$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24743 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24744 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
7bbec45b 24745echo X/"$0" |
ca81d7a0
JD
24746 sed '/^.*\/\([^/][^/]*\)\/*$/{
24747 s//\1/
24748 q
24749 }
24750 /^X\/\(\/\/\)$/{
24751 s//\1/
24752 q
24753 }
24754 /^X\/\(\/\).*/{
24755 s//\1/
24756 q
24757 }
24758 s/.*/./; q'`
c0d27fcc 24759
ca81d7a0
JD
24760# CDPATH.
24761$as_unset CDPATH
c0d27fcc
MR
24762
24763
c0d27fcc 24764
c0d27fcc 24765 as_lineno_1=$LINENO
c0d27fcc 24766 as_lineno_2=$LINENO
c0d27fcc 24767 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24768 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24769
24770 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24771 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24772 # line-number line after each line using $LINENO; the second 'sed'
24773 # does the real work. The second script uses 'N' to pair each
24774 # line-number line with the line containing $LINENO, and appends
24775 # trailing '-' during substitution so that $LINENO is not a special
24776 # case at line end.
c0d27fcc 24777 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24778 # scripts with optimization help from Paolo Bonzini. Blame Lee
24779 # E. McMahon (1931-1989) for sed's syntax. :-)
24780 sed -n '
24781 p
24782 /[$]LINENO/=
24783 ' <$as_myself |
c0d27fcc 24784 sed '
ca81d7a0
JD
24785 s/[$]LINENO.*/&-/
24786 t lineno
24787 b
24788 :lineno
c0d27fcc 24789 N
ca81d7a0
JD
24790 :loop
24791 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24792 t loop
ca81d7a0 24793 s/-\n.*//
c0d27fcc 24794 ' >$as_me.lineno &&
ca81d7a0 24795 chmod +x "$as_me.lineno" ||
7bbec45b 24796 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24797 { (exit 1); exit 1; }; }
24798
24799 # Don't try to exec as it changes $[0], causing all sort of problems
24800 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24801 # original and so on. Autoconf is especially sensitive to this).
24802 . "./$as_me.lineno"
c0d27fcc
MR
24803 # Exit status is that of the last command.
24804 exit
24805}
24806
24807
ca81d7a0
JD
24808if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24809 as_dirname=dirname
24810else
24811 as_dirname=false
24812fi
24813
24814ECHO_C= ECHO_N= ECHO_T=
24815case `echo -n x` in
24816-n*)
24817 case `echo 'x\c'` in
24818 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24819 *) ECHO_C='\c';;
24820 esac;;
24821*)
24822 ECHO_N='-n';;
c0d27fcc 24823esac
7bbec45b 24824
ca81d7a0
JD
24825if expr a : '\(a\)' >/dev/null 2>&1 &&
24826 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24827 as_expr=expr
24828else
24829 as_expr=false
24830fi
24831
24832rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24833if test -d conf$$.dir; then
24834 rm -f conf$$.dir/conf$$.file
24835else
24836 rm -f conf$$.dir
7bbec45b
CY
24837 mkdir conf$$.dir
24838fi
24839echo >conf$$.file
24840if ln -s conf$$.file conf$$ 2>/dev/null; then
24841 as_ln_s='ln -s'
24842 # ... but there are two gotchas:
24843 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24844 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24845 # In both cases, we have to default to `cp -p'.
24846 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24847 as_ln_s='cp -p'
7bbec45b
CY
24848elif ln conf$$.file conf$$ 2>/dev/null; then
24849 as_ln_s=ln
503d2be0
AS
24850else
24851 as_ln_s='cp -p'
24852fi
ca81d7a0
JD
24853rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24854rmdir conf$$.dir 2>/dev/null
503d2be0 24855
6bae0ccf
DL
24856if mkdir -p . 2>/dev/null; then
24857 as_mkdir_p=:
24858else
edfaf76d 24859 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24860 as_mkdir_p=false
24861fi
24862
f053c89f
CY
24863if test -x / >/dev/null 2>&1; then
24864 as_test_x='test -x'
ca81d7a0 24865else
f053c89f
CY
24866 if ls -dL / >/dev/null 2>&1; then
24867 as_ls_L_option=L
24868 else
24869 as_ls_L_option=
24870 fi
24871 as_test_x='
24872 eval sh -c '\''
24873 if test -d "$1"; then
7bbec45b 24874 test -d "$1/.";
f053c89f
CY
24875 else
24876 case $1 in
7bbec45b 24877 -*)set "./$1";;
f053c89f
CY
24878 esac;
24879 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24880 ???[sx]*):;;*)false;;esac;fi
24881 '\'' sh
24882 '
ca81d7a0 24883fi
f053c89f 24884as_executable_p=$as_test_x
503d2be0 24885
c0d27fcc 24886# Sed expression to map a string onto a valid CPP name.
edfaf76d 24887as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24888
24889# Sed expression to map a string onto a valid variable name.
edfaf76d 24890as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24891
503d2be0 24892
503d2be0
AS
24893exec 6>&1
24894
ca81d7a0 24895# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24896# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24897# values after options handling.
24898ac_log="
c962d7bf 24899This file was extended by emacs $as_me 23.0.92, which was
7bbec45b 24900generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24901
24902 CONFIG_FILES = $CONFIG_FILES
24903 CONFIG_HEADERS = $CONFIG_HEADERS
24904 CONFIG_LINKS = $CONFIG_LINKS
24905 CONFIG_COMMANDS = $CONFIG_COMMANDS
24906 $ $0 $@
24907
ca81d7a0
JD
24908on `(hostname || uname -n) 2>/dev/null | sed 1q`
24909"
24910
503d2be0
AS
24911_ACEOF
24912
7bbec45b 24913cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24914# Files that config.status was made for.
ca81d7a0
JD
24915config_files="$ac_config_files"
24916config_headers="$ac_config_headers"
24917config_commands="$ac_config_commands"
503d2be0 24918
ca81d7a0 24919_ACEOF
503d2be0 24920
7bbec45b 24921cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24922ac_cs_usage="\
24923\`$as_me' instantiates files from templates according to the
24924current configuration.
24925
b0448899 24926Usage: $0 [OPTIONS] [FILE]...
503d2be0
AS
24927
24928 -h, --help print this help, then exit
f053c89f 24929 -V, --version print version number and configuration settings, then exit
b0448899 24930 -q, --quiet do not print progress messages
503d2be0
AS
24931 -d, --debug don't remove temporary files
24932 --recheck update $as_me by reconfiguring in the same conditions
b0448899 24933 --file=FILE[:TEMPLATE]
7bbec45b 24934 instantiate the configuration file FILE
b0448899 24935 --header=FILE[:TEMPLATE]
7bbec45b 24936 instantiate the configuration header FILE
503d2be0
AS
24937
24938Configuration files:
24939$config_files
24940
24941Configuration headers:
24942$config_headers
24943
24944Configuration commands:
24945$config_commands
24946
24947Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24948
ca81d7a0 24949_ACEOF
7bbec45b 24950cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24951ac_cs_version="\\
c962d7bf 24952emacs config.status 23.0.92
7bbec45b
CY
24953configured by $0, generated by GNU Autoconf 2.61,
24954 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24955
7bbec45b 24956Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24957This config.status script is free software; the Free Software Foundation
24958gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24959
24960ac_pwd='$ac_pwd'
24961srcdir='$srcdir'
24962INSTALL='$INSTALL'
c0d27fcc 24963_ACEOF
503d2be0 24964
7bbec45b
CY
24965cat >>$CONFIG_STATUS <<\_ACEOF
24966# If no file are specified by the user, then we need to provide default
24967# value. By we need to know if files were specified by the user.
503d2be0
AS
24968ac_need_defaults=:
24969while test $# != 0
ba4481b5 24970do
503d2be0
AS
24971 case $1 in
24972 --*=*)
ca81d7a0
JD
24973 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24974 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24975 ac_shift=:
24976 ;;
ca81d7a0 24977 *)
6bae0ccf
DL
24978 ac_option=$1
24979 ac_optarg=$2
24980 ac_shift=shift
503d2be0 24981 ;;
503d2be0
AS
24982 esac
24983
6bae0ccf 24984 case $ac_option in
503d2be0 24985 # Handling of the options.
19650fd6
AS
24986 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24987 ac_cs_recheck=: ;;
ca81d7a0 24988 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
7bbec45b 24989 echo "$ac_cs_version"; exit ;;
ca81d7a0 24990 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24991 debug=: ;;
24992 --file | --fil | --fi | --f )
6bae0ccf 24993 $ac_shift
7bbec45b 24994 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24995 ac_need_defaults=false;;
24996 --header | --heade | --head | --hea )
6bae0ccf 24997 $ac_shift
7bbec45b 24998 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24999 ac_need_defaults=false;;
ca81d7a0
JD
25000 --he | --h)
25001 # Conflict between --help and --header
7bbec45b 25002 { echo "$as_me: error: ambiguous option: $1
ca81d7a0
JD
25003Try \`$0 --help' for more information." >&2
25004 { (exit 1); exit 1; }; };;
25005 --help | --hel | -h )
7bbec45b 25006 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
25007 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25008 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25009 ac_cs_silent=: ;;
503d2be0
AS
25010
25011 # This is an error.
7bbec45b 25012 -*) { echo "$as_me: error: unrecognized option: $1
ca81d7a0 25013Try \`$0 --help' for more information." >&2
503d2be0
AS
25014 { (exit 1); exit 1; }; } ;;
25015
ca81d7a0
JD
25016 *) ac_config_targets="$ac_config_targets $1"
25017 ac_need_defaults=false ;;
503d2be0 25018
ba4481b5 25019 esac
503d2be0 25020 shift
ba4481b5
DL
25021done
25022
19650fd6
AS
25023ac_configure_extra_args=
25024
25025if $ac_cs_silent; then
25026 exec 6>/dev/null
25027 ac_configure_extra_args="$ac_configure_extra_args --silent"
25028fi
25029
25030_ACEOF
7bbec45b 25031cat >>$CONFIG_STATUS <<_ACEOF
19650fd6 25032if \$ac_cs_recheck; then
7bbec45b
CY
25033 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25034 CONFIG_SHELL=$SHELL
ca81d7a0 25035 export CONFIG_SHELL
7bbec45b 25036 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
25037fi
25038
503d2be0 25039_ACEOF
7bbec45b 25040cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25041exec 5>>config.log
25042{
25043 echo
25044 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25045## Running $as_me. ##
25046_ASBOX
7bbec45b 25047 echo "$ac_log"
ca81d7a0 25048} >&5
ba4481b5 25049
ca81d7a0 25050_ACEOF
7bbec45b 25051cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 25052#
ca81d7a0 25053# INIT-COMMANDS
503d2be0 25054#
8acdcf6f 25055GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 25056
c0d27fcc
MR
25057_ACEOF
25058
7bbec45b 25059cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25060
25061# Handling of arguments.
503d2be0
AS
25062for ac_config_target in $ac_config_targets
25063do
ca81d7a0
JD
25064 case $ac_config_target in
25065 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
25066 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25067 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
25068 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
25069 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
25070 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
25071 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25072 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 25073 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 25074 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 25075 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
25076 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25077 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25078
7bbec45b
CY
25079 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25080echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
503d2be0
AS
25081 { (exit 1); exit 1; }; };;
25082 esac
ba4481b5 25083done
503d2be0 25084
ca81d7a0 25085
503d2be0
AS
25086# If the user did not use the arguments to specify the items to instantiate,
25087# then the envvar interface is used. Set only those that are not.
25088# We use the long form for the default assignment because of an extremely
25089# bizarre bug on SunOS 4.1.3.
25090if $ac_need_defaults; then
25091 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25092 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25093 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 25094fi
503d2be0 25095
19650fd6 25096# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 25097# simply because there is no reason against having it here, and in addition,
19650fd6 25098# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
25099# Hook for its removal unless debugging.
25100# Note that there is a small window in which the directory will not be cleaned:
25101# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
25102$debug ||
25103{
ca81d7a0
JD
25104 tmp=
25105 trap 'exit_status=$?
25106 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25107' 0
503d2be0
AS
25108 trap '{ (exit 1); exit 1; }' 1 2 13 15
25109}
503d2be0 25110# Create a (secure) tmp directory for tmp files.
19650fd6 25111
503d2be0 25112{
ca81d7a0 25113 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25114 test -n "$tmp" && test -d "$tmp"
25115} ||
25116{
ca81d7a0
JD
25117 tmp=./conf$$-$RANDOM
25118 (umask 077 && mkdir "$tmp")
503d2be0
AS
25119} ||
25120{
7bbec45b 25121 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25122 { (exit 1); exit 1; }
25123}
25124
7bbec45b
CY
25125#
25126# Set up the sed scripts for CONFIG_FILES section.
25127#
25128
25129# No need to generate the scripts if there are no CONFIG_FILES.
25130# This happens for instance when ./config.status config.h
ca81d7a0
JD
25131if test -n "$CONFIG_FILES"; then
25132
7bbec45b 25133_ACEOF
b0448899 25134
7bbec45b
CY
25135
25136
25137ac_delim='%!_!# '
25138for ac_last_try in false false false false false :; do
25139 cat >conf$$subs.sed <<_ACEOF
25140SHELL!$SHELL$ac_delim
25141PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25142PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25143PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25144PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25145PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25146PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25147exec_prefix!$exec_prefix$ac_delim
25148prefix!$prefix$ac_delim
25149program_transform_name!$program_transform_name$ac_delim
25150bindir!$bindir$ac_delim
25151sbindir!$sbindir$ac_delim
25152libexecdir!$libexecdir$ac_delim
25153datarootdir!$datarootdir$ac_delim
25154datadir!$datadir$ac_delim
25155sysconfdir!$sysconfdir$ac_delim
25156sharedstatedir!$sharedstatedir$ac_delim
25157localstatedir!$localstatedir$ac_delim
25158includedir!$includedir$ac_delim
25159oldincludedir!$oldincludedir$ac_delim
25160docdir!$docdir$ac_delim
25161infodir!$infodir$ac_delim
25162htmldir!$htmldir$ac_delim
25163dvidir!$dvidir$ac_delim
25164pdfdir!$pdfdir$ac_delim
25165psdir!$psdir$ac_delim
25166libdir!$libdir$ac_delim
25167localedir!$localedir$ac_delim
25168mandir!$mandir$ac_delim
25169DEFS!$DEFS$ac_delim
25170ECHO_C!$ECHO_C$ac_delim
25171ECHO_N!$ECHO_N$ac_delim
25172ECHO_T!$ECHO_T$ac_delim
25173LIBS!$LIBS$ac_delim
25174build_alias!$build_alias$ac_delim
25175host_alias!$host_alias$ac_delim
25176target_alias!$target_alias$ac_delim
25177MAINT!$MAINT$ac_delim
25178build!$build$ac_delim
25179build_cpu!$build_cpu$ac_delim
25180build_vendor!$build_vendor$ac_delim
25181build_os!$build_os$ac_delim
25182host!$host$ac_delim
25183host_cpu!$host_cpu$ac_delim
25184host_vendor!$host_vendor$ac_delim
25185host_os!$host_os$ac_delim
25186CC!$CC$ac_delim
25187CFLAGS!$CFLAGS$ac_delim
25188LDFLAGS!$LDFLAGS$ac_delim
25189CPPFLAGS!$CPPFLAGS$ac_delim
25190ac_ct_CC!$ac_ct_CC$ac_delim
25191EXEEXT!$EXEEXT$ac_delim
25192OBJEXT!$OBJEXT$ac_delim
25193CPP!$CPP$ac_delim
25194GREP!$GREP$ac_delim
25195EGREP!$EGREP$ac_delim
25196LN_S!$LN_S$ac_delim
25197INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25198INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25199INSTALL_DATA!$INSTALL_DATA$ac_delim
25200RANLIB!$RANLIB$ac_delim
25201INSTALL_INFO!$INSTALL_INFO$ac_delim
25202GZIP_PROG!$GZIP_PROG$ac_delim
25203MAKEINFO!$MAKEINFO$ac_delim
25204LIBSOUND!$LIBSOUND$ac_delim
25205PKG_CONFIG!$PKG_CONFIG$ac_delim
25206ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25207ALSA_LIBS!$ALSA_LIBS$ac_delim
25208CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25209SET_MAKE!$SET_MAKE$ac_delim
25210XMKMF!$XMKMF$ac_delim
25211HAVE_XSERVER!$HAVE_XSERVER$ac_delim
25212RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25213RSVG_LIBS!$RSVG_LIBS$ac_delim
25214GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25215GTK_LIBS!$GTK_LIBS$ac_delim
25216DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25217DBUS_LIBS!$DBUS_LIBS$ac_delim
25218FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25219FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
25220XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25221XFT_LIBS!$XFT_LIBS$ac_delim
25222LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25223LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
25224M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25225M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
25226FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25227FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25228ALLOCA!$ALLOCA$ac_delim
25229liblockfile!$liblockfile$ac_delim
25230LIBOBJS!$LIBOBJS$ac_delim
25231NEED_SETGID!$NEED_SETGID$ac_delim
25232KMEM_GROUP!$KMEM_GROUP$ac_delim
25233GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25234GETOPT_H!$GETOPT_H$ac_delim
25235GETOPTOBJS!$GETOPTOBJS$ac_delim
25236version!$version$ac_delim
25237_ACEOF
25238
25239 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25240 break
25241 elif $ac_last_try; then
25242 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25243echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25244 { (exit 1); exit 1; }; }
25245 else
25246 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25247 fi
25248done
25249
25250ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25251if test -n "$ac_eof"; then
25252 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25253 ac_eof=`expr $ac_eof + 1`
ca81d7a0 25254fi
503d2be0 25255
7bbec45b
CY
25256cat >>$CONFIG_STATUS <<_ACEOF
25257cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25258/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25259_ACEOF
25260sed '
25261s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25262s/^/s,@/; s/!/@,|#_!!_#|/
25263:n
25264t n
25265s/'"$ac_delim"'$/,g/; t
25266s/$/\\/; p
25267N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25268' >>$CONFIG_STATUS <conf$$subs.sed
25269rm -f conf$$subs.sed
25270cat >>$CONFIG_STATUS <<_ACEOF
25271CEOF$ac_eof
ca81d7a0 25272_ACEOF
503d2be0 25273
ca81d7a0
JD
25274
25275ac_delim='%!_!# '
25276for ac_last_try in false false false false false :; do
7bbec45b
CY
25277 cat >conf$$subs.sed <<_ACEOF
25278configuration!$configuration$ac_delim
25279canonical!$canonical$ac_delim
25280srcdir!$srcdir$ac_delim
25281lispdir!$lispdir$ac_delim
25282locallisppath!$locallisppath$ac_delim
25283lisppath!$lisppath$ac_delim
25284x_default_search_path!$x_default_search_path$ac_delim
25285etcdir!$etcdir$ac_delim
25286archlibdir!$archlibdir$ac_delim
25287bitmapdir!$bitmapdir$ac_delim
25288gamedir!$gamedir$ac_delim
25289gameuser!$gameuser$ac_delim
25290c_switch_system!$c_switch_system$ac_delim
25291c_switch_machine!$c_switch_machine$ac_delim
25292LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25293LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
25294C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25295X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25296machfile!$machfile$ac_delim
25297opsysfile!$opsysfile$ac_delim
25298ns_appdir!$ns_appdir$ac_delim
25299ns_appbindir!$ns_appbindir$ac_delim
25300ns_appresdir!$ns_appresdir$ac_delim
25301ns_appsrc!$ns_appsrc$ac_delim
25302GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
25303GNUSTEP_SYSTEM_HEADERS!$GNUSTEP_SYSTEM_HEADERS$ac_delim
25304GNUSTEP_SYSTEM_LIBRARIES!$GNUSTEP_SYSTEM_LIBRARIES$ac_delim
25305GNU_OBJC_CFLAGS!$GNU_OBJC_CFLAGS$ac_delim
25306LIB_SRC_EXTRA_INSTALLABLES!$LIB_SRC_EXTRA_INSTALLABLES$ac_delim
25307LTLIBOBJS!$LTLIBOBJS$ac_delim
25308_ACEOF
25309
25310 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
c24fa7dc
MB
25311 break
25312 elif $ac_last_try; then
7bbec45b
CY
25313 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25314echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
c24fa7dc
MB
25315 { (exit 1); exit 1; }; }
25316 else
25317 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25318 fi
ca81d7a0 25319done
1e0093ea 25320
7bbec45b
CY
25321ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25322if test -n "$ac_eof"; then
25323 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25324 ac_eof=`expr $ac_eof + 1`
25325fi
ba4481b5 25326
7bbec45b
CY
25327cat >>$CONFIG_STATUS <<_ACEOF
25328cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25329/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
ca81d7a0 25330_ACEOF
7bbec45b
CY
25331sed '
25332s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25333s/^/s,@/; s/!/@,|#_!!_#|/
25334:n
25335t n
25336s/'"$ac_delim"'$/,g/; t
25337s/$/\\/; p
25338N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25339' >>$CONFIG_STATUS <conf$$subs.sed
25340rm -f conf$$subs.sed
25341cat >>$CONFIG_STATUS <<_ACEOF
25342:end
25343s/|#_!!_#|//g
25344CEOF$ac_eof
c0d27fcc 25345_ACEOF
ca81d7a0 25346
7bbec45b 25347
ca81d7a0
JD
25348# VPATH may cause trouble with some makes, so we remove $(srcdir),
25349# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25350# trailing colons and then remove the whole line if VPATH becomes empty
25351# (actually we leave an empty line to preserve line numbers).
25352if test "x$srcdir" = x.; then
25353 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25354s/:*\$(srcdir):*/:/
25355s/:*\${srcdir}:*/:/
25356s/:*@srcdir@:*/:/
25357s/^\([^=]*=[ ]*\):*/\1/
25358s/:*$//
25359s/^[^=]*=[ ]*$//
25360}'
25361fi
25362
7bbec45b 25363cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25364fi # test -n "$CONFIG_FILES"
25365
dc2933eb 25366
7bbec45b 25367for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
ca81d7a0
JD
25368do
25369 case $ac_tag in
25370 :[FHLC]) ac_mode=$ac_tag; continue;;
25371 esac
25372 case $ac_mode$ac_tag in
25373 :[FHL]*:*);;
7bbec45b
CY
25374 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25375echo "$as_me: error: Invalid tag $ac_tag." >&2;}
ca81d7a0
JD
25376 { (exit 1); exit 1; }; };;
25377 :[FH]-) ac_tag=-:-;;
25378 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25379 esac
25380 ac_save_IFS=$IFS
25381 IFS=:
25382 set x $ac_tag
25383 IFS=$ac_save_IFS
25384 shift
25385 ac_file=$1
25386 shift
25387
25388 case $ac_mode in
25389 :L) ac_source=$1;;
25390 :[FH])
25391 ac_file_inputs=
25392 for ac_f
25393 do
25394 case $ac_f in
25395 -) ac_f="$tmp/stdin";;
25396 *) # Look for the file first in the build tree, then in the source tree
25397 # (if the path is not absolute). The absolute path cannot be DOS-style,
25398 # because $ac_f cannot contain `:'.
25399 test -f "$ac_f" ||
25400 case $ac_f in
25401 [\\/$]*) false;;
25402 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25403 esac ||
7bbec45b
CY
25404 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25405echo "$as_me: error: cannot find input file: $ac_f" >&2;}
ca81d7a0
JD
25406 { (exit 1); exit 1; }; };;
25407 esac
7bbec45b 25408 ac_file_inputs="$ac_file_inputs $ac_f"
ca81d7a0
JD
25409 done
25410
25411 # Let's still pretend it is `configure' which instantiates (i.e., don't
25412 # use $as_me), people would be surprised to read:
25413 # /* config.h. Generated by config.status. */
7bbec45b
CY
25414 configure_input="Generated from "`IFS=:
25415 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
ca81d7a0
JD
25416 if test x"$ac_file" != x-; then
25417 configure_input="$ac_file. $configure_input"
7bbec45b
CY
25418 { echo "$as_me:$LINENO: creating $ac_file" >&5
25419echo "$as_me: creating $ac_file" >&6;}
ca81d7a0
JD
25420 fi
25421
25422 case $ac_tag in
7bbec45b 25423 *:-:* | *:-) cat >"$tmp/stdin";;
ca81d7a0
JD
25424 esac
25425 ;;
ba4481b5
DL
25426 esac
25427
ca81d7a0 25428 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25429$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25430 X"$ac_file" : 'X\(//\)[^/]' \| \
25431 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25432 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
7bbec45b 25433echo X"$ac_file" |
ca81d7a0
JD
25434 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25435 s//\1/
25436 q
25437 }
25438 /^X\(\/\/\)[^/].*/{
25439 s//\1/
25440 q
25441 }
25442 /^X\(\/\/\)$/{
25443 s//\1/
25444 q
25445 }
25446 /^X\(\/\).*/{
25447 s//\1/
25448 q
25449 }
25450 s/.*/./; q'`
25451 { as_dir="$ac_dir"
25452 case $as_dir in #(
25453 -*) as_dir=./$as_dir;;
25454 esac
25455 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25456 as_dirs=
ca81d7a0
JD
25457 while :; do
25458 case $as_dir in #(
7bbec45b 25459 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
ca81d7a0
JD
25460 *) as_qdir=$as_dir;;
25461 esac
25462 as_dirs="'$as_qdir' $as_dirs"
25463 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25464$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25465 X"$as_dir" : 'X\(//\)[^/]' \| \
25466 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25467 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
7bbec45b 25468echo X"$as_dir" |
ca81d7a0
JD
25469 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25470 s//\1/
25471 q
25472 }
25473 /^X\(\/\/\)[^/].*/{
25474 s//\1/
25475 q
25476 }
25477 /^X\(\/\/\)$/{
25478 s//\1/
25479 q
25480 }
25481 /^X\(\/\).*/{
25482 s//\1/
25483 q
25484 }
25485 s/.*/./; q'`
25486 test -d "$as_dir" && break
6bae0ccf 25487 done
ca81d7a0 25488 test -z "$as_dirs" || eval "mkdir $as_dirs"
7bbec45b
CY
25489 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25490echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25491 { (exit 1); exit 1; }; }; }
c0d27fcc 25492 ac_builddir=.
98418dba 25493
ca81d7a0
JD
25494case "$ac_dir" in
25495.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25496*)
7bbec45b 25497 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0 25498 # A ".." for each directory in $ac_dir_suffix.
7bbec45b 25499 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
ca81d7a0
JD
25500 case $ac_top_builddir_sub in
25501 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25502 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25503 esac ;;
25504esac
25505ac_abs_top_builddir=$ac_pwd
25506ac_abs_builddir=$ac_pwd$ac_dir_suffix
25507# for backward compatibility:
25508ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25509
25510case $srcdir in
ca81d7a0 25511 .) # We are building in place.
c0d27fcc 25512 ac_srcdir=.
ca81d7a0
JD
25513 ac_top_srcdir=$ac_top_builddir_sub
25514 ac_abs_top_srcdir=$ac_pwd ;;
25515 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25516 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25517 ac_top_srcdir=$srcdir
25518 ac_abs_top_srcdir=$srcdir ;;
25519 *) # Relative name.
25520 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25521 ac_top_srcdir=$ac_top_build_prefix$srcdir
25522 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25523esac
ca81d7a0 25524ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25525
c0d27fcc 25526
ca81d7a0
JD
25527 case $ac_mode in
25528 :F)
25529 #
25530 # CONFIG_FILE
25531 #
ba4481b5 25532
503d2be0
AS
25533 case $INSTALL in
25534 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25535 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25536 esac
ca81d7a0 25537_ACEOF
ba4481b5 25538
7bbec45b 25539cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25540# If the template does not know about datarootdir, expand it.
25541# FIXME: This hack should be removed a few years after 2.60.
25542ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25543
7bbec45b 25544case `sed -n '/datarootdir/ {
ca81d7a0
JD
25545 p
25546 q
25547}
25548/@datadir@/p
25549/@docdir@/p
25550/@infodir@/p
25551/@localedir@/p
25552/@mandir@/p
7bbec45b 25553' $ac_file_inputs` in
ca81d7a0
JD
25554*datarootdir*) ac_datarootdir_seen=yes;;
25555*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
7bbec45b
CY
25556 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25557echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25558_ACEOF
7bbec45b 25559cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25560 ac_datarootdir_hack='
25561 s&@datadir@&$datadir&g
25562 s&@docdir@&$docdir&g
25563 s&@infodir@&$infodir&g
25564 s&@localedir@&$localedir&g
25565 s&@mandir@&$mandir&g
25566 s&\\\${datarootdir}&$datarootdir&g' ;;
25567esac
c0d27fcc 25568_ACEOF
ca81d7a0
JD
25569
25570# Neutralize VPATH when `$srcdir' = `.'.
25571# Shell code in configure.ac might set extrasub.
25572# FIXME: do we really want to maintain this feature?
7bbec45b
CY
25573cat >>$CONFIG_STATUS <<_ACEOF
25574 sed "$ac_vpsub
503d2be0 25575$extrasub
c0d27fcc 25576_ACEOF
7bbec45b 25577cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25578:t
25579/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7bbec45b 25580s&@configure_input@&$configure_input&;t t
ca81d7a0
JD
25581s&@top_builddir@&$ac_top_builddir_sub&;t t
25582s&@srcdir@&$ac_srcdir&;t t
25583s&@abs_srcdir@&$ac_abs_srcdir&;t t
25584s&@top_srcdir@&$ac_top_srcdir&;t t
25585s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25586s&@builddir@&$ac_builddir&;t t
25587s&@abs_builddir@&$ac_abs_builddir&;t t
25588s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25589s&@INSTALL@&$ac_INSTALL&;t t
25590$ac_datarootdir_hack
7bbec45b 25591" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
ca81d7a0
JD
25592
25593test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25594 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25595 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
7bbec45b 25596 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0 25597which seems to be undefined. Please make sure it is defined." >&5
7bbec45b 25598echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0
JD
25599which seems to be undefined. Please make sure it is defined." >&2;}
25600
25601 rm -f "$tmp/stdin"
503d2be0 25602 case $ac_file in
7bbec45b
CY
25603 -) cat "$tmp/out"; rm -f "$tmp/out";;
25604 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
25605 esac
ca81d7a0
JD
25606 ;;
25607 :H)
25608 #
25609 # CONFIG_HEADER
25610 #
7bbec45b
CY
25611_ACEOF
25612
25613# Transform confdefs.h into a sed script `conftest.defines', that
25614# substitutes the proper values into config.h.in to produce config.h.
25615rm -f conftest.defines conftest.tail
25616# First, append a space to every undef/define line, to ease matching.
25617echo 's/$/ /' >conftest.defines
25618# Then, protect against being on the right side of a sed subst, or in
25619# an unquoted here document, in config.status. If some macros were
25620# called several times there might be several #defines for the same
25621# symbol, which is useless. But do not sort them, since the last
25622# AC_DEFINE must be honored.
25623ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25624# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25625# NAME is the cpp macro being defined, VALUE is the value it is being given.
25626# PARAMS is the parameter list in the macro definition--in most cases, it's
25627# just an empty string.
25628ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25629ac_dB='\\)[ (].*,\\1define\\2'
25630ac_dC=' '
25631ac_dD=' ,'
25632
25633uniq confdefs.h |
25634 sed -n '
25635 t rset
25636 :rset
25637 s/^[ ]*#[ ]*define[ ][ ]*//
25638 t ok
25639 d
25640 :ok
25641 s/[\\&,]/\\&/g
25642 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25643 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25644 ' >>conftest.defines
25645
25646# Remove the space that was appended to ease matching.
25647# Then replace #undef with comments. This is necessary, for
25648# example, in the case of _POSIX_SOURCE, which is predefined and required
25649# on some systems where configure will not decide to define it.
25650# (The regexp can be short, since the line contains either #define or #undef.)
25651echo 's/ $//
25652s,^[ #]*u.*,/* & */,' >>conftest.defines
25653
25654# Break up conftest.defines:
25655ac_max_sed_lines=50
25656
25657# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25658# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25659# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25660# et cetera.
25661ac_in='$ac_file_inputs'
25662ac_out='"$tmp/out1"'
25663ac_nxt='"$tmp/out2"'
25664
25665while :
25666do
25667 # Write a here document:
25668 cat >>$CONFIG_STATUS <<_ACEOF
25669 # First, check the format of the line:
25670 cat >"\$tmp/defines.sed" <<\\CEOF
25671/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25672/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25673b
25674:def
25675_ACEOF
25676 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
25677 echo 'CEOF
25678 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25679 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25680 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25681 grep . conftest.tail >/dev/null || break
25682 rm -f conftest.defines
25683 mv conftest.tail conftest.defines
25684done
25685rm -f conftest.defines conftest.tail
25686
25687echo "ac_result=$ac_in" >>$CONFIG_STATUS
25688cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25689 if test x"$ac_file" != x-; then
7bbec45b
CY
25690 echo "/* $configure_input */" >"$tmp/config.h"
25691 cat "$ac_result" >>"$tmp/config.h"
25692 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
25693 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25694echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 25695 else
7bbec45b
CY
25696 rm -f $ac_file
25697 mv "$tmp/config.h" $ac_file
ba4481b5 25698 fi
503d2be0 25699 else
7bbec45b
CY
25700 echo "/* $configure_input */"
25701 cat "$ac_result"
ba4481b5 25702 fi
7bbec45b 25703 rm -f "$tmp/out12"
ca81d7a0 25704 ;;
edfaf76d 25705
7bbec45b
CY
25706 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25707echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
25708 ;;
25709 esac
ba4481b5 25710
c0d27fcc 25711
ca81d7a0
JD
25712 case $ac_file$ac_mode in
25713 "default":C)
ba4481b5
DL
25714
25715### Make the necessary directories, if they don't exist.
25716for dir in etc lisp ; do
25717 test -d ${dir} || mkdir ${dir}
25718done
25719
25720# Build src/Makefile from ${srcdir}/src/Makefile.c
25721# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25722# This must be done after src/config.h is built, since we rely on that file.
25723
ba4481b5 25724echo creating src/epaths.h
4aa6b955 25725${MAKE-make} epaths-force
ba4481b5 25726
1c203d4c
DL
25727# As of 2000-11-19, newest development versions of GNU cpp preprocess
25728# `..' to `. .' unless invoked with -traditional
25729
d0e9bfd2 25730if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25731 CPPFLAGS="$CPPFLAGS -traditional"
25732fi
25733
ba4481b5
DL
25734echo creating lib-src/Makefile
25735( cd lib-src
25736 rm -f junk.c junk1.c junk2.c
25737 sed -e '/start of cpp stuff/q' \
25738 < Makefile.c > junk1.c
25739 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25740 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25741 < Makefile.c > junk.c
8acdcf6f 25742 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25743 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25744 cat junk1.c junk2.c > Makefile.new
25745 rm -f junk.c junk1.c junk2.c
25746 chmod 444 Makefile.new
25747 mv -f Makefile.new Makefile
25748)
25749
25750echo creating src/Makefile
25751( cd src
25752 rm -f junk.c junk1.c junk2.c
25753 sed -e '/start of cpp stuff/q' \
25754 < Makefile.c > junk1.c
25755 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25756 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25757 < Makefile.c > junk.c
8acdcf6f 25758 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25759 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25760 cat junk1.c junk2.c > Makefile.new
25761 rm -f junk.c junk1.c junk2.c
25762 chmod 444 Makefile.new
25763 mv -f Makefile.new Makefile
25764)
25765
503d2be0 25766if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25767 echo creating src/.gdbinit
503d2be0 25768 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25769fi
25770
503d2be0 25771 ;;
ca81d7a0 25772
503d2be0 25773 esac
ca81d7a0 25774done # for ac_tag
503d2be0 25775
ba4481b5 25776
503d2be0 25777{ (exit 0); exit 0; }
c0d27fcc 25778_ACEOF
ba4481b5 25779chmod +x $CONFIG_STATUS
503d2be0
AS
25780ac_clean_files=$ac_clean_files_save
25781
c0d27fcc 25782
503d2be0
AS
25783# configure is writing to config.log, and then calls config.status.
25784# config.status does its own redirection, appending to config.log.
25785# Unfortunately, on DOS this fails, as config.log is still kept open
25786# by configure, so config.status won't be able to write to it; its
25787# output is simply discarded. So we exec the FD to /dev/null,
25788# effectively closing config.log, so it can be properly (re)opened and
25789# appended to by config.status. When coming back to configure, we
25790# need to make the FD available again.
25791if test "$no_create" != yes; then
25792 ac_cs_success=:
19650fd6
AS
25793 ac_config_status_args=
25794 test "$silent" = yes &&
25795 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25796 exec 5>/dev/null
19650fd6 25797 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25798 exec 5>>config.log
25799 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25800 # would make configure fail if this is the last instruction.
25801 $ac_cs_success || { (exit 1); exit 1; }
25802fi
f5f47add 25803
c0d27fcc 25804