Auto-commit of generated files.
[bpt/emacs.git] / autogen / configure
CommitLineData
067d23c9
KY
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
250c8ab9 3# Generated by GNU Autoconf 2.65 for emacs 24.2.50.
067d23c9
KY
4#
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
a9bec17c
GM
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
067d23c9
KY
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113fi
114
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122done
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
132
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
a9bec17c 221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
067d23c9
KY
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
a9bec17c
GM
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
067d23c9
KY
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 363# script with status $?, using 1 if that was 0.
067d23c9
KY
364as_fn_error ()
365{
a9bec17c
GM
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 370 fi
a9bec17c 371 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
372 as_fn_exit $as_status
373} # as_fn_error
374
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
377 as_expr=expr
378else
379 as_expr=false
380fi
381
382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384else
385 as_basename=false
386fi
387
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
393
394as_me=`$as_basename -- "$0" ||
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
398$as_echo X/"$0" |
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
412
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
419
420
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
443
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
450}
451
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461*)
462 ECHO_N='-n';;
463esac
464
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
471fi
472if (echo >conf$$.file) 2>/dev/null; then
473 if ln -s conf$$.file conf$$ 2>/dev/null; then
474 as_ln_s='ln -s'
475 # ... but there are two gotchas:
476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478 # In both cases, we have to default to `cp -p'.
479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480 as_ln_s='cp -p'
481 elif ln conf$$.file conf$$ 2>/dev/null; then
482 as_ln_s=ln
483 else
484 as_ln_s='cp -p'
485 fi
486else
487 as_ln_s='cp -p'
488fi
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
491
492if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
497fi
498
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
501else
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
519fi
520as_executable_p=$as_test_x
521
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
531
532# Name of the host.
a9bec17c 533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
067d23c9
KY
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537#
538# Initializations.
539#
540ac_default_prefix=/usr/local
541ac_clean_files=
542ac_config_libobj_dir=.
543LIBOBJS=
544cross_compiling=no
545subdirs=
546MFLAGS=
547MAKEFLAGS=
548
549# Identity of this package.
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
250c8ab9
GM
552PACKAGE_VERSION='24.2.50'
553PACKAGE_STRING='emacs 24.2.50'
067d23c9
KY
554PACKAGE_BUGREPORT=''
555PACKAGE_URL=''
556
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
561#ifdef HAVE_SYS_TYPES_H
562# include <sys/types.h>
563#endif
564#ifdef HAVE_SYS_STAT_H
565# include <sys/stat.h>
566#endif
567#ifdef STDC_HEADERS
568# include <stdlib.h>
569# include <stddef.h>
570#else
571# ifdef HAVE_STDLIB_H
572# include <stdlib.h>
573# endif
574#endif
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
581#ifdef HAVE_STRINGS_H
582# include <strings.h>
583#endif
584#ifdef HAVE_INTTYPES_H
585# include <inttypes.h>
586#endif
587#ifdef HAVE_STDINT_H
588# include <stdint.h>
589#endif
590#ifdef HAVE_UNISTD_H
591# include <unistd.h>
592#endif"
593
f199cab1 594ac_header_list=
5476a9a4 595ac_func_list=
e275c824 596gl_getopt_required=POSIX
7e723570 597gl_getopt_required=POSIX
743c80a7
PE
598ac_subst_vars='gltests_LTLIBOBJS
599gltests_LIBOBJS
600gl_LTLIBOBJS
601gl_LIBOBJS
602am__EXEEXT_FALSE
603am__EXEEXT_TRUE
604LTLIBOBJS
1f5d53eb 605LIBOBJS
73b78882 606SUBDIR_MAKEFILES_IN
42dcba54 607WINDOW_SYSTEM_OBJ
067d23c9
KY
608LIB_GCC
609LD_FIRSTFLAG
610LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
611LIBGNU_LTLIBDEPS
612LIBGNU_LIBDEPS
613gltests_WITNESS
6d153f56
GM
614gl_GNULIB_ENABLED_verify_FALSE
615gl_GNULIB_ENABLED_verify_TRUE
616gl_GNULIB_ENABLED_strtoull_FALSE
617gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
618gl_GNULIB_ENABLED_strtoll_FALSE
619gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
620gl_GNULIB_ENABLED_stat_FALSE
621gl_GNULIB_ENABLED_stat_TRUE
a0a61e58
GM
622gl_GNULIB_ENABLED_pathmax_FALSE
623gl_GNULIB_ENABLED_pathmax_TRUE
6d153f56
GM
624gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
625gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
626gl_GNULIB_ENABLED_dosname_FALSE
627gl_GNULIB_ENABLED_dosname_TRUE
628LTLIBINTL
629LIBINTL
f199cab1 630WINDOWS_64_BIT_OFF_T
e275c824
PE
631HAVE_UNISTD_H
632NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
633NEXT_UNISTD_H
1fd182f0
PE
634PTHREAD_H_DEFINES_STRUCT_TIMESPEC
635SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
636TIME_H_DEFINES_STRUCT_TIMESPEC
637NEXT_AS_FIRST_DIRECTIVE_TIME_H
638NEXT_TIME_H
0eb775a3 639WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
640NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
641NEXT_SYS_STAT_H
1f5d53eb
PE
642NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
643NEXT_STDLIB_H
6ad6792b
GM
644NEXT_AS_FIRST_DIRECTIVE_STDIO_H
645NEXT_STDIO_H
646REPLACE_VSPRINTF
647REPLACE_VSNPRINTF
648REPLACE_VPRINTF
649REPLACE_VFPRINTF
650REPLACE_VDPRINTF
651REPLACE_VASPRINTF
652REPLACE_TMPFILE
653REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 654REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
655REPLACE_SPRINTF
656REPLACE_SNPRINTF
657REPLACE_RENAMEAT
658REPLACE_RENAME
659REPLACE_REMOVE
660REPLACE_PRINTF
661REPLACE_POPEN
662REPLACE_PERROR
663REPLACE_OBSTACK_PRINTF
664REPLACE_GETLINE
665REPLACE_GETDELIM
666REPLACE_FTELLO
667REPLACE_FTELL
668REPLACE_FSEEKO
669REPLACE_FSEEK
670REPLACE_FREOPEN
671REPLACE_FPURGE
672REPLACE_FPRINTF
673REPLACE_FOPEN
674REPLACE_FFLUSH
2b1928b8 675REPLACE_FDOPEN
6ad6792b
GM
676REPLACE_FCLOSE
677REPLACE_DPRINTF
678HAVE_VDPRINTF
679HAVE_VASPRINTF
680HAVE_RENAMEAT
2b1928b8
GM
681HAVE_POPEN
682HAVE_PCLOSE
6ad6792b
GM
683HAVE_FTELLO
684HAVE_FSEEKO
685HAVE_DPRINTF
686HAVE_DECL_VSNPRINTF
687HAVE_DECL_SNPRINTF
688HAVE_DECL_OBSTACK_PRINTF
689HAVE_DECL_GETLINE
690HAVE_DECL_GETDELIM
691HAVE_DECL_FTELLO
692HAVE_DECL_FSEEKO
693HAVE_DECL_FPURGE
694GNULIB_VSPRINTF_POSIX
695GNULIB_VSNPRINTF
696GNULIB_VPRINTF_POSIX
697GNULIB_VPRINTF
698GNULIB_VFPRINTF_POSIX
699GNULIB_VFPRINTF
700GNULIB_VDPRINTF
ca36e0ff
GM
701GNULIB_VSCANF
702GNULIB_VFSCANF
6ad6792b
GM
703GNULIB_VASPRINTF
704GNULIB_TMPFILE
705GNULIB_STDIO_H_SIGPIPE
ca36e0ff 706GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
707GNULIB_SPRINTF_POSIX
708GNULIB_SNPRINTF
ca36e0ff 709GNULIB_SCANF
6ad6792b
GM
710GNULIB_RENAMEAT
711GNULIB_RENAME
712GNULIB_REMOVE
713GNULIB_PUTS
714GNULIB_PUTCHAR
715GNULIB_PUTC
716GNULIB_PRINTF_POSIX
717GNULIB_PRINTF
718GNULIB_POPEN
719GNULIB_PERROR
2b1928b8 720GNULIB_PCLOSE
6ad6792b
GM
721GNULIB_OBSTACK_PRINTF_POSIX
722GNULIB_OBSTACK_PRINTF
723GNULIB_GETLINE
724GNULIB_GETDELIM
ca36e0ff
GM
725GNULIB_GETCHAR
726GNULIB_GETC
6ad6792b
GM
727GNULIB_FWRITE
728GNULIB_FTELLO
729GNULIB_FTELL
730GNULIB_FSEEKO
731GNULIB_FSEEK
ca36e0ff 732GNULIB_FSCANF
6ad6792b 733GNULIB_FREOPEN
ca36e0ff 734GNULIB_FREAD
6ad6792b
GM
735GNULIB_FPUTS
736GNULIB_FPUTC
737GNULIB_FPURGE
738GNULIB_FPRINTF_POSIX
739GNULIB_FPRINTF
740GNULIB_FOPEN
ca36e0ff
GM
741GNULIB_FGETS
742GNULIB_FGETC
6ad6792b 743GNULIB_FFLUSH
2b1928b8 744GNULIB_FDOPEN
6ad6792b
GM
745GNULIB_FCLOSE
746GNULIB_DPRINTF
1fd182f0
PE
747NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
748NEXT_STDDEF_H
6c051bab
GM
749GL_GENERATE_STDDEF_H_FALSE
750GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
751STDDEF_H
752HAVE_WCHAR_T
753REPLACE_NULL
16c3e636 754HAVE__BOOL
6c051bab
GM
755GL_GENERATE_STDBOOL_H_FALSE
756GL_GENERATE_STDBOOL_H_TRUE
16c3e636 757STDBOOL_H
6d153f56
GM
758GL_GENERATE_STDARG_H_FALSE
759GL_GENERATE_STDARG_H_TRUE
760STDARG_H
761NEXT_AS_FIRST_DIRECTIVE_STDARG_H
762NEXT_STDARG_H
0eb775a3
GM
763GL_GENERATE_STDALIGN_H_FALSE
764GL_GENERATE_STDALIGN_H_TRUE
765STDALIGN_H
3e0be4ab
GM
766NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
767NEXT_SIGNAL_H
0eb775a3 768LIB_PTHREAD_SIGMASK
2b1928b8 769REPLACE_RAISE
3e0be4ab
GM
770REPLACE_PTHREAD_SIGMASK
771HAVE_SIGHANDLER_T
772HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
773HAVE_STRUCT_SIGACTION_SA_SIGACTION
774HAVE_SIGACTION
775HAVE_SIGINFO_T
776HAVE_SIGSET_T
2b1928b8 777HAVE_RAISE
3e0be4ab
GM
778HAVE_PTHREAD_SIGMASK
779HAVE_POSIX_SIGNALBLOCKING
780GNULIB_SIGACTION
781GNULIB_SIGPROCMASK
782GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 783GNULIB_RAISE
3e0be4ab 784GNULIB_PTHREAD_SIGMASK
f199cab1
GM
785HAVE_SYS_SELECT_H
786NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
787NEXT_SYS_SELECT_H
788REPLACE_SELECT
789REPLACE_PSELECT
790HAVE_PSELECT
791GNULIB_SELECT
792GNULIB_PSELECT
1fd182f0
PE
793REPLACE_TIMEGM
794REPLACE_NANOSLEEP
795REPLACE_MKTIME
796REPLACE_LOCALTIME_R
797HAVE_TIMEGM
798HAVE_STRPTIME
799HAVE_NANOSLEEP
800HAVE_DECL_LOCALTIME_R
801GNULIB_TIME_R
802GNULIB_TIMEGM
803GNULIB_STRPTIME
804GNULIB_NANOSLEEP
805GNULIB_MKTIME
ae0d7250
PE
806REPLACE_UTIMENSAT
807REPLACE_STAT
808REPLACE_MKNOD
809REPLACE_MKFIFO
810REPLACE_MKDIR
811REPLACE_LSTAT
812REPLACE_FUTIMENS
813REPLACE_FSTATAT
814REPLACE_FSTAT
815HAVE_UTIMENSAT
816HAVE_MKNODAT
817HAVE_MKNOD
818HAVE_MKFIFOAT
819HAVE_MKFIFO
820HAVE_MKDIRAT
821HAVE_LSTAT
822HAVE_LCHMOD
823HAVE_FUTIMENS
824HAVE_FSTATAT
825HAVE_FCHMODAT
826GNULIB_UTIMENSAT
827GNULIB_STAT
828GNULIB_MKNODAT
829GNULIB_MKNOD
830GNULIB_MKFIFOAT
831GNULIB_MKFIFO
832GNULIB_MKDIRAT
833GNULIB_LSTAT
834GNULIB_LCHMOD
835GNULIB_FUTIMENS
836GNULIB_FSTATAT
2b1928b8 837GNULIB_FSTAT
ae0d7250 838GNULIB_FCHMODAT
4fda9c95
GM
839NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
840NEXT_INTTYPES_H
841UINT64_MAX_EQ_ULONG_MAX
842UINT32_MAX_LT_UINTMAX_MAX
843PRIPTR_PREFIX
844PRI_MACROS_BROKEN
845INT64_MAX_EQ_LONG_MAX
846INT32_MAX_LT_INTMAX_MAX
0eb775a3 847REPLACE_STRTOIMAX
4fda9c95
GM
848HAVE_DECL_STRTOUMAX
849HAVE_DECL_STRTOIMAX
850HAVE_DECL_IMAXDIV
851HAVE_DECL_IMAXABS
852GNULIB_STRTOUMAX
853GNULIB_STRTOIMAX
854GNULIB_IMAXDIV
855GNULIB_IMAXABS
856GL_GENERATE_STDINT_H_FALSE
857GL_GENERATE_STDINT_H_TRUE
858STDINT_H
859WINT_T_SUFFIX
860WCHAR_T_SUFFIX
861SIG_ATOMIC_T_SUFFIX
862SIZE_T_SUFFIX
863PTRDIFF_T_SUFFIX
864HAVE_SIGNED_WINT_T
865HAVE_SIGNED_WCHAR_T
866HAVE_SIGNED_SIG_ATOMIC_T
867BITSIZEOF_WINT_T
868BITSIZEOF_WCHAR_T
869BITSIZEOF_SIG_ATOMIC_T
870BITSIZEOF_SIZE_T
871BITSIZEOF_PTRDIFF_T
872APPLE_UNIVERSAL_BUILD
873HAVE_SYS_BITYPES_H
874HAVE_SYS_INTTYPES_H
875HAVE_STDINT_H
876NEXT_AS_FIRST_DIRECTIVE_STDINT_H
877NEXT_STDINT_H
878HAVE_SYS_TYPES_H
879HAVE_INTTYPES_H
880HAVE_WCHAR_H
881HAVE_UNSIGNED_LONG_LONG_INT
882HAVE_LONG_LONG_INT
f199cab1
GM
883HAVE_WINSOCK2_H
884NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
885NEXT_SYS_TIME_H
886REPLACE_STRUCT_TIMEVAL
887REPLACE_GETTIMEOFDAY
888HAVE_SYS_TIME_H
889HAVE_STRUCT_TIMEVAL
890HAVE_GETTIMEOFDAY
891GNULIB_GETTIMEOFDAY
0eb775a3 892GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
893GETOPT_H
894HAVE_GETOPT_H
895NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
896NEXT_GETOPT_H
897PRAGMA_COLUMNS
898PRAGMA_SYSTEM_HEADER
899INCLUDE_NEXT_AS_FIRST_DIRECTIVE
900INCLUDE_NEXT
7d2a1c5e
GM
901GETLOADAVG_LIBS
902REPLACE_WCTOMB
903REPLACE_UNSETENV
904REPLACE_STRTOD
905REPLACE_SETENV
906REPLACE_REALPATH
907REPLACE_REALLOC
0eb775a3 908REPLACE_RANDOM_R
7d2a1c5e 909REPLACE_PUTENV
0eb775a3 910REPLACE_PTSNAME_R
7d2a1c5e
GM
911REPLACE_MKSTEMP
912REPLACE_MBTOWC
913REPLACE_MALLOC
914REPLACE_CANONICALIZE_FILE_NAME
915REPLACE_CALLOC
916HAVE_DECL_UNSETENV
917HAVE_UNLOCKPT
918HAVE_SYS_LOADAVG_H
919HAVE_STRUCT_RANDOM_DATA
920HAVE_STRTOULL
921HAVE_STRTOLL
922HAVE_STRTOD
923HAVE_DECL_SETENV
924HAVE_SETENV
925HAVE_RPMATCH
926HAVE_REALPATH
927HAVE_RANDOM_R
928HAVE_RANDOM_H
0eb775a3
GM
929HAVE_RANDOM
930HAVE_PTSNAME_R
7d2a1c5e 931HAVE_PTSNAME
0eb775a3 932HAVE_POSIX_OPENPT
7d2a1c5e
GM
933HAVE_MKSTEMPS
934HAVE_MKSTEMP
935HAVE_MKOSTEMPS
936HAVE_MKOSTEMP
937HAVE_MKDTEMP
938HAVE_GRANTPT
939HAVE_GETSUBOPT
940HAVE_DECL_GETLOADAVG
941HAVE_CANONICALIZE_FILE_NAME
942HAVE_ATOLL
943HAVE__EXIT
944GNULIB_WCTOMB
945GNULIB_UNSETENV
946GNULIB_UNLOCKPT
947GNULIB_SYSTEM_POSIX
948GNULIB_STRTOULL
949GNULIB_STRTOLL
950GNULIB_STRTOD
951GNULIB_SETENV
952GNULIB_RPMATCH
953GNULIB_REALPATH
954GNULIB_REALLOC_POSIX
955GNULIB_RANDOM_R
0eb775a3 956GNULIB_RANDOM
7d2a1c5e 957GNULIB_PUTENV
0eb775a3 958GNULIB_PTSNAME_R
7d2a1c5e 959GNULIB_PTSNAME
0eb775a3 960GNULIB_POSIX_OPENPT
7d2a1c5e
GM
961GNULIB_MKSTEMPS
962GNULIB_MKSTEMP
963GNULIB_MKOSTEMPS
964GNULIB_MKOSTEMP
965GNULIB_MKDTEMP
966GNULIB_MBTOWC
967GNULIB_MALLOC_POSIX
968GNULIB_GRANTPT
969GNULIB_GETSUBOPT
970GNULIB_GETLOADAVG
971GNULIB_CANONICALIZE_FILE_NAME
972GNULIB_CALLOC_POSIX
973GNULIB_ATOLL
974GNULIB__EXIT
8966cbff
GM
975GL_GENERATE_EXECINFO_H_FALSE
976GL_GENERATE_EXECINFO_H_TRUE
977LIB_EXECINFO
978EXECINFO_H
e275c824
PE
979UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
980UNISTD_H_HAVE_WINSOCK2_H
981REPLACE_WRITE
982REPLACE_USLEEP
983REPLACE_UNLINKAT
984REPLACE_UNLINK
985REPLACE_TTYNAME_R
986REPLACE_SYMLINK
987REPLACE_SLEEP
988REPLACE_RMDIR
989REPLACE_READLINK
ca36e0ff 990REPLACE_READ
e275c824
PE
991REPLACE_PWRITE
992REPLACE_PREAD
993REPLACE_LSEEK
994REPLACE_LINKAT
995REPLACE_LINK
996REPLACE_LCHOWN
0eb775a3 997REPLACE_ISATTY
e275c824
PE
998REPLACE_GETPAGESIZE
999REPLACE_GETGROUPS
1000REPLACE_GETLOGIN_R
1001REPLACE_GETDOMAINNAME
1002REPLACE_GETCWD
0eb775a3 1003REPLACE_FTRUNCATE
e275c824
PE
1004REPLACE_FCHOWNAT
1005REPLACE_DUP2
1006REPLACE_DUP
1007REPLACE_CLOSE
1008REPLACE_CHOWN
1009HAVE_SYS_PARAM_H
1010HAVE_OS_H
1011HAVE_DECL_TTYNAME_R
0eb775a3 1012HAVE_DECL_SETHOSTNAME
e275c824
PE
1013HAVE_DECL_GETUSERSHELL
1014HAVE_DECL_GETPAGESIZE
1015HAVE_DECL_GETLOGIN_R
1016HAVE_DECL_GETDOMAINNAME
2b1928b8 1017HAVE_DECL_FDATASYNC
e275c824
PE
1018HAVE_DECL_FCHDIR
1019HAVE_DECL_ENVIRON
1020HAVE_USLEEP
1021HAVE_UNLINKAT
1022HAVE_SYMLINKAT
1023HAVE_SYMLINK
1024HAVE_SLEEP
0eb775a3 1025HAVE_SETHOSTNAME
e275c824
PE
1026HAVE_READLINKAT
1027HAVE_READLINK
1028HAVE_PWRITE
1029HAVE_PREAD
1030HAVE_PIPE2
1031HAVE_PIPE
1032HAVE_LINKAT
1033HAVE_LINK
1034HAVE_LCHOWN
da6c8463 1035HAVE_GROUP_MEMBER
e275c824
PE
1036HAVE_GETPAGESIZE
1037HAVE_GETLOGIN
1038HAVE_GETHOSTNAME
1039HAVE_GETGROUPS
1040HAVE_GETDTABLESIZE
1041HAVE_FTRUNCATE
1042HAVE_FSYNC
2b1928b8 1043HAVE_FDATASYNC
e275c824
PE
1044HAVE_FCHOWNAT
1045HAVE_FCHDIR
1046HAVE_FACCESSAT
1047HAVE_EUIDACCESS
1048HAVE_DUP3
1049HAVE_DUP2
1050HAVE_CHOWN
1051GNULIB_WRITE
1052GNULIB_USLEEP
1053GNULIB_UNLINKAT
1054GNULIB_UNLINK
1055GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1056GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1057GNULIB_TTYNAME_R
1058GNULIB_SYMLINKAT
1059GNULIB_SYMLINK
1060GNULIB_SLEEP
0eb775a3 1061GNULIB_SETHOSTNAME
e275c824
PE
1062GNULIB_RMDIR
1063GNULIB_READLINKAT
1064GNULIB_READLINK
ca36e0ff 1065GNULIB_READ
e275c824
PE
1066GNULIB_PWRITE
1067GNULIB_PREAD
1068GNULIB_PIPE2
1069GNULIB_PIPE
1070GNULIB_LSEEK
1071GNULIB_LINKAT
1072GNULIB_LINK
1073GNULIB_LCHOWN
0eb775a3 1074GNULIB_ISATTY
da6c8463 1075GNULIB_GROUP_MEMBER
e275c824
PE
1076GNULIB_GETUSERSHELL
1077GNULIB_GETPAGESIZE
1078GNULIB_GETLOGIN_R
1079GNULIB_GETLOGIN
1080GNULIB_GETHOSTNAME
1081GNULIB_GETGROUPS
1082GNULIB_GETDTABLESIZE
1083GNULIB_GETDOMAINNAME
1084GNULIB_GETCWD
1085GNULIB_FTRUNCATE
1086GNULIB_FSYNC
2b1928b8 1087GNULIB_FDATASYNC
e275c824
PE
1088GNULIB_FCHOWNAT
1089GNULIB_FCHDIR
1090GNULIB_FACCESSAT
1091GNULIB_EUIDACCESS
1092GNULIB_ENVIRON
1093GNULIB_DUP3
1094GNULIB_DUP2
2b1928b8 1095GNULIB_DUP
e275c824
PE
1096GNULIB_CLOSE
1097GNULIB_CHOWN
2b1928b8 1098GNULIB_CHDIR
f199cab1 1099LIB_CLOCK_GETTIME
4fc2b746
GM
1100GL_GENERATE_ALLOCA_H_FALSE
1101GL_GENERATE_ALLOCA_H_TRUE
1102ALLOCA_H
1103ALLOCA
743c80a7
PE
1104GL_COND_LIBTOOL_FALSE
1105GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1106POST_ALLOC_OBJ
1107PRE_ALLOC_OBJ
1108CYGWIN_OBJ
1109RALLOC_OBJ
1110OLDXMENU_DEPS
1111LIBX_OTHER
1112LIBXMENU
1113OLDXMENU
1114OLDXMENU_TARGET
1115LIBXT_OTHER
1116TOOLKIT_LIBW
1117WIDGET_OBJ
1118XOBJ
1119XMENU_OBJ
1120FONT_OBJ
1121OTHER_FILES
1122GNU_OBJC_CFLAGS
1123ns_appsrc
1124ns_appresdir
1125ns_appbindir
1126ns_appdir
5476a9a4
GM
1127X_TOOLKIT_TYPE
1128GNUSTEP_CFLAGS
1129C_SWITCH_X_SITE
1130LD_SWITCH_X_SITE
1131gameuser
1132gamedir
1133bitmapdir
1134archlibdir
1135etcdir
1136x_default_search_path
1137lisppath
1138locallisppath
1139standardlisppath
1140leimdir
1141lispdir
1142srcdir
1143canonical
1144configuration
1145version
1146KRB4LIB
1147DESLIB
1148KRB5LIB
1149CRYPTOLIB
1150COM_ERRLIB
1151LIBRESOLV
1152LIBHESIOD
1153TERMCAP_OBJ
1154LIBS_TERMCAP
1155BLESSMAIL_TARGET
1156LIBS_MAIL
1157liblockfile
1158LIBXML2_LIBS
1159LIBXML2_CFLAGS
1160LIBXSM
1161LIBGPM
1162LIBGIF
1163LIBTIFF
1164LIBPNG
1165LIBJPEG
1166LIBXPM
1167M17N_FLT_LIBS
1168M17N_FLT_CFLAGS
1169LIBOTF_LIBS
1170LIBOTF_CFLAGS
1171FREETYPE_LIBS
1172FREETYPE_CFLAGS
1173XFT_LIBS
1174XFT_CFLAGS
1175FONTCONFIG_LIBS
1176FONTCONFIG_CFLAGS
1177LIBXMU
1178LIBXTR6
1179LIBGNUTLS_LIBS
1180LIBGNUTLS_CFLAGS
1181LIBSELINUX_LIBS
1182SETTINGS_LIBS
1183SETTINGS_CFLAGS
1184GCONF_LIBS
1185GCONF_CFLAGS
1186GSETTINGS_LIBS
1187GSETTINGS_CFLAGS
1188DBUS_OBJ
1189DBUS_LIBS
1190DBUS_CFLAGS
1191GTK_OBJ
1192GTK_LIBS
1193GTK_CFLAGS
1194IMAGEMAGICK_LIBS
1195IMAGEMAGICK_CFLAGS
1196RSVG_LIBS
1197RSVG_CFLAGS
1198LIB_PTHREAD
1199VMLIMIT_OBJ
1200GMALLOC_OBJ
1201HAVE_XSERVER
1202LIB_STANDARD
1203NS_OBJC_OBJ
1204NS_OBJ
1205ns_self_contained
1206INSTALL_ARCH_INDEP_EXTRA
1207TEMACS_LDFLAGS2
1208LD_SWITCH_X_SITE_RPATH
1209XMKMF
1210DEPFLAGS
1211MKDEPDIR
1212CFLAGS_SOUND
1213ALSA_LIBS
1214ALSA_CFLAGS
1215LIBSOUND
1216PKG_CONFIG
130f1dac 1217CRT_DIR
067d23c9
KY
1218START_FILES
1219LIB_MATH
067d23c9
KY
1220LIBS_SYSTEM
1221C_SWITCH_SYSTEM
1222UNEXEC_OBJ
1223C_SWITCH_MACHINE
1224LD_SWITCH_SYSTEM
1225CANNOT_DUMP
141d074d
GM
1226INFO_OPTS
1227INFO_EXT
96f129d5 1228HAVE_MAKEINFO
9c29597b 1229PAXCTL
067d23c9
KY
1230GZIP_PROG
1231INSTALL_INFO
0e733db9 1232LN_S
a6b92a4a 1233GNULIB_WARN_CFLAGS
0eb775a3 1234WARN_CFLAGS
a6b92a4a 1235WERROR_CFLAGS
369e19fc
PE
1236RANLIB
1237ARFLAGS
1238AR
067d23c9
KY
1239EGREP
1240GREP
1241CPP
743c80a7
PE
1242am__fastdepCC_FALSE
1243am__fastdepCC_TRUE
1244CCDEPMODE
1245AMDEPBACKSLASH
1246AMDEP_FALSE
1247AMDEP_TRUE
1248am__quote
1249am__include
1250DEPDIR
067d23c9
KY
1251OBJEXT
1252EXEEXT
1253ac_ct_CC
1254CPPFLAGS
1255LDFLAGS
1256CFLAGS
1257CC
1258host_os
1259host_vendor
1260host_cpu
1261host
1262build_os
1263build_vendor
1264build_cpu
1265build
1266PROFILING_CFLAGS
067d23c9 1267GZIP_INFO
c3a461a5 1268cache_file
743c80a7
PE
1269am__untar
1270am__tar
1271AMTAR
1272am__leading_dot
1273SET_MAKE
1274AWK
1275mkdir_p
1276MKDIR_P
1277INSTALL_STRIP_PROGRAM
1278STRIP
1279install_sh
1280MAKEINFO
1281AUTOHEADER
1282AUTOMAKE
1283AUTOCONF
1284ACLOCAL
1285VERSION
1286PACKAGE
1287CYGPATH_W
1288am__isrc
1289INSTALL_DATA
1290INSTALL_SCRIPT
1291INSTALL_PROGRAM
067d23c9
KY
1292target_alias
1293host_alias
1294build_alias
1295LIBS
1296ECHO_T
1297ECHO_N
1298ECHO_C
1299DEFS
1300mandir
1301localedir
1302libdir
1303psdir
1304pdfdir
1305dvidir
1306htmldir
1307infodir
1308docdir
1309oldincludedir
1310includedir
1311localstatedir
1312sharedstatedir
1313sysconfdir
1314datadir
1315datarootdir
1316libexecdir
1317sbindir
1318bindir
1319program_transform_name
1320prefix
1321exec_prefix
1322PACKAGE_URL
1323PACKAGE_BUGREPORT
1324PACKAGE_STRING
1325PACKAGE_VERSION
1326PACKAGE_TARNAME
1327PACKAGE_NAME
1328PATH_SEPARATOR
1329SHELL'
1330ac_subst_files='deps_frag
4d4b75e8 1331lisp_frag
067d23c9
KY
1332ns_frag'
1333ac_user_opts='
1334enable_option_checking
ee77919d 1335with_all
067d23c9
KY
1336with_pop
1337with_kerberos
1338with_kerberos5
1339with_hesiod
1340with_mmdf
1341with_mail_unlink
1342with_mailhost
1343with_sound
1344with_sync_input
1345with_x_toolkit
0442dc7f 1346with_wide_int
067d23c9
KY
1347with_xpm
1348with_jpeg
1349with_tiff
1350with_gif
1351with_png
1352with_rsvg
1353with_xml2
1354with_imagemagick
1355with_xft
1356with_libotf
1357with_m17n_flt
1358with_toolkit_scroll_bars
1359with_xaw3d
1360with_xim
1361with_ns
1362with_gpm
1363with_dbus
1364with_gconf
f527bd02 1365with_gsettings
067d23c9
KY
1366with_selinux
1367with_gnutls
1368with_makeinfo
1369with_compress_info
1370with_pkg_config_prog
1371with_crt_dir
4fc5868a 1372with_gameuser
067d23c9
KY
1373with_gnustep_conf
1374enable_ns_self_contained
067d23c9
KY
1375enable_locallisppath
1376enable_checking
afd07e01 1377enable_check_lisp_object_type
067d23c9
KY
1378enable_profiling
1379enable_autodepend
743c80a7 1380enable_dependency_tracking
067d23c9 1381enable_largefile
a6b92a4a 1382enable_gcc_warnings
e4d35030 1383enable_link_time_optimization
067d23c9
KY
1384with_x
1385'
1386 ac_precious_vars='build_alias
1387host_alias
1388target_alias
1389CC
1390CFLAGS
1391LDFLAGS
1392LIBS
1393CPPFLAGS
1394CPP
1395XMKMF'
1396
1397
1398# Initialize some variables set by options.
1399ac_init_help=
1400ac_init_version=false
1401ac_unrecognized_opts=
1402ac_unrecognized_sep=
1403# The variables have the same names as the options, with
1404# dashes changed to underlines.
1405cache_file=/dev/null
1406exec_prefix=NONE
1407no_create=
1408no_recursion=
1409prefix=NONE
1410program_prefix=NONE
1411program_suffix=NONE
1412program_transform_name=s,x,x,
1413silent=
1414site=
1415srcdir=
1416verbose=
1417x_includes=NONE
1418x_libraries=NONE
1419
1420# Installation directory options.
1421# These are left unexpanded so users can "make install exec_prefix=/foo"
1422# and all the variables that are supposed to be based on exec_prefix
1423# by default will actually change.
1424# Use braces instead of parens because sh, perl, etc. also accept them.
1425# (The list follows the same order as the GNU Coding Standards.)
1426bindir='${exec_prefix}/bin'
1427sbindir='${exec_prefix}/sbin'
1428libexecdir='${exec_prefix}/libexec'
1429datarootdir='${prefix}/share'
1430datadir='${datarootdir}'
1431sysconfdir='${prefix}/etc'
1432sharedstatedir='${prefix}/com'
1433localstatedir='${prefix}/var'
1434includedir='${prefix}/include'
1435oldincludedir='/usr/include'
1436docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1437infodir='${datarootdir}/info'
1438htmldir='${docdir}'
1439dvidir='${docdir}'
1440pdfdir='${docdir}'
1441psdir='${docdir}'
1442libdir='${exec_prefix}/lib'
1443localedir='${datarootdir}/locale'
1444mandir='${datarootdir}/man'
1445
1446ac_prev=
1447ac_dashdash=
1448for ac_option
1449do
1450 # If the previous option needs an argument, assign it.
1451 if test -n "$ac_prev"; then
1452 eval $ac_prev=\$ac_option
1453 ac_prev=
1454 continue
1455 fi
1456
1457 case $ac_option in
a9bec17c
GM
1458 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1459 *) ac_optarg=yes ;;
067d23c9
KY
1460 esac
1461
1462 # Accept the important Cygnus configure options, so we can diagnose typos.
1463
1464 case $ac_dashdash$ac_option in
1465 --)
1466 ac_dashdash=yes ;;
1467
1468 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1469 ac_prev=bindir ;;
1470 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1471 bindir=$ac_optarg ;;
1472
1473 -build | --build | --buil | --bui | --bu)
1474 ac_prev=build_alias ;;
1475 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1476 build_alias=$ac_optarg ;;
1477
1478 -cache-file | --cache-file | --cache-fil | --cache-fi \
1479 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1480 ac_prev=cache_file ;;
1481 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1482 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1483 cache_file=$ac_optarg ;;
1484
1485 --config-cache | -C)
1486 cache_file=config.cache ;;
1487
1488 -datadir | --datadir | --datadi | --datad)
1489 ac_prev=datadir ;;
1490 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1491 datadir=$ac_optarg ;;
1492
1493 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1494 | --dataroo | --dataro | --datar)
1495 ac_prev=datarootdir ;;
1496 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1497 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1498 datarootdir=$ac_optarg ;;
1499
1500 -disable-* | --disable-*)
1501 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1502 # Reject names that are not valid shell variable names.
1503 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1504 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1505 ac_useropt_orig=$ac_useropt
1506 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1507 case $ac_user_opts in
1508 *"
1509"enable_$ac_useropt"
1510"*) ;;
1511 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1512 ac_unrecognized_sep=', ';;
1513 esac
1514 eval enable_$ac_useropt=no ;;
1515
1516 -docdir | --docdir | --docdi | --doc | --do)
1517 ac_prev=docdir ;;
1518 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1519 docdir=$ac_optarg ;;
1520
1521 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1522 ac_prev=dvidir ;;
1523 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1524 dvidir=$ac_optarg ;;
1525
1526 -enable-* | --enable-*)
1527 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1528 # Reject names that are not valid shell variable names.
1529 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1530 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1531 ac_useropt_orig=$ac_useropt
1532 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1533 case $ac_user_opts in
1534 *"
1535"enable_$ac_useropt"
1536"*) ;;
1537 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1538 ac_unrecognized_sep=', ';;
1539 esac
1540 eval enable_$ac_useropt=\$ac_optarg ;;
1541
1542 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1543 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1544 | --exec | --exe | --ex)
1545 ac_prev=exec_prefix ;;
1546 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1547 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1548 | --exec=* | --exe=* | --ex=*)
1549 exec_prefix=$ac_optarg ;;
1550
1551 -gas | --gas | --ga | --g)
1552 # Obsolete; use --with-gas.
1553 with_gas=yes ;;
1554
1555 -help | --help | --hel | --he | -h)
1556 ac_init_help=long ;;
1557 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1558 ac_init_help=recursive ;;
1559 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1560 ac_init_help=short ;;
1561
1562 -host | --host | --hos | --ho)
1563 ac_prev=host_alias ;;
1564 -host=* | --host=* | --hos=* | --ho=*)
1565 host_alias=$ac_optarg ;;
1566
1567 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1568 ac_prev=htmldir ;;
1569 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1570 | --ht=*)
1571 htmldir=$ac_optarg ;;
1572
1573 -includedir | --includedir | --includedi | --included | --include \
1574 | --includ | --inclu | --incl | --inc)
1575 ac_prev=includedir ;;
1576 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1577 | --includ=* | --inclu=* | --incl=* | --inc=*)
1578 includedir=$ac_optarg ;;
1579
1580 -infodir | --infodir | --infodi | --infod | --info | --inf)
1581 ac_prev=infodir ;;
1582 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1583 infodir=$ac_optarg ;;
1584
1585 -libdir | --libdir | --libdi | --libd)
1586 ac_prev=libdir ;;
1587 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1588 libdir=$ac_optarg ;;
1589
1590 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1591 | --libexe | --libex | --libe)
1592 ac_prev=libexecdir ;;
1593 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1594 | --libexe=* | --libex=* | --libe=*)
1595 libexecdir=$ac_optarg ;;
1596
1597 -localedir | --localedir | --localedi | --localed | --locale)
1598 ac_prev=localedir ;;
1599 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1600 localedir=$ac_optarg ;;
1601
1602 -localstatedir | --localstatedir | --localstatedi | --localstated \
1603 | --localstate | --localstat | --localsta | --localst | --locals)
1604 ac_prev=localstatedir ;;
1605 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1606 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1607 localstatedir=$ac_optarg ;;
1608
1609 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1610 ac_prev=mandir ;;
1611 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1612 mandir=$ac_optarg ;;
1613
1614 -nfp | --nfp | --nf)
1615 # Obsolete; use --without-fp.
1616 with_fp=no ;;
1617
1618 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1619 | --no-cr | --no-c | -n)
1620 no_create=yes ;;
1621
1622 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1623 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1624 no_recursion=yes ;;
1625
1626 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1627 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1628 | --oldin | --oldi | --old | --ol | --o)
1629 ac_prev=oldincludedir ;;
1630 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1631 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1632 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1633 oldincludedir=$ac_optarg ;;
1634
1635 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1636 ac_prev=prefix ;;
1637 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1638 prefix=$ac_optarg ;;
1639
1640 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1641 | --program-pre | --program-pr | --program-p)
1642 ac_prev=program_prefix ;;
1643 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1644 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1645 program_prefix=$ac_optarg ;;
1646
1647 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1648 | --program-suf | --program-su | --program-s)
1649 ac_prev=program_suffix ;;
1650 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1651 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1652 program_suffix=$ac_optarg ;;
1653
1654 -program-transform-name | --program-transform-name \
1655 | --program-transform-nam | --program-transform-na \
1656 | --program-transform-n | --program-transform- \
1657 | --program-transform | --program-transfor \
1658 | --program-transfo | --program-transf \
1659 | --program-trans | --program-tran \
1660 | --progr-tra | --program-tr | --program-t)
1661 ac_prev=program_transform_name ;;
1662 -program-transform-name=* | --program-transform-name=* \
1663 | --program-transform-nam=* | --program-transform-na=* \
1664 | --program-transform-n=* | --program-transform-=* \
1665 | --program-transform=* | --program-transfor=* \
1666 | --program-transfo=* | --program-transf=* \
1667 | --program-trans=* | --program-tran=* \
1668 | --progr-tra=* | --program-tr=* | --program-t=*)
1669 program_transform_name=$ac_optarg ;;
1670
1671 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1672 ac_prev=pdfdir ;;
1673 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1674 pdfdir=$ac_optarg ;;
1675
1676 -psdir | --psdir | --psdi | --psd | --ps)
1677 ac_prev=psdir ;;
1678 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1679 psdir=$ac_optarg ;;
1680
1681 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1682 | -silent | --silent | --silen | --sile | --sil)
1683 silent=yes ;;
1684
1685 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1686 ac_prev=sbindir ;;
1687 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1688 | --sbi=* | --sb=*)
1689 sbindir=$ac_optarg ;;
1690
1691 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1692 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1693 | --sharedst | --shareds | --shared | --share | --shar \
1694 | --sha | --sh)
1695 ac_prev=sharedstatedir ;;
1696 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1697 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1698 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1699 | --sha=* | --sh=*)
1700 sharedstatedir=$ac_optarg ;;
1701
1702 -site | --site | --sit)
1703 ac_prev=site ;;
1704 -site=* | --site=* | --sit=*)
1705 site=$ac_optarg ;;
1706
1707 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1708 ac_prev=srcdir ;;
1709 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1710 srcdir=$ac_optarg ;;
1711
1712 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1713 | --syscon | --sysco | --sysc | --sys | --sy)
1714 ac_prev=sysconfdir ;;
1715 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1716 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1717 sysconfdir=$ac_optarg ;;
1718
1719 -target | --target | --targe | --targ | --tar | --ta | --t)
1720 ac_prev=target_alias ;;
1721 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1722 target_alias=$ac_optarg ;;
1723
1724 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1725 verbose=yes ;;
1726
1727 -version | --version | --versio | --versi | --vers | -V)
1728 ac_init_version=: ;;
1729
1730 -with-* | --with-*)
1731 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1732 # Reject names that are not valid shell variable names.
1733 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1734 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1735 ac_useropt_orig=$ac_useropt
1736 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1737 case $ac_user_opts in
1738 *"
1739"with_$ac_useropt"
1740"*) ;;
1741 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1742 ac_unrecognized_sep=', ';;
1743 esac
1744 eval with_$ac_useropt=\$ac_optarg ;;
1745
1746 -without-* | --without-*)
1747 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1748 # Reject names that are not valid shell variable names.
1749 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1750 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1751 ac_useropt_orig=$ac_useropt
1752 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1753 case $ac_user_opts in
1754 *"
1755"with_$ac_useropt"
1756"*) ;;
1757 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1758 ac_unrecognized_sep=', ';;
1759 esac
1760 eval with_$ac_useropt=no ;;
1761
1762 --x)
1763 # Obsolete; use --with-x.
1764 with_x=yes ;;
1765
1766 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1767 | --x-incl | --x-inc | --x-in | --x-i)
1768 ac_prev=x_includes ;;
1769 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1770 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1771 x_includes=$ac_optarg ;;
1772
1773 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1774 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1775 ac_prev=x_libraries ;;
1776 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1777 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1778 x_libraries=$ac_optarg ;;
1779
a9bec17c
GM
1780 -*) as_fn_error "unrecognized option: \`$ac_option'
1781Try \`$0 --help' for more information."
067d23c9
KY
1782 ;;
1783
1784 *=*)
1785 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1786 # Reject names that are not valid shell variable names.
1787 case $ac_envvar in #(
1788 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1789 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1790 esac
1791 eval $ac_envvar=\$ac_optarg
1792 export $ac_envvar ;;
1793
1794 *)
1795 # FIXME: should be removed in autoconf 3.0.
1796 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1797 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1798 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1799 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1800 ;;
1801
1802 esac
1803done
1804
1805if test -n "$ac_prev"; then
1806 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1807 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1808fi
1809
1810if test -n "$ac_unrecognized_opts"; then
1811 case $enable_option_checking in
1812 no) ;;
a9bec17c 1813 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1814 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1815 esac
1816fi
1817
1818# Check all directory arguments for consistency.
1819for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1820 datadir sysconfdir sharedstatedir localstatedir includedir \
1821 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1822 libdir localedir mandir
1823do
1824 eval ac_val=\$$ac_var
1825 # Remove trailing slashes.
1826 case $ac_val in
1827 */ )
1828 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1829 eval $ac_var=\$ac_val;;
1830 esac
1831 # Be sure to have absolute directory names.
1832 case $ac_val in
1833 [\\/$]* | ?:[\\/]* ) continue;;
1834 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1835 esac
a9bec17c 1836 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1837done
1838
1839# There might be people who depend on the old broken behavior: `$host'
1840# used to hold the argument of --host etc.
1841# FIXME: To remove some day.
1842build=$build_alias
1843host=$host_alias
1844target=$target_alias
1845
1846# FIXME: To remove some day.
1847if test "x$host_alias" != x; then
1848 if test "x$build_alias" = x; then
1849 cross_compiling=maybe
a9bec17c
GM
1850 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1851 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1852 elif test "x$build_alias" != "x$host_alias"; then
1853 cross_compiling=yes
1854 fi
1855fi
1856
1857ac_tool_prefix=
1858test -n "$host_alias" && ac_tool_prefix=$host_alias-
1859
1860test "$silent" = yes && exec 6>/dev/null
1861
1862
1863ac_pwd=`pwd` && test -n "$ac_pwd" &&
1864ac_ls_di=`ls -di .` &&
1865ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 1866 as_fn_error "working directory cannot be determined"
067d23c9 1867test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 1868 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
1869
1870
1871# Find the source files, if location was not specified.
1872if test -z "$srcdir"; then
1873 ac_srcdir_defaulted=yes
1874 # Try the directory containing this script, then the parent directory.
1875 ac_confdir=`$as_dirname -- "$as_myself" ||
1876$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1877 X"$as_myself" : 'X\(//\)[^/]' \| \
1878 X"$as_myself" : 'X\(//\)$' \| \
1879 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1880$as_echo X"$as_myself" |
1881 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1882 s//\1/
1883 q
1884 }
1885 /^X\(\/\/\)[^/].*/{
1886 s//\1/
1887 q
1888 }
1889 /^X\(\/\/\)$/{
1890 s//\1/
1891 q
1892 }
1893 /^X\(\/\).*/{
1894 s//\1/
1895 q
1896 }
1897 s/.*/./; q'`
1898 srcdir=$ac_confdir
1899 if test ! -r "$srcdir/$ac_unique_file"; then
1900 srcdir=..
1901 fi
1902else
1903 ac_srcdir_defaulted=no
1904fi
1905if test ! -r "$srcdir/$ac_unique_file"; then
1906 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 1907 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
1908fi
1909ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1910ac_abs_confdir=`(
a9bec17c 1911 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
1912 pwd)`
1913# When building in place, set srcdir=.
1914if test "$ac_abs_confdir" = "$ac_pwd"; then
1915 srcdir=.
1916fi
1917# Remove unnecessary trailing slashes from srcdir.
1918# Double slashes in file names in object file debugging info
1919# mess up M-x gdb in Emacs.
1920case $srcdir in
1921*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1922esac
1923for ac_var in $ac_precious_vars; do
1924 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1925 eval ac_env_${ac_var}_value=\$${ac_var}
1926 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1927 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1928done
1929
1930#
1931# Report the --help message.
1932#
1933if test "$ac_init_help" = "long"; then
1934 # Omit some internal or obsolete options to make the list less imposing.
1935 # This message is too long to be a string in the A/UX 3.1 sh.
1936 cat <<_ACEOF
250c8ab9 1937\`configure' configures emacs 24.2.50 to adapt to many kinds of systems.
067d23c9
KY
1938
1939Usage: $0 [OPTION]... [VAR=VALUE]...
1940
1941To assign environment variables (e.g., CC, CFLAGS...), specify them as
1942VAR=VALUE. See below for descriptions of some of the useful variables.
1943
1944Defaults for the options are specified in brackets.
1945
1946Configuration:
1947 -h, --help display this help and exit
1948 --help=short display options specific to this package
1949 --help=recursive display the short help of all the included packages
1950 -V, --version display version information and exit
a9bec17c 1951 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
1952 --cache-file=FILE cache test results in FILE [disabled]
1953 -C, --config-cache alias for \`--cache-file=config.cache'
1954 -n, --no-create do not create output files
1955 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1956
1957Installation directories:
1958 --prefix=PREFIX install architecture-independent files in PREFIX
1959 [$ac_default_prefix]
1960 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1961 [PREFIX]
1962
1963By default, \`make install' will install all the files in
1964\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1965an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1966for instance \`--prefix=\$HOME'.
1967
1968For better control, use the options below.
1969
1970Fine tuning of the installation directories:
1971 --bindir=DIR user executables [EPREFIX/bin]
1972 --sbindir=DIR system admin executables [EPREFIX/sbin]
1973 --libexecdir=DIR program executables [EPREFIX/libexec]
1974 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1975 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1976 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1977 --libdir=DIR object code libraries [EPREFIX/lib]
1978 --includedir=DIR C header files [PREFIX/include]
1979 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1980 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1981 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1982 --infodir=DIR info documentation [DATAROOTDIR/info]
1983 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1984 --mandir=DIR man documentation [DATAROOTDIR/man]
1985 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1986 --htmldir=DIR html documentation [DOCDIR]
1987 --dvidir=DIR dvi documentation [DOCDIR]
1988 --pdfdir=DIR pdf documentation [DOCDIR]
1989 --psdir=DIR ps documentation [DOCDIR]
1990_ACEOF
1991
1992 cat <<\_ACEOF
1993
1994Program names:
1995 --program-prefix=PREFIX prepend PREFIX to installed program names
1996 --program-suffix=SUFFIX append SUFFIX to installed program names
1997 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1998
1999X features:
2000 --x-includes=DIR X include files are in DIR
2001 --x-libraries=DIR X library files are in DIR
2002
2003System types:
2004 --build=BUILD configure for building on BUILD [guessed]
2005 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2006_ACEOF
2007fi
2008
2009if test -n "$ac_init_help"; then
2010 case $ac_init_help in
250c8ab9 2011 short | recursive ) echo "Configuration of emacs 24.2.50:";;
067d23c9
KY
2012 esac
2013 cat <<\_ACEOF
2014
2015Optional Features:
2016 --disable-option-checking ignore unrecognized --enable/--with options
2017 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2018 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2019 --disable-ns-self-contained
2020 disable self contained build under NeXTstep
067d23c9
KY
2021 --enable-locallisppath=PATH
2022 directories Emacs should search for lisp files
2023 specific to this site
2024 --enable-checking[=LIST]
2025 enable expensive run-time checks. With LIST, enable
2026 only specific categories of checks. Categories are:
2027 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2028 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2029 --enable-check-lisp-object-type
2030 enable compile time checks for the Lisp_Object data
2031 type. This is useful for development for catching
2032 certain types of bugs.
067d23c9
KY
2033 --enable-profiling build emacs with profiling support. This might not
2034 work on all platforms
2035 --enable-autodepend automatically generate dependencies to .h-files.
2036 Requires GNU Make and Gcc. Enabled if GNU Make and
2037 Gcc is found
743c80a7
PE
2038 --disable-dependency-tracking speeds up one-time build
2039 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2040 --disable-largefile omit support for large files
938a4ef9
GM
2041 --enable-gcc-warnings turn on lots of GCC warnings. This is intended for
2042 developers, and may generate false alarms when used
2043 with older or non-GNU development tools.
e4d35030
GM
2044 --enable-link-time-optimization
2045 build emacs with link-time optimization. This is
2046 supported only for GCC since 4.5.0.
067d23c9
KY
2047
2048Optional Packages:
2049 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2050 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2051 --without-all omit almost all features and build small executable
2052 with minimal dependencies
067d23c9
KY
2053 --without-pop don't support POP mail retrieval with movemail
2054 --with-kerberos support Kerberos-authenticated POP
2055 --with-kerberos5 support Kerberos version 5 authenticated POP
2056 --with-hesiod support Hesiod to get the POP server host
2057 --with-mmdf support MMDF mailboxes
2058 --with-mail-unlink unlink, rather than empty, mail spool after reading
2059 --with-mailhost=HOSTNAME
2060 string giving default POP mail host
2061 --without-sound don't compile with sound support
2062 --without-sync-input process async input synchronously
2063 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
2064 lucid or athena, motif, no)
0442dc7f 2065 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2066 --without-xpm don't compile with XPM image support
2067 --without-jpeg don't compile with JPEG image support
2068 --without-tiff don't compile with TIFF image support
2069 --without-gif don't compile with GIF image support
2070 --without-png don't compile with PNG image support
2071 --without-rsvg don't compile with SVG image support
2072 --without-xml2 don't compile with XML parsing support
2073 --without-imagemagick don't compile with ImageMagick image support
2074 --without-xft don't use XFT for anti aliased fonts
2075 --without-libotf don't use libotf for OpenType font support
2076 --without-m17n-flt don't use m17n-flt for text shaping
2077 --without-toolkit-scroll-bars
2078 don't use Motif or Xaw3d scroll bars
2079 --without-xaw3d don't use Xaw3d
2080 --without-xim don't use X11 XIM
7834125e 2081 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
067d23c9
KY
2082 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2083 console
2084 --without-dbus don't compile with D-Bus support
2085 --without-gconf don't compile with GConf support
f527bd02 2086 --without-gsettings don't compile with GSettings support
067d23c9
KY
2087 --without-selinux don't compile with SELinux support
2088 --without-gnutls don't use -lgnutls for SSL/TLS support
2089 --without-makeinfo don't require makeinfo for building manuals
2090 --without-compress-info don't compress the installed Info pages
2091 --with-pkg-config-prog=PATH
2092 path to pkg-config for finding GTK and librsvg
2093 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2094 /usr/lib, or /usr/lib64 on some platforms.
4fc5868a 2095 --with-gameuser=USER user for shared game score files
067d23c9
KY
2096 --with-gnustep-conf=PATH
2097 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2098 or /etc/GNUstep/GNUstep.conf
2099 --with-x use the X Window System
2100
2101Some influential environment variables:
2102 CC C compiler command
2103 CFLAGS C compiler flags
2104 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2105 nonstandard directory <lib dir>
2106 LIBS libraries to pass to the linker, e.g. -l<library>
2107 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2108 you have headers in a nonstandard directory <include dir>
2109 CPP C preprocessor
2110 XMKMF Path to xmkmf, Makefile generator for X Window System
2111
2112Use these variables to override the choices made by `configure' or to help
2113it to find libraries and programs with nonstandard names/locations.
2114
2115Report bugs to the package provider.
2116_ACEOF
2117ac_status=$?
2118fi
2119
2120if test "$ac_init_help" = "recursive"; then
2121 # If there are subdirs, report their specific --help.
2122 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2123 test -d "$ac_dir" ||
2124 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2125 continue
2126 ac_builddir=.
2127
2128case "$ac_dir" in
2129.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2130*)
2131 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2132 # A ".." for each directory in $ac_dir_suffix.
2133 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2134 case $ac_top_builddir_sub in
2135 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2136 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2137 esac ;;
2138esac
2139ac_abs_top_builddir=$ac_pwd
2140ac_abs_builddir=$ac_pwd$ac_dir_suffix
2141# for backward compatibility:
2142ac_top_builddir=$ac_top_build_prefix
2143
2144case $srcdir in
2145 .) # We are building in place.
2146 ac_srcdir=.
2147 ac_top_srcdir=$ac_top_builddir_sub
2148 ac_abs_top_srcdir=$ac_pwd ;;
2149 [\\/]* | ?:[\\/]* ) # Absolute name.
2150 ac_srcdir=$srcdir$ac_dir_suffix;
2151 ac_top_srcdir=$srcdir
2152 ac_abs_top_srcdir=$srcdir ;;
2153 *) # Relative name.
2154 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2155 ac_top_srcdir=$ac_top_build_prefix$srcdir
2156 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2157esac
2158ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2159
2160 cd "$ac_dir" || { ac_status=$?; continue; }
2161 # Check for guested configure.
2162 if test -f "$ac_srcdir/configure.gnu"; then
2163 echo &&
2164 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2165 elif test -f "$ac_srcdir/configure"; then
2166 echo &&
2167 $SHELL "$ac_srcdir/configure" --help=recursive
2168 else
2169 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2170 fi || ac_status=$?
2171 cd "$ac_pwd" || { ac_status=$?; break; }
2172 done
2173fi
2174
2175test -n "$ac_init_help" && exit $ac_status
2176if $ac_init_version; then
2177 cat <<\_ACEOF
250c8ab9 2178emacs configure 24.2.50
a9bec17c 2179generated by GNU Autoconf 2.65
067d23c9 2180
a9bec17c 2181Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2182This configure script is free software; the Free Software Foundation
2183gives unlimited permission to copy, distribute and modify it.
2184_ACEOF
2185 exit
2186fi
2187
2188## ------------------------ ##
2189## Autoconf initialization. ##
2190## ------------------------ ##
2191
2192# ac_fn_c_try_compile LINENO
2193# --------------------------
2194# Try to compile conftest.$ac_ext, and return whether this succeeded.
2195ac_fn_c_try_compile ()
2196{
2197 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198 rm -f conftest.$ac_objext
2199 if { { ac_try="$ac_compile"
2200case "(($ac_try" in
2201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2202 *) ac_try_echo=$ac_try;;
2203esac
2204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2205$as_echo "$ac_try_echo"; } >&5
2206 (eval "$ac_compile") 2>conftest.err
2207 ac_status=$?
2208 if test -s conftest.err; then
2209 grep -v '^ *+' conftest.err >conftest.er1
2210 cat conftest.er1 >&5
2211 mv -f conftest.er1 conftest.err
2212 fi
2213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2214 test $ac_status = 0; } && {
2215 test -z "$ac_c_werror_flag" ||
2216 test ! -s conftest.err
2217 } && test -s conftest.$ac_objext; then :
2218 ac_retval=0
2219else
2220 $as_echo "$as_me: failed program was:" >&5
2221sed 's/^/| /' conftest.$ac_ext >&5
2222
2223 ac_retval=1
2224fi
a9bec17c 2225 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2226 as_fn_set_status $ac_retval
2227
2228} # ac_fn_c_try_compile
2229
067d23c9
KY
2230# ac_fn_c_try_cpp LINENO
2231# ----------------------
2232# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2233ac_fn_c_try_cpp ()
2234{
2235 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236 if { { ac_try="$ac_cpp conftest.$ac_ext"
2237case "(($ac_try" in
2238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239 *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2244 ac_status=$?
2245 if test -s conftest.err; then
2246 grep -v '^ *+' conftest.err >conftest.er1
2247 cat conftest.er1 >&5
2248 mv -f conftest.er1 conftest.err
2249 fi
2250 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2251 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2252 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2253 test ! -s conftest.err
2254 }; then :
2255 ac_retval=0
2256else
2257 $as_echo "$as_me: failed program was:" >&5
2258sed 's/^/| /' conftest.$ac_ext >&5
2259
2260 ac_retval=1
2261fi
a9bec17c 2262 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2263 as_fn_set_status $ac_retval
2264
2265} # ac_fn_c_try_cpp
2266
2267# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2268# -------------------------------------------------------
2269# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2270# the include files in INCLUDES and setting the cache variable VAR
2271# accordingly.
2272ac_fn_c_check_header_mongrel ()
2273{
2274 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2275 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2277$as_echo_n "checking for $2... " >&6; }
a9bec17c 2278if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2279 $as_echo_n "(cached) " >&6
2280fi
2281eval ac_res=\$$3
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2283$as_echo "$ac_res" >&6; }
2284else
2285 # Is the header compilable?
2286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2287$as_echo_n "checking $2 usability... " >&6; }
2288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290$4
2291#include <$2>
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
2294 ac_header_compiler=yes
2295else
2296 ac_header_compiler=no
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2300$as_echo "$ac_header_compiler" >&6; }
2301
2302# Is the header present?
2303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2304$as_echo_n "checking $2 presence... " >&6; }
2305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
2307#include <$2>
2308_ACEOF
2309if ac_fn_c_try_cpp "$LINENO"; then :
2310 ac_header_preproc=yes
2311else
2312 ac_header_preproc=no
2313fi
a9bec17c 2314rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2316$as_echo "$ac_header_preproc" >&6; }
2317
2318# So? What about this header?
2319case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2320 yes:no: )
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2322$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2324$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2325 ;;
2326 no:yes:* )
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2328$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2330$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2332$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2334$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2336$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2337 ;;
2338esac
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2340$as_echo_n "checking for $2... " >&6; }
a9bec17c 2341if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2342 $as_echo_n "(cached) " >&6
2343else
2344 eval "$3=\$ac_header_compiler"
2345fi
2346eval ac_res=\$$3
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2348$as_echo "$ac_res" >&6; }
2349fi
a9bec17c 2350 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2351
2352} # ac_fn_c_check_header_mongrel
2353
2354# ac_fn_c_try_run LINENO
2355# ----------------------
2356# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2357# that executables *can* be run.
2358ac_fn_c_try_run ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 if { { ac_try="$ac_link"
2362case "(($ac_try" in
2363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2364 *) ac_try_echo=$ac_try;;
2365esac
2366eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2367$as_echo "$ac_try_echo"; } >&5
2368 (eval "$ac_link") 2>&5
2369 ac_status=$?
2370 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2371 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2372 { { case "(($ac_try" in
2373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2374 *) ac_try_echo=$ac_try;;
2375esac
2376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2377$as_echo "$ac_try_echo"; } >&5
2378 (eval "$ac_try") 2>&5
2379 ac_status=$?
2380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2381 test $ac_status = 0; }; }; then :
2382 ac_retval=0
2383else
2384 $as_echo "$as_me: program exited with status $ac_status" >&5
2385 $as_echo "$as_me: failed program was:" >&5
2386sed 's/^/| /' conftest.$ac_ext >&5
2387
2388 ac_retval=$ac_status
2389fi
2390 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2391 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2392 as_fn_set_status $ac_retval
2393
2394} # ac_fn_c_try_run
2395
2396# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2397# -------------------------------------------------------
2398# Tests whether HEADER exists and can be compiled using the include files in
2399# INCLUDES, setting the cache variable VAR accordingly.
2400ac_fn_c_check_header_compile ()
2401{
2402 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2404$as_echo_n "checking for $2... " >&6; }
a9bec17c 2405if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2406 $as_echo_n "(cached) " >&6
2407else
2408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h. */
2410$4
2411#include <$2>
2412_ACEOF
2413if ac_fn_c_try_compile "$LINENO"; then :
2414 eval "$3=yes"
2415else
2416 eval "$3=no"
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419fi
2420eval ac_res=\$$3
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2422$as_echo "$ac_res" >&6; }
a9bec17c 2423 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2424
2425} # ac_fn_c_check_header_compile
2426
1fd182f0
PE
2427# ac_fn_c_try_link LINENO
2428# -----------------------
2429# Try to link conftest.$ac_ext, and return whether this succeeded.
2430ac_fn_c_try_link ()
2431{
2432 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433 rm -f conftest.$ac_objext conftest$ac_exeext
2434 if { { ac_try="$ac_link"
2435case "(($ac_try" in
2436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2437 *) ac_try_echo=$ac_try;;
2438esac
2439eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2440$as_echo "$ac_try_echo"; } >&5
2441 (eval "$ac_link") 2>conftest.err
2442 ac_status=$?
2443 if test -s conftest.err; then
2444 grep -v '^ *+' conftest.err >conftest.er1
2445 cat conftest.er1 >&5
2446 mv -f conftest.er1 conftest.err
2447 fi
2448 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449 test $ac_status = 0; } && {
2450 test -z "$ac_c_werror_flag" ||
2451 test ! -s conftest.err
2452 } && test -s conftest$ac_exeext && {
2453 test "$cross_compiling" = yes ||
2454 $as_test_x conftest$ac_exeext
2455 }; then :
2456 ac_retval=0
2457else
2458 $as_echo "$as_me: failed program was:" >&5
2459sed 's/^/| /' conftest.$ac_ext >&5
2460
2461 ac_retval=1
2462fi
2463 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2464 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2465 # interfere with the next link command; also delete a directory that is
2466 # left behind by Apple's compiler. We do this before executing the actions.
2467 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2468 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2469 as_fn_set_status $ac_retval
2470
2471} # ac_fn_c_try_link
2472
42bbbe8b
GM
2473# ac_fn_c_check_decl LINENO SYMBOL VAR
2474# ------------------------------------
2475# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2476ac_fn_c_check_decl ()
2477{
2478 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2480$as_echo_n "checking whether $2 is declared... " >&6; }
2481if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2482 $as_echo_n "(cached) " >&6
2483else
2484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h. */
2486$4
2487int
2488main ()
2489{
2490#ifndef $2
2491 (void) $2;
2492#endif
2493
2494 ;
2495 return 0;
2496}
2497_ACEOF
2498if ac_fn_c_try_compile "$LINENO"; then :
2499 eval "$3=yes"
2500else
2501 eval "$3=no"
2502fi
2503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2504fi
2505eval ac_res=\$$3
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2507$as_echo "$ac_res" >&6; }
2508 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2509
2510} # ac_fn_c_check_decl
2511
5476a9a4
GM
2512# ac_fn_c_check_header_preproc LINENO HEADER VAR
2513# ----------------------------------------------
2514# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2515ac_fn_c_check_header_preproc ()
067d23c9
KY
2516{
2517 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2519$as_echo_n "checking for $2... " >&6; }
a9bec17c 2520if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2521 $as_echo_n "(cached) " >&6
2522else
2523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2524/* end confdefs.h. */
5476a9a4
GM
2525#include <$2>
2526_ACEOF
2527if ac_fn_c_try_cpp "$LINENO"; then :
2528 eval "$3=yes"
2529else
2530 eval "$3=no"
2531fi
2532rm -f conftest.err conftest.$ac_ext
2533fi
2534eval ac_res=\$$3
2535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2536$as_echo "$ac_res" >&6; }
2537 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2538
5476a9a4 2539} # ac_fn_c_check_header_preproc
067d23c9 2540
5476a9a4
GM
2541# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2542# ----------------------------------------------------
2543# Tries to find if the field MEMBER exists in type AGGR, after including
2544# INCLUDES, setting cache variable VAR accordingly.
2545ac_fn_c_check_member ()
2546{
2547 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2549$as_echo_n "checking for $2.$3... " >&6; }
2550if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2551 $as_echo_n "(cached) " >&6
2552else
2553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554/* end confdefs.h. */
2555$5
2556int
2557main ()
2558{
2559static $2 ac_aggr;
2560if (ac_aggr.$3)
2561return 0;
2562 ;
2563 return 0;
2564}
2565_ACEOF
2566if ac_fn_c_try_compile "$LINENO"; then :
2567 eval "$4=yes"
2568else
2569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h. */
2571$5
2572int
2573main ()
2574{
2575static $2 ac_aggr;
2576if (sizeof ac_aggr.$3)
2577return 0;
2578 ;
2579 return 0;
2580}
2581_ACEOF
2582if ac_fn_c_try_compile "$LINENO"; then :
2583 eval "$4=yes"
2584else
2585 eval "$4=no"
2586fi
2587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2588fi
2589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2590fi
2591eval ac_res=\$$4
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2593$as_echo "$ac_res" >&6; }
2594 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2595
2596} # ac_fn_c_check_member
2597
2598# ac_fn_c_check_func LINENO FUNC VAR
2599# ----------------------------------
2600# Tests whether FUNC exists, setting the cache variable VAR accordingly
2601ac_fn_c_check_func ()
2602{
2603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605$as_echo_n "checking for $2... " >&6; }
2606if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2607 $as_echo_n "(cached) " >&6
2608else
2609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h. */
2611/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2612 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2613#define $2 innocuous_$2
2614
2615/* System header to define __stub macros and hopefully few prototypes,
2616 which can conflict with char $2 (); below.
2617 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2618 <limits.h> exists even on freestanding compilers. */
2619
2620#ifdef __STDC__
067d23c9
KY
2621# include <limits.h>
2622#else
2623# include <assert.h>
2624#endif
2625
2626#undef $2
2627
2628/* Override any GCC internal prototype to avoid an error.
2629 Use char because int might match the return type of a GCC
2630 builtin and then its argument prototype would still apply. */
2631#ifdef __cplusplus
2632extern "C"
2633#endif
2634char $2 ();
2635/* The GNU C library defines this for functions which it implements
2636 to always fail with ENOSYS. Some functions are actually named
2637 something starting with __ and the normal name is an alias. */
2638#if defined __stub_$2 || defined __stub___$2
2639choke me
2640#endif
2641
2642int
2643main ()
2644{
2645return $2 ();
2646 ;
2647 return 0;
2648}
2649_ACEOF
2650if ac_fn_c_try_link "$LINENO"; then :
2651 eval "$3=yes"
2652else
2653 eval "$3=no"
2654fi
2655rm -f core conftest.err conftest.$ac_objext \
2656 conftest$ac_exeext conftest.$ac_ext
2657fi
2658eval ac_res=\$$3
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2660$as_echo "$ac_res" >&6; }
a9bec17c 2661 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2662
2663} # ac_fn_c_check_func
2664
5476a9a4
GM
2665# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2666# -------------------------------------------
2667# Tests whether TYPE exists after having included INCLUDES, setting cache
2668# variable VAR accordingly.
2669ac_fn_c_check_type ()
3e0be4ab
GM
2670{
2671 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2673$as_echo_n "checking for $2... " >&6; }
2674if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2675 $as_echo_n "(cached) " >&6
2676else
5476a9a4 2677 eval "$3=no"
3e0be4ab
GM
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679/* end confdefs.h. */
5476a9a4 2680$4
3e0be4ab
GM
2681int
2682main ()
2683{
5476a9a4
GM
2684if (sizeof ($2))
2685 return 0;
3e0be4ab
GM
2686 ;
2687 return 0;
2688}
2689_ACEOF
2690if ac_fn_c_try_compile "$LINENO"; then :
2691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h. */
5476a9a4 2693$4
3e0be4ab
GM
2694int
2695main ()
2696{
5476a9a4
GM
2697if (sizeof (($2)))
2698 return 0;
3e0be4ab
GM
2699 ;
2700 return 0;
2701}
2702_ACEOF
2703if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2704
3e0be4ab 2705else
5476a9a4 2706 eval "$3=yes"
3e0be4ab
GM
2707fi
2708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709fi
2710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711fi
5476a9a4 2712eval ac_res=\$$3
3e0be4ab
GM
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2714$as_echo "$ac_res" >&6; }
a9bec17c 2715 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2716
5476a9a4 2717} # ac_fn_c_check_type
3e0be4ab 2718
5f90be1b
PE
2719# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2720# --------------------------------------------
2721# Tries to find the compile-time value of EXPR in a program that includes
2722# INCLUDES, setting VAR accordingly. Returns whether the value could be
2723# computed
2724ac_fn_c_compute_int ()
2725{
2726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727 if test "$cross_compiling" = yes; then
2728 # Depending upon the size, compute the lo and hi bounds.
2729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2730/* end confdefs.h. */
2731$4
2732int
2733main ()
2734{
2735static int test_array [1 - 2 * !(($2) >= 0)];
2736test_array [0] = 0
2737
2738 ;
2739 return 0;
2740}
2741_ACEOF
2742if ac_fn_c_try_compile "$LINENO"; then :
2743 ac_lo=0 ac_mid=0
2744 while :; do
2745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2746/* end confdefs.h. */
2747$4
2748int
2749main ()
2750{
2751static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2752test_array [0] = 0
2753
2754 ;
2755 return 0;
2756}
2757_ACEOF
2758if ac_fn_c_try_compile "$LINENO"; then :
2759 ac_hi=$ac_mid; break
2760else
2761 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2762 if test $ac_lo -le $ac_mid; then
2763 ac_lo= ac_hi=
2764 break
2765 fi
2766 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2767fi
2768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2769 done
2770else
2771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2772/* end confdefs.h. */
2773$4
2774int
2775main ()
2776{
2777static int test_array [1 - 2 * !(($2) < 0)];
2778test_array [0] = 0
2779
2780 ;
2781 return 0;
2782}
2783_ACEOF
2784if ac_fn_c_try_compile "$LINENO"; then :
2785 ac_hi=-1 ac_mid=-1
2786 while :; do
2787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2788/* end confdefs.h. */
2789$4
2790int
2791main ()
2792{
2793static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2794test_array [0] = 0
2795
2796 ;
2797 return 0;
2798}
2799_ACEOF
2800if ac_fn_c_try_compile "$LINENO"; then :
2801 ac_lo=$ac_mid; break
2802else
2803 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2804 if test $ac_mid -le $ac_hi; then
2805 ac_lo= ac_hi=
2806 break
2807 fi
2808 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2809fi
2810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2811 done
2812else
2813 ac_lo= ac_hi=
2814fi
2815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2816fi
2817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2818# Binary search between lo and hi bounds.
2819while test "x$ac_lo" != "x$ac_hi"; do
2820 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822/* end confdefs.h. */
2823$4
2824int
2825main ()
2826{
2827static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2828test_array [0] = 0
2829
2830 ;
2831 return 0;
2832}
2833_ACEOF
2834if ac_fn_c_try_compile "$LINENO"; then :
2835 ac_hi=$ac_mid
2836else
2837 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2838fi
2839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2840done
2841case $ac_lo in #((
2842?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2843'') ac_retval=1 ;;
2844esac
2845 else
2846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847/* end confdefs.h. */
2848$4
2849static long int longval () { return $2; }
2850static unsigned long int ulongval () { return $2; }
2851#include <stdio.h>
2852#include <stdlib.h>
2853int
2854main ()
2855{
2856
2857 FILE *f = fopen ("conftest.val", "w");
2858 if (! f)
2859 return 1;
2860 if (($2) < 0)
2861 {
2862 long int i = longval ();
2863 if (i != ($2))
2864 return 1;
2865 fprintf (f, "%ld", i);
2866 }
2867 else
2868 {
2869 unsigned long int i = ulongval ();
2870 if (i != ($2))
2871 return 1;
2872 fprintf (f, "%lu", i);
2873 }
2874 /* Do not output a trailing newline, as this causes \r\n confusion
2875 on some platforms. */
2876 return ferror (f) || fclose (f) != 0;
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882if ac_fn_c_try_run "$LINENO"; then :
2883 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2884else
2885 ac_retval=1
2886fi
2887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2888 conftest.$ac_objext conftest.beam conftest.$ac_ext
2889rm -f conftest.val
2890
2891 fi
a9bec17c 2892 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
2893 as_fn_set_status $ac_retval
2894
2895} # ac_fn_c_compute_int
067d23c9
KY
2896cat >config.log <<_ACEOF
2897This file contains any messages produced by compilers while
2898running configure, to aid debugging if configure makes a mistake.
2899
250c8ab9 2900It was created by emacs $as_me 24.2.50, which was
a9bec17c 2901generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
2902
2903 $ $0 $@
2904
2905_ACEOF
2906exec 5>>config.log
2907{
2908cat <<_ASUNAME
2909## --------- ##
2910## Platform. ##
2911## --------- ##
2912
2913hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2914uname -m = `(uname -m) 2>/dev/null || echo unknown`
2915uname -r = `(uname -r) 2>/dev/null || echo unknown`
2916uname -s = `(uname -s) 2>/dev/null || echo unknown`
2917uname -v = `(uname -v) 2>/dev/null || echo unknown`
2918
2919/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2920/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2921
2922/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2923/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2924/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2925/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2926/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2927/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2928/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2929
2930_ASUNAME
2931
2932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933for as_dir in $PATH
2934do
2935 IFS=$as_save_IFS
2936 test -z "$as_dir" && as_dir=.
2937 $as_echo "PATH: $as_dir"
2938 done
2939IFS=$as_save_IFS
2940
2941} >&5
2942
2943cat >&5 <<_ACEOF
2944
2945
2946## ----------- ##
2947## Core tests. ##
2948## ----------- ##
2949
2950_ACEOF
2951
2952
2953# Keep a trace of the command line.
2954# Strip out --no-create and --no-recursion so they do not pile up.
2955# Strip out --silent because we don't want to record it for future runs.
2956# Also quote any args containing shell meta-characters.
2957# Make two passes to allow for proper duplicate-argument suppression.
2958ac_configure_args=
2959ac_configure_args0=
2960ac_configure_args1=
2961ac_must_keep_next=false
2962for ac_pass in 1 2
2963do
2964 for ac_arg
2965 do
2966 case $ac_arg in
2967 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2968 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2969 | -silent | --silent | --silen | --sile | --sil)
2970 continue ;;
2971 *\'*)
2972 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2973 esac
2974 case $ac_pass in
2975 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2976 2)
2977 as_fn_append ac_configure_args1 " '$ac_arg'"
2978 if test $ac_must_keep_next = true; then
2979 ac_must_keep_next=false # Got value, back to normal.
2980 else
2981 case $ac_arg in
2982 *=* | --config-cache | -C | -disable-* | --disable-* \
2983 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2984 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2985 | -with-* | --with-* | -without-* | --without-* | --x)
2986 case "$ac_configure_args0 " in
2987 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2988 esac
2989 ;;
2990 -* ) ac_must_keep_next=true ;;
2991 esac
2992 fi
2993 as_fn_append ac_configure_args " '$ac_arg'"
2994 ;;
2995 esac
2996 done
2997done
2998{ ac_configure_args0=; unset ac_configure_args0;}
2999{ ac_configure_args1=; unset ac_configure_args1;}
3000
3001# When interrupted or exit'd, cleanup temporary files, and complete
3002# config.log. We remove comments because anyway the quotes in there
3003# would cause problems or look ugly.
3004# WARNING: Use '\'' to represent an apostrophe within the trap.
3005# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3006trap 'exit_status=$?
3007 # Save into config.log some information that might help in debugging.
3008 {
3009 echo
3010
a9bec17c
GM
3011 cat <<\_ASBOX
3012## ---------------- ##
067d23c9 3013## Cache variables. ##
a9bec17c
GM
3014## ---------------- ##
3015_ASBOX
067d23c9
KY
3016 echo
3017 # The following way of writing the cache mishandles newlines in values,
3018(
3019 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3020 eval ac_val=\$$ac_var
3021 case $ac_val in #(
3022 *${as_nl}*)
3023 case $ac_var in #(
3024 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3025$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3026 esac
3027 case $ac_var in #(
3028 _ | IFS | as_nl) ;; #(
3029 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3030 *) { eval $ac_var=; unset $ac_var;} ;;
3031 esac ;;
3032 esac
3033 done
3034 (set) 2>&1 |
3035 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3036 *${as_nl}ac_space=\ *)
3037 sed -n \
3038 "s/'\''/'\''\\\\'\'''\''/g;
3039 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3040 ;; #(
3041 *)
3042 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3043 ;;
3044 esac |
3045 sort
3046)
3047 echo
3048
a9bec17c
GM
3049 cat <<\_ASBOX
3050## ----------------- ##
067d23c9 3051## Output variables. ##
a9bec17c
GM
3052## ----------------- ##
3053_ASBOX
067d23c9
KY
3054 echo
3055 for ac_var in $ac_subst_vars
3056 do
3057 eval ac_val=\$$ac_var
3058 case $ac_val in
3059 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060 esac
3061 $as_echo "$ac_var='\''$ac_val'\''"
3062 done | sort
3063 echo
3064
3065 if test -n "$ac_subst_files"; then
a9bec17c
GM
3066 cat <<\_ASBOX
3067## ------------------- ##
067d23c9 3068## File substitutions. ##
a9bec17c
GM
3069## ------------------- ##
3070_ASBOX
067d23c9
KY
3071 echo
3072 for ac_var in $ac_subst_files
3073 do
3074 eval ac_val=\$$ac_var
3075 case $ac_val in
3076 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3077 esac
3078 $as_echo "$ac_var='\''$ac_val'\''"
3079 done | sort
3080 echo
3081 fi
3082
3083 if test -s confdefs.h; then
a9bec17c
GM
3084 cat <<\_ASBOX
3085## ----------- ##
067d23c9 3086## confdefs.h. ##
a9bec17c
GM
3087## ----------- ##
3088_ASBOX
067d23c9
KY
3089 echo
3090 cat confdefs.h
3091 echo
3092 fi
3093 test "$ac_signal" != 0 &&
3094 $as_echo "$as_me: caught signal $ac_signal"
3095 $as_echo "$as_me: exit $exit_status"
3096 } >&5
3097 rm -f core *.core core.conftest.* &&
3098 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3099 exit $exit_status
3100' 0
3101for ac_signal in 1 2 13 15; do
3102 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3103done
3104ac_signal=0
3105
3106# confdefs.h avoids OS command line length limits that DEFS can exceed.
3107rm -f -r conftest* confdefs.h
3108
3109$as_echo "/* confdefs.h */" > confdefs.h
3110
3111# Predefined preprocessor variables.
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_NAME "$PACKAGE_NAME"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_VERSION "$PACKAGE_VERSION"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_STRING "$PACKAGE_STRING"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3131_ACEOF
3132
3133cat >>confdefs.h <<_ACEOF
3134#define PACKAGE_URL "$PACKAGE_URL"
3135_ACEOF
3136
3137
3138# Let the site file select an alternate cache file if it wants to.
3139# Prefer an explicitly selected file to automatically selected ones.
3140ac_site_file1=NONE
3141ac_site_file2=NONE
3142if test -n "$CONFIG_SITE"; then
a9bec17c 3143 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3144elif test "x$prefix" != xNONE; then
3145 ac_site_file1=$prefix/share/config.site
3146 ac_site_file2=$prefix/etc/config.site
3147else
3148 ac_site_file1=$ac_default_prefix/share/config.site
3149 ac_site_file2=$ac_default_prefix/etc/config.site
3150fi
3151for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3152do
3153 test "x$ac_site_file" = xNONE && continue
3154 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3156$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3157 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3158 . "$ac_site_file"
067d23c9
KY
3159 fi
3160done
3161
3162if test -r "$cache_file"; then
3163 # Some versions of bash will fail to source /dev/null (special files
3164 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3165 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3167$as_echo "$as_me: loading cache $cache_file" >&6;}
3168 case $cache_file in
3169 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3170 *) . "./$cache_file";;
3171 esac
3172 fi
3173else
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3175$as_echo "$as_me: creating cache $cache_file" >&6;}
3176 >$cache_file
3177fi
3178
5476a9a4
GM
3179as_fn_append ac_header_list " linux/version.h"
3180as_fn_append ac_header_list " sys/systeminfo.h"
3181as_fn_append ac_header_list " stdio_ext.h"
3182as_fn_append ac_header_list " fcntl.h"
3183as_fn_append ac_header_list " coff.h"
3184as_fn_append ac_header_list " pty.h"
3185as_fn_append ac_header_list " sys/vlimit.h"
3186as_fn_append ac_header_list " sys/resource.h"
3187as_fn_append ac_header_list " sys/utsname.h"
3188as_fn_append ac_header_list " pwd.h"
3189as_fn_append ac_header_list " utmp.h"
3190as_fn_append ac_header_list " dirent.h"
3191as_fn_append ac_header_list " util.h"
3192as_fn_append ac_header_list " sys/socket.h"
3193as_fn_append ac_header_list " stdlib.h"
3194as_fn_append ac_header_list " unistd.h"
7e723570 3195as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3196as_fn_append ac_header_list " pthread.h"
3197as_fn_append ac_header_list " malloc/malloc.h"
3198as_fn_append ac_header_list " maillock.h"
3199as_fn_append ac_header_list " sys/un.h"
3200as_fn_append ac_func_list " tzset"
3201as_fn_append ac_func_list " readlinkat"
8966cbff 3202as_fn_append ac_header_list " execinfo.h"
f199cab1
GM
3203gl_getopt_required=GNU
3204as_fn_append ac_header_list " getopt.h"
3205as_fn_append ac_func_list " gettimeofday"
3206as_fn_append ac_func_list " nanotime"
e700232f 3207as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3208as_fn_append ac_header_list " wchar.h"
3209as_fn_append ac_header_list " stdint.h"
3210as_fn_append ac_header_list " inttypes.h"
3211as_fn_append ac_func_list " lstat"
f199cab1
GM
3212as_fn_append ac_func_list " alarm"
3213as_fn_append ac_header_list " sys/select.h"
3214as_fn_append ac_func_list " pselect"
3215as_fn_append ac_func_list " pthread_sigmask"
3216as_fn_append ac_func_list " readlink"
f199cab1
GM
3217as_fn_append ac_func_list " strtoimax"
3218as_fn_append ac_func_list " strtoumax"
3219as_fn_append ac_func_list " symlink"
3220as_fn_append ac_header_list " sys/stat.h"
3221as_fn_append ac_func_list " localtime_r"
e700232f 3222as_fn_append ac_header_list " utime.h"
f199cab1
GM
3223as_fn_append ac_func_list " futimes"
3224as_fn_append ac_func_list " futimesat"
3225as_fn_append ac_func_list " futimens"
3226as_fn_append ac_func_list " utimensat"
3227as_fn_append ac_func_list " lutimes"
067d23c9
KY
3228# Check that the precious variables saved in the cache have kept the same
3229# value.
3230ac_cache_corrupted=false
3231for ac_var in $ac_precious_vars; do
3232 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3233 eval ac_new_set=\$ac_env_${ac_var}_set
3234 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3235 eval ac_new_val=\$ac_env_${ac_var}_value
3236 case $ac_old_set,$ac_new_set in
3237 set,)
3238 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3239$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3240 ac_cache_corrupted=: ;;
3241 ,set)
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3243$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3244 ac_cache_corrupted=: ;;
3245 ,);;
3246 *)
3247 if test "x$ac_old_val" != "x$ac_new_val"; then
3248 # differences in whitespace do not lead to failure.
3249 ac_old_val_w=`echo x $ac_old_val`
3250 ac_new_val_w=`echo x $ac_new_val`
3251 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3253$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3254 ac_cache_corrupted=:
3255 else
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3257$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3258 eval $ac_var=\$ac_old_val
3259 fi
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3261$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3262 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3263$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3264 fi;;
3265 esac
3266 # Pass precious variables to config.status.
3267 if test "$ac_new_set" = set; then
3268 case $ac_new_val in
3269 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3270 *) ac_arg=$ac_var=$ac_new_val ;;
3271 esac
3272 case " $ac_configure_args " in
3273 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3274 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3275 esac
3276 fi
3277done
3278if $ac_cache_corrupted; then
3279 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3281 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3282$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3283 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3284fi
3285## -------------------- ##
3286## Main body of script. ##
3287## -------------------- ##
3288
3289ac_ext=c
3290ac_cpp='$CPP $CPPFLAGS'
3291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3293ac_compiler_gnu=$ac_cv_c_compiler_gnu
3294
3295
3296ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3297
3298
743c80a7 3299ac_aux_dir=
369e19fc 3300for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3301 for ac_t in install-sh install.sh shtool; do
3302 if test -f "$ac_dir/$ac_t"; then
3303 ac_aux_dir=$ac_dir
3304 ac_install_sh="$ac_aux_dir/$ac_t -c"
3305 break 2
3306 fi
3307 done
743c80a7
PE
3308done
3309if test -z "$ac_aux_dir"; then
a9bec17c 3310 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3311fi
067d23c9 3312
743c80a7
PE
3313# These three variables are undocumented and unsupported,
3314# and are intended to be withdrawn in a future Autoconf release.
3315# They can cause serious problems if a builder's source tree is in a directory
3316# whose full name contains unusual characters.
3317ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3318ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3319ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3320
067d23c9 3321
369e19fc
PE
3322am__api_version='1.11'
3323
743c80a7
PE
3324# Find a good install program. We prefer a C program (faster),
3325# so one script is as good as another. But avoid the broken or
3326# incompatible versions:
3327# SysV /etc/install, /usr/sbin/install
3328# SunOS /usr/etc/install
3329# IRIX /sbin/install
3330# AIX /bin/install
3331# AmigaOS /C/install, which installs bootblocks on floppy discs
3332# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3333# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3334# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3335# OS/2's system install, which has a completely different semantic
3336# ./install, which can be erroneously created by make from ./install.sh.
3337# Reject install programs that cannot install multiple files.
3338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3339$as_echo_n "checking for a BSD-compatible install... " >&6; }
3340if test -z "$INSTALL"; then
a9bec17c 3341if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3342 $as_echo_n "(cached) " >&6
3343else
3344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3345for as_dir in $PATH
3346do
3347 IFS=$as_save_IFS
3348 test -z "$as_dir" && as_dir=.
3349 # Account for people who put trailing slashes in PATH elements.
3350case $as_dir/ in #((
3351 ./ | .// | /[cC]/* | \
3352 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3353 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3354 /usr/ucb/* ) ;;
3355 *)
3356 # OSF1 and SCO ODT 3.0 have their own names for install.
3357 # Don't use installbsd from OSF since it installs stuff as root
3358 # by default.
3359 for ac_prog in ginstall scoinst install; do
3360 for ac_exec_ext in '' $ac_executable_extensions; do
3361 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3362 if test $ac_prog = install &&
3363 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3364 # AIX install. It has an incompatible calling convention.
3365 :
3366 elif test $ac_prog = install &&
3367 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3368 # program-specific install script used by HP pwplus--don't use.
3369 :
3370 else
3371 rm -rf conftest.one conftest.two conftest.dir
3372 echo one > conftest.one
3373 echo two > conftest.two
3374 mkdir conftest.dir
3375 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3376 test -s conftest.one && test -s conftest.two &&
3377 test -s conftest.dir/conftest.one &&
3378 test -s conftest.dir/conftest.two
3379 then
3380 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3381 break 3
3382 fi
3383 fi
3384 fi
3385 done
3386 done
3387 ;;
3388esac
067d23c9 3389
743c80a7
PE
3390 done
3391IFS=$as_save_IFS
067d23c9 3392
743c80a7 3393rm -rf conftest.one conftest.two conftest.dir
067d23c9 3394
067d23c9 3395fi
743c80a7
PE
3396 if test "${ac_cv_path_install+set}" = set; then
3397 INSTALL=$ac_cv_path_install
3398 else
3399 # As a last resort, use the slow shell script. Don't cache a
3400 # value for INSTALL within a source directory, because that will
3401 # break other packages using the cache if that directory is
3402 # removed, or if the value is a relative name.
3403 INSTALL=$ac_install_sh
3404 fi
067d23c9 3405fi
743c80a7
PE
3406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3407$as_echo "$INSTALL" >&6; }
067d23c9 3408
743c80a7
PE
3409# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3410# It thinks the first close brace ends the variable substitution.
3411test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3412
743c80a7 3413test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3414
743c80a7 3415test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3416
743c80a7
PE
3417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3418$as_echo_n "checking whether build environment is sane... " >&6; }
3419# Just in case
3420sleep 1
3421echo timestamp > conftest.file
3422# Reject unsafe characters in $srcdir or the absolute working directory
3423# name. Accept space and tab only in the latter.
3424am_lf='
3425'
3426case `pwd` in
3427 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3428 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3429esac
3430case $srcdir in
3431 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3432 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3433esac
067d23c9 3434
743c80a7
PE
3435# Do `set' in a subshell so we don't clobber the current shell's
3436# arguments. Must try -L first in case configure is actually a
3437# symlink; some systems play weird games with the mod time of symlinks
3438# (eg FreeBSD returns the mod time of the symlink's containing
3439# directory).
3440if (
3441 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3442 if test "$*" = "X"; then
3443 # -L didn't work.
3444 set X `ls -t "$srcdir/configure" conftest.file`
3445 fi
3446 rm -f conftest.file
3447 if test "$*" != "X $srcdir/configure conftest.file" \
3448 && test "$*" != "X conftest.file $srcdir/configure"; then
3449
3450 # If neither matched, then we have a broken ls. This can happen
3451 # if, for instance, CONFIG_SHELL is bash and it inherits a
3452 # broken ls alias from the environment. This has actually
3453 # happened. Such a system could not be considered "sane".
a9bec17c 3454 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3455alias in your environment" "$LINENO" 5
3456 fi
067d23c9 3457
743c80a7
PE
3458 test "$2" = conftest.file
3459 )
3460then
3461 # Ok.
3462 :
067d23c9 3463else
a9bec17c 3464 as_fn_error "newly created file is older than distributed files!
743c80a7 3465Check your system clock" "$LINENO" 5
067d23c9 3466fi
743c80a7
PE
3467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3468$as_echo "yes" >&6; }
3469test "$program_prefix" != NONE &&
3470 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3471# Use a double $ so make ignores it.
3472test "$program_suffix" != NONE &&
3473 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3474# Double any \ or $.
3475# By default was `s,x,x', remove it if useless.
3476ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3477program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3478
743c80a7
PE
3479# expand $ac_aux_dir to an absolute path
3480am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3481
743c80a7
PE
3482if test x"${MISSING+set}" != xset; then
3483 case $am_aux_dir in
3484 *\ * | *\ *)
3485 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3486 *)
3487 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3488 esac
067d23c9 3489fi
743c80a7
PE
3490# Use eval to expand $SHELL
3491if eval "$MISSING --run true"; then
3492 am_missing_run="$MISSING --run "
067d23c9 3493else
743c80a7
PE
3494 am_missing_run=
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3496$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3497fi
3498
743c80a7
PE
3499if test x"${install_sh}" != xset; then
3500 case $am_aux_dir in
3501 *\ * | *\ *)
3502 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3503 *)
3504 install_sh="\${SHELL} $am_aux_dir/install-sh"
3505 esac
067d23c9
KY
3506fi
3507
743c80a7
PE
3508# Installed binaries are usually stripped using `strip' when the user
3509# run `make install-strip'. However `strip' might not be the right
3510# tool to use in cross-compilation environments, therefore Automake
3511# will honor the `STRIP' environment variable to overrule this program.
3512if test "$cross_compiling" != no; then
3513 if test -n "$ac_tool_prefix"; then
3514 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3515set dummy ${ac_tool_prefix}strip; ac_word=$2
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3517$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3518if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3519 $as_echo_n "(cached) " >&6
067d23c9 3520else
743c80a7
PE
3521 if test -n "$STRIP"; then
3522 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3523else
3524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3525for as_dir in $PATH
3526do
3527 IFS=$as_save_IFS
3528 test -z "$as_dir" && as_dir=.
3529 for ac_exec_ext in '' $ac_executable_extensions; do
3530 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3531 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3533 break 2
3534 fi
3535done
3536 done
3537IFS=$as_save_IFS
067d23c9
KY
3538
3539fi
067d23c9 3540fi
743c80a7
PE
3541STRIP=$ac_cv_prog_STRIP
3542if test -n "$STRIP"; then
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3544$as_echo "$STRIP" >&6; }
3545else
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3547$as_echo "no" >&6; }
067d23c9
KY
3548fi
3549
3550
067d23c9 3551fi
743c80a7
PE
3552if test -z "$ac_cv_prog_STRIP"; then
3553 ac_ct_STRIP=$STRIP
3554 # Extract the first word of "strip", so it can be a program name with args.
3555set dummy strip; ac_word=$2
3556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3557$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3558if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3559 $as_echo_n "(cached) " >&6
3560else
3561 if test -n "$ac_ct_STRIP"; then
3562 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3563else
3564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3565for as_dir in $PATH
3566do
3567 IFS=$as_save_IFS
3568 test -z "$as_dir" && as_dir=.
3569 for ac_exec_ext in '' $ac_executable_extensions; do
3570 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3571 ac_cv_prog_ac_ct_STRIP="strip"
3572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3573 break 2
3574 fi
3575done
3576 done
3577IFS=$as_save_IFS
3578
3579fi
3580fi
3581ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3582if test -n "$ac_ct_STRIP"; then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3584$as_echo "$ac_ct_STRIP" >&6; }
3585else
3586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3587$as_echo "no" >&6; }
3588fi
3589
3590 if test "x$ac_ct_STRIP" = x; then
3591 STRIP=":"
3592 else
3593 case $cross_compiling:$ac_tool_warned in
3594yes:)
3595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3597ac_tool_warned=yes ;;
3598esac
3599 STRIP=$ac_ct_STRIP
3600 fi
3601else
3602 STRIP="$ac_cv_prog_STRIP"
3603fi
3604
3605fi
3606INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3607
3608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3609$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3610if test -z "$MKDIR_P"; then
a9bec17c 3611 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3612 $as_echo_n "(cached) " >&6
3613else
3614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3615for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3616do
3617 IFS=$as_save_IFS
3618 test -z "$as_dir" && as_dir=.
3619 for ac_prog in mkdir gmkdir; do
3620 for ac_exec_ext in '' $ac_executable_extensions; do
3621 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3622 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3623 'mkdir (GNU coreutils) '* | \
3624 'mkdir (coreutils) '* | \
3625 'mkdir (fileutils) '4.1*)
3626 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3627 break 3;;
3628 esac
3629 done
3630 done
3631 done
3632IFS=$as_save_IFS
3633
3634fi
3635
3636 test -d ./--version && rmdir ./--version
3637 if test "${ac_cv_path_mkdir+set}" = set; then
3638 MKDIR_P="$ac_cv_path_mkdir -p"
3639 else
3640 # As a last resort, use the slow shell script. Don't cache a
3641 # value for MKDIR_P within a source directory, because that will
3642 # break other packages using the cache if that directory is
3643 # removed, or if the value is a relative name.
3644 MKDIR_P="$ac_install_sh -d"
3645 fi
3646fi
3647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3648$as_echo "$MKDIR_P" >&6; }
3649
a451f14b 3650
743c80a7
PE
3651mkdir_p="$MKDIR_P"
3652case $mkdir_p in
3653 [\\/$]* | ?:[\\/]*) ;;
3654 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3655esac
3656
3657for ac_prog in gawk mawk nawk awk
3658do
3659 # Extract the first word of "$ac_prog", so it can be a program name with args.
3660set dummy $ac_prog; ac_word=$2
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3663if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3664 $as_echo_n "(cached) " >&6
3665else
3666 if test -n "$AWK"; then
3667 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3668else
3669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670for as_dir in $PATH
3671do
3672 IFS=$as_save_IFS
3673 test -z "$as_dir" && as_dir=.
3674 for ac_exec_ext in '' $ac_executable_extensions; do
3675 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3676 ac_cv_prog_AWK="$ac_prog"
3677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3678 break 2
3679 fi
3680done
3681 done
3682IFS=$as_save_IFS
3683
3684fi
3685fi
3686AWK=$ac_cv_prog_AWK
3687if test -n "$AWK"; then
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3689$as_echo "$AWK" >&6; }
3690else
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3692$as_echo "no" >&6; }
3693fi
3694
3695
3696 test -n "$AWK" && break
3697done
3698
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3700$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3701set x ${MAKE-make}
3702ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3703if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3704 $as_echo_n "(cached) " >&6
3705else
3706 cat >conftest.make <<\_ACEOF
3707SHELL = /bin/sh
3708all:
3709 @echo '@@@%%%=$(MAKE)=@@@%%%'
3710_ACEOF
a9bec17c 3711# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3712case `${MAKE-make} -f conftest.make 2>/dev/null` in
3713 *@@@%%%=?*=@@@%%%*)
3714 eval ac_cv_prog_make_${ac_make}_set=yes;;
3715 *)
3716 eval ac_cv_prog_make_${ac_make}_set=no;;
3717esac
3718rm -f conftest.make
3719fi
3720if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3722$as_echo "yes" >&6; }
3723 SET_MAKE=
3724else
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3726$as_echo "no" >&6; }
3727 SET_MAKE="MAKE=${MAKE-make}"
3728fi
3729
3730rm -rf .tst 2>/dev/null
3731mkdir .tst 2>/dev/null
3732if test -d .tst; then
3733 am__leading_dot=.
3734else
3735 am__leading_dot=_
3736fi
3737rmdir .tst 2>/dev/null
3738
3739if test "`cd $srcdir && pwd`" != "`pwd`"; then
3740 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3741 # is not polluted with repeated "-I."
3742 am__isrc=' -I$(srcdir)'
3743 # test to see if srcdir already configured
3744 if test -f $srcdir/config.status; then
a9bec17c 3745 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3746 fi
3747fi
3748
3749# test whether we have cygpath
3750if test -z "$CYGPATH_W"; then
3751 if (cygpath --version) >/dev/null 2>/dev/null; then
3752 CYGPATH_W='cygpath -w'
3753 else
3754 CYGPATH_W=echo
3755 fi
3756fi
3757
3758
3759# Define the identity of the package.
3760 PACKAGE='emacs'
250c8ab9 3761 VERSION='24.2.50'
743c80a7
PE
3762
3763
3764cat >>confdefs.h <<_ACEOF
3765#define PACKAGE "$PACKAGE"
3766_ACEOF
3767
3768
3769cat >>confdefs.h <<_ACEOF
3770#define VERSION "$VERSION"
3771_ACEOF
3772
3773# Some tools Automake needs.
3774
3775ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3776
3777
3778AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3779
3780
3781AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3782
3783
3784AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3785
3786
3787MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3788
3789# We need awk for the "check" target. The system "awk" is bad on
3790# some platforms.
3791# Always define AMTAR for backward compatibility.
3792
3793AMTAR=${AMTAR-"${am_missing_run}tar"}
3794
3795am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3796
3797
3798
3799
3800
3801
3802
3803
3804lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3805leimdir='${datadir}/emacs/${version}/leim'
397f7161 3806standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3807locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3808'${datadir}/emacs/site-lisp'
397f7161 3809lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3810etcdir='${datadir}/emacs/${version}/etc'
3811archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3812docdir='${datadir}/emacs/${version}/etc'
3813gamedir='${localstatedir}/games/emacs'
3814
ee77919d
GM
3815
3816# Check whether --with-all was given.
3817if test "${with_all+set}" = set; then :
3818 withval=$with_all; with_features=$withval
c0528ebe 3819else
ee77919d 3820 with_features=yes
c0528ebe
GM
3821fi
3822
3823
743c80a7
PE
3824
3825
3826
3827# Check whether --with-pop was given.
3828if test "${with_pop+set}" = set; then :
3829 withval=$with_pop;
3830else
ee77919d 3831 with_pop=$with_features
743c80a7
PE
3832fi
3833
3834if test "$with_pop" = yes; then
3835 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3836
3837fi
3838
3839
3840# Check whether --with-kerberos was given.
3841if test "${with_kerberos+set}" = set; then :
3842 withval=$with_kerberos;
3843else
3844 with_kerberos=no
3845fi
3846
3847if test "$with_kerberos" != no; then
3848 $as_echo "#define KERBEROS 1" >>confdefs.h
3849
3850fi
3851
3852
3853# Check whether --with-kerberos5 was given.
3854if test "${with_kerberos5+set}" = set; then :
3855 withval=$with_kerberos5;
3856else
3857 with_kerberos5=no
3858fi
3859
3860if test "${with_kerberos5}" != no; then
3861 if test "${with_kerberos}" = no; then
3862 with_kerberos=yes
3863 $as_echo "#define KERBEROS 1" >>confdefs.h
3864
3865 fi
3866
3867$as_echo "#define KERBEROS5 1" >>confdefs.h
3868
3869fi
3870
3871
3872# Check whether --with-hesiod was given.
3873if test "${with_hesiod+set}" = set; then :
3874 withval=$with_hesiod;
3875else
3876 with_hesiod=no
3877fi
3878
3879if test "$with_hesiod" != no; then
3880
3881$as_echo "#define HESIOD 1" >>confdefs.h
3882
3883fi
3884
3885
3886# Check whether --with-mmdf was given.
3887if test "${with_mmdf+set}" = set; then :
3888 withval=$with_mmdf;
3889else
3890 with_mmdf=no
3891fi
3892
3893if test "$with_mmdf" != no; then
3894
3895$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3896
3897fi
3898
3899
3900# Check whether --with-mail-unlink was given.
3901if test "${with_mail_unlink+set}" = set; then :
3902 withval=$with_mail_unlink;
3903else
3904 with_mail_unlink=no
3905fi
3906
3907if test "$with_mail_unlink" != no; then
3908
3909$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3910
3911fi
3912
3913
3914# Check whether --with-mailhost was given.
3915if test "${with_mailhost+set}" = set; then :
3916 withval=$with_mailhost;
3917cat >>confdefs.h <<_ACEOF
3918#define MAILHOST "$withval"
3919_ACEOF
3920
3921fi
3922
3923
3924
067d23c9
KY
3925# Check whether --with-sound was given.
3926if test "${with_sound+set}" = set; then :
3927 withval=$with_sound;
3928else
ee77919d 3929 with_sound=$with_features
067d23c9
KY
3930fi
3931
3932
3933
3934# Check whether --with-sync-input was given.
3935if test "${with_sync_input+set}" = set; then :
3936 withval=$with_sync_input;
3937else
ee77919d 3938 with_sync_input=$with_features
067d23c9
KY
3939fi
3940
3941if test "$with_sync_input" = yes; then
3942
3943$as_echo "#define SYNC_INPUT 1" >>confdefs.h
3944
3945fi
3946
3947
3948# Check whether --with-x-toolkit was given.
3949if test "${with_x_toolkit+set}" = set; then :
3950 withval=$with_x_toolkit; case "${withval}" in
3951 y | ye | yes ) val=gtk ;;
3952 n | no ) val=no ;;
3953 l | lu | luc | luci | lucid ) val=lucid ;;
3954 a | at | ath | athe | athen | athena ) val=athena ;;
3955 m | mo | mot | moti | motif ) val=motif ;;
3956 g | gt | gtk ) val=gtk ;;
3957 gtk3 ) val=gtk3 ;;
3958 * )
a9bec17c 3959as_fn_error "\`--with-x-toolkit=$withval' is invalid;
067d23c9
KY
3960this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
3961\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
3962 ;;
3963 esac
3964 with_x_toolkit=$val
3965
3966fi
3967
3968
3969
0442dc7f
GM
3970# Check whether --with-wide-int was given.
3971if test "${with_wide_int+set}" = set; then :
3972 withval=$with_wide_int;
3973else
3974 with_wide_int=no
3975fi
3976
3977if test "$with_wide_int" = yes; then
3978
3979$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
3980
3981fi
3982
3983
067d23c9
KY
3984# Check whether --with-xpm was given.
3985if test "${with_xpm+set}" = set; then :
3986 withval=$with_xpm;
3987else
ee77919d 3988 with_xpm=$with_features
067d23c9
KY
3989fi
3990
3991
3992# Check whether --with-jpeg was given.
3993if test "${with_jpeg+set}" = set; then :
3994 withval=$with_jpeg;
3995else
ee77919d 3996 with_jpeg=$with_features
067d23c9
KY
3997fi
3998
3999
4000# Check whether --with-tiff was given.
4001if test "${with_tiff+set}" = set; then :
4002 withval=$with_tiff;
4003else
ee77919d 4004 with_tiff=$with_features
067d23c9
KY
4005fi
4006
4007
4008# Check whether --with-gif was given.
4009if test "${with_gif+set}" = set; then :
4010 withval=$with_gif;
4011else
ee77919d 4012 with_gif=$with_features
067d23c9
KY
4013fi
4014
4015
4016# Check whether --with-png was given.
4017if test "${with_png+set}" = set; then :
4018 withval=$with_png;
4019else
ee77919d 4020 with_png=$with_features
067d23c9
KY
4021fi
4022
4023
4024# Check whether --with-rsvg was given.
4025if test "${with_rsvg+set}" = set; then :
4026 withval=$with_rsvg;
4027else
ee77919d 4028 with_rsvg=$with_features
067d23c9
KY
4029fi
4030
4031
4032# Check whether --with-xml2 was given.
4033if test "${with_xml2+set}" = set; then :
4034 withval=$with_xml2;
4035else
ee77919d 4036 with_xml2=$with_features
067d23c9
KY
4037fi
4038
4039
4040# Check whether --with-imagemagick was given.
4041if test "${with_imagemagick+set}" = set; then :
4042 withval=$with_imagemagick;
4043else
ee77919d 4044 with_imagemagick=$with_features
067d23c9
KY
4045fi
4046
4047
4048
4049# Check whether --with-xft was given.
4050if test "${with_xft+set}" = set; then :
4051 withval=$with_xft;
4052else
ee77919d 4053 with_xft=$with_features
067d23c9
KY
4054fi
4055
4056
4057# Check whether --with-libotf was given.
4058if test "${with_libotf+set}" = set; then :
4059 withval=$with_libotf;
4060else
ee77919d 4061 with_libotf=$with_features
067d23c9
KY
4062fi
4063
4064
4065# Check whether --with-m17n-flt was given.
4066if test "${with_m17n_flt+set}" = set; then :
4067 withval=$with_m17n_flt;
4068else
ee77919d 4069 with_m17n_flt=$with_features
067d23c9
KY
4070fi
4071
4072
4073
4074# Check whether --with-toolkit-scroll-bars was given.
4075if test "${with_toolkit_scroll_bars+set}" = set; then :
4076 withval=$with_toolkit_scroll_bars;
4077else
ee77919d 4078 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4079fi
4080
4081
4082# Check whether --with-xaw3d was given.
4083if test "${with_xaw3d+set}" = set; then :
4084 withval=$with_xaw3d;
4085else
ee77919d 4086 with_xaw3d=$with_features
067d23c9
KY
4087fi
4088
4089
4090# Check whether --with-xim was given.
4091if test "${with_xim+set}" = set; then :
4092 withval=$with_xim;
4093else
ee77919d 4094 with_xim=$with_features
067d23c9
KY
4095fi
4096
4097
4098# Check whether --with-ns was given.
4099if test "${with_ns+set}" = set; then :
4100 withval=$with_ns;
4101else
4102 with_ns=no
4103fi
4104
4105
4106
4107# Check whether --with-gpm was given.
4108if test "${with_gpm+set}" = set; then :
4109 withval=$with_gpm;
4110else
ee77919d 4111 with_gpm=$with_features
067d23c9
KY
4112fi
4113
4114
4115# Check whether --with-dbus was given.
4116if test "${with_dbus+set}" = set; then :
4117 withval=$with_dbus;
4118else
ee77919d 4119 with_dbus=$with_features
067d23c9
KY
4120fi
4121
4122
4123# Check whether --with-gconf was given.
4124if test "${with_gconf+set}" = set; then :
4125 withval=$with_gconf;
4126else
ee77919d 4127 with_gconf=$with_features
067d23c9
KY
4128fi
4129
4130
f527bd02
GM
4131# Check whether --with-gsettings was given.
4132if test "${with_gsettings+set}" = set; then :
4133 withval=$with_gsettings;
4134else
ee77919d 4135 with_gsettings=$with_features
f527bd02
GM
4136fi
4137
4138
067d23c9
KY
4139# Check whether --with-selinux was given.
4140if test "${with_selinux+set}" = set; then :
4141 withval=$with_selinux;
4142else
ee77919d 4143 with_selinux=$with_features
067d23c9
KY
4144fi
4145
4146
4147# Check whether --with-gnutls was given.
4148if test "${with_gnutls+set}" = set; then :
4149 withval=$with_gnutls;
4150else
ee77919d 4151 with_gnutls=$with_features
067d23c9
KY
4152fi
4153
4154
4155## For the times when you want to build Emacs but don't have
4156## a suitable makeinfo, and can live without the manuals.
4157
4158# Check whether --with-makeinfo was given.
4159if test "${with_makeinfo+set}" = set; then :
4160 withval=$with_makeinfo;
4161else
ee77919d 4162 with_makeinfo=$with_features
067d23c9
KY
4163fi
4164
4165
c3a461a5
GM
4166## Makefile.in needs the cache file name.
4167
4168
067d23c9
KY
4169## This is an option because I do not know if all info/man support
4170## compressed files, nor how to test if they do so.
4171
4172# Check whether --with-compress-info was given.
4173if test "${with_compress_info+set}" = set; then :
4174 withval=$with_compress_info;
4175else
ee77919d 4176 with_compress_info=$with_features
067d23c9
KY
4177fi
4178
4179if test $with_compress_info = yes; then
4180 GZIP_INFO=yes
4181else
4182 GZIP_INFO=
4183fi
4184
4185
4186
4187# Check whether --with-pkg-config-prog was given.
4188if test "${with_pkg_config_prog+set}" = set; then :
4189 withval=$with_pkg_config_prog;
4190fi
4191
4192if test "X${with_pkg_config_prog}" != X; then
4193 if test "${with_pkg_config_prog}" != yes; then
4194 PKG_CONFIG="${with_pkg_config_prog}"
4195 fi
4196fi
4197
4198CRT_DIR=
4199
4200# Check whether --with-crt-dir was given.
4201if test "${with_crt_dir+set}" = set; then :
4202 withval=$with_crt_dir;
4203fi
4204
4205CRT_DIR="${with_crt_dir}"
4206
4207
4fc5868a
UM
4208# Check whether --with-gameuser was given.
4209if test "${with_gameuser+set}" = set; then :
4210 withval=$with_gameuser;
4211fi
4212
4213test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4214 && gameuser="${with_gameuser}"
4215test "X$gameuser" = X && gameuser=games
4216
4217
067d23c9
KY
4218# Check whether --with-gnustep-conf was given.
4219if test "${with_gnustep_conf+set}" = set; then :
4220 withval=$with_gnustep_conf;
4221fi
4222
4223test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4224 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4225test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4226 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4227
4228# Check whether --enable-ns-self-contained was given.
4229if test "${enable_ns_self_contained+set}" = set; then :
4230 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4231else
4232 EN_NS_SELF_CONTAINED=yes
4233fi
4234
4235
067d23c9
KY
4236# Check whether --enable-locallisppath was given.
4237if test "${enable_locallisppath+set}" = set; then :
4238 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4239 locallisppath=
4240elif test "${enableval}" != "yes"; then
4241 locallisppath=${enableval}
4242fi
4243fi
4244
4245
4246# Check whether --enable-checking was given.
4247if test "${enable_checking+set}" = set; then :
4248 enableval=$enable_checking; ac_checking_flags="${enableval}"
4249fi
4250
4251IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4252for check in $ac_checking_flags
4253do
4254 case $check in
4255 # these set all the flags to specific states
4256 yes) ac_enable_checking=1 ;;
4257 no) ac_enable_checking= ;
4258 ac_gc_check_stringbytes= ;
4259 ac_gc_check_string_overrun= ;
4260 ac_gc_check_string_free_list= ;
4261 ac_xmalloc_overrun= ;
7ee3791f 4262 ac_gc_check_cons_list= ;
e4d35030 4263 ac_glyphs_debug= ;;
067d23c9
KY
4264 all) ac_enable_checking=1 ;
4265 ac_gc_check_stringbytes=1 ;
4266 ac_gc_check_string_overrun=1 ;
4267 ac_gc_check_string_free_list=1 ;
4268 ac_xmalloc_overrun=1 ;
7ee3791f 4269 ac_gc_check_cons_list=1 ;
e4d35030 4270 ac_glyphs_debug=1 ;;
067d23c9
KY
4271 # these enable particular checks
4272 stringbytes) ac_gc_check_stringbytes=1 ;;
4273 stringoverrun) ac_gc_check_string_overrun=1 ;;
4274 stringfreelist) ac_gc_check_string_free_list=1 ;;
4275 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4276 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4277 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4278 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4279 esac
4280done
4281IFS="$ac_save_IFS"
4282
4283if test x$ac_enable_checking != x ; then
4284
4285$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4286
4287fi
4288if test x$ac_gc_check_stringbytes != x ; then
4289
4290$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4291
4292fi
4fda9c95 4293if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4294
4295$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4296
4297fi
4298if test x$ac_gc_check_string_free_list != x ; then
4299
4300$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4301
4302fi
4303if test x$ac_xmalloc_overrun != x ; then
4304
4305$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4306
4307fi
4308if test x$ac_gc_check_cons_list != x ; then
4309
4310$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4311
7ee3791f 4312fi
e4d35030 4313if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4314
4315$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4316
067d23c9
KY
4317fi
4318
afd07e01
GM
4319# Check whether --enable-check-lisp-object-type was given.
4320if test "${enable_check_lisp_object_type+set}" = set; then :
4321 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4322
afd07e01 4323$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4324
4325fi
4326fi
4327
4328
4329
4330# Check whether --enable-profiling was given.
4331if test "${enable_profiling+set}" = set; then :
4332 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4333fi
4334
4335if test x$ac_enable_profiling != x ; then
4336 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4337else
4338 PROFILING_CFLAGS=
4339fi
4340
4341
4342# Check whether --enable-autodepend was given.
4343if test "${enable_autodepend+set}" = set; then :
4344 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4345else
4346 ac_enable_autodepend=yes
4347fi
4348
4349
4350#### Make srcdir absolute, if it isn't already. It's important to
4351#### avoid running the path through pwd unnecessarily, since pwd can
4352#### give you automounter prefixes, which can go away. We do all this
4353#### so Emacs can find its files when run uninstalled.
4354## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4355unset CDPATH
4356case "${srcdir}" in
4357 /* ) ;;
4358 . )
4359 ## We may be able to use the $PWD environment variable to make this
4360 ## absolute. But sometimes PWD is inaccurate.
4361 ## Note: we used to use ${PWD} at the end instead of `pwd`,
4362 ## but that tested only for a well-formed and valid PWD,
4363 ## it did not object when PWD was well-formed and valid but just wrong.
4364 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
4365 then
4366 srcdir="$PWD"
4367 else
4368 srcdir="`(cd ${srcdir}; pwd)`"
4369 fi
4370 ;;
4371 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
4372esac
4373
067d23c9
KY
4374### Canonicalize the configuration name.
4375
067d23c9
KY
4376# Make sure we can run config.sub.
4377$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4378 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4379
4380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4381$as_echo_n "checking build system type... " >&6; }
a9bec17c 4382if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4383 $as_echo_n "(cached) " >&6
4384else
4385 ac_build_alias=$build_alias
4386test "x$ac_build_alias" = x &&
4387 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4388test "x$ac_build_alias" = x &&
a9bec17c 4389 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4390ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4391 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4392
4393fi
4394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4395$as_echo "$ac_cv_build" >&6; }
4396case $ac_cv_build in
4397*-*-*) ;;
a9bec17c 4398*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4399esac
4400build=$ac_cv_build
4401ac_save_IFS=$IFS; IFS='-'
4402set x $ac_cv_build
4403shift
4404build_cpu=$1
4405build_vendor=$2
4406shift; shift
4407# Remember, the first character of IFS is used to create $*,
4408# except with old shells:
4409build_os=$*
4410IFS=$ac_save_IFS
4411case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4412
4413
4414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4415$as_echo_n "checking host system type... " >&6; }
a9bec17c 4416if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4417 $as_echo_n "(cached) " >&6
4418else
4419 if test "x$host_alias" = x; then
4420 ac_cv_host=$ac_cv_build
4421else
4422 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4423 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4424fi
4425
4426fi
4427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4428$as_echo "$ac_cv_host" >&6; }
4429case $ac_cv_host in
4430*-*-*) ;;
a9bec17c 4431*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4432esac
4433host=$ac_cv_host
4434ac_save_IFS=$IFS; IFS='-'
4435set x $ac_cv_host
4436shift
4437host_cpu=$1
4438host_vendor=$2
4439shift; shift
4440# Remember, the first character of IFS is used to create $*,
4441# except with old shells:
4442host_os=$*
4443IFS=$ac_save_IFS
4444case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4445
4446
4447canonical=$host
4448configuration=${host_alias-${build_alias-$host}}
4449
4450
4451
4452### If you add support for a new configuration, add code to this
4453### switch statement to recognize your configuration name and select
42bbbe8b 4454### the appropriate operating system file.
067d23c9 4455
42bbbe8b 4456### You would hope that you could choose an s/*.h
067d23c9 4457### file based on the operating system portion. However, it turns out
42bbbe8b 4458### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4459### So we basically have to have a special case for each
4460### configuration name.
4461###
4462### As far as handling version numbers on operating systems is
4463### concerned, make sure things will fail in a fixable way. If
4464### /etc/MACHINES doesn't say anything about version numbers, be
4465### prepared to handle anything reasonably. If version numbers
4466### matter, be sure /etc/MACHINES says something about it.
4467
42bbbe8b 4468opsys='' unported=no
067d23c9
KY
4469case "${canonical}" in
4470
9b6e5515
GM
4471 ## GNU/Linux and similar ports
4472 *-*-linux* )
d6a003a8 4473 opsys=gnu-linux
d6a003a8
AS
4474 ;;
4475
067d23c9
KY
4476 ## FreeBSD ports
4477 *-*-freebsd* )
4478 opsys=freebsd
067d23c9
KY
4479 ;;
4480
4481 ## FreeBSD kernel + glibc based userland
4482 *-*-kfreebsd*gnu* )
4483 opsys=gnu-kfreebsd
067d23c9
KY
4484 ;;
4485
4486 ## NetBSD ports
4487 *-*-netbsd* )
4488 opsys=netbsd
067d23c9
KY
4489 ;;
4490
4491 ## OpenBSD ports
4492 *-*-openbsd* )
4493 opsys=openbsd
067d23c9
KY
4494 ;;
4495
067d23c9
KY
4496 ## Apple Darwin / Mac OS X
4497 *-apple-darwin* )
4498 case "${canonical}" in
42bbbe8b
GM
4499 i[3456]86-* ) ;;
4500 powerpc-* ) ;;
4501 x86_64-* ) ;;
067d23c9
KY
4502 * ) unported=yes ;;
4503 esac
4504 opsys=darwin
adf4198e
GM
4505 ## Use fink packages if available.
4506 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4507## if test -d /sw/include && test -d /sw/lib; then
4508## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4509## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4510## fi
067d23c9
KY
4511 ;;
4512
4513 ## HP 9000 series 700 and 800, running HP/UX
4514 hppa*-hp-hpux10.2* )
d6a003a8 4515 opsys=hpux10-20
067d23c9
KY
4516 ;;
4517 hppa*-hp-hpux1[1-9]* )
d6a003a8 4518 opsys=hpux11
067d23c9
KY
4519 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4520 ;;
4521
067d23c9 4522 ## IBM machines
067d23c9 4523 rs6000-ibm-aix4.[23]* )
42bbbe8b 4524 opsys=aix4-2
067d23c9
KY
4525 ;;
4526 powerpc-ibm-aix4.[23]* )
42bbbe8b 4527 opsys=aix4-2
067d23c9
KY
4528 ;;
4529 rs6000-ibm-aix[56]* )
42bbbe8b 4530 opsys=aix4-2
067d23c9
KY
4531 ;;
4532 powerpc-ibm-aix[56]* )
42bbbe8b 4533 opsys=aix4-2
067d23c9
KY
4534 ;;
4535
067d23c9
KY
4536 ## Silicon Graphics machines
4537 ## Iris 4D
4538 mips-sgi-irix6.5 )
fd44db7f 4539 opsys=irix6-5
067d23c9
KY
4540 # Without defining _LANGUAGE_C, things get masked out in the headers
4541 # so that, for instance, grepping for `free' in stdlib.h fails and
4542 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4543 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4544 ;;
4545
4546 ## Suns
067d23c9
KY
4547 *-sun-solaris* \
4548 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4549 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4550 case "${canonical}" in
42bbbe8b
GM
4551 i[3456]86-*-* ) ;;
4552 amd64-*-*|x86_64-*-*) ;;
4553 sparc* ) ;;
067d23c9
KY
4554 * ) unported=yes ;;
4555 esac
4556 case "${canonical}" in
4557 *-sunos5.6* | *-solaris2.6* )
4558 opsys=sol2-6
067d23c9
KY
4559 RANLIB="ar -ts"
4560 ;;
4561 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4562 opsys=sol2-6
4563 emacs_check_sunpro_c=yes
067d23c9
KY
4564 ;;
4565 *-sunos5* | *-solaris* )
4566 opsys=sol2-10
4567 emacs_check_sunpro_c=yes
067d23c9
KY
4568 ;;
4569 esac
4570 ## Watch out for a compiler that we know will not work.
4571 case "${canonical}" in
4572 *-solaris* | *-sunos5* )
4573 if [ "x$CC" = x/usr/ucb/cc ]; then
4574 ## /usr/ucb/cc doesn't work;
4575 ## we should find some other compiler that does work.
4576 unset CC
4577 fi
4578 ;;
4579 *) ;;
4580 esac
4581 ;;
4582
067d23c9
KY
4583 ## Intel 386 machines where we don't care about the manufacturer.
4584 i[3456]86-*-* )
067d23c9
KY
4585 case "${canonical}" in
4586 *-cygwin ) opsys=cygwin ;;
5ec54608
GM
4587 *-darwin* ) opsys=darwin ;;
4588 *-sysv4.2uw* ) opsys=unixware ;;
4589 *-sysv5uw* ) opsys=unixware ;;
4590 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4591 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4592 esac
4593 ;;
4594
067d23c9
KY
4595 * )
4596 unported=yes
4597 ;;
4598esac
4599
4600### If the code above didn't choose an operating system, just choose
4601### an operating system based on the configuration name. You really
4602### only want to use this when you have no idea what the right
4603### operating system is; if you know what operating systems a machine
4604### runs, it's cleaner to make it explicit in the case statement
4605### above.
4606if test x"${opsys}" = x; then
4607 case "${canonical}" in
4608 *-gnu* ) opsys=gnu ;;
4609 * )
4610 unported=yes
4611 ;;
4612 esac
4613fi
4614
4615
4616
4617if test $unported = yes; then
a9bec17c 4618 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4619Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4620fi
4621
067d23c9
KY
4622
4623#### Choose a compiler.
067d23c9
KY
4624
4625ac_ext=c
4626ac_cpp='$CPP $CPPFLAGS'
4627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4629ac_compiler_gnu=$ac_cv_c_compiler_gnu
4630if test -n "$ac_tool_prefix"; then
4631 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4632set dummy ${ac_tool_prefix}gcc; ac_word=$2
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4634$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4635if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4636 $as_echo_n "(cached) " >&6
4637else
4638 if test -n "$CC"; then
4639 ac_cv_prog_CC="$CC" # Let the user override the test.
4640else
4641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in $PATH
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
4647 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4648 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
4656fi
4657fi
4658CC=$ac_cv_prog_CC
4659if test -n "$CC"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4661$as_echo "$CC" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
4667
4668fi
4669if test -z "$ac_cv_prog_CC"; then
4670 ac_ct_CC=$CC
4671 # Extract the first word of "gcc", so it can be a program name with args.
4672set dummy gcc; ac_word=$2
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4675if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4676 $as_echo_n "(cached) " >&6
4677else
4678 if test -n "$ac_ct_CC"; then
4679 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4680else
4681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in $PATH
4683do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
4687 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4688 ac_cv_prog_ac_ct_CC="gcc"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692done
4693 done
4694IFS=$as_save_IFS
4695
4696fi
4697fi
4698ac_ct_CC=$ac_cv_prog_ac_ct_CC
4699if test -n "$ac_ct_CC"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4701$as_echo "$ac_ct_CC" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707 if test "x$ac_ct_CC" = x; then
4708 CC=""
4709 else
4710 case $cross_compiling:$ac_tool_warned in
4711yes:)
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4714ac_tool_warned=yes ;;
4715esac
4716 CC=$ac_ct_CC
4717 fi
4718else
4719 CC="$ac_cv_prog_CC"
4720fi
4721
4722if test -z "$CC"; then
4723 if test -n "$ac_tool_prefix"; then
4724 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4725set dummy ${ac_tool_prefix}cc; ac_word=$2
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4728if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4729 $as_echo_n "(cached) " >&6
4730else
4731 if test -n "$CC"; then
4732 ac_cv_prog_CC="$CC" # Let the user override the test.
4733else
4734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in $PATH
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
4739 for ac_exec_ext in '' $ac_executable_extensions; do
4740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4741 ac_cv_prog_CC="${ac_tool_prefix}cc"
4742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4743 break 2
4744 fi
4745done
4746 done
4747IFS=$as_save_IFS
4748
4749fi
4750fi
4751CC=$ac_cv_prog_CC
4752if test -n "$CC"; then
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4754$as_echo "$CC" >&6; }
4755else
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4757$as_echo "no" >&6; }
4758fi
4759
4760
4761 fi
4762fi
4763if test -z "$CC"; then
4764 # Extract the first word of "cc", so it can be a program name with args.
4765set dummy cc; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4768if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4769 $as_echo_n "(cached) " >&6
4770else
4771 if test -n "$CC"; then
4772 ac_cv_prog_CC="$CC" # Let the user override the test.
4773else
4774 ac_prog_rejected=no
4775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH
4777do
4778 IFS=$as_save_IFS
4779 test -z "$as_dir" && as_dir=.
4780 for ac_exec_ext in '' $ac_executable_extensions; do
4781 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4783 ac_prog_rejected=yes
4784 continue
4785 fi
4786 ac_cv_prog_CC="cc"
4787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788 break 2
4789 fi
4790done
4791 done
4792IFS=$as_save_IFS
4793
4794if test $ac_prog_rejected = yes; then
4795 # We found a bogon in the path, so make sure we never use it.
4796 set dummy $ac_cv_prog_CC
4797 shift
4798 if test $# != 0; then
4799 # We chose a different compiler from the bogus one.
4800 # However, it has the same basename, so the bogon will be chosen
4801 # first if we set CC to just the basename; use the full file name.
4802 shift
4803 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4804 fi
4805fi
4806fi
4807fi
4808CC=$ac_cv_prog_CC
4809if test -n "$CC"; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4811$as_echo "$CC" >&6; }
4812else
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817
4818fi
4819if test -z "$CC"; then
4820 if test -n "$ac_tool_prefix"; then
4821 for ac_prog in cl.exe
4822 do
4823 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4824set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4827if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4828 $as_echo_n "(cached) " >&6
4829else
4830 if test -n "$CC"; then
4831 ac_cv_prog_CC="$CC" # Let the user override the test.
4832else
4833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834for as_dir in $PATH
4835do
4836 IFS=$as_save_IFS
4837 test -z "$as_dir" && as_dir=.
4838 for ac_exec_ext in '' $ac_executable_extensions; do
4839 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4840 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4842 break 2
4843 fi
4844done
4845 done
4846IFS=$as_save_IFS
4847
4848fi
4849fi
4850CC=$ac_cv_prog_CC
4851if test -n "$CC"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4853$as_echo "$CC" >&6; }
4854else
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
4859
4860 test -n "$CC" && break
4861 done
4862fi
4863if test -z "$CC"; then
4864 ac_ct_CC=$CC
4865 for ac_prog in cl.exe
4866do
4867 # Extract the first word of "$ac_prog", so it can be a program name with args.
4868set dummy $ac_prog; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4871if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4872 $as_echo_n "(cached) " >&6
4873else
4874 if test -n "$ac_ct_CC"; then
4875 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4876else
4877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in $PATH
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
4883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4884 ac_cv_prog_ac_ct_CC="$ac_prog"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
4892fi
4893fi
4894ac_ct_CC=$ac_cv_prog_ac_ct_CC
4895if test -n "$ac_ct_CC"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4897$as_echo "$ac_ct_CC" >&6; }
4898else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
4903
4904 test -n "$ac_ct_CC" && break
4905done
4906
4907 if test "x$ac_ct_CC" = x; then
4908 CC=""
4909 else
4910 case $cross_compiling:$ac_tool_warned in
4911yes:)
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4914ac_tool_warned=yes ;;
4915esac
4916 CC=$ac_ct_CC
4917 fi
4918fi
4919
4920fi
4921
4922
4923test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
4925as_fn_error "no acceptable C compiler found in \$PATH
4926See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
4927
4928# Provide some information about the compiler.
4929$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4930set X $ac_compile
4931ac_compiler=$2
4932for ac_option in --version -v -V -qversion; do
4933 { { ac_try="$ac_compiler $ac_option >&5"
4934case "(($ac_try" in
4935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4936 *) ac_try_echo=$ac_try;;
4937esac
4938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4939$as_echo "$ac_try_echo"; } >&5
4940 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4941 ac_status=$?
4942 if test -s conftest.err; then
4943 sed '10a\
4944... rest of stderr output deleted ...
4945 10q' conftest.err >conftest.er1
4946 cat conftest.er1 >&5
4947 fi
4948 rm -f conftest.er1 conftest.err
4949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4950 test $ac_status = 0; }
4951done
4952
4953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4954/* end confdefs.h. */
4955
4956int
4957main ()
4958{
4959
4960 ;
4961 return 0;
4962}
4963_ACEOF
4964ac_clean_files_save=$ac_clean_files
4965ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4966# Try to create an executable without -o first, disregard a.out.
4967# It will help us diagnose broken compilers, and finding out an intuition
4968# of exeext.
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4970$as_echo_n "checking whether the C compiler works... " >&6; }
4971ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4972
4973# The possible output files:
4974ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4975
4976ac_rmfiles=
4977for ac_file in $ac_files
4978do
4979 case $ac_file in
4980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4981 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4982 esac
4983done
4984rm -f $ac_rmfiles
4985
4986if { { ac_try="$ac_link_default"
4987case "(($ac_try" in
4988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4989 *) ac_try_echo=$ac_try;;
4990esac
4991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4992$as_echo "$ac_try_echo"; } >&5
4993 (eval "$ac_link_default") 2>&5
4994 ac_status=$?
4995 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4996 test $ac_status = 0; }; then :
4997 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4998# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4999# in a Makefile. We should not override ac_cv_exeext if it was cached,
5000# so that the user can short-circuit this test for compilers unknown to
5001# Autoconf.
5002for ac_file in $ac_files ''
5003do
5004 test -f "$ac_file" || continue
5005 case $ac_file in
5006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5007 ;;
5008 [ab].out )
5009 # We found the default executable, but exeext='' is most
5010 # certainly right.
5011 break;;
5012 *.* )
5013 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5014 then :; else
5015 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5016 fi
5017 # We set ac_cv_exeext here because the later test for it is not
5018 # safe: cross compilers may not add the suffix if given an `-o'
5019 # argument, so we may need to know it at that point already.
5020 # Even if this section looks crufty: it has the advantage of
5021 # actually working.
5022 break;;
5023 * )
5024 break;;
5025 esac
5026done
5027test "$ac_cv_exeext" = no && ac_cv_exeext=
5028
5029else
5030 ac_file=''
5031fi
5032if test -z "$ac_file"; then :
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034$as_echo "no" >&6; }
5035$as_echo "$as_me: failed program was:" >&5
5036sed 's/^/| /' conftest.$ac_ext >&5
5037
5038{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5040{ as_fn_set_status 77
5041as_fn_error "C compiler cannot create executables
5042See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5043else
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5045$as_echo "yes" >&6; }
5046fi
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5048$as_echo_n "checking for C compiler default output file name... " >&6; }
5049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5050$as_echo "$ac_file" >&6; }
5051ac_exeext=$ac_cv_exeext
5052
5053rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5054ac_clean_files=$ac_clean_files_save
5055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5056$as_echo_n "checking for suffix of executables... " >&6; }
5057if { { ac_try="$ac_link"
5058case "(($ac_try" in
5059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5060 *) ac_try_echo=$ac_try;;
5061esac
5062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5063$as_echo "$ac_try_echo"; } >&5
5064 (eval "$ac_link") 2>&5
5065 ac_status=$?
5066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5067 test $ac_status = 0; }; then :
5068 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5069# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5070# work properly (i.e., refer to `conftest.exe'), while it won't with
5071# `rm'.
5072for ac_file in conftest.exe conftest conftest.*; do
5073 test -f "$ac_file" || continue
5074 case $ac_file in
5075 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5076 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5077 break;;
5078 * ) break;;
5079 esac
5080done
5081else
5082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5084as_fn_error "cannot compute suffix of executables: cannot compile and link
5085See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5086fi
5087rm -f conftest conftest$ac_cv_exeext
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5089$as_echo "$ac_cv_exeext" >&6; }
5090
5091rm -f conftest.$ac_ext
5092EXEEXT=$ac_cv_exeext
5093ac_exeext=$EXEEXT
5094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5095/* end confdefs.h. */
5096#include <stdio.h>
5097int
5098main ()
5099{
5100FILE *f = fopen ("conftest.out", "w");
5101 return ferror (f) || fclose (f) != 0;
5102
5103 ;
5104 return 0;
5105}
5106_ACEOF
5107ac_clean_files="$ac_clean_files conftest.out"
5108# Check that the compiler produces executables we can run. If not, either
5109# the compiler is broken, or we cross compile.
5110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5111$as_echo_n "checking whether we are cross compiling... " >&6; }
5112if test "$cross_compiling" != yes; then
5113 { { ac_try="$ac_link"
5114case "(($ac_try" in
5115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116 *) ac_try_echo=$ac_try;;
5117esac
5118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5119$as_echo "$ac_try_echo"; } >&5
5120 (eval "$ac_link") 2>&5
5121 ac_status=$?
5122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5123 test $ac_status = 0; }
5124 if { ac_try='./conftest$ac_cv_exeext'
5125 { { case "(($ac_try" in
5126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127 *) ac_try_echo=$ac_try;;
5128esac
5129eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5130$as_echo "$ac_try_echo"; } >&5
5131 (eval "$ac_try") 2>&5
5132 ac_status=$?
5133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5134 test $ac_status = 0; }; }; then
5135 cross_compiling=no
5136 else
5137 if test "$cross_compiling" = maybe; then
5138 cross_compiling=yes
5139 else
5140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5142as_fn_error "cannot run C compiled programs.
067d23c9 5143If you meant to cross compile, use \`--host'.
a9bec17c 5144See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5145 fi
5146 fi
5147fi
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5149$as_echo "$cross_compiling" >&6; }
5150
5151rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5152ac_clean_files=$ac_clean_files_save
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5154$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5155if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5156 $as_echo_n "(cached) " >&6
5157else
5158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5159/* end confdefs.h. */
5160
5161int
5162main ()
5163{
5164
5165 ;
5166 return 0;
5167}
5168_ACEOF
5169rm -f conftest.o conftest.obj
5170if { { ac_try="$ac_compile"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
5175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5176$as_echo "$ac_try_echo"; } >&5
5177 (eval "$ac_compile") 2>&5
5178 ac_status=$?
5179 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5180 test $ac_status = 0; }; then :
5181 for ac_file in conftest.o conftest.obj conftest.*; do
5182 test -f "$ac_file" || continue;
5183 case $ac_file in
5184 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5185 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5186 break;;
5187 esac
5188done
5189else
5190 $as_echo "$as_me: failed program was:" >&5
5191sed 's/^/| /' conftest.$ac_ext >&5
5192
5193{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5195as_fn_error "cannot compute suffix of object files: cannot compile
5196See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5197fi
5198rm -f conftest.$ac_cv_objext conftest.$ac_ext
5199fi
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5201$as_echo "$ac_cv_objext" >&6; }
5202OBJEXT=$ac_cv_objext
5203ac_objext=$OBJEXT
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5205$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5206if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5207 $as_echo_n "(cached) " >&6
5208else
5209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5210/* end confdefs.h. */
5211
5212int
5213main ()
5214{
5215#ifndef __GNUC__
5216 choke me
5217#endif
5218
5219 ;
5220 return 0;
5221}
5222_ACEOF
5223if ac_fn_c_try_compile "$LINENO"; then :
5224 ac_compiler_gnu=yes
5225else
5226 ac_compiler_gnu=no
5227fi
5228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5229ac_cv_c_compiler_gnu=$ac_compiler_gnu
5230
5231fi
5232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5233$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5234if test $ac_compiler_gnu = yes; then
5235 GCC=yes
5236else
5237 GCC=
5238fi
5239ac_test_CFLAGS=${CFLAGS+set}
5240ac_save_CFLAGS=$CFLAGS
5241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5242$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5243if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5244 $as_echo_n "(cached) " >&6
5245else
5246 ac_save_c_werror_flag=$ac_c_werror_flag
5247 ac_c_werror_flag=yes
5248 ac_cv_prog_cc_g=no
5249 CFLAGS="-g"
5250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5251/* end confdefs.h. */
5252
5253int
5254main ()
5255{
5256
5257 ;
5258 return 0;
5259}
5260_ACEOF
5261if ac_fn_c_try_compile "$LINENO"; then :
5262 ac_cv_prog_cc_g=yes
5263else
5264 CFLAGS=""
5265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266/* end confdefs.h. */
5267
5268int
5269main ()
5270{
5271
5272 ;
5273 return 0;
5274}
5275_ACEOF
5276if ac_fn_c_try_compile "$LINENO"; then :
5277
5278else
5279 ac_c_werror_flag=$ac_save_c_werror_flag
5280 CFLAGS="-g"
5281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5282/* end confdefs.h. */
5283
5284int
5285main ()
5286{
5287
5288 ;
5289 return 0;
5290}
5291_ACEOF
5292if ac_fn_c_try_compile "$LINENO"; then :
5293 ac_cv_prog_cc_g=yes
5294fi
5295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5296fi
5297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5298fi
5299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5300 ac_c_werror_flag=$ac_save_c_werror_flag
5301fi
5302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5303$as_echo "$ac_cv_prog_cc_g" >&6; }
5304if test "$ac_test_CFLAGS" = set; then
5305 CFLAGS=$ac_save_CFLAGS
5306elif test $ac_cv_prog_cc_g = yes; then
5307 if test "$GCC" = yes; then
5308 CFLAGS="-g -O2"
5309 else
5310 CFLAGS="-g"
5311 fi
5312else
5313 if test "$GCC" = yes; then
5314 CFLAGS="-O2"
5315 else
5316 CFLAGS=
5317 fi
5318fi
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5320$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5321if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5322 $as_echo_n "(cached) " >&6
5323else
5324 ac_cv_prog_cc_c89=no
5325ac_save_CC=$CC
5326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327/* end confdefs.h. */
5328#include <stdarg.h>
5329#include <stdio.h>
5330#include <sys/types.h>
5331#include <sys/stat.h>
5332/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5333struct buf { int x; };
5334FILE * (*rcsopen) (struct buf *, struct stat *, int);
5335static char *e (p, i)
5336 char **p;
5337 int i;
5338{
5339 return p[i];
5340}
5341static char *f (char * (*g) (char **, int), char **p, ...)
5342{
5343 char *s;
5344 va_list v;
5345 va_start (v,p);
5346 s = g (p, va_arg (v,int));
5347 va_end (v);
5348 return s;
5349}
5350
5351/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5352 function prototypes and stuff, but not '\xHH' hex character constants.
5353 These don't provoke an error unfortunately, instead are silently treated
5354 as 'x'. The following induces an error, until -std is added to get
5355 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5356 array size at least. It's necessary to write '\x00'==0 to get something
5357 that's true only with -std. */
5358int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5359
5360/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5361 inside strings and character constants. */
5362#define FOO(x) 'x'
5363int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5364
5365int test (int i, double x);
5366struct s1 {int (*f) (int a);};
5367struct s2 {int (*f) (double a);};
5368int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5369int argc;
5370char **argv;
5371int
5372main ()
5373{
5374return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5375 ;
5376 return 0;
5377}
5378_ACEOF
5379for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5380 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5381do
5382 CC="$ac_save_CC $ac_arg"
5383 if ac_fn_c_try_compile "$LINENO"; then :
5384 ac_cv_prog_cc_c89=$ac_arg
5385fi
5386rm -f core conftest.err conftest.$ac_objext
5387 test "x$ac_cv_prog_cc_c89" != "xno" && break
5388done
743c80a7
PE
5389rm -f conftest.$ac_ext
5390CC=$ac_save_CC
5391
5392fi
5393# AC_CACHE_VAL
5394case "x$ac_cv_prog_cc_c89" in
5395 x)
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5397$as_echo "none needed" >&6; } ;;
5398 xno)
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5400$as_echo "unsupported" >&6; } ;;
5401 *)
5402 CC="$CC $ac_cv_prog_cc_c89"
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5404$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5405esac
5406if test "x$ac_cv_prog_cc_c89" != xno; then :
5407
5408fi
5409
5410ac_ext=c
5411ac_cpp='$CPP $CPPFLAGS'
5412ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5413ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5414ac_compiler_gnu=$ac_cv_c_compiler_gnu
5415DEPDIR="${am__leading_dot}deps"
5416
5417ac_config_commands="$ac_config_commands depfiles"
5418
5419
5420am_make=${MAKE-make}
5421cat > confinc << 'END'
5422am__doit:
5423 @echo this is the am__doit target
5424.PHONY: am__doit
5425END
5426# If we don't find an include directive, just comment out the code.
5427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5428$as_echo_n "checking for style of include used by $am_make... " >&6; }
5429am__include="#"
5430am__quote=
5431_am_result=none
5432# First try GNU make style include.
5433echo "include confinc" > confmf
5434# Ignore all kinds of additional output from `make'.
5435case `$am_make -s -f confmf 2> /dev/null` in #(
5436*the\ am__doit\ target*)
5437 am__include=include
5438 am__quote=
5439 _am_result=GNU
5440 ;;
5441esac
5442# Now try BSD make style include.
5443if test "$am__include" = "#"; then
5444 echo '.include "confinc"' > confmf
5445 case `$am_make -s -f confmf 2> /dev/null` in #(
5446 *the\ am__doit\ target*)
5447 am__include=.include
5448 am__quote="\""
5449 _am_result=BSD
5450 ;;
5451 esac
5452fi
5453
5454
5455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5456$as_echo "$_am_result" >&6; }
5457rm -f confinc confmf
5458
5459# Check whether --enable-dependency-tracking was given.
5460if test "${enable_dependency_tracking+set}" = set; then :
5461 enableval=$enable_dependency_tracking;
5462fi
5463
5464if test "x$enable_dependency_tracking" != xno; then
5465 am_depcomp="$ac_aux_dir/depcomp"
5466 AMDEPBACKSLASH='\'
5467fi
5468 if test "x$enable_dependency_tracking" != xno; then
5469 AMDEP_TRUE=
5470 AMDEP_FALSE='#'
5471else
5472 AMDEP_TRUE='#'
5473 AMDEP_FALSE=
5474fi
5475
5476
5477
5478depcc="$CC" am_compiler_list=
5479
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5481$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5482if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5483 $as_echo_n "(cached) " >&6
5484else
5485 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5486 # We make a subdir and do the tests there. Otherwise we can end up
5487 # making bogus files that we don't know about and never remove. For
5488 # instance it was reported that on HP-UX the gcc test will end up
5489 # making a dummy file named `D' -- because `-MD' means `put the output
5490 # in D'.
5491 mkdir conftest.dir
5492 # Copy depcomp to subdir because otherwise we won't find it if we're
5493 # using a relative directory.
5494 cp "$am_depcomp" conftest.dir
5495 cd conftest.dir
5496 # We will build objects and dependencies in a subdirectory because
5497 # it helps to detect inapplicable dependency modes. For instance
5498 # both Tru64's cc and ICC support -MD to output dependencies as a
5499 # side effect of compilation, but ICC will put the dependencies in
5500 # the current directory while Tru64 will put them in the object
5501 # directory.
5502 mkdir sub
5503
5504 am_cv_CC_dependencies_compiler_type=none
5505 if test "$am_compiler_list" = ""; then
5506 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5507 fi
5508 am__universal=false
5509 case " $depcc " in #(
5510 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5511 esac
5512
5513 for depmode in $am_compiler_list; do
5514 # Setup a source with many dependencies, because some compilers
5515 # like to wrap large dependency lists on column 80 (with \), and
5516 # we should not choose a depcomp mode which is confused by this.
5517 #
5518 # We need to recreate these files for each test, as the compiler may
5519 # overwrite some of them when testing with obscure command lines.
5520 # This happens at least with the AIX C compiler.
5521 : > sub/conftest.c
5522 for i in 1 2 3 4 5 6; do
5523 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5524 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5525 # Solaris 8's {/usr,}/bin/sh.
5526 touch sub/conftst$i.h
5527 done
5528 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5529
5530 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5531 # mode. It turns out that the SunPro C++ compiler does not properly
5532 # handle `-M -o', and we need to detect this. Also, some Intel
5533 # versions had trouble with output in subdirs
5534 am__obj=sub/conftest.${OBJEXT-o}
5535 am__minus_obj="-o $am__obj"
5536 case $depmode in
5537 gcc)
5538 # This depmode causes a compiler race in universal mode.
5539 test "$am__universal" = false || continue
5540 ;;
5541 nosideeffect)
5542 # after this tag, mechanisms are not by side-effect, so they'll
5543 # only be used when explicitly requested
5544 if test "x$enable_dependency_tracking" = xyes; then
5545 continue
5546 else
5547 break
5548 fi
5549 ;;
5550 msvisualcpp | msvcmsys)
5551 # This compiler won't grok `-c -o', but also, the minuso test has
5552 # not run yet. These depmodes are late enough in the game, and
5553 # so weak that their functioning should not be impacted.
5554 am__obj=conftest.${OBJEXT-o}
5555 am__minus_obj=
5556 ;;
5557 none) break ;;
5558 esac
5559 if depmode=$depmode \
5560 source=sub/conftest.c object=$am__obj \
5561 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5562 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5563 >/dev/null 2>conftest.err &&
5564 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5565 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5566 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5567 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5568 # icc doesn't choke on unknown options, it will just issue warnings
5569 # or remarks (even with -Werror). So we grep stderr for any message
5570 # that says an option was ignored or not supported.
5571 # When given -MP, icc 7.0 and 7.1 complain thusly:
5572 # icc: Command line warning: ignoring option '-M'; no argument required
5573 # The diagnosis changed in icc 8.0:
5574 # icc: Command line remark: option '-MP' not supported
5575 if (grep 'ignoring option' conftest.err ||
5576 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5577 am_cv_CC_dependencies_compiler_type=$depmode
5578 break
5579 fi
5580 fi
5581 done
5582
5583 cd ..
5584 rm -rf conftest.dir
5585else
5586 am_cv_CC_dependencies_compiler_type=none
5587fi
5588
5589fi
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5591$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5592CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5593
5594 if
5595 test "x$enable_dependency_tracking" != xno \
5596 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5597 am__fastdepCC_TRUE=
5598 am__fastdepCC_FALSE='#'
5599else
5600 am__fastdepCC_TRUE='#'
5601 am__fastdepCC_FALSE=
5602fi
5603
5604
5605if test "x$CC" != xcc; then
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5607$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5608else
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5610$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5611fi
5612set dummy $CC; ac_cc=`$as_echo "$2" |
5613 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5614if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5615 $as_echo_n "(cached) " >&6
5616else
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618/* end confdefs.h. */
5619
5620int
5621main ()
5622{
5623
5624 ;
5625 return 0;
5626}
5627_ACEOF
5628# Make sure it works both with $CC and with simple cc.
5629# We do the test twice because some compilers refuse to overwrite an
5630# existing .o file with -o, though they will create one.
5631ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5632rm -f conftest2.*
5633if { { case "(($ac_try" in
5634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5635 *) ac_try_echo=$ac_try;;
5636esac
5637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5638$as_echo "$ac_try_echo"; } >&5
5639 (eval "$ac_try") 2>&5
5640 ac_status=$?
5641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5642 test $ac_status = 0; } &&
5643 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5645 *) ac_try_echo=$ac_try;;
5646esac
5647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5648$as_echo "$ac_try_echo"; } >&5
5649 (eval "$ac_try") 2>&5
5650 ac_status=$?
5651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5652 test $ac_status = 0; };
5653then
5654 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5655 if test "x$CC" != xcc; then
5656 # Test first that cc exists at all.
5657 if { ac_try='cc -c conftest.$ac_ext >&5'
5658 { { case "(($ac_try" in
5659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5660 *) ac_try_echo=$ac_try;;
5661esac
5662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5663$as_echo "$ac_try_echo"; } >&5
5664 (eval "$ac_try") 2>&5
5665 ac_status=$?
5666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5667 test $ac_status = 0; }; }; then
5668 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5669 rm -f conftest2.*
5670 if { { case "(($ac_try" in
5671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5672 *) ac_try_echo=$ac_try;;
5673esac
5674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5675$as_echo "$ac_try_echo"; } >&5
5676 (eval "$ac_try") 2>&5
5677 ac_status=$?
5678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5679 test $ac_status = 0; } &&
5680 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5682 *) ac_try_echo=$ac_try;;
5683esac
5684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5685$as_echo "$ac_try_echo"; } >&5
5686 (eval "$ac_try") 2>&5
5687 ac_status=$?
5688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5689 test $ac_status = 0; };
5690 then
5691 # cc works too.
5692 :
5693 else
5694 # cc exists but doesn't like -o.
5695 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5696 fi
5697 fi
5698 fi
5699else
5700 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5701fi
5702rm -f core conftest*
5703
5704fi
5705if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5707$as_echo "yes" >&6; }
5708else
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
5711
5712$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5713
5714fi
5715
5716# FIXME: we rely on the cache variable name because
5717# there is no other way.
5718set dummy $CC
5719am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5720eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5721if test "$am_t" != yes; then
5722 # Losing compiler, so override with the script.
5723 # FIXME: It is wrong to rewrite CC.
5724 # But if we don't then we get into trouble of one sort or another.
5725 # A longer-term fix would be to have automake use am__CC in this case,
5726 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5727 CC="$am_aux_dir/compile $CC"
5728fi
5729
5730
5731
5ec54608
GM
5732if test x$GCC = xyes; then
5733 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5734else
5735 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5736fi
5737
5738# Initialize gnulib right after choosing the compiler.
743c80a7 5739
067d23c9
KY
5740ac_ext=c
5741ac_cpp='$CPP $CPPFLAGS'
5742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5744ac_compiler_gnu=$ac_cv_c_compiler_gnu
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5746$as_echo_n "checking how to run the C preprocessor... " >&6; }
5747# On Suns, sometimes $CPP names a directory.
5748if test -n "$CPP" && test -d "$CPP"; then
5749 CPP=
5750fi
5751if test -z "$CPP"; then
a9bec17c 5752 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5753 $as_echo_n "(cached) " >&6
5754else
5755 # Double quotes because CPP needs to be expanded
5756 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5757 do
5758 ac_preproc_ok=false
5759for ac_c_preproc_warn_flag in '' yes
5760do
5761 # Use a header file that comes with gcc, so configuring glibc
5762 # with a fresh cross-compiler works.
5763 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5764 # <limits.h> exists even on freestanding compilers.
5765 # On the NeXT, cc -E runs the code through the compiler's parser,
5766 # not just through cpp. "Syntax error" is here to catch this case.
5767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5768/* end confdefs.h. */
5769#ifdef __STDC__
5770# include <limits.h>
5771#else
5772# include <assert.h>
5773#endif
5774 Syntax error
5775_ACEOF
5776if ac_fn_c_try_cpp "$LINENO"; then :
5777
5778else
5779 # Broken: fails on valid input.
5780continue
5781fi
a9bec17c 5782rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5783
5784 # OK, works on sane cases. Now check whether nonexistent headers
5785 # can be detected and how.
5786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5787/* end confdefs.h. */
5788#include <ac_nonexistent.h>
5789_ACEOF
5790if ac_fn_c_try_cpp "$LINENO"; then :
5791 # Broken: success on invalid input.
5792continue
5793else
5794 # Passes both tests.
5795ac_preproc_ok=:
5796break
5797fi
a9bec17c 5798rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5799
5800done
5801# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5802rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5803if $ac_preproc_ok; then :
5804 break
5805fi
5806
5807 done
5808 ac_cv_prog_CPP=$CPP
5809
5810fi
5811 CPP=$ac_cv_prog_CPP
5812else
5813 ac_cv_prog_CPP=$CPP
5814fi
5815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5816$as_echo "$CPP" >&6; }
5817ac_preproc_ok=false
5818for ac_c_preproc_warn_flag in '' yes
5819do
5820 # Use a header file that comes with gcc, so configuring glibc
5821 # with a fresh cross-compiler works.
5822 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5823 # <limits.h> exists even on freestanding compilers.
5824 # On the NeXT, cc -E runs the code through the compiler's parser,
5825 # not just through cpp. "Syntax error" is here to catch this case.
5826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5827/* end confdefs.h. */
5828#ifdef __STDC__
5829# include <limits.h>
5830#else
5831# include <assert.h>
5832#endif
5833 Syntax error
5834_ACEOF
5835if ac_fn_c_try_cpp "$LINENO"; then :
5836
5837else
5838 # Broken: fails on valid input.
5839continue
5840fi
a9bec17c 5841rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5842
5843 # OK, works on sane cases. Now check whether nonexistent headers
5844 # can be detected and how.
5845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5846/* end confdefs.h. */
5847#include <ac_nonexistent.h>
5848_ACEOF
5849if ac_fn_c_try_cpp "$LINENO"; then :
5850 # Broken: success on invalid input.
5851continue
5852else
5853 # Passes both tests.
5854ac_preproc_ok=:
5855break
5856fi
a9bec17c 5857rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5858
5859done
5860# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5861rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5862if $ac_preproc_ok; then :
5863
5864else
5865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5867as_fn_error "C preprocessor \"$CPP\" fails sanity check
5868See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5869fi
5870
5871ac_ext=c
5872ac_cpp='$CPP $CPPFLAGS'
5873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5875ac_compiler_gnu=$ac_cv_c_compiler_gnu
5876
5877
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5879$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 5880if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
5881 $as_echo_n "(cached) " >&6
5882else
5883 if test -z "$GREP"; then
5884 ac_path_GREP_found=false
5885 # Loop through the user's path and test for each of PROGNAME-LIST
5886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5887for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5888do
5889 IFS=$as_save_IFS
5890 test -z "$as_dir" && as_dir=.
5891 for ac_prog in grep ggrep; do
5892 for ac_exec_ext in '' $ac_executable_extensions; do
5893 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5894 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5895# Check for GNU ac_path_GREP and select it if it is found.
5896 # Check for GNU $ac_path_GREP
5897case `"$ac_path_GREP" --version 2>&1` in
5898*GNU*)
5899 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5900*)
5901 ac_count=0
5902 $as_echo_n 0123456789 >"conftest.in"
5903 while :
5904 do
5905 cat "conftest.in" "conftest.in" >"conftest.tmp"
5906 mv "conftest.tmp" "conftest.in"
5907 cp "conftest.in" "conftest.nl"
5908 $as_echo 'GREP' >> "conftest.nl"
5909 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5910 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5911 as_fn_arith $ac_count + 1 && ac_count=$as_val
5912 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5913 # Best one so far, save it but keep looking for a better one
5914 ac_cv_path_GREP="$ac_path_GREP"
5915 ac_path_GREP_max=$ac_count
5916 fi
5917 # 10*(2^10) chars as input seems more than enough
5918 test $ac_count -gt 10 && break
5919 done
5920 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5921esac
5922
5923 $ac_path_GREP_found && break 3
5924 done
5925 done
5926 done
5927IFS=$as_save_IFS
5928 if test -z "$ac_cv_path_GREP"; then
a9bec17c 5929 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
5930 fi
5931else
5932 ac_cv_path_GREP=$GREP
5933fi
5934
5935fi
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5937$as_echo "$ac_cv_path_GREP" >&6; }
5938 GREP="$ac_cv_path_GREP"
5939
5940
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5942$as_echo_n "checking for egrep... " >&6; }
a9bec17c 5943if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
5944 $as_echo_n "(cached) " >&6
5945else
5946 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5947 then ac_cv_path_EGREP="$GREP -E"
5948 else
5949 if test -z "$EGREP"; then
5950 ac_path_EGREP_found=false
5951 # Loop through the user's path and test for each of PROGNAME-LIST
5952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
5957 for ac_prog in egrep; do
5958 for ac_exec_ext in '' $ac_executable_extensions; do
5959 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5960 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5961# Check for GNU ac_path_EGREP and select it if it is found.
5962 # Check for GNU $ac_path_EGREP
5963case `"$ac_path_EGREP" --version 2>&1` in
5964*GNU*)
5965 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5966*)
5967 ac_count=0
5968 $as_echo_n 0123456789 >"conftest.in"
5969 while :
5970 do
5971 cat "conftest.in" "conftest.in" >"conftest.tmp"
5972 mv "conftest.tmp" "conftest.in"
5973 cp "conftest.in" "conftest.nl"
5974 $as_echo 'EGREP' >> "conftest.nl"
5975 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5976 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5977 as_fn_arith $ac_count + 1 && ac_count=$as_val
5978 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5979 # Best one so far, save it but keep looking for a better one
5980 ac_cv_path_EGREP="$ac_path_EGREP"
5981 ac_path_EGREP_max=$ac_count
5982 fi
5983 # 10*(2^10) chars as input seems more than enough
5984 test $ac_count -gt 10 && break
5985 done
5986 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5987esac
5988
5989 $ac_path_EGREP_found && break 3
5990 done
5991 done
5992 done
5993IFS=$as_save_IFS
5994 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 5995 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
5996 fi
5997else
5998 ac_cv_path_EGREP=$EGREP
5999fi
6000
6001 fi
6002fi
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6004$as_echo "$ac_cv_path_EGREP" >&6; }
6005 EGREP="$ac_cv_path_EGREP"
6006
6007
369e19fc
PE
6008
6009
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6011$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6012if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6013 $as_echo_n "(cached) " >&6
6014else
6015
6016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6017/* end confdefs.h. */
6018
6019#ifdef __ACK__
6020Amsterdam
6021#endif
6022
6023_ACEOF
6024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6025 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6026 gl_cv_c_amsterdam_compiler=yes
6027else
6028 gl_cv_c_amsterdam_compiler=no
6029fi
6030rm -f conftest*
6031
6032
6033fi
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6035$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6036 if test -z "$AR"; then
6037 if test $gl_cv_c_amsterdam_compiler = yes; then
6038 AR='cc -c.a'
6039 if test -z "$ARFLAGS"; then
6040 ARFLAGS='-o'
6041 fi
6042 else
6043 if test -n "$ac_tool_prefix"; then
6044 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6045set dummy ${ac_tool_prefix}ar; ac_word=$2
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6047$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6048if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6049 $as_echo_n "(cached) " >&6
6050else
6051 if test -n "$AR"; then
6052 ac_cv_prog_AR="$AR" # Let the user override the test.
6053else
6054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057 IFS=$as_save_IFS
6058 test -z "$as_dir" && as_dir=.
6059 for ac_exec_ext in '' $ac_executable_extensions; do
6060 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6061 ac_cv_prog_AR="${ac_tool_prefix}ar"
6062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063 break 2
6064 fi
6065done
6066 done
6067IFS=$as_save_IFS
6068
6069fi
6070fi
6071AR=$ac_cv_prog_AR
6072if test -n "$AR"; then
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6074$as_echo "$AR" >&6; }
6075else
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081fi
6082if test -z "$ac_cv_prog_AR"; then
6083 ac_ct_AR=$AR
6084 # Extract the first word of "ar", so it can be a program name with args.
6085set dummy ar; ac_word=$2
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6087$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6088if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6089 $as_echo_n "(cached) " >&6
6090else
6091 if test -n "$ac_ct_AR"; then
6092 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6093else
6094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095for as_dir in $PATH
6096do
6097 IFS=$as_save_IFS
6098 test -z "$as_dir" && as_dir=.
6099 for ac_exec_ext in '' $ac_executable_extensions; do
6100 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6101 ac_cv_prog_ac_ct_AR="ar"
6102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6103 break 2
6104 fi
6105done
6106 done
6107IFS=$as_save_IFS
6108
6109fi
6110fi
6111ac_ct_AR=$ac_cv_prog_ac_ct_AR
6112if test -n "$ac_ct_AR"; then
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6114$as_echo "$ac_ct_AR" >&6; }
6115else
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6117$as_echo "no" >&6; }
6118fi
6119
6120 if test "x$ac_ct_AR" = x; then
6121 AR="ar"
6122 else
6123 case $cross_compiling:$ac_tool_warned in
6124yes:)
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6127ac_tool_warned=yes ;;
6128esac
6129 AR=$ac_ct_AR
6130 fi
6131else
6132 AR="$ac_cv_prog_AR"
6133fi
6134
6135 if test -z "$ARFLAGS"; then
6136 ARFLAGS='cru'
6137 fi
6138 fi
6139 else
6140 if test -z "$ARFLAGS"; then
6141 ARFLAGS='cru'
6142 fi
6143 fi
6144
6145
6146 if test -z "$RANLIB"; then
6147 if test $gl_cv_c_amsterdam_compiler = yes; then
6148 RANLIB=':'
6149 else
6150 if test -n "$ac_tool_prefix"; then
6151 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6152set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6154$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6155if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6156 $as_echo_n "(cached) " >&6
6157else
6158 if test -n "$RANLIB"; then
6159 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6160else
6161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH
6163do
6164 IFS=$as_save_IFS
6165 test -z "$as_dir" && as_dir=.
6166 for ac_exec_ext in '' $ac_executable_extensions; do
6167 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6168 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6170 break 2
6171 fi
6172done
6173 done
6174IFS=$as_save_IFS
6175
6176fi
6177fi
6178RANLIB=$ac_cv_prog_RANLIB
6179if test -n "$RANLIB"; then
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6181$as_echo "$RANLIB" >&6; }
6182else
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184$as_echo "no" >&6; }
6185fi
6186
6187
6188fi
6189if test -z "$ac_cv_prog_RANLIB"; then
6190 ac_ct_RANLIB=$RANLIB
6191 # Extract the first word of "ranlib", so it can be a program name with args.
6192set dummy ranlib; ac_word=$2
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6194$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6195if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6196 $as_echo_n "(cached) " >&6
6197else
6198 if test -n "$ac_ct_RANLIB"; then
6199 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6200else
6201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204 IFS=$as_save_IFS
6205 test -z "$as_dir" && as_dir=.
6206 for ac_exec_ext in '' $ac_executable_extensions; do
6207 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6208 ac_cv_prog_ac_ct_RANLIB="ranlib"
6209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210 break 2
6211 fi
6212done
6213 done
6214IFS=$as_save_IFS
6215
6216fi
6217fi
6218ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6219if test -n "$ac_ct_RANLIB"; then
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6221$as_echo "$ac_ct_RANLIB" >&6; }
6222else
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224$as_echo "no" >&6; }
6225fi
6226
6227 if test "x$ac_ct_RANLIB" = x; then
6228 RANLIB=":"
6229 else
6230 case $cross_compiling:$ac_tool_warned in
6231yes:)
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6234ac_tool_warned=yes ;;
6235esac
6236 RANLIB=$ac_ct_RANLIB
6237 fi
6238else
6239 RANLIB="$ac_cv_prog_RANLIB"
6240fi
6241
6242 fi
6243 fi
6244
6245
067d23c9
KY
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6247$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6248if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6249 $as_echo_n "(cached) " >&6
6250else
6251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6252/* end confdefs.h. */
6253#include <stdlib.h>
6254#include <stdarg.h>
6255#include <string.h>
6256#include <float.h>
6257
6258int
6259main ()
6260{
6261
6262 ;
6263 return 0;
6264}
6265_ACEOF
6266if ac_fn_c_try_compile "$LINENO"; then :
6267 ac_cv_header_stdc=yes
6268else
6269 ac_cv_header_stdc=no
6270fi
6271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6272
6273if test $ac_cv_header_stdc = yes; then
6274 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6276/* end confdefs.h. */
6277#include <string.h>
6278
6279_ACEOF
6280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6281 $EGREP "memchr" >/dev/null 2>&1; then :
6282
6283else
6284 ac_cv_header_stdc=no
6285fi
6286rm -f conftest*
6287
6288fi
6289
6290if test $ac_cv_header_stdc = yes; then
6291 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6293/* end confdefs.h. */
6294#include <stdlib.h>
6295
6296_ACEOF
6297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6298 $EGREP "free" >/dev/null 2>&1; then :
6299
6300else
6301 ac_cv_header_stdc=no
6302fi
6303rm -f conftest*
6304
6305fi
6306
6307if test $ac_cv_header_stdc = yes; then
6308 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6309 if test "$cross_compiling" = yes; then :
6310 :
6311else
6312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6313/* end confdefs.h. */
6314#include <ctype.h>
6315#include <stdlib.h>
6316#if ((' ' & 0x0FF) == 0x020)
6317# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6318# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6319#else
6320# define ISLOWER(c) \
6321 (('a' <= (c) && (c) <= 'i') \
6322 || ('j' <= (c) && (c) <= 'r') \
6323 || ('s' <= (c) && (c) <= 'z'))
6324# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6325#endif
6326
6327#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6328int
6329main ()
6330{
6331 int i;
6332 for (i = 0; i < 256; i++)
6333 if (XOR (islower (i), ISLOWER (i))
6334 || toupper (i) != TOUPPER (i))
6335 return 2;
6336 return 0;
6337}
6338_ACEOF
6339if ac_fn_c_try_run "$LINENO"; then :
6340
6341else
6342 ac_cv_header_stdc=no
6343fi
6344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6345 conftest.$ac_objext conftest.beam conftest.$ac_ext
6346fi
6347
6348fi
6349fi
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6351$as_echo "$ac_cv_header_stdc" >&6; }
6352if test $ac_cv_header_stdc = yes; then
6353
6354$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6355
6356fi
6357
6358# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6359for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6360 inttypes.h stdint.h unistd.h
6361do :
6362 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6363ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6364"
a9bec17c
GM
6365eval as_val=\$$as_ac_Header
6366 if test "x$as_val" = x""yes; then :
067d23c9
KY
6367 cat >>confdefs.h <<_ACEOF
6368#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6369_ACEOF
6370
6371fi
6372
6373done
6374
6375
6376
1fd182f0
PE
6377
6378
067d23c9 6379 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6380if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6381 MINIX=yes
6382else
6383 MINIX=
6384fi
6385
6386
6387 if test "$MINIX" = yes; then
6388
6389$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6390
6391
6392$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6393
6394
6395$as_echo "#define _MINIX 1" >>confdefs.h
6396
6397 fi
6398
1fd182f0
PE
6399 case "$host_os" in
6400 hpux*)
6401
6402$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6403
6404 ;;
6405 esac
6406
067d23c9
KY
6407
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6409$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6410if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6411 $as_echo_n "(cached) " >&6
6412else
6413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6414/* end confdefs.h. */
369e19fc
PE
6415
6416# define __EXTENSIONS__ 1
6417 $ac_includes_default
6418int
6419main ()
6420{
6421
6422 ;
6423 return 0;
6424}
6425_ACEOF
6426if ac_fn_c_try_compile "$LINENO"; then :
6427 ac_cv_safe_to_define___extensions__=yes
6428else
6429 ac_cv_safe_to_define___extensions__=no
6430fi
6431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6432fi
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6434$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6435 test $ac_cv_safe_to_define___extensions__ = yes &&
6436 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6437
6438 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6439
6440 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6441
6442 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6443
6444 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6445
6446 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6447
6448
6449
6450
6451
6452
6453
6454
6455# Check whether --enable-largefile was given.
6456if test "${enable_largefile+set}" = set; then :
6457 enableval=$enable_largefile;
6458fi
6459
6460if test "$enable_largefile" != no; then
6461
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6463$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6464if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6465 $as_echo_n "(cached) " >&6
6466else
6467 ac_cv_sys_largefile_CC=no
6468 if test "$GCC" != yes; then
6469 ac_save_CC=$CC
6470 while :; do
6471 # IRIX 6.2 and later do not support large files by default,
6472 # so use the C compiler's -n32 option if that helps.
6473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6474/* end confdefs.h. */
6475#include <sys/types.h>
6476 /* Check that off_t can represent 2**63 - 1 correctly.
6477 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6478 since some C++ compilers masquerading as C compilers
6479 incorrectly reject 9223372036854775807. */
6480#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6481 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6482 && LARGE_OFF_T % 2147483647 == 1)
6483 ? 1 : -1];
6484int
6485main ()
6486{
6487
6488 ;
6489 return 0;
6490}
6491_ACEOF
6492 if ac_fn_c_try_compile "$LINENO"; then :
6493 break
6494fi
6495rm -f core conftest.err conftest.$ac_objext
6496 CC="$CC -n32"
6497 if ac_fn_c_try_compile "$LINENO"; then :
6498 ac_cv_sys_largefile_CC=' -n32'; break
6499fi
6500rm -f core conftest.err conftest.$ac_objext
6501 break
6502 done
6503 CC=$ac_save_CC
6504 rm -f conftest.$ac_ext
6505 fi
6506fi
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6508$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6509 if test "$ac_cv_sys_largefile_CC" != no; then
6510 CC=$CC$ac_cv_sys_largefile_CC
6511 fi
6512
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6514$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6515if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6516 $as_echo_n "(cached) " >&6
6517else
6518 while :; do
6519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6520/* end confdefs.h. */
6521#include <sys/types.h>
6522 /* Check that off_t can represent 2**63 - 1 correctly.
6523 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6524 since some C++ compilers masquerading as C compilers
6525 incorrectly reject 9223372036854775807. */
6526#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6527 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6528 && LARGE_OFF_T % 2147483647 == 1)
6529 ? 1 : -1];
6530int
6531main ()
6532{
6533
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538if ac_fn_c_try_compile "$LINENO"; then :
6539 ac_cv_sys_file_offset_bits=no; break
6540fi
6541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6543/* end confdefs.h. */
6544#define _FILE_OFFSET_BITS 64
6545#include <sys/types.h>
6546 /* Check that off_t can represent 2**63 - 1 correctly.
6547 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6548 since some C++ compilers masquerading as C compilers
6549 incorrectly reject 9223372036854775807. */
6550#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6551 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6552 && LARGE_OFF_T % 2147483647 == 1)
6553 ? 1 : -1];
6554int
6555main ()
6556{
6557
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562if ac_fn_c_try_compile "$LINENO"; then :
6563 ac_cv_sys_file_offset_bits=64; break
6564fi
6565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6566 ac_cv_sys_file_offset_bits=unknown
6567 break
6568done
6569fi
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6571$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6572case $ac_cv_sys_file_offset_bits in #(
6573 no | unknown) ;;
6574 *)
6575cat >>confdefs.h <<_ACEOF
6576#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6577_ACEOF
6578;;
6579esac
6580rm -rf conftest*
6581 if test $ac_cv_sys_file_offset_bits = unknown; then
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6583$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6584if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6585 $as_echo_n "(cached) " >&6
6586else
6587 while :; do
6588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6589/* end confdefs.h. */
6590#include <sys/types.h>
6591 /* Check that off_t can represent 2**63 - 1 correctly.
6592 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6593 since some C++ compilers masquerading as C compilers
6594 incorrectly reject 9223372036854775807. */
6595#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6596 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6597 && LARGE_OFF_T % 2147483647 == 1)
6598 ? 1 : -1];
6599int
6600main ()
6601{
6602
6603 ;
6604 return 0;
6605}
6606_ACEOF
6607if ac_fn_c_try_compile "$LINENO"; then :
6608 ac_cv_sys_large_files=no; break
6609fi
6610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6612/* end confdefs.h. */
6613#define _LARGE_FILES 1
6614#include <sys/types.h>
6615 /* Check that off_t can represent 2**63 - 1 correctly.
6616 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6617 since some C++ compilers masquerading as C compilers
6618 incorrectly reject 9223372036854775807. */
6619#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6620 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6621 && LARGE_OFF_T % 2147483647 == 1)
6622 ? 1 : -1];
067d23c9
KY
6623int
6624main ()
6625{
6626
6627 ;
6628 return 0;
6629}
6630_ACEOF
6631if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6632 ac_cv_sys_large_files=1; break
067d23c9
KY
6633fi
6634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6635 ac_cv_sys_large_files=unknown
6636 break
6637done
067d23c9 6638fi
369e19fc
PE
6639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6640$as_echo "$ac_cv_sys_large_files" >&6; }
6641case $ac_cv_sys_large_files in #(
6642 no | unknown) ;;
6643 *)
6644cat >>confdefs.h <<_ACEOF
6645#define _LARGE_FILES $ac_cv_sys_large_files
6646_ACEOF
6647;;
6648esac
6649rm -rf conftest*
6650 fi
1fd182f0
PE
6651
6652
369e19fc 6653fi
1fd182f0 6654
6d153f56
GM
6655 case $ac_cv_prog_cc_stdc in #(
6656 no) :
6657 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6658 *) :
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6660$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6661if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6662 $as_echo_n "(cached) " >&6
6663else
6664 ac_cv_prog_cc_c99=no
6665ac_save_CC=$CC
6666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6667/* end confdefs.h. */
6668#include <stdarg.h>
6669#include <stdbool.h>
6670#include <stdlib.h>
6671#include <wchar.h>
6672#include <stdio.h>
6673
6674// Check varargs macros. These examples are taken from C99 6.10.3.5.
6675#define debug(...) fprintf (stderr, __VA_ARGS__)
6676#define showlist(...) puts (#__VA_ARGS__)
6677#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6678static void
6679test_varargs_macros (void)
6680{
6681 int x = 1234;
6682 int y = 5678;
6683 debug ("Flag");
6684 debug ("X = %d\n", x);
6685 showlist (The first, second, and third items.);
6686 report (x>y, "x is %d but y is %d", x, y);
6687}
6688
6689// Check long long types.
6690#define BIG64 18446744073709551615ull
6691#define BIG32 4294967295ul
6692#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6693#if !BIG_OK
6694 your preprocessor is broken;
6695#endif
6696#if BIG_OK
6697#else
6698 your preprocessor is broken;
6699#endif
6700static long long int bignum = -9223372036854775807LL;
6701static unsigned long long int ubignum = BIG64;
6702
6703struct incomplete_array
6704{
6705 int datasize;
6706 double data[];
6707};
6708
6709struct named_init {
6710 int number;
6711 const wchar_t *name;
6712 double average;
6713};
6714
6715typedef const char *ccp;
6716
6717static inline int
6718test_restrict (ccp restrict text)
6719{
6720 // See if C++-style comments work.
6721 // Iterate through items via the restricted pointer.
6722 // Also check for declarations in for loops.
6723 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6724 continue;
6725 return 0;
6726}
6727
6728// Check varargs and va_copy.
6729static void
6730test_varargs (const char *format, ...)
6731{
6732 va_list args;
6733 va_start (args, format);
6734 va_list args_copy;
6735 va_copy (args_copy, args);
6736
6737 const char *str;
6738 int number;
6739 float fnumber;
6740
6741 while (*format)
6742 {
6743 switch (*format++)
6744 {
6745 case 's': // string
6746 str = va_arg (args_copy, const char *);
6747 break;
6748 case 'd': // int
6749 number = va_arg (args_copy, int);
6750 break;
6751 case 'f': // float
6752 fnumber = va_arg (args_copy, double);
6753 break;
6754 default:
6755 break;
6756 }
6757 }
6758 va_end (args_copy);
6759 va_end (args);
6760}
6761
6762int
6763main ()
6764{
6765
6766 // Check bool.
6767 _Bool success = false;
6768
6769 // Check restrict.
6770 if (test_restrict ("String literal") == 0)
6771 success = true;
6772 char *restrict newvar = "Another string";
6773
6774 // Check varargs.
6775 test_varargs ("s, d' f .", "string", 65, 34.234);
6776 test_varargs_macros ();
6777
6778 // Check flexible array members.
6779 struct incomplete_array *ia =
6780 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6781 ia->datasize = 10;
6782 for (int i = 0; i < ia->datasize; ++i)
6783 ia->data[i] = i * 1.234;
6784
6785 // Check named initializers.
6786 struct named_init ni = {
6787 .number = 34,
6788 .name = L"Test wide string",
6789 .average = 543.34343,
6790 };
6791
6792 ni.number = 58;
6793
6794 int dynamic_array[ni.number];
6795 dynamic_array[ni.number - 1] = 543;
6796
6797 // work around unused variable warnings
6798 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6799 || dynamic_array[ni.number - 1] != 543);
6800
6801 ;
6802 return 0;
6803}
6804_ACEOF
6805for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6806do
6807 CC="$ac_save_CC $ac_arg"
6808 if ac_fn_c_try_compile "$LINENO"; then :
6809 ac_cv_prog_cc_c99=$ac_arg
6810fi
6811rm -f core conftest.err conftest.$ac_objext
6812 test "x$ac_cv_prog_cc_c99" != "xno" && break
6813done
6814rm -f conftest.$ac_ext
6815CC=$ac_save_CC
6816
6817fi
6818# AC_CACHE_VAL
6819case "x$ac_cv_prog_cc_c99" in
6820 x)
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6822$as_echo "none needed" >&6; } ;;
6823 xno)
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6825$as_echo "unsupported" >&6; } ;;
6826 *)
6827 CC="$CC $ac_cv_prog_cc_c99"
6828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6829$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6830esac
6831if test "x$ac_cv_prog_cc_c99" != xno; then :
6832 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6833else
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6835$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 6836if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
6837 $as_echo_n "(cached) " >&6
6838else
6839 ac_cv_prog_cc_c89=no
6840ac_save_CC=$CC
6841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6842/* end confdefs.h. */
6843#include <stdarg.h>
6844#include <stdio.h>
6845#include <sys/types.h>
6846#include <sys/stat.h>
6847/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6848struct buf { int x; };
6849FILE * (*rcsopen) (struct buf *, struct stat *, int);
6850static char *e (p, i)
6851 char **p;
6852 int i;
6853{
6854 return p[i];
6855}
6856static char *f (char * (*g) (char **, int), char **p, ...)
6857{
6858 char *s;
6859 va_list v;
6860 va_start (v,p);
6861 s = g (p, va_arg (v,int));
6862 va_end (v);
6863 return s;
6864}
6865
6866/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6867 function prototypes and stuff, but not '\xHH' hex character constants.
6868 These don't provoke an error unfortunately, instead are silently treated
6869 as 'x'. The following induces an error, until -std is added to get
6870 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6871 array size at least. It's necessary to write '\x00'==0 to get something
6872 that's true only with -std. */
6873int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6874
6875/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6876 inside strings and character constants. */
6877#define FOO(x) 'x'
6878int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6879
6880int test (int i, double x);
6881struct s1 {int (*f) (int a);};
6882struct s2 {int (*f) (double a);};
6883int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6884int argc;
6885char **argv;
6886int
6887main ()
6888{
6889return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6890 ;
6891 return 0;
6892}
6893_ACEOF
6894for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6895 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6896do
6897 CC="$ac_save_CC $ac_arg"
6898 if ac_fn_c_try_compile "$LINENO"; then :
6899 ac_cv_prog_cc_c89=$ac_arg
6900fi
6901rm -f core conftest.err conftest.$ac_objext
6902 test "x$ac_cv_prog_cc_c89" != "xno" && break
6903done
6904rm -f conftest.$ac_ext
6905CC=$ac_save_CC
6906
6907fi
6908# AC_CACHE_VAL
6909case "x$ac_cv_prog_cc_c89" in
6910 x)
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6912$as_echo "none needed" >&6; } ;;
6913 xno)
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6915$as_echo "unsupported" >&6; } ;;
6916 *)
6917 CC="$CC $ac_cv_prog_cc_c89"
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6919$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6920esac
6921if test "x$ac_cv_prog_cc_c89" != xno; then :
6922 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6923else
6924 ac_cv_prog_cc_stdc=no
6925fi
6926
6927fi
6928 ;;
6929esac
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6931$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 6932 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
6933 $as_echo_n "(cached) " >&6
6934fi
6935
6936 case $ac_cv_prog_cc_stdc in #(
6937 no) :
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6939$as_echo "unsupported" >&6; } ;; #(
6940 '') :
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6942$as_echo "none needed" >&6; } ;; #(
6943 *) :
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6945$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6946esac
6947
1fd182f0
PE
6948
6949
4fc2b746 6950 # Code from module alloca-opt:
8d8af66d 6951 # Code from module allocator:
938a4ef9
GM
6952 # Code from module c-ctype:
6953 # Code from module c-strcase:
6c051bab 6954 # Code from module careadlinkat:
f199cab1 6955 # Code from module clock-time:
942f733f 6956 # Code from module crypto/md5:
40e27e7f 6957 # Code from module crypto/sha1:
d87ffdb7
GM
6958 # Code from module crypto/sha256:
6959 # Code from module crypto/sha512:
36f13e16 6960 # Code from module dosname:
f737437b 6961 # Code from module dtoastr:
f199cab1 6962 # Code from module dtotimespec:
7d2a1c5e 6963 # Code from module dup2:
93131e11 6964 # Code from module environ:
8966cbff 6965 # Code from module execinfo:
1fd182f0
PE
6966 # Code from module extensions:
6967
7cd2ed2c 6968 # Code from module extern-inline:
5fa4ac76 6969 # Code from module filemode:
1f5d53eb 6970 # Code from module getloadavg:
e275c824
PE
6971 # Code from module getopt-gnu:
6972 # Code from module getopt-posix:
6973 # Code from module gettext-h:
f199cab1
GM
6974 # Code from module gettime:
6975 # Code from module gettimeofday:
67342916 6976 # Code from module ignore-value:
1fd182f0
PE
6977 # Code from module include_next:
6978 # Code from module intprops:
4fda9c95 6979 # Code from module inttypes-incomplete:
369e19fc
PE
6980 # Code from module largefile:
6981
ae0d7250 6982 # Code from module lstat:
ac1ca7e9 6983 # Code from module manywarnings:
1fd182f0
PE
6984 # Code from module mktime:
6985 # Code from module multiarch:
369e19fc 6986 # Code from module nocrash:
a0a61e58 6987 # Code from module pathmax:
f199cab1 6988 # Code from module pselect:
3e0be4ab 6989 # Code from module pthread_sigmask:
ae0d7250 6990 # Code from module readlink:
2b1928b8 6991 # Code from module signal-h:
369e19fc
PE
6992 # Code from module snippet/_Noreturn:
6993 # Code from module snippet/arg-nonnull:
6994 # Code from module snippet/c++defs:
6995 # Code from module snippet/warn-on-use:
6ad6792b 6996 # Code from module socklen:
6c051bab 6997 # Code from module ssize_t:
ae0d7250 6998 # Code from module stat:
f199cab1 6999 # Code from module stat-time:
0eb775a3 7000 # Code from module stdalign:
6d153f56
GM
7001 # Code from module stdarg:
7002
8c069cc7
GM
7003
7004
16c3e636 7005 # Code from module stdbool:
1fd182f0 7006 # Code from module stddef:
5f90be1b 7007 # Code from module stdint:
6ad6792b 7008 # Code from module stdio:
1f5d53eb 7009 # Code from module stdlib:
16c3e636 7010 # Code from module strftime:
3e0be4ab
GM
7011 # Code from module strtoimax:
7012 # Code from module strtoll:
4fda9c95
GM
7013 # Code from module strtoull:
7014 # Code from module strtoumax:
ae0d7250 7015 # Code from module symlink:
f199cab1 7016 # Code from module sys_select:
5fa4ac76 7017 # Code from module sys_stat:
f199cab1 7018 # Code from module sys_time:
1fd182f0
PE
7019 # Code from module time:
7020 # Code from module time_r:
f199cab1
GM
7021 # Code from module timespec:
7022 # Code from module timespec-add:
7023 # Code from module timespec-sub:
d87ffdb7 7024 # Code from module u64:
e275c824 7025 # Code from module unistd:
f199cab1 7026 # Code from module utimens:
4fda9c95 7027 # Code from module verify:
ac1ca7e9 7028 # Code from module warnings:
1fd182f0
PE
7029
7030
6bd1cda5
GM
7031# It's helpful to have C macros available to GDB, so prefer -g3 to -g
7032# if -g3 works and the user does not specify CFLAGS.
7033# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7034if test "$ac_test_CFLAGS" != set; then
7035 case $CFLAGS in
7036 '-g')
7037 emacs_g3_CFLAGS='-g3';;
7038 '-g -O2')
7039 emacs_g3_CFLAGS='-g3 -O2';;
7040 *)
7041 emacs_g3_CFLAGS='';;
7042 esac
7043 if test -n "$emacs_g3_CFLAGS"; then
7044 emacs_save_CFLAGS=$CFLAGS
7045 CFLAGS=$emacs_g3_CFLAGS
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7047$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7048if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7049 $as_echo_n "(cached) " >&6
7050else
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052/* end confdefs.h. */
7053
7054int
7055main ()
7056{
7057
7058 ;
7059 return 0;
7060}
7061_ACEOF
7062if ac_fn_c_try_link "$LINENO"; then :
7063 emacs_cv_prog_cc_g3=yes
7064else
7065 emacs_cv_prog_cc_g3=no
7066fi
7067rm -f core conftest.err conftest.$ac_objext \
7068 conftest$ac_exeext conftest.$ac_ext
7069fi
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7071$as_echo "$emacs_cv_prog_cc_g3" >&6; }
7072 if test $emacs_cv_prog_cc_g3 = yes; then
7073 CFLAGS=$emacs_g3_CFLAGS
7074 else
7075 CFLAGS=$emacs_save_CFLAGS
7076 fi
7077 fi
7078fi
7079
a6b92a4a
GM
7080# Check whether --enable-gcc-warnings was given.
7081if test "${enable_gcc_warnings+set}" = set; then :
7082 enableval=$enable_gcc_warnings; case $enableval in
7083 yes|no) ;;
7084 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7085 esac
7086 gl_gcc_warnings=$enableval
7087else
7088 gl_gcc_warnings=no
7089
7090fi
7091
7092
e4d35030
GM
7093# Check whether --enable-link-time-optimization was given.
7094if test "${enable_link_time_optimization+set}" = set; then :
7095 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7097$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7098 ac_lto_supported=no
7099 if test x$GCC = xyes; then
7100 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7101 if test x$CPUS != x; then
7102 LTO="-flto=$CPUS"
7103 else
7104 LTO="-flto"
7105 fi
7106 old_CFLAGS=$CFLAGS
7107 CFLAGS="$CFLAGS $LTO"
7108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7109/* end confdefs.h. */
7110
7111int
7112main ()
7113{
7114
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119if ac_fn_c_try_compile "$LINENO"; then :
7120 ac_lto_supported=yes
7121else
7122 ac_lto_supported=no
7123fi
7124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7125 CFLAGS="$old_CFLAGS"
7126 fi
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7128$as_echo "$ac_lto_supported" >&6; }
7129 if test "$ac_lto_supported" = "yes"; then
7130 CFLAGS="$CFLAGS $LTO"
7131 fi
7132fi
7133fi
7134
7135
a6b92a4a
GM
7136# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7137# ------------------------------------------------
7138# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7139# Otherwise, run RUN-IF-NOT-FOUND.
7140
7141
7142# When compiling with GCC, prefer -isystem to -I when including system
7143# include files, to avoid generating useless diagnostics for the files.
7144if test "$gl_gcc_warnings" != yes; then
7145 isystem='-I'
7146else
7147 isystem='-isystem '
7148
7149 # This, $nw, is the list of warnings we disable.
7150 nw=
7151
7152 case $with_x_toolkit in
7153 lucid | athena | motif)
7154 # Old toolkits mishandle 'const'.
7155 nw="$nw -Wwrite-strings"
7156 ;;
7157 *)
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7159$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7160if test "${gl_cv_warn_c__Werror+set}" = set; then :
7161 $as_echo_n "(cached) " >&6
7162else
7163
7164 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7165 as_fn_append CFLAGS " -Werror"
a6b92a4a 7166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7167/* end confdefs.h. */
7168
7169int
7170main ()
7171{
7172
7173 ;
7174 return 0;
7175}
7176_ACEOF
7177if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7178 gl_cv_warn_c__Werror=yes
067d23c9 7179else
a6b92a4a 7180 gl_cv_warn_c__Werror=no
067d23c9
KY
7181fi
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7183 CFLAGS="$gl_save_compiler_FLAGS"
7184
7185fi
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7187$as_echo "$gl_cv_warn_c__Werror" >&6; }
7188if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7189 as_fn_append WERROR_CFLAGS " -Werror"
7190fi
7191
0eb775a3 7192
a6b92a4a
GM
7193 ;;
7194 esac
7195
7196
7197 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7198 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7199 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7200 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7201 nw="$nw -Wtraditional" # Warns on #elif which we use often
7202 nw="$nw -Wcast-qual" # Too many warnings for now
7203 nw="$nw -Wconversion" # Too many warnings for now
7204 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7205 nw="$nw -Wsign-conversion" # Too many warnings for now
7206 nw="$nw -Woverlength-strings" # Not a problem these days
7207 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7208 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7209 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7210 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7211 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7212 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7213 nw="$nw -Wvla" # warnings in gettext.h
7214 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7215 nw="$nw -Wswitch-enum" # Too many warnings for now
7216 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7217 nw="$nw -Wfloat-equal" # warns about high-quality code
7218 nw="$nw -Winline" # OK to ignore 'inline'
7219 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7220 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7221
7222 # Emacs doesn't care about shadowing; see
7223 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7224 nw="$nw -Wshadow"
7225
7226 # The following lines should be removable at some point.
7227 nw="$nw -Wstack-protector"
7228 nw="$nw -Wstrict-overflow"
a6b92a4a
GM
7229 nw="$nw -Wsuggest-attribute=pure"
7230
7231
7232
7233 if test -n "$GCC"; then
7234
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7236$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7237 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7238 $as_echo_n "(cached) " >&6
7239else
7240
7241 gl_save_CFLAGS="$CFLAGS"
7242 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7244/* end confdefs.h. */
7245
7246int
7247main ()
7248{
7249
7250 ;
7251 return 0;
7252}
7253_ACEOF
7254if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7255 gl_cv_cc_nomfi_supported=yes
067d23c9 7256else
a6b92a4a 7257 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7258fi
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7260 CFLAGS="$gl_save_CFLAGS"
7261fi
7262
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7264$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7265
7266 if test "$gl_cv_cc_nomfi_supported" = yes; then
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7268$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7269 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7270 $as_echo_n "(cached) " >&6
7271else
7272
7273 gl_save_CFLAGS="$CFLAGS"
7274 CFLAGS="$CFLAGS -W -Werror"
7275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7276/* end confdefs.h. */
7277void f (void)
7278 {
7279 typedef struct { int a; int b; } s_t;
7280 s_t s1 = { 0, };
7281 }
7282
7283int
7284main ()
7285{
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291if ac_fn_c_try_compile "$LINENO"; then :
7292 gl_cv_cc_nomfi_needed=no
7293else
7294 gl_cv_cc_nomfi_needed=yes
7295fi
7296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7297 CFLAGS="$gl_save_CFLAGS"
7298
7299fi
7300
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7302$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7303 fi
7304 fi
7305
7306 gl_manywarn_set=
7307 for gl_manywarn_item in \
7308 -Wall \
7309 -W \
7310 -Wformat-y2k \
7311 -Wformat-nonliteral \
7312 -Wformat-security \
7313 -Winit-self \
7314 -Wmissing-include-dirs \
7315 -Wswitch-default \
7316 -Wswitch-enum \
7317 -Wunused \
7318 -Wunknown-pragmas \
7319 -Wstrict-aliasing \
7320 -Wstrict-overflow \
7321 -Wsystem-headers \
7322 -Wfloat-equal \
7323 -Wtraditional \
7324 -Wtraditional-conversion \
7325 -Wdeclaration-after-statement \
7326 -Wundef \
7327 -Wshadow \
7328 -Wunsafe-loop-optimizations \
7329 -Wpointer-arith \
7330 -Wbad-function-cast \
7331 -Wc++-compat \
7332 -Wcast-qual \
7333 -Wcast-align \
7334 -Wwrite-strings \
7335 -Wconversion \
7336 -Wsign-conversion \
7337 -Wlogical-op \
7338 -Waggregate-return \
7339 -Wstrict-prototypes \
7340 -Wold-style-definition \
7341 -Wmissing-prototypes \
7342 -Wmissing-declarations \
7343 -Wmissing-noreturn \
7344 -Wmissing-format-attribute \
7345 -Wpacked \
7346 -Wpadded \
7347 -Wredundant-decls \
7348 -Wnested-externs \
7349 -Wunreachable-code \
7350 -Winline \
7351 -Winvalid-pch \
7352 -Wlong-long \
7353 -Wvla \
7354 -Wvolatile-register-var \
7355 -Wdisabled-optimization \
7356 -Wstack-protector \
7357 -Woverlength-strings \
7358 -Wbuiltin-macro-redefined \
7359 -Wmudflap \
7360 -Wpacked-bitfield-compat \
7361 -Wsync-nand \
7362 ; do
7363 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7364 done
7365 # The following are not documented in the manual but are included in
7366 # output from gcc --help=warnings.
7367 for gl_manywarn_item in \
7368 -Wattributes \
7369 -Wcoverage-mismatch \
a6b92a4a
GM
7370 -Wunused-macros \
7371 ; do
7372 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7373 done
7374 # More warnings from gcc 4.6.2 --help=warnings.
7375 for gl_manywarn_item in \
7376 -Wabi \
7377 -Wcpp \
7378 -Wdeprecated \
7379 -Wdeprecated-declarations \
7380 -Wdiv-by-zero \
7381 -Wdouble-promotion \
7382 -Wendif-labels \
7383 -Wextra \
7384 -Wformat-contains-nul \
7385 -Wformat-extra-args \
7386 -Wformat-zero-length \
7387 -Wformat=2 \
7388 -Wmultichar \
7389 -Wnormalized=nfc \
7390 -Woverflow \
7391 -Wpointer-to-int-cast \
7392 -Wpragmas \
7393 -Wsuggest-attribute=const \
7394 -Wsuggest-attribute=noreturn \
7395 -Wsuggest-attribute=pure \
7396 -Wtrampolines \
7397 ; do
7398 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7399 done
7400
7401 # Disable the missing-field-initializers warning if needed
7402 if test "$gl_cv_cc_nomfi_needed" = yes; then
7403 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7404 fi
7405
7406 ws=$gl_manywarn_set
7407
7408
7409 gl_warn_set=
7410 set x $ws; shift
7411 for gl_warn_item
7412 do
7413 case " $nw " in
7414 *" $gl_warn_item "*)
7415 ;;
7416 *)
7417 gl_warn_set="$gl_warn_set $gl_warn_item"
7418 ;;
7419 esac
7420 done
7421 ws=$gl_warn_set
7422
7423 for w in $ws; do
7424 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7426$as_echo_n "checking whether C compiler handles $w... " >&6; }
7427if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7428 $as_echo_n "(cached) " >&6
7429else
7430
7431 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7432 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434/* end confdefs.h. */
7435
7436int
7437main ()
7438{
7439
7440 ;
7441 return 0;
7442}
7443_ACEOF
7444if ac_fn_c_try_compile "$LINENO"; then :
7445 eval "$as_gl_Warn=yes"
7446else
7447 eval "$as_gl_Warn=no"
7448fi
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7450 CFLAGS="$gl_save_compiler_FLAGS"
7451
7452fi
7453eval ac_res=\$$as_gl_Warn
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7455$as_echo "$ac_res" >&6; }
7456eval as_val=\$$as_gl_Warn
7457 if test "x$as_val" = x""yes; then :
7458 as_fn_append WARN_CFLAGS " $w"
7459fi
7460
0eb775a3 7461
a6b92a4a
GM
7462 done
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7464$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7465if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7466 $as_echo_n "(cached) " >&6
7467else
7468
7469 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7470 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7472/* end confdefs.h. */
7473
7474int
7475main ()
7476{
7477
7478 ;
7479 return 0;
7480}
7481_ACEOF
7482if ac_fn_c_try_compile "$LINENO"; then :
7483 gl_cv_warn_c__Wno_missing_field_initializers=yes
7484else
7485 gl_cv_warn_c__Wno_missing_field_initializers=no
7486fi
7487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7488 CFLAGS="$gl_save_compiler_FLAGS"
7489
7490fi
7491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7492$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7493if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7494 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7495fi
0eb775a3 7496
a6b92a4a
GM
7497 # We need this one
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7499$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7500if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7501 $as_echo_n "(cached) " >&6
7502else
7503
7504 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7505 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7507/* end confdefs.h. */
7508
7509int
7510main ()
7511{
7512
7513 ;
7514 return 0;
7515}
7516_ACEOF
7517if ac_fn_c_try_compile "$LINENO"; then :
7518 gl_cv_warn_c__Wno_sign_compare=yes
7519else
7520 gl_cv_warn_c__Wno_sign_compare=no
7521fi
7522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7523 CFLAGS="$gl_save_compiler_FLAGS"
7524
7525fi
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7527$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7528if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7529 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7530fi
0eb775a3 7531
a6b92a4a
GM
7532 # Too many warnings for now
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7534$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7535if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7536 $as_echo_n "(cached) " >&6
7537else
7538
7539 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7540 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7542/* end confdefs.h. */
7543
7544int
7545main ()
7546{
7547
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552if ac_fn_c_try_compile "$LINENO"; then :
7553 gl_cv_warn_c__Wno_type_limits=yes
7554else
7555 gl_cv_warn_c__Wno_type_limits=no
7556fi
7557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7558 CFLAGS="$gl_save_compiler_FLAGS"
7559
7560fi
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7562$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7563if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7564 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7565fi
0eb775a3 7566
a6b92a4a
GM
7567 # Too many warnings for now
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7569$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7570if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7571 $as_echo_n "(cached) " >&6
7572else
7573
7574 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7575 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7577/* end confdefs.h. */
7578
7579int
7580main ()
7581{
7582
7583 ;
7584 return 0;
7585}
7586_ACEOF
7587if ac_fn_c_try_compile "$LINENO"; then :
7588 gl_cv_warn_c__Wno_switch=yes
7589else
7590 gl_cv_warn_c__Wno_switch=no
7591fi
7592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7593 CFLAGS="$gl_save_compiler_FLAGS"
7594
7595fi
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7597$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7598if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7599 as_fn_append WARN_CFLAGS " -Wno-switch"
7600fi
0eb775a3 7601
a6b92a4a
GM
7602 # Too many warnings for now
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7604$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7605if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7606 $as_echo_n "(cached) " >&6
7607else
7608
7609 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7610 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7612/* end confdefs.h. */
7613
7614int
7615main ()
7616{
7617
7618 ;
7619 return 0;
7620}
7621_ACEOF
7622if ac_fn_c_try_compile "$LINENO"; then :
7623 gl_cv_warn_c__Wno_unused_parameter=yes
7624else
7625 gl_cv_warn_c__Wno_unused_parameter=no
7626fi
7627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7628 CFLAGS="$gl_save_compiler_FLAGS"
7629
7630fi
7631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7632$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7633if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7634 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7635fi
0eb775a3 7636
a6b92a4a
GM
7637 # Too many warnings for now
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7639$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7640if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7641 $as_echo_n "(cached) " >&6
7642else
7643
7644 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7645 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
7646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7647/* end confdefs.h. */
7648
7649int
7650main ()
7651{
7652
7653 ;
7654 return 0;
7655}
7656_ACEOF
7657if ac_fn_c_try_compile "$LINENO"; then :
7658 gl_cv_warn_c__Wno_format_nonliteral=yes
7659else
7660 gl_cv_warn_c__Wno_format_nonliteral=no
7661fi
7662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7663 CFLAGS="$gl_save_compiler_FLAGS"
7664
7665fi
7666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7667$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7668if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7669 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7670fi
7671
7672
0eb775a3 7673
a6b92a4a
GM
7674 # In spite of excluding -Wlogical-op above, it is enabled, as of
7675 # gcc 4.5.0 20090517.
7676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7677$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7678if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7679 $as_echo_n "(cached) " >&6
7680else
7681
7682 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7683 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
7684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7685/* end confdefs.h. */
7686
7687int
7688main ()
7689{
7690
7691 ;
7692 return 0;
7693}
7694_ACEOF
7695if ac_fn_c_try_compile "$LINENO"; then :
7696 gl_cv_warn_c__Wno_logical_op=yes
7697else
7698 gl_cv_warn_c__Wno_logical_op=no
7699fi
7700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7701 CFLAGS="$gl_save_compiler_FLAGS"
7702
7703fi
7704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7705$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7706if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7707 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7708fi
7709
7710
0eb775a3 7711
a6b92a4a
GM
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7713$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7714if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7715 $as_echo_n "(cached) " >&6
7716else
7717
7718 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7719 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 7720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7721/* end confdefs.h. */
7722
7723int
7724main ()
7725{
7726
7727 ;
7728 return 0;
7729}
7730_ACEOF
7731if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7732 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 7733else
a6b92a4a 7734 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
7735fi
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7737 CFLAGS="$gl_save_compiler_FLAGS"
7738
7739fi
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7741$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7742if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7743 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 7744fi
067d23c9 7745
0eb775a3 7746
a6b92a4a
GM
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7748$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7749if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7750 $as_echo_n "(cached) " >&6
7751else
7752
7753 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7754 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
7755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7756/* end confdefs.h. */
7757
7758int
7759main ()
7760{
7761
7762 ;
7763 return 0;
7764}
7765_ACEOF
7766if ac_fn_c_try_compile "$LINENO"; then :
7767 gl_cv_warn_c__funit_at_a_time=yes
7768else
7769 gl_cv_warn_c__funit_at_a_time=no
7770fi
7771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7772 CFLAGS="$gl_save_compiler_FLAGS"
7773
7774fi
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7776$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7777if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7778 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7779fi
7780
7781
7782
0eb775a3 7783
a6b92a4a
GM
7784$as_echo "#define lint 1" >>confdefs.h
7785
7786
7787$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
7788
7789
7790$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7791
7792
7793 # We use a slightly smaller set of warning options for lib/.
7794 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7795 nw=
7796 nw="$nw -Wunused-macros"
7797
7798
7799 gl_warn_set=
7800 set x $WARN_CFLAGS; shift
7801 for gl_warn_item
7802 do
7803 case " $nw " in
7804 *" $gl_warn_item "*)
7805 ;;
7806 *)
7807 gl_warn_set="$gl_warn_set $gl_warn_item"
7808 ;;
7809 esac
7810 done
7811 GNULIB_WARN_CFLAGS=$gl_warn_set
7812
7813
7814fi
067d23c9
KY
7815
7816
7817
0e733db9
GM
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7819$as_echo_n "checking whether ln -s works... " >&6; }
7820LN_S=$as_ln_s
7821if test "$LN_S" = "ln -s"; then
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7823$as_echo "yes" >&6; }
7824else
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7826$as_echo "no, using $LN_S" >&6; }
7827fi
7828
067d23c9 7829
067d23c9
KY
7830# Extract the first word of "install-info", so it can be a program name with args.
7831set dummy install-info; ac_word=$2
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7833$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7834if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
7835 $as_echo_n "(cached) " >&6
7836else
7837 case $INSTALL_INFO in
7838 [\\/]* | ?:[\\/]*)
7839 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7840 ;;
7841 *)
7842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 7843for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
7844do
7845 IFS=$as_save_IFS
7846 test -z "$as_dir" && as_dir=.
7847 for ac_exec_ext in '' $ac_executable_extensions; do
7848 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7849 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7851 break 2
7852 fi
7853done
7854 done
7855IFS=$as_save_IFS
7856
7857 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7858 ;;
7859esac
7860fi
7861INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7862if test -n "$INSTALL_INFO"; then
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7864$as_echo "$INSTALL_INFO" >&6; }
7865else
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867$as_echo "no" >&6; }
7868fi
7869
7870
7871# Extract the first word of "gzip", so it can be a program name with args.
7872set dummy gzip; ac_word=$2
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7874$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7875if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
7876 $as_echo_n "(cached) " >&6
7877else
7878 case $GZIP_PROG in
7879 [\\/]* | ?:[\\/]*)
7880 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
7881 ;;
7882 *)
7883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886 IFS=$as_save_IFS
7887 test -z "$as_dir" && as_dir=.
7888 for ac_exec_ext in '' $ac_executable_extensions; do
7889 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7890 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7892 break 2
7893 fi
7894done
7895 done
7896IFS=$as_save_IFS
7897
7898 ;;
7899esac
7900fi
7901GZIP_PROG=$ac_cv_path_GZIP_PROG
7902if test -n "$GZIP_PROG"; then
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
7904$as_echo "$GZIP_PROG" >&6; }
7905else
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
7908fi
7909
7910
7ee3791f
GM
7911
7912if test $opsys = gnu-linux; then
7913 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
7914set dummy paxctl; ac_word=$2
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7916$as_echo_n "checking for $ac_word... " >&6; }
7917if test "${ac_cv_path_PAXCTL+set}" = set; then :
7918 $as_echo_n "(cached) " >&6
7919else
7920 case $PAXCTL in
7921 [\\/]* | ?:[\\/]*)
7922 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
7923 ;;
7924 *)
7925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7926for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
7927do
7928 IFS=$as_save_IFS
7929 test -z "$as_dir" && as_dir=.
7930 for ac_exec_ext in '' $ac_executable_extensions; do
7931 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7932 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
7933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7934 break 2
7935 fi
7936done
7937 done
7938IFS=$as_save_IFS
7939
7940 ;;
7941esac
7942fi
7943PAXCTL=$ac_cv_path_PAXCTL
7944if test -n "$PAXCTL"; then
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
7946$as_echo "$PAXCTL" >&6; }
7947else
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7949$as_echo "no" >&6; }
7950fi
7951
7952
685e57ea
GM
7953 if test "X$PAXCTL" != X; then
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
7955$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
7956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7957/* end confdefs.h. */
7958
7959int
7960main ()
7961{
7962
7963 ;
7964 return 0;
7965}
7966_ACEOF
7967if ac_fn_c_try_link "$LINENO"; then :
7968 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7969$as_echo "yes" >&6; }
7970 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7971$as_echo "no" >&6; }; PAXCTL=""; fi
7972fi
7973rm -f core conftest.err conftest.$ac_objext \
7974 conftest$ac_exeext conftest.$ac_ext
7975 fi
7ee3791f 7976fi
067d23c9 7977
9e40dda4 7978## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
7979# Extract the first word of "makeinfo", so it can be a program name with args.
7980set dummy makeinfo; ac_word=$2
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7982$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7983if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
7984 $as_echo_n "(cached) " >&6
7985else
7986 case $MAKEINFO in
7987 [\\/]* | ?:[\\/]*)
7988 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
7989 ;;
7990 *)
7991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7992for as_dir in $PATH
7993do
7994 IFS=$as_save_IFS
7995 test -z "$as_dir" && as_dir=.
7996 for ac_exec_ext in '' $ac_executable_extensions; do
7997 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7998 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
7999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8000 break 2
8001 fi
8002done
8003 done
8004IFS=$as_save_IFS
8005
8006 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8007 ;;
8008esac
8009fi
8010MAKEINFO=$ac_cv_path_MAKEINFO
8011if test -n "$MAKEINFO"; then
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8013$as_echo "$MAKEINFO" >&6; }
8014else
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016$as_echo "no" >&6; }
8017fi
8018
8019
8020if test "$MAKEINFO" != "no" && \
9e40dda4 8021 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'`" = x; then
067d23c9
KY
8022 MAKEINFO=no
8023fi
8024
8025## Makeinfo is unusual. For a released Emacs, the manuals are
8026## pre-built, and not deleted by the normal clean rules. makeinfo is
8027## therefore in the category of "special tools" not normally required, which
8028## configure does not have to check for (eg autoconf itself).
8029## In a Bazaar checkout on the other hand, the manuals are not included.
8030## So makeinfo is a requirement to build from Bazaar, and configure
8031## should test for it as it does for any other build requirement.
8032## We use the presence of $srcdir/info/emacs to distinguish a release,
8033## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8034HAVE_MAKEINFO=yes
8035
067d23c9 8036if test "$MAKEINFO" = "no"; then
96f129d5 8037 MAKEINFO=makeinfo
067d23c9 8038 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8039 HAVE_MAKEINFO=no
067d23c9 8040 elif test ! -e $srcdir/info/emacs; then
9e40dda4 8041 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8042source tree does not seem to have pre-built manuals in the \`info' directory.
8043Either install a suitable version of makeinfo, or re-run configure
8044with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8045 fi
8046fi
8047
8048
141d074d
GM
8049INFO_EXT=.info
8050INFO_OPTS=--no-split
8051
8052
8053
96f129d5 8054
067d23c9
KY
8055if test x$GCC = xyes; then
8056 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8057 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8058else
8059 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8060 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8061fi
8062
8063
8064late_LDFLAGS=$LDFLAGS
8065if test x$GCC = xyes; then
8066 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8067else
8068 LDFLAGS="$LDFLAGS -znocombreloc"
8069fi
8070
8071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8072$as_echo_n "checking for -znocombreloc... " >&6; }
8073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8074/* end confdefs.h. */
8075
8076int
8077main ()
8078{
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084if ac_fn_c_try_link "$LINENO"; then :
8085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8086$as_echo "yes" >&6; }
8087else
8088 LDFLAGS=$late_LDFLAGS
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8090$as_echo "no" >&6; }
8091fi
8092rm -f core conftest.err conftest.$ac_objext \
8093 conftest$ac_exeext conftest.$ac_ext
8094
8095
125c3718 8096test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8097case "$opsys" in
125c3718
PE
8098 your-opsys-here) CANNOT_DUMP=yes ;;
8099esac
8100
8101test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8102
8103$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8104
125c3718 8105
067d23c9
KY
8106
8107
8108
8109UNEXEC_OBJ=unexelf.o
8110case "$opsys" in
8111 # MSDOS uses unexcoff.o
8112 # MSWindows uses unexw32.o
8113 aix4-2)
8114 UNEXEC_OBJ=unexaix.o
8115 ;;
8116 cygwin)
8117 UNEXEC_OBJ=unexcw.o
8118 ;;
8119 darwin)
8120 UNEXEC_OBJ=unexmacosx.o
8121 ;;
8122 hpux10-20 | hpux11)
8123 UNEXEC_OBJ=unexhp9k800.o
8124 ;;
8125 sol2-10)
8126 # Use the Solaris dldump() function, called from unexsol.c, to dump
8127 # emacs, instead of the generic ELF dump code found in unexelf.c.
8128 # The resulting binary has a complete symbol table, and is better
8129 # for debugging and other observability tools (debuggers, pstack, etc).
8130 #
8131 # If you encounter a problem using dldump(), please consider sending
8132 # a message to the OpenSolaris tools-linking mailing list:
8133 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8134 #
8135 # It is likely that dldump() works with older Solaris too, but this has
8136 # not been tested, so for now this change is for Solaris 10 or newer.
8137 UNEXEC_OBJ=unexsol.o
8138 ;;
8139esac
8140
8141LD_SWITCH_SYSTEM=
8142case "$opsys" in
8143 freebsd)
8144 ## Let `ld' find image libs and similar things in /usr/local/lib.
8145 ## The system compiler, GCC, has apparently been modified to not
8146 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8147### It's not our place to do this. See bug#10313#17.
8148### LD_SWITCH_SYSTEM=-L/usr/local/lib
8149 :
067d23c9
KY
8150 ;;
8151
8152 gnu-linux)
8153 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8154 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8155 ;;
8156
8157 netbsd)
a7479549
GM
8158### It's not our place to do this. See bug#10313#17.
8159### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8160 :
067d23c9
KY
8161 ;;
8162
8163 openbsd)
8164 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8165 ## otherwise Emacs dumps core on elf systems.
8166 LD_SWITCH_SYSTEM="-Z"
8167 ;;
8168esac
8169
8170
8171ac_link="$ac_link $LD_SWITCH_SYSTEM"
8172
ae629dae 8173## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8174## which has not been defined yet. When this was handled with cpp,
8175## it was expanded to null when configure sourced the s/*.h file.
8176## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8177## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8178## (or somesuch), but because it is supposed to go at the _front_
8179## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8180## Compare with the gnu-linux case below, which added to the end
8181## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8182## LD_SWITCH_SYSTEM_TEMACS.
8183case "$opsys" in
8184 netbsd|openbsd)
ae629dae 8185 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8186esac
8187
8188
8189C_SWITCH_MACHINE=
42bbbe8b
GM
8190case $canonical in
8191 alpha*)
067d23c9 8192 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8193if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8194
8195fi
8196
8197 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8198 ## With ELF, make sure that all common symbols get allocated to in the
8199 ## data section. Otherwise, the dump of temacs may miss variables in
8200 ## the shared library that have been initialized. For example, with
8201 ## GNU libc, __malloc_initialized would normally be resolved to the
8202 ## shared library's .bss section, which is fatal.
8203 if test "x$GCC" = "xyes"; then
8204 C_SWITCH_MACHINE="-fno-common"
8205 else
a9bec17c 8206 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8207 fi
8208 else
8209 UNEXEC_OBJ=unexalpha.o
8210 fi
42bbbe8b
GM
8211 ;;
8212esac
067d23c9
KY
8213
8214
8215
8216
8217C_SWITCH_SYSTEM=
8218## Some programs in src produce warnings saying certain subprograms
8219## are too complex and need a MAXMEM value greater than 2000 for
8220## additional optimization. --nils@exp-math.uni-essen.de
8221test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8222 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8223## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8224## It is redundant in glibc2, since we define _GNU_SOURCE.
8225
8226
8227
8228LIBS_SYSTEM=
8229case "$opsys" in
8230 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8231 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8232
8233 freebsd) LIBS_SYSTEM="-lutil" ;;
8234
8235 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8236
1f5d53eb 8237 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8238
8239 ## Motif needs -lgen.
8240 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8241esac
8242
8243
8244
8245### Make sure subsequent tests use flags consistent with the build flags.
8246
8247if test x"${OVERRIDE_CPPFLAGS}" != x; then
8248 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8249else
8250 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8251fi
8252
4fda9c95
GM
8253# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8254
3e0be4ab
GM
8255# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8256
4fda9c95 8257
067d23c9 8258
067d23c9
KY
8259LIB_MATH=-lm
8260LIB_STANDARD=
8261START_FILES=
4717915f 8262SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8263
8264case $opsys in
8265 cygwin )
8266 LIB_MATH=
8267 START_FILES='pre-crt0.o'
8268 ;;
8269 darwin )
8270 ## Adding -lm confuses the dynamic linker, so omit it.
8271 LIB_MATH=
8272 START_FILES='pre-crt0.o'
8273 ;;
8274 freebsd )
6b10626d
GM
8275 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8276 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
15f79fcd 8277 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8278 ;;
8279 gnu-linux | gnu-kfreebsd )
8280 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8281 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8282 ;;
8283 hpux10-20 | hpux11 )
8284 LIB_STANDARD=-lc
8285 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8286 ;;
bb72ce91
GM
8287 netbsd | openbsd )
8288 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8289 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
15f79fcd 8290 SYSTEM_TYPE=berkeley-unix
067d23c9 8291 ;;
15f79fcd
GM
8292
8293 sol2* | unixware )
8294 SYSTEM_TYPE=usg-unix-v
8295 ;;
8296
067d23c9
KY
8297esac
8298
8299
8300
8301
15f79fcd
GM
8302cat >>confdefs.h <<_ACEOF
8303#define SYSTEM_TYPE "$SYSTEM_TYPE"
8304_ACEOF
8305
8306
130f1dac
GM
8307crt_files=
8308
8309for file in x $LIB_STANDARD $START_FILES; do
8310 case "$file" in
8311 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8312 esac
8313done
8314
8315if test "x$crt_files" != x; then
8316
8317 ## If user specified a crt-dir, use that unconditionally.
8318 crt_gcc=no
8319
8320 if test "X$CRT_DIR" = "X"; then
8321
8322 CRT_DIR=/usr/lib # default
8323
8324 case "$canonical" in
8325 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8326 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8327 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8328 ## For anything else (eg /usr/lib32), it is up the user to specify
8329 ## the location (bug#5655).
8330 ## Test for crtn.o, not just the directory, because sometimes the
8331 ## directory exists but does not have the relevant files (bug#1287).
8332 ## FIXME better to test for binary compatibility somehow.
8333 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8334 ;;
8335
8336 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8337 esac
8338
8339 case "$opsys" in
8340 hpux10-20) CRT_DIR=/lib ;;
8341 esac
8342
8343 test "x${GCC}" = xyes && crt_gcc=yes
8344
8345 fi # CRT_DIR = ""
8346
8347 crt_missing=
8348
8349 for file in $crt_files; do
8350
8351 ## If we're using gcc, try to determine it automatically by asking
8352 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8353 ## system-dependent default from above.]
8354 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8355
8356 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8357 case "$crt_file" in
8358 */*)
8359 CRT_DIR=`$as_dirname -- "$crt_file" ||
8360$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8361 X"$crt_file" : 'X\(//\)[^/]' \| \
8362 X"$crt_file" : 'X\(//\)$' \| \
8363 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8364$as_echo X"$crt_file" |
8365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8366 s//\1/
8367 q
8368 }
8369 /^X\(\/\/\)[^/].*/{
8370 s//\1/
8371 q
8372 }
8373 /^X\(\/\/\)$/{
8374 s//\1/
8375 q
8376 }
8377 /^X\(\/\).*/{
8378 s//\1/
8379 q
8380 }
8381 s/.*/./; q'`
8382 ;;
8383 esac
8384 fi
8385
8386 crt_gcc=no
8387
8388 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8389 done # $crt_files
8390
8391 test "x$crt_missing" = x || \
a9bec17c 8392 as_fn_error "Required file(s) not found:$crt_missing
130f1dac
GM
8393Try using the --with-crt-dir option." "$LINENO" 5
8394
8395fi # crt_files != ""
8396
8397
8398
bb72ce91
GM
8399case $opsys in
8400 netbsd | openbsd )
8401 if test -f $CRT_DIR/crti.o; then
8402
8403 test -f $CRT_DIR/crtn.o || \
8404 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8405
8406 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8407 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8408 fi
8409 ;;
8410esac
8411
130f1dac 8412
5476a9a4
GM
8413pre_PKG_CONFIG_CFLAGS=$CFLAGS
8414pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8415
5476a9a4
GM
8416# Extract the first word of "pkg-config", so it can be a program name with args.
8417set dummy pkg-config; ac_word=$2
8418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8419$as_echo_n "checking for $ac_word... " >&6; }
8420if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8421 $as_echo_n "(cached) " >&6
8422else
8423 case $PKG_CONFIG in
8424 [\\/]* | ?:[\\/]*)
8425 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8426 ;;
8427 *)
8428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8429for as_dir in $PATH
8430do
8431 IFS=$as_save_IFS
8432 test -z "$as_dir" && as_dir=.
8433 for ac_exec_ext in '' $ac_executable_extensions; do
8434 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8435 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8436 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8437 break 2
8438 fi
8439done
8440 done
8441IFS=$as_save_IFS
8442
8443 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8444 ;;
8445esac
8446fi
8447PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8448if test -n "$PKG_CONFIG"; then
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8450$as_echo "$PKG_CONFIG" >&6; }
8451else
8452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
f199cab1
GM
8455
8456
f199cab1 8457
5476a9a4
GM
8458
8459
8460
8461if test "${with_sound}" != "no"; then
8462 # Sound support for GNU/Linux and the free BSDs.
8463 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8464do :
8465 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8466ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8467eval as_val=\$$as_ac_Header
8468 if test "x$as_val" = x""yes; then :
8469 cat >>confdefs.h <<_ACEOF
8470#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8471_ACEOF
8472 have_sound_header=yes
8473fi
8474
8475done
8476
8477 # Emulation library used on NetBSD.
8478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8479$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8480if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8481 $as_echo_n "(cached) " >&6
8482else
5476a9a4
GM
8483 ac_check_lib_save_LIBS=$LIBS
8484LIBS="-lossaudio $LIBS"
8485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8486/* end confdefs.h. */
5476a9a4
GM
8487
8488/* Override any GCC internal prototype to avoid an error.
8489 Use char because int might match the return type of a GCC
8490 builtin and then its argument prototype would still apply. */
8491#ifdef __cplusplus
8492extern "C"
8493#endif
8494char _oss_ioctl ();
067d23c9
KY
8495int
8496main ()
8497{
5476a9a4 8498return _oss_ioctl ();
067d23c9
KY
8499 ;
8500 return 0;
8501}
8502_ACEOF
8503if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8504 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8505else
5476a9a4 8506 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8507fi
8508rm -f core conftest.err conftest.$ac_objext \
8509 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8510LIBS=$ac_check_lib_save_LIBS
8511fi
8512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8513$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8514if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8515 LIBSOUND=-lossaudio
8516else
8517 LIBSOUND=
067d23c9
KY
8518fi
8519
8520
8521
5476a9a4
GM
8522 ALSA_REQUIRED=1.0.0
8523 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8524
8525 succeeded=no
8526
8527 if test "$PKG_CONFIG" = "no" ; then
8528 HAVE_ALSA=no
8529 else
8530 PKG_CONFIG_MIN_VERSION=0.9.0
8531 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8533$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8534
8535 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
8536 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
8537 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
8538 edit_cflags="
8539 s,///*,/,g
8540 s/^/ /
8541 s/ -I/ $isystem/g
8542 s/^ //
8543 "
8544 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8545 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8547$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8548 succeeded=yes
8549 else
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8551$as_echo "no" >&6; }
8552 ALSA_CFLAGS=""
8553 ALSA_LIBS=""
8554 ## If we have a custom action on failure, don't print errors, but
8555 ## do set a variable so people can do so.
8556 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
8557
8558 fi
8559
8560
8561
8562 else
8563 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8564 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8565 fi
8566 fi
8567
8568 if test $succeeded = yes; then
8569 HAVE_ALSA=yes
8570 else
8571 HAVE_ALSA=no
8572 fi
f199cab1 8573
5476a9a4
GM
8574 if test $HAVE_ALSA = yes; then
8575 SAVE_CFLAGS="$CFLAGS"
8576 SAVE_LIBS="$LIBS"
8577 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8578 LIBS="$ALSA_LIBS $LIBS"
8579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8580/* end confdefs.h. */
8581#include <asoundlib.h>
067d23c9
KY
8582int
8583main ()
8584{
5476a9a4 8585snd_lib_error_set_handler (0);
067d23c9
KY
8586 ;
8587 return 0;
8588}
8589_ACEOF
5476a9a4
GM
8590if ac_fn_c_try_compile "$LINENO"; then :
8591 emacs_alsa_normal=yes
067d23c9 8592else
5476a9a4 8593 emacs_alsa_normal=no
067d23c9 8594fi
5476a9a4
GM
8595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8596 if test "$emacs_alsa_normal" != yes; then
8597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8598/* end confdefs.h. */
8599#include <alsa/asoundlib.h>
8600int
8601main ()
8602{
8603snd_lib_error_set_handler (0);
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608if ac_fn_c_try_compile "$LINENO"; then :
8609 emacs_alsa_subdir=yes
8610else
8611 emacs_alsa_subdir=no
f199cab1 8612fi
5476a9a4
GM
8613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8614 if test "$emacs_alsa_subdir" != yes; then
8615 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8616 fi
8617 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8618 fi
067d23c9 8619
5476a9a4
GM
8620 CFLAGS="$SAVE_CFLAGS"
8621 LIBS="$SAVE_LIBS"
8622 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8623 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8624
5476a9a4 8625$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8626
5476a9a4 8627 fi
067d23c9 8628
5476a9a4
GM
8629 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8630 case "$opsys" in
8631 gnu-linux|freebsd|netbsd)
067d23c9 8632
5476a9a4 8633$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8634
5476a9a4
GM
8635 ;;
8636 esac
8637 fi
067d23c9
KY
8638
8639
5476a9a4 8640fi
067d23c9 8641
e700232f
GM
8642
8643
8644
5476a9a4
GM
8645 for ac_header in $ac_header_list
8646do :
8647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8648ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8649"
8650eval as_val=\$$as_ac_Header
8651 if test "x$as_val" = x""yes; then :
8652 cat >>confdefs.h <<_ACEOF
8653#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8654_ACEOF
8655
f199cab1 8656fi
e700232f 8657
5476a9a4
GM
8658done
8659
8660
e700232f
GM
8661
8662
8663
f199cab1 8664
067d23c9 8665
067d23c9 8666
067d23c9 8667
067d23c9 8668
f199cab1
GM
8669
8670
8671
067d23c9 8672
067d23c9 8673
f199cab1
GM
8674
8675
8676
f199cab1 8677
f199cab1 8678
067d23c9 8679
f199cab1 8680
067d23c9 8681
5476a9a4
GM
8682
8683
8684
8685
8686
8687
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8689$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691/* end confdefs.h. */
8692#include <sys/personality.h>
067d23c9
KY
8693int
8694main ()
8695{
5476a9a4 8696personality (PER_LINUX32)
067d23c9
KY
8697 ;
8698 return 0;
8699}
8700_ACEOF
8701if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8702 emacs_cv_personality_linux32=yes
067d23c9 8703else
5476a9a4 8704 emacs_cv_personality_linux32=no
067d23c9 8705fi
f199cab1 8706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8708$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8709
5476a9a4 8710if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8711
5476a9a4
GM
8712$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8713
8714fi
8715
8716for ac_header in term.h
8717do :
8718 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8719if test "x$ac_cv_header_term_h" = x""yes; then :
8720 cat >>confdefs.h <<_ACEOF
8721#define HAVE_TERM_H 1
067d23c9 8722_ACEOF
5476a9a4
GM
8723
8724fi
8725
8726done
8727
8728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8729$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8730if test "${ac_cv_header_time+set}" = set; then :
8731 $as_echo_n "(cached) " >&6
8732else
8733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8734/* end confdefs.h. */
5476a9a4
GM
8735#include <sys/types.h>
8736#include <sys/time.h>
8737#include <time.h>
f199cab1 8738
067d23c9
KY
8739int
8740main ()
8741{
5476a9a4
GM
8742if ((struct tm *) 0)
8743return 0;
067d23c9
KY
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8749 ac_cv_header_time=yes
067d23c9 8750else
5476a9a4 8751 ac_cv_header_time=no
067d23c9
KY
8752fi
8753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8754fi
5476a9a4
GM
8755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8756$as_echo "$ac_cv_header_time" >&6; }
8757if test $ac_cv_header_time = yes; then
f199cab1 8758
5476a9a4
GM
8759$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8760
8761fi
8762
8763ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
8764if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8765 ac_have_decl=1
8766else
8767 ac_have_decl=0
8768fi
8769
8770cat >>confdefs.h <<_ACEOF
8771#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 8772_ACEOF
5476a9a4
GM
8773
8774if test $ac_cv_have_decl_sys_siglist != yes; then
8775 # For Tru64, at least:
8776 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
8777if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8778 ac_have_decl=1
8779else
8780 ac_have_decl=0
067d23c9 8781fi
5476a9a4
GM
8782
8783cat >>confdefs.h <<_ACEOF
8784#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8785_ACEOF
8786
8787 if test $ac_cv_have_decl___sys_siglist = yes; then
8788
8789$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8790
8791 fi
8792fi
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8794$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8795if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8796 $as_echo_n "(cached) " >&6
067d23c9
KY
8797else
8798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8799/* end confdefs.h. */
5476a9a4
GM
8800#include <sys/types.h>
8801#include <sys/wait.h>
8802#ifndef WEXITSTATUS
8803# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8804#endif
8805#ifndef WIFEXITED
8806# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8807#endif
8808
067d23c9
KY
8809int
8810main ()
8811{
5476a9a4
GM
8812 int s;
8813 wait (&s);
8814 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
8815 ;
8816 return 0;
8817}
8818_ACEOF
5476a9a4
GM
8819if ac_fn_c_try_compile "$LINENO"; then :
8820 ac_cv_header_sys_wait_h=yes
067d23c9 8821else
5476a9a4 8822 ac_cv_header_sys_wait_h=no
067d23c9 8823fi
5476a9a4 8824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 8825fi
5476a9a4
GM
8826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8827$as_echo "$ac_cv_header_sys_wait_h" >&6; }
8828if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 8829
5476a9a4 8830$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 8831
5476a9a4 8832fi
7417b37c 8833
7417b37c 8834
5476a9a4
GM
8835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8836$as_echo_n "checking for speed_t... " >&6; }
8837if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
8838 $as_echo_n "(cached) " >&6
8839else
f199cab1
GM
8840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8841/* end confdefs.h. */
5476a9a4
GM
8842#include <termios.h>
8843int
8844main ()
8845{
8846speed_t x = 1;
8847 ;
8848 return 0;
8849}
7417b37c 8850_ACEOF
f199cab1 8851if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
8852 emacs_cv_speed_t=yes
8853else
8854 emacs_cv_speed_t=no
7417b37c 8855fi
f199cab1 8856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 8857fi
5476a9a4
GM
8858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8859$as_echo "$emacs_cv_speed_t" >&6; }
8860if test $emacs_cv_speed_t = yes; then
7417b37c 8861
5476a9a4 8862$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 8863
5476a9a4 8864fi
067d23c9 8865
5476a9a4
GM
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
8867$as_echo_n "checking for struct exception... " >&6; }
8868if test "${emacs_cv_struct_exception+set}" = set; then :
f199cab1
GM
8869 $as_echo_n "(cached) " >&6
8870else
8871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8872/* end confdefs.h. */
5476a9a4 8873#include <math.h>
f199cab1
GM
8874int
8875main ()
8876{
5476a9a4 8877static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
f199cab1
GM
8878 ;
8879 return 0;
8880}
067d23c9 8881_ACEOF
5476a9a4
GM
8882if ac_fn_c_try_compile "$LINENO"; then :
8883 emacs_cv_struct_exception=yes
f199cab1 8884else
5476a9a4 8885 emacs_cv_struct_exception=no
067d23c9 8886fi
5476a9a4 8887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 8888fi
5476a9a4
GM
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
8890$as_echo "$emacs_cv_struct_exception" >&6; }
8891HAVE_EXCEPTION=$emacs_cv_struct_exception
8892if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then
7417b37c 8893
5476a9a4 8894$as_echo "#define NO_MATHERR 1" >>confdefs.h
7417b37c 8895
5476a9a4 8896fi
7417b37c 8897
067d23c9
KY
8898
8899
e700232f 8900
5476a9a4
GM
8901for ac_header in net/if.h
8902do :
8903 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8904#if HAVE_SYS_SOCKET_H
8905#include <sys/socket.h>
8906#endif
8907"
8908if test "x$ac_cv_header_net_if_h" = x""yes; then :
8909 cat >>confdefs.h <<_ACEOF
8910#define HAVE_NET_IF_H 1
067d23c9 8911_ACEOF
7cae64b4 8912
067d23c9 8913fi
067d23c9 8914
5476a9a4 8915done
4d4b75e8 8916
5476a9a4
GM
8917for ac_header in ifaddrs.h
8918do :
8919 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8920#if HAVE_SYS_SOCKET_H
8921#include <sys/socket.h>
8922#endif
8923"
8924if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8925 cat >>confdefs.h <<_ACEOF
8926#define HAVE_IFADDRS_H 1
8927_ACEOF
4d4b75e8 8928
5476a9a4 8929fi
4d4b75e8 8930
5476a9a4 8931done
7e723570 8932
5476a9a4 8933for ac_header in net/if_dl.h
7e723570 8934do :
5476a9a4
GM
8935 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8936#if HAVE_SYS_SOCKET_H
8937#include <sys/socket.h>
8938#endif
7e723570 8939"
5476a9a4 8940if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 8941 cat >>confdefs.h <<_ACEOF
5476a9a4 8942#define HAVE_NET_IF_DL_H 1
7e723570
GM
8943_ACEOF
8944
8945fi
8946
8947done
8948
8949
5476a9a4
GM
8950ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8951#if HAVE_SYS_SOCKET_H
8952#include <sys/socket.h>
8953#endif
8954#if HAVE_NET_IF_H
8955#include <net/if.h>
8956#endif
8957"
8958if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 8959
5476a9a4
GM
8960cat >>confdefs.h <<_ACEOF
8961#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8962_ACEOF
7e723570
GM
8963
8964
5476a9a4
GM
8965fi
8966ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
8967#if HAVE_SYS_SOCKET_H
8968#include <sys/socket.h>
f199cab1 8969#endif
5476a9a4
GM
8970#if HAVE_NET_IF_H
8971#include <net/if.h>
f199cab1 8972#endif
5476a9a4
GM
8973"
8974if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
8975
8976cat >>confdefs.h <<_ACEOF
8977#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8978_ACEOF
8979
8980
8981fi
8982ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
8983#if HAVE_SYS_SOCKET_H
8984#include <sys/socket.h>
f199cab1 8985#endif
5476a9a4
GM
8986#if HAVE_NET_IF_H
8987#include <net/if.h>
8988#endif
8989"
8990if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
8991
8992cat >>confdefs.h <<_ACEOF
8993#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 8994_ACEOF
5476a9a4
GM
8995
8996
8997fi
8998ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
8999#if HAVE_SYS_SOCKET_H
9000#include <sys/socket.h>
9001#endif
9002#if HAVE_NET_IF_H
9003#include <net/if.h>
9004#endif
9005"
9006if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9007
9008cat >>confdefs.h <<_ACEOF
9009#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9010_ACEOF
5476a9a4
GM
9011
9012
067d23c9 9013fi
5476a9a4
GM
9014ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9015#if HAVE_SYS_SOCKET_H
9016#include <sys/socket.h>
9017#endif
9018#if HAVE_NET_IF_H
9019#include <net/if.h>
9020#endif
9021"
9022if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9023
9024cat >>confdefs.h <<_ACEOF
9025#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9026_ACEOF
9027
067d23c9 9028
f199cab1 9029fi
5476a9a4
GM
9030ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9031#if HAVE_SYS_SOCKET_H
9032#include <sys/socket.h>
9033#endif
9034#if HAVE_NET_IF_H
9035#include <net/if.h>
9036#endif
9037"
9038if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9039
9040cat >>confdefs.h <<_ACEOF
9041#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9042_ACEOF
9043
067d23c9
KY
9044
9045fi
9046
9047
067d23c9 9048
f199cab1 9049
5476a9a4
GM
9050DEPFLAGS=
9051MKDEPDIR=":"
9052deps_frag=deps.mk
9053if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9055$as_echo_n "checking whether we are using GNU Make... " >&6; }
9056 HAVE_GNU_MAKE=no
9057 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9058 if test "x$testval" != x; then
9059 HAVE_GNU_MAKE=yes
9060 else
9061 ac_enable_autodepend=no
9062 fi
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9064$as_echo "$HAVE_GNU_MAKE" >&6; }
9065 if test $HAVE_GNU_MAKE = yes; then
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9067$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9068 SAVE_CFLAGS="$CFLAGS"
9069 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9071/* end confdefs.h. */
f199cab1 9072
5476a9a4
GM
9073int
9074main ()
9075{
f199cab1 9076
5476a9a4
GM
9077 ;
9078 return 0;
9079}
9080_ACEOF
9081if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9082
5476a9a4
GM
9083else
9084 ac_enable_autodepend=no
9085fi
9086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9087 CFLAGS="$SAVE_CFLAGS"
9088 test -f deps.d || ac_enable_autodepend=no
9089 rm -rf deps.d
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9091$as_echo "$ac_enable_autodepend" >&6; }
9092 fi
9093 if test $ac_enable_autodepend = yes; then
9094 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9095 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9096 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9097 deps_frag=autodeps.mk
9098 fi
9099fi
9100deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9101
9102
9103
9104
9105
5476a9a4 9106lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9107
9108
9109
5476a9a4
GM
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9111$as_echo_n "checking for long file names... " >&6; }
9112if test "${ac_cv_sys_long_file_names+set}" = set; then :
9113 $as_echo_n "(cached) " >&6
9114else
9115 ac_cv_sys_long_file_names=yes
9116# Test for long file names in all the places we know might matter:
9117# . the current directory, where building will happen
9118# $prefix/lib where we will be installing things
9119# $exec_prefix/lib likewise
9120# $TMPDIR if set, where it might want to write temporary files
9121# /tmp where it might want to write temporary files
9122# /var/tmp likewise
9123# /usr/tmp likewise
9124for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9125 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9126 # in the usual case where exec_prefix is '${prefix}'.
9127 case $ac_dir in #(
9128 . | /* | ?:[\\/]*) ;; #(
9129 *) continue;;
9130 esac
9131 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9132 ac_xdir=$ac_dir/cf$$
9133 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9134 ac_tf1=$ac_xdir/conftest9012345
9135 ac_tf2=$ac_xdir/conftest9012346
9136 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9137 ac_cv_sys_long_file_names=no
9138 rm -f -r "$ac_xdir" 2>/dev/null
9139 test $ac_cv_sys_long_file_names = no && break
9140done
9141fi
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9143$as_echo "$ac_cv_sys_long_file_names" >&6; }
9144if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9145
5476a9a4 9146$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9147
5476a9a4 9148fi
f199cab1 9149
f199cab1 9150
5476a9a4 9151#### Choose a window system.
f199cab1 9152
42dcba54
GM
9153## We leave window_system equal to none if
9154## we end up building without one. Any new window system should
9155## set window_system to an appropriate value and add objects to
9156## window-system-specific substs.
9157
9158window_system=none
5476a9a4
GM
9159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9160$as_echo_n "checking for X... " >&6; }
f199cab1 9161
f199cab1 9162
5476a9a4
GM
9163# Check whether --with-x was given.
9164if test "${with_x+set}" = set; then :
9165 withval=$with_x;
9166fi
f199cab1 9167
5476a9a4
GM
9168# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9169if test "x$with_x" = xno; then
9170 # The user explicitly disabled X.
9171 have_x=disabled
9172else
9173 case $x_includes,$x_libraries in #(
9174 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9175 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9176 $as_echo_n "(cached) " >&6
9177else
9178 # One or both of the vars are not set, and there is no cached value.
9179ac_x_includes=no ac_x_libraries=no
9180rm -f -r conftest.dir
9181if mkdir conftest.dir; then
9182 cd conftest.dir
9183 cat >Imakefile <<'_ACEOF'
9184incroot:
9185 @echo incroot='${INCROOT}'
9186usrlibdir:
9187 @echo usrlibdir='${USRLIBDIR}'
9188libdir:
9189 @echo libdir='${LIBDIR}'
9190_ACEOF
9191 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9192 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9193 for ac_var in incroot usrlibdir libdir; do
9194 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9195 done
9196 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9197 for ac_extension in a so sl dylib la dll; do
9198 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9199 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9200 ac_im_usrlibdir=$ac_im_libdir; break
9201 fi
9202 done
9203 # Screen out bogus values from the imake configuration. They are
9204 # bogus both because they are the default anyway, and because
9205 # using them would break gcc on systems where it needs fixed includes.
9206 case $ac_im_incroot in
9207 /usr/include) ac_x_includes= ;;
9208 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9209 esac
9210 case $ac_im_usrlibdir in
9211 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9212 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9213 esac
9214 fi
9215 cd ..
9216 rm -f -r conftest.dir
067d23c9
KY
9217fi
9218
5476a9a4
GM
9219# Standard set of common directories for X headers.
9220# Check X11 before X11Rn because it is often a symlink to the current release.
9221ac_x_header_dirs='
9222/usr/X11/include
9223/usr/X11R7/include
9224/usr/X11R6/include
9225/usr/X11R5/include
9226/usr/X11R4/include
067d23c9 9227
5476a9a4
GM
9228/usr/include/X11
9229/usr/include/X11R7
9230/usr/include/X11R6
9231/usr/include/X11R5
9232/usr/include/X11R4
067d23c9 9233
5476a9a4
GM
9234/usr/local/X11/include
9235/usr/local/X11R7/include
9236/usr/local/X11R6/include
9237/usr/local/X11R5/include
9238/usr/local/X11R4/include
067d23c9 9239
5476a9a4
GM
9240/usr/local/include/X11
9241/usr/local/include/X11R7
9242/usr/local/include/X11R6
9243/usr/local/include/X11R5
9244/usr/local/include/X11R4
067d23c9 9245
5476a9a4
GM
9246/usr/X386/include
9247/usr/x386/include
9248/usr/XFree86/include/X11
067d23c9 9249
5476a9a4
GM
9250/usr/include
9251/usr/local/include
9252/usr/unsupported/include
9253/usr/athena/include
9254/usr/local/x11r5/include
9255/usr/lpp/Xamples/include
067d23c9 9256
5476a9a4
GM
9257/usr/openwin/include
9258/usr/openwin/share/include'
067d23c9 9259
5476a9a4
GM
9260if test "$ac_x_includes" = no; then
9261 # Guess where to find include files, by looking for Xlib.h.
9262 # First, try using that file with no special directory specified.
9263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9264/* end confdefs.h. */
9265#include <X11/Xlib.h>
067d23c9 9266_ACEOF
5476a9a4
GM
9267if ac_fn_c_try_cpp "$LINENO"; then :
9268 # We can compile using X headers with no special include directory.
9269ac_x_includes=
067d23c9 9270else
5476a9a4
GM
9271 for ac_dir in $ac_x_header_dirs; do
9272 if test -r "$ac_dir/X11/Xlib.h"; then
9273 ac_x_includes=$ac_dir
9274 break
f199cab1 9275 fi
f199cab1 9276done
5476a9a4
GM
9277fi
9278rm -f conftest.err conftest.$ac_ext
9279fi # $ac_x_includes = no
067d23c9 9280
5476a9a4
GM
9281if test "$ac_x_libraries" = no; then
9282 # Check for the libraries.
9283 # See if we find them without any special options.
9284 # Don't add to $LIBS permanently.
9285 ac_save_LIBS=$LIBS
9286 LIBS="-lX11 $LIBS"
7ee3791f 9287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9288/* end confdefs.h. */
5476a9a4 9289#include <X11/Xlib.h>
067d23c9
KY
9290int
9291main ()
9292{
5476a9a4
GM
9293XrmInitialize ()
9294 ;
067d23c9
KY
9295 return 0;
9296}
9297_ACEOF
5476a9a4
GM
9298if ac_fn_c_try_link "$LINENO"; then :
9299 LIBS=$ac_save_LIBS
9300# We can link X programs with no special library path.
9301ac_x_libraries=
7ee3791f 9302else
5476a9a4
GM
9303 LIBS=$ac_save_LIBS
9304for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9305do
9306 # Don't even attempt the hair of trying to link an X program!
9307 for ac_extension in a so sl dylib la dll; do
9308 if test -r "$ac_dir/libX11.$ac_extension"; then
9309 ac_x_libraries=$ac_dir
9310 break 2
9311 fi
9312 done
9313done
7ee3791f 9314fi
5476a9a4
GM
9315rm -f core conftest.err conftest.$ac_objext \
9316 conftest$ac_exeext conftest.$ac_ext
9317fi # $ac_x_libraries = no
7ee3791f 9318
5476a9a4
GM
9319case $ac_x_includes,$ac_x_libraries in #(
9320 no,* | *,no | *\'*)
9321 # Didn't find X, or a directory has "'" in its name.
9322 ac_cv_have_x="have_x=no";; #(
9323 *)
9324 # Record where we found X for the cache.
9325 ac_cv_have_x="have_x=yes\
9326 ac_x_includes='$ac_x_includes'\
9327 ac_x_libraries='$ac_x_libraries'"
9328esac
9329fi
9330;; #(
9331 *) have_x=yes;;
9332 esac
9333 eval "$ac_cv_have_x"
9334fi # $with_x != no
9335
9336if test "$have_x" != yes; then
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9338$as_echo "$have_x" >&6; }
9339 no_x=yes
9340else
9341 # If each of the values was on the command line, it overrides each guess.
9342 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9343 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9344 # Update the cache value to reflect the command line values.
9345 ac_cv_have_x="have_x=yes\
9346 ac_x_includes='$x_includes'\
9347 ac_x_libraries='$x_libraries'"
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9349$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9350fi
9351
42dcba54 9352if test "$no_x" != yes; then
5476a9a4
GM
9353 window_system=x11
9354fi
9355
9356LD_SWITCH_X_SITE_RPATH=
9357if test "${x_libraries}" != NONE; then
9358 if test -n "${x_libraries}"; then
9359 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9360 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9361 fi
9362 x_default_search_path=""
9363 x_search_path=${x_libraries}
9364 if test -z "${x_search_path}"; then
9365 x_search_path=/usr/lib
9366 fi
9367 for x_library in `echo ${x_search_path}: | \
9368 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9369 x_search_path="\
9370${x_library}/X11/%L/%T/%N%C%S:\
9371${x_library}/X11/%l/%T/%N%C%S:\
9372${x_library}/X11/%T/%N%C%S:\
9373${x_library}/X11/%L/%T/%N%S:\
9374${x_library}/X11/%l/%T/%N%S:\
9375${x_library}/X11/%T/%N%S"
9376 if test x"${x_default_search_path}" = x; then
9377 x_default_search_path=${x_search_path}
9378 else
9379 x_default_search_path="${x_search_path}:${x_default_search_path}"
9380 fi
9381 done
9382fi
9383
9384
9385if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9386 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9387fi
9388
9389if test x"${x_includes}" = x; then
9390 bitmapdir=/usr/include/X11/bitmaps
9391else
9392 # accumulate include directories that have X11 bitmap subdirectories
9393 bmd_acc="dummyval"
9394 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9395 if test -d "${bmd}/X11/bitmaps"; then
9396 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9397 fi
9398 if test -d "${bmd}/bitmaps"; then
9399 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9400 fi
9401 done
9402 if test ${bmd_acc} != "dummyval"; then
9403 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9404 fi
9405fi
7ee3791f 9406
5476a9a4
GM
9407HAVE_NS=no
9408NS_IMPL_COCOA=no
9409NS_IMPL_GNUSTEP=no
9410tmp_CPPFLAGS="$CPPFLAGS"
9411tmp_CFLAGS="$CFLAGS"
9412CPPFLAGS="$CPPFLAGS -x objective-c"
9413CFLAGS="$CFLAGS -x objective-c"
9414TEMACS_LDFLAGS2="\${LDFLAGS}"
9415GNU_OBJC_CFLAGS=
9416if test "${with_ns}" != no; then
9417 if test "${opsys}" = darwin; then
9418 NS_IMPL_COCOA=yes
9419 ns_appdir=`pwd`/nextstep/Emacs.app
9420 ns_appbindir=${ns_appdir}/Contents/MacOS
9421 ns_appresdir=${ns_appdir}/Contents/Resources
9422 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
9423 elif test -f $GNUSTEP_CONFIG_FILE; then
9424 NS_IMPL_GNUSTEP=yes
9425 ns_appdir=`pwd`/nextstep/Emacs.app
9426 ns_appbindir=${ns_appdir}
9427 ns_appresdir=${ns_appdir}/Resources
9428 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
9429 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9430 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9431 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9432 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9433 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9434 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9435 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9436 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9437 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9438 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9439 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9440 LIB_STANDARD=
9441 START_FILES=
9442 TEMACS_LDFLAGS2=
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9444$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9445if test "${emacs_cv_objc_exceptions+set}" = set; then :
9446 $as_echo_n "(cached) " >&6
9447else
9448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9449/* end confdefs.h. */
9450#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9451int
9452main ()
9453{
5476a9a4
GM
9454#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
94551;
9456#else
9457fail;
9458#endif
9459 ;
39b3d70b
GM
9460 return 0;
9461}
9462_ACEOF
5476a9a4
GM
9463if ac_fn_c_try_compile "$LINENO"; then :
9464 emacs_cv_objc_exceptions=yes
39b3d70b 9465else
5476a9a4 9466 emacs_cv_objc_exceptions=no
39b3d70b 9467fi
5476a9a4 9468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9469fi
5476a9a4
GM
9470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9471$as_echo "$emacs_cv_objc_exceptions" >&6; }
9472 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9473
5476a9a4
GM
9474$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9475
9476 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9477 fi
9478 fi
9479
9480 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9481
9482 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9483if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9484 HAVE_NS=yes
067d23c9 9485else
5476a9a4
GM
9486 as_fn_error "\`--with-ns' was specified, but the include
9487 files are missing or cannot be compiled." "$LINENO" 5
9488fi
f199cab1 9489
f199cab1 9490
5476a9a4
GM
9491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9492/* end confdefs.h. */
9493#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9494int
9495main ()
9496{
5476a9a4
GM
9497NSInteger i;
9498 ;
067d23c9
KY
9499 return 0;
9500}
9501_ACEOF
5476a9a4
GM
9502if ac_fn_c_try_compile "$LINENO"; then :
9503 ns_have_nsinteger=yes
067d23c9 9504else
5476a9a4 9505 ns_have_nsinteger=no
067d23c9 9506fi
5476a9a4
GM
9507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9508 if test $ns_have_nsinteger = yes; then
067d23c9 9509
5476a9a4 9510$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9511
067d23c9 9512 fi
5476a9a4 9513fi
067d23c9 9514
5476a9a4
GM
9515
9516INSTALL_ARCH_INDEP_EXTRA=install-etc
9517ns_self_contained=no
9518ns_frag=/dev/null
9519NS_OBJ=
9520NS_OBJC_OBJ=
9521if test "${HAVE_NS}" = yes; then
9522 if test "$with_toolkit_scroll_bars" = "no"; then
9523 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9524 fi
9525
9526 window_system=nextstep
5476a9a4
GM
9527 # set up packaging dirs
9528 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9529 ns_self_contained=yes
9530 prefix=${ns_appresdir}
9531 exec_prefix=${ns_appbindir}
9532 libexecdir="\${ns_appbindir}/libexec"
9533 archlibdir="\${ns_appbindir}/libexec"
9534 docdir="\${ns_appresdir}/etc"
9535 etcdir="\${ns_appresdir}/etc"
9536 infodir="\${ns_appresdir}/info"
9537 mandir="\${ns_appresdir}/man"
9538 lispdir="\${ns_appresdir}/lisp"
9539 leimdir="\${ns_appresdir}/leim"
9540 INSTALL_ARCH_INDEP_EXTRA=
9541 fi
9542 ns_frag=$srcdir/src/ns.mk
5476a9a4
GM
9543 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9544fi
9545CFLAGS="$tmp_CFLAGS"
9546CPPFLAGS="$tmp_CPPFLAGS"
9547
9548
9549
9550
9551
9552
9553
42dcba54
GM
9554## $window_system is now set to the window system we will
9555## ultimately use.
9556
9557term_header=
9558HAVE_X_WINDOWS=no
9559HAVE_X11=no
9560USE_X_TOOLKIT=none
9561
5476a9a4
GM
9562case "${window_system}" in
9563 x11 )
9564 HAVE_X_WINDOWS=yes
9565 HAVE_X11=yes
42dcba54 9566 term_header=xterm.h
5476a9a4
GM
9567 case "${with_x_toolkit}" in
9568 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9569 motif ) USE_X_TOOLKIT=MOTIF ;;
9570 gtk ) with_gtk=yes
42dcba54 9571 term_header=gtkutil.h
5476a9a4
GM
9572 USE_X_TOOLKIT=none ;;
9573 gtk3 ) with_gtk3=yes
42dcba54 9574 term_header=gtkutil.h
5476a9a4
GM
9575 USE_X_TOOLKIT=none ;;
9576 no ) USE_X_TOOLKIT=none ;;
9577 * ) USE_X_TOOLKIT=maybe ;;
9578 esac
9579 ;;
42dcba54
GM
9580 nextstep )
9581 term_header=nsterm.h
5476a9a4
GM
9582 ;;
9583esac
9584
42dcba54
GM
9585if test -n "${term_header}"; then
9586
9587cat >>confdefs.h <<_ACEOF
9588#define TERM_HEADER "${term_header}"
9589_ACEOF
9590
9591fi
9592
5476a9a4
GM
9593if test "$window_system" = none && test "X$with_x" != "Xno"; then
9594 # Extract the first word of "X", so it can be a program name with args.
9595set dummy X; ac_word=$2
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9597$as_echo_n "checking for $ac_word... " >&6; }
9598if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9599 $as_echo_n "(cached) " >&6
9600else
9601 if test -n "$HAVE_XSERVER"; then
9602 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9603else
9604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9605for as_dir in $PATH
9606do
9607 IFS=$as_save_IFS
9608 test -z "$as_dir" && as_dir=.
9609 for ac_exec_ext in '' $ac_executable_extensions; do
9610 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9611 ac_cv_prog_HAVE_XSERVER="true"
9612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9613 break 2
9614 fi
9615done
9616 done
9617IFS=$as_save_IFS
9618
9619 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9620fi
9621fi
9622HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9623if test -n "$HAVE_XSERVER"; then
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9625$as_echo "$HAVE_XSERVER" >&6; }
9626else
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
9629fi
9630
9631
9632 if test "$HAVE_XSERVER" = true ||
9633 test -n "$DISPLAY" ||
9634 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9635 as_fn_error "You seem to be running X, but no X development libraries
9636were found. You should install the relevant development files for X
9637and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9638sure you have development files for image handling, i.e.
9639tiff, gif, jpeg, png and xpm.
9640If you are sure you want Emacs compiled without X window support, pass
9641 --without-x
9642to configure." "$LINENO" 5
9643 fi
9644fi
9645
9646### If we're using X11, we should use the X menu package.
9647HAVE_MENUS=no
9648case ${HAVE_X11} in
9649 yes ) HAVE_MENUS=yes ;;
9650esac
9651
9652# Does the opsystem file prohibit the use of the GNU malloc?
9653# Assume not, until told otherwise.
9654GNU_MALLOC=yes
9655
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9657$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9658if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
9659 $as_echo_n "(cached) " >&6
9660else
5476a9a4
GM
9661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9662/* end confdefs.h. */
9663#include <malloc.h>
9664 static void hook (void) {}
9665int
9666main ()
9667{
9668malloc_set_state (malloc_get_state ());
9669 __after_morecore_hook = hook;
9670 __malloc_initialize_hook = hook;
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675if ac_fn_c_try_link "$LINENO"; then :
9676 emacs_cv_var_doug_lea_malloc=yes
9677else
9678 emacs_cv_var_doug_lea_malloc=no
9679fi
9680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext conftest.$ac_ext
9682fi
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9684$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9685doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9686
9687
9688system_malloc=no
9689case "$opsys" in
9690 ## darwin ld insists on the use of malloc routines in the System framework.
9691 darwin|sol2-10) system_malloc=yes ;;
9692esac
9693
9694if test "${system_malloc}" = "yes"; then
9695
9696$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9697
9698 GNU_MALLOC=no
9699 GNU_MALLOC_reason="
9700 (The GNU allocators don't work with this system configuration.)"
9701 GMALLOC_OBJ=
9702 VMLIMIT_OBJ=
9703else
9704 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9705 VMLIMIT_OBJ=vm-limit.o
9706fi
9707
9708
9709
9710if test "$doug_lea_malloc" = "yes" ; then
9711 if test "$GNU_MALLOC" = yes ; then
9712 GNU_MALLOC_reason="
9713 (Using Doug Lea's new malloc from the GNU C Library.)"
9714 fi
9715
9716$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9717
9718
9719 ## Use mmap directly for allocating larger buffers.
9720 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9721 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9722 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
9723 case "$opsys" in
9724 gnu*) REL_ALLOC=no ;;
9725 esac
9726fi
9727
9728if test x"${REL_ALLOC}" = x; then
9729 REL_ALLOC=${GNU_MALLOC}
9730fi
9731
9732use_mmap_for_buffers=no
9733case "$opsys" in
9734 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
9735esac
9736
9737
9738
9739
9740
9741
9742
9743
9744for ac_func in getpagesize
9745do :
9746 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9747if test "x$ac_cv_func_getpagesize" = x""yes; then :
9748 cat >>confdefs.h <<_ACEOF
9749#define HAVE_GETPAGESIZE 1
9750_ACEOF
9751
9752fi
9753done
9754
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9756$as_echo_n "checking for working mmap... " >&6; }
9757if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9758 $as_echo_n "(cached) " >&6
9759else
9760 if test "$cross_compiling" = yes; then :
9761 ac_cv_func_mmap_fixed_mapped=no
9762else
9763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9764/* end confdefs.h. */
9765$ac_includes_default
9766/* malloc might have been renamed as rpl_malloc. */
9767#undef malloc
9768
9769/* Thanks to Mike Haertel and Jim Avera for this test.
9770 Here is a matrix of mmap possibilities:
9771 mmap private not fixed
9772 mmap private fixed at somewhere currently unmapped
9773 mmap private fixed at somewhere already mapped
9774 mmap shared not fixed
9775 mmap shared fixed at somewhere currently unmapped
9776 mmap shared fixed at somewhere already mapped
9777 For private mappings, we should verify that changes cannot be read()
9778 back from the file, nor mmap's back from the file at a different
9779 address. (There have been systems where private was not correctly
9780 implemented like the infamous i386 svr4.0, and systems where the
9781 VM page cache was not coherent with the file system buffer cache
9782 like early versions of FreeBSD and possibly contemporary NetBSD.)
9783 For shared mappings, we should conversely verify that changes get
9784 propagated back to all the places they're supposed to be.
9785
9786 Grep wants private fixed already mapped.
9787 The main things grep needs to know about mmap are:
9788 * does it exist and is it safe to write into the mmap'd area
9789 * how to use it (BSD variants) */
9790
9791#include <fcntl.h>
9792#include <sys/mman.h>
9793
9794#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9795char *malloc ();
9796#endif
9797
9798/* This mess was copied from the GNU getpagesize.h. */
9799#ifndef HAVE_GETPAGESIZE
9800# ifdef _SC_PAGESIZE
9801# define getpagesize() sysconf(_SC_PAGESIZE)
9802# else /* no _SC_PAGESIZE */
9803# ifdef HAVE_SYS_PARAM_H
9804# include <sys/param.h>
9805# ifdef EXEC_PAGESIZE
9806# define getpagesize() EXEC_PAGESIZE
9807# else /* no EXEC_PAGESIZE */
9808# ifdef NBPG
9809# define getpagesize() NBPG * CLSIZE
9810# ifndef CLSIZE
9811# define CLSIZE 1
9812# endif /* no CLSIZE */
9813# else /* no NBPG */
9814# ifdef NBPC
9815# define getpagesize() NBPC
9816# else /* no NBPC */
9817# ifdef PAGESIZE
9818# define getpagesize() PAGESIZE
9819# endif /* PAGESIZE */
9820# endif /* no NBPC */
9821# endif /* no NBPG */
9822# endif /* no EXEC_PAGESIZE */
9823# else /* no HAVE_SYS_PARAM_H */
9824# define getpagesize() 8192 /* punt totally */
9825# endif /* no HAVE_SYS_PARAM_H */
9826# endif /* no _SC_PAGESIZE */
9827
9828#endif /* no HAVE_GETPAGESIZE */
9829
9830int
9831main ()
9832{
9833 char *data, *data2, *data3;
9834 const char *cdata2;
9835 int i, pagesize;
9836 int fd, fd2;
9837
9838 pagesize = getpagesize ();
9839
9840 /* First, make a file with some known garbage in it. */
9841 data = (char *) malloc (pagesize);
9842 if (!data)
9843 return 1;
9844 for (i = 0; i < pagesize; ++i)
9845 *(data + i) = rand ();
9846 umask (0);
9847 fd = creat ("conftest.mmap", 0600);
9848 if (fd < 0)
9849 return 2;
9850 if (write (fd, data, pagesize) != pagesize)
9851 return 3;
9852 close (fd);
9853
9854 /* Next, check that the tail of a page is zero-filled. File must have
9855 non-zero length, otherwise we risk SIGBUS for entire page. */
9856 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9857 if (fd2 < 0)
9858 return 4;
9859 cdata2 = "";
9860 if (write (fd2, cdata2, 1) != 1)
9861 return 5;
9862 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9863 if (data2 == MAP_FAILED)
9864 return 6;
9865 for (i = 0; i < pagesize; ++i)
9866 if (*(data2 + i))
9867 return 7;
9868 close (fd2);
9869 if (munmap (data2, pagesize))
9870 return 8;
9871
9872 /* Next, try to mmap the file at a fixed address which already has
9873 something else allocated at it. If we can, also make sure that
9874 we see the same garbage. */
9875 fd = open ("conftest.mmap", O_RDWR);
9876 if (fd < 0)
9877 return 9;
9878 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9879 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9880 return 10;
9881 for (i = 0; i < pagesize; ++i)
9882 if (*(data + i) != *(data2 + i))
9883 return 11;
9884
9885 /* Finally, make sure that changes to the mapped area do not
9886 percolate back to the file as seen by read(). (This is a bug on
9887 some variants of i386 svr4.0.) */
9888 for (i = 0; i < pagesize; ++i)
9889 *(data2 + i) = *(data2 + i) + 1;
9890 data3 = (char *) malloc (pagesize);
9891 if (!data3)
9892 return 12;
9893 if (read (fd, data3, pagesize) != pagesize)
9894 return 13;
9895 for (i = 0; i < pagesize; ++i)
9896 if (*(data + i) != *(data3 + i))
9897 return 14;
9898 close (fd);
9899 return 0;
9900}
9901_ACEOF
9902if ac_fn_c_try_run "$LINENO"; then :
9903 ac_cv_func_mmap_fixed_mapped=yes
9904else
9905 ac_cv_func_mmap_fixed_mapped=no
9906fi
9907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9908 conftest.$ac_objext conftest.beam conftest.$ac_ext
9909fi
9910
9911fi
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9913$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9914if test $ac_cv_func_mmap_fixed_mapped = yes; then
9915
9916$as_echo "#define HAVE_MMAP 1" >>confdefs.h
9917
9918fi
9919rm -f conftest.mmap conftest.txt
9920
9921if test $use_mmap_for_buffers = yes; then
f199cab1 9922
5476a9a4
GM
9923$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
9924
9925 REL_ALLOC=no
9926fi
9927
9928LIBS="$LIBS_SYSTEM $LIBS"
9929
9930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9931$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
9932if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
9933 $as_echo_n "(cached) " >&6
067d23c9 9934else
5476a9a4
GM
9935 ac_check_lib_save_LIBS=$LIBS
9936LIBS="-ldnet $LIBS"
9937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9938/* end confdefs.h. */
067d23c9 9939
5476a9a4
GM
9940/* Override any GCC internal prototype to avoid an error.
9941 Use char because int might match the return type of a GCC
9942 builtin and then its argument prototype would still apply. */
9943#ifdef __cplusplus
9944extern "C"
9945#endif
9946char dnet_ntoa ();
9947int
9948main ()
f199cab1 9949{
5476a9a4
GM
9950return dnet_ntoa ();
9951 ;
9952 return 0;
f199cab1 9953}
5476a9a4
GM
9954_ACEOF
9955if ac_fn_c_try_link "$LINENO"; then :
9956 ac_cv_lib_dnet_dnet_ntoa=yes
9957else
9958 ac_cv_lib_dnet_dnet_ntoa=no
9959fi
9960rm -f core conftest.err conftest.$ac_objext \
9961 conftest$ac_exeext conftest.$ac_ext
9962LIBS=$ac_check_lib_save_LIBS
9963fi
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9965$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9966if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
9967 cat >>confdefs.h <<_ACEOF
9968#define HAVE_LIBDNET 1
9969_ACEOF
9970
9971 LIBS="-ldnet $LIBS"
9972
9973fi
9974
9975
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
9977$as_echo_n "checking for main in -lXbsd... " >&6; }
9978if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
9979 $as_echo_n "(cached) " >&6
9980else
9981 ac_check_lib_save_LIBS=$LIBS
9982LIBS="-lXbsd $LIBS"
9983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984/* end confdefs.h. */
9985
9986
9987int
9988main ()
f199cab1 9989{
5476a9a4
GM
9990return main ();
9991 ;
9992 return 0;
f199cab1 9993}
5476a9a4
GM
9994_ACEOF
9995if ac_fn_c_try_link "$LINENO"; then :
9996 ac_cv_lib_Xbsd_main=yes
9997else
9998 ac_cv_lib_Xbsd_main=no
9999fi
10000rm -f core conftest.err conftest.$ac_objext \
10001 conftest$ac_exeext conftest.$ac_ext
10002LIBS=$ac_check_lib_save_LIBS
10003fi
10004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10005$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10006if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10007 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10008fi
10009
10010
10011LIB_PTHREAD=
10012
10013
10014
10015if test "$ac_cv_header_pthread_h"; then
10016 if test "$GMALLOC_OBJ" = gmalloc.o; then
10017 emacs_pthread_function=pthread_atfork
10018 else
10019 emacs_pthread_function=pthread_self
10020 fi
10021 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10023$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10024if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10025 $as_echo_n "(cached) " >&6
10026else
10027 ac_check_lib_save_LIBS=$LIBS
10028LIBS="-lpthread $LIBS"
10029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10030/* end confdefs.h. */
10031
10032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
10035#ifdef __cplusplus
10036extern "C"
10037#endif
10038char $emacs_pthread_function ();
10039int
10040main ()
f199cab1 10041{
5476a9a4
GM
10042return $emacs_pthread_function ();
10043 ;
10044 return 0;
f199cab1 10045}
5476a9a4
GM
10046_ACEOF
10047if ac_fn_c_try_link "$LINENO"; then :
10048 eval "$as_ac_Lib=yes"
10049else
10050 eval "$as_ac_Lib=no"
10051fi
10052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
10054LIBS=$ac_check_lib_save_LIBS
10055fi
10056eval ac_res=\$$as_ac_Lib
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10058$as_echo "$ac_res" >&6; }
10059eval as_val=\$$as_ac_Lib
10060 if test "x$as_val" = x""yes; then :
10061 HAVE_PTHREAD=yes
10062fi
10063
10064fi
10065if test "$HAVE_PTHREAD" = yes; then
10066 case "${canonical}" in
10067 *-hpux*) ;;
10068 *) LIB_PTHREAD="-lpthread"
10069 LIBS="$LIB_PTHREAD $LIBS" ;;
10070 esac
10071
10072$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10073
10074fi
10075
10076
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10078$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10079if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10080 $as_echo_n "(cached) " >&6
10081else
10082 ac_check_lib_save_LIBS=$LIBS
10083LIBS="-lpthreads $LIBS"
10084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10085/* end confdefs.h. */
10086
10087/* Override any GCC internal prototype to avoid an error.
10088 Use char because int might match the return type of a GCC
10089 builtin and then its argument prototype would still apply. */
10090#ifdef __cplusplus
10091extern "C"
f199cab1 10092#endif
5476a9a4
GM
10093char cma_open ();
10094int
10095main ()
10096{
10097return cma_open ();
10098 ;
10099 return 0;
f199cab1 10100}
5476a9a4
GM
10101_ACEOF
10102if ac_fn_c_try_link "$LINENO"; then :
10103 ac_cv_lib_pthreads_cma_open=yes
10104else
10105 ac_cv_lib_pthreads_cma_open=no
10106fi
10107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
10109LIBS=$ac_check_lib_save_LIBS
10110fi
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10112$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10113if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10114 cat >>confdefs.h <<_ACEOF
10115#define HAVE_LIBPTHREADS 1
10116_ACEOF
10117
10118 LIBS="-lpthreads $LIBS"
10119
10120fi
10121
10122
10123## Note: when using cpp in s/aix4.2.h, this definition depended on
10124## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10125## the system file was sourced. Hence the value of LIBS_SYSTEM
10126## added to LIBS in configure would never contain the pthreads part,
10127## but the value used in Makefiles might. FIXME?
10128##
10129## -lpthreads seems to be necessary for Xlib in X11R6, and should
10130## be harmless on older versions of X where it happens to exist.
10131test "$opsys" = "aix4-2" && \
10132 test $ac_cv_lib_pthreads_cma_open = yes && \
10133 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10134
10135
10136case ${host_os} in
10137aix*)
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10139$as_echo_n "checking for -bbigtoc option... " >&6; }
10140if test "${gdb_cv_bigtoc+set}" = set; then :
10141 $as_echo_n "(cached) " >&6
10142else
10143
10144 case $GCC in
10145 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10146 *) gdb_cv_bigtoc=-bbigtoc ;;
10147 esac
067d23c9 10148
5476a9a4
GM
10149 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10151/* end confdefs.h. */
067d23c9
KY
10152
10153int
10154main ()
10155{
5476a9a4
GM
10156int i;
10157 ;
10158 return 0;
10159}
10160_ACEOF
10161if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10162
5476a9a4
GM
10163else
10164 gdb_cv_bigtoc=
10165fi
10166rm -f core conftest.err conftest.$ac_objext \
10167 conftest$ac_exeext conftest.$ac_ext
067d23c9 10168
5476a9a4
GM
10169fi
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10171$as_echo "$gdb_cv_bigtoc" >&6; }
10172 ;;
10173esac
067d23c9 10174
5476a9a4
GM
10175# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10176# used for the tests that follow. We set them back to REAL_CFLAGS and
10177# REAL_CPPFLAGS later on.
067d23c9 10178
5476a9a4
GM
10179REAL_CFLAGS="$CFLAGS"
10180REAL_CPPFLAGS="$CPPFLAGS"
10181
10182if test "${HAVE_X11}" = "yes"; then
10183 DEFS="$C_SWITCH_X_SITE $DEFS"
10184 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10185 LIBS="-lX11 $LIBS"
10186 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10187 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10188
10189 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10190 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10191 # but it's more convenient here to set LD_RUN_PATH since this
10192 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10193 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10194 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10195 export LD_RUN_PATH
10196 fi
10197
10198 if test "${opsys}" = "gnu-linux"; then
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10200$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202/* end confdefs.h. */
067d23c9 10203
5476a9a4
GM
10204int
10205main ()
10206{
10207XOpenDisplay ("foo");
f199cab1 10208 ;
067d23c9
KY
10209 return 0;
10210}
10211_ACEOF
5476a9a4
GM
10212if ac_fn_c_try_link "$LINENO"; then :
10213 xgnu_linux_first_failure=no
067d23c9 10214else
5476a9a4 10215 xgnu_linux_first_failure=yes
067d23c9 10216fi
5476a9a4
GM
10217rm -f core conftest.err conftest.$ac_objext \
10218 conftest$ac_exeext conftest.$ac_ext
10219 if test "${xgnu_linux_first_failure}" = "yes"; then
10220 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10221 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10222 OLD_CPPFLAGS="$CPPFLAGS"
10223 OLD_LIBS="$LIBS"
10224 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10225 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10226 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10227 LIBS="$LIBS -b i486-linuxaout"
10228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10229/* end confdefs.h. */
067d23c9 10230
5476a9a4
GM
10231int
10232main ()
10233{
10234XOpenDisplay ("foo");
10235 ;
10236 return 0;
10237}
10238_ACEOF
10239if ac_fn_c_try_link "$LINENO"; then :
10240 xgnu_linux_second_failure=no
10241else
10242 xgnu_linux_second_failure=yes
067d23c9 10243fi
5476a9a4
GM
10244rm -f core conftest.err conftest.$ac_objext \
10245 conftest$ac_exeext conftest.$ac_ext
10246 if test "${xgnu_linux_second_failure}" = "yes"; then
10247 # If we get the same failure with -b, there is no use adding -b.
10248 # So take it out. This plays safe.
10249 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10250 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10251 CPPFLAGS="$OLD_CPPFLAGS"
10252 LIBS="$OLD_LIBS"
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255 else
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10257$as_echo "yes" >&6; }
10258 fi
0eb4e0df 10259 else
5476a9a4
GM
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10261$as_echo "no" >&6; }
10262 fi
10263 fi
0eb4e0df 10264
5476a9a4
GM
10265 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10266 # header files included from there.
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10268$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10270/* end confdefs.h. */
5476a9a4
GM
10271#include <X11/Xlib.h>
10272#include <X11/XKBlib.h>
0eb4e0df
GM
10273int
10274main ()
10275{
5476a9a4 10276XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10277 ;
10278 return 0;
10279}
10280_ACEOF
5476a9a4
GM
10281if ac_fn_c_try_link "$LINENO"; then :
10282 emacs_xkb=yes
0eb4e0df 10283else
5476a9a4 10284 emacs_xkb=no
0eb4e0df 10285fi
5476a9a4
GM
10286rm -f core conftest.err conftest.$ac_objext \
10287 conftest$ac_exeext conftest.$ac_ext
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10289$as_echo "$emacs_xkb" >&6; }
10290 if test $emacs_xkb = yes; then
1abfdc54 10291
5476a9a4 10292$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
1abfdc54 10293
e1fefc61 10294 fi
1abfdc54 10295
5476a9a4
GM
10296 for ac_func in XrmSetDatabase XScreenResourceString \
10297XScreenNumberOfScreen
10298do :
10299 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10300ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10301eval as_val=\$$as_ac_var
10302 if test "x$as_val" = x""yes; then :
10303 cat >>confdefs.h <<_ACEOF
10304#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10305_ACEOF
1abfdc54 10306
5476a9a4
GM
10307fi
10308done
1abfdc54 10309
5476a9a4 10310fi
1abfdc54 10311
5476a9a4
GM
10312if test "${window_system}" = "x11"; then
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10314$as_echo_n "checking X11 version 6... " >&6; }
10315 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10316 $as_echo_n "(cached) " >&6
10317else
5476a9a4 10318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10319/* end confdefs.h. */
5476a9a4 10320#include <X11/Xlib.h>
067d23c9
KY
10321int
10322main ()
10323{
5476a9a4
GM
10324#if XlibSpecificationRelease < 6
10325fail;
10326#endif
10327
067d23c9
KY
10328 ;
10329 return 0;
10330}
10331_ACEOF
5476a9a4
GM
10332if ac_fn_c_try_link "$LINENO"; then :
10333 emacs_cv_x11_version_6=yes
10334else
10335 emacs_cv_x11_version_6=no
10336fi
10337rm -f core conftest.err conftest.$ac_objext \
10338 conftest$ac_exeext conftest.$ac_ext
067d23c9 10339fi
f199cab1 10340
5476a9a4
GM
10341 if test $emacs_cv_x11_version_6 = yes; then
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10343$as_echo "6 or newer" >&6; }
f199cab1 10344
5476a9a4 10345$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10346
10347
5476a9a4 10348$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10349
5476a9a4
GM
10350 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10351 ## XIM support.
10352 case "$opsys" in
10353 sol2-*) : ;;
10354 *)
10355$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10356
5476a9a4
GM
10357 ;;
10358 esac
10359 else
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10361$as_echo "before 6" >&6; }
10362 fi
10363fi
f199cab1 10364
067d23c9 10365
5476a9a4
GM
10366### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10367HAVE_RSVG=no
10368if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10369 if test "${with_rsvg}" != "no"; then
10370 RSVG_REQUIRED=2.11.0
10371 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10372
f199cab1 10373
5476a9a4 10374 succeeded=no
067d23c9 10375
5476a9a4
GM
10376 if test "$PKG_CONFIG" = "no" ; then
10377 :
10378 else
10379 PKG_CONFIG_MIN_VERSION=0.9.0
10380 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10382$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10383
5476a9a4
GM
10384 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
10385 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
10386 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
10387 edit_cflags="
10388 s,///*,/,g
10389 s/^/ /
10390 s/ -I/ $isystem/g
10391 s/^ //
10392 "
10393 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10394 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10396$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10397 succeeded=yes
10398 else
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
10401 RSVG_CFLAGS=""
10402 RSVG_LIBS=""
10403 ## If we have a custom action on failure, don't print errors, but
10404 ## do set a variable so people can do so.
10405 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
f199cab1 10406
5476a9a4 10407 fi
067d23c9 10408
067d23c9 10409
067d23c9 10410
f199cab1 10411 else
5476a9a4
GM
10412 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10413 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10414 fi
5476a9a4
GM
10415 fi
10416
10417 if test $succeeded = yes; then
10418 HAVE_RSVG=yes
10419 else
10420 :
10421 fi
067d23c9 10422
067d23c9 10423
067d23c9 10424
f199cab1 10425
5476a9a4 10426 if test $HAVE_RSVG = yes; then
f199cab1 10427
5476a9a4
GM
10428$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10429
10430 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10431 LIBS="$RSVG_LIBS $LIBS"
10432 fi
f199cab1 10433 fi
5476a9a4 10434fi
f199cab1 10435
5476a9a4
GM
10436HAVE_IMAGEMAGICK=no
10437if test "${HAVE_X11}" = "yes"; then
10438 if test "${with_imagemagick}" != "no"; then
10439 ## 6.2.8 is the earliest version known to work, but earlier versions
10440 ## might work - let us know if you find one.
10441 ## 6.0.7 does not work. See bug#7955.
10442 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
f199cab1 10443
5476a9a4 10444 succeeded=no
f199cab1 10445
5476a9a4
GM
10446 if test "$PKG_CONFIG" = "no" ; then
10447 :
10448 else
10449 PKG_CONFIG_MIN_VERSION=0.9.0
10450 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10452$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10453
5476a9a4
GM
10454 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10455 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10456 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10457 edit_cflags="
10458 s,///*,/,g
10459 s/^/ /
10460 s/ -I/ $isystem/g
10461 s/^ //
10462 "
10463 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10464 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10466$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10467 succeeded=yes
10468 else
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470$as_echo "no" >&6; }
10471 IMAGEMAGICK_CFLAGS=""
10472 IMAGEMAGICK_LIBS=""
10473 ## If we have a custom action on failure, don't print errors, but
10474 ## do set a variable so people can do so.
10475 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
f199cab1 10476
5476a9a4 10477 fi
f199cab1 10478
f199cab1 10479
f199cab1 10480
5476a9a4
GM
10481 else
10482 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10483 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10484 fi
f199cab1 10485 fi
5476a9a4
GM
10486
10487 if test $succeeded = yes; then
10488 HAVE_IMAGEMAGICK=yes
f199cab1 10489 else
5476a9a4 10490 :
067d23c9
KY
10491 fi
10492
f199cab1 10493
067d23c9 10494
f199cab1 10495
5476a9a4 10496 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10497
5476a9a4 10498$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10499
5476a9a4
GM
10500 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10501 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10502 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10503do :
10504 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10505ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10506eval as_val=\$$as_ac_var
10507 if test "x$as_val" = x""yes; then :
10508 cat >>confdefs.h <<_ACEOF
10509#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10510_ACEOF
f199cab1
GM
10511
10512fi
5476a9a4
GM
10513done
10514
067d23c9
KY
10515 fi
10516 fi
5476a9a4 10517fi
067d23c9 10518
f199cab1 10519
5476a9a4
GM
10520HAVE_GTK=no
10521GTK_OBJ=
10522if test "${with_gtk3}" = "yes"; then
10523 GLIB_REQUIRED=2.28
10524 GTK_REQUIRED=3.0
10525 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10526
10527
5476a9a4 10528 succeeded=no
f199cab1 10529
5476a9a4
GM
10530 if test "$PKG_CONFIG" = "no" ; then
10531 pkg_check_gtk=no
10532 else
10533 PKG_CONFIG_MIN_VERSION=0.9.0
10534 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10536$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10537
5476a9a4
GM
10538 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10539 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10540 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10541 edit_cflags="
10542 s,///*,/,g
10543 s/^/ /
10544 s/ -I/ $isystem/g
10545 s/^ //
10546 "
10547 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10548 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10550$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10551 succeeded=yes
10552 else
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554$as_echo "no" >&6; }
10555 GTK_CFLAGS=""
10556 GTK_LIBS=""
10557 ## If we have a custom action on failure, don't print errors, but
10558 ## do set a variable so people can do so.
10559 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
f199cab1 10560
5476a9a4 10561 fi
f199cab1 10562
f199cab1 10563
f199cab1 10564
5476a9a4
GM
10565 else
10566 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10567 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10568 fi
5476a9a4 10569 fi
067d23c9 10570
5476a9a4
GM
10571 if test $succeeded = yes; then
10572 pkg_check_gtk=yes
10573 else
10574 pkg_check_gtk=no
10575 fi
067d23c9 10576
5476a9a4
GM
10577 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10578 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9
KY
10579 fi
10580
5476a9a4 10581$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 10582
5476a9a4 10583 GTK_OBJ=emacsgtkfixed.o
42dcba54 10584 term_header=gtkutil.h
5476a9a4 10585fi
067d23c9 10586
5476a9a4
GM
10587if test "$pkg_check_gtk" != "yes"; then
10588 HAVE_GTK=no
10589if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10590 GLIB_REQUIRED=2.10
10591 GTK_REQUIRED=2.10
10592 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 10593
5476a9a4
GM
10594
10595 succeeded=no
10596
10597 if test "$PKG_CONFIG" = "no" ; then
10598 pkg_check_gtk=no
10599 else
10600 PKG_CONFIG_MIN_VERSION=0.9.0
10601 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10603$as_echo_n "checking for $GTK_MODULES... " >&6; }
10604
10605 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10606 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10607 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10608 edit_cflags="
10609 s,///*,/,g
10610 s/^/ /
10611 s/ -I/ $isystem/g
10612 s/^ //
10613 "
10614 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10615 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10617$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10618 succeeded=yes
10619 else
10620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
10622 GTK_CFLAGS=""
10623 GTK_LIBS=""
10624 ## If we have a custom action on failure, don't print errors, but
10625 ## do set a variable so people can do so.
10626 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10627
10628 fi
10629
10630
10631
10632 else
10633 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10634 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10635 fi
10636 fi
10637
10638 if test $succeeded = yes; then
10639 pkg_check_gtk=yes
10640 else
10641 pkg_check_gtk=no
10642 fi
10643
10644 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10645 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10646 fi
067d23c9 10647fi
067d23c9
KY
10648fi
10649
5476a9a4
GM
10650if test x"$pkg_check_gtk" = xyes; then
10651
10652
10653
10654 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10655 CFLAGS="$CFLAGS $GTK_CFLAGS"
10656 LIBS="$GTK_LIBS $LIBS"
10657 GTK_COMPILES=no
10658 for ac_func in gtk_main
10659do :
10660 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10661if test "x$ac_cv_func_gtk_main" = x""yes; then :
10662 cat >>confdefs.h <<_ACEOF
10663#define HAVE_GTK_MAIN 1
10664_ACEOF
10665 GTK_COMPILES=yes
f199cab1 10666fi
5476a9a4 10667done
067d23c9 10668
5476a9a4
GM
10669 if test "${GTK_COMPILES}" != "yes"; then
10670 if test "$USE_X_TOOLKIT" != "maybe"; then
10671 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10672 fi
10673 else
10674 HAVE_GTK=yes
10675
10676$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 10677
5476a9a4
GM
10678 GTK_OBJ="gtkutil.o $GTK_OBJ"
10679 USE_X_TOOLKIT=none
10680 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
10681 :
10682 else
10683 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10684 closing open displays. This is no problem if you just use
10685 one display, but if you use more than one and close one of them
10686 Emacs may crash." >&5
10687$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10688 closing open displays. This is no problem if you just use
10689 one display, but if you use more than one and close one of them
10690 Emacs may crash." >&2;}
10691 sleep 3
10692 fi
067d23c9
KY
10693 fi
10694
5476a9a4 10695fi
067d23c9
KY
10696
10697
10698
5476a9a4 10699if test "${HAVE_GTK}" = "yes"; then
067d23c9 10700
5476a9a4
GM
10701 if test "$with_toolkit_scroll_bars" != no; then
10702 with_toolkit_scroll_bars=yes
10703 fi
067d23c9 10704
5476a9a4
GM
10705 HAVE_GTK_FILE_SELECTION=no
10706 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10707#include <gtk/gtk.h>
10708"
10709if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
10710 HAVE_GTK_FILE_SELECTION=yes
10711else
10712 HAVE_GTK_FILE_SELECTION=no
10713fi
067d23c9 10714
5476a9a4
GM
10715 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
10716 for ac_func in gtk_file_selection_new
10717do :
10718 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
10719if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
10720 cat >>confdefs.h <<_ACEOF
10721#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 10722_ACEOF
067d23c9 10723
f199cab1 10724fi
5476a9a4
GM
10725done
10726
f199cab1 10727 fi
067d23c9 10728
067d23c9 10729
5476a9a4
GM
10730 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
10731 gtk_dialog_get_action_area gtk_widget_get_sensitive \
10732 gtk_widget_get_mapped gtk_adjustment_get_page_size \
10733 gtk_orientable_set_orientation \
10734 gtk_window_set_has_resize_grip
10735do :
10736 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10737ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10738eval as_val=\$$as_ac_var
10739 if test "x$as_val" = x""yes; then :
10740 cat >>confdefs.h <<_ACEOF
10741#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10742_ACEOF
067d23c9 10743
5476a9a4
GM
10744fi
10745done
067d23c9 10746
42dcba54
GM
10747
10748 term_header=gtkutil.h
5476a9a4 10749fi
067d23c9 10750
5476a9a4
GM
10751HAVE_DBUS=no
10752DBUS_OBJ=
10753if test "${with_dbus}" = "yes"; then
067d23c9 10754
5476a9a4 10755 succeeded=no
067d23c9 10756
5476a9a4
GM
10757 if test "$PKG_CONFIG" = "no" ; then
10758 HAVE_DBUS=no
f199cab1 10759 else
5476a9a4
GM
10760 PKG_CONFIG_MIN_VERSION=0.9.0
10761 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
10763$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 10764
5476a9a4
GM
10765 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
10766 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
10767 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
10768 edit_cflags="
10769 s,///*,/,g
10770 s/^/ /
10771 s/ -I/ $isystem/g
10772 s/^ //
10773 "
10774 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
10775 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
10777$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
10778 succeeded=yes
10779 else
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10781$as_echo "no" >&6; }
10782 DBUS_CFLAGS=""
10783 DBUS_LIBS=""
10784 ## If we have a custom action on failure, don't print errors, but
10785 ## do set a variable so people can do so.
10786 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
067d23c9 10787
5476a9a4 10788 fi
067d23c9 10789
15f79fcd 10790
067d23c9 10791
5476a9a4
GM
10792 else
10793 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10794 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10795 fi
067d23c9 10796 fi
067d23c9 10797
5476a9a4
GM
10798 if test $succeeded = yes; then
10799 HAVE_DBUS=yes
f199cab1 10800 else
5476a9a4 10801 HAVE_DBUS=no
f199cab1 10802 fi
067d23c9 10803
5476a9a4
GM
10804 if test "$HAVE_DBUS" = yes; then
10805 LIBS="$LIBS $DBUS_LIBS"
067d23c9 10806
5476a9a4 10807$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 10808
5476a9a4
GM
10809 for ac_func in dbus_watch_get_unix_fd \
10810 dbus_type_is_valid \
10811 dbus_validate_bus_name \
10812 dbus_validate_path \
10813 dbus_validate_interface \
10814 dbus_validate_member
10815do :
10816 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10817ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10818eval as_val=\$$as_ac_var
10819 if test "x$as_val" = x""yes; then :
10820 cat >>confdefs.h <<_ACEOF
10821#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10822_ACEOF
067d23c9 10823
5476a9a4
GM
10824fi
10825done
067d23c9 10826
5476a9a4
GM
10827 DBUS_OBJ=dbusbind.o
10828 fi
10829fi
067d23c9
KY
10830
10831
5476a9a4
GM
10832HAVE_GSETTINGS=no
10833if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 10834
5476a9a4 10835 succeeded=no
067d23c9 10836
5476a9a4
GM
10837 if test "$PKG_CONFIG" = "no" ; then
10838 HAVE_GSETTINGS=no
10839 else
10840 PKG_CONFIG_MIN_VERSION=0.9.0
10841 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
10843$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 10844
5476a9a4
GM
10845 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
10846 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
10847 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
10848 edit_cflags="
10849 s,///*,/,g
10850 s/^/ /
10851 s/ -I/ $isystem/g
10852 s/^ //
10853 "
10854 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
10855 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
10857$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
10858 succeeded=yes
10859 else
10860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10861$as_echo "no" >&6; }
10862 GSETTINGS_CFLAGS=""
10863 GSETTINGS_LIBS=""
10864 ## If we have a custom action on failure, don't print errors, but
10865 ## do set a variable so people can do so.
10866 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
0afb4571 10867
5476a9a4 10868 fi
067d23c9
KY
10869
10870
10871
10872 else
5476a9a4
GM
10873 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10874 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 10875 fi
5476a9a4 10876 fi
067d23c9 10877
5476a9a4
GM
10878 if test $succeeded = yes; then
10879 HAVE_GSETTINGS=yes
10880 else
10881 HAVE_GSETTINGS=no
10882 fi
f199cab1 10883
5476a9a4 10884 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 10885
5476a9a4 10886$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 10887
5476a9a4
GM
10888 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
10889 SETTINGS_LIBS="$GSETTINGS_LIBS"
10890 fi
10891fi
067d23c9 10892
5476a9a4
GM
10893HAVE_GCONF=no
10894if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 10895
5476a9a4 10896 succeeded=no
067d23c9 10897
5476a9a4
GM
10898 if test "$PKG_CONFIG" = "no" ; then
10899 HAVE_GCONF=no
10900 else
10901 PKG_CONFIG_MIN_VERSION=0.9.0
10902 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
10904$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 10905
5476a9a4
GM
10906 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
10907 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
10908 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
10909 edit_cflags="
10910 s,///*,/,g
10911 s/^/ /
10912 s/ -I/ $isystem/g
10913 s/^ //
10914 "
10915 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
10916 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
10918$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
10919 succeeded=yes
10920 else
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
10923 GCONF_CFLAGS=""
10924 GCONF_LIBS=""
10925 ## If we have a custom action on failure, don't print errors, but
10926 ## do set a variable so people can do so.
10927 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
067d23c9 10928
5476a9a4 10929 fi
f199cab1 10930
f199cab1
GM
10931
10932
5476a9a4
GM
10933 else
10934 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10935 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10936 fi
10937 fi
f199cab1 10938
5476a9a4
GM
10939 if test $succeeded = yes; then
10940 HAVE_GCONF=yes
10941 else
10942 HAVE_GCONF=no
10943 fi
f199cab1 10944
5476a9a4 10945 if test "$HAVE_GCONF" = yes; then
f199cab1 10946
5476a9a4 10947$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 10948
5476a9a4
GM
10949 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
10950 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
10951 fi
10952fi
f199cab1 10953
5476a9a4
GM
10954if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
10955 SAVE_CFLAGS="$CFLAGS"
10956 SAVE_LIBS="$LIBS"
10957 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
10958 LIBS="$SETTINGS_LIBS $LIBS"
10959 for ac_func in g_type_init
10960do :
10961 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
10962if test "x$ac_cv_func_g_type_init" = x""yes; then :
10963 cat >>confdefs.h <<_ACEOF
10964#define HAVE_G_TYPE_INIT 1
067d23c9 10965_ACEOF
067d23c9 10966
5476a9a4
GM
10967fi
10968done
067d23c9 10969
5476a9a4
GM
10970 CFLAGS="$SAVE_CFLAGS"
10971 LIBS="$SAVE_LIBS"
10972fi
067d23c9 10973
067d23c9 10974
f199cab1 10975
067d23c9 10976
5476a9a4
GM
10977HAVE_LIBSELINUX=no
10978LIBSELINUX_LIBS=
10979if test "${with_selinux}" = "yes"; then
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
10981$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
10982if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
10983 $as_echo_n "(cached) " >&6
10984else
10985 ac_check_lib_save_LIBS=$LIBS
10986LIBS="-lselinux $LIBS"
10987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10988/* end confdefs.h. */
067d23c9 10989
5476a9a4
GM
10990/* Override any GCC internal prototype to avoid an error.
10991 Use char because int might match the return type of a GCC
10992 builtin and then its argument prototype would still apply. */
10993#ifdef __cplusplus
10994extern "C"
f199cab1 10995#endif
5476a9a4 10996char lgetfilecon ();
f199cab1
GM
10997int
10998main ()
10999{
5476a9a4 11000return lgetfilecon ();
f199cab1
GM
11001 ;
11002 return 0;
11003}
11004_ACEOF
5476a9a4
GM
11005if ac_fn_c_try_link "$LINENO"; then :
11006 ac_cv_lib_selinux_lgetfilecon=yes
11007else
11008 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11009fi
5476a9a4
GM
11010rm -f core conftest.err conftest.$ac_objext \
11011 conftest$ac_exeext conftest.$ac_ext
11012LIBS=$ac_check_lib_save_LIBS
11013fi
11014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11015$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11016if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11017 HAVE_LIBSELINUX=yes
11018else
11019 HAVE_LIBSELINUX=no
067d23c9
KY
11020fi
11021
5476a9a4 11022 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11023
5476a9a4 11024$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11025
5476a9a4
GM
11026 LIBSELINUX_LIBS=-lselinux
11027 fi
f199cab1 11028fi
067d23c9 11029
067d23c9 11030
5476a9a4
GM
11031HAVE_GNUTLS=no
11032HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11033if test "${with_gnutls}" = "yes" ; then
067d23c9 11034
5476a9a4 11035 succeeded=no
067d23c9 11036
5476a9a4
GM
11037 if test "$PKG_CONFIG" = "no" ; then
11038 HAVE_GNUTLS=no
11039 else
11040 PKG_CONFIG_MIN_VERSION=0.9.0
11041 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11043$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11044
5476a9a4
GM
11045 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
11046 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
11047 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
11048 edit_cflags="
11049 s,///*,/,g
11050 s/^/ /
11051 s/ -I/ $isystem/g
11052 s/^ //
11053 "
11054 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11055 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11057$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11058 succeeded=yes
11059 else
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061$as_echo "no" >&6; }
11062 LIBGNUTLS_CFLAGS=""
11063 LIBGNUTLS_LIBS=""
11064 ## If we have a custom action on failure, don't print errors, but
11065 ## do set a variable so people can do so.
11066 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"`
067d23c9 11067
5476a9a4 11068 fi
067d23c9 11069
067d23c9 11070
067d23c9 11071
5476a9a4
GM
11072 else
11073 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11074 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11075 fi
11076 fi
067d23c9 11077
5476a9a4
GM
11078 if test $succeeded = yes; then
11079 HAVE_GNUTLS=yes
11080 else
11081 HAVE_GNUTLS=no
11082 fi
067d23c9 11083
5476a9a4 11084 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11085
5476a9a4 11086$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11087
5476a9a4 11088 fi
f199cab1 11089
5476a9a4
GM
11090 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11091 LIBS="$LIBGNUTLS_LIBS $LIBS"
11092 for ac_func in gnutls_certificate_set_verify_function
11093do :
11094 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11095if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11096 cat >>confdefs.h <<_ACEOF
11097#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 11098_ACEOF
5476a9a4
GM
11099 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11100fi
11101done
067d23c9
KY
11102
11103
5476a9a4
GM
11104 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11105
11106$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 11107
f199cab1 11108 fi
5476a9a4 11109fi
f527bd02 11110
f527bd02 11111
5476a9a4
GM
11112
11113
11114HAVE_XAW3D=no
11115LUCID_LIBW=
11116if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11117 if test "$with_xaw3d" != no; then
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11119$as_echo_n "checking for xaw3d... " >&6; }
11120 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
11121 $as_echo_n "(cached) " >&6
11122else
5476a9a4
GM
11123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11124/* end confdefs.h. */
f527bd02 11125
5476a9a4
GM
11126#include <X11/Intrinsic.h>
11127#include <X11/Xaw3d/Simple.h>
11128int
11129main ()
11130{
11131
11132 ;
11133 return 0;
11134}
11135_ACEOF
11136if ac_fn_c_try_link "$LINENO"; then :
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11138$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11139if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11140 $as_echo_n "(cached) " >&6
11141else
11142 ac_check_lib_save_LIBS=$LIBS
11143LIBS="-lXaw3d $LIBS"
11144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11145/* end confdefs.h. */
f527bd02 11146
5476a9a4
GM
11147/* Override any GCC internal prototype to avoid an error.
11148 Use char because int might match the return type of a GCC
11149 builtin and then its argument prototype would still apply. */
11150#ifdef __cplusplus
11151extern "C"
11152#endif
11153char XawScrollbarSetThumb ();
11154int
11155main ()
11156{
11157return XawScrollbarSetThumb ();
11158 ;
11159 return 0;
11160}
11161_ACEOF
11162if ac_fn_c_try_link "$LINENO"; then :
11163 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11164else
5476a9a4 11165 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11166fi
5476a9a4
GM
11167rm -f core conftest.err conftest.$ac_objext \
11168 conftest$ac_exeext conftest.$ac_ext
11169LIBS=$ac_check_lib_save_LIBS
11170fi
11171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11172$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11173if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11174 emacs_cv_xaw3d=yes
11175else
11176 emacs_cv_xaw3d=no
f199cab1 11177fi
f527bd02 11178
5476a9a4
GM
11179else
11180 emacs_cv_xaw3d=no
11181fi
11182rm -f core conftest.err conftest.$ac_objext \
11183 conftest$ac_exeext conftest.$ac_ext
11184fi
f527bd02 11185
5476a9a4
GM
11186 else
11187 emacs_cv_xaw3d=no
11188 fi
11189 if test $emacs_cv_xaw3d = yes; then
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11191$as_echo "yes; using Lucid toolkit" >&6; }
11192 USE_X_TOOLKIT=LUCID
11193 HAVE_XAW3D=yes
11194 LUCID_LIBW=-lXaw3d
f527bd02 11195
5476a9a4 11196$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11197
5476a9a4
GM
11198 else
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11200$as_echo "no" >&6; }
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11202$as_echo_n "checking for libXaw... " >&6; }
11203 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11204 $as_echo_n "(cached) " >&6
11205else
11206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11207/* end confdefs.h. */
067d23c9 11208
5476a9a4
GM
11209#include <X11/Intrinsic.h>
11210#include <X11/Xaw/Simple.h>
f199cab1
GM
11211int
11212main ()
11213{
067d23c9 11214
f199cab1
GM
11215 ;
11216 return 0;
11217}
11218_ACEOF
5476a9a4
GM
11219if ac_fn_c_try_link "$LINENO"; then :
11220 emacs_cv_xaw=yes
f199cab1 11221else
5476a9a4 11222 emacs_cv_xaw=no
f199cab1 11223fi
5476a9a4
GM
11224rm -f core conftest.err conftest.$ac_objext \
11225 conftest$ac_exeext conftest.$ac_ext
f199cab1 11226fi
067d23c9 11227
5476a9a4
GM
11228 if test $emacs_cv_xaw = yes; then
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11230$as_echo "yes; using Lucid toolkit" >&6; }
11231 USE_X_TOOLKIT=LUCID
11232 LUCID_LIBW=-lXaw
11233 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11234 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11235 else
5476a9a4
GM
11236 as_fn_error "No X toolkit could be found.
11237If you are sure you want Emacs compiled without an X toolkit, pass
11238 --with-x-toolkit=no
11239to configure. Otherwise, install the development libraries for the toolkit
11240that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11241 fi
5476a9a4
GM
11242 fi
11243fi
067d23c9 11244
5476a9a4 11245X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11246
5476a9a4
GM
11247LIBXTR6=
11248if test "${USE_X_TOOLKIT}" != "none"; then
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11250$as_echo_n "checking X11 toolkit version... " >&6; }
11251 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11252 $as_echo_n "(cached) " >&6
11253else
5476a9a4 11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11255/* end confdefs.h. */
5476a9a4 11256#include <X11/Intrinsic.h>
f199cab1
GM
11257int
11258main ()
11259{
5476a9a4
GM
11260#if XtSpecificationRelease < 6
11261fail;
11262#endif
f527bd02 11263
f199cab1
GM
11264 ;
11265 return 0;
11266}
067d23c9 11267_ACEOF
5476a9a4
GM
11268if ac_fn_c_try_link "$LINENO"; then :
11269 emacs_cv_x11_toolkit_version_6=yes
11270else
11271 emacs_cv_x11_toolkit_version_6=no
067d23c9 11272fi
5476a9a4
GM
11273rm -f core conftest.err conftest.$ac_objext \
11274 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11275fi
11276
5476a9a4
GM
11277 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11278 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11280$as_echo "6 or newer" >&6; }
f527bd02 11281
5476a9a4 11282$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11283
5476a9a4
GM
11284 LIBXTR6="-lSM -lICE"
11285 case "$opsys" in
11286 ## Use libw.a along with X11R6 Xt.
11287 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11288 esac
11289 else
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11291$as_echo "before 6" >&6; }
f199cab1 11292 fi
f527bd02 11293
5476a9a4
GM
11294 OLDLIBS="$LIBS"
11295 if test x$HAVE_X11XTR6 = xyes; then
11296 LIBS="-lXt -lSM -lICE $LIBS"
11297 else
11298 LIBS="-lXt $LIBS"
11299 fi
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11301$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11302if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11303 $as_echo_n "(cached) " >&6
11304else
11305 ac_check_lib_save_LIBS=$LIBS
11306LIBS="-lXmu $LIBS"
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11308/* end confdefs.h. */
f199cab1 11309
5476a9a4
GM
11310/* Override any GCC internal prototype to avoid an error.
11311 Use char because int might match the return type of a GCC
11312 builtin and then its argument prototype would still apply. */
11313#ifdef __cplusplus
11314extern "C"
11315#endif
11316char XmuConvertStandardSelection ();
067d23c9
KY
11317int
11318main ()
11319{
5476a9a4 11320return XmuConvertStandardSelection ();
067d23c9
KY
11321 ;
11322 return 0;
11323}
11324_ACEOF
5476a9a4
GM
11325if ac_fn_c_try_link "$LINENO"; then :
11326 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11327else
11328 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11329fi
5476a9a4
GM
11330rm -f core conftest.err conftest.$ac_objext \
11331 conftest$ac_exeext conftest.$ac_ext
11332LIBS=$ac_check_lib_save_LIBS
067d23c9 11333fi
5476a9a4
GM
11334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11335$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11336if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11337 cat >>confdefs.h <<_ACEOF
11338#define HAVE_LIBXMU 1
f199cab1
GM
11339_ACEOF
11340
5476a9a4 11341 LIBS="-lXmu $LIBS"
f199cab1 11342
067d23c9
KY
11343fi
11344
5476a9a4
GM
11345 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11346 fi
067d23c9 11347
067d23c9 11348
5476a9a4
GM
11349LIBXMU=-lXmu
11350case $opsys in
11351 ## These systems don't supply Xmu.
11352 hpux* | aix4-2 )
11353 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11354 ;;
11355esac
067d23c9
KY
11356
11357
5476a9a4
GM
11358# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11359if test "${HAVE_X11}" = "yes"; then
11360 if test "${USE_X_TOOLKIT}" != "none"; then
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11362$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11363if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11364 $as_echo_n "(cached) " >&6
11365else
5476a9a4
GM
11366 ac_check_lib_save_LIBS=$LIBS
11367LIBS="-lXext $LIBS"
11368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11369/* end confdefs.h. */
f199cab1 11370
5476a9a4
GM
11371/* Override any GCC internal prototype to avoid an error.
11372 Use char because int might match the return type of a GCC
11373 builtin and then its argument prototype would still apply. */
11374#ifdef __cplusplus
11375extern "C"
11376#endif
11377char XShapeQueryExtension ();
11378int
11379main ()
11380{
11381return XShapeQueryExtension ();
11382 ;
11383 return 0;
11384}
e7d4e61f 11385_ACEOF
5476a9a4
GM
11386if ac_fn_c_try_link "$LINENO"; then :
11387 ac_cv_lib_Xext_XShapeQueryExtension=yes
11388else
11389 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11390fi
5476a9a4
GM
11391rm -f core conftest.err conftest.$ac_objext \
11392 conftest$ac_exeext conftest.$ac_ext
11393LIBS=$ac_check_lib_save_LIBS
11394fi
11395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11396$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11397if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11398 cat >>confdefs.h <<_ACEOF
11399#define HAVE_LIBXEXT 1
11400_ACEOF
f199cab1 11401
5476a9a4 11402 LIBS="-lXext $LIBS"
f199cab1 11403
5476a9a4 11404fi
f199cab1 11405
5476a9a4
GM
11406 fi
11407fi
f199cab1 11408
5476a9a4
GM
11409LIBXP=
11410if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
11411 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11412 if test -d /usr/include/openmotif; then
11413 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11414 emacs_cv_openmotif=yes
11415 case "$canonical" in
11416 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11417 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11418 ;;
11419 *)
11420 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11421 esac
11422 else
11423 emacs_cv_openmotif=no
11424 fi
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11426$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 11427if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11428 $as_echo_n "(cached) " >&6
11429else
f199cab1
GM
11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11431/* end confdefs.h. */
5476a9a4
GM
11432#include <Xm/Xm.h>
11433int
11434main ()
11435{
11436#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11437int x = 5;
11438#else
11439Motif version prior to 2.1.
11440#endif
11441 ;
11442 return 0;
11443}
11444_ACEOF
11445if ac_fn_c_try_compile "$LINENO"; then :
11446 emacs_cv_motif_version_2_1=yes
11447else
11448 emacs_cv_motif_version_2_1=no
11449fi
11450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11451fi
11452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11453$as_echo "$emacs_cv_motif_version_2_1" >&6; }
11454 if test $emacs_cv_motif_version_2_1 = yes; then
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11456$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11457if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11458 $as_echo_n "(cached) " >&6
11459else
11460 ac_check_lib_save_LIBS=$LIBS
11461LIBS="-lXp $LIBS"
11462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h. */
f199cab1 11464
5476a9a4
GM
11465/* Override any GCC internal prototype to avoid an error.
11466 Use char because int might match the return type of a GCC
11467 builtin and then its argument prototype would still apply. */
11468#ifdef __cplusplus
11469extern "C"
11470#endif
11471char XpCreateContext ();
ae1362a3
AS
11472int
11473main ()
11474{
5476a9a4 11475return XpCreateContext ();
ae1362a3
AS
11476 ;
11477 return 0;
11478}
11479_ACEOF
5476a9a4
GM
11480if ac_fn_c_try_link "$LINENO"; then :
11481 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 11482else
5476a9a4 11483 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 11484fi
5476a9a4
GM
11485rm -f core conftest.err conftest.$ac_objext \
11486 conftest$ac_exeext conftest.$ac_ext
11487LIBS=$ac_check_lib_save_LIBS
11488fi
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11490$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
11491if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
11492 LIBXP=-lXp
067d23c9 11493fi
f199cab1 11494
8ad96b1d
GM
11495 if test x$emacs_cv_openmotif = xyes; then
11496 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
11497 fi
5476a9a4
GM
11498 else
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11500$as_echo_n "checking for LessTif where some systems put it... " >&6; }
11501if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 11502 $as_echo_n "(cached) " >&6
f199cab1 11503else
5476a9a4
GM
11504 # We put this in CFLAGS temporarily to precede other -I options
11505 # that might be in CFLAGS temporarily.
11506 # We put this in CPPFLAGS where it precedes the other -I options.
11507 OLD_CPPFLAGS=$CPPFLAGS
11508 OLD_CFLAGS=$CFLAGS
11509 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11510 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11512/* end confdefs.h. */
5476a9a4 11513#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
11514int
11515main ()
11516{
5476a9a4 11517int x = 5;
067d23c9
KY
11518 ;
11519 return 0;
11520}
11521_ACEOF
5476a9a4
GM
11522if ac_fn_c_try_compile "$LINENO"; then :
11523 emacs_cv_lesstif=yes
067d23c9 11524else
5476a9a4 11525 emacs_cv_lesstif=no
067d23c9 11526fi
5476a9a4 11527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 11528fi
5476a9a4
GM
11529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
11530$as_echo "$emacs_cv_lesstif" >&6; }
11531 if test $emacs_cv_lesstif = yes; then
11532 # Make sure this -I option remains in CPPFLAGS after it is set
11533 # back to REAL_CPPFLAGS.
11534 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11535 # have those other -I options anyway. Ultimately, having this
11536 # directory ultimately in CPPFLAGS will be enough.
11537 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11538 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11539 else
11540 CFLAGS=$OLD_CFLAGS
11541 CPPFLAGS=$OLD_CPPFLAGS
11542 fi
11543 fi
11544 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
11545if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 11546
5476a9a4
GM
11547else
11548 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 11549fi
f199cab1
GM
11550
11551
5476a9a4 11552fi
f199cab1
GM
11553
11554
5476a9a4
GM
11555USE_TOOLKIT_SCROLL_BARS=no
11556if test "${with_toolkit_scroll_bars}" != "no"; then
11557 if test "${USE_X_TOOLKIT}" != "none"; then
11558 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11559 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11560
5476a9a4
GM
11561 HAVE_XAW3D=no
11562 USE_TOOLKIT_SCROLL_BARS=yes
11563 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
11564 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11565
5476a9a4
GM
11566 USE_TOOLKIT_SCROLL_BARS=yes
11567 fi
11568 elif test "${HAVE_GTK}" = "yes"; then
11569 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11570
5476a9a4
GM
11571 USE_TOOLKIT_SCROLL_BARS=yes
11572 elif test "${HAVE_NS}" = "yes"; then
11573 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11574
5476a9a4
GM
11575 USE_TOOLKIT_SCROLL_BARS=yes
11576 fi
11577fi
f199cab1 11578
5476a9a4 11579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11580/* end confdefs.h. */
5476a9a4
GM
11581
11582 #include <X11/Xlib.h>
11583 #include <X11/Xresource.h>
067d23c9
KY
11584int
11585main ()
11586{
5476a9a4 11587XIMProc callback;
067d23c9
KY
11588 ;
11589 return 0;
11590}
11591_ACEOF
f199cab1 11592if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
11593 HAVE_XIM=yes
11594
11595$as_echo "#define HAVE_XIM 1" >>confdefs.h
11596
067d23c9 11597else
5476a9a4 11598 HAVE_XIM=no
067d23c9 11599fi
f199cab1 11600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 11601
f199cab1 11602
5476a9a4
GM
11603if test "${with_xim}" != "no"; then
11604
11605$as_echo "#define USE_XIM 1" >>confdefs.h
11606
11607fi
11608
11609
11610if test "${HAVE_XIM}" != "no"; then
11611 late_CFLAGS=$CFLAGS
11612 if test "$GCC" = yes; then
11613 CFLAGS="$CFLAGS --pedantic-errors"
11614 fi
11615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616/* end confdefs.h. */
f199cab1 11617
5476a9a4
GM
11618#include <X11/Xlib.h>
11619#include <X11/Xresource.h>
11620int
11621main ()
11622{
11623Display *display;
11624XrmDatabase db;
11625char *res_name;
11626char *res_class;
11627XIMProc callback;
11628XPointer *client_data;
11629#ifndef __GNUC__
11630/* If we're not using GCC, it's probably not XFree86, and this is
11631 probably right, but we can't use something like --pedantic-errors. */
11632extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11633 char*, XIMProc, XPointer*);
11634#endif
11635(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11636 client_data);
067d23c9
KY
11637 ;
11638 return 0;
11639}
11640_ACEOF
5476a9a4
GM
11641if ac_fn_c_try_compile "$LINENO"; then :
11642 emacs_cv_arg6_star=yes
067d23c9 11643fi
f199cab1 11644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
11645 if test "$emacs_cv_arg6_star" = yes; then
11646 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
11647
11648 else
11649 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 11650
5476a9a4
GM
11651 fi
11652 CFLAGS=$late_CFLAGS
067d23c9
KY
11653fi
11654
5476a9a4
GM
11655### Start of font-backend (under any platform) section.
11656# (nothing here yet -- this is a placeholder)
11657### End of font-backend (under any platform) section.
067d23c9 11658
5476a9a4
GM
11659### Start of font-backend (under X11) section.
11660if test "${HAVE_X11}" = "yes"; then
067d23c9 11661
5476a9a4 11662 succeeded=no
067d23c9 11663
5476a9a4
GM
11664 if test "$PKG_CONFIG" = "no" ; then
11665 HAVE_FC=no
11666 else
11667 PKG_CONFIG_MIN_VERSION=0.9.0
11668 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
11670$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 11671
5476a9a4
GM
11672 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
11673 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
11674 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
11675 edit_cflags="
11676 s,///*,/,g
11677 s/^/ /
11678 s/ -I/ $isystem/g
11679 s/^ //
11680 "
11681 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
11682 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
11683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
11684$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
11685 succeeded=yes
11686 else
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11688$as_echo "no" >&6; }
11689 FONTCONFIG_CFLAGS=""
11690 FONTCONFIG_LIBS=""
11691 ## If we have a custom action on failure, don't print errors, but
11692 ## do set a variable so people can do so.
11693 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
f199cab1 11694
5476a9a4 11695 fi
f199cab1
GM
11696
11697
11698
f199cab1 11699 else
5476a9a4
GM
11700 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11701 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11702 fi
11703 fi
f199cab1 11704
5476a9a4
GM
11705 if test $succeeded = yes; then
11706 HAVE_FC=yes
11707 else
11708 HAVE_FC=no
11709 fi
f199cab1 11710
067d23c9 11711
5476a9a4
GM
11712 ## Use -lXft if available, unless `--with-xft=no'.
11713 HAVE_XFT=maybe
11714 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
11715 with_xft="no";
11716 fi
11717 if test "x${with_xft}" != "xno"; then
f199cab1 11718
f199cab1 11719
5476a9a4 11720 succeeded=no
f199cab1 11721
5476a9a4
GM
11722 if test "$PKG_CONFIG" = "no" ; then
11723 HAVE_XFT=no
11724 else
11725 PKG_CONFIG_MIN_VERSION=0.9.0
11726 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
11728$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 11729
5476a9a4
GM
11730 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
11731 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
11732 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
11733 edit_cflags="
11734 s,///*,/,g
11735 s/^/ /
11736 s/ -I/ $isystem/g
11737 s/^ //
11738 "
11739 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
11740 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
11742$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
11743 succeeded=yes
11744 else
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11746$as_echo "no" >&6; }
11747 XFT_CFLAGS=""
11748 XFT_LIBS=""
11749 ## If we have a custom action on failure, don't print errors, but
11750 ## do set a variable so people can do so.
11751 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
f199cab1 11752
5476a9a4 11753 fi
f199cab1
GM
11754
11755
11756
5476a9a4
GM
11757 else
11758 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11759 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11760 fi
11761 fi
f199cab1 11762
5476a9a4
GM
11763 if test $succeeded = yes; then
11764 :
f199cab1 11765 else
5476a9a4 11766 HAVE_XFT=no
f199cab1
GM
11767 fi
11768
5476a9a4
GM
11769 ## Because xftfont.c uses XRenderQueryExtension, we also
11770 ## need to link to -lXrender.
11771 HAVE_XRENDER=no
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
11773$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
11774if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
11775 $as_echo_n "(cached) " >&6
11776else
11777 ac_check_lib_save_LIBS=$LIBS
11778LIBS="-lXrender $LIBS"
11779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11780/* end confdefs.h. */
f199cab1 11781
5476a9a4
GM
11782/* Override any GCC internal prototype to avoid an error.
11783 Use char because int might match the return type of a GCC
11784 builtin and then its argument prototype would still apply. */
11785#ifdef __cplusplus
11786extern "C"
11787#endif
11788char XRenderQueryExtension ();
11789int
11790main ()
11791{
11792return XRenderQueryExtension ();
11793 ;
11794 return 0;
11795}
11796_ACEOF
11797if ac_fn_c_try_link "$LINENO"; then :
11798 ac_cv_lib_Xrender_XRenderQueryExtension=yes
11799else
11800 ac_cv_lib_Xrender_XRenderQueryExtension=no
11801fi
11802rm -f core conftest.err conftest.$ac_objext \
11803 conftest$ac_exeext conftest.$ac_ext
11804LIBS=$ac_check_lib_save_LIBS
11805fi
11806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
11807$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
11808if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
11809 HAVE_XRENDER=yes
11810fi
f199cab1 11811
5476a9a4
GM
11812 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
11813 OLD_CPPFLAGS="$CPPFLAGS"
11814 OLD_CFLAGS="$CFLAGS"
11815 OLD_LIBS="$LIBS"
11816 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11817 CFLAGS="$CFLAGS $XFT_CFLAGS"
11818 XFT_LIBS="-lXrender $XFT_LIBS"
11819 LIBS="$XFT_LIBS $LIBS"
11820 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
11821if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
11823$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
11824if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
11825 $as_echo_n "(cached) " >&6
11826else
11827 ac_check_lib_save_LIBS=$LIBS
11828LIBS="-lXft $XFT_LIBS $LIBS"
11829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11830/* end confdefs.h. */
f199cab1 11831
5476a9a4
GM
11832/* Override any GCC internal prototype to avoid an error.
11833 Use char because int might match the return type of a GCC
11834 builtin and then its argument prototype would still apply. */
11835#ifdef __cplusplus
11836extern "C"
11837#endif
11838char XftFontOpen ();
11839int
11840main ()
11841{
11842return XftFontOpen ();
11843 ;
11844 return 0;
11845}
067d23c9 11846_ACEOF
5476a9a4
GM
11847if ac_fn_c_try_link "$LINENO"; then :
11848 ac_cv_lib_Xft_XftFontOpen=yes
11849else
11850 ac_cv_lib_Xft_XftFontOpen=no
11851fi
11852rm -f core conftest.err conftest.$ac_objext \
11853 conftest$ac_exeext conftest.$ac_ext
11854LIBS=$ac_check_lib_save_LIBS
11855fi
11856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11857$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
11858if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
11859 HAVE_XFT=yes
f199cab1
GM
11860fi
11861
5476a9a4 11862fi
f199cab1
GM
11863
11864
f199cab1 11865
5476a9a4 11866 if test "${HAVE_XFT}" = "yes"; then
f199cab1 11867
5476a9a4 11868$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 11869
067d23c9 11870
5476a9a4
GM
11871 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
11872 else
11873 CPPFLAGS="$OLD_CPPFLAGS"
11874 CFLAGS="$OLD_CFLAGS"
11875 LIBS="$OLD_LIBS"
11876 fi # "${HAVE_XFT}" = "yes"
11877 fi # "$HAVE_XFT" != no
11878 fi # "x${with_xft}" != "xno"
f199cab1 11879
5476a9a4
GM
11880 ## We used to allow building with FreeType and without Xft.
11881 ## However, the ftx font backend driver is not in good shape.
11882 if test "$HAVE_XFT" != "yes"; then
11883 HAVE_XFT=no
11884 HAVE_FREETYPE=no
11885 else
f199cab1 11886
5476a9a4 11887 succeeded=no
f199cab1 11888
5476a9a4
GM
11889 if test "$PKG_CONFIG" = "no" ; then
11890 HAVE_FREETYPE=no
11891 else
11892 PKG_CONFIG_MIN_VERSION=0.9.0
11893 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
11895$as_echo_n "checking for freetype2... " >&6; }
f199cab1 11896
5476a9a4
GM
11897 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
11898 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
11899 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
11900 edit_cflags="
11901 s,///*,/,g
11902 s/^/ /
11903 s/ -I/ $isystem/g
11904 s/^ //
11905 "
11906 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
11907 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
11908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
11909$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
11910 succeeded=yes
11911 else
11912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11913$as_echo "no" >&6; }
11914 FREETYPE_CFLAGS=""
11915 FREETYPE_LIBS=""
11916 ## If we have a custom action on failure, don't print errors, but
11917 ## do set a variable so people can do so.
11918 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
f199cab1 11919
5476a9a4 11920 fi
f199cab1 11921
f199cab1 11922
067d23c9 11923
5476a9a4
GM
11924 else
11925 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11926 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11927 fi
067d23c9 11928 fi
f199cab1 11929
5476a9a4
GM
11930 if test $succeeded = yes; then
11931 HAVE_FREETYPE=yes
11932 else
11933 HAVE_FREETYPE=no
11934 fi
f199cab1 11935
f199cab1 11936
5476a9a4
GM
11937 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
11938 fi
f199cab1 11939
5476a9a4
GM
11940 HAVE_LIBOTF=no
11941 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 11942
5476a9a4 11943$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 11944
5476a9a4 11945 if test "${with_libotf}" != "no"; then
f199cab1 11946
5476a9a4 11947 succeeded=no
f199cab1 11948
5476a9a4
GM
11949 if test "$PKG_CONFIG" = "no" ; then
11950 HAVE_LIBOTF=no
11951 else
11952 PKG_CONFIG_MIN_VERSION=0.9.0
11953 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
11955$as_echo_n "checking for libotf... " >&6; }
f199cab1 11956
5476a9a4
GM
11957 if $PKG_CONFIG --exists "libotf" 2>&5 &&
11958 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
11959 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
11960 edit_cflags="
11961 s,///*,/,g
11962 s/^/ /
11963 s/ -I/ $isystem/g
11964 s/^ //
11965 "
11966 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
11967 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
11969$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
11970 succeeded=yes
11971 else
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11973$as_echo "no" >&6; }
11974 LIBOTF_CFLAGS=""
11975 LIBOTF_LIBS=""
11976 ## If we have a custom action on failure, don't print errors, but
11977 ## do set a variable so people can do so.
11978 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
067d23c9 11979
5476a9a4 11980 fi
f199cab1
GM
11981
11982
067d23c9 11983
5476a9a4
GM
11984 else
11985 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11986 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11987 fi
11988 fi
f199cab1 11989
5476a9a4
GM
11990 if test $succeeded = yes; then
11991 HAVE_LIBOTF=yes
11992 else
11993 HAVE_LIBOTF=no
11994 fi
f199cab1 11995
5476a9a4 11996 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 11997
5476a9a4 11998$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 11999
5476a9a4
GM
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12001$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12002if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12003 $as_echo_n "(cached) " >&6
12004else
5476a9a4
GM
12005 ac_check_lib_save_LIBS=$LIBS
12006LIBS="-lotf $LIBS"
12007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12008/* end confdefs.h. */
5476a9a4
GM
12009
12010/* Override any GCC internal prototype to avoid an error.
12011 Use char because int might match the return type of a GCC
12012 builtin and then its argument prototype would still apply. */
12013#ifdef __cplusplus
12014extern "C"
12015#endif
12016char OTF_get_variation_glyphs ();
067d23c9
KY
12017int
12018main ()
12019{
5476a9a4 12020return OTF_get_variation_glyphs ();
067d23c9
KY
12021 ;
12022 return 0;
12023}
12024_ACEOF
5476a9a4
GM
12025if ac_fn_c_try_link "$LINENO"; then :
12026 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 12027else
5476a9a4 12028 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 12029fi
5476a9a4
GM
12030rm -f core conftest.err conftest.$ac_objext \
12031 conftest$ac_exeext conftest.$ac_ext
12032LIBS=$ac_check_lib_save_LIBS
12033fi
12034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12035$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12036if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12037 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12038else
12039 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 12040fi
067d23c9 12041
5476a9a4
GM
12042 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12043
12044$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12045
12046 fi
12047 fi
12048 fi
12049 fi
12050
12051 HAVE_M17N_FLT=no
12052 if test "${HAVE_LIBOTF}" = yes; then
12053 if test "${with_m17n_flt}" != "no"; then
12054
12055 succeeded=no
12056
12057 if test "$PKG_CONFIG" = "no" ; then
12058 HAVE_M17N_FLT=no
12059 else
12060 PKG_CONFIG_MIN_VERSION=0.9.0
12061 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12063$as_echo_n "checking for m17n-flt... " >&6; }
12064
12065 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
12066 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
12067 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
12068 edit_cflags="
12069 s,///*,/,g
12070 s/^/ /
12071 s/ -I/ $isystem/g
12072 s/^ //
12073 "
12074 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12075 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12077$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12078 succeeded=yes
12079 else
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12081$as_echo "no" >&6; }
12082 M17N_FLT_CFLAGS=""
12083 M17N_FLT_LIBS=""
12084 ## If we have a custom action on failure, don't print errors, but
12085 ## do set a variable so people can do so.
12086 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
12087
12088 fi
12089
12090
067d23c9 12091
5476a9a4
GM
12092 else
12093 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12094 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12095 fi
f199cab1 12096 fi
067d23c9 12097
5476a9a4
GM
12098 if test $succeeded = yes; then
12099 HAVE_M17N_FLT=yes
12100 else
12101 HAVE_M17N_FLT=no
12102 fi
12103
12104 if test "$HAVE_M17N_FLT" = "yes"; then
12105
12106$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12107
12108 fi
12109 fi
12110 fi
12111else
12112 HAVE_XFT=no
12113 HAVE_FREETYPE=no
12114 HAVE_LIBOTF=no
12115 HAVE_M17N_FLT=no
12116fi
12117
12118### End of font-backend (under X11) section.
12119
12120
067d23c9 12121
067d23c9 12122
5476a9a4
GM
12123
12124
12125
12126
12127
12128
12129### Use -lXpm if available, unless `--with-xpm=no'.
12130HAVE_XPM=no
12131LIBXPM=
12132if test "${HAVE_X11}" = "yes"; then
12133 if test "${with_xpm}" != "no"; then
12134 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12135if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12137$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12138if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
12139 $as_echo_n "(cached) " >&6
12140else
5476a9a4
GM
12141 ac_check_lib_save_LIBS=$LIBS
12142LIBS="-lXpm -lX11 $LIBS"
12143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12144/* end confdefs.h. */
12145
5476a9a4
GM
12146/* Override any GCC internal prototype to avoid an error.
12147 Use char because int might match the return type of a GCC
12148 builtin and then its argument prototype would still apply. */
12149#ifdef __cplusplus
12150extern "C"
12151#endif
12152char XpmReadFileToPixmap ();
067d23c9
KY
12153int
12154main ()
12155{
5476a9a4 12156return XpmReadFileToPixmap ();
067d23c9
KY
12157 ;
12158 return 0;
12159}
12160_ACEOF
5476a9a4
GM
12161if ac_fn_c_try_link "$LINENO"; then :
12162 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12163else
5476a9a4 12164 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12165fi
5476a9a4
GM
12166rm -f core conftest.err conftest.$ac_objext \
12167 conftest$ac_exeext conftest.$ac_ext
12168LIBS=$ac_check_lib_save_LIBS
12169fi
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12171$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12172if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12173 HAVE_XPM=yes
f199cab1 12174fi
067d23c9
KY
12175
12176fi
12177
12178
5476a9a4
GM
12179 if test "${HAVE_XPM}" = "yes"; then
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12181$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12183/* end confdefs.h. */
12184#include "X11/xpm.h"
12185#ifndef XpmReturnAllocPixels
12186no_return_alloc_pixels
12187#endif
067d23c9 12188
067d23c9 12189_ACEOF
5476a9a4
GM
12190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12191 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12192 HAVE_XPM=no
12193else
12194 HAVE_XPM=yes
12195fi
12196rm -f conftest*
067d23c9 12197
067d23c9 12198
5476a9a4
GM
12199 if test "${HAVE_XPM}" = "yes"; then
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12201$as_echo "yes" >&6; }
12202 else
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12204$as_echo "no" >&6; }
12205 fi
12206 fi
12207 fi
067d23c9 12208
5476a9a4 12209 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12210
5476a9a4 12211$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12212
5476a9a4
GM
12213 LIBXPM=-lXpm
12214 fi
067d23c9
KY
12215fi
12216
f199cab1 12217
5476a9a4
GM
12218### Use -ljpeg if available, unless `--with-jpeg=no'.
12219HAVE_JPEG=no
12220LIBJPEG=
12221if test "${HAVE_X11}" = "yes"; then
12222 if test "${with_jpeg}" != "no"; then
12223 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12224if test "x$ac_cv_header_jerror_h" = x""yes; then :
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12226$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12227if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12228 $as_echo_n "(cached) " >&6
12229else
5476a9a4
GM
12230 ac_check_lib_save_LIBS=$LIBS
12231LIBS="-ljpeg $LIBS"
12232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12233/* end confdefs.h. */
f199cab1 12234
5476a9a4
GM
12235/* Override any GCC internal prototype to avoid an error.
12236 Use char because int might match the return type of a GCC
12237 builtin and then its argument prototype would still apply. */
12238#ifdef __cplusplus
12239extern "C"
12240#endif
12241char jpeg_destroy_compress ();
067d23c9
KY
12242int
12243main ()
12244{
5476a9a4 12245return jpeg_destroy_compress ();
067d23c9
KY
12246 ;
12247 return 0;
12248}
12249_ACEOF
12250if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12251 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12252else
5476a9a4 12253 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12254fi
12255rm -f core conftest.err conftest.$ac_objext \
12256 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12257LIBS=$ac_check_lib_save_LIBS
12258fi
12259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12260$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12261if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12262 HAVE_JPEG=yes
12263fi
12264
067d23c9 12265fi
f199cab1 12266
f199cab1
GM
12267
12268 fi
067d23c9 12269
5476a9a4
GM
12270 if test "${HAVE_JPEG}" = "yes"; then
12271 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12272
5476a9a4
GM
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274/* end confdefs.h. */
12275#include <jpeglib.h>
12276 version=JPEG_LIB_VERSION
f199cab1 12277
5476a9a4
GM
12278_ACEOF
12279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12280 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12281 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12282
5476a9a4
GM
12283else
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12285$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12286 HAVE_JPEG=no
067d23c9 12287fi
5476a9a4 12288rm -f conftest*
067d23c9 12289
5476a9a4
GM
12290 fi
12291 if test "${HAVE_JPEG}" = "yes"; then
12292 LIBJPEG=-ljpeg
12293 fi
12294fi
067d23c9
KY
12295
12296
5476a9a4
GM
12297### Use -lpng if available, unless `--with-png=no'.
12298HAVE_PNG=no
12299LIBPNG=
12300if test "${HAVE_X11}" = "yes"; then
12301 if test "${with_png}" != "no"; then
12302 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12303 # in /usr/include/libpng.
12304 for ac_header in png.h libpng/png.h
12305do :
12306 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12307ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12308eval as_val=\$$as_ac_Header
12309 if test "x$as_val" = x""yes; then :
12310 cat >>confdefs.h <<_ACEOF
12311#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12312_ACEOF
12313 break
12314fi
067d23c9 12315
5476a9a4 12316done
067d23c9 12317
5476a9a4
GM
12318 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12320$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12321if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12322 $as_echo_n "(cached) " >&6
12323else
12324 ac_check_lib_save_LIBS=$LIBS
12325LIBS="-lpng -lz -lm $LIBS"
12326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327/* end confdefs.h. */
067d23c9 12328
5476a9a4
GM
12329/* Override any GCC internal prototype to avoid an error.
12330 Use char because int might match the return type of a GCC
12331 builtin and then its argument prototype would still apply. */
12332#ifdef __cplusplus
12333extern "C"
12334#endif
12335char png_get_channels ();
12336int
12337main ()
12338{
12339return png_get_channels ();
12340 ;
12341 return 0;
12342}
12343_ACEOF
12344if ac_fn_c_try_link "$LINENO"; then :
12345 ac_cv_lib_png_png_get_channels=yes
f199cab1 12346else
5476a9a4
GM
12347 ac_cv_lib_png_png_get_channels=no
12348fi
12349rm -f core conftest.err conftest.$ac_objext \
12350 conftest$ac_exeext conftest.$ac_ext
12351LIBS=$ac_check_lib_save_LIBS
12352fi
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12354$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12355if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12356 HAVE_PNG=yes
f199cab1 12357fi
067d23c9 12358
5476a9a4
GM
12359 fi
12360 fi
7834125e 12361
5476a9a4
GM
12362 if test "${HAVE_PNG}" = "yes"; then
12363
12364$as_echo "#define HAVE_PNG 1" >>confdefs.h
12365
12366 LIBPNG="-lpng -lz -lm"
12367
12368 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
12369 # include <libpng/png.h>
12370 #else
12371 # include <png.h>
12372 #endif
12373
12374"
12375if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
12376
12377else
7834125e 12378
5476a9a4 12379$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 12380
f199cab1 12381fi
7834125e 12382
5476a9a4
GM
12383 fi
12384fi
7834125e
GM
12385
12386
5476a9a4
GM
12387### Use -ltiff if available, unless `--with-tiff=no'.
12388HAVE_TIFF=no
12389LIBTIFF=
12390if test "${HAVE_X11}" = "yes"; then
12391 if test "${with_tiff}" != "no"; then
12392 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
12393if test "x$ac_cv_header_tiffio_h" = x""yes; then :
12394 tifflibs="-lz -lm"
12395 # At least one tiff package requires the jpeg library.
12396 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12398$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
12399if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
12400 $as_echo_n "(cached) " >&6
12401else
5476a9a4
GM
12402 ac_check_lib_save_LIBS=$LIBS
12403LIBS="-ltiff $tifflibs $LIBS"
12404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12405/* end confdefs.h. */
067d23c9 12406
5476a9a4
GM
12407/* Override any GCC internal prototype to avoid an error.
12408 Use char because int might match the return type of a GCC
12409 builtin and then its argument prototype would still apply. */
12410#ifdef __cplusplus
12411extern "C"
f199cab1 12412#endif
5476a9a4
GM
12413char TIFFGetVersion ();
12414int
12415main ()
12416{
12417return TIFFGetVersion ();
12418 ;
12419 return 0;
12420}
f199cab1 12421_ACEOF
5476a9a4
GM
12422if ac_fn_c_try_link "$LINENO"; then :
12423 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 12424else
5476a9a4 12425 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 12426fi
5476a9a4
GM
12427rm -f core conftest.err conftest.$ac_objext \
12428 conftest$ac_exeext conftest.$ac_ext
12429LIBS=$ac_check_lib_save_LIBS
f199cab1 12430fi
5476a9a4
GM
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
12432$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
12433if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
12434 HAVE_TIFF=yes
f199cab1 12435fi
067d23c9 12436
5476a9a4 12437fi
067d23c9 12438
067d23c9 12439
5476a9a4 12440 fi
f199cab1 12441
5476a9a4 12442 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 12443
5476a9a4 12444$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 12445
5476a9a4
GM
12446 LIBTIFF=-ltiff
12447 fi
f199cab1 12448fi
067d23c9 12449
067d23c9 12450
5476a9a4
GM
12451### Use -lgif or -lungif if available, unless `--with-gif=no'.
12452HAVE_GIF=no
12453LIBGIF=
12454if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
12455 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
12456if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
12457 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12458# Earlier versions can crash Emacs.
12459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
12460$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
12461if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
12462 $as_echo_n "(cached) " >&6
12463else
5476a9a4
GM
12464 ac_check_lib_save_LIBS=$LIBS
12465LIBS="-lgif $LIBS"
12466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12467/* end confdefs.h. */
067d23c9 12468
5476a9a4
GM
12469/* Override any GCC internal prototype to avoid an error.
12470 Use char because int might match the return type of a GCC
12471 builtin and then its argument prototype would still apply. */
12472#ifdef __cplusplus
12473extern "C"
12474#endif
12475char EGifPutExtensionLast ();
f199cab1
GM
12476int
12477main ()
12478{
5476a9a4 12479return EGifPutExtensionLast ();
f199cab1
GM
12480 ;
12481 return 0;
12482}
12483_ACEOF
5476a9a4
GM
12484if ac_fn_c_try_link "$LINENO"; then :
12485 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 12486else
5476a9a4 12487 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 12488fi
5476a9a4
GM
12489rm -f core conftest.err conftest.$ac_objext \
12490 conftest$ac_exeext conftest.$ac_ext
12491LIBS=$ac_check_lib_save_LIBS
12492fi
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
12494$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
12495if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
12496 HAVE_GIF=yes
12497else
12498 HAVE_GIF=maybe
f199cab1 12499fi
067d23c9 12500
5476a9a4
GM
12501fi
12502
12503
12504
12505 if test "$HAVE_GIF" = yes; then
12506 LIBGIF=-lgif
12507 elif test "$HAVE_GIF" = maybe; then
12508# If gif_lib.h but no libgif, try libungif.
12509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
12510$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
12511if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
12512 $as_echo_n "(cached) " >&6
12513else
5476a9a4
GM
12514 ac_check_lib_save_LIBS=$LIBS
12515LIBS="-lungif $LIBS"
12516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12517/* end confdefs.h. */
f199cab1 12518
5476a9a4
GM
12519/* Override any GCC internal prototype to avoid an error.
12520 Use char because int might match the return type of a GCC
12521 builtin and then its argument prototype would still apply. */
12522#ifdef __cplusplus
12523extern "C"
12524#endif
12525char EGifPutExtensionLast ();
f199cab1
GM
12526int
12527main ()
12528{
5476a9a4 12529return EGifPutExtensionLast ();
f199cab1
GM
12530 ;
12531 return 0;
12532}
12533_ACEOF
5476a9a4
GM
12534if ac_fn_c_try_link "$LINENO"; then :
12535 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 12536else
5476a9a4 12537 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 12538fi
5476a9a4
GM
12539rm -f core conftest.err conftest.$ac_objext \
12540 conftest$ac_exeext conftest.$ac_ext
12541LIBS=$ac_check_lib_save_LIBS
f199cab1 12542fi
5476a9a4
GM
12543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
12544$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
12545if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
12546 HAVE_GIF=yes
12547else
12548 HAVE_GIF=no
12549fi
12550
12551 test "$HAVE_GIF" = yes && LIBGIF=-lungif
12552 fi
12553
12554 if test "${HAVE_GIF}" = "yes"; then
12555
12556$as_echo "#define HAVE_GIF 1" >>confdefs.h
12557
12558 fi
12559fi
12560
12561
12562if test "${HAVE_X11}" = "yes"; then
12563 MISSING=""
12564 WITH_NO=""
12565 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
12566 MISSING="libXpm" && WITH_NO="--with-xpm=no"
12567 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
12568 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
12569 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
12570 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
12571 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
12572 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
12573 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
12574 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
12575
12576 if test "X${MISSING}" != X; then
12577 as_fn_error "The following required libraries were not found:
12578 $MISSING
12579Maybe some development libraries/packages are missing?
12580If you don't want to link with them give
12581 $WITH_NO
12582as options to configure" "$LINENO" 5
12583 fi
12584fi
12585
12586### Use -lgpm if available, unless `--with-gpm=no'.
12587HAVE_GPM=no
12588LIBGPM=
12589if test "${with_gpm}" != "no"; then
12590 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
12591if test "x$ac_cv_header_gpm_h" = x""yes; then :
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
12593$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
12594if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
12595 $as_echo_n "(cached) " >&6
12596else
5476a9a4
GM
12597 ac_check_lib_save_LIBS=$LIBS
12598LIBS="-lgpm $LIBS"
12599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12600/* end confdefs.h. */
12601
5476a9a4
GM
12602/* Override any GCC internal prototype to avoid an error.
12603 Use char because int might match the return type of a GCC
12604 builtin and then its argument prototype would still apply. */
12605#ifdef __cplusplus
12606extern "C"
12607#endif
12608char Gpm_Open ();
067d23c9
KY
12609int
12610main ()
12611{
5476a9a4 12612return Gpm_Open ();
067d23c9
KY
12613 ;
12614 return 0;
12615}
12616_ACEOF
5476a9a4
GM
12617if ac_fn_c_try_link "$LINENO"; then :
12618 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 12619else
5476a9a4 12620 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 12621fi
5476a9a4
GM
12622rm -f core conftest.err conftest.$ac_objext \
12623 conftest$ac_exeext conftest.$ac_ext
12624LIBS=$ac_check_lib_save_LIBS
12625fi
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12627$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
12628if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
12629 HAVE_GPM=yes
067d23c9 12630fi
f199cab1 12631
5476a9a4 12632fi
f199cab1 12633
f199cab1 12634
f199cab1 12635
5476a9a4 12636 if test "${HAVE_GPM}" = "yes"; then
f199cab1 12637
5476a9a4 12638$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 12639
5476a9a4
GM
12640 LIBGPM=-lgpm
12641 fi
067d23c9 12642fi
067d23c9
KY
12643
12644
12645
12646
12647
12648
5476a9a4
GM
12649GNUSTEP_CFLAGS=
12650### Use NeXTstep API to implement GUI.
12651if test "${HAVE_NS}" = "yes"; then
067d23c9 12652
5476a9a4 12653$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 12654
5476a9a4 12655 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 12656
5476a9a4 12657$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 12658
5476a9a4
GM
12659 fi
12660 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 12661
5476a9a4 12662$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 12663
5476a9a4
GM
12664 # See also .m.o rule in Makefile.in */
12665 # FIXME: are all these flags really needed? Document here why. */
12666 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
12667 ## Extra CFLAGS applied to src/*.m files.
12668 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
12669 fi
12670 # We also have mouse menus.
12671 HAVE_MENUS=yes
12672 OTHER_FILES=ns-app
12673fi
f199cab1
GM
12674
12675
5476a9a4
GM
12676### Use session management (-lSM -lICE) if available
12677HAVE_X_SM=no
12678LIBXSM=
12679if test "${HAVE_X11}" = "yes"; then
12680 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
12681if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
12683$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
12684if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
12685 $as_echo_n "(cached) " >&6
12686else
5476a9a4
GM
12687 ac_check_lib_save_LIBS=$LIBS
12688LIBS="-lSM -lICE $LIBS"
12689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12690/* end confdefs.h. */
12691
5476a9a4
GM
12692/* Override any GCC internal prototype to avoid an error.
12693 Use char because int might match the return type of a GCC
12694 builtin and then its argument prototype would still apply. */
12695#ifdef __cplusplus
12696extern "C"
12697#endif
12698char SmcOpenConnection ();
f199cab1
GM
12699int
12700main ()
12701{
5476a9a4
GM
12702return SmcOpenConnection ();
12703 ;
12704 return 0;
f199cab1 12705}
067d23c9 12706_ACEOF
5476a9a4
GM
12707if ac_fn_c_try_link "$LINENO"; then :
12708 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 12709else
5476a9a4 12710 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 12711fi
5476a9a4
GM
12712rm -f core conftest.err conftest.$ac_objext \
12713 conftest$ac_exeext conftest.$ac_ext
12714LIBS=$ac_check_lib_save_LIBS
12715fi
12716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
12717$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
12718if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
12719 HAVE_X_SM=yes
067d23c9 12720fi
067d23c9 12721
f199cab1 12722fi
f199cab1 12723
f199cab1 12724
067d23c9 12725
5476a9a4
GM
12726 if test "${HAVE_X_SM}" = "yes"; then
12727
12728$as_echo "#define HAVE_X_SM 1" >>confdefs.h
12729
12730 LIBXSM="-lSM -lICE"
12731 case "$LIBS" in
12732 *-lSM*) ;;
12733 *) LIBS="$LIBXSM $LIBS" ;;
12734 esac
067d23c9 12735 fi
5476a9a4 12736fi
067d23c9 12737
067d23c9 12738
5476a9a4
GM
12739### Use libxml (-lxml2) if available
12740HAVE_LIBXML2=no
12741if test "${with_xml2}" != "no"; then
12742 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 12743
5476a9a4 12744 succeeded=no
067d23c9 12745
5476a9a4
GM
12746 if test "$PKG_CONFIG" = "no" ; then
12747 HAVE_LIBXML2=no
12748 else
12749 PKG_CONFIG_MIN_VERSION=0.9.0
12750 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
12752$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 12753
5476a9a4
GM
12754 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
12755 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
12756 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
12757 edit_cflags="
12758 s,///*,/,g
12759 s/^/ /
12760 s/ -I/ $isystem/g
12761 s/^ //
12762 "
12763 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
12764 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
12766$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
12767 succeeded=yes
12768 else
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12770$as_echo "no" >&6; }
12771 LIBXML2_CFLAGS=""
12772 LIBXML2_LIBS=""
12773 ## If we have a custom action on failure, don't print errors, but
12774 ## do set a variable so people can do so.
12775 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
12776
12777 fi
12778
12779
12780
12781 else
12782 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12783 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12784 fi
12785 fi
12786
12787 if test $succeeded = yes; then
12788 HAVE_LIBXML2=yes
12789 else
12790 HAVE_LIBXML2=no
12791 fi
12792
12793 if test "${HAVE_LIBXML2}" = "yes"; then
12794 LIBS="$LIBXML2_LIBS $LIBS"
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
12796$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
12797if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
12798 $as_echo_n "(cached) " >&6
12799else
5476a9a4
GM
12800 ac_check_lib_save_LIBS=$LIBS
12801LIBS="-lxml2 $LIBS"
12802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12803/* end confdefs.h. */
12804
5476a9a4
GM
12805/* Override any GCC internal prototype to avoid an error.
12806 Use char because int might match the return type of a GCC
12807 builtin and then its argument prototype would still apply. */
12808#ifdef __cplusplus
12809extern "C"
12810#endif
12811char htmlReadMemory ();
067d23c9
KY
12812int
12813main ()
12814{
5476a9a4 12815return htmlReadMemory ();
067d23c9
KY
12816 ;
12817 return 0;
12818}
12819_ACEOF
5476a9a4
GM
12820if ac_fn_c_try_link "$LINENO"; then :
12821 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 12822else
5476a9a4 12823 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 12824fi
5476a9a4
GM
12825rm -f core conftest.err conftest.$ac_objext \
12826 conftest$ac_exeext conftest.$ac_ext
12827LIBS=$ac_check_lib_save_LIBS
12828fi
12829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
12830$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
12831if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
12832 HAVE_LIBXML2=yes
12833else
12834 HAVE_LIBXML2=no
067d23c9
KY
12835fi
12836
5476a9a4 12837 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 12838
5476a9a4 12839$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 12840
5476a9a4
GM
12841 else
12842 LIBXML2_LIBS=""
12843 LIBXML2_CFLAGS=""
12844 fi
067d23c9 12845 fi
5476a9a4 12846fi
067d23c9 12847
067d23c9 12848
067d23c9 12849
5476a9a4
GM
12850# If netdb.h doesn't declare h_errno, we must declare it by hand.
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
12852$as_echo_n "checking whether netdb declares h_errno... " >&6; }
12853if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
12854 $as_echo_n "(cached) " >&6
067d23c9 12855else
5476a9a4
GM
12856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857/* end confdefs.h. */
12858#include <netdb.h>
12859int
12860main ()
12861{
12862return h_errno;
12863 ;
12864 return 0;
12865}
12866_ACEOF
12867if ac_fn_c_try_link "$LINENO"; then :
12868 emacs_cv_netdb_declares_h_errno=yes
12869else
12870 emacs_cv_netdb_declares_h_errno=no
067d23c9 12871fi
5476a9a4
GM
12872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
12874fi
12875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
12876$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
12877if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 12878
5476a9a4 12879$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 12880
5476a9a4 12881fi
f199cab1 12882
5476a9a4
GM
12883# fmod, logb, and frexp are found in -lm on most systems.
12884# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
12886$as_echo_n "checking for sqrt in -lm... " >&6; }
12887if test "${ac_cv_lib_m_sqrt+set}" = set; then :
12888 $as_echo_n "(cached) " >&6
12889else
12890 ac_check_lib_save_LIBS=$LIBS
12891LIBS="-lm $LIBS"
12892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893/* end confdefs.h. */
f199cab1 12894
5476a9a4
GM
12895/* Override any GCC internal prototype to avoid an error.
12896 Use char because int might match the return type of a GCC
12897 builtin and then its argument prototype would still apply. */
12898#ifdef __cplusplus
12899extern "C"
12900#endif
12901char sqrt ();
12902int
12903main ()
12904{
12905return sqrt ();
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910if ac_fn_c_try_link "$LINENO"; then :
12911 ac_cv_lib_m_sqrt=yes
12912else
12913 ac_cv_lib_m_sqrt=no
12914fi
12915rm -f core conftest.err conftest.$ac_objext \
12916 conftest$ac_exeext conftest.$ac_ext
12917LIBS=$ac_check_lib_save_LIBS
12918fi
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
12920$as_echo "$ac_cv_lib_m_sqrt" >&6; }
12921if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
12922 cat >>confdefs.h <<_ACEOF
12923#define HAVE_LIBM 1
12924_ACEOF
f199cab1 12925
5476a9a4 12926 LIBS="-lm $LIBS"
f199cab1 12927
5476a9a4 12928fi
f199cab1 12929
f199cab1 12930
5476a9a4
GM
12931# Check for mail-locking functions in a "mail" library. Probably this should
12932# have the same check as for liblockfile below.
12933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
12934$as_echo_n "checking for maillock in -lmail... " >&6; }
12935if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
12936 $as_echo_n "(cached) " >&6
12937else
5476a9a4
GM
12938 ac_check_lib_save_LIBS=$LIBS
12939LIBS="-lmail $LIBS"
12940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12941/* end confdefs.h. */
12942
5476a9a4
GM
12943/* Override any GCC internal prototype to avoid an error.
12944 Use char because int might match the return type of a GCC
12945 builtin and then its argument prototype would still apply. */
12946#ifdef __cplusplus
12947extern "C"
067d23c9 12948#endif
5476a9a4
GM
12949char maillock ();
12950int
12951main ()
12952{
12953return maillock ();
12954 ;
12955 return 0;
12956}
067d23c9 12957_ACEOF
5476a9a4
GM
12958if ac_fn_c_try_link "$LINENO"; then :
12959 ac_cv_lib_mail_maillock=yes
067d23c9 12960else
5476a9a4 12961 ac_cv_lib_mail_maillock=no
067d23c9 12962fi
5476a9a4
GM
12963rm -f core conftest.err conftest.$ac_objext \
12964 conftest$ac_exeext conftest.$ac_ext
12965LIBS=$ac_check_lib_save_LIBS
067d23c9 12966fi
5476a9a4
GM
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
12968$as_echo "$ac_cv_lib_mail_maillock" >&6; }
12969if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
12970 have_mail=yes
f199cab1 12971else
5476a9a4 12972 have_mail=no
067d23c9
KY
12973fi
12974
5476a9a4
GM
12975if test $have_mail = yes; then
12976 LIBS_MAIL=-lmail
12977 LIBS="$LIBS_MAIL $LIBS"
067d23c9 12978
5476a9a4 12979$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 12980
5476a9a4
GM
12981else
12982 LIBS_MAIL=
12983fi
12984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
12985$as_echo_n "checking for maillock in -llockfile... " >&6; }
12986if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
12987 $as_echo_n "(cached) " >&6
12988else
5476a9a4
GM
12989 ac_check_lib_save_LIBS=$LIBS
12990LIBS="-llockfile $LIBS"
067d23c9
KY
12991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12992/* end confdefs.h. */
12993
12994/* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
12997#ifdef __cplusplus
12998extern "C"
12999#endif
5476a9a4 13000char maillock ();
067d23c9
KY
13001int
13002main ()
13003{
5476a9a4 13004return maillock ();
067d23c9
KY
13005 ;
13006 return 0;
13007}
13008_ACEOF
5476a9a4
GM
13009if ac_fn_c_try_link "$LINENO"; then :
13010 ac_cv_lib_lockfile_maillock=yes
13011else
13012 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
13013fi
13014rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
13015 conftest$ac_exeext conftest.$ac_ext
13016LIBS=$ac_check_lib_save_LIBS
067d23c9 13017fi
5476a9a4
GM
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13019$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13020if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13021 have_lockfile=yes
067d23c9 13022else
5476a9a4 13023 have_lockfile=no
f199cab1
GM
13024fi
13025
5476a9a4
GM
13026if test $have_lockfile = yes; then
13027 LIBS_MAIL=-llockfile
13028 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13029
5476a9a4 13030$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 13031
5476a9a4
GM
13032else
13033# If we have the shared liblockfile, assume we must use it for mail
13034# locking (e.g. Debian). If we couldn't link against liblockfile
13035# (no liblockfile.a installed), ensure that we don't need to.
13036 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13037set dummy liblockfile.so; ac_word=$2
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13039$as_echo_n "checking for $ac_word... " >&6; }
13040if test "${ac_cv_prog_liblockfile+set}" = set; then :
13041 $as_echo_n "(cached) " >&6
13042else
13043 if test -n "$liblockfile"; then
13044 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13045else
13046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13047as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13048for as_dir in $as_dummy
13049do
13050 IFS=$as_save_IFS
13051 test -z "$as_dir" && as_dir=.
13052 for ac_exec_ext in '' $ac_executable_extensions; do
13053 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13054 ac_cv_prog_liblockfile="yes"
13055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13056 break 2
13057 fi
13058done
13059 done
13060IFS=$as_save_IFS
067d23c9 13061
5476a9a4
GM
13062 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13063fi
13064fi
13065liblockfile=$ac_cv_prog_liblockfile
13066if test -n "$liblockfile"; then
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13068$as_echo "$liblockfile" >&6; }
13069else
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071$as_echo "no" >&6; }
13072fi
067d23c9 13073
067d23c9 13074
5476a9a4
GM
13075 if test $ac_cv_prog_liblockfile = yes; then
13076 as_fn_error "Shared liblockfile found but can't link against it.
13077This probably means that movemail could lose mail.
13078There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13079 fi
13080fi
067d23c9 13081
067d23c9 13082
067d23c9 13083
067d23c9
KY
13084
13085
5476a9a4
GM
13086## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13087## interlock access to the mail spool. The alternative is a lock file named
13088## /usr/spool/mail/$USER.lock.
13089mail_lock=no
13090case "$opsys" in
13091 aix4-2) mail_lock="lockf" ;;
067d23c9 13092
5476a9a4 13093 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 13094
5476a9a4
GM
13095 ## On GNU/Linux systems, both methods are used by various mail programs.
13096 ## I assume most people are using newer mailers that have heard of flock.
13097 ## Change this if you need to.
13098 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13099 ## configure gets the right answers, and that means *NOT* using flock.
13100 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13101 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13102 ## Debian maintainer hasn't provided a clean fix for Emacs.
13103 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13104 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13105 ## correct logic. -- fx
13106 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13107 ## liblockfile is a Free Software replacement for libmail, used on
13108 ## Debian systems and elsewhere. -rfr.
13109 gnu-*)
13110 mail_lock="flock"
13111 if test $have_mail = yes || test $have_lockfile = yes; then
13112 test $ac_cv_header_maillock_h = yes && mail_lock=no
13113 fi
13114 ;;
13115esac
f199cab1 13116
5476a9a4
GM
13117BLESSMAIL_TARGET=
13118case "$mail_lock" in
13119 flock)
13120$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13121 ;;
f199cab1 13122
5476a9a4
GM
13123 lockf)
13124$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13125 ;;
f199cab1 13126
5476a9a4
GM
13127 *) BLESSMAIL_TARGET="need-blessmail" ;;
13128esac
f199cab1
GM
13129
13130
13131
5476a9a4
GM
13132for ac_func in gethostname \
13133closedir getrusage get_current_dir_name \
13134lrand48 logb frexp fmod cbrt setsid \
13135fpathconf select euidaccess getpagesize setlocale \
13136utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
13137__fpending strsignal setitimer \
13138sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13139gai_strerror mkstemp getline getdelim fsync sync \
13140difftime posix_memalign \
13141getpwent endpwent getgrent endgrent \
13142touchlock \
13143cfmakeraw cfsetspeed copysign __executable_start
13144do :
13145 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13146ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13147eval as_val=\$$as_ac_var
13148 if test "x$as_val" = x""yes; then :
13149 cat >>confdefs.h <<_ACEOF
13150#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13151_ACEOF
f199cab1 13152
5476a9a4
GM
13153fi
13154done
f199cab1
GM
13155
13156
c0528ebe
GM
13157if test $opsys = unixware; then
13158
13159$as_echo "#define BROKEN_GETWD 1" >>confdefs.h
13160
13161else
5476a9a4
GM
13162 for ac_func in getwd
13163do :
13164 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13165if test "x$ac_cv_func_getwd" = x""yes; then :
13166 cat >>confdefs.h <<_ACEOF
13167#define HAVE_GETWD 1
13168_ACEOF
f199cab1 13169
5476a9a4
GM
13170fi
13171done
f199cab1 13172
5476a9a4 13173fi
f199cab1 13174
5476a9a4
GM
13175## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13176## has a broken `rint' in some library versions including math library
13177## version number A.09.05.
13178## You can fix the math library by installing patch number PHSS_4630.
13179## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 13180## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
13181case $opsys in
13182 hpux*) : ;;
13183 *) for ac_func in random rint
13184do :
13185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13186ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13187eval as_val=\$$as_ac_var
13188 if test "x$as_val" = x""yes; then :
13189 cat >>confdefs.h <<_ACEOF
13190#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13191_ACEOF
f199cab1 13192
5476a9a4
GM
13193fi
13194done
13195 ;;
13196esac
f199cab1 13197
5476a9a4
GM
13198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13199$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13200if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 13201 $as_echo_n "(cached) " >&6
f199cab1
GM
13202else
13203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13204/* end confdefs.h. */
13205
067d23c9
KY
13206int
13207main ()
13208{
5476a9a4 13209__builtin_unwind_init ();
067d23c9
KY
13210 ;
13211 return 0;
13212}
13213_ACEOF
5476a9a4
GM
13214if ac_fn_c_try_link "$LINENO"; then :
13215 emacs_cv_func___builtin_unwind_init=yes
067d23c9 13216else
5476a9a4 13217 emacs_cv_func___builtin_unwind_init=no
067d23c9 13218fi
5476a9a4
GM
13219rm -f core conftest.err conftest.$ac_objext \
13220 conftest$ac_exeext conftest.$ac_ext
067d23c9 13221fi
5476a9a4
GM
13222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13223$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13224if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 13225
5476a9a4 13226$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 13227
067d23c9 13228fi
067d23c9 13229
f199cab1
GM
13230
13231
13232
13233
5476a9a4
GM
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13235$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13236if test "${ac_cv_sys_largefile_source+set}" = set; then :
13237 $as_echo_n "(cached) " >&6
13238else
13239 while :; do
13240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241/* end confdefs.h. */
13242#include <sys/types.h> /* for off_t */
13243 #include <stdio.h>
13244int
13245main ()
13246{
13247int (*fp) (FILE *, off_t, int) = fseeko;
13248 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13249 ;
13250 return 0;
13251}
13252_ACEOF
13253if ac_fn_c_try_link "$LINENO"; then :
13254 ac_cv_sys_largefile_source=no; break
067d23c9 13255fi
5476a9a4
GM
13256rm -f core conftest.err conftest.$ac_objext \
13257 conftest$ac_exeext conftest.$ac_ext
13258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13259/* end confdefs.h. */
13260#define _LARGEFILE_SOURCE 1
13261#include <sys/types.h> /* for off_t */
13262 #include <stdio.h>
13263int
13264main ()
13265{
13266int (*fp) (FILE *, off_t, int) = fseeko;
13267 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272if ac_fn_c_try_link "$LINENO"; then :
13273 ac_cv_sys_largefile_source=1; break
13274fi
13275rm -f core conftest.err conftest.$ac_objext \
13276 conftest$ac_exeext conftest.$ac_ext
13277 ac_cv_sys_largefile_source=unknown
13278 break
13279done
13280fi
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13282$as_echo "$ac_cv_sys_largefile_source" >&6; }
13283case $ac_cv_sys_largefile_source in #(
13284 no | unknown) ;;
13285 *)
13286cat >>confdefs.h <<_ACEOF
13287#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13288_ACEOF
13289;;
13290esac
13291rm -rf conftest*
067d23c9 13292
5476a9a4
GM
13293# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13294# in glibc 2.1.3, but that breaks too many other things.
13295# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13296if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 13297
5476a9a4 13298$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13299
5476a9a4 13300fi
067d23c9
KY
13301
13302
5476a9a4
GM
13303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13304$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
13305if test "${ac_cv_func_getpgrp_void+set}" = set; then :
13306 $as_echo_n "(cached) " >&6
13307else
13308 # Use it with a single arg.
13309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13310/* end confdefs.h. */
13311$ac_includes_default
13312int
13313main ()
13314{
13315getpgrp (0);
13316 ;
13317 return 0;
13318}
13319_ACEOF
13320if ac_fn_c_try_compile "$LINENO"; then :
13321 ac_cv_func_getpgrp_void=no
13322else
13323 ac_cv_func_getpgrp_void=yes
13324fi
13325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 13326
5476a9a4
GM
13327fi
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13329$as_echo "$ac_cv_func_getpgrp_void" >&6; }
13330if test $ac_cv_func_getpgrp_void = yes; then
067d23c9 13331
5476a9a4 13332$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
067d23c9 13333
5476a9a4 13334fi
067d23c9
KY
13335
13336
5476a9a4
GM
13337# UNIX98 PTYs.
13338for ac_func in grantpt
13339do :
13340 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13341if test "x$ac_cv_func_grantpt" = x""yes; then :
13342 cat >>confdefs.h <<_ACEOF
13343#define HAVE_GRANTPT 1
13344_ACEOF
f199cab1 13345
5476a9a4
GM
13346fi
13347done
f199cab1 13348
f199cab1 13349
5476a9a4 13350# PTY-related GNU extensions.
1146da8d 13351for ac_func in getpt posix_openpt
5476a9a4 13352do :
1146da8d
GM
13353 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13354ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13355eval as_val=\$$as_ac_var
13356 if test "x$as_val" = x""yes; then :
5476a9a4 13357 cat >>confdefs.h <<_ACEOF
1146da8d 13358#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 13359_ACEOF
f199cab1 13360
5476a9a4
GM
13361fi
13362done
f199cab1 13363
f199cab1 13364
5476a9a4
GM
13365# Check this now, so that we will NOT find the above functions in ncurses.
13366# That is because we have not set up to link ncurses in lib-src.
13367# It's better to believe a function is not available
13368# than to expect to find it in ncurses.
13369# Also we need tputs and friends to be able to build at all.
13370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13371$as_echo_n "checking for library containing tputs... " >&6; }
13372# Run a test program that contains a call to tputs, a call that is
13373# never executed. This tests whether a pre-'main' dynamic linker
13374# works with the library. It's too much trouble to actually call
13375# tputs in the test program, due to portability hassles. When
13376# cross-compiling, assume the test program will run if it links.
f199cab1 13377
5476a9a4
GM
13378# Maybe curses should be tried earlier?
13379# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13380for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13381 OLIBS=$LIBS
13382 if test -z "$tputs_library"; then
13383 LIBS_TERMCAP=
13384 msg='none required'
13385 else
13386 LIBS_TERMCAP=-l$tputs_library
13387 msg=$LIBS_TERMCAP
13388 LIBS="$LIBS_TERMCAP $LIBS"
13389 fi
13390 if test "$cross_compiling" = yes; then :
13391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13392/* end confdefs.h. */
13393
5476a9a4
GM
13394 extern void tputs (const char *, int, int (*)(int));
13395 int main (int argc, char **argv)
13396 {
13397 if (argc == 10000)
13398 tputs (argv[0], 0, 0);
13399 return 0;
13400 }
13401
067d23c9
KY
13402_ACEOF
13403if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13404
067d23c9 13405else
5476a9a4 13406 msg=no
067d23c9
KY
13407fi
13408rm -f core conftest.err conftest.$ac_objext \
13409 conftest$ac_exeext conftest.$ac_ext
067d23c9 13410else
5476a9a4 13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13412/* end confdefs.h. */
13413
5476a9a4
GM
13414 extern void tputs (const char *, int, int (*)(int));
13415 int main (int argc, char **argv)
13416 {
13417 if (argc == 10000)
13418 tputs (argv[0], 0, 0);
13419 return 0;
13420 }
13421
067d23c9 13422_ACEOF
5476a9a4
GM
13423if ac_fn_c_try_run "$LINENO"; then :
13424
067d23c9 13425else
5476a9a4 13426 msg=no
067d23c9 13427fi
5476a9a4
GM
13428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13429 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 13430fi
5476a9a4
GM
13431
13432 LIBS=$OLIBS
13433 if test "X$msg" != Xno; then
13434 break
13435 fi
13436done
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
13438$as_echo "$msg" >&6; }
13439if test "X$msg" = Xno; then
13440 as_fn_error "The required function \`tputs' was not found in any library.
13441The following libraries were tried (in order):
13442 libtinfo, libncurses, libterminfo, libtermcap, libcurses
13443Please try installing whichever of these libraries is most appropriate
13444for your system, together with its header files.
13445For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
13446fi
13447
5476a9a4
GM
13448## Use termcap instead of terminfo?
13449## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
13450TERMINFO=yes
13451## FIXME? In the cases below where we unconditionally set
13452## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
13453## if that was found above to have tputs.
13454## Should we use the gnu* logic everywhere?
13455case "$opsys" in
13456 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
13457 ## The ncurses library has been moved out of the System framework in
13458 ## Mac OS X 10.2. So if configure detects it, set the command-line
13459 ## option to use it.
13460 darwin) LIBS_TERMCAP="-lncurses" ;;
13461
13462 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
13463
13464 freebsd)
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
13466$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
13467 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
13468 $as_echo_n "(cached) " >&6
13469else
5476a9a4 13470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13471/* end confdefs.h. */
5476a9a4 13472#include <osreldate.h>
067d23c9
KY
13473int
13474main ()
13475{
5476a9a4
GM
13476#if __FreeBSD_version < 400000
13477fail;
13478#endif
13479
067d23c9
KY
13480 ;
13481 return 0;
13482}
13483_ACEOF
13484if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13485 emacs_cv_freebsd_terminfo=yes
067d23c9 13486else
5476a9a4 13487 emacs_cv_freebsd_terminfo=no
067d23c9
KY
13488fi
13489rm -f core conftest.err conftest.$ac_objext \
13490 conftest$ac_exeext conftest.$ac_ext
13491fi
5476a9a4
GM
13492
13493
13494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
13495$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
13496
13497 if test $emacs_cv_freebsd_terminfo = yes; then
13498 LIBS_TERMCAP="-lncurses"
13499 else
13500 TERMINFO=no
13501 LIBS_TERMCAP="-ltermcap"
13502 fi
13503 ;;
13504
13505 netbsd)
13506 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
13507 TERMINFO=no
13508 LIBS_TERMCAP="-ltermcap"
13509 fi
13510 ;;
13511
13512 openbsd) LIBS_TERMCAP="-lncurses" ;;
13513
13514 ## hpux: Make sure we get select from libc rather than from libcurses
13515 ## because libcurses on HPUX 10.10 has a broken version of select.
13516 ## We used to use -lc -lcurses, but this may be cleaner.
13517 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
13518 # set that way, now it uses the default). Isn't this a contradiction?
13519 hpux*) LIBS_TERMCAP="-ltermcap" ;;
13520
13521esac
13522
13523TERMCAP_OBJ=tparam.o
13524if test $TERMINFO = yes; then
13525
13526$as_echo "#define TERMINFO 1" >>confdefs.h
13527
13528 TERMCAP_OBJ=terminfo.o
067d23c9
KY
13529fi
13530
f199cab1 13531
067d23c9 13532
5476a9a4
GM
13533
13534# Do we have res_init, for detecting changes in /etc/resolv.conf?
13535# On Darwin, res_init appears not to be useful: see bug#562 and
13536# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
13537resolv=no
13538
13539if test $opsys != darwin; then
13540
13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542/* end confdefs.h. */
13543#include <netinet/in.h>
13544#include <arpa/nameser.h>
13545#include <resolv.h>
067d23c9
KY
13546int
13547main ()
13548{
5476a9a4 13549return res_init();
067d23c9
KY
13550 ;
13551 return 0;
13552}
13553_ACEOF
13554if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13555 have_res_init=yes
067d23c9 13556else
5476a9a4 13557 have_res_init=no
067d23c9
KY
13558fi
13559rm -f core conftest.err conftest.$ac_objext \
13560 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13561 if test "$have_res_init" = no; then
13562 OLIBS="$LIBS"
13563 LIBS="$LIBS -lresolv"
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
13565$as_echo_n "checking for res_init with -lresolv... " >&6; }
13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13567/* end confdefs.h. */
5476a9a4
GM
13568#include <netinet/in.h>
13569#include <arpa/nameser.h>
13570#include <resolv.h>
067d23c9
KY
13571int
13572main ()
13573{
5476a9a4 13574return res_init();
067d23c9
KY
13575 ;
13576 return 0;
13577}
13578_ACEOF
13579if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13580 have_res_init=yes
067d23c9 13581else
5476a9a4 13582 have_res_init=no
067d23c9
KY
13583fi
13584rm -f core conftest.err conftest.$ac_objext \
13585 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
13587$as_echo "$have_res_init" >&6; }
13588 if test "$have_res_init" = yes ; then
13589 resolv=yes
13590 fi
13591 LIBS="$OLIBS"
13592 fi
067d23c9 13593
5476a9a4
GM
13594 if test "$have_res_init" = yes; then
13595
13596$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 13597
5476a9a4 13598 fi
067d23c9 13599fi
5476a9a4
GM
13600# Do we need the Hesiod library to provide the support routines?
13601LIBHESIOD=
13602if test "$with_hesiod" != no ; then
13603 # Don't set $LIBS here -- see comments above. FIXME which comments?
13604 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
13605if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 13606
5476a9a4
GM
13607else
13608 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
13609if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 13610
5476a9a4
GM
13611else
13612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
13613$as_echo_n "checking for res_send in -lresolv... " >&6; }
13614if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
13615 $as_echo_n "(cached) " >&6
13616else
13617 ac_check_lib_save_LIBS=$LIBS
5476a9a4 13618LIBS="-lresolv $LIBS"
067d23c9
KY
13619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620/* end confdefs.h. */
13621
13622/* Override any GCC internal prototype to avoid an error.
13623 Use char because int might match the return type of a GCC
13624 builtin and then its argument prototype would still apply. */
13625#ifdef __cplusplus
13626extern "C"
13627#endif
5476a9a4 13628char res_send ();
067d23c9
KY
13629int
13630main ()
13631{
5476a9a4 13632return res_send ();
067d23c9
KY
13633 ;
13634 return 0;
13635}
13636_ACEOF
13637if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13638 ac_cv_lib_resolv_res_send=yes
067d23c9 13639else
5476a9a4 13640 ac_cv_lib_resolv_res_send=no
067d23c9
KY
13641fi
13642rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
13643 conftest$ac_exeext conftest.$ac_ext
13644LIBS=$ac_check_lib_save_LIBS
13645fi
5476a9a4
GM
13646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
13647$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
13648if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
13649 resolv=yes
13650else
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
13652$as_echo_n "checking for __res_send in -lresolv... " >&6; }
13653if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
13654 $as_echo_n "(cached) " >&6
13655else
13656 ac_check_lib_save_LIBS=$LIBS
5476a9a4 13657LIBS="-lresolv $LIBS"
f199cab1
GM
13658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659/* end confdefs.h. */
4717915f 13660
f199cab1
GM
13661/* Override any GCC internal prototype to avoid an error.
13662 Use char because int might match the return type of a GCC
13663 builtin and then its argument prototype would still apply. */
13664#ifdef __cplusplus
13665extern "C"
13666#endif
5476a9a4 13667char __res_send ();
f199cab1
GM
13668int
13669main ()
13670{
5476a9a4 13671return __res_send ();
f199cab1
GM
13672 ;
13673 return 0;
13674}
13675_ACEOF
13676if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13677 ac_cv_lib_resolv___res_send=yes
f199cab1 13678else
5476a9a4 13679 ac_cv_lib_resolv___res_send=no
f199cab1
GM
13680fi
13681rm -f core conftest.err conftest.$ac_objext \
13682 conftest$ac_exeext conftest.$ac_ext
13683LIBS=$ac_check_lib_save_LIBS
13684fi
5476a9a4
GM
13685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
13686$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
13687if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
13688 resolv=yes
067d23c9 13689fi
f199cab1 13690
5476a9a4 13691fi
1f5d53eb 13692
5476a9a4 13693fi
067d23c9 13694
067d23c9
KY
13695fi
13696
5476a9a4
GM
13697 if test "$resolv" = yes ; then
13698 RESOLVLIB=-lresolv
13699 else
13700 RESOLVLIB=
13701 fi
13702 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13703if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
13704
13705else
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13707$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13708if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
13709 $as_echo_n "(cached) " >&6
13710else
13711 ac_check_lib_save_LIBS=$LIBS
13712LIBS="-lhesiod $RESOLVLIB $LIBS"
13713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13714/* end confdefs.h. */
5476a9a4
GM
13715
13716/* Override any GCC internal prototype to avoid an error.
13717 Use char because int might match the return type of a GCC
13718 builtin and then its argument prototype would still apply. */
13719#ifdef __cplusplus
13720extern "C"
13721#endif
13722char hes_getmailhost ();
067d23c9
KY
13723int
13724main ()
13725{
5476a9a4 13726return hes_getmailhost ();
067d23c9
KY
13727 ;
13728 return 0;
13729}
13730_ACEOF
f199cab1 13731if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
13732 ac_cv_lib_hesiod_hes_getmailhost=yes
13733else
13734 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 13735fi
f199cab1
GM
13736rm -f core conftest.err conftest.$ac_objext \
13737 conftest$ac_exeext conftest.$ac_ext
5476a9a4 13738LIBS=$ac_check_lib_save_LIBS
067d23c9 13739fi
5476a9a4
GM
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
13741$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
13742if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
13743 hesiod=yes
13744else
13745 :
067d23c9
KY
13746fi
13747
c5a68906 13748fi
f199cab1
GM
13749
13750
5476a9a4 13751 if test x"$hesiod" = xyes; then
f199cab1 13752
5476a9a4 13753$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 13754
5476a9a4 13755 LIBHESIOD=-lhesiod
c5a68906 13756 fi
5476a9a4 13757fi
4fc2b746 13758
4fc2b746 13759
5476a9a4
GM
13760# Do we need libresolv (due to res_init or Hesiod)?
13761if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 13762
5476a9a4 13763$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 13764
5476a9a4
GM
13765 LIBRESOLV=-lresolv
13766else
13767 LIBRESOLV=
13768fi
4fc2b746 13769
4fc2b746 13770
5476a9a4
GM
13771# These tell us which Kerberos-related libraries to use.
13772COM_ERRLIB=
13773CRYPTOLIB=
13774KRB5LIB=
13775DESLIB=
13776KRB4LIB=
4fc2b746 13777
5476a9a4
GM
13778if test "${with_kerberos}" != no; then
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
13780$as_echo_n "checking for com_err in -lcom_err... " >&6; }
13781if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
13782 $as_echo_n "(cached) " >&6
13783else
13784 ac_check_lib_save_LIBS=$LIBS
13785LIBS="-lcom_err $LIBS"
13786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13787/* end confdefs.h. */
4fc2b746 13788
5476a9a4
GM
13789/* Override any GCC internal prototype to avoid an error.
13790 Use char because int might match the return type of a GCC
13791 builtin and then its argument prototype would still apply. */
13792#ifdef __cplusplus
13793extern "C"
13794#endif
13795char com_err ();
13796int
13797main ()
13798{
13799return com_err ();
13800 ;
13801 return 0;
13802}
13803_ACEOF
13804if ac_fn_c_try_link "$LINENO"; then :
13805 ac_cv_lib_com_err_com_err=yes
13806else
13807 ac_cv_lib_com_err_com_err=no
13808fi
13809rm -f core conftest.err conftest.$ac_objext \
13810 conftest$ac_exeext conftest.$ac_ext
13811LIBS=$ac_check_lib_save_LIBS
13812fi
13813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
13814$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
13815if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
13816 have_com_err=yes
13817else
13818 have_com_err=no
13819fi
f199cab1 13820
5476a9a4
GM
13821 if test $have_com_err = yes; then
13822 COM_ERRLIB=-lcom_err
13823 LIBS="$COM_ERRLIB $LIBS"
f199cab1 13824
5476a9a4 13825$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 13826
5476a9a4
GM
13827 fi
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
13829$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
13830if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
13831 $as_echo_n "(cached) " >&6
13832else
13833 ac_check_lib_save_LIBS=$LIBS
13834LIBS="-lcrypto $LIBS"
13835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13836/* end confdefs.h. */
f199cab1 13837
5476a9a4
GM
13838/* Override any GCC internal prototype to avoid an error.
13839 Use char because int might match the return type of a GCC
13840 builtin and then its argument prototype would still apply. */
13841#ifdef __cplusplus
13842extern "C"
13843#endif
13844char mit_des_cbc_encrypt ();
13845int
13846main ()
13847{
13848return mit_des_cbc_encrypt ();
13849 ;
13850 return 0;
13851}
13852_ACEOF
13853if ac_fn_c_try_link "$LINENO"; then :
13854 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
13855else
13856 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
13857fi
13858rm -f core conftest.err conftest.$ac_objext \
13859 conftest$ac_exeext conftest.$ac_ext
13860LIBS=$ac_check_lib_save_LIBS
13861fi
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
13863$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
13864if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
13865 have_crypto=yes
13866else
13867 have_crypto=no
13868fi
f199cab1 13869
5476a9a4
GM
13870 if test $have_crypto = yes; then
13871 CRYPTOLIB=-lcrypto
13872 LIBS="$CRYPTOLIB $LIBS"
f199cab1 13873
5476a9a4 13874$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 13875
5476a9a4
GM
13876 fi
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
13878$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
13879if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
13880 $as_echo_n "(cached) " >&6
13881else
13882 ac_check_lib_save_LIBS=$LIBS
13883LIBS="-lk5crypto $LIBS"
13884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13885/* end confdefs.h. */
f199cab1 13886
5476a9a4
GM
13887/* Override any GCC internal prototype to avoid an error.
13888 Use char because int might match the return type of a GCC
13889 builtin and then its argument prototype would still apply. */
13890#ifdef __cplusplus
13891extern "C"
13892#endif
13893char mit_des_cbc_encrypt ();
13894int
13895main ()
13896{
13897return mit_des_cbc_encrypt ();
13898 ;
13899 return 0;
13900}
13901_ACEOF
13902if ac_fn_c_try_link "$LINENO"; then :
13903 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
13904else
13905 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
13906fi
13907rm -f core conftest.err conftest.$ac_objext \
13908 conftest$ac_exeext conftest.$ac_ext
13909LIBS=$ac_check_lib_save_LIBS
13910fi
13911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
13912$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
13913if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
13914 have_k5crypto=yes
13915else
13916 have_k5crypto=no
4fc2b746 13917fi
4fc2b746 13918
5476a9a4
GM
13919 if test $have_k5crypto = yes; then
13920 CRYPTOLIB=-lk5crypto
13921 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 13922
5476a9a4 13923$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 13924
5476a9a4
GM
13925 fi
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
13927$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
13928if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
13929 $as_echo_n "(cached) " >&6
13930else
13931 ac_check_lib_save_LIBS=$LIBS
13932LIBS="-lkrb5 $LIBS"
13933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13934/* end confdefs.h. */
4fc2b746 13935
5476a9a4
GM
13936/* Override any GCC internal prototype to avoid an error.
13937 Use char because int might match the return type of a GCC
13938 builtin and then its argument prototype would still apply. */
13939#ifdef __cplusplus
13940extern "C"
13941#endif
13942char krb5_init_context ();
13943int
13944main ()
13945{
13946return krb5_init_context ();
13947 ;
13948 return 0;
13949}
13950_ACEOF
13951if ac_fn_c_try_link "$LINENO"; then :
13952 ac_cv_lib_krb5_krb5_init_context=yes
13953else
13954 ac_cv_lib_krb5_krb5_init_context=no
13955fi
13956rm -f core conftest.err conftest.$ac_objext \
13957 conftest$ac_exeext conftest.$ac_ext
13958LIBS=$ac_check_lib_save_LIBS
13959fi
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
13961$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
13962if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
13963 have_krb5=yes
13964else
13965 have_krb5=no
13966fi
f199cab1 13967
5476a9a4
GM
13968 if test $have_krb5=yes; then
13969 KRB5LIB=-lkrb5
13970 LIBS="$KRB5LIB $LIBS"
f199cab1 13971
5476a9a4 13972$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 13973
5476a9a4
GM
13974 fi
13975 if test "${with_kerberos5}" = no; then
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
13977$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
13978if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
13979 $as_echo_n "(cached) " >&6
13980else
5476a9a4
GM
13981 ac_check_lib_save_LIBS=$LIBS
13982LIBS="-ldes425 $LIBS"
13983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 13984/* end confdefs.h. */
f199cab1 13985
5476a9a4
GM
13986/* Override any GCC internal prototype to avoid an error.
13987 Use char because int might match the return type of a GCC
13988 builtin and then its argument prototype would still apply. */
13989#ifdef __cplusplus
13990extern "C"
13991#endif
13992char des_cbc_encrypt ();
3e0be4ab
GM
13993int
13994main ()
13995{
5476a9a4 13996return des_cbc_encrypt ();
3e0be4ab
GM
13997 ;
13998 return 0;
13999}
14000_ACEOF
5476a9a4
GM
14001if ac_fn_c_try_link "$LINENO"; then :
14002 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 14003else
5476a9a4 14004 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 14005fi
5476a9a4
GM
14006rm -f core conftest.err conftest.$ac_objext \
14007 conftest$ac_exeext conftest.$ac_ext
14008LIBS=$ac_check_lib_save_LIBS
4fc2b746 14009fi
5476a9a4
GM
14010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14011$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14012if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14013 have_des425=yes
14014else
14015 have_des425=no
f199cab1 14016fi
6c051bab 14017
5476a9a4
GM
14018 if test $have_des425 = yes; then
14019 DESLIB=-ldes425
14020 LIBS="$DESLIB $LIBS"
6c051bab 14021
5476a9a4 14022$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 14023
5476a9a4
GM
14024 else
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14026$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14027if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14028 $as_echo_n "(cached) " >&6
14029else
14030 ac_check_lib_save_LIBS=$LIBS
14031LIBS="-ldes $LIBS"
14032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033/* end confdefs.h. */
f199cab1 14034
5476a9a4
GM
14035/* Override any GCC internal prototype to avoid an error.
14036 Use char because int might match the return type of a GCC
14037 builtin and then its argument prototype would still apply. */
14038#ifdef __cplusplus
14039extern "C"
14040#endif
14041char des_cbc_encrypt ();
14042int
14043main ()
14044{
14045return des_cbc_encrypt ();
14046 ;
14047 return 0;
14048}
14049_ACEOF
14050if ac_fn_c_try_link "$LINENO"; then :
14051 ac_cv_lib_des_des_cbc_encrypt=yes
14052else
14053 ac_cv_lib_des_des_cbc_encrypt=no
14054fi
14055rm -f core conftest.err conftest.$ac_objext \
14056 conftest$ac_exeext conftest.$ac_ext
14057LIBS=$ac_check_lib_save_LIBS
14058fi
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14060$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14061if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14062 have_des=yes
14063else
14064 have_des=no
14065fi
f199cab1 14066
5476a9a4
GM
14067 if test $have_des = yes; then
14068 DESLIB=-ldes
14069 LIBS="$DESLIB $LIBS"
f199cab1 14070
5476a9a4 14071$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 14072
5476a9a4
GM
14073 fi
14074 fi
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14076$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14077if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
14078 $as_echo_n "(cached) " >&6
14079else
5476a9a4
GM
14080 ac_check_lib_save_LIBS=$LIBS
14081LIBS="-lkrb4 $LIBS"
14082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14083/* end confdefs.h. */
942f733f 14084
5476a9a4
GM
14085/* Override any GCC internal prototype to avoid an error.
14086 Use char because int might match the return type of a GCC
14087 builtin and then its argument prototype would still apply. */
14088#ifdef __cplusplus
14089extern "C"
14090#endif
14091char krb_get_cred ();
942f733f
PE
14092int
14093main ()
14094{
5476a9a4 14095return krb_get_cred ();
942f733f
PE
14096 ;
14097 return 0;
14098}
14099_ACEOF
5476a9a4
GM
14100if ac_fn_c_try_link "$LINENO"; then :
14101 ac_cv_lib_krb4_krb_get_cred=yes
14102else
14103 ac_cv_lib_krb4_krb_get_cred=no
14104fi
14105rm -f core conftest.err conftest.$ac_objext \
14106 conftest$ac_exeext conftest.$ac_ext
14107LIBS=$ac_check_lib_save_LIBS
14108fi
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14110$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14111if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14112 have_krb4=yes
14113else
14114 have_krb4=no
14115fi
14116
14117 if test $have_krb4 = yes; then
14118 KRB4LIB=-lkrb4
14119 LIBS="$KRB4LIB $LIBS"
14120
14121$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14122
14123 else
14124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14125$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14126if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14127 $as_echo_n "(cached) " >&6
3e0be4ab 14128else
5476a9a4
GM
14129 ac_check_lib_save_LIBS=$LIBS
14130LIBS="-lkrb $LIBS"
14131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14132/* end confdefs.h. */
942f733f 14133
5476a9a4
GM
14134/* Override any GCC internal prototype to avoid an error.
14135 Use char because int might match the return type of a GCC
14136 builtin and then its argument prototype would still apply. */
14137#ifdef __cplusplus
14138extern "C"
14139#endif
14140char krb_get_cred ();
942f733f
PE
14141int
14142main ()
14143{
5476a9a4 14144return krb_get_cred ();
942f733f
PE
14145 ;
14146 return 0;
14147}
14148_ACEOF
5476a9a4
GM
14149if ac_fn_c_try_link "$LINENO"; then :
14150 ac_cv_lib_krb_krb_get_cred=yes
942f733f 14151else
5476a9a4 14152 ac_cv_lib_krb_krb_get_cred=no
942f733f 14153fi
5476a9a4
GM
14154rm -f core conftest.err conftest.$ac_objext \
14155 conftest$ac_exeext conftest.$ac_ext
14156LIBS=$ac_check_lib_save_LIBS
3e0be4ab 14157fi
5476a9a4
GM
14158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14159$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14160if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14161 have_krb=yes
14162else
14163 have_krb=no
942f733f 14164fi
f199cab1 14165
5476a9a4
GM
14166 if test $have_krb = yes; then
14167 KRB4LIB=-lkrb
14168 LIBS="$KRB4LIB $LIBS"
14169
14170$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14171
14172 fi
14173 fi
f199cab1
GM
14174 fi
14175
5476a9a4
GM
14176 if test "${with_kerberos5}" != no; then
14177 for ac_header in krb5.h
14178do :
14179 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14180if test "x$ac_cv_header_krb5_h" = x""yes; then :
14181 cat >>confdefs.h <<_ACEOF
14182#define HAVE_KRB5_H 1
14183_ACEOF
14184 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14185"
14186if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14187
f199cab1 14188cat >>confdefs.h <<_ACEOF
5476a9a4 14189#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
14190_ACEOF
14191
14192
5476a9a4
GM
14193fi
14194ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14195"
14196if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 14197
5476a9a4
GM
14198cat >>confdefs.h <<_ACEOF
14199#define HAVE_KRB5_ERROR_E_TEXT 1
14200_ACEOF
f199cab1
GM
14201
14202
5476a9a4 14203fi
f199cab1 14204
5476a9a4 14205fi
f199cab1 14206
5476a9a4 14207done
f199cab1 14208
5476a9a4
GM
14209 else
14210 for ac_header in des.h
14211do :
14212 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14213if test "x$ac_cv_header_des_h" = x""yes; then :
14214 cat >>confdefs.h <<_ACEOF
14215#define HAVE_DES_H 1
14216_ACEOF
f199cab1 14217
5476a9a4
GM
14218else
14219 for ac_header in kerberosIV/des.h
14220do :
14221 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14222if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14223 cat >>confdefs.h <<_ACEOF
14224#define HAVE_KERBEROSIV_DES_H 1
14225_ACEOF
f199cab1 14226
5476a9a4
GM
14227else
14228 for ac_header in kerberos/des.h
14229do :
14230 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14231if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14232 cat >>confdefs.h <<_ACEOF
14233#define HAVE_KERBEROS_DES_H 1
14234_ACEOF
f199cab1 14235
5476a9a4 14236fi
f199cab1 14237
5476a9a4
GM
14238done
14239
14240fi
14241
14242done
14243
14244fi
14245
14246done
14247
14248 for ac_header in krb.h
f199cab1 14249do :
5476a9a4
GM
14250 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14251if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 14252 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
14253#define HAVE_KRB_H 1
14254_ACEOF
14255
14256else
14257 for ac_header in kerberosIV/krb.h
14258do :
14259 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14260if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14261 cat >>confdefs.h <<_ACEOF
14262#define HAVE_KERBEROSIV_KRB_H 1
14263_ACEOF
14264
14265else
14266 for ac_header in kerberos/krb.h
14267do :
14268 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14269if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14270 cat >>confdefs.h <<_ACEOF
14271#define HAVE_KERBEROS_KRB_H 1
f199cab1 14272_ACEOF
942f733f 14273
3e0be4ab 14274fi
942f733f 14275
f199cab1
GM
14276done
14277
5476a9a4
GM
14278fi
14279
14280done
14281
14282fi
14283
14284done
14285
14286 fi
14287 for ac_header in com_err.h
f199cab1 14288do :
5476a9a4
GM
14289 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14290if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 14291 cat >>confdefs.h <<_ACEOF
5476a9a4 14292#define HAVE_COM_ERR_H 1
f199cab1
GM
14293_ACEOF
14294
3e0be4ab 14295fi
f199cab1 14296
5476a9a4 14297done
3e0be4ab
GM
14298
14299fi
14300
f199cab1
GM
14301
14302
14303
14304
f199cab1
GM
14305
14306
14307
14308
14309
5476a9a4
GM
14310 for ac_func in $ac_func_list
14311do :
14312 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14313ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14314eval as_val=\$$as_ac_var
14315 if test "x$as_val" = x""yes; then :
14316 cat >>confdefs.h <<_ACEOF
14317#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14318_ACEOF
14319
14320fi
14321done
14322
f199cab1
GM
14323
14324
14325
5476a9a4
GM
14326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14327$as_echo_n "checking whether localtime caches TZ... " >&6; }
14328if test "${emacs_cv_localtime_cache+set}" = set; then :
14329 $as_echo_n "(cached) " >&6
14330else
14331 if test x$ac_cv_func_tzset = xyes; then
14332if test "$cross_compiling" = yes; then :
14333 # If we have tzset, assume the worst when cross-compiling.
14334emacs_cv_localtime_cache=yes
14335else
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337/* end confdefs.h. */
14338#include <time.h>
14339char TZ_GMT0[] = "TZ=GMT0";
14340char TZ_PST8[] = "TZ=PST8";
14341main()
14342{
14343 time_t now = time ((time_t *) 0);
14344 int hour_GMT0, hour_unset;
14345 if (putenv (TZ_GMT0) != 0)
14346 exit (1);
14347 hour_GMT0 = localtime (&now)->tm_hour;
14348 unsetenv("TZ");
14349 hour_unset = localtime (&now)->tm_hour;
14350 if (putenv (TZ_PST8) != 0)
14351 exit (1);
14352 if (localtime (&now)->tm_hour == hour_GMT0)
14353 exit (1);
14354 unsetenv("TZ");
14355 if (localtime (&now)->tm_hour != hour_unset)
14356 exit (1);
14357 exit (0);
14358}
14359_ACEOF
14360if ac_fn_c_try_run "$LINENO"; then :
14361 emacs_cv_localtime_cache=no
14362else
14363 emacs_cv_localtime_cache=yes
14364fi
14365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366 conftest.$ac_objext conftest.beam conftest.$ac_ext
14367fi
f199cab1 14368
5476a9a4
GM
14369else
14370 # If we lack tzset, report that localtime does not cache TZ,
14371 # since we can't invalidate the cache if we don't have tzset.
14372 emacs_cv_localtime_cache=no
14373fi
14374fi
14375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14376$as_echo "$emacs_cv_localtime_cache" >&6; }
14377if test $emacs_cv_localtime_cache = yes; then
f199cab1 14378
5476a9a4 14379$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 14380
5476a9a4 14381fi
f199cab1 14382
5476a9a4
GM
14383ok_so_far=yes
14384ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14385if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 14386
5476a9a4
GM
14387else
14388 ok_so_far=no
14389fi
f199cab1 14390
5476a9a4
GM
14391if test $ok_so_far = yes; then
14392 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14393if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 14394
5476a9a4
GM
14395else
14396 ok_so_far=no
14397fi
f199cab1
GM
14398
14399
5476a9a4
GM
14400fi
14401if test $ok_so_far = yes; then
14402 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14403if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 14404
5476a9a4
GM
14405else
14406 ok_so_far=no
14407fi
f199cab1
GM
14408
14409
5476a9a4
GM
14410fi
14411if test $ok_so_far = yes; then
f199cab1 14412
5476a9a4 14413$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 14414
5476a9a4 14415fi
f199cab1 14416
5476a9a4 14417if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 14418
5476a9a4 14419$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 14420
942f733f 14421fi
3e0be4ab 14422
5476a9a4
GM
14423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14424$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14425if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14427$as_echo "yes" >&6; }
14428
14429$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 14430
5476a9a4
GM
14431else
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14433$as_echo "no" >&6; }
14434fi
3e0be4ab 14435
5476a9a4
GM
14436ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14437if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 14438
5476a9a4 14439else
3e0be4ab 14440
5476a9a4
GM
14441cat >>confdefs.h <<_ACEOF
14442#define pid_t int
14443_ACEOF
f199cab1 14444
5476a9a4 14445fi
f199cab1 14446
5476a9a4
GM
14447for ac_header in vfork.h
14448do :
14449 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14450if test "x$ac_cv_header_vfork_h" = x""yes; then :
14451 cat >>confdefs.h <<_ACEOF
14452#define HAVE_VFORK_H 1
14453_ACEOF
f199cab1 14454
5476a9a4 14455fi
f199cab1 14456
5476a9a4 14457done
f199cab1 14458
5476a9a4
GM
14459for ac_func in fork vfork
14460do :
14461 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14462ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14463eval as_val=\$$as_ac_var
14464 if test "x$as_val" = x""yes; then :
14465 cat >>confdefs.h <<_ACEOF
14466#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14467_ACEOF
f199cab1 14468
5476a9a4
GM
14469fi
14470done
f199cab1 14471
5476a9a4
GM
14472if test "x$ac_cv_func_fork" = xyes; then
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14474$as_echo_n "checking for working fork... " >&6; }
14475if test "${ac_cv_func_fork_works+set}" = set; then :
14476 $as_echo_n "(cached) " >&6
14477else
14478 if test "$cross_compiling" = yes; then :
14479 ac_cv_func_fork_works=cross
14480else
14481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14482/* end confdefs.h. */
14483$ac_includes_default
14484int
14485main ()
14486{
f199cab1 14487
5476a9a4
GM
14488 /* By Ruediger Kuhlmann. */
14489 return fork () < 0;
f199cab1 14490
5476a9a4
GM
14491 ;
14492 return 0;
14493}
14494_ACEOF
14495if ac_fn_c_try_run "$LINENO"; then :
14496 ac_cv_func_fork_works=yes
14497else
14498 ac_cv_func_fork_works=no
14499fi
14500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14501 conftest.$ac_objext conftest.beam conftest.$ac_ext
14502fi
f199cab1 14503
5476a9a4
GM
14504fi
14505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14506$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 14507
5476a9a4
GM
14508else
14509 ac_cv_func_fork_works=$ac_cv_func_fork
14510fi
14511if test "x$ac_cv_func_fork_works" = xcross; then
14512 case $host in
14513 *-*-amigaos* | *-*-msdosdjgpp*)
14514 # Override, as these systems have only a dummy fork() stub
14515 ac_cv_func_fork_works=no
14516 ;;
14517 *)
14518 ac_cv_func_fork_works=yes
14519 ;;
14520 esac
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14522$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14523fi
14524ac_cv_func_vfork_works=$ac_cv_func_vfork
14525if test "x$ac_cv_func_vfork" = xyes; then
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14527$as_echo_n "checking for working vfork... " >&6; }
14528if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
14529 $as_echo_n "(cached) " >&6
14530else
14531 if test "$cross_compiling" = yes; then :
5476a9a4 14532 ac_cv_func_vfork_works=cross
f199cab1
GM
14533else
14534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535/* end confdefs.h. */
5476a9a4
GM
14536/* Thanks to Paul Eggert for this test. */
14537$ac_includes_default
14538#include <sys/wait.h>
14539#ifdef HAVE_VFORK_H
14540# include <vfork.h>
f199cab1 14541#endif
5476a9a4
GM
14542/* On some sparc systems, changes by the child to local and incoming
14543 argument registers are propagated back to the parent. The compiler
14544 is told about this with #include <vfork.h>, but some compilers
14545 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14546 static variable whose address is put into a register that is
14547 clobbered by the vfork. */
14548static void
14549#ifdef __cplusplus
14550sparc_address_test (int arg)
14551# else
14552sparc_address_test (arg) int arg;
f199cab1 14553#endif
5476a9a4
GM
14554{
14555 static pid_t child;
14556 if (!child) {
14557 child = vfork ();
14558 if (child < 0) {
14559 perror ("vfork");
14560 _exit(2);
14561 }
14562 if (!child) {
14563 arg = getpid();
14564 write(-1, "", 0);
14565 _exit (arg);
14566 }
14567 }
14568}
f199cab1 14569
5476a9a4
GM
14570int
14571main ()
14572{
14573 pid_t parent = getpid ();
14574 pid_t child;
f199cab1 14575
5476a9a4 14576 sparc_address_test (0);
f199cab1 14577
5476a9a4 14578 child = vfork ();
3e0be4ab 14579
5476a9a4
GM
14580 if (child == 0) {
14581 /* Here is another test for sparc vfork register problems. This
14582 test uses lots of local variables, at least as many local
14583 variables as main has allocated so far including compiler
14584 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14585 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14586 reuse the register of parent for one of the local variables,
14587 since it will think that parent can't possibly be used any more
14588 in this routine. Assigning to the local variable will thus
14589 munge parent in the parent process. */
14590 pid_t
14591 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14592 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14593 /* Convince the compiler that p..p7 are live; otherwise, it might
14594 use the same hardware register for all 8 local variables. */
14595 if (p != p1 || p != p2 || p != p3 || p != p4
14596 || p != p5 || p != p6 || p != p7)
14597 _exit(1);
3e0be4ab 14598
5476a9a4
GM
14599 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14600 from child file descriptors. If the child closes a descriptor
14601 before it execs or exits, this munges the parent's descriptor
14602 as well. Test for this by closing stdout in the child. */
14603 _exit(close(fileno(stdout)) != 0);
14604 } else {
14605 int status;
14606 struct stat st;
3e0be4ab 14607
5476a9a4
GM
14608 while (wait(&status) != child)
14609 ;
14610 return (
14611 /* Was there some problem with vforking? */
14612 child < 0
3e0be4ab 14613
5476a9a4
GM
14614 /* Did the child fail? (This shouldn't happen.) */
14615 || status
14616
14617 /* Did the vfork/compiler bug occur? */
14618 || parent != getpid()
14619
14620 /* Did the file descriptor bug occur? */
14621 || fstat(fileno(stdout), &st) != 0
14622 );
14623 }
f199cab1 14624}
5476a9a4
GM
14625_ACEOF
14626if ac_fn_c_try_run "$LINENO"; then :
14627 ac_cv_func_vfork_works=yes
14628else
14629 ac_cv_func_vfork_works=no
14630fi
14631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14632 conftest.$ac_objext conftest.beam conftest.$ac_ext
14633fi
14634
14635fi
14636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14637$as_echo "$ac_cv_func_vfork_works" >&6; }
14638
14639fi;
14640if test "x$ac_cv_func_fork_works" = xcross; then
14641 ac_cv_func_vfork_works=$ac_cv_func_vfork
14642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14643$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14644fi
14645
14646if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 14647
5476a9a4 14648$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 14649
5476a9a4 14650else
3e0be4ab 14651
5476a9a4 14652$as_echo "#define vfork fork" >>confdefs.h
942f733f 14653
5476a9a4
GM
14654fi
14655if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 14656
5476a9a4 14657$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 14658
5476a9a4 14659fi
f199cab1 14660
f199cab1 14661
5476a9a4
GM
14662for ac_func in snprintf
14663do :
14664 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
14665if test "x$ac_cv_func_snprintf" = x""yes; then :
14666 cat >>confdefs.h <<_ACEOF
14667#define HAVE_SNPRINTF 1
14668_ACEOF
14669
14670fi
14671done
14672
942f733f 14673
5476a9a4
GM
14674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
14675$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
14676if test "${emacs_cv_langinfo_codeset+set}" = set; then :
14677 $as_echo_n "(cached) " >&6
14678else
14679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680/* end confdefs.h. */
14681#include <langinfo.h>
3e0be4ab
GM
14682int
14683main ()
14684{
5476a9a4
GM
14685char* cs = nl_langinfo(CODESET);
14686 ;
14687 return 0;
14688}
14689_ACEOF
14690if ac_fn_c_try_link "$LINENO"; then :
14691 emacs_cv_langinfo_codeset=yes
14692else
14693 emacs_cv_langinfo_codeset=no
14694fi
14695rm -f core conftest.err conftest.$ac_objext \
14696 conftest$ac_exeext conftest.$ac_ext
f199cab1 14697
5476a9a4
GM
14698fi
14699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
14700$as_echo "$emacs_cv_langinfo_codeset" >&6; }
14701if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 14702
5476a9a4 14703$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 14704
5476a9a4 14705fi
f199cab1 14706
5476a9a4
GM
14707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14708$as_echo_n "checking for mbstate_t... " >&6; }
14709if test "${ac_cv_type_mbstate_t+set}" = set; then :
14710 $as_echo_n "(cached) " >&6
14711else
14712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14713/* end confdefs.h. */
14714$ac_includes_default
14715# include <wchar.h>
14716int
14717main ()
14718{
14719mbstate_t x; return sizeof x;
14720 ;
14721 return 0;
3e0be4ab 14722}
942f733f 14723_ACEOF
5476a9a4
GM
14724if ac_fn_c_try_compile "$LINENO"; then :
14725 ac_cv_type_mbstate_t=yes
3e0be4ab 14726else
5476a9a4 14727 ac_cv_type_mbstate_t=no
942f733f 14728fi
5476a9a4 14729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 14730fi
5476a9a4
GM
14731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14732$as_echo "$ac_cv_type_mbstate_t" >&6; }
14733 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 14734
5476a9a4 14735$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 14736
5476a9a4 14737 else
f199cab1 14738
5476a9a4 14739$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 14740
5476a9a4
GM
14741 fi
14742
14743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
14744$as_echo_n "checking for C restricted array declarations... " >&6; }
14745if test "${emacs_cv_c_restrict_arr+set}" = set; then :
14746 $as_echo_n "(cached) " >&6
14747else
14748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14749/* end confdefs.h. */
14750void fred (int x[__restrict]);
14751int
14752main ()
14753{
14754
14755 ;
14756 return 0;
14757}
14758_ACEOF
14759if ac_fn_c_try_compile "$LINENO"; then :
14760 emacs_cv_c_restrict_arr=yes
14761else
14762 emacs_cv_c_restrict_arr=no
14763fi
14764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14765fi
14766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
14767$as_echo "$emacs_cv_c_restrict_arr" >&6; }
14768if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 14769
5476a9a4 14770$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 14771
5476a9a4 14772fi
f199cab1
GM
14773
14774
14775
8ad96b1d
GM
14776$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
14777
14778
14779
5476a9a4 14780$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
14781
14782
6b10626d
GM
14783
14784
14785
14786
5476a9a4 14787## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 14788
5476a9a4 14789$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
14790
14791
14792
5476a9a4 14793$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 14794
942f733f 14795
942f733f 14796
6b10626d
GM
14797
14798
8ad96b1d
GM
14799$as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
14800
14801
14802
14803$as_echo "#define SEPCHAR ':'" >>confdefs.h
14804
14805
14806
14807$as_echo "#define subprocesses 1" >>confdefs.h
14808
14809
14810
14811$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
14812
14813
14814
942f733f 14815
9ff736dc
GM
14816$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
14817
14818
14819
f199cab1 14820
6b10626d
GM
14821
14822$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
14823
14824
14825
14826$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
14827
14828
14829
14830$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
14831
14832
14833
14834
14835
5476a9a4
GM
14836case $opsys in
14837 aix4-2)
14838 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
14839 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 14840
5476a9a4
GM
14841 fi
14842 ;;
f199cab1 14843
5476a9a4
GM
14844 hpux*)
14845 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 14846
5476a9a4
GM
14847 ;;
14848esac
f199cab1
GM
14849
14850
5476a9a4
GM
14851case $opsys in
14852 darwin | gnu | hpux* | *bsd )
f199cab1 14853
5476a9a4 14854$as_echo "#define NO_TERMIO 1" >>confdefs.h
f199cab1 14855
5476a9a4 14856 ;;
f199cab1 14857
5476a9a4 14858 irix6-5 | sol2* | unixware )
f199cab1 14859
5476a9a4 14860$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 14861
5476a9a4
GM
14862 ;;
14863esac
f199cab1
GM
14864
14865
5476a9a4
GM
14866case $opsys in
14867 hpux* | irix6-5 | openbsd | sol2* | unixware )
3e0be4ab 14868
5476a9a4 14869$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h
f199cab1 14870
5476a9a4 14871 ;;
f199cab1 14872
5476a9a4 14873 aix4-2)
f199cab1 14874
5476a9a4 14875$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h
f199cab1
GM
14876
14877
5476a9a4 14878$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h
f199cab1
GM
14879
14880
5476a9a4 14881$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h
f199cab1
GM
14882
14883
5476a9a4 14884$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h
f199cab1 14885
f199cab1 14886
067d23c9 14887
5476a9a4 14888$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 14889
5476a9a4 14890 ;;
067d23c9 14891
5476a9a4 14892 freebsd)
f199cab1 14893
5476a9a4 14894$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 14895
5476a9a4 14896 ;;
f199cab1 14897
5476a9a4 14898 darwin)
f199cab1 14899
5476a9a4 14900$as_echo "#define NO_ABORT 1" >>confdefs.h
f199cab1 14901
5476a9a4
GM
14902 ;;
14903esac
f199cab1 14904
5476a9a4
GM
14905case $opsys in
14906 gnu-* | sol2-10 )
f199cab1 14907
5476a9a4 14908$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 14909
5476a9a4
GM
14910 ;;
14911esac
f199cab1 14912
5476a9a4
GM
14913case $opsys in
14914 darwin | freebsd | netbsd | openbsd )
f199cab1 14915
5476a9a4 14916$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 14917
5476a9a4
GM
14918 ;;
14919esac
f199cab1 14920
5476a9a4
GM
14921case $opsys in
14922 netbsd | openbsd) sound_device="/dev/audio" ;;
14923 *) sound_device="/dev/dsp" ;;
14924esac
f199cab1 14925
f199cab1 14926
5476a9a4
GM
14927cat >>confdefs.h <<_ACEOF
14928#define DEFAULT_SOUND_DEVICE "$sound_device"
14929_ACEOF
f199cab1
GM
14930
14931
14932
5476a9a4
GM
14933case $opsys in
14934 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 14935
5476a9a4 14936$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 14937
5476a9a4
GM
14938 ;;
14939esac
f199cab1 14940
f199cab1 14941
5476a9a4
GM
14942case $opsys in
14943 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 14944
5476a9a4 14945$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 14946
5476a9a4
GM
14947 ;;
14948esac
f199cab1
GM
14949
14950
067d23c9 14951
1f5d53eb
PE
14952
14953
f199cab1 14954
f199cab1 14955
7d2a1c5e 14956
5476a9a4
GM
14957case $opsys in
14958 aix4-2 )
a09508f2 14959 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 14960
a09508f2 14961 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 14962
a09508f2 14963 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 14964
5476a9a4 14965 ;;
7d2a1c5e 14966
5476a9a4 14967 cygwin )
a09508f2 14968 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 14969
a09508f2 14970 $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)" >>confdefs.h
f199cab1 14971
a09508f2 14972 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 14973
a09508f2 14974 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 14975
5476a9a4 14976 ;;
f199cab1 14977
1146da8d 14978 darwin )
a09508f2 14979 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 14980
5476a9a4 14981 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 14982
a09508f2 14983 $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)" >>confdefs.h
7d2a1c5e 14984
a09508f2 14985 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 14986
a09508f2 14987 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 14988
5476a9a4 14989 ;;
f199cab1 14990
1146da8d 14991 gnu | openbsd )
5476a9a4 14992 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 14993
5476a9a4 14994 ;;
f199cab1 14995
1146da8d 14996 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
5476a9a4 14997 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 14998
5476a9a4 14999$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 15000
a09508f2 15001 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 15002
a09508f2 15003 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); }" >>confdefs.h
f199cab1 15004
1146da8d
GM
15005 if test "x$ac_cv_func_posix_openpt" = xyes; then
15006 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15007
15008 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15009
15010 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 15011 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 15012
a09508f2 15013 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15014
5476a9a4 15015 else
a09508f2 15016 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 15017
5476a9a4
GM
15018 fi
15019 else
15020 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15021
5476a9a4
GM
15022 fi
15023 ;;
f199cab1 15024
5476a9a4
GM
15025 hpux*)
15026 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15027
a09508f2 15028 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 15029
a09508f2 15030 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 15031
5476a9a4 15032 ;;
f199cab1 15033
5476a9a4
GM
15034 irix6-5 )
15035 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 15036
5476a9a4 15037 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 15038
a09508f2 15039 $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }" >>confdefs.h
f199cab1 15040
a09508f2 15041 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15042
a09508f2 15043 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15044
5476a9a4 15045 ;;
f199cab1 15046
5476a9a4 15047 sol2* )
a09508f2 15048 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
f199cab1 15049
5476a9a4 15050 ;;
f199cab1 15051
5476a9a4 15052 unixware )
a09508f2 15053 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
5476a9a4
GM
15054
15055 ;;
15056esac
15057
15058
15059case $opsys in
15060 sol2* | unixware )
15061 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15062
a09508f2 15063 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
15064
15065
15066$as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h
15067
15068 ;;
15069esac
15070
15071
15072
15073
15074case $opsys in
15075 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
15076 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15077
15078 ;;
15079
15080 gnu-linux | gnu-kfreebsd )
15081
15082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15083$as_echo_n "checking for signals via characters... " >&6; }
15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15085/* end confdefs.h. */
5476a9a4
GM
15086
15087#include <linux/version.h>
15088#if LINUX_VERSION_CODE < 0x20400
15089# error "Linux version too old"
15090#endif
15091
3e0be4ab
GM
15092int
15093main ()
15094{
f199cab1 15095
3e0be4ab
GM
15096 ;
15097 return 0;
15098}
067d23c9 15099_ACEOF
5476a9a4
GM
15100if ac_fn_c_try_cpp "$LINENO"; then :
15101 emacs_signals_via_chars=yes
1f5d53eb 15102else
5476a9a4 15103 emacs_signals_via_chars=no
067d23c9 15104fi
5476a9a4 15105rm -f conftest.err conftest.$ac_ext
067d23c9 15106
5476a9a4
GM
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15108$as_echo "$emacs_signals_via_chars" >&6; }
15109 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15110
15111 ;;
15112esac
15113
15114
15115
15116
c0528ebe
GM
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C library" >&5
15118$as_echo_n "checking whether we are using the GNU C library... " >&6; }
15119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15120/* end confdefs.h. */
5476a9a4 15121
c0528ebe
GM
15122#include <features.h>
15123#ifndef __GNU_LIBRARY__
15124# error "this is not the GNU C library"
15125#endif
5476a9a4 15126
c0528ebe
GM
15127int
15128main ()
15129{
5476a9a4 15130
c0528ebe
GM
15131 ;
15132 return 0;
15133}
15134_ACEOF
15135if ac_fn_c_try_cpp "$LINENO"; then :
15136 emacs_glibc=yes
15137else
15138 emacs_glibc=no
15139fi
15140rm -f conftest.err conftest.$ac_ext
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_glibc" >&5
15142$as_echo "$emacs_glibc" >&6; }
5476a9a4 15143
c0528ebe 15144if test $emacs_glibc = yes; then
5476a9a4 15145
c0528ebe 15146 emacs_pending_output=unknown
5476a9a4 15147
c0528ebe
GM
15148 case $opsys in
15149 gnu | gnu-linux | gnu-kfreebsd )
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
5476a9a4 15151$as_echo_n "checking for style of pending output formalism... " >&6; }
c0528ebe 15152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15153/* end confdefs.h. */
5476a9a4
GM
15154
15155#include <stdio.h>
15156#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
15157# error "stdio definitions not found"
15158#endif
067d23c9 15159
3e0be4ab
GM
15160int
15161main ()
15162{
5476a9a4 15163
3e0be4ab
GM
15164 ;
15165 return 0;
15166}
067d23c9 15167_ACEOF
5476a9a4
GM
15168if ac_fn_c_try_cpp "$LINENO"; then :
15169 emacs_pending_output=new
067d23c9 15170fi
5476a9a4 15171rm -f conftest.err conftest.$ac_ext
067d23c9 15172
5476a9a4
GM
15173 if test $emacs_pending_output = unknown; then
15174 case $opsys in
15175 gnu-linux | gnu-kfreebsd)
15176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15177/* end confdefs.h. */
067d23c9 15178
5476a9a4
GM
15179#include <stdio.h>
15180#ifndef __UCLIBC__
15181# error "not using uclibc"
15182#endif
067d23c9 15183
5476a9a4
GM
15184int
15185main ()
15186{
067d23c9 15187
5476a9a4
GM
15188 ;
15189 return 0;
15190}
15191_ACEOF
15192if ac_fn_c_try_cpp "$LINENO"; then :
15193 emacs_pending_output=uclibc
15194else
15195 emacs_pending_output=old
15196fi
15197rm -f conftest.err conftest.$ac_ext
15198 ;;
15199 esac
15200 fi
067d23c9 15201
5476a9a4
GM
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
15203$as_echo "$emacs_pending_output" >&6; }
067d23c9 15204
5476a9a4
GM
15205 case $emacs_pending_output in
15206 new)
c0528ebe 15207 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
067d23c9 15208
5476a9a4
GM
15209 ;;
15210 uclibc)
c0528ebe 15211 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
067d23c9 15212
5476a9a4
GM
15213 ;;
15214 old)
c0528ebe 15215 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
067d23c9 15216
5476a9a4
GM
15217 ;;
15218 esac
15219 ;;
c0528ebe
GM
15220 esac
15221 if test $emacs_pending_output = unknown; then
15222 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)" >>confdefs.h
15223
15224 fi
15225
15226else
15227 case $opsys in
15228 cygwin | darwin | freebsd | netbsd | openbsd )
15229 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
15230
15231 ;;
15232
15233 unixware)
15234 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
067d23c9 15235
c0528ebe
GM
15236 ;;
15237
15238 *)
15239 if test x$ac_cv_header_stdio_ext_h = xyes && \
15240 test x$ac_cv_func___fpending = xyes; then
15241 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)" >>confdefs.h
15242
15243
15244$as_echo "#define DISPNEW_NEEDS_STDIO_EXT 1" >>confdefs.h
15245
15246 else
15247 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)" >>confdefs.h
15248
15249 fi
15250 ;;
15251 esac
15252fi
067d23c9 15253
067d23c9 15254
067d23c9 15255
f199cab1 15256
5476a9a4
GM
15257case $opsys in
15258 gnu)
15259 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
f199cab1 15260
5476a9a4 15261 ;;
067d23c9 15262
5476a9a4
GM
15263 hpux*)
15264 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
067d23c9 15265
5476a9a4 15266 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15267
5476a9a4
GM
15268 ;;
15269 irix6-5)
15270 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
067d23c9 15271
5476a9a4 15272 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15273
5476a9a4
GM
15274 ;;
15275esac
067d23c9 15276
1f5d53eb 15277
1f5d53eb 15278
067d23c9 15279
f199cab1 15280
5476a9a4
GM
15281case $opsys in
15282 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15283 ;;
f199cab1 15284
5476a9a4 15285 gnu | freebsd | netbsd | openbsd )
f199cab1 15286
5476a9a4 15287$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15288
5476a9a4 15289 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15290
5476a9a4 15291 ;;
f199cab1 15292
5476a9a4
GM
15293 gnu-linux | gnu-kfreebsd )
15294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 15295/* end confdefs.h. */
3e0be4ab 15296
5476a9a4
GM
15297#ifndef __i386__
15298# error "not i386"
15299#endif
f199cab1 15300
5476a9a4
GM
15301int
15302main ()
15303{
067d23c9 15304
5476a9a4
GM
15305 ;
15306 return 0;
15307}
15308_ACEOF
15309if ac_fn_c_try_cpp "$LINENO"; then :
15310 $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
1f5d53eb 15311
3e0be4ab 15312fi
5476a9a4 15313rm -f conftest.err conftest.$ac_ext
3e0be4ab 15314
5476a9a4
GM
15315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15316/* end confdefs.h. */
3e0be4ab 15317
5476a9a4
GM
15318#ifndef __ia64__
15319# error "not ia64"
15320#endif
067d23c9 15321
5476a9a4
GM
15322int
15323main ()
15324{
3e0be4ab 15325
5476a9a4
GM
15326 ;
15327 return 0;
15328}
15329_ACEOF
15330if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 15331
5476a9a4 15332$as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h
067d23c9 15333
3e0be4ab 15334fi
5476a9a4
GM
15335rm -f conftest.err conftest.$ac_ext
15336 ;;
067d23c9 15337
5476a9a4 15338 hpux*)
3e0be4ab 15339
5476a9a4 15340$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 15341
5476a9a4 15342 ;;
3e0be4ab 15343
5476a9a4
GM
15344 irix6-5)
15345 $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
3e0be4ab 15346
5476a9a4
GM
15347 ;;
15348esac
3e0be4ab
GM
15349
15350
f199cab1 15351
e700232f
GM
15352
15353
15354
f199cab1 15355
5476a9a4
GM
15356case $opsys in
15357 aix4-2 | hpux* | unixware)
15358 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
f199cab1 15359
5476a9a4 15360 ;;
f199cab1 15361
5476a9a4
GM
15362 gnu-linux | gnu-kfreebsd )
15363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 15364/* end confdefs.h. */
f199cab1 15365
5476a9a4
GM
15366#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15367 || defined __alpha__ || defined __mips__ || defined __s390__ \
15368 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15369 || defined __ia64__ || defined __sh__
15370/* ok */
15371#else
15372# error "setjmp not known to work on this arch"
15373#endif
15374
f199cab1
GM
15375int
15376main ()
1fd182f0 15377{
5476a9a4 15378
f199cab1
GM
15379 ;
15380 return 0;
1fd182f0
PE
15381}
15382_ACEOF
5476a9a4
GM
15383if ac_fn_c_try_cpp "$LINENO"; then :
15384 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 15385
5476a9a4
GM
15386else
15387 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
1fd182f0 15388
1f5d53eb 15389fi
5476a9a4
GM
15390rm -f conftest.err conftest.$ac_ext
15391 ;;
15392esac
1fd182f0 15393
f199cab1 15394
5476a9a4
GM
15395if test x$GCC = xyes; then
15396 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15397
1fd182f0 15398else
5476a9a4
GM
15399 case $opsys in
15400 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15401 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 15402
5476a9a4
GM
15403 ;;
15404 esac
15405fi
1fd182f0 15406
906debc3
GM
15407case $opsys in
15408 sol2* | unixware )
15409
15410$as_echo "#define _setjmp setjmp" >>confdefs.h
15411
15412
15413$as_echo "#define _longjmp longjmp" >>confdefs.h
15414
15415
15416$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15417
15418 ;;
15419esac
15420
906debc3 15421
5476a9a4
GM
15422case $opsys in
15423 hpux* | sol2* )
1f5d53eb 15424
5476a9a4 15425$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 15426
5476a9a4 15427 ;;
906debc3
GM
15428
15429 netbsd | openbsd )
15430
15431$as_echo "#define SIGNAL_H_AHB 1" >>confdefs.h
15432
15433 ;;
5476a9a4 15434esac
1f5d53eb 15435
1f5d53eb 15436
4fda9c95 15437
3e0be4ab 15438
4fda9c95 15439
4fda9c95 15440
f199cab1 15441
906debc3 15442
7cd2ed2c
GM
15443
15444
5476a9a4
GM
15445case $opsys in
15446 aix4-2)
15447 $as_echo "#define USG /**/" >>confdefs.h
15448
15449 $as_echo "#define USG5 /**/" >>confdefs.h
15450
15451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15452/* end confdefs.h. */
15453
15454#ifndef _AIX
15455# error "_AIX not defined"
15456#endif
f199cab1 15457
4fda9c95
GM
15458int
15459main ()
15460{
3e0be4ab 15461
4fda9c95
GM
15462 ;
15463 return 0;
15464}
15465_ACEOF
5476a9a4 15466if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15467
3e0be4ab 15468else
4fda9c95 15469
5476a9a4 15470$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 15471
5476a9a4
GM
15472fi
15473rm -f conftest.err conftest.$ac_ext
15474 ;;
4fda9c95 15475
5476a9a4 15476 cygwin)
3e0be4ab 15477
5476a9a4 15478$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 15479
5476a9a4 15480 ;;
f199cab1 15481
5476a9a4
GM
15482 darwin)
15483 $as_echo "#define BSD4_2 /**/" >>confdefs.h
f199cab1 15484
5476a9a4 15485 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
f199cab1
GM
15486
15487
5476a9a4 15488$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 15489
5476a9a4 15490 ;;
4fda9c95 15491
5476a9a4
GM
15492 freebsd)
15493 $as_echo "#define BSD4_2 /**/" >>confdefs.h
4fda9c95 15494
4fda9c95 15495
5476a9a4 15496$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
4fda9c95 15497
5476a9a4 15498 ;;
f199cab1 15499
5476a9a4
GM
15500 gnu | netbsd | openbsd )
15501 $as_echo "#define BSD4_2 /**/" >>confdefs.h
f199cab1 15502
5476a9a4
GM
15503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15504/* end confdefs.h. */
f199cab1 15505
5476a9a4
GM
15506#ifndef BSD_SYSTEM
15507# error "BSD_SYSTEM not defined"
15508#endif
f199cab1 15509
5476a9a4
GM
15510int
15511main ()
15512{
f199cab1 15513
5476a9a4
GM
15514 ;
15515 return 0;
15516}
f199cab1 15517_ACEOF
5476a9a4 15518if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15519
3e0be4ab 15520else
5476a9a4 15521 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
4fda9c95 15522
5476a9a4
GM
15523fi
15524rm -f conftest.err conftest.$ac_ext
15525 ;;
4fda9c95 15526
5476a9a4
GM
15527 gnu-linux | gnu-kfreebsd )
15528 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15529
f199cab1 15530
5476a9a4 15531$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 15532
5476a9a4 15533 ;;
4fda9c95 15534
5476a9a4
GM
15535 hpux*)
15536 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15537
5476a9a4 15538 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 15539
4717915f 15540
5476a9a4 15541$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 15542
5476a9a4 15543 ;;
697210c4 15544
5476a9a4
GM
15545 irix6-5)
15546 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15547
5476a9a4 15548 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15549
906debc3
GM
15550 $as_echo "#define USG5_4 /**/" >>confdefs.h
15551
f199cab1 15552
5476a9a4 15553$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 15554
5476a9a4 15555 ;;
f199cab1 15556
5476a9a4
GM
15557 sol2*)
15558 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15559
5476a9a4 15560 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 15561
906debc3
GM
15562 $as_echo "#define USG5_4 /**/" >>confdefs.h
15563
4fda9c95 15564
5476a9a4 15565$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 15566
5476a9a4 15567 ;;
f199cab1 15568
5476a9a4
GM
15569 unixware)
15570 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15571
5476a9a4 15572 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15573
906debc3
GM
15574 $as_echo "#define USG5_4 /**/" >>confdefs.h
15575
5476a9a4
GM
15576 ;;
15577esac
f199cab1 15578
4fda9c95 15579
5476a9a4
GM
15580case $opsys in
15581 cygwin)
4fda9c95 15582
5476a9a4 15583$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 15584
5476a9a4 15585 ;;
4fda9c95 15586
5476a9a4 15587 hpux11)
f199cab1 15588
5476a9a4 15589$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h
f199cab1
GM
15590
15591
5476a9a4 15592$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 15593
5476a9a4 15594 ;;
f199cab1 15595
5476a9a4 15596 irix6-5)
f199cab1 15597
5476a9a4 15598$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 15599
f199cab1 15600
5476a9a4 15601$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
f199cab1 15602
5476a9a4 15603 ;;
f199cab1 15604
5476a9a4 15605 sol2-10)
f199cab1 15606
5476a9a4 15607$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 15608
5476a9a4
GM
15609 ;;
15610esac
f199cab1 15611
5476a9a4
GM
15612# Set up the CFLAGS for real compilation, so we can substitute it.
15613CFLAGS="$REAL_CFLAGS"
15614CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 15615
5476a9a4
GM
15616## Hack to detect a buggy GCC version.
15617if test "x$GCC" = xyes \
15618 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
15619 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
15620 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
15621 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
15622fi
f199cab1 15623
5476a9a4 15624version=$PACKAGE_VERSION
f199cab1 15625
5476a9a4
GM
15626### Specify what sort of things we'll be editing into Makefile and config.h.
15627### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 15628
f199cab1 15629
5476a9a4 15630## Unused?
4fda9c95
GM
15631
15632
15633
15634
4717915f 15635
4717915f 15636
4717915f 15637
4717915f 15638
4717915f 15639
4717915f 15640
4717915f 15641
4717915f 15642
4717915f 15643
4717915f 15644
4717915f 15645
4717915f
GM
15646
15647
4717915f
GM
15648
15649
4717915f 15650
4717915f 15651
4717915f 15652
5476a9a4
GM
15653## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
15654## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
15655## end of LIBX_BASE, but nothing ever set it.
4717915f 15656
4717915f 15657
4fda9c95 15658
4fda9c95 15659
5476a9a4
GM
15660## Used in lwlib/Makefile.in.
15661
4fda9c95 15662
4fda9c95 15663
4fda9c95
GM
15664
15665
15666
15667
4fda9c95 15668
42dcba54
GM
15669if test -n "${term_header}"; then
15670
15671cat >>confdefs.h <<_ACEOF
15672#define TERM_HEADER "${term_header}"
15673_ACEOF
15674
15675fi
15676
4fda9c95 15677
5476a9a4
GM
15678cat >>confdefs.h <<_ACEOF
15679#define EMACS_CONFIGURATION "${canonical}"
15680_ACEOF
4fda9c95
GM
15681
15682
5476a9a4
GM
15683cat >>confdefs.h <<_ACEOF
15684#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
15685_ACEOF
15686
5476a9a4 15687
4fda9c95 15688
5476a9a4
GM
15689XMENU_OBJ=
15690XOBJ=
15691FONT_OBJ=
15692if test "${HAVE_X_WINDOWS}" = "yes" ; then
15693
15694$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 15695
5476a9a4 15696 XMENU_OBJ=xmenu.o
42dcba54 15697 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
5476a9a4
GM
15698 FONT_OBJ=xfont.o
15699 if test "$HAVE_XFT" = "yes"; then
15700 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
15701 elif test "$HAVE_FREETYPE" = "yes"; then
15702 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
15703 fi
4fda9c95 15704
f199cab1 15705fi
4fda9c95 15706
4fda9c95 15707
4fda9c95 15708
4fda9c95 15709
5476a9a4
GM
15710WIDGET_OBJ=
15711MOTIF_LIBW=
15712if test "${USE_X_TOOLKIT}" != "none" ; then
15713 WIDGET_OBJ=widget.o
15714
15715$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
15716
15717 if test "${USE_X_TOOLKIT}" = "LUCID"; then
15718
15719$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 15720
5476a9a4 15721 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 15722
5476a9a4 15723$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 15724
5476a9a4
GM
15725 MOTIF_LIBW=-lXm
15726 case "$opsys" in
15727 gnu-linux)
15728 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
15729 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
15730 ;;
3e0be4ab 15731
5476a9a4
GM
15732 unixware)
15733 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
15734 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
15735 MOTIF_LIBW="MOTIF_LIBW -lXimp"
15736 ;;
3e0be4ab 15737
5476a9a4
GM
15738 aix4-2)
15739 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
15740 MOTIF_LIBW="$MOTIF_LIBW -li18n"
15741 ;;
15742 esac
15743 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
15744 fi
15745fi
4fda9c95 15746
3e0be4ab 15747
5476a9a4
GM
15748TOOLKIT_LIBW=
15749case "$USE_X_TOOLKIT" in
15750 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
15751 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
15752 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
15753esac
4fda9c95
GM
15754
15755
5476a9a4
GM
15756if test "$USE_X_TOOLKIT" = "none"; then
15757 LIBXT_OTHER="\$(LIBXSM)"
15758 OLDXMENU_TARGET="really-oldXMenu"
15759else
15760 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
15761 OLDXMENU_TARGET="really-lwlib"
15762fi
4fda9c95
GM
15763
15764
5476a9a4
GM
15765## The X Menu stuff is present in the X10 distribution, but missing
15766## from X11. If we have X10, just use the installed library;
15767## otherwise, use our own copy.
15768if test "${HAVE_X11}" = "yes" ; then
4fda9c95 15769
5476a9a4 15770$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 15771
4fda9c95 15772
5476a9a4
GM
15773 if test "$USE_X_TOOLKIT" = "none"; then
15774 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
15775 else
15776 OLDXMENU="\${lwlibdir}/liblw.a"
15777 fi
15778 LIBXMENU="\$(OLDXMENU)"
15779 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
15780 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 15781else
5476a9a4
GM
15782 ## For a syntactically valid Makefile; not actually used for anything.
15783 ## See comments in src/Makefile.in.
15784 OLDXMENU=nothing
15785 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
15786 if test "${HAVE_X_WINDOWS}" = "yes"; then
15787 LIBXMENU="-lXMenu"
15788 else
15789 LIBXMENU=
15790 fi
15791 LIBX_OTHER=
15792 OLDXMENU_DEPS=
15793fi
4fda9c95 15794
5476a9a4
GM
15795if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
15796 OLDXMENU_TARGET=
15797 OLDXMENU=nothing
15798 LIBXMENU=
15799 OLDXMENU_DEPS=
15800fi
4fda9c95 15801
4fda9c95
GM
15802
15803
3e0be4ab 15804
4fda9c95 15805
3e0be4ab 15806
3e0be4ab 15807
5476a9a4 15808if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 15809
5476a9a4 15810$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 15811
5476a9a4 15812fi
4fda9c95 15813
5476a9a4 15814if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 15815
5476a9a4 15816$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 15817
5476a9a4 15818fi
3e0be4ab 15819
5476a9a4
GM
15820RALLOC_OBJ=
15821if test "${REL_ALLOC}" = "yes" ; then
15822
15823$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
15824
15825
5476a9a4
GM
15826 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
15827fi
4fda9c95 15828
4fda9c95 15829
5476a9a4
GM
15830if test "$opsys" = "cygwin"; then
15831 CYGWIN_OBJ="sheap.o"
15832 ## Cygwin differs because of its unexec().
15833 PRE_ALLOC_OBJ=
15834 POST_ALLOC_OBJ=lastfile.o
15835else
15836 CYGWIN_OBJ=
15837 PRE_ALLOC_OBJ=lastfile.o
15838 POST_ALLOC_OBJ=
15839fi
4fda9c95 15840
3e0be4ab 15841
3e0be4ab 15842
3e0be4ab 15843
5476a9a4
GM
15844# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
15845# it temporarily reverts them to their pre-pkg-config values,
15846# because gnulib needs to work with both src (which uses the
15847# pkg-config stuff) and lib-src (which does not). For example, gnulib
15848# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
15849# and it therefore needs to run in an environment where LIBS does not
15850# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
15851# for some package unrelated to lib-src.
15852SAVE_CFLAGS=$CFLAGS
15853SAVE_LIBS=$LIBS
15854CFLAGS=$pre_PKG_CONFIG_CFLAGS
15855LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 15856
3e0be4ab
GM
15857
15858
4fda9c95 15859
4fda9c95 15860
3e0be4ab 15861
3e0be4ab
GM
15862
15863
4fda9c95 15864
3e0be4ab
GM
15865
15866
5476a9a4
GM
15867 LIBC_FATAL_STDERR_=1
15868 export LIBC_FATAL_STDERR_
3e0be4ab 15869
5476a9a4
GM
15870# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15871# for constant arguments. Useless!
15872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
15873$as_echo_n "checking for working alloca.h... " >&6; }
15874if test "${ac_cv_working_alloca_h+set}" = set; then :
15875 $as_echo_n "(cached) " >&6
15876else
15877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15878/* end confdefs.h. */
15879#include <alloca.h>
15880int
15881main ()
15882{
15883char *p = (char *) alloca (2 * sizeof (int));
15884 if (p) return 0;
15885 ;
15886 return 0;
15887}
15888_ACEOF
15889if ac_fn_c_try_link "$LINENO"; then :
15890 ac_cv_working_alloca_h=yes
15891else
15892 ac_cv_working_alloca_h=no
15893fi
15894rm -f core conftest.err conftest.$ac_objext \
15895 conftest$ac_exeext conftest.$ac_ext
15896fi
15897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
15898$as_echo "$ac_cv_working_alloca_h" >&6; }
15899if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 15900
5476a9a4 15901$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 15902
5476a9a4 15903fi
3e0be4ab 15904
5476a9a4
GM
15905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
15906$as_echo_n "checking for alloca... " >&6; }
15907if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
15908 $as_echo_n "(cached) " >&6
15909else
5476a9a4 15910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 15911/* end confdefs.h. */
5476a9a4
GM
15912#ifdef __GNUC__
15913# define alloca __builtin_alloca
15914#else
15915# ifdef _MSC_VER
15916# include <malloc.h>
15917# define alloca _alloca
15918# else
15919# ifdef HAVE_ALLOCA_H
15920# include <alloca.h>
15921# else
15922# ifdef _AIX
15923 #pragma alloca
15924# else
15925# ifndef alloca /* predefined by HP cc +Olibcalls */
15926char *alloca ();
15927# endif
15928# endif
15929# endif
15930# endif
15931#endif
15932
15933int
15934main ()
15935{
15936char *p = (char *) alloca (1);
15937 if (p) return 0;
15938 ;
15939 return 0;
15940}
15941_ACEOF
15942if ac_fn_c_try_link "$LINENO"; then :
15943 ac_cv_func_alloca_works=yes
15944else
15945 ac_cv_func_alloca_works=no
15946fi
15947rm -f core conftest.err conftest.$ac_objext \
15948 conftest$ac_exeext conftest.$ac_ext
15949fi
15950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
15951$as_echo "$ac_cv_func_alloca_works" >&6; }
15952
15953if test $ac_cv_func_alloca_works = yes; then
15954
15955$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
15956
15957else
15958 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15959# that cause trouble. Some versions do not even contain alloca or
15960# contain a buggy version. If you still want to use their alloca,
15961# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 15962
4fda9c95 15963
4fda9c95 15964
4fda9c95
GM
15965
15966
5476a9a4 15967ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 15968
5476a9a4 15969$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 15970
4fda9c95 15971
5476a9a4
GM
15972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
15973$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
15974if test "${ac_cv_os_cray+set}" = set; then :
15975 $as_echo_n "(cached) " >&6
15976else
15977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15978/* end confdefs.h. */
15979#if defined CRAY && ! defined CRAY2
15980webecray
15981#else
15982wenotbecray
15983#endif
4fda9c95 15984
5476a9a4
GM
15985_ACEOF
15986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15987 $EGREP "webecray" >/dev/null 2>&1; then :
15988 ac_cv_os_cray=yes
15989else
15990 ac_cv_os_cray=no
15991fi
15992rm -f conftest*
4fda9c95 15993
5476a9a4
GM
15994fi
15995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
15996$as_echo "$ac_cv_os_cray" >&6; }
15997if test $ac_cv_os_cray = yes; then
15998 for ac_func in _getb67 GETB67 getb67; do
15999 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16000ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16001eval as_val=\$$as_ac_var
16002 if test "x$as_val" = x""yes; then :
4fda9c95 16003
5476a9a4
GM
16004cat >>confdefs.h <<_ACEOF
16005#define CRAY_STACKSEG_END $ac_func
16006_ACEOF
4fda9c95 16007
5476a9a4
GM
16008 break
16009fi
4fda9c95 16010
5476a9a4
GM
16011 done
16012fi
4fda9c95 16013
5476a9a4
GM
16014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16015$as_echo_n "checking stack direction for C alloca... " >&6; }
16016if test "${ac_cv_c_stack_direction+set}" = set; then :
16017 $as_echo_n "(cached) " >&6
16018else
16019 if test "$cross_compiling" = yes; then :
16020 ac_cv_c_stack_direction=0
16021else
16022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023/* end confdefs.h. */
16024$ac_includes_default
16025int
16026find_stack_direction (int *addr, int depth)
16027{
16028 int dir, dummy = 0;
16029 if (! addr)
16030 addr = &dummy;
16031 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16032 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16033 return dir + dummy;
16034}
4fda9c95 16035
5476a9a4
GM
16036int
16037main (int argc, char **argv)
16038{
16039 return find_stack_direction (0, argc + !argv + 20) < 0;
16040}
16041_ACEOF
16042if ac_fn_c_try_run "$LINENO"; then :
16043 ac_cv_c_stack_direction=1
16044else
16045 ac_cv_c_stack_direction=-1
16046fi
16047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16048 conftest.$ac_objext conftest.beam conftest.$ac_ext
16049fi
4fda9c95 16050
5476a9a4
GM
16051fi
16052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16053$as_echo "$ac_cv_c_stack_direction" >&6; }
16054cat >>confdefs.h <<_ACEOF
16055#define STACK_DIRECTION $ac_cv_c_stack_direction
16056_ACEOF
3e0be4ab
GM
16057
16058
5476a9a4 16059fi
3e0be4ab
GM
16060
16061
16062
16063
5476a9a4
GM
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16065$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16066if test "${ac_cv_c_bigendian+set}" = set; then :
16067 $as_echo_n "(cached) " >&6
16068else
16069 ac_cv_c_bigendian=unknown
16070 # See if we're dealing with a universal compiler.
16071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16072/* end confdefs.h. */
16073#ifndef __APPLE_CC__
16074 not a universal capable compiler
16075 #endif
16076 typedef int dummy;
16077
16078_ACEOF
16079if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16080
5476a9a4
GM
16081 # Check for potential -arch flags. It is not universal unless
16082 # there are at least two -arch flags with different values.
16083 ac_arch=
16084 ac_prev=
16085 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16086 if test -n "$ac_prev"; then
16087 case $ac_word in
16088 i?86 | x86_64 | ppc | ppc64)
16089 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16090 ac_arch=$ac_word
16091 else
16092 ac_cv_c_bigendian=universal
16093 break
16094 fi
16095 ;;
16096 esac
16097 ac_prev=
16098 elif test "x$ac_word" = "x-arch"; then
16099 ac_prev=arch
16100 fi
16101 done
16102fi
16103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16104 if test $ac_cv_c_bigendian = unknown; then
16105 # See if sys/param.h defines the BYTE_ORDER macro.
16106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16107/* end confdefs.h. */
16108#include <sys/types.h>
16109 #include <sys/param.h>
3e0be4ab 16110
5476a9a4
GM
16111int
16112main ()
16113{
16114#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16115 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16116 && LITTLE_ENDIAN)
16117 bogus endian macros
16118 #endif
3e0be4ab 16119
5476a9a4
GM
16120 ;
16121 return 0;
16122}
16123_ACEOF
16124if ac_fn_c_try_compile "$LINENO"; then :
16125 # It does; now see whether it defined to BIG_ENDIAN or not.
16126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16127/* end confdefs.h. */
16128#include <sys/types.h>
16129 #include <sys/param.h>
369e19fc 16130
5476a9a4
GM
16131int
16132main ()
16133{
16134#if BYTE_ORDER != BIG_ENDIAN
16135 not big endian
16136 #endif
3e0be4ab 16137
5476a9a4
GM
16138 ;
16139 return 0;
16140}
16141_ACEOF
16142if ac_fn_c_try_compile "$LINENO"; then :
16143 ac_cv_c_bigendian=yes
16144else
16145 ac_cv_c_bigendian=no
16146fi
16147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16148fi
16149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16150 fi
16151 if test $ac_cv_c_bigendian = unknown; then
16152 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16154/* end confdefs.h. */
16155#include <limits.h>
4fda9c95 16156
5476a9a4
GM
16157int
16158main ()
16159{
16160#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16161 bogus endian macros
16162 #endif
4fda9c95 16163
5476a9a4
GM
16164 ;
16165 return 0;
16166}
16167_ACEOF
16168if ac_fn_c_try_compile "$LINENO"; then :
16169 # It does; now see whether it defined to _BIG_ENDIAN or not.
16170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16171/* end confdefs.h. */
16172#include <limits.h>
4fda9c95 16173
5476a9a4
GM
16174int
16175main ()
16176{
16177#ifndef _BIG_ENDIAN
16178 not big endian
16179 #endif
f199cab1 16180
5476a9a4
GM
16181 ;
16182 return 0;
16183}
16184_ACEOF
16185if ac_fn_c_try_compile "$LINENO"; then :
16186 ac_cv_c_bigendian=yes
f199cab1 16187else
5476a9a4
GM
16188 ac_cv_c_bigendian=no
16189fi
16190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16191fi
16192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193 fi
16194 if test $ac_cv_c_bigendian = unknown; then
16195 # Compile a test program.
16196 if test "$cross_compiling" = yes; then :
16197 # Try to guess by grepping values from an object file.
16198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199/* end confdefs.h. */
16200short int ascii_mm[] =
16201 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16202 short int ascii_ii[] =
16203 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16204 int use_ascii (int i) {
16205 return ascii_mm[i] + ascii_ii[i];
16206 }
16207 short int ebcdic_ii[] =
16208 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16209 short int ebcdic_mm[] =
16210 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16211 int use_ebcdic (int i) {
16212 return ebcdic_mm[i] + ebcdic_ii[i];
16213 }
16214 extern int foo;
f199cab1 16215
5476a9a4
GM
16216int
16217main ()
16218{
16219return use_ascii (foo) == use_ebcdic (foo);
16220 ;
16221 return 0;
16222}
16223_ACEOF
16224if ac_fn_c_try_compile "$LINENO"; then :
16225 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16226 ac_cv_c_bigendian=yes
16227 fi
16228 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16229 if test "$ac_cv_c_bigendian" = unknown; then
16230 ac_cv_c_bigendian=no
16231 else
16232 # finding both strings is unlikely to happen, but who knows?
16233 ac_cv_c_bigendian=unknown
16234 fi
16235 fi
16236fi
16237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 16238else
3e0be4ab 16239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 16240/* end confdefs.h. */
5476a9a4
GM
16241$ac_includes_default
16242int
16243main ()
4fda9c95 16244{
5476a9a4
GM
16245
16246 /* Are we little or big endian? From Harbison&Steele. */
16247 union
16248 {
16249 long int l;
16250 char c[sizeof (long int)];
16251 } u;
16252 u.l = 1;
16253 return u.c[sizeof (long int) - 1] == 1;
16254
16255 ;
4fda9c95
GM
16256 return 0;
16257}
16258_ACEOF
f199cab1 16259if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 16260 ac_cv_c_bigendian=no
3e0be4ab 16261else
5476a9a4 16262 ac_cv_c_bigendian=yes
4fda9c95 16263fi
f199cab1
GM
16264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16265 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16266fi
4fda9c95 16267
5476a9a4 16268 fi
f199cab1 16269fi
5476a9a4
GM
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16271$as_echo "$ac_cv_c_bigendian" >&6; }
16272 case $ac_cv_c_bigendian in #(
16273 yes)
16274 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16275;; #(
16276 no)
16277 ;; #(
16278 universal)
3e0be4ab 16279
5476a9a4 16280$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 16281
5476a9a4
GM
16282 ;; #(
16283 *)
16284 as_fn_error "unknown endianness
16285 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16286 esac
4fda9c95 16287
4fda9c95 16288
5476a9a4
GM
16289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16290$as_echo_n "checking for inline... " >&6; }
16291if test "${ac_cv_c_inline+set}" = set; then :
16292 $as_echo_n "(cached) " >&6
f199cab1 16293else
5476a9a4
GM
16294 ac_cv_c_inline=no
16295for ac_kw in inline __inline__ __inline; do
16296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16297/* end confdefs.h. */
16298#ifndef __cplusplus
16299typedef int foo_t;
16300static $ac_kw foo_t static_foo () {return 0; }
16301$ac_kw foo_t foo () {return 0; }
16302#endif
3e0be4ab 16303
3e0be4ab 16304_ACEOF
5476a9a4
GM
16305if ac_fn_c_try_compile "$LINENO"; then :
16306 ac_cv_c_inline=$ac_kw
3e0be4ab 16307fi
5476a9a4
GM
16308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16309 test "$ac_cv_c_inline" != no && break
16310done
3e0be4ab 16311
4fda9c95 16312fi
5476a9a4
GM
16313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16314$as_echo "$ac_cv_c_inline" >&6; }
3e0be4ab 16315
5476a9a4
GM
16316case $ac_cv_c_inline in
16317 inline | yes) ;;
16318 *)
16319 case $ac_cv_c_inline in
16320 no) ac_val=;;
16321 *) ac_val=$ac_cv_c_inline;;
16322 esac
16323 cat >>confdefs.h <<_ACEOF
16324#ifndef __cplusplus
16325#define inline $ac_val
16326#endif
4fda9c95 16327_ACEOF
5476a9a4
GM
16328 ;;
16329esac
4fda9c95 16330
da6c8463 16331
5476a9a4
GM
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16333$as_echo_n "checking whether strtold conforms to C99... " >&6; }
16334if test "${gl_cv_func_c99_strtold+set}" = set; then :
16335 $as_echo_n "(cached) " >&6
16336else
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h. */
16339/* On HP-UX before 11.23, strtold returns a struct instead of
16340 long double. Reject implementations like that, by requiring
16341 compatibility with the C99 prototype. */
16342 #include <stdlib.h>
16343 static long double (*p) (char const *, char **) = strtold;
16344 static long double
16345 test (char const *nptr, char **endptr)
16346 {
16347 long double r;
16348 r = strtold (nptr, endptr);
16349 return r;
16350 }
16351int
16352main ()
16353{
16354return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16355 ;
16356 return 0;
16357}
16358_ACEOF
16359if ac_fn_c_try_link "$LINENO"; then :
16360 gl_cv_func_c99_strtold=yes
16361else
16362 gl_cv_func_c99_strtold=no
3e0be4ab 16363fi
5476a9a4
GM
16364rm -f core conftest.err conftest.$ac_objext \
16365 conftest$ac_exeext conftest.$ac_ext
16366fi
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16368$as_echo "$gl_cv_func_c99_strtold" >&6; }
16369 if test $gl_cv_func_c99_strtold = yes; then
da6c8463 16370
5476a9a4 16371$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
da6c8463 16372
5476a9a4 16373 fi
da6c8463
GM
16374
16375
5476a9a4
GM
16376 GNULIB_CHDIR=0;
16377 GNULIB_CHOWN=0;
16378 GNULIB_CLOSE=0;
16379 GNULIB_DUP=0;
16380 GNULIB_DUP2=0;
16381 GNULIB_DUP3=0;
16382 GNULIB_ENVIRON=0;
16383 GNULIB_EUIDACCESS=0;
16384 GNULIB_FACCESSAT=0;
16385 GNULIB_FCHDIR=0;
16386 GNULIB_FCHOWNAT=0;
16387 GNULIB_FDATASYNC=0;
16388 GNULIB_FSYNC=0;
16389 GNULIB_FTRUNCATE=0;
16390 GNULIB_GETCWD=0;
16391 GNULIB_GETDOMAINNAME=0;
16392 GNULIB_GETDTABLESIZE=0;
16393 GNULIB_GETGROUPS=0;
16394 GNULIB_GETHOSTNAME=0;
16395 GNULIB_GETLOGIN=0;
16396 GNULIB_GETLOGIN_R=0;
16397 GNULIB_GETPAGESIZE=0;
16398 GNULIB_GETUSERSHELL=0;
16399 GNULIB_GROUP_MEMBER=0;
16400 GNULIB_ISATTY=0;
16401 GNULIB_LCHOWN=0;
16402 GNULIB_LINK=0;
16403 GNULIB_LINKAT=0;
16404 GNULIB_LSEEK=0;
16405 GNULIB_PIPE=0;
16406 GNULIB_PIPE2=0;
16407 GNULIB_PREAD=0;
16408 GNULIB_PWRITE=0;
16409 GNULIB_READ=0;
16410 GNULIB_READLINK=0;
16411 GNULIB_READLINKAT=0;
16412 GNULIB_RMDIR=0;
16413 GNULIB_SETHOSTNAME=0;
16414 GNULIB_SLEEP=0;
16415 GNULIB_SYMLINK=0;
16416 GNULIB_SYMLINKAT=0;
16417 GNULIB_TTYNAME_R=0;
16418 GNULIB_UNISTD_H_NONBLOCKING=0;
16419 GNULIB_UNISTD_H_SIGPIPE=0;
16420 GNULIB_UNLINK=0;
16421 GNULIB_UNLINKAT=0;
16422 GNULIB_USLEEP=0;
16423 GNULIB_WRITE=0;
16424 HAVE_CHOWN=1;
16425 HAVE_DUP2=1;
16426 HAVE_DUP3=1;
16427 HAVE_EUIDACCESS=1;
16428 HAVE_FACCESSAT=1;
16429 HAVE_FCHDIR=1;
16430 HAVE_FCHOWNAT=1;
16431 HAVE_FDATASYNC=1;
16432 HAVE_FSYNC=1;
16433 HAVE_FTRUNCATE=1;
16434 HAVE_GETDTABLESIZE=1;
16435 HAVE_GETGROUPS=1;
16436 HAVE_GETHOSTNAME=1;
16437 HAVE_GETLOGIN=1;
16438 HAVE_GETPAGESIZE=1;
16439 HAVE_GROUP_MEMBER=1;
16440 HAVE_LCHOWN=1;
16441 HAVE_LINK=1;
16442 HAVE_LINKAT=1;
16443 HAVE_PIPE=1;
16444 HAVE_PIPE2=1;
16445 HAVE_PREAD=1;
16446 HAVE_PWRITE=1;
16447 HAVE_READLINK=1;
16448 HAVE_READLINKAT=1;
16449 HAVE_SETHOSTNAME=1;
16450 HAVE_SLEEP=1;
16451 HAVE_SYMLINK=1;
16452 HAVE_SYMLINKAT=1;
16453 HAVE_UNLINKAT=1;
16454 HAVE_USLEEP=1;
16455 HAVE_DECL_ENVIRON=1;
16456 HAVE_DECL_FCHDIR=1;
16457 HAVE_DECL_FDATASYNC=1;
16458 HAVE_DECL_GETDOMAINNAME=1;
16459 HAVE_DECL_GETLOGIN_R=1;
16460 HAVE_DECL_GETPAGESIZE=1;
16461 HAVE_DECL_GETUSERSHELL=1;
16462 HAVE_DECL_SETHOSTNAME=1;
16463 HAVE_DECL_TTYNAME_R=1;
16464 HAVE_OS_H=0;
16465 HAVE_SYS_PARAM_H=0;
16466 REPLACE_CHOWN=0;
16467 REPLACE_CLOSE=0;
16468 REPLACE_DUP=0;
16469 REPLACE_DUP2=0;
16470 REPLACE_FCHOWNAT=0;
16471 REPLACE_FTRUNCATE=0;
16472 REPLACE_GETCWD=0;
16473 REPLACE_GETDOMAINNAME=0;
16474 REPLACE_GETLOGIN_R=0;
16475 REPLACE_GETGROUPS=0;
16476 REPLACE_GETPAGESIZE=0;
16477 REPLACE_ISATTY=0;
16478 REPLACE_LCHOWN=0;
16479 REPLACE_LINK=0;
16480 REPLACE_LINKAT=0;
16481 REPLACE_LSEEK=0;
16482 REPLACE_PREAD=0;
16483 REPLACE_PWRITE=0;
16484 REPLACE_READ=0;
16485 REPLACE_READLINK=0;
16486 REPLACE_RMDIR=0;
16487 REPLACE_SLEEP=0;
16488 REPLACE_SYMLINK=0;
16489 REPLACE_TTYNAME_R=0;
16490 REPLACE_UNLINK=0;
16491 REPLACE_UNLINKAT=0;
16492 REPLACE_USLEEP=0;
16493 REPLACE_WRITE=0;
16494 UNISTD_H_HAVE_WINSOCK2_H=0;
16495 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
16496
16497
93131e11
GM
16498
16499
16500
16501
16502
16503
16504
16505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
16506$as_echo_n "checking if environ is properly declared... " >&6; }
16507 if test "${gt_cv_var_environ_declaration+set}" = set; then :
16508 $as_echo_n "(cached) " >&6
16509else
16510
16511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16512/* end confdefs.h. */
16513#if HAVE_UNISTD_H
16514 #include <unistd.h>
16515 #endif
16516 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
16517 #include <stdlib.h>
16518
16519 extern struct { int foo; } environ;
16520int
16521main ()
16522{
16523environ.foo = 1;
16524 ;
16525 return 0;
16526}
16527_ACEOF
16528if ac_fn_c_try_compile "$LINENO"; then :
16529 gt_cv_var_environ_declaration=no
16530else
16531 gt_cv_var_environ_declaration=yes
16532fi
16533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16534fi
16535
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
16537$as_echo "$gt_cv_var_environ_declaration" >&6; }
16538 if test $gt_cv_var_environ_declaration = yes; then
16539
16540$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
16541
16542 fi
16543
16544
16545 if test $gt_cv_var_environ_declaration != yes; then
16546 HAVE_DECL_ENVIRON=0
16547 fi
16548
7cd2ed2c
GM
16549
16550
16551
16552
8966cbff
GM
16553
16554
5476a9a4
GM
16555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
16556$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
16557if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
f199cab1 16558 $as_echo_n "(cached) " >&6
ae0d7250 16559else
f199cab1 16560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16561/* end confdefs.h. */
ae0d7250 16562
5476a9a4
GM
16563#include <sys/types.h>
16564#include <sys/stat.h>
3e0be4ab
GM
16565int
16566main ()
16567{
5476a9a4 16568struct stat s; s.st_dm_mode;
3e0be4ab
GM
16569 ;
16570 return 0;
16571}
6ad6792b 16572_ACEOF
5476a9a4
GM
16573if ac_fn_c_try_compile "$LINENO"; then :
16574 ac_cv_struct_st_dm_mode=yes
f199cab1 16575else
5476a9a4 16576 ac_cv_struct_st_dm_mode=no
f199cab1 16577fi
5476a9a4 16578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 16579fi
5476a9a4
GM
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
16581$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
f199cab1 16582
5476a9a4 16583 if test $ac_cv_struct_st_dm_mode = yes; then
f199cab1 16584
5476a9a4 16585$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
f199cab1 16586
5476a9a4 16587 fi
f199cab1 16588
f199cab1 16589
5476a9a4
GM
16590ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
16591if test "x$ac_cv_have_decl_strmode" = x""yes; then :
16592 ac_have_decl=1
16593else
16594 ac_have_decl=0
f199cab1
GM
16595fi
16596
5476a9a4
GM
16597cat >>confdefs.h <<_ACEOF
16598#define HAVE_DECL_STRMODE $ac_have_decl
16599_ACEOF
f199cab1 16600
4fda9c95 16601
5476a9a4
GM
16602 GNULIB__EXIT=0;
16603 GNULIB_ATOLL=0;
16604 GNULIB_CALLOC_POSIX=0;
16605 GNULIB_CANONICALIZE_FILE_NAME=0;
16606 GNULIB_GETLOADAVG=0;
16607 GNULIB_GETSUBOPT=0;
16608 GNULIB_GRANTPT=0;
16609 GNULIB_MALLOC_POSIX=0;
16610 GNULIB_MBTOWC=0;
16611 GNULIB_MKDTEMP=0;
16612 GNULIB_MKOSTEMP=0;
16613 GNULIB_MKOSTEMPS=0;
16614 GNULIB_MKSTEMP=0;
16615 GNULIB_MKSTEMPS=0;
16616 GNULIB_POSIX_OPENPT=0;
16617 GNULIB_PTSNAME=0;
16618 GNULIB_PTSNAME_R=0;
16619 GNULIB_PUTENV=0;
16620 GNULIB_RANDOM=0;
16621 GNULIB_RANDOM_R=0;
16622 GNULIB_REALLOC_POSIX=0;
16623 GNULIB_REALPATH=0;
16624 GNULIB_RPMATCH=0;
16625 GNULIB_SETENV=0;
16626 GNULIB_STRTOD=0;
16627 GNULIB_STRTOLL=0;
16628 GNULIB_STRTOULL=0;
16629 GNULIB_SYSTEM_POSIX=0;
16630 GNULIB_UNLOCKPT=0;
16631 GNULIB_UNSETENV=0;
16632 GNULIB_WCTOMB=0;
16633 HAVE__EXIT=1;
16634 HAVE_ATOLL=1;
16635 HAVE_CANONICALIZE_FILE_NAME=1;
16636 HAVE_DECL_GETLOADAVG=1;
16637 HAVE_GETSUBOPT=1;
16638 HAVE_GRANTPT=1;
16639 HAVE_MKDTEMP=1;
16640 HAVE_MKOSTEMP=1;
16641 HAVE_MKOSTEMPS=1;
16642 HAVE_MKSTEMP=1;
16643 HAVE_MKSTEMPS=1;
16644 HAVE_POSIX_OPENPT=1;
16645 HAVE_PTSNAME=1;
16646 HAVE_PTSNAME_R=1;
16647 HAVE_RANDOM=1;
16648 HAVE_RANDOM_H=1;
16649 HAVE_RANDOM_R=1;
16650 HAVE_REALPATH=1;
16651 HAVE_RPMATCH=1;
16652 HAVE_SETENV=1;
16653 HAVE_DECL_SETENV=1;
16654 HAVE_STRTOD=1;
16655 HAVE_STRTOLL=1;
16656 HAVE_STRTOULL=1;
16657 HAVE_STRUCT_RANDOM_DATA=1;
16658 HAVE_SYS_LOADAVG_H=0;
16659 HAVE_UNLOCKPT=1;
16660 HAVE_DECL_UNSETENV=1;
16661 REPLACE_CALLOC=0;
16662 REPLACE_CANONICALIZE_FILE_NAME=0;
16663 REPLACE_MALLOC=0;
16664 REPLACE_MBTOWC=0;
16665 REPLACE_MKSTEMP=0;
16666 REPLACE_PTSNAME_R=0;
16667 REPLACE_PUTENV=0;
16668 REPLACE_RANDOM_R=0;
16669 REPLACE_REALLOC=0;
16670 REPLACE_REALPATH=0;
16671 REPLACE_SETENV=0;
16672 REPLACE_STRTOD=0;
16673 REPLACE_UNSETENV=0;
16674 REPLACE_WCTOMB=0;
f199cab1
GM
16675
16676
16677
5476a9a4
GM
16678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16679$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16680if test "${gl_cv_have_include_next+set}" = set; then :
f199cab1
GM
16681 $as_echo_n "(cached) " >&6
16682else
5476a9a4
GM
16683 rm -rf conftestd1a conftestd1b conftestd2
16684 mkdir conftestd1a conftestd1b conftestd2
16685 cat <<EOF > conftestd1a/conftest.h
16686#define DEFINED_IN_CONFTESTD1
16687#include_next <conftest.h>
16688#ifdef DEFINED_IN_CONFTESTD2
16689int foo;
16690#else
16691#error "include_next doesn't work"
16692#endif
16693EOF
16694 cat <<EOF > conftestd1b/conftest.h
16695#define DEFINED_IN_CONFTESTD1
16696#include <stdio.h>
16697#include_next <conftest.h>
16698#ifdef DEFINED_IN_CONFTESTD2
16699int foo;
16700#else
16701#error "include_next doesn't work"
16702#endif
16703EOF
16704 cat <<EOF > conftestd2/conftest.h
16705#ifndef DEFINED_IN_CONFTESTD1
16706#error "include_next test doesn't work"
16707#endif
16708#define DEFINED_IN_CONFTESTD2
16709EOF
16710 gl_save_CPPFLAGS="$CPPFLAGS"
16711 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16713/* end confdefs.h. */
5476a9a4 16714#include <conftest.h>
5f90be1b 16715_ACEOF
4fda9c95 16716if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 16717 gl_cv_have_include_next=yes
5f90be1b 16718else
5476a9a4 16719 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
f199cab1 16720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16721/* end confdefs.h. */
5476a9a4 16722#include <conftest.h>
4fda9c95 16723_ACEOF
3e0be4ab 16724if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 16725 gl_cv_have_include_next=buggy
3e0be4ab 16726else
5476a9a4 16727 gl_cv_have_include_next=no
3e0be4ab 16728fi
5476a9a4 16729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 16730
4fda9c95 16731fi
f199cab1 16732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
16733 CPPFLAGS="$gl_save_CPPFLAGS"
16734 rm -rf conftestd1a conftestd1b conftestd2
5f90be1b 16735
3e0be4ab 16736fi
5476a9a4
GM
16737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
16738$as_echo "$gl_cv_have_include_next" >&6; }
16739 PRAGMA_SYSTEM_HEADER=
16740 if test $gl_cv_have_include_next = yes; then
16741 INCLUDE_NEXT=include_next
16742 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16743 if test -n "$GCC"; then
16744 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
16745 fi
16746 else
16747 if test $gl_cv_have_include_next = buggy; then
16748 INCLUDE_NEXT=include
16749 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16750 else
16751 INCLUDE_NEXT=include
16752 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
16753 fi
16754 fi
f199cab1
GM
16755
16756
16757
5476a9a4
GM
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
16759$as_echo_n "checking whether system header files limit the line length... " >&6; }
16760if test "${gl_cv_pragma_columns+set}" = set; then :
f199cab1
GM
16761 $as_echo_n "(cached) " >&6
16762else
5476a9a4 16763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16764/* end confdefs.h. */
f199cab1 16765
5476a9a4
GM
16766#ifdef __TANDEM
16767choke me
16768#endif
f199cab1 16769
f199cab1 16770_ACEOF
5476a9a4
GM
16771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16772 $EGREP "choke me" >/dev/null 2>&1; then :
16773 gl_cv_pragma_columns=yes
16774else
16775 gl_cv_pragma_columns=no
f199cab1 16776fi
5476a9a4 16777rm -f conftest*
f199cab1 16778
f199cab1 16779
5476a9a4
GM
16780fi
16781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
16782$as_echo "$gl_cv_pragma_columns" >&6; }
16783 if test $gl_cv_pragma_columns = yes; then
16784 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
f199cab1 16785 else
5476a9a4 16786 PRAGMA_COLUMNS=
f199cab1
GM
16787 fi
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
5f90be1b 16802
f199cab1
GM
16803
16804
16805 if test $gl_cv_have_include_next = yes; then
5476a9a4 16806 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 16807 else
5476a9a4
GM
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
16809$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
16810if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 16811 $as_echo_n "(cached) " >&6
5f90be1b 16812else
f199cab1 16813
5476a9a4 16814 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
16815
16816
16817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 16818/* end confdefs.h. */
5476a9a4 16819#include <getopt.h>
4fda9c95 16820
5f90be1b 16821_ACEOF
f199cab1
GM
16822 case "$host_os" in
16823 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16824 *) gl_absname_cpp="$ac_cpp" ;;
16825 esac
5f90be1b 16826
f199cab1
GM
16827 case "$host_os" in
16828 mingw*)
16829 gl_dirsep_regex='[/\\]'
16830 ;;
16831 *)
16832 gl_dirsep_regex='\/'
16833 ;;
16834 esac
16835 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 16836
5476a9a4 16837 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
16838 | sed -e "$gl_make_literal_regex_sed"`
16839 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16840 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16841 s|^/[^/]|//&|
16842 p
16843 q
16844 }'
5476a9a4 16845 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
16846 sed -n "$gl_absolute_header_sed"`'"'
16847 else
5476a9a4 16848 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 16849 fi
5f90be1b
PE
16850
16851
3e0be4ab 16852fi
5476a9a4
GM
16853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
16854$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 16855 fi
5476a9a4 16856 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 16857
f199cab1
GM
16858 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16859 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 16860 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
16861 else
16862 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 16863 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 16864 fi
5476a9a4 16865 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
16866
16867
f199cab1 16868
f199cab1 16869
5476a9a4
GM
16870 if test $ac_cv_header_getopt_h = yes; then
16871 HAVE_GETOPT_H=1
16872 else
16873 HAVE_GETOPT_H=0
f199cab1
GM
16874 fi
16875
f199cab1 16876
5476a9a4 16877 gl_replace_getopt=
f199cab1 16878
5476a9a4
GM
16879 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16880 for ac_header in getopt.h
16881do :
16882 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
16883if test "x$ac_cv_header_getopt_h" = x""yes; then :
16884 cat >>confdefs.h <<_ACEOF
16885#define HAVE_GETOPT_H 1
16886_ACEOF
f199cab1 16887
5476a9a4
GM
16888else
16889 gl_replace_getopt=yes
3e0be4ab 16890fi
3e0be4ab 16891
5476a9a4 16892done
3e0be4ab 16893
5476a9a4 16894 fi
3e0be4ab 16895
5476a9a4
GM
16896 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16897 for ac_func in getopt_long_only
16898do :
16899 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
16900if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
16901 cat >>confdefs.h <<_ACEOF
16902#define HAVE_GETOPT_LONG_ONLY 1
16903_ACEOF
3e0be4ab 16904
3e0be4ab 16905else
5476a9a4 16906 gl_replace_getopt=yes
3e0be4ab 16907fi
5476a9a4 16908done
3e0be4ab 16909
f199cab1 16910 fi
3e0be4ab 16911
5476a9a4
GM
16912 if test -z "$gl_replace_getopt"; then
16913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
16914$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
16915if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 16916 $as_echo_n "(cached) " >&6
5476a9a4
GM
16917else
16918
16919 if test $cross_compiling = no; then
16920 if test "$cross_compiling" = yes; then :
16921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16923as_fn_error "cannot run test program while cross compiling
16924See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 16925else
f199cab1 16926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16927/* end confdefs.h. */
5476a9a4
GM
16928
16929#include <unistd.h>
16930#include <stdlib.h>
16931#include <string.h>
16932
f199cab1
GM
16933int
16934main ()
16935{
5476a9a4
GM
16936 static char program[] = "program";
16937 static char a[] = "-a";
16938 static char foo[] = "foo";
16939 static char bar[] = "bar";
16940 char *argv[] = { program, a, foo, bar, NULL };
16941 int c;
16942
16943 c = getopt (4, argv, "ab");
16944 if (!(c == 'a'))
16945 return 1;
16946 c = getopt (4, argv, "ab");
16947 if (!(c == -1))
16948 return 2;
16949 if (!(optind == 2))
16950 return 3;
f199cab1
GM
16951 return 0;
16952}
16953
3e0be4ab 16954_ACEOF
5476a9a4
GM
16955if ac_fn_c_try_run "$LINENO"; then :
16956 gl_cv_func_getopt_posix=maybe
3e0be4ab 16957else
5476a9a4 16958 gl_cv_func_getopt_posix=no
3e0be4ab 16959fi
5476a9a4
GM
16960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16961 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
16962fi
16963
5476a9a4
GM
16964 if test $gl_cv_func_getopt_posix = maybe; then
16965 if test "$cross_compiling" = yes; then :
16966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16968as_fn_error "cannot run test program while cross compiling
16969See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 16970else
5476a9a4
GM
16971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16972/* end confdefs.h. */
3e0be4ab 16973
5476a9a4
GM
16974#include <unistd.h>
16975#include <stdlib.h>
16976#include <string.h>
3e0be4ab 16977
5476a9a4
GM
16978int
16979main ()
16980{
16981 static char program[] = "program";
16982 static char donald[] = "donald";
16983 static char p[] = "-p";
16984 static char billy[] = "billy";
16985 static char duck[] = "duck";
16986 static char a[] = "-a";
16987 static char bar[] = "bar";
16988 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
16989 int c;
3e0be4ab 16990
5476a9a4
GM
16991 c = getopt (7, argv, "+abp:q:");
16992 if (!(c == -1))
16993 return 4;
16994 if (!(strcmp (argv[0], "program") == 0))
16995 return 5;
16996 if (!(strcmp (argv[1], "donald") == 0))
16997 return 6;
16998 if (!(strcmp (argv[2], "-p") == 0))
16999 return 7;
17000 if (!(strcmp (argv[3], "billy") == 0))
17001 return 8;
17002 if (!(strcmp (argv[4], "duck") == 0))
17003 return 9;
17004 if (!(strcmp (argv[5], "-a") == 0))
17005 return 10;
17006 if (!(strcmp (argv[6], "bar") == 0))
17007 return 11;
17008 if (!(optind == 1))
17009 return 12;
17010 return 0;
17011}
3e0be4ab
GM
17012
17013_ACEOF
5476a9a4
GM
17014if ac_fn_c_try_run "$LINENO"; then :
17015 gl_cv_func_getopt_posix=maybe
17016else
17017 gl_cv_func_getopt_posix=no
17018fi
17019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17020 conftest.$ac_objext conftest.beam conftest.$ac_ext
17021fi
b0415a03 17022
5476a9a4
GM
17023 fi
17024 if test $gl_cv_func_getopt_posix = maybe; then
17025 if test "$cross_compiling" = yes; then :
17026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17028as_fn_error "cannot run test program while cross compiling
17029See \`config.log' for more details." "$LINENO" 5; }
17030else
17031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17032/* end confdefs.h. */
b0415a03 17033
5476a9a4
GM
17034#include <unistd.h>
17035#include <stdlib.h>
17036#include <string.h>
3e0be4ab 17037
5476a9a4
GM
17038int
17039main ()
17040{
17041 static char program[] = "program";
17042 static char ab[] = "-ab";
17043 char *argv[3] = { program, ab, NULL };
17044 if (getopt (2, argv, "ab:") != 'a')
17045 return 13;
17046 if (getopt (2, argv, "ab:") != '?')
17047 return 14;
17048 if (optopt != 'b')
17049 return 15;
17050 if (optind != 2)
17051 return 16;
17052 return 0;
17053}
3e0be4ab 17054
5476a9a4
GM
17055_ACEOF
17056if ac_fn_c_try_run "$LINENO"; then :
17057 gl_cv_func_getopt_posix=yes
17058else
17059 gl_cv_func_getopt_posix=no
17060fi
17061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17062 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 17063fi
3e0be4ab 17064
5476a9a4
GM
17065 fi
17066 else
17067 case "$host_os" in
17068 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17069 *) gl_cv_func_getopt_posix="guessing yes";;
17070 esac
17071 fi
3e0be4ab 17072
5476a9a4
GM
17073fi
17074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17075$as_echo "$gl_cv_func_getopt_posix" >&6; }
17076 case "$gl_cv_func_getopt_posix" in
17077 *no) gl_replace_getopt=yes ;;
17078 esac
3e0be4ab
GM
17079 fi
17080
5476a9a4
GM
17081 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17083$as_echo_n "checking for working GNU getopt function... " >&6; }
17084if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17085 $as_echo_n "(cached) " >&6
17086else
17087 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17088 # optstring is necessary for programs like m4 that have POSIX-mandated
17089 # semantics for supporting options interspersed with files.
17090 # Also, since getopt_long is a GNU extension, we require optind=0.
17091 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17092 # so take care to revert to the correct (non-)export state.
17093 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17094 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17095 xx) gl_had_POSIXLY_CORRECT=exported ;;
17096 x) gl_had_POSIXLY_CORRECT=yes ;;
17097 *) gl_had_POSIXLY_CORRECT= ;;
17098 esac
17099 POSIXLY_CORRECT=1
17100 export POSIXLY_CORRECT
17101 if test "$cross_compiling" = yes; then :
17102 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 17103
5476a9a4
GM
17104else
17105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17106/* end confdefs.h. */
17107#include <getopt.h>
17108 #include <stddef.h>
17109 #include <string.h>
3e0be4ab 17110
5476a9a4
GM
17111#include <stdlib.h>
17112#if defined __MACH__ && defined __APPLE__
17113/* Avoid a crash on Mac OS X. */
17114#include <mach/mach.h>
17115#include <mach/mach_error.h>
17116#include <mach/thread_status.h>
17117#include <mach/exception.h>
17118#include <mach/task.h>
17119#include <pthread.h>
17120/* The exception port on which our thread listens. */
17121static mach_port_t our_exception_port;
17122/* The main function of the thread listening for exceptions of type
17123 EXC_BAD_ACCESS. */
17124static void *
17125mach_exception_thread (void *arg)
17126{
17127 /* Buffer for a message to be received. */
17128 struct {
17129 mach_msg_header_t head;
17130 mach_msg_body_t msgh_body;
17131 char data[1024];
17132 } msg;
17133 mach_msg_return_t retval;
17134 /* Wait for a message on the exception port. */
17135 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17136 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17137 if (retval != MACH_MSG_SUCCESS)
17138 abort ();
17139 exit (1);
17140}
17141static void
17142nocrash_init (void)
17143{
17144 mach_port_t self = mach_task_self ();
17145 /* Allocate a port on which the thread shall listen for exceptions. */
17146 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17147 == KERN_SUCCESS) {
17148 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17149 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17150 MACH_MSG_TYPE_MAKE_SEND)
17151 == KERN_SUCCESS) {
17152 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17153 for us. */
17154 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17155 /* Create the thread listening on the exception port. */
17156 pthread_attr_t attr;
17157 pthread_t thread;
17158 if (pthread_attr_init (&attr) == 0
17159 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17160 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17161 pthread_attr_destroy (&attr);
17162 /* Replace the exception port info for these exceptions with our own.
17163 Note that we replace the exception port for the entire task, not only
17164 for a particular thread. This has the effect that when our exception
17165 port gets the message, the thread specific exception port has already
17166 been asked, and we don't need to bother about it.
17167 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17168 task_set_exception_ports (self, mask, our_exception_port,
17169 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17170 }
17171 }
17172 }
17173}
17174#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17175/* Avoid a crash on native Windows. */
17176#define WIN32_LEAN_AND_MEAN
17177#include <windows.h>
17178#include <winerror.h>
17179static LONG WINAPI
17180exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17181{
17182 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17183 {
17184 case EXCEPTION_ACCESS_VIOLATION:
17185 case EXCEPTION_IN_PAGE_ERROR:
17186 case EXCEPTION_STACK_OVERFLOW:
17187 case EXCEPTION_GUARD_PAGE:
17188 case EXCEPTION_PRIV_INSTRUCTION:
17189 case EXCEPTION_ILLEGAL_INSTRUCTION:
17190 case EXCEPTION_DATATYPE_MISALIGNMENT:
17191 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17192 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17193 exit (1);
17194 }
17195 return EXCEPTION_CONTINUE_SEARCH;
17196}
17197static void
17198nocrash_init (void)
17199{
17200 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17201}
17202#else
17203/* Avoid a crash on POSIX systems. */
17204#include <signal.h>
17205/* A POSIX signal handler. */
17206static void
17207exception_handler (int sig)
17208{
17209 exit (1);
17210}
17211static void
17212nocrash_init (void)
17213{
17214#ifdef SIGSEGV
17215 signal (SIGSEGV, exception_handler);
17216#endif
17217#ifdef SIGBUS
17218 signal (SIGBUS, exception_handler);
17219#endif
17220}
17221#endif
3e0be4ab 17222
3e0be4ab 17223
5476a9a4
GM
17224int
17225main ()
17226{
3e0be4ab 17227
5476a9a4 17228 int result = 0;
3e0be4ab 17229
5476a9a4 17230 nocrash_init();
3e0be4ab 17231
5476a9a4
GM
17232 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17233 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17234 OSF/1 5.1, Solaris 10. */
17235 {
17236 static char conftest[] = "conftest";
17237 static char plus[] = "-+";
17238 char *argv[3] = { conftest, plus, NULL };
17239 opterr = 0;
17240 if (getopt (2, argv, "+a") != '?')
17241 result |= 1;
17242 }
17243 /* This code succeeds on glibc 2.8, mingw,
17244 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17245 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17246 {
17247 static char program[] = "program";
17248 static char p[] = "-p";
17249 static char foo[] = "foo";
17250 static char bar[] = "bar";
17251 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 17252
5476a9a4
GM
17253 optind = 1;
17254 if (getopt (4, argv, "p::") != 'p')
17255 result |= 2;
17256 else if (optarg != NULL)
17257 result |= 4;
17258 else if (getopt (4, argv, "p::") != -1)
17259 result |= 6;
17260 else if (optind != 2)
17261 result |= 8;
17262 }
17263 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17264 {
17265 static char program[] = "program";
17266 static char foo[] = "foo";
17267 static char p[] = "-p";
17268 char *argv[] = { program, foo, p, NULL };
17269 optind = 0;
17270 if (getopt (3, argv, "-p") != 1)
17271 result |= 16;
17272 else if (getopt (3, argv, "-p") != 'p')
17273 result |= 16;
17274 }
17275 /* This code fails on glibc 2.11. */
17276 {
17277 static char program[] = "program";
17278 static char b[] = "-b";
17279 static char a[] = "-a";
17280 char *argv[] = { program, b, a, NULL };
17281 optind = opterr = 0;
17282 if (getopt (3, argv, "+:a:b") != 'b')
17283 result |= 32;
17284 else if (getopt (3, argv, "+:a:b") != ':')
17285 result |= 32;
17286 }
17287 /* This code dumps core on glibc 2.14. */
17288 {
17289 static char program[] = "program";
17290 static char w[] = "-W";
17291 static char dummy[] = "dummy";
17292 char *argv[] = { program, w, dummy, NULL };
17293 optind = opterr = 1;
17294 if (getopt (3, argv, "W;") != 'W')
17295 result |= 64;
17296 }
17297 return result;
3e0be4ab 17298
5476a9a4
GM
17299 ;
17300 return 0;
17301}
17302_ACEOF
17303if ac_fn_c_try_run "$LINENO"; then :
17304 gl_cv_func_getopt_gnu=yes
17305else
17306 gl_cv_func_getopt_gnu=no
17307fi
17308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17309 conftest.$ac_objext conftest.beam conftest.$ac_ext
17310fi
3e0be4ab 17311
5476a9a4
GM
17312 case $gl_had_POSIXLY_CORRECT in
17313 exported) ;;
17314 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17315 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17316 esac
3e0be4ab 17317
5476a9a4
GM
17318fi
17319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17320$as_echo "$gl_cv_func_getopt_gnu" >&6; }
17321 if test "$gl_cv_func_getopt_gnu" != yes; then
17322 gl_replace_getopt=yes
17323 else
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17325$as_echo_n "checking for working GNU getopt_long function... " >&6; }
17326if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
17327 $as_echo_n "(cached) " >&6
17328else
5476a9a4
GM
17329 if test "$cross_compiling" = yes; then :
17330 case "$host_os" in
17331 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17332 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17333 esac
3e0be4ab
GM
17334
17335else
17336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17337/* end confdefs.h. */
5476a9a4
GM
17338#include <getopt.h>
17339 #include <stddef.h>
17340 #include <string.h>
f199cab1
GM
17341
17342int
17343main ()
369e19fc 17344{
5476a9a4
GM
17345static const struct option long_options[] =
17346 {
17347 { "xtremely-",no_argument, NULL, 1003 },
17348 { "xtra", no_argument, NULL, 1001 },
17349 { "xtreme", no_argument, NULL, 1002 },
17350 { "xtremely", no_argument, NULL, 1003 },
17351 { NULL, 0, NULL, 0 }
17352 };
17353 /* This code fails on OpenBSD 5.0. */
17354 {
17355 static char program[] = "program";
17356 static char xtremel[] = "--xtremel";
17357 char *argv[] = { program, xtremel, NULL };
17358 int option_index;
17359 optind = 1; opterr = 0;
17360 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
17361 return 1;
17362 }
17363 return 0;
f199cab1
GM
17364
17365 ;
17366 return 0;
369e19fc 17367}
f199cab1
GM
17368_ACEOF
17369if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 17370 gl_cv_func_getopt_long_gnu=yes
f199cab1 17371else
5476a9a4 17372 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
17373fi
17374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17375 conftest.$ac_objext conftest.beam conftest.$ac_ext
17376fi
17377
5476a9a4 17378
f199cab1 17379fi
5476a9a4
GM
17380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
17381$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
17382 case "$gl_cv_func_getopt_long_gnu" in
17383 *yes) ;;
17384 *) gl_replace_getopt=yes ;;
17385 esac
17386 fi
17387 fi
f199cab1 17388
f199cab1 17389
f199cab1 17390
369e19fc
PE
17391
17392
5476a9a4
GM
17393
17394 REPLACE_GETOPT=0
17395 if test -n "$gl_replace_getopt"; then
17396 REPLACE_GETOPT=1
f199cab1 17397 fi
3e0be4ab 17398
5476a9a4 17399 if test $REPLACE_GETOPT = 1; then
369e19fc 17400
5476a9a4 17401 GETOPT_H=getopt.h
369e19fc 17402
5476a9a4 17403$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
17404
17405
f199cab1 17406
5476a9a4 17407 fi
f199cab1 17408
5476a9a4
GM
17409ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
17410if test "x$ac_cv_have_decl_getenv" = x""yes; then :
17411 ac_have_decl=1
3e0be4ab 17412else
5476a9a4 17413 ac_have_decl=0
3e0be4ab 17414fi
e275c824 17415
5476a9a4
GM
17416cat >>confdefs.h <<_ACEOF
17417#define HAVE_DECL_GETENV $ac_have_decl
17418_ACEOF
17419
a6342fc8 17420:
f199cab1 17421
5476a9a4
GM
17422
17423
17424
17425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17426$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
17427if test "${ac_cv_c_restrict+set}" = set; then :
17428 $as_echo_n "(cached) " >&6
f199cab1 17429else
5476a9a4
GM
17430 ac_cv_c_restrict=no
17431 # The order here caters to the fact that C++ does not require restrict.
17432 for ac_kw in __restrict __restrict__ _Restrict restrict; do
17433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17434/* end confdefs.h. */
5476a9a4
GM
17435typedef int * int_ptr;
17436 int foo (int_ptr $ac_kw ip) {
17437 return ip[0];
17438 }
f199cab1
GM
17439int
17440main ()
17441{
5476a9a4
GM
17442int s[1];
17443 int * $ac_kw t = s;
17444 t[0] = 0;
17445 return foo(t)
f199cab1
GM
17446 ;
17447 return 0;
17448}
17449_ACEOF
5476a9a4
GM
17450if ac_fn_c_try_compile "$LINENO"; then :
17451 ac_cv_c_restrict=$ac_kw
f199cab1 17452fi
5476a9a4
GM
17453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17454 test "$ac_cv_c_restrict" != no && break
17455 done
f199cab1 17456
f199cab1 17457fi
5476a9a4
GM
17458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17459$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 17460
5476a9a4
GM
17461 case $ac_cv_c_restrict in
17462 restrict) ;;
17463 no) $as_echo "#define restrict /**/" >>confdefs.h
17464 ;;
17465 *) cat >>confdefs.h <<_ACEOF
17466#define restrict $ac_cv_c_restrict
17467_ACEOF
17468 ;;
17469 esac
f199cab1 17470
f199cab1 17471
5476a9a4
GM
17472 GNULIB_GETTIMEOFDAY=0;
17473 HAVE_GETTIMEOFDAY=1;
17474 HAVE_STRUCT_TIMEVAL=1;
17475 HAVE_SYS_TIME_H=1;
17476 REPLACE_GETTIMEOFDAY=0;
17477 REPLACE_STRUCT_TIMEVAL=0;
e275c824 17478
e275c824 17479
e275c824 17480
e275c824 17481
4fda9c95 17482
5fa4ac76 17483
5fa4ac76 17484
5fa4ac76 17485
f199cab1
GM
17486
17487
17488
5fa4ac76 17489
5fa4ac76 17490
5fa4ac76 17491
5fa4ac76 17492
5fa4ac76 17493
5476a9a4
GM
17494 if test $gl_cv_have_include_next = yes; then
17495 gl_cv_next_sys_time_h='<'sys/time.h'>'
17496 else
17497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
17498$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
17499if test "${gl_cv_next_sys_time_h+set}" = set; then :
17500 $as_echo_n "(cached) " >&6
17501else
5fa4ac76 17502
5476a9a4 17503 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
17504
17505
5476a9a4
GM
17506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17507/* end confdefs.h. */
17508#include <sys/time.h>
5fa4ac76 17509
5476a9a4
GM
17510_ACEOF
17511 case "$host_os" in
17512 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17513 *) gl_absname_cpp="$ac_cpp" ;;
17514 esac
1f5d53eb 17515
5476a9a4
GM
17516 case "$host_os" in
17517 mingw*)
17518 gl_dirsep_regex='[/\\]'
17519 ;;
17520 *)
17521 gl_dirsep_regex='\/'
17522 ;;
17523 esac
17524 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 17525
5476a9a4
GM
17526 gl_header_literal_regex=`echo 'sys/time.h' \
17527 | sed -e "$gl_make_literal_regex_sed"`
17528 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17529 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17530 s|^/[^/]|//&|
17531 p
17532 q
17533 }'
17534 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17535 sed -n "$gl_absolute_header_sed"`'"'
17536 else
17537 gl_cv_next_sys_time_h='<'sys/time.h'>'
17538 fi
1f5d53eb 17539
1f5d53eb 17540
5476a9a4
GM
17541fi
17542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
17543$as_echo "$gl_cv_next_sys_time_h" >&6; }
17544 fi
17545 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 17546
5476a9a4
GM
17547 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17549 gl_next_as_first_directive='<'sys/time.h'>'
17550 else
17551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17552 gl_next_as_first_directive=$gl_cv_next_sys_time_h
17553 fi
17554 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 17555
e275c824 17556
3e0be4ab 17557
f199cab1
GM
17558
17559
5476a9a4
GM
17560 if test $ac_cv_header_sys_time_h != yes; then
17561 HAVE_SYS_TIME_H=0
17562 fi
f199cab1
GM
17563
17564
17565
17566
17567
5476a9a4
GM
17568 if test $ac_cv_header_sys_socket_h != yes; then
17569 for ac_header in winsock2.h
17570do :
17571 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17572if test "x$ac_cv_header_winsock2_h" = x""yes; then :
17573 cat >>confdefs.h <<_ACEOF
17574#define HAVE_WINSOCK2_H 1
17575_ACEOF
f199cab1 17576
5476a9a4 17577fi
3e0be4ab 17578
5476a9a4 17579done
3e0be4ab 17580
5476a9a4
GM
17581 fi
17582 if test "$ac_cv_header_winsock2_h" = yes; then
17583 HAVE_WINSOCK2_H=1
17584 UNISTD_H_HAVE_WINSOCK2_H=1
17585 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17586 else
17587 HAVE_WINSOCK2_H=0
17588 fi
17589
17590
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
17592$as_echo_n "checking for struct timeval... " >&6; }
17593if test "${gl_cv_sys_struct_timeval+set}" = set; then :
17594 $as_echo_n "(cached) " >&6
17595else
17596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17597/* end confdefs.h. */
17598#if HAVE_SYS_TIME_H
17599 #include <sys/time.h>
17600 #endif
17601 #include <time.h>
17602 #if HAVE_WINSOCK2_H
17603 # include <winsock2.h>
17604 #endif
f199cab1 17605
5476a9a4
GM
17606int
17607main ()
17608{
17609static struct timeval x; x.tv_sec = x.tv_usec;
17610 ;
17611 return 0;
17612}
17613_ACEOF
17614if ac_fn_c_try_compile "$LINENO"; then :
17615 gl_cv_sys_struct_timeval=yes
17616else
17617 gl_cv_sys_struct_timeval=no
f199cab1 17618fi
5476a9a4 17619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 17620
5476a9a4
GM
17621fi
17622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
17623$as_echo "$gl_cv_sys_struct_timeval" >&6; }
17624 if test $gl_cv_sys_struct_timeval != yes; then
17625 HAVE_STRUCT_TIMEVAL=0
17626 else
17627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
17628$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
17629if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
17630 $as_echo_n "(cached) " >&6
17631else
17632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17633/* end confdefs.h. */
17634#if HAVE_SYS_TIME_H
17635 #include <sys/time.h>
17636 #endif
17637 #include <time.h>
17638 #if HAVE_WINSOCK2_H
17639 # include <winsock2.h>
17640 #endif
f199cab1 17641
5476a9a4
GM
17642int
17643main ()
17644{
17645static struct timeval x;
17646 typedef int verify_tv_sec_type[
17647 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
17648 ];
f199cab1 17649
5476a9a4
GM
17650 ;
17651 return 0;
17652}
17653_ACEOF
17654if ac_fn_c_try_compile "$LINENO"; then :
17655 gl_cv_sys_struct_timeval_tv_sec=yes
17656else
17657 gl_cv_sys_struct_timeval_tv_sec=no
17658fi
17659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 17660
5476a9a4
GM
17661fi
17662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
17663$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
17664 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
17665 REPLACE_STRUCT_TIMEVAL=1
17666 fi
17667 fi
f199cab1 17668
f199cab1
GM
17669
17670
17671
17672
17673
f199cab1 17674
5476a9a4
GM
17675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17676$as_echo_n "checking for unsigned long long int... " >&6; }
17677if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
17678 $as_echo_n "(cached) " >&6
17679else
17680 ac_cv_type_unsigned_long_long_int=yes
17681 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17683/* end confdefs.h. */
f199cab1 17684
5476a9a4
GM
17685 /* For now, do not test the preprocessor; as of 2007 there are too many
17686 implementations with broken preprocessors. Perhaps this can
17687 be revisited in 2012. In the meantime, code should not expect
17688 #if to work with literals wider than 32 bits. */
17689 /* Test literals. */
17690 long long int ll = 9223372036854775807ll;
17691 long long int nll = -9223372036854775807LL;
17692 unsigned long long int ull = 18446744073709551615ULL;
17693 /* Test constant expressions. */
17694 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17695 ? 1 : -1)];
17696 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17697 ? 1 : -1)];
17698 int i = 63;
17699int
17700main ()
17701{
17702/* Test availability of runtime routines for shift and division. */
17703 long long int llmax = 9223372036854775807ll;
17704 unsigned long long int ullmax = 18446744073709551615ull;
17705 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17706 | (llmax / ll) | (llmax % ll)
17707 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17708 | (ullmax / ull) | (ullmax % ull));
17709 ;
17710 return 0;
17711}
f199cab1 17712
e275c824 17713_ACEOF
5476a9a4 17714if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 17715
5476a9a4
GM
17716else
17717 ac_cv_type_unsigned_long_long_int=no
e275c824 17718fi
5476a9a4
GM
17719rm -f core conftest.err conftest.$ac_objext \
17720 conftest$ac_exeext conftest.$ac_ext
17721 fi
17722fi
17723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17724$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17725 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 17726
5476a9a4 17727$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 17728
5476a9a4 17729 fi
e275c824
PE
17730
17731
f199cab1 17732
5476a9a4
GM
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17734$as_echo_n "checking for long long int... " >&6; }
17735if test "${ac_cv_type_long_long_int+set}" = set; then :
17736 $as_echo_n "(cached) " >&6
17737else
17738 ac_cv_type_long_long_int=yes
17739 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17740 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17741 if test $ac_cv_type_long_long_int = yes; then
17742 if test "$cross_compiling" = yes; then :
f199cab1 17743 :
5476a9a4
GM
17744else
17745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17746/* end confdefs.h. */
17747#include <limits.h>
17748 #ifndef LLONG_MAX
17749 # define HALF \
17750 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17751 # define LLONG_MAX (HALF - 1 + HALF)
17752 #endif
17753int
17754main ()
17755{
17756long long int n = 1;
17757 int i;
17758 for (i = 0; ; i++)
17759 {
17760 long long int m = n << i;
17761 if (m >> i != n)
17762 return 1;
17763 if (LLONG_MAX / 2 < m)
17764 break;
17765 }
17766 return 0;
17767 ;
17768 return 0;
17769}
17770_ACEOF
17771if ac_fn_c_try_run "$LINENO"; then :
17772
17773else
17774 ac_cv_type_long_long_int=no
17775fi
17776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17777 conftest.$ac_objext conftest.beam conftest.$ac_ext
17778fi
e275c824 17779
5476a9a4
GM
17780 fi
17781 fi
1f5d53eb 17782fi
5476a9a4
GM
17783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17784$as_echo "$ac_cv_type_long_long_int" >&6; }
17785 if test $ac_cv_type_long_long_int = yes; then
e275c824 17786
5476a9a4 17787$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 17788
5476a9a4 17789 fi
e275c824
PE
17790
17791
e275c824
PE
17792
17793
17794
17795
5476a9a4
GM
17796 gl_cv_c_multiarch=no
17797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17798/* end confdefs.h. */
17799#ifndef __APPLE_CC__
17800 not a universal capable compiler
17801 #endif
17802 typedef int dummy;
e275c824 17803
5476a9a4
GM
17804_ACEOF
17805if ac_fn_c_try_compile "$LINENO"; then :
e275c824 17806
5476a9a4
GM
17807 arch=
17808 prev=
17809 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17810 if test -n "$prev"; then
17811 case $word in
17812 i?86 | x86_64 | ppc | ppc64)
17813 if test -z "$arch" || test "$arch" = "$word"; then
17814 arch="$word"
17815 else
17816 gl_cv_c_multiarch=yes
17817 fi
17818 ;;
17819 esac
17820 prev=
17821 else
17822 if test "x$word" = "x-arch"; then
17823 prev=arch
17824 fi
17825 fi
17826 done
f199cab1 17827
f199cab1 17828fi
5476a9a4
GM
17829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17830 if test $gl_cv_c_multiarch = yes; then
17831 APPLE_UNIVERSAL_BUILD=1
17832 else
17833 APPLE_UNIVERSAL_BUILD=0
17834 fi
e275c824
PE
17835
17836
67342916 17837
67342916 17838
67342916 17839
5476a9a4
GM
17840 if test $ac_cv_type_long_long_int = yes; then
17841 HAVE_LONG_LONG_INT=1
17842 else
17843 HAVE_LONG_LONG_INT=0
17844 fi
e275c824 17845
e275c824 17846
5476a9a4
GM
17847 if test $ac_cv_type_unsigned_long_long_int = yes; then
17848 HAVE_UNSIGNED_LONG_LONG_INT=1
17849 else
17850 HAVE_UNSIGNED_LONG_LONG_INT=0
17851 fi
e275c824
PE
17852
17853
17854
5476a9a4
GM
17855 if test $ac_cv_header_wchar_h = yes; then
17856 HAVE_WCHAR_H=1
17857 else
17858 HAVE_WCHAR_H=0
17859 fi
e275c824 17860
e275c824 17861
5476a9a4
GM
17862 if test $ac_cv_header_inttypes_h = yes; then
17863 HAVE_INTTYPES_H=1
17864 else
17865 HAVE_INTTYPES_H=0
17866 fi
6c051bab 17867
942f733f 17868
5476a9a4
GM
17869 if test $ac_cv_header_sys_types_h = yes; then
17870 HAVE_SYS_TYPES_H=1
17871 else
17872 HAVE_SYS_TYPES_H=0
17873 fi
4fc2b746 17874
4fc2b746 17875
f199cab1
GM
17876
17877
17878
17879
17880
17881
17882
17883
17884
5476a9a4
GM
17885 if test $gl_cv_have_include_next = yes; then
17886 gl_cv_next_stdint_h='<'stdint.h'>'
17887 else
17888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17889$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
17890if test "${gl_cv_next_stdint_h+set}" = set; then :
17891 $as_echo_n "(cached) " >&6
17892else
f199cab1 17893
5476a9a4 17894 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
17895
17896
5476a9a4
GM
17897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17898/* end confdefs.h. */
17899#include <stdint.h>
f199cab1 17900
5476a9a4
GM
17901_ACEOF
17902 case "$host_os" in
17903 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17904 *) gl_absname_cpp="$ac_cpp" ;;
17905 esac
f199cab1 17906
5476a9a4
GM
17907 case "$host_os" in
17908 mingw*)
17909 gl_dirsep_regex='[/\\]'
17910 ;;
17911 *)
17912 gl_dirsep_regex='\/'
17913 ;;
17914 esac
17915 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 17916
5476a9a4
GM
17917 gl_header_literal_regex=`echo 'stdint.h' \
17918 | sed -e "$gl_make_literal_regex_sed"`
17919 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17920 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17921 s|^/[^/]|//&|
17922 p
17923 q
17924 }'
17925 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17926 sed -n "$gl_absolute_header_sed"`'"'
17927 else
17928 gl_cv_next_stdint_h='<'stdint.h'>'
17929 fi
4fc2b746 17930
4fc2b746 17931
5476a9a4
GM
17932fi
17933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17934$as_echo "$gl_cv_next_stdint_h" >&6; }
17935 fi
17936 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 17937
5476a9a4
GM
17938 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17939 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17940 gl_next_as_first_directive='<'stdint.h'>'
17941 else
17942 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17943 gl_next_as_first_directive=$gl_cv_next_stdint_h
17944 fi
17945 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 17946
4fc2b746 17947
f199cab1 17948
f199cab1 17949
5476a9a4
GM
17950 if test $ac_cv_header_stdint_h = yes; then
17951 HAVE_STDINT_H=1
17952 else
17953 HAVE_STDINT_H=0
17954 fi
f199cab1
GM
17955
17956
5476a9a4
GM
17957 if test $ac_cv_header_stdint_h = yes; then
17958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17959$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
17960if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
17961 $as_echo_n "(cached) " >&6
17962else
5476a9a4
GM
17963 gl_cv_header_working_stdint_h=no
17964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17965/* end confdefs.h. */
4fc2b746
GM
17966
17967
5476a9a4
GM
17968#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17969#include <stdint.h>
17970/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17971#if !(defined WCHAR_MIN && defined WCHAR_MAX)
17972#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17973#endif
4fc2b746 17974
942f733f 17975
5476a9a4
GM
17976 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17977 included before <wchar.h>. */
17978 #include <stddef.h>
17979 #include <signal.h>
17980 #if HAVE_WCHAR_H
17981 # include <stdio.h>
17982 # include <time.h>
17983 # include <wchar.h>
17984 #endif
e275c824 17985
f199cab1 17986
5476a9a4
GM
17987#ifdef INT8_MAX
17988int8_t a1 = INT8_MAX;
17989int8_t a1min = INT8_MIN;
17990#endif
17991#ifdef INT16_MAX
17992int16_t a2 = INT16_MAX;
17993int16_t a2min = INT16_MIN;
17994#endif
17995#ifdef INT32_MAX
17996int32_t a3 = INT32_MAX;
17997int32_t a3min = INT32_MIN;
17998#endif
17999#ifdef INT64_MAX
18000int64_t a4 = INT64_MAX;
18001int64_t a4min = INT64_MIN;
18002#endif
18003#ifdef UINT8_MAX
18004uint8_t b1 = UINT8_MAX;
18005#else
18006typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18007#endif
18008#ifdef UINT16_MAX
18009uint16_t b2 = UINT16_MAX;
18010#endif
18011#ifdef UINT32_MAX
18012uint32_t b3 = UINT32_MAX;
18013#endif
18014#ifdef UINT64_MAX
18015uint64_t b4 = UINT64_MAX;
18016#endif
18017int_least8_t c1 = INT8_C (0x7f);
18018int_least8_t c1max = INT_LEAST8_MAX;
18019int_least8_t c1min = INT_LEAST8_MIN;
18020int_least16_t c2 = INT16_C (0x7fff);
18021int_least16_t c2max = INT_LEAST16_MAX;
18022int_least16_t c2min = INT_LEAST16_MIN;
18023int_least32_t c3 = INT32_C (0x7fffffff);
18024int_least32_t c3max = INT_LEAST32_MAX;
18025int_least32_t c3min = INT_LEAST32_MIN;
18026int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18027int_least64_t c4max = INT_LEAST64_MAX;
18028int_least64_t c4min = INT_LEAST64_MIN;
18029uint_least8_t d1 = UINT8_C (0xff);
18030uint_least8_t d1max = UINT_LEAST8_MAX;
18031uint_least16_t d2 = UINT16_C (0xffff);
18032uint_least16_t d2max = UINT_LEAST16_MAX;
18033uint_least32_t d3 = UINT32_C (0xffffffff);
18034uint_least32_t d3max = UINT_LEAST32_MAX;
18035uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18036uint_least64_t d4max = UINT_LEAST64_MAX;
18037int_fast8_t e1 = INT_FAST8_MAX;
18038int_fast8_t e1min = INT_FAST8_MIN;
18039int_fast16_t e2 = INT_FAST16_MAX;
18040int_fast16_t e2min = INT_FAST16_MIN;
18041int_fast32_t e3 = INT_FAST32_MAX;
18042int_fast32_t e3min = INT_FAST32_MIN;
18043int_fast64_t e4 = INT_FAST64_MAX;
18044int_fast64_t e4min = INT_FAST64_MIN;
18045uint_fast8_t f1 = UINT_FAST8_MAX;
18046uint_fast16_t f2 = UINT_FAST16_MAX;
18047uint_fast32_t f3 = UINT_FAST32_MAX;
18048uint_fast64_t f4 = UINT_FAST64_MAX;
18049#ifdef INTPTR_MAX
18050intptr_t g = INTPTR_MAX;
18051intptr_t gmin = INTPTR_MIN;
18052#endif
18053#ifdef UINTPTR_MAX
18054uintptr_t h = UINTPTR_MAX;
18055#endif
18056intmax_t i = INTMAX_MAX;
18057uintmax_t j = UINTMAX_MAX;
5fa4ac76 18058
5476a9a4
GM
18059#include <limits.h> /* for CHAR_BIT */
18060#define TYPE_MINIMUM(t) \
18061 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18062#define TYPE_MAXIMUM(t) \
18063 ((t) ((t) 0 < (t) -1 \
18064 ? (t) -1 \
18065 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18066struct s {
18067 int check_PTRDIFF:
18068 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18069 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18070 ? 1 : -1;
18071 /* Detect bug in FreeBSD 6.0 / ia64. */
18072 int check_SIG_ATOMIC:
18073 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18074 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18075 ? 1 : -1;
18076 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18077 int check_WCHAR:
18078 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18079 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18080 ? 1 : -1;
18081 /* Detect bug in mingw. */
18082 int check_WINT:
18083 WINT_MIN == TYPE_MINIMUM (wint_t)
18084 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18085 ? 1 : -1;
5fa4ac76 18086
5476a9a4
GM
18087 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18088 int check_UINT8_C:
18089 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18090 int check_UINT16_C:
18091 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18092
18093 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18094#ifdef UINT8_MAX
18095 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 18096#endif
5476a9a4
GM
18097#ifdef UINT16_MAX
18098 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18099#endif
18100#ifdef UINT32_MAX
18101 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18102#endif
18103#ifdef UINT64_MAX
18104 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18105#endif
18106 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18107 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18108 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18109 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18110 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18111 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18112 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18113 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18114 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18115 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18116 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18117};
18118
f199cab1
GM
18119int
18120main ()
18121{
5476a9a4 18122
f199cab1
GM
18123 ;
18124 return 0;
18125}
18126_ACEOF
5476a9a4
GM
18127if ac_fn_c_try_compile "$LINENO"; then :
18128 if test "$cross_compiling" = yes; then :
18129 gl_cv_header_working_stdint_h=yes
40e27e7f 18130
5476a9a4
GM
18131else
18132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18133/* end confdefs.h. */
40e27e7f 18134
f199cab1 18135
5476a9a4
GM
18136#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18137#include <stdint.h>
f199cab1
GM
18138
18139
5476a9a4
GM
18140 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18141 included before <wchar.h>. */
18142 #include <stddef.h>
18143 #include <signal.h>
18144 #if HAVE_WCHAR_H
18145 # include <stdio.h>
18146 # include <time.h>
18147 # include <wchar.h>
18148 #endif
f199cab1 18149
d87ffdb7 18150
5476a9a4
GM
18151#include <stdio.h>
18152#include <string.h>
18153#define MVAL(macro) MVAL1(macro)
18154#define MVAL1(expression) #expression
18155static const char *macro_values[] =
18156 {
18157#ifdef INT8_MAX
18158 MVAL (INT8_MAX),
18159#endif
18160#ifdef INT16_MAX
18161 MVAL (INT16_MAX),
18162#endif
18163#ifdef INT32_MAX
18164 MVAL (INT32_MAX),
18165#endif
18166#ifdef INT64_MAX
18167 MVAL (INT64_MAX),
18168#endif
18169#ifdef UINT8_MAX
18170 MVAL (UINT8_MAX),
18171#endif
18172#ifdef UINT16_MAX
18173 MVAL (UINT16_MAX),
18174#endif
18175#ifdef UINT32_MAX
18176 MVAL (UINT32_MAX),
18177#endif
18178#ifdef UINT64_MAX
18179 MVAL (UINT64_MAX),
18180#endif
18181 NULL
18182 };
f199cab1 18183
3e0be4ab
GM
18184int
18185main ()
18186{
5476a9a4
GM
18187
18188 const char **mv;
18189 for (mv = macro_values; *mv != NULL; mv++)
18190 {
18191 const char *value = *mv;
18192 /* Test whether it looks like a cast expression. */
18193 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18194 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18195 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18196 || strncmp (value, "((int)"/*)*/, 6) == 0
18197 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18198 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18199 return mv - macro_values + 1;
18200 }
3e0be4ab 18201 return 0;
5476a9a4 18202
f199cab1
GM
18203 ;
18204 return 0;
18205}
18206_ACEOF
5476a9a4
GM
18207if ac_fn_c_try_run "$LINENO"; then :
18208 gl_cv_header_working_stdint_h=yes
f199cab1 18209fi
5476a9a4
GM
18210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18211 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18212fi
18213
d87ffdb7 18214
5476a9a4
GM
18215fi
18216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 18217
5476a9a4
GM
18218fi
18219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18220$as_echo "$gl_cv_header_working_stdint_h" >&6; }
18221 fi
18222 if test "$gl_cv_header_working_stdint_h" = yes; then
18223 STDINT_H=
18224 else
18225 for ac_header in sys/inttypes.h sys/bitypes.h
18226do :
18227 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18228ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18229eval as_val=\$$as_ac_Header
18230 if test "x$as_val" = x""yes; then :
18231 cat >>confdefs.h <<_ACEOF
18232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18233_ACEOF
d87ffdb7 18234
5476a9a4 18235fi
d87ffdb7 18236
5476a9a4 18237done
7d2a1c5e 18238
5476a9a4
GM
18239 if test $ac_cv_header_sys_inttypes_h = yes; then
18240 HAVE_SYS_INTTYPES_H=1
18241 else
18242 HAVE_SYS_INTTYPES_H=0
18243 fi
7d2a1c5e 18244
5476a9a4
GM
18245 if test $ac_cv_header_sys_bitypes_h = yes; then
18246 HAVE_SYS_BITYPES_H=1
18247 else
18248 HAVE_SYS_BITYPES_H=0
18249 fi
7d2a1c5e 18250
f199cab1
GM
18251
18252
18253
5476a9a4 18254 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
18255
18256
5476a9a4
GM
18257 for gltype in ptrdiff_t size_t ; do
18258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18259$as_echo_n "checking for bit size of $gltype... " >&6; }
18260if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18261 $as_echo_n "(cached) " >&6
18262else
18263 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18264 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18265 included before <wchar.h>. */
18266 #include <stddef.h>
18267 #include <signal.h>
18268 #if HAVE_WCHAR_H
18269 # include <stdio.h>
18270 # include <time.h>
18271 # include <wchar.h>
18272 #endif
f199cab1 18273
5476a9a4 18274#include <limits.h>"; then :
f199cab1 18275
5476a9a4
GM
18276else
18277 result=unknown
18278fi
f199cab1 18279
5476a9a4 18280 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 18281
5476a9a4
GM
18282fi
18283eval ac_res=\$gl_cv_bitsizeof_${gltype}
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18285$as_echo "$ac_res" >&6; }
18286 eval result=\$gl_cv_bitsizeof_${gltype}
18287 if test $result = unknown; then
18288 result=0
18289 fi
18290 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18291 cat >>confdefs.h <<_ACEOF
18292#define BITSIZEOF_${GLTYPE} $result
18293_ACEOF
f199cab1 18294
5476a9a4
GM
18295 eval BITSIZEOF_${GLTYPE}=\$result
18296 done
f199cab1
GM
18297
18298
5476a9a4 18299 fi
f199cab1
GM
18300
18301
5476a9a4
GM
18302 for gltype in sig_atomic_t wchar_t wint_t ; do
18303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18304$as_echo_n "checking for bit size of $gltype... " >&6; }
18305if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18306 $as_echo_n "(cached) " >&6
18307else
18308 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18309 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18310 included before <wchar.h>. */
18311 #include <stddef.h>
18312 #include <signal.h>
18313 #if HAVE_WCHAR_H
18314 # include <stdio.h>
18315 # include <time.h>
18316 # include <wchar.h>
18317 #endif
f199cab1 18318
5476a9a4 18319#include <limits.h>"; then :
f199cab1 18320
f199cab1 18321else
5476a9a4 18322 result=unknown
7d2a1c5e 18323fi
7d2a1c5e 18324
5476a9a4 18325 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 18326
3e0be4ab 18327fi
5476a9a4
GM
18328eval ac_res=\$gl_cv_bitsizeof_${gltype}
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18330$as_echo "$ac_res" >&6; }
18331 eval result=\$gl_cv_bitsizeof_${gltype}
18332 if test $result = unknown; then
18333 result=0
18334 fi
18335 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18336 cat >>confdefs.h <<_ACEOF
18337#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 18338_ACEOF
7d2a1c5e 18339
5476a9a4
GM
18340 eval BITSIZEOF_${GLTYPE}=\$result
18341 done
7d2a1c5e
GM
18342
18343
5476a9a4
GM
18344
18345
18346 for gltype in sig_atomic_t wchar_t wint_t ; do
18347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18348$as_echo_n "checking whether $gltype is signed... " >&6; }
18349if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
18350 $as_echo_n "(cached) " >&6
18351else
f199cab1
GM
18352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18353/* end confdefs.h. */
f199cab1 18354
5476a9a4
GM
18355 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18356 included before <wchar.h>. */
18357 #include <stddef.h>
18358 #include <signal.h>
18359 #if HAVE_WCHAR_H
18360 # include <stdio.h>
18361 # include <time.h>
18362 # include <wchar.h>
18363 #endif
18364
18365 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
18366int
18367main ()
18368{
5476a9a4 18369
f199cab1
GM
18370 ;
18371 return 0;
18372}
18373_ACEOF
18374if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18375 result=yes
f199cab1 18376else
5476a9a4 18377 result=no
f199cab1
GM
18378fi
18379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 18380 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 18381
3e0be4ab 18382fi
5476a9a4
GM
18383eval ac_res=\$gl_cv_type_${gltype}_signed
18384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18385$as_echo "$ac_res" >&6; }
18386 eval result=\$gl_cv_type_${gltype}_signed
18387 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18388 if test "$result" = yes; then
18389 cat >>confdefs.h <<_ACEOF
18390#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 18391_ACEOF
d87ffdb7 18392
5476a9a4
GM
18393 eval HAVE_SIGNED_${GLTYPE}=1
18394 else
18395 eval HAVE_SIGNED_${GLTYPE}=0
18396 fi
18397 done
f199cab1 18398
e275c824 18399
5476a9a4
GM
18400 gl_cv_type_ptrdiff_t_signed=yes
18401 gl_cv_type_size_t_signed=no
18402 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 18403
e275c824 18404
5476a9a4
GM
18405 for gltype in ptrdiff_t size_t ; do
18406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18407$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18408if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
18409 $as_echo_n "(cached) " >&6
18410else
5476a9a4
GM
18411 eval gl_cv_type_${gltype}_suffix=no
18412 eval result=\$gl_cv_type_${gltype}_signed
18413 if test "$result" = yes; then
18414 glsufu=
18415 else
18416 glsufu=u
18417 fi
18418 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18419 case $glsuf in
18420 '') gltype1='int';;
18421 l) gltype1='long int';;
18422 ll) gltype1='long long int';;
18423 i64) gltype1='__int64';;
18424 u) gltype1='unsigned int';;
18425 ul) gltype1='unsigned long int';;
18426 ull) gltype1='unsigned long long int';;
18427 ui64)gltype1='unsigned __int64';;
18428 esac
18429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18430/* end confdefs.h. */
16c3e636 18431
5476a9a4
GM
18432 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18433 included before <wchar.h>. */
18434 #include <stddef.h>
18435 #include <signal.h>
18436 #if HAVE_WCHAR_H
18437 # include <stdio.h>
18438 # include <time.h>
18439 # include <wchar.h>
18440 #endif
1f5d53eb 18441
5476a9a4
GM
18442 extern $gltype foo;
18443 extern $gltype1 foo;
f199cab1
GM
18444int
18445main ()
18446{
5476a9a4 18447
f199cab1
GM
18448 ;
18449 return 0;
18450}
18451_ACEOF
18452if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18453 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
18454fi
18455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18456 eval result=\$gl_cv_type_${gltype}_suffix
18457 test "$result" != no && break
18458 done
f199cab1 18459fi
5476a9a4
GM
18460eval ac_res=\$gl_cv_type_${gltype}_suffix
18461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18462$as_echo "$ac_res" >&6; }
18463 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18464 eval result=\$gl_cv_type_${gltype}_suffix
18465 test "$result" = no && result=
18466 eval ${GLTYPE}_SUFFIX=\$result
18467 cat >>confdefs.h <<_ACEOF
18468#define ${GLTYPE}_SUFFIX $result
18469_ACEOF
16c3e636 18470
5476a9a4 18471 done
16c3e636 18472
3e0be4ab 18473
5476a9a4
GM
18474 fi
18475
18476
18477 for gltype in sig_atomic_t wchar_t wint_t ; do
18478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18479$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18480if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
18481 $as_echo_n "(cached) " >&6
18482else
5476a9a4
GM
18483 eval gl_cv_type_${gltype}_suffix=no
18484 eval result=\$gl_cv_type_${gltype}_signed
18485 if test "$result" = yes; then
18486 glsufu=
18487 else
18488 glsufu=u
18489 fi
18490 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18491 case $glsuf in
18492 '') gltype1='int';;
18493 l) gltype1='long int';;
18494 ll) gltype1='long long int';;
18495 i64) gltype1='__int64';;
18496 u) gltype1='unsigned int';;
18497 ul) gltype1='unsigned long int';;
18498 ull) gltype1='unsigned long long int';;
18499 ui64)gltype1='unsigned __int64';;
18500 esac
18501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 18502/* end confdefs.h. */
5476a9a4
GM
18503
18504 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18505 included before <wchar.h>. */
18506 #include <stddef.h>
18507 #include <signal.h>
18508 #if HAVE_WCHAR_H
18509 # include <stdio.h>
18510 # include <time.h>
18511 # include <wchar.h>
18512 #endif
18513
18514 extern $gltype foo;
18515 extern $gltype1 foo;
1fd182f0
PE
18516int
18517main ()
18518{
5476a9a4 18519
1fd182f0
PE
18520 ;
18521 return 0;
18522}
18523_ACEOF
3e0be4ab 18524if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18525 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 18526fi
3e0be4ab 18527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18528 eval result=\$gl_cv_type_${gltype}_suffix
18529 test "$result" != no && break
18530 done
f199cab1 18531fi
5476a9a4
GM
18532eval ac_res=\$gl_cv_type_${gltype}_suffix
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18534$as_echo "$ac_res" >&6; }
18535 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18536 eval result=\$gl_cv_type_${gltype}_suffix
18537 test "$result" = no && result=
18538 eval ${GLTYPE}_SUFFIX=\$result
18539 cat >>confdefs.h <<_ACEOF
18540#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
18541_ACEOF
18542
5476a9a4 18543 done
f199cab1 18544
f199cab1 18545
f199cab1 18546
5476a9a4
GM
18547 if test $BITSIZEOF_WINT_T -lt 32; then
18548 BITSIZEOF_WINT_T=32
18549 fi
f199cab1 18550
5476a9a4
GM
18551 STDINT_H=stdint.h
18552 fi
f199cab1 18553
5476a9a4
GM
18554 if test -n "$STDINT_H"; then
18555 GL_GENERATE_STDINT_H_TRUE=
18556 GL_GENERATE_STDINT_H_FALSE='#'
18557else
18558 GL_GENERATE_STDINT_H_TRUE='#'
18559 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
18560fi
18561
f199cab1 18562
f199cab1 18563
3e0be4ab 18564
f199cab1 18565
5476a9a4
GM
18566 GNULIB_IMAXABS=0;
18567 GNULIB_IMAXDIV=0;
18568 GNULIB_STRTOIMAX=0;
18569 GNULIB_STRTOUMAX=0;
18570 HAVE_DECL_IMAXABS=1;
18571 HAVE_DECL_IMAXDIV=1;
18572 HAVE_DECL_STRTOIMAX=1;
18573 HAVE_DECL_STRTOUMAX=1;
18574 REPLACE_STRTOIMAX=0;
18575 INT32_MAX_LT_INTMAX_MAX=1;
18576 INT64_MAX_EQ_LONG_MAX='defined _LP64';
18577 PRI_MACROS_BROKEN=0;
18578 PRIPTR_PREFIX=__PRIPTR_PREFIX;
18579 UINT32_MAX_LT_UINTMAX_MAX=1;
18580 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 18581
1fd182f0 18582
1f5d53eb 18583
3e0be4ab
GM
18584
18585
1fd182f0 18586
3e0be4ab 18587
3e0be4ab 18588
f199cab1 18589
1fd182f0 18590
1f5d53eb 18591
1f5d53eb 18592
1f5d53eb 18593
3e0be4ab 18594
3e0be4ab 18595
5476a9a4
GM
18596 if test $gl_cv_have_include_next = yes; then
18597 gl_cv_next_inttypes_h='<'inttypes.h'>'
18598 else
18599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18600$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
18601if test "${gl_cv_next_inttypes_h+set}" = set; then :
18602 $as_echo_n "(cached) " >&6
f199cab1 18603else
2b1928b8 18604
5476a9a4 18605 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
18606
18607
5476a9a4 18608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18609/* end confdefs.h. */
5476a9a4 18610#include <inttypes.h>
3e0be4ab 18611
f199cab1 18612_ACEOF
5476a9a4
GM
18613 case "$host_os" in
18614 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18615 *) gl_absname_cpp="$ac_cpp" ;;
18616 esac
1fd182f0 18617
5476a9a4
GM
18618 case "$host_os" in
18619 mingw*)
18620 gl_dirsep_regex='[/\\]'
18621 ;;
18622 *)
18623 gl_dirsep_regex='\/'
18624 ;;
18625 esac
18626 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 18627
5476a9a4
GM
18628 gl_header_literal_regex=`echo 'inttypes.h' \
18629 | sed -e "$gl_make_literal_regex_sed"`
18630 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18631 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18632 s|^/[^/]|//&|
18633 p
18634 q
18635 }'
18636 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18637 sed -n "$gl_absolute_header_sed"`'"'
18638 else
18639 gl_cv_next_inttypes_h='<'inttypes.h'>'
18640 fi
1fd182f0
PE
18641
18642
5476a9a4
GM
18643fi
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18645$as_echo "$gl_cv_next_inttypes_h" >&6; }
18646 fi
18647 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 18648
5476a9a4
GM
18649 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18650 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18651 gl_next_as_first_directive='<'inttypes.h'>'
18652 else
18653 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18654 gl_next_as_first_directive=$gl_cv_next_inttypes_h
18655 fi
18656 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
18657
18658
3e0be4ab 18659
34119902 18660
3e0be4ab 18661
34119902 18662
b0415a03 18663
b0415a03 18664
3e0be4ab 18665
34119902 18666
34119902 18667
5476a9a4
GM
18668 case "$host_os" in
18669 mingw*)
18670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
18671$as_echo_n "checking for 64-bit off_t... " >&6; }
18672if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
18673 $as_echo_n "(cached) " >&6
18674else
5476a9a4
GM
18675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18676/* end confdefs.h. */
18677#include <sys/types.h>
18678 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
18679
18680int
18681main ()
18682{
18683
18684 ;
18685 return 0;
18686}
f199cab1 18687_ACEOF
5476a9a4
GM
18688if ac_fn_c_try_compile "$LINENO"; then :
18689 gl_cv_type_off_t_64=yes
18690else
18691 gl_cv_type_off_t_64=no
f199cab1 18692fi
5476a9a4 18693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 18694
5476a9a4
GM
18695fi
18696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
18697$as_echo "$gl_cv_type_off_t_64" >&6; }
18698 if test $gl_cv_type_off_t_64 = no; then
18699 WINDOWS_64_BIT_OFF_T=1
18700 else
18701 WINDOWS_64_BIT_OFF_T=0
18702 fi
18703 WINDOWS_64_BIT_ST_SIZE=1
18704 ;;
18705 *)
18706 WINDOWS_64_BIT_OFF_T=0
18707 WINDOWS_64_BIT_ST_SIZE=0
18708 ;;
18709 esac
34119902
GM
18710
18711
5476a9a4
GM
18712 GNULIB_FCHMODAT=0;
18713 GNULIB_FSTAT=0;
18714 GNULIB_FSTATAT=0;
18715 GNULIB_FUTIMENS=0;
18716 GNULIB_LCHMOD=0;
18717 GNULIB_LSTAT=0;
18718 GNULIB_MKDIRAT=0;
18719 GNULIB_MKFIFO=0;
18720 GNULIB_MKFIFOAT=0;
18721 GNULIB_MKNOD=0;
18722 GNULIB_MKNODAT=0;
18723 GNULIB_STAT=0;
18724 GNULIB_UTIMENSAT=0;
18725 HAVE_FCHMODAT=1;
18726 HAVE_FSTATAT=1;
18727 HAVE_FUTIMENS=1;
18728 HAVE_LCHMOD=1;
18729 HAVE_LSTAT=1;
18730 HAVE_MKDIRAT=1;
18731 HAVE_MKFIFO=1;
18732 HAVE_MKFIFOAT=1;
18733 HAVE_MKNOD=1;
18734 HAVE_MKNODAT=1;
18735 HAVE_UTIMENSAT=1;
18736 REPLACE_FSTAT=0;
18737 REPLACE_FSTATAT=0;
18738 REPLACE_FUTIMENS=0;
18739 REPLACE_LSTAT=0;
18740 REPLACE_MKDIR=0;
18741 REPLACE_MKFIFO=0;
18742 REPLACE_MKNOD=0;
18743 REPLACE_STAT=0;
18744 REPLACE_UTIMENSAT=0;
34119902
GM
18745
18746
18747
18748
5476a9a4
GM
18749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18750$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18751if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18752 $as_echo_n "(cached) " >&6
f199cab1 18753else
5476a9a4
GM
18754 rm -f conftest.sym conftest.file
18755 echo >conftest.file
18756 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18757 if test "$cross_compiling" = yes; then :
18758 case "$host_os" in
18759 # Guess yes on glibc systems.
18760 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18761 # If we don't know, assume the worst.
18762 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18763 esac
34119902 18764
5476a9a4 18765else
f199cab1
GM
18766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18767/* end confdefs.h. */
5476a9a4 18768$ac_includes_default
0eb775a3
GM
18769int
18770main ()
18771{
5476a9a4
GM
18772struct stat sbuf;
18773 /* Linux will dereference the symlink and fail, as required by
18774 POSIX. That is better in the sense that it means we will not
18775 have to compile and use the lstat wrapper. */
18776 return lstat ("conftest.sym/", &sbuf) == 0;
18777
0eb775a3
GM
18778 ;
18779 return 0;
18780}
18781_ACEOF
5476a9a4
GM
18782if ac_fn_c_try_run "$LINENO"; then :
18783 gl_cv_func_lstat_dereferences_slashed_symlink=yes
0eb775a3 18784else
5476a9a4
GM
18785 gl_cv_func_lstat_dereferences_slashed_symlink=no
18786fi
18787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18788 conftest.$ac_objext conftest.beam conftest.$ac_ext
0eb775a3 18789fi
0eb775a3 18790
5476a9a4
GM
18791 else
18792 # If the 'ln -s' command failed, then we probably don't even
18793 # have an lstat function.
18794 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18795 fi
18796 rm -f conftest.sym conftest.file
18797
0eb775a3 18798fi
5476a9a4
GM
18799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18800$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18801 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18802 *yes)
18803
18804cat >>confdefs.h <<_ACEOF
18805#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18806_ACEOF
18807
18808 ;;
0eb775a3 18809 esac
34119902
GM
18810
18811
5476a9a4
GM
18812 GNULIB_MKTIME=0;
18813 GNULIB_NANOSLEEP=0;
18814 GNULIB_STRPTIME=0;
18815 GNULIB_TIMEGM=0;
18816 GNULIB_TIME_R=0;
18817 HAVE_DECL_LOCALTIME_R=1;
18818 HAVE_NANOSLEEP=1;
18819 HAVE_STRPTIME=1;
18820 HAVE_TIMEGM=1;
18821 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
18822 REPLACE_MKTIME=GNULIB_PORTCHECK;
18823 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
18824 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 18825
3e0be4ab
GM
18826
18827
18828
5476a9a4
GM
18829 GNULIB_PSELECT=0;
18830 GNULIB_SELECT=0;
18831 HAVE_PSELECT=1;
18832 REPLACE_PSELECT=0;
18833 REPLACE_SELECT=0;
18834
18835
3e0be4ab 18836
5476a9a4
GM
18837
18838
18839
18840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
18841$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
18842if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 18843 $as_echo_n "(cached) " >&6
3e0be4ab 18844else
5476a9a4
GM
18845
18846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18847/* end confdefs.h. */
5476a9a4 18848#include <sys/select.h>
3e0be4ab
GM
18849int
18850main ()
18851{
5476a9a4 18852struct timeval b;
3e0be4ab
GM
18853 ;
18854 return 0;
18855}
34119902 18856_ACEOF
f199cab1 18857if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18858 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 18859else
5476a9a4 18860 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 18861fi
f199cab1 18862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18863 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
18864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18865/* end confdefs.h. */
18866#include <sys/select.h>
18867int
18868main ()
18869{
18870int memset; int bzero;
18871 ;
18872 return 0;
18873}
3e0be4ab 18874
5476a9a4
GM
18875_ACEOF
18876if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
18877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18878/* end confdefs.h. */
5476a9a4 18879#include <sys/select.h>
f199cab1
GM
18880int
18881main ()
18882{
5476a9a4
GM
18883
18884 #undef memset
18885 #define memset nonexistent_memset
18886 extern
18887 #ifdef __cplusplus
18888 "C"
18889 #endif
18890 void *memset (void *, int, unsigned long);
18891 #undef bzero
18892 #define bzero nonexistent_bzero
18893 extern
18894 #ifdef __cplusplus
18895 "C"
18896 #endif
18897 void bzero (void *, unsigned long);
18898 fd_set fds;
18899 FD_ZERO (&fds);
18900
f199cab1
GM
18901 ;
18902 return 0;
18903}
5476a9a4 18904
f199cab1 18905_ACEOF
5476a9a4
GM
18906if ac_fn_c_try_link "$LINENO"; then :
18907
f199cab1 18908else
5476a9a4 18909 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 18910fi
5476a9a4
GM
18911rm -f core conftest.err conftest.$ac_objext \
18912 conftest$ac_exeext conftest.$ac_ext
1fd182f0 18913
f199cab1 18914fi
5476a9a4
GM
18915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18916 fi
1fd182f0 18917
f199cab1 18918fi
5476a9a4
GM
18919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
18920$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
18921
18922
b06b1098 18923
0eb775a3
GM
18924
18925
b06b1098 18926
1fd182f0 18927
1fd182f0 18928
5476a9a4
GM
18929
18930 if test $gl_cv_have_include_next = yes; then
18931 gl_cv_next_sys_select_h='<'sys/select.h'>'
18932 else
18933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
18934$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
18935if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 18936 $as_echo_n "(cached) " >&6
3e0be4ab 18937else
1fd182f0 18938
5476a9a4
GM
18939 if test $ac_cv_header_sys_select_h = yes; then
18940
18941
18942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18943/* end confdefs.h. */
18944#include <sys/select.h>
18945
18946_ACEOF
18947 case "$host_os" in
18948 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18949 *) gl_absname_cpp="$ac_cpp" ;;
18950 esac
18951
18952 case "$host_os" in
18953 mingw*)
18954 gl_dirsep_regex='[/\\]'
18955 ;;
18956 *)
18957 gl_dirsep_regex='\/'
18958 ;;
18959 esac
18960 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18961
18962 gl_header_literal_regex=`echo 'sys/select.h' \
18963 | sed -e "$gl_make_literal_regex_sed"`
18964 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18965 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18966 s|^/[^/]|//&|
18967 p
18968 q
18969 }'
18970 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18971 sed -n "$gl_absolute_header_sed"`'"'
18972 else
18973 gl_cv_next_sys_select_h='<'sys/select.h'>'
18974 fi
1fd182f0 18975
3e0be4ab 18976
1f5d53eb 18977fi
5476a9a4
GM
18978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
18979$as_echo "$gl_cv_next_sys_select_h" >&6; }
18980 fi
18981 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 18982
5476a9a4
GM
18983 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18985 gl_next_as_first_directive='<'sys/select.h'>'
18986 else
18987 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18988 gl_next_as_first_directive=$gl_cv_next_sys_select_h
18989 fi
18990 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
18991
18992
5476a9a4
GM
18993
18994
18995 if test $ac_cv_header_sys_select_h = yes; then
18996 HAVE_SYS_SELECT_H=1
18997 else
18998 HAVE_SYS_SELECT_H=0
18999 fi
19000
19001
19002
19003
19004
19005 if test $ac_cv_header_sys_socket_h != yes; then
19006 for ac_header in winsock2.h
19007do :
19008 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19009if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19010 cat >>confdefs.h <<_ACEOF
19011#define HAVE_WINSOCK2_H 1
f199cab1 19012_ACEOF
5476a9a4 19013
f199cab1 19014fi
3e0be4ab 19015
5476a9a4 19016done
3e0be4ab 19017
5476a9a4
GM
19018 fi
19019 if test "$ac_cv_header_winsock2_h" = yes; then
19020 HAVE_WINSOCK2_H=1
19021 UNISTD_H_HAVE_WINSOCK2_H=1
19022 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19023 else
19024 HAVE_WINSOCK2_H=0
19025 fi
f199cab1 19026
f199cab1 19027
f199cab1 19028
f199cab1 19029
3e0be4ab 19030
3e0be4ab 19031
3e0be4ab 19032
3e0be4ab 19033
5476a9a4
GM
19034 GNULIB_PTHREAD_SIGMASK=0;
19035 GNULIB_RAISE=0;
19036 GNULIB_SIGNAL_H_SIGPIPE=0;
19037 GNULIB_SIGPROCMASK=0;
19038 GNULIB_SIGACTION=0;
19039 HAVE_POSIX_SIGNALBLOCKING=1;
19040 HAVE_PTHREAD_SIGMASK=1;
19041 HAVE_RAISE=1;
19042 HAVE_SIGSET_T=1;
19043 HAVE_SIGINFO_T=1;
19044 HAVE_SIGACTION=1;
19045 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19046
19047 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 19048
5476a9a4
GM
19049 HAVE_SIGHANDLER_T=1;
19050 REPLACE_PTHREAD_SIGMASK=0;
19051 REPLACE_RAISE=0;
1f5d53eb 19052
1fd182f0 19053
b06b1098 19054
1fd182f0 19055
3e0be4ab
GM
19056
19057
5476a9a4
GM
19058 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19059 #include <signal.h>
19060 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19061 #include <sys/types.h>
19062
19063"
19064if test "x$ac_cv_type_sigset_t" = x""yes; then :
19065
19066cat >>confdefs.h <<_ACEOF
19067#define HAVE_SIGSET_T 1
f199cab1 19068_ACEOF
3e0be4ab 19069
5476a9a4
GM
19070gl_cv_type_sigset_t=yes
19071else
19072 gl_cv_type_sigset_t=no
f199cab1 19073fi
3e0be4ab 19074
5476a9a4
GM
19075 if test $gl_cv_type_sigset_t != yes; then
19076 HAVE_SIGSET_T=0
19077 fi
3e0be4ab 19078
1f5d53eb 19079
3e0be4ab 19080
5476a9a4
GM
19081 if test $ac_cv_header_sys_socket_h = no; then
19082 for ac_header in ws2tcpip.h
19083do :
19084 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19085if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19086 cat >>confdefs.h <<_ACEOF
19087#define HAVE_WS2TCPIP_H 1
19088_ACEOF
3e0be4ab 19089
5476a9a4 19090fi
3e0be4ab 19091
5476a9a4
GM
19092done
19093
19094 fi
19095
19096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19097$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19098if test "${ac_cv_header_stdbool_h+set}" = set; then :
19099 $as_echo_n "(cached) " >&6
19100else
19101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19102/* end confdefs.h. */
1f5d53eb 19103
5476a9a4
GM
19104 #include <stdbool.h>
19105 #ifndef bool
19106 "error: bool is not defined"
19107 #endif
19108 #ifndef false
19109 "error: false is not defined"
19110 #endif
19111 #if false
19112 "error: false is not 0"
19113 #endif
19114 #ifndef true
19115 "error: true is not defined"
19116 #endif
19117 #if true != 1
19118 "error: true is not 1"
19119 #endif
19120 #ifndef __bool_true_false_are_defined
19121 "error: __bool_true_false_are_defined is not defined"
19122 #endif
19123
19124 struct s { _Bool s: 1; _Bool t; } s;
19125
19126 char a[true == 1 ? 1 : -1];
19127 char b[false == 0 ? 1 : -1];
19128 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19129 char d[(bool) 0.5 == true ? 1 : -1];
19130 /* See body of main program for 'e'. */
19131 char f[(_Bool) 0.0 == false ? 1 : -1];
19132 char g[true];
19133 char h[sizeof (_Bool)];
19134 char i[sizeof s.t];
19135 enum { j = false, k = true, l = false * true, m = true * 256 };
19136 /* The following fails for
19137 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19138 _Bool n[m];
19139 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19140 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19141 /* Catch a bug in an HP-UX C compiler. See
19142 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19143 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19144 */
19145 _Bool q = true;
19146 _Bool *pq = &q;
1ebc9c87
GM
19147
19148int
19149main ()
19150{
f199cab1 19151
5476a9a4
GM
19152 bool e = &s;
19153 *pq |= q;
19154 *pq |= ! q;
19155 /* Refer to every declared value, to avoid compiler optimizations. */
19156 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19157 + !m + !n + !o + !p + !q + !pq);
f199cab1 19158
5476a9a4 19159 ;
1ebc9c87
GM
19160 return 0;
19161}
19162_ACEOF
5476a9a4
GM
19163if ac_fn_c_try_compile "$LINENO"; then :
19164 ac_cv_header_stdbool_h=yes
1ebc9c87 19165else
5476a9a4 19166 ac_cv_header_stdbool_h=no
1ebc9c87 19167fi
5476a9a4 19168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19169fi
5476a9a4
GM
19170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19171$as_echo "$ac_cv_header_stdbool_h" >&6; }
19172 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19173if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 19174
5476a9a4
GM
19175cat >>confdefs.h <<_ACEOF
19176#define HAVE__BOOL 1
19177_ACEOF
1ebc9c87 19178
1ebc9c87
GM
19179
19180fi
19181
1ebc9c87 19182
1ebc9c87 19183
5476a9a4
GM
19184 REPLACE_NULL=0;
19185 HAVE_WCHAR_T=1;
19186
19187
19188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19189$as_echo_n "checking for wchar_t... " >&6; }
19190if test "${gt_cv_c_wchar_t+set}" = set; then :
19191 $as_echo_n "(cached) " >&6
19192else
19193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19194/* end confdefs.h. */
19195#include <stddef.h>
19196 wchar_t foo = (wchar_t)'\0';
19197int
19198main ()
19199{
19200
19201 ;
19202 return 0;
19203}
19204_ACEOF
19205if ac_fn_c_try_compile "$LINENO"; then :
19206 gt_cv_c_wchar_t=yes
19207else
19208 gt_cv_c_wchar_t=no
19209fi
19210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19211fi
5476a9a4
GM
19212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19213$as_echo "$gt_cv_c_wchar_t" >&6; }
19214 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 19215
5476a9a4
GM
19216$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19217
19218 fi
19219
19220
19221 GNULIB_DPRINTF=0;
19222 GNULIB_FCLOSE=0;
19223 GNULIB_FDOPEN=0;
19224 GNULIB_FFLUSH=0;
19225 GNULIB_FGETC=0;
19226 GNULIB_FGETS=0;
19227 GNULIB_FOPEN=0;
19228 GNULIB_FPRINTF=0;
19229 GNULIB_FPRINTF_POSIX=0;
19230 GNULIB_FPURGE=0;
19231 GNULIB_FPUTC=0;
19232 GNULIB_FPUTS=0;
19233 GNULIB_FREAD=0;
19234 GNULIB_FREOPEN=0;
19235 GNULIB_FSCANF=0;
19236 GNULIB_FSEEK=0;
19237 GNULIB_FSEEKO=0;
19238 GNULIB_FTELL=0;
19239 GNULIB_FTELLO=0;
19240 GNULIB_FWRITE=0;
19241 GNULIB_GETC=0;
19242 GNULIB_GETCHAR=0;
19243 GNULIB_GETDELIM=0;
19244 GNULIB_GETLINE=0;
19245 GNULIB_OBSTACK_PRINTF=0;
19246 GNULIB_OBSTACK_PRINTF_POSIX=0;
19247 GNULIB_PCLOSE=0;
19248 GNULIB_PERROR=0;
19249 GNULIB_POPEN=0;
19250 GNULIB_PRINTF=0;
19251 GNULIB_PRINTF_POSIX=0;
19252 GNULIB_PUTC=0;
19253 GNULIB_PUTCHAR=0;
19254 GNULIB_PUTS=0;
19255 GNULIB_REMOVE=0;
19256 GNULIB_RENAME=0;
19257 GNULIB_RENAMEAT=0;
19258 GNULIB_SCANF=0;
19259 GNULIB_SNPRINTF=0;
19260 GNULIB_SPRINTF_POSIX=0;
19261 GNULIB_STDIO_H_NONBLOCKING=0;
19262 GNULIB_STDIO_H_SIGPIPE=0;
19263 GNULIB_TMPFILE=0;
19264 GNULIB_VASPRINTF=0;
19265 GNULIB_VFSCANF=0;
19266 GNULIB_VSCANF=0;
19267 GNULIB_VDPRINTF=0;
19268 GNULIB_VFPRINTF=0;
19269 GNULIB_VFPRINTF_POSIX=0;
19270 GNULIB_VPRINTF=0;
19271 GNULIB_VPRINTF_POSIX=0;
19272 GNULIB_VSNPRINTF=0;
19273 GNULIB_VSPRINTF_POSIX=0;
19274 HAVE_DECL_FPURGE=1;
19275 HAVE_DECL_FSEEKO=1;
19276 HAVE_DECL_FTELLO=1;
19277 HAVE_DECL_GETDELIM=1;
19278 HAVE_DECL_GETLINE=1;
19279 HAVE_DECL_OBSTACK_PRINTF=1;
19280 HAVE_DECL_SNPRINTF=1;
19281 HAVE_DECL_VSNPRINTF=1;
19282 HAVE_DPRINTF=1;
19283 HAVE_FSEEKO=1;
19284 HAVE_FTELLO=1;
19285 HAVE_PCLOSE=1;
19286 HAVE_POPEN=1;
19287 HAVE_RENAMEAT=1;
19288 HAVE_VASPRINTF=1;
19289 HAVE_VDPRINTF=1;
19290 REPLACE_DPRINTF=0;
19291 REPLACE_FCLOSE=0;
19292 REPLACE_FDOPEN=0;
19293 REPLACE_FFLUSH=0;
19294 REPLACE_FOPEN=0;
19295 REPLACE_FPRINTF=0;
19296 REPLACE_FPURGE=0;
19297 REPLACE_FREOPEN=0;
19298 REPLACE_FSEEK=0;
19299 REPLACE_FSEEKO=0;
19300 REPLACE_FTELL=0;
19301 REPLACE_FTELLO=0;
19302 REPLACE_GETDELIM=0;
19303 REPLACE_GETLINE=0;
19304 REPLACE_OBSTACK_PRINTF=0;
19305 REPLACE_PERROR=0;
19306 REPLACE_POPEN=0;
19307 REPLACE_PRINTF=0;
19308 REPLACE_REMOVE=0;
19309 REPLACE_RENAME=0;
19310 REPLACE_RENAMEAT=0;
19311 REPLACE_SNPRINTF=0;
19312 REPLACE_SPRINTF=0;
19313 REPLACE_STDIO_READ_FUNCS=0;
19314 REPLACE_STDIO_WRITE_FUNCS=0;
19315 REPLACE_TMPFILE=0;
19316 REPLACE_VASPRINTF=0;
19317 REPLACE_VDPRINTF=0;
19318 REPLACE_VFPRINTF=0;
19319 REPLACE_VPRINTF=0;
19320 REPLACE_VSNPRINTF=0;
19321 REPLACE_VSPRINTF=0;
1ebc9c87 19322
5476a9a4
GM
19323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19324$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19325if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
19326 $as_echo_n "(cached) " >&6
19327else
5476a9a4 19328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 19329/* end confdefs.h. */
5476a9a4
GM
19330#include <sys/types.h>
19331#include <time.h>
1ebc9c87
GM
19332
19333int
19334main ()
19335{
5476a9a4
GM
19336struct tm tm;
19337 int *p = &tm.tm_sec;
19338 return !p;
1ebc9c87
GM
19339 ;
19340 return 0;
19341}
19342_ACEOF
5476a9a4
GM
19343if ac_fn_c_try_compile "$LINENO"; then :
19344 ac_cv_struct_tm=time.h
1ebc9c87 19345else
5476a9a4 19346 ac_cv_struct_tm=sys/time.h
1ebc9c87 19347fi
5476a9a4 19348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19349fi
5476a9a4
GM
19350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19351$as_echo "$ac_cv_struct_tm" >&6; }
19352if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 19353
5476a9a4 19354$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 19355
1ebc9c87
GM
19356fi
19357
5476a9a4
GM
19358ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19359#include <$ac_cv_struct_tm>
1fd182f0 19360
5476a9a4
GM
19361"
19362if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 19363
5476a9a4
GM
19364cat >>confdefs.h <<_ACEOF
19365#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 19366_ACEOF
5476a9a4
GM
19367
19368
1f5d53eb 19369fi
1fd182f0 19370
5476a9a4 19371if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 19372
5476a9a4 19373$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 19374
5476a9a4
GM
19375else
19376 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19377"
19378if test "x$ac_cv_have_decl_tzname" = x""yes; then :
19379 ac_have_decl=1
19380else
19381 ac_have_decl=0
19382fi
1fd182f0 19383
5476a9a4
GM
19384cat >>confdefs.h <<_ACEOF
19385#define HAVE_DECL_TZNAME $ac_have_decl
19386_ACEOF
f199cab1 19387
5476a9a4
GM
19388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19389$as_echo_n "checking for tzname... " >&6; }
19390if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 19391 $as_echo_n "(cached) " >&6
3e0be4ab 19392else
5476a9a4 19393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19394/* end confdefs.h. */
5476a9a4
GM
19395#include <time.h>
19396#if !HAVE_DECL_TZNAME
19397extern char *tzname[];
f199cab1 19398#endif
5476a9a4 19399
f199cab1
GM
19400int
19401main ()
19402{
5476a9a4 19403return tzname[0][0];
f199cab1
GM
19404 ;
19405 return 0;
19406}
3e0be4ab 19407_ACEOF
f199cab1 19408if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 19409 ac_cv_var_tzname=yes
3e0be4ab 19410else
5476a9a4 19411 ac_cv_var_tzname=no
f199cab1
GM
19412fi
19413rm -f core conftest.err conftest.$ac_objext \
19414 conftest$ac_exeext conftest.$ac_ext
f199cab1 19415fi
5476a9a4
GM
19416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19417$as_echo "$ac_cv_var_tzname" >&6; }
19418 if test $ac_cv_var_tzname = yes; then
19419
19420$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 19421
5476a9a4 19422 fi
3e0be4ab 19423fi
cc322c06 19424
5476a9a4
GM
19425
19426 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
19427"
19428if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
19429
19430$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 19431
f199cab1 19432fi
cc322c06 19433
1f5d53eb 19434
e275c824 19435
5476a9a4
GM
19436
19437ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
19438if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
19439 ac_have_decl=1
3e0be4ab 19440else
5476a9a4 19441 ac_have_decl=0
3e0be4ab 19442fi
5476a9a4
GM
19443
19444cat >>confdefs.h <<_ACEOF
19445#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 19446_ACEOF
e275c824
PE
19447
19448
5476a9a4
GM
19449
19450ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
19451if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
19452 ac_have_decl=1
19453else
19454 ac_have_decl=0
3e0be4ab 19455fi
e275c824 19456
5476a9a4
GM
19457cat >>confdefs.h <<_ACEOF
19458#define HAVE_DECL_STRTOUMAX $ac_have_decl
19459_ACEOF
e275c824
PE
19460
19461
2b1928b8 19462
5476a9a4
GM
19463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19464$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
19465if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 19466 $as_echo_n "(cached) " >&6
2b1928b8 19467else
5476a9a4
GM
19468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19469/* end confdefs.h. */
19470#include <sys/types.h>
19471#include <sys/stat.h>
2b1928b8 19472
5476a9a4
GM
19473#if defined S_ISBLK && defined S_IFDIR
19474extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
19475#endif
2b1928b8 19476
5476a9a4
GM
19477#if defined S_ISBLK && defined S_IFCHR
19478extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
19479#endif
0eb775a3 19480
5476a9a4
GM
19481#if defined S_ISLNK && defined S_IFREG
19482extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
19483#endif
19484
19485#if defined S_ISSOCK && defined S_IFREG
19486extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
19487#endif
0eb775a3 19488
5476a9a4
GM
19489_ACEOF
19490if ac_fn_c_try_compile "$LINENO"; then :
19491 ac_cv_header_stat_broken=no
f199cab1 19492else
5476a9a4 19493 ac_cv_header_stat_broken=yes
f199cab1 19494fi
5476a9a4 19495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19496fi
5476a9a4
GM
19497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
19498$as_echo "$ac_cv_header_stat_broken" >&6; }
19499if test $ac_cv_header_stat_broken = yes; then
0eb775a3 19500
5476a9a4 19501$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 19502
5476a9a4 19503fi
0eb775a3
GM
19504
19505
19506
5476a9a4
GM
19507ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
19508if test "x$ac_cv_type_mode_t" = x""yes; then :
f199cab1 19509
3e0be4ab 19510else
5476a9a4
GM
19511
19512cat >>confdefs.h <<_ACEOF
19513#define mode_t int
19514_ACEOF
19515
f199cab1 19516fi
5476a9a4
GM
19517
19518
19519
19520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19521$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19522if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
19523 $as_echo_n "(cached) " >&6
19524else
19525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19526/* end confdefs.h. */
5476a9a4 19527#include <time.h>
52724a05 19528
3e0be4ab
GM
19529int
19530main ()
19531{
5476a9a4 19532static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19533 ;
19534 return 0;
19535}
19536_ACEOF
5476a9a4
GM
19537if ac_fn_c_try_compile "$LINENO"; then :
19538 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 19539else
5476a9a4 19540 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 19541fi
5476a9a4
GM
19542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19543fi
19544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19545$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 19546
5476a9a4
GM
19547 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19548 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19549 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19550 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19551 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19552 else
19553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19554$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19555if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
19556 $as_echo_n "(cached) " >&6
19557else
3e0be4ab
GM
19558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19559/* end confdefs.h. */
5476a9a4
GM
19560#include <sys/time.h>
19561
3e0be4ab
GM
19562int
19563main ()
19564{
5476a9a4 19565static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19566 ;
19567 return 0;
19568}
19569_ACEOF
5476a9a4
GM
19570if ac_fn_c_try_compile "$LINENO"; then :
19571 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 19572else
5476a9a4 19573 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 19574fi
5476a9a4 19575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19576fi
5476a9a4
GM
19577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19578$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19579 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19580 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19581 else
19582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19583$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19584if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
19585 $as_echo_n "(cached) " >&6
19586else
19587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19588/* end confdefs.h. */
5476a9a4
GM
19589#include <pthread.h>
19590
3e0be4ab
GM
19591int
19592main ()
19593{
5476a9a4 19594static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19595 ;
19596 return 0;
19597}
19598_ACEOF
5476a9a4
GM
19599if ac_fn_c_try_compile "$LINENO"; then :
19600 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 19601else
5476a9a4 19602 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 19603fi
5476a9a4 19604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 19605fi
5476a9a4
GM
19606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19607$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19608 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19609 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19610 fi
19611 fi
f199cab1 19612 fi
e275c824
PE
19613
19614
b0415a03 19615
b0415a03 19616
e275c824 19617
e275c824
PE
19618
19619
f199cab1 19620
e275c824
PE
19621
19622
19623
19624
19625
19626
19627
5476a9a4
GM
19628 if test $gl_cv_have_include_next = yes; then
19629 gl_cv_next_time_h='<'time.h'>'
19630 else
19631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19632$as_echo_n "checking absolute name of <time.h>... " >&6; }
19633if test "${gl_cv_next_time_h+set}" = set; then :
19634 $as_echo_n "(cached) " >&6
19635else
e275c824 19636
5476a9a4
GM
19637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19638/* end confdefs.h. */
19639#include <time.h>
e275c824 19640
5476a9a4
GM
19641_ACEOF
19642 case "$host_os" in
19643 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19644 *) gl_absname_cpp="$ac_cpp" ;;
19645 esac
e275c824 19646
5476a9a4
GM
19647 case "$host_os" in
19648 mingw*)
19649 gl_dirsep_regex='[/\\]'
19650 ;;
19651 *)
19652 gl_dirsep_regex='\/'
19653 ;;
19654 esac
19655 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 19656
5476a9a4
GM
19657 gl_header_literal_regex=`echo 'time.h' \
19658 | sed -e "$gl_make_literal_regex_sed"`
19659 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19660 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19661 s|^/[^/]|//&|
19662 p
19663 q
19664 }'
19665 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19666 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
19667
19668
5476a9a4
GM
19669fi
19670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
19671$as_echo "$gl_cv_next_time_h" >&6; }
19672 fi
19673 NEXT_TIME_H=$gl_cv_next_time_h
67342916 19674
5476a9a4
GM
19675 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19676 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19677 gl_next_as_first_directive='<'time.h'>'
f199cab1 19678 else
5476a9a4
GM
19679 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19680 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 19681 fi
5476a9a4 19682 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
19683
19684
52724a05
GM
19685
19686
19687
19688
19689
19690
19691
ae0d7250
PE
19692
19693
19694
cc322c06 19695
f199cab1 19696
cc322c06 19697
5476a9a4
GM
19698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
19699$as_echo_n "checking whether the utimes function works... " >&6; }
19700if test "${gl_cv_func_working_utimes+set}" = set; then :
19701 $as_echo_n "(cached) " >&6
19702else
1fd182f0 19703
5476a9a4
GM
19704 if test "$cross_compiling" = yes; then :
19705 gl_cv_func_working_utimes=no
19706else
19707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19708/* end confdefs.h. */
19709
19710#include <sys/types.h>
19711#include <sys/stat.h>
19712#include <fcntl.h>
19713#include <sys/time.h>
19714#include <time.h>
19715#include <unistd.h>
19716#include <stdlib.h>
19717#include <stdio.h>
19718#include <utime.h>
1fd182f0 19719
5476a9a4
GM
19720static int
19721inorder (time_t a, time_t b, time_t c)
19722{
19723 return a <= b && b <= c;
19724}
1fd182f0 19725
5476a9a4
GM
19726int
19727main ()
19728{
19729 int result = 0;
19730 char const *file = "conftest.utimes";
19731 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 19732
5476a9a4
GM
19733 /* Test whether utimes() essentially works. */
19734 {
19735 struct stat sbuf;
19736 FILE *f = fopen (file, "w");
19737 if (f == NULL)
19738 result |= 1;
19739 else if (fclose (f) != 0)
19740 result |= 1;
19741 else if (utimes (file, timeval) != 0)
19742 result |= 2;
19743 else if (lstat (file, &sbuf) != 0)
19744 result |= 1;
19745 else if (!(sbuf.st_atime == timeval[0].tv_sec
19746 && sbuf.st_mtime == timeval[1].tv_sec))
19747 result |= 4;
19748 if (unlink (file) != 0)
19749 result |= 1;
19750 }
1fd182f0 19751
5476a9a4
GM
19752 /* Test whether utimes() with a NULL argument sets the file's timestamp
19753 to the current time. Use 'fstat' as well as 'time' to
19754 determine the "current" time, to accommodate NFS file systems
19755 if there is a time skew between the host and the NFS server. */
19756 {
19757 int fd = open (file, O_WRONLY|O_CREAT, 0644);
19758 if (fd < 0)
19759 result |= 1;
19760 else
19761 {
19762 time_t t0, t2;
19763 struct stat st0, st1, st2;
19764 if (time (&t0) == (time_t) -1)
19765 result |= 1;
19766 else if (fstat (fd, &st0) != 0)
19767 result |= 1;
19768 else if (utimes (file, timeval) != 0)
19769 result |= 2;
19770 else if (utimes (file, NULL) != 0)
19771 result |= 8;
19772 else if (fstat (fd, &st1) != 0)
19773 result |= 1;
19774 else if (write (fd, "\n", 1) != 1)
19775 result |= 1;
19776 else if (fstat (fd, &st2) != 0)
19777 result |= 1;
19778 else if (time (&t2) == (time_t) -1)
19779 result |= 1;
19780 else
19781 {
19782 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
19783 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
19784 if (! (st1.st_atime == st1.st_mtime))
19785 result |= 16;
19786 if (! (m_ok_POSIX || m_ok_NFS))
19787 result |= 32;
19788 }
19789 if (close (fd) != 0)
19790 result |= 1;
19791 }
19792 if (unlink (file) != 0)
19793 result |= 1;
19794 }
52724a05 19795
5476a9a4
GM
19796 /* Test whether utimes() with a NULL argument works on read-only files. */
19797 {
19798 int fd = open (file, O_WRONLY|O_CREAT, 0444);
19799 if (fd < 0)
19800 result |= 1;
19801 else if (close (fd) != 0)
19802 result |= 1;
19803 else if (utimes (file, NULL) != 0)
19804 result |= 64;
19805 if (unlink (file) != 0)
19806 result |= 1;
19807 }
1fd182f0 19808
5476a9a4
GM
19809 return result;
19810}
1fd182f0 19811
5476a9a4
GM
19812_ACEOF
19813if ac_fn_c_try_run "$LINENO"; then :
19814 gl_cv_func_working_utimes=yes
19815else
19816 gl_cv_func_working_utimes=no
19817fi
19818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19819 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 19820fi
1fd182f0 19821
5476a9a4
GM
19822fi
19823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
19824$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 19825
5476a9a4 19826 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 19827
5476a9a4 19828$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 19829
5476a9a4 19830 fi
1fd182f0 19831
1fd182f0 19832
1fd182f0 19833
1fd182f0 19834
1fd182f0 19835
5476a9a4
GM
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
19837$as_echo_n "checking for struct utimbuf... " >&6; }
19838if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
19839 $as_echo_n "(cached) " >&6
19840else
19841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19842/* end confdefs.h. */
19843#if HAVE_SYS_TIME_H
19844 #include <sys/time.h>
19845 #endif
19846 #include <time.h>
19847 #ifdef HAVE_UTIME_H
19848 #include <utime.h>
19849 #endif
1fd182f0 19850
5476a9a4
GM
19851int
19852main ()
19853{
19854static struct utimbuf x; x.actime = x.modtime;
19855 ;
19856 return 0;
19857}
19858_ACEOF
19859if ac_fn_c_try_compile "$LINENO"; then :
19860 gl_cv_sys_struct_utimbuf=yes
19861else
19862 gl_cv_sys_struct_utimbuf=no
f199cab1 19863fi
5476a9a4 19864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19865fi
5476a9a4
GM
19866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
19867$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 19868
5476a9a4 19869 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 19870
5476a9a4 19871$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 19872
5476a9a4 19873 fi
1fd182f0 19874
1fd182f0 19875
1fd182f0 19876
1fd182f0 19877
1fd182f0 19878
1fd182f0 19879
1fd182f0 19880
3e0be4ab 19881
f199cab1 19882
f199cab1 19883
067d23c9 19884
067d23c9 19885
5476a9a4
GM
19886 if false; then
19887 GL_COND_LIBTOOL_TRUE=
19888 GL_COND_LIBTOOL_FALSE='#'
19889else
19890 GL_COND_LIBTOOL_TRUE='#'
19891 GL_COND_LIBTOOL_FALSE=
1fd182f0 19892fi
067d23c9 19893
5476a9a4
GM
19894 gl_cond_libtool=false
19895 gl_libdeps=
19896 gl_ltlibdeps=
19897 gl_m4_base='m4'
067d23c9 19898
f199cab1 19899
f199cab1 19900
f199cab1 19901
067d23c9 19902
f199cab1 19903
f199cab1 19904
f199cab1 19905
067d23c9 19906
5476a9a4 19907 gl_source_base='lib'
cc322c06
GM
19908
19909
5476a9a4
GM
19910 if test $ac_cv_func_alloca_works = no; then
19911 :
f199cab1 19912 fi
cc322c06 19913
5476a9a4
GM
19914 # Define an additional variable used in the Makefile substitution.
19915 if test $ac_cv_working_alloca_h = yes; then
19916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19917$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
19918if test "${gl_cv_rpl_alloca+set}" = set; then :
19919 $as_echo_n "(cached) " >&6
19920else
cc322c06 19921
5476a9a4
GM
19922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19923/* end confdefs.h. */
067d23c9 19924
5476a9a4
GM
19925#if defined __GNUC__ || defined _AIX || defined _MSC_VER
19926 Need own alloca
19927#endif
067d23c9 19928
f199cab1 19929_ACEOF
5476a9a4
GM
19930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19931 $EGREP "Need own alloca" >/dev/null 2>&1; then :
19932 gl_cv_rpl_alloca=yes
19933else
19934 gl_cv_rpl_alloca=no
369e19fc 19935fi
5476a9a4 19936rm -f conftest*
067d23c9 19937
ae0d7250 19938
5476a9a4
GM
19939fi
19940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19941$as_echo "$gl_cv_rpl_alloca" >&6; }
19942 if test $gl_cv_rpl_alloca = yes; then
52724a05 19943
5476a9a4 19944$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 19945
5476a9a4
GM
19946 ALLOCA_H=alloca.h
19947 else
19948 ALLOCA_H=
19949 fi
f199cab1 19950 else
5476a9a4
GM
19951 ALLOCA_H=alloca.h
19952 fi
ae0d7250 19953
5476a9a4
GM
19954 if test -n "$ALLOCA_H"; then
19955 GL_GENERATE_ALLOCA_H_TRUE=
19956 GL_GENERATE_ALLOCA_H_FALSE='#'
19957else
19958 GL_GENERATE_ALLOCA_H_TRUE='#'
19959 GL_GENERATE_ALLOCA_H_FALSE=
19960fi
f199cab1 19961
ae0d7250
PE
19962
19963
19964
19965
19966
5476a9a4
GM
19967 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19968 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 19969
5476a9a4
GM
19970 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
19971 # programs in the package would end up linked with that potentially-shared
19972 # library, inducing unnecessary run-time overhead.
19973 LIB_CLOCK_GETTIME=
ae0d7250 19974
5476a9a4
GM
19975 gl_saved_libs=$LIBS
19976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19977$as_echo_n "checking for library containing clock_gettime... " >&6; }
19978if test "${ac_cv_search_clock_gettime+set}" = set; then :
19979 $as_echo_n "(cached) " >&6
19980else
19981 ac_func_search_save_LIBS=$LIBS
19982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19983/* end confdefs.h. */
19984
19985/* Override any GCC internal prototype to avoid an error.
19986 Use char because int might match the return type of a GCC
19987 builtin and then its argument prototype would still apply. */
19988#ifdef __cplusplus
19989extern "C"
19990#endif
19991char clock_gettime ();
19992int
19993main ()
19994{
19995return clock_gettime ();
19996 ;
19997 return 0;
19998}
19999_ACEOF
20000for ac_lib in '' rt posix4; do
20001 if test -z "$ac_lib"; then
20002 ac_res="none required"
20003 else
20004 ac_res=-l$ac_lib
20005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20006 fi
20007 if ac_fn_c_try_link "$LINENO"; then :
20008 ac_cv_search_clock_gettime=$ac_res
f199cab1 20009fi
5476a9a4
GM
20010rm -f core conftest.err conftest.$ac_objext \
20011 conftest$ac_exeext
20012 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20013 break
20014fi
20015done
20016if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 20017
5476a9a4
GM
20018else
20019 ac_cv_search_clock_gettime=no
20020fi
20021rm conftest.$ac_ext
20022LIBS=$ac_func_search_save_LIBS
20023fi
20024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20025$as_echo "$ac_cv_search_clock_gettime" >&6; }
20026ac_res=$ac_cv_search_clock_gettime
20027if test "$ac_res" != no; then :
20028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20029 test "$ac_cv_search_clock_gettime" = "none required" ||
20030 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20031fi
ae0d7250 20032
5476a9a4
GM
20033 for ac_func in clock_gettime clock_settime
20034do :
20035 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20036ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20037eval as_val=\$$as_ac_var
20038 if test "x$as_val" = x""yes; then :
20039 cat >>confdefs.h <<_ACEOF
20040#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20041_ACEOF
ae0d7250 20042
5476a9a4
GM
20043fi
20044done
ae0d7250 20045
5476a9a4 20046 LIBS=$gl_saved_libs
3e0be4ab
GM
20047
20048
3e0be4ab 20049
3e0be4ab 20050
5476a9a4 20051 :
3e0be4ab 20052
f199cab1 20053
f199cab1 20054
f199cab1 20055
5476a9a4 20056 :
3e0be4ab 20057
f199cab1 20058
f199cab1 20059
3e0be4ab 20060
f199cab1
GM
20061
20062
20063
5476a9a4
GM
20064
20065
20066
20067
20068
20069
20070
20071
20072$as_echo "#define HAVE_DUP2 1" >>confdefs.h
20073
20074
20075 if test $HAVE_DUP2 = 1; then
20076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20077$as_echo_n "checking whether dup2 works... " >&6; }
20078if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
20079 $as_echo_n "(cached) " >&6
20080else
5476a9a4
GM
20081 if test "$cross_compiling" = yes; then :
20082 case "$host_os" in
20083 mingw*) # on this platform, dup2 always returns 0 for success
20084 gl_cv_func_dup2_works="guessing no" ;;
20085 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20086 gl_cv_func_dup2_works="guessing no" ;;
20087 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20088 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20089 gl_cv_func_dup2_works="guessing no" ;;
20090 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20091 gl_cv_func_dup2_works="guessing no" ;;
20092 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20093 gl_cv_func_dup2_works="guessing no" ;;
20094 *) gl_cv_func_dup2_works="guessing yes" ;;
20095 esac
20096else
20097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20098/* end confdefs.h. */
ae0d7250 20099
5476a9a4
GM
20100 #include <unistd.h>
20101#include <fcntl.h>
20102#include <errno.h>
3e0be4ab
GM
20103int
20104main ()
20105{
5476a9a4
GM
20106int result = 0;
20107#ifdef FD_CLOEXEC
20108 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20109 result |= 1;
20110#endif
20111 if (dup2 (1, 1) == 0)
20112 result |= 2;
20113#ifdef FD_CLOEXEC
20114 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20115 result |= 4;
20116#endif
20117 close (0);
20118 if (dup2 (0, 0) != -1)
20119 result |= 8;
20120 /* Many gnulib modules require POSIX conformance of EBADF. */
20121 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20122 result |= 16;
20123 return result;
20124
ae0d7250
PE
20125 ;
20126 return 0;
20127}
5476a9a4 20128
ae0d7250 20129_ACEOF
5476a9a4
GM
20130if ac_fn_c_try_run "$LINENO"; then :
20131 gl_cv_func_dup2_works=yes
ae0d7250 20132else
5476a9a4 20133 gl_cv_func_dup2_works=no
ae0d7250 20134fi
5476a9a4
GM
20135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20136 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 20137fi
5476a9a4
GM
20138
20139
3e0be4ab 20140fi
5476a9a4
GM
20141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20142$as_echo "$gl_cv_func_dup2_works" >&6; }
20143 case "$gl_cv_func_dup2_works" in
20144 *yes) ;;
20145 *)
20146 REPLACE_DUP2=1
20147 ;;
20148 esac
20149 fi
3e0be4ab 20150
3e0be4ab 20151
a6342fc8 20152 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 20153
f199cab1
GM
20154
20155
f199cab1 20156
f199cab1 20157
f199cab1 20158
f199cab1 20159
f199cab1 20160
5476a9a4 20161 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
20162
20163
a6342fc8 20164 fi
f199cab1 20165
f199cab1 20166
f199cab1 20167
f199cab1 20168
f199cab1 20169
5476a9a4 20170 GNULIB_DUP2=1
f199cab1
GM
20171
20172
f199cab1 20173
f199cab1 20174
3e0be4ab 20175
3e0be4ab 20176
f199cab1
GM
20177
20178
ae0d7250 20179
ae0d7250 20180
5476a9a4 20181
93131e11
GM
20182 GNULIB_ENVIRON=1
20183
20184
20185
20186
20187
20188
20189
20190
8966cbff
GM
20191 LIB_EXECINFO=''
20192 EXECINFO_H='execinfo.h'
20193
20194 if test $ac_cv_header_execinfo_h = yes; then
20195 gl_saved_libs=$LIBS
20196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
20197$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
20198if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20199 $as_echo_n "(cached) " >&6
20200else
20201 ac_func_search_save_LIBS=$LIBS
20202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20203/* end confdefs.h. */
20204
20205/* Override any GCC internal prototype to avoid an error.
20206 Use char because int might match the return type of a GCC
20207 builtin and then its argument prototype would still apply. */
20208#ifdef __cplusplus
20209extern "C"
20210#endif
20211char backtrace_symbols_fd ();
20212int
20213main ()
20214{
20215return backtrace_symbols_fd ();
20216 ;
20217 return 0;
20218}
20219_ACEOF
20220for ac_lib in '' execinfo; do
20221 if test -z "$ac_lib"; then
20222 ac_res="none required"
20223 else
20224 ac_res=-l$ac_lib
20225 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20226 fi
20227 if ac_fn_c_try_link "$LINENO"; then :
20228 ac_cv_search_backtrace_symbols_fd=$ac_res
20229fi
20230rm -f core conftest.err conftest.$ac_objext \
20231 conftest$ac_exeext
20232 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20233 break
20234fi
20235done
20236if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20237
20238else
20239 ac_cv_search_backtrace_symbols_fd=no
20240fi
20241rm conftest.$ac_ext
20242LIBS=$ac_func_search_save_LIBS
20243fi
20244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
20245$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
20246ac_res=$ac_cv_search_backtrace_symbols_fd
20247if test "$ac_res" != no; then :
20248 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20249 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
20250 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
20251fi
20252
20253 LIBS=$gl_saved_libs
20254 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
20255 fi
20256
20257 if test -n "$EXECINFO_H"; then
20258
20259
20260
20261
20262
20263
20264
20265
20266 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
20267
20268 fi
20269
20270
20271
20272 if test -n "$EXECINFO_H"; then
20273 GL_GENERATE_EXECINFO_H_TRUE=
20274 GL_GENERATE_EXECINFO_H_FALSE='#'
20275else
20276 GL_GENERATE_EXECINFO_H_TRUE='#'
20277 GL_GENERATE_EXECINFO_H_FALSE=
20278fi
20279
20280
20281
20282
20283
93131e11
GM
20284
20285
20286
7cd2ed2c 20287
5476a9a4
GM
20288# Persuade glibc <stdlib.h> to declare getloadavg().
20289
20290
20291gl_save_LIBS=$LIBS
20292
20293# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
20294# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
20295HAVE_GETLOADAVG=1
20296ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
20297if test "x$ac_cv_func_getloadavg" = x""yes; then :
20298
20299else
20300 gl_func_getloadavg_done=no
20301
20302 # Some systems with -lutil have (and need) -lkvm as well, some do not.
20303 # On Solaris, -lkvm requires nlist from -lelf, so check that first
20304 # to get the right answer into the cache.
20305 # For kstat on solaris, we need to test for libelf and libkvm to force the
20306 # definition of SVR4 below.
20307 if test $gl_func_getloadavg_done = no; then
20308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
20309$as_echo_n "checking for elf_begin in -lelf... " >&6; }
20310if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
20311 $as_echo_n "(cached) " >&6
20312else
3e0be4ab 20313 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20314LIBS="-lelf $LIBS"
3e0be4ab 20315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 20316/* end confdefs.h. */
6ad6792b 20317
3e0be4ab
GM
20318/* Override any GCC internal prototype to avoid an error.
20319 Use char because int might match the return type of a GCC
20320 builtin and then its argument prototype would still apply. */
20321#ifdef __cplusplus
20322extern "C"
20323#endif
5476a9a4 20324char elf_begin ();
6ad6792b
GM
20325int
20326main ()
20327{
5476a9a4 20328return elf_begin ();
6ad6792b
GM
20329 ;
20330 return 0;
20331}
20332_ACEOF
3e0be4ab 20333if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20334 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 20335else
5476a9a4 20336 ac_cv_lib_elf_elf_begin=no
6ad6792b 20337fi
3e0be4ab
GM
20338rm -f core conftest.err conftest.$ac_objext \
20339 conftest$ac_exeext conftest.$ac_ext
20340LIBS=$ac_check_lib_save_LIBS
6ad6792b 20341fi
5476a9a4
GM
20342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
20343$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
20344if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
20345 LIBS="-lelf $LIBS"
6ad6792b
GM
20346fi
20347
5476a9a4
GM
20348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
20349$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
20350if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
20351 $as_echo_n "(cached) " >&6
20352else
5476a9a4
GM
20353 ac_check_lib_save_LIBS=$LIBS
20354LIBS="-lkvm $LIBS"
20355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 20356/* end confdefs.h. */
3e0be4ab 20357
5476a9a4
GM
20358/* Override any GCC internal prototype to avoid an error.
20359 Use char because int might match the return type of a GCC
20360 builtin and then its argument prototype would still apply. */
20361#ifdef __cplusplus
20362extern "C"
20363#endif
20364char kvm_open ();
6c051bab
GM
20365int
20366main ()
20367{
5476a9a4 20368return kvm_open ();
6c051bab
GM
20369 ;
20370 return 0;
20371}
20372_ACEOF
3e0be4ab 20373if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20374 ac_cv_lib_kvm_kvm_open=yes
6c051bab 20375else
5476a9a4 20376 ac_cv_lib_kvm_kvm_open=no
6c051bab 20377fi
3e0be4ab
GM
20378rm -f core conftest.err conftest.$ac_objext \
20379 conftest$ac_exeext conftest.$ac_ext
5476a9a4 20380LIBS=$ac_check_lib_save_LIBS
6c051bab 20381fi
5476a9a4
GM
20382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
20383$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
20384if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
20385 LIBS="-lkvm $LIBS"
3e0be4ab 20386fi
6c051bab 20387
5476a9a4
GM
20388 # Check for the 4.4BSD definition of getloadavg.
20389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
20390$as_echo_n "checking for getloadavg in -lutil... " >&6; }
20391if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
20392 $as_echo_n "(cached) " >&6
20393else
5476a9a4
GM
20394 ac_check_lib_save_LIBS=$LIBS
20395LIBS="-lutil $LIBS"
20396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 20397/* end confdefs.h. */
5476a9a4
GM
20398
20399/* Override any GCC internal prototype to avoid an error.
20400 Use char because int might match the return type of a GCC
20401 builtin and then its argument prototype would still apply. */
20402#ifdef __cplusplus
20403extern "C"
20404#endif
20405char getloadavg ();
ae0d7250
PE
20406int
20407main ()
20408{
5476a9a4 20409return getloadavg ();
ae0d7250
PE
20410 ;
20411 return 0;
20412}
20413_ACEOF
3e0be4ab 20414if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20415 ac_cv_lib_util_getloadavg=yes
ae0d7250 20416else
5476a9a4 20417 ac_cv_lib_util_getloadavg=no
ae0d7250 20418fi
3e0be4ab
GM
20419rm -f core conftest.err conftest.$ac_objext \
20420 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
20421LIBS=$ac_check_lib_save_LIBS
20422fi
20423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
20424$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
20425if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
20426 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 20427fi
6d153f56 20428
5476a9a4 20429 fi
6d153f56 20430
5476a9a4
GM
20431 if test $gl_func_getloadavg_done = no; then
20432 # There is a commonly available library for RS/6000 AIX.
20433 # Since it is not a standard part of AIX, it might be installed locally.
20434 gl_getloadavg_LIBS=$LIBS
20435 LIBS="-L/usr/local/lib $LIBS"
20436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
20437$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
20438if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 20439 $as_echo_n "(cached) " >&6
3e0be4ab 20440else
f199cab1 20441 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20442LIBS="-lgetloadavg $LIBS"
f199cab1
GM
20443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20444/* end confdefs.h. */
3e0be4ab 20445
f199cab1
GM
20446/* Override any GCC internal prototype to avoid an error.
20447 Use char because int might match the return type of a GCC
20448 builtin and then its argument prototype would still apply. */
20449#ifdef __cplusplus
20450extern "C"
20451#endif
5476a9a4 20452char getloadavg ();
f199cab1
GM
20453int
20454main ()
20455{
5476a9a4 20456return getloadavg ();
f199cab1
GM
20457 ;
20458 return 0;
20459}
ae0d7250 20460_ACEOF
f199cab1 20461if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20462 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 20463else
5476a9a4 20464 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 20465fi
f199cab1
GM
20466rm -f core conftest.err conftest.$ac_objext \
20467 conftest$ac_exeext conftest.$ac_ext
20468LIBS=$ac_check_lib_save_LIBS
3e0be4ab 20469fi
5476a9a4
GM
20470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
20471$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
20472if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
20473 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
20474else
20475 LIBS=$gl_getloadavg_LIBS
6d153f56 20476fi
ae0d7250 20477
5476a9a4 20478 fi
16c3e636 20479
5476a9a4
GM
20480 # Set up the replacement function if necessary.
20481 if test $gl_func_getloadavg_done = no; then
20482 HAVE_GETLOADAVG=0
16c3e636 20483
5476a9a4
GM
20484 # Solaris has libkstat which does not require root.
20485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
20486$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
20487if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
20488 $as_echo_n "(cached) " >&6
20489else
20490 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20491LIBS="-lkstat $LIBS"
f199cab1
GM
20492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20493/* end confdefs.h. */
5f90be1b 20494
f199cab1
GM
20495/* Override any GCC internal prototype to avoid an error.
20496 Use char because int might match the return type of a GCC
20497 builtin and then its argument prototype would still apply. */
20498#ifdef __cplusplus
20499extern "C"
20500#endif
5476a9a4 20501char kstat_open ();
f199cab1
GM
20502int
20503main ()
20504{
5476a9a4 20505return kstat_open ();
f199cab1
GM
20506 ;
20507 return 0;
20508}
3e0be4ab 20509_ACEOF
f199cab1 20510if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20511 ac_cv_lib_kstat_kstat_open=yes
f199cab1 20512else
5476a9a4 20513 ac_cv_lib_kstat_kstat_open=no
5f90be1b 20514fi
f199cab1
GM
20515rm -f core conftest.err conftest.$ac_objext \
20516 conftest$ac_exeext conftest.$ac_ext
20517LIBS=$ac_check_lib_save_LIBS
3e0be4ab 20518fi
5476a9a4
GM
20519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
20520$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
20521if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 20522 cat >>confdefs.h <<_ACEOF
5476a9a4 20523#define HAVE_LIBKSTAT 1
3e0be4ab 20524_ACEOF
5f90be1b 20525
5476a9a4 20526 LIBS="-lkstat $LIBS"
5f90be1b 20527
f199cab1 20528fi
5f90be1b 20529
5476a9a4 20530 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 20531
5476a9a4
GM
20532 # AIX has libperfstat which does not require root
20533 if test $gl_func_getloadavg_done = no; then
20534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
20535$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
20536if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
20537 $as_echo_n "(cached) " >&6
20538else
5476a9a4
GM
20539 ac_check_lib_save_LIBS=$LIBS
20540LIBS="-lperfstat $LIBS"
20541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 20542/* end confdefs.h. */
5476a9a4
GM
20543
20544/* Override any GCC internal prototype to avoid an error.
20545 Use char because int might match the return type of a GCC
20546 builtin and then its argument prototype would still apply. */
20547#ifdef __cplusplus
20548extern "C"
20549#endif
20550char perfstat_cpu_total ();
5f90be1b
PE
20551int
20552main ()
20553{
5476a9a4 20554return perfstat_cpu_total ();
5f90be1b
PE
20555 ;
20556 return 0;
20557}
20558_ACEOF
5476a9a4
GM
20559if ac_fn_c_try_link "$LINENO"; then :
20560 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 20561else
5476a9a4 20562 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 20563fi
5476a9a4
GM
20564rm -f core conftest.err conftest.$ac_objext \
20565 conftest$ac_exeext conftest.$ac_ext
20566LIBS=$ac_check_lib_save_LIBS
f199cab1 20567fi
5476a9a4
GM
20568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
20569$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
20570if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
20571 cat >>confdefs.h <<_ACEOF
20572#define HAVE_LIBPERFSTAT 1
20573_ACEOF
20574
20575 LIBS="-lperfstat $LIBS"
20576
20577fi
20578
20579 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
20580 fi
20581
20582 if test $gl_func_getloadavg_done = no; then
20583 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
20584if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
20585 gl_func_getloadavg_done=yes
20586
20587$as_echo "#define DGUX 1" >>confdefs.h
20588
20589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
20590$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
20591if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
20592 $as_echo_n "(cached) " >&6
20593else
20594 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20595LIBS="-ldgc $LIBS"
f199cab1
GM
20596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20597/* end confdefs.h. */
3e0be4ab 20598
f199cab1
GM
20599/* Override any GCC internal prototype to avoid an error.
20600 Use char because int might match the return type of a GCC
20601 builtin and then its argument prototype would still apply. */
20602#ifdef __cplusplus
20603extern "C"
20604#endif
5476a9a4 20605char dg_sys_info ();
f199cab1
GM
20606int
20607main ()
20608{
5476a9a4 20609return dg_sys_info ();
f199cab1
GM
20610 ;
20611 return 0;
20612}
20613_ACEOF
20614if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20615 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 20616else
5476a9a4 20617 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 20618fi
3e0be4ab
GM
20619rm -f core conftest.err conftest.$ac_objext \
20620 conftest$ac_exeext conftest.$ac_ext
f199cab1 20621LIBS=$ac_check_lib_save_LIBS
5f90be1b 20622fi
5476a9a4
GM
20623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
20624$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
20625if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
20626 cat >>confdefs.h <<_ACEOF
20627#define HAVE_LIBDGC 1
20628_ACEOF
20629
20630 LIBS="-ldgc $LIBS"
20631
da6c8463
GM
20632fi
20633
5476a9a4
GM
20634fi
20635
20636
20637 fi
20638 fi
20639fi
20640
20641
20642if test "x$gl_save_LIBS" = x; then
20643 GETLOADAVG_LIBS=$LIBS
f199cab1 20644else
5476a9a4
GM
20645 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
20646fi
20647LIBS=$gl_save_LIBS
20648
20649
20650# Test whether the system declares getloadavg. Solaris has the function
20651# but declares it in <sys/loadavg.h>, not <stdlib.h>.
20652for ac_header in sys/loadavg.h
20653do :
20654 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
20655if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
20656 cat >>confdefs.h <<_ACEOF
20657#define HAVE_SYS_LOADAVG_H 1
f199cab1 20658_ACEOF
5476a9a4 20659
f199cab1 20660fi
5476a9a4
GM
20661
20662done
20663
20664if test $ac_cv_header_sys_loadavg_h = yes; then
20665 HAVE_SYS_LOADAVG_H=1
20666else
20667 HAVE_SYS_LOADAVG_H=0
f199cab1 20668fi
5476a9a4
GM
20669ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
20670 # include <sys/loadavg.h>
20671 #endif
20672 #include <stdlib.h>
20673"
20674if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 20675
f199cab1 20676else
5476a9a4 20677 HAVE_DECL_GETLOADAVG=0
f199cab1 20678fi
5f90be1b 20679
5f90be1b 20680
a6342fc8 20681 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
20682
20683
20684
20685
20686
20687
20688
20689
20690 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
20691
20692
20693# Figure out what our getloadavg.c needs.
20694
20695
20696
20697# On HPUX9, an unprivileged user can get load averages this way.
20698if test $gl_func_getloadavg_done = no; then
20699 for ac_func in pstat_getdynamic
20700do :
20701 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
20702if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
20703 cat >>confdefs.h <<_ACEOF
20704#define HAVE_PSTAT_GETDYNAMIC 1
20705_ACEOF
20706 gl_func_getloadavg_done=yes
3e0be4ab 20707fi
5476a9a4 20708done
6ad6792b 20709
5476a9a4 20710fi
6ad6792b 20711
5476a9a4
GM
20712# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
20713# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
20714# Irix 4.0.5F has the header but not the library.
20715if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
20716 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
20717 gl_func_getloadavg_done=yes
6ad6792b 20718
5476a9a4 20719$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 20720
5476a9a4
GM
20721fi
20722
20723if test $gl_func_getloadavg_done = no; then
20724 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
20725if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
20726 gl_func_getloadavg_done=yes
20727
20728$as_echo "#define UMAX 1" >>confdefs.h
20729
20730
20731$as_echo "#define UMAX4_3 1" >>confdefs.h
20732
20733fi
20734
20735
20736fi
20737
20738if test $gl_func_getloadavg_done = no; then
20739 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
20740if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
20741 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
20742
20743fi
20744
20745
20746fi
20747
20748if test $gl_func_getloadavg_done = no; then
20749 for ac_header in mach/mach.h
20750do :
20751 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
20752if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
20753 cat >>confdefs.h <<_ACEOF
20754#define HAVE_MACH_MACH_H 1
20755_ACEOF
20756
20757fi
20758
20759done
20760
20761fi
20762
20763for ac_header in nlist.h
20764do :
20765 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
20766if test "x$ac_cv_header_nlist_h" = x""yes; then :
20767 cat >>confdefs.h <<_ACEOF
20768#define HAVE_NLIST_H 1
20769_ACEOF
20770 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
20771"
20772if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
20773
20774cat >>confdefs.h <<_ACEOF
20775#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
20776_ACEOF
6ad6792b 20777
0eb775a3 20778
f199cab1 20779fi
3e0be4ab 20780
5476a9a4 20781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20782/* end confdefs.h. */
5476a9a4 20783#include <nlist.h>
f199cab1
GM
20784int
20785main ()
20786{
5476a9a4
GM
20787struct nlist x;
20788 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
20789 x.n_un.n_name = "";
20790 #else
20791 x.n_name = "";
20792 #endif
f199cab1
GM
20793 ;
20794 return 0;
20795}
20796_ACEOF
5476a9a4 20797if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 20798
5476a9a4 20799$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
20800
20801fi
5476a9a4
GM
20802rm -f core conftest.err conftest.$ac_objext \
20803 conftest$ac_exeext conftest.$ac_ext
6ad6792b 20804
5476a9a4 20805fi
6ad6792b 20806
5476a9a4 20807done
6ad6792b 20808
a6342fc8 20809 fi
ca36e0ff 20810
ca36e0ff
GM
20811
20812
1f5d53eb
PE
20813
20814
5476a9a4 20815 GNULIB_GETLOADAVG=1
1f5d53eb
PE
20816
20817
20818
20819
20820
20821
20822
1f5d53eb 20823
1f5d53eb 20824
3e0be4ab 20825
a6342fc8 20826 if test $REPLACE_GETOPT = 1; then
3e0be4ab 20827
1f5d53eb
PE
20828
20829
1f5d53eb 20830
1f5d53eb
PE
20831
20832
20833
20834
5476a9a4 20835 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
20836
20837
1f5d53eb
PE
20838
20839
16c3e636 20840
5476a9a4
GM
20841
20842
20843
20844
20845 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20846
20847
20848
20849
a6342fc8
GM
20850 GNULIB_GL_UNISTD_H_GETOPT=1
20851 fi
16c3e636
PE
20852
20853
20854
4fda9c95
GM
20855
20856
20857
20858
5476a9a4
GM
20859 REPLACE_GETOPT=0
20860 if test -n "$gl_replace_getopt"; then
20861 REPLACE_GETOPT=1
20862 fi
20863
20864 if test $REPLACE_GETOPT = 1; then
20865
20866 GETOPT_H=getopt.h
20867
20868$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20869
20870
20871
20872 fi
20873
a6342fc8 20874 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
20875
20876
20877
20878
20879
20880
20881
20882
20883 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
20894
20895
20896
20897
a6342fc8
GM
20898 GNULIB_GL_UNISTD_H_GETOPT=1
20899 fi
4fda9c95
GM
20900
20901
20902
20903
4fda9c95 20904
4fda9c95 20905
4fda9c95 20906
5476a9a4
GM
20907
20908
20909
20910
20911
20912 gl_gettimeofday_timezone=void
20913 if test $ac_cv_func_gettimeofday != yes; then
20914 HAVE_GETTIMEOFDAY=0
f199cab1 20915 else
4fda9c95
GM
20916
20917
3e0be4ab 20918
5476a9a4
GM
20919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20920$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20921if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
20922 $as_echo_n "(cached) " >&6
20923else
20924 if test "$cross_compiling" = yes; then :
20925 # When cross-compiling:
20926 case "$host_os" in
20927 # Guess all is fine on glibc systems.
20928 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20929 # If we don't know, assume the worst.
20930 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20931 esac
4fda9c95 20932
5476a9a4
GM
20933else
20934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20935/* end confdefs.h. */
20936#include <string.h>
20937 #include <sys/time.h>
20938 #include <time.h>
20939 #include <stdlib.h>
4fda9c95 20940
5476a9a4
GM
20941int
20942main ()
20943{
4fda9c95 20944
5476a9a4
GM
20945 time_t t = 0;
20946 struct tm *lt;
20947 struct tm saved_lt;
20948 struct timeval tv;
20949 lt = localtime (&t);
20950 saved_lt = *lt;
20951 gettimeofday (&tv, NULL);
20952 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 20953
5476a9a4
GM
20954 ;
20955 return 0;
20956}
20957_ACEOF
20958if ac_fn_c_try_run "$LINENO"; then :
20959 gl_cv_func_gettimeofday_clobber=no
20960else
20961 gl_cv_func_gettimeofday_clobber=yes
20962fi
20963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20964 conftest.$ac_objext conftest.beam conftest.$ac_ext
20965fi
cc322c06 20966
5476a9a4
GM
20967fi
20968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20969$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 20970
5476a9a4
GM
20971 case "$gl_cv_func_gettimeofday_clobber" in
20972 *yes)
20973 REPLACE_GETTIMEOFDAY=1
cc322c06 20974
4fda9c95 20975
5476a9a4 20976$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 20977
ae0d7250 20978
5476a9a4 20979$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
20980
20981
ae0d7250 20982
5476a9a4
GM
20983$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20984
20985 ;;
20986 esac
20987
20988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20989$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20990if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
20991 $as_echo_n "(cached) " >&6
20992else
5476a9a4
GM
20993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20994/* end confdefs.h. */
20995#include <sys/time.h>
20996 struct timeval c;
20997 int gettimeofday (struct timeval *restrict, void *restrict);
20998
20999int
21000main ()
21001{
21002/* glibc uses struct timezone * rather than the POSIX void *
21003 if _GNU_SOURCE is defined. However, since the only portable
21004 use of gettimeofday uses NULL as the second parameter, and
21005 since the glibc definition is actually more typesafe, it is
21006 not worth wrapping this to get a compliant signature. */
21007 int (*f) (struct timeval *restrict, void *restrict)
21008 = gettimeofday;
21009 int x = f (&c, 0);
21010 return !(x | c.tv_sec | c.tv_usec);
21011
21012 ;
21013 return 0;
21014}
21015_ACEOF
21016if ac_fn_c_try_compile "$LINENO"; then :
21017 gl_cv_func_gettimeofday_posix_signature=yes
21018else
21019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21020/* end confdefs.h. */
5476a9a4
GM
21021#include <sys/time.h>
21022int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 21023
f199cab1
GM
21024int
21025main ()
21026{
5476a9a4 21027
f199cab1
GM
21028 ;
21029 return 0;
ae0d7250
PE
21030}
21031_ACEOF
5476a9a4
GM
21032if ac_fn_c_try_compile "$LINENO"; then :
21033 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 21034else
5476a9a4 21035 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 21036fi
5476a9a4 21037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 21038fi
5476a9a4 21039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 21040fi
5476a9a4
GM
21041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21042$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21043 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21044 gl_gettimeofday_timezone='struct timezone'
21045 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21046 REPLACE_GETTIMEOFDAY=1
21047 fi
21048 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21049 REPLACE_GETTIMEOFDAY=1
21050 fi
3e0be4ab 21051
5476a9a4 21052 fi
ae0d7250 21053
5476a9a4
GM
21054cat >>confdefs.h <<_ACEOF
21055#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21056_ACEOF
f199cab1 21057
ae0d7250 21058
a6342fc8 21059 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 21060
cc322c06
GM
21061
21062
cc322c06
GM
21063
21064
ae0d7250
PE
21065
21066
21067
5476a9a4 21068 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
21069
21070
5476a9a4
GM
21071 for ac_header in sys/timeb.h
21072do :
21073 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21074if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
21075 cat >>confdefs.h <<_ACEOF
21076#define HAVE_SYS_TIMEB_H 1
21077_ACEOF
5fa4ac76 21078
3e0be4ab 21079fi
5fa4ac76 21080
5476a9a4 21081done
f199cab1 21082
5476a9a4
GM
21083 for ac_func in _ftime
21084do :
21085 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21086if test "x$ac_cv_func__ftime" = x""yes; then :
21087 cat >>confdefs.h <<_ACEOF
21088#define HAVE__FTIME 1
21089_ACEOF
5fa4ac76 21090
5476a9a4
GM
21091fi
21092done
5fa4ac76
PE
21093
21094
a6342fc8 21095 fi
5fa4ac76
PE
21096
21097
21098
21099
21100
5476a9a4 21101 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
21102
21103
21104
21105
0eb775a3
GM
21106
21107
369e19fc
PE
21108
21109
369e19fc
PE
21110
21111
5476a9a4
GM
21112 if test $ac_cv_func_lstat = yes; then
21113
21114 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21115 *no)
21116 REPLACE_LSTAT=1
21117 ;;
21118 esac
21119 else
21120 HAVE_LSTAT=0
f199cab1 21121 fi
369e19fc 21122
a6342fc8 21123 if test $REPLACE_LSTAT = 1; then
369e19fc 21124
5fa4ac76 21125
369e19fc 21126
369e19fc 21127
369e19fc 21128
369e19fc 21129
369e19fc 21130
369e19fc 21131
5476a9a4 21132 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 21133
f199cab1 21134
5fa4ac76 21135
5476a9a4 21136 :
369e19fc 21137
a6342fc8 21138 fi
369e19fc 21139
369e19fc 21140
369e19fc 21141
5fa4ac76
PE
21142
21143
5476a9a4 21144 GNULIB_LSTAT=1
5fa4ac76 21145
5fa4ac76 21146
27505cf5 21147
27505cf5 21148
27505cf5 21149
27505cf5 21150
27505cf5 21151
27505cf5 21152
5fa4ac76
PE
21153
21154
5476a9a4
GM
21155
21156 if test $APPLE_UNIVERSAL_BUILD = 1; then
21157 # A universal build on Apple Mac OS X platforms.
21158 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
21159 # But we need a configuration result that is valid in both modes.
21160 gl_cv_func_working_mktime=no
21161 fi
21162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
21163$as_echo_n "checking for working mktime... " >&6; }
21164if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
21165 $as_echo_n "(cached) " >&6
21166else
5476a9a4
GM
21167 if test "$cross_compiling" = yes; then :
21168 gl_cv_func_working_mktime=no
21169else
21170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21171/* end confdefs.h. */
5476a9a4
GM
21172/* Test program from Paul Eggert and Tony Leneis. */
21173#include <limits.h>
21174#include <stdlib.h>
21175#include <time.h>
5fa4ac76 21176
5476a9a4
GM
21177#ifdef HAVE_UNISTD_H
21178# include <unistd.h>
f199cab1 21179#endif
5476a9a4
GM
21180
21181#ifndef HAVE_ALARM
21182# define alarm(X) /* empty */
21183#endif
21184
21185/* Work around redefinition to rpl_putenv by other config tests. */
21186#undef putenv
21187
21188static time_t time_t_max;
21189static time_t time_t_min;
21190
21191/* Values we'll use to set the TZ environment variable. */
21192static char *tz_strings[] = {
21193 (char *) 0, "TZ=GMT0", "TZ=JST-9",
21194 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
21195};
21196#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
21197
21198/* Return 0 if mktime fails to convert a date in the spring-forward gap.
21199 Based on a problem report from Andreas Jaeger. */
21200static int
21201spring_forward_gap ()
f199cab1 21202{
5476a9a4
GM
21203 /* glibc (up to about 1998-10-07) failed this test. */
21204 struct tm tm;
21205
21206 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21207 instead of "TZ=America/Vancouver" in order to detect the bug even
21208 on systems that don't support the Olson extension, or don't have the
21209 full zoneinfo tables installed. */
21210 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
21211
21212 tm.tm_year = 98;
21213 tm.tm_mon = 3;
21214 tm.tm_mday = 5;
21215 tm.tm_hour = 2;
21216 tm.tm_min = 0;
21217 tm.tm_sec = 0;
21218 tm.tm_isdst = -1;
21219 return mktime (&tm) != (time_t) -1;
f199cab1 21220}
5fa4ac76 21221
5476a9a4
GM
21222static int
21223mktime_test1 (time_t now)
21224{
21225 struct tm *lt;
21226 return ! (lt = localtime (&now)) || mktime (lt) == now;
21227}
5fa4ac76 21228
5476a9a4
GM
21229static int
21230mktime_test (time_t now)
21231{
21232 return (mktime_test1 (now)
21233 && mktime_test1 ((time_t) (time_t_max - now))
21234 && mktime_test1 ((time_t) (time_t_min + now)));
21235}
067d23c9 21236
5476a9a4
GM
21237static int
21238irix_6_4_bug ()
21239{
21240 /* Based on code from Ariel Faigon. */
21241 struct tm tm;
21242 tm.tm_year = 96;
21243 tm.tm_mon = 3;
21244 tm.tm_mday = 0;
21245 tm.tm_hour = 0;
21246 tm.tm_min = 0;
21247 tm.tm_sec = 0;
21248 tm.tm_isdst = -1;
21249 mktime (&tm);
21250 return tm.tm_mon == 2 && tm.tm_mday == 31;
21251}
21252
21253static int
21254bigtime_test (int j)
21255{
21256 struct tm tm;
21257 time_t now;
21258 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
21259 now = mktime (&tm);
21260 if (now != (time_t) -1)
21261 {
21262 struct tm *lt = localtime (&now);
21263 if (! (lt
21264 && lt->tm_year == tm.tm_year
21265 && lt->tm_mon == tm.tm_mon
21266 && lt->tm_mday == tm.tm_mday
21267 && lt->tm_hour == tm.tm_hour
21268 && lt->tm_min == tm.tm_min
21269 && lt->tm_sec == tm.tm_sec
21270 && lt->tm_yday == tm.tm_yday
21271 && lt->tm_wday == tm.tm_wday
21272 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
21273 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
21274 return 0;
21275 }
21276 return 1;
21277}
369e19fc 21278
5476a9a4
GM
21279static int
21280year_2050_test ()
21281{
21282 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
21283 ignoring leap seconds. */
21284 unsigned long int answer = 2527315200UL;
369e19fc 21285
5476a9a4
GM
21286 struct tm tm;
21287 time_t t;
21288 tm.tm_year = 2050 - 1900;
21289 tm.tm_mon = 2 - 1;
21290 tm.tm_mday = 1;
21291 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
21292 tm.tm_isdst = -1;
369e19fc 21293
5476a9a4
GM
21294 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21295 instead of "TZ=America/Vancouver" in order to detect the bug even
21296 on systems that don't support the Olson extension, or don't have the
21297 full zoneinfo tables installed. */
21298 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 21299
5476a9a4 21300 t = mktime (&tm);
067d23c9 21301
5476a9a4
GM
21302 /* Check that the result is either a failure, or close enough
21303 to the correct answer that we can assume the discrepancy is
21304 due to leap seconds. */
21305 return (t == (time_t) -1
21306 || (0 < t && answer - 120 <= t && t <= answer + 120));
21307}
067d23c9 21308
f199cab1
GM
21309int
21310main ()
21311{
5476a9a4
GM
21312 int result = 0;
21313 time_t t, delta;
21314 int i, j;
21315 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
21316 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 21317
5476a9a4
GM
21318 /* This test makes some buggy mktime implementations loop.
21319 Give up after 60 seconds; a mktime slower than that
21320 isn't worth using anyway. */
21321 alarm (60);
067d23c9 21322
5476a9a4
GM
21323 time_t_max = (! time_t_signed
21324 ? (time_t) -1
21325 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
21326 * 2 + 1));
21327 time_t_min = (! time_t_signed
21328 ? (time_t) 0
21329 : time_t_signed_magnitude
21330 ? ~ (time_t) 0
21331 : ~ time_t_max);
3e0be4ab 21332
5476a9a4
GM
21333 delta = time_t_max / 997; /* a suitable prime number */
21334 for (i = 0; i < N_STRINGS; i++)
21335 {
21336 if (tz_strings[i])
21337 putenv (tz_strings[i]);
3e0be4ab 21338
5476a9a4
GM
21339 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
21340 if (! mktime_test (t))
21341 result |= 1;
21342 if ((result & 2) == 0
21343 && ! (mktime_test ((time_t) 1)
21344 && mktime_test ((time_t) (60 * 60))
21345 && mktime_test ((time_t) (60 * 60 * 24))))
21346 result |= 2;
f199cab1 21347
5476a9a4
GM
21348 for (j = 1; (result & 4) == 0; j <<= 1)
21349 {
21350 if (! bigtime_test (j))
21351 result |= 4;
21352 if (INT_MAX / 2 < j)
21353 break;
21354 }
21355 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
21356 result |= 8;
21357 }
21358 if (! irix_6_4_bug ())
21359 result |= 16;
21360 if (! spring_forward_gap ())
21361 result |= 32;
21362 if (! year_2050_test ())
21363 result |= 64;
21364 return result;
067d23c9
KY
21365}
21366_ACEOF
5476a9a4
GM
21367if ac_fn_c_try_run "$LINENO"; then :
21368 gl_cv_func_working_mktime=yes
067d23c9 21369else
5476a9a4 21370 gl_cv_func_working_mktime=no
3e0be4ab 21371fi
5476a9a4
GM
21372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21373 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
21374fi
21375
f199cab1 21376
5476a9a4
GM
21377fi
21378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
21379$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 21380
5476a9a4
GM
21381 if test $gl_cv_func_working_mktime = no; then
21382 REPLACE_MKTIME=1
21383 else
21384 REPLACE_MKTIME=0
f199cab1 21385 fi
f199cab1 21386
a6342fc8 21387 if test $REPLACE_MKTIME = 1; then
f199cab1 21388
f199cab1 21389
0eb775a3 21390
067d23c9 21391
a451f14b 21392
a451f14b 21393
743c80a7
PE
21394
21395
5476a9a4
GM
21396 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
21397
a6342fc8
GM
21398 :
21399 fi
a451f14b
PE
21400
21401
21402
e275c824
PE
21403
21404
5476a9a4 21405 GNULIB_MKTIME=1
e275c824
PE
21406
21407
21408
21409
21410
21411
21412
21413
d87ffdb7 21414
5476a9a4
GM
21415
21416
21417 if test $ac_cv_func_pselect = yes; then
21418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
21419$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
21420if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
21421 $as_echo_n "(cached) " >&6
21422else
5476a9a4 21423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 21424/* end confdefs.h. */
5476a9a4 21425#include <sys/select.h>
e275c824 21426
f199cab1
GM
21427int
21428main ()
21429{
5476a9a4
GM
21430int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
21431 struct timespec const *restrict,
21432 sigset_t const *restrict) = pselect;
21433 return !p;
f199cab1
GM
21434 ;
21435 return 0;
21436}
e275c824 21437_ACEOF
f199cab1 21438if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21439 gl_cv_sig_pselect=yes
3e0be4ab 21440else
5476a9a4 21441 gl_cv_sig_pselect=no
f199cab1
GM
21442fi
21443rm -f core conftest.err conftest.$ac_objext \
21444 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 21445fi
5476a9a4
GM
21446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
21447$as_echo "$gl_cv_sig_pselect" >&6; }
21448 fi
3e0be4ab 21449
5476a9a4
GM
21450 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
21451 REPLACE_PSELECT=1
21452 fi
3e0be4ab 21453
a6342fc8 21454 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
21455
21456
3e0be4ab 21457
3e0be4ab 21458
3e0be4ab 21459
3e0be4ab 21460
3e0be4ab 21461
3e0be4ab 21462
5476a9a4 21463 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 21464
a6342fc8 21465 fi
3e0be4ab
GM
21466
21467
f199cab1 21468
f199cab1 21469
f199cab1 21470
5476a9a4 21471 GNULIB_PSELECT=1
f199cab1 21472
6d153f56 21473
f199cab1 21474
3e0be4ab 21475
3e0be4ab
GM
21476
21477
f199cab1 21478
0eb775a3
GM
21479
21480
5476a9a4 21481 LIB_PTHREAD_SIGMASK=
0eb775a3 21482
f199cab1 21483
5476a9a4
GM
21484 if test $ac_cv_func_pthread_sigmask = yes; then
21485 :
21486 else
21487 HAVE_PTHREAD_SIGMASK=0
21488 REPLACE_PTHREAD_SIGMASK=1
21489 fi
6d153f56 21490
52724a05 21491
6d153f56
GM
21492
21493
5476a9a4
GM
21494 if test $HAVE_PTHREAD_SIGMASK = 1; then
21495
21496
21497 if test -z "$LIB_PTHREAD_SIGMASK"; then
21498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
21499$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
21500if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
21501 $as_echo_n "(cached) " >&6
21502else
5476a9a4
GM
21503
21504 if test "$cross_compiling" = yes; then :
21505
21506 case "$host_os" in
21507 freebsd* | hpux* | solaris | solaris2.[2-9]*)
21508 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
21509 *)
21510 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
21511 esac
21512
21513else
21514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21515/* end confdefs.h. */
6d153f56 21516
5476a9a4
GM
21517#include <pthread.h>
21518#include <signal.h>
21519#include <stddef.h>
21520int main ()
f199cab1 21521{
5476a9a4
GM
21522 sigset_t set;
21523 sigemptyset (&set);
21524 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
21525}
21526_ACEOF
5476a9a4
GM
21527if ac_fn_c_try_run "$LINENO"; then :
21528 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 21529else
5476a9a4 21530 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 21531fi
5476a9a4
GM
21532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21533 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21534fi
5476a9a4
GM
21535
21536
f199cab1 21537fi
5476a9a4
GM
21538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
21539$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
21540 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
21541 *no)
21542 REPLACE_PTHREAD_SIGMASK=1
cc322c06 21543
5476a9a4 21544$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 21545
5476a9a4
GM
21546 ;;
21547 esac
21548 fi
3e0be4ab 21549
5476a9a4
GM
21550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
21551$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
21552if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
21553 $as_echo_n "(cached) " >&6
21554else
5476a9a4
GM
21555
21556 gl_save_LIBS="$LIBS"
21557 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
21558 if test "$cross_compiling" = yes; then :
21559 case "$host_os" in
21560 cygwin*)
21561 gl_cv_func_pthread_sigmask_return_works="guessing no";;
21562 *)
21563 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
21564 esac
21565
21566else
21567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21568/* end confdefs.h. */
f199cab1 21569
5476a9a4
GM
21570#include <pthread.h>
21571#include <signal.h>
21572#include <stddef.h>
21573int main ()
3e0be4ab 21574{
5476a9a4
GM
21575 sigset_t set;
21576 sigemptyset (&set);
21577 if (pthread_sigmask (1729, &set, NULL) == -1)
21578 return 1;
3e0be4ab
GM
21579 return 0;
21580}
6d153f56 21581_ACEOF
5476a9a4
GM
21582if ac_fn_c_try_run "$LINENO"; then :
21583 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 21584else
5476a9a4 21585 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 21586fi
5476a9a4
GM
21587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21588 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21589fi
5476a9a4
GM
21590
21591 LIBS="$gl_save_LIBS"
21592
52724a05 21593fi
5476a9a4
GM
21594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
21595$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
21596 case "$gl_cv_func_pthread_sigmask_return_works" in
21597 *no)
21598 REPLACE_PTHREAD_SIGMASK=1
6d153f56 21599
5476a9a4 21600$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 21601
5476a9a4
GM
21602 ;;
21603 esac
cc322c06 21604
5476a9a4
GM
21605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
21606$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
21607if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
21608 $as_echo_n "(cached) " >&6
21609else
5476a9a4
GM
21610
21611 case "$host_os" in
21612 irix*)
21613 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
21614 *)
21615 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
21616 esac
21617 gl_save_LIBS="$LIBS"
21618 LIBS="$LIBS $LIBMULTITHREAD"
21619 if test "$cross_compiling" = yes; then :
21620 :
f199cab1 21621else
5476a9a4
GM
21622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21623/* end confdefs.h. */
6d153f56 21624
5476a9a4
GM
21625#include <pthread.h>
21626#include <signal.h>
21627#include <stdio.h>
21628#include <stdlib.h>
21629#include <unistd.h>
21630static volatile int sigint_occurred;
21631static void
21632sigint_handler (int sig)
21633{
21634 sigint_occurred++;
21635}
21636int main ()
21637{
21638 sigset_t set;
21639 int pid = getpid ();
21640 char command[80];
21641 signal (SIGINT, sigint_handler);
21642 sigemptyset (&set);
21643 sigaddset (&set, SIGINT);
21644 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
21645 return 1;
21646 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
21647 if (!(system (command) == 0))
21648 return 2;
21649 sleep (2);
21650 if (!(sigint_occurred == 0))
21651 return 3;
21652 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
21653 return 4;
21654 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
21655 return 5;
21656 return 0;
21657}
21658_ACEOF
21659if ac_fn_c_try_run "$LINENO"; then :
21660 :
21661else
21662 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 21663fi
5476a9a4
GM
21664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21665 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21666fi
5476a9a4
GM
21667
21668 LIBS="$gl_save_LIBS"
21669
f199cab1 21670fi
5476a9a4
GM
21671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
21672$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
21673 case "$gl_cv_func_pthread_sigmask_unblock_works" in
21674 *no)
21675 REPLACE_PTHREAD_SIGMASK=1
6d153f56 21676
5476a9a4 21677$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 21678
5476a9a4
GM
21679 ;;
21680 esac
6d153f56 21681 fi
6d153f56 21682
a6342fc8 21683 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 21684
a451f14b 21685
743c80a7
PE
21686
21687
21688
21689
21690
f199cab1 21691
5476a9a4 21692 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
21693
21694
5476a9a4 21695 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 21696
5476a9a4 21697$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 21698
5476a9a4 21699 fi
743c80a7 21700
a6342fc8 21701 fi
938a4ef9 21702
938a4ef9 21703
938a4ef9 21704
938a4ef9 21705
938a4ef9 21706
5476a9a4 21707 GNULIB_PTHREAD_SIGMASK=1
a451f14b 21708
a451f14b 21709
743c80a7
PE
21710
21711
21712
21713
21714
21715
5476a9a4
GM
21716 if test $ac_cv_func_readlink = no; then
21717 HAVE_READLINK=0
21718 else
21719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
21720$as_echo_n "checking whether readlink signature is correct... " >&6; }
21721if test "${gl_cv_decl_readlink_works+set}" = set; then :
3e0be4ab
GM
21722 $as_echo_n "(cached) " >&6
21723else
f199cab1 21724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21725/* end confdefs.h. */
5476a9a4
GM
21726#include <unistd.h>
21727 /* Cause compilation failure if original declaration has wrong type. */
21728 ssize_t readlink (const char *, char *, size_t);
f199cab1
GM
21729int
21730main ()
21731{
5476a9a4 21732
f199cab1
GM
21733 ;
21734 return 0;
21735}
3e0be4ab 21736_ACEOF
5476a9a4
GM
21737if ac_fn_c_try_compile "$LINENO"; then :
21738 gl_cv_decl_readlink_works=yes
21739else
21740 gl_cv_decl_readlink_works=no
3e0be4ab 21741fi
5476a9a4
GM
21742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21743fi
21744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
21745$as_echo "$gl_cv_decl_readlink_works" >&6; }
21746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
21747$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
21748if test "${gl_cv_func_readlink_works+set}" = set; then :
21749 $as_echo_n "(cached) " >&6
21750else
21751 # We have readlink, so assume ln -s works.
21752 ln -s conftest.no-such conftest.link
21753 ln -s conftest.link conftest.lnk2
21754 if test "$cross_compiling" = yes; then :
21755 case "$host_os" in
21756 # Guess yes on glibc systems.
21757 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
21758 # If we don't know, assume the worst.
21759 *) gl_cv_func_readlink_works="guessing no" ;;
21760 esac
21761
21762else
f199cab1 21763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 21764/* end confdefs.h. */
5476a9a4
GM
21765#include <unistd.h>
21766
f199cab1
GM
21767int
21768main ()
21769{
5476a9a4
GM
21770char buf[20];
21771 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
21772 ;
21773 return 0;
21774}
067d23c9 21775_ACEOF
5476a9a4
GM
21776if ac_fn_c_try_run "$LINENO"; then :
21777 gl_cv_func_readlink_works=yes
21778else
21779 gl_cv_func_readlink_works=no
067d23c9 21780fi
5476a9a4
GM
21781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21782 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21783fi
067d23c9 21784
5476a9a4 21785 rm -f conftest.link conftest.lnk2
f199cab1 21786fi
5476a9a4
GM
21787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
21788$as_echo "$gl_cv_func_readlink_works" >&6; }
21789 case "$gl_cv_func_readlink_works" in
21790 *yes)
21791 if test "$gl_cv_decl_readlink_works" != yes; then
21792 REPLACE_READLINK=1
21793 fi
21794 ;;
21795 *)
067d23c9 21796
5476a9a4 21797$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 21798
5476a9a4
GM
21799 REPLACE_READLINK=1
21800 ;;
21801 esac
21802 fi
3e0be4ab 21803
a6342fc8 21804 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
21805
21806
21807
21808
3e0be4ab
GM
21809
21810
5476a9a4
GM
21811
21812
21813 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
21814
21815
21816 :
3e0be4ab 21817
a6342fc8 21818 fi
3e0be4ab 21819
067d23c9 21820
067d23c9 21821
067d23c9 21822
067d23c9 21823
5476a9a4 21824 GNULIB_READLINK=1
067d23c9 21825
067d23c9 21826
067d23c9 21827
067d23c9
KY
21828
21829
067d23c9 21830
369e19fc 21831
067d23c9 21832
5476a9a4
GM
21833
21834
21835
21836
21837
21838
21839
21840
21841 if test $gl_cv_have_include_next = yes; then
21842 gl_cv_next_signal_h='<'signal.h'>'
21843 else
21844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
21845$as_echo_n "checking absolute name of <signal.h>... " >&6; }
21846if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 21847 $as_echo_n "(cached) " >&6
0eb775a3 21848else
5476a9a4
GM
21849
21850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 21851/* end confdefs.h. */
5476a9a4 21852#include <signal.h>
f199cab1 21853
0eb775a3 21854_ACEOF
5476a9a4
GM
21855 case "$host_os" in
21856 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21857 *) gl_absname_cpp="$ac_cpp" ;;
21858 esac
0eb775a3 21859
5476a9a4
GM
21860 case "$host_os" in
21861 mingw*)
21862 gl_dirsep_regex='[/\\]'
21863 ;;
21864 *)
21865 gl_dirsep_regex='\/'
21866 ;;
21867 esac
21868 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 21869
5476a9a4
GM
21870 gl_header_literal_regex=`echo 'signal.h' \
21871 | sed -e "$gl_make_literal_regex_sed"`
21872 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21873 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21874 s|^/[^/]|//&|
21875 p
21876 q
21877 }'
21878 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21879 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 21880
f199cab1 21881
5476a9a4
GM
21882fi
21883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
21884$as_echo "$gl_cv_next_signal_h" >&6; }
21885 fi
21886 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 21887
5476a9a4
GM
21888 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21889 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21890 gl_next_as_first_directive='<'signal.h'>'
21891 else
21892 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21893 gl_next_as_first_directive=$gl_cv_next_signal_h
21894 fi
21895 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 21896
067d23c9
KY
21897
21898
067d23c9 21899
067d23c9 21900
5476a9a4
GM
21901# AIX declares sig_atomic_t to already include volatile, and C89 compilers
21902# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
21903 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
21904#include <signal.h>
21905
21906"
21907if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
21908
21909else
21910 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 21911fi
067d23c9 21912
067d23c9 21913
067d23c9 21914
067d23c9 21915
938a4ef9 21916
938a4ef9 21917
5476a9a4
GM
21918
21919 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
21920#include <signal.h>
21921
21922"
21923if test "x$ac_cv_type_sighandler_t" = x""yes; then :
21924
21925else
21926 HAVE_SIGHANDLER_T=0
21927fi
21928
21929
21930
21931
a6342fc8 21932 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
21933/* <sys/types.h> is not needed according to POSIX, but the
21934 <sys/socket.h> in i386-unknown-freebsd4.10 and
21935 powerpc-apple-darwin5.5 required it. */
21936#include <sys/types.h>
21937#if HAVE_SYS_SOCKET_H
21938# include <sys/socket.h>
21939#elif HAVE_WS2TCPIP_H
21940# include <ws2tcpip.h>
21941#endif
21942
21943"
21944if test "x$ac_cv_type_socklen_t" = x""yes; then :
21945
067d23c9 21946else
5476a9a4
GM
21947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
21948$as_echo_n "checking for socklen_t equivalent... " >&6; }
21949 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
21950 $as_echo_n "(cached) " >&6
21951else
21952 # Systems have either "struct sockaddr *" or
21953 # "void *" as the second argument to getpeername
21954 gl_cv_socklen_t_equiv=
21955 for arg2 in "struct sockaddr" void; do
21956 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
21957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21958/* end confdefs.h. */
5476a9a4
GM
21959#include <sys/types.h>
21960 #include <sys/socket.h>
21961
21962 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
21963int
21964main ()
21965{
5476a9a4
GM
21966$t len;
21967 getpeername (0, 0, &len);
f199cab1
GM
21968 ;
21969 return 0;
21970}
3e0be4ab 21971_ACEOF
5476a9a4
GM
21972if ac_fn_c_try_compile "$LINENO"; then :
21973 gl_cv_socklen_t_equiv="$t"
067d23c9 21974fi
5476a9a4
GM
21975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21976 test "$gl_cv_socklen_t_equiv" != "" && break
21977 done
21978 test "$gl_cv_socklen_t_equiv" != "" && break
21979 done
067d23c9 21980
5476a9a4 21981fi
067d23c9 21982
5476a9a4
GM
21983 if test "$gl_cv_socklen_t_equiv" = ""; then
21984 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
21985 fi
21986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
21987$as_echo "$gl_cv_socklen_t_equiv" >&6; }
21988
21989cat >>confdefs.h <<_ACEOF
21990#define socklen_t $gl_cv_socklen_t_equiv
21991_ACEOF
067d23c9 21992
f199cab1 21993fi
3e0be4ab 21994
3e0be4ab 21995
5476a9a4
GM
21996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21997$as_echo_n "checking for ssize_t... " >&6; }
21998if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
21999 $as_echo_n "(cached) " >&6
22000else
5476a9a4 22001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22002/* end confdefs.h. */
5476a9a4 22003#include <sys/types.h>
f199cab1
GM
22004int
22005main ()
22006{
5476a9a4
GM
22007int x = sizeof (ssize_t *) + sizeof (ssize_t);
22008 return !x;
f199cab1
GM
22009 ;
22010 return 0;
22011}
22012_ACEOF
5476a9a4
GM
22013if ac_fn_c_try_compile "$LINENO"; then :
22014 gt_cv_ssize_t=yes
067d23c9 22015else
5476a9a4 22016 gt_cv_ssize_t=no
f199cab1 22017fi
5476a9a4 22018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 22019fi
5476a9a4
GM
22020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
22021$as_echo "$gt_cv_ssize_t" >&6; }
22022 if test $gt_cv_ssize_t = no; then
22023
22024$as_echo "#define ssize_t int" >>confdefs.h
22025
22026 fi
22027
22028
22029
22030
22031
5476a9a4
GM
22032 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
22033 #include <sys/stat.h>
22034"
22035if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
22036
22037cat >>confdefs.h <<_ACEOF
22038#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
22039_ACEOF
22040
22041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
22042$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
22043if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
22044 $as_echo_n "(cached) " >&6
22045else
5476a9a4 22046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22047/* end confdefs.h. */
3e0be4ab 22048
5476a9a4
GM
22049 #include <sys/types.h>
22050 #include <sys/stat.h>
22051 #if HAVE_SYS_TIME_H
22052 # include <sys/time.h>
22053 #endif
22054 #include <time.h>
22055 struct timespec ts;
22056 struct stat st;
22057
f199cab1
GM
22058int
22059main ()
22060{
5476a9a4
GM
22061
22062 st.st_atim = ts;
22063
f199cab1
GM
22064 ;
22065 return 0;
22066}
3e0be4ab 22067_ACEOF
5476a9a4
GM
22068if ac_fn_c_try_compile "$LINENO"; then :
22069 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 22070else
5476a9a4 22071 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 22072fi
5476a9a4 22073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 22074fi
5476a9a4
GM
22075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
22076$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
22077 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 22078
5476a9a4 22079$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 22080
5476a9a4
GM
22081 fi
22082else
22083 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
22084 #include <sys/stat.h>
22085"
22086if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 22087
5476a9a4
GM
22088cat >>confdefs.h <<_ACEOF
22089#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
22090_ACEOF
3e0be4ab 22091
0eb775a3 22092
3e0be4ab 22093else
5476a9a4
GM
22094 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
22095 #include <sys/stat.h>
22096"
22097if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
22098
22099cat >>confdefs.h <<_ACEOF
22100#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 22101_ACEOF
5476a9a4
GM
22102
22103
067d23c9 22104else
5476a9a4
GM
22105 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
22106 #include <sys/stat.h>
22107"
22108if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
22109
22110cat >>confdefs.h <<_ACEOF
22111#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
22112_ACEOF
22113
22114
3e0be4ab 22115fi
5476a9a4 22116
067d23c9 22117fi
5476a9a4 22118
067d23c9 22119fi
067d23c9
KY
22120
22121fi
22122
067d23c9 22123
067d23c9 22124
067d23c9 22125
067d23c9 22126
5476a9a4
GM
22127 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
22128 #include <sys/stat.h>
22129"
22130if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
22131
22132cat >>confdefs.h <<_ACEOF
22133#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
22134_ACEOF
067d23c9
KY
22135
22136
f199cab1 22137else
5476a9a4
GM
22138 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
22139 #include <sys/stat.h>
22140"
22141if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 22142
5476a9a4
GM
22143cat >>confdefs.h <<_ACEOF
22144#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
22145_ACEOF
067d23c9 22146
3e0be4ab 22147
067d23c9 22148else
5476a9a4
GM
22149 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
22150 #include <sys/stat.h>
22151"
22152if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 22153
5476a9a4
GM
22154cat >>confdefs.h <<_ACEOF
22155#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 22156_ACEOF
5476a9a4
GM
22157
22158
f199cab1 22159fi
5476a9a4 22160
f199cab1 22161fi
5476a9a4 22162
067d23c9 22163fi
0eb775a3 22164
0eb775a3 22165
0eb775a3 22166
5476a9a4
GM
22167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
22168$as_echo_n "checking for working stdalign.h... " >&6; }
22169if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 22170 $as_echo_n "(cached) " >&6
067d23c9 22171else
5476a9a4 22172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22173/* end confdefs.h. */
5476a9a4
GM
22174#include <stdalign.h>
22175 #include <stddef.h>
22176
22177 /* Test that alignof yields a result consistent with offsetof.
22178 This catches GCC bug 52023
22179 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
22180 #ifdef __cplusplus
22181 template <class t> struct alignof_helper { char a; t b; };
22182 # define ao(type) offsetof (alignof_helper<type>, b)
22183 #else
22184 # define ao(type) offsetof (struct { char a; type b; }, b)
22185 #endif
22186 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
22187 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
22188 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
22189
22190 /* Test _Alignas only on platforms where gnulib can help. */
22191 #if \
22192 (__GNUC__ || __IBMC__ || __IBMCPP__ \
22193 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
22194 int alignas (8) alignas_int = 1;
22195 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
22196 #endif
067d23c9 22197
f199cab1
GM
22198int
22199main ()
22200{
5476a9a4 22201
f199cab1
GM
22202 ;
22203 return 0;
22204}
22205_ACEOF
5476a9a4
GM
22206if ac_fn_c_try_compile "$LINENO"; then :
22207 gl_cv_header_working_stdalign_h=yes
f199cab1 22208else
5476a9a4 22209 gl_cv_header_working_stdalign_h=no
f199cab1 22210fi
5476a9a4 22211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 22212fi
5476a9a4
GM
22213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
22214$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 22215
5476a9a4
GM
22216 if test $gl_cv_header_working_stdalign_h = yes; then
22217 STDALIGN_H=''
22218 else
22219 STDALIGN_H='stdalign.h'
f199cab1 22220 fi
0eb775a3 22221
5476a9a4
GM
22222
22223 if test -n "$STDALIGN_H"; then
22224 GL_GENERATE_STDALIGN_H_TRUE=
22225 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 22226else
5476a9a4
GM
22227 GL_GENERATE_STDALIGN_H_TRUE='#'
22228 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 22229fi
0eb775a3
GM
22230
22231
22232
5476a9a4
GM
22233 STDARG_H=''
22234 NEXT_STDARG_H='<stdarg.h>'
22235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
22236$as_echo_n "checking for va_copy... " >&6; }
22237 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 22238 $as_echo_n "(cached) " >&6
5476a9a4
GM
22239else
22240
22241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22242/* end confdefs.h. */
22243#include <stdarg.h>
f199cab1
GM
22244int
22245main ()
22246{
5476a9a4
GM
22247
22248#ifndef va_copy
22249void (*func) (va_list, va_list) = va_copy;
22250#endif
22251
f199cab1
GM
22252 ;
22253 return 0;
22254}
22255_ACEOF
5476a9a4
GM
22256if ac_fn_c_try_compile "$LINENO"; then :
22257 gl_cv_func_va_copy=yes
f199cab1 22258else
5476a9a4 22259 gl_cv_func_va_copy=no
f199cab1 22260fi
5476a9a4 22261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22262fi
5476a9a4
GM
22263
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
22265$as_echo "$gl_cv_func_va_copy" >&6; }
22266 if test $gl_cv_func_va_copy = no; then
22267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22268/* end confdefs.h. */
22269#if defined _AIX && !defined __GNUC__
22270 AIX vaccine
22271 #endif
22272
22273_ACEOF
22274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22275 $EGREP "vaccine" >/dev/null 2>&1; then :
22276 gl_aixcc=yes
f199cab1 22277else
5476a9a4 22278 gl_aixcc=no
f199cab1 22279fi
5476a9a4 22280rm -f conftest*
0eb775a3 22281
5476a9a4
GM
22282 if test $gl_aixcc = yes; then
22283 STDARG_H=stdarg.h
0eb775a3
GM
22284
22285
5476a9a4
GM
22286
22287
22288
22289
22290
22291
22292 if test $gl_cv_have_include_next = yes; then
22293 gl_cv_next_stdarg_h='<'stdarg.h'>'
22294 else
22295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
22296$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
22297if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
22298 $as_echo_n "(cached) " >&6
22299else
5476a9a4
GM
22300
22301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22302/* end confdefs.h. */
5476a9a4 22303#include <stdarg.h>
0eb775a3 22304
f199cab1 22305_ACEOF
5476a9a4
GM
22306 case "$host_os" in
22307 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22308 *) gl_absname_cpp="$ac_cpp" ;;
22309 esac
22310
22311 case "$host_os" in
22312 mingw*)
22313 gl_dirsep_regex='[/\\]'
22314 ;;
22315 *)
22316 gl_dirsep_regex='\/'
22317 ;;
22318 esac
22319 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22320
22321 gl_header_literal_regex=`echo 'stdarg.h' \
22322 | sed -e "$gl_make_literal_regex_sed"`
22323 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22324 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22325 s|^/[^/]|//&|
22326 p
22327 q
22328 }'
22329 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22330 sed -n "$gl_absolute_header_sed"`'"'
22331
22332
f199cab1 22333fi
5476a9a4
GM
22334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
22335$as_echo "$gl_cv_next_stdarg_h" >&6; }
22336 fi
22337 NEXT_STDARG_H=$gl_cv_next_stdarg_h
22338
22339 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22340 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22341 gl_next_as_first_directive='<'stdarg.h'>'
22342 else
22343 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22344 gl_next_as_first_directive=$gl_cv_next_stdarg_h
22345 fi
22346 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
22347
22348
22349
5476a9a4
GM
22350
22351 if test "$gl_cv_next_stdarg_h" = '""'; then
22352 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
22353 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
22354 fi
f199cab1 22355 else
5476a9a4
GM
22356
22357 saved_as_echo_n="$as_echo_n"
22358 as_echo_n=':'
22359 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
22360 $as_echo_n "(cached) " >&6
22361else
0eb775a3 22362
5476a9a4
GM
22363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22364/* end confdefs.h. */
22365#include <stdarg.h>
f199cab1
GM
22366int
22367main ()
22368{
5476a9a4
GM
22369
22370#ifndef __va_copy
22371error, bail out
22372#endif
22373
f199cab1
GM
22374 ;
22375 return 0;
22376}
22377_ACEOF
5476a9a4
GM
22378if ac_fn_c_try_compile "$LINENO"; then :
22379 gl_cv_func___va_copy=yes
f199cab1 22380else
5476a9a4 22381 gl_cv_func___va_copy=no
f199cab1 22382fi
5476a9a4 22383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22384fi
0eb775a3 22385
5476a9a4
GM
22386 as_echo_n="$saved_as_echo_n"
22387
22388 if test $gl_cv_func___va_copy = yes; then
22389
22390$as_echo "#define va_copy __va_copy" >>confdefs.h
22391
22392 else
0eb775a3 22393
5476a9a4
GM
22394
22395$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 22396
f199cab1
GM
22397 fi
22398 fi
5476a9a4
GM
22399 fi
22400
22401 if test -n "$STDARG_H"; then
22402 GL_GENERATE_STDARG_H_TRUE=
22403 GL_GENERATE_STDARG_H_FALSE='#'
22404else
22405 GL_GENERATE_STDARG_H_TRUE='#'
22406 GL_GENERATE_STDARG_H_FALSE=
22407fi
22408
22409
22410
22411
22412
22413
22414 # Define two additional variables used in the Makefile substitution.
22415
22416 if test "$ac_cv_header_stdbool_h" = yes; then
22417 STDBOOL_H=''
22418 else
22419 STDBOOL_H='stdbool.h'
22420 fi
22421
22422 if test -n "$STDBOOL_H"; then
22423 GL_GENERATE_STDBOOL_H_TRUE=
22424 GL_GENERATE_STDBOOL_H_FALSE='#'
22425else
22426 GL_GENERATE_STDBOOL_H_TRUE='#'
22427 GL_GENERATE_STDBOOL_H_FALSE=
22428fi
22429
22430
22431 if test "$ac_cv_type__Bool" = yes; then
22432 HAVE__BOOL=1
22433 else
22434 HAVE__BOOL=0
22435 fi
22436
22437
22438
22439
22440
22441 STDDEF_H=
22442 if test $gt_cv_c_wchar_t = no; then
22443 HAVE_WCHAR_T=0
22444 STDDEF_H=stddef.h
22445 fi
22446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
22447$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
22448if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
22449 $as_echo_n "(cached) " >&6
22450else
5476a9a4 22451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22452/* end confdefs.h. */
5476a9a4
GM
22453#include <stddef.h>
22454 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 22455
f199cab1
GM
22456int
22457main ()
22458{
5476a9a4 22459
f199cab1
GM
22460 ;
22461 return 0;
22462}
22463_ACEOF
5476a9a4
GM
22464if ac_fn_c_try_compile "$LINENO"; then :
22465 gl_cv_decl_null_works=yes
f199cab1 22466else
5476a9a4 22467 gl_cv_decl_null_works=no
f199cab1 22468fi
5476a9a4 22469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22470fi
5476a9a4
GM
22471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
22472$as_echo "$gl_cv_decl_null_works" >&6; }
22473 if test $gl_cv_decl_null_works = no; then
22474 REPLACE_NULL=1
22475 STDDEF_H=stddef.h
22476 fi
22477
22478 if test -n "$STDDEF_H"; then
22479 GL_GENERATE_STDDEF_H_TRUE=
22480 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 22481else
5476a9a4
GM
22482 GL_GENERATE_STDDEF_H_TRUE='#'
22483 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 22484fi
3e0be4ab 22485
5476a9a4 22486 if test -n "$STDDEF_H"; then
3e0be4ab
GM
22487
22488
5476a9a4
GM
22489
22490
22491
22492
22493
22494
22495 if test $gl_cv_have_include_next = yes; then
22496 gl_cv_next_stddef_h='<'stddef.h'>'
22497 else
22498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
22499$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
22500if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
22501 $as_echo_n "(cached) " >&6
22502else
5476a9a4
GM
22503
22504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 22505/* end confdefs.h. */
5476a9a4 22506#include <stddef.h>
f199cab1 22507
067d23c9 22508_ACEOF
5476a9a4
GM
22509 case "$host_os" in
22510 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22511 *) gl_absname_cpp="$ac_cpp" ;;
22512 esac
22513
22514 case "$host_os" in
22515 mingw*)
22516 gl_dirsep_regex='[/\\]'
22517 ;;
22518 *)
22519 gl_dirsep_regex='\/'
22520 ;;
22521 esac
22522 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22523
22524 gl_header_literal_regex=`echo 'stddef.h' \
22525 | sed -e "$gl_make_literal_regex_sed"`
22526 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22527 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22528 s|^/[^/]|//&|
22529 p
22530 q
22531 }'
22532 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22533 sed -n "$gl_absolute_header_sed"`'"'
22534
22535
f199cab1 22536fi
5476a9a4
GM
22537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
22538$as_echo "$gl_cv_next_stddef_h" >&6; }
22539 fi
22540 NEXT_STDDEF_H=$gl_cv_next_stddef_h
22541
22542 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22543 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22544 gl_next_as_first_directive='<'stddef.h'>'
22545 else
22546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22547 gl_next_as_first_directive=$gl_cv_next_stddef_h
22548 fi
22549 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
22550
f199cab1 22551
f199cab1 22552
f199cab1 22553
067d23c9 22554 fi
067d23c9 22555
f199cab1 22556
067d23c9 22557
067d23c9 22558
067d23c9 22559
067d23c9
KY
22560
22561
067d23c9 22562
067d23c9
KY
22563
22564
067d23c9 22565
3e0be4ab 22566
5476a9a4
GM
22567
22568 if test $gl_cv_have_include_next = yes; then
22569 gl_cv_next_stdio_h='<'stdio.h'>'
22570 else
22571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
22572$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
22573if test "${gl_cv_next_stdio_h+set}" = set; then :
22574 $as_echo_n "(cached) " >&6
f199cab1 22575else
5476a9a4
GM
22576
22577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22578/* end confdefs.h. */
22579#include <stdio.h>
22580
f199cab1 22581_ACEOF
5476a9a4
GM
22582 case "$host_os" in
22583 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22584 *) gl_absname_cpp="$ac_cpp" ;;
22585 esac
067d23c9 22586
5476a9a4
GM
22587 case "$host_os" in
22588 mingw*)
22589 gl_dirsep_regex='[/\\]'
22590 ;;
22591 *)
22592 gl_dirsep_regex='\/'
22593 ;;
22594 esac
22595 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22596
22597 gl_header_literal_regex=`echo 'stdio.h' \
22598 | sed -e "$gl_make_literal_regex_sed"`
22599 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22600 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22601 s|^/[^/]|//&|
22602 p
22603 q
22604 }'
22605 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22606 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 22607
067d23c9 22608
f199cab1 22609fi
5476a9a4
GM
22610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
22611$as_echo "$gl_cv_next_stdio_h" >&6; }
22612 fi
22613 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 22614
5476a9a4
GM
22615 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22616 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22617 gl_next_as_first_directive='<'stdio.h'>'
22618 else
22619 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22620 gl_next_as_first_directive=$gl_cv_next_stdio_h
22621 fi
22622 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
22623
22624
22625
22626
22627
22628 GNULIB_FSCANF=1
22629
22630
22631cat >>confdefs.h <<_ACEOF
22632#define GNULIB_FSCANF 1
22633_ACEOF
067d23c9 22634
067d23c9 22635
5476a9a4 22636 GNULIB_SCANF=1
f199cab1 22637
f199cab1 22638
5476a9a4
GM
22639cat >>confdefs.h <<_ACEOF
22640#define GNULIB_SCANF 1
f199cab1
GM
22641_ACEOF
22642
067d23c9 22643
5476a9a4
GM
22644 GNULIB_FGETC=1
22645 GNULIB_GETC=1
22646 GNULIB_GETCHAR=1
22647 GNULIB_FGETS=1
22648 GNULIB_FREAD=1
067d23c9 22649
067d23c9 22650
5476a9a4
GM
22651 GNULIB_FPRINTF=1
22652 GNULIB_PRINTF=1
22653 GNULIB_VFPRINTF=1
22654 GNULIB_VPRINTF=1
22655 GNULIB_FPUTC=1
22656 GNULIB_PUTC=1
22657 GNULIB_PUTCHAR=1
22658 GNULIB_FPUTS=1
22659 GNULIB_PUTS=1
22660 GNULIB_FWRITE=1
067d23c9 22661
067d23c9 22662
067d23c9 22663
067d23c9 22664
067d23c9 22665
067d23c9 22666
067d23c9 22667
067d23c9 22668
3e0be4ab
GM
22669
22670
22671
22672
22673
22674
3e0be4ab 22675
5476a9a4
GM
22676 if test $gl_cv_have_include_next = yes; then
22677 gl_cv_next_stdlib_h='<'stdlib.h'>'
22678 else
22679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
22680$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
22681if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
22682 $as_echo_n "(cached) " >&6
22683else
5476a9a4
GM
22684
22685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22686/* end confdefs.h. */
5476a9a4
GM
22687#include <stdlib.h>
22688
f199cab1 22689_ACEOF
5476a9a4
GM
22690 case "$host_os" in
22691 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22692 *) gl_absname_cpp="$ac_cpp" ;;
22693 esac
067d23c9 22694
5476a9a4
GM
22695 case "$host_os" in
22696 mingw*)
22697 gl_dirsep_regex='[/\\]'
22698 ;;
22699 *)
22700 gl_dirsep_regex='\/'
22701 ;;
22702 esac
22703 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22704
22705 gl_header_literal_regex=`echo 'stdlib.h' \
22706 | sed -e "$gl_make_literal_regex_sed"`
22707 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22708 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22709 s|^/[^/]|//&|
22710 p
22711 q
22712 }'
22713 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22714 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 22715
067d23c9 22716
f199cab1 22717fi
5476a9a4
GM
22718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
22719$as_echo "$gl_cv_next_stdlib_h" >&6; }
22720 fi
22721 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 22722
5476a9a4
GM
22723 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22724 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22725 gl_next_as_first_directive='<'stdlib.h'>'
22726 else
22727 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22728 gl_next_as_first_directive=$gl_cv_next_stdlib_h
22729 fi
22730 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 22731
067d23c9 22732
067d23c9 22733
067d23c9 22734
067d23c9 22735
067d23c9 22736
067d23c9 22737
067d23c9 22738
067d23c9 22739
5476a9a4 22740 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 22741
067d23c9 22742
067d23c9 22743
b0415a03
GM
22744
22745
ac1ca7e9 22746
0eb775a3 22747
5476a9a4 22748$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 22749
067d23c9 22750
a0a61e58
GM
22751
22752
22753
3e0be4ab 22754
5476a9a4
GM
22755
22756
22757 if test "$ac_cv_have_decl_strtoimax" != yes; then
22758 HAVE_DECL_STRTOIMAX=0
22759 fi
22760
22761 if test $ac_cv_func_strtoimax = yes; then
22762 HAVE_STRTOIMAX=1
22763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
22764$as_echo_n "checking whether strtoimax works... " >&6; }
22765if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
22766 $as_echo_n "(cached) " >&6
22767else
22768 if test "$cross_compiling" = yes; then :
5476a9a4
GM
22769 case "$host_os" in
22770 # Guess no on AIX 5.
22771 aix5*) gl_cv_func_strtoimax="guessing no" ;;
22772 # Guess yes otherwise.
22773 *) gl_cv_func_strtoimax="guessing yes" ;;
22774 esac
22775
f199cab1
GM
22776else
22777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22778/* end confdefs.h. */
3e0be4ab 22779
5476a9a4
GM
22780#include <errno.h>
22781#include <string.h>
22782#include <inttypes.h>
22783int main ()
22784{
22785 if (sizeof (intmax_t) > sizeof (int))
22786 {
22787 const char *s = "4294967295";
22788 char *p;
22789 intmax_t res;
22790 errno = 0;
22791 res = strtoimax (s, &p, 10);
22792 if (p != s + strlen (s))
22793 return 1;
22794 if (errno != 0)
22795 return 2;
22796 if (res != (intmax_t) 65535 * (intmax_t) 65537)
22797 return 3;
22798 }
22799 else
22800 {
22801 const char *s = "2147483647";
22802 char *p;
22803 intmax_t res;
22804 errno = 0;
22805 res = strtoimax (s, &p, 10);
22806 if (p != s + strlen (s))
22807 return 1;
22808 if (errno != 0)
22809 return 2;
22810 if (res != 2147483647)
22811 return 3;
22812 }
f199cab1
GM
22813 return 0;
22814}
5476a9a4 22815
f199cab1
GM
22816_ACEOF
22817if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 22818 gl_cv_func_strtoimax=yes
f199cab1 22819else
5476a9a4 22820 gl_cv_func_strtoimax=no
f199cab1
GM
22821fi
22822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22823 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
22824fi
22825
3e0be4ab 22826
f199cab1 22827fi
5476a9a4
GM
22828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
22829$as_echo "$gl_cv_func_strtoimax" >&6; }
22830 case "$gl_cv_func_strtoimax" in
22831 *no) REPLACE_STRTOIMAX=1 ;;
22832 esac
22833 else
22834 HAVE_STRTOIMAX=0
22835 fi
067d23c9 22836
a6342fc8 22837 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 22838
067d23c9 22839
067d23c9 22840
067d23c9 22841
067d23c9 22842
3e0be4ab 22843
2b1928b8
GM
22844
22845
5476a9a4
GM
22846 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
22847
22848
22849 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
22850if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
22851 ac_have_decl=1
f199cab1 22852else
5476a9a4 22853 ac_have_decl=0
f199cab1 22854fi
2b1928b8 22855
5476a9a4
GM
22856cat >>confdefs.h <<_ACEOF
22857#define HAVE_DECL_STRTOLL $ac_have_decl
22858_ACEOF
22859
22860
067d23c9 22861
a6342fc8 22862 fi
067d23c9 22863
3e0be4ab
GM
22864
22865
22866
3e0be4ab 22867
5476a9a4 22868 GNULIB_STRTOIMAX=1
3e0be4ab
GM
22869
22870
22871
22872
3e0be4ab
GM
22873
22874
22875
f199cab1 22876
f199cab1 22877
5476a9a4
GM
22878 if test "$ac_cv_have_decl_strtoumax" != yes; then
22879 HAVE_DECL_STRTOUMAX=0
22880 fi
067d23c9 22881
a6342fc8 22882 if test $ac_cv_func_strtoumax = no; then
0eb775a3 22883
5476a9a4
GM
22884
22885
22886
22887
22888
22889
22890
22891 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
22892
22893
22894 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
22895if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
22896 ac_have_decl=1
067d23c9 22897else
5476a9a4 22898 ac_have_decl=0
067d23c9 22899fi
5476a9a4
GM
22900
22901cat >>confdefs.h <<_ACEOF
22902#define HAVE_DECL_STRTOULL $ac_have_decl
22903_ACEOF
22904
22905
22906
a6342fc8 22907 fi
067d23c9 22908
067d23c9 22909
067d23c9 22910
067d23c9 22911
067d23c9 22912
5476a9a4
GM
22913 GNULIB_STRTOUMAX=1
22914
22915
22916
22917
22918
22919
22920
22921 if test $ac_cv_func_symlink = no; then
22922 HAVE_SYMLINK=0
22923 else
22924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
22925$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
22926if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 22927 $as_echo_n "(cached) " >&6
5476a9a4
GM
22928else
22929 if test "$cross_compiling" = yes; then :
22930 case "$host_os" in
22931 # Guess yes on glibc systems.
22932 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
22933 # If we don't know, assume the worst.
22934 *) gl_cv_func_symlink_works="guessing no" ;;
22935 esac
22936
f199cab1
GM
22937else
22938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22939/* end confdefs.h. */
5476a9a4
GM
22940#include <unistd.h>
22941
f199cab1
GM
22942int
22943main ()
22944{
5476a9a4
GM
22945int result = 0;
22946 if (!symlink ("a", "conftest.link/"))
22947 result |= 1;
22948 if (symlink ("conftest.f", "conftest.lnk2"))
22949 result |= 2;
22950 else if (!symlink ("a", "conftest.lnk2/"))
22951 result |= 4;
22952 return result;
067d23c9 22953
f199cab1
GM
22954 ;
22955 return 0;
22956}
22957_ACEOF
5476a9a4
GM
22958if ac_fn_c_try_run "$LINENO"; then :
22959 gl_cv_func_symlink_works=yes
f199cab1 22960else
5476a9a4 22961 gl_cv_func_symlink_works=no
f199cab1 22962fi
5476a9a4
GM
22963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22964 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22965fi
067d23c9 22966
5476a9a4 22967 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 22968fi
5476a9a4
GM
22969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
22970$as_echo "$gl_cv_func_symlink_works" >&6; }
22971 case "$gl_cv_func_symlink_works" in
22972 *yes) ;;
22973 *)
22974 REPLACE_SYMLINK=1
22975 ;;
22976 esac
22977 fi
067d23c9 22978
a6342fc8 22979 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 22980
7e723570 22981
7e723570
GM
22982
22983
dd0d840e 22984
dd0d840e
GM
22985
22986
22987
5476a9a4 22988 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 22989
a6342fc8 22990 fi
dd0d840e
GM
22991
22992
d3127c14
GM
22993
22994
d3127c14 22995
5476a9a4 22996 GNULIB_SYMLINK=1
d3127c14 22997
d3127c14 22998
d3127c14
GM
22999
23000
067d23c9 23001
067d23c9 23002
d3127c14 23003
d3127c14 23004
5476a9a4
GM
23005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
23006$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
23007if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
23008 $as_echo_n "(cached) " >&6
23009else
d3127c14 23010
5476a9a4
GM
23011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012/* end confdefs.h. */
23013#include <sys/select.h>
23014int
23015main ()
23016{
23017struct timeval b;
23018 ;
23019 return 0;
23020}
23021_ACEOF
23022if ac_fn_c_try_compile "$LINENO"; then :
23023 gl_cv_header_sys_select_h_selfcontained=yes
23024else
23025 gl_cv_header_sys_select_h_selfcontained=no
23026fi
23027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23028 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
23029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23030/* end confdefs.h. */
23031#include <sys/select.h>
23032int
23033main ()
23034{
23035int memset; int bzero;
23036 ;
23037 return 0;
23038}
3e0be4ab 23039
5476a9a4
GM
23040_ACEOF
23041if ac_fn_c_try_compile "$LINENO"; then :
23042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23043/* end confdefs.h. */
23044#include <sys/select.h>
23045int
23046main ()
23047{
dd0d840e 23048
5476a9a4
GM
23049 #undef memset
23050 #define memset nonexistent_memset
23051 extern
23052 #ifdef __cplusplus
23053 "C"
23054 #endif
23055 void *memset (void *, int, unsigned long);
23056 #undef bzero
23057 #define bzero nonexistent_bzero
23058 extern
23059 #ifdef __cplusplus
23060 "C"
23061 #endif
23062 void bzero (void *, unsigned long);
23063 fd_set fds;
23064 FD_ZERO (&fds);
3e0be4ab 23065
5476a9a4
GM
23066 ;
23067 return 0;
23068}
067d23c9 23069
5476a9a4
GM
23070_ACEOF
23071if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 23072
5476a9a4
GM
23073else
23074 gl_cv_header_sys_select_h_selfcontained=no
23075fi
23076rm -f core conftest.err conftest.$ac_objext \
23077 conftest$ac_exeext conftest.$ac_ext
dd0d840e 23078
5476a9a4
GM
23079fi
23080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23081 fi
dd0d840e 23082
5476a9a4
GM
23083fi
23084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
23085$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 23086
dd0d840e
GM
23087
23088
dd0d840e
GM
23089
23090
dd0d840e
GM
23091
23092
23093
dd0d840e 23094
5476a9a4
GM
23095 if test $gl_cv_have_include_next = yes; then
23096 gl_cv_next_sys_select_h='<'sys/select.h'>'
23097 else
23098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
23099$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
23100if test "${gl_cv_next_sys_select_h+set}" = set; then :
23101 $as_echo_n "(cached) " >&6
23102else
dd0d840e 23103
5476a9a4 23104 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 23105
dd0d840e 23106
5476a9a4
GM
23107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23108/* end confdefs.h. */
23109#include <sys/select.h>
dd0d840e 23110
5476a9a4
GM
23111_ACEOF
23112 case "$host_os" in
23113 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23114 *) gl_absname_cpp="$ac_cpp" ;;
23115 esac
dd0d840e 23116
5476a9a4
GM
23117 case "$host_os" in
23118 mingw*)
23119 gl_dirsep_regex='[/\\]'
23120 ;;
23121 *)
23122 gl_dirsep_regex='\/'
23123 ;;
23124 esac
23125 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 23126
5476a9a4
GM
23127 gl_header_literal_regex=`echo 'sys/select.h' \
23128 | sed -e "$gl_make_literal_regex_sed"`
23129 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23130 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23131 s|^/[^/]|//&|
23132 p
23133 q
23134 }'
23135 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23136 sed -n "$gl_absolute_header_sed"`'"'
23137 else
23138 gl_cv_next_sys_select_h='<'sys/select.h'>'
23139 fi
067d23c9 23140
067d23c9 23141
5476a9a4
GM
23142fi
23143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
23144$as_echo "$gl_cv_next_sys_select_h" >&6; }
23145 fi
23146 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
23147
23148 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23149 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23150 gl_next_as_first_directive='<'sys/select.h'>'
23151 else
23152 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23153 gl_next_as_first_directive=$gl_cv_next_sys_select_h
23154 fi
23155 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
23156
23157
23158
23159
23160 if test $ac_cv_header_sys_select_h = yes; then
23161 HAVE_SYS_SELECT_H=1
23162 else
23163 HAVE_SYS_SELECT_H=0
23164 fi
067d23c9
KY
23165
23166
7e723570 23167
7e723570 23168
7e723570 23169
5476a9a4
GM
23170 if test $ac_cv_header_sys_socket_h != yes; then
23171 for ac_header in winsock2.h
23172do :
23173 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23174if test "x$ac_cv_header_winsock2_h" = x""yes; then :
23175 cat >>confdefs.h <<_ACEOF
23176#define HAVE_WINSOCK2_H 1
23177_ACEOF
7e723570 23178
5476a9a4 23179fi
7e723570 23180
5476a9a4 23181done
7e723570 23182
5476a9a4
GM
23183 fi
23184 if test "$ac_cv_header_winsock2_h" = yes; then
23185 HAVE_WINSOCK2_H=1
23186 UNISTD_H_HAVE_WINSOCK2_H=1
23187 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23188 else
23189 HAVE_WINSOCK2_H=0
23190 fi
7e723570
GM
23191
23192
dd0d840e 23193
dd0d840e 23194
dd0d840e
GM
23195
23196
dd0d840e 23197
dd0d840e 23198
dd0d840e
GM
23199
23200
23201
23202
23203
23204
23205
23206
dd0d840e 23207
dd0d840e 23208
dd0d840e 23209
dd0d840e 23210
dd0d840e 23211
dd0d840e 23212
5476a9a4
GM
23213 if test $gl_cv_have_include_next = yes; then
23214 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23215 else
23216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
23217$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
23218if test "${gl_cv_next_sys_stat_h+set}" = set; then :
23219 $as_echo_n "(cached) " >&6
23220else
dd0d840e 23221
5476a9a4 23222 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 23223
dd0d840e 23224
5476a9a4
GM
23225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23226/* end confdefs.h. */
23227#include <sys/stat.h>
dd0d840e 23228
5476a9a4
GM
23229_ACEOF
23230 case "$host_os" in
23231 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23232 *) gl_absname_cpp="$ac_cpp" ;;
23233 esac
dd0d840e 23234
5476a9a4
GM
23235 case "$host_os" in
23236 mingw*)
23237 gl_dirsep_regex='[/\\]'
23238 ;;
23239 *)
23240 gl_dirsep_regex='\/'
23241 ;;
23242 esac
23243 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 23244
5476a9a4
GM
23245 gl_header_literal_regex=`echo 'sys/stat.h' \
23246 | sed -e "$gl_make_literal_regex_sed"`
23247 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23248 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23249 s|^/[^/]|//&|
23250 p
23251 q
23252 }'
23253 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23254 sed -n "$gl_absolute_header_sed"`'"'
23255 else
23256 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23257 fi
dd0d840e 23258
dd0d840e 23259
5476a9a4
GM
23260fi
23261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
23262$as_echo "$gl_cv_next_sys_stat_h" >&6; }
23263 fi
23264 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 23265
5476a9a4
GM
23266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23268 gl_next_as_first_directive='<'sys/stat.h'>'
23269 else
23270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23271 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
23272 fi
23273 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 23274
dd0d840e 23275
d3127c14 23276
d3127c14 23277
dd0d840e 23278
dd0d840e 23279
dd0d840e 23280
dd0d840e 23281
dd0d840e 23282
dd0d840e 23283
dd0d840e 23284
5476a9a4 23285 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 23286
5476a9a4 23287$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 23288
5476a9a4 23289 fi
dd0d840e 23290
5476a9a4
GM
23291 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
23292 #include <sys/stat.h>
23293"
23294if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 23295
5476a9a4 23296else
dd0d840e 23297
5476a9a4 23298$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 23299
5476a9a4 23300fi
dd0d840e 23301
dd0d840e 23302
dd0d840e 23303
dd0d840e 23304
dd0d840e 23305
dd0d840e 23306
dd0d840e 23307
c9ca3f76 23308
dd0d840e 23309
dd0d840e 23310
dd0d840e 23311
c9ca3f76 23312
dd0d840e 23313
dd0d840e
GM
23314
23315
7e723570
GM
23316
23317
7e723570 23318
5476a9a4
GM
23319 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
23320"
23321if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
23322 ac_have_decl=1
23323else
23324 ac_have_decl=0
23325fi
7e723570 23326
5476a9a4
GM
23327cat >>confdefs.h <<_ACEOF
23328#define HAVE_DECL_LOCALTIME_R $ac_have_decl
23329_ACEOF
7e723570 23330
5476a9a4
GM
23331 if test $ac_cv_have_decl_localtime_r = no; then
23332 HAVE_DECL_LOCALTIME_R=0
23333 fi
7e723570 23334
7e723570 23335
5476a9a4
GM
23336 if test $ac_cv_func_localtime_r = yes; then
23337 HAVE_LOCALTIME_R=1
23338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
23339$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
23340if test "${gl_cv_time_r_posix+set}" = set; then :
23341 $as_echo_n "(cached) " >&6
23342else
23343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23344/* end confdefs.h. */
23345#include <time.h>
7e723570
GM
23346int
23347main ()
23348{
5476a9a4
GM
23349/* We don't need to append 'restrict's to the argument types,
23350 even though the POSIX signature has the 'restrict's,
23351 since C99 says they can't affect type compatibility. */
23352 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
23353 if (ptr) return 0;
23354 /* Check the return type is a pointer.
23355 On HP-UX 10 it is 'int'. */
23356 *localtime_r (0, 0);
7e723570
GM
23357 ;
23358 return 0;
23359}
5476a9a4 23360
7e723570 23361_ACEOF
5476a9a4
GM
23362if ac_fn_c_try_compile "$LINENO"; then :
23363 gl_cv_time_r_posix=yes
7e723570 23364else
5476a9a4 23365 gl_cv_time_r_posix=no
7e723570 23366fi
5476a9a4 23367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 23368
5476a9a4
GM
23369fi
23370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
23371$as_echo "$gl_cv_time_r_posix" >&6; }
23372 if test $gl_cv_time_r_posix = yes; then
23373 REPLACE_LOCALTIME_R=0
23374 else
23375 REPLACE_LOCALTIME_R=1
23376 fi
23377 else
23378 HAVE_LOCALTIME_R=0
23379 fi
02bd7257 23380
a6342fc8 23381 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
23382
23383
02bd7257 23384
02bd7257 23385
02bd7257 23386
02bd7257 23387
7e723570 23388
7e723570 23389
5476a9a4
GM
23390 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
23391
23392
23393 :
7e723570 23394
a6342fc8 23395 fi
7e723570 23396
7e723570 23397
7e723570 23398
7e723570 23399
7e723570 23400
5476a9a4 23401 GNULIB_TIME_R=1
7e723570 23402
7e723570 23403
7e723570 23404
7e723570 23405
7e723570 23406
a6342fc8 23407 :
7e723570 23408
02bd7257 23409
02bd7257 23410
02bd7257 23411
02bd7257 23412
02bd7257 23413
02bd7257 23414
02bd7257 23415
dd0d840e
GM
23416
23417
23418
dd0d840e 23419
dd0d840e 23420
5476a9a4
GM
23421 if test $gl_cv_have_include_next = yes; then
23422 gl_cv_next_unistd_h='<'unistd.h'>'
23423 else
23424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
23425$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
23426if test "${gl_cv_next_unistd_h+set}" = set; then :
23427 $as_echo_n "(cached) " >&6
23428else
dd0d840e 23429
5476a9a4 23430 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 23431
dd0d840e 23432
5476a9a4 23433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23434/* end confdefs.h. */
5476a9a4 23435#include <unistd.h>
d3127c14 23436
5476a9a4
GM
23437_ACEOF
23438 case "$host_os" in
23439 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23440 *) gl_absname_cpp="$ac_cpp" ;;
23441 esac
d3127c14 23442
5476a9a4
GM
23443 case "$host_os" in
23444 mingw*)
23445 gl_dirsep_regex='[/\\]'
23446 ;;
23447 *)
23448 gl_dirsep_regex='\/'
23449 ;;
23450 esac
23451 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23452
23453 gl_header_literal_regex=`echo 'unistd.h' \
23454 | sed -e "$gl_make_literal_regex_sed"`
23455 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23456 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23457 s|^/[^/]|//&|
23458 p
23459 q
23460 }'
23461 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23462 sed -n "$gl_absolute_header_sed"`'"'
23463 else
23464 gl_cv_next_unistd_h='<'unistd.h'>'
23465 fi
d3127c14 23466
d3127c14 23467
c9ca3f76 23468fi
5476a9a4
GM
23469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
23470$as_echo "$gl_cv_next_unistd_h" >&6; }
23471 fi
23472 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 23473
5476a9a4
GM
23474 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23475 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23476 gl_next_as_first_directive='<'unistd.h'>'
23477 else
23478 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23479 gl_next_as_first_directive=$gl_cv_next_unistd_h
23480 fi
23481 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 23482
c9ca3f76 23483
c9ca3f76 23484
c9ca3f76 23485
5476a9a4
GM
23486 if test $ac_cv_header_unistd_h = yes; then
23487 HAVE_UNISTD_H=1
23488 else
23489 HAVE_UNISTD_H=0
23490 fi
c9ca3f76 23491
d3127c14 23492
dd0d840e 23493
dd0d840e 23494
d3127c14 23495
d3127c14 23496
dd0d840e
GM
23497
23498
c9ca3f76
GM
23499
23500
23501
23502
23503
c9ca3f76 23504
5476a9a4
GM
23505 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
23506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
23507$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
23508if test "${gl_cv_func_futimesat_works+set}" = set; then :
23509 $as_echo_n "(cached) " >&6
23510else
23511 touch conftest.file
23512 if test "$cross_compiling" = yes; then :
23513 case "$host_os" in
23514 # Guess yes on glibc systems.
23515 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
23516 # If we don't know, assume the worst.
23517 *) gl_cv_func_futimesat_works="guessing no" ;;
23518 esac
c9ca3f76 23519
5476a9a4
GM
23520else
23521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
23522/* end confdefs.h. */
23523
5476a9a4
GM
23524#include <stddef.h>
23525#include <sys/times.h>
23526#include <fcntl.h>
c9ca3f76
GM
23527
23528int
23529main ()
23530{
5476a9a4
GM
23531 int fd = open ("conftest.file", O_RDWR);
23532 if (fd < 0) return 1;
23533 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
23534
23535 ;
23536 return 0;
23537}
23538_ACEOF
5476a9a4
GM
23539if ac_fn_c_try_run "$LINENO"; then :
23540 gl_cv_func_futimesat_works=yes
c9ca3f76 23541else
5476a9a4 23542 gl_cv_func_futimesat_works=no
c9ca3f76 23543fi
5476a9a4
GM
23544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23545 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
23546fi
23547
5476a9a4
GM
23548 rm -f conftest.file
23549fi
23550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
23551$as_echo "$gl_cv_func_futimesat_works" >&6; }
23552 case "$gl_cv_func_futimesat_works" in
23553 *yes) ;;
23554 *)
7e723570 23555
5476a9a4 23556$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 23557
5476a9a4
GM
23558 ;;
23559 esac
23560 fi
dd0d840e 23561
5476a9a4
GM
23562 gl_gnulib_enabled_dosname=false
23563 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
23564 gl_gnulib_enabled_pathmax=false
23565 gl_gnulib_enabled_stat=false
23566 gl_gnulib_enabled_strtoll=false
23567 gl_gnulib_enabled_strtoull=false
23568 gl_gnulib_enabled_verify=false
23569 func_gl_gnulib_m4code_dosname ()
23570 {
23571 if ! $gl_gnulib_enabled_dosname; then
23572 gl_gnulib_enabled_dosname=true
23573 fi
23574 }
23575 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
23576 {
23577 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
dd0d840e 23578
d3127c14 23579
5476a9a4
GM
23580 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
23581 fi
23582 }
23583 func_gl_gnulib_m4code_pathmax ()
23584 {
23585 if ! $gl_gnulib_enabled_pathmax; then
d3127c14
GM
23586
23587
23588
5476a9a4
GM
23589 gl_gnulib_enabled_pathmax=true
23590 fi
23591 }
23592 func_gl_gnulib_m4code_stat ()
23593 {
23594 if ! $gl_gnulib_enabled_stat; then
d3127c14 23595
d3127c14 23596
d3127c14 23597
5476a9a4
GM
23598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23599$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23600if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
23601 $as_echo_n "(cached) " >&6
23602else
23603 if test "$cross_compiling" = yes; then :
23604 case $host_os in
23605 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23606 *) gl_cv_func_stat_dir_slash="guessing yes";;
23607 esac
23608else
23609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23610/* end confdefs.h. */
5476a9a4 23611#include <sys/stat.h>
d3127c14
GM
23612
23613int
23614main ()
23615{
5476a9a4 23616struct stat st; return stat (".", &st) != stat ("./", &st);
d3127c14
GM
23617 ;
23618 return 0;
23619}
23620_ACEOF
5476a9a4
GM
23621if ac_fn_c_try_run "$LINENO"; then :
23622 gl_cv_func_stat_dir_slash=yes
d3127c14 23623else
5476a9a4
GM
23624 gl_cv_func_stat_dir_slash=no
23625fi
23626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23627 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 23628fi
d3127c14 23629
5476a9a4
GM
23630fi
23631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23632$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23634$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23635if test "${gl_cv_func_stat_file_slash+set}" = set; then :
23636 $as_echo_n "(cached) " >&6
23637else
23638 touch conftest.tmp
23639 # Assume that if we have lstat, we can also check symlinks.
23640 if test $ac_cv_func_lstat = yes; then
23641 ln -s conftest.tmp conftest.lnk
23642 fi
23643 if test "$cross_compiling" = yes; then :
23644 case "$host_os" in
23645 # Guess yes on glibc systems.
23646 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23647 # If we don't know, assume the worst.
23648 *) gl_cv_func_stat_file_slash="guessing no" ;;
23649 esac
d3127c14 23650
5476a9a4
GM
23651else
23652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23653/* end confdefs.h. */
5476a9a4 23654#include <sys/stat.h>
d3127c14
GM
23655
23656int
23657main ()
23658{
5476a9a4
GM
23659int result = 0;
23660 struct stat st;
23661 if (!stat ("conftest.tmp/", &st))
23662 result |= 1;
23663#if HAVE_LSTAT
23664 if (!stat ("conftest.lnk/", &st))
23665 result |= 2;
23666#endif
23667 return result;
d3127c14
GM
23668
23669 ;
23670 return 0;
23671}
23672_ACEOF
5476a9a4
GM
23673if ac_fn_c_try_run "$LINENO"; then :
23674 gl_cv_func_stat_file_slash=yes
d3127c14 23675else
5476a9a4
GM
23676 gl_cv_func_stat_file_slash=no
23677fi
23678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23679 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 23680fi
d3127c14 23681
5476a9a4
GM
23682 rm -f conftest.tmp conftest.lnk
23683fi
23684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23685$as_echo "$gl_cv_func_stat_file_slash" >&6; }
23686 case $gl_cv_func_stat_dir_slash in
23687 *no) REPLACE_STAT=1
d3127c14 23688
5476a9a4
GM
23689$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23690;;
23691 esac
23692 case $gl_cv_func_stat_file_slash in
23693 *no) REPLACE_STAT=1
d3127c14 23694
5476a9a4
GM
23695$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23696;;
23697 esac
d3127c14 23698
a6342fc8 23699 if test $REPLACE_STAT = 1; then
d3127c14 23700
dd0d840e 23701
dd0d840e 23702
dd0d840e 23703
dd0d840e 23704
dd0d840e 23705
067d23c9
KY
23706
23707
5476a9a4 23708 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9
KY
23709
23710
23711
5476a9a4 23712 :
067d23c9 23713
a6342fc8 23714 fi
067d23c9 23715
dd0d840e
GM
23716
23717
dd0d840e 23718
dd0d840e 23719
5476a9a4 23720 GNULIB_STAT=1
dd0d840e 23721
067d23c9
KY
23722
23723
23724
23725
5476a9a4
GM
23726 gl_gnulib_enabled_stat=true
23727 if test $REPLACE_STAT = 1; then
23728 func_gl_gnulib_m4code_dosname
23729 fi
23730 if test $REPLACE_STAT = 1; then
23731 func_gl_gnulib_m4code_pathmax
23732 fi
23733 if test $REPLACE_STAT = 1; then
23734 func_gl_gnulib_m4code_verify
23735 fi
23736 fi
23737 }
23738 func_gl_gnulib_m4code_strtoll ()
23739 {
23740 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
23741
23742
23743
5476a9a4
GM
23744 if test "$ac_cv_type_long_long_int" = yes; then
23745 for ac_func in strtoll
23746do :
23747 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
23748if test "x$ac_cv_func_strtoll" = x""yes; then :
23749 cat >>confdefs.h <<_ACEOF
23750#define HAVE_STRTOLL 1
23751_ACEOF
067d23c9 23752
5476a9a4
GM
23753fi
23754done
067d23c9 23755
5476a9a4
GM
23756 if test $ac_cv_func_strtoll = no; then
23757 HAVE_STRTOLL=0
23758 fi
23759 fi
067d23c9 23760
a6342fc8 23761 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
23762
23763
23764
067d23c9
KY
23765
23766
23767
23768
23769
5476a9a4 23770 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
23771
23772
5476a9a4 23773 :
067d23c9 23774
a6342fc8 23775 fi
067d23c9
KY
23776
23777
23778
067d23c9 23779
067d23c9 23780
5476a9a4 23781 GNULIB_STRTOLL=1
067d23c9 23782
397f7161 23783
067d23c9
KY
23784
23785
067d23c9 23786
5476a9a4
GM
23787 gl_gnulib_enabled_strtoll=true
23788 fi
23789 }
23790 func_gl_gnulib_m4code_strtoull ()
23791 {
23792 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 23793
067d23c9 23794
067d23c9 23795
5476a9a4
GM
23796 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
23797 for ac_func in strtoull
23798do :
23799 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
23800if test "x$ac_cv_func_strtoull" = x""yes; then :
23801 cat >>confdefs.h <<_ACEOF
23802#define HAVE_STRTOULL 1
23803_ACEOF
067d23c9 23804
f199cab1 23805fi
5476a9a4 23806done
067d23c9 23807
5476a9a4
GM
23808 if test $ac_cv_func_strtoull = no; then
23809 HAVE_STRTOULL=0
23810 fi
23811 fi
067d23c9 23812
a6342fc8 23813 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
23814
23815
067d23c9 23816
067d23c9 23817
067d23c9 23818
067d23c9 23819
067d23c9 23820
067d23c9 23821
5476a9a4 23822 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 23823
067d23c9 23824
5476a9a4 23825 :
067d23c9 23826
a6342fc8 23827 fi
067d23c9
KY
23828
23829
3e0be4ab 23830
3e0be4ab 23831
067d23c9 23832
5476a9a4 23833 GNULIB_STRTOULL=1
067d23c9 23834
a0a61e58 23835
067d23c9 23836
067d23c9
KY
23837
23838
5476a9a4
GM
23839 gl_gnulib_enabled_strtoull=true
23840 fi
23841 }
23842 func_gl_gnulib_m4code_verify ()
23843 {
23844 if ! $gl_gnulib_enabled_verify; then
23845 gl_gnulib_enabled_verify=true
23846 fi
23847 }
23848 if test $REPLACE_GETOPT = 1; then
23849 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
23850 fi
23851 if test $REPLACE_LSTAT = 1; then
23852 func_gl_gnulib_m4code_dosname
23853 fi
23854 if test $REPLACE_LSTAT = 1; then
23855 func_gl_gnulib_m4code_stat
23856 fi
23857 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
23858 func_gl_gnulib_m4code_stat
23859 fi
23860 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
23861 func_gl_gnulib_m4code_strtoll
23862 fi
23863 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
23864 func_gl_gnulib_m4code_verify
23865 fi
23866 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
23867 func_gl_gnulib_m4code_strtoull
23868 fi
23869 if test $ac_cv_func_strtoumax = no; then
23870 func_gl_gnulib_m4code_verify
23871 fi
067d23c9 23872
5476a9a4
GM
23873 if $gl_gnulib_enabled_dosname; then
23874 gl_GNULIB_ENABLED_dosname_TRUE=
23875 gl_GNULIB_ENABLED_dosname_FALSE='#'
23876else
23877 gl_GNULIB_ENABLED_dosname_TRUE='#'
23878 gl_GNULIB_ENABLED_dosname_FALSE=
23879fi
067d23c9 23880
5476a9a4
GM
23881 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
23882 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
23883 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
23884else
23885 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
23886 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
23887fi
067d23c9 23888
5476a9a4
GM
23889 if $gl_gnulib_enabled_pathmax; then
23890 gl_GNULIB_ENABLED_pathmax_TRUE=
23891 gl_GNULIB_ENABLED_pathmax_FALSE='#'
23892else
23893 gl_GNULIB_ENABLED_pathmax_TRUE='#'
23894 gl_GNULIB_ENABLED_pathmax_FALSE=
23895fi
067d23c9 23896
5476a9a4
GM
23897 if $gl_gnulib_enabled_stat; then
23898 gl_GNULIB_ENABLED_stat_TRUE=
23899 gl_GNULIB_ENABLED_stat_FALSE='#'
23900else
23901 gl_GNULIB_ENABLED_stat_TRUE='#'
23902 gl_GNULIB_ENABLED_stat_FALSE=
23903fi
067d23c9 23904
5476a9a4
GM
23905 if $gl_gnulib_enabled_strtoll; then
23906 gl_GNULIB_ENABLED_strtoll_TRUE=
23907 gl_GNULIB_ENABLED_strtoll_FALSE='#'
23908else
23909 gl_GNULIB_ENABLED_strtoll_TRUE='#'
23910 gl_GNULIB_ENABLED_strtoll_FALSE=
23911fi
067d23c9 23912
5476a9a4
GM
23913 if $gl_gnulib_enabled_strtoull; then
23914 gl_GNULIB_ENABLED_strtoull_TRUE=
23915 gl_GNULIB_ENABLED_strtoull_FALSE='#'
23916else
23917 gl_GNULIB_ENABLED_strtoull_TRUE='#'
23918 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 23919fi
067d23c9 23920
5476a9a4
GM
23921 if $gl_gnulib_enabled_verify; then
23922 gl_GNULIB_ENABLED_verify_TRUE=
23923 gl_GNULIB_ENABLED_verify_FALSE='#'
23924else
23925 gl_GNULIB_ENABLED_verify_TRUE='#'
23926 gl_GNULIB_ENABLED_verify_FALSE=
23927fi
067d23c9 23928
5476a9a4 23929 # End of code from modules
067d23c9 23930
067d23c9 23931
067d23c9 23932
067d23c9 23933
f199cab1 23934
f199cab1
GM
23935
23936
067d23c9 23937
5476a9a4
GM
23938
23939 gltests_libdeps=
23940 gltests_ltlibdeps=
067d23c9 23941
067d23c9 23942
067d23c9
KY
23943
23944
067d23c9
KY
23945
23946
3e0be4ab 23947
3e0be4ab 23948
3e0be4ab 23949
5476a9a4
GM
23950 gl_source_base='tests'
23951 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
3e0be4ab 23952
5476a9a4 23953 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
23954
23955
23956
23957
23958
067d23c9
KY
23959
23960
23961
3e0be4ab 23962
3e0be4ab 23963
5476a9a4
GM
23964 LIBGNU_LIBDEPS="$gl_libdeps"
23965
23966 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23967
067d23c9 23968
5476a9a4
GM
23969CFLAGS=$SAVE_CFLAGS
23970LIBS=$SAVE_LIBS
067d23c9
KY
23971
23972case "$opsys" in
23973 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
23974
23975 darwin)
23976 ## The -headerpad option tells ld (see man page) to leave room at the
23977 ## end of the header for adding load commands. Needed for dumping.
23978 ## 0x690 is the total size of 30 segment load commands (at 56
23979 ## each); under Cocoa 31 commands are required.
23980 if test "$HAVE_NS" = "yes"; then
23981 libs_nsgui="-framework AppKit"
23982 headerpad_extra=6C8
23983 else
23984 libs_nsgui=
23985 headerpad_extra=690
23986 fi
85cf5029 23987 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
23988
23989 ## This is here because src/Makefile.in did some extra fiddling around
23990 ## with LD_SWITCH_SYSTEM. The cpp logic was:
23991 ## #ifndef LD_SWITCH_SYSTEM
23992 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
23993 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
42bbbe8b 23994 ## not using gcc, darwin.
067d23c9
KY
23995 ## Because this was done in src/Makefile.in, the resulting part of
23996 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
23997 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
23998 ## rather than LD_SWITCH_SYSTEM.
23999 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
24000 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
24001 ;;
24002
ae629dae
GM
24003 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
24004 ## find X at run-time.
24005 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
24006 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
24007 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
24008 ## had different values in configure (in ac_link) and src/Makefile.in.
24009 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 24010 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
24011
24012 *) LD_SWITCH_SYSTEM_TEMACS= ;;
24013esac
24014
24015if test "$NS_IMPL_GNUSTEP" = "yes"; then
24016 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
24017fi
24018
24019
24020
24021
24022LD_FIRSTFLAG=
24023ORDINARY_LINK=
24024case "$opsys" in
24025 ## gnu: GNU needs its own crt0.
24026 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
24027
24028 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
24029 ## library search parth, i.e. it won't search /usr/lib for libc and
24030 ## friends. Using -nostartfiles instead avoids this problem, and
24031 ## will also work on earlier NetBSD releases.
24032 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
24033
42bbbe8b 24034 ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
067d23c9 24035 ## MkLinux/LinuxPPC needs this.
42bbbe8b 24036 ## s390x-* only supports opsys = gnu-linux so it can be added here.
067d23c9 24037 gnu-*)
42bbbe8b
GM
24038 case "$canonical" in
24039 powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
067d23c9
KY
24040 esac
24041 ;;
24042esac
24043
24044
24045if test "x$ORDINARY_LINK" = "xyes"; then
24046
24047 LD_FIRSTFLAG=""
24048
24049$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
24050
24051
24052## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
42bbbe8b 24053## freebsd, gnu-* not on powerpc*|s390x*.
067d23c9
KY
24054elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
24055
24056 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
24057 ## places that are difficult to figure out at make time. Fortunately,
24058 ## these same versions allow you to pass arbitrary flags on to the
24059 ## linker, so there is no reason not to use it as a linker.
24060 ##
24061 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
24062 ## searching for libraries in its internal directories, so we have to
24063 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
24064 LD_FIRSTFLAG="-nostdlib"
24065fi
24066
24067## FIXME? What setting of EDIT_LDFLAGS should this have?
24068test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
24069
24070
24071
24072
24073## FIXME? The logic here is not precisely the same as that above.
24074## There is no check here for a pre-defined LD_FIRSTFLAG.
24075## Should we only be setting LIB_GCC if LD ~ -nostdlib?
24076LIB_GCC=
24077if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
24078
24079 case "$opsys" in
24080 freebsd|netbsd|openbsd) LIB_GCC= ;;
24081
24082 gnu-*)
24083 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
24084 ## build on ARM EABI under GNU/Linux. (Bug#5518)
d6a003a8
AS
24085 case $host_cpu in
24086 arm*)
067d23c9 24087 LIB_GCC="-lgcc_s"
d6a003a8
AS
24088 ;;
24089 *)
067d23c9
KY
24090 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
24091 ## immediately undefine it again and redefine it to empty.
24092 ## Was the C_SWITCH_X_SITE part really necessary?
24093## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
24094 LIB_GCC=
d6a003a8
AS
24095 ;;
24096 esac
067d23c9
KY
24097 ;;
24098
24099 ## Ask GCC where to find libgcc.a.
24100 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
24101 esac
24102fi
24103
42dcba54
GM
24104## Common for all window systems
24105if test "$window_system" != "none"; then
067d23c9
KY
24106
24107$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
24108
24109
24110$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
24111
42dcba54 24112 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
24113fi
24114
24115
24116
24117
42dcba54 24118
067d23c9
KY
24119#### Report on what we decided to do.
24120#### Report GTK as a toolkit, even if it doesn't use Xt.
24121#### It makes printing result more understandable as using GTK sets
24122#### toolkit_scroll_bars to yes by default.
24123if test "${HAVE_GTK}" = "yes"; then
5476a9a4
GM
24124 if test "${with_gtk3}" = "yes"; then
24125 USE_X_TOOLKIT=GTK3
24126 else
24127 USE_X_TOOLKIT=GTK
24128 fi
067d23c9
KY
24129fi
24130
24131echo "
24132Configured for \`${canonical}'.
24133
24134 Where should the build process find the source code? ${srcdir}
067d23c9
KY
24135 What compiler should emacs be built with? ${CC} ${CFLAGS}
24136 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
24137 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
24138 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
24139 What window system should Emacs use? ${window_system}
24140 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
24141
24142if test -n "${x_includes}"; then
24143echo " Where do we find X Windows header files? ${x_includes}"
24144else
24145echo " Where do we find X Windows header files? Standard dirs"
24146fi
24147if test -n "${x_libraries}"; then
24148echo " Where do we find X Windows libraries? ${x_libraries}"
24149else
24150echo " Where do we find X Windows libraries? Standard dirs"
24151fi
24152
24153echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24154echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24155echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24156echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
24157echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
24158echo " Does Emacs use -lpng? ${HAVE_PNG}"
24159echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
24160echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
24161
24162echo " Does Emacs use -lgpm? ${HAVE_GPM}"
24163echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
24164echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 24165echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 24166echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 24167echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
24168echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
24169
24170echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24171echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24172echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24173echo " Does Emacs use -lxft? ${HAVE_XFT}"
24174
24175echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24176echo
24177
eb39a72d
GM
24178if test -n "${EMACSDATA}"; then
24179 echo " Environment variable EMACSDATA set to: $EMACSDATA"
24180fi
24181if test -n "${EMACSDOC}"; then
24182 echo " Environment variable EMACSDOC set to: $EMACSDOC"
24183fi
24184
067d23c9
KY
24185echo
24186
24187if test "$HAVE_NS" = "yes"; then
24188 echo
3d0788a9 24189 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
24190The installed application will go to nextstep/Emacs.app and can be
24191run or moved from there."
24192 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24193 echo "The application will be fully self-contained."
24194 else
24195 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 24196You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
24197to run if these resources are not installed."
24198 fi
24199 echo
24200fi
24201
031fabfc
GM
24202if test "${opsys}" = "cygwin"; then
24203 case `uname -r` in
24204 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
24205$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
24206 echo
24207 ;;
24208 esac
24209fi
067d23c9
KY
24210
24211# Remove any trailing slashes in these variables.
24212test "${prefix}" != NONE &&
24213 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24214test "${exec_prefix}" != NONE &&
24215 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24216
56ade35c
GM
24217SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
24218
24219ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
24220
a877df06 24221
73b78882 24222opt_makefile=test/automated/Makefile
a877df06 24223
56ade35c 24224if test -f $srcdir/${opt_makefile}.in; then
73b78882 24225 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 24226 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 24227
56ade35c 24228fi
73b78882 24229
40b65096
GM
24230
24231opt_makefile=admin/unidata/Makefile
24232
24233if test -f $srcdir/${opt_makefile}.in; then
24234 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
24235 ac_config_files="$ac_config_files admin/unidata/Makefile"
24236
24237fi
24238
24239
56ade35c 24240SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 24241
067d23c9 24242
9411886d
PE
24243
24244ac_config_commands="$ac_config_commands mkdirs"
24245
24246
24247ac_config_commands="$ac_config_commands epaths"
24248
24249
24250ac_config_commands="$ac_config_commands gdbinit"
24251
067d23c9
KY
24252
24253cat >confcache <<\_ACEOF
24254# This file is a shell script that caches the results of configure
24255# tests run on this system so they can be shared between configure
24256# scripts and configure runs, see configure's option --config-cache.
24257# It is not useful on other systems. If it contains results you don't
24258# want to keep, you may remove or edit it.
24259#
24260# config.status only pays attention to the cache file if you give it
24261# the --recheck option to rerun configure.
24262#
24263# `ac_cv_env_foo' variables (set or unset) will be overridden when
24264# loading this file, other *unset* `ac_cv_foo' will be assigned the
24265# following values.
24266
24267_ACEOF
24268
24269# The following way of writing the cache mishandles newlines in values,
24270# but we know of no workaround that is simple, portable, and efficient.
24271# So, we kill variables containing newlines.
24272# Ultrix sh set writes to stderr and can't be redirected directly,
24273# and sets the high bit in the cache file unless we assign to the vars.
24274(
24275 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24276 eval ac_val=\$$ac_var
24277 case $ac_val in #(
24278 *${as_nl}*)
24279 case $ac_var in #(
24280 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24281$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24282 esac
24283 case $ac_var in #(
24284 _ | IFS | as_nl) ;; #(
24285 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24286 *) { eval $ac_var=; unset $ac_var;} ;;
24287 esac ;;
24288 esac
24289 done
24290
24291 (set) 2>&1 |
24292 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24293 *${as_nl}ac_space=\ *)
24294 # `set' does not quote correctly, so add quotes: double-quote
24295 # substitution turns \\\\ into \\, and sed turns \\ into \.
24296 sed -n \
24297 "s/'/'\\\\''/g;
24298 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24299 ;; #(
24300 *)
24301 # `set' quotes correctly as required by POSIX, so do not add quotes.
24302 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24303 ;;
24304 esac |
24305 sort
24306) |
24307 sed '
24308 /^ac_cv_env_/b end
24309 t clear
24310 :clear
24311 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24312 t end
24313 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24314 :end' >>confcache
24315if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24316 if test -w "$cache_file"; then
a9bec17c 24317 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
24318 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24319$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 24320 cat confcache >$cache_file
067d23c9
KY
24321 else
24322 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24323$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24324 fi
24325fi
24326rm -f confcache
24327
24328test "x$prefix" = xNONE && prefix=$ac_default_prefix
24329# Let make expand exec_prefix.
24330test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24331
24332DEFS=-DHAVE_CONFIG_H
24333
24334ac_libobjs=
24335ac_ltlibobjs=
24336for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24337 # 1. Remove the extension, and $U if already installed.
24338 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24339 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24340 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24341 # will be set to the directory where LIBOBJS objects are built.
24342 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24343 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24344done
24345LIBOBJS=$ac_libobjs
24346
24347LTLIBOBJS=$ac_ltlibobjs
24348
24349
743c80a7
PE
24350 if test -n "$EXEEXT"; then
24351 am__EXEEXT_TRUE=
24352 am__EXEEXT_FALSE='#'
24353else
24354 am__EXEEXT_TRUE='#'
24355 am__EXEEXT_FALSE=
24356fi
24357
24358if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 24359 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
24360Usually this means the macro was only invoked conditionally." "$LINENO" 5
24361fi
24362if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 24363 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
24364Usually this means the macro was only invoked conditionally." "$LINENO" 5
24365fi
743c80a7 24366if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 24367 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
24368Usually this means the macro was only invoked conditionally." "$LINENO" 5
24369fi
4fc2b746 24370if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 24371 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
24372Usually this means the macro was only invoked conditionally." "$LINENO" 5
24373fi
743c80a7 24374
8966cbff
GM
24375if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
24376 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
24377Usually this means the macro was only invoked conditionally." "$LINENO" 5
24378fi
4fda9c95 24379if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 24380 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
24381Usually this means the macro was only invoked conditionally." "$LINENO" 5
24382fi
0eb775a3
GM
24383if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
24384 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
24385Usually this means the macro was only invoked conditionally." "$LINENO" 5
24386fi
6d153f56 24387if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 24388 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
24389Usually this means the macro was only invoked conditionally." "$LINENO" 5
24390fi
6c051bab 24391if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 24392 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
24393Usually this means the macro was only invoked conditionally." "$LINENO" 5
24394fi
24395if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 24396 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
24397Usually this means the macro was only invoked conditionally." "$LINENO" 5
24398fi
6d153f56 24399if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 24400 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
24401Usually this means the macro was only invoked conditionally." "$LINENO" 5
24402fi
24403if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 24404 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
24405Usually this means the macro was only invoked conditionally." "$LINENO" 5
24406fi
a0a61e58
GM
24407if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
24408 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
24409Usually this means the macro was only invoked conditionally." "$LINENO" 5
24410fi
6d153f56 24411if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 24412 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
24413Usually this means the macro was only invoked conditionally." "$LINENO" 5
24414fi
3e0be4ab 24415if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 24416 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
24417Usually this means the macro was only invoked conditionally." "$LINENO" 5
24418fi
6d153f56 24419if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 24420 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
24421Usually this means the macro was only invoked conditionally." "$LINENO" 5
24422fi
24423if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 24424 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 24425Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 24426fi
942f733f 24427
743c80a7
PE
24428 gl_libobjs=
24429 gl_ltlibobjs=
24430 if test -n "$gl_LIBOBJS"; then
24431 # Remove the extension.
24432 sed_drop_objext='s/\.o$//;s/\.obj$//'
24433 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24434 gl_libobjs="$gl_libobjs $i.$ac_objext"
24435 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24436 done
24437 fi
24438 gl_LIBOBJS=$gl_libobjs
24439
24440 gl_LTLIBOBJS=$gl_ltlibobjs
24441
24442
24443
24444 gltests_libobjs=
24445 gltests_ltlibobjs=
24446 if test -n "$gltests_LIBOBJS"; then
24447 # Remove the extension.
24448 sed_drop_objext='s/\.o$//;s/\.obj$//'
24449 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24450 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24451 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24452 done
24453 fi
24454 gltests_LIBOBJS=$gltests_libobjs
24455
24456 gltests_LTLIBOBJS=$gltests_ltlibobjs
24457
067d23c9
KY
24458
24459
a9bec17c 24460: ${CONFIG_STATUS=./config.status}
067d23c9
KY
24461ac_write_fail=0
24462ac_clean_files_save=$ac_clean_files
24463ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24464{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24465$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24466as_write_fail=0
24467cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24468#! $SHELL
24469# Generated by $as_me.
24470# Run this file to recreate the current configuration.
24471# Compiler output produced by configure, useful for debugging
24472# configure, is in config.log if it exists.
24473
24474debug=false
24475ac_cs_recheck=false
24476ac_cs_silent=false
24477
24478SHELL=\${CONFIG_SHELL-$SHELL}
24479export SHELL
24480_ASEOF
24481cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24482## -------------------- ##
24483## M4sh Initialization. ##
24484## -------------------- ##
24485
24486# Be more Bourne compatible
24487DUALCASE=1; export DUALCASE # for MKS sh
24488if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24489 emulate sh
24490 NULLCMD=:
24491 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24492 # is contrary to our usage. Disable this feature.
24493 alias -g '${1+"$@"}'='"$@"'
24494 setopt NO_GLOB_SUBST
24495else
24496 case `(set -o) 2>/dev/null` in #(
24497 *posix*) :
24498 set -o posix ;; #(
24499 *) :
24500 ;;
24501esac
24502fi
24503
24504
24505as_nl='
24506'
24507export as_nl
24508# Printing a long string crashes Solaris 7 /usr/bin/printf.
24509as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24510as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24511as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24512# Prefer a ksh shell builtin over an external printf program on Solaris,
24513# but without wasting forks for bash or zsh.
24514if test -z "$BASH_VERSION$ZSH_VERSION" \
24515 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24516 as_echo='print -r --'
24517 as_echo_n='print -rn --'
24518elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24519 as_echo='printf %s\n'
24520 as_echo_n='printf %s'
24521else
24522 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24523 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24524 as_echo_n='/usr/ucb/echo -n'
24525 else
24526 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24527 as_echo_n_body='eval
24528 arg=$1;
24529 case $arg in #(
24530 *"$as_nl"*)
24531 expr "X$arg" : "X\\(.*\\)$as_nl";
24532 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24533 esac;
24534 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24535 '
24536 export as_echo_n_body
24537 as_echo_n='sh -c $as_echo_n_body as_echo'
24538 fi
24539 export as_echo_body
24540 as_echo='sh -c $as_echo_body as_echo'
24541fi
24542
24543# The user is always right.
24544if test "${PATH_SEPARATOR+set}" != set; then
24545 PATH_SEPARATOR=:
24546 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24547 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24548 PATH_SEPARATOR=';'
24549 }
24550fi
24551
24552
24553# IFS
24554# We need space, tab and new line, in precisely that order. Quoting is
24555# there to prevent editors from complaining about space-tab.
24556# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24557# splitting by setting IFS to empty value.)
24558IFS=" "" $as_nl"
24559
24560# Find who we are. Look in the path if we contain no directory separator.
24561case $0 in #((
24562 *[\\/]* ) as_myself=$0 ;;
24563 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24564for as_dir in $PATH
24565do
24566 IFS=$as_save_IFS
24567 test -z "$as_dir" && as_dir=.
24568 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24569 done
24570IFS=$as_save_IFS
24571
24572 ;;
24573esac
24574# We did not find ourselves, most probably we were run as `sh COMMAND'
24575# in which case we are not to be found in the path.
24576if test "x$as_myself" = x; then
24577 as_myself=$0
24578fi
24579if test ! -f "$as_myself"; then
24580 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24581 exit 1
24582fi
24583
24584# Unset variables that we do not need and which cause bugs (e.g. in
24585# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24586# suppresses any "Segmentation fault" message there. '((' could
24587# trigger a bug in pdksh 5.2.14.
24588for as_var in BASH_ENV ENV MAIL MAILPATH
24589do eval test x\${$as_var+set} = xset \
24590 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24591done
24592PS1='$ '
24593PS2='> '
24594PS4='+ '
24595
24596# NLS nuisances.
24597LC_ALL=C
24598export LC_ALL
24599LANGUAGE=C
24600export LANGUAGE
24601
24602# CDPATH.
24603(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24604
24605
a9bec17c
GM
24606# as_fn_error ERROR [LINENO LOG_FD]
24607# ---------------------------------
067d23c9
KY
24608# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24609# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 24610# script with status $?, using 1 if that was 0.
067d23c9
KY
24611as_fn_error ()
24612{
a9bec17c
GM
24613 as_status=$?; test $as_status -eq 0 && as_status=1
24614 if test "$3"; then
24615 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24616 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 24617 fi
a9bec17c 24618 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
24619 as_fn_exit $as_status
24620} # as_fn_error
24621
24622
24623# as_fn_set_status STATUS
24624# -----------------------
24625# Set $? to STATUS, without forking.
24626as_fn_set_status ()
24627{
24628 return $1
24629} # as_fn_set_status
24630
24631# as_fn_exit STATUS
24632# -----------------
24633# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24634as_fn_exit ()
24635{
24636 set +e
24637 as_fn_set_status $1
24638 exit $1
24639} # as_fn_exit
24640
24641# as_fn_unset VAR
24642# ---------------
24643# Portably unset VAR.
24644as_fn_unset ()
24645{
24646 { eval $1=; unset $1;}
24647}
24648as_unset=as_fn_unset
24649# as_fn_append VAR VALUE
24650# ----------------------
24651# Append the text in VALUE to the end of the definition contained in VAR. Take
24652# advantage of any shell optimizations that allow amortized linear growth over
24653# repeated appends, instead of the typical quadratic growth present in naive
24654# implementations.
24655if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24656 eval 'as_fn_append ()
24657 {
24658 eval $1+=\$2
24659 }'
24660else
24661 as_fn_append ()
24662 {
24663 eval $1=\$$1\$2
24664 }
24665fi # as_fn_append
24666
24667# as_fn_arith ARG...
24668# ------------------
24669# Perform arithmetic evaluation on the ARGs, and store the result in the
24670# global $as_val. Take advantage of shells that can avoid forks. The arguments
24671# must be portable across $(()) and expr.
24672if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24673 eval 'as_fn_arith ()
24674 {
24675 as_val=$(( $* ))
24676 }'
24677else
24678 as_fn_arith ()
24679 {
24680 as_val=`expr "$@" || test $? -eq 1`
24681 }
24682fi # as_fn_arith
24683
24684
24685if expr a : '\(a\)' >/dev/null 2>&1 &&
24686 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24687 as_expr=expr
24688else
24689 as_expr=false
24690fi
24691
24692if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24693 as_basename=basename
24694else
24695 as_basename=false
24696fi
24697
24698if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24699 as_dirname=dirname
24700else
24701 as_dirname=false
24702fi
24703
24704as_me=`$as_basename -- "$0" ||
24705$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24706 X"$0" : 'X\(//\)$' \| \
24707 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24708$as_echo X/"$0" |
24709 sed '/^.*\/\([^/][^/]*\)\/*$/{
24710 s//\1/
24711 q
24712 }
24713 /^X\/\(\/\/\)$/{
24714 s//\1/
24715 q
24716 }
24717 /^X\/\(\/\).*/{
24718 s//\1/
24719 q
24720 }
24721 s/.*/./; q'`
24722
24723# Avoid depending upon Character Ranges.
24724as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24725as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24726as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24727as_cr_digits='0123456789'
24728as_cr_alnum=$as_cr_Letters$as_cr_digits
24729
24730ECHO_C= ECHO_N= ECHO_T=
24731case `echo -n x` in #(((((
24732-n*)
24733 case `echo 'xy\c'` in
24734 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24735 xy) ECHO_C='\c';;
24736 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24737 ECHO_T=' ';;
24738 esac;;
24739*)
24740 ECHO_N='-n';;
24741esac
24742
24743rm -f conf$$ conf$$.exe conf$$.file
24744if test -d conf$$.dir; then
24745 rm -f conf$$.dir/conf$$.file
24746else
24747 rm -f conf$$.dir
24748 mkdir conf$$.dir 2>/dev/null
24749fi
24750if (echo >conf$$.file) 2>/dev/null; then
24751 if ln -s conf$$.file conf$$ 2>/dev/null; then
24752 as_ln_s='ln -s'
24753 # ... but there are two gotchas:
24754 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24755 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24756 # In both cases, we have to default to `cp -p'.
24757 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24758 as_ln_s='cp -p'
24759 elif ln conf$$.file conf$$ 2>/dev/null; then
24760 as_ln_s=ln
24761 else
24762 as_ln_s='cp -p'
24763 fi
24764else
24765 as_ln_s='cp -p'
24766fi
24767rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24768rmdir conf$$.dir 2>/dev/null
24769
24770
24771# as_fn_mkdir_p
24772# -------------
24773# Create "$as_dir" as a directory, including parents if necessary.
24774as_fn_mkdir_p ()
24775{
24776
24777 case $as_dir in #(
24778 -*) as_dir=./$as_dir;;
24779 esac
24780 test -d "$as_dir" || eval $as_mkdir_p || {
24781 as_dirs=
24782 while :; do
24783 case $as_dir in #(
24784 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24785 *) as_qdir=$as_dir;;
24786 esac
24787 as_dirs="'$as_qdir' $as_dirs"
24788 as_dir=`$as_dirname -- "$as_dir" ||
24789$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24790 X"$as_dir" : 'X\(//\)[^/]' \| \
24791 X"$as_dir" : 'X\(//\)$' \| \
24792 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24793$as_echo X"$as_dir" |
24794 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24795 s//\1/
24796 q
24797 }
24798 /^X\(\/\/\)[^/].*/{
24799 s//\1/
24800 q
24801 }
24802 /^X\(\/\/\)$/{
24803 s//\1/
24804 q
24805 }
24806 /^X\(\/\).*/{
24807 s//\1/
24808 q
24809 }
24810 s/.*/./; q'`
24811 test -d "$as_dir" && break
24812 done
24813 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 24814 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
24815
24816
24817} # as_fn_mkdir_p
24818if mkdir -p . 2>/dev/null; then
24819 as_mkdir_p='mkdir -p "$as_dir"'
24820else
24821 test -d ./-p && rmdir ./-p
24822 as_mkdir_p=false
24823fi
24824
24825if test -x / >/dev/null 2>&1; then
24826 as_test_x='test -x'
24827else
24828 if ls -dL / >/dev/null 2>&1; then
24829 as_ls_L_option=L
24830 else
24831 as_ls_L_option=
24832 fi
24833 as_test_x='
24834 eval sh -c '\''
24835 if test -d "$1"; then
24836 test -d "$1/.";
24837 else
24838 case $1 in #(
24839 -*)set "./$1";;
24840 esac;
24841 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24842 ???[sx]*):;;*)false;;esac;fi
24843 '\'' sh
24844 '
24845fi
24846as_executable_p=$as_test_x
24847
24848# Sed expression to map a string onto a valid CPP name.
24849as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24850
24851# Sed expression to map a string onto a valid variable name.
24852as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24853
24854
24855exec 6>&1
24856## ----------------------------------- ##
24857## Main body of $CONFIG_STATUS script. ##
24858## ----------------------------------- ##
24859_ASEOF
24860test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24861
24862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24863# Save the log message, to keep $0 and so on meaningful, and to
24864# report actual input values of CONFIG_FILES etc. instead of their
24865# values after options handling.
24866ac_log="
250c8ab9 24867This file was extended by emacs $as_me 24.2.50, which was
a9bec17c 24868generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
24869
24870 CONFIG_FILES = $CONFIG_FILES
24871 CONFIG_HEADERS = $CONFIG_HEADERS
24872 CONFIG_LINKS = $CONFIG_LINKS
24873 CONFIG_COMMANDS = $CONFIG_COMMANDS
24874 $ $0 $@
24875
24876on `(hostname || uname -n) 2>/dev/null | sed 1q`
24877"
24878
24879_ACEOF
24880
24881case $ac_config_files in *"
24882"*) set x $ac_config_files; shift; ac_config_files=$*;;
24883esac
24884
24885case $ac_config_headers in *"
24886"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24887esac
24888
24889
24890cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24891# Files that config.status was made for.
24892config_files="$ac_config_files"
24893config_headers="$ac_config_headers"
24894config_commands="$ac_config_commands"
24895
24896_ACEOF
24897
24898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24899ac_cs_usage="\
24900\`$as_me' instantiates files and other configuration actions
24901from templates according to the current configuration. Unless the files
24902and actions are specified as TAGs, all are instantiated by default.
24903
24904Usage: $0 [OPTION]... [TAG]...
24905
24906 -h, --help print this help, then exit
24907 -V, --version print version number and configuration settings, then exit
24908 --config print configuration, then exit
24909 -q, --quiet, --silent
24910 do not print progress messages
24911 -d, --debug don't remove temporary files
24912 --recheck update $as_me by reconfiguring in the same conditions
24913 --file=FILE[:TEMPLATE]
24914 instantiate the configuration file FILE
24915 --header=FILE[:TEMPLATE]
24916 instantiate the configuration header FILE
24917
24918Configuration files:
24919$config_files
24920
24921Configuration headers:
24922$config_headers
24923
24924Configuration commands:
24925$config_commands
24926
24927Report bugs to the package provider."
24928
24929_ACEOF
24930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24931ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
24932ac_cs_version="\\
250c8ab9 24933emacs config.status 24.2.50
a9bec17c 24934configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
24935 with options \\"\$ac_cs_config\\"
24936
a9bec17c 24937Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
24938This config.status script is free software; the Free Software Foundation
24939gives unlimited permission to copy, distribute and modify it."
24940
24941ac_pwd='$ac_pwd'
24942srcdir='$srcdir'
24943INSTALL='$INSTALL'
743c80a7
PE
24944MKDIR_P='$MKDIR_P'
24945AWK='$AWK'
067d23c9
KY
24946test -n "\$AWK" || AWK=awk
24947_ACEOF
24948
24949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24950# The default lists apply if the user does not specify any file.
24951ac_need_defaults=:
24952while test $# != 0
24953do
24954 case $1 in
a9bec17c 24955 --*=*)
067d23c9
KY
24956 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24957 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24958 ac_shift=:
24959 ;;
24960 *)
24961 ac_option=$1
24962 ac_optarg=$2
24963 ac_shift=shift
24964 ;;
24965 esac
24966
24967 case $ac_option in
24968 # Handling of the options.
24969 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24970 ac_cs_recheck=: ;;
24971 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24972 $as_echo "$ac_cs_version"; exit ;;
24973 --config | --confi | --conf | --con | --co | --c )
24974 $as_echo "$ac_cs_config"; exit ;;
24975 --debug | --debu | --deb | --de | --d | -d )
24976 debug=: ;;
24977 --file | --fil | --fi | --f )
24978 $ac_shift
24979 case $ac_optarg in
24980 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24981 esac
24982 as_fn_append CONFIG_FILES " '$ac_optarg'"
24983 ac_need_defaults=false;;
24984 --header | --heade | --head | --hea )
24985 $ac_shift
24986 case $ac_optarg in
24987 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24988 esac
24989 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24990 ac_need_defaults=false;;
24991 --he | --h)
24992 # Conflict between --help and --header
a9bec17c 24993 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
24994Try \`$0 --help' for more information.";;
24995 --help | --hel | -h )
24996 $as_echo "$ac_cs_usage"; exit ;;
24997 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24998 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24999 ac_cs_silent=: ;;
25000
25001 # This is an error.
a9bec17c 25002 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
25003Try \`$0 --help' for more information." ;;
25004
25005 *) as_fn_append ac_config_targets " $1"
25006 ac_need_defaults=false ;;
25007
25008 esac
25009 shift
25010done
25011
25012ac_configure_extra_args=
25013
25014if $ac_cs_silent; then
25015 exec 6>/dev/null
25016 ac_configure_extra_args="$ac_configure_extra_args --silent"
25017fi
25018
25019_ACEOF
25020cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25021if \$ac_cs_recheck; then
25022 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25023 shift
25024 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25025 CONFIG_SHELL='$SHELL'
25026 export CONFIG_SHELL
25027 exec "\$@"
25028fi
25029
25030_ACEOF
25031cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25032exec 5>>config.log
25033{
25034 echo
25035 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25036## Running $as_me. ##
25037_ASBOX
25038 $as_echo "$ac_log"
25039} >&5
25040
25041_ACEOF
25042cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25043#
25044# INIT-COMMANDS
25045#
743c80a7 25046AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 25047GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
25048
25049_ACEOF
25050
25051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25052
25053# Handling of arguments.
25054for ac_config_target in $ac_config_targets
25055do
25056 case $ac_config_target in
25057 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 25058 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
067d23c9 25059 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 25060 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
25061 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
25062 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
25063 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
25064 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
25065 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25066 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
25067 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
25068 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
25069 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
25070 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25071 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 25072 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
25073 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
25074 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
25075 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 25076
a9bec17c 25077 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
25078 esac
25079done
25080
25081
25082# If the user did not use the arguments to specify the items to instantiate,
25083# then the envvar interface is used. Set only those that are not.
25084# We use the long form for the default assignment because of an extremely
25085# bizarre bug on SunOS 4.1.3.
25086if $ac_need_defaults; then
25087 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25088 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25089 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25090fi
25091
25092# Have a temporary directory for convenience. Make it in the build tree
25093# simply because there is no reason against having it here, and in addition,
25094# creating and moving files from /tmp can sometimes cause problems.
25095# Hook for its removal unless debugging.
25096# Note that there is a small window in which the directory will not be cleaned:
25097# after its creation but before its name has been assigned to `$tmp'.
25098$debug ||
25099{
a9bec17c 25100 tmp=
067d23c9 25101 trap 'exit_status=$?
a9bec17c 25102 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
25103' 0
25104 trap 'as_fn_exit 1' 1 2 13 15
25105}
25106# Create a (secure) tmp directory for tmp files.
25107
25108{
25109 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 25110 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
25111} ||
25112{
25113 tmp=./conf$$-$RANDOM
25114 (umask 077 && mkdir "$tmp")
a9bec17c 25115} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
25116
25117# Set up the scripts for CONFIG_FILES section.
25118# No need to generate them if there are no CONFIG_FILES.
25119# This happens for instance with `./config.status config.h'.
25120if test -n "$CONFIG_FILES"; then
25121
25122if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
25123 ac_cs_awk_getline=:
25124 ac_cs_awk_pipe_init=
25125 ac_cs_awk_read_file='
25126 while ((getline aline < (F[key])) > 0)
25127 print(aline)
25128 close(F[key])'
25129 ac_cs_awk_pipe_fini=
25130else
25131 ac_cs_awk_getline=false
25132 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
25133 ac_cs_awk_read_file='
25134 print "|#_!!_#|"
25135 print "cat " F[key] " &&"
25136 '$ac_cs_awk_pipe_init
25137 # The final `:' finishes the AND list.
25138 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
25139fi
25140ac_cr=`echo X | tr X '\015'`
25141# On cygwin, bash can eat \r inside `` if the user requested igncr.
25142# But we know of no other shell where ac_cr would be empty at this
25143# point, so we can use a bashism as a fallback.
25144if test "x$ac_cr" = x; then
25145 eval ac_cr=\$\'\\r\'
25146fi
25147ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25148if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 25149 ac_cs_awk_cr='\r'
067d23c9
KY
25150else
25151 ac_cs_awk_cr=$ac_cr
25152fi
25153
a9bec17c 25154echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
25155_ACEOF
25156
25157# Create commands to substitute file output variables.
25158{
25159 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 25160 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
25161 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
25162 echo "_ACAWK" &&
25163 echo "_ACEOF"
25164} >conf$$files.sh &&
25165. ./conf$$files.sh ||
a9bec17c 25166 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25167rm -f conf$$files.sh
25168
25169{
25170 echo "cat >conf$$subs.awk <<_ACEOF" &&
25171 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25172 echo "_ACEOF"
25173} >conf$$subs.sh ||
a9bec17c
GM
25174 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25175ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
25176ac_delim='%!_!# '
25177for ac_last_try in false false false false false :; do
25178 . ./conf$$subs.sh ||
a9bec17c 25179 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25180
25181 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25182 if test $ac_delim_n = $ac_delim_num; then
25183 break
25184 elif $ac_last_try; then
a9bec17c 25185 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25186 else
25187 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25188 fi
25189done
25190rm -f conf$$subs.sh
25191
25192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 25193cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
25194_ACEOF
25195sed -n '
25196h
25197s/^/S["/; s/!.*/"]=/
25198p
25199g
25200s/^[^!]*!//
25201:repl
25202t repl
25203s/'"$ac_delim"'$//
25204t delim
25205:nl
25206h
25207s/\(.\{148\}\)..*/\1/
25208t more1
25209s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25210p
25211n
25212b repl
25213:more1
25214s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25215p
25216g
25217s/.\{148\}//
25218t nl
25219:delim
25220h
25221s/\(.\{148\}\)..*/\1/
25222t more2
25223s/["\\]/\\&/g; s/^/"/; s/$/"/
25224p
25225b
25226:more2
25227s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25228p
25229g
25230s/.\{148\}//
25231t delim
25232' <conf$$subs.awk | sed '
25233/^[^""]/{
25234 N
25235 s/\n//
25236}
25237' >>$CONFIG_STATUS || ac_write_fail=1
25238rm -f conf$$subs.awk
25239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25240_ACAWK
a9bec17c 25241cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
25242 for (key in S) S_is_set[key] = 1
25243 FS = "\a"
25244 \$ac_cs_awk_pipe_init
25245}
25246{
25247 line = $ 0
25248 nfields = split(line, field, "@")
25249 substed = 0
25250 len = length(field[1])
25251 for (i = 2; i < nfields; i++) {
25252 key = field[i]
25253 keylen = length(key)
25254 if (S_is_set[key]) {
25255 value = S[key]
25256 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25257 len += length(value) + length(field[++i])
25258 substed = 1
25259 } else
25260 len += 1 + keylen
25261 }
25262 if (nfields == 3 && !substed) {
25263 key = field[2]
25264 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
25265 \$ac_cs_awk_read_file
25266 next
25267 }
25268 }
25269 print line
25270}
25271\$ac_cs_awk_pipe_fini
25272_ACAWK
25273_ACEOF
25274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25275if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25276 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25277else
25278 cat
a9bec17c
GM
25279fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25280 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
25281_ACEOF
25282
a9bec17c
GM
25283# VPATH may cause trouble with some makes, so we remove $(srcdir),
25284# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
25285# trailing colons and then remove the whole line if VPATH becomes empty
25286# (actually we leave an empty line to preserve line numbers).
25287if test "x$srcdir" = x.; then
a9bec17c
GM
25288 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25289s/:*\$(srcdir):*/:/
25290s/:*\${srcdir}:*/:/
25291s/:*@srcdir@:*/:/
25292s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
25293s/:*$//
25294s/^[^=]*=[ ]*$//
25295}'
25296fi
25297
25298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25299fi # test -n "$CONFIG_FILES"
25300
25301# Set up the scripts for CONFIG_HEADERS section.
25302# No need to generate them if there are no CONFIG_HEADERS.
25303# This happens for instance with `./config.status Makefile'.
25304if test -n "$CONFIG_HEADERS"; then
a9bec17c 25305cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
25306BEGIN {
25307_ACEOF
25308
25309# Transform confdefs.h into an awk script `defines.awk', embedded as
25310# here-document in config.status, that substitutes the proper values into
25311# config.h.in to produce config.h.
25312
25313# Create a delimiter string that does not exist in confdefs.h, to ease
25314# handling of long lines.
25315ac_delim='%!_!# '
25316for ac_last_try in false false :; do
a9bec17c
GM
25317 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25318 if test -z "$ac_t"; then
067d23c9
KY
25319 break
25320 elif $ac_last_try; then
a9bec17c 25321 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
25322 else
25323 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25324 fi
25325done
25326
25327# For the awk script, D is an array of macro values keyed by name,
25328# likewise P contains macro parameters if any. Preserve backslash
25329# newline sequences.
25330
25331ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25332sed -n '
25333s/.\{148\}/&'"$ac_delim"'/g
25334t rset
25335:rset
25336s/^[ ]*#[ ]*define[ ][ ]*/ /
25337t def
25338d
25339:def
25340s/\\$//
25341t bsnl
25342s/["\\]/\\&/g
25343s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25344D["\1"]=" \3"/p
25345s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25346d
25347:bsnl
25348s/["\\]/\\&/g
25349s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25350D["\1"]=" \3\\\\\\n"\\/p
25351t cont
25352s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25353t cont
25354d
25355:cont
25356n
25357s/.\{148\}/&'"$ac_delim"'/g
25358t clear
25359:clear
25360s/\\$//
25361t bsnlc
25362s/["\\]/\\&/g; s/^/"/; s/$/"/p
25363d
25364:bsnlc
25365s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25366b cont
25367' <confdefs.h | sed '
25368s/'"$ac_delim"'/"\\\
25369"/g' >>$CONFIG_STATUS || ac_write_fail=1
25370
25371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25372 for (key in D) D_is_set[key] = 1
25373 FS = "\a"
25374}
25375/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25376 line = \$ 0
25377 split(line, arg, " ")
25378 if (arg[1] == "#") {
25379 defundef = arg[2]
25380 mac1 = arg[3]
25381 } else {
25382 defundef = substr(arg[1], 2)
25383 mac1 = arg[2]
25384 }
25385 split(mac1, mac2, "(") #)
25386 macro = mac2[1]
25387 prefix = substr(line, 1, index(line, defundef) - 1)
25388 if (D_is_set[macro]) {
25389 # Preserve the white space surrounding the "#".
25390 print prefix "define", macro P[macro] D[macro]
25391 next
25392 } else {
25393 # Replace #undef with comments. This is necessary, for example,
25394 # in the case of _POSIX_SOURCE, which is predefined and required
25395 # on some systems where configure will not decide to define it.
25396 if (defundef == "undef") {
25397 print "/*", prefix defundef, macro, "*/"
25398 next
25399 }
25400 }
25401}
25402{ print }
25403_ACAWK
25404_ACEOF
25405cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 25406 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
25407fi # test -n "$CONFIG_HEADERS"
25408
25409
25410eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25411shift
25412for ac_tag
25413do
25414 case $ac_tag in
25415 :[FHLC]) ac_mode=$ac_tag; continue;;
25416 esac
25417 case $ac_mode$ac_tag in
25418 :[FHL]*:*);;
a9bec17c 25419 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
25420 :[FH]-) ac_tag=-:-;;
25421 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25422 esac
25423 ac_save_IFS=$IFS
25424 IFS=:
25425 set x $ac_tag
25426 IFS=$ac_save_IFS
25427 shift
25428 ac_file=$1
25429 shift
25430
25431 case $ac_mode in
25432 :L) ac_source=$1;;
25433 :[FH])
25434 ac_file_inputs=
25435 for ac_f
25436 do
25437 case $ac_f in
a9bec17c 25438 -) ac_f="$tmp/stdin";;
067d23c9
KY
25439 *) # Look for the file first in the build tree, then in the source tree
25440 # (if the path is not absolute). The absolute path cannot be DOS-style,
25441 # because $ac_f cannot contain `:'.
25442 test -f "$ac_f" ||
25443 case $ac_f in
25444 [\\/$]*) false;;
25445 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25446 esac ||
a9bec17c 25447 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
25448 esac
25449 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25450 as_fn_append ac_file_inputs " '$ac_f'"
25451 done
25452
25453 # Let's still pretend it is `configure' which instantiates (i.e., don't
25454 # use $as_me), people would be surprised to read:
25455 # /* config.h. Generated by config.status. */
25456 configure_input='Generated from '`
25457 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25458 `' by configure.'
25459 if test x"$ac_file" != x-; then
25460 configure_input="$ac_file. $configure_input"
25461 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25462$as_echo "$as_me: creating $ac_file" >&6;}
25463 fi
25464 # Neutralize special characters interpreted by sed in replacement strings.
25465 case $configure_input in #(
25466 *\&* | *\|* | *\\* )
25467 ac_sed_conf_input=`$as_echo "$configure_input" |
25468 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25469 *) ac_sed_conf_input=$configure_input;;
25470 esac
25471
25472 case $ac_tag in
a9bec17c
GM
25473 *:-:* | *:-) cat >"$tmp/stdin" \
25474 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
25475 esac
25476 ;;
25477 esac
25478
25479 ac_dir=`$as_dirname -- "$ac_file" ||
25480$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25481 X"$ac_file" : 'X\(//\)[^/]' \| \
25482 X"$ac_file" : 'X\(//\)$' \| \
25483 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25484$as_echo X"$ac_file" |
25485 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25486 s//\1/
25487 q
25488 }
25489 /^X\(\/\/\)[^/].*/{
25490 s//\1/
25491 q
25492 }
25493 /^X\(\/\/\)$/{
25494 s//\1/
25495 q
25496 }
25497 /^X\(\/\).*/{
25498 s//\1/
25499 q
25500 }
25501 s/.*/./; q'`
25502 as_dir="$ac_dir"; as_fn_mkdir_p
25503 ac_builddir=.
25504
25505case "$ac_dir" in
25506.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25507*)
25508 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25509 # A ".." for each directory in $ac_dir_suffix.
25510 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25511 case $ac_top_builddir_sub in
25512 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25513 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25514 esac ;;
25515esac
25516ac_abs_top_builddir=$ac_pwd
25517ac_abs_builddir=$ac_pwd$ac_dir_suffix
25518# for backward compatibility:
25519ac_top_builddir=$ac_top_build_prefix
25520
25521case $srcdir in
25522 .) # We are building in place.
25523 ac_srcdir=.
25524 ac_top_srcdir=$ac_top_builddir_sub
25525 ac_abs_top_srcdir=$ac_pwd ;;
25526 [\\/]* | ?:[\\/]* ) # Absolute name.
25527 ac_srcdir=$srcdir$ac_dir_suffix;
25528 ac_top_srcdir=$srcdir
25529 ac_abs_top_srcdir=$srcdir ;;
25530 *) # Relative name.
25531 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25532 ac_top_srcdir=$ac_top_build_prefix$srcdir
25533 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25534esac
25535ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25536
25537
25538 case $ac_mode in
25539 :F)
25540 #
25541 # CONFIG_FILE
25542 #
25543
25544 case $INSTALL in
25545 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25546 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25547 esac
743c80a7
PE
25548 ac_MKDIR_P=$MKDIR_P
25549 case $MKDIR_P in
25550 [\\/$]* | ?:[\\/]* ) ;;
25551 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25552 esac
067d23c9
KY
25553_ACEOF
25554
25555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25556# If the template does not know about datarootdir, expand it.
25557# FIXME: This hack should be removed a few years after 2.60.
25558ac_datarootdir_hack=; ac_datarootdir_seen=
25559ac_sed_dataroot='
25560/datarootdir/ {
25561 p
25562 q
25563}
25564/@datadir@/p
25565/@docdir@/p
25566/@infodir@/p
25567/@localedir@/p
25568/@mandir@/p'
25569case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25570*datarootdir*) ac_datarootdir_seen=yes;;
25571*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25573$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25574_ACEOF
25575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25576 ac_datarootdir_hack='
25577 s&@datadir@&$datadir&g
25578 s&@docdir@&$docdir&g
25579 s&@infodir@&$infodir&g
25580 s&@localedir@&$localedir&g
25581 s&@mandir@&$mandir&g
25582 s&\\\${datarootdir}&$datarootdir&g' ;;
25583esac
25584_ACEOF
25585
25586# Neutralize VPATH when `$srcdir' = `.'.
25587# Shell code in configure.ac might set extrasub.
25588# FIXME: do we really want to maintain this feature?
25589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25590ac_sed_extra="$ac_vpsub
25591$extrasub
25592_ACEOF
25593cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25594:t
25595/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25596s|@configure_input@|$ac_sed_conf_input|;t t
25597s&@top_builddir@&$ac_top_builddir_sub&;t t
25598s&@top_build_prefix@&$ac_top_build_prefix&;t t
25599s&@srcdir@&$ac_srcdir&;t t
25600s&@abs_srcdir@&$ac_abs_srcdir&;t t
25601s&@top_srcdir@&$ac_top_srcdir&;t t
25602s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25603s&@builddir@&$ac_builddir&;t t
25604s&@abs_builddir@&$ac_abs_builddir&;t t
25605s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25606s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 25607s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
25608$ac_datarootdir_hack
25609"
25610eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
25611if $ac_cs_awk_getline; then
a9bec17c 25612 $AWK -f "$tmp/subs.awk"
067d23c9 25613else
a9bec17c
GM
25614 $AWK -f "$tmp/subs.awk" | $SHELL
25615fi >$tmp/out \
25616 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25617
25618test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
25619 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25620 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 25621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 25622which seems to be undefined. Please make sure it is defined." >&5
067d23c9 25623$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 25624which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 25625
a9bec17c 25626 rm -f "$tmp/stdin"
067d23c9 25627 case $ac_file in
a9bec17c
GM
25628 -) cat "$tmp/out" && rm -f "$tmp/out";;
25629 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 25630 esac \
a9bec17c 25631 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25632 ;;
25633 :H)
25634 #
25635 # CONFIG_HEADER
25636 #
25637 if test x"$ac_file" != x-; then
25638 {
25639 $as_echo "/* $configure_input */" \
a9bec17c
GM
25640 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25641 } >"$tmp/config.h" \
25642 || as_fn_error "could not create $ac_file" "$LINENO" 5
25643 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
25644 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25645$as_echo "$as_me: $ac_file is unchanged" >&6;}
25646 else
25647 rm -f "$ac_file"
a9bec17c
GM
25648 mv "$tmp/config.h" "$ac_file" \
25649 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25650 fi
25651 else
25652 $as_echo "/* $configure_input */" \
a9bec17c
GM
25653 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25654 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 25655 fi
743c80a7
PE
25656# Compute "$ac_file"'s index in $config_headers.
25657_am_arg="$ac_file"
25658_am_stamp_count=1
25659for _am_header in $config_headers :; do
25660 case $_am_header in
25661 $_am_arg | $_am_arg:* )
25662 break ;;
25663 * )
25664 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25665 esac
25666done
25667echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25668$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25669 X"$_am_arg" : 'X\(//\)[^/]' \| \
25670 X"$_am_arg" : 'X\(//\)$' \| \
25671 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25672$as_echo X"$_am_arg" |
25673 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25674 s//\1/
25675 q
25676 }
25677 /^X\(\/\/\)[^/].*/{
25678 s//\1/
25679 q
25680 }
25681 /^X\(\/\/\)$/{
25682 s//\1/
25683 q
25684 }
25685 /^X\(\/\).*/{
25686 s//\1/
25687 q
25688 }
25689 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
25690 ;;
25691
25692 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25693$as_echo "$as_me: executing $ac_file commands" >&6;}
25694 ;;
25695 esac
25696
25697
25698 case $ac_file$ac_mode in
743c80a7
PE
25699 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25700 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25701 # are listed without --file. Let's play safe and only enable the eval
25702 # if we detect the quoting.
25703 case $CONFIG_FILES in
25704 *\'*) eval set x "$CONFIG_FILES" ;;
25705 *) set x $CONFIG_FILES ;;
25706 esac
25707 shift
25708 for mf
25709 do
25710 # Strip MF so we end up with the name of the file.
25711 mf=`echo "$mf" | sed -e 's/:.*$//'`
25712 # Check whether this is an Automake generated Makefile or not.
25713 # We used to match only the files named `Makefile.in', but
25714 # some people rename them; so instead we look at the file content.
25715 # Grep'ing the first line is not enough: some people post-process
25716 # each Makefile.in and add a new line on top of each file to say so.
25717 # Grep'ing the whole file is not good either: AIX grep has a line
25718 # limit of 2048, but all sed's we know have understand at least 4000.
25719 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25720 dirpart=`$as_dirname -- "$mf" ||
25721$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25722 X"$mf" : 'X\(//\)[^/]' \| \
25723 X"$mf" : 'X\(//\)$' \| \
25724 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25725$as_echo X"$mf" |
25726 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25727 s//\1/
25728 q
25729 }
25730 /^X\(\/\/\)[^/].*/{
25731 s//\1/
25732 q
25733 }
25734 /^X\(\/\/\)$/{
25735 s//\1/
25736 q
25737 }
25738 /^X\(\/\).*/{
25739 s//\1/
25740 q
25741 }
25742 s/.*/./; q'`
25743 else
25744 continue
25745 fi
25746 # Extract the definition of DEPDIR, am__include, and am__quote
25747 # from the Makefile without running `make'.
25748 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25749 test -z "$DEPDIR" && continue
25750 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25751 test -z "am__include" && continue
25752 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25753 # When using ansi2knr, U may be empty or an underscore; expand it
25754 U=`sed -n 's/^U = //p' < "$mf"`
25755 # Find all dependency output files, they are included files with
25756 # $(DEPDIR) in their names. We invoke sed twice because it is the
25757 # simplest approach to changing $(DEPDIR) to its actual value in the
25758 # expansion.
25759 for file in `sed -n "
25760 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25761 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25762 # Make sure the directory exists.
25763 test -f "$dirpart/$file" && continue
25764 fdir=`$as_dirname -- "$file" ||
25765$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25766 X"$file" : 'X\(//\)[^/]' \| \
25767 X"$file" : 'X\(//\)$' \| \
25768 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25769$as_echo X"$file" |
25770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25771 s//\1/
25772 q
25773 }
25774 /^X\(\/\/\)[^/].*/{
25775 s//\1/
25776 q
25777 }
25778 /^X\(\/\/\)$/{
25779 s//\1/
25780 q
25781 }
25782 /^X\(\/\).*/{
25783 s//\1/
25784 q
25785 }
25786 s/.*/./; q'`
25787 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25788 # echo "creating $dirpart/$file"
25789 echo '# dummy' > "$dirpart/$file"
25790 done
25791 done
25792}
25793 ;;
9411886d 25794 "mkdirs":C)
067d23c9
KY
25795for dir in etc lisp ; do
25796 test -d ${dir} || mkdir ${dir}
25797done
9411886d
PE
25798 ;;
25799 "epaths":C)
067d23c9 25800echo creating src/epaths.h
906debc3 25801${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
25802 ;;
25803 "gdbinit":C)
067d23c9
KY
25804if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
25805 echo creating src/.gdbinit
25806 echo source $srcdir/src/.gdbinit > src/.gdbinit
25807fi
067d23c9
KY
25808 ;;
25809
25810 esac
25811done # for ac_tag
25812
25813
25814as_fn_exit 0
25815_ACEOF
25816ac_clean_files=$ac_clean_files_save
25817
25818test $ac_write_fail = 0 ||
a9bec17c 25819 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25820
25821
25822# configure is writing to config.log, and then calls config.status.
25823# config.status does its own redirection, appending to config.log.
25824# Unfortunately, on DOS this fails, as config.log is still kept open
25825# by configure, so config.status won't be able to write to it; its
25826# output is simply discarded. So we exec the FD to /dev/null,
25827# effectively closing config.log, so it can be properly (re)opened and
25828# appended to by config.status. When coming back to configure, we
25829# need to make the FD available again.
25830if test "$no_create" != yes; then
25831 ac_cs_success=:
25832 ac_config_status_args=
25833 test "$silent" = yes &&
25834 ac_config_status_args="$ac_config_status_args --quiet"
25835 exec 5>/dev/null
25836 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25837 exec 5>>config.log
25838 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25839 # would make configure fail if this is the last instruction.
a9bec17c 25840 $ac_cs_success || as_fn_exit $?
067d23c9
KY
25841fi
25842if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25844$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25845fi
25846