9256
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9257
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9258
if ${ac_cv_c_bigendian+:} false; then :
9259
$as_echo_n "(cached) " >&6
9261
ac_cv_c_bigendian=unknown
9262
# See if we're dealing with a universal compiler.
9263
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9264
/* end confdefs.h. */
9265
#ifndef __APPLE_CC__
9266
not a universal capable compiler
9271
if ac_fn_c_try_compile "$LINENO"; then :
9273
# Check for potential -arch flags. It is not universal unless
9274
# there are at least two -arch flags with different values.
9277
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9278
if test -n "$ac_prev"; then
9280
i?86 | x86_64 | ppc | ppc64)
9281
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9284
ac_cv_c_bigendian=universal
9290
elif test "x$ac_word" = "x-arch"; then
9295
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9296
if test $ac_cv_c_bigendian = unknown; then
9297
# See if sys/param.h defines the BYTE_ORDER macro.
9298
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9299
/* end confdefs.h. */
9300
#include <sys/types.h>
9301
#include <sys/param.h>
9306
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9307
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9316
if ac_fn_c_try_compile "$LINENO"; then :
9317
# It does; now see whether it defined to BIG_ENDIAN or not.
9318
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9319
/* end confdefs.h. */
9320
#include <sys/types.h>
9321
#include <sys/param.h>
9326
#if BYTE_ORDER != BIG_ENDIAN
9334
if ac_fn_c_try_compile "$LINENO"; then :
9335
ac_cv_c_bigendian=yes
9337
ac_cv_c_bigendian=no
9339
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9341
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9343
if test $ac_cv_c_bigendian = unknown; then
9344
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9345
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9346
/* end confdefs.h. */
9352
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9360
if ac_fn_c_try_compile "$LINENO"; then :
9361
# It does; now see whether it defined to _BIG_ENDIAN or not.
9362
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9363
/* end confdefs.h. */
9377
if ac_fn_c_try_compile "$LINENO"; then :
9378
ac_cv_c_bigendian=yes
9380
ac_cv_c_bigendian=no
9382
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9384
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9386
if test $ac_cv_c_bigendian = unknown; then
9387
# Compile a test program.
9388
if test "$cross_compiling" = yes; then :
9389
# Try to guess by grepping values from an object file.
9390
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391
/* end confdefs.h. */
9392
short int ascii_mm[] =
9393
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9394
short int ascii_ii[] =
9395
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9396
int use_ascii (int i) {
9397
return ascii_mm[i] + ascii_ii[i];
9399
short int ebcdic_ii[] =
9400
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9401
short int ebcdic_mm[] =
9402
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9403
int use_ebcdic (int i) {
9404
return ebcdic_mm[i] + ebcdic_ii[i];
9411
return use_ascii (foo) == use_ebcdic (foo);
9416
if ac_fn_c_try_compile "$LINENO"; then :
9417
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9418
ac_cv_c_bigendian=yes
9420
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9421
if test "$ac_cv_c_bigendian" = unknown; then
9422
ac_cv_c_bigendian=no
9424
# finding both strings is unlikely to happen, but who knows?
9425
ac_cv_c_bigendian=unknown
9429
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9431
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9432
/* end confdefs.h. */
9433
$ac_includes_default
9438
/* Are we little or big endian? From Harbison&Steele. */
9442
char c[sizeof (long int)];
9445
return u.c[sizeof (long int) - 1] == 1;
9451
if ac_fn_c_try_run "$LINENO"; then :
9452
ac_cv_c_bigendian=no
9454
ac_cv_c_bigendian=yes
9456
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9457
conftest.$ac_objext conftest.beam conftest.$ac_ext
9462
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9463
$as_echo "$ac_cv_c_bigendian" >&6; }
9464
case $ac_cv_c_bigendian in #(
9466
$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9472
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9476
as_fn_error $? "unknown endianness
9477
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9487
9779
GNULIB_FDOPENDIR=0;
9488
9780
GNULIB_SCANDIR=0;
9489
9781
GNULIB_ALPHASORT=0;
9491
9787
HAVE_DECL_FDOPENDIR=1;
9492
9788
HAVE_FDOPENDIR=1;
9493
9789
HAVE_SCANDIR=1;
9494
9790
HAVE_ALPHASORT=1;
9495
9792
REPLACE_CLOSEDIR=0;
9496
9793
REPLACE_DIRFD=0;
9497
9794
REPLACE_FDOPENDIR=0;
9797
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9798
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9799
if ${ac_cv_c_bigendian+:} false; then :
9800
$as_echo_n "(cached) " >&6
9802
ac_cv_c_bigendian=unknown
9803
# See if we're dealing with a universal compiler.
9804
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805
/* end confdefs.h. */
9806
#ifndef __APPLE_CC__
9807
not a universal capable compiler
9812
if ac_fn_c_try_compile "$LINENO"; then :
9814
# Check for potential -arch flags. It is not universal unless
9815
# there are at least two -arch flags with different values.
9818
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9819
if test -n "$ac_prev"; then
9821
i?86 | x86_64 | ppc | ppc64)
9822
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9825
ac_cv_c_bigendian=universal
9831
elif test "x$ac_word" = "x-arch"; then
9836
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9837
if test $ac_cv_c_bigendian = unknown; then
9838
# See if sys/param.h defines the BYTE_ORDER macro.
9839
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9840
/* end confdefs.h. */
9841
#include <sys/types.h>
9842
#include <sys/param.h>
9847
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9848
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9857
if ac_fn_c_try_compile "$LINENO"; then :
9858
# It does; now see whether it defined to BIG_ENDIAN or not.
9859
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9860
/* end confdefs.h. */
9861
#include <sys/types.h>
9862
#include <sys/param.h>
9867
#if BYTE_ORDER != BIG_ENDIAN
9875
if ac_fn_c_try_compile "$LINENO"; then :
9876
ac_cv_c_bigendian=yes
9878
ac_cv_c_bigendian=no
9880
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9882
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9884
if test $ac_cv_c_bigendian = unknown; then
9885
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9886
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9887
/* end confdefs.h. */
9893
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9901
if ac_fn_c_try_compile "$LINENO"; then :
9902
# It does; now see whether it defined to _BIG_ENDIAN or not.
9903
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9904
/* end confdefs.h. */
9918
if ac_fn_c_try_compile "$LINENO"; then :
9919
ac_cv_c_bigendian=yes
9921
ac_cv_c_bigendian=no
9923
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9925
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9927
if test $ac_cv_c_bigendian = unknown; then
9928
# Compile a test program.
9929
if test "$cross_compiling" = yes; then :
9930
# Try to guess by grepping values from an object file.
9931
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9932
/* end confdefs.h. */
9933
short int ascii_mm[] =
9934
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9935
short int ascii_ii[] =
9936
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9937
int use_ascii (int i) {
9938
return ascii_mm[i] + ascii_ii[i];
9940
short int ebcdic_ii[] =
9941
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9942
short int ebcdic_mm[] =
9943
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9944
int use_ebcdic (int i) {
9945
return ebcdic_mm[i] + ebcdic_ii[i];
9952
return use_ascii (foo) == use_ebcdic (foo);
9957
if ac_fn_c_try_compile "$LINENO"; then :
9958
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9959
ac_cv_c_bigendian=yes
9961
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9962
if test "$ac_cv_c_bigendian" = unknown; then
9963
ac_cv_c_bigendian=no
9965
# finding both strings is unlikely to happen, but who knows?
9966
ac_cv_c_bigendian=unknown
9970
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9972
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9973
/* end confdefs.h. */
9974
$ac_includes_default
9979
/* Are we little or big endian? From Harbison&Steele. */
9983
char c[sizeof (long int)];
9986
return u.c[sizeof (long int) - 1] == 1;
9992
if ac_fn_c_try_run "$LINENO"; then :
9993
ac_cv_c_bigendian=no
9995
ac_cv_c_bigendian=yes
9997
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9998
conftest.$ac_objext conftest.beam conftest.$ac_ext
10003
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10004
$as_echo "$ac_cv_c_bigendian" >&6; }
10005
case $ac_cv_c_bigendian in #(
10007
$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10013
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10017
as_fn_error $? "unknown endianness
10018
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10075
ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
10076
if test "x$ac_cv_func_getgroups" = xyes; then :
10081
# If we don't yet have getgroups, see if it's in -lbsd.
10082
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
10084
if test $ac_cv_func_getgroups = no; then
10085
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
10086
$as_echo_n "checking for getgroups in -lbsd... " >&6; }
10087
if ${ac_cv_lib_bsd_getgroups+:} false; then :
10088
$as_echo_n "(cached) " >&6
10090
ac_check_lib_save_LIBS=$LIBS
10092
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10093
/* end confdefs.h. */
10095
/* Override any GCC internal prototype to avoid an error.
10096
Use char because int might match the return type of a GCC
10097
builtin and then its argument prototype would still apply. */
10105
return getgroups ();
10110
if ac_fn_c_try_link "$LINENO"; then :
10111
ac_cv_lib_bsd_getgroups=yes
10113
ac_cv_lib_bsd_getgroups=no
10115
rm -f core conftest.err conftest.$ac_objext \
10116
conftest$ac_exeext conftest.$ac_ext
10117
LIBS=$ac_check_lib_save_LIBS
10119
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
10120
$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
10121
if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
10122
GETGROUPS_LIB=-lbsd
10127
# Run the program to test the functionality of the system-supplied
10128
# getgroups function only if there is such a function.
10129
if test $ac_cv_func_getgroups = yes; then
10130
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
10131
$as_echo_n "checking for working getgroups... " >&6; }
10132
if ${ac_cv_func_getgroups_works+:} false; then :
10133
$as_echo_n "(cached) " >&6
10135
if test "$cross_compiling" = yes; then :
10136
ac_cv_func_getgroups_works=no
10138
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139
/* end confdefs.h. */
10140
$ac_includes_default
10144
/* On Ultrix 4.3, getgroups (0, 0) always fails. */
10145
return getgroups (0, 0) == -1;
10150
if ac_fn_c_try_run "$LINENO"; then :
10151
ac_cv_func_getgroups_works=yes
10153
ac_cv_func_getgroups_works=no
10155
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10156
conftest.$ac_objext conftest.beam conftest.$ac_ext
10161
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
10162
$as_echo "$ac_cv_func_getgroups_works" >&6; }
10164
ac_cv_func_getgroups_works=no
10166
if test $ac_cv_func_getgroups_works = yes; then
10168
$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
10175
GNULIB_NONBLOCKING=0;
10625
ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
10627
if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
10629
cat >>confdefs.h <<_ACEOF
10630
#define HAVE_SIG_ATOMIC_T 1
10636
$as_echo "#define sig_atomic_t int" >>confdefs.h
10641
ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10642
if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10648
cat >>confdefs.h <<_ACEOF
10649
#define HAVE_DECL_FCHDIR $ac_have_decl
10185
10653
GNULIB_FCHMODAT=0;
10186
10655
GNULIB_FSTATAT=0;
10187
10656
GNULIB_FUTIMENS=0;
10188
10657
GNULIB_LCHMOD=0;
10229
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10230
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10231
if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
10232
$as_echo_n "(cached) " >&6
10234
rm -f conftest.sym conftest.file
10235
echo >conftest.file
10236
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
10237
if test "$cross_compiling" = yes; then :
10238
# When cross-compiling, be pessimistic so we will end up using the
10239
# replacement version of lstat that checks for trailing slashes and
10240
# calls lstat a second time when necessary.
10241
gl_cv_func_lstat_dereferences_slashed_symlink=no
10244
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10245
/* end confdefs.h. */
10246
$ac_includes_default
10251
/* Linux will dereference the symlink and fail, as required by
10252
POSIX. That is better in the sense that it means we will not
10253
have to compile and use the lstat wrapper. */
10254
return lstat ("conftest.sym/", &sbuf) == 0;
10260
if ac_fn_c_try_run "$LINENO"; then :
10261
gl_cv_func_lstat_dereferences_slashed_symlink=yes
10263
gl_cv_func_lstat_dereferences_slashed_symlink=no
10265
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10266
conftest.$ac_objext conftest.beam conftest.$ac_ext
10270
# If the 'ln -s' command failed, then we probably don't even
10271
# have an lstat function.
10272
gl_cv_func_lstat_dereferences_slashed_symlink=no
10274
rm -f conftest.sym conftest.file
10277
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
10278
$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10279
test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
10281
cat >>confdefs.h <<_ACEOF
10282
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10289
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
10290
$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
10291
if ${gl_cv_func_unlink_honors_slashes+:} false; then :
10292
$as_echo_n "(cached) " >&6
10294
touch conftest.file
10295
# Assume that if we have lstat, we can also check symlinks.
10296
if test $ac_cv_func_lstat = yes; then
10297
ln -s conftest.file conftest.lnk
10299
if test "$cross_compiling" = yes; then :
10300
gl_cv_func_unlink_honors_slashes="guessing no"
10302
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10303
/* end confdefs.h. */
10304
#include <unistd.h>
10311
if (!unlink ("conftest.file/"))
10313
else if (errno != ENOTDIR)
10316
if (!unlink ("conftest.lnk/"))
10318
else if (errno != ENOTDIR)
10327
if ac_fn_c_try_run "$LINENO"; then :
10328
gl_cv_func_unlink_honors_slashes=yes
10330
gl_cv_func_unlink_honors_slashes=no
10332
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10333
conftest.$ac_objext conftest.beam conftest.$ac_ext
10336
rm -f conftest.file conftest.lnk
10338
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
10339
$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
10340
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
10341
$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
10342
if ${gl_cv_func_unlink_parent_fails+:} false; then :
10343
$as_echo_n "(cached) " >&6
10348
# Use the mktemp program if available. If not available, hide the error
10350
tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
10351
test -n "$tmp" && test -d "$tmp"
10354
# Use a simple mkdir command. It is guaranteed to fail if the directory
10355
# already exists. $RANDOM is bash specific and expands to empty in shells
10356
# other than bash, ksh and zsh. Its use does not increase security;
10357
# rather, it minimizes the probability of failure in a very cluttered /tmp
10359
tmp=/tmp/gt$$-$RANDOM
10360
(umask 077 && mkdir "$tmp")
10362
mkdir "$tmp/subdir"
10363
GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
10364
export GL_SUBDIR_FOR_UNLINK
10365
if test "$cross_compiling" = yes; then :
10366
gl_cv_func_unlink_parent_fails="guessing no"
10368
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10369
/* end confdefs.h. */
10371
#include <stdlib.h>
10372
#include <unistd.h>
10376
if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
10378
else if (unlink ("..") == 0)
10384
if ac_fn_c_try_run "$LINENO"; then :
10385
gl_cv_func_unlink_parent_fails=yes
10387
gl_cv_func_unlink_parent_fails=no
10389
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10390
conftest.$ac_objext conftest.beam conftest.$ac_ext
10393
unset GL_SUBDIR_FOR_UNLINK
10396
gl_cv_func_unlink_parent_fails="guessing no"
10400
gl_cv_func_unlink_parent_fails="guessing yes"
10405
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
10406
$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
10407
case "$gl_cv_func_unlink_parent_fails" in
10410
$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
10414
if test "$gl_cv_func_unlink_honors_slashes" != yes \
10415
|| { case "$gl_cv_func_unlink_parent_fails" in
10423
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10424
if test "x$ac_cv_type_mode_t" = xyes; then :
10428
cat >>confdefs.h <<_ACEOF
10436
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
10437
$as_echo_n "checking for promoted mode_t type... " >&6; }
10438
if ${gl_cv_promoted_mode_t+:} false; then :
10439
$as_echo_n "(cached) " >&6
10442
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443
/* end confdefs.h. */
10444
#include <sys/types.h>
10448
typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
10453
if ac_fn_c_try_compile "$LINENO"; then :
10454
gl_cv_promoted_mode_t='int'
10456
gl_cv_promoted_mode_t='mode_t'
10458
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10461
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
10462
$as_echo "$gl_cv_promoted_mode_t" >&6; }
10464
cat >>confdefs.h <<_ACEOF
10465
#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
10488
case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
10490
# GNU/Hurd has unlinkat, but it has the same bug as unlink.
10491
if test $REPLACE_UNLINK = 1; then
10495
# Solaris 9 has *at functions, but uniformly mishandles trailing
10496
# slash in all of them.
10502
HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
10509
if test $ac_cv_func_fchmodat != yes; then
10512
if test $ac_cv_func_mkdirat != yes; then
10518
ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
10519
if test "x$ac_cv_func_fchownat" = xyes; then :
10523
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
10524
$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
10525
if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
10526
$as_echo_n "(cached) " >&6
10529
gl_dangle=conftest.dangle
10530
# Remove any remnants of a previous test.
10532
# Arrange for deletion of the temporary file this test creates.
10533
ac_clean_files="$ac_clean_files $gl_dangle"
10534
ln -s conftest.no-such $gl_dangle
10535
if test "$cross_compiling" = yes; then :
10536
gl_cv_func_fchownat_nofollow_works=no
10538
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10539
/* end confdefs.h. */
10542
#include <unistd.h>
10543
#include <stdlib.h>
10545
#include <sys/types.h>
10549
return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
10550
AT_SYMLINK_NOFOLLOW) != 0
10551
&& errno == ENOENT);
10555
if ac_fn_c_try_run "$LINENO"; then :
10556
gl_cv_func_fchownat_nofollow_works=yes
10558
gl_cv_func_fchownat_nofollow_works=no
10560
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10561
conftest.$ac_objext conftest.beam conftest.$ac_ext
10566
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
10567
$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
10568
if test $gl_cv_func_fchownat_nofollow_works = no; then :
10571
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
10579
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
10580
$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
10581
if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
10582
$as_echo_n "(cached) " >&6
10584
if test "$cross_compiling" = yes; then :
10585
gl_cv_func_fchownat_empty_filename_works="guessing no"
10587
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10588
/* end confdefs.h. */
10589
#include <unistd.h>
10597
if (mkdir ("conftestdir", 0700) < 0)
10599
fd = open ("conftestdir", O_RDONLY);
10602
ret = fchownat (fd, "", -1, -1, 0);
10604
rmdir ("conftestdir");
10611
if ac_fn_c_try_run "$LINENO"; then :
10612
gl_cv_func_fchownat_empty_filename_works=yes
10614
gl_cv_func_fchownat_empty_filename_works=no
10616
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10617
conftest.$ac_objext conftest.beam conftest.$ac_ext
10622
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
10623
$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
10624
if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
10627
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
10632
if test $REPLACE_CHOWN = 1; then
10646
if test $ac_cv_func_fstatat = no; then
10649
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
10650
$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
10651
if ${gl_cv_func_fstatat_zero_flag+:} false; then :
10652
$as_echo_n "(cached) " >&6
10654
gl_cv_func_fstatat_zero_flag=no
10655
if test "$cross_compiling" = yes; then :
10656
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10657
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10658
as_fn_error $? "cannot run test program while cross compiling
10659
See \`config.log' for more details" "$LINENO" 5; }
10661
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662
/* end confdefs.h. */
10665
#include <sys/stat.h>
10670
return fstatat (AT_FDCWD, ".", &a, 0) != 0;
10674
if ac_fn_c_try_run "$LINENO"; then :
10675
gl_cv_func_fstatat_zero_flag=yes
10677
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10678
conftest.$ac_objext conftest.beam conftest.$ac_ext
10682
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
10683
$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
10685
case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
10687
*) REPLACE_FSTATAT=1
10688
if test $gl_cv_func_fstatat_zero_flag != yes; then
10690
$as_echo "#define FSTATAT_ZERO_FLAG_BROKEN 1" >>confdefs.h
10702
ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10703
if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10709
cat >>confdefs.h <<_ACEOF
10710
#define HAVE_DECL_FCHDIR $ac_have_decl
10714
10692
GNULIB_DPRINTF=0;
10715
10693
GNULIB_FCLOSE=0;
10716
10695
GNULIB_FFLUSH=0;
10717
10696
GNULIB_FGETC=0;
10718
10697
GNULIB_FGETS=0;
11796
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11797
$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11798
if ${ac_cv_header_stat_broken+:} false; then :
11799
$as_echo_n "(cached) " >&6
11801
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11802
/* end confdefs.h. */
11803
#include <sys/types.h>
11804
#include <sys/stat.h>
11806
#if defined S_ISBLK && defined S_IFDIR
11807
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11810
#if defined S_ISBLK && defined S_IFCHR
11811
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11814
#if defined S_ISLNK && defined S_IFREG
11815
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11818
#if defined S_ISSOCK && defined S_IFREG
11819
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11823
if ac_fn_c_try_compile "$LINENO"; then :
11824
ac_cv_header_stat_broken=no
11826
ac_cv_header_stat_broken=yes
11828
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11830
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11831
$as_echo "$ac_cv_header_stat_broken" >&6; }
11832
if test $ac_cv_header_stat_broken = yes; then
11834
$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11856
if test $gl_cv_have_include_next = yes; then
11857
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11859
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11860
$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11861
if ${gl_cv_next_sys_stat_h+:} false; then :
11862
$as_echo_n "(cached) " >&6
11865
if test $ac_cv_header_sys_stat_h = yes; then
11868
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11869
/* end confdefs.h. */
11870
#include <sys/stat.h>
11874
aix*) gl_absname_cpp="$ac_cpp -C" ;;
11875
*) gl_absname_cpp="$ac_cpp" ;;
11880
gl_dirsep_regex='[/\\]'
11883
gl_dirsep_regex='\/'
11886
gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11888
gl_header_literal_regex=`echo 'sys/stat.h' \
11889
| sed -e "$gl_make_literal_regex_sed"`
11890
gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11891
s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11896
gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11897
sed -n "$gl_absolute_header_sed"`'"'
11899
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11904
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11905
$as_echo "$gl_cv_next_sys_stat_h" >&6; }
11907
NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11909
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11910
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11911
gl_next_as_first_directive='<'sys/stat.h'>'
11913
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11914
gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11916
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11928
if test $WINDOWS_64_BIT_ST_SIZE = 1; then
11930
$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11934
ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11935
#include <sys/stat.h>
11937
if test "x$ac_cv_type_nlink_t" = xyes; then :
11941
$as_echo "#define nlink_t int" >>confdefs.h
11949
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11950
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11951
if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11952
$as_echo_n "(cached) " >&6
11954
rm -f conftest.sym conftest.file
11955
echo >conftest.file
11956
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
11957
if test "$cross_compiling" = yes; then :
11959
# Guess yes on glibc systems.
11960
*-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11961
# If we don't know, assume the worst.
11962
*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11966
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967
/* end confdefs.h. */
11968
$ac_includes_default
11973
/* Linux will dereference the symlink and fail, as required by
11974
POSIX. That is better in the sense that it means we will not
11975
have to compile and use the lstat wrapper. */
11976
return lstat ("conftest.sym/", &sbuf) == 0;
11982
if ac_fn_c_try_run "$LINENO"; then :
11983
gl_cv_func_lstat_dereferences_slashed_symlink=yes
11985
gl_cv_func_lstat_dereferences_slashed_symlink=no
11987
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11988
conftest.$ac_objext conftest.beam conftest.$ac_ext
11992
# If the 'ln -s' command failed, then we probably don't even
11993
# have an lstat function.
11994
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11996
rm -f conftest.sym conftest.file
11999
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
12000
$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12001
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
12004
cat >>confdefs.h <<_ACEOF
12005
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
12871
if test -z "$gl_replace_getopt"; then
13556
if test -z "$gl_replace_getopt"; then
12872
13557
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12873
13558
$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
12874
13559
if ${gl_cv_func_getopt_posix+:} false; then :
12875
13560
$as_echo_n "(cached) " >&6
12878
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12879
/* end confdefs.h. */
12880
#include <unistd.h>
12884
int *p = &optreset; return optreset;
12889
if ac_fn_c_try_link "$LINENO"; then :
12892
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893
/* end confdefs.h. */
12894
#include <getopt.h>
12898
return !getopt_clip;
12903
if ac_fn_c_try_compile "$LINENO"; then :
12908
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12910
rm -f core conftest.err conftest.$ac_objext \
12911
conftest$ac_exeext conftest.$ac_ext
12913
gl_save_CPPFLAGS=$CPPFLAGS
12914
CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
12915
if test "$cross_compiling" = yes; then :
12917
mingw*) gl_cv_func_getopt_posix="guessing no";;
12918
darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
12919
*) gl_cv_func_getopt_posix="guessing yes";;
12923
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12924
/* end confdefs.h. */
12926
#include <unistd.h>
12927
#include <stdlib.h>
12928
#include <string.h>
12934
static char program[] = "program";
12935
static char a[] = "-a";
12936
static char foo[] = "foo";
12937
static char bar[] = "bar";
12938
char *argv[] = { program, a, foo, bar, NULL };
12941
optind = OPTIND_MIN;
12944
c = getopt (4, argv, "ab");
12947
c = getopt (4, argv, "ab");
12950
if (!(optind == 2))
12953
/* Some internal state exists at this point. */
12955
static char program[] = "program";
12956
static char donald[] = "donald";
12957
static char p[] = "-p";
12958
static char billy[] = "billy";
12959
static char duck[] = "duck";
12960
static char a[] = "-a";
12961
static char bar[] = "bar";
12962
char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12965
optind = OPTIND_MIN;
12968
c = getopt (7, argv, "+abp:q:");
12971
if (!(strcmp (argv[0], "program") == 0))
12973
if (!(strcmp (argv[1], "donald") == 0))
12975
if (!(strcmp (argv[2], "-p") == 0))
12977
if (!(strcmp (argv[3], "billy") == 0))
12979
if (!(strcmp (argv[4], "duck") == 0))
12981
if (!(strcmp (argv[5], "-a") == 0))
12983
if (!(strcmp (argv[6], "bar") == 0))
12985
if (!(optind == 1))
12988
/* Detect MacOS 10.5, AIX 7.1 bug. */
12990
static char program[] = "program";
12991
static char ab[] = "-ab";
12992
char *argv[3] = { program, ab, NULL };
12993
optind = OPTIND_MIN;
12995
if (getopt (2, argv, "ab:") != 'a')
12997
if (getopt (2, argv, "ab:") != '?')
13563
if test $cross_compiling = no; then
13564
if test "$cross_compiling" = yes; then :
13565
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13566
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13567
as_fn_error $? "cannot run test program while cross compiling
13568
See \`config.log' for more details" "$LINENO" 5; }
13570
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571
/* end confdefs.h. */
13573
#include <unistd.h>
13574
#include <stdlib.h>
13575
#include <string.h>
13580
static char program[] = "program";
13581
static char a[] = "-a";
13582
static char foo[] = "foo";
13583
static char bar[] = "bar";
13584
char *argv[] = { program, a, foo, bar, NULL };
13587
c = getopt (4, argv, "ab");
13590
c = getopt (4, argv, "ab");
13593
if (!(optind == 2))
13599
if ac_fn_c_try_run "$LINENO"; then :
13600
gl_cv_func_getopt_posix=maybe
13602
gl_cv_func_getopt_posix=no
13604
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13605
conftest.$ac_objext conftest.beam conftest.$ac_ext
13608
if test $gl_cv_func_getopt_posix = maybe; then
13609
if test "$cross_compiling" = yes; then :
13610
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13611
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13612
as_fn_error $? "cannot run test program while cross compiling
13613
See \`config.log' for more details" "$LINENO" 5; }
13615
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13616
/* end confdefs.h. */
13618
#include <unistd.h>
13619
#include <stdlib.h>
13620
#include <string.h>
13625
static char program[] = "program";
13626
static char donald[] = "donald";
13627
static char p[] = "-p";
13628
static char billy[] = "billy";
13629
static char duck[] = "duck";
13630
static char a[] = "-a";
13631
static char bar[] = "bar";
13632
char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13635
c = getopt (7, argv, "+abp:q:");
13638
if (!(strcmp (argv[0], "program") == 0))
13640
if (!(strcmp (argv[1], "donald") == 0))
13642
if (!(strcmp (argv[2], "-p") == 0))
13644
if (!(strcmp (argv[3], "billy") == 0))
13646
if (!(strcmp (argv[4], "duck") == 0))
13648
if (!(strcmp (argv[5], "-a") == 0))
13650
if (!(strcmp (argv[6], "bar") == 0))
13652
if (!(optind == 1))
13658
if ac_fn_c_try_run "$LINENO"; then :
13659
gl_cv_func_getopt_posix=maybe
13661
gl_cv_func_getopt_posix=no
13663
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13664
conftest.$ac_objext conftest.beam conftest.$ac_ext
13668
if test $gl_cv_func_getopt_posix = maybe; then
13669
if test "$cross_compiling" = yes; then :
13670
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13671
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13672
as_fn_error $? "cannot run test program while cross compiling
13673
See \`config.log' for more details" "$LINENO" 5; }
13675
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676
/* end confdefs.h. */
13678
#include <unistd.h>
13679
#include <stdlib.h>
13680
#include <string.h>
13685
static char program[] = "program";
13686
static char ab[] = "-ab";
13687
char *argv[3] = { program, ab, NULL };
13688
if (getopt (2, argv, "ab:") != 'a')
13690
if (getopt (2, argv, "ab:") != '?')
16317
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16318
$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16319
if ${gl_cv_cc_double_expbit0+:} false; then :
16320
$as_echo_n "(cached) " >&6
16323
if test "$cross_compiling" = yes; then :
16325
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16326
/* end confdefs.h. */
16328
#if defined arm || defined __arm || defined __arm__
16333
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16334
$EGREP "mixed_endianness" >/dev/null 2>&1; then :
16335
gl_cv_cc_double_expbit0="unknown"
16339
if ${ac_cv_c_bigendian+:} false; then :
16340
$as_echo_n "(cached) " >&6
16342
ac_cv_c_bigendian=unknown
16343
# See if we're dealing with a universal compiler.
16344
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16345
/* end confdefs.h. */
16346
#ifndef __APPLE_CC__
16347
not a universal capable compiler
16352
if ac_fn_c_try_compile "$LINENO"; then :
16354
# Check for potential -arch flags. It is not universal unless
16355
# there are at least two -arch flags with different values.
16358
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16359
if test -n "$ac_prev"; then
16361
i?86 | x86_64 | ppc | ppc64)
16362
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16365
ac_cv_c_bigendian=universal
16371
elif test "x$ac_word" = "x-arch"; then
16376
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16377
if test $ac_cv_c_bigendian = unknown; then
16378
# See if sys/param.h defines the BYTE_ORDER macro.
16379
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16380
/* end confdefs.h. */
16381
#include <sys/types.h>
16382
#include <sys/param.h>
16387
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16388
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16390
bogus endian macros
16397
if ac_fn_c_try_compile "$LINENO"; then :
16398
# It does; now see whether it defined to BIG_ENDIAN or not.
16399
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16400
/* end confdefs.h. */
16401
#include <sys/types.h>
16402
#include <sys/param.h>
16407
#if BYTE_ORDER != BIG_ENDIAN
16415
if ac_fn_c_try_compile "$LINENO"; then :
16416
ac_cv_c_bigendian=yes
16418
ac_cv_c_bigendian=no
16420
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16422
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16424
if test $ac_cv_c_bigendian = unknown; then
16425
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16426
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427
/* end confdefs.h. */
16428
#include <limits.h>
16433
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16434
bogus endian macros
16441
if ac_fn_c_try_compile "$LINENO"; then :
16442
# It does; now see whether it defined to _BIG_ENDIAN or not.
16443
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16444
/* end confdefs.h. */
16445
#include <limits.h>
16450
#ifndef _BIG_ENDIAN
16458
if ac_fn_c_try_compile "$LINENO"; then :
16459
ac_cv_c_bigendian=yes
16461
ac_cv_c_bigendian=no
16463
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16465
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16467
if test $ac_cv_c_bigendian = unknown; then
16468
# Compile a test program.
16469
if test "$cross_compiling" = yes; then :
16470
# Try to guess by grepping values from an object file.
16471
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16472
/* end confdefs.h. */
16473
short int ascii_mm[] =
16474
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16475
short int ascii_ii[] =
16476
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16477
int use_ascii (int i) {
16478
return ascii_mm[i] + ascii_ii[i];
16480
short int ebcdic_ii[] =
16481
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16482
short int ebcdic_mm[] =
16483
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16484
int use_ebcdic (int i) {
16485
return ebcdic_mm[i] + ebcdic_ii[i];
16492
return use_ascii (foo) == use_ebcdic (foo);
16497
if ac_fn_c_try_compile "$LINENO"; then :
16498
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16499
ac_cv_c_bigendian=yes
16501
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16502
if test "$ac_cv_c_bigendian" = unknown; then
16503
ac_cv_c_bigendian=no
16505
# finding both strings is unlikely to happen, but who knows?
16506
ac_cv_c_bigendian=unknown
16510
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16512
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16513
/* end confdefs.h. */
16514
$ac_includes_default
16519
/* Are we little or big endian? From Harbison&Steele. */
16523
char c[sizeof (long int)];
16526
return u.c[sizeof (long int) - 1] == 1;
16532
if ac_fn_c_try_run "$LINENO"; then :
16533
ac_cv_c_bigendian=no
16535
ac_cv_c_bigendian=yes
16537
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16538
conftest.$ac_objext conftest.beam conftest.$ac_ext
16544
case $ac_cv_c_bigendian in #(
16546
gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16548
gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16551
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16555
gl_cv_cc_double_expbit0="unknown" ;;
16564
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16565
/* end confdefs.h. */
16568
#include <stddef.h>
16570
#include <string.h>
16572
((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16573
typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16574
static unsigned int ored_words[NWORDS];
16575
static unsigned int anded_words[NWORDS];
16576
static void add_to_ored_words (double x)
16580
/* Clear it first, in case sizeof (double) < sizeof (memory_double). */
16581
memset (&m, 0, sizeof (memory_double));
16583
for (i = 0; i < NWORDS; i++)
16585
ored_words[i] |= m.word[i];
16586
anded_words[i] &= m.word[i];
16592
FILE *fp = fopen ("conftest.out", "w");
16595
for (j = 0; j < NWORDS; j++)
16596
anded_words[j] = ~ (unsigned int) 0;
16597
add_to_ored_words (0.25);
16598
add_to_ored_words (0.5);
16599
add_to_ored_words (1.0);
16600
add_to_ored_words (2.0);
16601
add_to_ored_words (4.0);
16602
/* Remove bits that are common (e.g. if representation of the first mantissa
16603
bit is explicit). */
16604
for (j = 0; j < NWORDS; j++)
16605
ored_words[j] &= ~anded_words[j];
16606
/* Now find the nonzero word. */
16607
for (j = 0; j < NWORDS; j++)
16608
if (ored_words[j] != 0)
16613
for (i = j + 1; i < NWORDS; i++)
16614
if (ored_words[i] != 0)
16616
fprintf (fp, "unknown");
16617
return (fclose (fp) != 0);
16620
if ((ored_words[j] >> i) & 1)
16622
fprintf (fp, "word %d bit %d", (int) j, (int) i);
16623
return (fclose (fp) != 0);
16626
fprintf (fp, "unknown");
16627
return (fclose (fp) != 0);
16631
if ac_fn_c_try_run "$LINENO"; then :
16632
gl_cv_cc_double_expbit0=`cat conftest.out`
16634
gl_cv_cc_double_expbit0="unknown"
16636
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16637
conftest.$ac_objext conftest.beam conftest.$ac_ext
16643
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16644
$as_echo "$gl_cv_cc_double_expbit0" >&6; }
16645
case "$gl_cv_cc_double_expbit0" in
16647
word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16648
bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16650
cat >>confdefs.h <<_ACEOF
16651
#define DBL_EXPBIT0_WORD $word
16655
cat >>confdefs.h <<_ACEOF
16656
#define DBL_EXPBIT0_BIT $bit
15504
16663
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
15505
16664
$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
15506
16665
if ${gl_cv_cc_float_expbit0+:} false; then :
20373
GNULIB_POSIX_SPAWN=0;
20374
GNULIB_POSIX_SPAWNP=0;
20375
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
20376
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
20377
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
20378
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
20379
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
20380
GNULIB_POSIX_SPAWNATTR_INIT=0;
20381
GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
20382
GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
20383
GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
20384
GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
20385
GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
20386
GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
20387
GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
20388
GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
20389
GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
20390
GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
20391
GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
20392
GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
20393
GNULIB_POSIX_SPAWNATTR_DESTROY=0;
20394
HAVE_POSIX_SPAWN=1;
20395
HAVE_POSIX_SPAWNATTR_T=1;
20396
HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
20398
REPLACE_POSIX_SPAWN=0;
20399
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
20401
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
20403
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
20412
if test $ac_cv_func_posix_spawn != yes; then
20419
if test $ac_cv_func_posix_spawn = yes; then
20422
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
20423
$as_echo_n "checking whether posix_spawn works... " >&6; }
20424
if ${gl_cv_func_posix_spawn_works+:} false; then :
20425
$as_echo_n "(cached) " >&6
20427
if test $cross_compiling = no; then
20428
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20429
/* end confdefs.h. */
20433
#include <signal.h>
20435
#include <stdbool.h>
20437
#include <stdlib.h>
20438
#include <string.h>
20439
#include <unistd.h>
20440
#include <sys/types.h>
20441
#include <sys/wait.h>
20443
extern char **environ;
20445
#ifndef STDIN_FILENO
20446
# define STDIN_FILENO 0
20448
#ifndef STDOUT_FILENO
20449
# define STDOUT_FILENO 1
20451
#ifndef STDERR_FILENO
20452
# define STDERR_FILENO 2
20456
# define WTERMSIG(x) ((x) & 0x7f)
20459
# define WIFEXITED(x) (WTERMSIG (x) == 0)
20461
#ifndef WEXITSTATUS
20462
# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
20465
#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
20470
if (0 <= fd && fd <= 2)
20472
int f = fd_safer (dup (fd));
20485
char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
20487
sigset_t blocked_signals;
20488
sigset_t fatal_signal_set;
20489
posix_spawn_file_actions_t actions;
20490
bool actions_allocated;
20491
posix_spawnattr_t attrs;
20492
bool attrs_allocated;
20498
setvbuf (stdout, NULL, _IOFBF, 0);
20499
puts ("This should be seen only once.");
20500
if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
20502
perror ("cannot create pipe");
20505
sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
20506
sigemptyset (&fatal_signal_set);
20507
sigaddset (&fatal_signal_set, SIGINT);
20508
sigaddset (&fatal_signal_set, SIGTERM);
20509
sigaddset (&fatal_signal_set, SIGHUP);
20510
sigaddset (&fatal_signal_set, SIGPIPE);
20511
sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
20512
actions_allocated = false;
20513
attrs_allocated = false;
20514
if ((err = posix_spawn_file_actions_init (&actions)) != 0
20515
|| (actions_allocated = true,
20516
(err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
20517
|| (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
20518
|| (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
20519
|| (err = posix_spawnattr_init (&attrs)) != 0
20520
|| (attrs_allocated = true,
20521
(err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
20522
|| (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
20523
|| (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
20525
if (actions_allocated)
20526
posix_spawn_file_actions_destroy (&actions);
20527
if (attrs_allocated)
20528
posix_spawnattr_destroy (&attrs);
20529
sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
20535
perror ("subprocess failed");
20539
posix_spawn_file_actions_destroy (&actions);
20540
posix_spawnattr_destroy (&attrs);
20541
sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
20545
while (waitpid (child, &status, 0) != child)
20547
if (!WIFEXITED (status))
20549
fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
20552
exitstatus = WEXITSTATUS (status);
20553
if (exitstatus != 127)
20555
fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
20562
if ac_fn_c_try_link "$LINENO"; then :
20563
if test -s conftest$ac_exeext \
20564
&& ./conftest$ac_exeext > conftest.out \
20565
&& echo 'This should be seen only once.' > conftest.ok \
20566
&& cmp conftest.out conftest.ok > /dev/null; then
20567
gl_cv_func_posix_spawn_works=yes
20569
gl_cv_func_posix_spawn_works=no
20572
gl_cv_func_posix_spawn_works=no
20574
rm -f core conftest.err conftest.$ac_objext \
20575
conftest$ac_exeext conftest.$ac_ext
20576
if test $gl_cv_func_posix_spawn_works = yes; then
20577
if test "$cross_compiling" = yes; then :
20578
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20579
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20580
as_fn_error $? "cannot run test program while cross compiling
20581
See \`config.log' for more details" "$LINENO" 5; }
20583
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20584
/* end confdefs.h. */
20586
/* Test whether posix_spawn_file_actions_addopen supports filename arguments
20587
that contain special characters such as '*'. */
20591
#include <signal.h>
20593
#include <stdbool.h>
20595
#include <string.h>
20596
#include <unistd.h>
20597
#include <sys/types.h>
20598
#include <sys/wait.h>
20600
extern char **environ;
20602
#ifndef STDIN_FILENO
20603
# define STDIN_FILENO 0
20605
#ifndef STDOUT_FILENO
20606
# define STDOUT_FILENO 1
20608
#ifndef STDERR_FILENO
20609
# define STDERR_FILENO 2
20613
# define WTERMSIG(x) ((x) & 0x7f)
20616
# define WIFEXITED(x) (WTERMSIG (x) == 0)
20618
#ifndef WEXITSTATUS
20619
# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
20622
#define CHILD_PROGRAM_FILENAME "conftest"
20623
#define DATA_FILENAME "conftest%=*#?"
20629
char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
20630
posix_spawn_file_actions_t actions;
20631
bool actions_allocated;
20637
/* Create a data file with specific contents. */
20638
fp = fopen (DATA_FILENAME, "wb");
20641
perror ("cannot create data file");
20644
fwrite ("Halle Potta", 1, 11, fp);
20645
if (fflush (fp) || fclose (fp))
20647
perror ("cannot prepare data file");
20651
/* Avoid reading from our stdin, as it could block. */
20652
freopen ("/dev/null", "rb", stdin);
20654
/* Test whether posix_spawn_file_actions_addopen with this file name
20655
actually works, but spawning a child that reads from this file. */
20656
actions_allocated = false;
20657
if ((err = posix_spawn_file_actions_init (&actions)) != 0
20658
|| (actions_allocated = true,
20659
(err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
20660
|| (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
20662
if (actions_allocated)
20663
posix_spawn_file_actions_destroy (&actions);
20665
perror ("subprocess failed");
20668
posix_spawn_file_actions_destroy (&actions);
20670
while (waitpid (child, &status, 0) != child)
20672
if (!WIFEXITED (status))
20674
fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
20677
exitstatus = WEXITSTATUS (status);
20678
if (exitstatus != 0)
20680
fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
20691
/* See if reading from STDIN_FILENO yields the expected contents. */
20692
if (fread (buf, 1, sizeof (buf), stdin) == 11
20693
&& memcmp (buf, "Halle Potta", 11) == 0)
20700
cleanup_then_die (int sig)
20702
/* Clean up data file. */
20703
unlink (DATA_FILENAME);
20705
/* Re-raise the signal and die from it. */
20706
signal (sig, SIG_DFL);
20711
main (int argc, char *argv[])
20715
if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
20717
/* This is the parent process. */
20718
signal (SIGINT, cleanup_then_die);
20719
signal (SIGTERM, cleanup_then_die);
20721
signal (SIGHUP, cleanup_then_die);
20724
exitstatus = parent_main ();
20728
/* This is the child process. */
20730
exitstatus = child_main ();
20732
unlink (DATA_FILENAME);
20737
if ac_fn_c_try_run "$LINENO"; then :
20740
gl_cv_func_posix_spawn_works=no
20742
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20743
conftest.$ac_objext conftest.beam conftest.$ac_ext
20749
aix*) gl_cv_func_posix_spawn_works="guessing no";;
20750
*) gl_cv_func_posix_spawn_works="guessing yes";;
20755
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
20756
$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
20758
case "$gl_cv_func_posix_spawn_works" in
20761
$as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
20763
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
20764
$as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
20765
if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
20766
$as_echo_n "(cached) " >&6
20768
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20769
/* end confdefs.h. */
20772
#if POSIX_SPAWN_SETSCHEDULER
20773
POSIX scheduling supported
20777
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20778
$EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
20779
gl_cv_func_spawnattr_setschedpolicy=yes
20781
gl_cv_func_spawnattr_setschedpolicy=no
20787
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
20788
$as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
20789
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
20790
$as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
20791
if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
20792
$as_echo_n "(cached) " >&6
20794
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795
/* end confdefs.h. */
20798
#if POSIX_SPAWN_SETSCHEDPARAM
20799
POSIX scheduling supported
20803
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20804
$EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
20805
gl_cv_func_spawnattr_setschedparam=yes
20807
gl_cv_func_spawnattr_setschedparam=no
20813
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
20814
$as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
20816
*) REPLACE_POSIX_SPAWN=1 ;;
19158
20821
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for desired default level of POSIX conformance" >&5
19159
20822
$as_echo_n "checking for desired default level of POSIX conformance... " >&6; }
19160
20823
gl_default_posix2_version=none-specified
19237
20953
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
19238
20954
$as_echo "$gl_cv_func_rmdir_works" >&6; }
19239
if test x"$gl_cv_func_rmdir_works" != xyes; then
19243
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19244
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
19245
if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
19246
$as_echo_n "(cached) " >&6
19248
rm -f conftest.sym conftest.file
19249
echo >conftest.file
19250
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
19251
if test "$cross_compiling" = yes; then :
19252
ac_cv_func_lstat_dereferences_slashed_symlink=no
19254
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19255
/* end confdefs.h. */
19256
$ac_includes_default
19261
/* Linux will dereference the symlink and fail, as required by POSIX.
19262
That is better in the sense that it means we will not
19263
have to compile and use the lstat wrapper. */
19264
return lstat ("conftest.sym/", &sbuf) == 0;
19269
if ac_fn_c_try_run "$LINENO"; then :
19270
ac_cv_func_lstat_dereferences_slashed_symlink=yes
19272
ac_cv_func_lstat_dereferences_slashed_symlink=no
19274
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19275
conftest.$ac_objext conftest.beam conftest.$ac_ext
19279
# If the `ln -s' command failed, then we probably don't even
19280
# have an lstat function.
19281
ac_cv_func_lstat_dereferences_slashed_symlink=no
19283
rm -f conftest.sym conftest.file
19286
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
19287
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19289
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
19291
cat >>confdefs.h <<_ACEOF
19292
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19296
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
19305
gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19309
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5
19310
$as_echo_n "checking whether lstat accepts an empty string... " >&6; }
19311
if ${ac_cv_func_lstat_empty_string_bug+:} false; then :
19312
$as_echo_n "(cached) " >&6
19314
if test "$cross_compiling" = yes; then :
19315
ac_cv_func_lstat_empty_string_bug=yes
19317
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19318
/* end confdefs.h. */
19319
$ac_includes_default
19324
return lstat ("", &sbuf) == 0;
19329
if ac_fn_c_try_run "$LINENO"; then :
19330
ac_cv_func_lstat_empty_string_bug=no
19332
ac_cv_func_lstat_empty_string_bug=yes
19334
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19335
conftest.$ac_objext conftest.beam conftest.$ac_ext
19339
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5
19340
$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; }
19341
if test $ac_cv_func_lstat_empty_string_bug = yes; then
19350
gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19353
cat >>confdefs.h <<_ACEOF
19354
#define HAVE_LSTAT_EMPTY_STRING_BUG 1
20955
case "$gl_cv_func_rmdir_works" in
20967
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
20968
$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
20969
if ${gl_cv_func_unlink_honors_slashes+:} false; then :
20970
$as_echo_n "(cached) " >&6
20972
touch conftest.file
20973
# Assume that if we have lstat, we can also check symlinks.
20974
if test $ac_cv_func_lstat = yes; then
20975
ln -s conftest.file conftest.lnk
20977
if test "$cross_compiling" = yes; then :
20979
# Guess yes on glibc systems.
20980
*-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
20981
# If we don't know, assume the worst.
20982
*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
20986
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20987
/* end confdefs.h. */
20989
# include <unistd.h>
20990
#else /* on Windows with MSVC */
20999
if (!unlink ("conftest.file/"))
21001
else if (errno != ENOTDIR)
21004
if (!unlink ("conftest.lnk/"))
21006
else if (errno != ENOTDIR)
21015
if ac_fn_c_try_run "$LINENO"; then :
21016
gl_cv_func_unlink_honors_slashes=yes
21018
gl_cv_func_unlink_honors_slashes=no
21020
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21021
conftest.$ac_objext conftest.beam conftest.$ac_ext
21024
rm -f conftest.file conftest.lnk
21026
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
21027
$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
21028
case "$gl_cv_func_unlink_honors_slashes" in
21034
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
21035
$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
21036
if ${gl_cv_func_unlink_parent_fails+:} false; then :
21037
$as_echo_n "(cached) " >&6
21042
# Use the mktemp program if available. If not available, hide the error
21044
tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
21045
test -n "$tmp" && test -d "$tmp"
21048
# Use a simple mkdir command. It is guaranteed to fail if the directory
21049
# already exists. $RANDOM is bash specific and expands to empty in shells
21050
# other than bash, ksh and zsh. Its use does not increase security;
21051
# rather, it minimizes the probability of failure in a very cluttered /tmp
21053
tmp=/tmp/gt$$-$RANDOM
21054
(umask 077 && mkdir "$tmp")
21056
mkdir "$tmp/subdir"
21057
GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
21058
export GL_SUBDIR_FOR_UNLINK
21059
if test "$cross_compiling" = yes; then :
21060
# If we don't know, assume the worst.
21061
gl_cv_func_unlink_parent_fails="guessing no"
21064
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21065
/* end confdefs.h. */
21067
#include <stdlib.h>
21069
# include <unistd.h>
21070
#else /* on Windows with MSVC */
21071
# include <direct.h>
21077
if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
21079
else if (unlink ("..") == 0)
21085
if ac_fn_c_try_run "$LINENO"; then :
21086
gl_cv_func_unlink_parent_fails=yes
21088
gl_cv_func_unlink_parent_fails=no
21090
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21091
conftest.$ac_objext conftest.beam conftest.$ac_ext
21094
unset GL_SUBDIR_FOR_UNLINK
21097
gl_cv_func_unlink_parent_fails="guessing no"
21101
gl_cv_func_unlink_parent_fails="guessing yes"
21106
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
21107
$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
21108
case "$gl_cv_func_unlink_parent_fails" in
21112
$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
19936
for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
19937
as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19938
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19939
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19940
if eval \${$as_gl_Symbol+:} false; then :
21708
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
21709
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
21710
# irrelevant for anonymous mappings.
21711
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
21712
if test "x$ac_cv_func_mmap" = xyes; then :
21719
# Try to allow MAP_ANONYMOUS.
21720
gl_have_mmap_anonymous=no
21721
if test $gl_have_mmap = yes; then
21722
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
21723
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
21724
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21725
/* end confdefs.h. */
21727
#include <sys/mman.h>
21728
#ifdef MAP_ANONYMOUS
21729
I cannot identify this map
21733
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21734
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
21735
gl_have_mmap_anonymous=yes
21739
if test $gl_have_mmap_anonymous != yes; then
21740
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21741
/* end confdefs.h. */
21743
#include <sys/mman.h>
21745
I cannot identify this map
21749
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21750
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
21752
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
21754
gl_have_mmap_anonymous=yes
21759
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
21760
$as_echo "$gl_have_mmap_anonymous" >&6; }
21761
if test $gl_have_mmap_anonymous = yes; then
21763
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
21771
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strncat works" >&5
21772
$as_echo_n "checking whether strncat works... " >&6; }
21773
if ${gl_cv_func_strncat_works+:} false; then :
19941
21774
$as_echo_n "(cached) " >&6
21776
if test "$cross_compiling" = yes; then :
21779
# Guess no on Solaris.
21780
solaris*) gl_cv_func_strncat_works="guessing no";;
21781
# Guess yes otherwise.
21782
*) gl_cv_func_strncat_works="guessing yes";;
19943
21786
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19944
21787
/* end confdefs.h. */
19945
21789
#include <string.h>
21790
#if HAVE_SYS_MMAN_H
21791
# include <fcntl.h>
21792
# include <unistd.h>
21793
# include <sys/types.h>
21794
# include <sys/mman.h>
21796
# define MAP_FILE 0
21804
char *fence = NULL;
21805
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
21806
# if HAVE_MAP_ANONYMOUS
21807
const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
21809
# else /* !HAVE_MAP_ANONYMOUS */
21810
const int flags = MAP_FILE | MAP_PRIVATE;
21811
int fd = open ("/dev/zero", O_RDONLY, 0666);
21815
int pagesize = getpagesize ();
21817
(char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
21819
if (two_pages != (char *)(-1)
21820
&& mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
21821
fence = two_pages + pagesize;
21836
*(fence - 3) = '7';
21837
*(fence - 2) = '2';
21838
*(fence - 1) = '9';
21840
if (strncat (dest + 1, fence - 3, 3) != dest + 1)
21842
if (dest[0] != '*')
21845
|| dest[2] != '7' || dest[3] != '2' || dest[4] != '9'
21846
|| dest[5] != '\0')
21848
if (dest[6] != 'z')
19956
if ac_fn_c_try_compile "$LINENO"; then :
19957
eval "$as_gl_Symbol=yes"
21857
if ac_fn_c_try_run "$LINENO"; then :
21858
gl_cv_func_strncat_works=yes
19959
eval "$as_gl_Symbol=no"
19961
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19963
eval ac_res=\$$as_gl_Symbol
19964
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19965
$as_echo "$ac_res" >&6; }
19966
if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19967
cat >>confdefs.h <<_ACEOF
19968
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19971
eval ac_cv_have_decl_$gl_func=yes
21860
gl_cv_func_strncat_works=no
21862
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21863
conftest.$ac_objext conftest.beam conftest.$ac_ext
21868
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strncat_works" >&5
21869
$as_echo "$gl_cv_func_strncat_works" >&6; }
21870
case "$gl_cv_func_strncat_works" in
21872
*) REPLACE_STRNCAT=1 ;;
19976
21875
ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
19977
21876
if test "x$ac_cv_have_decl_strndup" = xyes; then :
24588
# Solaris 9 needs -lgen to get the eaccess function.
26644
for ac_header in libgen.h
26646
ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
26647
if test "x$ac_cv_header_libgen_h" = xyes; then :
26648
cat >>confdefs.h <<_ACEOF
26649
#define HAVE_LIBGEN_H 1
26657
ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
26658
if test "x$ac_cv_func_getgroups" = xyes; then :
26663
# If we don't yet have getgroups, see if it's in -lbsd.
26664
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
26666
if test $ac_cv_func_getgroups = no; then
26667
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
26668
$as_echo_n "checking for getgroups in -lbsd... " >&6; }
26669
if ${ac_cv_lib_bsd_getgroups+:} false; then :
26670
$as_echo_n "(cached) " >&6
26672
ac_check_lib_save_LIBS=$LIBS
26674
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26675
/* end confdefs.h. */
26677
/* Override any GCC internal prototype to avoid an error.
26678
Use char because int might match the return type of a GCC
26679
builtin and then its argument prototype would still apply. */
26687
return getgroups ();
26692
if ac_fn_c_try_link "$LINENO"; then :
26693
ac_cv_lib_bsd_getgroups=yes
26695
ac_cv_lib_bsd_getgroups=no
26697
rm -f core conftest.err conftest.$ac_objext \
26698
conftest$ac_exeext conftest.$ac_ext
26699
LIBS=$ac_check_lib_save_LIBS
26701
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
26702
$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
26703
if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
26704
GETGROUPS_LIB=-lbsd
26709
# Run the program to test the functionality of the system-supplied
26710
# getgroups function only if there is such a function.
26711
if test $ac_cv_func_getgroups = yes; then
26712
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
26713
$as_echo_n "checking for working getgroups... " >&6; }
26714
if ${ac_cv_func_getgroups_works+:} false; then :
26715
$as_echo_n "(cached) " >&6
26717
if test "$cross_compiling" = yes; then :
26718
case "$host_os" in # ((
26719
# Guess yes on glibc systems.
26720
*-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
26721
# If we don't know, assume the worst.
26722
*) ac_cv_func_getgroups_works="guessing no" ;;
26726
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26727
/* end confdefs.h. */
26728
$ac_includes_default
26732
/* On Ultrix 4.3, getgroups (0, 0) always fails. */
26733
return getgroups (0, 0) == -1;
26739
if ac_fn_c_try_run "$LINENO"; then :
26740
ac_cv_func_getgroups_works=yes
26742
ac_cv_func_getgroups_works=no
26744
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26745
conftest.$ac_objext conftest.beam conftest.$ac_ext
26750
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
26751
$as_echo "$ac_cv_func_getgroups_works" >&6; }
26753
ac_cv_func_getgroups_works=no
26755
case "$ac_cv_func_getgroups_works" in
26758
$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
26765
# Solaris 9 and 10 need -lgen to get the eaccess function.
24589
26766
# Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
24590
26767
# programs in the package would end up linked with that potentially-shared
24591
26768
# library, inducing unnecessary run-time overhead.
27017
if test $ac_cv_func_fchmodat != yes; then
27021
if test $HAVE_FCHMODAT = 0; then
27030
gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
27035
cat >>confdefs.h <<_ACEOF
27036
#define GNULIB_FCHMODAT 1
27050
$as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
27058
ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
27059
if test "x$ac_cv_func_fchownat" = xyes; then :
27063
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
27064
$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
27065
if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
27066
$as_echo_n "(cached) " >&6
27069
gl_dangle=conftest.dangle
27070
# Remove any remnants of a previous test.
27072
# Arrange for deletion of the temporary file this test creates.
27073
ac_clean_files="$ac_clean_files $gl_dangle"
27074
ln -s conftest.no-such $gl_dangle
27075
if test "$cross_compiling" = yes; then :
27076
gl_cv_func_fchownat_nofollow_works=no
27078
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27079
/* end confdefs.h. */
27082
#include <unistd.h>
27083
#include <stdlib.h>
27085
#include <sys/types.h>
27089
return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
27090
AT_SYMLINK_NOFOLLOW) != 0
27091
&& errno == ENOENT);
27095
if ac_fn_c_try_run "$LINENO"; then :
27096
gl_cv_func_fchownat_nofollow_works=yes
27098
gl_cv_func_fchownat_nofollow_works=no
27100
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27101
conftest.$ac_objext conftest.beam conftest.$ac_ext
27106
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
27107
$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
27108
if test $gl_cv_func_fchownat_nofollow_works = no; then :
27111
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
27119
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
27120
$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
27121
if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
27122
$as_echo_n "(cached) " >&6
27124
if test "$cross_compiling" = yes; then :
27125
gl_cv_func_fchownat_empty_filename_works="guessing no"
27127
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27128
/* end confdefs.h. */
27129
#include <unistd.h>
27137
if (mkdir ("conftestdir", 0700) < 0)
27139
fd = open ("conftestdir", O_RDONLY);
27142
ret = fchownat (fd, "", -1, -1, 0);
27144
rmdir ("conftestdir");
27151
if ac_fn_c_try_run "$LINENO"; then :
27152
gl_cv_func_fchownat_empty_filename_works=yes
27154
gl_cv_func_fchownat_empty_filename_works=no
27156
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27157
conftest.$ac_objext conftest.beam conftest.$ac_ext
27162
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
27163
$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
27164
if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
27167
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
27172
if test $REPLACE_CHOWN = 1; then
27180
if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
27189
gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
27194
cat >>confdefs.h <<_ACEOF
27195
#define GNULIB_FCHOWNAT 1
27209
$as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
24813
27218
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
24814
27219
$as_echo_n "checking whether fflush works on input streams... " >&6; }
24815
27220
if ${gl_cv_func_fflush_stdin+:} false; then :
27618
if test $ac_cv_have_decl_fdatasync = no; then
27619
HAVE_DECL_FDATASYNC=0
27620
for ac_func in fdatasync
27622
ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
27623
if test "x$ac_cv_func_fdatasync" = xyes; then :
27624
cat >>confdefs.h <<_ACEOF
27625
#define HAVE_FDATASYNC 1
27631
if test $ac_cv_func_fdatasync = no; then
27635
gl_saved_libs=$LIBS
27636
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
27637
$as_echo_n "checking for library containing fdatasync... " >&6; }
27638
if ${ac_cv_search_fdatasync+:} false; then :
27639
$as_echo_n "(cached) " >&6
27641
ac_func_search_save_LIBS=$LIBS
27642
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27643
/* end confdefs.h. */
27645
/* Override any GCC internal prototype to avoid an error.
27646
Use char because int might match the return type of a GCC
27647
builtin and then its argument prototype would still apply. */
27655
return fdatasync ();
27660
for ac_lib in '' rt posix4; do
27661
if test -z "$ac_lib"; then
27662
ac_res="none required"
27665
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27667
if ac_fn_c_try_link "$LINENO"; then :
27668
ac_cv_search_fdatasync=$ac_res
27670
rm -f core conftest.err conftest.$ac_objext \
27672
if ${ac_cv_search_fdatasync+:} false; then :
27676
if ${ac_cv_search_fdatasync+:} false; then :
27679
ac_cv_search_fdatasync=no
27681
rm conftest.$ac_ext
27682
LIBS=$ac_func_search_save_LIBS
27684
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
27685
$as_echo "$ac_cv_search_fdatasync" >&6; }
27686
ac_res=$ac_cv_search_fdatasync
27687
if test "$ac_res" != no; then :
27688
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27689
test "$ac_cv_search_fdatasync" = "none required" ||
27690
LIB_FDATASYNC=$ac_cv_search_fdatasync
27693
LIBS=$gl_saved_libs
27696
if test $HAVE_FDATASYNC = 0; then
27705
gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
27719
$as_echo "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
27726
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27729
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
27730
$as_echo_n "checking whether fdopen sets errno... " >&6; }
27731
if ${gl_cv_func_fdopen_works+:} false; then :
27732
$as_echo_n "(cached) " >&6
27735
if test "$cross_compiling" = yes; then :
27737
mingw*) gl_cv_func_fdopen_works="guessing no" ;;
27738
*) gl_cv_func_fdopen_works="guessing yes" ;;
27742
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27743
/* end confdefs.h. */
27752
fp = fdopen (-1, "r");
27753
if (fp == NULL && errno == 0)
27758
if ac_fn_c_try_run "$LINENO"; then :
27759
gl_cv_func_fdopen_works=yes
27761
gl_cv_func_fdopen_works=no
27763
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27764
conftest.$ac_objext conftest.beam conftest.$ac_ext
27769
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
27770
$as_echo "$gl_cv_func_fdopen_works" >&6; }
27771
case "$gl_cv_func_fdopen_works" in
27772
*no) REPLACE_FDOPEN=1 ;;
27776
if test $REPLACE_FDOPEN = 1; then
27785
gl_LIBOBJS="$gl_LIBOBJS fdopen.$ac_objext"
27800
$as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
25225
27809
ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
25226
27810
#include <dirent.h>
30504
if test $ac_cv_func_ftruncate = yes; then
30509
REPLACE_FTRUNCATE=1
30517
if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
30526
gl_LIBOBJS="$gl_LIBOBJS ftruncate.$ac_objext"
30530
for ac_func in chsize
30532
ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
30533
if test "x$ac_cv_func_chsize" = xyes; then :
30534
cat >>confdefs.h <<_ACEOF
30535
#define HAVE_CHSIZE 1
30554
$as_echo "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
27539
30566
case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
27541
# GNU/Hurd has unlinkat, but it has the same bug as unlink.
27542
if test $REPLACE_UNLINK = 1; then
27546
30570
# Solaris 9 has *at functions, but uniformly mishandles trailing
27547
30571
# slash in all of them.
27548
30572
REPLACE_OPENAT=1
27552
30575
HAVE_OPENAT=0
27553
HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
27560
if test $ac_cv_func_fchmodat != yes; then
27563
if test $ac_cv_func_mkdirat != yes; then
27569
ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
27570
if test "x$ac_cv_func_fchownat" = xyes; then :
27574
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
27575
$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
27576
if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
27577
$as_echo_n "(cached) " >&6
27580
gl_dangle=conftest.dangle
27581
# Remove any remnants of a previous test.
27583
# Arrange for deletion of the temporary file this test creates.
27584
ac_clean_files="$ac_clean_files $gl_dangle"
27585
ln -s conftest.no-such $gl_dangle
27586
if test "$cross_compiling" = yes; then :
27587
gl_cv_func_fchownat_nofollow_works=no
27589
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27590
/* end confdefs.h. */
27593
#include <unistd.h>
27594
#include <stdlib.h>
27596
#include <sys/types.h>
27600
return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
27601
AT_SYMLINK_NOFOLLOW) != 0
27602
&& errno == ENOENT);
27606
if ac_fn_c_try_run "$LINENO"; then :
27607
gl_cv_func_fchownat_nofollow_works=yes
27609
gl_cv_func_fchownat_nofollow_works=no
27611
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27612
conftest.$ac_objext conftest.beam conftest.$ac_ext
27617
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
27618
$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
27619
if test $gl_cv_func_fchownat_nofollow_works = no; then :
27622
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
27630
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
27631
$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
27632
if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
27633
$as_echo_n "(cached) " >&6
27635
if test "$cross_compiling" = yes; then :
27636
gl_cv_func_fchownat_empty_filename_works="guessing no"
27638
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27639
/* end confdefs.h. */
27640
#include <unistd.h>
27648
if (mkdir ("conftestdir", 0700) < 0)
27650
fd = open ("conftestdir", O_RDONLY);
27653
ret = fchownat (fd, "", -1, -1, 0);
27655
rmdir ("conftestdir");
27662
if ac_fn_c_try_run "$LINENO"; then :
27663
gl_cv_func_fchownat_empty_filename_works=yes
27665
gl_cv_func_fchownat_empty_filename_works=no
27667
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27668
conftest.$ac_objext conftest.beam conftest.$ac_ext
27673
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
27674
$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
27675
if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
27678
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
27683
if test $REPLACE_CHOWN = 1; then
27697
if test $ac_cv_func_fstatat = no; then
27700
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
27701
$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
27702
if ${gl_cv_func_fstatat_zero_flag+:} false; then :
27703
$as_echo_n "(cached) " >&6
27705
gl_cv_func_fstatat_zero_flag=no
27706
if test "$cross_compiling" = yes; then :
27707
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27708
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27709
as_fn_error $? "cannot run test program while cross compiling
27710
See \`config.log' for more details" "$LINENO" 5; }
27712
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27713
/* end confdefs.h. */
27716
#include <sys/stat.h>
27721
return fstatat (AT_FDCWD, ".", &a, 0) != 0;
27725
if ac_fn_c_try_run "$LINENO"; then :
27726
gl_cv_func_fstatat_zero_flag=yes
27728
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27729
conftest.$ac_objext conftest.beam conftest.$ac_ext
27733
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
27734
$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
27736
case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
27738
*) REPLACE_FSTATAT=1
27739
if test $gl_cv_func_fstatat_zero_flag != yes; then
27741
$as_echo "#define FSTATAT_ZERO_FLAG_BROKEN 1" >>confdefs.h
28918
if test "$ac_cv_func_getgroups" != yes; then
31838
ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
31839
if test "x$ac_cv_func_getgroups" = xyes; then :
31844
# If we don't yet have getgroups, see if it's in -lbsd.
31845
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
31847
if test $ac_cv_func_getgroups = no; then
31848
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
31849
$as_echo_n "checking for getgroups in -lbsd... " >&6; }
31850
if ${ac_cv_lib_bsd_getgroups+:} false; then :
31851
$as_echo_n "(cached) " >&6
31853
ac_check_lib_save_LIBS=$LIBS
31855
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31856
/* end confdefs.h. */
31858
/* Override any GCC internal prototype to avoid an error.
31859
Use char because int might match the return type of a GCC
31860
builtin and then its argument prototype would still apply. */
31868
return getgroups ();
31873
if ac_fn_c_try_link "$LINENO"; then :
31874
ac_cv_lib_bsd_getgroups=yes
31876
ac_cv_lib_bsd_getgroups=no
31878
rm -f core conftest.err conftest.$ac_objext \
31879
conftest$ac_exeext conftest.$ac_ext
31880
LIBS=$ac_check_lib_save_LIBS
31882
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
31883
$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
31884
if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
31885
GETGROUPS_LIB=-lbsd
31890
# Run the program to test the functionality of the system-supplied
31891
# getgroups function only if there is such a function.
31892
if test $ac_cv_func_getgroups = yes; then
31893
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
31894
$as_echo_n "checking for working getgroups... " >&6; }
31895
if ${ac_cv_func_getgroups_works+:} false; then :
31896
$as_echo_n "(cached) " >&6
31898
if test "$cross_compiling" = yes; then :
31899
case "$host_os" in # ((
31900
# Guess yes on glibc systems.
31901
*-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
31902
# If we don't know, assume the worst.
31903
*) ac_cv_func_getgroups_works="guessing no" ;;
31907
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31908
/* end confdefs.h. */
31909
$ac_includes_default
31913
/* On Ultrix 4.3, getgroups (0, 0) always fails. */
31914
return getgroups (0, 0) == -1;
31920
if ac_fn_c_try_run "$LINENO"; then :
31921
ac_cv_func_getgroups_works=yes
31923
ac_cv_func_getgroups_works=no
31925
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31926
conftest.$ac_objext conftest.beam conftest.$ac_ext
31931
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
31932
$as_echo "$ac_cv_func_getgroups_works" >&6; }
31934
ac_cv_func_getgroups_works=no
31936
case "$ac_cv_func_getgroups_works" in
31939
$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
31945
if test $ac_cv_func_getgroups != yes; then
28919
31946
HAVE_GETGROUPS=0
28920
elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t
28922
REPLACE_GETGROUPS=1
31948
if test "$ac_cv_type_getgroups" != gid_t \
31949
|| { case "$ac_cv_func_getgroups_works" in
31954
REPLACE_GETGROUPS=1
28924
31956
$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28927
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
31959
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28928
31960
$as_echo_n "checking whether getgroups handles negative values... " >&6; }
28929
31961
if ${gl_cv_func_getgroups_works+:} false; then :
28930
31962
$as_echo_n "(cached) " >&6
28932
31964
if test "$cross_compiling" = yes; then :
28933
gl_cv_func_getgroups_works="guessing no"
31966
# Guess yes on glibc systems.
31967
*-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
31968
# If we don't know, assume the worst.
31969
*) gl_cv_func_getgroups_works="guessing no" ;;
28935
31973
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28936
31974
/* end confdefs.h. */
31571
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
31572
$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
31573
if ${gl_cv_cc_double_expbit0+:} false; then :
31574
$as_echo_n "(cached) " >&6
31577
if test "$cross_compiling" = yes; then :
31579
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31580
/* end confdefs.h. */
31582
#if defined arm || defined __arm || defined __arm__
31587
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31588
$EGREP "mixed_endianness" >/dev/null 2>&1; then :
31589
gl_cv_cc_double_expbit0="unknown"
31593
if ${ac_cv_c_bigendian+:} false; then :
31594
$as_echo_n "(cached) " >&6
31596
ac_cv_c_bigendian=unknown
31597
# See if we're dealing with a universal compiler.
31598
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31599
/* end confdefs.h. */
31600
#ifndef __APPLE_CC__
31601
not a universal capable compiler
31606
if ac_fn_c_try_compile "$LINENO"; then :
31608
# Check for potential -arch flags. It is not universal unless
31609
# there are at least two -arch flags with different values.
31612
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
31613
if test -n "$ac_prev"; then
31615
i?86 | x86_64 | ppc | ppc64)
31616
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
31619
ac_cv_c_bigendian=universal
31625
elif test "x$ac_word" = "x-arch"; then
31630
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31631
if test $ac_cv_c_bigendian = unknown; then
31632
# See if sys/param.h defines the BYTE_ORDER macro.
31633
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31634
/* end confdefs.h. */
31635
#include <sys/types.h>
31636
#include <sys/param.h>
31641
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
31642
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
31644
bogus endian macros
31651
if ac_fn_c_try_compile "$LINENO"; then :
31652
# It does; now see whether it defined to BIG_ENDIAN or not.
31653
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31654
/* end confdefs.h. */
31655
#include <sys/types.h>
31656
#include <sys/param.h>
31661
#if BYTE_ORDER != BIG_ENDIAN
31669
if ac_fn_c_try_compile "$LINENO"; then :
31670
ac_cv_c_bigendian=yes
31672
ac_cv_c_bigendian=no
31674
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31676
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31678
if test $ac_cv_c_bigendian = unknown; then
31679
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
31680
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31681
/* end confdefs.h. */
31682
#include <limits.h>
31687
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
31688
bogus endian macros
31695
if ac_fn_c_try_compile "$LINENO"; then :
31696
# It does; now see whether it defined to _BIG_ENDIAN or not.
31697
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31698
/* end confdefs.h. */
31699
#include <limits.h>
31704
#ifndef _BIG_ENDIAN
31712
if ac_fn_c_try_compile "$LINENO"; then :
31713
ac_cv_c_bigendian=yes
31715
ac_cv_c_bigendian=no
31717
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31719
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31721
if test $ac_cv_c_bigendian = unknown; then
31722
# Compile a test program.
31723
if test "$cross_compiling" = yes; then :
31724
# Try to guess by grepping values from an object file.
31725
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31726
/* end confdefs.h. */
31727
short int ascii_mm[] =
31728
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
31729
short int ascii_ii[] =
31730
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
31731
int use_ascii (int i) {
31732
return ascii_mm[i] + ascii_ii[i];
31734
short int ebcdic_ii[] =
31735
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
31736
short int ebcdic_mm[] =
31737
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
31738
int use_ebcdic (int i) {
31739
return ebcdic_mm[i] + ebcdic_ii[i];
31746
return use_ascii (foo) == use_ebcdic (foo);
31751
if ac_fn_c_try_compile "$LINENO"; then :
31752
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
31753
ac_cv_c_bigendian=yes
31755
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
31756
if test "$ac_cv_c_bigendian" = unknown; then
31757
ac_cv_c_bigendian=no
31759
# finding both strings is unlikely to happen, but who knows?
31760
ac_cv_c_bigendian=unknown
31764
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31766
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31767
/* end confdefs.h. */
31768
$ac_includes_default
31773
/* Are we little or big endian? From Harbison&Steele. */
31777
char c[sizeof (long int)];
31780
return u.c[sizeof (long int) - 1] == 1;
31786
if ac_fn_c_try_run "$LINENO"; then :
31787
ac_cv_c_bigendian=no
31789
ac_cv_c_bigendian=yes
31791
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31792
conftest.$ac_objext conftest.beam conftest.$ac_ext
31798
case $ac_cv_c_bigendian in #(
31800
gl_cv_cc_double_expbit0="word 0 bit 20";; #(
31802
gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
31805
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
31809
gl_cv_cc_double_expbit0="unknown" ;;
31818
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31819
/* end confdefs.h. */
31822
#include <stddef.h>
31824
#include <string.h>
31826
((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
31827
typedef union { double value; unsigned int word[NWORDS]; } memory_double;
31828
static unsigned int ored_words[NWORDS];
31829
static unsigned int anded_words[NWORDS];
31830
static void add_to_ored_words (double x)
31834
/* Clear it first, in case sizeof (double) < sizeof (memory_double). */
31835
memset (&m, 0, sizeof (memory_double));
31837
for (i = 0; i < NWORDS; i++)
31839
ored_words[i] |= m.word[i];
31840
anded_words[i] &= m.word[i];
31846
FILE *fp = fopen ("conftest.out", "w");
31849
for (j = 0; j < NWORDS; j++)
31850
anded_words[j] = ~ (unsigned int) 0;
31851
add_to_ored_words (0.25);
31852
add_to_ored_words (0.5);
31853
add_to_ored_words (1.0);
31854
add_to_ored_words (2.0);
31855
add_to_ored_words (4.0);
31856
/* Remove bits that are common (e.g. if representation of the first mantissa
31857
bit is explicit). */
31858
for (j = 0; j < NWORDS; j++)
31859
ored_words[j] &= ~anded_words[j];
31860
/* Now find the nonzero word. */
31861
for (j = 0; j < NWORDS; j++)
31862
if (ored_words[j] != 0)
31867
for (i = j + 1; i < NWORDS; i++)
31868
if (ored_words[i] != 0)
31870
fprintf (fp, "unknown");
31871
return (fclose (fp) != 0);
31874
if ((ored_words[j] >> i) & 1)
31876
fprintf (fp, "word %d bit %d", (int) j, (int) i);
31877
return (fclose (fp) != 0);
31880
fprintf (fp, "unknown");
31881
return (fclose (fp) != 0);
31885
if ac_fn_c_try_run "$LINENO"; then :
31886
gl_cv_cc_double_expbit0=`cat conftest.out`
31888
gl_cv_cc_double_expbit0="unknown"
31890
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31891
conftest.$ac_objext conftest.beam conftest.$ac_ext
31897
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
31898
$as_echo "$gl_cv_cc_double_expbit0" >&6; }
31899
case "$gl_cv_cc_double_expbit0" in
31901
word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
31902
bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
31904
cat >>confdefs.h <<_ACEOF
31905
#define DBL_EXPBIT0_WORD $word
31909
cat >>confdefs.h <<_ACEOF
31910
#define DBL_EXPBIT0_BIT $bit
31920
34774
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
35676
38620
gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
38629
if test $ac_cv_func_mkfifo = no; then
38633
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
38634
$as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
38635
if ${gl_cv_func_mkfifo_works+:} false; then :
38636
$as_echo_n "(cached) " >&6
38638
# Assume that if we have lstat, we can also check symlinks.
38639
if test $ac_cv_func_lstat = yes; then
38640
ln -s conftest.tmp conftest.lnk
38642
if test "$cross_compiling" = yes; then :
38644
# Guess yes on glibc systems.
38645
*-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
38646
# If we don't know, assume the worst.
38647
*) gl_cv_func_mkfifo_works="guessing no" ;;
38651
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38652
/* end confdefs.h. */
38653
#include <sys/stat.h>
38659
if (!mkfifo ("conftest.tmp/", 0600))
38662
if (!mkfifo ("conftest.lnk/", 0600))
38671
if ac_fn_c_try_run "$LINENO"; then :
38672
gl_cv_func_mkfifo_works=yes
38674
gl_cv_func_mkfifo_works=no
38676
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38677
conftest.$ac_objext conftest.beam conftest.$ac_ext
38680
rm -f conftest.tmp conftest.lnk
38682
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
38683
$as_echo "$gl_cv_func_mkfifo_works" >&6; }
38684
case "$gl_cv_func_mkfifo_works" in
38688
$as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
38695
if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
38704
gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
38718
$as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
38727
if test $ac_cv_func_mknod = no; then
38730
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
38731
$as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
38732
if ${gl_cv_func_mknod_works+:} false; then :
38733
$as_echo_n "(cached) " >&6
38735
if test "$cross_compiling" = yes; then :
38737
# Guess yes on glibc systems.
38738
*-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
38739
# If we don't know, assume the worst.
38740
*) gl_cv_func_mknod_works="guessing no" ;;
38744
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38745
/* end confdefs.h. */
38746
#include <sys/stat.h>
38747
#include <unistd.h>
38749
/* Copied from root-uid.h. FIXME: Just use root-uid.h. */
38751
# define ROOT_UID 65535
38753
# define ROOT_UID 0
38759
/* Indeterminate for super-user, assume no. Why are you running
38760
configure as root, anyway? */
38761
if (geteuid () == ROOT_UID) return 99;
38762
if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
38767
if ac_fn_c_try_run "$LINENO"; then :
38768
gl_cv_func_mknod_works=yes
38770
if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
38771
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
38772
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
38773
as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
38774
See \`config.log' for more details" "$LINENO" 5; }
38776
gl_cv_func_mknod_works=no
38778
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38779
conftest.$ac_objext conftest.beam conftest.$ac_ext
38782
rm -f conftest.fifo
38784
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
38785
$as_echo "$gl_cv_func_mknod_works" >&6; }
38786
case "$gl_cv_func_mknod_works" in
38791
$as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
38795
if test $REPLACE_MKFIFO = 1; then
38800
if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
38809
gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
38823
$as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
37562
40750
case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
37564
# GNU/Hurd has unlinkat, but it has the same bug as unlink.
37565
if test $REPLACE_UNLINK = 1; then
37569
40754
# Solaris 9 has *at functions, but uniformly mishandles trailing
37570
40755
# slash in all of them.
37571
40756
REPLACE_OPENAT=1
37575
40759
HAVE_OPENAT=0
37576
HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
37583
if test $ac_cv_func_fchmodat != yes; then
37586
if test $ac_cv_func_mkdirat != yes; then
37592
ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
37593
if test "x$ac_cv_func_fchownat" = xyes; then :
37597
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
37598
$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
37599
if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
37600
$as_echo_n "(cached) " >&6
37603
gl_dangle=conftest.dangle
37604
# Remove any remnants of a previous test.
37606
# Arrange for deletion of the temporary file this test creates.
37607
ac_clean_files="$ac_clean_files $gl_dangle"
37608
ln -s conftest.no-such $gl_dangle
37609
if test "$cross_compiling" = yes; then :
37610
gl_cv_func_fchownat_nofollow_works=no
37612
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37613
/* end confdefs.h. */
37616
#include <unistd.h>
37617
#include <stdlib.h>
37619
#include <sys/types.h>
37623
return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
37624
AT_SYMLINK_NOFOLLOW) != 0
37625
&& errno == ENOENT);
37629
if ac_fn_c_try_run "$LINENO"; then :
37630
gl_cv_func_fchownat_nofollow_works=yes
37632
gl_cv_func_fchownat_nofollow_works=no
37634
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37635
conftest.$ac_objext conftest.beam conftest.$ac_ext
37640
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
37641
$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
37642
if test $gl_cv_func_fchownat_nofollow_works = no; then :
37645
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
37653
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
37654
$as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
37655
if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
37656
$as_echo_n "(cached) " >&6
37658
if test "$cross_compiling" = yes; then :
37659
gl_cv_func_fchownat_empty_filename_works="guessing no"
37661
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37662
/* end confdefs.h. */
37663
#include <unistd.h>
37671
if (mkdir ("conftestdir", 0700) < 0)
37673
fd = open ("conftestdir", O_RDONLY);
37676
ret = fchownat (fd, "", -1, -1, 0);
37678
rmdir ("conftestdir");
37685
if ac_fn_c_try_run "$LINENO"; then :
37686
gl_cv_func_fchownat_empty_filename_works=yes
37688
gl_cv_func_fchownat_empty_filename_works=no
37690
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37691
conftest.$ac_objext conftest.beam conftest.$ac_ext
37696
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
37697
$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
37698
if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
37701
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
37706
if test $REPLACE_CHOWN = 1; then
37720
if test $ac_cv_func_fstatat = no; then
37723
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
37724
$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
37725
if ${gl_cv_func_fstatat_zero_flag+:} false; then :
37726
$as_echo_n "(cached) " >&6
37728
gl_cv_func_fstatat_zero_flag=no
37729
if test "$cross_compiling" = yes; then :
37730
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
37731
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
37732
as_fn_error $? "cannot run test program while cross compiling
37733
See \`config.log' for more details" "$LINENO" 5; }
37735
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37736
/* end confdefs.h. */
37739
#include <sys/stat.h>
37744
return fstatat (AT_FDCWD, ".", &a, 0) != 0;
37748
if ac_fn_c_try_run "$LINENO"; then :
37749
gl_cv_func_fstatat_zero_flag=yes
37751
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37752
conftest.$ac_objext conftest.beam conftest.$ac_ext
37756
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
37757
$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
37759
case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
37761
*) REPLACE_FSTATAT=1
37762
if test $gl_cv_func_fstatat_zero_flag != yes; then
37764
$as_echo "#define FSTATAT_ZERO_FLAG_BROKEN 1" >>confdefs.h
37780
gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
37782
if test $HAVE_FCHMODAT = 0; then
37791
gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
37794
if test $ac_cv_func_fstatat = no || test $REPLACE_FSTATAT = 1; then
37803
gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
37806
if test $HAVE_MKDIRAT = 0; then
37815
gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
37818
if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
40763
if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
41154
if test $REPLACE_POSIX_SPAWN = 1; then
41155
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
41157
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
41158
$as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
41159
if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
41160
$as_echo_n "(cached) " >&6
41162
if test "$cross_compiling" = yes; then :
41163
# Guess no on Solaris, yes otherwise.
41165
solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
41166
*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
41170
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41171
/* end confdefs.h. */
41176
posix_spawn_file_actions_t actions;
41177
if (posix_spawn_file_actions_init (&actions) != 0)
41179
if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
41184
if ac_fn_c_try_run "$LINENO"; then :
41185
gl_cv_func_posix_spawn_file_actions_addclose_works=yes
41187
gl_cv_func_posix_spawn_file_actions_addclose_works=no
41189
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41190
conftest.$ac_objext conftest.beam conftest.$ac_ext
41195
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
41196
$as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
41197
case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
41199
*) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
41203
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
41212
gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
41220
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
41226
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
41236
if test $REPLACE_POSIX_SPAWN = 1; then
41237
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
41239
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
41240
$as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
41241
if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
41242
$as_echo_n "(cached) " >&6
41244
if test "$cross_compiling" = yes; then :
41245
# Guess no on Solaris, yes otherwise.
41247
solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
41248
*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
41252
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41253
/* end confdefs.h. */
41258
posix_spawn_file_actions_t actions;
41259
if (posix_spawn_file_actions_init (&actions) != 0)
41261
if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
41266
if ac_fn_c_try_run "$LINENO"; then :
41267
gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
41269
gl_cv_func_posix_spawn_file_actions_adddup2_works=no
41271
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41272
conftest.$ac_objext conftest.beam conftest.$ac_ext
41277
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
41278
$as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
41279
case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
41281
*) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
41285
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
41294
gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
41302
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
41308
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
41318
if test $REPLACE_POSIX_SPAWN = 1; then
41319
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
41321
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
41322
$as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
41323
if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
41324
$as_echo_n "(cached) " >&6
41326
if test "$cross_compiling" = yes; then :
41327
# Guess no on Solaris, yes otherwise.
41329
solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
41330
*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
41334
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41335
/* end confdefs.h. */
41341
posix_spawn_file_actions_t actions;
41342
if (posix_spawn_file_actions_init (&actions) != 0)
41344
if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
41350
if ac_fn_c_try_run "$LINENO"; then :
41351
gl_cv_func_posix_spawn_file_actions_addopen_works=yes
41353
gl_cv_func_posix_spawn_file_actions_addopen_works=no
41355
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41356
conftest.$ac_objext conftest.beam conftest.$ac_ext
41361
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
41362
$as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
41363
case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
41365
*) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
41369
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
41378
gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
41386
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
41392
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
41399
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41408
gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
41416
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
41422
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
41429
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41438
gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
41446
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
41452
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
41459
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41468
gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
41476
GNULIB_POSIX_SPAWNATTR_DESTROY=1
41482
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
41489
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41498
gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
41506
GNULIB_POSIX_SPAWNATTR_INIT=1
41512
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
41519
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41528
gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
41536
GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
41542
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
41549
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41558
gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
41566
GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
41572
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
41579
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41588
gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
41598
gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
41601
for ac_header in paths.h
41603
ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
41604
if test "x$ac_cv_header_paths_h" = xyes; then :
41605
cat >>confdefs.h <<_ACEOF
41606
#define HAVE_PATHS_H 1
41613
for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
41615
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
41616
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
41617
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
41618
cat >>confdefs.h <<_ACEOF
41619
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
41632
GNULIB_POSIX_SPAWNP=1
41638
$as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
52385
56988
#include <sys/mman.h>
52386
56989
#ifdef MAP_ANONYMOUS
52387
I cant identify this map
52391
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52392
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52393
gl_have_mmap_anonymous=yes
52397
if test $gl_have_mmap_anonymous != yes; then
52398
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52399
/* end confdefs.h. */
52401
#include <sys/mman.h>
52403
I cant identify this map
52407
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52408
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52410
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52412
gl_have_mmap_anonymous=yes
52417
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
52418
$as_echo "$gl_have_mmap_anonymous" >&6; }
52419
if test $gl_have_mmap_anonymous = yes; then
52421
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
52431
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
52432
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
52433
# irrelevant for anonymous mappings.
52434
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
52435
if test "x$ac_cv_func_mmap" = xyes; then :
52442
# Try to allow MAP_ANONYMOUS.
52443
gl_have_mmap_anonymous=no
52444
if test $gl_have_mmap = yes; then
52445
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
52446
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
52447
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52448
/* end confdefs.h. */
52450
#include <sys/mman.h>
52451
#ifdef MAP_ANONYMOUS
52452
I cant identify this map
52456
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52457
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52458
gl_have_mmap_anonymous=yes
52462
if test $gl_have_mmap_anonymous != yes; then
52463
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52464
/* end confdefs.h. */
52466
#include <sys/mman.h>
52468
I cant identify this map
52472
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52473
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52475
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52477
gl_have_mmap_anonymous=yes
52482
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
52483
$as_echo "$gl_have_mmap_anonymous" >&6; }
52484
if test $gl_have_mmap_anonymous = yes; then
52486
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
52496
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
52497
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
52498
# irrelevant for anonymous mappings.
52499
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
52500
if test "x$ac_cv_func_mmap" = xyes; then :
52507
# Try to allow MAP_ANONYMOUS.
52508
gl_have_mmap_anonymous=no
52509
if test $gl_have_mmap = yes; then
52510
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
52511
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
52512
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52513
/* end confdefs.h. */
52515
#include <sys/mman.h>
52516
#ifdef MAP_ANONYMOUS
52517
I cant identify this map
52521
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52522
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52523
gl_have_mmap_anonymous=yes
52527
if test $gl_have_mmap_anonymous != yes; then
52528
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52529
/* end confdefs.h. */
52531
#include <sys/mman.h>
52533
I cant identify this map
52537
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52538
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52540
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52542
gl_have_mmap_anonymous=yes
52547
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
52548
$as_echo "$gl_have_mmap_anonymous" >&6; }
52549
if test $gl_have_mmap_anonymous = yes; then
52551
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
52561
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
52562
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
52563
# irrelevant for anonymous mappings.
52564
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
52565
if test "x$ac_cv_func_mmap" = xyes; then :
52572
# Try to allow MAP_ANONYMOUS.
52573
gl_have_mmap_anonymous=no
52574
if test $gl_have_mmap = yes; then
52575
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
52576
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
52577
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52578
/* end confdefs.h. */
52580
#include <sys/mman.h>
52581
#ifdef MAP_ANONYMOUS
52582
I cant identify this map
52586
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52587
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
52588
gl_have_mmap_anonymous=yes
52592
if test $gl_have_mmap_anonymous != yes; then
52593
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52594
/* end confdefs.h. */
52596
#include <sys/mman.h>
52598
I cant identify this map
52602
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52603
$EGREP "I cant identify this map" >/dev/null 2>&1; then :
56990
I cannot identify this map
56994
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56995
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
56996
gl_have_mmap_anonymous=yes
57000
if test $gl_have_mmap_anonymous != yes; then
57001
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57002
/* end confdefs.h. */
57004
#include <sys/mman.h>
57006
I cannot identify this map
57010
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57011
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
57013
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
57015
gl_have_mmap_anonymous=yes
57020
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
57021
$as_echo "$gl_have_mmap_anonymous" >&6; }
57022
if test $gl_have_mmap_anonymous = yes; then
57024
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
57034
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
57035
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
57036
# irrelevant for anonymous mappings.
57037
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
57038
if test "x$ac_cv_func_mmap" = xyes; then :
57045
# Try to allow MAP_ANONYMOUS.
57046
gl_have_mmap_anonymous=no
57047
if test $gl_have_mmap = yes; then
57048
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
57049
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
57050
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57051
/* end confdefs.h. */
57053
#include <sys/mman.h>
57054
#ifdef MAP_ANONYMOUS
57055
I cannot identify this map
57059
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57060
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
57061
gl_have_mmap_anonymous=yes
57065
if test $gl_have_mmap_anonymous != yes; then
57066
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57067
/* end confdefs.h. */
57069
#include <sys/mman.h>
57071
I cannot identify this map
57075
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57076
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
57078
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
57080
gl_have_mmap_anonymous=yes
57085
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
57086
$as_echo "$gl_have_mmap_anonymous" >&6; }
57087
if test $gl_have_mmap_anonymous = yes; then
57089
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
57099
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
57100
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
57101
# irrelevant for anonymous mappings.
57102
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
57103
if test "x$ac_cv_func_mmap" = xyes; then :
57110
# Try to allow MAP_ANONYMOUS.
57111
gl_have_mmap_anonymous=no
57112
if test $gl_have_mmap = yes; then
57113
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
57114
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
57115
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57116
/* end confdefs.h. */
57118
#include <sys/mman.h>
57119
#ifdef MAP_ANONYMOUS
57120
I cannot identify this map
57124
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57125
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
57126
gl_have_mmap_anonymous=yes
57130
if test $gl_have_mmap_anonymous != yes; then
57131
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57132
/* end confdefs.h. */
57134
#include <sys/mman.h>
57136
I cannot identify this map
57140
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57141
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
57143
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
57145
gl_have_mmap_anonymous=yes
57150
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
57151
$as_echo "$gl_have_mmap_anonymous" >&6; }
57152
if test $gl_have_mmap_anonymous = yes; then
57154
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
57164
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
57165
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
57166
# irrelevant for anonymous mappings.
57167
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
57168
if test "x$ac_cv_func_mmap" = xyes; then :
57175
# Try to allow MAP_ANONYMOUS.
57176
gl_have_mmap_anonymous=no
57177
if test $gl_have_mmap = yes; then
57178
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
57179
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
57180
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57181
/* end confdefs.h. */
57183
#include <sys/mman.h>
57184
#ifdef MAP_ANONYMOUS
57185
I cannot identify this map
57189
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57190
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
57191
gl_have_mmap_anonymous=yes
57195
if test $gl_have_mmap_anonymous != yes; then
57196
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57197
/* end confdefs.h. */
57199
#include <sys/mman.h>
57201
I cannot identify this map
57205
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57206
$EGREP "I cannot identify this map" >/dev/null 2>&1; then :
52605
57208
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
56337
61030
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
56338
61031
$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
61034
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
61035
$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
61036
if ${gl_cv_cc_uninitialized_supported+:} false; then :
61037
$as_echo_n "(cached) " >&6
61040
gl_save_CFLAGS="$CFLAGS"
61041
CFLAGS="$CFLAGS -Werror -Wuninitialized"
61042
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61043
/* end confdefs.h. */
61053
if ac_fn_c_try_compile "$LINENO"; then :
61054
gl_cv_cc_uninitialized_supported=yes
61056
gl_cv_cc_uninitialized_supported=no
61058
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61059
CFLAGS="$gl_save_CFLAGS"
61062
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
61063
$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
61067
# List all gcc warning categories.
56342
61068
gl_manywarn_set=
56343
61069
for gl_manywarn_item in \
61076
-Wbad-function-cast \
61077
-Wbuiltin-macro-redefined \
61079
-Wchar-subscripts \
61083
-Wcoverage-mismatch \
61086
-Wdeprecated-declarations \
61087
-Wdisabled-optimization \
61089
-Wdouble-promotion \
61094
-Wformat-contains-nul \
61095
-Wformat-extra-args \
56347
61096
-Wformat-nonliteral \
56348
61097
-Wformat-security \
61099
-Wformat-zero-length \
61101
-Wfree-nonheap-object \
61102
-Wignored-qualifiers \
61104
-Wimplicit-function-declaration \
56349
61106
-Winit-self \
56350
-Wmissing-include-dirs \
56354
-Wunknown-pragmas \
56355
-Wstrict-aliasing \
56356
-Wstrict-overflow \
56360
-Wtraditional-conversion \
56361
-Wdeclaration-after-statement \
56364
-Wunsafe-loop-optimizations \
56366
-Wbad-function-cast \
56372
-Wsign-conversion \
61108
-Wint-to-pointer-cast \
61109
-Winvalid-memory-model \
61111
-Wjump-misses-init \
56373
61112
-Wlogical-op \
56374
-Waggregate-return \
56375
-Wstrict-prototypes \
56376
-Wold-style-definition \
56377
-Wmissing-prototypes \
61114
-Wmaybe-uninitialized \
56378
61116
-Wmissing-declarations \
61117
-Wmissing-field-initializers \
61118
-Wmissing-format-attribute \
61119
-Wmissing-include-dirs \
56379
61120
-Wmissing-noreturn \
56380
-Wmissing-format-attribute \
56383
-Wredundant-decls \
61121
-Wmissing-parameter-type \
61122
-Wmissing-prototypes \
56384
61126
-Wnested-externs \
56385
-Wunreachable-code \
56390
-Wvolatile-register-var \
56391
-Wdisabled-optimization \
56392
-Wstack-protector \
61129
-Wold-style-declaration \
61130
-Wold-style-definition \
56393
61132
-Woverlength-strings \
56394
-Wbuiltin-macro-redefined \
56396
61135
-Wpacked-bitfield-compat \
61139
-Wpointer-to-int-cast \
61144
-Wsizeof-pointer-memaccess \
61145
-Wstack-protector \
61146
-Wstrict-aliasing \
61147
-Wstrict-overflow \
61148
-Wstrict-prototypes \
61149
-Wsuggest-attribute=const \
61150
-Wsuggest-attribute=format \
61151
-Wsuggest-attribute=noreturn \
61152
-Wsuggest-attribute=pure \
56397
61155
-Wsync-nand \
56399
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
56401
# The following are not documented in the manual but are included in
56402
# output from gcc --help=warnings.
56403
for gl_manywarn_item in \
56405
-Wcoverage-mismatch \
61161
-Wunknown-pragmas \
61162
-Wunreachable-code \
61163
-Wunsafe-loop-optimizations \
61165
-Wunused-but-set-parameter \
61166
-Wunused-but-set-variable \
61167
-Wunused-function \
61169
-Wunused-local-typedefs \
56407
61170
-Wunused-macros \
61171
-Wunused-parameter \
61174
-Wunused-variable \
61176
-Wvariadic-macros \
61177
-Wvector-operation-performance \
61179
-Wvolatile-register-var \
56409
61183
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
56412
# Disable the missing-field-initializers warning if needed
61186
# Disable specific options as needed.
56413
61187
if test "$gl_cv_cc_nomfi_needed" = yes; then
56414
61188
gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
61191
if test "$gl_cv_cc_uninitialized_supported" = no; then
61192
gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
56417
61195
ws=$gl_manywarn_set
56559
if ac_fn_c_try_cpp "$LINENO"; then :
56560
gl_cv_warn__Wsuggest_attribute_const=yes
61341
if ac_fn_c_try_compile "$LINENO"; then :
61342
eval "$as_gl_Warn=yes"
56562
gl_cv_warn__Wsuggest_attribute_const=no
61344
eval "$as_gl_Warn=no"
56564
rm -f conftest.err conftest.i conftest.$ac_ext
56565
CPPFLAGS="$gl_save_CPPFLAGS"
61346
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61347
CFLAGS="$gl_save_compiler_FLAGS"
56568
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wsuggest_attribute_const" >&5
56569
$as_echo "$gl_cv_warn__Wsuggest_attribute_const" >&6; }
56570
if test "x$gl_cv_warn__Wsuggest_attribute_const" = xyes; then :
61350
eval ac_res=\$$as_gl_Warn
61351
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
61352
$as_echo "$ac_res" >&6; }
61353
if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
56571
61354
as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
56574
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wsuggest-attribute=pure" >&5
56575
$as_echo_n "checking whether compiler handles -Wsuggest-attribute=pure... " >&6; }
56576
if ${gl_cv_warn__Wsuggest_attribute_pure+:} false; then :
56577
$as_echo_n "(cached) " >&6
56580
gl_save_CPPFLAGS="$CPPFLAGS"
56581
CPPFLAGS="${CPPFLAGS} -Wsuggest-attribute=pure"
56582
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56583
/* end confdefs.h. */
61358
as_gl_Warn=`$as_echo "gl_cv_warn_c_-Wsuggest-attribute=noreturn" | $as_tr_sh`
61359
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
61360
$as_echo_n "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
61361
if eval \${$as_gl_Warn+:} false; then :
61362
$as_echo_n "(cached) " >&6
61365
gl_save_compiler_FLAGS="$CFLAGS"
61366
as_fn_append CFLAGS " -Wsuggest-attribute=noreturn"
61367
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61368
/* end confdefs.h. */
61378
if ac_fn_c_try_compile "$LINENO"; then :
61379
eval "$as_gl_Warn=yes"
61381
eval "$as_gl_Warn=no"
61383
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61384
CFLAGS="$gl_save_compiler_FLAGS"
61387
eval ac_res=\$$as_gl_Warn
61388
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
61389
$as_echo "$ac_res" >&6; }
61390
if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
61391
as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
61395
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
61396
$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
61397
if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
61398
$as_echo_n "(cached) " >&6
61401
gl_save_compiler_FLAGS="$CFLAGS"
61402
as_fn_append CFLAGS " -Wno-format-nonliteral"
61403
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61404
/* end confdefs.h. */
61414
if ac_fn_c_try_compile "$LINENO"; then :
61415
gl_cv_warn_c__Wno_format_nonliteral=yes
61417
gl_cv_warn_c__Wno_format_nonliteral=no
61419
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61420
CFLAGS="$gl_save_compiler_FLAGS"
61423
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
61424
$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
61425
if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
61426
as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
61431
# Enable this warning only with gcc-4.7 and newer. With 4.6.2 20111027,
61432
# it suggests test.c's advance function may be pure, even though it
61433
# increments a global variable. Oops.
61434
# Normally we'd write code to test for the precise failure, but that
61435
# requires a relatively large input to make gcc exhibit the failure.
61436
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61437
/* end confdefs.h. */
61439
#if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
61442
# error "your version of gcc is older than 4.7"
56593
61454
if ac_fn_c_try_cpp "$LINENO"; then :
56594
gl_cv_warn__Wsuggest_attribute_pure=yes
56596
gl_cv_warn__Wsuggest_attribute_pure=no
56598
rm -f conftest.err conftest.i conftest.$ac_ext
56599
CPPFLAGS="$gl_save_CPPFLAGS"
56602
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wsuggest_attribute_pure" >&5
56603
$as_echo "$gl_cv_warn__Wsuggest_attribute_pure" >&6; }
56604
if test "x$gl_cv_warn__Wsuggest_attribute_pure" = xyes; then :
61455
as_gl_Warn=`$as_echo "gl_cv_warn_c_-Wsuggest-attribute=pure" | $as_tr_sh`
61456
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
61457
$as_echo_n "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
61458
if eval \${$as_gl_Warn+:} false; then :
61459
$as_echo_n "(cached) " >&6
61462
gl_save_compiler_FLAGS="$CFLAGS"
61463
as_fn_append CFLAGS " -Wsuggest-attribute=pure"
61464
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61465
/* end confdefs.h. */
61475
if ac_fn_c_try_compile "$LINENO"; then :
61476
eval "$as_gl_Warn=yes"
61478
eval "$as_gl_Warn=no"
61480
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61481
CFLAGS="$gl_save_compiler_FLAGS"
61484
eval ac_res=\$$as_gl_Warn
61485
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
61486
$as_echo "$ac_res" >&6; }
61487
if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
56605
61488
as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
56608
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wsuggest-attribute=noreturn" >&5
56609
$as_echo_n "checking whether compiler handles -Wsuggest-attribute=noreturn... " >&6; }
56610
if ${gl_cv_warn__Wsuggest_attribute_noreturn+:} false; then :
56611
$as_echo_n "(cached) " >&6
56614
gl_save_CPPFLAGS="$CPPFLAGS"
56615
CPPFLAGS="${CPPFLAGS} -Wsuggest-attribute=noreturn"
56616
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56617
/* end confdefs.h. */
56627
if ac_fn_c_try_cpp "$LINENO"; then :
56628
gl_cv_warn__Wsuggest_attribute_noreturn=yes
56630
gl_cv_warn__Wsuggest_attribute_noreturn=no
56632
61493
rm -f conftest.err conftest.i conftest.$ac_ext
56633
CPPFLAGS="$gl_save_CPPFLAGS"
56636
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wsuggest_attribute_noreturn" >&5
56637
$as_echo "$gl_cv_warn__Wsuggest_attribute_noreturn" >&6; }
56638
if test "x$gl_cv_warn__Wsuggest_attribute_noreturn" = xyes; then :
56639
as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
56643
61497
# In spite of excluding -Wlogical-op above, it is enabled, as of
56644
61498
# gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
56645
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-logical-op" >&5
56646
$as_echo_n "checking whether compiler handles -Wno-logical-op... " >&6; }
56647
if ${gl_cv_warn__Wno_logical_op+:} false; then :
61499
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
61500
$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
61501
if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
56648
61502
$as_echo_n "(cached) " >&6
56651
gl_save_CPPFLAGS="$CPPFLAGS"
56652
CPPFLAGS="${CPPFLAGS} -Wno-logical-op"
61505
gl_save_compiler_FLAGS="$CFLAGS"
61506
as_fn_append CFLAGS " -Wno-logical-op"
56653
61507
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56654
61508
/* end confdefs.h. */
57887
# Check for libypsec.a on Dolphin M88K machines.
57888
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lypsec" >&5
57889
$as_echo_n "checking for main in -lypsec... " >&6; }
57890
if ${ac_cv_lib_ypsec_main+:} false; then :
57891
$as_echo_n "(cached) " >&6
57893
ac_check_lib_save_LIBS=$LIBS
57894
LIBS="-lypsec $LIBS"
57895
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57896
/* end confdefs.h. */
57907
if ac_fn_c_try_link "$LINENO"; then :
57908
ac_cv_lib_ypsec_main=yes
57910
ac_cv_lib_ypsec_main=no
57912
rm -f core conftest.err conftest.$ac_objext \
57913
conftest$ac_exeext conftest.$ac_ext
57914
LIBS=$ac_check_lib_save_LIBS
57916
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ypsec_main" >&5
57917
$as_echo "$ac_cv_lib_ypsec_main" >&6; }
57918
if test "x$ac_cv_lib_ypsec_main" = xyes; then :
57919
cat >>confdefs.h <<_ACEOF
57920
#define HAVE_LIBYPSEC 1
57923
LIBS="-lypsec $LIBS"
57928
# m88k running dgux 5.4 needs this
57929
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lldgc" >&5
57930
$as_echo_n "checking for main in -lldgc... " >&6; }
57931
if ${ac_cv_lib_ldgc_main+:} false; then :
57932
$as_echo_n "(cached) " >&6
57934
ac_check_lib_save_LIBS=$LIBS
57935
LIBS="-lldgc $LIBS"
57936
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57937
/* end confdefs.h. */
57948
if ac_fn_c_try_link "$LINENO"; then :
57949
ac_cv_lib_ldgc_main=yes
57951
ac_cv_lib_ldgc_main=no
57953
rm -f core conftest.err conftest.$ac_objext \
57954
conftest$ac_exeext conftest.$ac_ext
57955
LIBS=$ac_check_lib_save_LIBS
57957
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldgc_main" >&5
57958
$as_echo "$ac_cv_lib_ldgc_main" >&6; }
57959
if test "x$ac_cv_lib_ldgc_main" = xyes; then :
57960
cat >>confdefs.h <<_ACEOF
57961
#define HAVE_LIBLDGC 1
57964
LIBS="-lldgc $LIBS"
57969
# The -lsun library is required for YP support on Irix-4.0.5 systems.
57970
# m88k/svr3 DolphinOS systems using YP need -lypsec for id.
57971
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_match" >&5
57972
$as_echo_n "checking for library containing yp_match... " >&6; }
57973
if ${ac_cv_search_yp_match+:} false; then :
57974
$as_echo_n "(cached) " >&6
57976
ac_func_search_save_LIBS=$LIBS
57977
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57978
/* end confdefs.h. */
57980
/* Override any GCC internal prototype to avoid an error.
57981
Use char because int might match the return type of a GCC
57982
builtin and then its argument prototype would still apply. */
57990
return yp_match ();
57995
for ac_lib in '' sun ypsec; do
57996
if test -z "$ac_lib"; then
57997
ac_res="none required"
58000
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
58002
if ac_fn_c_try_link "$LINENO"; then :
58003
ac_cv_search_yp_match=$ac_res
58005
rm -f core conftest.err conftest.$ac_objext \
58007
if ${ac_cv_search_yp_match+:} false; then :
58011
if ${ac_cv_search_yp_match+:} false; then :
58014
ac_cv_search_yp_match=no
58016
rm conftest.$ac_ext
58017
LIBS=$ac_func_search_save_LIBS
58019
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_match" >&5
58020
$as_echo "$ac_cv_search_yp_match" >&6; }
58021
ac_res=$ac_cv_search_yp_match
58022
if test "$ac_res" != no; then :
58023
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58028
# SysV needs -lsec, older versions of Linux need -lshadow for
58029
# shadow passwords. UnixWare 7 needs -lgen.
58030
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getspnam" >&5
58031
$as_echo_n "checking for library containing getspnam... " >&6; }
58032
if ${ac_cv_search_getspnam+:} false; then :
58033
$as_echo_n "(cached) " >&6
58035
ac_func_search_save_LIBS=$LIBS
58036
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58037
/* end confdefs.h. */
58039
/* Override any GCC internal prototype to avoid an error.
58040
Use char because int might match the return type of a GCC
58041
builtin and then its argument prototype would still apply. */
58049
return getspnam ();
58054
for ac_lib in '' shadow sec gen; do
58055
if test -z "$ac_lib"; then
58056
ac_res="none required"
58059
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
58061
if ac_fn_c_try_link "$LINENO"; then :
58062
ac_cv_search_getspnam=$ac_res
58064
rm -f core conftest.err conftest.$ac_objext \
58066
if ${ac_cv_search_getspnam+:} false; then :
58070
if ${ac_cv_search_getspnam+:} false; then :
58073
ac_cv_search_getspnam=no
58075
rm conftest.$ac_ext
58076
LIBS=$ac_func_search_save_LIBS
58078
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getspnam" >&5
58079
$as_echo "$ac_cv_search_getspnam" >&6; }
58080
ac_res=$ac_cv_search_getspnam
58081
if test "$ac_res" != no; then :
58082
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58087
for ac_header in shadow.h
58089
ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
58090
if test "x$ac_cv_header_shadow_h" = xyes; then :
58091
cat >>confdefs.h <<_ACEOF
58092
#define HAVE_SHADOW_H 1
58100
# Requirements for su.c.
58102
$ac_includes_default
58104
# include <shadow.h>
58107
ac_fn_c_check_member "$LINENO" "struct spwd" "sp_pwdp" "ac_cv_member_struct_spwd_sp_pwdp" "$shadow_includes
58109
if test "x$ac_cv_member_struct_spwd_sp_pwdp" = xyes; then :
58111
cat >>confdefs.h <<_ACEOF
58112
#define HAVE_STRUCT_SPWD_SP_PWDP 1
58118
for ac_func in getspnam
58120
ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
58121
if test "x$ac_cv_func_getspnam" = xyes; then :
58122
cat >>confdefs.h <<_ACEOF
58123
#define HAVE_GETSPNAM 1
58130
# SCO-ODT-3.0 is reported to need -lufc for crypt.
58131
# NetBSD needs -lcrypt for crypt.
58133
cu_saved_libs="$LIBS"
58134
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
58135
$as_echo_n "checking for library containing crypt... " >&6; }
58136
if ${ac_cv_search_crypt+:} false; then :
58137
$as_echo_n "(cached) " >&6
58139
ac_func_search_save_LIBS=$LIBS
58140
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58141
/* end confdefs.h. */
58143
/* Override any GCC internal prototype to avoid an error.
58144
Use char because int might match the return type of a GCC
58145
builtin and then its argument prototype would still apply. */
58158
for ac_lib in '' ufc crypt; do
58159
if test -z "$ac_lib"; then
58160
ac_res="none required"
58163
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
58165
if ac_fn_c_try_link "$LINENO"; then :
58166
ac_cv_search_crypt=$ac_res
58168
rm -f core conftest.err conftest.$ac_objext \
58170
if ${ac_cv_search_crypt+:} false; then :
58174
if ${ac_cv_search_crypt+:} false; then :
58177
ac_cv_search_crypt=no
58179
rm conftest.$ac_ext
58180
LIBS=$ac_func_search_save_LIBS
58182
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
58183
$as_echo "$ac_cv_search_crypt" >&6; }
58184
ac_res=$ac_cv_search_crypt
58185
if test "$ac_res" != no; then :
58186
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
58187
test "$ac_cv_search_crypt" = "none required" ||
58188
LIB_CRYPT="$ac_cv_search_crypt"
58191
LIBS="$cu_saved_libs"
58321
62883
############################################################################
58322
mk="$srcdir/src/Makefile.am"
58323
# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
58324
# in $mk but don't expand the variable references.
58325
# Append each literal name to $optional_bin_progs.
58327
for gl_i in `sed -n '/^'$v' =/,/[^\]$/p' $mk \
58328
| sed 's/^ *//;/^\$.*/d;/^'$v' =/d' \
58329
| tr -s '\\015\\012\\\\' ' '`; do
58331
if test -z "$optional_bin_progs"; then
58332
optional_bin_progs=$gl_i
58334
optional_bin_progs="$optional_bin_progs $gl_i"
58339
# As above, extract literal names from the definition of $(no_install__progs)
58340
# in $mk but don't expand the variable references.
58341
v=no_install__progs
58342
t=`sed -n '/^'$v' =/,/[^\]$/p' $mk \
58343
| sed 's/^ *//;/^\$.*/d;/^'$v' =/d' \
58344
| tr -s '\\015\\012\\\\' ' '`
58345
# Remove any trailing space.
58346
no_install_progs_default=`echo "$t"|sed 's/ $//'`
58348
# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the list
58349
# of default-not-installed programs, "arch hostname su", must appear in two
58350
# places: in this file below, and in $mk. Using "$no_install_progs_default"
58351
# below cannot work. And we can't substitute the names into $mk because
58352
# automake needs the literals, too.
58353
# The compromise is to ensure that the space-separated list extracted
58354
# above matches the literal 2nd argument below.
58355
c="$srcdir/configure.ac"
58356
re='^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])'
58357
t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
58360
$no_install_progs_default) ;;
58361
*) as_fn_error 1 "internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
58362
does not match the list of default-not-installed programs
58363
($no_install_progs_default) also recorded in $mk" "$LINENO" 5 ;;
58366
# Given the name of a variable containing a space-separated list of
58367
# install-by-default programs and the actual list do-not-install-by-default
58368
# programs, modify the former variable to reflect any "do-install" and
58369
# "don't-install" requests.
58370
# I.e., add any program name specified via --enable-install-program=..., and
58371
# remove any program name specified via --enable-no-install-program=...
58372
# Note how the second argument below is a literal, with "," separators.
58373
# That is required due to the way the macro works, and since the
58374
# corresponding ./configure option argument is comma-separated on input.
58376
gl_no_install_progs_default=`echo 'arch,hostname,su'|sed 's/,/ /g'`
62886
if test -z "$optional_bin_progs"; then
62887
optional_bin_progs=[
62889
optional_bin_progs="$optional_bin_progs ["
62893
if test -z "$optional_bin_progs"; then
62894
optional_bin_progs=base64
62896
optional_bin_progs="$optional_bin_progs base64"
62900
if test -z "$optional_bin_progs"; then
62901
optional_bin_progs=basename
62903
optional_bin_progs="$optional_bin_progs basename"
62907
if test -z "$optional_bin_progs"; then
62908
optional_bin_progs=cat
62910
optional_bin_progs="$optional_bin_progs cat"
62914
if test -z "$optional_bin_progs"; then
62915
optional_bin_progs=chcon
62917
optional_bin_progs="$optional_bin_progs chcon"
62921
if test -z "$optional_bin_progs"; then
62922
optional_bin_progs=chgrp
62924
optional_bin_progs="$optional_bin_progs chgrp"
62928
if test -z "$optional_bin_progs"; then
62929
optional_bin_progs=chmod
62931
optional_bin_progs="$optional_bin_progs chmod"
62935
if test -z "$optional_bin_progs"; then
62936
optional_bin_progs=chown
62938
optional_bin_progs="$optional_bin_progs chown"
62942
if test -z "$optional_bin_progs"; then
62943
optional_bin_progs=cksum
62945
optional_bin_progs="$optional_bin_progs cksum"
62949
if test -z "$optional_bin_progs"; then
62950
optional_bin_progs=comm
62952
optional_bin_progs="$optional_bin_progs comm"
62956
if test -z "$optional_bin_progs"; then
62957
optional_bin_progs=cp
62959
optional_bin_progs="$optional_bin_progs cp"
62963
if test -z "$optional_bin_progs"; then
62964
optional_bin_progs=csplit
62966
optional_bin_progs="$optional_bin_progs csplit"
62970
if test -z "$optional_bin_progs"; then
62971
optional_bin_progs=cut
62973
optional_bin_progs="$optional_bin_progs cut"
62977
if test -z "$optional_bin_progs"; then
62978
optional_bin_progs=date
62980
optional_bin_progs="$optional_bin_progs date"
62984
if test -z "$optional_bin_progs"; then
62985
optional_bin_progs=dd
62987
optional_bin_progs="$optional_bin_progs dd"
62991
if test -z "$optional_bin_progs"; then
62992
optional_bin_progs=dir
62994
optional_bin_progs="$optional_bin_progs dir"
62998
if test -z "$optional_bin_progs"; then
62999
optional_bin_progs=dircolors
63001
optional_bin_progs="$optional_bin_progs dircolors"
63005
if test -z "$optional_bin_progs"; then
63006
optional_bin_progs=dirname
63008
optional_bin_progs="$optional_bin_progs dirname"
63012
if test -z "$optional_bin_progs"; then
63013
optional_bin_progs=du
63015
optional_bin_progs="$optional_bin_progs du"
63019
if test -z "$optional_bin_progs"; then
63020
optional_bin_progs=echo
63022
optional_bin_progs="$optional_bin_progs echo"
63026
if test -z "$optional_bin_progs"; then
63027
optional_bin_progs=env
63029
optional_bin_progs="$optional_bin_progs env"
63033
if test -z "$optional_bin_progs"; then
63034
optional_bin_progs=expand
63036
optional_bin_progs="$optional_bin_progs expand"
63040
if test -z "$optional_bin_progs"; then
63041
optional_bin_progs=expr
63043
optional_bin_progs="$optional_bin_progs expr"
63047
if test -z "$optional_bin_progs"; then
63048
optional_bin_progs=factor
63050
optional_bin_progs="$optional_bin_progs factor"
63054
if test -z "$optional_bin_progs"; then
63055
optional_bin_progs=false
63057
optional_bin_progs="$optional_bin_progs false"
63061
if test -z "$optional_bin_progs"; then
63062
optional_bin_progs=fmt
63064
optional_bin_progs="$optional_bin_progs fmt"
63068
if test -z "$optional_bin_progs"; then
63069
optional_bin_progs=fold
63071
optional_bin_progs="$optional_bin_progs fold"
63075
if test -z "$optional_bin_progs"; then
63076
optional_bin_progs=ginstall
63078
optional_bin_progs="$optional_bin_progs ginstall"
63082
if test -z "$optional_bin_progs"; then
63083
optional_bin_progs=groups
63085
optional_bin_progs="$optional_bin_progs groups"
63089
if test -z "$optional_bin_progs"; then
63090
optional_bin_progs=head
63092
optional_bin_progs="$optional_bin_progs head"
63096
if test -z "$optional_bin_progs"; then
63097
optional_bin_progs=id
63099
optional_bin_progs="$optional_bin_progs id"
63103
if test -z "$optional_bin_progs"; then
63104
optional_bin_progs=join
63106
optional_bin_progs="$optional_bin_progs join"
63110
if test -z "$optional_bin_progs"; then
63111
optional_bin_progs=kill
63113
optional_bin_progs="$optional_bin_progs kill"
63117
if test -z "$optional_bin_progs"; then
63118
optional_bin_progs=link
63120
optional_bin_progs="$optional_bin_progs link"
63124
if test -z "$optional_bin_progs"; then
63125
optional_bin_progs=ln
63127
optional_bin_progs="$optional_bin_progs ln"
63131
if test -z "$optional_bin_progs"; then
63132
optional_bin_progs=logname
63134
optional_bin_progs="$optional_bin_progs logname"
63138
if test -z "$optional_bin_progs"; then
63139
optional_bin_progs=ls
63141
optional_bin_progs="$optional_bin_progs ls"
63145
if test -z "$optional_bin_progs"; then
63146
optional_bin_progs=md5sum
63148
optional_bin_progs="$optional_bin_progs md5sum"
63152
if test -z "$optional_bin_progs"; then
63153
optional_bin_progs=mkdir
63155
optional_bin_progs="$optional_bin_progs mkdir"
63159
if test -z "$optional_bin_progs"; then
63160
optional_bin_progs=mkfifo
63162
optional_bin_progs="$optional_bin_progs mkfifo"
63166
if test -z "$optional_bin_progs"; then
63167
optional_bin_progs=mknod
63169
optional_bin_progs="$optional_bin_progs mknod"
63173
if test -z "$optional_bin_progs"; then
63174
optional_bin_progs=mktemp
63176
optional_bin_progs="$optional_bin_progs mktemp"
63180
if test -z "$optional_bin_progs"; then
63181
optional_bin_progs=mv
63183
optional_bin_progs="$optional_bin_progs mv"
63187
if test -z "$optional_bin_progs"; then
63188
optional_bin_progs=nl
63190
optional_bin_progs="$optional_bin_progs nl"
63194
if test -z "$optional_bin_progs"; then
63195
optional_bin_progs=nproc
63197
optional_bin_progs="$optional_bin_progs nproc"
63201
if test -z "$optional_bin_progs"; then
63202
optional_bin_progs=nohup
63204
optional_bin_progs="$optional_bin_progs nohup"
63208
if test -z "$optional_bin_progs"; then
63209
optional_bin_progs=od
63211
optional_bin_progs="$optional_bin_progs od"
63215
if test -z "$optional_bin_progs"; then
63216
optional_bin_progs=paste
63218
optional_bin_progs="$optional_bin_progs paste"
63222
if test -z "$optional_bin_progs"; then
63223
optional_bin_progs=pathchk
63225
optional_bin_progs="$optional_bin_progs pathchk"
63229
if test -z "$optional_bin_progs"; then
63230
optional_bin_progs=pr
63232
optional_bin_progs="$optional_bin_progs pr"
63236
if test -z "$optional_bin_progs"; then
63237
optional_bin_progs=printenv
63239
optional_bin_progs="$optional_bin_progs printenv"
63243
if test -z "$optional_bin_progs"; then
63244
optional_bin_progs=printf
63246
optional_bin_progs="$optional_bin_progs printf"
63250
if test -z "$optional_bin_progs"; then
63251
optional_bin_progs=ptx
63253
optional_bin_progs="$optional_bin_progs ptx"
63257
if test -z "$optional_bin_progs"; then
63258
optional_bin_progs=pwd
63260
optional_bin_progs="$optional_bin_progs pwd"
63264
if test -z "$optional_bin_progs"; then
63265
optional_bin_progs=readlink
63267
optional_bin_progs="$optional_bin_progs readlink"
63271
if test -z "$optional_bin_progs"; then
63272
optional_bin_progs=realpath
63274
optional_bin_progs="$optional_bin_progs realpath"
63278
if test -z "$optional_bin_progs"; then
63279
optional_bin_progs=rm
63281
optional_bin_progs="$optional_bin_progs rm"
63285
if test -z "$optional_bin_progs"; then
63286
optional_bin_progs=rmdir
63288
optional_bin_progs="$optional_bin_progs rmdir"
63292
if test -z "$optional_bin_progs"; then
63293
optional_bin_progs=runcon
63295
optional_bin_progs="$optional_bin_progs runcon"
63299
if test -z "$optional_bin_progs"; then
63300
optional_bin_progs=seq
63302
optional_bin_progs="$optional_bin_progs seq"
63306
if test -z "$optional_bin_progs"; then
63307
optional_bin_progs=sha1sum
63309
optional_bin_progs="$optional_bin_progs sha1sum"
63313
if test -z "$optional_bin_progs"; then
63314
optional_bin_progs=sha224sum
63316
optional_bin_progs="$optional_bin_progs sha224sum"
63320
if test -z "$optional_bin_progs"; then
63321
optional_bin_progs=sha256sum
63323
optional_bin_progs="$optional_bin_progs sha256sum"
63327
if test -z "$optional_bin_progs"; then
63328
optional_bin_progs=sha384sum
63330
optional_bin_progs="$optional_bin_progs sha384sum"
63334
if test -z "$optional_bin_progs"; then
63335
optional_bin_progs=sha512sum
63337
optional_bin_progs="$optional_bin_progs sha512sum"
63341
if test -z "$optional_bin_progs"; then
63342
optional_bin_progs=shred
63344
optional_bin_progs="$optional_bin_progs shred"
63348
if test -z "$optional_bin_progs"; then
63349
optional_bin_progs=shuf
63351
optional_bin_progs="$optional_bin_progs shuf"
63355
if test -z "$optional_bin_progs"; then
63356
optional_bin_progs=sleep
63358
optional_bin_progs="$optional_bin_progs sleep"
63362
if test -z "$optional_bin_progs"; then
63363
optional_bin_progs=sort
63365
optional_bin_progs="$optional_bin_progs sort"
63369
if test -z "$optional_bin_progs"; then
63370
optional_bin_progs=split
63372
optional_bin_progs="$optional_bin_progs split"
63376
if test -z "$optional_bin_progs"; then
63377
optional_bin_progs=stat
63379
optional_bin_progs="$optional_bin_progs stat"
63383
if test -z "$optional_bin_progs"; then
63384
optional_bin_progs=sum
63386
optional_bin_progs="$optional_bin_progs sum"
63390
if test -z "$optional_bin_progs"; then
63391
optional_bin_progs=sync
63393
optional_bin_progs="$optional_bin_progs sync"
63397
if test -z "$optional_bin_progs"; then
63398
optional_bin_progs=tac
63400
optional_bin_progs="$optional_bin_progs tac"
63404
if test -z "$optional_bin_progs"; then
63405
optional_bin_progs=tail
63407
optional_bin_progs="$optional_bin_progs tail"
63411
if test -z "$optional_bin_progs"; then
63412
optional_bin_progs=tee
63414
optional_bin_progs="$optional_bin_progs tee"
63418
if test -z "$optional_bin_progs"; then
63419
optional_bin_progs=test
63421
optional_bin_progs="$optional_bin_progs test"
63425
if test -z "$optional_bin_progs"; then
63426
optional_bin_progs=timeout
63428
optional_bin_progs="$optional_bin_progs timeout"
63432
if test -z "$optional_bin_progs"; then
63433
optional_bin_progs=touch
63435
optional_bin_progs="$optional_bin_progs touch"
63439
if test -z "$optional_bin_progs"; then
63440
optional_bin_progs=tr
63442
optional_bin_progs="$optional_bin_progs tr"
63446
if test -z "$optional_bin_progs"; then
63447
optional_bin_progs=true
63449
optional_bin_progs="$optional_bin_progs true"
63453
if test -z "$optional_bin_progs"; then
63454
optional_bin_progs=truncate
63456
optional_bin_progs="$optional_bin_progs truncate"
63460
if test -z "$optional_bin_progs"; then
63461
optional_bin_progs=tsort
63463
optional_bin_progs="$optional_bin_progs tsort"
63467
if test -z "$optional_bin_progs"; then
63468
optional_bin_progs=tty
63470
optional_bin_progs="$optional_bin_progs tty"
63474
if test -z "$optional_bin_progs"; then
63475
optional_bin_progs=uname
63477
optional_bin_progs="$optional_bin_progs uname"
63481
if test -z "$optional_bin_progs"; then
63482
optional_bin_progs=unexpand
63484
optional_bin_progs="$optional_bin_progs unexpand"
63488
if test -z "$optional_bin_progs"; then
63489
optional_bin_progs=uniq
63491
optional_bin_progs="$optional_bin_progs uniq"
63495
if test -z "$optional_bin_progs"; then
63496
optional_bin_progs=unlink
63498
optional_bin_progs="$optional_bin_progs unlink"
63502
if test -z "$optional_bin_progs"; then
63503
optional_bin_progs=vdir
63505
optional_bin_progs="$optional_bin_progs vdir"
63509
if test -z "$optional_bin_progs"; then
63510
optional_bin_progs=wc
63512
optional_bin_progs="$optional_bin_progs wc"
63516
if test -z "$optional_bin_progs"; then
63517
optional_bin_progs=whoami
63519
optional_bin_progs="$optional_bin_progs whoami"
63523
if test -z "$optional_bin_progs"; then
63524
optional_bin_progs=yes
63526
optional_bin_progs="$optional_bin_progs yes"
63529
no_install_progs_default='arch hostname'
63530
# Given the name of a variable containing a space-separated
63531
# list of install-by-default programs and the actual list of
63532
# do-not-install-by-default programs, modify the former variable
63533
# to reflect any "do-install" and "don't-install" requests.
63534
# That is, add any program specified via --enable-install-program,
63535
# and remove any program specified via --enable-no-install-program.
63536
# Note how the second argument below is a literal, with ","
63537
# separators. That is required due to the way the macro works,
63538
# and since the corresponding ./configure option argument is
63539
# comma-separated on input.
63541
gl_no_install_progs_default=`echo 'arch,hostname'|sed 's/,/ /g'`
58377
63542
# Check whether --enable-install-program was given.
58378
63543
if test "${enable_install_program+set}" = set; then :
58379
63544
enableval=$enable_install_program; gl_do_install_prog=$enableval