136
# Required to use basename.
137
if expr a : '\(a\)' >/dev/null 2>&1 &&
138
test "X`expr 00001 : '.*\(...\)'`" = X001; then
144
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
151
# Name of the executable.
152
as_me=`$as_basename -- "$0" ||
153
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
154
X"$0" : 'X\(//\)$' \| \
155
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
157
sed '/^.*\/\([^/][^/]*\)\/*$/{
136
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
175
138
if test "x$CONFIG_SHELL" = x; then
176
if (eval ":") 2>/dev/null; then
139
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143
# is contrary to our usage. Disable this feature.
144
alias -g '\${1+\"\$@\"}'='\"\$@\"'
147
case \`(set -o) 2>/dev/null\` in #(
155
as_required="as_fn_return () { (exit \$1); }
156
as_fn_success () { as_fn_return 0; }
157
as_fn_failure () { as_fn_return 1; }
158
as_fn_ret_success () { return 0; }
159
as_fn_ret_failure () { return 1; }
162
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
exitcode=1; echo positional parameters were not saved.
171
test x\$exitcode = x0 || exit 1"
172
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176
test \$(( 1 + 1 )) = 2 || exit 1"
177
if (eval "$as_required") 2>/dev/null; then :
177
178
as_have_required=yes
179
180
as_have_required=no
182
if test $as_have_required = yes && (eval ":
192
as_func_ret_success () {
195
as_func_ret_failure () {
200
if as_func_success; then
204
echo as_func_success failed.
207
if as_func_failure; then
209
echo as_func_failure succeeded.
212
if as_func_ret_success; then
216
echo as_func_ret_success failed.
219
if as_func_ret_failure; then
221
echo as_func_ret_failure succeeded.
224
if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
228
echo positional parameters were not saved.
231
test \$exitcode = 0) || { (exit 1); exit 1; }
236
test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
237
test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
238
") 2> /dev/null; then
242
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
243
187
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
246
190
test -z "$as_dir" && as_dir=.
249
194
for as_base in sh bash ksh sh5; do
250
as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
195
# Try only shells that exist, to save several forks.
196
as_shell=$as_dir/$as_base
197
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199
CONFIG_SHELL=$as_shell as_have_required=yes
200
if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
208
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210
CONFIG_SHELL=$SHELL as_have_required=yes
257
for as_shell in $as_candidate_shells $SHELL; do
258
# Try only shells that exist, to save several forks.
259
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
260
{ ("$as_shell") 2> /dev/null <<\_ASEOF
261
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
264
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
265
# is contrary to our usage. Disable this feature.
266
alias -g '${1+"$@"}'='"$@"'
269
case `(set -o) 2>/dev/null` in
270
*posix*) set -o posix ;;
279
CONFIG_SHELL=$as_shell
281
if { "$as_shell" 2> /dev/null <<\_ASEOF
282
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
285
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
286
# is contrary to our usage. Disable this feature.
287
alias -g '${1+"$@"}'='"$@"'
290
case `(set -o) 2>/dev/null` in
291
*posix*) set -o posix ;;
307
as_func_ret_success () {
310
as_func_ret_failure () {
315
if as_func_success; then
319
echo as_func_success failed.
322
if as_func_failure; then
324
echo as_func_failure succeeded.
327
if as_func_ret_success; then
331
echo as_func_ret_success failed.
334
if as_func_ret_failure; then
336
echo as_func_ret_failure succeeded.
339
if ( set x; as_func_ret_success y && test x = "$1" ); then
343
echo positional parameters were not saved.
346
test $exitcode = 0) || { (exit 1); exit 1; }
351
test "x$as_lineno_1" != "x$as_lineno_2" &&
352
test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
363
if test "x$CONFIG_SHELL" != x; then
364
for as_var in BASH_ENV ENV
365
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
215
if test "x$CONFIG_SHELL" != x; then :
216
# We cannot yet assume a decent shell, so we have to provide a
217
# neutralization value for shells without unset; and this also
218
# works around shells that cannot unset nonexistent variables.
221
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
367
222
export CONFIG_SHELL
368
223
exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
372
if test $as_have_required = no; then
373
echo This script requires a shell more modern than all the
374
echo shells that I found on your system. Please install a
375
echo modern shell, or manually run the script under such a
376
echo shell if you do have one.
377
{ (exit 1); exit 1; }
387
(eval "as_func_return () {
396
as_func_ret_success () {
399
as_func_ret_failure () {
404
if as_func_success; then
408
echo as_func_success failed.
411
if as_func_failure; then
413
echo as_func_failure succeeded.
416
if as_func_ret_success; then
420
echo as_func_ret_success failed.
423
if as_func_ret_failure; then
425
echo as_func_ret_failure succeeded.
428
if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
432
echo positional parameters were not saved.
435
test \$exitcode = 0") || {
436
echo No shell found that supports shell functions.
437
echo Please tell bug-autoconf@gnu.org about your system,
438
echo including any error possibly output before this message.
439
echo This can help us improve future autoconf versions.
440
echo Configuration will now proceed without shell functions.
447
test "x$as_lineno_1" != "x$as_lineno_2" &&
448
test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
450
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
451
# uniformly replaced by the line number. The first 'sed' inserts a
452
# line-number line after each line using $LINENO; the second 'sed'
453
# does the real work. The second script uses 'N' to pair each
454
# line-number line with the line containing $LINENO, and appends
455
# trailing '-' during substitution so that $LINENO is not a special
457
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
458
# scripts with optimization help from Paolo Bonzini. Blame Lee
459
# E. McMahon (1931-1989) for sed's syntax. :-)
226
if test x$as_have_required = xno; then :
227
$as_echo "$0: This script requires a shell more modern than all"
228
$as_echo "$0: the shells that I found on your system."
229
if test x${ZSH_VERSION+set} = xset ; then
230
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
233
$as_echo "$0: Please tell bug-autoconf@gnu.org and bug-hello@gnu.org
234
$0: about your system, including any error possibly output
235
$0: before this message. Then install a modern shell, or
236
$0: manually run the script under such a shell if you do
243
SHELL=${CONFIG_SHELL-/bin/sh}
245
# Unset more variables known to interfere with behavior of common tools.
246
CLICOLOR_FORCE= GREP_OPTIONS=
247
unset CLICOLOR_FORCE GREP_OPTIONS
249
## --------------------- ##
250
## M4sh Shell Functions. ##
251
## --------------------- ##
254
# Portably unset VAR.
257
{ eval $1=; unset $1;}
261
# as_fn_set_status STATUS
262
# -----------------------
263
# Set $? to STATUS, without forking.
271
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281
# Create "$as_dir" as a directory, including parents if necessary.
286
-*) as_dir=./$as_dir;;
288
test -d "$as_dir" || eval $as_mkdir_p || {
292
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
295
as_dirs="'$as_qdir' $as_dirs"
296
as_dir=`$as_dirname -- "$as_dir" ||
297
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298
X"$as_dir" : 'X\(//\)[^/]' \| \
299
X"$as_dir" : 'X\(//\)$' \| \
300
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301
$as_echo X"$as_dir" |
302
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
319
test -d "$as_dir" && break
321
test -z "$as_dirs" || eval "mkdir $as_dirs"
322
} || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
326
# as_fn_append VAR VALUE
327
# ----------------------
328
# Append the text in VALUE to the end of the definition contained in VAR. Take
329
# advantage of any shell optimizations that allow amortized linear growth over
330
# repeated appends, instead of the typical quadratic growth present in naive
332
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333
eval 'as_fn_append ()
346
# Perform arithmetic evaluation on the ARGs, and store the result in the
347
# global $as_val. Take advantage of shells that can avoid forks. The arguments
348
# must be portable across $(()) and expr.
349
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
357
as_val=`expr "$@" || test $? -eq 1`
362
# as_fn_error ERROR [LINENO LOG_FD]
363
# ---------------------------------
364
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366
# script with status $?, using 1 if that was 0.
369
as_status=$?; test $as_status -eq 0 && as_status=1
371
as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372
$as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
374
$as_echo "$as_me: error: $1" >&2
375
as_fn_exit $as_status
378
if expr a : '\(a\)' >/dev/null 2>&1 &&
379
test "X`expr 00001 : '.*\(...\)'`" = X001; then
385
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
391
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
397
as_me=`$as_basename -- "$0" ||
398
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399
X"$0" : 'X\(//\)$' \| \
400
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
402
sed '/^.*\/\([^/][^/]*\)\/*$/{
416
# Avoid depending upon Character Ranges.
417
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420
as_cr_digits='0123456789'
421
as_cr_alnum=$as_cr_Letters$as_cr_digits
424
as_lineno_1=$LINENO as_lineno_1a=$LINENO
425
as_lineno_2=$LINENO as_lineno_2a=$LINENO
426
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428
# Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
1661
1755
test -n "$ac_init_help" && exit $ac_status
1662
1756
if $ac_init_version; then
1664
GNU Hello configure 2.4
1665
generated by GNU Autoconf 2.63
1758
GNU Hello configure 2.5
1759
generated by GNU Autoconf 2.65
1667
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1668
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1761
Copyright (C) 2009 Free Software Foundation, Inc.
1669
1762
This configure script is free software; the Free Software Foundation
1670
1763
gives unlimited permission to copy, distribute and modify it.
1768
## ------------------------ ##
1769
## Autoconf initialization. ##
1770
## ------------------------ ##
1772
# ac_fn_c_try_compile LINENO
1773
# --------------------------
1774
# Try to compile conftest.$ac_ext, and return whether this succeeded.
1775
ac_fn_c_try_compile ()
1777
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778
rm -f conftest.$ac_objext
1779
if { { ac_try="$ac_compile"
1781
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782
*) ac_try_echo=$ac_try;;
1784
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785
$as_echo "$ac_try_echo"; } >&5
1786
(eval "$ac_compile") 2>conftest.err
1788
if test -s conftest.err; then
1789
grep -v '^ *+' conftest.err >conftest.er1
1790
cat conftest.er1 >&5
1791
mv -f conftest.er1 conftest.err
1793
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794
test $ac_status = 0; } && {
1795
test -z "$ac_c_werror_flag" ||
1796
test ! -s conftest.err
1797
} && test -s conftest.$ac_objext; then :
1800
$as_echo "$as_me: failed program was:" >&5
1801
sed 's/^/| /' conftest.$ac_ext >&5
1805
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1806
as_fn_set_status $ac_retval
1808
} # ac_fn_c_try_compile
1810
# ac_fn_c_try_cpp LINENO
1811
# ----------------------
1812
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1815
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816
if { { ac_try="$ac_cpp conftest.$ac_ext"
1818
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819
*) ac_try_echo=$ac_try;;
1821
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1822
$as_echo "$ac_try_echo"; } >&5
1823
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1825
if test -s conftest.err; then
1826
grep -v '^ *+' conftest.err >conftest.er1
1827
cat conftest.er1 >&5
1828
mv -f conftest.er1 conftest.err
1830
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831
test $ac_status = 0; } >/dev/null && {
1832
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1833
test ! -s conftest.err
1837
$as_echo "$as_me: failed program was:" >&5
1838
sed 's/^/| /' conftest.$ac_ext >&5
1842
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1843
as_fn_set_status $ac_retval
1847
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1848
# -------------------------------------------------------
1849
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1850
# the include files in INCLUDES and setting the cache variable VAR
1852
ac_fn_c_check_header_mongrel ()
1854
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1855
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1856
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1857
$as_echo_n "checking for $2... " >&6; }
1858
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1859
$as_echo_n "(cached) " >&6
1862
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1863
$as_echo "$ac_res" >&6; }
1865
# Is the header compilable?
1866
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1867
$as_echo_n "checking $2 usability... " >&6; }
1868
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869
/* end confdefs.h. */
1873
if ac_fn_c_try_compile "$LINENO"; then :
1874
ac_header_compiler=yes
1876
ac_header_compiler=no
1878
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1880
$as_echo "$ac_header_compiler" >&6; }
1882
# Is the header present?
1883
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1884
$as_echo_n "checking $2 presence... " >&6; }
1885
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886
/* end confdefs.h. */
1889
if ac_fn_c_try_cpp "$LINENO"; then :
1890
ac_header_preproc=yes
1892
ac_header_preproc=no
1894
rm -f conftest.err conftest.$ac_ext
1895
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1896
$as_echo "$ac_header_preproc" >&6; }
1898
# So? What about this header?
1899
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1901
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1902
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1903
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1904
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1907
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1908
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1909
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1910
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1911
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1912
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1913
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1914
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1915
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1916
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1918
## -------------------------------- ##
1919
## Report this to bug-hello@gnu.org ##
1920
## -------------------------------- ##
1922
) | sed "s/^/$as_me: WARNING: /" >&2
1925
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926
$as_echo_n "checking for $2... " >&6; }
1927
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1928
$as_echo_n "(cached) " >&6
1930
eval "$3=\$ac_header_compiler"
1933
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1934
$as_echo "$ac_res" >&6; }
1936
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938
} # ac_fn_c_check_header_mongrel
1940
# ac_fn_c_try_run LINENO
1941
# ----------------------
1942
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1943
# that executables *can* be run.
1946
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947
if { { ac_try="$ac_link"
1949
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950
*) ac_try_echo=$ac_try;;
1952
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953
$as_echo "$ac_try_echo"; } >&5
1954
(eval "$ac_link") 2>&5
1956
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1957
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1958
{ { case "(($ac_try" in
1959
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960
*) ac_try_echo=$ac_try;;
1962
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963
$as_echo "$ac_try_echo"; } >&5
1964
(eval "$ac_try") 2>&5
1966
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1967
test $ac_status = 0; }; }; then :
1970
$as_echo "$as_me: program exited with status $ac_status" >&5
1971
$as_echo "$as_me: failed program was:" >&5
1972
sed 's/^/| /' conftest.$ac_ext >&5
1974
ac_retval=$ac_status
1976
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1977
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1978
as_fn_set_status $ac_retval
1982
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1983
# -------------------------------------------------------
1984
# Tests whether HEADER exists and can be compiled using the include files in
1985
# INCLUDES, setting the cache variable VAR accordingly.
1986
ac_fn_c_check_header_compile ()
1988
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1990
$as_echo_n "checking for $2... " >&6; }
1991
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1992
$as_echo_n "(cached) " >&6
1994
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995
/* end confdefs.h. */
1999
if ac_fn_c_try_compile "$LINENO"; then :
2004
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2007
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2008
$as_echo "$ac_res" >&6; }
2009
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011
} # ac_fn_c_check_header_compile
2013
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2014
# --------------------------------------------
2015
# Tries to find the compile-time value of EXPR in a program that includes
2016
# INCLUDES, setting VAR accordingly. Returns whether the value could be
2018
ac_fn_c_compute_int ()
2020
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021
if test "$cross_compiling" = yes; then
2022
# Depending upon the size, compute the lo and hi bounds.
2023
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024
/* end confdefs.h. */
2029
static int test_array [1 - 2 * !(($2) >= 0)];
2036
if ac_fn_c_try_compile "$LINENO"; then :
2039
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040
/* end confdefs.h. */
2045
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2052
if ac_fn_c_try_compile "$LINENO"; then :
2053
ac_hi=$ac_mid; break
2055
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2056
if test $ac_lo -le $ac_mid; then
2060
as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2062
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2065
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066
/* end confdefs.h. */
2071
static int test_array [1 - 2 * !(($2) < 0)];
2078
if ac_fn_c_try_compile "$LINENO"; then :
2081
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082
/* end confdefs.h. */
2087
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2094
if ac_fn_c_try_compile "$LINENO"; then :
2095
ac_lo=$ac_mid; break
2097
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2098
if test $ac_mid -le $ac_hi; then
2102
as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2104
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112
# Binary search between lo and hi bounds.
2113
while test "x$ac_lo" != "x$ac_hi"; do
2114
as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2115
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116
/* end confdefs.h. */
2121
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2128
if ac_fn_c_try_compile "$LINENO"; then :
2131
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2133
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2140
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141
/* end confdefs.h. */
2143
static long int longval () { return $2; }
2144
static unsigned long int ulongval () { return $2; }
2151
FILE *f = fopen ("conftest.val", "w");
2156
long int i = longval ();
2159
fprintf (f, "%ld", i);
2163
unsigned long int i = ulongval ();
2166
fprintf (f, "%lu", i);
2168
/* Do not output a trailing newline, as this causes \r\n confusion
2169
on some platforms. */
2170
return ferror (f) || fclose (f) != 0;
2176
if ac_fn_c_try_run "$LINENO"; then :
2177
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2181
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2182
conftest.$ac_objext conftest.beam conftest.$ac_ext
2186
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2187
as_fn_set_status $ac_retval
2189
} # ac_fn_c_compute_int
2191
# ac_fn_c_try_link LINENO
2192
# -----------------------
2193
# Try to link conftest.$ac_ext, and return whether this succeeded.
2196
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197
rm -f conftest.$ac_objext conftest$ac_exeext
2198
if { { ac_try="$ac_link"
2200
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201
*) ac_try_echo=$ac_try;;
2203
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204
$as_echo "$ac_try_echo"; } >&5
2205
(eval "$ac_link") 2>conftest.err
2207
if test -s conftest.err; then
2208
grep -v '^ *+' conftest.err >conftest.er1
2209
cat conftest.er1 >&5
2210
mv -f conftest.er1 conftest.err
2212
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213
test $ac_status = 0; } && {
2214
test -z "$ac_c_werror_flag" ||
2215
test ! -s conftest.err
2216
} && test -s conftest$ac_exeext && {
2217
test "$cross_compiling" = yes ||
2218
$as_test_x conftest$ac_exeext
2222
$as_echo "$as_me: failed program was:" >&5
2223
sed 's/^/| /' conftest.$ac_ext >&5
2227
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2228
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2229
# interfere with the next link command; also delete a directory that is
2230
# left behind by Apple's compiler. We do this before executing the actions.
2231
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2232
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2233
as_fn_set_status $ac_retval
2235
} # ac_fn_c_try_link
2237
# ac_fn_c_check_decl LINENO SYMBOL VAR
2238
# ------------------------------------
2239
# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2240
ac_fn_c_check_decl ()
2242
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2244
$as_echo_n "checking whether $2 is declared... " >&6; }
2245
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2246
$as_echo_n "(cached) " >&6
2248
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249
/* end confdefs.h. */
2262
if ac_fn_c_try_compile "$LINENO"; then :
2267
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2271
$as_echo "$ac_res" >&6; }
2272
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2274
} # ac_fn_c_check_decl
2276
# ac_fn_c_check_func LINENO FUNC VAR
2277
# ----------------------------------
2278
# Tests whether FUNC exists, setting the cache variable VAR accordingly
2279
ac_fn_c_check_func ()
2281
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2283
$as_echo_n "checking for $2... " >&6; }
2284
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2285
$as_echo_n "(cached) " >&6
2287
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288
/* end confdefs.h. */
2289
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2290
For example, HP-UX 11i <limits.h> declares gettimeofday. */
2291
#define $2 innocuous_$2
2293
/* System header to define __stub macros and hopefully few prototypes,
2294
which can conflict with char $2 (); below.
2295
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2296
<limits.h> exists even on freestanding compilers. */
2299
# include <limits.h>
2301
# include <assert.h>
2306
/* Override any GCC internal prototype to avoid an error.
2307
Use char because int might match the return type of a GCC
2308
builtin and then its argument prototype would still apply. */
2313
/* The GNU C library defines this for functions which it implements
2314
to always fail with ENOSYS. Some functions are actually named
2315
something starting with __ and the normal name is an alias. */
2316
#if defined __stub_$2 || defined __stub___$2
2328
if ac_fn_c_try_link "$LINENO"; then :
2333
rm -f core conftest.err conftest.$ac_objext \
2334
conftest$ac_exeext conftest.$ac_ext
2337
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338
$as_echo "$ac_res" >&6; }
2339
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2341
} # ac_fn_c_check_func
2343
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2344
# -------------------------------------------
2345
# Tests whether TYPE exists after having included INCLUDES, setting cache
2346
# variable VAR accordingly.
2347
ac_fn_c_check_type ()
2349
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2351
$as_echo_n "checking for $2... " >&6; }
2352
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2353
$as_echo_n "(cached) " >&6
2356
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357
/* end confdefs.h. */
2368
if ac_fn_c_try_compile "$LINENO"; then :
2369
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370
/* end confdefs.h. */
2381
if ac_fn_c_try_compile "$LINENO"; then :
2386
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2392
$as_echo "$ac_res" >&6; }
2393
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2395
} # ac_fn_c_check_type
1674
2396
cat >config.log <<_ACEOF
1675
2397
This file contains any messages produced by compilers while
1676
2398
running configure, to aid debugging if configure makes a mistake.
1678
It was created by GNU Hello $as_me 2.4, which was
1679
generated by GNU Autoconf 2.63. Invocation command line was
2400
It was created by GNU Hello $as_me 2.5, which was
2401
generated by GNU Autoconf 2.65. Invocation command line was
4649
4939
#define DEFINED_IN_CONFTESTD2
4651
save_CPPFLAGS="$CPPFLAGS"
4652
CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4653
cat >conftest.$ac_ext <<_ACEOF
4941
gl_save_CPPFLAGS="$CPPFLAGS"
4942
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
4943
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4944
/* end confdefs.h. */
4654
4945
#include <conftest.h>
4656
rm -f conftest.$ac_objext
4657
if { (ac_try="$ac_compile"
4659
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4660
*) ac_try_echo=$ac_try;;
4662
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4663
$as_echo "$ac_try_echo") >&5
4664
(eval "$ac_compile") 2>conftest.er1
4666
grep -v '^ *+' conftest.er1 >conftest.err
4668
cat conftest.err >&5
4669
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4670
(exit $ac_status); } && {
4671
test -z "$ac_c_werror_flag" ||
4672
test ! -s conftest.err
4673
} && test -s conftest.$ac_objext; then
4947
if ac_fn_c_try_compile "$LINENO"; then :
4674
4948
gl_cv_have_include_next=yes
4676
$as_echo "$as_me: failed program was:" >&5
4677
sed 's/^/| /' conftest.$ac_ext >&5
4679
gl_cv_have_include_next=no
4682
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683
CPPFLAGS="$save_CPPFLAGS"
4684
rm -rf conftestd1 conftestd2
4687
{ $as_echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4950
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
4951
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4952
/* end confdefs.h. */
4953
#include <conftest.h>
4955
if ac_fn_c_try_compile "$LINENO"; then :
4956
gl_cv_have_include_next=buggy
4958
gl_cv_have_include_next=no
4960
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4963
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964
CPPFLAGS="$gl_save_CPPFLAGS"
4965
rm -rf conftestd1a conftestd1b conftestd2
4968
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
4688
4969
$as_echo "$gl_cv_have_include_next" >&6; }
4689
4970
PRAGMA_SYSTEM_HEADER=
4690
4971
if test $gl_cv_have_include_next = yes; then
4691
4972
INCLUDE_NEXT=include_next
4973
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
4692
4974
if test -n "$GCC"; then
4693
4975
PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
4696
INCLUDE_NEXT=include
4978
if test $gl_cv_have_include_next = buggy; then
4979
INCLUDE_NEXT=include
4980
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
4982
INCLUDE_NEXT=include
4983
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
4701
# Make sure we can run config.sub.
4702
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4703
{ { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
4704
$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
4705
{ (exit 1); exit 1; }; }
4707
{ $as_echo "$as_me:$LINENO: checking build system type" >&5
4708
$as_echo_n "checking build system type... " >&6; }
4709
if test "${ac_cv_build+set}" = set; then
4710
$as_echo_n "(cached) " >&6
4712
ac_build_alias=$build_alias
4713
test "x$ac_build_alias" = x &&
4714
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4715
test "x$ac_build_alias" = x &&
4716
{ { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
4717
$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
4718
{ (exit 1); exit 1; }; }
4719
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4720
{ { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
4721
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
4722
{ (exit 1); exit 1; }; }
4725
{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
4726
$as_echo "$ac_cv_build" >&6; }
4727
case $ac_cv_build in
4729
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
4730
$as_echo "$as_me: error: invalid value of canonical build" >&2;}
4731
{ (exit 1); exit 1; }; };;
4734
ac_save_IFS=$IFS; IFS='-'
4740
# Remember, the first character of IFS is used to create $*,
4741
# except with old shells:
4744
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4747
{ $as_echo "$as_me:$LINENO: checking host system type" >&5
4748
$as_echo_n "checking host system type... " >&6; }
4749
if test "${ac_cv_host+set}" = set; then
4750
$as_echo_n "(cached) " >&6
4752
if test "x$host_alias" = x; then
4753
ac_cv_host=$ac_cv_build
4755
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4756
{ { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
4757
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
4758
{ (exit 1); exit 1; }; }
4762
{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
4763
$as_echo "$ac_cv_host" >&6; }
4766
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
4767
$as_echo "$as_me: error: invalid value of canonical host" >&2;}
4768
{ (exit 1); exit 1; }; };;
4771
ac_save_IFS=$IFS; IFS='-'
4777
# Remember, the first character of IFS is used to create $*,
4778
# except with old shells:
4781
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4788
for ac_header in $ac_header_list
4790
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4791
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4792
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4793
$as_echo_n "checking for $ac_header... " >&6; }
4794
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4795
$as_echo_n "(cached) " >&6
4797
ac_res=`eval 'as_val=${'$as_ac_Header'}
4798
$as_echo "$as_val"'`
4799
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4800
$as_echo "$ac_res" >&6; }
4802
# Is the header compilable?
4803
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
4804
$as_echo_n "checking $ac_header usability... " >&6; }
4805
cat >conftest.$ac_ext <<_ACEOF
4808
cat confdefs.h >>conftest.$ac_ext
4809
cat >>conftest.$ac_ext <<_ACEOF
4810
/* end confdefs.h. */
4811
$ac_includes_default
4812
#include <$ac_header>
4814
rm -f conftest.$ac_objext
4815
if { (ac_try="$ac_compile"
4817
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4818
*) ac_try_echo=$ac_try;;
4820
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4821
$as_echo "$ac_try_echo") >&5
4822
(eval "$ac_compile") 2>conftest.er1
4824
grep -v '^ *+' conftest.er1 >conftest.err
4826
cat conftest.err >&5
4827
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828
(exit $ac_status); } && {
4829
test -z "$ac_c_werror_flag" ||
4830
test ! -s conftest.err
4831
} && test -s conftest.$ac_objext; then
4832
ac_header_compiler=yes
4834
$as_echo "$as_me: failed program was:" >&5
4835
sed 's/^/| /' conftest.$ac_ext >&5
4837
ac_header_compiler=no
4840
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4841
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4842
$as_echo "$ac_header_compiler" >&6; }
4844
# Is the header present?
4845
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
4846
$as_echo_n "checking $ac_header presence... " >&6; }
4847
cat >conftest.$ac_ext <<_ACEOF
4850
cat confdefs.h >>conftest.$ac_ext
4851
cat >>conftest.$ac_ext <<_ACEOF
4852
/* end confdefs.h. */
4853
#include <$ac_header>
4855
if { (ac_try="$ac_cpp conftest.$ac_ext"
4857
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4858
*) ac_try_echo=$ac_try;;
4860
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4861
$as_echo "$ac_try_echo") >&5
4862
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4864
grep -v '^ *+' conftest.er1 >conftest.err
4866
cat conftest.err >&5
4867
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868
(exit $ac_status); } >/dev/null && {
4869
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4870
test ! -s conftest.err
4872
ac_header_preproc=yes
4874
$as_echo "$as_me: failed program was:" >&5
4875
sed 's/^/| /' conftest.$ac_ext >&5
4877
ac_header_preproc=no
4880
rm -f conftest.err conftest.$ac_ext
4881
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4882
$as_echo "$ac_header_preproc" >&6; }
4884
# So? What about this header?
4885
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4887
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4888
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4889
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4890
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4891
ac_header_preproc=yes
4894
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4895
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4896
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4897
$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4898
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4899
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4900
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4901
$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4902
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4903
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4904
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4905
$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4907
## -------------------------------- ##
4908
## Report this to bug-hello@gnu.org ##
4909
## -------------------------------- ##
4911
) | sed "s/^/$as_me: WARNING: /" >&2
4914
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4915
$as_echo_n "checking for $ac_header... " >&6; }
4916
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4917
$as_echo_n "(cached) " >&6
4919
eval "$as_ac_Header=\$ac_header_preproc"
4921
ac_res=`eval 'as_val=${'$as_ac_Header'}
4922
$as_echo "$as_val"'`
4923
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4924
$as_echo "$ac_res" >&6; }
4927
as_val=`eval 'as_val=${'$as_ac_Header'}
4928
$as_echo "$as_val"'`
4929
if test "x$as_val" = x""yes; then
4993
for ac_header in $ac_header_list
4995
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4996
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4998
eval as_val=\$$as_ac_Header
4999
if test "x$as_val" = x""yes; then :
4930
5000
cat >>confdefs.h <<_ACEOF
4931
5001
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5100
5161
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5101
$EGREP "yes" >/dev/null 2>&1; then
5162
$EGREP "yes" >/dev/null 2>&1; then :
5102
5163
gl_cv_header_errno_h_EMULTIHOP=hidden
5104
5165
rm -f conftest*
5106
5167
if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
5107
if test "$cross_compiling" = yes; then
5108
# Depending upon the size, compute the lo and hi bounds.
5109
cat >conftest.$ac_ext <<_ACEOF
5112
cat confdefs.h >>conftest.$ac_ext
5113
cat >>conftest.$ac_ext <<_ACEOF
5114
/* end confdefs.h. */
5116
#define _XOPEN_SOURCE_EXTENDED 1
5118
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5125
static int test_array [1 - 2 * !((EMULTIHOP) >= 0)];
5132
rm -f conftest.$ac_objext
5133
if { (ac_try="$ac_compile"
5135
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5136
*) ac_try_echo=$ac_try;;
5138
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5139
$as_echo "$ac_try_echo") >&5
5140
(eval "$ac_compile") 2>conftest.er1
5142
grep -v '^ *+' conftest.er1 >conftest.err
5144
cat conftest.err >&5
5145
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146
(exit $ac_status); } && {
5147
test -z "$ac_c_werror_flag" ||
5148
test ! -s conftest.err
5149
} && test -s conftest.$ac_objext; then
5152
cat >conftest.$ac_ext <<_ACEOF
5155
cat confdefs.h >>conftest.$ac_ext
5156
cat >>conftest.$ac_ext <<_ACEOF
5157
/* end confdefs.h. */
5159
#define _XOPEN_SOURCE_EXTENDED 1
5161
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5168
static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)];
5175
rm -f conftest.$ac_objext
5176
if { (ac_try="$ac_compile"
5178
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5179
*) ac_try_echo=$ac_try;;
5181
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5182
$as_echo "$ac_try_echo") >&5
5183
(eval "$ac_compile") 2>conftest.er1
5185
grep -v '^ *+' conftest.er1 >conftest.err
5187
cat conftest.err >&5
5188
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189
(exit $ac_status); } && {
5190
test -z "$ac_c_werror_flag" ||
5191
test ! -s conftest.err
5192
} && test -s conftest.$ac_objext; then
5193
ac_hi=$ac_mid; break
5195
$as_echo "$as_me: failed program was:" >&5
5196
sed 's/^/| /' conftest.$ac_ext >&5
5198
ac_lo=`expr $ac_mid + 1`
5199
if test $ac_lo -le $ac_mid; then
5203
ac_mid=`expr 2 '*' $ac_mid + 1`
5206
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5209
$as_echo "$as_me: failed program was:" >&5
5210
sed 's/^/| /' conftest.$ac_ext >&5
5212
cat >conftest.$ac_ext <<_ACEOF
5215
cat confdefs.h >>conftest.$ac_ext
5216
cat >>conftest.$ac_ext <<_ACEOF
5217
/* end confdefs.h. */
5219
#define _XOPEN_SOURCE_EXTENDED 1
5221
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5228
static int test_array [1 - 2 * !((EMULTIHOP) < 0)];
5235
rm -f conftest.$ac_objext
5236
if { (ac_try="$ac_compile"
5238
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5239
*) ac_try_echo=$ac_try;;
5241
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5242
$as_echo "$ac_try_echo") >&5
5243
(eval "$ac_compile") 2>conftest.er1
5245
grep -v '^ *+' conftest.er1 >conftest.err
5247
cat conftest.err >&5
5248
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5249
(exit $ac_status); } && {
5250
test -z "$ac_c_werror_flag" ||
5251
test ! -s conftest.err
5252
} && test -s conftest.$ac_objext; then
5255
cat >conftest.$ac_ext <<_ACEOF
5258
cat confdefs.h >>conftest.$ac_ext
5259
cat >>conftest.$ac_ext <<_ACEOF
5260
/* end confdefs.h. */
5262
#define _XOPEN_SOURCE_EXTENDED 1
5264
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5271
static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)];
5278
rm -f conftest.$ac_objext
5279
if { (ac_try="$ac_compile"
5281
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5282
*) ac_try_echo=$ac_try;;
5284
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5285
$as_echo "$ac_try_echo") >&5
5286
(eval "$ac_compile") 2>conftest.er1
5288
grep -v '^ *+' conftest.er1 >conftest.err
5290
cat conftest.err >&5
5291
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292
(exit $ac_status); } && {
5293
test -z "$ac_c_werror_flag" ||
5294
test ! -s conftest.err
5295
} && test -s conftest.$ac_objext; then
5296
ac_lo=$ac_mid; break
5298
$as_echo "$as_me: failed program was:" >&5
5299
sed 's/^/| /' conftest.$ac_ext >&5
5301
ac_hi=`expr '(' $ac_mid ')' - 1`
5302
if test $ac_mid -le $ac_hi; then
5306
ac_mid=`expr 2 '*' $ac_mid`
5309
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5312
$as_echo "$as_me: failed program was:" >&5
5313
sed 's/^/| /' conftest.$ac_ext >&5
5318
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5321
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322
# Binary search between lo and hi bounds.
5323
while test "x$ac_lo" != "x$ac_hi"; do
5324
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5325
cat >conftest.$ac_ext <<_ACEOF
5328
cat confdefs.h >>conftest.$ac_ext
5329
cat >>conftest.$ac_ext <<_ACEOF
5330
/* end confdefs.h. */
5332
#define _XOPEN_SOURCE_EXTENDED 1
5334
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5341
static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)];
5348
rm -f conftest.$ac_objext
5349
if { (ac_try="$ac_compile"
5351
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5352
*) ac_try_echo=$ac_try;;
5354
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5355
$as_echo "$ac_try_echo") >&5
5356
(eval "$ac_compile") 2>conftest.er1
5358
grep -v '^ *+' conftest.er1 >conftest.err
5360
cat conftest.err >&5
5361
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362
(exit $ac_status); } && {
5363
test -z "$ac_c_werror_flag" ||
5364
test ! -s conftest.err
5365
} && test -s conftest.$ac_objext; then
5368
$as_echo "$as_me: failed program was:" >&5
5369
sed 's/^/| /' conftest.$ac_ext >&5
5371
ac_lo=`expr '(' $ac_mid ')' + 1`
5374
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377
?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;;
5381
cat >conftest.$ac_ext <<_ACEOF
5384
cat confdefs.h >>conftest.$ac_ext
5385
cat >>conftest.$ac_ext <<_ACEOF
5386
/* end confdefs.h. */
5388
#define _XOPEN_SOURCE_EXTENDED 1
5390
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5394
static long int longval () { return EMULTIHOP; }
5395
static unsigned long int ulongval () { return EMULTIHOP; }
5402
FILE *f = fopen ("conftest.val", "w");
5405
if ((EMULTIHOP) < 0)
5407
long int i = longval ();
5408
if (i != (EMULTIHOP))
5410
fprintf (f, "%ld", i);
5414
unsigned long int i = ulongval ();
5415
if (i != (EMULTIHOP))
5417
fprintf (f, "%lu", i);
5419
/* Do not output a trailing newline, as this causes \r\n confusion
5420
on some platforms. */
5421
return ferror (f) || fclose (f) != 0;
5427
rm -f conftest$ac_exeext
5428
if { (ac_try="$ac_link"
5430
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5431
*) ac_try_echo=$ac_try;;
5433
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5434
$as_echo "$ac_try_echo") >&5
5435
(eval "$ac_link") 2>&5
5437
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5439
{ (case "(($ac_try" in
5440
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5441
*) ac_try_echo=$ac_try;;
5443
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5444
$as_echo "$ac_try_echo") >&5
5445
(eval "$ac_try") 2>&5
5447
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448
(exit $ac_status); }; }; then
5449
gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val`
5451
$as_echo "$as_me: program exited with status $ac_status" >&5
5452
$as_echo "$as_me: failed program was:" >&5
5453
sed 's/^/| /' conftest.$ac_ext >&5
5456
rm -rf conftest.dSYM
5457
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5168
if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
5169
#define _XOPEN_SOURCE_EXTENDED 1
5171
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5464
{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
5182
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
5465
5183
$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
5466
5184
case $gl_cv_header_errno_h_EMULTIHOP in
5522
5232
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5523
$EGREP "yes" >/dev/null 2>&1; then
5233
$EGREP "yes" >/dev/null 2>&1; then :
5524
5234
gl_cv_header_errno_h_ENOLINK=hidden
5526
5236
rm -f conftest*
5528
5238
if test $gl_cv_header_errno_h_ENOLINK = hidden; then
5529
if test "$cross_compiling" = yes; then
5530
# Depending upon the size, compute the lo and hi bounds.
5531
cat >conftest.$ac_ext <<_ACEOF
5534
cat confdefs.h >>conftest.$ac_ext
5535
cat >>conftest.$ac_ext <<_ACEOF
5536
/* end confdefs.h. */
5538
#define _XOPEN_SOURCE_EXTENDED 1
5540
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5547
static int test_array [1 - 2 * !((ENOLINK) >= 0)];
5554
rm -f conftest.$ac_objext
5555
if { (ac_try="$ac_compile"
5557
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5558
*) ac_try_echo=$ac_try;;
5560
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5561
$as_echo "$ac_try_echo") >&5
5562
(eval "$ac_compile") 2>conftest.er1
5564
grep -v '^ *+' conftest.er1 >conftest.err
5566
cat conftest.err >&5
5567
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568
(exit $ac_status); } && {
5569
test -z "$ac_c_werror_flag" ||
5570
test ! -s conftest.err
5571
} && test -s conftest.$ac_objext; then
5574
cat >conftest.$ac_ext <<_ACEOF
5577
cat confdefs.h >>conftest.$ac_ext
5578
cat >>conftest.$ac_ext <<_ACEOF
5579
/* end confdefs.h. */
5581
#define _XOPEN_SOURCE_EXTENDED 1
5583
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5590
static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)];
5597
rm -f conftest.$ac_objext
5598
if { (ac_try="$ac_compile"
5600
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5601
*) ac_try_echo=$ac_try;;
5603
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5604
$as_echo "$ac_try_echo") >&5
5605
(eval "$ac_compile") 2>conftest.er1
5607
grep -v '^ *+' conftest.er1 >conftest.err
5609
cat conftest.err >&5
5610
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611
(exit $ac_status); } && {
5612
test -z "$ac_c_werror_flag" ||
5613
test ! -s conftest.err
5614
} && test -s conftest.$ac_objext; then
5615
ac_hi=$ac_mid; break
5617
$as_echo "$as_me: failed program was:" >&5
5618
sed 's/^/| /' conftest.$ac_ext >&5
5620
ac_lo=`expr $ac_mid + 1`
5621
if test $ac_lo -le $ac_mid; then
5625
ac_mid=`expr 2 '*' $ac_mid + 1`
5628
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631
$as_echo "$as_me: failed program was:" >&5
5632
sed 's/^/| /' conftest.$ac_ext >&5
5634
cat >conftest.$ac_ext <<_ACEOF
5637
cat confdefs.h >>conftest.$ac_ext
5638
cat >>conftest.$ac_ext <<_ACEOF
5639
/* end confdefs.h. */
5641
#define _XOPEN_SOURCE_EXTENDED 1
5643
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5650
static int test_array [1 - 2 * !((ENOLINK) < 0)];
5657
rm -f conftest.$ac_objext
5658
if { (ac_try="$ac_compile"
5660
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5661
*) ac_try_echo=$ac_try;;
5663
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5664
$as_echo "$ac_try_echo") >&5
5665
(eval "$ac_compile") 2>conftest.er1
5667
grep -v '^ *+' conftest.er1 >conftest.err
5669
cat conftest.err >&5
5670
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5671
(exit $ac_status); } && {
5672
test -z "$ac_c_werror_flag" ||
5673
test ! -s conftest.err
5674
} && test -s conftest.$ac_objext; then
5677
cat >conftest.$ac_ext <<_ACEOF
5680
cat confdefs.h >>conftest.$ac_ext
5681
cat >>conftest.$ac_ext <<_ACEOF
5682
/* end confdefs.h. */
5684
#define _XOPEN_SOURCE_EXTENDED 1
5686
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5693
static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)];
5700
rm -f conftest.$ac_objext
5701
if { (ac_try="$ac_compile"
5703
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5704
*) ac_try_echo=$ac_try;;
5706
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5707
$as_echo "$ac_try_echo") >&5
5708
(eval "$ac_compile") 2>conftest.er1
5710
grep -v '^ *+' conftest.er1 >conftest.err
5712
cat conftest.err >&5
5713
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714
(exit $ac_status); } && {
5715
test -z "$ac_c_werror_flag" ||
5716
test ! -s conftest.err
5717
} && test -s conftest.$ac_objext; then
5718
ac_lo=$ac_mid; break
5720
$as_echo "$as_me: failed program was:" >&5
5721
sed 's/^/| /' conftest.$ac_ext >&5
5723
ac_hi=`expr '(' $ac_mid ')' - 1`
5724
if test $ac_mid -le $ac_hi; then
5728
ac_mid=`expr 2 '*' $ac_mid`
5731
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5734
$as_echo "$as_me: failed program was:" >&5
5735
sed 's/^/| /' conftest.$ac_ext >&5
5740
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5743
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5744
# Binary search between lo and hi bounds.
5745
while test "x$ac_lo" != "x$ac_hi"; do
5746
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5747
cat >conftest.$ac_ext <<_ACEOF
5750
cat confdefs.h >>conftest.$ac_ext
5751
cat >>conftest.$ac_ext <<_ACEOF
5752
/* end confdefs.h. */
5754
#define _XOPEN_SOURCE_EXTENDED 1
5756
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5763
static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)];
5770
rm -f conftest.$ac_objext
5771
if { (ac_try="$ac_compile"
5773
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5774
*) ac_try_echo=$ac_try;;
5776
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5777
$as_echo "$ac_try_echo") >&5
5778
(eval "$ac_compile") 2>conftest.er1
5780
grep -v '^ *+' conftest.er1 >conftest.err
5782
cat conftest.err >&5
5783
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5784
(exit $ac_status); } && {
5785
test -z "$ac_c_werror_flag" ||
5786
test ! -s conftest.err
5787
} && test -s conftest.$ac_objext; then
5790
$as_echo "$as_me: failed program was:" >&5
5791
sed 's/^/| /' conftest.$ac_ext >&5
5793
ac_lo=`expr '(' $ac_mid ')' + 1`
5796
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5799
?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;;
5803
cat >conftest.$ac_ext <<_ACEOF
5806
cat confdefs.h >>conftest.$ac_ext
5807
cat >>conftest.$ac_ext <<_ACEOF
5808
/* end confdefs.h. */
5810
#define _XOPEN_SOURCE_EXTENDED 1
5812
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5816
static long int longval () { return ENOLINK; }
5817
static unsigned long int ulongval () { return ENOLINK; }
5824
FILE *f = fopen ("conftest.val", "w");
5829
long int i = longval ();
5832
fprintf (f, "%ld", i);
5836
unsigned long int i = ulongval ();
5839
fprintf (f, "%lu", i);
5841
/* Do not output a trailing newline, as this causes \r\n confusion
5842
on some platforms. */
5843
return ferror (f) || fclose (f) != 0;
5849
rm -f conftest$ac_exeext
5850
if { (ac_try="$ac_link"
5852
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5853
*) ac_try_echo=$ac_try;;
5855
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5856
$as_echo "$ac_try_echo") >&5
5857
(eval "$ac_link") 2>&5
5859
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5861
{ (case "(($ac_try" in
5862
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5863
*) ac_try_echo=$ac_try;;
5865
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5866
$as_echo "$ac_try_echo") >&5
5867
(eval "$ac_try") 2>&5
5869
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870
(exit $ac_status); }; }; then
5871
gl_cv_header_errno_h_ENOLINK=`cat conftest.val`
5873
$as_echo "$as_me: program exited with status $ac_status" >&5
5874
$as_echo "$as_me: failed program was:" >&5
5875
sed 's/^/| /' conftest.$ac_ext >&5
5878
rm -rf conftest.dSYM
5879
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5239
if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
5240
#define _XOPEN_SOURCE_EXTENDED 1
5242
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5886
{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5
5253
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
5887
5254
$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
5888
5255
case $gl_cv_header_errno_h_ENOLINK in
5944
5303
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5945
$EGREP "yes" >/dev/null 2>&1; then
5304
$EGREP "yes" >/dev/null 2>&1; then :
5946
5305
gl_cv_header_errno_h_EOVERFLOW=hidden
5948
5307
rm -f conftest*
5950
5309
if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
5951
if test "$cross_compiling" = yes; then
5952
# Depending upon the size, compute the lo and hi bounds.
5953
cat >conftest.$ac_ext <<_ACEOF
5956
cat confdefs.h >>conftest.$ac_ext
5957
cat >>conftest.$ac_ext <<_ACEOF
5958
/* end confdefs.h. */
5960
#define _XOPEN_SOURCE_EXTENDED 1
5962
/* The following two lines are a workaround against an autoconf-2.52 bug. */
5969
static int test_array [1 - 2 * !((EOVERFLOW) >= 0)];
5976
rm -f conftest.$ac_objext
5977
if { (ac_try="$ac_compile"
5979
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5980
*) ac_try_echo=$ac_try;;
5982
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5983
$as_echo "$ac_try_echo") >&5
5984
(eval "$ac_compile") 2>conftest.er1
5986
grep -v '^ *+' conftest.er1 >conftest.err
5988
cat conftest.err >&5
5989
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990
(exit $ac_status); } && {
5991
test -z "$ac_c_werror_flag" ||
5992
test ! -s conftest.err
5993
} && test -s conftest.$ac_objext; then
5996
cat >conftest.$ac_ext <<_ACEOF
5999
cat confdefs.h >>conftest.$ac_ext
6000
cat >>conftest.$ac_ext <<_ACEOF
6001
/* end confdefs.h. */
6003
#define _XOPEN_SOURCE_EXTENDED 1
6005
/* The following two lines are a workaround against an autoconf-2.52 bug. */
6012
static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
6019
rm -f conftest.$ac_objext
6020
if { (ac_try="$ac_compile"
6022
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6023
*) ac_try_echo=$ac_try;;
6025
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6026
$as_echo "$ac_try_echo") >&5
6027
(eval "$ac_compile") 2>conftest.er1
6029
grep -v '^ *+' conftest.er1 >conftest.err
6031
cat conftest.err >&5
6032
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033
(exit $ac_status); } && {
6034
test -z "$ac_c_werror_flag" ||
6035
test ! -s conftest.err
6036
} && test -s conftest.$ac_objext; then
6037
ac_hi=$ac_mid; break
6039
$as_echo "$as_me: failed program was:" >&5
6040
sed 's/^/| /' conftest.$ac_ext >&5
6042
ac_lo=`expr $ac_mid + 1`
6043
if test $ac_lo -le $ac_mid; then
6047
ac_mid=`expr 2 '*' $ac_mid + 1`
6050
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6053
$as_echo "$as_me: failed program was:" >&5
6054
sed 's/^/| /' conftest.$ac_ext >&5
6056
cat >conftest.$ac_ext <<_ACEOF
6059
cat confdefs.h >>conftest.$ac_ext
6060
cat >>conftest.$ac_ext <<_ACEOF
6061
/* end confdefs.h. */
6063
#define _XOPEN_SOURCE_EXTENDED 1
6065
/* The following two lines are a workaround against an autoconf-2.52 bug. */
6072
static int test_array [1 - 2 * !((EOVERFLOW) < 0)];
6079
rm -f conftest.$ac_objext
6080
if { (ac_try="$ac_compile"
6082
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6083
*) ac_try_echo=$ac_try;;
6085
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6086
$as_echo "$ac_try_echo") >&5
6087
(eval "$ac_compile") 2>conftest.er1
6089
grep -v '^ *+' conftest.er1 >conftest.err
6091
cat conftest.err >&5
6092
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093
(exit $ac_status); } && {
6094
test -z "$ac_c_werror_flag" ||
6095
test ! -s conftest.err
6096
} && test -s conftest.$ac_objext; then
6099
cat >conftest.$ac_ext <<_ACEOF
6102
cat confdefs.h >>conftest.$ac_ext
6103
cat >>conftest.$ac_ext <<_ACEOF
6104
/* end confdefs.h. */
6106
#define _XOPEN_SOURCE_EXTENDED 1
6108
/* The following two lines are a workaround against an autoconf-2.52 bug. */
6115
static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)];
6122
rm -f conftest.$ac_objext
6123
if { (ac_try="$ac_compile"
6125
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6126
*) ac_try_echo=$ac_try;;
6128
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6129
$as_echo "$ac_try_echo") >&5
6130
(eval "$ac_compile") 2>conftest.er1
6132
grep -v '^ *+' conftest.er1 >conftest.err
6134
cat conftest.err >&5
6135
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136
(exit $ac_status); } && {
6137
test -z "$ac_c_werror_flag" ||
6138
test ! -s conftest.err
6139
} && test -s conftest.$ac_objext; then
6140
ac_lo=$ac_mid; break
6142
$as_echo "$as_me: failed program was:" >&5
6143
sed 's/^/| /' conftest.$ac_ext >&5
6145
ac_hi=`expr '(' $ac_mid ')' - 1`
6146
if test $ac_mid -le $ac_hi; then
6150
ac_mid=`expr 2 '*' $ac_mid`
6153
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6156
$as_echo "$as_me: failed program was:" >&5
6157
sed 's/^/| /' conftest.$ac_ext >&5
6162
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6165
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6166
# Binary search between lo and hi bounds.
6167
while test "x$ac_lo" != "x$ac_hi"; do
6168
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6169
cat >conftest.$ac_ext <<_ACEOF
6172
cat confdefs.h >>conftest.$ac_ext
6173
cat >>conftest.$ac_ext <<_ACEOF
6174
/* end confdefs.h. */
6176
#define _XOPEN_SOURCE_EXTENDED 1
6178
/* The following two lines are a workaround against an autoconf-2.52 bug. */
6185
static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
6192
rm -f conftest.$ac_objext
6193
if { (ac_try="$ac_compile"
6195
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6196
*) ac_try_echo=$ac_try;;
6198
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6199
$as_echo "$ac_try_echo") >&5
6200
(eval "$ac_compile") 2>conftest.er1
6202
grep -v '^ *+' conftest.er1 >conftest.err
6204
cat conftest.err >&5
6205
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206
(exit $ac_status); } && {
6207
test -z "$ac_c_werror_flag" ||
6208
test ! -s conftest.err
6209
} && test -s conftest.$ac_objext; then
6212
$as_echo "$as_me: failed program was:" >&5
6213
sed 's/^/| /' conftest.$ac_ext >&5
6215
ac_lo=`expr '(' $ac_mid ')' + 1`
6218
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6221
?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;;
6225
cat >conftest.$ac_ext <<_ACEOF
6228
cat confdefs.h >>conftest.$ac_ext
6229
cat >>conftest.$ac_ext <<_ACEOF
6230
/* end confdefs.h. */
6232
#define _XOPEN_SOURCE_EXTENDED 1
6234
/* The following two lines are a workaround against an autoconf-2.52 bug. */
6238
static long int longval () { return EOVERFLOW; }
6239
static unsigned long int ulongval () { return EOVERFLOW; }
6246
FILE *f = fopen ("conftest.val", "w");
6249
if ((EOVERFLOW) < 0)
6251
long int i = longval ();
6252
if (i != (EOVERFLOW))
6254
fprintf (f, "%ld", i);
6258
unsigned long int i = ulongval ();
6259
if (i != (EOVERFLOW))
6261
fprintf (f, "%lu", i);
6263
/* Do not output a trailing newline, as this causes \r\n confusion
6264
on some platforms. */
6265
return ferror (f) || fclose (f) != 0;
6271
rm -f conftest$ac_exeext
6272
if { (ac_try="$ac_link"
6274
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6275
*) ac_try_echo=$ac_try;;
6277
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6278
$as_echo "$ac_try_echo") >&5
6279
(eval "$ac_link") 2>&5
6281
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6283
{ (case "(($ac_try" in
6284
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6285
*) ac_try_echo=$ac_try;;
6287
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6288
$as_echo "$ac_try_echo") >&5
6289
(eval "$ac_try") 2>&5
6291
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292
(exit $ac_status); }; }; then
6293
gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val`
6295
$as_echo "$as_me: program exited with status $ac_status" >&5
6296
$as_echo "$as_me: failed program was:" >&5
6297
sed 's/^/| /' conftest.$ac_ext >&5
6300
rm -rf conftest.dSYM
6301
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5310
if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
5311
#define _XOPEN_SOURCE_EXTENDED 1
5313
/* The following two lines are a workaround against an autoconf-2.52 bug. */
6308
{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
5324
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
6309
5325
$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
6310
5326
case $gl_cv_header_errno_h_EOVERFLOW in
6576
rm -f conftest$ac_exeext
6577
if { (ac_try="$ac_link"
6579
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6580
*) ac_try_echo=$ac_try;;
6582
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6583
$as_echo "$ac_try_echo") >&5
6584
(eval "$ac_link") 2>&5
6586
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6588
{ (case "(($ac_try" in
6589
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6590
*) ac_try_echo=$ac_try;;
6592
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6593
$as_echo "$ac_try_echo") >&5
6594
(eval "$ac_try") 2>&5
6596
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597
(exit $ac_status); }; }; then
5413
if ac_fn_c_try_run "$LINENO"; then :
6598
5414
ac_cv_func_strerror_r_char_p=yes
6600
$as_echo "$as_me: program exited with status $ac_status" >&5
6601
$as_echo "$as_me: failed program was:" >&5
6602
sed 's/^/| /' conftest.$ac_ext >&5
6605
rm -rf conftest.dSYM
6606
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5416
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5417
conftest.$ac_objext conftest.beam conftest.$ac_ext
6613
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
5423
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
6614
5424
$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
6615
5425
if test $ac_cv_func_strerror_r_char_p = yes; then
6617
cat >>confdefs.h <<\_ACEOF
6618
#define STRERROR_R_CHAR_P 1
6624
XGETTEXT_EXTRA_OPTIONS=
6632
for ac_func in $ac_func_list
6634
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6635
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
6636
$as_echo_n "checking for $ac_func... " >&6; }
6637
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6638
$as_echo_n "(cached) " >&6
6640
cat >conftest.$ac_ext <<_ACEOF
6643
cat confdefs.h >>conftest.$ac_ext
6644
cat >>conftest.$ac_ext <<_ACEOF
6645
/* end confdefs.h. */
6646
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6647
For example, HP-UX 11i <limits.h> declares gettimeofday. */
6648
#define $ac_func innocuous_$ac_func
6650
/* System header to define __stub macros and hopefully few prototypes,
6651
which can conflict with char $ac_func (); below.
6652
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6653
<limits.h> exists even on freestanding compilers. */
6656
# include <limits.h>
6658
# include <assert.h>
6663
/* Override any GCC internal prototype to avoid an error.
6664
Use char because int might match the return type of a GCC
6665
builtin and then its argument prototype would still apply. */
6670
/* The GNU C library defines this for functions which it implements
6671
to always fail with ENOSYS. Some functions are actually named
6672
something starting with __ and the normal name is an alias. */
6673
#if defined __stub_$ac_func || defined __stub___$ac_func
6685
rm -f conftest.$ac_objext conftest$ac_exeext
6686
if { (ac_try="$ac_link"
6688
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6689
*) ac_try_echo=$ac_try;;
6691
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6692
$as_echo "$ac_try_echo") >&5
6693
(eval "$ac_link") 2>conftest.er1
6695
grep -v '^ *+' conftest.er1 >conftest.err
6697
cat conftest.err >&5
6698
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699
(exit $ac_status); } && {
6700
test -z "$ac_c_werror_flag" ||
6701
test ! -s conftest.err
6702
} && test -s conftest$ac_exeext && {
6703
test "$cross_compiling" = yes ||
6704
$as_test_x conftest$ac_exeext
6706
eval "$as_ac_var=yes"
6708
$as_echo "$as_me: failed program was:" >&5
6709
sed 's/^/| /' conftest.$ac_ext >&5
6711
eval "$as_ac_var=no"
6714
rm -rf conftest.dSYM
6715
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6716
conftest$ac_exeext conftest.$ac_ext
6718
ac_res=`eval 'as_val=${'$as_ac_var'}
6719
$as_echo "$as_val"'`
6720
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6721
$as_echo "$ac_res" >&6; }
6722
as_val=`eval 'as_val=${'$as_ac_var'}
6723
$as_echo "$as_val"'`
6724
if test "x$as_val" = x""yes; then
6725
cat >>confdefs.h <<_ACEOF
6726
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6735
if test -z "$GETOPT_H"; then
6737
for ac_header in getopt.h
6739
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6740
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6741
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6742
$as_echo_n "checking for $ac_header... " >&6; }
6743
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6744
$as_echo_n "(cached) " >&6
6746
ac_res=`eval 'as_val=${'$as_ac_Header'}
6747
$as_echo "$as_val"'`
6748
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6749
$as_echo "$ac_res" >&6; }
6751
# Is the header compilable?
6752
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6753
$as_echo_n "checking $ac_header usability... " >&6; }
6754
cat >conftest.$ac_ext <<_ACEOF
6757
cat confdefs.h >>conftest.$ac_ext
6758
cat >>conftest.$ac_ext <<_ACEOF
6759
/* end confdefs.h. */
6760
$ac_includes_default
6761
#include <$ac_header>
6763
rm -f conftest.$ac_objext
6764
if { (ac_try="$ac_compile"
6766
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6767
*) ac_try_echo=$ac_try;;
6769
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6770
$as_echo "$ac_try_echo") >&5
6771
(eval "$ac_compile") 2>conftest.er1
6773
grep -v '^ *+' conftest.er1 >conftest.err
6775
cat conftest.err >&5
6776
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6777
(exit $ac_status); } && {
6778
test -z "$ac_c_werror_flag" ||
6779
test ! -s conftest.err
6780
} && test -s conftest.$ac_objext; then
6781
ac_header_compiler=yes
6783
$as_echo "$as_me: failed program was:" >&5
6784
sed 's/^/| /' conftest.$ac_ext >&5
6786
ac_header_compiler=no
6789
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6790
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6791
$as_echo "$ac_header_compiler" >&6; }
6793
# Is the header present?
6794
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6795
$as_echo_n "checking $ac_header presence... " >&6; }
6796
cat >conftest.$ac_ext <<_ACEOF
6799
cat confdefs.h >>conftest.$ac_ext
6800
cat >>conftest.$ac_ext <<_ACEOF
6801
/* end confdefs.h. */
6802
#include <$ac_header>
6804
if { (ac_try="$ac_cpp conftest.$ac_ext"
6806
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6807
*) ac_try_echo=$ac_try;;
6809
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6810
$as_echo "$ac_try_echo") >&5
6811
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6813
grep -v '^ *+' conftest.er1 >conftest.err
6815
cat conftest.err >&5
6816
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817
(exit $ac_status); } >/dev/null && {
6818
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6819
test ! -s conftest.err
6821
ac_header_preproc=yes
6823
$as_echo "$as_me: failed program was:" >&5
6824
sed 's/^/| /' conftest.$ac_ext >&5
6826
ac_header_preproc=no
6829
rm -f conftest.err conftest.$ac_ext
6830
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6831
$as_echo "$ac_header_preproc" >&6; }
6833
# So? What about this header?
6834
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6836
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6837
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6838
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6839
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6840
ac_header_preproc=yes
6843
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6844
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6845
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6846
$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6847
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6848
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6849
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6850
$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6851
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6852
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6853
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6854
$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6856
## -------------------------------- ##
6857
## Report this to bug-hello@gnu.org ##
6858
## -------------------------------- ##
6860
) | sed "s/^/$as_me: WARNING: /" >&2
6863
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6864
$as_echo_n "checking for $ac_header... " >&6; }
6865
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6866
$as_echo_n "(cached) " >&6
6868
eval "$as_ac_Header=\$ac_header_preproc"
6870
ac_res=`eval 'as_val=${'$as_ac_Header'}
6871
$as_echo "$as_val"'`
6872
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6873
$as_echo "$ac_res" >&6; }
6876
as_val=`eval 'as_val=${'$as_ac_Header'}
6877
$as_echo "$as_val"'`
6878
if test "x$as_val" = x""yes; then
6879
cat >>confdefs.h <<_ACEOF
6880
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6891
if test -z "$GETOPT_H"; then
6893
for ac_func in getopt_long_only
6895
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6896
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
6897
$as_echo_n "checking for $ac_func... " >&6; }
6898
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6899
$as_echo_n "(cached) " >&6
6901
cat >conftest.$ac_ext <<_ACEOF
6904
cat confdefs.h >>conftest.$ac_ext
6905
cat >>conftest.$ac_ext <<_ACEOF
6906
/* end confdefs.h. */
6907
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6908
For example, HP-UX 11i <limits.h> declares gettimeofday. */
6909
#define $ac_func innocuous_$ac_func
6911
/* System header to define __stub macros and hopefully few prototypes,
6912
which can conflict with char $ac_func (); below.
6913
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6914
<limits.h> exists even on freestanding compilers. */
6917
# include <limits.h>
6919
# include <assert.h>
6924
/* Override any GCC internal prototype to avoid an error.
6925
Use char because int might match the return type of a GCC
6926
builtin and then its argument prototype would still apply. */
6931
/* The GNU C library defines this for functions which it implements
6932
to always fail with ENOSYS. Some functions are actually named
6933
something starting with __ and the normal name is an alias. */
6934
#if defined __stub_$ac_func || defined __stub___$ac_func
6946
rm -f conftest.$ac_objext conftest$ac_exeext
6947
if { (ac_try="$ac_link"
6949
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950
*) ac_try_echo=$ac_try;;
6952
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6953
$as_echo "$ac_try_echo") >&5
6954
(eval "$ac_link") 2>conftest.er1
6956
grep -v '^ *+' conftest.er1 >conftest.err
6958
cat conftest.err >&5
6959
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6960
(exit $ac_status); } && {
6961
test -z "$ac_c_werror_flag" ||
6962
test ! -s conftest.err
6963
} && test -s conftest$ac_exeext && {
6964
test "$cross_compiling" = yes ||
6965
$as_test_x conftest$ac_exeext
6967
eval "$as_ac_var=yes"
6969
$as_echo "$as_me: failed program was:" >&5
6970
sed 's/^/| /' conftest.$ac_ext >&5
6972
eval "$as_ac_var=no"
6975
rm -rf conftest.dSYM
6976
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6977
conftest$ac_exeext conftest.$ac_ext
6979
ac_res=`eval 'as_val=${'$as_ac_var'}
6980
$as_echo "$as_val"'`
6981
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6982
$as_echo "$ac_res" >&6; }
6983
as_val=`eval 'as_val=${'$as_ac_var'}
6984
$as_echo "$as_val"'`
6985
if test "x$as_val" = x""yes; then
6986
cat >>confdefs.h <<_ACEOF
6987
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6997
if test -z "$GETOPT_H"; then
6998
{ $as_echo "$as_me:$LINENO: checking whether optreset is declared" >&5
6999
$as_echo_n "checking whether optreset is declared... " >&6; }
7000
if test "${ac_cv_have_decl_optreset+set}" = set; then
7001
$as_echo_n "(cached) " >&6
7003
cat >conftest.$ac_ext <<_ACEOF
7006
cat confdefs.h >>conftest.$ac_ext
7007
cat >>conftest.$ac_ext <<_ACEOF
7008
/* end confdefs.h. */
7022
rm -f conftest.$ac_objext
7023
if { (ac_try="$ac_compile"
7025
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7026
*) ac_try_echo=$ac_try;;
7028
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7029
$as_echo "$ac_try_echo") >&5
7030
(eval "$ac_compile") 2>conftest.er1
7032
grep -v '^ *+' conftest.er1 >conftest.err
7034
cat conftest.err >&5
7035
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7036
(exit $ac_status); } && {
7037
test -z "$ac_c_werror_flag" ||
7038
test ! -s conftest.err
7039
} && test -s conftest.$ac_objext; then
7040
ac_cv_have_decl_optreset=yes
7042
$as_echo "$as_me: failed program was:" >&5
7043
sed 's/^/| /' conftest.$ac_ext >&5
7045
ac_cv_have_decl_optreset=no
7048
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7050
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
7051
$as_echo "$ac_cv_have_decl_optreset" >&6; }
7052
if test "x$ac_cv_have_decl_optreset" = x""yes; then
7058
if test -z "$GETOPT_H"; then
7059
{ $as_echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
7060
$as_echo_n "checking for working GNU getopt function... " >&6; }
7061
if test "${gl_cv_func_gnu_getopt+set}" = set; then
7062
$as_echo_n "(cached) " >&6
7064
if test "$cross_compiling" = yes; then
7065
{ $as_echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
7066
$as_echo_n "checking whether getopt_clip is declared... " >&6; }
7067
if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
7068
$as_echo_n "(cached) " >&6
7070
cat >conftest.$ac_ext <<_ACEOF
7073
cat confdefs.h >>conftest.$ac_ext
7074
cat >>conftest.$ac_ext <<_ACEOF
7075
/* end confdefs.h. */
7089
rm -f conftest.$ac_objext
7090
if { (ac_try="$ac_compile"
7092
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7093
*) ac_try_echo=$ac_try;;
7095
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7096
$as_echo "$ac_try_echo") >&5
7097
(eval "$ac_compile") 2>conftest.er1
7099
grep -v '^ *+' conftest.er1 >conftest.err
7101
cat conftest.err >&5
7102
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7103
(exit $ac_status); } && {
7104
test -z "$ac_c_werror_flag" ||
7105
test ! -s conftest.err
7106
} && test -s conftest.$ac_objext; then
7107
ac_cv_have_decl_getopt_clip=yes
7109
$as_echo "$as_me: failed program was:" >&5
7110
sed 's/^/| /' conftest.$ac_ext >&5
7112
ac_cv_have_decl_getopt_clip=no
7115
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
7118
$as_echo "$ac_cv_have_decl_getopt_clip" >&6; }
7119
if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then
7120
gl_cv_func_gnu_getopt=no
7122
gl_cv_func_gnu_getopt=yes
7126
cat >conftest.$ac_ext <<_ACEOF
7129
cat confdefs.h >>conftest.$ac_ext
7130
cat >>conftest.$ac_ext <<_ACEOF
7131
/* end confdefs.h. */
7138
myargv[0] = "conftest";
7141
return getopt (2, myargv, "+a") != '?';
7147
rm -f conftest$ac_exeext
7148
if { (ac_try="$ac_link"
7150
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7151
*) ac_try_echo=$ac_try;;
7153
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7154
$as_echo "$ac_try_echo") >&5
7155
(eval "$ac_link") 2>&5
7157
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7158
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7159
{ (case "(($ac_try" in
7160
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7161
*) ac_try_echo=$ac_try;;
7163
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7164
$as_echo "$ac_try_echo") >&5
7165
(eval "$ac_try") 2>&5
7167
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7168
(exit $ac_status); }; }; then
7169
gl_cv_func_gnu_getopt=yes
7171
$as_echo "$as_me: program exited with status $ac_status" >&5
7172
$as_echo "$as_me: failed program was:" >&5
7173
sed 's/^/| /' conftest.$ac_ext >&5
7176
gl_cv_func_gnu_getopt=no
7178
rm -rf conftest.dSYM
7179
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7184
{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
7185
$as_echo "$gl_cv_func_gnu_getopt" >&6; }
7186
if test "$gl_cv_func_gnu_getopt" = "no"; then
7191
{ $as_echo "$as_me:$LINENO: checking whether getenv is declared" >&5
7192
$as_echo_n "checking whether getenv is declared... " >&6; }
7193
if test "${ac_cv_have_decl_getenv+set}" = set; then
7194
$as_echo_n "(cached) " >&6
7196
cat >conftest.$ac_ext <<_ACEOF
7199
cat confdefs.h >>conftest.$ac_ext
7200
cat >>conftest.$ac_ext <<_ACEOF
7201
/* end confdefs.h. */
7202
$ac_includes_default
7214
rm -f conftest.$ac_objext
7215
if { (ac_try="$ac_compile"
7217
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7218
*) ac_try_echo=$ac_try;;
7220
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7221
$as_echo "$ac_try_echo") >&5
7222
(eval "$ac_compile") 2>conftest.er1
7224
grep -v '^ *+' conftest.er1 >conftest.err
7226
cat conftest.err >&5
7227
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7228
(exit $ac_status); } && {
7229
test -z "$ac_c_werror_flag" ||
7230
test ! -s conftest.err
7231
} && test -s conftest.$ac_objext; then
7232
ac_cv_have_decl_getenv=yes
7234
$as_echo "$as_me: failed program was:" >&5
7235
sed 's/^/| /' conftest.$ac_ext >&5
7237
ac_cv_have_decl_getenv=no
7240
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7242
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
7243
$as_echo "$ac_cv_have_decl_getenv" >&6; }
7244
if test "x$ac_cv_have_decl_getenv" = x""yes; then
7246
cat >>confdefs.h <<_ACEOF
7247
#define HAVE_DECL_GETENV 1
7252
cat >>confdefs.h <<_ACEOF
7253
#define HAVE_DECL_GETENV 0
7260
{ $as_echo "$as_me:$LINENO: checking for inline" >&5
5427
$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
5431
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7261
5432
$as_echo_n "checking for inline... " >&6; }
7262
if test "${ac_cv_c_inline+set}" = set; then
5433
if test "${ac_cv_c_inline+set}" = set; then :
7263
5434
$as_echo_n "(cached) " >&6
7265
5436
ac_cv_c_inline=no
7266
5437
for ac_kw in inline __inline__ __inline; do
7267
cat >conftest.$ac_ext <<_ACEOF
7270
cat confdefs.h >>conftest.$ac_ext
7271
cat >>conftest.$ac_ext <<_ACEOF
5438
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272
5439
/* end confdefs.h. */
7273
5440
#ifndef __cplusplus
7274
5441
typedef int foo_t;
7332
{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
5474
XGETTEXT_EXTRA_OPTIONS=
5481
for ac_func in $ac_func_list
5483
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5484
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5485
eval as_val=\$$as_ac_var
5486
if test "x$as_val" = x""yes; then :
5487
cat >>confdefs.h <<_ACEOF
5488
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5502
GNULIB_EUIDACCESS=0;
5509
GNULIB_GETDOMAINNAME=0;
5510
GNULIB_GETDTABLESIZE=0;
5512
GNULIB_GETHOSTNAME=0;
5514
GNULIB_GETLOGIN_R=0;
5515
GNULIB_GETPAGESIZE=0;
5516
GNULIB_GETUSERSHELL=0;
5524
GNULIB_READLINKAT=0;
5529
GNULIB_UNISTD_H_GETOPT=0;
5530
GNULIB_UNISTD_H_SIGPIPE=0;
5543
HAVE_GETDOMAINNAME=1;
5544
HAVE_GETDTABLESIZE=1;
5549
HAVE_GETUSERSHELL=1;
5560
HAVE_DECL_ENVIRON=1;
5561
HAVE_DECL_GETLOGIN_R=1;
5573
REPLACE_GETGROUPS=0;
5574
REPLACE_GETPAGESIZE=0;
5588
UNISTD_H_HAVE_WINSOCK2_H=0;
5589
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
5604
if test $gl_cv_have_include_next = yes; then
5605
gl_cv_next_getopt_h='<'getopt.h'>'
5607
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
5608
$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
5609
if test "${gl_cv_next_getopt_h+set}" = set; then :
5610
$as_echo_n "(cached) " >&6
5613
if test $ac_cv_header_getopt_h = yes; then
5614
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615
/* end confdefs.h. */
5620
aix*) gl_absname_cpp="$ac_cpp -C" ;;
5621
*) gl_absname_cpp="$ac_cpp" ;;
5623
gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
5624
sed -n '\#/getopt.h#{
5625
s#.*"\(.*/getopt.h\)".*#\1#
5631
gl_cv_next_getopt_h='<'getopt.h'>'
5635
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
5636
$as_echo "$gl_cv_next_getopt_h" >&6; }
5638
NEXT_GETOPT_H=$gl_cv_next_getopt_h
5640
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
5641
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5642
gl_next_as_first_directive='<'getopt.h'>'
5644
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5645
gl_next_as_first_directive=$gl_cv_next_getopt_h
5647
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
5652
if test $ac_cv_header_getopt_h = yes; then
5661
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
5662
for ac_header in getopt.h
5664
ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
5665
if test "x$ac_cv_header_getopt_h" = x""yes; then :
5666
cat >>confdefs.h <<_ACEOF
5667
#define HAVE_GETOPT_H 1
5671
gl_replace_getopt=yes
5678
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
5679
for ac_func in getopt_long_only
5681
ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
5682
if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
5683
cat >>confdefs.h <<_ACEOF
5684
#define HAVE_GETOPT_LONG_ONLY 1
5688
gl_replace_getopt=yes
5694
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
5695
ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
5697
if test "x$ac_cv_have_decl_optreset" = x""yes; then :
5703
cat >>confdefs.h <<_ACEOF
5704
#define HAVE_DECL_OPTRESET $ac_have_decl
5709
if test -z "$gl_replace_getopt"; then
5710
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
5711
$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
5712
if test "${gl_cv_func_getopt_posix+set}" = set; then :
5713
$as_echo_n "(cached) " >&6
5716
if test "$cross_compiling" = yes; then :
5718
mingw*) gl_cv_func_getopt_posix="guessing no";;
5719
*) gl_cv_func_getopt_posix="guessing yes";;
5723
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724
/* end confdefs.h. */
5730
#if !HAVE_DECL_OPTRESET
5731
# define OPTIND_MIN 0
5733
# define OPTIND_MIN 1
5744
argv[argc++] = "program";
5745
argv[argc++] = "-a";
5746
argv[argc++] = "foo";
5747
argv[argc++] = "bar";
5749
optind = OPTIND_MIN;
5752
c = getopt (argc, argv, "ab");
5755
c = getopt (argc, argv, "ab");
5761
/* Some internal state exists at this point. */
5767
argv[argc++] = "program";
5768
argv[argc++] = "donald";
5769
argv[argc++] = "-p";
5770
argv[argc++] = "billy";
5771
argv[argc++] = "duck";
5772
argv[argc++] = "-a";
5773
argv[argc++] = "bar";
5775
optind = OPTIND_MIN;
5778
c = getopt (argc, argv, "+abp:q:");
5781
if (!(strcmp (argv[0], "program") == 0))
5783
if (!(strcmp (argv[1], "donald") == 0))
5785
if (!(strcmp (argv[2], "-p") == 0))
5787
if (!(strcmp (argv[3], "billy") == 0))
5789
if (!(strcmp (argv[4], "duck") == 0))
5791
if (!(strcmp (argv[5], "-a") == 0))
5793
if (!(strcmp (argv[6], "bar") == 0))
5803
if ac_fn_c_try_run "$LINENO"; then :
5804
gl_cv_func_getopt_posix=yes
5806
gl_cv_func_getopt_posix=no
5808
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5809
conftest.$ac_objext conftest.beam conftest.$ac_ext
5814
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
5815
$as_echo "$gl_cv_func_getopt_posix" >&6; }
5816
case "$gl_cv_func_getopt_posix" in
5817
*no) gl_replace_getopt=yes ;;
5821
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
5822
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
5823
$as_echo_n "checking for working GNU getopt function... " >&6; }
5824
if test "${gl_cv_func_getopt_gnu+set}" = set; then :
5825
$as_echo_n "(cached) " >&6
5827
# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
5828
# optstring is necessary for programs like m4 that have POSIX-mandated
5829
# semantics for supporting options interspersed with files.
5830
# Also, since getopt_long is a GNU extension, we require optind=0.
5831
gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
5833
export POSIXLY_CORRECT
5834
if test "$cross_compiling" = yes; then :
5835
case $host_os:$ac_cv_have_decl_optreset in
5836
*-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
5837
*:yes) gl_cv_func_getopt_gnu=no;;
5838
*) gl_cv_func_getopt_gnu=yes;;
5842
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5843
/* end confdefs.h. */
5852
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
5853
and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
5854
OSF/1 5.1, Solaris 10. */
5857
myargv[0] = "conftest";
5861
if (getopt (2, myargv, "+a") != '?')
5864
/* This code succeeds on glibc 2.8, mingw,
5865
and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
5866
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
5868
char *argv[] = { "program", "-p", "foo", "bar", NULL };
5871
if (getopt (4, argv, "p::") != 'p')
5875
if (getopt (4, argv, "p::") != -1)
5880
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
5882
char *argv[] = { "program", "foo", "-p", NULL };
5884
if (getopt (3, argv, "-p") != 1)
5886
if (getopt (3, argv, "-p") != 'p')
5895
if ac_fn_c_try_run "$LINENO"; then :
5896
gl_cv_func_getopt_gnu=yes
5898
gl_cv_func_getopt_gnu=no
5900
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5901
conftest.$ac_objext conftest.beam conftest.$ac_ext
5904
if test "$gl_had_POSIXLY_CORRECT" != yes; then
5905
{ POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
5909
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
5910
$as_echo "$gl_cv_func_getopt_gnu" >&6; }
5911
if test "$gl_cv_func_getopt_gnu" = "no"; then
5912
gl_replace_getopt=yes
5916
ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
5917
if test "x$ac_cv_have_decl_getenv" = x""yes; then :
5923
cat >>confdefs.h <<_ACEOF
5924
#define HAVE_DECL_GETENV $ac_have_decl
5932
if test -n "$gl_replace_getopt"; then :
5938
$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
5942
GNULIB_UNISTD_H_GETOPT=1
5951
gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
5961
gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
5972
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
5973
$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
5974
if test "${am_cv_langinfo_codeset+set}" = set; then :
5975
$as_echo_n "(cached) " >&6
5977
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5978
/* end confdefs.h. */
5979
#include <langinfo.h>
5983
char* cs = nl_langinfo(CODESET); return !cs;
5988
if ac_fn_c_try_link "$LINENO"; then :
5989
am_cv_langinfo_codeset=yes
5991
am_cv_langinfo_codeset=no
5993
rm -f core conftest.err conftest.$ac_objext \
5994
conftest$ac_exeext conftest.$ac_ext
5997
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
5998
$as_echo "$am_cv_langinfo_codeset" >&6; }
5999
if test $am_cv_langinfo_codeset = yes; then
6001
$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6007
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
6008
$as_echo_n "checking for working fcntl.h... " >&6; }
6009
if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
6010
$as_echo_n "(cached) " >&6
6012
if test "$cross_compiling" = yes; then :
6013
gl_cv_header_working_fcntl_h=cross-compiling
6015
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6016
/* end confdefs.h. */
6017
#include <sys/types.h>
6018
#include <sys/stat.h>
6025
#define O_NOFOLLOW 0
6027
static int const constants[] =
6029
O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
6030
O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
6037
int status = !constants;
6039
static char const sym[] = "conftest.sym";
6040
if (symlink (".", sym) != 0
6041
|| close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
6046
static char const file[] = "confdefs.h";
6047
int fd = open (file, O_RDONLY | O_NOATIME);
6049
struct stat st0, st1;
6051
|| fstat (fd, &st0) != 0
6053
|| read (fd, &c, 1) != 1
6055
|| stat (file, &st1) != 0
6056
|| st0.st_atime != st1.st_atime)
6064
if ac_fn_c_try_run "$LINENO"; then :
6065
gl_cv_header_working_fcntl_h=yes
6068
32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
6069
64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
6070
96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
6071
*) gl_cv_header_working_fcntl_h='no';;
6074
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6075
conftest.$ac_objext conftest.beam conftest.$ac_ext
6079
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
6080
$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
6082
case $gl_cv_header_working_fcntl_h in #(
6083
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
6087
cat >>confdefs.h <<_ACEOF
6088
#define HAVE_WORKING_O_NOATIME $ac_val
6092
case $gl_cv_header_working_fcntl_h in #(
6093
*O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
6097
cat >>confdefs.h <<_ACEOF
6098
#define HAVE_WORKING_O_NOFOLLOW $ac_val
6102
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
6103
if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
6109
cat >>confdefs.h <<_ACEOF
6110
#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
6114
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
6115
$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
6116
if test "${ac_cv_gnu_library_2_1+set}" = set; then :
6117
$as_echo_n "(cached) " >&6
6119
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6120
/* end confdefs.h. */
6122
#include <features.h>
6123
#ifdef __GNU_LIBRARY__
6124
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6130
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6131
$EGREP "Lucky GNU user" >/dev/null 2>&1; then :
6132
ac_cv_gnu_library_2_1=yes
6134
ac_cv_gnu_library_2_1=no
6141
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
6142
$as_echo "$ac_cv_gnu_library_2_1" >&6; }
6144
GLIBC21="$ac_cv_gnu_library_2_1"
6154
GNULIB_MBSNRTOWCS=0;
6157
GNULIB_WCSNRTOMBS=0;
6169
HAVE_DECL_WCWIDTH=1;
6170
REPLACE_MBSTATE_T=0;
6176
REPLACE_MBSRTOWCS=0;
6177
REPLACE_MBSNRTOWCS=0;
6179
REPLACE_WCSRTOMBS=0;
6180
REPLACE_WCSNRTOMBS=0;
6185
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
6186
$as_echo_n "checking for mbstate_t... " >&6; }
6187
if test "${ac_cv_type_mbstate_t+set}" = set; then :
6188
$as_echo_n "(cached) " >&6
6190
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6191
/* end confdefs.h. */
6192
$ac_includes_default
6197
mbstate_t x; return sizeof x;
6202
if ac_fn_c_try_compile "$LINENO"; then :
6203
ac_cv_type_mbstate_t=yes
6205
ac_cv_type_mbstate_t=no
6207
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6209
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
6210
$as_echo "$ac_cv_type_mbstate_t" >&6; }
6211
if test $ac_cv_type_mbstate_t = yes; then
6213
$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
6217
$as_echo "#define mbstate_t int" >>confdefs.h
6228
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
6229
$as_echo_n "checking for a traditional japanese locale... " >&6; }
6230
if test "${gt_cv_locale_ja+set}" = set; then :
6231
$as_echo_n "(cached) " >&6
6234
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6235
/* end confdefs.h. */
6239
#if HAVE_LANGINFO_CODESET
6240
# include <langinfo.h>
6249
/* Check whether the given locale name is recognized by the system. */
6250
if (setlocale (LC_ALL, "") == NULL) return 1;
6251
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
6252
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
6253
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
6254
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
6255
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
6256
some unit tests fail. */
6257
#if HAVE_LANGINFO_CODESET
6259
const char *cs = nl_langinfo (CODESET);
6260
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
6265
/* On Cygwin, avoid locale names without encoding suffix, because the
6266
locale_charset() function relies on the encoding suffix. Note that
6267
LC_ALL is set on the command line. */
6268
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
6270
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
6272
if (MB_CUR_MAX == 1)
6274
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
6275
This excludes the UTF-8 encoding. */
6276
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
6277
if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
6278
for (p = buf; *p != '\0'; p++)
6279
if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
6285
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
6286
(eval $ac_link) 2>&5
6288
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6289
test $ac_status = 0; } && test -s conftest$ac_exeext; then
6290
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
6291
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
6292
# configure script would override the LC_ALL setting. Likewise for
6293
# LC_CTYPE, which is also set at the beginning of the configure script.
6294
# Test for the AIX locale name.
6295
if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6296
gt_cv_locale_ja=ja_JP
6298
# Test for the locale name with explicit encoding suffix.
6299
if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6300
gt_cv_locale_ja=ja_JP.EUC-JP
6302
# Test for the HP-UX, OSF/1, NetBSD locale name.
6303
if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6304
gt_cv_locale_ja=ja_JP.eucJP
6306
# Test for the IRIX, FreeBSD locale name.
6307
if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6308
gt_cv_locale_ja=ja_JP.EUC
6310
# Test for the Solaris 7 locale name.
6311
if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6314
# Special test for NetBSD 1.6.
6315
if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
6316
gt_cv_locale_ja=ja_JP.eucJP
6319
gt_cv_locale_ja=none
6330
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
6331
$as_echo "$gt_cv_locale_ja" >&6; }
6332
LOCALE_JA=$gt_cv_locale_ja
6338
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
6339
$as_echo_n "checking for a transitional chinese locale... " >&6; }
6340
if test "${gt_cv_locale_zh_CN+set}" = set; then :
6341
$as_echo_n "(cached) " >&6
6344
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6345
/* end confdefs.h. */
6350
#if HAVE_LANGINFO_CODESET
6351
# include <langinfo.h>
6360
/* Check whether the given locale name is recognized by the system. */
6361
if (setlocale (LC_ALL, "") == NULL) return 1;
6362
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
6363
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
6364
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
6365
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
6366
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
6367
some unit tests fail. */
6368
#if HAVE_LANGINFO_CODESET
6370
const char *cs = nl_langinfo (CODESET);
6371
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
6376
/* On Cygwin, avoid locale names without encoding suffix, because the
6377
locale_charset() function relies on the encoding suffix. Note that
6378
LC_ALL is set on the command line. */
6379
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
6381
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
6382
This excludes the UTF-8 encoding. */
6383
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
6384
if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
6385
for (p = buf; *p != '\0'; p++)
6386
if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
6388
/* Check whether a typical GB18030 multibyte sequence is recognized as a
6389
single wide character. This excludes the GB2312 and GBK encodings. */
6390
if (mblen ("\203\062\332\066", 5) != 4)
6396
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
6397
(eval $ac_link) 2>&5
6399
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6400
test $ac_status = 0; } && test -s conftest$ac_exeext; then
6401
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
6402
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
6403
# configure script would override the LC_ALL setting. Likewise for
6404
# LC_CTYPE, which is also set at the beginning of the configure script.
6405
# Test for the locale name without encoding suffix.
6406
if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6407
gt_cv_locale_zh_CN=zh_CN
6409
# Test for the locale name with explicit encoding suffix.
6410
if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6411
gt_cv_locale_zh_CN=zh_CN.GB18030
6414
gt_cv_locale_zh_CN=none
6418
# If there was a link error, due to mblen(), the system is so old that
6419
# it certainly doesn't have a chinese locale.
6420
gt_cv_locale_zh_CN=none
6425
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
6426
$as_echo "$gt_cv_locale_zh_CN" >&6; }
6427
LOCALE_ZH_CN=$gt_cv_locale_zh_CN
6432
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
6433
$as_echo_n "checking for a french Unicode locale... " >&6; }
6434
if test "${gt_cv_locale_fr_utf8+set}" = set; then :
6435
$as_echo_n "(cached) " >&6
6438
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6439
/* end confdefs.h. */
6443
#if HAVE_LANGINFO_CODESET
6444
# include <langinfo.h>
6451
/* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
6452
imitates locale dependent behaviour by looking at the environment
6453
variables, and all locales use the UTF-8 encoding. */
6454
#if !(defined __BEOS__ || defined __HAIKU__)
6455
/* Check whether the given locale name is recognized by the system. */
6456
if (setlocale (LC_ALL, "") == NULL) return 1;
6457
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
6458
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
6459
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
6460
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
6461
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
6462
some unit tests fail. */
6463
# if HAVE_LANGINFO_CODESET
6465
const char *cs = nl_langinfo (CODESET);
6466
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
6471
/* On Cygwin, avoid locale names without encoding suffix, because the
6472
locale_charset() function relies on the encoding suffix. Note that
6473
LC_ALL is set on the command line. */
6474
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
6476
/* Check whether in the abbreviation of the second month, the second
6477
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
6478
two bytes long, with UTF-8 encoding. */
6479
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
6480
if (strftime (buf, sizeof (buf), "%b", &t) < 4
6481
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
6484
/* Check whether the decimal separator is a comma.
6485
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
6486
are nl_langinfo(RADIXCHAR) are both ".". */
6487
if (localeconv () ->decimal_point[0] != ',') return 1;
6492
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
6493
(eval $ac_link) 2>&5
6495
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6496
test $ac_status = 0; } && test -s conftest$ac_exeext; then
6497
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
6498
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
6499
# configure script would override the LC_ALL setting. Likewise for
6500
# LC_CTYPE, which is also set at the beginning of the configure script.
6501
# Test for the usual locale name.
6502
if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6503
gt_cv_locale_fr_utf8=fr_FR
6505
# Test for the locale name with explicit encoding suffix.
6506
if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6507
gt_cv_locale_fr_utf8=fr_FR.UTF-8
6509
# Test for the Solaris 7 locale name.
6510
if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
6511
gt_cv_locale_fr_utf8=fr.UTF-8
6514
gt_cv_locale_fr_utf8=none
6522
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
6523
$as_echo "$gt_cv_locale_fr_utf8" >&6; }
6524
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
6528
gl_cv_c_multiarch=no
6529
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6530
/* end confdefs.h. */
6531
#ifndef __APPLE_CC__
6532
not a universal capable compiler
6537
if ac_fn_c_try_compile "$LINENO"; then :
6541
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
6542
if test -n "$prev"; then
6544
i?86 | x86_64 | ppc | ppc64)
6545
if test -z "$arch" || test "$arch" = "$word"; then
6548
gl_cv_c_multiarch=yes
6554
if test "x$word" = "x-arch"; then
6561
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6562
if test $gl_cv_c_multiarch = yes; then
6564
$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6566
APPLE_UNIVERSAL_BUILD=1
6568
APPLE_UNIVERSAL_BUILD=0
6572
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
7333
6573
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
7334
if test "${ac_cv_header_stdbool_h+set}" = set; then
6574
if test "${ac_cv_header_stdbool_h+set}" = set; then :
7335
6575
$as_echo_n "(cached) " >&6
7337
cat >conftest.$ac_ext <<_ACEOF
7340
cat confdefs.h >>conftest.$ac_ext
7341
cat >>conftest.$ac_ext <<_ACEOF
6577
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7342
6578
/* end confdefs.h. */
7344
#include <stdbool.h>
7346
"error: bool is not defined"
7349
"error: false is not defined"
7352
"error: false is not 0"
7355
"error: true is not defined"
7358
"error: true is not 1"
7360
#ifndef __bool_true_false_are_defined
7361
"error: __bool_true_false_are_defined is not defined"
7364
struct s { _Bool s: 1; _Bool t; } s;
7366
char a[true == 1 ? 1 : -1];
7367
char b[false == 0 ? 1 : -1];
7368
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
7369
char d[(bool) 0.5 == true ? 1 : -1];
7371
char f[(_Bool) 0.0 == false ? 1 : -1];
7373
char h[sizeof (_Bool)];
7375
enum { j = false, k = true, l = false * true, m = true * 256 };
7377
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
7378
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
7379
#if defined __xlc__ || defined __GNUC__
7380
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
7381
reported by James Lemley on 2005-10-05; see
7382
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
7383
This test is not quite right, since xlc is allowed to
7384
reject this program, as the initializer for xlcbug is
7385
not one of the forms that C requires support for.
7386
However, doing the test right would require a run-time
7387
test, and that would make cross-compilation harder.
7388
Let us hope that IBM fixes the xlc bug, and also adds
7389
support for this kind of constant expression. In the
7390
meantime, this test will reject xlc, which is OK, since
7391
our stdbool.h substitute should suffice. We also test
7392
this with GCC, where it should work, to detect more
7393
quickly whether someone messes up the test in the
7395
char digs[] = "0123456789";
7396
int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
7398
/* Catch a bug in an HP-UX C compiler. See
7399
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
7400
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6580
#include <stdbool.h>
6582
"error: bool is not defined"
6585
"error: false is not defined"
6588
"error: false is not 0"
6591
"error: true is not defined"
6594
"error: true is not 1"
6596
#ifndef __bool_true_false_are_defined
6597
"error: __bool_true_false_are_defined is not defined"
6600
struct s { _Bool s: 1; _Bool t; } s;
6602
char a[true == 1 ? 1 : -1];
6603
char b[false == 0 ? 1 : -1];
6604
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
6605
char d[(bool) 0.5 == true ? 1 : -1];
6607
char f[(_Bool) 0.0 == false ? 1 : -1];
6609
char h[sizeof (_Bool)];
6611
enum { j = false, k = true, l = false * true, m = true * 256 };
6613
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
6614
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
6615
#if defined __xlc__ || defined __GNUC__
6616
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
6617
reported by James Lemley on 2005-10-05; see
6618
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
6619
This test is not quite right, since xlc is allowed to
6620
reject this program, as the initializer for xlcbug is
6621
not one of the forms that C requires support for.
6622
However, doing the test right would require a run-time
6623
test, and that would make cross-compilation harder.
6624
Let us hope that IBM fixes the xlc bug, and also adds
6625
support for this kind of constant expression. In the
6626
meantime, this test will reject xlc, which is OK, since
6627
our stdbool.h substitute should suffice. We also test
6628
this with GCC, where it should work, to detect more
6629
quickly whether someone messes up the test in the
6631
char digs[] = "0123456789";
6632
int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
6634
/* Catch a bug in an HP-UX C compiler. See
6635
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
6636
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
7411
/* Refer to every declared value, to avoid compiler optimizations. */
7412
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
7413
+ !m + !n + !o + !p + !q + !pq);
6647
/* Refer to every declared value, to avoid compiler optimizations. */
6648
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
6649
+ !m + !n + !o + !p + !q + !pq);
7419
rm -f conftest.$ac_objext
7420
if { (ac_try="$ac_compile"
7422
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7423
*) ac_try_echo=$ac_try;;
7425
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7426
$as_echo "$ac_try_echo") >&5
7427
(eval "$ac_compile") 2>conftest.er1
7429
grep -v '^ *+' conftest.er1 >conftest.err
7431
cat conftest.err >&5
7432
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433
(exit $ac_status); } && {
7434
test -z "$ac_c_werror_flag" ||
7435
test ! -s conftest.err
7436
} && test -s conftest.$ac_objext; then
6655
if ac_fn_c_try_compile "$LINENO"; then :
7437
6656
ac_cv_header_stdbool_h=yes
7439
$as_echo "$as_me: failed program was:" >&5
7440
sed 's/^/| /' conftest.$ac_ext >&5
7442
ac_cv_header_stdbool_h=no
6658
ac_cv_header_stdbool_h=no
7445
6660
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7447
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
6662
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
7448
6663
$as_echo "$ac_cv_header_stdbool_h" >&6; }
7449
{ $as_echo "$as_me:$LINENO: checking for _Bool" >&5
7450
$as_echo_n "checking for _Bool... " >&6; }
7451
if test "${ac_cv_type__Bool+set}" = set; then
7452
$as_echo_n "(cached) " >&6
7455
cat >conftest.$ac_ext <<_ACEOF
7458
cat confdefs.h >>conftest.$ac_ext
7459
cat >>conftest.$ac_ext <<_ACEOF
7460
/* end confdefs.h. */
7461
$ac_includes_default
7471
rm -f conftest.$ac_objext
7472
if { (ac_try="$ac_compile"
7474
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7475
*) ac_try_echo=$ac_try;;
7477
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7478
$as_echo "$ac_try_echo") >&5
7479
(eval "$ac_compile") 2>conftest.er1
7481
grep -v '^ *+' conftest.er1 >conftest.err
7483
cat conftest.err >&5
7484
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485
(exit $ac_status); } && {
7486
test -z "$ac_c_werror_flag" ||
7487
test ! -s conftest.err
7488
} && test -s conftest.$ac_objext; then
7489
cat >conftest.$ac_ext <<_ACEOF
7492
cat confdefs.h >>conftest.$ac_ext
7493
cat >>conftest.$ac_ext <<_ACEOF
7494
/* end confdefs.h. */
7495
$ac_includes_default
7499
if (sizeof ((_Bool)))
7505
rm -f conftest.$ac_objext
7506
if { (ac_try="$ac_compile"
7508
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7509
*) ac_try_echo=$ac_try;;
7511
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7512
$as_echo "$ac_try_echo") >&5
7513
(eval "$ac_compile") 2>conftest.er1
7515
grep -v '^ *+' conftest.er1 >conftest.err
7517
cat conftest.err >&5
7518
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519
(exit $ac_status); } && {
7520
test -z "$ac_c_werror_flag" ||
7521
test ! -s conftest.err
7522
} && test -s conftest.$ac_objext; then
7525
$as_echo "$as_me: failed program was:" >&5
7526
sed 's/^/| /' conftest.$ac_ext >&5
7528
ac_cv_type__Bool=yes
7531
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7533
$as_echo "$as_me: failed program was:" >&5
7534
sed 's/^/| /' conftest.$ac_ext >&5
7539
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7541
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
7542
$as_echo "$ac_cv_type__Bool" >&6; }
7543
if test "x$ac_cv_type__Bool" = x""yes; then
6664
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
6665
if test "x$ac_cv_type__Bool" = x""yes; then :
7545
6667
cat >>confdefs.h <<_ACEOF
7546
6668
#define HAVE__BOOL 1
7776
7047
if test $REPLACE_STRERROR = 1; then
7778
{ $as_echo "$as_me:$LINENO: checking whether strerror is declared" >&5
7779
$as_echo_n "checking whether strerror is declared... " >&6; }
7780
if test "${ac_cv_have_decl_strerror+set}" = set; then
7781
$as_echo_n "(cached) " >&6
7783
cat >conftest.$ac_ext <<_ACEOF
7786
cat confdefs.h >>conftest.$ac_ext
7787
cat >>conftest.$ac_ext <<_ACEOF
7788
/* end confdefs.h. */
7789
$ac_includes_default
7801
rm -f conftest.$ac_objext
7802
if { (ac_try="$ac_compile"
7804
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7805
*) ac_try_echo=$ac_try;;
7807
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7808
$as_echo "$ac_try_echo") >&5
7809
(eval "$ac_compile") 2>conftest.er1
7811
grep -v '^ *+' conftest.er1 >conftest.err
7813
cat conftest.err >&5
7814
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7815
(exit $ac_status); } && {
7816
test -z "$ac_c_werror_flag" ||
7817
test ! -s conftest.err
7818
} && test -s conftest.$ac_objext; then
7819
ac_cv_have_decl_strerror=yes
7821
$as_echo "$as_me: failed program was:" >&5
7822
sed 's/^/| /' conftest.$ac_ext >&5
7824
ac_cv_have_decl_strerror=no
7827
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7829
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
7830
$as_echo "$ac_cv_have_decl_strerror" >&6; }
7831
if test "x$ac_cv_have_decl_strerror" = x""yes; then
7049
ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
7050
if test "x$ac_cv_have_decl_strerror" = x""yes; then :
7833
7056
cat >>confdefs.h <<_ACEOF
7834
#define HAVE_DECL_STRERROR 1
7839
cat >>confdefs.h <<_ACEOF
7840
#define HAVE_DECL_STRERROR 0
7057
#define HAVE_DECL_STRERROR $ac_have_decl
7853
7061
if test $ac_cv_header_sys_socket_h != yes; then
7855
for ac_header in winsock2.h
7857
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7858
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7859
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
7860
$as_echo_n "checking for $ac_header... " >&6; }
7861
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862
$as_echo_n "(cached) " >&6
7864
ac_res=`eval 'as_val=${'$as_ac_Header'}
7865
$as_echo "$as_val"'`
7866
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7867
$as_echo "$ac_res" >&6; }
7869
# Is the header compilable?
7870
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
7871
$as_echo_n "checking $ac_header usability... " >&6; }
7872
cat >conftest.$ac_ext <<_ACEOF
7875
cat confdefs.h >>conftest.$ac_ext
7876
cat >>conftest.$ac_ext <<_ACEOF
7877
/* end confdefs.h. */
7878
$ac_includes_default
7879
#include <$ac_header>
7881
rm -f conftest.$ac_objext
7882
if { (ac_try="$ac_compile"
7884
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885
*) ac_try_echo=$ac_try;;
7887
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7888
$as_echo "$ac_try_echo") >&5
7889
(eval "$ac_compile") 2>conftest.er1
7891
grep -v '^ *+' conftest.er1 >conftest.err
7893
cat conftest.err >&5
7894
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895
(exit $ac_status); } && {
7896
test -z "$ac_c_werror_flag" ||
7897
test ! -s conftest.err
7898
} && test -s conftest.$ac_objext; then
7899
ac_header_compiler=yes
7901
$as_echo "$as_me: failed program was:" >&5
7902
sed 's/^/| /' conftest.$ac_ext >&5
7904
ac_header_compiler=no
7907
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7908
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7909
$as_echo "$ac_header_compiler" >&6; }
7911
# Is the header present?
7912
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
7913
$as_echo_n "checking $ac_header presence... " >&6; }
7914
cat >conftest.$ac_ext <<_ACEOF
7917
cat confdefs.h >>conftest.$ac_ext
7918
cat >>conftest.$ac_ext <<_ACEOF
7919
/* end confdefs.h. */
7920
#include <$ac_header>
7922
if { (ac_try="$ac_cpp conftest.$ac_ext"
7924
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7925
*) ac_try_echo=$ac_try;;
7927
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7928
$as_echo "$ac_try_echo") >&5
7929
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7931
grep -v '^ *+' conftest.er1 >conftest.err
7933
cat conftest.err >&5
7934
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935
(exit $ac_status); } >/dev/null && {
7936
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7937
test ! -s conftest.err
7939
ac_header_preproc=yes
7941
$as_echo "$as_me: failed program was:" >&5
7942
sed 's/^/| /' conftest.$ac_ext >&5
7944
ac_header_preproc=no
7947
rm -f conftest.err conftest.$ac_ext
7948
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7949
$as_echo "$ac_header_preproc" >&6; }
7951
# So? What about this header?
7952
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7954
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7955
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7956
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7957
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7958
ac_header_preproc=yes
7961
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7962
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7963
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7964
$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7965
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7966
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7967
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7968
$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7969
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7970
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7971
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7972
$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7974
## -------------------------------- ##
7975
## Report this to bug-hello@gnu.org ##
7976
## -------------------------------- ##
7978
) | sed "s/^/$as_me: WARNING: /" >&2
7981
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
7982
$as_echo_n "checking for $ac_header... " >&6; }
7983
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7984
$as_echo_n "(cached) " >&6
7986
eval "$as_ac_Header=\$ac_header_preproc"
7988
ac_res=`eval 'as_val=${'$as_ac_Header'}
7989
$as_echo "$as_val"'`
7990
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7991
$as_echo "$ac_res" >&6; }
7994
as_val=`eval 'as_val=${'$as_ac_Header'}
7995
$as_echo "$as_val"'`
7996
if test "x$as_val" = x""yes; then
7062
for ac_header in winsock2.h
7064
ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
7065
if test "x$ac_cv_header_winsock2_h" = x""yes; then :
7997
7066
cat >>confdefs.h <<_ACEOF
7998
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7067
#define HAVE_WINSOCK2_H 1
8715
rm -f conftest.$ac_objext
8716
if { (ac_try="$ac_compile"
8718
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8719
*) ac_try_echo=$ac_try;;
8721
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8722
$as_echo "$ac_try_echo") >&5
8723
(eval "$ac_compile") 2>conftest.er1
8725
grep -v '^ *+' conftest.er1 >conftest.err
8727
cat conftest.err >&5
8728
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729
(exit $ac_status); } && {
8730
test -z "$ac_c_werror_flag" ||
8731
test ! -s conftest.err
8732
} && test -s conftest.$ac_objext; then
7654
if ac_fn_c_try_compile "$LINENO"; then :
8733
7655
gl_cv_c_inline_effective=yes
8735
$as_echo "$as_me: failed program was:" >&5
8736
sed 's/^/| /' conftest.$ac_ext >&5
8738
gl_cv_c_inline_effective=no
7657
gl_cv_c_inline_effective=no
8741
7659
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8745
{ $as_echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5
7663
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
8746
7664
$as_echo "$gl_cv_c_inline_effective" >&6; }
8747
7665
if test $gl_cv_c_inline_effective = yes; then
8749
cat >>confdefs.h <<\_ACEOF
8750
#define HAVE_INLINE 1
7667
$as_echo "#define HAVE_INLINE 1" >>confdefs.h
7679
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
7691
if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
7695
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
7696
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
7697
if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
7698
$as_echo_n "(cached) " >&6
7702
# Guess no on AIX and OSF/1.
7703
osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
7704
# Guess yes otherwise.
7705
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
7707
if test $LOCALE_JA != none; then
7708
if test "$cross_compiling" = yes; then :
7711
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7712
/* end confdefs.h. */
7719
if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
7721
const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
7725
memset (&state, '\0', sizeof (mbstate_t));
7726
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
7727
if (mbsinit (&state))
7733
if ac_fn_c_try_run "$LINENO"; then :
7734
gl_cv_func_mbrtowc_incomplete_state=yes
7736
gl_cv_func_mbrtowc_incomplete_state=no
7738
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7739
conftest.$ac_objext conftest.beam conftest.$ac_ext
7745
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
7746
$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
7751
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
7752
$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
7753
if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
7754
$as_echo_n "(cached) " >&6
7758
# Guess no on Solaris 8.
7759
solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
7760
# Guess yes otherwise.
7761
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
7763
if test $LOCALE_ZH_CN != none; then
7764
if test "$cross_compiling" = yes; then :
7767
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7768
/* end confdefs.h. */
7776
/* This fails on Solaris 8:
7777
mbrtowc returns 2, and sets wc to 0x00F0.
7778
mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
7779
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
7781
char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
7785
memset (&state, '\0', sizeof (mbstate_t));
7786
if (mbrtowc (&wc, input + 3, 6, &state) != 4
7787
&& mbtowc (&wc, input + 3, 6) == 4)
7793
if ac_fn_c_try_run "$LINENO"; then :
7794
gl_cv_func_mbrtowc_sanitycheck=yes
7796
gl_cv_func_mbrtowc_sanitycheck=no
7798
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7799
conftest.$ac_objext conftest.beam conftest.$ac_ext
7805
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
7806
$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
7809
case "$gl_cv_func_mbrtowc_incomplete_state" in
7811
*) REPLACE_MBSTATE_T=1 ;;
7813
case "$gl_cv_func_mbrtowc_sanitycheck" in
7815
*) REPLACE_MBSTATE_T=1 ;;
7820
if test $REPLACE_MBSTATE_T = 1; then
7826
if test $REPLACE_MBSTATE_T = 1; then
7830
if test $ac_cv_func_mbrtowc = no; then
7833
if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
7837
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
7838
$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
7839
if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
7840
$as_echo_n "(cached) " >&6
7844
# Guess no on OSF/1.
7845
osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
7846
# Guess yes otherwise.
7847
*) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
7849
if test $LOCALE_FR_UTF8 != none; then
7850
if test "$cross_compiling" = yes; then :
7853
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7854
/* end confdefs.h. */
7861
if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
7867
memset (&state, '\0', sizeof (mbstate_t));
7868
wc = (wchar_t) 0xBADFACE;
7869
mbrtowc (&wc, NULL, 5, &state);
7870
/* Check that wc was not modified. */
7871
if (wc != (wchar_t) 0xBADFACE)
7877
if ac_fn_c_try_run "$LINENO"; then :
7878
gl_cv_func_mbrtowc_null_arg=yes
7880
gl_cv_func_mbrtowc_null_arg=no
7882
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7883
conftest.$ac_objext conftest.beam conftest.$ac_ext
7889
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
7890
$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
7896
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
7897
$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
7898
if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
7899
$as_echo_n "(cached) " >&6
7903
# Guess no on HP-UX and Solaris.
7904
hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
7905
# Guess yes otherwise.
7906
*) gl_cv_func_mbrtowc_retval="guessing yes" ;;
7908
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
7909
if test "$cross_compiling" = yes; then :
7912
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7913
/* end confdefs.h. */
7920
/* This fails on Solaris. */
7921
if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
7923
char input[] = "B\303\274\303\237er"; /* "Büßer" */
7927
memset (&state, '\0', sizeof (mbstate_t));
7928
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
7931
if (mbrtowc (&wc, input + 2, 5, &state) != 1)
7935
/* This fails on HP-UX 11.11. */
7936
if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
7938
char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
7942
memset (&state, '\0', sizeof (mbstate_t));
7943
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
7946
if (mbrtowc (&wc, input + 2, 5, &state) != 2)
7953
if ac_fn_c_try_run "$LINENO"; then :
7954
gl_cv_func_mbrtowc_retval=yes
7956
gl_cv_func_mbrtowc_retval=no
7958
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7959
conftest.$ac_objext conftest.beam conftest.$ac_ext
7965
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
7966
$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
7971
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
7972
$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
7973
if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
7974
$as_echo_n "(cached) " >&6
7978
# Guess no on Solaris 8 and 9.
7979
solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
7980
# Guess yes otherwise.
7981
*) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
7983
if test $LOCALE_ZH_CN != none; then
7984
if test "$cross_compiling" = yes; then :
7987
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7988
/* end confdefs.h. */
7995
/* This fails on Solaris 8 and 9. */
7996
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
8001
memset (&state, '\0', sizeof (mbstate_t));
8002
if (mbrtowc (&wc, "", 1, &state) != 0)
8008
if ac_fn_c_try_run "$LINENO"; then :
8009
gl_cv_func_mbrtowc_nul_retval=yes
8011
gl_cv_func_mbrtowc_nul_retval=no
8013
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8014
conftest.$ac_objext conftest.beam conftest.$ac_ext
8020
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
8021
$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
8023
case "$gl_cv_func_mbrtowc_null_arg" in
8026
$as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
8031
case "$gl_cv_func_mbrtowc_retval" in
8034
$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
8039
case "$gl_cv_func_mbrtowc_nul_retval" in
8042
$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
8048
if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
8060
gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
8081
if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
8085
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
8086
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
8087
if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
8088
$as_echo_n "(cached) " >&6
8092
# Guess no on AIX and OSF/1.
8093
osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
8094
# Guess yes otherwise.
8095
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
8097
if test $LOCALE_JA != none; then
8098
if test "$cross_compiling" = yes; then :
8101
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102
/* end confdefs.h. */
8109
if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
8111
const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
8115
memset (&state, '\0', sizeof (mbstate_t));
8116
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
8117
if (mbsinit (&state))
8123
if ac_fn_c_try_run "$LINENO"; then :
8124
gl_cv_func_mbrtowc_incomplete_state=yes
8126
gl_cv_func_mbrtowc_incomplete_state=no
8128
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8129
conftest.$ac_objext conftest.beam conftest.$ac_ext
8135
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
8136
$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
8141
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
8142
$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
8143
if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
8144
$as_echo_n "(cached) " >&6
8148
# Guess no on Solaris 8.
8149
solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
8150
# Guess yes otherwise.
8151
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
8153
if test $LOCALE_ZH_CN != none; then
8154
if test "$cross_compiling" = yes; then :
8157
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158
/* end confdefs.h. */
8166
/* This fails on Solaris 8:
8167
mbrtowc returns 2, and sets wc to 0x00F0.
8168
mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
8169
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
8171
char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
8175
memset (&state, '\0', sizeof (mbstate_t));
8176
if (mbrtowc (&wc, input + 3, 6, &state) != 4
8177
&& mbtowc (&wc, input + 3, 6) == 4)
8183
if ac_fn_c_try_run "$LINENO"; then :
8184
gl_cv_func_mbrtowc_sanitycheck=yes
8186
gl_cv_func_mbrtowc_sanitycheck=no
8188
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8189
conftest.$ac_objext conftest.beam conftest.$ac_ext
8195
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
8196
$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
8199
case "$gl_cv_func_mbrtowc_incomplete_state" in
8201
*) REPLACE_MBSTATE_T=1 ;;
8203
case "$gl_cv_func_mbrtowc_sanitycheck" in
8205
*) REPLACE_MBSTATE_T=1 ;;
8210
if test $REPLACE_MBSTATE_T = 1; then
8216
if test $REPLACE_MBSTATE_T = 1; then
8220
if test $ac_cv_func_mbsinit = no; then
8223
if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
8235
gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8281
if test $gt_cv_c_wchar_t = no; then
8285
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
8286
$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
8287
if test "${gl_cv_decl_null_works+set}" = set; then :
8288
$as_echo_n "(cached) " >&6
8290
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8291
/* end confdefs.h. */
8293
int test[2 * (sizeof NULL == sizeof (void *)) -1];
8303
if ac_fn_c_try_compile "$LINENO"; then :
8304
gl_cv_decl_null_works=yes
8306
gl_cv_decl_null_works=no
8308
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8310
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
8311
$as_echo "$gl_cv_decl_null_works" >&6; }
8312
if test $gl_cv_decl_null_works = no; then
8316
if test -n "$STDDEF_H"; then
8323
if test $gl_cv_have_include_next = yes; then
8324
gl_cv_next_stddef_h='<'stddef.h'>'
8326
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
8327
$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
8328
if test "${gl_cv_next_stddef_h+set}" = set; then :
8329
$as_echo_n "(cached) " >&6
8332
if test $ac_cv_header_stddef_h = yes; then
8333
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8334
/* end confdefs.h. */
8339
aix*) gl_absname_cpp="$ac_cpp -C" ;;
8340
*) gl_absname_cpp="$ac_cpp" ;;
8342
gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8343
sed -n '\#/stddef.h#{
8344
s#.*"\(.*/stddef.h\)".*#\1#
8350
gl_cv_next_stddef_h='<'stddef.h'>'
8354
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
8355
$as_echo "$gl_cv_next_stddef_h" >&6; }
8357
NEXT_STDDEF_H=$gl_cv_next_stddef_h
8359
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8360
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8361
gl_next_as_first_directive='<'stddef.h'>'
8363
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8364
gl_next_as_first_directive=$gl_cv_next_stddef_h
8366
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
8375
if test $ac_cv_type_long_long_int = yes; then
8376
HAVE_LONG_LONG_INT=1
8378
HAVE_LONG_LONG_INT=0
8382
if test $ac_cv_type_unsigned_long_long_int = yes; then
8383
HAVE_UNSIGNED_LONG_LONG_INT=1
8385
HAVE_UNSIGNED_LONG_LONG_INT=0
8389
if test $ac_cv_header_inttypes_h = yes; then
8396
if test $ac_cv_header_sys_types_h = yes; then
8409
if test $gl_cv_have_include_next = yes; then
8410
gl_cv_next_stdint_h='<'stdint.h'>'
8412
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
8413
$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
8414
if test "${gl_cv_next_stdint_h+set}" = set; then :
8415
$as_echo_n "(cached) " >&6
8418
if test $ac_cv_header_stdint_h = yes; then
8419
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8420
/* end confdefs.h. */
8425
aix*) gl_absname_cpp="$ac_cpp -C" ;;
8426
*) gl_absname_cpp="$ac_cpp" ;;
8428
gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8429
sed -n '\#/stdint.h#{
8430
s#.*"\(.*/stdint.h\)".*#\1#
8436
gl_cv_next_stdint_h='<'stdint.h'>'
8440
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
8441
$as_echo "$gl_cv_next_stdint_h" >&6; }
8443
NEXT_STDINT_H=$gl_cv_next_stdint_h
8445
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8446
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8447
gl_next_as_first_directive='<'stdint.h'>'
8449
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8450
gl_next_as_first_directive=$gl_cv_next_stdint_h
8452
NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8456
if test $ac_cv_header_stdint_h = yes; then
8463
if test $ac_cv_header_stdint_h = yes; then
8464
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
8465
$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
8466
if test "${gl_cv_header_working_stdint_h+set}" = set; then :
8467
$as_echo_n "(cached) " >&6
8469
gl_cv_header_working_stdint_h=no
8470
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8471
/* end confdefs.h. */
8474
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
8475
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
8476
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
8478
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
8479
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
8480
#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
8484
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8485
included before <wchar.h>. */
8496
int8_t a1 = INT8_MAX;
8497
int8_t a1min = INT8_MIN;
8500
int16_t a2 = INT16_MAX;
8501
int16_t a2min = INT16_MIN;
8504
int32_t a3 = INT32_MAX;
8505
int32_t a3min = INT32_MIN;
8508
int64_t a4 = INT64_MAX;
8509
int64_t a4min = INT64_MIN;
8512
uint8_t b1 = UINT8_MAX;
8514
typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
8517
uint16_t b2 = UINT16_MAX;
8520
uint32_t b3 = UINT32_MAX;
8523
uint64_t b4 = UINT64_MAX;
8525
int_least8_t c1 = INT8_C (0x7f);
8526
int_least8_t c1max = INT_LEAST8_MAX;
8527
int_least8_t c1min = INT_LEAST8_MIN;
8528
int_least16_t c2 = INT16_C (0x7fff);
8529
int_least16_t c2max = INT_LEAST16_MAX;
8530
int_least16_t c2min = INT_LEAST16_MIN;
8531
int_least32_t c3 = INT32_C (0x7fffffff);
8532
int_least32_t c3max = INT_LEAST32_MAX;
8533
int_least32_t c3min = INT_LEAST32_MIN;
8534
int_least64_t c4 = INT64_C (0x7fffffffffffffff);
8535
int_least64_t c4max = INT_LEAST64_MAX;
8536
int_least64_t c4min = INT_LEAST64_MIN;
8537
uint_least8_t d1 = UINT8_C (0xff);
8538
uint_least8_t d1max = UINT_LEAST8_MAX;
8539
uint_least16_t d2 = UINT16_C (0xffff);
8540
uint_least16_t d2max = UINT_LEAST16_MAX;
8541
uint_least32_t d3 = UINT32_C (0xffffffff);
8542
uint_least32_t d3max = UINT_LEAST32_MAX;
8543
uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
8544
uint_least64_t d4max = UINT_LEAST64_MAX;
8545
int_fast8_t e1 = INT_FAST8_MAX;
8546
int_fast8_t e1min = INT_FAST8_MIN;
8547
int_fast16_t e2 = INT_FAST16_MAX;
8548
int_fast16_t e2min = INT_FAST16_MIN;
8549
int_fast32_t e3 = INT_FAST32_MAX;
8550
int_fast32_t e3min = INT_FAST32_MIN;
8551
int_fast64_t e4 = INT_FAST64_MAX;
8552
int_fast64_t e4min = INT_FAST64_MIN;
8553
uint_fast8_t f1 = UINT_FAST8_MAX;
8554
uint_fast16_t f2 = UINT_FAST16_MAX;
8555
uint_fast32_t f3 = UINT_FAST32_MAX;
8556
uint_fast64_t f4 = UINT_FAST64_MAX;
8558
intptr_t g = INTPTR_MAX;
8559
intptr_t gmin = INTPTR_MIN;
8562
uintptr_t h = UINTPTR_MAX;
8564
intmax_t i = INTMAX_MAX;
8565
uintmax_t j = UINTMAX_MAX;
8567
#include <limits.h> /* for CHAR_BIT */
8568
#define TYPE_MINIMUM(t) \
8569
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
8570
#define TYPE_MAXIMUM(t) \
8571
((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
8574
PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
8575
&& PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
8577
/* Detect bug in FreeBSD 6.0 / ia64. */
8578
int check_SIG_ATOMIC:
8579
SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
8580
&& SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
8582
int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
8584
WCHAR_MIN == TYPE_MINIMUM (wchar_t)
8585
&& WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
8587
/* Detect bug in mingw. */
8589
WINT_MIN == TYPE_MINIMUM (wint_t)
8590
&& WINT_MAX == TYPE_MAXIMUM (wint_t)
8593
/* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
8595
(-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
8597
(-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8599
/* Detect bugs in OpenBSD 3.9 stdint.h. */
8601
int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
8604
int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
8607
int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
8610
int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
8612
int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
8613
int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
8614
int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
8615
int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
8616
int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
8617
int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
8618
int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
8619
int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
8620
int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
8621
int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
8622
int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
8633
if ac_fn_c_try_compile "$LINENO"; then :
8634
if test "$cross_compiling" = yes; then :
8635
gl_cv_header_working_stdint_h=yes
8638
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8639
/* end confdefs.h. */
8642
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
8643
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
8644
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
8648
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8649
included before <wchar.h>. */
8661
#define MVAL(macro) MVAL1(macro)
8662
#define MVAL1(expression) #expression
8663
static const char *macro_values[] =
8697
for (mv = macro_values; *mv != NULL; mv++)
8699
const char *value = *mv;
8700
/* Test whether it looks like a cast expression. */
8701
if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
8702
|| strncmp (value, "((unsigned short)"/*)*/, 17) == 0
8703
|| strncmp (value, "((unsigned char)"/*)*/, 16) == 0
8704
|| strncmp (value, "((int)"/*)*/, 6) == 0
8705
|| strncmp (value, "((signed short)"/*)*/, 15) == 0
8706
|| strncmp (value, "((signed char)"/*)*/, 14) == 0)
8715
if ac_fn_c_try_run "$LINENO"; then :
8716
gl_cv_header_working_stdint_h=yes
8718
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8719
conftest.$ac_objext conftest.beam conftest.$ac_ext
8724
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8727
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
8728
$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8730
if test "$gl_cv_header_working_stdint_h" = yes; then
8733
for ac_header in sys/inttypes.h sys/bitypes.h
8735
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8736
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8737
eval as_val=\$$as_ac_Header
8738
if test "x$as_val" = x""yes; then :
8739
cat >>confdefs.h <<_ACEOF
8740
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8747
if test $ac_cv_header_sys_inttypes_h = yes; then
8748
HAVE_SYS_INTTYPES_H=1
8750
HAVE_SYS_INTTYPES_H=0
8753
if test $ac_cv_header_sys_bitypes_h = yes; then
8754
HAVE_SYS_BITYPES_H=1
8756
HAVE_SYS_BITYPES_H=0
8764
if test $APPLE_UNIVERSAL_BUILD = 0; then
8767
for gltype in ptrdiff_t size_t ; do
8768
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8769
$as_echo_n "checking for bit size of $gltype... " >&6; }
8770
if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8771
$as_echo_n "(cached) " >&6
8773
if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8774
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8775
included before <wchar.h>. */
8784
#include <limits.h>"; then :
8790
eval gl_cv_bitsizeof_${gltype}=\$result
8793
eval ac_res=\$gl_cv_bitsizeof_${gltype}
8794
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8795
$as_echo "$ac_res" >&6; }
8796
eval result=\$gl_cv_bitsizeof_${gltype}
8797
if test $result = unknown; then
8800
GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8801
cat >>confdefs.h <<_ACEOF
8802
#define BITSIZEOF_${GLTYPE} $result
8805
eval BITSIZEOF_${GLTYPE}=\$result
8812
for gltype in sig_atomic_t wchar_t wint_t ; do
8813
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8814
$as_echo_n "checking for bit size of $gltype... " >&6; }
8815
if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8816
$as_echo_n "(cached) " >&6
8818
if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8819
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8820
included before <wchar.h>. */
8829
#include <limits.h>"; then :
8835
eval gl_cv_bitsizeof_${gltype}=\$result
8838
eval ac_res=\$gl_cv_bitsizeof_${gltype}
8839
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8840
$as_echo "$ac_res" >&6; }
8841
eval result=\$gl_cv_bitsizeof_${gltype}
8842
if test $result = unknown; then
8845
GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8846
cat >>confdefs.h <<_ACEOF
8847
#define BITSIZEOF_${GLTYPE} $result
8850
eval BITSIZEOF_${GLTYPE}=\$result
8856
for gltype in sig_atomic_t wchar_t wint_t ; do
8857
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
8858
$as_echo_n "checking whether $gltype is signed... " >&6; }
8859
if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8860
$as_echo_n "(cached) " >&6
8862
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8863
/* end confdefs.h. */
8865
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8866
included before <wchar.h>. */
8875
int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8884
if ac_fn_c_try_compile "$LINENO"; then :
8889
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8890
eval gl_cv_type_${gltype}_signed=\$result
8893
eval ac_res=\$gl_cv_type_${gltype}_signed
8894
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8895
$as_echo "$ac_res" >&6; }
8896
eval result=\$gl_cv_type_${gltype}_signed
8897
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8898
if test "$result" = yes; then
8899
cat >>confdefs.h <<_ACEOF
8900
#define HAVE_SIGNED_${GLTYPE} 1
8903
eval HAVE_SIGNED_${GLTYPE}=1
8905
eval HAVE_SIGNED_${GLTYPE}=0
8910
gl_cv_type_ptrdiff_t_signed=yes
8911
gl_cv_type_size_t_signed=no
8912
if test $APPLE_UNIVERSAL_BUILD = 0; then
8915
for gltype in ptrdiff_t size_t ; do
8916
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8917
$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8918
if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8919
$as_echo_n "(cached) " >&6
8921
eval gl_cv_type_${gltype}_suffix=no
8922
eval result=\$gl_cv_type_${gltype}_signed
8923
if test "$result" = yes; then
8928
for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8931
l) gltype1='long int';;
8932
ll) gltype1='long long int';;
8933
i64) gltype1='__int64';;
8934
u) gltype1='unsigned int';;
8935
ul) gltype1='unsigned long int';;
8936
ull) gltype1='unsigned long long int';;
8937
ui64)gltype1='unsigned __int64';;
8939
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8940
/* end confdefs.h. */
8942
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8943
included before <wchar.h>. */
8953
extern $gltype1 foo;
8962
if ac_fn_c_try_compile "$LINENO"; then :
8963
eval gl_cv_type_${gltype}_suffix=\$glsuf
8965
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8966
eval result=\$gl_cv_type_${gltype}_suffix
8967
test "$result" != no && break
8970
eval ac_res=\$gl_cv_type_${gltype}_suffix
8971
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8972
$as_echo "$ac_res" >&6; }
8973
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8974
eval result=\$gl_cv_type_${gltype}_suffix
8975
test "$result" = no && result=
8976
eval ${GLTYPE}_SUFFIX=\$result
8977
cat >>confdefs.h <<_ACEOF
8978
#define ${GLTYPE}_SUFFIX $result
8987
for gltype in sig_atomic_t wchar_t wint_t ; do
8988
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8989
$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8990
if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8991
$as_echo_n "(cached) " >&6
8993
eval gl_cv_type_${gltype}_suffix=no
8994
eval result=\$gl_cv_type_${gltype}_signed
8995
if test "$result" = yes; then
9000
for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9003
l) gltype1='long int';;
9004
ll) gltype1='long long int';;
9005
i64) gltype1='__int64';;
9006
u) gltype1='unsigned int';;
9007
ul) gltype1='unsigned long int';;
9008
ull) gltype1='unsigned long long int';;
9009
ui64)gltype1='unsigned __int64';;
9011
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9012
/* end confdefs.h. */
9014
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9015
included before <wchar.h>. */
9025
extern $gltype1 foo;
9034
if ac_fn_c_try_compile "$LINENO"; then :
9035
eval gl_cv_type_${gltype}_suffix=\$glsuf
9037
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9038
eval result=\$gl_cv_type_${gltype}_suffix
9039
test "$result" != no && break
9042
eval ac_res=\$gl_cv_type_${gltype}_suffix
9043
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9044
$as_echo "$ac_res" >&6; }
9045
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9046
eval result=\$gl_cv_type_${gltype}_suffix
9047
test "$result" = no && result=
9048
eval ${GLTYPE}_SUFFIX=\$result
9049
cat >>confdefs.h <<_ACEOF
9050
#define ${GLTYPE}_SUFFIX $result