6114
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6115
# for constant arguments. Useless!
6116
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6117
$as_echo_n "checking for working alloca.h... " >&6; }
6118
if test "${ac_cv_working_alloca_h+set}" = set; then :
6119
$as_echo_n "(cached) " >&6
6121
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6122
/* end confdefs.h. */
6127
char *p = (char *) alloca (2 * sizeof (int));
6133
if ac_fn_c_try_link "$LINENO"; then :
6134
ac_cv_working_alloca_h=yes
6136
ac_cv_working_alloca_h=no
6138
rm -f core conftest.err conftest.$ac_objext \
6139
conftest$ac_exeext conftest.$ac_ext
6141
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6142
$as_echo "$ac_cv_working_alloca_h" >&6; }
6143
if test $ac_cv_working_alloca_h = yes; then
6145
$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6149
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6150
$as_echo_n "checking for alloca... " >&6; }
6151
if test "${ac_cv_func_alloca_works+set}" = set; then :
6152
$as_echo_n "(cached) " >&6
6154
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6155
/* end confdefs.h. */
6157
# define alloca __builtin_alloca
6160
# include <malloc.h>
6161
# define alloca _alloca
6163
# ifdef HAVE_ALLOCA_H
6164
# include <alloca.h>
6169
# ifndef alloca /* predefined by HP cc +Olibcalls */
6180
char *p = (char *) alloca (1);
6186
if ac_fn_c_try_link "$LINENO"; then :
6187
ac_cv_func_alloca_works=yes
6189
ac_cv_func_alloca_works=no
6191
rm -f core conftest.err conftest.$ac_objext \
6192
conftest$ac_exeext conftest.$ac_ext
6194
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6195
$as_echo "$ac_cv_func_alloca_works" >&6; }
6197
if test $ac_cv_func_alloca_works = yes; then
6199
$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6202
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
6203
# that cause trouble. Some versions do not even contain alloca or
6204
# contain a buggy version. If you still want to use their alloca,
6205
# use ar to extract alloca.o from them instead of compiling alloca.c.
6211
ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6213
$as_echo "#define C_ALLOCA 1" >>confdefs.h
6216
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6217
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6218
if test "${ac_cv_os_cray+set}" = set; then :
6219
$as_echo_n "(cached) " >&6
6221
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6222
/* end confdefs.h. */
6223
#if defined CRAY && ! defined CRAY2
6230
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6231
$EGREP "webecray" >/dev/null 2>&1; then :
5372
6236
rm -f conftest*
5377
{ echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
5378
echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6; }
5379
if test "${ac_cv_have_decl_strerror_r+set}" = set; then
5380
echo $ECHO_N "(cached) $ECHO_C" >&6
5382
cat >conftest.$ac_ext <<_ACEOF
6239
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6240
$as_echo "$ac_cv_os_cray" >&6; }
6241
if test $ac_cv_os_cray = yes; then
6242
for ac_func in _getb67 GETB67 getb67; do
6243
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6244
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6245
eval as_val=\$$as_ac_var
6246
if test "x$as_val" = x""yes; then :
6248
cat >>confdefs.h <<_ACEOF
6249
#define CRAY_STACKSEG_END $ac_func
5385
cat confdefs.h >>conftest.$ac_ext
5386
cat >>conftest.$ac_ext <<_ACEOF
6258
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6259
$as_echo_n "checking stack direction for C alloca... " >&6; }
6260
if test "${ac_cv_c_stack_direction+set}" = set; then :
6261
$as_echo_n "(cached) " >&6
6263
if test "$cross_compiling" = yes; then :
6264
ac_cv_c_stack_direction=0
6266
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5387
6267
/* end confdefs.h. */
5388
6268
$ac_includes_default
6270
find_stack_direction ()
6272
static char *addr = 0;
6277
return find_stack_direction ();
6280
return (&dummy > addr) ? 1 : -1;
6286
return find_stack_direction () < 0;
6289
if ac_fn_c_try_run "$LINENO"; then :
6290
ac_cv_c_stack_direction=1
6292
ac_cv_c_stack_direction=-1
6294
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6295
conftest.$ac_objext conftest.beam conftest.$ac_ext
6299
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6300
$as_echo "$ac_cv_c_stack_direction" >&6; }
6301
cat >>confdefs.h <<_ACEOF
6302
#define STACK_DIRECTION $ac_cv_c_stack_direction
6308
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6309
if test "x$ac_cv_type_size_t" = x""yes; then :
6313
cat >>confdefs.h <<_ACEOF
6314
#define size_t unsigned int
6320
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
6321
$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
6322
if test "${gl_cv_func_malloc_posix+set}" = set; then :
6323
$as_echo_n "(cached) " >&6
6326
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327
/* end confdefs.h. */
6332
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
5400
rm -f conftest.$ac_objext
5401
if { (ac_try="$ac_compile"
5403
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5404
*) ac_try_echo=$ac_try;;
6340
if ac_fn_c_try_compile "$LINENO"; then :
6341
gl_cv_func_malloc_posix=yes
6343
gl_cv_func_malloc_posix=no
6345
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6348
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
6349
$as_echo "$gl_cv_func_malloc_posix" >&6; }
6353
GNULIB_CALLOC_POSIX=0;
6354
GNULIB_CANONICALIZE_FILE_NAME=0;
6355
GNULIB_GETLOADAVG=0;
6357
GNULIB_MALLOC_POSIX=0;
6365
GNULIB_REALLOC_POSIX=0;
6374
HAVE_CALLOC_POSIX=1;
6375
HAVE_CANONICALIZE_FILE_NAME=1;
6376
HAVE_DECL_GETLOADAVG=1;
6378
HAVE_MALLOC_POSIX=1;
6384
HAVE_REALLOC_POSIX=1;
6391
HAVE_STRUCT_RANDOM_DATA=1;
6392
HAVE_SYS_LOADAVG_H=0;
6394
REPLACE_CANONICALIZE_FILE_NAME=0;
6402
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6403
$as_echo_n "checking for inline... " >&6; }
6404
if test "${ac_cv_c_inline+set}" = set; then :
6405
$as_echo_n "(cached) " >&6
6408
for ac_kw in inline __inline__ __inline; do
6409
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6410
/* end confdefs.h. */
6413
static $ac_kw foo_t static_foo () {return 0; }
6414
$ac_kw foo_t foo () {return 0; }
6418
if ac_fn_c_try_compile "$LINENO"; then :
6419
ac_cv_c_inline=$ac_kw
6421
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6422
test "$ac_cv_c_inline" != no && break
6426
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6427
$as_echo "$ac_cv_c_inline" >&6; }
6429
case $ac_cv_c_inline in
6432
case $ac_cv_c_inline in
6434
*) ac_val=$ac_cv_c_inline;;
6436
cat >>confdefs.h <<_ACEOF
6438
#define inline $ac_val
5406
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5407
(eval "$ac_compile") 2>conftest.er1
5409
grep -v '^ *+' conftest.er1 >conftest.err
5411
cat conftest.err >&5
5412
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413
(exit $ac_status); } && {
5414
test -z "$ac_c_werror_flag" ||
5415
test ! -s conftest.err
5416
} && test -s conftest.$ac_objext; then
5417
ac_cv_have_decl_strerror_r=yes
5419
echo "$as_me: failed program was:" >&5
5420
sed 's/^/| /' conftest.$ac_ext >&5
5422
ac_cv_have_decl_strerror_r=no
5425
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5427
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
5428
echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6; }
5429
if test $ac_cv_have_decl_strerror_r = yes; then
5431
cat >>confdefs.h <<_ACEOF
5432
#define HAVE_DECL_STRERROR_R 1
5437
cat >>confdefs.h <<_ACEOF
5438
#define HAVE_DECL_STRERROR_R 0
6450
GNULIB_EUIDACCESS=0;
6457
GNULIB_GETDOMAINNAME=0;
6458
GNULIB_GETDTABLESIZE=0;
6460
GNULIB_GETHOSTNAME=0;
6462
GNULIB_GETLOGIN_R=0;
6463
GNULIB_GETPAGESIZE=0;
6464
GNULIB_GETUSERSHELL=0;
6472
GNULIB_READLINKAT=0;
6477
GNULIB_UNISTD_H_GETOPT=0;
6478
GNULIB_UNISTD_H_SIGPIPE=0;
6491
HAVE_GETDOMAINNAME=1;
6492
HAVE_GETDTABLESIZE=1;
6497
HAVE_GETUSERSHELL=1;
6508
HAVE_DECL_ENVIRON=1;
6509
HAVE_DECL_GETLOGIN_R=1;
6521
REPLACE_GETGROUPS=0;
6522
REPLACE_GETPAGESIZE=0;
6536
UNISTD_H_HAVE_WINSOCK2_H=0;
6537
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6540
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6541
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6542
if test "${ac_cv_type_uid_t+set}" = set; then :
6543
$as_echo_n "(cached) " >&6
6545
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6546
/* end confdefs.h. */
6547
#include <sys/types.h>
6550
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6551
$EGREP "uid_t" >/dev/null 2>&1; then :
6552
ac_cv_type_uid_t=yes
6559
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6560
$as_echo "$ac_cv_type_uid_t" >&6; }
6561
if test $ac_cv_type_uid_t = no; then
6563
$as_echo "#define uid_t int" >>confdefs.h
6566
$as_echo "#define gid_t int" >>confdefs.h
6570
for ac_header in unistd.h
6572
ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
6573
if test "x$ac_cv_header_unistd_h" = x""yes; then :
6574
cat >>confdefs.h <<_ACEOF
6575
#define HAVE_UNISTD_H 1
6582
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
6583
$as_echo_n "checking for working chown... " >&6; }
6584
if test "${ac_cv_func_chown_works+set}" = set; then :
6585
$as_echo_n "(cached) " >&6
6587
if test "$cross_compiling" = yes; then :
6588
ac_cv_func_chown_works=no
6590
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6591
/* end confdefs.h. */
6592
$ac_includes_default
6598
char *f = "conftest.chown";
6599
struct stat before, after;
6601
if (creat (f, 0600) < 0)
6603
if (stat (f, &before) < 0)
6605
if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
6607
if (stat (f, &after) < 0)
6609
return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
6615
if ac_fn_c_try_run "$LINENO"; then :
6616
ac_cv_func_chown_works=yes
6618
ac_cv_func_chown_works=no
6620
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6621
conftest.$ac_objext conftest.beam conftest.$ac_ext
6624
rm -f conftest.chown
6627
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
6628
$as_echo "$ac_cv_func_chown_works" >&6; }
6629
if test $ac_cv_func_chown_works = yes; then
6631
$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
6636
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
6637
$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
6638
if test "${gl_cv_func_chown_follows_symlink+set}" = set; then :
6639
$as_echo_n "(cached) " >&6
6642
if test "$cross_compiling" = yes; then :
6643
gl_cv_func_chown_follows_symlink=yes
6646
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6647
/* end confdefs.h. */
6656
char const *dangling_symlink = "conftest.dangle";
6658
unlink (dangling_symlink);
6659
if (symlink ("conftest.no-such", dangling_symlink))
6662
/* Exit successfully on a conforming system,
6663
i.e., where chown must fail with ENOENT. */
6664
exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0
6665
&& errno == ENOENT));
6669
if ac_fn_c_try_run "$LINENO"; then :
6670
gl_cv_func_chown_follows_symlink=yes
6672
gl_cv_func_chown_follows_symlink=no
6674
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6675
conftest.$ac_objext conftest.beam conftest.$ac_ext
6681
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
6682
$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
6684
if test $gl_cv_func_chown_follows_symlink = no; then
6686
$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
6693
for ac_func in $ac_func_list
6695
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6696
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6697
eval as_val=\$$as_ac_var
6698
if test "x$as_val" = x""yes; then :
6699
cat >>confdefs.h <<_ACEOF
6700
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6717
if test $ac_cv_func_chown = no; then
6727
gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6730
if test $gl_cv_func_chown_follows_symlink = no; then
6740
gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6744
if test $ac_cv_func_chown_works = no; then
6746
$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
6757
gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6761
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
6762
$as_echo_n "checking whether chown honors trailing slash... " >&6; }
6763
if test "${gl_cv_func_chown_slash_works+set}" = set; then :
6764
$as_echo_n "(cached) " >&6
6766
touch conftest.file && rm -f conftest.link
6767
if test "$cross_compiling" = yes; then :
6768
gl_cv_func_chown_slash_works="guessing no"
6770
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6771
/* end confdefs.h. */
6780
if (symlink ("conftest.file", "conftest.link")) return 1;
6781
if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
6787
if ac_fn_c_try_run "$LINENO"; then :
6788
gl_cv_func_chown_slash_works=yes
6790
gl_cv_func_chown_slash_works=no
6792
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6793
conftest.$ac_objext conftest.beam conftest.$ac_ext
6796
rm -f conftest.link conftest.file
6798
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
6799
$as_echo "$gl_cv_func_chown_slash_works" >&6; }
6800
if test "$gl_cv_func_chown_slash_works" != yes; then
6802
$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
6813
gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6817
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
6818
$as_echo_n "checking whether chown always updates ctime... " >&6; }
6819
if test "${gl_cv_func_chown_ctime_works+set}" = set; then :
6820
$as_echo_n "(cached) " >&6
6822
if test "$cross_compiling" = yes; then :
6823
gl_cv_func_chown_ctime_works="guessing no"
6825
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826
/* end confdefs.h. */
6832
#include <sys/stat.h>
6837
struct stat st1, st2;
6838
if (close (creat ("conftest.file", 0600))) return 1;
6839
if (stat ("conftest.file", &st1)) return 2;
6841
if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
6842
if (stat ("conftest.file", &st2)) return 4;
6843
if (st2.st_ctime <= st1.st_ctime) return 5;
6849
if ac_fn_c_try_run "$LINENO"; then :
6850
gl_cv_func_chown_ctime_works=yes
6852
gl_cv_func_chown_ctime_works=no
6854
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6855
conftest.$ac_objext conftest.beam conftest.$ac_ext
6860
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
6861
$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
6862
if test "$gl_cv_func_chown_ctime_works" != yes; then
6864
$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
6875
gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6879
if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
6888
gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
6903
REPLACE_FDOPENDIR=0;
6908
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6909
$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6910
if test "${gl_cv_have_include_next+set}" = set; then :
6911
$as_echo_n "(cached) " >&6
6913
rm -rf conftestd1a conftestd1b conftestd2
6914
mkdir conftestd1a conftestd1b conftestd2
6915
cat <<EOF > conftestd1a/conftest.h
6916
#define DEFINED_IN_CONFTESTD1
6917
#include_next <conftest.h>
6918
#ifdef DEFINED_IN_CONFTESTD2
6921
#error "include_next doesn't work"
6924
cat <<EOF > conftestd1b/conftest.h
6925
#define DEFINED_IN_CONFTESTD1
6927
#include_next <conftest.h>
6928
#ifdef DEFINED_IN_CONFTESTD2
6931
#error "include_next doesn't work"
6934
cat <<EOF > conftestd2/conftest.h
6935
#ifndef DEFINED_IN_CONFTESTD1
6936
#error "include_next test doesn't work"
6938
#define DEFINED_IN_CONFTESTD2
6940
gl_save_CPPFLAGS="$CPPFLAGS"
6941
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6942
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943
/* end confdefs.h. */
6944
#include <conftest.h>
6946
if ac_fn_c_try_compile "$LINENO"; then :
6947
gl_cv_have_include_next=yes
6949
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6950
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951
/* end confdefs.h. */
6952
#include <conftest.h>
6954
if ac_fn_c_try_compile "$LINENO"; then :
6955
gl_cv_have_include_next=buggy
6957
gl_cv_have_include_next=no
6959
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6962
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6963
CPPFLAGS="$gl_save_CPPFLAGS"
6964
rm -rf conftestd1a conftestd1b conftestd2
6967
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6968
$as_echo "$gl_cv_have_include_next" >&6; }
6969
PRAGMA_SYSTEM_HEADER=
6970
if test $gl_cv_have_include_next = yes; then
6971
INCLUDE_NEXT=include_next
6972
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6973
if test -n "$GCC"; then
6974
PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6977
if test $gl_cv_have_include_next = buggy; then
6978
INCLUDE_NEXT=include
6979
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6981
INCLUDE_NEXT=include
6982
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6992
for ac_header in $ac_header_list
6994
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6995
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6997
eval as_val=\$$as_ac_Header
6998
if test "x$as_val" = x""yes; then :
6999
cat >>confdefs.h <<_ACEOF
7000
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7010
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5
7011
$as_echo_n "checking whether system is Windows or MSDOS... " >&6; }
7012
if test "${ac_cv_win_or_dos+set}" = set; then :
7013
$as_echo_n "(cached) " >&6
7016
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017
/* end confdefs.h. */
7023
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
7024
neither MSDOS nor Windows
7030
if ac_fn_c_try_compile "$LINENO"; then :
7031
ac_cv_win_or_dos=yes
7035
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7038
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5
7039
$as_echo "$ac_cv_win_or_dos" >&6; }
7041
if test x"$ac_cv_win_or_dos" = xyes; then
7042
ac_fs_accepts_drive_letter_prefix=1
7043
ac_fs_backslash_is_file_name_separator=1
7044
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5
7045
$as_echo_n "checking whether drive letter can start relative path... " >&6; }
7046
if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then :
7047
$as_echo_n "(cached) " >&6
7050
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051
/* end confdefs.h. */
7057
#if defined __CYGWIN__
7058
drive letters are always absolute
7064
if ac_fn_c_try_compile "$LINENO"; then :
7065
ac_cv_drive_letter_can_be_relative=yes
7067
ac_cv_drive_letter_can_be_relative=no
7069
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7072
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5
7073
$as_echo "$ac_cv_drive_letter_can_be_relative" >&6; }
7074
if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
7075
ac_fs_drive_letter_can_be_relative=1
7077
ac_fs_drive_letter_can_be_relative=0
7080
ac_fs_accepts_drive_letter_prefix=0
7081
ac_fs_backslash_is_file_name_separator=0
7082
ac_fs_drive_letter_can_be_relative=0
7086
cat >>confdefs.h <<_ACEOF
7087
#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
7094
cat >>confdefs.h <<_ACEOF
7095
#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
7100
cat >>confdefs.h <<_ACEOF
7101
#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative
7107
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7108
$as_echo_n "checking whether // is distinct from /... " >&6; }
7109
if test "${gl_cv_double_slash_root+set}" = set; then :
7110
$as_echo_n "(cached) " >&6
7112
if test x"$cross_compiling" = xyes ; then
7113
# When cross-compiling, there is no way to tell whether // is special
7114
# short of a list of hosts. However, the only known hosts to date
7115
# that have a distinct // are Apollo DomainOS (too old to port to),
7116
# Cygwin, and z/OS. If anyone knows of another system for which // has
7117
# special semantics and is distinct from /, please report it to
7118
# <bug-gnulib@gnu.org>.
7120
*-cygwin | i370-ibm-openedition)
7121
gl_cv_double_slash_root=yes ;;
7123
# Be optimistic and assume that / and // are the same when we
7125
gl_cv_double_slash_root='unknown, assuming no' ;;
7128
set x `ls -di / // 2>/dev/null`
7129
if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7130
gl_cv_double_slash_root=no
7132
gl_cv_double_slash_root=yes
7136
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7137
$as_echo "$gl_cv_double_slash_root" >&6; }
7138
if test "$gl_cv_double_slash_root" = yes; then
7140
$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7150
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7151
$as_echo_n "checking for complete errno.h... " >&6; }
7152
if test "${gl_cv_header_errno_h_complete+set}" = set; then :
7153
$as_echo_n "(cached) " >&6
7156
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157
/* end confdefs.h. */
7166
#if !defined ENOLINK
7172
#if !defined EMULTIHOP
7175
#if !defined EBADMSG
7178
#if !defined EOVERFLOW
7181
#if !defined ENOTSUP
7187
#if !defined ECANCELED
7192
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7193
$EGREP "booboo" >/dev/null 2>&1; then :
7194
gl_cv_header_errno_h_complete=no
7196
gl_cv_header_errno_h_complete=yes
7202
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7203
$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7204
if test $gl_cv_header_errno_h_complete = yes; then
7213
if test $gl_cv_have_include_next = yes; then
7214
gl_cv_next_errno_h='<'errno.h'>'
7216
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7217
$as_echo_n "checking absolute name of <errno.h>... " >&6; }
7218
if test "${gl_cv_next_errno_h+set}" = set; then :
7219
$as_echo_n "(cached) " >&6
7222
if test $ac_cv_header_errno_h = yes; then
7223
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7224
/* end confdefs.h. */
7229
aix*) gl_absname_cpp="$ac_cpp -C" ;;
7230
*) gl_absname_cpp="$ac_cpp" ;;
7232
gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7233
sed -n '\#/errno.h#{
7234
s#.*"\(.*/errno.h\)".*#\1#
7240
gl_cv_next_errno_h='<'errno.h'>'
7244
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7245
$as_echo "$gl_cv_next_errno_h" >&6; }
7247
NEXT_ERRNO_H=$gl_cv_next_errno_h
7249
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7250
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7251
gl_next_as_first_directive='<'errno.h'>'
7253
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7254
gl_next_as_first_directive=$gl_cv_next_errno_h
7256
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7264
if test -n "$ERRNO_H"; then
7265
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7266
$as_echo_n "checking for EMULTIHOP value... " >&6; }
7267
if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7268
$as_echo_n "(cached) " >&6
7271
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272
/* end confdefs.h. */
7280
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7281
$EGREP "yes" >/dev/null 2>&1; then :
7282
gl_cv_header_errno_h_EMULTIHOP=yes
7284
gl_cv_header_errno_h_EMULTIHOP=no
7288
if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7289
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7290
/* end confdefs.h. */
7292
#define _XOPEN_SOURCE_EXTENDED 1
7299
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7300
$EGREP "yes" >/dev/null 2>&1; then :
7301
gl_cv_header_errno_h_EMULTIHOP=hidden
7305
if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7306
if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7307
#define _XOPEN_SOURCE_EXTENDED 1
7309
/* The following two lines are a workaround against an autoconf-2.52 bug. */
7320
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7321
$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7322
case $gl_cv_header_errno_h_EMULTIHOP in
7324
EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7327
EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7335
if test -n "$ERRNO_H"; then
7336
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7337
$as_echo_n "checking for ENOLINK value... " >&6; }
7338
if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7339
$as_echo_n "(cached) " >&6
7342
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343
/* end confdefs.h. */
7351
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7352
$EGREP "yes" >/dev/null 2>&1; then :
7353
gl_cv_header_errno_h_ENOLINK=yes
7355
gl_cv_header_errno_h_ENOLINK=no
7359
if test $gl_cv_header_errno_h_ENOLINK = no; then
7360
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7361
/* end confdefs.h. */
7363
#define _XOPEN_SOURCE_EXTENDED 1
7370
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7371
$EGREP "yes" >/dev/null 2>&1; then :
7372
gl_cv_header_errno_h_ENOLINK=hidden
7376
if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7377
if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7378
#define _XOPEN_SOURCE_EXTENDED 1
7380
/* The following two lines are a workaround against an autoconf-2.52 bug. */
7391
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7392
$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7393
case $gl_cv_header_errno_h_ENOLINK in
7395
ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7398
ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7406
if test -n "$ERRNO_H"; then
7407
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7408
$as_echo_n "checking for EOVERFLOW value... " >&6; }
7409
if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7410
$as_echo_n "(cached) " >&6
7413
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7414
/* end confdefs.h. */
7422
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7423
$EGREP "yes" >/dev/null 2>&1; then :
7424
gl_cv_header_errno_h_EOVERFLOW=yes
7426
gl_cv_header_errno_h_EOVERFLOW=no
7430
if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7431
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7432
/* end confdefs.h. */
7434
#define _XOPEN_SOURCE_EXTENDED 1
7441
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7442
$EGREP "yes" >/dev/null 2>&1; then :
7443
gl_cv_header_errno_h_EOVERFLOW=hidden
7447
if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7448
if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7449
#define _XOPEN_SOURCE_EXTENDED 1
7451
/* The following two lines are a workaround against an autoconf-2.52 bug. */
7462
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7463
$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7464
case $gl_cv_header_errno_h_EOVERFLOW in
7466
EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7469
EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7477
ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7478
if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
7484
cat >>confdefs.h <<_ACEOF
7485
#define HAVE_DECL_STRERROR_R $ac_have_decl
5446
7488
for ac_func in strerror_r
5448
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5449
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
5450
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5451
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5452
echo $ECHO_N "(cached) $ECHO_C" >&6
5454
cat >conftest.$ac_ext <<_ACEOF
5457
cat confdefs.h >>conftest.$ac_ext
5458
cat >>conftest.$ac_ext <<_ACEOF
5459
/* end confdefs.h. */
5460
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5461
For example, HP-UX 11i <limits.h> declares gettimeofday. */
5462
#define $ac_func innocuous_$ac_func
5464
/* System header to define __stub macros and hopefully few prototypes,
5465
which can conflict with char $ac_func (); below.
5466
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5467
<limits.h> exists even on freestanding compilers. */
5470
# include <limits.h>
5472
# include <assert.h>
5477
/* Override any GCC internal prototype to avoid an error.
5478
Use char because int might match the return type of a GCC
5479
builtin and then its argument prototype would still apply. */
5484
/* The GNU C library defines this for functions which it implements
5485
to always fail with ENOSYS. Some functions are actually named
5486
something starting with __ and the normal name is an alias. */
5487
#if defined __stub_$ac_func || defined __stub___$ac_func
5499
rm -f conftest.$ac_objext conftest$ac_exeext
5500
if { (ac_try="$ac_link"
5502
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5503
*) ac_try_echo=$ac_try;;
5505
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5506
(eval "$ac_link") 2>conftest.er1
5508
grep -v '^ *+' conftest.er1 >conftest.err
5510
cat conftest.err >&5
5511
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5512
(exit $ac_status); } && {
5513
test -z "$ac_c_werror_flag" ||
5514
test ! -s conftest.err
5515
} && test -s conftest$ac_exeext &&
5516
$as_test_x conftest$ac_exeext; then
5517
eval "$as_ac_var=yes"
5519
echo "$as_me: failed program was:" >&5
5520
sed 's/^/| /' conftest.$ac_ext >&5
5522
eval "$as_ac_var=no"
5525
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5526
conftest$ac_exeext conftest.$ac_ext
5528
ac_res=`eval echo '${'$as_ac_var'}'`
5529
{ echo "$as_me:$LINENO: result: $ac_res" >&5
5530
echo "${ECHO_T}$ac_res" >&6; }
5531
if test `eval echo '${'$as_ac_var'}'` = yes; then
7490
ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7491
if test "x$ac_cv_func_strerror_r" = x""yes; then :
5532
7492
cat >>confdefs.h <<_ACEOF
5533
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7493
#define HAVE_STRERROR_R 1
5539
{ echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
5540
echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; }
5541
if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
5542
echo $ECHO_N "(cached) $ECHO_C" >&6
7499
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7500
$as_echo_n "checking whether strerror_r returns char *... " >&6; }
7501
if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
7502
$as_echo_n "(cached) " >&6
5545
7505
ac_cv_func_strerror_r_char_p=no
5546
7506
if test $ac_cv_have_decl_strerror_r = yes; then
5547
cat >conftest.$ac_ext <<_ACEOF
5550
cat confdefs.h >>conftest.$ac_ext
5551
cat >>conftest.$ac_ext <<_ACEOF
7507
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552
7508
/* end confdefs.h. */
5553
7509
$ac_includes_default
5621
rm -f conftest$ac_exeext
5622
if { (ac_try="$ac_link"
5624
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5625
*) ac_try_echo=$ac_try;;
5627
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5628
(eval "$ac_link") 2>&5
5630
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5632
{ (case "(($ac_try" in
5633
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5634
*) ac_try_echo=$ac_try;;
5636
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5637
(eval "$ac_try") 2>&5
5639
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640
(exit $ac_status); }; }; then
7551
if ac_fn_c_try_run "$LINENO"; then :
5641
7552
ac_cv_func_strerror_r_char_p=yes
5643
echo "$as_me: program exited with status $ac_status" >&5
5644
echo "$as_me: failed program was:" >&5
5645
sed 's/^/| /' conftest.$ac_ext >&5
5648
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7554
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7555
conftest.$ac_objext conftest.beam conftest.$ac_ext
5655
{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
5656
echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; }
7561
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7562
$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
5657
7563
if test $ac_cv_func_strerror_r_char_p = yes; then
5659
cat >>confdefs.h <<\_ACEOF
5660
#define STRERROR_R_CHAR_P 1
5669
for ac_header in $ac_header_list
5671
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5672
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5673
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5674
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5675
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5676
echo $ECHO_N "(cached) $ECHO_C" >&6
5678
ac_res=`eval echo '${'$as_ac_Header'}'`
5679
{ echo "$as_me:$LINENO: result: $ac_res" >&5
5680
echo "${ECHO_T}$ac_res" >&6; }
5682
# Is the header compilable?
5683
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5684
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5685
cat >conftest.$ac_ext <<_ACEOF
5688
cat confdefs.h >>conftest.$ac_ext
5689
cat >>conftest.$ac_ext <<_ACEOF
5690
/* end confdefs.h. */
5691
$ac_includes_default
5692
#include <$ac_header>
5694
rm -f conftest.$ac_objext
5695
if { (ac_try="$ac_compile"
5697
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5698
*) ac_try_echo=$ac_try;;
5700
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5701
(eval "$ac_compile") 2>conftest.er1
5703
grep -v '^ *+' conftest.er1 >conftest.err
5705
cat conftest.err >&5
5706
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707
(exit $ac_status); } && {
5708
test -z "$ac_c_werror_flag" ||
5709
test ! -s conftest.err
5710
} && test -s conftest.$ac_objext; then
5711
ac_header_compiler=yes
5713
echo "$as_me: failed program was:" >&5
5714
sed 's/^/| /' conftest.$ac_ext >&5
5716
ac_header_compiler=no
5719
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5720
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5721
echo "${ECHO_T}$ac_header_compiler" >&6; }
5723
# Is the header present?
5724
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5725
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5726
cat >conftest.$ac_ext <<_ACEOF
5729
cat confdefs.h >>conftest.$ac_ext
5730
cat >>conftest.$ac_ext <<_ACEOF
5731
/* end confdefs.h. */
5732
#include <$ac_header>
5734
if { (ac_try="$ac_cpp conftest.$ac_ext"
5736
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5737
*) ac_try_echo=$ac_try;;
5739
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5740
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5742
grep -v '^ *+' conftest.er1 >conftest.err
5744
cat conftest.err >&5
5745
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746
(exit $ac_status); } >/dev/null && {
5747
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5748
test ! -s conftest.err
5750
ac_header_preproc=yes
5752
echo "$as_me: failed program was:" >&5
5753
sed 's/^/| /' conftest.$ac_ext >&5
5755
ac_header_preproc=no
5758
rm -f conftest.err conftest.$ac_ext
5759
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5760
echo "${ECHO_T}$ac_header_preproc" >&6; }
5762
# So? What about this header?
5763
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5765
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5766
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5767
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5768
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5769
ac_header_preproc=yes
5772
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5773
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5774
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5775
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5776
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5777
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5778
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5779
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5780
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5781
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5782
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5783
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5785
## ------------------------------- ##
5786
## Report this to bug-gzip@gnu.org ##
5787
## ------------------------------- ##
5789
) | sed "s/^/$as_me: WARNING: /" >&2
5792
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5793
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5794
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5795
echo $ECHO_N "(cached) $ECHO_C" >&6
5797
eval "$as_ac_Header=\$ac_header_preproc"
5799
ac_res=`eval echo '${'$as_ac_Header'}'`
5800
{ echo "$as_me:$LINENO: result: $ac_res" >&5
5801
echo "${ECHO_T}$ac_res" >&6; }
5804
if test `eval echo '${'$as_ac_Header'}'` = yes; then
5805
cat >>confdefs.h <<_ACEOF
5806
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5816
if test -z "$GETOPT_H"; then
5818
for ac_header in getopt.h
5820
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5821
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5822
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5823
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5824
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5825
echo $ECHO_N "(cached) $ECHO_C" >&6
5827
ac_res=`eval echo '${'$as_ac_Header'}'`
5828
{ echo "$as_me:$LINENO: result: $ac_res" >&5
5829
echo "${ECHO_T}$ac_res" >&6; }
5831
# Is the header compilable?
5832
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5833
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5834
cat >conftest.$ac_ext <<_ACEOF
5837
cat confdefs.h >>conftest.$ac_ext
5838
cat >>conftest.$ac_ext <<_ACEOF
5839
/* end confdefs.h. */
5840
$ac_includes_default
5841
#include <$ac_header>
5843
rm -f conftest.$ac_objext
5844
if { (ac_try="$ac_compile"
5846
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5847
*) ac_try_echo=$ac_try;;
5849
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5850
(eval "$ac_compile") 2>conftest.er1
5852
grep -v '^ *+' conftest.er1 >conftest.err
5854
cat conftest.err >&5
5855
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856
(exit $ac_status); } && {
5857
test -z "$ac_c_werror_flag" ||
5858
test ! -s conftest.err
5859
} && test -s conftest.$ac_objext; then
5860
ac_header_compiler=yes
5862
echo "$as_me: failed program was:" >&5
5863
sed 's/^/| /' conftest.$ac_ext >&5
5865
ac_header_compiler=no
5868
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5869
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5870
echo "${ECHO_T}$ac_header_compiler" >&6; }
5872
# Is the header present?
5873
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5874
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5875
cat >conftest.$ac_ext <<_ACEOF
5878
cat confdefs.h >>conftest.$ac_ext
5879
cat >>conftest.$ac_ext <<_ACEOF
5880
/* end confdefs.h. */
5881
#include <$ac_header>
5883
if { (ac_try="$ac_cpp conftest.$ac_ext"
5885
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5886
*) ac_try_echo=$ac_try;;
5888
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5889
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5891
grep -v '^ *+' conftest.er1 >conftest.err
5893
cat conftest.err >&5
5894
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895
(exit $ac_status); } >/dev/null && {
5896
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5897
test ! -s conftest.err
5899
ac_header_preproc=yes
5901
echo "$as_me: failed program was:" >&5
5902
sed 's/^/| /' conftest.$ac_ext >&5
5904
ac_header_preproc=no
5907
rm -f conftest.err conftest.$ac_ext
5908
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5909
echo "${ECHO_T}$ac_header_preproc" >&6; }
5911
# So? What about this header?
5912
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5914
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5915
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5916
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5917
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5918
ac_header_preproc=yes
5921
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5922
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5923
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5924
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5925
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5926
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5927
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5928
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5929
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5930
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5931
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5932
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5934
## ------------------------------- ##
5935
## Report this to bug-gzip@gnu.org ##
5936
## ------------------------------- ##
5938
) | sed "s/^/$as_me: WARNING: /" >&2
5941
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5942
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5943
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5944
echo $ECHO_N "(cached) $ECHO_C" >&6
5946
eval "$as_ac_Header=\$ac_header_preproc"
5948
ac_res=`eval echo '${'$as_ac_Header'}'`
5949
{ echo "$as_me:$LINENO: result: $ac_res" >&5
5950
echo "${ECHO_T}$ac_res" >&6; }
5953
if test `eval echo '${'$as_ac_Header'}'` = yes; then
5954
cat >>confdefs.h <<_ACEOF
5955
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5966
if test -z "$GETOPT_H"; then
5968
for ac_func in getopt_long_only
5970
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5971
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
5972
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5973
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5974
echo $ECHO_N "(cached) $ECHO_C" >&6
5976
cat >conftest.$ac_ext <<_ACEOF
5979
cat confdefs.h >>conftest.$ac_ext
5980
cat >>conftest.$ac_ext <<_ACEOF
5981
/* end confdefs.h. */
5982
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5983
For example, HP-UX 11i <limits.h> declares gettimeofday. */
5984
#define $ac_func innocuous_$ac_func
5986
/* System header to define __stub macros and hopefully few prototypes,
5987
which can conflict with char $ac_func (); below.
5988
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5989
<limits.h> exists even on freestanding compilers. */
5992
# include <limits.h>
5994
# include <assert.h>
5999
/* Override any GCC internal prototype to avoid an error.
6000
Use char because int might match the return type of a GCC
6001
builtin and then its argument prototype would still apply. */
6006
/* The GNU C library defines this for functions which it implements
6007
to always fail with ENOSYS. Some functions are actually named
6008
something starting with __ and the normal name is an alias. */
6009
#if defined __stub_$ac_func || defined __stub___$ac_func
6021
rm -f conftest.$ac_objext conftest$ac_exeext
6022
if { (ac_try="$ac_link"
6024
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6025
*) ac_try_echo=$ac_try;;
6027
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6028
(eval "$ac_link") 2>conftest.er1
6030
grep -v '^ *+' conftest.er1 >conftest.err
6032
cat conftest.err >&5
6033
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034
(exit $ac_status); } && {
6035
test -z "$ac_c_werror_flag" ||
6036
test ! -s conftest.err
6037
} && test -s conftest$ac_exeext &&
6038
$as_test_x conftest$ac_exeext; then
6039
eval "$as_ac_var=yes"
6041
echo "$as_me: failed program was:" >&5
6042
sed 's/^/| /' conftest.$ac_ext >&5
6044
eval "$as_ac_var=no"
6047
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6048
conftest$ac_exeext conftest.$ac_ext
6050
ac_res=`eval echo '${'$as_ac_var'}'`
6051
{ echo "$as_me:$LINENO: result: $ac_res" >&5
6052
echo "${ECHO_T}$ac_res" >&6; }
6053
if test `eval echo '${'$as_ac_var'}'` = yes; then
6054
cat >>confdefs.h <<_ACEOF
6055
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6065
if test -z "$GETOPT_H"; then
6066
{ echo "$as_me:$LINENO: checking whether optreset is declared" >&5
6067
echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
6068
if test "${ac_cv_have_decl_optreset+set}" = set; then
6069
echo $ECHO_N "(cached) $ECHO_C" >&6
6071
cat >conftest.$ac_ext <<_ACEOF
6074
cat confdefs.h >>conftest.$ac_ext
6075
cat >>conftest.$ac_ext <<_ACEOF
6076
/* end confdefs.h. */
6090
rm -f conftest.$ac_objext
6091
if { (ac_try="$ac_compile"
6093
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6094
*) ac_try_echo=$ac_try;;
6096
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6097
(eval "$ac_compile") 2>conftest.er1
6099
grep -v '^ *+' conftest.er1 >conftest.err
6101
cat conftest.err >&5
6102
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103
(exit $ac_status); } && {
6104
test -z "$ac_c_werror_flag" ||
6105
test ! -s conftest.err
6106
} && test -s conftest.$ac_objext; then
6107
ac_cv_have_decl_optreset=yes
6109
echo "$as_me: failed program was:" >&5
6110
sed 's/^/| /' conftest.$ac_ext >&5
6112
ac_cv_have_decl_optreset=no
6115
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
6118
echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
6119
if test $ac_cv_have_decl_optreset = yes; then
6125
if test -z "$GETOPT_H"; then
6126
{ echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
6127
echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
6128
if test "${gl_cv_func_gnu_getopt+set}" = set; then
6129
echo $ECHO_N "(cached) $ECHO_C" >&6
6131
if test "$cross_compiling" = yes; then
6132
{ echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
6133
echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
6134
if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
6135
echo $ECHO_N "(cached) $ECHO_C" >&6
6137
cat >conftest.$ac_ext <<_ACEOF
6140
cat confdefs.h >>conftest.$ac_ext
6141
cat >>conftest.$ac_ext <<_ACEOF
6142
/* end confdefs.h. */
6156
rm -f conftest.$ac_objext
6157
if { (ac_try="$ac_compile"
6159
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6160
*) ac_try_echo=$ac_try;;
6162
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6163
(eval "$ac_compile") 2>conftest.er1
6165
grep -v '^ *+' conftest.er1 >conftest.err
6167
cat conftest.err >&5
6168
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6169
(exit $ac_status); } && {
6170
test -z "$ac_c_werror_flag" ||
6171
test ! -s conftest.err
6172
} && test -s conftest.$ac_objext; then
6173
ac_cv_have_decl_getopt_clip=yes
6175
echo "$as_me: failed program was:" >&5
6176
sed 's/^/| /' conftest.$ac_ext >&5
6178
ac_cv_have_decl_getopt_clip=no
6181
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6183
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
6184
echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
6185
if test $ac_cv_have_decl_getopt_clip = yes; then
6186
gl_cv_func_gnu_getopt=no
6188
gl_cv_func_gnu_getopt=yes
6192
cat >conftest.$ac_ext <<_ACEOF
6195
cat confdefs.h >>conftest.$ac_ext
6196
cat >>conftest.$ac_ext <<_ACEOF
6197
/* end confdefs.h. */
6204
myargv[0] = "conftest";
6207
return getopt (2, myargv, "+a") != '?';
6213
rm -f conftest$ac_exeext
6214
if { (ac_try="$ac_link"
6216
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6217
*) ac_try_echo=$ac_try;;
6219
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6220
(eval "$ac_link") 2>&5
6222
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6224
{ (case "(($ac_try" in
6225
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6226
*) ac_try_echo=$ac_try;;
6228
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6229
(eval "$ac_try") 2>&5
6231
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232
(exit $ac_status); }; }; then
6233
gl_cv_func_gnu_getopt=yes
6235
echo "$as_me: program exited with status $ac_status" >&5
6236
echo "$as_me: failed program was:" >&5
6237
sed 's/^/| /' conftest.$ac_ext >&5
6240
gl_cv_func_gnu_getopt=no
6242
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6247
{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
6248
echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
6249
if test "$gl_cv_func_gnu_getopt" = "no"; then
6254
{ echo "$as_me:$LINENO: checking whether getenv is declared" >&5
6255
echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6; }
6256
if test "${ac_cv_have_decl_getenv+set}" = set; then
6257
echo $ECHO_N "(cached) $ECHO_C" >&6
6259
cat >conftest.$ac_ext <<_ACEOF
6262
cat confdefs.h >>conftest.$ac_ext
6263
cat >>conftest.$ac_ext <<_ACEOF
6264
/* end confdefs.h. */
6265
$ac_includes_default
6277
rm -f conftest.$ac_objext
6278
if { (ac_try="$ac_compile"
6280
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6281
*) ac_try_echo=$ac_try;;
6283
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6284
(eval "$ac_compile") 2>conftest.er1
6286
grep -v '^ *+' conftest.er1 >conftest.err
6288
cat conftest.err >&5
6289
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6290
(exit $ac_status); } && {
6291
test -z "$ac_c_werror_flag" ||
6292
test ! -s conftest.err
6293
} && test -s conftest.$ac_objext; then
6294
ac_cv_have_decl_getenv=yes
6296
echo "$as_me: failed program was:" >&5
6297
sed 's/^/| /' conftest.$ac_ext >&5
6299
ac_cv_have_decl_getenv=no
6302
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6304
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
6305
echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6; }
6306
if test $ac_cv_have_decl_getenv = yes; then
6308
cat >>confdefs.h <<_ACEOF
6309
#define HAVE_DECL_GETENV 1
6314
cat >>confdefs.h <<_ACEOF
6315
#define HAVE_DECL_GETENV 0
6322
{ echo "$as_me:$LINENO: checking for inline" >&5
6323
echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
6324
if test "${ac_cv_c_inline+set}" = set; then
6325
echo $ECHO_N "(cached) $ECHO_C" >&6
6328
for ac_kw in inline __inline__ __inline; do
6329
cat >conftest.$ac_ext <<_ACEOF
6332
cat confdefs.h >>conftest.$ac_ext
6333
cat >>conftest.$ac_ext <<_ACEOF
6334
/* end confdefs.h. */
6337
static $ac_kw foo_t static_foo () {return 0; }
6338
$ac_kw foo_t foo () {return 0; }
6342
rm -f conftest.$ac_objext
6343
if { (ac_try="$ac_compile"
6345
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6346
*) ac_try_echo=$ac_try;;
6348
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6349
(eval "$ac_compile") 2>conftest.er1
6351
grep -v '^ *+' conftest.er1 >conftest.err
6353
cat conftest.err >&5
6354
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355
(exit $ac_status); } && {
6356
test -z "$ac_c_werror_flag" ||
6357
test ! -s conftest.err
6358
} && test -s conftest.$ac_objext; then
6359
ac_cv_c_inline=$ac_kw
6361
echo "$as_me: failed program was:" >&5
6362
sed 's/^/| /' conftest.$ac_ext >&5
6367
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6368
test "$ac_cv_c_inline" != no && break
6372
{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
6373
echo "${ECHO_T}$ac_cv_c_inline" >&6; }
6376
case $ac_cv_c_inline in
6379
case $ac_cv_c_inline in
6381
*) ac_val=$ac_cv_c_inline;;
7565
$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7570
XGETTEXT_EXTRA_OPTIONS=
7604
REPLACE_UTIMENSAT=0;
7618
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7619
if test "x$ac_cv_type_mode_t" = x""yes; then :
7623
cat >>confdefs.h <<_ACEOF
7631
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
7632
$as_echo_n "checking for promoted mode_t type... " >&6; }
7633
if test "${gl_cv_promoted_mode_t+set}" = set; then :
7634
$as_echo_n "(cached) " >&6
7637
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7638
/* end confdefs.h. */
7639
#include <sys/types.h>
7643
typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
7648
if ac_fn_c_try_compile "$LINENO"; then :
7649
gl_cv_promoted_mode_t='int'
7651
gl_cv_promoted_mode_t='mode_t'
7653
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7656
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
7657
$as_echo "$gl_cv_promoted_mode_t" >&6; }
7659
cat >>confdefs.h <<_ACEOF
7660
#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
7670
GNULIB_FPRINTF_POSIX=0;
7682
GNULIB_OBSTACK_PRINTF=0;
7683
GNULIB_OBSTACK_PRINTF_POSIX=0;
7687
GNULIB_PRINTF_POSIX=0;
7695
GNULIB_SPRINTF_POSIX=0;
7696
GNULIB_STDIO_H_SIGPIPE=0;
7700
GNULIB_VFPRINTF_POSIX=0;
7702
GNULIB_VPRINTF_POSIX=0;
7704
GNULIB_VSPRINTF_POSIX=0;
7706
HAVE_DECL_GETDELIM=1;
7707
HAVE_DECL_GETLINE=1;
7708
HAVE_DECL_OBSTACK_PRINTF=1;
7709
HAVE_DECL_SNPRINTF=1;
7710
HAVE_DECL_VSNPRINTF=1;
7727
REPLACE_OBSTACK_PRINTF=0;
7736
REPLACE_STDIO_WRITE_FUNCS=0;
7737
REPLACE_VASPRINTF=0;
7741
REPLACE_VSNPRINTF=0;
7748
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7749
$as_echo_n "checking for working fcntl.h... " >&6; }
7750
if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
7751
$as_echo_n "(cached) " >&6
7753
if test "$cross_compiling" = yes; then :
7754
gl_cv_header_working_fcntl_h=cross-compiling
7756
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7757
/* end confdefs.h. */
7758
#include <sys/types.h>
7759
#include <sys/stat.h>
7766
#define O_NOFOLLOW 0
7768
static int const constants[] =
7770
O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7771
O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7778
int status = !constants;
7780
static char const sym[] = "conftest.sym";
7781
if (symlink (".", sym) != 0
7782
|| close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
7787
static char const file[] = "confdefs.h";
7788
int fd = open (file, O_RDONLY | O_NOATIME);
7790
struct stat st0, st1;
7792
|| fstat (fd, &st0) != 0
7794
|| read (fd, &c, 1) != 1
7796
|| stat (file, &st1) != 0
7797
|| st0.st_atime != st1.st_atime)
7805
if ac_fn_c_try_run "$LINENO"; then :
7806
gl_cv_header_working_fcntl_h=yes
7809
32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7810
64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7811
96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7812
*) gl_cv_header_working_fcntl_h='no';;
7815
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7816
conftest.$ac_objext conftest.beam conftest.$ac_ext
7820
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7821
$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7823
case $gl_cv_header_working_fcntl_h in #(
7824
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7828
cat >>confdefs.h <<_ACEOF
7829
#define HAVE_WORKING_O_NOATIME $ac_val
7833
case $gl_cv_header_working_fcntl_h in #(
7834
*O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7838
cat >>confdefs.h <<_ACEOF
7839
#define HAVE_WORKING_O_NOFOLLOW $ac_val
7854
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
7855
$as_echo_n "checking for stdint.h... " >&6; }
7856
if test "${gl_cv_header_stdint_h+set}" = set; then :
7857
$as_echo_n "(cached) " >&6
7859
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7860
/* end confdefs.h. */
7861
#include <sys/types.h>
7866
uintmax_t i = (uintmax_t) -1; return !i;
7871
if ac_fn_c_try_compile "$LINENO"; then :
7872
gl_cv_header_stdint_h=yes
7874
gl_cv_header_stdint_h=no
7876
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7878
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
7879
$as_echo "$gl_cv_header_stdint_h" >&6; }
7880
if test $gl_cv_header_stdint_h = yes; then
7882
cat >>confdefs.h <<_ACEOF
7883
#define HAVE_STDINT_H_WITH_UINTMAX 1
7889
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
7890
$as_echo_n "checking for inttypes.h... " >&6; }
7891
if test "${gl_cv_header_inttypes_h+set}" = set; then :
7892
$as_echo_n "(cached) " >&6
7894
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895
/* end confdefs.h. */
7896
#include <sys/types.h>
7897
#include <inttypes.h>
7901
uintmax_t i = (uintmax_t) -1; return !i;
7906
if ac_fn_c_try_compile "$LINENO"; then :
7907
gl_cv_header_inttypes_h=yes
7909
gl_cv_header_inttypes_h=no
7911
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7913
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
7914
$as_echo "$gl_cv_header_inttypes_h" >&6; }
7915
if test $gl_cv_header_inttypes_h = yes; then
7917
cat >>confdefs.h <<_ACEOF
7918
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
7927
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
7928
$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
7929
if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
7930
$as_echo_n "(cached) " >&6
7933
if test "$cross_compiling" = yes; then :
7936
# Guess yes on glibc systems.
7937
*-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
7938
# Guess yes on FreeBSD >= 5.
7939
freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
7940
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
7941
# Guess yes on MacOS X >= 10.3.
7942
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
7943
darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
7944
# Guess yes on OpenBSD >= 3.9.
7945
openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
7946
gl_cv_func_printf_sizes_c99="guessing no";;
7947
openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
7948
# Guess yes on Solaris >= 2.10.
7949
solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
7950
solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
7951
# Guess yes on NetBSD >= 3.
7952
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
7953
gl_cv_func_printf_sizes_c99="guessing no";;
7954
netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
7955
# If we don't know, assume the worst.
7956
*) gl_cv_func_printf_sizes_c99="guessing no";;
7960
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7961
/* end confdefs.h. */
7966
#include <sys/types.h>
7967
#if HAVE_STDINT_H_WITH_UINTMAX
7968
# include <stdint.h>
7970
#if HAVE_INTTYPES_H_WITH_UINTMAX
7971
# include <inttypes.h>
7973
static char buf[100];
7976
#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
7978
if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
7979
|| strcmp (buf, "12345671 33") != 0)
7983
if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
7984
|| strcmp (buf, "12345672 33") != 0)
7987
if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
7988
|| strcmp (buf, "12345673 33") != 0)
7991
if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
7992
|| strcmp (buf, "1.5 33") != 0)
7997
if ac_fn_c_try_run "$LINENO"; then :
7998
gl_cv_func_printf_sizes_c99=yes
8000
gl_cv_func_printf_sizes_c99=no
8002
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8003
conftest.$ac_objext conftest.beam conftest.$ac_ext
8008
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
8009
$as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
8013
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
8014
$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
8015
if test "${gl_cv_func_printf_long_double+set}" = set; then :
8016
$as_echo_n "(cached) " >&6
8019
if test "$cross_compiling" = yes; then :
8022
beos*) gl_cv_func_printf_long_double="guessing no";;
8023
mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
8024
*) gl_cv_func_printf_long_double="guessing yes";;
8028
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8029
/* end confdefs.h. */
8033
static char buf[10000];
8037
if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
8038
|| strcmp (buf, "1.750000 33") != 0)
8041
if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
8042
|| strcmp (buf, "1.750000e+00 33") != 0)
8045
if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
8046
|| strcmp (buf, "1.75 33") != 0)
8051
if ac_fn_c_try_run "$LINENO"; then :
8052
gl_cv_func_printf_long_double=yes
8054
gl_cv_func_printf_long_double=no
8056
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8057
conftest.$ac_objext conftest.beam conftest.$ac_ext
8062
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
8063
$as_echo "$gl_cv_func_printf_long_double" >&6; }
8067
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
8068
$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
8069
if test "${gl_cv_func_printf_infinite+set}" = set; then :
8070
$as_echo_n "(cached) " >&6
8073
if test "$cross_compiling" = yes; then :
8076
# Guess yes on glibc systems.
8077
*-gnu*) gl_cv_func_printf_infinite="guessing yes";;
8078
# Guess yes on FreeBSD >= 6.
8079
freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
8080
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
8081
# Guess yes on MacOS X >= 10.3.
8082
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
8083
darwin*) gl_cv_func_printf_infinite="guessing yes";;
8084
# Guess yes on HP-UX >= 11.
8085
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
8086
hpux*) gl_cv_func_printf_infinite="guessing yes";;
8087
# Guess yes on NetBSD >= 3.
8088
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8089
gl_cv_func_printf_infinite="guessing no";;
8090
netbsd*) gl_cv_func_printf_infinite="guessing yes";;
8091
# Guess yes on BeOS.
8092
beos*) gl_cv_func_printf_infinite="guessing yes";;
8093
# If we don't know, assume the worst.
8094
*) gl_cv_func_printf_infinite="guessing no";;
8098
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8099
/* end confdefs.h. */
8104
strisnan (const char *string, size_t start_index, size_t end_index)
8106
if (start_index < end_index)
8108
if (string[start_index] == '-')
8110
if (start_index + 3 <= end_index
8111
&& memcmp (string + start_index, "nan", 3) == 0)
8114
if (start_index == end_index
8115
|| (string[start_index] == '(' && string[end_index - 1] == ')'))
8124
static double plus_zero = 0.0;
8125
double minus_zero = - plus_zero;
8126
return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
8128
static char buf[10000];
8129
static double zero = 0.0;
8132
if (sprintf (buf, "%f", 1.0 / 0.0) < 0
8133
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8135
if (sprintf (buf, "%f", -1.0 / 0.0) < 0
8136
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8138
if (sprintf (buf, "%f", zero / zero) < 0
8139
|| !strisnan (buf, 0, strlen (buf)))
8141
if (sprintf (buf, "%e", 1.0 / 0.0) < 0
8142
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8144
if (sprintf (buf, "%e", -1.0 / 0.0) < 0
8145
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8147
if (sprintf (buf, "%e", zero / zero) < 0
8148
|| !strisnan (buf, 0, strlen (buf)))
8150
if (sprintf (buf, "%g", 1.0 / 0.0) < 0
8151
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8153
if (sprintf (buf, "%g", -1.0 / 0.0) < 0
8154
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8156
if (sprintf (buf, "%g", zero / zero) < 0
8157
|| !strisnan (buf, 0, strlen (buf)))
8159
/* This test fails on HP-UX 10.20. */
8160
if (have_minus_zero ())
8161
if (sprintf (buf, "%g", - zero) < 0
8162
|| strcmp (buf, "-0") != 0)
8167
if ac_fn_c_try_run "$LINENO"; then :
8168
gl_cv_func_printf_infinite=yes
8170
gl_cv_func_printf_infinite=no
8172
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8173
conftest.$ac_objext conftest.beam conftest.$ac_ext
8178
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
8179
$as_echo "$gl_cv_func_printf_infinite" >&6; }
8182
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8183
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8184
if test "${ac_cv_c_bigendian+set}" = set; then :
8185
$as_echo_n "(cached) " >&6
8187
ac_cv_c_bigendian=unknown
8188
# See if we're dealing with a universal compiler.
8189
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8190
/* end confdefs.h. */
8191
#ifndef __APPLE_CC__
8192
not a universal capable compiler
8197
if ac_fn_c_try_compile "$LINENO"; then :
8199
# Check for potential -arch flags. It is not universal unless
8200
# there are at least two -arch flags with different values.
8203
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8204
if test -n "$ac_prev"; then
8206
i?86 | x86_64 | ppc | ppc64)
8207
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8210
ac_cv_c_bigendian=universal
8216
elif test "x$ac_word" = "x-arch"; then
8221
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8222
if test $ac_cv_c_bigendian = unknown; then
8223
# See if sys/param.h defines the BYTE_ORDER macro.
8224
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8225
/* end confdefs.h. */
8226
#include <sys/types.h>
8227
#include <sys/param.h>
8232
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8233
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8242
if ac_fn_c_try_compile "$LINENO"; then :
8243
# It does; now see whether it defined to BIG_ENDIAN or not.
8244
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8245
/* end confdefs.h. */
8246
#include <sys/types.h>
8247
#include <sys/param.h>
8252
#if BYTE_ORDER != BIG_ENDIAN
8260
if ac_fn_c_try_compile "$LINENO"; then :
8261
ac_cv_c_bigendian=yes
8263
ac_cv_c_bigendian=no
8265
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8267
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8269
if test $ac_cv_c_bigendian = unknown; then
8270
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8271
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272
/* end confdefs.h. */
8278
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8286
if ac_fn_c_try_compile "$LINENO"; then :
8287
# It does; now see whether it defined to _BIG_ENDIAN or not.
8288
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8289
/* end confdefs.h. */
8303
if ac_fn_c_try_compile "$LINENO"; then :
8304
ac_cv_c_bigendian=yes
8306
ac_cv_c_bigendian=no
8308
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8310
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312
if test $ac_cv_c_bigendian = unknown; then
8313
# Compile a test program.
8314
if test "$cross_compiling" = yes; then :
8315
# Try to guess by grepping values from an object file.
8316
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8317
/* end confdefs.h. */
8318
short int ascii_mm[] =
8319
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8320
short int ascii_ii[] =
8321
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8322
int use_ascii (int i) {
8323
return ascii_mm[i] + ascii_ii[i];
8325
short int ebcdic_ii[] =
8326
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8327
short int ebcdic_mm[] =
8328
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8329
int use_ebcdic (int i) {
8330
return ebcdic_mm[i] + ebcdic_ii[i];
8337
return use_ascii (foo) == use_ebcdic (foo);
8342
if ac_fn_c_try_compile "$LINENO"; then :
8343
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8344
ac_cv_c_bigendian=yes
8346
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8347
if test "$ac_cv_c_bigendian" = unknown; then
8348
ac_cv_c_bigendian=no
8350
# finding both strings is unlikely to happen, but who knows?
8351
ac_cv_c_bigendian=unknown
8355
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8357
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358
/* end confdefs.h. */
8359
$ac_includes_default
8364
/* Are we little or big endian? From Harbison&Steele. */
8368
char c[sizeof (long int)];
8371
return u.c[sizeof (long int) - 1] == 1;
8377
if ac_fn_c_try_run "$LINENO"; then :
8378
ac_cv_c_bigendian=no
8380
ac_cv_c_bigendian=yes
8382
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8383
conftest.$ac_objext conftest.beam conftest.$ac_ext
8388
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8389
$as_echo "$ac_cv_c_bigendian" >&6; }
8390
case $ac_cv_c_bigendian in #(
8392
$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8398
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8402
as_fn_error "unknown endianness
8403
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8411
if test -n "$gl_printf_safe"; then
8413
$as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
8416
case "$gl_cv_func_printf_long_double" in
8418
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
8419
$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
8420
if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
8421
$as_echo_n "(cached) " >&6
8424
if test "$cross_compiling" = yes; then :
8427
# Guess no on ia64, x86_64, i386.
8428
ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
8431
# Guess yes on glibc systems.
8432
*-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
8433
# Guess yes on FreeBSD >= 6.
8434
freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
8435
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
8436
# Guess yes on MacOS X >= 10.3.
8437
darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";;
8438
darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";;
8439
# Guess yes on HP-UX >= 11.
8440
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
8441
hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
8442
# Guess yes on NetBSD >= 3.
8443
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8444
gl_cv_func_printf_infinite_long_double="guessing no";;
8445
netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
8446
# If we don't know, assume the worst.
8447
*) gl_cv_func_printf_infinite_long_double="guessing no";;
8453
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8454
/* end confdefs.h. */
8458
#if defined __MACH__ && defined __APPLE__
8459
/* Avoid a crash on MacOS X. */
8460
#include <mach/mach.h>
8461
#include <mach/mach_error.h>
8462
#include <mach/thread_status.h>
8463
#include <mach/exception.h>
8464
#include <mach/task.h>
8465
#include <pthread.h>
8466
/* The exception port on which our thread listens. */
8467
static mach_port_t our_exception_port;
8468
/* The main function of the thread listening for exceptions of type
8471
mach_exception_thread (void *arg)
8473
/* Buffer for a message to be received. */
8475
mach_msg_header_t head;
8476
mach_msg_body_t msgh_body;
8479
mach_msg_return_t retval;
8480
/* Wait for a message on the exception port. */
8481
retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8482
our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8483
if (retval != MACH_MSG_SUCCESS)
8490
mach_port_t self = mach_task_self ();
8491
/* Allocate a port on which the thread shall listen for exceptions. */
8492
if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8494
/* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
8495
if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8496
MACH_MSG_TYPE_MAKE_SEND)
8498
/* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
8500
exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8501
/* Create the thread listening on the exception port. */
8502
pthread_attr_t attr;
8504
if (pthread_attr_init (&attr) == 0
8505
&& pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8506
&& pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8507
pthread_attr_destroy (&attr);
8508
/* Replace the exception port info for these exceptions with our own.
8509
Note that we replace the exception port for the entire task, not only
8510
for a particular thread. This has the effect that when our exception
8511
port gets the message, the thread specific exception port has already
8512
been asked, and we don't need to bother about it.
8513
See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
8514
task_set_exception_ports (self, mask, our_exception_port,
8515
EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8521
/* Avoid a crash on POSIX systems. */
8523
/* A POSIX signal handler. */
8525
exception_handler (int sig)
8533
signal (SIGSEGV, exception_handler);
8536
signal (SIGBUS, exception_handler);
8545
strisnan (const char *string, size_t start_index, size_t end_index)
8547
if (start_index < end_index)
8549
if (string[start_index] == '-')
8551
if (start_index + 3 <= end_index
8552
&& memcmp (string + start_index, "nan", 3) == 0)
8555
if (start_index == end_index
8556
|| (string[start_index] == '(' && string[end_index - 1] == ')'))
8562
static char buf[10000];
8563
static long double zeroL = 0.0L;
8567
if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
8568
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8570
if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
8571
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8573
if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
8574
|| !strisnan (buf, 0, strlen (buf)))
8576
if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
8577
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8579
if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
8580
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8582
if (sprintf (buf, "%Le", zeroL / zeroL) < 0
8583
|| !strisnan (buf, 0, strlen (buf)))
8585
if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
8586
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8588
if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
8589
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8591
if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
8592
|| !strisnan (buf, 0, strlen (buf)))
8594
#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
8595
/* Representation of an 80-bit 'long double' as an initializer for a sequence
8596
of 'unsigned int' words. */
8597
# ifdef WORDS_BIGENDIAN
8598
# define LDBL80_WORDS(exponent,manthi,mantlo) \
8599
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
8600
((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
8601
(unsigned int) (mantlo) << 16 \
8604
# define LDBL80_WORDS(exponent,manthi,mantlo) \
8605
{ mantlo, manthi, exponent }
8608
static union { unsigned int word[4]; long double value; } x =
8609
{ LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
8610
if (sprintf (buf, "%Lf", x.value) < 0
8611
|| !strisnan (buf, 0, strlen (buf)))
8613
if (sprintf (buf, "%Le", x.value) < 0
8614
|| !strisnan (buf, 0, strlen (buf)))
8616
if (sprintf (buf, "%Lg", x.value) < 0
8617
|| !strisnan (buf, 0, strlen (buf)))
8621
/* Signalling NaN. */
8622
static union { unsigned int word[4]; long double value; } x =
8623
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
8624
if (sprintf (buf, "%Lf", x.value) < 0
8625
|| !strisnan (buf, 0, strlen (buf)))
8627
if (sprintf (buf, "%Le", x.value) < 0
8628
|| !strisnan (buf, 0, strlen (buf)))
8630
if (sprintf (buf, "%Lg", x.value) < 0
8631
|| !strisnan (buf, 0, strlen (buf)))
8635
static union { unsigned int word[4]; long double value; } x =
8636
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
8637
if (sprintf (buf, "%Lf", x.value) < 0
8638
|| !strisnan (buf, 0, strlen (buf)))
8640
if (sprintf (buf, "%Le", x.value) < 0
8641
|| !strisnan (buf, 0, strlen (buf)))
8643
if (sprintf (buf, "%Lg", x.value) < 0
8644
|| !strisnan (buf, 0, strlen (buf)))
8647
{ /* Pseudo-Infinity. */
8648
static union { unsigned int word[4]; long double value; } x =
8649
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
8650
if (sprintf (buf, "%Lf", x.value) < 0
8651
|| !strisnan (buf, 0, strlen (buf)))
8653
if (sprintf (buf, "%Le", x.value) < 0
8654
|| !strisnan (buf, 0, strlen (buf)))
8656
if (sprintf (buf, "%Lg", x.value) < 0
8657
|| !strisnan (buf, 0, strlen (buf)))
8660
{ /* Pseudo-Zero. */
8661
static union { unsigned int word[4]; long double value; } x =
8662
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
8663
if (sprintf (buf, "%Lf", x.value) < 0
8664
|| !strisnan (buf, 0, strlen (buf)))
8666
if (sprintf (buf, "%Le", x.value) < 0
8667
|| !strisnan (buf, 0, strlen (buf)))
8669
if (sprintf (buf, "%Lg", x.value) < 0
8670
|| !strisnan (buf, 0, strlen (buf)))
8673
{ /* Unnormalized number. */
8674
static union { unsigned int word[4]; long double value; } x =
8675
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
8676
if (sprintf (buf, "%Lf", x.value) < 0
8677
|| !strisnan (buf, 0, strlen (buf)))
8679
if (sprintf (buf, "%Le", x.value) < 0
8680
|| !strisnan (buf, 0, strlen (buf)))
8682
if (sprintf (buf, "%Lg", x.value) < 0
8683
|| !strisnan (buf, 0, strlen (buf)))
8686
{ /* Pseudo-Denormal. */
8687
static union { unsigned int word[4]; long double value; } x =
8688
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
8689
if (sprintf (buf, "%Lf", x.value) < 0
8690
|| !strisnan (buf, 0, strlen (buf)))
8692
if (sprintf (buf, "%Le", x.value) < 0
8693
|| !strisnan (buf, 0, strlen (buf)))
8695
if (sprintf (buf, "%Lg", x.value) < 0
8696
|| !strisnan (buf, 0, strlen (buf)))
8703
if ac_fn_c_try_run "$LINENO"; then :
8704
gl_cv_func_printf_infinite_long_double=yes
8706
gl_cv_func_printf_infinite_long_double=no
8708
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8709
conftest.$ac_objext conftest.beam conftest.$ac_ext
8714
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
8715
$as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
8718
gl_cv_func_printf_infinite_long_double="irrelevant"
8724
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
8725
$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
8726
if test "${gl_cv_func_printf_directive_a+set}" = set; then :
8727
$as_echo_n "(cached) " >&6
8730
if test "$cross_compiling" = yes; then :
8733
# Guess yes on glibc >= 2.5 systems.
8735
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8736
/* end confdefs.h. */
8738
#include <features.h>
8739
#ifdef __GNU_LIBRARY__
8740
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
8746
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8747
$EGREP "BZ2908" >/dev/null 2>&1; then :
8748
gl_cv_func_printf_directive_a="guessing yes"
8750
gl_cv_func_printf_directive_a="guessing no"
8755
# If we don't know, assume the worst.
8756
*) gl_cv_func_printf_directive_a="guessing no";;
8760
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8761
/* end confdefs.h. */
8765
static char buf[100];
8768
if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
8769
|| (strcmp (buf, "0x1.922p+1 33") != 0
8770
&& strcmp (buf, "0x3.244p+0 33") != 0
8771
&& strcmp (buf, "0x6.488p-1 33") != 0
8772
&& strcmp (buf, "0xc.91p-2 33") != 0))
8774
if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
8775
|| (strcmp (buf, "-0X1.922P+1 33") != 0
8776
&& strcmp (buf, "-0X3.244P+0 33") != 0
8777
&& strcmp (buf, "-0X6.488P-1 33") != 0
8778
&& strcmp (buf, "-0XC.91P-2 33") != 0))
8780
/* This catches a FreeBSD 6.1 bug: it doesn't round. */
8781
if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
8782
|| (strcmp (buf, "0x1.83p+0 33") != 0
8783
&& strcmp (buf, "0x3.05p-1 33") != 0
8784
&& strcmp (buf, "0x6.0ap-2 33") != 0
8785
&& strcmp (buf, "0xc.14p-3 33") != 0))
8787
/* This catches a FreeBSD 6.1 bug. See
8788
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
8789
if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
8792
/* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
8793
if (sprintf (buf, "%.1a", 1.999) < 0
8794
|| (strcmp (buf, "0x1.0p+1") != 0
8795
&& strcmp (buf, "0x2.0p+0") != 0
8796
&& strcmp (buf, "0x4.0p-1") != 0
8797
&& strcmp (buf, "0x8.0p-2") != 0))
8799
/* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
8800
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
8801
if (sprintf (buf, "%.1La", 1.999L) < 0
8802
|| (strcmp (buf, "0x1.0p+1") != 0
8803
&& strcmp (buf, "0x2.0p+0") != 0
8804
&& strcmp (buf, "0x4.0p-1") != 0
8805
&& strcmp (buf, "0x8.0p-2") != 0))
8810
if ac_fn_c_try_run "$LINENO"; then :
8811
gl_cv_func_printf_directive_a=yes
8813
gl_cv_func_printf_directive_a=no
8815
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8816
conftest.$ac_objext conftest.beam conftest.$ac_ext
8821
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
8822
$as_echo "$gl_cv_func_printf_directive_a" >&6; }
8826
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
8827
$as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
8828
if test "${gl_cv_func_printf_directive_f+set}" = set; then :
8829
$as_echo_n "(cached) " >&6
8832
if test "$cross_compiling" = yes; then :
8835
# Guess yes on glibc systems.
8836
*-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
8837
# Guess yes on FreeBSD >= 6.
8838
freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
8839
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
8840
# Guess yes on MacOS X >= 10.3.
8841
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
8842
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
8843
# Guess yes on Solaris >= 2.10.
8844
solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
8845
solaris*) gl_cv_func_printf_directive_f="guessing yes";;
8846
# If we don't know, assume the worst.
8847
*) gl_cv_func_printf_directive_f="guessing no";;
8851
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852
/* end confdefs.h. */
8856
static char buf[100];
8859
if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
8860
|| strcmp (buf, "1234567.000000 33") != 0)
8862
if (sprintf (buf, "%F", 1.0 / 0.0) < 0
8863
|| (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
8865
/* This catches a Cygwin 1.5.x bug. */
8866
if (sprintf (buf, "%.F", 1234.0) < 0
8867
|| strcmp (buf, "1234") != 0)
8872
if ac_fn_c_try_run "$LINENO"; then :
8873
gl_cv_func_printf_directive_f=yes
8875
gl_cv_func_printf_directive_f=no
8877
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8878
conftest.$ac_objext conftest.beam conftest.$ac_ext
8883
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
8884
$as_echo "$gl_cv_func_printf_directive_f" >&6; }
8888
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
8889
$as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
8890
if test "${gl_cv_func_printf_directive_n+set}" = set; then :
8891
$as_echo_n "(cached) " >&6
8894
if test "$cross_compiling" = yes; then :
8897
*) gl_cv_func_printf_directive_n="guessing yes";;
8901
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8902
/* end confdefs.h. */
8906
static char fmtstring[10];
8907
static char buf[100];
8911
/* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
8912
support %n in format strings in read-only memory but not in writable
8914
strcpy (fmtstring, "%d %n");
8915
if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
8916
|| strcmp (buf, "123 ") != 0
8922
if ac_fn_c_try_run "$LINENO"; then :
8923
gl_cv_func_printf_directive_n=yes
8925
gl_cv_func_printf_directive_n=no
8927
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8928
conftest.$ac_objext conftest.beam conftest.$ac_ext
8933
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
8934
$as_echo "$gl_cv_func_printf_directive_n" >&6; }
8938
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
8939
$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
8940
if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
8941
$as_echo_n "(cached) " >&6
8944
if test "$cross_compiling" = yes; then :
8947
openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
8948
irix*) gl_cv_func_printf_directive_ls="guessing no";;
8949
solaris*) gl_cv_func_printf_directive_ls="guessing no";;
8950
cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
8951
beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
8952
*) gl_cv_func_printf_directive_ls="guessing yes";;
8956
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8957
/* end confdefs.h. */
8959
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8961
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8962
included before <wchar.h>. */
8971
/* Test whether %ls works at all.
8972
This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
8975
static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
8977
if (sprintf (buf, "%ls", wstring) < 0
8978
|| strcmp (buf, "abc") != 0)
8981
/* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
8982
assertion failure inside libc), but not on OpenBSD 4.0. */
8984
static const wchar_t wstring[] = { 'a', 0 };
8986
if (sprintf (buf, "%ls", wstring) < 0
8987
|| strcmp (buf, "a") != 0)
8990
/* Test whether precisions in %ls are supported as specified in ISO C 99
8992
"If a precision is specified, no more than that many bytes are written
8993
(including shift sequences, if any), and the array shall contain a
8994
null wide character if, to equal the multibyte character sequence
8995
length given by the precision, the function would need to access a
8996
wide character one past the end of the array."
8997
This test fails on Solaris 10. */
8999
static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
9001
if (sprintf (buf, "%.2ls", wstring) < 0
9002
|| strcmp (buf, "ab") != 0)
9008
if ac_fn_c_try_run "$LINENO"; then :
9009
gl_cv_func_printf_directive_ls=yes
9011
gl_cv_func_printf_directive_ls=no
9013
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9014
conftest.$ac_objext conftest.beam conftest.$ac_ext
9019
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
9020
$as_echo "$gl_cv_func_printf_directive_ls" >&6; }
9024
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
9025
$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
9026
if test "${gl_cv_func_printf_positions+set}" = set; then :
9027
$as_echo_n "(cached) " >&6
9030
if test "$cross_compiling" = yes; then :
9033
netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
9034
gl_cv_func_printf_positions="guessing no";;
9035
beos*) gl_cv_func_printf_positions="guessing no";;
9036
mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
9037
*) gl_cv_func_printf_positions="guessing yes";;
9041
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9042
/* end confdefs.h. */
9046
/* The string "%2$d %1$d", with dollar characters protected from the shell's
9047
dollar expansion (possibly an autoconf bug). */
9048
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
9049
static char buf[100];
9052
sprintf (buf, format, 33, 55);
9053
return (strcmp (buf, "55 33") != 0);
9056
if ac_fn_c_try_run "$LINENO"; then :
9057
gl_cv_func_printf_positions=yes
9059
gl_cv_func_printf_positions=no
9061
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9062
conftest.$ac_objext conftest.beam conftest.$ac_ext
9067
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
9068
$as_echo "$gl_cv_func_printf_positions" >&6; }
9072
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
9073
$as_echo_n "checking whether printf supports the grouping flag... " >&6; }
9074
if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
9075
$as_echo_n "(cached) " >&6
9078
if test "$cross_compiling" = yes; then :
9081
cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
9082
netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
9083
mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
9084
*) gl_cv_func_printf_flag_grouping="guessing yes";;
9088
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9089
/* end confdefs.h. */
9093
static char buf[100];
9096
if (sprintf (buf, "%'d %d", 1234567, 99) < 0
9097
|| buf[strlen (buf) - 1] != '9')
9102
if ac_fn_c_try_run "$LINENO"; then :
9103
gl_cv_func_printf_flag_grouping=yes
9105
gl_cv_func_printf_flag_grouping=no
9107
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9108
conftest.$ac_objext conftest.beam conftest.$ac_ext
9113
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
9114
$as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
9118
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
9119
$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
9120
if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
9121
$as_echo_n "(cached) " >&6
9124
if test "$cross_compiling" = yes; then :
9127
# Guess yes on HP-UX 11.
9128
hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
9129
# Guess no on HP-UX 10 and older.
9130
hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
9131
# Guess yes otherwise.
9132
*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
9136
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137
/* end confdefs.h. */
9141
static char buf[100];
9144
/* Check that a '-' flag is not annihilated by a negative width. */
9145
if (sprintf (buf, "a%-*sc", -3, "b") < 0
9146
|| strcmp (buf, "ab c") != 0)
9151
if ac_fn_c_try_run "$LINENO"; then :
9152
gl_cv_func_printf_flag_leftadjust=yes
9154
gl_cv_func_printf_flag_leftadjust=no
9156
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9157
conftest.$ac_objext conftest.beam conftest.$ac_ext
9162
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
9163
$as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
9167
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
9168
$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
9169
if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
9170
$as_echo_n "(cached) " >&6
9173
if test "$cross_compiling" = yes; then :
9176
# Guess yes on glibc systems.
9177
*-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
9178
# Guess yes on BeOS.
9179
beos*) gl_cv_func_printf_flag_zero="guessing yes";;
9180
# If we don't know, assume the worst.
9181
*) gl_cv_func_printf_flag_zero="guessing no";;
9185
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186
/* end confdefs.h. */
9190
static char buf[100];
9193
if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
9194
|| (strcmp (buf, " inf") != 0
9195
&& strcmp (buf, " infinity") != 0))
9200
if ac_fn_c_try_run "$LINENO"; then :
9201
gl_cv_func_printf_flag_zero=yes
9203
gl_cv_func_printf_flag_zero=no
9205
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9206
conftest.$ac_objext conftest.beam conftest.$ac_ext
9211
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
9212
$as_echo "$gl_cv_func_printf_flag_zero" >&6; }
9216
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
9217
$as_echo_n "checking whether printf supports large precisions... " >&6; }
9218
if test "${gl_cv_func_printf_precision+set}" = set; then :
9219
$as_echo_n "(cached) " >&6
9222
if test "$cross_compiling" = yes; then :
9225
# Guess no only on native Win32 and BeOS systems.
9226
mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
9227
beos*) gl_cv_func_printf_precision="guessing no" ;;
9228
*) gl_cv_func_printf_precision="guessing yes" ;;
9232
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233
/* end confdefs.h. */
9237
static char buf[5000];
9241
/* On BeOS, this would crash and show a dialog box. Avoid the crash. */
9244
if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
9249
if ac_fn_c_try_run "$LINENO"; then :
9250
gl_cv_func_printf_precision=yes
9252
gl_cv_func_printf_precision=no
9254
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9255
conftest.$ac_objext conftest.beam conftest.$ac_ext
9260
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
9261
$as_echo "$gl_cv_func_printf_precision" >&6; }
9264
gl_cv_c_multiarch=no
9265
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9266
/* end confdefs.h. */
9267
#ifndef __APPLE_CC__
9268
not a universal capable compiler
9273
if ac_fn_c_try_compile "$LINENO"; then :
9277
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9278
if test -n "$prev"; then
9280
i?86 | x86_64 | ppc | ppc64)
9281
if test -z "$arch" || test "$arch" = "$word"; then
9284
gl_cv_c_multiarch=yes
9290
if test "x$word" = "x-arch"; then
9297
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9298
if test $gl_cv_c_multiarch = yes; then
9300
$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9302
APPLE_UNIVERSAL_BUILD=1
9304
APPLE_UNIVERSAL_BUILD=0
9311
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
9312
$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
9313
if test "${gl_cv_func_printf_enomem+set}" = set; then :
9314
$as_echo_n "(cached) " >&6
9317
gl_cv_func_printf_enomem="guessing no"
9318
if test "$cross_compiling" = no; then
9319
if test $APPLE_UNIVERSAL_BUILD = 0; then
9320
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9321
/* end confdefs.h. */
9325
#if defined __MACH__ && defined __APPLE__
9326
/* Avoid a crash on MacOS X. */
9327
#include <mach/mach.h>
9328
#include <mach/mach_error.h>
9329
#include <mach/thread_status.h>
9330
#include <mach/exception.h>
9331
#include <mach/task.h>
9332
#include <pthread.h>
9333
/* The exception port on which our thread listens. */
9334
static mach_port_t our_exception_port;
9335
/* The main function of the thread listening for exceptions of type
9338
mach_exception_thread (void *arg)
9340
/* Buffer for a message to be received. */
9342
mach_msg_header_t head;
9343
mach_msg_body_t msgh_body;
9346
mach_msg_return_t retval;
9347
/* Wait for a message on the exception port. */
9348
retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9349
our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9350
if (retval != MACH_MSG_SUCCESS)
9357
mach_port_t self = mach_task_self ();
9358
/* Allocate a port on which the thread shall listen for exceptions. */
9359
if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9361
/* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9362
if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9363
MACH_MSG_TYPE_MAKE_SEND)
9365
/* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9367
exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9368
/* Create the thread listening on the exception port. */
9369
pthread_attr_t attr;
9371
if (pthread_attr_init (&attr) == 0
9372
&& pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9373
&& pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9374
pthread_attr_destroy (&attr);
9375
/* Replace the exception port info for these exceptions with our own.
9376
Note that we replace the exception port for the entire task, not only
9377
for a particular thread. This has the effect that when our exception
9378
port gets the message, the thread specific exception port has already
9379
been asked, and we don't need to bother about it.
9380
See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9381
task_set_exception_ports (self, mask, our_exception_port,
9382
EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9388
/* Avoid a crash on POSIX systems. */
9390
/* A POSIX signal handler. */
9392
exception_handler (int sig)
9400
signal (SIGSEGV, exception_handler);
9403
signal (SIGBUS, exception_handler);
9409
#include <sys/types.h>
9410
#include <sys/time.h>
9411
#include <sys/resource.h>
9415
struct rlimit limit;
9418
/* Some printf implementations allocate temporary space with malloc. */
9419
/* On BSD systems, malloc() is limited by RLIMIT_DATA. */
9421
if (getrlimit (RLIMIT_DATA, &limit) < 0)
9423
if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
9424
limit.rlim_max = 5000000;
9425
limit.rlim_cur = limit.rlim_max;
9426
if (setrlimit (RLIMIT_DATA, &limit) < 0)
9429
/* On Linux systems, malloc() is limited by RLIMIT_AS. */
9431
if (getrlimit (RLIMIT_AS, &limit) < 0)
9433
if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
9434
limit.rlim_max = 5000000;
9435
limit.rlim_cur = limit.rlim_max;
9436
if (setrlimit (RLIMIT_AS, &limit) < 0)
9439
/* Some printf implementations allocate temporary space on the stack. */
9441
if (getrlimit (RLIMIT_STACK, &limit) < 0)
9443
if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
9444
limit.rlim_max = 5000000;
9445
limit.rlim_cur = limit.rlim_max;
9446
if (setrlimit (RLIMIT_STACK, &limit) < 0)
9449
ret = printf ("%.5000000f", 1.0);
9450
return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
9454
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9455
(eval $ac_link) 2>&5
9457
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9458
test $ac_status = 0; } && test -s conftest$ac_exeext; then
9461
if test $result != 0 && test $result != 77; then result=1; fi
9463
) >/dev/null 2>/dev/null
9465
0) gl_cv_func_printf_enomem="yes" ;;
9466
77) gl_cv_func_printf_enomem="guessing no" ;;
9467
*) gl_cv_func_printf_enomem="no" ;;
9470
gl_cv_func_printf_enomem="guessing no"
9474
gl_cv_func_printf_enomem="guessing no"
9477
if test "$gl_cv_func_printf_enomem" = "guessing no"; then
9479
# Guess yes on glibc systems.
9480
*-gnu*) gl_cv_func_printf_enomem="guessing yes";;
9481
# Guess yes on Solaris.
9482
solaris*) gl_cv_func_printf_enomem="guessing yes";;
9484
aix*) gl_cv_func_printf_enomem="guessing yes";;
9485
# Guess yes on HP-UX/hppa.
9486
hpux*) case "$host_cpu" in
9487
hppa*) gl_cv_func_printf_enomem="guessing yes";;
9488
*) gl_cv_func_printf_enomem="guessing no";;
9491
# Guess yes on IRIX.
9492
irix*) gl_cv_func_printf_enomem="guessing yes";;
9493
# Guess yes on OSF/1.
9494
osf*) gl_cv_func_printf_enomem="guessing yes";;
9495
# Guess yes on BeOS.
9496
beos*) gl_cv_func_printf_enomem="guessing yes";;
9497
# Guess yes on Haiku.
9498
haiku*) gl_cv_func_printf_enomem="guessing yes";;
9499
# If we don't know, assume the worst.
9500
*) gl_cv_func_printf_enomem="guessing no";;
9505
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
9506
$as_echo "$gl_cv_func_printf_enomem" >&6; }
9510
case "$gl_cv_func_printf_long_double" in
9515
$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
9523
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9524
$as_echo_n "checking for long long int... " >&6; }
9525
if test "${ac_cv_type_long_long_int+set}" = set; then :
9526
$as_echo_n "(cached) " >&6
9528
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529
/* end confdefs.h. */
9531
/* For now, do not test the preprocessor; as of 2007 there are too many
9532
implementations with broken preprocessors. Perhaps this can
9533
be revisited in 2012. In the meantime, code should not expect
9534
#if to work with literals wider than 32 bits. */
9535
/* Test literals. */
9536
long long int ll = 9223372036854775807ll;
9537
long long int nll = -9223372036854775807LL;
9538
unsigned long long int ull = 18446744073709551615ULL;
9539
/* Test constant expressions. */
9540
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9542
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9548
/* Test availability of runtime routines for shift and division. */
9549
long long int llmax = 9223372036854775807ll;
9550
unsigned long long int ullmax = 18446744073709551615ull;
9551
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9552
| (llmax / ll) | (llmax % ll)
9553
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9554
| (ullmax / ull) | (ullmax % ull));
9560
if ac_fn_c_try_link "$LINENO"; then :
9561
if test "$cross_compiling" = yes; then :
9562
ac_cv_type_long_long_int=yes
9564
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9565
/* end confdefs.h. */
9569
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
9570
# define LLONG_MAX (HALF - 1 + HALF)
9575
long long int n = 1;
9579
long long int m = n << i;
9582
if (LLONG_MAX / 2 < m)
9590
if ac_fn_c_try_run "$LINENO"; then :
9591
ac_cv_type_long_long_int=yes
9593
ac_cv_type_long_long_int=no
9595
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9596
conftest.$ac_objext conftest.beam conftest.$ac_ext
9600
ac_cv_type_long_long_int=no
9602
rm -f core conftest.err conftest.$ac_objext \
9603
conftest$ac_exeext conftest.$ac_ext
9605
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9606
$as_echo "$ac_cv_type_long_long_int" >&6; }
9607
if test $ac_cv_type_long_long_int = yes; then
9609
$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9614
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
9615
$as_echo_n "checking for wchar_t... " >&6; }
9616
if test "${gt_cv_c_wchar_t+set}" = set; then :
9617
$as_echo_n "(cached) " >&6
9619
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9620
/* end confdefs.h. */
9622
wchar_t foo = (wchar_t)'\0';
9631
if ac_fn_c_try_compile "$LINENO"; then :
9636
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9638
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
9639
$as_echo "$gt_cv_c_wchar_t" >&6; }
9640
if test $gt_cv_c_wchar_t = yes; then
9642
$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
9647
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
9648
$as_echo_n "checking for wint_t... " >&6; }
9649
if test "${gt_cv_c_wint_t+set}" = set; then :
9650
$as_echo_n "(cached) " >&6
9652
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9653
/* end confdefs.h. */
9655
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9657
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
9658
before <wchar.h>. */
9663
wint_t foo = (wchar_t)'\0';
9672
if ac_fn_c_try_compile "$LINENO"; then :
9677
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9679
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
9680
$as_echo "$gt_cv_c_wint_t" >&6; }
9681
if test $gt_cv_c_wint_t = yes; then
9683
$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
9690
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
9691
$as_echo_n "checking for intmax_t... " >&6; }
9692
if test "${gt_cv_c_intmax_t+set}" = set; then :
9693
$as_echo_n "(cached) " >&6
9695
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9696
/* end confdefs.h. */
9700
#if HAVE_STDINT_H_WITH_UINTMAX
9703
#if HAVE_INTTYPES_H_WITH_UINTMAX
9704
#include <inttypes.h>
9710
intmax_t x = -1; return !x;
9715
if ac_fn_c_try_compile "$LINENO"; then :
9716
gt_cv_c_intmax_t=yes
9720
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9722
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
9723
$as_echo "$gt_cv_c_intmax_t" >&6; }
9724
if test $gt_cv_c_intmax_t = yes; then
9726
$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
9730
test $ac_cv_type_long_long_int = yes \
9731
&& ac_type='long long' \
9734
cat >>confdefs.h <<_ACEOF
9735
#define intmax_t $ac_type
9745
for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
9747
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9748
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9749
eval as_val=\$$as_ac_var
9750
if test "x$as_val" = x""yes; then :
9751
cat >>confdefs.h <<_ACEOF
9752
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9758
ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
9760
if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
9766
cat >>confdefs.h <<_ACEOF
9767
#define HAVE_DECL__SNPRINTF $ac_have_decl
9848
REPLACE_SIGNBIT_USING_GCC=0;
9852
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
9853
$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
9854
if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
9855
$as_echo_n "(cached) " >&6
9857
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9858
/* end confdefs.h. */
9863
#if defined __SL64 && defined __SCLE /* cygwin */
9864
/* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
9865
fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
9866
it is easier to do a version check than building a runtime test. */
9867
# include <cygwin/version.h>
9868
# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
9876
if ac_fn_c_try_link "$LINENO"; then :
9877
gl_cv_var_stdin_large_offset=yes
9879
gl_cv_var_stdin_large_offset=no
9881
rm -f core conftest.err conftest.$ac_objext \
9882
conftest$ac_exeext conftest.$ac_ext
9884
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
9885
$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
9888
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9889
$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
9890
if test "${gl_cv_func_getcwd_null+set}" = set; then :
9891
$as_echo_n "(cached) " >&6
9893
if test "$cross_compiling" = yes; then :
9896
# Guess yes on glibc systems.
9897
*-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9898
# Guess yes on Cygwin.
9899
cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9900
# Guess yes on mingw.
9901
mingw*) gl_cv_func_getcwd_null="guessing yes";;
9902
# If we don't know, assume the worst.
9903
*) gl_cv_func_getcwd_null="guessing no";;
9907
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9908
/* end confdefs.h. */
9910
# include <unistd.h>
9919
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9920
/* mingw cwd does not start with '/', but getcwd does allocate. */
9922
if (chdir ("/") != 0)
9926
char *f = getcwd (NULL, 0);
9927
return ! (f && f[0] == '/' && !f[1]);
9935
if ac_fn_c_try_run "$LINENO"; then :
9936
gl_cv_func_getcwd_null=yes
9938
gl_cv_func_getcwd_null=no
9940
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9941
conftest.$ac_objext conftest.beam conftest.$ac_ext
9945
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9946
$as_echo "$gl_cv_func_getcwd_null" >&6; }
9948
ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
9949
if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
9955
cat >>confdefs.h <<_ACEOF
9956
#define HAVE_DECL_GETCWD $ac_have_decl
9971
if test $gl_cv_have_include_next = yes; then
9972
gl_cv_next_getopt_h='<'getopt.h'>'
9974
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
9975
$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
9976
if test "${gl_cv_next_getopt_h+set}" = set; then :
9977
$as_echo_n "(cached) " >&6
9980
if test $ac_cv_header_getopt_h = yes; then
9981
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9982
/* end confdefs.h. */
9987
aix*) gl_absname_cpp="$ac_cpp -C" ;;
9988
*) gl_absname_cpp="$ac_cpp" ;;
9990
gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9991
sed -n '\#/getopt.h#{
9992
s#.*"\(.*/getopt.h\)".*#\1#
9998
gl_cv_next_getopt_h='<'getopt.h'>'
10002
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10003
$as_echo "$gl_cv_next_getopt_h" >&6; }
10005
NEXT_GETOPT_H=$gl_cv_next_getopt_h
10007
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10008
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10009
gl_next_as_first_directive='<'getopt.h'>'
10011
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10012
gl_next_as_first_directive=$gl_cv_next_getopt_h
10014
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10019
if test $ac_cv_header_getopt_h = yes; then
10028
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10029
for ac_header in getopt.h
10031
ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10032
if test "x$ac_cv_header_getopt_h" = x""yes; then :
10033
cat >>confdefs.h <<_ACEOF
10034
#define HAVE_GETOPT_H 1
10038
gl_replace_getopt=yes
10045
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10046
for ac_func in getopt_long_only
10048
ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10049
if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
10050
cat >>confdefs.h <<_ACEOF
10051
#define HAVE_GETOPT_LONG_ONLY 1
10055
gl_replace_getopt=yes
10061
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10062
ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
10064
if test "x$ac_cv_have_decl_optreset" = x""yes; then :
10070
cat >>confdefs.h <<_ACEOF
10071
#define HAVE_DECL_OPTRESET $ac_have_decl
10076
if test -z "$gl_replace_getopt"; then
10077
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10078
$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
10079
if test "${gl_cv_func_getopt_posix+set}" = set; then :
10080
$as_echo_n "(cached) " >&6
10083
if test "$cross_compiling" = yes; then :
10085
mingw*) gl_cv_func_getopt_posix="guessing no";;
10086
*) gl_cv_func_getopt_posix="guessing yes";;
10090
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091
/* end confdefs.h. */
10093
#include <unistd.h>
10094
#include <stdlib.h>
10095
#include <string.h>
10097
#if !HAVE_DECL_OPTRESET
10098
# define OPTIND_MIN 0
10100
# define OPTIND_MIN 1
10111
argv[argc++] = "program";
10112
argv[argc++] = "-a";
10113
argv[argc++] = "foo";
10114
argv[argc++] = "bar";
10116
optind = OPTIND_MIN;
10119
c = getopt (argc, argv, "ab");
10122
c = getopt (argc, argv, "ab");
10125
if (!(optind == 2))
10128
/* Some internal state exists at this point. */
10134
argv[argc++] = "program";
10135
argv[argc++] = "donald";
10136
argv[argc++] = "-p";
10137
argv[argc++] = "billy";
10138
argv[argc++] = "duck";
10139
argv[argc++] = "-a";
10140
argv[argc++] = "bar";
10142
optind = OPTIND_MIN;
10145
c = getopt (argc, argv, "+abp:q:");
10148
if (!(strcmp (argv[0], "program") == 0))
10150
if (!(strcmp (argv[1], "donald") == 0))
10152
if (!(strcmp (argv[2], "-p") == 0))
10154
if (!(strcmp (argv[3], "billy") == 0))
10156
if (!(strcmp (argv[4], "duck") == 0))
10158
if (!(strcmp (argv[5], "-a") == 0))
10160
if (!(strcmp (argv[6], "bar") == 0))
10162
if (!(optind == 1))
10170
if ac_fn_c_try_run "$LINENO"; then :
10171
gl_cv_func_getopt_posix=yes
10173
gl_cv_func_getopt_posix=no
10175
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10176
conftest.$ac_objext conftest.beam conftest.$ac_ext
10181
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
10182
$as_echo "$gl_cv_func_getopt_posix" >&6; }
10183
case "$gl_cv_func_getopt_posix" in
10184
*no) gl_replace_getopt=yes ;;
6383
cat >>confdefs.h <<_ACEOF
6385
#define inline $ac_val
6393
{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
6394
echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; }
6395
if test "${ac_cv_header_stdbool_h+set}" = set; then
6396
echo $ECHO_N "(cached) $ECHO_C" >&6
6398
cat >conftest.$ac_ext <<_ACEOF
6401
cat confdefs.h >>conftest.$ac_ext
6402
cat >>conftest.$ac_ext <<_ACEOF
6403
/* end confdefs.h. */
6405
#include <stdbool.h>
6407
"error: bool is not defined"
6410
"error: false is not defined"
6413
"error: false is not 0"
6416
"error: true is not defined"
6419
"error: true is not 1"
6421
#ifndef __bool_true_false_are_defined
6422
"error: __bool_true_false_are_defined is not defined"
6425
struct s { _Bool s: 1; _Bool t; } s;
6427
char a[true == 1 ? 1 : -1];
6428
char b[false == 0 ? 1 : -1];
6429
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
6430
char d[(bool) 0.5 == true ? 1 : -1];
6432
char f[(_Bool) 0.0 == false ? 1 : -1];
6434
char h[sizeof (_Bool)];
6436
enum { j = false, k = true, l = false * true, m = true * 256 };
6438
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
6439
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
6440
#if defined __xlc__ || defined __GNUC__
6441
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
6442
reported by James Lemley on 2005-10-05; see
6443
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
6444
This test is not quite right, since xlc is allowed to
6445
reject this program, as the initializer for xlcbug is
6446
not one of the forms that C requires support for.
6447
However, doing the test right would require a run-time
6448
test, and that would make cross-compilation harder.
6449
Let us hope that IBM fixes the xlc bug, and also adds
6450
support for this kind of constant expression. In the
6451
meantime, this test will reject xlc, which is OK, since
6452
our stdbool.h substitute should suffice. We also test
6453
this with GCC, where it should work, to detect more
6454
quickly whether someone messes up the test in the
6456
char digs[] = "0123456789";
6457
int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
6459
/* Catch a bug in an HP-UX C compiler. See
6460
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
6461
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6472
/* Refer to every declared value, to avoid compiler optimizations. */
6473
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
6474
+ !m + !n + !o + !p + !q + !pq);
6480
rm -f conftest.$ac_objext
6481
if { (ac_try="$ac_compile"
6483
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6484
*) ac_try_echo=$ac_try;;
6486
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6487
(eval "$ac_compile") 2>conftest.er1
6489
grep -v '^ *+' conftest.er1 >conftest.err
6491
cat conftest.err >&5
6492
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493
(exit $ac_status); } && {
6494
test -z "$ac_c_werror_flag" ||
6495
test ! -s conftest.err
6496
} && test -s conftest.$ac_objext; then
6497
ac_cv_header_stdbool_h=yes
6499
echo "$as_me: failed program was:" >&5
6500
sed 's/^/| /' conftest.$ac_ext >&5
6502
ac_cv_header_stdbool_h=no
6505
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6507
{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
6508
echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; }
6509
{ echo "$as_me:$LINENO: checking for _Bool" >&5
6510
echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
6511
if test "${ac_cv_type__Bool+set}" = set; then
6512
echo $ECHO_N "(cached) $ECHO_C" >&6
6514
cat >conftest.$ac_ext <<_ACEOF
6517
cat confdefs.h >>conftest.$ac_ext
6518
cat >>conftest.$ac_ext <<_ACEOF
6519
/* end confdefs.h. */
6520
$ac_includes_default
6521
typedef _Bool ac__type_new_;
6525
if ((ac__type_new_ *) 0)
6527
if (sizeof (ac__type_new_))
6533
rm -f conftest.$ac_objext
6534
if { (ac_try="$ac_compile"
6536
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6537
*) ac_try_echo=$ac_try;;
6539
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6540
(eval "$ac_compile") 2>conftest.er1
6542
grep -v '^ *+' conftest.er1 >conftest.err
6544
cat conftest.err >&5
6545
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546
(exit $ac_status); } && {
6547
test -z "$ac_c_werror_flag" ||
6548
test ! -s conftest.err
6549
} && test -s conftest.$ac_objext; then
6550
ac_cv_type__Bool=yes
6552
echo "$as_me: failed program was:" >&5
6553
sed 's/^/| /' conftest.$ac_ext >&5
6558
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6560
{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
6561
echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
6562
if test $ac_cv_type__Bool = yes; then
10188
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10189
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
10190
$as_echo_n "checking for working GNU getopt function... " >&6; }
10191
if test "${gl_cv_func_getopt_gnu+set}" = set; then :
10192
$as_echo_n "(cached) " >&6
10194
# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
10195
# optstring is necessary for programs like m4 that have POSIX-mandated
10196
# semantics for supporting options interspersed with files.
10197
# Also, since getopt_long is a GNU extension, we require optind=0.
10198
gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
10200
export POSIXLY_CORRECT
10201
if test "$cross_compiling" = yes; then :
10202
case $host_os:$ac_cv_have_decl_optreset in
10203
*-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
10204
*:yes) gl_cv_func_getopt_gnu=no;;
10205
*) gl_cv_func_getopt_gnu=yes;;
10209
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10210
/* end confdefs.h. */
10211
#include <getopt.h>
10212
#include <stddef.h>
10213
#include <string.h>
10219
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
10220
and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
10221
OSF/1 5.1, Solaris 10. */
10224
myargv[0] = "conftest";
10228
if (getopt (2, myargv, "+a") != '?')
10231
/* This code succeeds on glibc 2.8, mingw,
10232
and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
10233
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
10235
char *argv[] = { "program", "-p", "foo", "bar", NULL };
10238
if (getopt (4, argv, "p::") != 'p')
10240
if (optarg != NULL)
10242
if (getopt (4, argv, "p::") != -1)
10247
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
10249
char *argv[] = { "program", "foo", "-p", NULL };
10251
if (getopt (3, argv, "-p") != 1)
10253
if (getopt (3, argv, "-p") != 'p')
10262
if ac_fn_c_try_run "$LINENO"; then :
10263
gl_cv_func_getopt_gnu=yes
10265
gl_cv_func_getopt_gnu=no
10267
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10268
conftest.$ac_objext conftest.beam conftest.$ac_ext
10271
if test "$gl_had_POSIXLY_CORRECT" != yes; then
10272
{ POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
10276
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
10277
$as_echo "$gl_cv_func_getopt_gnu" >&6; }
10278
if test "$gl_cv_func_getopt_gnu" = "no"; then
10279
gl_replace_getopt=yes
10283
ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
10284
if test "x$ac_cv_have_decl_getenv" = x""yes; then :
6564
10290
cat >>confdefs.h <<_ACEOF
6565
#define HAVE__BOOL 1
6571
if test $ac_cv_header_stdbool_h = yes; then
6573
cat >>confdefs.h <<\_ACEOF
6574
#define HAVE_STDBOOL_H 1
6592
for ac_func in $ac_func_list
6594
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6595
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
6596
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
6597
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6598
echo $ECHO_N "(cached) $ECHO_C" >&6
6600
cat >conftest.$ac_ext <<_ACEOF
6603
cat confdefs.h >>conftest.$ac_ext
6604
cat >>conftest.$ac_ext <<_ACEOF
6605
/* end confdefs.h. */
6606
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6607
For example, HP-UX 11i <limits.h> declares gettimeofday. */
6608
#define $ac_func innocuous_$ac_func
6610
/* System header to define __stub macros and hopefully few prototypes,
6611
which can conflict with char $ac_func (); below.
6612
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6613
<limits.h> exists even on freestanding compilers. */
6616
# include <limits.h>
6618
# include <assert.h>
6623
/* Override any GCC internal prototype to avoid an error.
6624
Use char because int might match the return type of a GCC
6625
builtin and then its argument prototype would still apply. */
6630
/* The GNU C library defines this for functions which it implements
6631
to always fail with ENOSYS. Some functions are actually named
6632
something starting with __ and the normal name is an alias. */
6633
#if defined __stub_$ac_func || defined __stub___$ac_func
6645
rm -f conftest.$ac_objext conftest$ac_exeext
6646
if { (ac_try="$ac_link"
6648
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6649
*) ac_try_echo=$ac_try;;
6651
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6652
(eval "$ac_link") 2>conftest.er1
6654
grep -v '^ *+' conftest.er1 >conftest.err
6656
cat conftest.err >&5
6657
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658
(exit $ac_status); } && {
6659
test -z "$ac_c_werror_flag" ||
6660
test ! -s conftest.err
6661
} && test -s conftest$ac_exeext &&
6662
$as_test_x conftest$ac_exeext; then
6663
eval "$as_ac_var=yes"
6665
echo "$as_me: failed program was:" >&5
6666
sed 's/^/| /' conftest.$ac_ext >&5
6668
eval "$as_ac_var=no"
6671
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6672
conftest$ac_exeext conftest.$ac_ext
6674
ac_res=`eval echo '${'$as_ac_var'}'`
6675
{ echo "$as_me:$LINENO: result: $ac_res" >&5
6676
echo "${ECHO_T}$ac_res" >&6; }
6677
if test `eval echo '${'$as_ac_var'}'` = yes; then
6678
cat >>confdefs.h <<_ACEOF
6679
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6687
{ echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
6688
echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; }
6689
if test "${ac_cv_header_stat_broken+set}" = set; then
6690
echo $ECHO_N "(cached) $ECHO_C" >&6
6692
cat >conftest.$ac_ext <<_ACEOF
6695
cat confdefs.h >>conftest.$ac_ext
6696
cat >>conftest.$ac_ext <<_ACEOF
6697
/* end confdefs.h. */
6698
#include <sys/types.h>
6699
#include <sys/stat.h>
6701
#if defined S_ISBLK && defined S_IFDIR
6702
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
6705
#if defined S_ISBLK && defined S_IFCHR
6706
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
6709
#if defined S_ISLNK && defined S_IFREG
6710
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
6713
#if defined S_ISSOCK && defined S_IFREG
6714
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
6718
rm -f conftest.$ac_objext
6719
if { (ac_try="$ac_compile"
6721
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6722
*) ac_try_echo=$ac_try;;
6724
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6725
(eval "$ac_compile") 2>conftest.er1
6727
grep -v '^ *+' conftest.er1 >conftest.err
6729
cat conftest.err >&5
6730
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6731
(exit $ac_status); } && {
6732
test -z "$ac_c_werror_flag" ||
6733
test ! -s conftest.err
6734
} && test -s conftest.$ac_objext; then
6735
ac_cv_header_stat_broken=no
6737
echo "$as_me: failed program was:" >&5
6738
sed 's/^/| /' conftest.$ac_ext >&5
6740
ac_cv_header_stat_broken=yes
6743
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6745
{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
6746
echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; }
6747
if test $ac_cv_header_stat_broken = yes; then
6749
cat >>confdefs.h <<\_ACEOF
6750
#define STAT_MACROS_BROKEN 1
6757
{ echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
6758
echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; }
6759
if test "${ac_cv_c_restrict+set}" = set; then
6760
echo $ECHO_N "(cached) $ECHO_C" >&6
10291
#define HAVE_DECL_GETENV $ac_have_decl
10299
if test -n "$gl_replace_getopt"; then :
10305
$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
10309
GNULIB_UNISTD_H_GETOPT=1
10318
gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
10328
gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
10345
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10346
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10347
if test "${ac_cv_c_restrict+set}" = set; then :
10348
$as_echo_n "(cached) " >&6
6762
10350
ac_cv_c_restrict=no
6763
# Try the official restrict keyword, then gcc's __restrict, and
6764
# the less common variants.
6765
for ac_kw in restrict __restrict __restrict__ _Restrict; do
6766
cat >conftest.$ac_ext <<_ACEOF
6769
cat confdefs.h >>conftest.$ac_ext
6770
cat >>conftest.$ac_ext <<_ACEOF
10351
# The order here caters to the fact that C++ does not require restrict.
10352
for ac_kw in __restrict __restrict__ _Restrict restrict; do
10353
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6771
10354
/* end confdefs.h. */
6772
10355
typedef int * int_ptr;
6773
10356
int foo (int_ptr $ac_kw ip) {
10506
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
10507
$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
10508
if test "${gl_cv_cc_float_expbit0+set}" = set; then :
10509
$as_echo_n "(cached) " >&6
10512
if test "$cross_compiling" = yes; then :
10513
gl_cv_cc_float_expbit0="word 0 bit 23"
10515
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516
/* end confdefs.h. */
10519
#include <stddef.h>
10521
#include <string.h>
10523
((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10524
typedef union { float value; unsigned int word[NWORDS]; } memory_float;
10525
static unsigned int ored_words[NWORDS];
10526
static unsigned int anded_words[NWORDS];
10527
static void add_to_ored_words (float x)
10531
/* Clear it first, in case
10532
sizeof (float) < sizeof (memory_float). */
10533
memset (&m, 0, sizeof (memory_float));
10535
for (i = 0; i < NWORDS; i++)
10537
ored_words[i] |= m.word[i];
10538
anded_words[i] &= m.word[i];
10544
FILE *fp = fopen ("conftest.out", "w");
10547
for (j = 0; j < NWORDS; j++)
10548
anded_words[j] = ~ (unsigned int) 0;
10549
add_to_ored_words (0.25f);
10550
add_to_ored_words (0.5f);
10551
add_to_ored_words (1.0f);
10552
add_to_ored_words (2.0f);
10553
add_to_ored_words (4.0f);
10554
/* Remove bits that are common (e.g. if representation of the first mantissa
10555
bit is explicit). */
10556
for (j = 0; j < NWORDS; j++)
10557
ored_words[j] &= ~anded_words[j];
10558
/* Now find the nonzero word. */
10559
for (j = 0; j < NWORDS; j++)
10560
if (ored_words[j] != 0)
10565
for (i = j + 1; i < NWORDS; i++)
10566
if (ored_words[i] != 0)
10568
fprintf (fp, "unknown");
10569
return (fclose (fp) != 0);
10572
if ((ored_words[j] >> i) & 1)
10574
fprintf (fp, "word %d bit %d", (int) j, (int) i);
10575
return (fclose (fp) != 0);
10578
fprintf (fp, "unknown");
10579
return (fclose (fp) != 0);
10583
if ac_fn_c_try_run "$LINENO"; then :
10584
gl_cv_cc_float_expbit0=`cat conftest.out`
10586
gl_cv_cc_float_expbit0="unknown"
10588
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10589
conftest.$ac_objext conftest.beam conftest.$ac_ext
10595
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
10596
$as_echo "$gl_cv_cc_float_expbit0" >&6; }
10597
case "$gl_cv_cc_float_expbit0" in
10599
word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10600
bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
10602
cat >>confdefs.h <<_ACEOF
10603
#define FLT_EXPBIT0_WORD $word
10607
cat >>confdefs.h <<_ACEOF
10608
#define FLT_EXPBIT0_BIT $bit
10617
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10618
$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10619
if test "${am_cv_langinfo_codeset+set}" = set; then :
10620
$as_echo_n "(cached) " >&6
10622
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10623
/* end confdefs.h. */
10624
#include <langinfo.h>
10628
char* cs = nl_langinfo(CODESET); return !cs;
10633
if ac_fn_c_try_link "$LINENO"; then :
10634
am_cv_langinfo_codeset=yes
10636
am_cv_langinfo_codeset=no
10638
rm -f core conftest.err conftest.$ac_objext \
10639
conftest$ac_exeext conftest.$ac_ext
10642
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10643
$as_echo "$am_cv_langinfo_codeset" >&6; }
10644
if test $am_cv_langinfo_codeset = yes; then
10646
$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10650
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
10651
if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10657
cat >>confdefs.h <<_ACEOF
10658
#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10662
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
10663
$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
10664
if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10665
$as_echo_n "(cached) " >&6
10667
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668
/* end confdefs.h. */
10670
#include <features.h>
10671
#ifdef __GNU_LIBRARY__
10672
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10678
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10679
$EGREP "Lucky GNU user" >/dev/null 2>&1; then :
10680
ac_cv_gnu_library_2_1=yes
10682
ac_cv_gnu_library_2_1=no
10689
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10690
$as_echo "$ac_cv_gnu_library_2_1" >&6; }
10692
GLIBC21="$ac_cv_gnu_library_2_1"
10697
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10698
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10699
if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
10700
$as_echo_n "(cached) " >&6
10702
rm -f conftest.sym conftest.file
10703
echo >conftest.file
10704
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
10705
if test "$cross_compiling" = yes; then :
10706
ac_cv_func_lstat_dereferences_slashed_symlink=no
10708
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709
/* end confdefs.h. */
10710
$ac_includes_default
10715
/* Linux will dereference the symlink and fail, as required by POSIX.
10716
That is better in the sense that it means we will not
10717
have to compile and use the lstat wrapper. */
10718
return lstat ("conftest.sym/", &sbuf) == 0;
10723
if ac_fn_c_try_run "$LINENO"; then :
10724
ac_cv_func_lstat_dereferences_slashed_symlink=yes
10726
ac_cv_func_lstat_dereferences_slashed_symlink=no
10728
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10729
conftest.$ac_objext conftest.beam conftest.$ac_ext
10733
# If the `ln -s' command failed, then we probably don't even
10734
# have an lstat function.
10735
ac_cv_func_lstat_dereferences_slashed_symlink=no
10737
rm -f conftest.sym conftest.file
10740
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
10741
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10743
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
10745
cat >>confdefs.h <<_ACEOF
10746
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10750
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
10759
gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
10771
GNULIB_MBSRTOWCS=0;
10772
GNULIB_MBSNRTOWCS=0;
10774
GNULIB_WCSRTOMBS=0;
10775
GNULIB_WCSNRTOMBS=0;
10787
HAVE_DECL_WCWIDTH=1;
10788
REPLACE_MBSTATE_T=0;
10794
REPLACE_MBSRTOWCS=0;
10795
REPLACE_MBSNRTOWCS=0;
10797
REPLACE_WCSRTOMBS=0;
10798
REPLACE_WCSNRTOMBS=0;
10803
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10804
$as_echo_n "checking for mbstate_t... " >&6; }
10805
if test "${ac_cv_type_mbstate_t+set}" = set; then :
10806
$as_echo_n "(cached) " >&6
10808
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10809
/* end confdefs.h. */
10810
$ac_includes_default
10811
# include <wchar.h>
10815
mbstate_t x; return sizeof x;
10820
if ac_fn_c_try_compile "$LINENO"; then :
10821
ac_cv_type_mbstate_t=yes
10823
ac_cv_type_mbstate_t=no
10825
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10827
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10828
$as_echo "$ac_cv_type_mbstate_t" >&6; }
10829
if test $ac_cv_type_mbstate_t = yes; then
10831
$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10835
$as_echo "#define mbstate_t int" >>confdefs.h
10846
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
10847
$as_echo_n "checking for a traditional japanese locale... " >&6; }
10848
if test "${gt_cv_locale_ja+set}" = set; then :
10849
$as_echo_n "(cached) " >&6
10852
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853
/* end confdefs.h. */
10855
#include <locale.h>
10857
#if HAVE_LANGINFO_CODESET
10858
# include <langinfo.h>
10860
#include <stdlib.h>
10861
#include <string.h>
10867
/* Check whether the given locale name is recognized by the system. */
10868
if (setlocale (LC_ALL, "") == NULL) return 1;
10869
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10870
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10871
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10872
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10873
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10874
some unit tests fail. */
10875
#if HAVE_LANGINFO_CODESET
10877
const char *cs = nl_langinfo (CODESET);
10878
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10883
/* On Cygwin, avoid locale names without encoding suffix, because the
10884
locale_charset() function relies on the encoding suffix. Note that
10885
LC_ALL is set on the command line. */
10886
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10888
/* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
10889
on Cygwin 1.5.x. */
10890
if (MB_CUR_MAX == 1)
10892
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
10893
This excludes the UTF-8 encoding. */
10894
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10895
if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
10896
for (p = buf; *p != '\0'; p++)
10897
if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
10903
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10904
(eval $ac_link) 2>&5
10906
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10907
test $ac_status = 0; } && test -s conftest$ac_exeext; then
10908
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10909
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
10910
# configure script would override the LC_ALL setting. Likewise for
10911
# LC_CTYPE, which is also set at the beginning of the configure script.
10912
# Test for the AIX locale name.
10913
if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10914
gt_cv_locale_ja=ja_JP
10916
# Test for the locale name with explicit encoding suffix.
10917
if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10918
gt_cv_locale_ja=ja_JP.EUC-JP
10920
# Test for the HP-UX, OSF/1, NetBSD locale name.
10921
if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10922
gt_cv_locale_ja=ja_JP.eucJP
10924
# Test for the IRIX, FreeBSD locale name.
10925
if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10926
gt_cv_locale_ja=ja_JP.EUC
10928
# Test for the Solaris 7 locale name.
10929
if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10932
# Special test for NetBSD 1.6.
10933
if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
10934
gt_cv_locale_ja=ja_JP.eucJP
10937
gt_cv_locale_ja=none
10948
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
10949
$as_echo "$gt_cv_locale_ja" >&6; }
10950
LOCALE_JA=$gt_cv_locale_ja
10956
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
10957
$as_echo_n "checking for a transitional chinese locale... " >&6; }
10958
if test "${gt_cv_locale_zh_CN+set}" = set; then :
10959
$as_echo_n "(cached) " >&6
10962
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10963
/* end confdefs.h. */
10965
#include <locale.h>
10966
#include <stdlib.h>
10968
#if HAVE_LANGINFO_CODESET
10969
# include <langinfo.h>
10971
#include <stdlib.h>
10972
#include <string.h>
10978
/* Check whether the given locale name is recognized by the system. */
10979
if (setlocale (LC_ALL, "") == NULL) return 1;
10980
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10981
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10982
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10983
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10984
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10985
some unit tests fail. */
10986
#if HAVE_LANGINFO_CODESET
10988
const char *cs = nl_langinfo (CODESET);
10989
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10994
/* On Cygwin, avoid locale names without encoding suffix, because the
10995
locale_charset() function relies on the encoding suffix. Note that
10996
LC_ALL is set on the command line. */
10997
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10999
/* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11000
This excludes the UTF-8 encoding. */
11001
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11002
if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11003
for (p = buf; *p != '\0'; p++)
11004
if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11006
/* Check whether a typical GB18030 multibyte sequence is recognized as a
11007
single wide character. This excludes the GB2312 and GBK encodings. */
11008
if (mblen ("\203\062\332\066", 5) != 4)
11014
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11015
(eval $ac_link) 2>&5
11017
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11018
test $ac_status = 0; } && test -s conftest$ac_exeext; then
11019
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11020
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
11021
# configure script would override the LC_ALL setting. Likewise for
11022
# LC_CTYPE, which is also set at the beginning of the configure script.
11023
# Test for the locale name without encoding suffix.
11024
if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11025
gt_cv_locale_zh_CN=zh_CN
11027
# Test for the locale name with explicit encoding suffix.
11028
if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11029
gt_cv_locale_zh_CN=zh_CN.GB18030
11032
gt_cv_locale_zh_CN=none
11036
# If there was a link error, due to mblen(), the system is so old that
11037
# it certainly doesn't have a chinese locale.
11038
gt_cv_locale_zh_CN=none
11043
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11044
$as_echo "$gt_cv_locale_zh_CN" >&6; }
11045
LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11050
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11051
$as_echo_n "checking for a french Unicode locale... " >&6; }
11052
if test "${gt_cv_locale_fr_utf8+set}" = set; then :
11053
$as_echo_n "(cached) " >&6
11056
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11057
/* end confdefs.h. */
11059
#include <locale.h>
11061
#if HAVE_LANGINFO_CODESET
11062
# include <langinfo.h>
11064
#include <stdlib.h>
11065
#include <string.h>
11069
/* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
11070
imitates locale dependent behaviour by looking at the environment
11071
variables, and all locales use the UTF-8 encoding. */
11072
#if !(defined __BEOS__ || defined __HAIKU__)
11073
/* Check whether the given locale name is recognized by the system. */
11074
if (setlocale (LC_ALL, "") == NULL) return 1;
11075
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11076
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11077
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11078
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11079
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11080
some unit tests fail. */
11081
# if HAVE_LANGINFO_CODESET
11083
const char *cs = nl_langinfo (CODESET);
11084
if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11089
/* On Cygwin, avoid locale names without encoding suffix, because the
11090
locale_charset() function relies on the encoding suffix. Note that
11091
LC_ALL is set on the command line. */
11092
if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11094
/* Check whether in the abbreviation of the second month, the second
11095
character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11096
two bytes long, with UTF-8 encoding. */
11097
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11098
if (strftime (buf, sizeof (buf), "%b", &t) < 4
11099
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11102
/* Check whether the decimal separator is a comma.
11103
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11104
are nl_langinfo(RADIXCHAR) are both ".". */
11105
if (localeconv () ->decimal_point[0] != ',') return 1;
11110
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11111
(eval $ac_link) 2>&5
11113
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11114
test $ac_status = 0; } && test -s conftest$ac_exeext; then
11115
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11116
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
11117
# configure script would override the LC_ALL setting. Likewise for
11118
# LC_CTYPE, which is also set at the beginning of the configure script.
11119
# Test for the usual locale name.
11120
if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11121
gt_cv_locale_fr_utf8=fr_FR
11123
# Test for the locale name with explicit encoding suffix.
11124
if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11125
gt_cv_locale_fr_utf8=fr_FR.UTF-8
11127
# Test for the Solaris 7 locale name.
11128
if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11129
gt_cv_locale_fr_utf8=fr.UTF-8
11132
gt_cv_locale_fr_utf8=none
11140
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11141
$as_echo "$gt_cv_locale_fr_utf8" >&6; }
11142
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11154
GNULIB_RAWMEMCHR=0;
11157
GNULIB_STRCHRNUL=0;
11164
GNULIB_STRCASESTR=0;
11171
GNULIB_MBSCASECMP=0;
11172
GNULIB_MBSNCASECMP=0;
11173
GNULIB_MBSPCASECMP=0;
11174
GNULIB_MBSCASESTR=0;
11181
GNULIB_STRSIGNAL=0;
11182
GNULIB_STRVERSCMP=0;
11184
HAVE_DECL_MEMMEM=1;
11186
HAVE_DECL_MEMRCHR=1;
11191
HAVE_DECL_STRDUP=1;
11192
HAVE_DECL_STRNDUP=1;
11193
HAVE_DECL_STRNLEN=1;
11197
HAVE_DECL_STRTOK_R=1;
11198
HAVE_DECL_STRERROR=1;
11199
HAVE_DECL_STRSIGNAL=1;
11205
REPLACE_STRCASESTR=0;
11206
REPLACE_STRERROR=0;
11208
REPLACE_STRSIGNAL=0;
11209
REPLACE_STRTOK_R=0;
11210
UNDEFINE_STRTOK_R=0;
11219
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11220
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11221
# irrelevant for anonymous mappings.
11222
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11223
if test "x$ac_cv_func_mmap" = x""yes; then :
11230
# Try to allow MAP_ANONYMOUS.
11231
gl_have_mmap_anonymous=no
11232
if test $gl_have_mmap = yes; then
11233
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11234
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11235
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236
/* end confdefs.h. */
11238
#include <sys/mman.h>
11239
#ifdef MAP_ANONYMOUS
11240
I cant identify this map.
11244
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11245
$EGREP "I cant identify this map." >/dev/null 2>&1; then :
11246
gl_have_mmap_anonymous=yes
11250
if test $gl_have_mmap_anonymous != yes; then
11251
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252
/* end confdefs.h. */
11254
#include <sys/mman.h>
11256
I cant identify this map.
11260
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11261
$EGREP "I cant identify this map." >/dev/null 2>&1; then :
11263
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11265
gl_have_mmap_anonymous=yes
11270
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11271
$as_echo "$gl_have_mmap_anonymous" >&6; }
11272
if test $gl_have_mmap_anonymous = yes; then
11274
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11291
for ac_func in memchr
11293
ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
11294
if test "x$ac_cv_func_memchr" = x""yes; then :
11295
cat >>confdefs.h <<_ACEOF
11296
#define HAVE_MEMCHR 1
11301
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
11307
if test $ac_cv_func_memchr = no; then
11309
for ac_header in bp-sym.h
11311
ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
11312
if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
11313
cat >>confdefs.h <<_ACEOF
11314
#define HAVE_BP_SYM_H 1
11325
if test $ac_cv_func_memchr = yes; then
11326
# Detect platform-specific bugs in some versions of glibc:
11327
# memchr should not dereference anything with length 0
11328
# http://bugzilla.redhat.com/499689
11329
# memchr should not dereference overestimated length after a match
11330
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11331
# http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11332
# Assume that memchr works on platforms that lack mprotect.
11333
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11334
$as_echo_n "checking whether memchr works... " >&6; }
11335
if test "${gl_cv_func_memchr_works+set}" = set; then :
11336
$as_echo_n "(cached) " >&6
11338
if test "$cross_compiling" = yes; then :
11339
gl_cv_func_memchr_works="guessing no"
11341
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342
/* end confdefs.h. */
11344
#include <string.h>
11345
#if HAVE_SYS_MMAN_H
11346
# include <fcntl.h>
11347
# include <unistd.h>
11348
# include <sys/types.h>
11349
# include <sys/mman.h>
11351
# define MAP_FILE 0
11359
char *fence = NULL;
11360
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11361
# if HAVE_MAP_ANONYMOUS
11362
const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11364
# else /* !HAVE_MAP_ANONYMOUS */
11365
const int flags = MAP_FILE | MAP_PRIVATE;
11366
int fd = open ("/dev/zero", O_RDONLY, 0666);
11370
int pagesize = getpagesize ();
11372
(char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11374
if (two_pages != (char *)(-1)
11375
&& mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11376
fence = two_pages + pagesize;
11381
if (memchr (fence, 0, 0))
11383
strcpy (fence - 9, "12345678");
11384
if (memchr (fence - 9, 0, 79) != fence - 1)
11393
if ac_fn_c_try_run "$LINENO"; then :
11394
gl_cv_func_memchr_works=yes
11396
gl_cv_func_memchr_works=no
11398
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11399
conftest.$ac_objext conftest.beam conftest.$ac_ext
11403
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11404
$as_echo "$gl_cv_func_memchr_works" >&6; }
11405
if test "$gl_cv_func_memchr_works" != yes; then
11407
for ac_header in bp-sym.h
11409
ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
11410
if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
11411
cat >>confdefs.h <<_ACEOF
11412
#define HAVE_BP_SYM_H 1
11429
gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
11434
ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
11435
if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
11441
cat >>confdefs.h <<_ACEOF
11442
#define HAVE_DECL_MEMRCHR $ac_have_decl
11450
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
11451
$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
11452
if test "${gl_cv_func_unlink_works+set}" = set; then :
11453
$as_echo_n "(cached) " >&6
11455
touch conftest.file
11456
# Assume that if we have lstat, we can also check symlinks.
11457
if test $ac_cv_func_lstat = yes; then
11458
ln -s conftest.file conftest.lnk
11460
if test "$cross_compiling" = yes; then :
11461
gl_cv_func_unlink_works="guessing no"
11463
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11464
/* end confdefs.h. */
11465
#include <unistd.h>
11471
if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1;
11473
if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2;
11480
if ac_fn_c_try_run "$LINENO"; then :
11481
gl_cv_func_unlink_works=yes
11483
gl_cv_func_unlink_works=no
11485
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11486
conftest.$ac_objext conftest.beam conftest.$ac_ext
11489
rm -f conftest.file conftest.lnk
11491
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_works" >&5
11492
$as_echo "$gl_cv_func_unlink_works" >&6; }
11493
if test x"$gl_cv_func_unlink_works" != xyes; then
11503
gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
11522
gl_cv_func_vfprintf_posix=no
11523
case "$gl_cv_func_printf_sizes_c99" in
11525
case "$gl_cv_func_printf_long_double" in
11527
case "$gl_cv_func_printf_infinite" in
11529
case "$gl_cv_func_printf_infinite_long_double" in
11531
case "$gl_cv_func_printf_directive_a" in
11533
case "$gl_cv_func_printf_directive_f" in
11535
case "$gl_cv_func_printf_directive_n" in
11537
case "$gl_cv_func_printf_directive_ls" in
11539
case "$gl_cv_func_printf_positions" in
11541
case "$gl_cv_func_printf_flag_grouping" in
11543
case "$gl_cv_func_printf_flag_leftadjust" in
11545
case "$gl_cv_func_printf_flag_zero" in
11547
case "$gl_cv_func_printf_precision" in
11549
case "$gl_cv_func_printf_enomem" in
11551
# vfprintf exists and is
11552
# already POSIX compliant.
11553
gl_cv_func_vfprintf_posix=yes
11582
if test $gl_cv_func_vfprintf_posix = no; then
11586
case "$gl_cv_func_printf_infinite" in
11591
$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
11599
case "$gl_cv_func_printf_long_double" in
11601
case "$gl_cv_func_printf_infinite_long_double" in
11606
$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
11615
case "$gl_cv_func_printf_directive_a" in
11620
$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
11622
for ac_func in nl_langinfo
11624
ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
11625
if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
11626
cat >>confdefs.h <<_ACEOF
11627
#define HAVE_NL_LANGINFO 1
11638
case "$gl_cv_func_printf_directive_f" in
11643
$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
11650
case "$gl_cv_func_printf_directive_ls" in
11655
$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
11662
case "$gl_cv_func_printf_flag_grouping" in
11667
$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
11674
case "$gl_cv_func_printf_flag_leftadjust" in
11679
$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
11686
case "$gl_cv_func_printf_flag_zero" in
11691
$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
11698
case "$gl_cv_func_printf_precision" in
11703
$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
11706
$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
11709
$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
11716
case "$gl_cv_func_printf_enomem" in
11721
$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
11724
$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
11727
$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
11742
gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
11752
gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
11762
gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
11772
gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
11774
if test $ac_cv_func_vasnprintf = yes; then
11776
$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
11789
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
11790
if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
11794
$as_echo "#define ptrdiff_t long" >>confdefs.h
11815
gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
11819
$as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
11825
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
11826
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
11827
if test "${ac_cv_header_stdbool_h+set}" = set; then :
11828
$as_echo_n "(cached) " >&6
11830
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11831
/* end confdefs.h. */
11833
#include <stdbool.h>
11835
"error: bool is not defined"
11838
"error: false is not defined"
11841
"error: false is not 0"
11844
"error: true is not defined"
11847
"error: true is not 1"
11849
#ifndef __bool_true_false_are_defined
11850
"error: __bool_true_false_are_defined is not defined"
11853
struct s { _Bool s: 1; _Bool t; } s;
11855
char a[true == 1 ? 1 : -1];
11856
char b[false == 0 ? 1 : -1];
11857
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
11858
char d[(bool) 0.5 == true ? 1 : -1];
11860
char f[(_Bool) 0.0 == false ? 1 : -1];
11862
char h[sizeof (_Bool)];
11863
char i[sizeof s.t];
11864
enum { j = false, k = true, l = false * true, m = true * 256 };
11866
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
11867
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
11868
#if defined __xlc__ || defined __GNUC__
11869
/* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
11870
reported by James Lemley on 2005-10-05; see
11871
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
11872
This test is not quite right, since xlc is allowed to
11873
reject this program, as the initializer for xlcbug is
11874
not one of the forms that C requires support for.
11875
However, doing the test right would require a run-time
11876
test, and that would make cross-compilation harder.
11877
Let us hope that IBM fixes the xlc bug, and also adds
11878
support for this kind of constant expression. In the
11879
meantime, this test will reject xlc, which is OK, since
11880
our stdbool.h substitute should suffice. We also test
11881
this with GCC, where it should work, to detect more
11882
quickly whether someone messes up the test in the
11884
char digs[] = "0123456789";
11885
int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
11887
/* Catch a bug in an HP-UX C compiler. See
11888
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
11889
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
11900
/* Refer to every declared value, to avoid compiler optimizations. */
11901
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
11902
+ !m + !n + !o + !p + !q + !pq);
11908
if ac_fn_c_try_compile "$LINENO"; then :
11909
ac_cv_header_stdbool_h=yes
11911
ac_cv_header_stdbool_h=no
11913
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11915
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
11916
$as_echo "$ac_cv_header_stdbool_h" >&6; }
11917
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
11918
if test "x$ac_cv_type__Bool" = x""yes; then :
11920
cat >>confdefs.h <<_ACEOF
11921
#define HAVE__BOOL 1
11927
if test $ac_cv_header_stdbool_h = yes; then
11929
$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
11940
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11941
$as_echo_n "checking for unsigned long long int... " >&6; }
11942
if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
11943
$as_echo_n "(cached) " >&6
11945
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946
/* end confdefs.h. */
11948
/* For now, do not test the preprocessor; as of 2007 there are too many
11949
implementations with broken preprocessors. Perhaps this can
11950
be revisited in 2012. In the meantime, code should not expect
11951
#if to work with literals wider than 32 bits. */
11952
/* Test literals. */
11953
long long int ll = 9223372036854775807ll;
11954
long long int nll = -9223372036854775807LL;
11955
unsigned long long int ull = 18446744073709551615ULL;
11956
/* Test constant expressions. */
11957
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11959
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11965
/* Test availability of runtime routines for shift and division. */
11966
long long int llmax = 9223372036854775807ll;
11967
unsigned long long int ullmax = 18446744073709551615ull;
11968
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11969
| (llmax / ll) | (llmax % ll)
11970
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11971
| (ullmax / ull) | (ullmax % ull));
11977
if ac_fn_c_try_link "$LINENO"; then :
11978
ac_cv_type_unsigned_long_long_int=yes
11980
ac_cv_type_unsigned_long_long_int=no
11982
rm -f core conftest.err conftest.$ac_objext \
11983
conftest$ac_exeext conftest.$ac_ext
11985
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11986
$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11987
if test $ac_cv_type_unsigned_long_long_int = yes; then
11989
$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12001
ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
12002
if test "x$ac_cv_have_decl_strdup" = x""yes; then :
12008
cat >>confdefs.h <<_ACEOF
12009
#define HAVE_DECL_STRDUP $ac_have_decl
12017
if test -z "$ERRNO_H"; then
12018
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
12019
$as_echo_n "checking for working strerror function... " >&6; }
12020
if test "${gl_cv_func_working_strerror+set}" = set; then :
12021
$as_echo_n "(cached) " >&6
12023
if test "$cross_compiling" = yes; then :
12024
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025
/* end confdefs.h. */
12026
#include <string.h>
12031
return !*strerror (-2);
12036
if ac_fn_c_try_compile "$LINENO"; then :
12037
gl_cv_func_working_strerror=yes
12039
gl_cv_func_working_strerror=no
12041
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12044
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045
/* end confdefs.h. */
12046
#include <string.h>
12051
return !*strerror (-2);
12056
if ac_fn_c_try_run "$LINENO"; then :
12057
gl_cv_func_working_strerror=yes
12059
gl_cv_func_working_strerror=no
12061
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12062
conftest.$ac_objext conftest.beam conftest.$ac_ext
12067
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
12068
$as_echo "$gl_cv_func_working_strerror" >&6; }
12069
if test $gl_cv_func_working_strerror = no; then
12075
if test $REPLACE_STRERROR = 1; then
12077
ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12078
if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12084
cat >>confdefs.h <<_ACEOF
12085
#define HAVE_DECL_STRERROR $ac_have_decl
12089
if test $ac_cv_header_sys_socket_h != yes; then
12090
for ac_header in winsock2.h
12092
ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12093
if test "x$ac_cv_header_winsock2_h" = x""yes; then :
12094
cat >>confdefs.h <<_ACEOF
12095
#define HAVE_WINSOCK2_H 1
12117
if test $gl_cv_have_include_next = yes; then
12118
gl_cv_next_string_h='<'string.h'>'
12120
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12121
$as_echo_n "checking absolute name of <string.h>... " >&6; }
12122
if test "${gl_cv_next_string_h+set}" = set; then :
12123
$as_echo_n "(cached) " >&6
12126
if test $ac_cv_header_string_h = yes; then
12127
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128
/* end confdefs.h. */
12129
#include <string.h>
12133
aix*) gl_absname_cpp="$ac_cpp -C" ;;
12134
*) gl_absname_cpp="$ac_cpp" ;;
12136
gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12137
sed -n '\#/string.h#{
12138
s#.*"\(.*/string.h\)".*#\1#
12144
gl_cv_next_string_h='<'string.h'>'
12148
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12149
$as_echo "$gl_cv_next_string_h" >&6; }
12151
NEXT_STRING_H=$gl_cv_next_string_h
12153
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12154
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12155
gl_next_as_first_directive='<'string.h'>'
12157
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12158
gl_next_as_first_directive=$gl_cv_next_string_h
12160
NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12165
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12166
$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
12167
if test "${ac_cv_header_stat_broken+set}" = set; then :
12168
$as_echo_n "(cached) " >&6
12170
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171
/* end confdefs.h. */
12172
#include <sys/types.h>
12173
#include <sys/stat.h>
12175
#if defined S_ISBLK && defined S_IFDIR
12176
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12179
#if defined S_ISBLK && defined S_IFCHR
12180
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12183
#if defined S_ISLNK && defined S_IFREG
12184
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12187
#if defined S_ISSOCK && defined S_IFREG
12188
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12192
if ac_fn_c_try_compile "$LINENO"; then :
12193
ac_cv_header_stat_broken=no
12195
ac_cv_header_stat_broken=yes
12197
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12200
$as_echo "$ac_cv_header_stat_broken" >&6; }
12201
if test $ac_cv_header_stat_broken = yes; then
12203
$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
6952
12210
REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12211
REPLACE_MKTIME=GNULIB_PORTCHECK;
6953
12212
REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
6954
12213
REPLACE_STRPTIME=GNULIB_PORTCHECK;
6955
12214
REPLACE_TIMEGM=GNULIB_PORTCHECK;
7367
rm -f conftest.$ac_objext conftest$ac_exeext
7368
if { (ac_try="$ac_link"
7370
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7371
*) ac_try_echo=$ac_try;;
7373
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7374
(eval "$ac_link") 2>conftest.er1
7376
grep -v '^ *+' conftest.er1 >conftest.err
7378
cat conftest.err >&5
7379
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7380
(exit $ac_status); } && {
7381
test -z "$ac_c_werror_flag" ||
7382
test ! -s conftest.err
7383
} && test -s conftest$ac_exeext &&
7384
$as_test_x conftest$ac_exeext; then
13336
if ac_fn_c_try_link "$LINENO"; then :
7385
13337
ac_cv_lib_error_at_line=yes
7387
echo "$as_me: failed program was:" >&5
7388
sed 's/^/| /' conftest.$ac_ext >&5
7390
ac_cv_lib_error_at_line=no
7393
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7394
conftest$ac_exeext conftest.$ac_ext
7396
{ echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
7397
echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6; }
13339
ac_cv_lib_error_at_line=no
13341
rm -f core conftest.err conftest.$ac_objext \
13342
conftest$ac_exeext conftest.$ac_ext
13344
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
13345
$as_echo "$ac_cv_lib_error_at_line" >&6; }
7398
13346
if test $ac_cv_lib_error_at_line = no; then
7399
13355
gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
13367
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
13371
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
7408
13382
gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext"
7413
{ echo "$as_me:$LINENO: checking for working fcntl.h" >&5
7414
echo $ECHO_N "checking for working fcntl.h... $ECHO_C" >&6; }
7415
if test "${gl_cv_header_working_fcntl_h+set}" = set; then
7416
echo $ECHO_N "(cached) $ECHO_C" >&6
7418
if test "$cross_compiling" = yes; then
7419
gl_cv_header_working_fcntl_h=cross-compiling
7421
cat >conftest.$ac_ext <<_ACEOF
7424
cat confdefs.h >>conftest.$ac_ext
7425
cat >>conftest.$ac_ext <<_ACEOF
13392
if test $ac_cv_func_fchdir = no; then
13402
gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
13406
$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
13422
gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
13441
gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13454
gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
13460
if test $ac_cv_func_dup2 = yes; then
13471
gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
13477
if test $ac_cv_func_fcntl = no; then
13490
gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13496
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
13497
$as_echo_n "checking whether open can visit directories... " >&6; }
13498
if test "${gl_cv_func_open_directory_works+set}" = set; then :
13499
$as_echo_n "(cached) " >&6
13501
if test "$cross_compiling" = yes; then :
13502
gl_cv_func_open_directory_works="guessing no"
13504
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7426
13505
/* end confdefs.h. */
7427
#include <sys/types.h>
7428
#include <sys/stat.h>
7435
#define O_NOFOLLOW 0
7437
static int const constants[] =
7439
O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7440
O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7447
int status = !constants;
7449
static char const sym[] = "conftest.sym";
7450
if (symlink (".", sym) != 0
7451
|| close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
7455
static char const file[] = "confdefs.h";
7456
int fd = open (file, O_RDONLY | O_NOATIME);
7458
struct stat st0, st1;
7460
|| fstat (fd, &st0) != 0
7462
|| read (fd, &c, 1) != 1
7464
|| stat (file, &st1) != 0
7465
|| st0.st_atime != st1.st_atime)
13511
return open(".", O_RDONLY) < 0;
7473
rm -f conftest$ac_exeext
7474
if { (ac_try="$ac_link"
7476
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7477
*) ac_try_echo=$ac_try;;
7479
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7480
(eval "$ac_link") 2>&5
7482
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7484
{ (case "(($ac_try" in
7485
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7486
*) ac_try_echo=$ac_try;;
7488
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7489
(eval "$ac_try") 2>&5
7491
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492
(exit $ac_status); }; }; then
7493
gl_cv_header_working_fcntl_h=yes
7495
echo "$as_me: program exited with status $ac_status" >&5
7496
echo "$as_me: failed program was:" >&5
7497
sed 's/^/| /' conftest.$ac_ext >&5
7501
32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7502
64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7503
96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7504
*) gl_cv_header_working_fcntl_h='no';;
7507
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7512
{ echo "$as_me:$LINENO: result: $gl_cv_header_working_fcntl_h" >&5
7513
echo "${ECHO_T}$gl_cv_header_working_fcntl_h" >&6; }
7515
case $gl_cv_header_working_fcntl_h in #(
7516
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7520
cat >>confdefs.h <<_ACEOF
7521
#define HAVE_WORKING_O_NOATIME $ac_val
7525
case $gl_cv_header_working_fcntl_h in #(
7526
*O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7530
cat >>confdefs.h <<_ACEOF
7531
#define HAVE_WORKING_O_NOFOLLOW $ac_val
7535
{ echo "$as_me:$LINENO: checking absolute name of <fcntl.h>" >&5
7536
echo $ECHO_N "checking absolute name of <fcntl.h>... $ECHO_C" >&6; }
7537
if test "${gl_cv_absolute_fcntl_h+set}" = set; then
7538
echo $ECHO_N "(cached) $ECHO_C" >&6
7545
if test $ac_cv_header_fcntl_h = yes; then
7546
cat >conftest.$ac_ext <<_ACEOF
7549
cat confdefs.h >>conftest.$ac_ext
7550
cat >>conftest.$ac_ext <<_ACEOF
7551
/* end confdefs.h. */
7554
gl_cv_absolute_fcntl_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7555
sed -n '\#/fcntl.h#{s#.*"\(.*/fcntl.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
13516
if ac_fn_c_try_run "$LINENO"; then :
13517
gl_cv_func_open_directory_works=yes
13519
gl_cv_func_open_directory_works=no
13521
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13522
conftest.$ac_objext conftest.beam conftest.$ac_ext
13526
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
13527
$as_echo "$gl_cv_func_open_directory_works" >&6; }
13528
if test "$gl_cv_func_open_directory_works" != yes; then
13530
$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
7559
{ echo "$as_me:$LINENO: result: $gl_cv_absolute_fcntl_h" >&5
7560
echo "${ECHO_T}$gl_cv_absolute_fcntl_h" >&6; }
7561
cat >>confdefs.h <<_ACEOF
7562
#define ABSOLUTE_FCNTL_H "$gl_cv_absolute_fcntl_h"
7566
ABSOLUTE_FCNTL_H=\"$gl_cv_absolute_fcntl_h\"
13551
if test $ac_cv_func_fcntl = no; then
13555
if test $ac_cv_func_fcntl = no; then
13568
gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13572
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
13573
$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
13574
if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
13575
$as_echo_n "(cached) " >&6
13577
if test "$cross_compiling" = yes; then :
13578
# Guess that it works on glibc systems
13579
case $host_os in #((
13580
*-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
13581
*) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
13584
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13585
/* end confdefs.h. */
13592
return fcntl (0, F_DUPFD, -1) != -1;
13598
if ac_fn_c_try_run "$LINENO"; then :
13599
gl_cv_func_fcntl_f_dupfd_works=yes
13601
gl_cv_func_fcntl_f_dupfd_works=no
13603
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13604
conftest.$ac_objext conftest.beam conftest.$ac_ext
13608
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
13609
$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
13610
case $gl_cv_func_fcntl_f_dupfd_works in
13615
if test $ac_cv_func_fcntl = no; then
13628
gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13632
$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
13636
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
13637
$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
13638
if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
13639
$as_echo_n "(cached) " >&6
13641
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642
/* end confdefs.h. */
13645
#ifndef F_DUPFD_CLOEXEC
13657
if ac_fn_c_try_compile "$LINENO"; then :
13658
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659
/* end confdefs.h. */
13662
/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
13663
it to support the semantics on older kernels that failed with EINVAL. */
13675
if ac_fn_c_try_compile "$LINENO"; then :
13676
gl_cv_func_fcntl_f_dupfd_cloexec=yes
13678
gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
13680
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682
gl_cv_func_fcntl_f_dupfd_cloexec=no
13684
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13686
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
13687
$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
13688
if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
13692
if test $ac_cv_func_fcntl = no; then
13705
gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13724
if test $gl_cv_have_include_next = yes; then
13725
gl_cv_next_fcntl_h='<'fcntl.h'>'
13727
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
13728
$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
13729
if test "${gl_cv_next_fcntl_h+set}" = set; then :
13730
$as_echo_n "(cached) " >&6
13733
if test $ac_cv_header_fcntl_h = yes; then
13734
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13735
/* end confdefs.h. */
13740
aix*) gl_absname_cpp="$ac_cpp -C" ;;
13741
*) gl_absname_cpp="$ac_cpp" ;;
13743
gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13744
sed -n '\#/fcntl.h#{
13745
s#.*"\(.*/fcntl.h\)".*#\1#
13751
gl_cv_next_fcntl_h='<'fcntl.h'>'
13755
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
13756
$as_echo "$gl_cv_next_fcntl_h" >&6; }
13758
NEXT_FCNTL_H=$gl_cv_next_fcntl_h
13760
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13761
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13762
gl_next_as_first_directive='<'fcntl.h'>'
13764
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13765
gl_next_as_first_directive=$gl_cv_next_fcntl_h
13767
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
7572
13781
gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext"
7573
13791
gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext"
7577
cat >>confdefs.h <<\_ACEOF
7578
#define GNULIB_FCNTL_SAFER 1
7584
if test -n "$GETOPT_H"; then
13793
# Prerequisites of lib/open-safer.c.
13798
$as_echo "#define GNULIB_FCNTL_SAFER 1" >>confdefs.h
13804
if test $ac_cv_func_fdopendir = no; then
13813
gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13823
gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
13830
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
13831
$as_echo_n "checking whether fdopendir works... " >&6; }
13832
if test "${gl_cv_func_fdopendir_works+set}" = set; then :
13833
$as_echo_n "(cached) " >&6
13835
if test "$cross_compiling" = yes; then :
13836
gl_cv_func_fdopendir_works="guessing no"
13838
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839
/* end confdefs.h. */
13841
#include <dirent.h>
13847
int fd = open ("conftest.c", O_RDONLY);
13848
if (fd < 0) return 2;
13849
return !!fdopendir (fd);
13854
if ac_fn_c_try_run "$LINENO"; then :
13855
gl_cv_func_fdopendir_works=yes
13857
gl_cv_func_fdopendir_works=no
13859
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13860
conftest.$ac_objext conftest.beam conftest.$ac_ext
13864
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
13865
$as_echo "$gl_cv_func_fdopendir_works" >&6; }
13866
if test "$gl_cv_func_fdopendir_works" != yes; then
13867
REPLACE_FDOPENDIR=1
13879
gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
13889
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
13890
$as_echo_n "checking whether fflush works on input streams... " >&6; }
13891
if test "${gl_cv_func_fflush_stdin+set}" = set; then :
13892
$as_echo_n "(cached) " >&6
13894
echo hello world > conftest.txt
13895
if test "$cross_compiling" = yes; then :
13896
gl_cv_func_fflush_stdin=no
13898
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13899
/* end confdefs.h. */
13902
#include <unistd.h>
13907
FILE *f = fopen ("conftest.txt", "r");
13914
if (fd < 0 || fread (buffer, 1, 5, f) != 5)
13916
/* For deterministic results, ensure f read a bigger buffer. */
13917
if (lseek (fd, 0, SEEK_CUR) == 5)
13919
/* POSIX requires fflush-fseek to set file offset of fd. This fails
13920
on BSD systems and on mingw. */
13921
if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
13923
if (lseek (fd, 0, SEEK_CUR) != 5)
13925
/* Verify behaviour of fflush after ungetc. See
13926
<http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
13927
/* Verify behaviour of fflush after a backup ungetc. This fails on
13932
if (fgetc (f) != c)
13934
/* Verify behaviour of fflush after a non-backup ungetc. This fails
13935
on glibc 2.8 and on BSD systems. */
13939
if (fgetc (f) != c)
13947
if ac_fn_c_try_run "$LINENO"; then :
13948
gl_cv_func_fflush_stdin=yes
13950
gl_cv_func_fflush_stdin=no
13952
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13953
conftest.$ac_objext conftest.beam conftest.$ac_ext
13959
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
13960
$as_echo "$gl_cv_func_fflush_stdin" >&6; }
13961
if test $gl_cv_func_fflush_stdin = no; then
13971
gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
13981
gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
14010
if test $gl_cv_have_include_next = yes; then
14011
gl_cv_next_float_h='<'float.h'>'
14013
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
14014
$as_echo_n "checking absolute name of <float.h>... " >&6; }
14015
if test "${gl_cv_next_float_h+set}" = set; then :
14016
$as_echo_n "(cached) " >&6
14019
if test $ac_cv_header_float_h = yes; then
14020
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14021
/* end confdefs.h. */
14026
aix*) gl_absname_cpp="$ac_cpp -C" ;;
14027
*) gl_absname_cpp="$ac_cpp" ;;
14029
gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14030
sed -n '\#/float.h#{
14031
s#.*"\(.*/float.h\)".*#\1#
14037
gl_cv_next_float_h='<'float.h'>'
14041
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
14042
$as_echo "$gl_cv_next_float_h" >&6; }
14044
NEXT_FLOAT_H=$gl_cv_next_float_h
14046
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14047
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14048
gl_next_as_first_directive='<'float.h'>'
14050
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14051
gl_next_as_first_directive=$gl_cv_next_float_h
14053
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
14065
# include <stdio.h>
14066
# if HAVE_STDIO_EXT_H
14067
# include <stdio_ext.h>
14070
ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
14072
if test "x$ac_cv_have_decl___fpending" = x""yes; then :
14078
cat >>confdefs.h <<_ACEOF
14079
#define HAVE_DECL___FPENDING $ac_have_decl
14082
if test $ac_cv_func___fpending = no; then
14083
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
14084
$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
14085
if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
14086
$as_echo_n "(cached) " >&6
14092
'fp->_IO_write_ptr - fp->_IO_write_base' \
14094
'# traditional Unix' \
14095
'fp->_ptr - fp->_base' \
14098
'fp->_p - fp->_bf._base' \
14100
'# SCO, Unixware' \
14101
'(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
14104
'(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
14107
'fp->__bufp - fp->__buffer' \
14109
'# old glibc iostream?' \
14110
'fp->_pptr - fp->_pbase' \
14113
'fp->_ptr - fp->_buffer' \
14116
'(*fp)->_ptr - (*fp)->_base' \
14118
'# e.g., DGUX R4.11; the info is not available' \
14122
# Skip each embedded comment.
14123
case "$ac_expr" in '#'*) continue;; esac
14125
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14126
/* end confdefs.h. */
14131
FILE *fp = stdin; (void) ($ac_expr);
14136
if ac_fn_c_try_compile "$LINENO"; then :
14140
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14141
test "$fp_done" = yes && break
14144
ac_cv_sys_pending_output_n_bytes=$ac_expr
14148
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
14149
$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
14151
cat >>confdefs.h <<_ACEOF
14152
#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
14163
gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
14182
gl_cv_func_fprintf_posix=no
14183
case "$gl_cv_func_printf_sizes_c99" in
14185
case "$gl_cv_func_printf_long_double" in
14187
case "$gl_cv_func_printf_infinite" in
14189
case "$gl_cv_func_printf_infinite_long_double" in
14191
case "$gl_cv_func_printf_directive_a" in
14193
case "$gl_cv_func_printf_directive_f" in
14195
case "$gl_cv_func_printf_directive_n" in
14197
case "$gl_cv_func_printf_directive_ls" in
14199
case "$gl_cv_func_printf_positions" in
14201
case "$gl_cv_func_printf_flag_grouping" in
14203
case "$gl_cv_func_printf_flag_leftadjust" in
14205
case "$gl_cv_func_printf_flag_zero" in
14207
case "$gl_cv_func_printf_precision" in
14209
case "$gl_cv_func_printf_enomem" in
14211
# fprintf exists and is
14212
# already POSIX compliant.
14213
gl_cv_func_fprintf_posix=yes
14242
if test $gl_cv_func_fprintf_posix = no; then
14246
case "$gl_cv_func_printf_infinite" in
14251
$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
14259
case "$gl_cv_func_printf_long_double" in
14261
case "$gl_cv_func_printf_infinite_long_double" in
14266
$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
14275
case "$gl_cv_func_printf_directive_a" in
14280
$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
14282
for ac_func in nl_langinfo
14284
ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
14285
if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
14286
cat >>confdefs.h <<_ACEOF
14287
#define HAVE_NL_LANGINFO 1
14298
case "$gl_cv_func_printf_directive_f" in
14303
$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
14310
case "$gl_cv_func_printf_directive_ls" in
14315
$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
14322
case "$gl_cv_func_printf_flag_grouping" in
14327
$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
14334
case "$gl_cv_func_printf_flag_leftadjust" in
14339
$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
14346
case "$gl_cv_func_printf_flag_zero" in
14351
$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
14358
case "$gl_cv_func_printf_precision" in
14363
$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
14366
$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
14369
$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
14376
case "$gl_cv_func_printf_enomem" in
14381
$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
14384
$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
14387
$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
14402
gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
14412
gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
14422
gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
14432
gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
14434
if test $ac_cv_func_vasnprintf = yes; then
14436
$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
14449
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
14450
if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
14454
$as_echo "#define ptrdiff_t long" >>confdefs.h
14475
gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
14479
$as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
14487
GNULIB_FPRINTF_POSIX=1
14493
ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
14495
if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
14501
cat >>confdefs.h <<_ACEOF
14502
#define HAVE_DECL_FPURGE $ac_have_decl
14505
if test "x$ac_cv_func_fpurge" = xyes; then
14506
# Detect BSD bug. Only cygwin 1.7 is known to be immune.
14507
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
14508
$as_echo_n "checking whether fpurge works... " >&6; }
14509
if test "${gl_cv_func_fpurge_works+set}" = set; then :
14510
$as_echo_n "(cached) " >&6
14512
if test "$cross_compiling" = yes; then :
14513
gl_cv_func_fpurge_works='guessing no'
14515
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516
/* end confdefs.h. */
14522
FILE *f = fopen ("conftest.txt", "w+");
14524
if (fputc ('a', f) != 'a') return 2;
14526
if (fgetc (f) != 'a') return 3;
14527
if (fgetc (f) != EOF) return 4;
14528
if (fpurge (f) != 0) return 5;
14529
if (putc ('b', f) != 'b') return 6;
14530
if (fclose (f) != 0) return 7;
14531
if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
14532
if (fgetc (f) != 'a') return 9;
14533
if (fgetc (f) != 'b') return 10;
14534
if (fgetc (f) != EOF) return 11;
14535
if (fclose (f) != 0) return 12;
14536
if (remove ("conftest.txt") != 0) return 13;
14542
if ac_fn_c_try_run "$LINENO"; then :
14543
gl_cv_func_fpurge_works=yes
14545
gl_cv_func_fpurge_works=no
14547
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14548
conftest.$ac_objext conftest.beam conftest.$ac_ext
14552
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
14553
$as_echo "$gl_cv_func_fpurge_works" >&6; }
14554
if test "x$gl_cv_func_fpurge_works" != xyes; then
14564
gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
14576
gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
14579
if test "x$ac_cv_have_decl_fpurge" = xno; then
14592
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
14593
$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
14594
if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
14595
$as_echo_n "(cached) " >&6
14598
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599
/* end confdefs.h. */
14605
int e; return frexp (x, &e) > 0;
14610
if ac_fn_c_try_link "$LINENO"; then :
14611
gl_cv_func_frexp_no_libm=yes
14613
gl_cv_func_frexp_no_libm=no
14615
rm -f core conftest.err conftest.$ac_objext \
14616
conftest$ac_exeext conftest.$ac_ext
14619
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
14620
$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
14621
if test $gl_cv_func_frexp_no_libm = yes; then
14624
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
14625
$as_echo_n "checking whether frexp works... " >&6; }
14626
if test "${gl_cv_func_frexp_works+set}" = set; then :
14627
$as_echo_n "(cached) " >&6
14630
if test "$cross_compiling" = yes; then :
14632
netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
14633
*) gl_cv_func_frexp_works="guessing yes";;
14637
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638
/* end confdefs.h. */
14642
#include <string.h>
14647
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
14648
So we use -zero instead. */
14650
/* Test on denormalized numbers. */
14651
for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
14656
double y = frexp (x, &exp);
14657
/* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
14658
On NetBSD: y = 0.75. Correct: y = 0.5. */
14662
/* Test on infinite numbers. */
14666
double y = frexp (x, &exp);
14670
/* Test on negative zero. */
14674
double y = frexp (x, &exp);
14675
if (memcmp (&y, &x, sizeof x))
14681
if ac_fn_c_try_run "$LINENO"; then :
14682
gl_cv_func_frexp_works=yes
14684
gl_cv_func_frexp_works=no
14686
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14687
conftest.$ac_objext conftest.beam conftest.$ac_ext
14692
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
14693
$as_echo "$gl_cv_func_frexp_works" >&6; }
14695
case "$gl_cv_func_frexp_works" in
14696
*yes) gl_func_frexp_no_libm=yes ;;
14697
*) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
14700
gl_func_frexp_no_libm=no
14703
if test $gl_func_frexp_no_libm = yes; then
14705
$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
14716
gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
14726
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
14727
$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
14728
if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
14729
$as_echo_n "(cached) " >&6
14732
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14733
/* end confdefs.h. */
14739
int e; return frexpl (x, &e) > 0;
14744
if ac_fn_c_try_link "$LINENO"; then :
14745
gl_cv_func_frexpl_no_libm=yes
14747
gl_cv_func_frexpl_no_libm=no
14749
rm -f core conftest.err conftest.$ac_objext \
14750
conftest$ac_exeext conftest.$ac_ext
14753
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
14754
$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
14755
if test $gl_cv_func_frexpl_no_libm = yes; then
14758
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
14759
$as_echo_n "checking whether frexpl works... " >&6; }
14760
if test "${gl_cv_func_frexpl_works+set}" = set; then :
14761
$as_echo_n "(cached) " >&6
14764
if test "$cross_compiling" = yes; then :
14766
aix* | beos* | darwin* | irix* | mingw* | pw*)
14767
gl_cv_func_frexpl_works="guessing no";;
14768
*) gl_cv_func_frexpl_works="guessing yes";;
14772
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773
/* end confdefs.h. */
14777
/* Override the values of <float.h>, like done in float.in.h. */
14778
#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
14779
# undef LDBL_MIN_EXP
14780
# define LDBL_MIN_EXP (-16381)
14782
extern long double frexpl (long double, int *);
14785
volatile long double x;
14786
/* Test on finite numbers that fails on AIX 5.1. */
14794
/* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
14795
function returns an invalid (incorrectly normalized) value: it returns
14796
y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
14797
but the correct result is
14798
0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
14802
long double y = frexpl (x, &exp);
14803
if (!(exp == 1 && y == 0.505L))
14806
/* Test on large finite numbers. This fails on BeOS at i = 16322, while
14807
LDBL_MAX_EXP = 16384.
14808
In the loop end test, we test x against Infinity, rather than comparing
14809
i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
14812
for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
14820
/* Test on denormalized numbers. */
14823
for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
14828
long double y = frexpl (x, &exp);
14829
/* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
14830
exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
14831
if (exp != LDBL_MIN_EXP - 1)
14835
/* Test on infinite numbers. */
14839
long double y = frexpl (x, &exp);
14846
if ac_fn_c_try_run "$LINENO"; then :
14847
gl_cv_func_frexpl_works=yes
14849
gl_cv_func_frexpl_works=no
14851
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14852
conftest.$ac_objext conftest.beam conftest.$ac_ext
14857
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
14858
$as_echo "$gl_cv_func_frexpl_works" >&6; }
14860
case "$gl_cv_func_frexpl_works" in
14861
*yes) gl_func_frexpl_no_libm=yes ;;
14862
*) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
14865
gl_func_frexpl_no_libm=no
14868
if test $gl_func_frexpl_no_libm = yes; then
14870
$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
14872
ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
14874
if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
14890
gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
14905
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
14906
$as_echo_n "checking for fseeko... " >&6; }
14907
if test "${gl_cv_func_fseeko+set}" = set; then :
14908
$as_echo_n "(cached) " >&6
14911
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912
/* end confdefs.h. */
14918
fseeko (stdin, 0, 0);
14923
if ac_fn_c_try_link "$LINENO"; then :
14924
gl_cv_func_fseeko=yes
14926
gl_cv_func_fseeko=no
14928
rm -f core conftest.err conftest.$ac_objext \
14929
conftest$ac_exeext conftest.$ac_ext
14932
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
14933
$as_echo "$gl_cv_func_fseeko" >&6; }
14934
if test $gl_cv_func_fseeko = no \
14935
|| test $gl_cv_var_stdin_large_offset = no; then
14945
gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
14964
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
14965
$as_echo_n "checking for ftello... " >&6; }
14966
if test "${gl_cv_func_ftello+set}" = set; then :
14967
$as_echo_n "(cached) " >&6
14970
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971
/* end confdefs.h. */
14981
if ac_fn_c_try_link "$LINENO"; then :
14982
gl_cv_func_ftello=yes
14984
gl_cv_func_ftello=no
14986
rm -f core conftest.err conftest.$ac_objext \
14987
conftest$ac_exeext conftest.$ac_ext
14990
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
14991
$as_echo "$gl_cv_func_ftello" >&6; }
14992
if test $gl_cv_func_ftello = no \
14993
|| test $gl_cv_var_stdin_large_offset = no; then
15003
gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
15019
case $gl_cv_func_getcwd_null,$host_os in
15021
gl_cv_func_getcwd_path_max=yes;;
15026
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
15027
$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
15028
if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
15029
$as_echo_n "(cached) " >&6
15031
# Arrange for deletion of the temporary directory this test creates.
15032
ac_clean_files="$ac_clean_files confdir3"
15033
if test "$cross_compiling" = yes; then :
15034
gl_cv_func_getcwd_path_max=no
15036
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037
/* end confdefs.h. */
15040
#include <stdlib.h>
15041
#include <unistd.h>
15042
#include <string.h>
15043
#include <limits.h>
15044
#include <sys/stat.h>
15045
#include <sys/types.h>
15049
# define AT_FDCWD 0
15051
#ifdef ENAMETOOLONG
15052
# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
15054
# define is_ENAMETOOLONG(x) 0
15057
/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
15061
# define S_IRWXU 0700
15064
/* The length of this name must be 8. */
15065
#define DIR_NAME "confdir3"
15066
#define DIR_NAME_LEN 8
15067
#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
15069
/* The length of "../". */
15070
#define DOTDOTSLASH_LEN 3
15072
/* Leftover bytes in the buffer, to work around library or OS bugs. */
15073
#define BUF_SLOP 20
15079
/* The Hurd doesn't define this, so getcwd can't exhibit the bug --
15080
at least not on a local file system. And if we were to start worrying
15081
about remote file systems, we'd have to enable the wrapper function
15082
all of the time, just to be safe. That's not worth the cost. */
15084
#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
15085
- DIR_NAME_SIZE - BUF_SLOP) \
15087
/* FIXME: Assuming there's a system for which this is true,
15088
this should be done in a compile test. */
15091
char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
15092
+ DIR_NAME_SIZE + BUF_SLOP];
15093
char *cwd = getcwd (buf, PATH_MAX);
15094
size_t initial_cwd_len;
15097
size_t n_chdirs = 0;
15102
cwd_len = initial_cwd_len = strlen (cwd);
15106
size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
15109
cwd_len += DIR_NAME_SIZE;
15110
/* If mkdir or chdir fails, it could be that this system cannot create
15111
any file with an absolute name longer than PATH_MAX, such as cygwin.
15112
If so, leave fail as 0, because the current working directory can't
15113
be too long for getcwd if it can't even be created. For other
15114
errors, be pessimistic and consider that as a failure, too. */
15115
if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
15117
if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
15122
if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
15124
c = getcwd (buf, PATH_MAX);
15125
if (!c && errno == ENOENT)
15130
if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
15137
if (dotdot_max <= cwd_len - initial_cwd_len)
15139
if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
15141
c = getcwd (buf, cwd_len + 1);
15144
if (! (errno == ERANGE || errno == ENOENT
15145
|| is_ENAMETOOLONG (errno)))
15150
if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
15158
if (c && strlen (c) != cwd_len)
15166
/* Leaving behind such a deep directory is not polite.
15167
So clean up here, right away, even though the driving
15168
shell script would also clean up. */
15172
/* Try rmdir first, in case the chdir failed. */
15174
for (i = 0; i <= n_chdirs; i++)
15176
if (chdir ("..") < 0)
15178
if (rmdir (DIR_NAME) != 0)
15188
if ac_fn_c_try_run "$LINENO"; then :
15189
gl_cv_func_getcwd_path_max=yes
15192
1) gl_cv_func_getcwd_path_max='no, but it is partly working';;
15193
*) gl_cv_func_getcwd_path_max=no;;
15196
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15197
conftest.$ac_objext conftest.beam conftest.$ac_ext
15202
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
15203
$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
15204
case $gl_cv_func_getcwd_path_max in
15207
$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
15213
for ac_func in getpagesize
15215
ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
15216
if test "x$ac_cv_func_getpagesize" = x""yes; then :
15217
cat >>confdefs.h <<_ACEOF
15218
#define HAVE_GETPAGESIZE 1
15224
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
15225
$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
15226
if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
15227
$as_echo_n "(cached) " >&6
15229
# Remove any remnants of a previous test.
15230
rm -rf confdir-14B---
15231
# Arrange for deletion of the temporary directory this test creates.
15232
ac_clean_files="$ac_clean_files confdir-14B---"
15233
if test "$cross_compiling" = yes; then :
15234
gl_cv_func_getcwd_abort_bug=yes
15236
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15237
/* end confdefs.h. */
15239
#include <stdlib.h>
15240
#include <unistd.h>
15241
#include <limits.h>
15242
#include <string.h>
15243
#include <sys/stat.h>
15245
/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
15249
# define S_IRWXU 0700
15252
/* FIXME: skip the run-test altogether on systems without getpagesize. */
15253
#if ! HAVE_GETPAGESIZE
15254
# define getpagesize() 0
15257
/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
15258
the 16kB pagesize on ia64 linux. Those conditions make the code below
15259
trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
15260
#define TARGET_LEN (5 * 1024)
15265
char const *dir_name = "confdir-14B---";
15267
size_t initial_cwd_len;
15269
size_t desired_depth;
15272
/* The bug is triggered when PATH_MAX < getpagesize (), so skip
15273
this relative expensive and invasive test if that's not true. */
15274
if (getpagesize () <= PATH_MAX)
15277
cwd = getcwd (NULL, 0);
15281
initial_cwd_len = strlen (cwd);
15283
desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
15284
/ (1 + strlen (dir_name)));
15285
for (d = 0; d < desired_depth; d++)
15287
if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
15289
fail = 3; /* Unable to construct deep hierarchy. */
15294
/* If libc has the bug in question, this invocation of getcwd
15295
results in a failed assertion. */
15296
cwd = getcwd (NULL, 0);
15298
fail = 4; /* getcwd failed. This is ok, and expected. */
15301
/* Call rmdir first, in case the above chdir failed. */
15305
if (chdir ("..") < 0)
15314
if ac_fn_c_try_run "$LINENO"; then :
15315
gl_cv_func_getcwd_abort_bug=no
15317
gl_cv_func_getcwd_abort_bug=yes
15319
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15320
conftest.$ac_objext conftest.beam conftest.$ac_ext
15325
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
15326
$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
15327
if test $gl_cv_func_getcwd_abort_bug = yes; then :
15333
case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
15345
gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
15365
$as_echo "#define GNULIB_GETOPT_GNU 1" >>confdefs.h
15373
if test -n "$gl_replace_getopt"; then :
15379
$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15383
GNULIB_UNISTD_H_GETOPT=1
7586
15392
gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
7587
15402
gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
7591
cat >>confdefs.h <<\_ACEOF
7592
#define __GETOPT_PREFIX rpl_
7611
{ echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5
7612
echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6; }
7613
if test "${gl_cv_c_inline_effective+set}" = set; then
7614
echo $ECHO_N "(cached) $ECHO_C" >&6
15423
gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext"
15435
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
15436
$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
15437
if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
15438
$as_echo_n "(cached) " >&6
15440
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441
/* end confdefs.h. */
15442
#include <sys/time.h>
15449
int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
15451
return !(x | c.tv_sec | c.tv_usec);
15457
if ac_fn_c_try_compile "$LINENO"; then :
15458
gl_cv_func_gettimeofday_posix_signature=yes
15460
gl_cv_func_gettimeofday_posix_signature=no
15462
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15464
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
15465
$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
15470
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
15471
$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
15472
if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
15473
$as_echo_n "(cached) " >&6
15475
if test "$cross_compiling" = yes; then :
15476
gl_cv_func_gettimeofday_clobber=yes
15478
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15479
/* end confdefs.h. */
15480
#include <string.h>
15481
#include <sys/time.h>
15483
#include <stdlib.h>
15491
struct tm saved_lt;
15493
lt = localtime (&t);
15495
gettimeofday (&tv, NULL);
15496
return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
15502
if ac_fn_c_try_run "$LINENO"; then :
15503
gl_cv_func_gettimeofday_clobber=no
15505
gl_cv_func_gettimeofday_clobber=yes
15507
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508
conftest.$ac_objext conftest.beam conftest.$ac_ext
15512
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
15513
$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
15515
if test $gl_cv_func_gettimeofday_clobber = yes; then
15516
REPLACE_GETTIMEOFDAY=1
15517
SYS_TIME_H=sys/time.h
15527
gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
15530
for ac_header in sys/timeb.h
15532
ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
15533
if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
15534
cat >>confdefs.h <<_ACEOF
15535
#define HAVE_SYS_TIMEB_H 1
15542
for ac_func in _ftime
15544
ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
15545
if test "x$ac_cv_func__ftime" = x""yes; then :
15546
cat >>confdefs.h <<_ACEOF
15547
#define HAVE__FTIME 1
15555
$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
15558
$as_echo "#define localtime rpl_localtime" >>confdefs.h
15562
$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
15567
if test $gl_cv_func_gettimeofday_posix_signature != yes; then
15568
REPLACE_GETTIMEOFDAY=1
15569
SYS_TIME_H=sys/time.h
15570
if test $gl_cv_func_gettimeofday_clobber != yes; then
15579
gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
15582
for ac_header in sys/timeb.h
15584
ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
15585
if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
15586
cat >>confdefs.h <<_ACEOF
15587
#define HAVE_SYS_TIMEB_H 1
15594
for ac_func in _ftime
15596
ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
15597
if test "x$ac_cv_func__ftime" = x""yes; then :
15598
cat >>confdefs.h <<_ACEOF
15599
#define HAVE__FTIME 1
15610
if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
15619
# Autoconf 2.61a.99 and earlier don't support linking a file only
15620
# in VPATH builds. But since GNUmakefile is for maintainer use
15621
# only, it does not matter if we skip the link with older autoconf.
15622
# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
15623
# builds, so use a shell variable to bypass this.
15624
GNUmakefile=GNUmakefile
15625
ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
15630
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
15631
$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
15632
if test "${gl_cv_c_inline_effective+set}" = set; then :
15633
$as_echo_n "(cached) " >&6
7616
15635
if test $ac_cv_c_inline = no; then
7617
15636
gl_cv_c_inline_effective=no
7619
cat >conftest.$ac_ext <<_ACEOF
7622
cat confdefs.h >>conftest.$ac_ext
7623
cat >>conftest.$ac_ext <<_ACEOF
15638
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624
15639
/* end confdefs.h. */
7636
rm -f conftest.$ac_objext
7637
if { (ac_try="$ac_compile"
7639
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7640
*) ac_try_echo=$ac_try;;
7642
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7643
(eval "$ac_compile") 2>conftest.er1
7645
grep -v '^ *+' conftest.er1 >conftest.err
7647
cat conftest.err >&5
7648
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649
(exit $ac_status); } && {
7650
test -z "$ac_c_werror_flag" ||
7651
test ! -s conftest.err
7652
} && test -s conftest.$ac_objext; then
15651
if ac_fn_c_try_compile "$LINENO"; then :
7653
15652
gl_cv_c_inline_effective=yes
7655
echo "$as_me: failed program was:" >&5
7656
sed 's/^/| /' conftest.$ac_ext >&5
7658
gl_cv_c_inline_effective=no
15654
gl_cv_c_inline_effective=no
7661
15656
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7665
{ echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5
7666
echo "${ECHO_T}$gl_cv_c_inline_effective" >&6; }
15660
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
15661
$as_echo "$gl_cv_c_inline_effective" >&6; }
7667
15662
if test $gl_cv_c_inline_effective = yes; then
7669
cat >>confdefs.h <<\_ACEOF
7670
#define HAVE_INLINE 1
7685
{ echo "$as_me:$LINENO: checking for struct stat.st_atim.tv_nsec" >&5
7686
echo $ECHO_N "checking for struct stat.st_atim.tv_nsec... $ECHO_C" >&6; }
7687
if test "${ac_cv_member_struct_stat_st_atim_tv_nsec+set}" = set; then
7688
echo $ECHO_N "(cached) $ECHO_C" >&6
7690
cat >conftest.$ac_ext <<_ACEOF
7693
cat confdefs.h >>conftest.$ac_ext
7694
cat >>conftest.$ac_ext <<_ACEOF
7695
/* end confdefs.h. */
7696
#include <sys/types.h>
7697
#include <sys/stat.h>
7702
static struct stat ac_aggr;
7703
if (ac_aggr.st_atim.tv_nsec)
7709
rm -f conftest.$ac_objext
7710
if { (ac_try="$ac_compile"
7712
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7713
*) ac_try_echo=$ac_try;;
7715
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7716
(eval "$ac_compile") 2>conftest.er1
7718
grep -v '^ *+' conftest.er1 >conftest.err
7720
cat conftest.err >&5
7721
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722
(exit $ac_status); } && {
7723
test -z "$ac_c_werror_flag" ||
7724
test ! -s conftest.err
7725
} && test -s conftest.$ac_objext; then
7726
ac_cv_member_struct_stat_st_atim_tv_nsec=yes
7728
echo "$as_me: failed program was:" >&5
7729
sed 's/^/| /' conftest.$ac_ext >&5
7731
cat >conftest.$ac_ext <<_ACEOF
7734
cat confdefs.h >>conftest.$ac_ext
7735
cat >>conftest.$ac_ext <<_ACEOF
7736
/* end confdefs.h. */
7737
#include <sys/types.h>
7738
#include <sys/stat.h>
7743
static struct stat ac_aggr;
7744
if (sizeof ac_aggr.st_atim.tv_nsec)
7750
rm -f conftest.$ac_objext
7751
if { (ac_try="$ac_compile"
7753
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7754
*) ac_try_echo=$ac_try;;
7756
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7757
(eval "$ac_compile") 2>conftest.er1
7759
grep -v '^ *+' conftest.er1 >conftest.err
7761
cat conftest.err >&5
7762
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763
(exit $ac_status); } && {
7764
test -z "$ac_c_werror_flag" ||
7765
test ! -s conftest.err
7766
} && test -s conftest.$ac_objext; then
7767
ac_cv_member_struct_stat_st_atim_tv_nsec=yes
7769
echo "$as_me: failed program was:" >&5
7770
sed 's/^/| /' conftest.$ac_ext >&5
7772
ac_cv_member_struct_stat_st_atim_tv_nsec=no
7775
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7778
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780
{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atim_tv_nsec" >&5
7781
echo "${ECHO_T}$ac_cv_member_struct_stat_st_atim_tv_nsec" >&6; }
7782
if test $ac_cv_member_struct_stat_st_atim_tv_nsec = yes; then
15664
$as_echo "#define HAVE_INLINE 1" >>confdefs.h
15670
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
15671
$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
15672
if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
15673
$as_echo_n "(cached) " >&6
15676
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15677
/* end confdefs.h. */
15681
# define isnand(x) __builtin_isnan ((double)(x))
15684
# define isnand(x) isnan ((double)(x))
15695
if ac_fn_c_try_link "$LINENO"; then :
15696
gl_cv_func_isnand_no_libm=yes
15698
gl_cv_func_isnand_no_libm=no
15700
rm -f core conftest.err conftest.$ac_objext \
15701
conftest$ac_exeext conftest.$ac_ext
15704
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
15705
$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
15707
if test $gl_cv_func_isnand_no_libm = yes; then
15709
$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
15721
gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
15724
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
15725
$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
15726
if test "${gl_cv_cc_double_expbit0+set}" = set; then :
15727
$as_echo_n "(cached) " >&6
15730
if test "$cross_compiling" = yes; then :
15732
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15733
/* end confdefs.h. */
15735
#if defined arm || defined __arm || defined __arm__
15740
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15741
$EGREP "mixed_endianness" >/dev/null 2>&1; then :
15742
gl_cv_cc_double_expbit0="unknown"
15746
if test "${ac_cv_c_bigendian+set}" = set; then :
15747
$as_echo_n "(cached) " >&6
15749
ac_cv_c_bigendian=unknown
15750
# See if we're dealing with a universal compiler.
15751
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15752
/* end confdefs.h. */
15753
#ifndef __APPLE_CC__
15754
not a universal capable compiler
15759
if ac_fn_c_try_compile "$LINENO"; then :
15761
# Check for potential -arch flags. It is not universal unless
15762
# there are at least two -arch flags with different values.
15765
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15766
if test -n "$ac_prev"; then
15768
i?86 | x86_64 | ppc | ppc64)
15769
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15772
ac_cv_c_bigendian=universal
15778
elif test "x$ac_word" = "x-arch"; then
15783
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15784
if test $ac_cv_c_bigendian = unknown; then
15785
# See if sys/param.h defines the BYTE_ORDER macro.
15786
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15787
/* end confdefs.h. */
15788
#include <sys/types.h>
15789
#include <sys/param.h>
15794
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15795
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15797
bogus endian macros
15804
if ac_fn_c_try_compile "$LINENO"; then :
15805
# It does; now see whether it defined to BIG_ENDIAN or not.
15806
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15807
/* end confdefs.h. */
15808
#include <sys/types.h>
15809
#include <sys/param.h>
15814
#if BYTE_ORDER != BIG_ENDIAN
15822
if ac_fn_c_try_compile "$LINENO"; then :
15823
ac_cv_c_bigendian=yes
15825
ac_cv_c_bigendian=no
15827
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15829
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15831
if test $ac_cv_c_bigendian = unknown; then
15832
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15833
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15834
/* end confdefs.h. */
15835
#include <limits.h>
15840
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15841
bogus endian macros
15848
if ac_fn_c_try_compile "$LINENO"; then :
15849
# It does; now see whether it defined to _BIG_ENDIAN or not.
15850
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851
/* end confdefs.h. */
15852
#include <limits.h>
15857
#ifndef _BIG_ENDIAN
15865
if ac_fn_c_try_compile "$LINENO"; then :
15866
ac_cv_c_bigendian=yes
15868
ac_cv_c_bigendian=no
15870
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15872
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15874
if test $ac_cv_c_bigendian = unknown; then
15875
# Compile a test program.
15876
if test "$cross_compiling" = yes; then :
15877
# Try to guess by grepping values from an object file.
15878
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15879
/* end confdefs.h. */
15880
short int ascii_mm[] =
15881
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15882
short int ascii_ii[] =
15883
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15884
int use_ascii (int i) {
15885
return ascii_mm[i] + ascii_ii[i];
15887
short int ebcdic_ii[] =
15888
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15889
short int ebcdic_mm[] =
15890
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15891
int use_ebcdic (int i) {
15892
return ebcdic_mm[i] + ebcdic_ii[i];
15899
return use_ascii (foo) == use_ebcdic (foo);
15904
if ac_fn_c_try_compile "$LINENO"; then :
15905
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15906
ac_cv_c_bigendian=yes
15908
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15909
if test "$ac_cv_c_bigendian" = unknown; then
15910
ac_cv_c_bigendian=no
15912
# finding both strings is unlikely to happen, but who knows?
15913
ac_cv_c_bigendian=unknown
15917
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15919
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920
/* end confdefs.h. */
15921
$ac_includes_default
15926
/* Are we little or big endian? From Harbison&Steele. */
15930
char c[sizeof (long int)];
15933
return u.c[sizeof (long int) - 1] == 1;
15939
if ac_fn_c_try_run "$LINENO"; then :
15940
ac_cv_c_bigendian=no
15942
ac_cv_c_bigendian=yes
15944
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15945
conftest.$ac_objext conftest.beam conftest.$ac_ext
15951
case $ac_cv_c_bigendian in #(
15953
gl_cv_cc_double_expbit0="word 0 bit 20";; #(
15955
gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
15958
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
15962
gl_cv_cc_double_expbit0="unknown" ;;
15971
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972
/* end confdefs.h. */
15975
#include <stddef.h>
15977
#include <string.h>
15979
((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
15980
typedef union { double value; unsigned int word[NWORDS]; } memory_double;
15981
static unsigned int ored_words[NWORDS];
15982
static unsigned int anded_words[NWORDS];
15983
static void add_to_ored_words (double x)
15987
/* Clear it first, in case sizeof (double) < sizeof (memory_double). */
15988
memset (&m, 0, sizeof (memory_double));
15990
for (i = 0; i < NWORDS; i++)
15992
ored_words[i] |= m.word[i];
15993
anded_words[i] &= m.word[i];
15999
FILE *fp = fopen ("conftest.out", "w");
16002
for (j = 0; j < NWORDS; j++)
16003
anded_words[j] = ~ (unsigned int) 0;
16004
add_to_ored_words (0.25);
16005
add_to_ored_words (0.5);
16006
add_to_ored_words (1.0);
16007
add_to_ored_words (2.0);
16008
add_to_ored_words (4.0);
16009
/* Remove bits that are common (e.g. if representation of the first mantissa
16010
bit is explicit). */
16011
for (j = 0; j < NWORDS; j++)
16012
ored_words[j] &= ~anded_words[j];
16013
/* Now find the nonzero word. */
16014
for (j = 0; j < NWORDS; j++)
16015
if (ored_words[j] != 0)
16020
for (i = j + 1; i < NWORDS; i++)
16021
if (ored_words[i] != 0)
16023
fprintf (fp, "unknown");
16024
return (fclose (fp) != 0);
16027
if ((ored_words[j] >> i) & 1)
16029
fprintf (fp, "word %d bit %d", (int) j, (int) i);
16030
return (fclose (fp) != 0);
16033
fprintf (fp, "unknown");
16034
return (fclose (fp) != 0);
16038
if ac_fn_c_try_run "$LINENO"; then :
16039
gl_cv_cc_double_expbit0=`cat conftest.out`
16041
gl_cv_cc_double_expbit0="unknown"
16043
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16044
conftest.$ac_objext conftest.beam conftest.$ac_ext
16050
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16051
$as_echo "$gl_cv_cc_double_expbit0" >&6; }
16052
case "$gl_cv_cc_double_expbit0" in
16054
word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16055
bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16057
cat >>confdefs.h <<_ACEOF
16058
#define DBL_EXPBIT0_WORD $word
16062
cat >>confdefs.h <<_ACEOF
16063
#define DBL_EXPBIT0_BIT $bit
16074
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
16075
$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
16076
if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
16077
$as_echo_n "(cached) " >&6
16080
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081
/* end confdefs.h. */
16085
# define isnanf(x) __builtin_isnanf ((float)(x))
16086
#elif defined isnan
16088
# define isnanf(x) isnan ((float)(x))
16099
if ac_fn_c_try_link "$LINENO"; then :
16100
gl_cv_func_isnanf_no_libm=yes
16102
gl_cv_func_isnanf_no_libm=no
16104
rm -f core conftest.err conftest.$ac_objext \
16105
conftest$ac_exeext conftest.$ac_ext
16108
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
16109
$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
16111
if test $gl_cv_func_isnanf_no_libm = yes; then
16115
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
16116
$as_echo_n "checking whether isnan(float) works... " >&6; }
16117
if test "${gl_cv_func_isnanf_works+set}" = set; then :
16118
$as_echo_n "(cached) " >&6
16121
if test "$cross_compiling" = yes; then :
16123
irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
16124
*) gl_cv_func_isnanf_works="guessing yes";;
16128
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129
/* end confdefs.h. */
16134
# define isnanf(x) __builtin_isnanf ((float)(x))
16135
#elif defined isnan
16137
# define isnanf(x) isnan ((float)(x))
16139
/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
16144
static float zero = 0.0f;
16145
return zero / zero;
16148
# define NaN() (0.0f / 0.0f)
16151
((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16152
typedef union { unsigned int word[NWORDS]; float value; } memory_float;
16157
if (isnanf (1.0f / 0.0f))
16160
if (!isnanf (NaN ()))
16163
#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
16164
/* The isnanf function should be immune against changes in the sign bit and
16165
in the mantissa bits. The xor operation twiddles a bit that can only be
16166
a sign bit or a mantissa bit. */
16167
if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
16170
/* Set the bits below the exponent to 01111...111. */
16171
m.word[0] &= -1U << FLT_EXPBIT0_BIT;
16172
m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
16173
if (!isnanf (m.value))
16181
if ac_fn_c_try_run "$LINENO"; then :
16182
gl_cv_func_isnanf_works=yes
16184
gl_cv_func_isnanf_works=no
16186
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16187
conftest.$ac_objext conftest.beam conftest.$ac_ext
16192
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
16193
$as_echo "$gl_cv_func_isnanf_works" >&6; }
16196
if test $gl_cv_func_isnanf_no_libm = yes \
16197
&& { case "$gl_cv_func_isnanf_works" in
16203
$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
16215
gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
16218
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
16219
$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
16220
if test "${gl_cv_cc_float_expbit0+set}" = set; then :
16221
$as_echo_n "(cached) " >&6
16224
if test "$cross_compiling" = yes; then :
16225
gl_cv_cc_float_expbit0="word 0 bit 23"
16227
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228
/* end confdefs.h. */
16231
#include <stddef.h>
16233
#include <string.h>
16235
((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16236
typedef union { float value; unsigned int word[NWORDS]; } memory_float;
16237
static unsigned int ored_words[NWORDS];
16238
static unsigned int anded_words[NWORDS];
16239
static void add_to_ored_words (float x)
16243
/* Clear it first, in case
16244
sizeof (float) < sizeof (memory_float). */
16245
memset (&m, 0, sizeof (memory_float));
16247
for (i = 0; i < NWORDS; i++)
16249
ored_words[i] |= m.word[i];
16250
anded_words[i] &= m.word[i];
16256
FILE *fp = fopen ("conftest.out", "w");
16259
for (j = 0; j < NWORDS; j++)
16260
anded_words[j] = ~ (unsigned int) 0;
16261
add_to_ored_words (0.25f);
16262
add_to_ored_words (0.5f);
16263
add_to_ored_words (1.0f);
16264
add_to_ored_words (2.0f);
16265
add_to_ored_words (4.0f);
16266
/* Remove bits that are common (e.g. if representation of the first mantissa
16267
bit is explicit). */
16268
for (j = 0; j < NWORDS; j++)
16269
ored_words[j] &= ~anded_words[j];
16270
/* Now find the nonzero word. */
16271
for (j = 0; j < NWORDS; j++)
16272
if (ored_words[j] != 0)
16277
for (i = j + 1; i < NWORDS; i++)
16278
if (ored_words[i] != 0)
16280
fprintf (fp, "unknown");
16281
return (fclose (fp) != 0);
16284
if ((ored_words[j] >> i) & 1)
16286
fprintf (fp, "word %d bit %d", (int) j, (int) i);
16287
return (fclose (fp) != 0);
16290
fprintf (fp, "unknown");
16291
return (fclose (fp) != 0);
16295
if ac_fn_c_try_run "$LINENO"; then :
16296
gl_cv_cc_float_expbit0=`cat conftest.out`
16298
gl_cv_cc_float_expbit0="unknown"
16300
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16301
conftest.$ac_objext conftest.beam conftest.$ac_ext
16307
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
16308
$as_echo "$gl_cv_cc_float_expbit0" >&6; }
16309
case "$gl_cv_cc_float_expbit0" in
16311
word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16312
bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
16314
cat >>confdefs.h <<_ACEOF
16315
#define FLT_EXPBIT0_WORD $word
16319
cat >>confdefs.h <<_ACEOF
16320
#define FLT_EXPBIT0_BIT $bit
16331
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
16332
$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
16333
if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
16334
$as_echo_n "(cached) " >&6
16337
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338
/* end confdefs.h. */
16342
# define isnanl(x) __builtin_isnanl ((long double)(x))
16343
#elif defined isnan
16345
# define isnanl(x) isnan ((long double)(x))
16356
if ac_fn_c_try_link "$LINENO"; then :
16357
gl_cv_func_isnanl_no_libm=yes
16359
gl_cv_func_isnanl_no_libm=no
16361
rm -f core conftest.err conftest.$ac_objext \
16362
conftest$ac_exeext conftest.$ac_ext
16365
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
16366
$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
16368
gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
16369
if test $gl_func_isnanl_no_libm = yes; then
16373
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
16374
$as_echo_n "checking whether isnanl works... " >&6; }
16375
if test "${gl_cv_func_isnanl_works+set}" = set; then :
16376
$as_echo_n "(cached) " >&6
16379
if test "$cross_compiling" = yes; then :
16380
case "$host_cpu" in
16381
# Guess no on ia64, x86_64, i386.
16382
ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
16385
netbsd*) gl_cv_func_isnanl_works="guessing no";;
16386
*) gl_cv_func_isnanl_works="guessing yes";;
16392
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393
/* end confdefs.h. */
16396
#include <limits.h>
16400
# define isnanl(x) __builtin_isnanl ((long double)(x))
16401
#elif defined isnan
16403
# define isnanl(x) isnan ((long double)(x))
16406
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16407
typedef union { unsigned int word[NWORDS]; long double value; }
16408
memory_long_double;
16409
/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
16410
runtime type conversion. */
16412
static long double NaNl ()
16415
return zero / zero;
16418
# define NaNl() (0.0L / 0.0L)
16422
memory_long_double m;
16425
if (!isnanl (NaNl ()))
16428
/* The isnanl function should be immune against changes in the sign bit and
16429
in the mantissa bits. The xor operation twiddles a bit that can only be
16430
a sign bit or a mantissa bit (since the exponent never extends to
16433
m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
16434
for (i = 0; i < NWORDS; i++)
16436
if (!isnanl (m.value))
16439
#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
16440
/* Representation of an 80-bit 'long double' as an initializer for a sequence
16441
of 'unsigned int' words. */
16442
# ifdef WORDS_BIGENDIAN
16443
# define LDBL80_WORDS(exponent,manthi,mantlo) \
16444
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
16445
((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
16446
(unsigned int) (mantlo) << 16 \
16449
# define LDBL80_WORDS(exponent,manthi,mantlo) \
16450
{ mantlo, manthi, exponent }
16453
static memory_long_double x =
16454
{ LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
16455
if (!isnanl (x.value))
16459
/* Signalling NaN. */
16460
static memory_long_double x =
16461
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
16462
if (!isnanl (x.value))
16465
/* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
16466
Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
16467
Intel IA-64 Architecture Software Developer's Manual, Volume 1:
16468
Application Architecture.
16469
Table 5-2 "Floating-Point Register Encodings"
16470
Figure 5-6 "Memory to Floating-Point Register Data Translation"
16472
{ /* Pseudo-NaN. */
16473
static memory_long_double x =
16474
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
16475
if (!isnanl (x.value))
16478
{ /* Pseudo-Infinity. */
16479
static memory_long_double x =
16480
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
16481
if (!isnanl (x.value))
16484
{ /* Pseudo-Zero. */
16485
static memory_long_double x =
16486
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
16487
if (!isnanl (x.value))
16490
{ /* Unnormalized number. */
16491
static memory_long_double x =
16492
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
16493
if (!isnanl (x.value))
16496
{ /* Pseudo-Denormal. */
16497
static memory_long_double x =
16498
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
16499
if (!isnanl (x.value))
16507
if ac_fn_c_try_run "$LINENO"; then :
16508
gl_cv_func_isnanl_works=yes
16510
gl_cv_func_isnanl_works=no
16512
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16513
conftest.$ac_objext conftest.beam conftest.$ac_ext
16518
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
16519
$as_echo "$gl_cv_func_isnanl_works" >&6; }
16521
case "$gl_cv_func_isnanl_works" in
16523
*) gl_func_isnanl_no_libm=no ;;
16526
if test $gl_func_isnanl_no_libm = yes; then
16528
$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
16540
gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
16544
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
16545
$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
16546
if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
16547
$as_echo_n "(cached) " >&6
16550
if test "$cross_compiling" = yes; then :
16552
gl_cv_cc_long_double_expbit0="unknown"
16555
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556
/* end confdefs.h. */
16559
#include <stddef.h>
16561
#include <string.h>
16563
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16564
typedef union { long double value; unsigned int word[NWORDS]; }
16565
memory_long_double;
16566
static unsigned int ored_words[NWORDS];
16567
static unsigned int anded_words[NWORDS];
16568
static void add_to_ored_words (long double x)
16570
memory_long_double m;
16572
/* Clear it first, in case
16573
sizeof (long double) < sizeof (memory_long_double). */
16574
memset (&m, 0, sizeof (memory_long_double));
16576
for (i = 0; i < NWORDS; i++)
16578
ored_words[i] |= m.word[i];
16579
anded_words[i] &= m.word[i];
16585
FILE *fp = fopen ("conftest.out", "w");
16588
for (j = 0; j < NWORDS; j++)
16589
anded_words[j] = ~ (unsigned int) 0;
16590
add_to_ored_words (0.25L);
16591
add_to_ored_words (0.5L);
16592
add_to_ored_words (1.0L);
16593
add_to_ored_words (2.0L);
16594
add_to_ored_words (4.0L);
16595
/* Remove bits that are common (e.g. if representation of the first mantissa
16596
bit is explicit). */
16597
for (j = 0; j < NWORDS; j++)
16598
ored_words[j] &= ~anded_words[j];
16599
/* Now find the nonzero word. */
16600
for (j = 0; j < NWORDS; j++)
16601
if (ored_words[j] != 0)
16606
for (i = j + 1; i < NWORDS; i++)
16607
if (ored_words[i] != 0)
16609
fprintf (fp, "unknown");
16610
return (fclose (fp) != 0);
16613
if ((ored_words[j] >> i) & 1)
16615
fprintf (fp, "word %d bit %d", (int) j, (int) i);
16616
return (fclose (fp) != 0);
16619
fprintf (fp, "unknown");
16620
return (fclose (fp) != 0);
16624
if ac_fn_c_try_run "$LINENO"; then :
16625
gl_cv_cc_long_double_expbit0=`cat conftest.out`
16627
gl_cv_cc_long_double_expbit0="unknown"
16629
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16630
conftest.$ac_objext conftest.beam conftest.$ac_ext
16636
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
16637
$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
16638
case "$gl_cv_cc_long_double_expbit0" in
16640
word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16641
bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
16643
cat >>confdefs.h <<_ACEOF
16644
#define LDBL_EXPBIT0_WORD $word
16648
cat >>confdefs.h <<_ACEOF
16649
#define LDBL_EXPBIT0_BIT $bit
16670
for ac_func in lchown
16672
ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
16673
if test "x$ac_cv_func_lchown" = x""yes; then :
16674
cat >>confdefs.h <<_ACEOF
16675
#define HAVE_LCHOWN 1
16680
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
16686
if test $ac_cv_func_lchown = no; then
16688
elif test "$gl_cv_func_chown_slash_works" != yes \
16689
|| test "$gl_cv_func_chown_ctime_works" != yes; then
16698
gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
16715
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
16720
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
16721
$as_echo_n "checking whether lseek detects pipes... " >&6; }
16722
if test "${gl_cv_func_lseek_pipe+set}" = set; then :
16723
$as_echo_n "(cached) " >&6
16725
if test $cross_compiling = no; then
16726
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16727
/* end confdefs.h. */
16729
#include <sys/types.h> /* for off_t */
16730
#include <stdio.h> /* for SEEK_CUR */
16731
#include <unistd.h>
16734
/* Exit with success only if stdin is seekable. */
16735
return lseek (0, (off_t)0, SEEK_CUR) < 0;
16738
if ac_fn_c_try_link "$LINENO"; then :
16739
if test -s conftest$ac_exeext \
16740
&& ./conftest$ac_exeext < conftest.$ac_ext \
16741
&& { echo hi | ./conftest$ac_exeext; test $? = 1; }; then
16742
gl_cv_func_lseek_pipe=yes
16744
gl_cv_func_lseek_pipe=no
16747
gl_cv_func_lseek_pipe=no
16749
rm -f core conftest.err conftest.$ac_objext \
16750
conftest$ac_exeext conftest.$ac_ext
16752
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16753
/* end confdefs.h. */
16755
#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
16756
/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
16760
if ac_fn_c_try_compile "$LINENO"; then :
16761
gl_cv_func_lseek_pipe=yes
16763
gl_cv_func_lseek_pipe=no
16765
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16768
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
16769
$as_echo "$gl_cv_func_lseek_pipe" >&6; }
16770
if test $gl_cv_func_lseek_pipe = no; then
16780
gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
16785
$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
16797
if test $ac_cv_func_lstat = yes; then
16799
if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
16802
# Prerequisites of lib/lstat.c.
16812
for ac_header in stdlib.h
16814
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
16815
if test "x$ac_cv_header_stdlib_h" = x""yes; then :
16816
cat >>confdefs.h <<_ACEOF
16817
#define HAVE_STDLIB_H 1
16824
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16825
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16826
if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
16827
$as_echo_n "(cached) " >&6
16829
if test "$cross_compiling" = yes; then :
16830
ac_cv_func_malloc_0_nonnull=no
16832
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16833
/* end confdefs.h. */
16834
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
16835
# include <stdlib.h>
16843
return ! malloc (0);
16848
if ac_fn_c_try_run "$LINENO"; then :
16849
ac_cv_func_malloc_0_nonnull=yes
16851
ac_cv_func_malloc_0_nonnull=no
16853
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16854
conftest.$ac_objext conftest.beam conftest.$ac_ext
16858
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
16859
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
16860
if test $ac_cv_func_malloc_0_nonnull = yes; then :
16862
$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16865
$as_echo "#define HAVE_MALLOC 0" >>confdefs.h
16875
gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
16878
$as_echo "#define malloc rpl_malloc" >>confdefs.h
16884
$as_echo "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
16888
if test $gl_cv_func_malloc_posix = yes; then
16889
HAVE_MALLOC_POSIX=1
16891
$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
16902
gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
16904
HAVE_MALLOC_POSIX=0
16910
GNULIB_MALLOC_POSIX=1
16920
if test $gl_cv_have_include_next = yes; then
16921
gl_cv_next_math_h='<'math.h'>'
16923
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
16924
$as_echo_n "checking absolute name of <math.h>... " >&6; }
16925
if test "${gl_cv_next_math_h+set}" = set; then :
16926
$as_echo_n "(cached) " >&6
16929
if test $ac_cv_header_math_h = yes; then
16930
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16931
/* end confdefs.h. */
16936
aix*) gl_absname_cpp="$ac_cpp -C" ;;
16937
*) gl_absname_cpp="$ac_cpp" ;;
16939
gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16940
sed -n '\#/math.h#{
16941
s#.*"\(.*/math.h\)".*#\1#
16947
gl_cv_next_math_h='<'math.h'>'
16951
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
16952
$as_echo "$gl_cv_next_math_h" >&6; }
16954
NEXT_MATH_H=$gl_cv_next_math_h
16956
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16957
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16958
gl_next_as_first_directive='<'math.h'>'
16960
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16961
gl_next_as_first_directive=$gl_cv_next_math_h
16963
NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
16969
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
16970
$as_echo_n "checking whether NAN macro works... " >&6; }
16971
if test "${gl_cv_header_math_nan_works+set}" = set; then :
16972
$as_echo_n "(cached) " >&6
16974
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16975
/* end confdefs.h. */
16980
/* Solaris 10 has a broken definition of NAN. Other platforms
16981
fail to provide NAN, or provide it only in C99 mode; this
16982
test only needs to fail when NAN is provided but wrong. */
16992
if ac_fn_c_try_compile "$LINENO"; then :
16993
gl_cv_header_math_nan_works=yes
16995
gl_cv_header_math_nan_works=no
16997
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16999
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
17000
$as_echo "$gl_cv_header_math_nan_works" >&6; }
17001
if test $gl_cv_header_math_nan_works = no; then
17004
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
17005
$as_echo_n "checking whether HUGE_VAL works... " >&6; }
17006
if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
17007
$as_echo_n "(cached) " >&6
17009
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17010
/* end confdefs.h. */
17015
/* Solaris 10 has a broken definition of HUGE_VAL. */
17016
double d = HUGE_VAL;
17022
if ac_fn_c_try_compile "$LINENO"; then :
17023
gl_cv_header_math_huge_val_works=yes
17025
gl_cv_header_math_huge_val_works=no
17027
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17029
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
17030
$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
17031
if test $gl_cv_header_math_huge_val_works = no; then
17045
if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
17049
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
17050
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
17051
if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
17052
$as_echo_n "(cached) " >&6
17056
# Guess no on AIX and OSF/1.
17057
osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
17058
# Guess yes otherwise.
17059
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
17061
if test $LOCALE_JA != none; then
17062
if test "$cross_compiling" = yes; then :
17065
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17066
/* end confdefs.h. */
17068
#include <locale.h>
17069
#include <string.h>
17073
if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
17075
const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
17079
memset (&state, '\0', sizeof (mbstate_t));
17080
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17081
if (mbsinit (&state))
17087
if ac_fn_c_try_run "$LINENO"; then :
17088
gl_cv_func_mbrtowc_incomplete_state=yes
17090
gl_cv_func_mbrtowc_incomplete_state=no
17092
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17093
conftest.$ac_objext conftest.beam conftest.$ac_ext
17099
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
17100
$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
17105
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
17106
$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
17107
if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
17108
$as_echo_n "(cached) " >&6
17112
# Guess no on Solaris 8.
17113
solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
17114
# Guess yes otherwise.
17115
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
17117
if test $LOCALE_ZH_CN != none; then
17118
if test "$cross_compiling" = yes; then :
17121
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17122
/* end confdefs.h. */
17124
#include <locale.h>
17125
#include <stdlib.h>
17126
#include <string.h>
17130
/* This fails on Solaris 8:
17131
mbrtowc returns 2, and sets wc to 0x00F0.
17132
mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
17133
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
17135
char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
17139
memset (&state, '\0', sizeof (mbstate_t));
17140
if (mbrtowc (&wc, input + 3, 6, &state) != 4
17141
&& mbtowc (&wc, input + 3, 6) == 4)
17147
if ac_fn_c_try_run "$LINENO"; then :
17148
gl_cv_func_mbrtowc_sanitycheck=yes
17150
gl_cv_func_mbrtowc_sanitycheck=no
17152
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17153
conftest.$ac_objext conftest.beam conftest.$ac_ext
17159
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
17160
$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
17162
REPLACE_MBSTATE_T=0
17163
case "$gl_cv_func_mbrtowc_incomplete_state" in
17165
*) REPLACE_MBSTATE_T=1 ;;
17167
case "$gl_cv_func_mbrtowc_sanitycheck" in
17169
*) REPLACE_MBSTATE_T=1 ;;
17172
REPLACE_MBSTATE_T=1
17174
if test $REPLACE_MBSTATE_T = 1; then
17180
if test $REPLACE_MBSTATE_T = 1; then
17184
if test $ac_cv_func_mbrtowc = no; then
17187
if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
17191
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
17192
$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
17193
if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
17194
$as_echo_n "(cached) " >&6
17198
# Guess no on OSF/1.
17199
osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
17200
# Guess yes otherwise.
17201
*) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
17203
if test $LOCALE_FR_UTF8 != none; then
17204
if test "$cross_compiling" = yes; then :
17207
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208
/* end confdefs.h. */
17210
#include <locale.h>
17211
#include <string.h>
17215
if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
17221
memset (&state, '\0', sizeof (mbstate_t));
17222
wc = (wchar_t) 0xBADFACE;
17223
mbrtowc (&wc, NULL, 5, &state);
17224
/* Check that wc was not modified. */
17225
if (wc != (wchar_t) 0xBADFACE)
17231
if ac_fn_c_try_run "$LINENO"; then :
17232
gl_cv_func_mbrtowc_null_arg=yes
17234
gl_cv_func_mbrtowc_null_arg=no
17236
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17237
conftest.$ac_objext conftest.beam conftest.$ac_ext
17243
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
17244
$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
17250
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
17251
$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
17252
if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
17253
$as_echo_n "(cached) " >&6
17257
# Guess no on HP-UX and Solaris.
17258
hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
17259
# Guess yes otherwise.
17260
*) gl_cv_func_mbrtowc_retval="guessing yes" ;;
17262
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
17263
if test "$cross_compiling" = yes; then :
17266
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17267
/* end confdefs.h. */
17269
#include <locale.h>
17270
#include <string.h>
17274
/* This fails on Solaris. */
17275
if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
17277
char input[] = "B\303\274\303\237er"; /* "Büßer" */
17281
memset (&state, '\0', sizeof (mbstate_t));
17282
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17285
if (mbrtowc (&wc, input + 2, 5, &state) != 1)
17289
/* This fails on HP-UX 11.11. */
17290
if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
17292
char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
17296
memset (&state, '\0', sizeof (mbstate_t));
17297
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17300
if (mbrtowc (&wc, input + 2, 5, &state) != 2)
17307
if ac_fn_c_try_run "$LINENO"; then :
17308
gl_cv_func_mbrtowc_retval=yes
17310
gl_cv_func_mbrtowc_retval=no
17312
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17313
conftest.$ac_objext conftest.beam conftest.$ac_ext
17319
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
17320
$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
17325
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
17326
$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
17327
if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
17328
$as_echo_n "(cached) " >&6
17332
# Guess no on Solaris 8 and 9.
17333
solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
17334
# Guess yes otherwise.
17335
*) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
17337
if test $LOCALE_ZH_CN != none; then
17338
if test "$cross_compiling" = yes; then :
17341
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17342
/* end confdefs.h. */
17344
#include <locale.h>
17345
#include <string.h>
17349
/* This fails on Solaris 8 and 9. */
17350
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
17355
memset (&state, '\0', sizeof (mbstate_t));
17356
if (mbrtowc (&wc, "", 1, &state) != 0)
17362
if ac_fn_c_try_run "$LINENO"; then :
17363
gl_cv_func_mbrtowc_nul_retval=yes
17365
gl_cv_func_mbrtowc_nul_retval=no
17367
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17368
conftest.$ac_objext conftest.beam conftest.$ac_ext
17374
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
17375
$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
17377
case "$gl_cv_func_mbrtowc_null_arg" in
17380
$as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
17385
case "$gl_cv_func_mbrtowc_retval" in
17388
$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
17393
case "$gl_cv_func_mbrtowc_nul_retval" in
17396
$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
17402
if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
17414
gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
17435
if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
17439
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
17440
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
17441
if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
17442
$as_echo_n "(cached) " >&6
17446
# Guess no on AIX and OSF/1.
17447
osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
17448
# Guess yes otherwise.
17449
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
17451
if test $LOCALE_JA != none; then
17452
if test "$cross_compiling" = yes; then :
17455
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17456
/* end confdefs.h. */
17458
#include <locale.h>
17459
#include <string.h>
17463
if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
17465
const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
17469
memset (&state, '\0', sizeof (mbstate_t));
17470
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17471
if (mbsinit (&state))
17477
if ac_fn_c_try_run "$LINENO"; then :
17478
gl_cv_func_mbrtowc_incomplete_state=yes
17480
gl_cv_func_mbrtowc_incomplete_state=no
17482
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17483
conftest.$ac_objext conftest.beam conftest.$ac_ext
17489
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
17490
$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
17495
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
17496
$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
17497
if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
17498
$as_echo_n "(cached) " >&6
17502
# Guess no on Solaris 8.
17503
solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
17504
# Guess yes otherwise.
17505
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
17507
if test $LOCALE_ZH_CN != none; then
17508
if test "$cross_compiling" = yes; then :
17511
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512
/* end confdefs.h. */
17514
#include <locale.h>
17515
#include <stdlib.h>
17516
#include <string.h>
17520
/* This fails on Solaris 8:
17521
mbrtowc returns 2, and sets wc to 0x00F0.
17522
mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
17523
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
17525
char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
17529
memset (&state, '\0', sizeof (mbstate_t));
17530
if (mbrtowc (&wc, input + 3, 6, &state) != 4
17531
&& mbtowc (&wc, input + 3, 6) == 4)
17537
if ac_fn_c_try_run "$LINENO"; then :
17538
gl_cv_func_mbrtowc_sanitycheck=yes
17540
gl_cv_func_mbrtowc_sanitycheck=no
17542
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17543
conftest.$ac_objext conftest.beam conftest.$ac_ext
17549
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
17550
$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
17552
REPLACE_MBSTATE_T=0
17553
case "$gl_cv_func_mbrtowc_incomplete_state" in
17555
*) REPLACE_MBSTATE_T=1 ;;
17557
case "$gl_cv_func_mbrtowc_sanitycheck" in
17559
*) REPLACE_MBSTATE_T=1 ;;
17562
REPLACE_MBSTATE_T=1
17564
if test $REPLACE_MBSTATE_T = 1; then
17570
if test $REPLACE_MBSTATE_T = 1; then
17574
if test $ac_cv_func_mbsinit = no; then
17577
if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
17589
gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
17619
for ac_func in mempcpy
17621
ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
17622
if test "x$ac_cv_func_mempcpy" = x""yes; then :
17623
cat >>confdefs.h <<_ACEOF
17624
#define HAVE_MEMPCPY 1
17629
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
17635
if test $ac_cv_func_mempcpy = no; then
17651
if test $ac_cv_have_decl_memrchr = no; then
17652
HAVE_DECL_MEMRCHR=0
17663
for ac_func in memrchr
17665
ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
17666
if test "x$ac_cv_func_memrchr" = x""yes; then :
17667
cat >>confdefs.h <<_ACEOF
17668
#define HAVE_MEMRCHR 1
17673
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
17679
if test $ac_cv_func_memrchr = no; then
17689
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
17690
$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
17691
if test "${gl_cv_func_mkdir_trailing_slash_works+set}" = set; then :
17692
$as_echo_n "(cached) " >&6
17694
rm -rf conftest.dir
17695
if test "$cross_compiling" = yes; then :
17696
gl_cv_func_mkdir_trailing_slash_works="guessing no"
17698
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17699
/* end confdefs.h. */
17701
# include <sys/types.h>
17702
# include <sys/stat.h>
17707
return mkdir ("conftest.dir/", 0700);
17712
if ac_fn_c_try_run "$LINENO"; then :
17713
gl_cv_func_mkdir_trailing_slash_works=yes
17715
gl_cv_func_mkdir_trailing_slash_works=no
17717
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17718
conftest.$ac_objext conftest.beam conftest.$ac_ext
17721
rm -rf conftest.dir
17725
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
17726
$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
17727
if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
17737
gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
17741
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
17742
$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
17743
if test "${gl_cv_func_mkdir_trailing_dot_works+set}" = set; then :
17744
$as_echo_n "(cached) " >&6
17746
rm -rf conftest.dir
17747
if test "$cross_compiling" = yes; then :
17748
gl_cv_func_mkdir_trailing_dot_works="guessing no"
17750
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17751
/* end confdefs.h. */
17753
# include <sys/types.h>
17754
# include <sys/stat.h>
17759
return !mkdir ("conftest.dir/./", 0700);
17764
if ac_fn_c_try_run "$LINENO"; then :
17765
gl_cv_func_mkdir_trailing_dot_works=yes
17767
gl_cv_func_mkdir_trailing_dot_works=no
17769
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17770
conftest.$ac_objext conftest.beam conftest.$ac_ext
17773
rm -rf conftest.dir
17777
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
17778
$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
17779
if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
17789
gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
17792
$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
17812
gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
17823
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
17824
$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
17825
if test "${gl_cv_func_open_slash+set}" = set; then :
17826
$as_echo_n "(cached) " >&6
17828
# Assume that if we have lstat, we can also check symlinks.
17829
if test $ac_cv_func_lstat = yes; then
17831
ln -s conftest.tmp conftest.lnk
17833
if test "$cross_compiling" = yes; then :
17836
freebsd*) gl_cv_func_open_slash="guessing no" ;;
17837
solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
17838
hpux*) gl_cv_func_open_slash="guessing no" ;;
17839
*) gl_cv_func_open_slash="guessing yes" ;;
17843
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17844
/* end confdefs.h. */
17848
# include <unistd.h>
17853
if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
17855
return open ("conftest.sl/", O_CREAT, 0600) >= 0;
17858
if ac_fn_c_try_run "$LINENO"; then :
17859
gl_cv_func_open_slash=yes
17861
gl_cv_func_open_slash=no
17863
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17864
conftest.$ac_objext conftest.beam conftest.$ac_ext
17867
rm -f conftest.sl conftest.tmp conftest.lnk
17870
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
17871
$as_echo "$gl_cv_func_open_slash" >&6; }
17872
case "$gl_cv_func_open_slash" in
17875
$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
17888
gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
17903
$as_echo "#define GNULIB_OPEN 1" >>confdefs.h
17931
gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17971
for ac_func in fchmodat fstatat mkdirat openat unlinkat
17973
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17974
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17975
eval as_val=\$$as_ac_var
17976
if test "x$as_val" = x""yes; then :
17977
cat >>confdefs.h <<_ACEOF
17978
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17983
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
17991
case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
17993
# GNU/Hurd has unlinkat, but it has the same bug as unlink.
17994
if test $REPLACE_UNLINK = 1; then
18003
gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
18008
# Solaris 9 has *at functions, but uniformly mishandles trailing
18009
# slash in all of them.
18018
gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
18029
gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
18040
gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
18046
HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
18047
HAVE_FSTATAT=0 # No known system with fstatat but not openat
18054
if test $ac_cv_func_fchmodat != yes; then
18057
if test $ac_cv_func_mkdirat != yes; then
18062
ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18063
if test "x$ac_cv_func_fchownat" = x""yes; then :
18065
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18066
$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18067
if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
18068
$as_echo_n "(cached) " >&6
18071
gl_dangle=conftest.dangle
18072
# Remove any remnants of a previous test.
18074
# Arrange for deletion of the temporary file this test creates.
18075
ac_clean_files="$ac_clean_files $gl_dangle"
18076
ln -s conftest.no-such $gl_dangle
18077
if test "$cross_compiling" = yes; then :
18078
gl_cv_func_fchownat_nofollow_works=no
18080
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081
/* end confdefs.h. */
18084
#include <unistd.h>
18085
#include <stdlib.h>
18087
#include <sys/types.h>
18091
return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18092
AT_SYMLINK_NOFOLLOW) != 0
18093
&& errno == ENOENT);
18097
if ac_fn_c_try_run "$LINENO"; then :
18098
gl_cv_func_fchownat_nofollow_works=yes
18100
gl_cv_func_fchownat_nofollow_works=no
18102
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18103
conftest.$ac_objext conftest.beam conftest.$ac_ext
18108
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18109
$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18110
if test $gl_cv_func_fchownat_nofollow_works = no; then :
18113
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18121
if test $REPLACE_CHOWN = 1; then
18124
if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18133
gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18141
if test -n "$ERRNO_H"; then
18151
gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
18160
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp can be used without linking with libm" >&5
18161
$as_echo_n "checking whether frexp can be used without linking with libm... " >&6; }
18162
if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
18163
$as_echo_n "(cached) " >&6
18166
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18167
/* end confdefs.h. */
18174
return frexp (x, &y) < 1;
18179
if ac_fn_c_try_link "$LINENO"; then :
18180
gl_cv_func_frexp_no_libm=yes
18182
gl_cv_func_frexp_no_libm=no
18184
rm -f core conftest.err conftest.$ac_objext \
18185
conftest$ac_exeext conftest.$ac_ext
18188
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
18189
$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
18190
if test $gl_cv_func_frexp_no_libm = yes; then
18193
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18194
$as_echo_n "checking whether frexp works... " >&6; }
18195
if test "${gl_cv_func_frexp_works+set}" = set; then :
18196
$as_echo_n "(cached) " >&6
18199
if test "$cross_compiling" = yes; then :
18201
netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18202
*) gl_cv_func_frexp_works="guessing yes";;
18206
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18207
/* end confdefs.h. */
18211
#include <string.h>
18216
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18217
So we use -zero instead. */
18219
/* Test on denormalized numbers. */
18220
for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18225
double y = frexp (x, &exp);
18226
/* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18227
On NetBSD: y = 0.75. Correct: y = 0.5. */
18231
/* Test on infinite numbers. */
18235
double y = frexp (x, &exp);
18239
/* Test on negative zero. */
18243
double y = frexp (x, &exp);
18244
if (memcmp (&y, &x, sizeof x))
18250
if ac_fn_c_try_run "$LINENO"; then :
18251
gl_cv_func_frexp_works=yes
18253
gl_cv_func_frexp_works=no
18255
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18256
conftest.$ac_objext conftest.beam conftest.$ac_ext
18261
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18262
$as_echo "$gl_cv_func_frexp_works" >&6; }
18264
case "$gl_cv_func_frexp_works" in
18267
$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
18273
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
18274
$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
18275
if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
18276
$as_echo_n "(cached) " >&6
18279
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18280
/* end confdefs.h. */
18287
return ldexp (x, y) < 1;
18292
if ac_fn_c_try_link "$LINENO"; then :
18293
gl_cv_func_ldexp_no_libm=yes
18295
gl_cv_func_ldexp_no_libm=no
18297
rm -f core conftest.err conftest.$ac_objext \
18298
conftest$ac_exeext conftest.$ac_ext
18301
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
18302
$as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
18303
if test $gl_cv_func_ldexp_no_libm = yes; then
18305
$as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
18311
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl can be used without linking with libm" >&5
18312
$as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; }
18313
if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
18314
$as_echo_n "(cached) " >&6
18317
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318
/* end confdefs.h. */
18325
return frexpl (x, &y) < 1;
18330
if ac_fn_c_try_link "$LINENO"; then :
18331
gl_cv_func_frexpl_no_libm=yes
18333
gl_cv_func_frexpl_no_libm=no
18335
rm -f core conftest.err conftest.$ac_objext \
18336
conftest$ac_exeext conftest.$ac_ext
18339
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18340
$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18341
if test $gl_cv_func_frexpl_no_libm = yes; then
18344
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
18345
$as_echo_n "checking whether frexpl works... " >&6; }
18346
if test "${gl_cv_func_frexpl_works+set}" = set; then :
18347
$as_echo_n "(cached) " >&6
18350
if test "$cross_compiling" = yes; then :
18352
aix* | beos* | darwin* | irix* | mingw* | pw*)
18353
gl_cv_func_frexpl_works="guessing no";;
18354
*) gl_cv_func_frexpl_works="guessing yes";;
18358
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18359
/* end confdefs.h. */
18363
/* Override the values of <float.h>, like done in float.in.h. */
18364
#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
18365
# undef LDBL_MIN_EXP
18366
# define LDBL_MIN_EXP (-16381)
18368
extern long double frexpl (long double, int *);
18371
volatile long double x;
18372
/* Test on finite numbers that fails on AIX 5.1. */
18380
/* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
18381
function returns an invalid (incorrectly normalized) value: it returns
18382
y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
18383
but the correct result is
18384
0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
18388
long double y = frexpl (x, &exp);
18389
if (!(exp == 1 && y == 0.505L))
18392
/* Test on large finite numbers. This fails on BeOS at i = 16322, while
18393
LDBL_MAX_EXP = 16384.
18394
In the loop end test, we test x against Infinity, rather than comparing
18395
i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
18398
for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
18406
/* Test on denormalized numbers. */
18409
for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
18414
long double y = frexpl (x, &exp);
18415
/* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
18416
exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
18417
if (exp != LDBL_MIN_EXP - 1)
18421
/* Test on infinite numbers. */
18425
long double y = frexpl (x, &exp);
18432
if ac_fn_c_try_run "$LINENO"; then :
18433
gl_cv_func_frexpl_works=yes
18435
gl_cv_func_frexpl_works=no
18437
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18438
conftest.$ac_objext conftest.beam conftest.$ac_ext
18443
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
18444
$as_echo "$gl_cv_func_frexpl_works" >&6; }
18446
case "$gl_cv_func_frexpl_works" in
18447
*yes) gl_func_frexpl_no_libm=yes ;;
18448
*) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
18451
gl_func_frexpl_no_libm=no
18454
if test $gl_func_frexpl_no_libm = yes; then
18456
$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
18458
ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18460
if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
18468
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl can be used without linking with libm" >&5
18469
$as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; }
18470
if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
18471
$as_echo_n "(cached) " >&6
18474
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18475
/* end confdefs.h. */
18482
return ldexpl (x, y) < 1;
18487
if ac_fn_c_try_link "$LINENO"; then :
18488
gl_cv_func_ldexpl_no_libm=yes
18490
gl_cv_func_ldexpl_no_libm=no
18492
rm -f core conftest.err conftest.$ac_objext \
18493
conftest$ac_exeext conftest.$ac_ext
18496
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
18497
$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
18498
if test $gl_cv_func_ldexpl_no_libm = yes; then
18501
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
18502
$as_echo_n "checking whether ldexpl works... " >&6; }
18503
if test "${gl_cv_func_ldexpl_works+set}" = set; then :
18504
$as_echo_n "(cached) " >&6
18507
if test "$cross_compiling" = yes; then :
18509
aix*) gl_cv_func_ldexpl_works="guessing no";;
18510
*) gl_cv_func_ldexpl_works="guessing yes";;
18514
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18515
/* end confdefs.h. */
18518
extern long double ldexpl (long double, int);
18521
volatile long double x1 = 1.0;
18522
volatile long double y1 = ldexpl (x1, -1);
18523
volatile long double x2 = 1.73205L;
18524
volatile long double y2 = ldexpl (x2, 0);
18525
return (y1 != 0.5L) || (y2 != x2);
18528
if ac_fn_c_try_run "$LINENO"; then :
18529
gl_cv_func_ldexpl_works=yes
18531
gl_cv_func_ldexpl_works=no
18533
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18534
conftest.$ac_objext conftest.beam conftest.$ac_ext
18539
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
18540
$as_echo "$gl_cv_func_ldexpl_works" >&6; }
18542
case "$gl_cv_func_ldexpl_works" in
18545
$as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
18547
ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
18549
if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
18561
if test $gl_cv_func_vfprintf_posix = no; then
18572
gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
18576
$as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
18584
GNULIB_PRINTF_POSIX=1
18596
gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext"
18599
for ac_header in stdlib.h
18601
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
18602
if test "x$ac_cv_header_stdlib_h" = x""yes; then :
18603
cat >>confdefs.h <<_ACEOF
18604
#define HAVE_STDLIB_H 1
18611
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
18612
$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
18613
if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
18614
$as_echo_n "(cached) " >&6
18616
if test "$cross_compiling" = yes; then :
18617
ac_cv_func_realloc_0_nonnull=no
18619
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18620
/* end confdefs.h. */
18621
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
18622
# include <stdlib.h>
18630
return ! realloc (0, 0);
18635
if ac_fn_c_try_run "$LINENO"; then :
18636
ac_cv_func_realloc_0_nonnull=yes
18638
ac_cv_func_realloc_0_nonnull=no
18640
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18641
conftest.$ac_objext conftest.beam conftest.$ac_ext
18645
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
18646
$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
18647
if test $ac_cv_func_realloc_0_nonnull = yes; then :
18649
$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
18652
$as_echo "#define HAVE_REALLOC 0" >>confdefs.h
18662
gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
18665
$as_echo "#define realloc rpl_realloc" >>confdefs.h
18671
$as_echo "#define GNULIB_REALLOC_GNU 1" >>confdefs.h
18675
if test $gl_cv_func_malloc_posix = yes; then
18676
HAVE_REALLOC_POSIX=1
18678
$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
18689
gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
18691
HAVE_REALLOC_POSIX=0
18697
GNULIB_REALLOC_POSIX=1
18710
for ac_func in rmdir
18712
ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
18713
if test "x$ac_cv_func_rmdir" = x""yes; then :
18714
cat >>confdefs.h <<_ACEOF
18715
#define HAVE_RMDIR 1
18720
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
18726
if test $ac_cv_func_rmdir = no; then
18728
# If someone lacks rmdir, make configure fail, and request
18729
# a bug report to inform us about it.
18730
if test x"$SKIP_RMDIR_CHECK" != xyes; then
18731
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18732
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18733
as_fn_error "Your system lacks the rmdir function.
18734
Please report this, along with the output of \"uname -a\", to the
18735
bug-coreutils@gnu.org mailing list. To continue past this point,
18736
rerun configure with SKIP_RMDIR_CHECK=yes.
18737
E.g., ./configure SKIP_RMDIR_CHECK=yes
18738
See \`config.log' for more details." "$LINENO" 5; }
18741
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
18742
$as_echo_n "checking whether rmdir works... " >&6; }
18743
if test "${gl_cv_func_rmdir_works+set}" = set; then :
18744
$as_echo_n "(cached) " >&6
18747
touch conftest.file
18748
if test "$cross_compiling" = yes; then :
18749
gl_cv_func_rmdir_works="guessing no"
18751
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752
/* end confdefs.h. */
18755
#include <unistd.h>
18760
return !rmdir ("conftest.file/") || errno != ENOTDIR
18761
|| !rmdir ("conftest.dir/./");
18766
if ac_fn_c_try_run "$LINENO"; then :
18767
gl_cv_func_rmdir_works=yes
18769
gl_cv_func_rmdir_works=no
18771
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18772
conftest.$ac_objext conftest.beam conftest.$ac_ext
18775
rm -rf conftest.dir conftest.file
18777
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
18778
$as_echo "$gl_cv_func_rmdir_works" >&6; }
18779
if test x"$gl_cv_func_rmdir_works" != xyes; then
18789
gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
18807
gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext"
18813
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
18814
$as_echo_n "checking for signbit macro... " >&6; }
18815
if test "${gl_cv_func_signbit+set}" = set; then :
18816
$as_echo_n "(cached) " >&6
18819
if test "$cross_compiling" = yes; then :
18820
gl_cv_func_signbit="guessing no"
18822
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18823
/* end confdefs.h. */
18826
/* If signbit is defined as a function, don't use it, since calling it for
18827
'float' or 'long double' arguments would involve conversions.
18828
If signbit is not declared at all but exists as a library function, don't
18829
use it, since the prototype may not match.
18830
If signbit is not declared at all but exists as a compiler built-in, don't
18831
use it, since it's preferable to use __builtin_signbit* (no warnings,
18832
no conversions). */
18834
# error "signbit should be a macro"
18836
#include <string.h>
18838
/* Global variables.
18839
Needed because GCC 4 constant-folds __builtin_signbitl (literal)
18840
but cannot constant-fold __builtin_signbitl (variable). */
18846
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18847
So we use -p0f and -p0d instead. */
18852
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
18853
So we use another constant expression instead.
18854
But that expression does not work on other platforms, such as when
18855
cross-compiling to PowerPC on MacOS X 10.5. */
18856
long double p0l = 0.0L;
18857
#if defined __hpux || defined __sgi
18858
long double m0l = -LDBL_MIN * LDBL_MIN;
18860
long double m0l = -p0l;
18865
float plus_inf = 1.0f / p0f;
18866
float minus_inf = -1.0f / p0f;
18867
if (!(!signbit (255.0f)
18868
&& signbit (-255.0f)
18870
&& (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
18871
&& !signbit (plus_inf)
18872
&& signbit (minus_inf)))
18878
double plus_inf = 1.0 / p0d;
18879
double minus_inf = -1.0 / p0d;
18880
if (!(!signbit (255.0)
18881
&& signbit (-255.0)
18883
&& (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
18884
&& !signbit (plus_inf)
18885
&& signbit (minus_inf)))
18891
long double plus_inf = 1.0L / p0l;
18892
long double minus_inf = -1.0L / p0l;
18893
if (!(!signbit (255.0L)
18894
&& signbit (-255.0L)
18896
&& (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
18897
&& !signbit (plus_inf)
18898
&& signbit (minus_inf)))
18906
if ac_fn_c_try_run "$LINENO"; then :
18907
gl_cv_func_signbit=yes
18909
gl_cv_func_signbit=no
18911
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18912
conftest.$ac_objext conftest.beam conftest.$ac_ext
18917
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
18918
$as_echo "$gl_cv_func_signbit" >&6; }
18919
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
18920
$as_echo_n "checking for signbit compiler built-ins... " >&6; }
18921
if test "${gl_cv_func_signbit_gcc+set}" = set; then :
18922
$as_echo_n "(cached) " >&6
18925
if test "$cross_compiling" = yes; then :
18926
gl_cv_func_signbit_gcc="guessing no"
18928
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18929
/* end confdefs.h. */
18932
# define signbit(x) \
18933
(sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
18934
sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
18935
__builtin_signbitf (x))
18937
# error "signbit should be three compiler built-ins"
18939
#include <string.h>
18941
/* Global variables.
18942
Needed because GCC 4 constant-folds __builtin_signbitl (literal)
18943
but cannot constant-fold __builtin_signbitl (variable). */
18949
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18950
So we use -p0f and -p0d instead. */
18955
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
18956
So we use another constant expression instead.
18957
But that expression does not work on other platforms, such as when
18958
cross-compiling to PowerPC on MacOS X 10.5. */
18959
long double p0l = 0.0L;
18960
#if defined __hpux || defined __sgi
18961
long double m0l = -LDBL_MIN * LDBL_MIN;
18963
long double m0l = -p0l;
18968
float plus_inf = 1.0f / p0f;
18969
float minus_inf = -1.0f / p0f;
18970
if (!(!signbit (255.0f)
18971
&& signbit (-255.0f)
18973
&& (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
18974
&& !signbit (plus_inf)
18975
&& signbit (minus_inf)))
18981
double plus_inf = 1.0 / p0d;
18982
double minus_inf = -1.0 / p0d;
18983
if (!(!signbit (255.0)
18984
&& signbit (-255.0)
18986
&& (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
18987
&& !signbit (plus_inf)
18988
&& signbit (minus_inf)))
18994
long double plus_inf = 1.0L / p0l;
18995
long double minus_inf = -1.0L / p0l;
18996
if (!(!signbit (255.0L)
18997
&& signbit (-255.0L)
18999
&& (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
19000
&& !signbit (plus_inf)
19001
&& signbit (minus_inf)))
19009
if ac_fn_c_try_run "$LINENO"; then :
19010
gl_cv_func_signbit_gcc=yes
19012
gl_cv_func_signbit_gcc=no
19014
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19015
conftest.$ac_objext conftest.beam conftest.$ac_ext
19020
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
19021
$as_echo "$gl_cv_func_signbit_gcc" >&6; }
19022
if test "$gl_cv_func_signbit_gcc" = yes; then
19023
REPLACE_SIGNBIT_USING_GCC=1
19025
if test "$gl_cv_func_signbit" != yes; then
19035
gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
19045
gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
19055
gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
19059
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
19060
$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
19061
if test "${gl_cv_cc_float_signbit+set}" = set; then :
19062
$as_echo_n "(cached) " >&6
19065
if test "$cross_compiling" = yes; then :
19067
gl_cv_cc_float_signbit="unknown"
19070
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19071
/* end confdefs.h. */
19073
#include <stddef.h>
19076
((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19077
typedef union { float value; unsigned int word[NWORDS]; }
19079
static memory_float plus = { 1.0f };
19080
static memory_float minus = { -1.0f };
19085
FILE *fp = fopen ("conftest.out", "w");
19088
/* Find the different bit. */
19090
for (j = 0; j < NWORDS; j++)
19092
unsigned int x = plus.word[j] ^ minus.word[j];
19093
if ((x & (x - 1)) || (x && m))
19095
/* More than one bit difference. */
19096
fprintf (fp, "unknown");
19107
/* No difference. */
19108
fprintf (fp, "unknown");
19111
/* Now m = plus.word[k] ^ ~minus.word[k]. */
19112
if (plus.word[k] & ~minus.word[k])
19114
/* Oh? The sign bit is set in the positive and cleared in the negative
19116
fprintf (fp, "unknown");
19122
fprintf (fp, "word %d bit %d", (int) k, (int) i);
19123
return (fclose (fp) != 0);
19127
if ac_fn_c_try_run "$LINENO"; then :
19128
gl_cv_cc_float_signbit=`cat conftest.out`
19130
gl_cv_cc_float_signbit="unknown"
19132
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19133
conftest.$ac_objext conftest.beam conftest.$ac_ext
19139
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
19140
$as_echo "$gl_cv_cc_float_signbit" >&6; }
19141
case "$gl_cv_cc_float_signbit" in
19143
word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
19144
bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
19146
cat >>confdefs.h <<_ACEOF
19147
#define FLT_SIGNBIT_WORD $word
19151
cat >>confdefs.h <<_ACEOF
19152
#define FLT_SIGNBIT_BIT $bit
19161
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
19162
$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
19163
if test "${gl_cv_cc_double_signbit+set}" = set; then :
19164
$as_echo_n "(cached) " >&6
19167
if test "$cross_compiling" = yes; then :
19169
gl_cv_cc_double_signbit="unknown"
19172
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19173
/* end confdefs.h. */
19175
#include <stddef.h>
19178
((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19179
typedef union { double value; unsigned int word[NWORDS]; }
19181
static memory_float plus = { 1.0 };
19182
static memory_float minus = { -1.0 };
19187
FILE *fp = fopen ("conftest.out", "w");
19190
/* Find the different bit. */
19192
for (j = 0; j < NWORDS; j++)
19194
unsigned int x = plus.word[j] ^ minus.word[j];
19195
if ((x & (x - 1)) || (x && m))
19197
/* More than one bit difference. */
19198
fprintf (fp, "unknown");
19209
/* No difference. */
19210
fprintf (fp, "unknown");
19213
/* Now m = plus.word[k] ^ ~minus.word[k]. */
19214
if (plus.word[k] & ~minus.word[k])
19216
/* Oh? The sign bit is set in the positive and cleared in the negative
19218
fprintf (fp, "unknown");
19224
fprintf (fp, "word %d bit %d", (int) k, (int) i);
19225
return (fclose (fp) != 0);
19229
if ac_fn_c_try_run "$LINENO"; then :
19230
gl_cv_cc_double_signbit=`cat conftest.out`
19232
gl_cv_cc_double_signbit="unknown"
19234
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19235
conftest.$ac_objext conftest.beam conftest.$ac_ext
19241
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
19242
$as_echo "$gl_cv_cc_double_signbit" >&6; }
19243
case "$gl_cv_cc_double_signbit" in
19245
word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
19246
bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
19248
cat >>confdefs.h <<_ACEOF
19249
#define DBL_SIGNBIT_WORD $word
19253
cat >>confdefs.h <<_ACEOF
19254
#define DBL_SIGNBIT_BIT $bit
19263
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
19264
$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
19265
if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
19266
$as_echo_n "(cached) " >&6
19269
if test "$cross_compiling" = yes; then :
19271
gl_cv_cc_long_double_signbit="unknown"
19274
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19275
/* end confdefs.h. */
19277
#include <stddef.h>
19280
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19281
typedef union { long double value; unsigned int word[NWORDS]; }
19283
static memory_float plus = { 1.0L };
19284
static memory_float minus = { -1.0L };
19289
FILE *fp = fopen ("conftest.out", "w");
19292
/* Find the different bit. */
19294
for (j = 0; j < NWORDS; j++)
19296
unsigned int x = plus.word[j] ^ minus.word[j];
19297
if ((x & (x - 1)) || (x && m))
19299
/* More than one bit difference. */
19300
fprintf (fp, "unknown");
19311
/* No difference. */
19312
fprintf (fp, "unknown");
19315
/* Now m = plus.word[k] ^ ~minus.word[k]. */
19316
if (plus.word[k] & ~minus.word[k])
19318
/* Oh? The sign bit is set in the positive and cleared in the negative
19320
fprintf (fp, "unknown");
19326
fprintf (fp, "word %d bit %d", (int) k, (int) i);
19327
return (fclose (fp) != 0);
19331
if ac_fn_c_try_run "$LINENO"; then :
19332
gl_cv_cc_long_double_signbit=`cat conftest.out`
19334
gl_cv_cc_long_double_signbit="unknown"
19336
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19337
conftest.$ac_objext conftest.beam conftest.$ac_ext
19343
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
19344
$as_echo "$gl_cv_cc_long_double_signbit" >&6; }
19345
case "$gl_cv_cc_long_double_signbit" in
19347
word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
19348
bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
19350
cat >>confdefs.h <<_ACEOF
19351
#define LDBL_SIGNBIT_WORD $word
19355
cat >>confdefs.h <<_ACEOF
19356
#define LDBL_SIGNBIT_BIT $bit
19363
if test "$gl_cv_cc_float_signbit" = unknown; then
19364
ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
19366
if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
19372
cat >>confdefs.h <<_ACEOF
19373
#define HAVE_DECL_COPYSIGNF $ac_have_decl
19376
if test "$ac_cv_have_decl_copysignf" = yes; then
19377
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
19378
$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
19379
if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
19380
$as_echo_n "(cached) " >&6
19383
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19384
/* end confdefs.h. */
19390
return copysignf (x, y) < 0;
19395
if ac_fn_c_try_link "$LINENO"; then :
19396
gl_cv_func_copysignf_no_libm=yes
19398
gl_cv_func_copysignf_no_libm=no
19400
rm -f core conftest.err conftest.$ac_objext \
19401
conftest$ac_exeext conftest.$ac_ext
19404
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
19405
$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
19406
if test $gl_cv_func_copysignf_no_libm = yes; then
19408
$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
19413
if test "$gl_cv_cc_double_signbit" = unknown; then
19414
ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
19416
if test "x$ac_cv_have_decl_copysign" = x""yes; then :
19422
cat >>confdefs.h <<_ACEOF
19423
#define HAVE_DECL_COPYSIGN $ac_have_decl
19426
if test "$ac_cv_have_decl_copysign" = yes; then
19427
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
19428
$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
19429
if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
19430
$as_echo_n "(cached) " >&6
19433
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19434
/* end confdefs.h. */
19440
return copysign (x, y) < 0;
19445
if ac_fn_c_try_link "$LINENO"; then :
19446
gl_cv_func_copysign_no_libm=yes
19448
gl_cv_func_copysign_no_libm=no
19450
rm -f core conftest.err conftest.$ac_objext \
19451
conftest$ac_exeext conftest.$ac_ext
19454
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
19455
$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
19456
if test $gl_cv_func_copysign_no_libm = yes; then
19458
$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
19463
if test "$gl_cv_cc_long_double_signbit" = unknown; then
19464
ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
19466
if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
19472
cat >>confdefs.h <<_ACEOF
19473
#define HAVE_DECL_COPYSIGNL $ac_have_decl
19476
if test "$ac_cv_have_decl_copysignl" = yes; then
19477
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
19478
$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
19479
if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
19480
$as_echo_n "(cached) " >&6
19483
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19484
/* end confdefs.h. */
19490
return copysignl (x, y) < 0;
19495
if ac_fn_c_try_link "$LINENO"; then :
19496
gl_cv_func_copysignl_no_libm=yes
19498
gl_cv_func_copysignl_no_libm=no
19500
rm -f core conftest.err conftest.$ac_objext \
19501
conftest$ac_exeext conftest.$ac_ext
19504
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
19505
$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
19506
if test $gl_cv_func_copysignl_no_libm = yes; then
19508
$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
19521
for ac_header in stdint.h
19523
ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
19524
if test "x$ac_cv_header_stdint_h" = x""yes; then :
19525
cat >>confdefs.h <<_ACEOF
19526
#define HAVE_STDINT_H 1
19533
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
19534
$as_echo_n "checking for SIZE_MAX... " >&6; }
19535
if test "${gl_cv_size_max+set}" = set; then :
19536
$as_echo_n "(cached) " >&6
19540
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19541
/* end confdefs.h. */
19543
#include <limits.h>
19545
#include <stdint.h>
19552
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19553
$EGREP "Found it" >/dev/null 2>&1; then :
19558
if test -z "$gl_cv_size_max"; then
19559
if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
19560
#include <limits.h>"; then :
19563
size_t_bits_minus_1=
19566
if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
19572
if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
19573
if test $fits_in_uint = 1; then
19574
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19575
/* end confdefs.h. */
19576
#include <stddef.h>
19578
extern unsigned long foo;
19588
if ac_fn_c_try_compile "$LINENO"; then :
19591
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19593
if test $fits_in_uint = 1; then
19594
gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
19596
gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
19599
gl_cv_size_max='((size_t)~(size_t)0)'
19604
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
19605
$as_echo "$gl_cv_size_max" >&6; }
19606
if test "$gl_cv_size_max" != yes; then
19608
cat >>confdefs.h <<_ACEOF
19609
#define SIZE_MAX $gl_cv_size_max
19619
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
19620
$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
19621
if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
19622
$as_echo_n "(cached) " >&6
19624
if test "$cross_compiling" = yes; then :
19626
mingw*) gl_cv_func_stat_dir_slash="guessing no";;
19627
*) gl_cv_func_stat_dir_slash="guessing yes";;
19630
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19631
/* end confdefs.h. */
19632
#include <sys/stat.h>
19637
struct stat st; return stat (".", &st) != stat ("./", &st);
19642
if ac_fn_c_try_run "$LINENO"; then :
19643
gl_cv_func_stat_dir_slash=yes
19645
gl_cv_func_stat_dir_slash=no
19647
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19648
conftest.$ac_objext conftest.beam conftest.$ac_ext
19652
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
19653
$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
19654
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
19655
$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
19656
if test "${gl_cv_func_stat_file_slash+set}" = set; then :
19657
$as_echo_n "(cached) " >&6
19660
# Assume that if we have lstat, we can also check symlinks.
19661
if test $ac_cv_func_lstat = yes; then
19662
ln -s conftest.tmp conftest.lnk
19664
if test "$cross_compiling" = yes; then :
19665
gl_cv_func_stat_file_slash="guessing no"
19667
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19668
/* end confdefs.h. */
19669
#include <sys/stat.h>
19675
if (!stat ("conftest.tmp/", &st)) return 1;
19677
if (!stat ("conftest.lnk/", &st)) return 2;
19684
if ac_fn_c_try_run "$LINENO"; then :
19685
gl_cv_func_stat_file_slash=yes
19687
gl_cv_func_stat_file_slash=no
19689
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19690
conftest.$ac_objext conftest.beam conftest.$ac_ext
19693
rm -f conftest.tmp conftest.lnk
19695
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
19696
$as_echo "$gl_cv_func_stat_file_slash" >&6; }
19697
case $gl_cv_func_stat_dir_slash in
19698
*no) REPLACE_STAT=1
19700
$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
19703
case $gl_cv_func_stat_file_slash in
19704
*no) REPLACE_STAT=1
19706
$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
19709
if test $REPLACE_STAT = 1; then
19718
gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
19732
ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
19733
#include <sys/stat.h>
19735
if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
7784
19737
cat >>confdefs.h <<_ACEOF
7785
19738
#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
7788
{ echo "$as_me:$LINENO: checking whether struct stat.st_atim is of type struct timespec" >&5
7789
echo $ECHO_N "checking whether struct stat.st_atim is of type struct timespec... $ECHO_C" >&6; }
7790
if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then
7791
echo $ECHO_N "(cached) $ECHO_C" >&6
19741
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
19742
$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
19743
if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
19744
$as_echo_n "(cached) " >&6
7793
cat >conftest.$ac_ext <<_ACEOF
7796
cat confdefs.h >>conftest.$ac_ext
7797
cat >>conftest.$ac_ext <<_ACEOF
19746
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7798
19747
/* end confdefs.h. */
7800
#include <sys/types.h>
7801
#include <sys/stat.h>
7803
# include <sys/time.h>
19749
#include <sys/types.h>
19750
#include <sys/stat.h>
19751
#if HAVE_SYS_TIME_H
19752
# include <sys/time.h>
19755
struct timespec ts;
7819
rm -f conftest.$ac_objext
7820
if { (ac_try="$ac_compile"
7822
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7823
*) ac_try_echo=$ac_try;;
7825
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7826
(eval "$ac_compile") 2>conftest.er1
7828
grep -v '^ *+' conftest.er1 >conftest.err
7830
cat conftest.err >&5
7831
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832
(exit $ac_status); } && {
7833
test -z "$ac_c_werror_flag" ||
7834
test ! -s conftest.err
7835
} && test -s conftest.$ac_objext; then
19768
if ac_fn_c_try_compile "$LINENO"; then :
7836
19769
ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
7838
echo "$as_me: failed program was:" >&5
7839
sed 's/^/| /' conftest.$ac_ext >&5
7841
ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
19771
ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
7844
19773
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7846
{ echo "$as_me:$LINENO: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
7847
echo "${ECHO_T}$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
19775
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
19776
$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
7848
19777
if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
7850
cat >>confdefs.h <<\_ACEOF
7851
#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1
19779
$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
7856
{ echo "$as_me:$LINENO: checking for struct stat.st_atimespec.tv_nsec" >&5
7857
echo $ECHO_N "checking for struct stat.st_atimespec.tv_nsec... $ECHO_C" >&6; }
7858
if test "${ac_cv_member_struct_stat_st_atimespec_tv_nsec+set}" = set; then
7859
echo $ECHO_N "(cached) $ECHO_C" >&6
7861
cat >conftest.$ac_ext <<_ACEOF
7864
cat confdefs.h >>conftest.$ac_ext
7865
cat >>conftest.$ac_ext <<_ACEOF
7866
/* end confdefs.h. */
7867
#include <sys/types.h>
7868
#include <sys/stat.h>
7873
static struct stat ac_aggr;
7874
if (ac_aggr.st_atimespec.tv_nsec)
7880
rm -f conftest.$ac_objext
7881
if { (ac_try="$ac_compile"
7883
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884
*) ac_try_echo=$ac_try;;
7886
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7887
(eval "$ac_compile") 2>conftest.er1
7889
grep -v '^ *+' conftest.er1 >conftest.err
7891
cat conftest.err >&5
7892
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7893
(exit $ac_status); } && {
7894
test -z "$ac_c_werror_flag" ||
7895
test ! -s conftest.err
7896
} && test -s conftest.$ac_objext; then
7897
ac_cv_member_struct_stat_st_atimespec_tv_nsec=yes
7899
echo "$as_me: failed program was:" >&5
7900
sed 's/^/| /' conftest.$ac_ext >&5
7902
cat >conftest.$ac_ext <<_ACEOF
7905
cat confdefs.h >>conftest.$ac_ext
7906
cat >>conftest.$ac_ext <<_ACEOF
7907
/* end confdefs.h. */
7908
#include <sys/types.h>
7909
#include <sys/stat.h>
7914
static struct stat ac_aggr;
7915
if (sizeof ac_aggr.st_atimespec.tv_nsec)
7921
rm -f conftest.$ac_objext
7922
if { (ac_try="$ac_compile"
7924
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7925
*) ac_try_echo=$ac_try;;
7927
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7928
(eval "$ac_compile") 2>conftest.er1
7930
grep -v '^ *+' conftest.er1 >conftest.err
7932
cat conftest.err >&5
7933
echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934
(exit $ac_status); } && {
7935
test -z "$ac_c_werror_flag" ||
7936
test ! -s conftest.err
7937
} && test -s conftest.$ac_objext; then
7938
ac_cv_member_struct_stat_st_atimespec_tv_nsec=yes
7940
echo "$as_me: failed program was:" >&5
7941
sed 's/^/| /' conftest.$ac_ext >&5
7943
ac_cv_member_struct_stat_st_atimespec_tv_nsec=no
7946
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7949
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7951
{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atimespec_tv_nsec" >&5
7952
echo "${ECHO_T}$ac_cv_member_struct_stat_st_atimespec_tv_nsec" >&6; }
7953
if test $ac_cv_member_struct_stat_st_atimespec_tv_nsec = yes; then
19783
ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
19784
#include <sys/stat.h>
19786
if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
7955
19788
cat >>confdefs.h <<_ACEOF
7956
19789
#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
8530
{ echo "$as_me:$LINENO: checking absolute name of <stdlib.h>" >&5
8531
echo $ECHO_N "checking absolute name of <stdlib.h>... $ECHO_C" >&6; }
8532
if test "${gl_cv_absolute_stdlib_h+set}" = set; then
8533
echo $ECHO_N "(cached) $ECHO_C" >&6
8540
if test $ac_cv_header_stdlib_h = yes; then
8541
cat >conftest.$ac_ext <<_ACEOF
8544
cat confdefs.h >>conftest.$ac_ext
8545
cat >>conftest.$ac_ext <<_ACEOF
19889
if test $gt_cv_c_wchar_t = no; then
19893
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
19894
$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
19895
if test "${gl_cv_decl_null_works+set}" = set; then :
19896
$as_echo_n "(cached) " >&6
19898
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19899
/* end confdefs.h. */
19900
#include <stddef.h>
19901
int test[2 * (sizeof NULL == sizeof (void *)) -1];
19911
if ac_fn_c_try_compile "$LINENO"; then :
19912
gl_cv_decl_null_works=yes
19914
gl_cv_decl_null_works=no
19916
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19918
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
19919
$as_echo "$gl_cv_decl_null_works" >&6; }
19920
if test $gl_cv_decl_null_works = no; then
19924
if test -n "$STDDEF_H"; then
19931
if test $gl_cv_have_include_next = yes; then
19932
gl_cv_next_stddef_h='<'stddef.h'>'
19934
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
19935
$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
19936
if test "${gl_cv_next_stddef_h+set}" = set; then :
19937
$as_echo_n "(cached) " >&6
19940
if test $ac_cv_header_stddef_h = yes; then
19941
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19942
/* end confdefs.h. */
19943
#include <stddef.h>
19947
aix*) gl_absname_cpp="$ac_cpp -C" ;;
19948
*) gl_absname_cpp="$ac_cpp" ;;
19950
gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19951
sed -n '\#/stddef.h#{
19952
s#.*"\(.*/stddef.h\)".*#\1#
19958
gl_cv_next_stddef_h='<'stddef.h'>'
19962
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
19963
$as_echo "$gl_cv_next_stddef_h" >&6; }
19965
NEXT_STDDEF_H=$gl_cv_next_stddef_h
19967
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19968
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19969
gl_next_as_first_directive='<'stddef.h'>'
19971
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19972
gl_next_as_first_directive=$gl_cv_next_stddef_h
19974
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
19983
if test $ac_cv_type_long_long_int = yes; then
19984
HAVE_LONG_LONG_INT=1
19986
HAVE_LONG_LONG_INT=0
19990
if test $ac_cv_type_unsigned_long_long_int = yes; then
19991
HAVE_UNSIGNED_LONG_LONG_INT=1
19993
HAVE_UNSIGNED_LONG_LONG_INT=0
19997
if test $ac_cv_header_inttypes_h = yes; then
20004
if test $ac_cv_header_sys_types_h = yes; then
20017
if test $gl_cv_have_include_next = yes; then
20018
gl_cv_next_stdint_h='<'stdint.h'>'
20020
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20021
$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
20022
if test "${gl_cv_next_stdint_h+set}" = set; then :
20023
$as_echo_n "(cached) " >&6
20026
if test $ac_cv_header_stdint_h = yes; then
20027
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20028
/* end confdefs.h. */
20029
#include <stdint.h>
20033
aix*) gl_absname_cpp="$ac_cpp -C" ;;
20034
*) gl_absname_cpp="$ac_cpp" ;;
20036
gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20037
sed -n '\#/stdint.h#{
20038
s#.*"\(.*/stdint.h\)".*#\1#
20044
gl_cv_next_stdint_h='<'stdint.h'>'
20048
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20049
$as_echo "$gl_cv_next_stdint_h" >&6; }
20051
NEXT_STDINT_H=$gl_cv_next_stdint_h
20053
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20054
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20055
gl_next_as_first_directive='<'stdint.h'>'
20057
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20058
gl_next_as_first_directive=$gl_cv_next_stdint_h
20060
NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
20064
if test $ac_cv_header_stdint_h = yes; then
20071
if test $ac_cv_header_stdint_h = yes; then
20072
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20073
$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20074
if test "${gl_cv_header_working_stdint_h+set}" = set; then :
20075
$as_echo_n "(cached) " >&6
20077
gl_cv_header_working_stdint_h=no
20078
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079
/* end confdefs.h. */
20082
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
20083
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
20084
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20085
#include <stdint.h>
20086
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20087
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
20088
#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20092
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20093
included before <wchar.h>. */
20094
#include <stddef.h>
20095
#include <signal.h>
20097
# include <stdio.h>
20099
# include <wchar.h>
20104
int8_t a1 = INT8_MAX;
20105
int8_t a1min = INT8_MIN;
20108
int16_t a2 = INT16_MAX;
20109
int16_t a2min = INT16_MIN;
20112
int32_t a3 = INT32_MAX;
20113
int32_t a3min = INT32_MIN;
20116
int64_t a4 = INT64_MAX;
20117
int64_t a4min = INT64_MIN;
20120
uint8_t b1 = UINT8_MAX;
20122
typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20125
uint16_t b2 = UINT16_MAX;
20128
uint32_t b3 = UINT32_MAX;
20131
uint64_t b4 = UINT64_MAX;
20133
int_least8_t c1 = INT8_C (0x7f);
20134
int_least8_t c1max = INT_LEAST8_MAX;
20135
int_least8_t c1min = INT_LEAST8_MIN;
20136
int_least16_t c2 = INT16_C (0x7fff);
20137
int_least16_t c2max = INT_LEAST16_MAX;
20138
int_least16_t c2min = INT_LEAST16_MIN;
20139
int_least32_t c3 = INT32_C (0x7fffffff);
20140
int_least32_t c3max = INT_LEAST32_MAX;
20141
int_least32_t c3min = INT_LEAST32_MIN;
20142
int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20143
int_least64_t c4max = INT_LEAST64_MAX;
20144
int_least64_t c4min = INT_LEAST64_MIN;
20145
uint_least8_t d1 = UINT8_C (0xff);
20146
uint_least8_t d1max = UINT_LEAST8_MAX;
20147
uint_least16_t d2 = UINT16_C (0xffff);
20148
uint_least16_t d2max = UINT_LEAST16_MAX;
20149
uint_least32_t d3 = UINT32_C (0xffffffff);
20150
uint_least32_t d3max = UINT_LEAST32_MAX;
20151
uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20152
uint_least64_t d4max = UINT_LEAST64_MAX;
20153
int_fast8_t e1 = INT_FAST8_MAX;
20154
int_fast8_t e1min = INT_FAST8_MIN;
20155
int_fast16_t e2 = INT_FAST16_MAX;
20156
int_fast16_t e2min = INT_FAST16_MIN;
20157
int_fast32_t e3 = INT_FAST32_MAX;
20158
int_fast32_t e3min = INT_FAST32_MIN;
20159
int_fast64_t e4 = INT_FAST64_MAX;
20160
int_fast64_t e4min = INT_FAST64_MIN;
20161
uint_fast8_t f1 = UINT_FAST8_MAX;
20162
uint_fast16_t f2 = UINT_FAST16_MAX;
20163
uint_fast32_t f3 = UINT_FAST32_MAX;
20164
uint_fast64_t f4 = UINT_FAST64_MAX;
20166
intptr_t g = INTPTR_MAX;
20167
intptr_t gmin = INTPTR_MIN;
20170
uintptr_t h = UINTPTR_MAX;
20172
intmax_t i = INTMAX_MAX;
20173
uintmax_t j = UINTMAX_MAX;
20175
#include <limits.h> /* for CHAR_BIT */
20176
#define TYPE_MINIMUM(t) \
20177
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
20178
#define TYPE_MAXIMUM(t) \
20179
((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
20182
PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20183
&& PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20185
/* Detect bug in FreeBSD 6.0 / ia64. */
20186
int check_SIG_ATOMIC:
20187
SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20188
&& SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20190
int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20192
WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20193
&& WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20195
/* Detect bug in mingw. */
20197
WINT_MIN == TYPE_MINIMUM (wint_t)
20198
&& WINT_MAX == TYPE_MAXIMUM (wint_t)
20201
/* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20203
(-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20204
int check_UINT16_C:
20205
(-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20207
/* Detect bugs in OpenBSD 3.9 stdint.h. */
20209
int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
20212
int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20215
int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20218
int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20220
int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20221
int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20222
int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20223
int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20224
int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20225
int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20226
int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20227
int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20228
int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20229
int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20230
int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20241
if ac_fn_c_try_compile "$LINENO"; then :
20242
if test "$cross_compiling" = yes; then :
20243
gl_cv_header_working_stdint_h=yes
20246
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20247
/* end confdefs.h. */
20250
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
20251
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
20252
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20253
#include <stdint.h>
20256
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20257
included before <wchar.h>. */
20258
#include <stddef.h>
20259
#include <signal.h>
20261
# include <stdio.h>
20263
# include <wchar.h>
20268
#include <string.h>
20269
#define MVAL(macro) MVAL1(macro)
20270
#define MVAL1(expression) #expression
20271
static const char *macro_values[] =
20305
for (mv = macro_values; *mv != NULL; mv++)
20307
const char *value = *mv;
20308
/* Test whether it looks like a cast expression. */
20309
if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20310
|| strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20311
|| strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20312
|| strncmp (value, "((int)"/*)*/, 6) == 0
20313
|| strncmp (value, "((signed short)"/*)*/, 15) == 0
20314
|| strncmp (value, "((signed char)"/*)*/, 14) == 0)
20323
if ac_fn_c_try_run "$LINENO"; then :
20324
gl_cv_header_working_stdint_h=yes
20326
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20327
conftest.$ac_objext conftest.beam conftest.$ac_ext
20332
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20335
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20336
$as_echo "$gl_cv_header_working_stdint_h" >&6; }
20338
if test "$gl_cv_header_working_stdint_h" = yes; then
20341
for ac_header in sys/inttypes.h sys/bitypes.h
20343
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20344
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20345
eval as_val=\$$as_ac_Header
20346
if test "x$as_val" = x""yes; then :
20347
cat >>confdefs.h <<_ACEOF
20348
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20355
if test $ac_cv_header_sys_inttypes_h = yes; then
20356
HAVE_SYS_INTTYPES_H=1
20358
HAVE_SYS_INTTYPES_H=0
20361
if test $ac_cv_header_sys_bitypes_h = yes; then
20362
HAVE_SYS_BITYPES_H=1
20364
HAVE_SYS_BITYPES_H=0
20372
if test $APPLE_UNIVERSAL_BUILD = 0; then
20375
for gltype in ptrdiff_t size_t ; do
20376
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20377
$as_echo_n "checking for bit size of $gltype... " >&6; }
20378
if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20379
$as_echo_n "(cached) " >&6
20381
if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20382
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20383
included before <wchar.h>. */
20384
#include <stddef.h>
20385
#include <signal.h>
20387
# include <stdio.h>
20389
# include <wchar.h>
20392
#include <limits.h>"; then :
20398
eval gl_cv_bitsizeof_${gltype}=\$result
20401
eval ac_res=\$gl_cv_bitsizeof_${gltype}
20402
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20403
$as_echo "$ac_res" >&6; }
20404
eval result=\$gl_cv_bitsizeof_${gltype}
20405
if test $result = unknown; then
20408
GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20409
cat >>confdefs.h <<_ACEOF
20410
#define BITSIZEOF_${GLTYPE} $result
20413
eval BITSIZEOF_${GLTYPE}=\$result
20420
for gltype in sig_atomic_t wchar_t wint_t ; do
20421
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20422
$as_echo_n "checking for bit size of $gltype... " >&6; }
20423
if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20424
$as_echo_n "(cached) " >&6
20426
if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20427
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20428
included before <wchar.h>. */
20429
#include <stddef.h>
20430
#include <signal.h>
20432
# include <stdio.h>
20434
# include <wchar.h>
20437
#include <limits.h>"; then :
20443
eval gl_cv_bitsizeof_${gltype}=\$result
20446
eval ac_res=\$gl_cv_bitsizeof_${gltype}
20447
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20448
$as_echo "$ac_res" >&6; }
20449
eval result=\$gl_cv_bitsizeof_${gltype}
20450
if test $result = unknown; then
20453
GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20454
cat >>confdefs.h <<_ACEOF
20455
#define BITSIZEOF_${GLTYPE} $result
20458
eval BITSIZEOF_${GLTYPE}=\$result
20464
for gltype in sig_atomic_t wchar_t wint_t ; do
20465
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20466
$as_echo_n "checking whether $gltype is signed... " >&6; }
20467
if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20468
$as_echo_n "(cached) " >&6
20470
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471
/* end confdefs.h. */
20473
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20474
included before <wchar.h>. */
20475
#include <stddef.h>
20476
#include <signal.h>
20478
# include <stdio.h>
20480
# include <wchar.h>
20483
int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20492
if ac_fn_c_try_compile "$LINENO"; then :
20497
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20498
eval gl_cv_type_${gltype}_signed=\$result
20501
eval ac_res=\$gl_cv_type_${gltype}_signed
20502
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20503
$as_echo "$ac_res" >&6; }
20504
eval result=\$gl_cv_type_${gltype}_signed
20505
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20506
if test "$result" = yes; then
20507
cat >>confdefs.h <<_ACEOF
20508
#define HAVE_SIGNED_${GLTYPE} 1
20511
eval HAVE_SIGNED_${GLTYPE}=1
20513
eval HAVE_SIGNED_${GLTYPE}=0
20518
gl_cv_type_ptrdiff_t_signed=yes
20519
gl_cv_type_size_t_signed=no
20520
if test $APPLE_UNIVERSAL_BUILD = 0; then
20523
for gltype in ptrdiff_t size_t ; do
20524
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20525
$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20526
if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20527
$as_echo_n "(cached) " >&6
20529
eval gl_cv_type_${gltype}_suffix=no
20530
eval result=\$gl_cv_type_${gltype}_signed
20531
if test "$result" = yes; then
20536
for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20538
'') gltype1='int';;
20539
l) gltype1='long int';;
20540
ll) gltype1='long long int';;
20541
i64) gltype1='__int64';;
20542
u) gltype1='unsigned int';;
20543
ul) gltype1='unsigned long int';;
20544
ull) gltype1='unsigned long long int';;
20545
ui64)gltype1='unsigned __int64';;
20547
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20548
/* end confdefs.h. */
20550
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20551
included before <wchar.h>. */
20552
#include <stddef.h>
20553
#include <signal.h>
20555
# include <stdio.h>
20557
# include <wchar.h>
20560
extern $gltype foo;
20561
extern $gltype1 foo;
20570
if ac_fn_c_try_compile "$LINENO"; then :
20571
eval gl_cv_type_${gltype}_suffix=\$glsuf
20573
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20574
eval result=\$gl_cv_type_${gltype}_suffix
20575
test "$result" != no && break
20578
eval ac_res=\$gl_cv_type_${gltype}_suffix
20579
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20580
$as_echo "$ac_res" >&6; }
20581
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20582
eval result=\$gl_cv_type_${gltype}_suffix
20583
test "$result" = no && result=
20584
eval ${GLTYPE}_SUFFIX=\$result
20585
cat >>confdefs.h <<_ACEOF
20586
#define ${GLTYPE}_SUFFIX $result
20595
for gltype in sig_atomic_t wchar_t wint_t ; do
20596
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20597
$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20598
if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20599
$as_echo_n "(cached) " >&6
20601
eval gl_cv_type_${gltype}_suffix=no
20602
eval result=\$gl_cv_type_${gltype}_signed
20603
if test "$result" = yes; then
20608
for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20610
'') gltype1='int';;
20611
l) gltype1='long int';;
20612
ll) gltype1='long long int';;
20613
i64) gltype1='__int64';;
20614
u) gltype1='unsigned int';;
20615
ul) gltype1='unsigned long int';;
20616
ull) gltype1='unsigned long long int';;
20617
ui64)gltype1='unsigned __int64';;
20619
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20620
/* end confdefs.h. */
20622
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20623
included before <wchar.h>. */
20624
#include <stddef.h>
20625
#include <signal.h>
20627
# include <stdio.h>
20629
# include <wchar.h>
20632
extern $gltype foo;
20633
extern $gltype1 foo;
20642
if ac_fn_c_try_compile "$LINENO"; then :
20643
eval gl_cv_type_${gltype}_suffix=\$glsuf
20645
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20646
eval result=\$gl_cv_type_${gltype}_suffix
20647
test "$result" != no && break
20650
eval ac_res=\$gl_cv_type_${gltype}_suffix
20651
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20652
$as_echo "$ac_res" >&6; }
20653
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20654
eval result=\$gl_cv_type_${gltype}_suffix
20655
test "$result" = no && result=
20656
eval ${GLTYPE}_SUFFIX=\$result
20657
cat >>confdefs.h <<_ACEOF
20658
#define ${GLTYPE}_SUFFIX $result
20678
if test $gl_cv_have_include_next = yes; then
20679
gl_cv_next_stdio_h='<'stdio.h'>'
20681
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
20682
$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
20683
if test "${gl_cv_next_stdio_h+set}" = set; then :
20684
$as_echo_n "(cached) " >&6
20687
if test $ac_cv_header_stdio_h = yes; then
20688
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20689
/* end confdefs.h. */
20694
aix*) gl_absname_cpp="$ac_cpp -C" ;;
20695
*) gl_absname_cpp="$ac_cpp" ;;
20697
gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20698
sed -n '\#/stdio.h#{
20699
s#.*"\(.*/stdio.h\)".*#\1#
20705
gl_cv_next_stdio_h='<'stdio.h'>'
20709
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20710
$as_echo "$gl_cv_next_stdio_h" >&6; }
20712
NEXT_STDIO_H=$gl_cv_next_stdio_h
20714
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20715
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20716
gl_next_as_first_directive='<'stdio.h'>'
20718
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20719
gl_next_as_first_directive=$gl_cv_next_stdio_h
20721
NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
20738
for gl_func in fseeko ftello; do
20739
as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20740
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20741
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20742
if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
20743
$as_echo_n "(cached) " >&6
20745
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20746
/* end confdefs.h. */
20758
if ac_fn_c_try_compile "$LINENO"; then :
20759
eval "$as_gl_Symbol=yes"
20761
eval "$as_gl_Symbol=no"
20763
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20765
eval ac_res=\$$as_gl_Symbol
20766
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20767
$as_echo "$ac_res" >&6; }
20768
eval as_val=\$$as_gl_Symbol
20769
if test "x$as_val" = x""yes; then :
20770
cat >>confdefs.h <<_ACEOF
20771
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20774
eval ac_cv_have_decl_$gl_func=yes
20787
if test $gl_cv_have_include_next = yes; then
20788
gl_cv_next_stdlib_h='<'stdlib.h'>'
20790
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
20791
$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
20792
if test "${gl_cv_next_stdlib_h+set}" = set; then :
20793
$as_echo_n "(cached) " >&6
20796
if test $ac_cv_header_stdlib_h = yes; then
20797
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8546
20798
/* end confdefs.h. */
8547
20799
#include <stdlib.h>
8549
gl_cv_absolute_stdlib_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8550
sed -n '\#/stdlib.h#{s#.*"\(.*/stdlib.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
8554
{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdlib_h" >&5
8555
echo "${ECHO_T}$gl_cv_absolute_stdlib_h" >&6; }
8556
cat >>confdefs.h <<_ACEOF
8557
#define ABSOLUTE_STDLIB_H "$gl_cv_absolute_stdlib_h"
8561
ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\"
8572
{ echo "$as_me:$LINENO: checking whether mkdir is declared" >&5
8573
echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; }
8574
if test "${ac_cv_have_decl_mkdir+set}" = set; then
8575
echo $ECHO_N "(cached) $ECHO_C" >&6
8577
cat >conftest.$ac_ext <<_ACEOF
8580
cat confdefs.h >>conftest.$ac_ext
8581
cat >>conftest.$ac_ext <<_ACEOF
8582
/* end confdefs.h. */
8583
#include <sys/stat.h>
8596
rm -f conftest.$ac_objext
8597
if { (ac_try="$ac_compile"
8599
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8600
*) ac_try_echo=$ac_try;;
8602
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8603
(eval "$ac_compile") 2>conftest.er1
8605
grep -v '^ *+' conftest.er1 >conftest.err
8607
cat conftest.err >&5
8608
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8609
(exit $ac_status); } && {
8610
test -z "$ac_c_werror_flag" ||
8611
test ! -s conftest.err
8612
} && test -s conftest.$ac_objext; then
8613
ac_cv_have_decl_mkdir=yes
8615
echo "$as_me: failed program was:" >&5
8616
sed 's/^/| /' conftest.$ac_ext >&5
8618
ac_cv_have_decl_mkdir=no
8621
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8623
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_mkdir" >&5
8624
echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; }
8625
if test $ac_cv_have_decl_mkdir = yes; then
8627
cat >>confdefs.h <<_ACEOF
8628
#define HAVE_DECL_MKDIR 1
8633
cat >>confdefs.h <<_ACEOF
8634
#define HAVE_DECL_MKDIR 0
8638
for ac_header in io.h
8640
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8641
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8642
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8643
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8644
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8645
echo $ECHO_N "(cached) $ECHO_C" >&6
8647
ac_res=`eval echo '${'$as_ac_Header'}'`
8648
{ echo "$as_me:$LINENO: result: $ac_res" >&5
8649
echo "${ECHO_T}$ac_res" >&6; }
8651
# Is the header compilable?
8652
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8653
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8654
cat >conftest.$ac_ext <<_ACEOF
8657
cat confdefs.h >>conftest.$ac_ext
8658
cat >>conftest.$ac_ext <<_ACEOF
8659
/* end confdefs.h. */
8660
$ac_includes_default
8661
#include <$ac_header>
8663
rm -f conftest.$ac_objext
8664
if { (ac_try="$ac_compile"
8666
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8667
*) ac_try_echo=$ac_try;;
8669
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8670
(eval "$ac_compile") 2>conftest.er1
8672
grep -v '^ *+' conftest.er1 >conftest.err
8674
cat conftest.err >&5
8675
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8676
(exit $ac_status); } && {
8677
test -z "$ac_c_werror_flag" ||
8678
test ! -s conftest.err
8679
} && test -s conftest.$ac_objext; then
8680
ac_header_compiler=yes
8682
echo "$as_me: failed program was:" >&5
8683
sed 's/^/| /' conftest.$ac_ext >&5
8685
ac_header_compiler=no
8688
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8689
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8690
echo "${ECHO_T}$ac_header_compiler" >&6; }
8692
# Is the header present?
8693
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8694
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8695
cat >conftest.$ac_ext <<_ACEOF
8698
cat confdefs.h >>conftest.$ac_ext
8699
cat >>conftest.$ac_ext <<_ACEOF
8700
/* end confdefs.h. */
8701
#include <$ac_header>
8703
if { (ac_try="$ac_cpp conftest.$ac_ext"
8705
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8706
*) ac_try_echo=$ac_try;;
8708
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8709
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8711
grep -v '^ *+' conftest.er1 >conftest.err
8713
cat conftest.err >&5
8714
echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715
(exit $ac_status); } >/dev/null && {
8716
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8717
test ! -s conftest.err
8719
ac_header_preproc=yes
8721
echo "$as_me: failed program was:" >&5
8722
sed 's/^/| /' conftest.$ac_ext >&5
8724
ac_header_preproc=no
8727
rm -f conftest.err conftest.$ac_ext
8728
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8729
echo "${ECHO_T}$ac_header_preproc" >&6; }
8731
# So? What about this header?
8732
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8734
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8735
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8736
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8737
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8738
ac_header_preproc=yes
8741
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8742
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8743
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8744
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8745
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8746
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8747
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8748
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8749
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8750
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8751
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8752
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8754
## ------------------------------- ##
8755
## Report this to bug-gzip@gnu.org ##
8756
## ------------------------------- ##
8758
) | sed "s/^/$as_me: WARNING: /" >&2
8761
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8762
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8763
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8764
echo $ECHO_N "(cached) $ECHO_C" >&6
8766
eval "$as_ac_Header=\$ac_header_preproc"
8768
ac_res=`eval echo '${'$as_ac_Header'}'`
8769
{ echo "$as_me:$LINENO: result: $ac_res" >&5
8770
echo "${ECHO_T}$ac_res" >&6; }
8773
if test `eval echo '${'$as_ac_Header'}'` = yes; then
8774
cat >>confdefs.h <<_ACEOF
8775
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8789
{ echo "$as_me:$LINENO: checking absolute name of <sys/stat.h>" >&5
8790
echo $ECHO_N "checking absolute name of <sys/stat.h>... $ECHO_C" >&6; }
8791
if test "${gl_cv_absolute_sys_stat_h+set}" = set; then
8792
echo $ECHO_N "(cached) $ECHO_C" >&6
8799
if test $ac_cv_header_sys_stat_h = yes; then
8800
cat >conftest.$ac_ext <<_ACEOF
8803
cat confdefs.h >>conftest.$ac_ext
8804
cat >>conftest.$ac_ext <<_ACEOF
8805
/* end confdefs.h. */
8806
#include <sys/stat.h>
8808
gl_cv_absolute_sys_stat_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8809
sed -n '\#/sys/stat.h#{s#.*"\(.*/sys/stat.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
8813
{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_stat_h" >&5
8814
echo "${ECHO_T}$gl_cv_absolute_sys_stat_h" >&6; }
8815
cat >>confdefs.h <<_ACEOF
8816
#define ABSOLUTE_SYS_STAT_H "$gl_cv_absolute_sys_stat_h"
8820
ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\"
8822
SYS_STAT_H='sys/stat.h'
8825
{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
8826
echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
8827
if test -z "$MKDIR_P"; then
8828
if test "${ac_cv_path_mkdir+set}" = set; then
8829
echo $ECHO_N "(cached) $ECHO_C" >&6
8831
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
8835
test -z "$as_dir" && as_dir=.
8836
for ac_prog in mkdir gmkdir; do
8837
for ac_exec_ext in '' $ac_executable_extensions; do
8838
{ test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
8839
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
8840
'mkdir (GNU coreutils) '* | \
8841
'mkdir (coreutils) '* | \
8842
'mkdir (fileutils) '4.1*)
8843
ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
8853
if test "${ac_cv_path_mkdir+set}" = set; then
8854
MKDIR_P="$ac_cv_path_mkdir -p"
8856
# As a last resort, use the slow shell script. Don't cache a
8857
# value for MKDIR_P within a source directory, because that will
8858
# break other packages using the cache if that directory is
8859
# removed, or if the value is a relative name.
8860
test -d ./--version && rmdir ./--version
8861
MKDIR_P="$ac_install_sh -d"
8864
{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
8865
echo "${ECHO_T}$MKDIR_P" >&6; }
8870
{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
8871
echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
8872
if test -z "$MKDIR_P"; then
8873
if test "${ac_cv_path_mkdir+set}" = set; then
8874
echo $ECHO_N "(cached) $ECHO_C" >&6
8876
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
8880
test -z "$as_dir" && as_dir=.
8881
for ac_prog in mkdir gmkdir; do
8882
for ac_exec_ext in '' $ac_executable_extensions; do
8883
{ test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
8884
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
8885
'mkdir (GNU coreutils) '* | \
8886
'mkdir (coreutils) '* | \
8887
'mkdir (fileutils) '4.1*)
8888
ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
8898
if test "${ac_cv_path_mkdir+set}" = set; then
8899
MKDIR_P="$ac_cv_path_mkdir -p"
8901
# As a last resort, use the slow shell script. Don't cache a
8902
# value for MKDIR_P within a source directory, because that will
8903
# break other packages using the cache if that directory is
8904
# removed, or if the value is a relative name.
8905
test -d ./--version && rmdir ./--version
8906
MKDIR_P="$ac_install_sh -d"
8909
{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
8910
echo "${ECHO_T}$MKDIR_P" >&6; }
20803
aix*) gl_absname_cpp="$ac_cpp -C" ;;
20804
*) gl_absname_cpp="$ac_cpp" ;;
20806
gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20807
sed -n '\#/stdlib.h#{
20808
s#.*"\(.*/stdlib.h\)".*#\1#
20814
gl_cv_next_stdlib_h='<'stdlib.h'>'
20818
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
20819
$as_echo "$gl_cv_next_stdlib_h" >&6; }
20821
NEXT_STDLIB_H=$gl_cv_next_stdlib_h
20823
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20824
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20825
gl_next_as_first_directive='<'stdlib.h'>'
20827
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20828
gl_next_as_first_directive=$gl_cv_next_stdlib_h
20830
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
20834
for ac_header in random.h
20836
ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
20838
if test "x$ac_cv_header_random_h" = x""yes; then :
20839
cat >>confdefs.h <<_ACEOF
20840
#define HAVE_RANDOM_H 1
20847
if test $ac_cv_header_random_h = yes; then
20853
ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
20855
# include <random.h>
20859
if test "x$ac_cv_type_struct_random_data" = x""yes; then :
20861
cat >>confdefs.h <<_ACEOF
20862
#define HAVE_STRUCT_RANDOM_DATA 1
20867
HAVE_STRUCT_RANDOM_DATA=0
20874
if test $gl_cv_func_malloc_posix != yes; then
20884
gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
20895
for ac_func in strdup
20897
ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
20898
if test "x$ac_cv_func_strdup" = x""yes; then :
20899
cat >>confdefs.h <<_ACEOF
20900
#define HAVE_STRDUP 1
20905
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
20913
if test $ac_cv_have_decl_strdup = no; then
20924
if test $REPLACE_STRERROR = 1; then
20933
gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
20936
cat >>confdefs.h <<_ACEOF
20937
#define REPLACE_STRERROR $REPLACE_STRERROR
20962
if test $gl_cv_have_include_next = yes; then
20963
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
20965
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
20966
$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
20967
if test "${gl_cv_next_sys_stat_h+set}" = set; then :
20968
$as_echo_n "(cached) " >&6
20971
if test $ac_cv_header_sys_stat_h = yes; then
20972
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20973
/* end confdefs.h. */
20974
#include <sys/stat.h>
20978
aix*) gl_absname_cpp="$ac_cpp -C" ;;
20979
*) gl_absname_cpp="$ac_cpp" ;;
20981
gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20982
sed -n '\#/sys/stat.h#{
20983
s#.*"\(.*/sys/stat.h\)".*#\1#
20989
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
20993
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
20994
$as_echo "$gl_cv_next_sys_stat_h" >&6; }
20996
NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
20998
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20999
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21000
gl_next_as_first_directive='<'sys/stat.h'>'
21002
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21003
gl_next_as_first_directive=$gl_cv_next_sys_stat_h
21005
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
21010
ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
21011
#include <sys/stat.h>
21013
if test "x$ac_cv_type_nlink_t" = x""yes; then :
21017
$as_echo "#define nlink_t int" >>confdefs.h
21044
if test $gl_cv_have_include_next = yes; then
21045
gl_cv_next_unistd_h='<'unistd.h'>'
21047
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
21048
$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
21049
if test "${gl_cv_next_unistd_h+set}" = set; then :
21050
$as_echo_n "(cached) " >&6
21053
if test $ac_cv_header_unistd_h = yes; then
21054
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21055
/* end confdefs.h. */
21056
#include <unistd.h>
21060
aix*) gl_absname_cpp="$ac_cpp -C" ;;
21061
*) gl_absname_cpp="$ac_cpp" ;;
21063
gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21064
sed -n '\#/unistd.h#{
21065
s#.*"\(.*/unistd.h\)".*#\1#
21071
gl_cv_next_unistd_h='<'unistd.h'>'
21075
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
21076
$as_echo "$gl_cv_next_unistd_h" >&6; }
21078
NEXT_UNISTD_H=$gl_cv_next_unistd_h
21080
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21081
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21082
gl_next_as_first_directive='<'unistd.h'>'
21084
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21085
gl_next_as_first_directive=$gl_cv_next_unistd_h
21087
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive