~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to configure

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Guess values for system-dependent variables and create Makefiles.
3
 
# Generated by GNU Autoconf 2.68.79-5e017 for GNU coreutils 8.13.
 
3
# Generated by GNU Autoconf 2.68 for GNU coreutils 8.20.
4
4
#
5
5
# Report bugs to <bug-coreutils@gnu.org>.
6
6
#
7
7
#
8
 
# Copyright (C) 1992-1996, 1998-2011 Free Software Foundation, Inc.
 
8
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 
9
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
 
10
# Foundation, Inc.
9
11
#
10
12
#
11
13
# This configure script is free software; the Free Software Foundation
558
560
# Identity of this package.
559
561
PACKAGE_NAME='GNU coreutils'
560
562
PACKAGE_TARNAME='coreutils'
561
 
PACKAGE_VERSION='8.13'
562
 
PACKAGE_STRING='GNU coreutils 8.13'
 
563
PACKAGE_VERSION='8.20'
 
564
PACKAGE_STRING='GNU coreutils 8.20'
563
565
PACKAGE_BUGREPORT='bug-coreutils@gnu.org'
564
566
PACKAGE_URL='http://www.gnu.org/software/coreutils/'
565
567
 
607
609
gl_getopt_required=POSIX
608
610
gl_getopt_required=POSIX
609
611
gt_needs=
 
612
ac_config_libobj_dir=lib
610
613
ac_subst_vars='gltests_LTLIBOBJS
611
614
gltests_LIBOBJS
612
615
gl_LTLIBOBJS
615
618
am__EXEEXT_FALSE
616
619
am__EXEEXT_TRUE
617
620
LTLIBOBJS
 
621
LIBOBJS
618
622
POSUB
619
623
INTLLIBS
620
624
XGETTEXT_EXTRA_OPTIONS
627
631
MSGFMT
628
632
GETTEXT_MACRO_VERSION
629
633
USE_NLS
630
 
CONFIG_STATUS_DEPENDENCIES
631
634
CROSS_COMPILING_FALSE
632
635
CROSS_COMPILING_TRUE
633
 
NO_INSTALL_PROGS_DEFAULT
634
 
OPTIONAL_PKGLIB_PROGS
635
 
OPTIONAL_BIN_PROGS
636
 
INSTALL_SU
 
636
built_programs
 
637
EXTRA_MANS
 
638
man1_MANS
 
639
pkglibexec_PROGRAMS
 
640
bin_PROGRAMS
637
641
LIB_GMP
638
 
LIB_CRYPT
639
642
GNULIB_TEST_WARN_CFLAGS
640
643
GNULIB_WARN_CFLAGS
 
644
WARN_CFLAGS
641
645
WERROR_CFLAGS
 
646
HAVE_PERL_FALSE
 
647
HAVE_PERL_TRUE
642
648
SEQ_LIBM
643
649
LIB_CAP
644
 
LIB_FDATASYNC
645
650
LIB_XATTR
646
 
LIBOBJS
647
 
ANSI2KNR
648
 
U
649
651
MAN
650
652
HELP2MAN
651
653
LIBTESTS_LIBDEPS
653
655
LIBCOREUTILS_LIBDEPS
654
656
YIELD_LIB
655
657
abs_aux_dir
 
658
POSIX_SPAWN_PORTED_FALSE
 
659
POSIX_SPAWN_PORTED_TRUE
656
660
INTL_MACOSX_LIBS
657
661
INET_PTON_LIB
658
662
LOCALE_TR_UTF8
659
663
gltests_WITNESS
660
664
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
661
665
NEXT_WCHAR_H
662
 
WARN_CFLAGS
663
666
LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
664
667
LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
665
668
LIBUNISTRING_UNIWIDTH_H
695
698
HAVE_SYS_UIO_H
696
699
NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
697
700
NEXT_SYS_UIO_H
698
 
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
699
 
NEXT_SYS_STAT_H
 
701
HAVE_SYS_RESOURCE_H
 
702
NEXT_AS_FIRST_DIRECTIVE_SYS_RESOURCE_H
 
703
NEXT_SYS_RESOURCE_H
 
704
HAVE_GETRUSAGE
 
705
GNULIB_GETRUSAGE
700
706
NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
701
707
NEXT_SYS_IOCTL_H
702
708
HAVE_SYS_IOCTL_H
711
717
STDARG_H
712
718
NEXT_AS_FIRST_DIRECTIVE_STDARG_H
713
719
NEXT_STDARG_H
 
720
GL_GENERATE_STDALIGN_H_FALSE
 
721
GL_GENERATE_STDALIGN_H_TRUE
 
722
STDALIGN_H
 
723
HAVE_SPAWN_H
 
724
NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
 
725
NEXT_SPAWN_H
714
726
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
715
727
NEXT_SIGNAL_H
 
728
GL_GENERATE_SELINUX_CONTEXT_H_FALSE
 
729
GL_GENERATE_SELINUX_CONTEXT_H_TRUE
 
730
SELINUX_CONTEXT_H
 
731
NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
 
732
NEXT_SELINUX_SELINUX_H
 
733
LIB_SELINUX
 
734
GL_GENERATE_SCHED_H_FALSE
 
735
GL_GENERATE_SCHED_H_TRUE
 
736
SCHED_H
 
737
HAVE_STRUCT_SCHED_PARAM
 
738
HAVE_SCHED_H
 
739
NEXT_AS_FIRST_DIRECTIVE_SCHED_H
 
740
NEXT_SCHED_H
 
741
REPLACE_RAISE
716
742
REPLACE_PTHREAD_SIGMASK
717
743
HAVE_SIGHANDLER_T
718
744
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
720
746
HAVE_SIGACTION
721
747
HAVE_SIGINFO_T
722
748
HAVE_SIGSET_T
 
749
HAVE_RAISE
723
750
HAVE_PTHREAD_SIGMASK
724
751
HAVE_POSIX_SIGNALBLOCKING
725
752
GNULIB_SIGACTION
726
753
GNULIB_SIGPROCMASK
727
754
GNULIB_SIGNAL_H_SIGPIPE
 
755
GNULIB_RAISE
728
756
GNULIB_PTHREAD_SIGMASK
729
 
GL_GENERATE_SELINUX_CONTEXT_H_FALSE
730
 
GL_GENERATE_SELINUX_CONTEXT_H_TRUE
731
 
SELINUX_CONTEXT_H
732
 
NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
733
 
NEXT_SELINUX_SELINUX_H
734
 
LIB_SELINUX
735
 
GL_GENERATE_SCHED_H_FALSE
736
 
GL_GENERATE_SCHED_H_TRUE
737
 
SCHED_H
738
 
HAVE_STRUCT_SCHED_PARAM
739
 
HAVE_SCHED_H
740
 
NEXT_AS_FIRST_DIRECTIVE_SCHED_H
741
 
NEXT_SCHED_H
742
757
LIB_PTHREAD
743
758
GL_GENERATE_PTHREAD_H_FALSE
744
759
GL_GENERATE_PTHREAD_H_TRUE
749
764
HAVE_PTHREAD_T
750
765
HAVE_PTHREAD_H
751
766
DEFAULT_POSIX2_VERSION
 
767
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
 
768
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
 
769
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
 
770
REPLACE_POSIX_SPAWN
 
771
HAVE_POSIX_SPAWN_FILE_ACTIONS_T
 
772
HAVE_POSIX_SPAWNATTR_T
 
773
HAVE_POSIX_SPAWN
 
774
GNULIB_POSIX_SPAWNATTR_DESTROY
 
775
GNULIB_POSIX_SPAWNATTR_SETSIGMASK
 
776
GNULIB_POSIX_SPAWNATTR_GETSIGMASK
 
777
GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
 
778
GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
 
779
GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
 
780
GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
 
781
GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
 
782
GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
 
783
GNULIB_POSIX_SPAWNATTR_SETPGROUP
 
784
GNULIB_POSIX_SPAWNATTR_GETPGROUP
 
785
GNULIB_POSIX_SPAWNATTR_SETFLAGS
 
786
GNULIB_POSIX_SPAWNATTR_GETFLAGS
 
787
GNULIB_POSIX_SPAWNATTR_INIT
 
788
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
 
789
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
 
790
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
 
791
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
 
792
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
 
793
GNULIB_POSIX_SPAWNP
 
794
GNULIB_POSIX_SPAWN
752
795
PREFERABLY_POSIX_SHELL
753
796
POSIX_SHELL
754
797
PERL
765
808
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
766
809
NEXT_NETINET_IN_H
767
810
LIB_NANOSLEEP
 
811
LIB_SELECT
768
812
LIBSOCKET
769
813
HAVE_SYS_SELECT_H
770
814
NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
882
926
STDDEF_H
883
927
HAVE_WCHAR_T
884
928
REPLACE_NULL
 
929
REPLACE_STRUCT_LCONV
885
930
REPLACE_DUPLOCALE
886
931
REPLACE_SETLOCALE
 
932
REPLACE_LOCALECONV
887
933
HAVE_DUPLOCALE
888
934
GNULIB_DUPLOCALE
889
935
GNULIB_SETLOCALE
 
936
GNULIB_LOCALECONV
890
937
LOCALCHARSET_TESTS_ENVIRONMENT
891
938
GLIBC21
892
939
IGNORE_UNUSED_LIBRARIES_CFLAGS
924
971
PRI_MACROS_BROKEN
925
972
INT64_MAX_EQ_LONG_MAX
926
973
INT32_MAX_LT_INTMAX_MAX
 
974
REPLACE_STRTOIMAX
927
975
HAVE_DECL_STRTOUMAX
928
976
HAVE_DECL_STRTOIMAX
929
977
HAVE_DECL_IMAXDIV
975
1023
GNU_MAKE_TRUE
976
1024
NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
977
1025
NEXT_SYS_TIME_H
 
1026
REPLACE_STRUCT_TIMEVAL
978
1027
REPLACE_GETTIMEOFDAY
979
1028
HAVE_SYS_TIME_H
980
1029
HAVE_STRUCT_TIMEVAL
982
1031
GNULIB_GETTIMEOFDAY
983
1032
LTLIBINTL
984
1033
LIBINTL
 
1034
GNULIB_GL_UNISTD_H_GETOPT
985
1035
GETOPT_H
986
1036
HAVE_GETOPT_H
987
1037
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1026
1076
GNULIB_ACCEPT
1027
1077
GNULIB_CONNECT
1028
1078
GNULIB_SOCKET
 
1079
WINDOWS_64_BIT_ST_SIZE
 
1080
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
 
1081
NEXT_SYS_STAT_H
 
1082
WINDOWS_64_BIT_OFF_T
 
1083
NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
 
1084
NEXT_SYS_TYPES_H
 
1085
HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1029
1086
REPLACE_TRUNCL
1030
1087
REPLACE_TRUNCF
1031
1088
REPLACE_TRUNC
 
1089
REPLACE_SQRTL
1032
1090
REPLACE_SIGNBIT_USING_GCC
1033
1091
REPLACE_SIGNBIT
1034
1092
REPLACE_ROUNDL
1035
1093
REPLACE_ROUNDF
1036
1094
REPLACE_ROUND
 
1095
REPLACE_REMAINDERL
 
1096
REPLACE_REMAINDERF
 
1097
REPLACE_REMAINDER
1037
1098
REPLACE_NAN
 
1099
REPLACE_MODFL
 
1100
REPLACE_MODFF
 
1101
REPLACE_MODF
 
1102
REPLACE_LOGBL
 
1103
REPLACE_LOGBF
 
1104
REPLACE_LOGB
 
1105
REPLACE_LOG2L
 
1106
REPLACE_LOG2F
 
1107
REPLACE_LOG2
 
1108
REPLACE_LOG1PL
 
1109
REPLACE_LOG1PF
 
1110
REPLACE_LOG1P
 
1111
REPLACE_LOG10L
 
1112
REPLACE_LOG10F
 
1113
REPLACE_LOG10
 
1114
REPLACE_LOGL
 
1115
REPLACE_LOGF
 
1116
REPLACE_LOG
1038
1117
REPLACE_LDEXPL
1039
1118
REPLACE_ISNAN
1040
1119
REPLACE_ISINF
1041
1120
REPLACE_ISFINITE
 
1121
REPLACE_ILOGBF
 
1122
REPLACE_ILOGB
 
1123
REPLACE_HYPOTL
 
1124
REPLACE_HYPOTF
 
1125
REPLACE_HYPOT
1042
1126
REPLACE_HUGE_VAL
1043
1127
REPLACE_FREXPL
1044
1128
REPLACE_FREXP
 
1129
REPLACE_FREXPF
 
1130
REPLACE_FMODL
 
1131
REPLACE_FMODF
 
1132
REPLACE_FMOD
 
1133
REPLACE_FMAL
 
1134
REPLACE_FMAF
 
1135
REPLACE_FMA
1045
1136
REPLACE_FLOORL
1046
1137
REPLACE_FLOORF
1047
1138
REPLACE_FLOOR
 
1139
REPLACE_FABSL
 
1140
REPLACE_EXP2L
 
1141
REPLACE_EXP2
 
1142
REPLACE_EXPM1F
 
1143
REPLACE_EXPM1
1048
1144
REPLACE_CEILL
1049
1145
REPLACE_CEILF
1050
1146
REPLACE_CEIL
 
1147
REPLACE_CBRTL
 
1148
REPLACE_CBRTF
1051
1149
HAVE_DECL_TRUNCL
1052
1150
HAVE_DECL_TRUNCF
1053
1151
HAVE_DECL_TRUNC
1057
1155
HAVE_DECL_ROUNDL
1058
1156
HAVE_DECL_ROUNDF
1059
1157
HAVE_DECL_ROUND
 
1158
HAVE_DECL_RINTF
 
1159
HAVE_DECL_REMAINDERL
 
1160
HAVE_DECL_REMAINDER
 
1161
HAVE_DECL_LOGB
 
1162
HAVE_DECL_LOG2L
 
1163
HAVE_DECL_LOG2F
 
1164
HAVE_DECL_LOG2
 
1165
HAVE_DECL_LOG10L
1060
1166
HAVE_DECL_LOGL
1061
 
HAVE_DECL_LOGB
1062
1167
HAVE_DECL_LDEXPL
1063
1168
HAVE_DECL_FREXPL
1064
1169
HAVE_DECL_FLOORL
1065
1170
HAVE_DECL_FLOORF
 
1171
HAVE_DECL_EXPM1L
 
1172
HAVE_DECL_EXP2L
 
1173
HAVE_DECL_EXP2F
 
1174
HAVE_DECL_EXP2
1066
1175
HAVE_DECL_EXPL
1067
1176
HAVE_DECL_COSL
 
1177
HAVE_DECL_COPYSIGNF
1068
1178
HAVE_DECL_CEILL
1069
1179
HAVE_DECL_CEILF
 
1180
HAVE_DECL_CBRTL
 
1181
HAVE_DECL_CBRTF
1070
1182
HAVE_DECL_ATANL
1071
1183
HAVE_DECL_ASINL
1072
1184
HAVE_DECL_ACOSL
 
1185
HAVE_TANHF
1073
1186
HAVE_TANL
 
1187
HAVE_TANF
1074
1188
HAVE_SQRTL
 
1189
HAVE_SQRTF
 
1190
HAVE_SINHF
1075
1191
HAVE_SINL
 
1192
HAVE_SINF
 
1193
HAVE_RINTL
 
1194
HAVE_RINT
 
1195
HAVE_REMAINDERF
 
1196
HAVE_REMAINDER
 
1197
HAVE_POWF
 
1198
HAVE_MODFL
 
1199
HAVE_MODFF
 
1200
HAVE_LOGBL
 
1201
HAVE_LOGBF
 
1202
HAVE_LOG1PL
 
1203
HAVE_LOG1PF
 
1204
HAVE_LOG1P
 
1205
HAVE_LOG10L
 
1206
HAVE_LOG10F
1076
1207
HAVE_LOGL
 
1208
HAVE_LOGF
 
1209
HAVE_LDEXPF
1077
1210
HAVE_ISNANL
1078
1211
HAVE_ISNAND
1079
1212
HAVE_ISNANF
 
1213
HAVE_ILOGBL
 
1214
HAVE_ILOGBF
 
1215
HAVE_ILOGB
 
1216
HAVE_HYPOTL
 
1217
HAVE_HYPOTF
 
1218
HAVE_FREXPF
 
1219
HAVE_FMODL
 
1220
HAVE_FMODF
 
1221
HAVE_FMAL
 
1222
HAVE_FMAF
 
1223
HAVE_FMA
 
1224
HAVE_FABSL
 
1225
HAVE_FABSF
 
1226
HAVE_EXPM1F
 
1227
HAVE_EXPM1
1080
1228
HAVE_EXPL
 
1229
HAVE_EXPF
 
1230
HAVE_COSHF
1081
1231
HAVE_COSL
 
1232
HAVE_COSF
 
1233
HAVE_COPYSIGNL
 
1234
HAVE_COPYSIGN
 
1235
HAVE_CBRTL
 
1236
HAVE_CBRTF
 
1237
HAVE_CBRT
 
1238
HAVE_ATAN2F
1082
1239
HAVE_ATANL
 
1240
HAVE_ATANF
1083
1241
HAVE_ASINL
 
1242
HAVE_ASINF
1084
1243
HAVE_ACOSL
 
1244
HAVE_ACOSF
1085
1245
GNULIB_TRUNCL
1086
1246
GNULIB_TRUNCF
1087
1247
GNULIB_TRUNC
 
1248
GNULIB_TANHF
1088
1249
GNULIB_TANL
 
1250
GNULIB_TANF
1089
1251
GNULIB_SQRTL
 
1252
GNULIB_SQRTF
 
1253
GNULIB_SINHF
1090
1254
GNULIB_SINL
 
1255
GNULIB_SINF
1091
1256
GNULIB_SIGNBIT
1092
1257
GNULIB_ROUNDL
1093
1258
GNULIB_ROUNDF
1094
1259
GNULIB_ROUND
 
1260
GNULIB_RINTL
 
1261
GNULIB_RINTF
 
1262
GNULIB_RINT
 
1263
GNULIB_REMAINDERL
 
1264
GNULIB_REMAINDERF
 
1265
GNULIB_REMAINDER
 
1266
GNULIB_POWF
 
1267
GNULIB_MODFL
 
1268
GNULIB_MODFF
 
1269
GNULIB_MODF
 
1270
GNULIB_LOGBL
 
1271
GNULIB_LOGBF
 
1272
GNULIB_LOGB
 
1273
GNULIB_LOG2L
 
1274
GNULIB_LOG2F
 
1275
GNULIB_LOG2
 
1276
GNULIB_LOG1PL
 
1277
GNULIB_LOG1PF
 
1278
GNULIB_LOG1P
 
1279
GNULIB_LOG10L
 
1280
GNULIB_LOG10F
 
1281
GNULIB_LOG10
1095
1282
GNULIB_LOGL
1096
 
GNULIB_LOGB
 
1283
GNULIB_LOGF
 
1284
GNULIB_LOG
1097
1285
GNULIB_LDEXPL
 
1286
GNULIB_LDEXPF
1098
1287
GNULIB_ISNANL
1099
1288
GNULIB_ISNAND
1100
1289
GNULIB_ISNANF
1101
1290
GNULIB_ISNAN
1102
1291
GNULIB_ISINF
1103
1292
GNULIB_ISFINITE
 
1293
GNULIB_ILOGBL
 
1294
GNULIB_ILOGBF
 
1295
GNULIB_ILOGB
 
1296
GNULIB_HYPOTL
 
1297
GNULIB_HYPOTF
 
1298
GNULIB_HYPOT
1104
1299
GNULIB_FREXPL
1105
1300
GNULIB_FREXP
 
1301
GNULIB_FREXPF
 
1302
GNULIB_FMODL
 
1303
GNULIB_FMODF
 
1304
GNULIB_FMOD
 
1305
GNULIB_FMAL
 
1306
GNULIB_FMAF
 
1307
GNULIB_FMA
1106
1308
GNULIB_FLOORL
1107
1309
GNULIB_FLOORF
1108
1310
GNULIB_FLOOR
 
1311
GNULIB_FABSL
 
1312
GNULIB_FABSF
 
1313
GNULIB_EXPM1L
 
1314
GNULIB_EXPM1F
 
1315
GNULIB_EXPM1
 
1316
GNULIB_EXP2L
 
1317
GNULIB_EXP2F
 
1318
GNULIB_EXP2
1109
1319
GNULIB_EXPL
 
1320
GNULIB_EXPF
 
1321
GNULIB_COSHF
1110
1322
GNULIB_COSL
 
1323
GNULIB_COSF
 
1324
GNULIB_COPYSIGNL
 
1325
GNULIB_COPYSIGNF
 
1326
GNULIB_COPYSIGN
1111
1327
GNULIB_CEILL
1112
1328
GNULIB_CEILF
1113
1329
GNULIB_CEIL
 
1330
GNULIB_CBRTL
 
1331
GNULIB_CBRTF
 
1332
GNULIB_CBRT
 
1333
GNULIB_ATAN2F
1114
1334
GNULIB_ATANL
 
1335
GNULIB_ATANF
1115
1336
GNULIB_ASINL
 
1337
GNULIB_ASINF
1116
1338
GNULIB_ACOSL
 
1339
GNULIB_ACOSF
1117
1340
GL_GENERATE_FNMATCH_H_FALSE
1118
1341
GL_GENERATE_FNMATCH_H_TRUE
1119
1342
FNMATCH_H
 
1343
REPLACE_ITOLD
1120
1344
GL_GENERATE_FLOAT_H_FALSE
1121
1345
GL_GENERATE_FLOAT_H_TRUE
1122
1346
FLOAT_H
1123
1347
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1124
1348
NEXT_FLOAT_H
 
1349
LIB_FDATASYNC
1125
1350
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1126
1351
NEXT_FCNTL_H
 
1352
REPLACE_OPENAT
 
1353
REPLACE_OPEN
 
1354
REPLACE_FCNTL
 
1355
HAVE_OPENAT
 
1356
HAVE_FCNTL
 
1357
GNULIB_OPENAT
 
1358
GNULIB_OPEN
 
1359
GNULIB_NONBLOCKING
 
1360
GNULIB_FCNTL
1127
1361
REPLACE_VSPRINTF
1128
1362
REPLACE_VSNPRINTF
1129
1363
REPLACE_VPRINTF
1153
1387
REPLACE_FPRINTF
1154
1388
REPLACE_FOPEN
1155
1389
REPLACE_FFLUSH
 
1390
REPLACE_FDOPEN
1156
1391
REPLACE_FCLOSE
1157
1392
REPLACE_DPRINTF
1158
1393
HAVE_VDPRINTF
1159
1394
HAVE_VASPRINTF
1160
1395
HAVE_RENAMEAT
 
1396
HAVE_POPEN
 
1397
HAVE_PCLOSE
1161
1398
HAVE_FTELLO
1162
1399
HAVE_FSEEKO
1163
1400
HAVE_DPRINTF
1195
1432
GNULIB_PRINTF
1196
1433
GNULIB_POPEN
1197
1434
GNULIB_PERROR
 
1435
GNULIB_PCLOSE
1198
1436
GNULIB_OBSTACK_PRINTF_POSIX
1199
1437
GNULIB_OBSTACK_PRINTF
1200
 
GNULIB_GETS
1201
1438
GNULIB_GETLINE
1202
1439
GNULIB_GETDELIM
1203
1440
GNULIB_GETCHAR
1219
1456
GNULIB_FGETS
1220
1457
GNULIB_FGETC
1221
1458
GNULIB_FFLUSH
 
1459
GNULIB_FDOPEN
1222
1460
GNULIB_FCLOSE
1223
1461
GNULIB_DPRINTF
1224
1462
REPLACE_UTIMENSAT
1252
1490
GNULIB_LCHMOD
1253
1491
GNULIB_FUTIMENS
1254
1492
GNULIB_FSTATAT
 
1493
GNULIB_FSTAT
1255
1494
GNULIB_FCHMODAT
1256
 
REPLACE_OPENAT
1257
 
REPLACE_OPEN
1258
 
REPLACE_FCNTL
1259
 
HAVE_OPENAT
1260
 
HAVE_FCNTL
1261
 
GNULIB_OPENAT
1262
 
GNULIB_OPEN
1263
 
GNULIB_NONBLOCKING
1264
 
GNULIB_FCNTL
1265
1495
LIB_EACCESS
1266
1496
EOVERFLOW_VALUE
1267
1497
EOVERFLOW_HIDDEN
1274
1504
ERRNO_H
1275
1505
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1276
1506
NEXT_ERRNO_H
 
1507
HAVE_DIRENT_H
1277
1508
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1278
1509
NEXT_DIRENT_H
1279
 
REPLACE_OPENDIR
 
1510
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
 
1511
NEXT_CTYPE_H
 
1512
HAVE_ISBLANK
 
1513
GNULIB_ISBLANK
 
1514
pkglibexecdir
 
1515
lispdir
1280
1516
REPLACE_FDOPENDIR
1281
1517
REPLACE_DIRFD
1282
1518
REPLACE_CLOSEDIR
 
1519
REPLACE_OPENDIR
1283
1520
HAVE_ALPHASORT
1284
1521
HAVE_SCANDIR
1285
1522
HAVE_FDOPENDIR
1286
1523
HAVE_DECL_FDOPENDIR
1287
1524
HAVE_DECL_DIRFD
 
1525
HAVE_CLOSEDIR
 
1526
HAVE_REWINDDIR
 
1527
HAVE_READDIR
 
1528
HAVE_OPENDIR
1288
1529
GNULIB_ALPHASORT
1289
1530
GNULIB_SCANDIR
1290
1531
GNULIB_FDOPENDIR
1291
1532
GNULIB_DIRFD
1292
 
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1293
 
NEXT_CTYPE_H
1294
 
HAVE_ISBLANK
1295
 
GNULIB_ISBLANK
1296
 
pkglibexecdir
1297
 
lispdir
 
1533
GNULIB_CLOSEDIR
 
1534
GNULIB_REWINDDIR
 
1535
GNULIB_READDIR
 
1536
GNULIB_OPENDIR
1298
1537
HAVE_WINSOCK2_H
1299
1538
REPLACE_IOCTL
1300
1539
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1301
1540
SYS_IOCTL_H_HAVE_WINSOCK2_H
1302
1541
GNULIB_IOCTL
 
1542
HAVE_MSVC_INVALID_PARAMETER_HANDLER
1303
1543
LIB_CLOCK_GETTIME
1304
1544
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1305
1545
UNISTD_H_HAVE_WINSOCK2_H
1319
1559
REPLACE_LINKAT
1320
1560
REPLACE_LINK
1321
1561
REPLACE_LCHOWN
 
1562
REPLACE_ISATTY
1322
1563
REPLACE_GETPAGESIZE
1323
1564
REPLACE_GETGROUPS
1324
1565
REPLACE_GETLOGIN_R
1325
1566
REPLACE_GETDOMAINNAME
1326
1567
REPLACE_GETCWD
 
1568
REPLACE_FTRUNCATE
1327
1569
REPLACE_FCHOWNAT
1328
1570
REPLACE_DUP2
1329
1571
REPLACE_DUP
1332
1574
HAVE_SYS_PARAM_H
1333
1575
HAVE_OS_H
1334
1576
HAVE_DECL_TTYNAME_R
 
1577
HAVE_DECL_SETHOSTNAME
1335
1578
HAVE_DECL_GETUSERSHELL
1336
1579
HAVE_DECL_GETPAGESIZE
1337
1580
HAVE_DECL_GETLOGIN_R
1338
1581
HAVE_DECL_GETDOMAINNAME
 
1582
HAVE_DECL_FDATASYNC
1339
1583
HAVE_DECL_FCHDIR
1340
1584
HAVE_DECL_ENVIRON
1341
1585
HAVE_USLEEP
1343
1587
HAVE_SYMLINKAT
1344
1588
HAVE_SYMLINK
1345
1589
HAVE_SLEEP
 
1590
HAVE_SETHOSTNAME
1346
1591
HAVE_READLINKAT
1347
1592
HAVE_READLINK
1348
1593
HAVE_PWRITE
1360
1605
HAVE_GETDTABLESIZE
1361
1606
HAVE_FTRUNCATE
1362
1607
HAVE_FSYNC
 
1608
HAVE_FDATASYNC
1363
1609
HAVE_FCHOWNAT
1364
1610
HAVE_FCHDIR
1365
1611
HAVE_FACCESSAT
1373
1619
GNULIB_UNLINK
1374
1620
GNULIB_UNISTD_H_SIGPIPE
1375
1621
GNULIB_UNISTD_H_NONBLOCKING
1376
 
GNULIB_UNISTD_H_GETOPT
1377
1622
GNULIB_TTYNAME_R
1378
1623
GNULIB_SYMLINKAT
1379
1624
GNULIB_SYMLINK
1380
1625
GNULIB_SLEEP
 
1626
GNULIB_SETHOSTNAME
1381
1627
GNULIB_RMDIR
1382
1628
GNULIB_READLINKAT
1383
1629
GNULIB_READLINK
1390
1636
GNULIB_LINKAT
1391
1637
GNULIB_LINK
1392
1638
GNULIB_LCHOWN
 
1639
GNULIB_ISATTY
1393
1640
GNULIB_GROUP_MEMBER
1394
1641
GNULIB_GETUSERSHELL
1395
1642
GNULIB_GETPAGESIZE
1402
1649
GNULIB_GETCWD
1403
1650
GNULIB_FTRUNCATE
1404
1651
GNULIB_FSYNC
 
1652
GNULIB_FDATASYNC
1405
1653
GNULIB_FCHOWNAT
1406
1654
GNULIB_FCHDIR
1407
1655
GNULIB_FACCESSAT
1409
1657
GNULIB_ENVIRON
1410
1658
GNULIB_DUP3
1411
1659
GNULIB_DUP2
 
1660
GNULIB_DUP
1412
1661
GNULIB_CLOSE
1413
1662
GNULIB_CHOWN
 
1663
GNULIB_CHDIR
1414
1664
REPLACE_WCTOMB
1415
1665
REPLACE_UNSETENV
1416
1666
REPLACE_STRTOD
1417
1667
REPLACE_SETENV
1418
1668
REPLACE_REALPATH
1419
1669
REPLACE_REALLOC
 
1670
REPLACE_RANDOM_R
1420
1671
REPLACE_PUTENV
 
1672
REPLACE_PTSNAME_R
 
1673
REPLACE_PTSNAME
1421
1674
REPLACE_MKSTEMP
1422
1675
REPLACE_MBTOWC
1423
1676
REPLACE_MALLOC
1436
1689
HAVE_REALPATH
1437
1690
HAVE_RANDOM_R
1438
1691
HAVE_RANDOM_H
 
1692
HAVE_RANDOM
 
1693
HAVE_PTSNAME_R
1439
1694
HAVE_PTSNAME
 
1695
HAVE_POSIX_OPENPT
1440
1696
HAVE_MKSTEMPS
1441
1697
HAVE_MKSTEMP
1442
1698
HAVE_MKOSTEMPS
1460
1716
GNULIB_REALPATH
1461
1717
GNULIB_REALLOC_POSIX
1462
1718
GNULIB_RANDOM_R
 
1719
GNULIB_RANDOM
1463
1720
GNULIB_PUTENV
 
1721
GNULIB_PTSNAME_R
1464
1722
GNULIB_PTSNAME
 
1723
GNULIB_POSIX_OPENPT
1465
1724
GNULIB_MKSTEMPS
1466
1725
GNULIB_MKSTEMP
1467
1726
GNULIB_MKOSTEMPS
1576
1835
INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1577
1836
INCLUDE_NEXT
1578
1837
HAVE_ARPA_INET_H
 
1838
REPLACE_INET_PTON
 
1839
REPLACE_INET_NTOP
1579
1840
HAVE_DECL_INET_PTON
1580
1841
HAVE_DECL_INET_NTOP
1581
1842
GNULIB_INET_PTON
1622
1883
CC
1623
1884
AM_BACKSLASH
1624
1885
AM_DEFAULT_VERBOSITY
 
1886
AM_DEFAULT_V
 
1887
AM_V
1625
1888
am__untar
1626
1889
am__tar
1627
1890
AMTAR
2265
2528
  # Omit some internal or obsolete options to make the list less imposing.
2266
2529
  # This message is too long to be a string in the A/UX 3.1 sh.
2267
2530
  cat <<_ACEOF
2268
 
\`configure' configures GNU coreutils 8.13 to adapt to many kinds of systems.
 
2531
\`configure' configures GNU coreutils 8.20 to adapt to many kinds of systems.
2269
2532
 
2270
2533
Usage: $0 [OPTION]... [VAR=VALUE]...
2271
2534
 
2335
2598
 
2336
2599
if test -n "$ac_init_help"; then
2337
2600
  case $ac_init_help in
2338
 
     short | recursive ) echo "Configuration of GNU coreutils 8.13:";;
 
2601
     short | recursive ) echo "Configuration of GNU coreutils 8.20:";;
2339
2602
   esac
2340
2603
  cat <<\_ACEOF
2341
2604
 
2343
2606
  --disable-option-checking  ignore unrecognized --enable/--with options
2344
2607
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2345
2608
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2346
 
  --enable-silent-rules   less verbose build output (undo: `make V=1')
2347
 
  --disable-silent-rules  verbose build output (undo: `make V=0')
2348
 
  --enable-dependency-tracking
2349
 
                          do not reject slow dependency extractors
2350
 
  --disable-dependency-tracking
2351
 
                          speeds up one-time build
 
2609
  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
2610
  --disable-silent-rules         verbose build output (undo: `make V=0')
 
2611
  --disable-dependency-tracking  speeds up one-time build
 
2612
  --enable-dependency-tracking   do not reject slow dependency extractors
2352
2613
  --disable-largefile     omit support for large files
2353
 
  --enable-threads={posix|solaris|pth|win32}
 
2614
  --enable-threads={posix|solaris|pth|windows}
2354
2615
                          specify multithreading API
2355
2616
  --disable-threads       build without multithread safety
2356
2617
  --disable-acl           do not support ACLs
2358
2619
  --disable-rpath         do not hardcode runtime library paths
2359
2620
  --disable-xattr         do not support extended attributes
2360
2621
  --disable-libcap        disable libcap support
2361
 
  --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
 
2622
  --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
 
2623
                          GNU make)
2362
2624
  --enable-install-program=PROG_LIST
2363
2625
                          install the programs in PROG_LIST (comma-separated,
2364
2626
                          default: none)
2365
2627
  --enable-no-install-program=PROG_LIST
2366
2628
                          do NOT install the programs in PROG_LIST
2367
 
                          (comma-separated, default: arch,hostname,su)
 
2629
                          (comma-separated, default: arch,hostname)
2368
2630
  --disable-nls           do not use Native Language Support
2369
2631
 
2370
2632
Optional Packages:
2371
2633
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2372
2634
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2373
 
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
 
2635
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2374
2636
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2375
2637
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2376
2638
  --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2402
2664
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2403
2665
              you have headers in a nonstandard directory <include dir>
2404
2666
  CPP         C preprocessor
2405
 
  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
2406
 
              `bison -y'. Values other than `bison -y' will most likely break
 
2667
  YACC        The "Yet Another C Compiler" implementation to use. Defaults to
 
2668
              'bison -y'. Values other than 'bison -y' will most likely break
2407
2669
              on most systems.
2408
2670
  YFLAGS      YFLAGS contains the list arguments that will be passed by
2409
2671
              default to Bison. This script will default YFLAGS to the empty
2410
 
              string to avoid a default value of `-d' given by some make
 
2672
              string to avoid a default value of '-d' given by some make
2411
2673
              applications.
2412
2674
  DEFAULT_POSIX2_VERSION
2413
2675
              POSIX version to default to; see 'config.hin'.
2480
2742
test -n "$ac_init_help" && exit $ac_status
2481
2743
if $ac_init_version; then
2482
2744
  cat <<\_ACEOF
2483
 
GNU coreutils configure 8.13
2484
 
generated by GNU Autoconf 2.68.79-5e017
 
2745
GNU coreutils configure 8.20
 
2746
generated by GNU Autoconf 2.68
2485
2747
 
2486
 
Copyright (C) 2011 Free Software Foundation, Inc.
 
2748
Copyright (C) 2010 Free Software Foundation, Inc.
2487
2749
This configure script is free software; the Free Software Foundation
2488
2750
gives unlimited permission to copy, distribute and modify it.
2489
2751
_ACEOF
3184
3446
This file contains any messages produced by compilers while
3185
3447
running configure, to aid debugging if configure makes a mistake.
3186
3448
 
3187
 
It was created by GNU coreutils $as_me 8.13, which was
3188
 
generated by GNU Autoconf 2.68.79-5e017.  Invocation command line was
 
3449
It was created by GNU coreutils $as_me 8.20, which was
 
3450
generated by GNU Autoconf 2.68.  Invocation command line was
3189
3451
 
3190
3452
  $ $0 $@
3191
3453
 
3471
3733
as_fn_append ac_func_list " canonicalize_file_name"
3472
3734
as_fn_append ac_func_list " realpath"
3473
3735
as_fn_append ac_func_list " readlinkat"
 
3736
as_fn_append ac_header_list " unistd.h"
 
3737
as_fn_append ac_header_list " sys/param.h"
3474
3738
as_fn_append ac_func_list " chown"
3475
3739
as_fn_append ac_func_list " fchown"
 
3740
as_fn_append ac_func_list " _set_invalid_parameter_handler"
3476
3741
as_fn_append ac_header_list " sys/socket.h"
3477
3742
as_fn_append ac_func_list " fchdir"
3478
3743
as_fn_append ac_header_list " dirent.h"
3479
3744
as_fn_append ac_func_list " fdopendir"
3480
3745
as_fn_append ac_func_list " faccessat"
3481
 
as_fn_append ac_header_list " libgen.h"
 
3746
as_fn_append ac_func_list " posix_fadvise"
3482
3747
as_fn_append ac_func_list " fchmodat"
3483
3748
as_fn_append ac_func_list " lchmod"
3484
 
as_fn_append ac_func_list " mkdirat"
3485
 
as_fn_append ac_func_list " openat"
3486
 
as_fn_append ac_func_list " unlinkat"
3487
 
as_fn_append ac_func_list " fstatat"
3488
 
as_fn_append ac_func_list " access"
3489
 
as_fn_append ac_func_list " posix_fadvise"
3490
3749
as_fn_append ac_func_list " fcntl"
3491
 
as_fn_append ac_header_list " sys/param.h"
 
3750
as_fn_append ac_func_list " symlink"
3492
3751
as_fn_append ac_func_list " mempcpy"
3493
3752
as_fn_append ac_func_list " isblank"
3494
3753
as_fn_append ac_func_list " iswctype"
3502
3761
as_fn_append ac_func_list " __fpending"
3503
3762
as_fn_append ac_func_list " fpurge"
3504
3763
as_fn_append ac_func_list " __fpurge"
 
3764
as_fn_append ac_func_list " __freadahead"
3505
3765
as_fn_append ac_func_list " __freading"
 
3766
as_fn_append ac_func_list " __freadptr"
 
3767
as_fn_append ac_func_list " __freadptrinc"
 
3768
as_fn_append ac_func_list " alarm"
 
3769
as_fn_append ac_func_list " __fseterr"
 
3770
as_fn_append ac_header_list " sys/stat.h"
 
3771
as_fn_append ac_func_list " fstatat"
3506
3772
as_fn_append ac_header_list " sys/vfs.h"
3507
3773
as_fn_append ac_header_list " sys/fs_types.h"
3508
3774
as_fn_append ac_func_list " fsync"
3509
3775
as_fn_append ac_func_list " strtof"
 
3776
as_fn_append ac_func_list " ftruncate"
 
3777
as_fn_append ac_func_list " openat"
3510
3778
as_fn_append ac_func_list " fstatfs"
3511
3779
as_fn_append ac_func_list " futimens"
3512
3780
as_fn_append ac_header_list " netdb.h"
3515
3783
as_fn_append ac_func_list " getdtablesize"
3516
3784
as_fn_append ac_func_list " nanouptime"
3517
3785
as_fn_append ac_func_list " microuptime"
 
3786
as_fn_append ac_func_list " getlogin"
3518
3787
as_fn_append ac_func_list " flockfile"
3519
3788
as_fn_append ac_func_list " funlockfile"
3520
3789
gl_getopt_required=GNU
3538
3807
as_fn_append ac_func_list " link"
3539
3808
as_fn_append ac_func_list " readlink"
3540
3809
as_fn_append ac_func_list " linkat"
3541
 
as_fn_append ac_func_list " symlink"
3542
3810
as_fn_append ac_header_list " xlocale.h"
3543
3811
as_fn_append ac_func_list " lstat"
3544
3812
as_fn_append ac_header_list " math.h"
3550
3818
as_fn_append ac_header_list " sys/mman.h"
3551
3819
as_fn_append ac_func_list " mprotect"
3552
3820
as_fn_append ac_func_list " getgrouplist"
3553
 
as_fn_append ac_header_list " unistd.h"
3554
3821
as_fn_append ac_func_list " fchmod"
 
3822
as_fn_append ac_func_list " mkfifo"
 
3823
as_fn_append ac_func_list " mknod"
3555
3824
as_fn_append ac_func_list " mkstemp"
3556
 
as_fn_append ac_func_list " alarm"
3557
3825
as_fn_append ac_header_list " sys/statvfs.h"
3558
3826
as_fn_append ac_header_list " sys/select.h"
3559
3827
as_fn_append ac_func_list " nl_langinfo"
 
3828
as_fn_append ac_func_list " pipe2"
 
3829
as_fn_append ac_func_list " posix_spawn"
3560
3830
gl_printf_safe=yes
3561
3831
as_fn_append ac_header_list " priv.h"
3562
3832
as_fn_append ac_header_list " pthread.h"
3573
3843
as_fn_append ac_func_list " sigaction"
3574
3844
as_fn_append ac_func_list " sigaltstack"
3575
3845
as_fn_append ac_func_list " siginterrupt"
 
3846
as_fn_append ac_func_list " snprintf"
 
3847
as_fn_append ac_header_list " spawn.h"
3576
3848
as_fn_append ac_func_list " stpncpy"
3577
3849
as_fn_append ac_func_list " strdup"
3578
3850
as_fn_append ac_func_list " strerror_r"
3582
3854
as_fn_append ac_func_list " strtoimax"
3583
3855
as_fn_append ac_func_list " strtoumax"
3584
3856
as_fn_append ac_header_list " sys/ioctl.h"
3585
 
as_fn_append ac_header_list " sys/stat.h"
 
3857
as_fn_append ac_header_list " sys/resource.h"
3586
3858
as_fn_append ac_header_list " sys/uio.h"
3587
3859
as_fn_append ac_header_list " sys/utsname.h"
3588
3860
as_fn_append ac_header_list " sys/wait.h"
3589
3861
as_fn_append ac_func_list " localtime_r"
3590
3862
as_fn_append ac_func_list " pipe"
 
3863
as_fn_append ac_func_list " unlinkat"
3591
3864
as_fn_append ac_header_list " utime.h"
3592
3865
as_fn_append ac_func_list " futimes"
3593
3866
as_fn_append ac_func_list " futimesat"
3608
3881
as_fn_append ac_header_list " hurd.h"
3609
3882
as_fn_append ac_header_list " paths.h"
3610
3883
as_fn_append ac_header_list " stropts.h"
3611
 
as_fn_append ac_header_list " sys/resource.h"
3612
3884
as_fn_append ac_header_list " sys/systeminfo.h"
3613
3885
as_fn_append ac_header_list " syslog.h"
3614
3886
as_fn_append ac_header_list " pwd.h"
3615
3887
as_fn_append ac_func_list " directio"
3616
3888
as_fn_append ac_func_list " setrlimit"
 
3889
as_fn_append ac_func_list " prctl"
3617
3890
as_fn_append ac_func_list " endgrent"
3618
3891
as_fn_append ac_func_list " endpwent"
3619
 
as_fn_append ac_func_list " ftruncate"
3620
3892
as_fn_append ac_func_list " iswspace"
3621
 
as_fn_append ac_func_list " mkfifo"
3622
3893
as_fn_append ac_func_list " setgroups"
3623
3894
as_fn_append ac_func_list " sethostname"
3624
3895
as_fn_append ac_func_list " sync"
3625
3896
as_fn_append ac_func_list " sysctl"
3626
3897
as_fn_append ac_func_list " sysinfo"
3627
3898
as_fn_append ac_func_list " tcgetpgrp"
 
3899
as_fn_append ac_func_list " getgrgid_nomembers"
 
3900
as_fn_append ac_func_list " getgrnam_nomembers"
 
3901
as_fn_append ac_func_list " getgrent_nomembers"
3628
3902
as_fn_append ac_header_list " OS.h"
3629
3903
gt_needs="$gt_needs need-formatstring-macros"
3630
3904
# Check that the precious variables saved in the cache have kept the same
3730
4004
ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3731
4005
 
3732
4006
 
3733
 
am__api_version='1.11a'
 
4007
am__api_version='1.11'
3734
4008
 
3735
4009
# Find a good install program.  We prefer a C program (faster),
3736
4010
# so one script is as good as another.  But avoid the broken or
3827
4101
 
3828
4102
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3829
4103
$as_echo_n "checking whether build environment is sane... " >&6; }
 
4104
# Just in case
 
4105
sleep 1
 
4106
echo timestamp > conftest.file
3830
4107
# Reject unsafe characters in $srcdir or the absolute working directory
3831
4108
# name.  Accept space and tab only in the latter.
3832
4109
am_lf='
3846
4123
# (eg FreeBSD returns the mod time of the symlink's containing
3847
4124
# directory).
3848
4125
if (
3849
 
   am_has_slept=no
3850
 
   for am_try in 1 2; do
3851
 
     echo "timestamp, slept: $am_has_slept" > conftest.file
3852
 
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3853
 
     if test "$*" = "X"; then
3854
 
        # -L didn't work.
3855
 
        set X `ls -t "$srcdir/configure" conftest.file`
3856
 
     fi
3857
 
     if test "$*" != "X $srcdir/configure conftest.file" \
3858
 
        && test "$*" != "X conftest.file $srcdir/configure"; then
3859
 
 
3860
 
        # If neither matched, then we have a broken ls.  This can happen
3861
 
        # if, for instance, CONFIG_SHELL is bash and it inherits a
3862
 
        # broken ls alias from the environment.  This has actually
3863
 
        # happened.  Such a system could not be considered "sane".
3864
 
        as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3865
 
  alias in your environment" "$LINENO" 5
3866
 
     fi
3867
 
     if test "$2" = conftest.file || test $am_try -eq 2; then
3868
 
       break
3869
 
     fi
3870
 
     # Just in case.
3871
 
     sleep 1
3872
 
     am_has_slept=yes
3873
 
   done
 
4126
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
4127
   if test "$*" = "X"; then
 
4128
      # -L didn't work.
 
4129
      set X `ls -t "$srcdir/configure" conftest.file`
 
4130
   fi
 
4131
   rm -f conftest.file
 
4132
   if test "$*" != "X $srcdir/configure conftest.file" \
 
4133
      && test "$*" != "X conftest.file $srcdir/configure"; then
 
4134
 
 
4135
      # If neither matched, then we have a broken ls.  This can happen
 
4136
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
4137
      # broken ls alias from the environment.  This has actually
 
4138
      # happened.  Such a system could not be considered "sane".
 
4139
      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
 
4140
alias in your environment" "$LINENO" 5
 
4141
   fi
 
4142
 
3874
4143
   test "$2" = conftest.file
3875
4144
   )
3876
4145
then
3882
4151
fi
3883
4152
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3884
4153
$as_echo "yes" >&6; }
3885
 
# If we didn't sleep, we still need to ensure time stamps of config.status and
3886
 
# generated files are strictly newer.
3887
 
am_sleep_pid=
3888
 
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3889
 
  ( sleep 1 ) &
3890
 
  am_sleep_pid=$!
3891
 
fi
3892
 
 
3893
 
rm -f conftest.file
3894
 
 
3895
4154
test "$program_prefix" != NONE &&
3896
4155
  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3897
4156
# Use a double $ so make ignores it.
4184
4443
 
4185
4444
# Define the identity of the package.
4186
4445
 PACKAGE='coreutils'
4187
 
 VERSION='8.13'
 
4446
 VERSION='8.20'
4188
4447
 
4189
4448
 
4190
4449
cat >>confdefs.h <<_ACEOF
4214
4473
 
4215
4474
# We need awk for the "check" target.  The system "awk" is bad on
4216
4475
# some platforms.
4217
 
# Always define AMTAR for backward compatibility.
4218
 
 
4219
 
AMTAR=${AMTAR-"${am_missing_run}tar"}
4220
 
 
4221
 
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
4476
# Always define AMTAR for backward compatibility.  Yes, it's still used
 
4477
# in the wild :-(  We should find a proper way to deprecate it ...
 
4478
AMTAR='$${TAR-tar}'
 
4479
 
 
4480
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4222
4481
 
4223
4482
 
4224
4483
 
4229
4488
  enableval=$enable_silent_rules;
4230
4489
fi
4231
4490
 
4232
 
case $enable_silent_rules in # (((
4233
 
  yes) AM_DEFAULT_VERBOSITY=0;;
4234
 
   no) AM_DEFAULT_VERBOSITY=1;;
4235
 
    *) AM_DEFAULT_VERBOSITY=0;;
 
4491
case $enable_silent_rules in
 
4492
yes) AM_DEFAULT_VERBOSITY=0;;
 
4493
no)  AM_DEFAULT_VERBOSITY=1;;
 
4494
*)   AM_DEFAULT_VERBOSITY=0;;
4236
4495
esac
 
4496
am_make=${MAKE-make}
 
4497
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
 
4498
$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
 
4499
if ${am_cv_make_support_nested_variables+:} false; then :
 
4500
  $as_echo_n "(cached) " >&6
 
4501
else
 
4502
  if $as_echo 'TRUE=$(BAR$(V))
 
4503
BAR0=false
 
4504
BAR1=true
 
4505
V=1
 
4506
am__doit:
 
4507
        @$(TRUE)
 
4508
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
 
4509
  am_cv_make_support_nested_variables=yes
 
4510
else
 
4511
  am_cv_make_support_nested_variables=no
 
4512
fi
 
4513
fi
 
4514
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
 
4515
$as_echo "$am_cv_make_support_nested_variables" >&6; }
 
4516
if test $am_cv_make_support_nested_variables = yes; then
 
4517
    AM_V='$(V)'
 
4518
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 
4519
else
 
4520
  AM_V=$AM_DEFAULT_VERBOSITY
 
4521
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 
4522
fi
4237
4523
AM_BACKSLASH='\'
4238
4524
 # make --enable-silent-rules the default.
4239
4525
 
 
4526
 
 
4527
 
 
4528
 
 
4529
 
 
4530
 
4240
4531
DEPDIR="${am__leading_dot}deps"
4241
4532
 
4242
4533
ac_config_commands="$ac_config_commands depfiles"
5004
5295
/* end confdefs.h.  */
5005
5296
#include <stdarg.h>
5006
5297
#include <stdio.h>
5007
 
struct stat;
 
5298
#include <sys/types.h>
 
5299
#include <sys/stat.h>
5008
5300
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5009
5301
struct buf { int x; };
5010
5302
FILE * (*rcsopen) (struct buf *, struct stat *, int);
5367
5659
  return 0;
5368
5660
}
5369
5661
_ACEOF
5370
 
for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
 
5662
for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
5371
5663
do
5372
5664
  CC="$ac_save_CC $ac_arg"
5373
5665
  if ac_fn_c_try_compile "$LINENO"; then :
5407
5699
/* end confdefs.h.  */
5408
5700
#include <stdarg.h>
5409
5701
#include <stdio.h>
5410
 
struct stat;
 
5702
#include <sys/types.h>
 
5703
#include <sys/stat.h>
5411
5704
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5412
5705
struct buf { int x; };
5413
5706
FILE * (*rcsopen) (struct buf *, struct stat *, int);
6647
6940
      # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6648
6941
      if test -n "$GCC"; then
6649
6942
        # GCC has the option -mieee.
 
6943
        # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6650
6944
        CPPFLAGS="$CPPFLAGS -mieee"
6651
6945
      else
6652
 
        # Compaq (ex-DEC) C has the option -ieee.
 
6946
        # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
 
6947
        # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6653
6948
        CPPFLAGS="$CPPFLAGS -ieee"
6654
6949
      fi
6655
6950
      ;;
6913
7208
 
6914
7209
 
6915
7210
  # Code from module accept:
 
7211
  # Code from module accept-tests:
6916
7212
  # Code from module acl:
6917
7213
  # Code from module acl-tests:
6918
7214
  # Code from module alignof:
6935
7231
  # Code from module arpa_inet:
6936
7232
  # Code from module arpa_inet-tests:
6937
7233
  # Code from module assert:
 
7234
  # Code from module at-internal:
6938
7235
  # Code from module autobuild:
6939
7236
 
6940
7237
 
6975
7272
  # Code from module binary-io:
6976
7273
  # Code from module binary-io-tests:
6977
7274
  # Code from module bind:
 
7275
  # Code from module bind-tests:
6978
7276
  # Code from module bitrotate:
6979
7277
  # Code from module bitrotate-tests:
6980
7278
  # Code from module btowc:
6981
7279
  # Code from module btowc-tests:
 
7280
  # Code from module buffer-lcm:
6982
7281
  # Code from module c-ctype:
6983
7282
  # Code from module c-ctype-tests:
6984
7283
  # Code from module c-strcase:
6985
7284
  # Code from module c-strcase-tests:
 
7285
  # Code from module c-strcaseeq:
6986
7286
  # Code from module c-strtod:
6987
7287
  # Code from module c-strtold:
6988
7288
  # Code from module calloc-gnu:
6992
7292
  # Code from module canonicalize:
6993
7293
  # Code from module canonicalize-tests:
6994
7294
  # Code from module careadlinkat:
 
7295
  # Code from module chdir:
6995
7296
  # Code from module chdir-long:
 
7297
  # Code from module chdir-tests:
6996
7298
  # Code from module chown:
6997
7299
  # Code from module chown-tests:
6998
7300
  # Code from module clock-time:
7000
7302
  # Code from module cloexec-tests:
7001
7303
  # Code from module close:
7002
7304
  # Code from module close-stream:
 
7305
  # Code from module close-tests:
 
7306
  # Code from module closedir:
7003
7307
  # Code from module closein:
7004
7308
  # Code from module closein-tests:
7005
7309
  # Code from module closeout:
7006
7310
  # Code from module config-h:
7007
7311
  # Code from module configmake:
7008
7312
  # Code from module connect:
 
7313
  # Code from module connect-tests:
7009
7314
  # Code from module crypto/md5:
7010
7315
  # Code from module crypto/md5-tests:
7011
7316
  # Code from module crypto/sha1:
7034
7339
  # Code from module double-slash-root:
7035
7340
  # Code from module dtoastr:
7036
7341
  # Code from module dtotimespec:
 
7342
  # Code from module dup:
 
7343
  # Code from module dup-tests:
7037
7344
  # Code from module dup2:
7038
7345
  # Code from module dup2-tests:
7039
7346
  # Code from module environ:
7047
7354
  # Code from module exitfail:
7048
7355
  # Code from module extensions:
7049
7356
 
 
7357
  # Code from module extern-inline:
7050
7358
  # Code from module faccessat:
 
7359
  # Code from module faccessat-tests:
7051
7360
  # Code from module fadvise:
7052
7361
  # Code from module fadvise-tests:
 
7362
  # Code from module fatal-signal:
7053
7363
  # Code from module fchdir:
7054
7364
  # Code from module fchdir-tests:
 
7365
  # Code from module fchmodat:
 
7366
  # Code from module fchmodat-tests:
 
7367
  # Code from module fchownat:
 
7368
  # Code from module fchownat-tests:
7055
7369
  # Code from module fclose:
7056
7370
  # Code from module fclose-tests:
7057
7371
  # Code from module fcntl:
7061
7375
  # Code from module fcntl-safer-tests:
7062
7376
  # Code from module fcntl-tests:
7063
7377
  # Code from module fd-hook:
 
7378
  # Code from module fd-reopen:
7064
7379
  # Code from module fd-safer-flag:
 
7380
  # Code from module fdatasync:
 
7381
  # Code from module fdatasync-tests:
7065
7382
  # Code from module fdl:
 
7383
  # Code from module fdopen:
 
7384
  # Code from module fdopen-tests:
7066
7385
  # Code from module fdopendir:
7067
7386
  # Code from module fdopendir-tests:
7068
7387
  # Code from module fdutimensat:
7070
7389
  # Code from module fflush:
7071
7390
 
7072
7391
  # Code from module fflush-tests:
 
7392
  # Code from module fgetc-tests:
7073
7393
  # Code from module file-set:
7074
7394
  # Code from module file-type:
7075
7395
  # Code from module fileblocks:
7076
7396
  # Code from module filemode:
 
7397
  # Code from module filename:
7077
7398
  # Code from module filenamecat:
7078
7399
  # Code from module filenamecat-lgpl:
7079
7400
  # Code from module filenamecat-tests:
7097
7418
  # Code from module fpucw:
7098
7419
  # Code from module fpurge:
7099
7420
  # Code from module fpurge-tests:
 
7421
  # Code from module fputc-tests:
 
7422
  # Code from module fread-tests:
7100
7423
  # Code from module freadahead:
7101
7424
  # Code from module freadahead-tests:
7102
7425
  # Code from module freading:
7120
7443
  # Code from module fseeko-tests:
7121
7444
  # Code from module fseterr:
7122
7445
  # Code from module fseterr-tests:
 
7446
  # Code from module fstat:
 
7447
  # Code from module fstat-tests:
 
7448
  # Code from module fstatat:
 
7449
  # Code from module fstatat-tests:
7123
7450
  # Code from module fsusage:
7124
7451
  # Code from module fsync:
7125
7452
  # Code from module fsync-tests:
7129
7456
 
7130
7457
  # Code from module ftello-tests:
7131
7458
  # Code from module ftoastr:
 
7459
  # Code from module ftruncate:
 
7460
  # Code from module ftruncate-tests:
7132
7461
  # Code from module fts:
7133
7462
  # Code from module full-read:
7134
7463
  # Code from module full-write:
7135
7464
  # Code from module futimens:
7136
7465
  # Code from module futimens-tests:
 
7466
  # Code from module fwrite-tests:
7137
7467
  # Code from module gendocs:
7138
7468
  # Code from module getaddrinfo:
7139
7469
  # Code from module getaddrinfo-tests:
7154
7484
  # Code from module getline-tests:
7155
7485
  # Code from module getloadavg:
7156
7486
  # Code from module getloadavg-tests:
 
7487
  # Code from module getlogin:
 
7488
  # Code from module getlogin-tests:
7157
7489
  # Code from module getndelim2:
7158
7490
  # Code from module getndelim2-tests:
7159
7491
  # Code from module getopt-gnu:
7161
7493
  # Code from module getopt-posix-tests:
7162
7494
  # Code from module getpagesize:
7163
7495
  # Code from module getpass-gnu:
7164
 
  # Code from module gettext:
7165
7496
  # Code from module gettext-h:
7166
7497
  # Code from module gettime:
7167
7498
  # Code from module gettimeofday:
7212
7543
  # Code from module inttypes-incomplete:
7213
7544
  # Code from module inttypes-tests:
7214
7545
  # Code from module ioctl:
 
7546
  # Code from module ioctl-tests:
7215
7547
  # Code from module isapipe:
 
7548
  # Code from module isatty:
 
7549
  # Code from module isatty-tests:
7216
7550
  # Code from module isblank:
7217
7551
  # Code from module isblank-tests:
7218
7552
  # Code from module isnand-nolibm:
7239
7573
  # Code from module linkat:
7240
7574
  # Code from module linkat-tests:
7241
7575
  # Code from module listen:
 
7576
  # Code from module listen-tests:
7242
7577
  # Code from module localcharset:
7243
7578
  # Code from module locale:
7244
7579
  # Code from module locale-tests:
 
7580
  # Code from module localeconv:
 
7581
  # Code from module localeconv-tests:
7245
7582
  # Code from module localename:
7246
7583
  # Code from module localename-tests:
7247
7584
  # Code from module lock:
7296
7633
  # Code from module mkdir:
7297
7634
  # Code from module mkdir-p:
7298
7635
  # Code from module mkdir-tests:
 
7636
  # Code from module mkfifo:
 
7637
  # Code from module mkfifo-tests:
 
7638
  # Code from module mknod:
 
7639
  # Code from module mknod-tests:
7299
7640
  # Code from module mkstemp:
7300
7641
  # Code from module mktime:
7301
7642
  # Code from module modechange:
7302
7643
  # Code from module mountlist:
7303
7644
  # Code from module mpsort:
 
7645
  # Code from module msvc-inval:
 
7646
  # Code from module msvc-nothrow:
7304
7647
  # Code from module multiarch:
7305
7648
  # Code from module nanosleep:
7306
7649
  # Code from module nanosleep-tests:
7311
7654
  # Code from module nl_langinfo:
7312
7655
  # Code from module nl_langinfo-tests:
7313
7656
  # Code from module nocrash:
 
7657
  # Code from module non-recursive-gnulib-prefix-hack:
7314
7658
  # Code from module nproc:
7315
7659
  # Code from module obstack:
7316
7660
  # Code from module open:
7317
7661
  # Code from module open-tests:
7318
7662
  # Code from module openat:
7319
7663
  # Code from module openat-die:
 
7664
  # Code from module openat-h:
7320
7665
  # Code from module openat-safer:
7321
7666
  # Code from module openat-safer-tests:
7322
7667
  # Code from module openat-tests:
 
7668
  # Code from module opendir:
7323
7669
  # Code from module parse-datetime:
7324
7670
  # Code from module parse-datetime-tests:
7325
7671
  # Code from module pathmax:
7328
7674
  # Code from module perror:
7329
7675
  # Code from module perror-tests:
7330
7676
  # Code from module physmem:
 
7677
  # Code from module pipe:
7331
7678
  # Code from module pipe-posix:
7332
7679
  # Code from module pipe-posix-tests:
 
7680
  # Code from module pipe2:
 
7681
  # Code from module pipe2-safer:
 
7682
  # Code from module pipe2-tests:
7333
7683
  # Code from module posix-shell:
 
7684
  # Code from module posix_spawn-internal:
 
7685
  # Code from module posix_spawn_file_actions_addclose:
 
7686
  # Code from module posix_spawn_file_actions_addclose-tests:
 
7687
  # Code from module posix_spawn_file_actions_adddup2:
 
7688
  # Code from module posix_spawn_file_actions_adddup2-tests:
 
7689
  # Code from module posix_spawn_file_actions_addopen:
 
7690
  # Code from module posix_spawn_file_actions_addopen-tests:
 
7691
  # Code from module posix_spawn_file_actions_destroy:
 
7692
  # Code from module posix_spawn_file_actions_init:
 
7693
  # Code from module posix_spawnattr_destroy:
 
7694
  # Code from module posix_spawnattr_init:
 
7695
  # Code from module posix_spawnattr_setflags:
 
7696
  # Code from module posix_spawnattr_setsigmask:
 
7697
  # Code from module posix_spawnp:
 
7698
  # Code from module posix_spawnp-tests:
7334
7699
  # Code from module posixtm:
7335
7700
  # Code from module posixtm-tests:
7336
7701
  # Code from module posixver:
7349
7714
  # Code from module quotearg:
7350
7715
  # Code from module quotearg-simple:
7351
7716
  # Code from module quotearg-simple-tests:
 
7717
  # Code from module raise:
 
7718
  # Code from module raise-tests:
7352
7719
  # Code from module randint:
7353
7720
  # Code from module randperm:
7354
7721
  # Code from module randread:
7355
7722
  # Code from module randread-tests:
 
7723
  # Code from module rawmemchr:
 
7724
  # Code from module rawmemchr-tests:
7356
7725
  # Code from module read:
7357
7726
  # Code from module read-file:
7358
7727
  # Code from module read-file-tests:
 
7728
  # Code from module read-tests:
 
7729
  # Code from module readdir:
7359
7730
  # Code from module readlink:
7360
7731
  # Code from module readlink-tests:
7361
7732
  # Code from module readlinkat:
7362
7733
  # Code from module readlinkat-tests:
7363
7734
  # Code from module readtokens:
 
7735
  # Code from module readtokens-tests:
7364
7736
  # Code from module readtokens0:
7365
7737
  # Code from module readutmp:
7366
7738
  # Code from module realloc-gnu:
7371
7743
  # Code from module remove-tests:
7372
7744
  # Code from module rename:
7373
7745
  # Code from module rename-tests:
 
7746
  # Code from module rewinddir:
7374
7747
  # Code from module rmdir:
7375
7748
  # Code from module rmdir-tests:
7376
7749
  # Code from module root-dev-ino:
 
7750
  # Code from module root-uid:
7377
7751
  # Code from module rpmatch:
7378
7752
  # Code from module safe-read:
7379
7753
  # Code from module safe-write:
7394
7768
  # Code from module setlocale:
7395
7769
  # Code from module setlocale-tests:
7396
7770
  # Code from module setsockopt:
 
7771
  # Code from module setsockopt-tests:
7397
7772
  # Code from module settime:
7398
7773
  # Code from module sig2str:
7399
7774
  # Code from module sigaction:
7400
7775
  # Code from module sigaction-tests:
7401
 
  # Code from module signal:
7402
 
  # Code from module signal-tests:
 
7776
  # Code from module signal-h:
 
7777
  # Code from module signal-h-tests:
7403
7778
  # Code from module signbit:
7404
7779
  # Code from module signbit-tests:
7405
7780
  # Code from module sigprocmask:
7419
7794
  # Code from module sockets:
7420
7795
  # Code from module sockets-tests:
7421
7796
  # Code from module socklen:
 
7797
  # Code from module spawn:
 
7798
  # Code from module spawn-pipe:
 
7799
  # Code from module spawn-pipe-tests:
 
7800
  # Code from module spawn-tests:
7422
7801
  # Code from module ssize_t:
7423
7802
  # Code from module stat:
7424
7803
  # Code from module stat-macros:
7426
7805
  # Code from module stat-tests:
7427
7806
  # Code from module stat-time:
7428
7807
  # Code from module stat-time-tests:
 
7808
  # Code from module stdalign:
 
7809
  # Code from module stdalign-tests:
7429
7810
  # Code from module stdarg:
7430
7811
 
 
7812
 
 
7813
 
7431
7814
  # Code from module stdbool:
7432
7815
  # Code from module stdbool-tests:
7433
7816
  # Code from module stddef:
7441
7824
  # Code from module stdlib-tests:
7442
7825
  # Code from module stpcpy:
7443
7826
  # Code from module stpncpy:
 
7827
  # Code from module strchrnul:
 
7828
  # Code from module strchrnul-tests:
7444
7829
  # Code from module strdup-posix:
7445
7830
  # Code from module streq:
7446
7831
  # Code from module strerror:
7454
7839
  # Code from module striconv-tests:
7455
7840
  # Code from module string:
7456
7841
  # Code from module string-tests:
 
7842
  # Code from module strncat:
 
7843
  # Code from module strncat-tests:
7457
7844
  # Code from module strndup:
7458
7845
  # Code from module strnlen:
7459
7846
  # Code from module strnlen-tests:
7460
7847
  # Code from module strnlen1:
 
7848
  # Code from module strnumcmp:
 
7849
  # Code from module strpbrk:
7461
7850
  # Code from module strsignal:
7462
7851
  # Code from module strsignal-tests:
7463
7852
  # Code from module strstr-simple:
7466
7855
  # Code from module strtoimax:
7467
7856
  # Code from module strtoimax-tests:
7468
7857
  # Code from module strtoll:
 
7858
  # Code from module strtoll-tests:
7469
7859
  # Code from module strtoull:
 
7860
  # Code from module strtoull-tests:
7470
7861
  # Code from module strtoumax:
7471
7862
  # Code from module strtoumax-tests:
7472
7863
  # Code from module symlink:
7475
7866
  # Code from module symlinkat-tests:
7476
7867
  # Code from module sys_ioctl:
7477
7868
  # Code from module sys_ioctl-tests:
 
7869
  # Code from module sys_resource:
 
7870
  # Code from module sys_resource-tests:
7478
7871
  # Code from module sys_select:
7479
7872
  # Code from module sys_select-tests:
7480
7873
  # Code from module sys_socket:
7483
7876
  # Code from module sys_stat-tests:
7484
7877
  # Code from module sys_time:
7485
7878
  # Code from module sys_time-tests:
 
7879
  # Code from module sys_types:
 
7880
  # Code from module sys_types-tests:
7486
7881
  # Code from module sys_uio:
7487
7882
  # Code from module sys_uio-tests:
7488
7883
  # Code from module sys_utsname:
7492
7887
  # Code from module tempname:
7493
7888
  # Code from module termios:
7494
7889
  # Code from module termios-tests:
 
7890
  # Code from module test-framework-sh:
 
7891
  # Code from module test-framework-sh-tests:
7495
7892
  # Code from module thread:
7496
7893
  # Code from module thread-tests:
7497
7894
  # Code from module threadlib:
7528
7925
  # Code from module unlink:
7529
7926
  # Code from module unlink-busy:
7530
7927
  # Code from module unlink-tests:
 
7928
  # Code from module unlinkat:
 
7929
  # Code from module unlinkat-tests:
7531
7930
  # Code from module unlinkdir:
7532
7931
  # Code from module unlocked-io:
7533
7932
  # Code from module unsetenv:
7563
7962
  # Code from module vfprintf-posix-tests:
7564
7963
  # Code from module vprintf-posix:
7565
7964
  # Code from module vprintf-posix-tests:
 
7965
  # Code from module wait-process:
 
7966
  # Code from module waitpid:
7566
7967
  # Code from module warnings:
7567
7968
  # Code from module wchar:
7568
7969
  # Code from module wchar-tests:
7579
7980
  # Code from module winsz-termios:
7580
7981
  # Code from module write:
7581
7982
  # Code from module write-any-file:
 
7983
  # Code from module write-tests:
7582
7984
  # Code from module xalloc:
7583
7985
  # Code from module xalloc-die:
7584
7986
  # Code from module xalloc-die-tests:
7585
7987
  # Code from module xalloc-oversized:
7586
7988
  # Code from module xfreopen:
 
7989
  # Code from module xfts:
7587
7990
  # Code from module xgetcwd:
7588
7991
  # Code from module xgetgroups:
7589
7992
  # Code from module xgethostname:
7618
8021
          LIBC_FATAL_STDERR_=1
7619
8022
  export LIBC_FATAL_STDERR_
7620
8023
 
7621
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7622
 
$as_echo_n "checking for inline... " >&6; }
7623
 
if ${ac_cv_c_inline+:} false; then :
7624
 
  $as_echo_n "(cached) " >&6
7625
 
else
7626
 
  ac_cv_c_inline=no
7627
 
for ac_kw in inline __inline__ __inline; do
7628
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7629
 
/* end confdefs.h.  */
7630
 
#ifndef __cplusplus
7631
 
typedef int foo_t;
7632
 
static $ac_kw foo_t static_foo () {return 0; }
7633
 
$ac_kw foo_t foo () {return 0; }
7634
 
#endif
7635
 
 
7636
 
_ACEOF
7637
 
if ac_fn_c_try_compile "$LINENO"; then :
7638
 
  ac_cv_c_inline=$ac_kw
7639
 
fi
7640
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7641
 
  test "$ac_cv_c_inline" != no && break
7642
 
done
7643
 
 
7644
 
fi
7645
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7646
 
$as_echo "$ac_cv_c_inline" >&6; }
7647
 
 
7648
 
case $ac_cv_c_inline in
7649
 
  inline | yes) ;;
7650
 
  *)
7651
 
    case $ac_cv_c_inline in
7652
 
      no) ac_val=;;
7653
 
      *) ac_val=$ac_cv_c_inline;;
7654
 
    esac
7655
 
    cat >>confdefs.h <<_ACEOF
7656
 
#ifndef __cplusplus
7657
 
#define inline $ac_val
7658
 
#endif
7659
 
_ACEOF
7660
 
    ;;
7661
 
esac
7662
 
 
7663
8024
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7664
8025
if test "x$ac_cv_type_size_t" = xyes; then :
7665
8026
 
7773
8134
$as_echo "#define C_ALLOCA 1" >>confdefs.h
7774
8135
 
7775
8136
 
7776
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7777
 
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
 
8137
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
 
8138
$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
7778
8139
if ${ac_cv_os_cray+:} false; then :
7779
8140
  $as_echo_n "(cached) " >&6
7780
8141
else
7866
8227
  GNULIB_INET_PTON=0;
7867
8228
    HAVE_DECL_INET_NTOP=1;
7868
8229
  HAVE_DECL_INET_PTON=1;
 
8230
  REPLACE_INET_NTOP=0;
 
8231
  REPLACE_INET_PTON=0;
7869
8232
 
7870
8233
 
7871
8234
 
8011
8374
  fi
8012
8375
 
8013
8376
 
8014
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
 
8377
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8015
8378
$as_echo_n "checking for d_ino member in directory struct... " >&6; }
8016
8379
if ${gl_cv_struct_dirent_d_ino+:} false; then :
8017
8380
  $as_echo_n "(cached) " >&6
8018
8381
else
8019
8382
  if test "$cross_compiling" = yes; then :
8020
 
  gl_cv_struct_dirent_d_ino=no
 
8383
  case "$host_os" in
 
8384
                           # Guess yes on glibc systems with Linux kernel.
 
8385
              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
 
8386
                           # If we don't know, assume the worst.
 
8387
              *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
 
8388
            esac
 
8389
 
8021
8390
else
8022
8391
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8023
8392
/* end confdefs.h.  */
8058
8427
fi
8059
8428
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8060
8429
$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8061
 
   if test $gl_cv_struct_dirent_d_ino = yes; then
 
8430
   case "$gl_cv_struct_dirent_d_ino" in
 
8431
     *yes)
8062
8432
 
8063
8433
$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8064
8434
 
8065
 
   fi
 
8435
       ;;
 
8436
   esac
8066
8437
 
8067
8438
 
8068
8439
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8122
8493
 
8123
8494
 
8124
8495
 
 
8496
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 
8497
$as_echo_n "checking for inline... " >&6; }
 
8498
if ${ac_cv_c_inline+:} false; then :
 
8499
  $as_echo_n "(cached) " >&6
 
8500
else
 
8501
  ac_cv_c_inline=no
 
8502
for ac_kw in inline __inline__ __inline; do
 
8503
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
8504
/* end confdefs.h.  */
 
8505
#ifndef __cplusplus
 
8506
typedef int foo_t;
 
8507
static $ac_kw foo_t static_foo () {return 0; }
 
8508
$ac_kw foo_t foo () {return 0; }
 
8509
#endif
 
8510
 
 
8511
_ACEOF
 
8512
if ac_fn_c_try_compile "$LINENO"; then :
 
8513
  ac_cv_c_inline=$ac_kw
 
8514
fi
 
8515
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
8516
  test "$ac_cv_c_inline" != no && break
 
8517
done
 
8518
 
 
8519
fi
 
8520
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
 
8521
$as_echo "$ac_cv_c_inline" >&6; }
 
8522
 
 
8523
case $ac_cv_c_inline in
 
8524
  inline | yes) ;;
 
8525
  *)
 
8526
    case $ac_cv_c_inline in
 
8527
      no) ac_val=;;
 
8528
      *) ac_val=$ac_cv_c_inline;;
 
8529
    esac
 
8530
    cat >>confdefs.h <<_ACEOF
 
8531
#ifndef __cplusplus
 
8532
#define inline $ac_val
 
8533
#endif
 
8534
_ACEOF
 
8535
    ;;
 
8536
esac
 
8537
 
8125
8538
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8126
8539
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8127
8540
if ${ac_cv_c_restrict+:} false; then :
8395
8808
int main () {
8396
8809
  /* Check whether the given locale name is recognized by the system.  */
8397
8810
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8398
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
8811
  /* On native Windows, setlocale(category, "") looks at the system settings,
8399
8812
     not at the environment variables.  Also, when an encoding suffix such
8400
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
8813
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8401
8814
     category of the locale to "C".  */
8402
8815
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8403
8816
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8406
8819
  if (setlocale (LC_ALL, "") == NULL) return 1;
8407
8820
#endif
8408
8821
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8409
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
8822
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8410
8823
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8411
8824
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8412
8825
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8432
8845
     one byte long. This excludes the UTF-8 encoding.  */
8433
8846
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8434
8847
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
8848
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8435
8849
  /* Check whether the decimal separator is a comma.
8436
8850
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8437
8851
     are nl_langinfo(RADIXCHAR) are both ".".  */
8438
8852
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
8853
#endif
8439
8854
  return 0;
8440
8855
}
8441
8856
 
8453
8868
        # "ja" as "Japanese" or "Japanese_Japan.932",
8454
8869
        # and similar.
8455
8870
        mingw*)
8456
 
          # Test for the native Win32 locale name.
 
8871
          # Test for the native Windows locale name.
8457
8872
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8458
8873
            gt_cv_locale_fr=French_France.1252
8459
8874
          else
8463
8878
          ;;
8464
8879
        *)
8465
8880
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8466
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
8881
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8467
8882
          # configure script would override the LC_ALL setting. Likewise for
8468
8883
          # LC_CTYPE, which is also set at the beginning of the configure script.
8469
8884
          # Test for the usual locale name.
8563
8978
  GNULIB_MKOSTEMPS=0;
8564
8979
  GNULIB_MKSTEMP=0;
8565
8980
  GNULIB_MKSTEMPS=0;
 
8981
  GNULIB_POSIX_OPENPT=0;
8566
8982
  GNULIB_PTSNAME=0;
 
8983
  GNULIB_PTSNAME_R=0;
8567
8984
  GNULIB_PUTENV=0;
 
8985
  GNULIB_RANDOM=0;
8568
8986
  GNULIB_RANDOM_R=0;
8569
8987
  GNULIB_REALLOC_POSIX=0;
8570
8988
  GNULIB_REALPATH=0;
8588
9006
  HAVE_MKOSTEMPS=1;
8589
9007
  HAVE_MKSTEMP=1;
8590
9008
  HAVE_MKSTEMPS=1;
 
9009
  HAVE_POSIX_OPENPT=1;
8591
9010
  HAVE_PTSNAME=1;
 
9011
  HAVE_PTSNAME_R=1;
 
9012
  HAVE_RANDOM=1;
8592
9013
  HAVE_RANDOM_H=1;
8593
9014
  HAVE_RANDOM_R=1;
8594
9015
  HAVE_REALPATH=1;
8607
9028
  REPLACE_MALLOC=0;
8608
9029
  REPLACE_MBTOWC=0;
8609
9030
  REPLACE_MKSTEMP=0;
 
9031
  REPLACE_PTSNAME=0;
 
9032
  REPLACE_PTSNAME_R=0;
8610
9033
  REPLACE_PUTENV=0;
 
9034
  REPLACE_RANDOM_R=0;
8611
9035
  REPLACE_REALLOC=0;
8612
9036
  REPLACE_REALPATH=0;
8613
9037
  REPLACE_SETENV=0;
8692
9116
 
8693
9117
 
8694
9118
 
8695
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
 
9119
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8696
9120
$as_echo_n "checking whether realpath works... " >&6; }
8697
9121
if ${gl_cv_func_realpath_works+:} false; then :
8698
9122
  $as_echo_n "(cached) " >&6
8701
9125
    touch conftest.a
8702
9126
    mkdir conftest.d
8703
9127
    if test "$cross_compiling" = yes; then :
8704
 
  gl_cv_func_realpath_works="guessing no"
 
9128
  case "$host_os" in
 
9129
                       # Guess yes on glibc systems.
 
9130
        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
 
9131
                       # If we don't know, assume the worst.
 
9132
        *)             gl_cv_func_realpath_works="guessing no" ;;
 
9133
      esac
 
9134
 
8705
9135
else
8706
9136
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8707
9137
/* end confdefs.h.  */
8710
9140
 
8711
9141
#include <stdlib.h>
8712
9142
#if defined __MACH__ && defined __APPLE__
8713
 
/* Avoid a crash on MacOS X.  */
 
9143
/* Avoid a crash on Mac OS X.  */
8714
9144
#include <mach/mach.h>
8715
9145
#include <mach/mach_error.h>
8716
9146
#include <mach/thread_status.h>
8771
9201
    }
8772
9202
  }
8773
9203
}
 
9204
#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
9205
/* Avoid a crash on native Windows.  */
 
9206
#define WIN32_LEAN_AND_MEAN
 
9207
#include <windows.h>
 
9208
#include <winerror.h>
 
9209
static LONG WINAPI
 
9210
exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
 
9211
{
 
9212
  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
 
9213
    {
 
9214
    case EXCEPTION_ACCESS_VIOLATION:
 
9215
    case EXCEPTION_IN_PAGE_ERROR:
 
9216
    case EXCEPTION_STACK_OVERFLOW:
 
9217
    case EXCEPTION_GUARD_PAGE:
 
9218
    case EXCEPTION_PRIV_INSTRUCTION:
 
9219
    case EXCEPTION_ILLEGAL_INSTRUCTION:
 
9220
    case EXCEPTION_DATATYPE_MISALIGNMENT:
 
9221
    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
 
9222
    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
 
9223
      exit (1);
 
9224
    }
 
9225
  return EXCEPTION_CONTINUE_SEARCH;
 
9226
}
 
9227
static void
 
9228
nocrash_init (void)
 
9229
{
 
9230
  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
 
9231
}
8774
9232
#else
8775
9233
/* Avoid a crash on POSIX systems.  */
8776
9234
#include <signal.h>
8842
9300
fi
8843
9301
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8844
9302
$as_echo "$gl_cv_func_realpath_works" >&6; }
8845
 
  if test "$gl_cv_func_realpath_works" = yes; then
 
9303
  case "$gl_cv_func_realpath_works" in
 
9304
    *yes)
8846
9305
 
8847
9306
$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8848
9307
 
8849
 
  fi
8850
 
 
8851
 
 
8852
 
 
8853
 
 
 
9308
      ;;
 
9309
  esac
 
9310
 
 
9311
 
 
9312
 
 
9313
 
 
9314
  GNULIB_CHDIR=0;
8854
9315
  GNULIB_CHOWN=0;
8855
9316
  GNULIB_CLOSE=0;
 
9317
  GNULIB_DUP=0;
8856
9318
  GNULIB_DUP2=0;
8857
9319
  GNULIB_DUP3=0;
8858
9320
  GNULIB_ENVIRON=0;
8860
9322
  GNULIB_FACCESSAT=0;
8861
9323
  GNULIB_FCHDIR=0;
8862
9324
  GNULIB_FCHOWNAT=0;
 
9325
  GNULIB_FDATASYNC=0;
8863
9326
  GNULIB_FSYNC=0;
8864
9327
  GNULIB_FTRUNCATE=0;
8865
9328
  GNULIB_GETCWD=0;
8872
9335
  GNULIB_GETPAGESIZE=0;
8873
9336
  GNULIB_GETUSERSHELL=0;
8874
9337
  GNULIB_GROUP_MEMBER=0;
 
9338
  GNULIB_ISATTY=0;
8875
9339
  GNULIB_LCHOWN=0;
8876
9340
  GNULIB_LINK=0;
8877
9341
  GNULIB_LINKAT=0;
8884
9348
  GNULIB_READLINK=0;
8885
9349
  GNULIB_READLINKAT=0;
8886
9350
  GNULIB_RMDIR=0;
 
9351
  GNULIB_SETHOSTNAME=0;
8887
9352
  GNULIB_SLEEP=0;
8888
9353
  GNULIB_SYMLINK=0;
8889
9354
  GNULIB_SYMLINKAT=0;
8890
9355
  GNULIB_TTYNAME_R=0;
8891
 
  GNULIB_UNISTD_H_GETOPT=0;
8892
9356
  GNULIB_UNISTD_H_NONBLOCKING=0;
8893
9357
  GNULIB_UNISTD_H_SIGPIPE=0;
8894
9358
  GNULIB_UNLINK=0;
8902
9366
  HAVE_FACCESSAT=1;
8903
9367
  HAVE_FCHDIR=1;
8904
9368
  HAVE_FCHOWNAT=1;
 
9369
  HAVE_FDATASYNC=1;
8905
9370
  HAVE_FSYNC=1;
8906
9371
  HAVE_FTRUNCATE=1;
8907
9372
  HAVE_GETDTABLESIZE=1;
8919
9384
  HAVE_PWRITE=1;
8920
9385
  HAVE_READLINK=1;
8921
9386
  HAVE_READLINKAT=1;
 
9387
  HAVE_SETHOSTNAME=1;
8922
9388
  HAVE_SLEEP=1;
8923
9389
  HAVE_SYMLINK=1;
8924
9390
  HAVE_SYMLINKAT=1;
8926
9392
  HAVE_USLEEP=1;
8927
9393
  HAVE_DECL_ENVIRON=1;
8928
9394
  HAVE_DECL_FCHDIR=1;
 
9395
  HAVE_DECL_FDATASYNC=1;
8929
9396
  HAVE_DECL_GETDOMAINNAME=1;
8930
9397
  HAVE_DECL_GETLOGIN_R=1;
8931
9398
  HAVE_DECL_GETPAGESIZE=1;
8932
9399
  HAVE_DECL_GETUSERSHELL=1;
 
9400
  HAVE_DECL_SETHOSTNAME=1;
8933
9401
  HAVE_DECL_TTYNAME_R=1;
8934
9402
  HAVE_OS_H=0;
8935
9403
  HAVE_SYS_PARAM_H=0;
8938
9406
  REPLACE_DUP=0;
8939
9407
  REPLACE_DUP2=0;
8940
9408
  REPLACE_FCHOWNAT=0;
 
9409
  REPLACE_FTRUNCATE=0;
8941
9410
  REPLACE_GETCWD=0;
8942
9411
  REPLACE_GETDOMAINNAME=0;
8943
9412
  REPLACE_GETLOGIN_R=0;
8944
9413
  REPLACE_GETGROUPS=0;
8945
9414
  REPLACE_GETPAGESIZE=0;
 
9415
  REPLACE_ISATTY=0;
8946
9416
  REPLACE_LCHOWN=0;
8947
9417
  REPLACE_LINK=0;
8948
9418
  REPLACE_LINKAT=0;
8963
9433
  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8964
9434
 
8965
9435
 
 
9436
 
 
9437
 
 
9438
 
 
9439
 
 
9440
 
 
9441
 
 
9442
 
8966
9443
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8967
9444
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8968
9445
if ${ac_cv_type_uid_t+:} false; then :
8993
9470
 
8994
9471
fi
8995
9472
 
8996
 
for ac_header in unistd.h
 
9473
 
 
9474
      for ac_header in unistd.h
8997
9475
do :
8998
9476
  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8999
9477
if test "x$ac_cv_header_unistd_h" = xyes; then :
9005
9483
 
9006
9484
done
9007
9485
 
9008
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
 
9486
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9009
9487
$as_echo_n "checking for working chown... " >&6; }
9010
9488
if ${ac_cv_func_chown_works+:} false; then :
9011
9489
  $as_echo_n "(cached) " >&6
9012
9490
else
9013
9491
  if test "$cross_compiling" = yes; then :
9014
 
  ac_cv_func_chown_works=no
 
9492
  case "$host_os" in # ((
 
9493
                  # Guess yes on glibc systems.
 
9494
          *-gnu*) ac_cv_func_chown_works=yes ;;
 
9495
                  # If we don't know, assume the worst.
 
9496
          *)      ac_cv_func_chown_works=no ;;
 
9497
        esac
 
9498
 
9015
9499
else
9016
9500
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9017
9501
/* end confdefs.h.  */
9018
9502
$ac_includes_default
9019
 
#include <fcntl.h>
 
9503
           #include <fcntl.h>
9020
9504
 
9021
9505
int
9022
9506
main ()
9023
9507
{
9024
 
  char *f = "conftest.chown";
9025
 
  struct stat before, after;
9026
 
 
9027
 
  if (creat (f, 0600) < 0)
9028
 
    return 1;
9029
 
  if (stat (f, &before) < 0)
9030
 
    return 1;
9031
 
  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9032
 
    return 1;
9033
 
  if (stat (f, &after) < 0)
9034
 
    return 1;
9035
 
  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
 
9508
 
 
9509
            char *f = "conftest.chown";
 
9510
            struct stat before, after;
 
9511
 
 
9512
            if (creat (f, 0600) < 0)
 
9513
              return 1;
 
9514
            if (stat (f, &before) < 0)
 
9515
              return 1;
 
9516
            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
 
9517
              return 1;
 
9518
            if (stat (f, &after) < 0)
 
9519
              return 1;
 
9520
            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9036
9521
 
9037
9522
  ;
9038
9523
  return 0;
9039
9524
}
 
9525
 
9040
9526
_ACEOF
9041
9527
if ac_fn_c_try_run "$LINENO"; then :
9042
9528
  ac_cv_func_chown_works=yes
9047
9533
  conftest.$ac_objext conftest.beam conftest.$ac_ext
9048
9534
fi
9049
9535
 
9050
 
rm -f conftest.chown
 
9536
     rm -f conftest.chown
9051
9537
 
9052
9538
fi
9053
9539
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9054
9540
$as_echo "$ac_cv_func_chown_works" >&6; }
9055
 
if test $ac_cv_func_chown_works = yes; then
 
9541
  if test $ac_cv_func_chown_works = yes; then
9056
9542
 
9057
9543
$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9058
9544
 
9059
 
fi
 
9545
  fi
9060
9546
 
9061
9547
 
9062
9548
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9149
9635
else
9150
9636
  touch conftest.file && rm -f conftest.link
9151
9637
       if test "$cross_compiling" = yes; then :
9152
 
  gl_cv_func_chown_slash_works="guessing no"
 
9638
  case "$host_os" in
 
9639
                   # Guess yes on glibc systems.
 
9640
           *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
 
9641
                   # If we don't know, assume the worst.
 
9642
           *)      gl_cv_func_chown_slash_works="guessing no" ;;
 
9643
         esac
 
9644
 
9153
9645
else
9154
9646
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9155
9647
/* end confdefs.h.  */
9181
9673
fi
9182
9674
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9183
9675
$as_echo "$gl_cv_func_chown_slash_works" >&6; }
9184
 
    if test "$gl_cv_func_chown_slash_works" != yes; then
 
9676
    case "$gl_cv_func_chown_slash_works" in
 
9677
      *yes) ;;
 
9678
      *)
9185
9679
 
9186
9680
$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9187
9681
 
9188
 
      REPLACE_CHOWN=1
9189
 
    fi
 
9682
        REPLACE_CHOWN=1
 
9683
        ;;
 
9684
    esac
9190
9685
 
9191
9686
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9192
9687
$as_echo_n "checking whether chown always updates ctime... " >&6; }
9194
9689
  $as_echo_n "(cached) " >&6
9195
9690
else
9196
9691
  if test "$cross_compiling" = yes; then :
9197
 
  gl_cv_func_chown_ctime_works="guessing no"
 
9692
  case "$host_os" in
 
9693
                   # Guess yes on glibc systems.
 
9694
           *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
 
9695
                   # If we don't know, assume the worst.
 
9696
           *)      gl_cv_func_chown_ctime_works="guessing no" ;;
 
9697
         esac
 
9698
 
9198
9699
else
9199
9700
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9200
9701
/* end confdefs.h.  */
9233
9734
fi
9234
9735
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9235
9736
$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9236
 
    if test "$gl_cv_func_chown_ctime_works" != yes; then
 
9737
    case "$gl_cv_func_chown_ctime_works" in
 
9738
      *yes) ;;
 
9739
      *)
9237
9740
 
9238
9741
$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9239
9742
 
9240
 
      REPLACE_CHOWN=1
9241
 
    fi
9242
 
  fi
 
9743
        REPLACE_CHOWN=1
 
9744
        ;;
 
9745
    esac
 
9746
  fi
 
9747
 
 
9748
 
 
9749
 
 
9750
 
 
9751
 
 
9752
  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
 
9753
    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
 
9754
 
 
9755
$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
9756
 
 
9757
  else
 
9758
    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
 
9759
  fi
 
9760
 
9243
9761
 
9244
9762
 
9245
9763
  GNULIB_IOCTL=0;
9253
9771
 
9254
9772
 
9255
9773
 
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
9260
 
else
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
9267
 
             #endif
9268
 
             typedef int dummy;
9269
 
 
9270
 
_ACEOF
9271
 
if ac_fn_c_try_compile "$LINENO"; then :
9272
 
 
9273
 
        # Check for potential -arch flags.  It is not universal unless
9274
 
        # there are at least two -arch flags with different values.
9275
 
        ac_arch=
9276
 
        ac_prev=
9277
 
        for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9278
 
         if test -n "$ac_prev"; then
9279
 
           case $ac_word in
9280
 
             i?86 | x86_64 | ppc | ppc64)
9281
 
               if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9282
 
                 ac_arch=$ac_word
9283
 
               else
9284
 
                 ac_cv_c_bigendian=universal
9285
 
                 break
9286
 
               fi
9287
 
               ;;
9288
 
           esac
9289
 
           ac_prev=
9290
 
         elif test "x$ac_word" = "x-arch"; then
9291
 
           ac_prev=arch
9292
 
         fi
9293
 
       done
9294
 
fi
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>
9302
 
 
9303
 
int
9304
 
main ()
9305
 
{
9306
 
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9307
 
                     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9308
 
                     && LITTLE_ENDIAN)
9309
 
              bogus endian macros
9310
 
             #endif
9311
 
 
9312
 
  ;
9313
 
  return 0;
9314
 
}
9315
 
_ACEOF
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>
9322
 
 
9323
 
int
9324
 
main ()
9325
 
{
9326
 
#if BYTE_ORDER != BIG_ENDIAN
9327
 
                 not big endian
9328
 
                #endif
9329
 
 
9330
 
  ;
9331
 
  return 0;
9332
 
}
9333
 
_ACEOF
9334
 
if ac_fn_c_try_compile "$LINENO"; then :
9335
 
  ac_cv_c_bigendian=yes
9336
 
else
9337
 
  ac_cv_c_bigendian=no
9338
 
fi
9339
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9340
 
fi
9341
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9342
 
    fi
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.  */
9347
 
#include <limits.h>
9348
 
 
9349
 
int
9350
 
main ()
9351
 
{
9352
 
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9353
 
              bogus endian macros
9354
 
             #endif
9355
 
 
9356
 
  ;
9357
 
  return 0;
9358
 
}
9359
 
_ACEOF
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.  */
9364
 
#include <limits.h>
9365
 
 
9366
 
int
9367
 
main ()
9368
 
{
9369
 
#ifndef _BIG_ENDIAN
9370
 
                 not big endian
9371
 
                #endif
9372
 
 
9373
 
  ;
9374
 
  return 0;
9375
 
}
9376
 
_ACEOF
9377
 
if ac_fn_c_try_compile "$LINENO"; then :
9378
 
  ac_cv_c_bigendian=yes
9379
 
else
9380
 
  ac_cv_c_bigendian=no
9381
 
fi
9382
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9383
 
fi
9384
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9385
 
    fi
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];
9398
 
                }
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];
9405
 
                }
9406
 
                extern int foo;
9407
 
 
9408
 
int
9409
 
main ()
9410
 
{
9411
 
return use_ascii (foo) == use_ebcdic (foo);
9412
 
  ;
9413
 
  return 0;
9414
 
}
9415
 
_ACEOF
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
9419
 
            fi
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
9423
 
              else
9424
 
                # finding both strings is unlikely to happen, but who knows?
9425
 
                ac_cv_c_bigendian=unknown
9426
 
              fi
9427
 
            fi
9428
 
fi
9429
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9430
 
else
9431
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9432
 
/* end confdefs.h.  */
9433
 
$ac_includes_default
9434
 
int
9435
 
main ()
9436
 
{
9437
 
 
9438
 
             /* Are we little or big endian?  From Harbison&Steele.  */
9439
 
             union
9440
 
             {
9441
 
               long int l;
9442
 
               char c[sizeof (long int)];
9443
 
             } u;
9444
 
             u.l = 1;
9445
 
             return u.c[sizeof (long int) - 1] == 1;
9446
 
 
9447
 
  ;
9448
 
  return 0;
9449
 
}
9450
 
_ACEOF
9451
 
if ac_fn_c_try_run "$LINENO"; then :
9452
 
  ac_cv_c_bigendian=no
9453
 
else
9454
 
  ac_cv_c_bigendian=yes
9455
 
fi
9456
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9457
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
9458
 
fi
9459
 
 
9460
 
    fi
9461
 
fi
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 #(
9465
 
   yes)
9466
 
     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9467
 
;; #(
9468
 
   no)
9469
 
      ;; #(
9470
 
   universal)
9471
 
 
9472
 
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9473
 
 
9474
 
     ;; #(
9475
 
   *)
9476
 
     as_fn_error $? "unknown endianness
9477
 
 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9478
 
 esac
9479
 
 
9480
 
 
9481
 
 
9482
 
  GNULIB_ISBLANK=0;
9483
 
    HAVE_ISBLANK=1;
9484
 
 
9485
 
 
9486
 
     GNULIB_DIRFD=0;
 
9774
     GNULIB_OPENDIR=0;
 
9775
  GNULIB_READDIR=0;
 
9776
  GNULIB_REWINDDIR=0;
 
9777
  GNULIB_CLOSEDIR=0;
 
9778
  GNULIB_DIRFD=0;
9487
9779
  GNULIB_FDOPENDIR=0;
9488
9780
  GNULIB_SCANDIR=0;
9489
9781
  GNULIB_ALPHASORT=0;
9490
 
    HAVE_DECL_DIRFD=1;
 
9782
    HAVE_OPENDIR=1;
 
9783
  HAVE_READDIR=1;
 
9784
  HAVE_REWINDDIR=1;
 
9785
  HAVE_CLOSEDIR=1;
 
9786
  HAVE_DECL_DIRFD=1;
9491
9787
  HAVE_DECL_FDOPENDIR=1;
9492
9788
  HAVE_FDOPENDIR=1;
9493
9789
  HAVE_SCANDIR=1;
9494
9790
  HAVE_ALPHASORT=1;
 
9791
  REPLACE_OPENDIR=0;
9495
9792
  REPLACE_CLOSEDIR=0;
9496
9793
  REPLACE_DIRFD=0;
9497
9794
  REPLACE_FDOPENDIR=0;
9498
 
  REPLACE_OPENDIR=0;
 
9795
 
 
9796
 
 
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
 
9801
else
 
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
 
9808
             #endif
 
9809
             typedef int dummy;
 
9810
 
 
9811
_ACEOF
 
9812
if ac_fn_c_try_compile "$LINENO"; then :
 
9813
 
 
9814
        # Check for potential -arch flags.  It is not universal unless
 
9815
        # there are at least two -arch flags with different values.
 
9816
        ac_arch=
 
9817
        ac_prev=
 
9818
        for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
 
9819
         if test -n "$ac_prev"; then
 
9820
           case $ac_word in
 
9821
             i?86 | x86_64 | ppc | ppc64)
 
9822
               if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
 
9823
                 ac_arch=$ac_word
 
9824
               else
 
9825
                 ac_cv_c_bigendian=universal
 
9826
                 break
 
9827
               fi
 
9828
               ;;
 
9829
           esac
 
9830
           ac_prev=
 
9831
         elif test "x$ac_word" = "x-arch"; then
 
9832
           ac_prev=arch
 
9833
         fi
 
9834
       done
 
9835
fi
 
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>
 
9843
 
 
9844
int
 
9845
main ()
 
9846
{
 
9847
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
 
9848
                     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
 
9849
                     && LITTLE_ENDIAN)
 
9850
              bogus endian macros
 
9851
             #endif
 
9852
 
 
9853
  ;
 
9854
  return 0;
 
9855
}
 
9856
_ACEOF
 
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>
 
9863
 
 
9864
int
 
9865
main ()
 
9866
{
 
9867
#if BYTE_ORDER != BIG_ENDIAN
 
9868
                 not big endian
 
9869
                #endif
 
9870
 
 
9871
  ;
 
9872
  return 0;
 
9873
}
 
9874
_ACEOF
 
9875
if ac_fn_c_try_compile "$LINENO"; then :
 
9876
  ac_cv_c_bigendian=yes
 
9877
else
 
9878
  ac_cv_c_bigendian=no
 
9879
fi
 
9880
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
9881
fi
 
9882
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
9883
    fi
 
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.  */
 
9888
#include <limits.h>
 
9889
 
 
9890
int
 
9891
main ()
 
9892
{
 
9893
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
 
9894
              bogus endian macros
 
9895
             #endif
 
9896
 
 
9897
  ;
 
9898
  return 0;
 
9899
}
 
9900
_ACEOF
 
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.  */
 
9905
#include <limits.h>
 
9906
 
 
9907
int
 
9908
main ()
 
9909
{
 
9910
#ifndef _BIG_ENDIAN
 
9911
                 not big endian
 
9912
                #endif
 
9913
 
 
9914
  ;
 
9915
  return 0;
 
9916
}
 
9917
_ACEOF
 
9918
if ac_fn_c_try_compile "$LINENO"; then :
 
9919
  ac_cv_c_bigendian=yes
 
9920
else
 
9921
  ac_cv_c_bigendian=no
 
9922
fi
 
9923
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
9924
fi
 
9925
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
9926
    fi
 
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];
 
9939
                }
 
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];
 
9946
                }
 
9947
                extern int foo;
 
9948
 
 
9949
int
 
9950
main ()
 
9951
{
 
9952
return use_ascii (foo) == use_ebcdic (foo);
 
9953
  ;
 
9954
  return 0;
 
9955
}
 
9956
_ACEOF
 
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
 
9960
            fi
 
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
 
9964
              else
 
9965
                # finding both strings is unlikely to happen, but who knows?
 
9966
                ac_cv_c_bigendian=unknown
 
9967
              fi
 
9968
            fi
 
9969
fi
 
9970
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
9971
else
 
9972
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
9973
/* end confdefs.h.  */
 
9974
$ac_includes_default
 
9975
int
 
9976
main ()
 
9977
{
 
9978
 
 
9979
             /* Are we little or big endian?  From Harbison&Steele.  */
 
9980
             union
 
9981
             {
 
9982
               long int l;
 
9983
               char c[sizeof (long int)];
 
9984
             } u;
 
9985
             u.l = 1;
 
9986
             return u.c[sizeof (long int) - 1] == 1;
 
9987
 
 
9988
  ;
 
9989
  return 0;
 
9990
}
 
9991
_ACEOF
 
9992
if ac_fn_c_try_run "$LINENO"; then :
 
9993
  ac_cv_c_bigendian=no
 
9994
else
 
9995
  ac_cv_c_bigendian=yes
 
9996
fi
 
9997
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
9998
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
9999
fi
 
10000
 
 
10001
    fi
 
10002
fi
 
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 #(
 
10006
   yes)
 
10007
     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
 
10008
;; #(
 
10009
   no)
 
10010
      ;; #(
 
10011
   universal)
 
10012
 
 
10013
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
10014
 
 
10015
     ;; #(
 
10016
   *)
 
10017
     as_fn_error $? "unknown endianness
 
10018
 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
 
10019
 esac
 
10020
 
 
10021
 
 
10022
 
 
10023
  GNULIB_ISBLANK=0;
 
10024
    HAVE_ISBLANK=1;
 
10025
 
 
10026
 
9499
10027
 
9500
10028
 
9501
10029
 
9518
10046
 
9519
10047
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9520
10048
/* end confdefs.h.  */
9521
 
#include <unistd.h>
 
10049
#if HAVE_UNISTD_H
 
10050
     #include <unistd.h>
 
10051
     #endif
 
10052
     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
 
10053
     #include <stdlib.h>
 
10054
 
9522
10055
           extern struct { int foo; } environ;
9523
10056
int
9524
10057
main ()
9561
10094
/* end confdefs.h.  */
9562
10095
 
9563
10096
#include <errno.h>
 
10097
#if !defined ETXTBSY
 
10098
booboo
 
10099
#endif
9564
10100
#if !defined ENOMSG
9565
10101
booboo
9566
10102
#endif
9600
10136
#if !defined ECANCELED
9601
10137
booboo
9602
10138
#endif
 
10139
#if !defined EOWNERDEAD
 
10140
booboo
 
10141
#endif
 
10142
#if !defined ENOTRECOVERABLE
 
10143
booboo
 
10144
#endif
9603
10145
 
9604
10146
_ACEOF
9605
10147
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9643
10185
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9644
10186
                 *)    gl_absname_cpp="$ac_cpp" ;;
9645
10187
               esac
 
10188
 
 
10189
               case "$host_os" in
 
10190
                 mingw*)
 
10191
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
10192
                   ;;
 
10193
                 *)
 
10194
                   gl_dirsep_regex='\/'
 
10195
                   ;;
 
10196
               esac
 
10197
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
10198
 
 
10199
               gl_header_literal_regex=`echo 'errno.h' \
 
10200
                                        | sed -e "$gl_make_literal_regex_sed"`
 
10201
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
10202
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
10203
                   s|^/[^/]|//&|
 
10204
                   p
 
10205
                   q
 
10206
                 }'
9646
10207
                                                            gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9647
 
                  sed -n '\#/errno.h#{
9648
 
                    s#.*"\(.*/errno.h\)".*#\1#
9649
 
                    s#^/[^/]#//&#
9650
 
                    p
9651
 
                    q
9652
 
                  }'`'"'
 
10208
                      sed -n "$gl_absolute_header_sed"`'"'
9653
10209
 
9654
10210
 
9655
10211
fi
9992
10548
 
9993
10549
 
9994
10550
 
9995
 
 
9996
 
 
9997
 
ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
9998
 
if test "x$ac_cv_have_decl_setregid" = xyes; then :
9999
 
  ac_have_decl=1
10000
 
else
10001
 
  ac_have_decl=0
10002
 
fi
10003
 
 
10004
 
cat >>confdefs.h <<_ACEOF
10005
 
#define HAVE_DECL_SETREGID $ac_have_decl
10006
 
_ACEOF
10007
 
 
10008
10551
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
10009
10552
$as_echo_n "checking type of array argument to getgroups... " >&6; }
10010
10553
if ${ac_cv_type_getgroups+:} false; then :
10072
10615
_ACEOF
10073
10616
 
10074
10617
 
10075
 
ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
10076
 
if test "x$ac_cv_func_getgroups" = xyes; then :
10077
 
 
10078
 
fi
10079
 
 
10080
 
 
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.
10083
 
ac_save_LIBS=$LIBS
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
10089
 
else
10090
 
  ac_check_lib_save_LIBS=$LIBS
10091
 
LIBS="-lbsd  $LIBS"
10092
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10093
 
/* end confdefs.h.  */
10094
 
 
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.  */
10098
 
#ifdef __cplusplus
10099
 
extern "C"
10100
 
#endif
10101
 
char getgroups ();
10102
 
int
10103
 
main ()
10104
 
{
10105
 
return getgroups ();
10106
 
  ;
10107
 
  return 0;
10108
 
}
10109
 
_ACEOF
10110
 
if ac_fn_c_try_link "$LINENO"; then :
10111
 
  ac_cv_lib_bsd_getgroups=yes
10112
 
else
10113
 
  ac_cv_lib_bsd_getgroups=no
10114
 
fi
10115
 
rm -f core conftest.err conftest.$ac_objext \
10116
 
    conftest$ac_exeext conftest.$ac_ext
10117
 
LIBS=$ac_check_lib_save_LIBS
10118
 
fi
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
10123
 
fi
10124
 
 
10125
 
fi
10126
 
 
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
10134
 
else
10135
 
  if test "$cross_compiling" = yes; then :
10136
 
  ac_cv_func_getgroups_works=no
10137
 
else
10138
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139
 
/* end confdefs.h.  */
10140
 
$ac_includes_default
10141
 
int
10142
 
main ()
10143
 
{
10144
 
/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
10145
 
       return getgroups (0, 0) == -1;
10146
 
  ;
10147
 
  return 0;
10148
 
}
10149
 
_ACEOF
10150
 
if ac_fn_c_try_run "$LINENO"; then :
10151
 
  ac_cv_func_getgroups_works=yes
10152
 
else
10153
 
  ac_cv_func_getgroups_works=no
10154
 
fi
10155
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10156
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10157
 
fi
10158
 
 
10159
 
 
10160
 
fi
10161
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
10162
 
$as_echo "$ac_cv_func_getgroups_works" >&6; }
10163
 
else
10164
 
  ac_cv_func_getgroups_works=no
10165
 
fi
10166
 
if test $ac_cv_func_getgroups_works = yes; then
10167
 
 
10168
 
$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
10169
 
 
10170
 
fi
10171
 
LIBS=$ac_save_LIBS
10172
 
 
10173
 
 
10174
 
  GNULIB_FCNTL=0;
10175
 
  GNULIB_NONBLOCKING=0;
10176
 
  GNULIB_OPEN=0;
10177
 
  GNULIB_OPENAT=0;
10178
 
    HAVE_FCNTL=1;
10179
 
  HAVE_OPENAT=1;
10180
 
  REPLACE_FCNTL=0;
10181
 
  REPLACE_OPEN=0;
10182
 
  REPLACE_OPENAT=0;
 
10618
 
 
10619
 
 
10620
 
 
10621
 
 
10622
 
 
10623
 
 
10624
 
 
10625
  ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
 
10626
"
 
10627
if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
 
10628
 
 
10629
cat >>confdefs.h <<_ACEOF
 
10630
#define HAVE_SIG_ATOMIC_T 1
 
10631
_ACEOF
 
10632
 
 
10633
 
 
10634
else
 
10635
 
 
10636
$as_echo "#define sig_atomic_t int" >>confdefs.h
 
10637
 
 
10638
fi
 
10639
 
 
10640
 
 
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 :
 
10643
  ac_have_decl=1
 
10644
else
 
10645
  ac_have_decl=0
 
10646
fi
 
10647
 
 
10648
cat >>confdefs.h <<_ACEOF
 
10649
#define HAVE_DECL_FCHDIR $ac_have_decl
 
10650
_ACEOF
10183
10651
 
10184
10652
 
10185
10653
     GNULIB_FCHMODAT=0;
 
10654
  GNULIB_FSTAT=0;
10186
10655
  GNULIB_FSTATAT=0;
10187
10656
  GNULIB_FUTIMENS=0;
10188
10657
  GNULIB_LCHMOD=0;
10220
10689
 
10221
10690
 
10222
10691
 
10223
 
 
10224
 
 
10225
 
 
10226
 
 
10227
 
 
10228
 
 
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
10233
 
else
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
10242
 
 
10243
 
else
10244
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10245
 
/* end confdefs.h.  */
10246
 
$ac_includes_default
10247
 
int
10248
 
main ()
10249
 
{
10250
 
struct stat sbuf;
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;
10255
 
 
10256
 
  ;
10257
 
  return 0;
10258
 
}
10259
 
_ACEOF
10260
 
if ac_fn_c_try_run "$LINENO"; then :
10261
 
  gl_cv_func_lstat_dereferences_slashed_symlink=yes
10262
 
else
10263
 
  gl_cv_func_lstat_dereferences_slashed_symlink=no
10264
 
fi
10265
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10266
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10267
 
fi
10268
 
 
10269
 
     else
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
10273
 
     fi
10274
 
     rm -f conftest.sym conftest.file
10275
 
 
10276
 
fi
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 &&
10280
 
 
10281
 
cat >>confdefs.h <<_ACEOF
10282
 
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10283
 
_ACEOF
10284
 
 
10285
 
 
10286
 
 
10287
 
 
10288
 
 
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
10293
 
else
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
10298
 
     fi
10299
 
     if test "$cross_compiling" = yes; then :
10300
 
  gl_cv_func_unlink_honors_slashes="guessing no"
10301
 
else
10302
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10303
 
/* end confdefs.h.  */
10304
 
#include <unistd.h>
10305
 
           #include <errno.h>
10306
 
 
10307
 
int
10308
 
main ()
10309
 
{
10310
 
int result = 0;
10311
 
           if (!unlink ("conftest.file/"))
10312
 
             result |= 1;
10313
 
           else if (errno != ENOTDIR)
10314
 
             result |= 2;
10315
 
#if HAVE_LSTAT
10316
 
           if (!unlink ("conftest.lnk/"))
10317
 
             result |= 4;
10318
 
           else if (errno != ENOTDIR)
10319
 
             result |= 8;
10320
 
#endif
10321
 
           return result;
10322
 
 
10323
 
  ;
10324
 
  return 0;
10325
 
}
10326
 
_ACEOF
10327
 
if ac_fn_c_try_run "$LINENO"; then :
10328
 
  gl_cv_func_unlink_honors_slashes=yes
10329
 
else
10330
 
  gl_cv_func_unlink_honors_slashes=no
10331
 
fi
10332
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10333
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10334
 
fi
10335
 
 
10336
 
     rm -f conftest.file conftest.lnk
10337
 
fi
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
10344
 
else
10345
 
  case "$host_os" in
10346
 
       darwin*)
10347
 
                                                      if {
10348
 
              # Use the mktemp program if available. If not available, hide the error
10349
 
              # message.
10350
 
              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
10351
 
              test -n "$tmp" && test -d "$tmp"
10352
 
            } ||
10353
 
            {
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
10358
 
              # directory.
10359
 
              tmp=/tmp/gt$$-$RANDOM
10360
 
              (umask 077 && mkdir "$tmp")
10361
 
            }; then
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"
10367
 
else
10368
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10369
 
/* end confdefs.h.  */
10370
 
 
10371
 
                #include <stdlib.h>
10372
 
                #include <unistd.h>
10373
 
                int main ()
10374
 
                {
10375
 
                  int result = 0;
10376
 
                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
10377
 
                    result |= 1;
10378
 
                  else if (unlink ("..") == 0)
10379
 
                    result |= 2;
10380
 
                  return result;
10381
 
                }
10382
 
 
10383
 
_ACEOF
10384
 
if ac_fn_c_try_run "$LINENO"; then :
10385
 
  gl_cv_func_unlink_parent_fails=yes
10386
 
else
10387
 
  gl_cv_func_unlink_parent_fails=no
10388
 
fi
10389
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10390
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10391
 
fi
10392
 
 
10393
 
           unset GL_SUBDIR_FOR_UNLINK
10394
 
           rm -rf "$tmp"
10395
 
         else
10396
 
           gl_cv_func_unlink_parent_fails="guessing no"
10397
 
         fi
10398
 
         ;;
10399
 
       *)
10400
 
         gl_cv_func_unlink_parent_fails="guessing yes"
10401
 
         ;;
10402
 
     esac
10403
 
 
10404
 
fi
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
10408
 
    *no)
10409
 
 
10410
 
$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
10411
 
 
10412
 
      ;;
10413
 
  esac
10414
 
  if test "$gl_cv_func_unlink_honors_slashes" != yes \
10415
 
     || { case "$gl_cv_func_unlink_parent_fails" in
10416
 
            *yes) false;;
10417
 
            *no) true;;
10418
 
          esac
10419
 
        }; then
10420
 
    REPLACE_UNLINK=1
10421
 
  fi
10422
 
 
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 :
10425
 
 
10426
 
else
10427
 
 
10428
 
cat >>confdefs.h <<_ACEOF
10429
 
#define mode_t int
10430
 
_ACEOF
10431
 
 
10432
 
fi
10433
 
 
10434
 
 
10435
 
 
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
10440
 
else
10441
 
 
10442
 
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443
 
/* end confdefs.h.  */
10444
 
#include <sys/types.h>
10445
 
int
10446
 
main ()
10447
 
{
10448
 
typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
10449
 
  ;
10450
 
  return 0;
10451
 
}
10452
 
_ACEOF
10453
 
if ac_fn_c_try_compile "$LINENO"; then :
10454
 
  gl_cv_promoted_mode_t='int'
10455
 
else
10456
 
  gl_cv_promoted_mode_t='mode_t'
10457
 
fi
10458
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10459
 
 
10460
 
fi
10461
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
10462
 
$as_echo "$gl_cv_promoted_mode_t" >&6; }
10463
 
 
10464
 
cat >>confdefs.h <<_ACEOF
10465
 
#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
10466
 
_ACEOF
10467
 
 
10468
 
 
10469
 
 
10470
 
 
10471
 
 
10472
 
 
10473
 
  GNULIB_OPENAT=1
10474
 
 
10475
 
 
10476
 
  GNULIB_FCHMODAT=1
10477
 
  GNULIB_FSTATAT=1
10478
 
  GNULIB_MKDIRAT=1
10479
 
 
10480
 
 
10481
 
  GNULIB_FCHOWNAT=1
10482
 
  GNULIB_UNLINKAT=1
10483
 
 
10484
 
 
10485
 
 
10486
 
 
10487
 
 
10488
 
  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
10489
 
  yes+yes)
10490
 
    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
10491
 
    if test $REPLACE_UNLINK = 1; then
10492
 
      REPLACE_UNLINKAT=1
10493
 
    fi ;;
10494
 
  yes+*)
10495
 
    # Solaris 9 has *at functions, but uniformly mishandles trailing
10496
 
    # slash in all of them.
10497
 
    REPLACE_OPENAT=1
10498
 
    REPLACE_UNLINKAT=1
10499
 
    ;;
10500
 
  *)
10501
 
    HAVE_OPENAT=0
10502
 
    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
10503
 
 
10504
 
 
10505
 
 
10506
 
  :
10507
 
;;
10508
 
  esac
10509
 
  if test $ac_cv_func_fchmodat != yes; then
10510
 
    HAVE_FCHMODAT=0
10511
 
  fi
10512
 
  if test $ac_cv_func_mkdirat != yes; then
10513
 
    HAVE_MKDIRAT=0
10514
 
  fi
10515
 
 
10516
 
 
10517
 
 
10518
 
  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
10519
 
if test "x$ac_cv_func_fchownat" = xyes; then :
10520
 
 
10521
 
 
10522
 
 
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
10527
 
else
10528
 
 
10529
 
     gl_dangle=conftest.dangle
10530
 
     # Remove any remnants of a previous test.
10531
 
     rm -f $gl_dangle
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
10537
 
else
10538
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10539
 
/* end confdefs.h.  */
10540
 
 
10541
 
#include <fcntl.h>
10542
 
#include <unistd.h>
10543
 
#include <stdlib.h>
10544
 
#include <errno.h>
10545
 
#include <sys/types.h>
10546
 
int
10547
 
main ()
10548
 
{
10549
 
  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
10550
 
                    AT_SYMLINK_NOFOLLOW) != 0
10551
 
          && errno == ENOENT);
10552
 
}
10553
 
 
10554
 
_ACEOF
10555
 
if ac_fn_c_try_run "$LINENO"; then :
10556
 
  gl_cv_func_fchownat_nofollow_works=yes
10557
 
else
10558
 
  gl_cv_func_fchownat_nofollow_works=no
10559
 
fi
10560
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10561
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10562
 
fi
10563
 
 
10564
 
 
10565
 
fi
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 :
10569
 
  REPLACE_FCHOWNAT=1
10570
 
 
10571
 
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
10572
 
 
10573
 
 
10574
 
fi
10575
 
 
10576
 
 
10577
 
 
10578
 
 
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
10583
 
else
10584
 
  if test "$cross_compiling" = yes; then :
10585
 
  gl_cv_func_fchownat_empty_filename_works="guessing no"
10586
 
else
10587
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10588
 
/* end confdefs.h.  */
10589
 
#include <unistd.h>
10590
 
            #include <fcntl.h>
10591
 
 
10592
 
int
10593
 
main ()
10594
 
{
10595
 
int fd;
10596
 
            int ret;
10597
 
            if (mkdir ("conftestdir", 0700) < 0)
10598
 
              return 2;
10599
 
            fd = open ("conftestdir", O_RDONLY);
10600
 
            if (fd < 0)
10601
 
              return 3;
10602
 
            ret = fchownat (fd, "", -1, -1, 0);
10603
 
            close (fd);
10604
 
            rmdir ("conftestdir");
10605
 
            return ret == 0;
10606
 
 
10607
 
  ;
10608
 
  return 0;
10609
 
}
10610
 
_ACEOF
10611
 
if ac_fn_c_try_run "$LINENO"; then :
10612
 
  gl_cv_func_fchownat_empty_filename_works=yes
10613
 
else
10614
 
  gl_cv_func_fchownat_empty_filename_works=no
10615
 
fi
10616
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10617
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10618
 
fi
10619
 
 
10620
 
 
10621
 
fi
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 :
10625
 
  REPLACE_FCHOWNAT=1
10626
 
 
10627
 
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
10628
 
 
10629
 
 
10630
 
fi
10631
 
 
10632
 
     if test $REPLACE_CHOWN = 1; then
10633
 
       REPLACE_FCHOWNAT=1
10634
 
     fi
10635
 
else
10636
 
  HAVE_FCHOWNAT=0
10637
 
fi
10638
 
 
10639
 
 
10640
 
 
10641
 
 
10642
 
 
10643
 
 
10644
 
 
10645
 
 
10646
 
  if test $ac_cv_func_fstatat = no; then
10647
 
    HAVE_FSTATAT=0
10648
 
  else
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
10653
 
else
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; }
10660
 
else
10661
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662
 
/* end confdefs.h.  */
10663
 
 
10664
 
              #include <fcntl.h>
10665
 
              #include <sys/stat.h>
10666
 
              int
10667
 
              main (void)
10668
 
              {
10669
 
                struct stat a;
10670
 
                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
10671
 
              }
10672
 
 
10673
 
_ACEOF
10674
 
if ac_fn_c_try_run "$LINENO"; then :
10675
 
  gl_cv_func_fstatat_zero_flag=yes
10676
 
fi
10677
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10678
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
10679
 
fi
10680
 
 
10681
 
fi
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; }
10684
 
 
10685
 
    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
10686
 
    yes+yes) ;;
10687
 
    *) REPLACE_FSTATAT=1
10688
 
       if test $gl_cv_func_fstatat_zero_flag != yes; then
10689
 
 
10690
 
$as_echo "#define FSTATAT_ZERO_FLAG_BROKEN 1" >>confdefs.h
10691
 
 
10692
 
       fi
10693
 
       ;;
10694
 
    esac
10695
 
  fi
10696
 
 
10697
 
 
10698
 
 
10699
 
 
10700
 
 
10701
 
 
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 :
10704
 
  ac_have_decl=1
10705
 
else
10706
 
  ac_have_decl=0
10707
 
fi
10708
 
 
10709
 
cat >>confdefs.h <<_ACEOF
10710
 
#define HAVE_DECL_FCHDIR $ac_have_decl
10711
 
_ACEOF
10712
 
 
10713
 
 
10714
10692
  GNULIB_DPRINTF=0;
10715
10693
  GNULIB_FCLOSE=0;
 
10694
  GNULIB_FDOPEN=0;
10716
10695
  GNULIB_FFLUSH=0;
10717
10696
  GNULIB_FGETC=0;
10718
10697
  GNULIB_FGETS=0;
10734
10713
  GNULIB_GETCHAR=0;
10735
10714
  GNULIB_GETDELIM=0;
10736
10715
  GNULIB_GETLINE=0;
10737
 
  GNULIB_GETS=0;
10738
10716
  GNULIB_OBSTACK_PRINTF=0;
10739
10717
  GNULIB_OBSTACK_PRINTF_POSIX=0;
 
10718
  GNULIB_PCLOSE=0;
10740
10719
  GNULIB_PERROR=0;
10741
10720
  GNULIB_POPEN=0;
10742
10721
  GNULIB_PRINTF=0;
10774
10753
  HAVE_DPRINTF=1;
10775
10754
  HAVE_FSEEKO=1;
10776
10755
  HAVE_FTELLO=1;
 
10756
  HAVE_PCLOSE=1;
 
10757
  HAVE_POPEN=1;
10777
10758
  HAVE_RENAMEAT=1;
10778
10759
  HAVE_VASPRINTF=1;
10779
10760
  HAVE_VDPRINTF=1;
10780
10761
  REPLACE_DPRINTF=0;
10781
10762
  REPLACE_FCLOSE=0;
 
10763
  REPLACE_FDOPEN=0;
10782
10764
  REPLACE_FFLUSH=0;
10783
10765
  REPLACE_FOPEN=0;
10784
10766
  REPLACE_FPRINTF=0;
10810
10792
  REPLACE_VSPRINTF=0;
10811
10793
 
10812
10794
 
 
10795
  GNULIB_FCNTL=0;
 
10796
  GNULIB_NONBLOCKING=0;
 
10797
  GNULIB_OPEN=0;
 
10798
  GNULIB_OPENAT=0;
 
10799
    HAVE_FCNTL=1;
 
10800
  HAVE_OPENAT=1;
 
10801
  REPLACE_FCNTL=0;
 
10802
  REPLACE_OPEN=0;
 
10803
  REPLACE_OPENAT=0;
 
10804
 
 
10805
 
 
10806
 
 
10807
 
 
10808
 
 
10809
 
 
10810
 
10813
10811
 
10814
10812
 
10815
10813
 
10825
10823
/* end confdefs.h.  */
10826
10824
#include <sys/types.h>
10827
10825
           #include <sys/stat.h>
10828
 
           #include <unistd.h>
 
10826
           #if HAVE_UNISTD_H
 
10827
           # include <unistd.h>
 
10828
           #else /* on Windows with MSVC */
 
10829
           # include <io.h>
 
10830
           # include <stdlib.h>
 
10831
           # defined sleep(n) _sleep ((n) * 1000)
 
10832
           #endif
10829
10833
           #include <fcntl.h>
10830
10834
           #ifndef O_NOATIME
10831
10835
            #define O_NOATIME 0
10844
10848
{
10845
10849
 
10846
10850
            int result = !constants;
 
10851
            #if HAVE_SYMLINK
10847
10852
            {
10848
10853
              static char const sym[] = "conftest.sym";
10849
 
              if (symlink (".", sym) != 0)
 
10854
              if (symlink ("/dev/null", sym) != 0)
 
10855
                result |= 2;
 
10856
              else
 
10857
                {
 
10858
                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
 
10859
                  if (fd >= 0)
 
10860
                    {
 
10861
                      close (fd);
 
10862
                      result |= 4;
 
10863
                    }
 
10864
                }
 
10865
              if (unlink (sym) != 0 || symlink (".", sym) != 0)
10850
10866
                result |= 2;
10851
10867
              else
10852
10868
                {
10859
10875
                }
10860
10876
              unlink (sym);
10861
10877
            }
 
10878
            #endif
10862
10879
            {
10863
10880
              static char const file[] = "confdefs.h";
10864
10881
              int fd = open (file, O_RDONLY | O_NOATIME);
10935
10952
_ACEOF
10936
10953
 
10937
10954
 
10938
 
 
 
10955
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
 
10956
if test "x$ac_cv_type_pid_t" = xyes; then :
 
10957
 
 
10958
else
 
10959
 
 
10960
cat >>confdefs.h <<_ACEOF
 
10961
#define pid_t int
 
10962
_ACEOF
 
10963
 
 
10964
fi
 
10965
 
 
10966
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
 
10967
if test "x$ac_cv_type_mode_t" = xyes; then :
 
10968
 
 
10969
else
 
10970
 
 
10971
cat >>confdefs.h <<_ACEOF
 
10972
#define mode_t int
 
10973
_ACEOF
 
10974
 
 
10975
fi
 
10976
 
 
10977
 
 
10978
 
 
10979
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
 
10980
$as_echo_n "checking for promoted mode_t type... " >&6; }
 
10981
if ${gl_cv_promoted_mode_t+:} false; then :
 
10982
  $as_echo_n "(cached) " >&6
 
10983
else
 
10984
 
 
10985
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
10986
/* end confdefs.h.  */
 
10987
#include <sys/types.h>
 
10988
int
 
10989
main ()
 
10990
{
 
10991
typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
 
10992
  ;
 
10993
  return 0;
 
10994
}
 
10995
_ACEOF
 
10996
if ac_fn_c_try_compile "$LINENO"; then :
 
10997
  gl_cv_promoted_mode_t='int'
 
10998
else
 
10999
  gl_cv_promoted_mode_t='mode_t'
 
11000
fi
 
11001
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
11002
 
 
11003
fi
 
11004
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
 
11005
$as_echo "$gl_cv_promoted_mode_t" >&6; }
 
11006
 
 
11007
cat >>confdefs.h <<_ACEOF
 
11008
#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
 
11009
_ACEOF
 
11010
 
 
11011
 
 
11012
ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
 
11013
if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
 
11014
  ac_have_decl=1
 
11015
else
 
11016
  ac_have_decl=0
 
11017
fi
 
11018
 
 
11019
cat >>confdefs.h <<_ACEOF
 
11020
#define HAVE_DECL_FDATASYNC $ac_have_decl
 
11021
_ACEOF
10939
11022
 
10940
11023
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
10941
11024
$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
11058
11141
 
11059
11142
 
11060
11143
 
 
11144
 
 
11145
 
 
11146
 
 
11147
 
 
11148
 
 
11149
 
 
11150
  GNULIB_ACOSF=0;
11061
11151
  GNULIB_ACOSL=0;
 
11152
  GNULIB_ASINF=0;
11062
11153
  GNULIB_ASINL=0;
 
11154
  GNULIB_ATANF=0;
11063
11155
  GNULIB_ATANL=0;
 
11156
  GNULIB_ATAN2F=0;
 
11157
  GNULIB_CBRT=0;
 
11158
  GNULIB_CBRTF=0;
 
11159
  GNULIB_CBRTL=0;
11064
11160
  GNULIB_CEIL=0;
11065
11161
  GNULIB_CEILF=0;
11066
11162
  GNULIB_CEILL=0;
 
11163
  GNULIB_COPYSIGN=0;
 
11164
  GNULIB_COPYSIGNF=0;
 
11165
  GNULIB_COPYSIGNL=0;
 
11166
  GNULIB_COSF=0;
11067
11167
  GNULIB_COSL=0;
 
11168
  GNULIB_COSHF=0;
 
11169
  GNULIB_EXPF=0;
11068
11170
  GNULIB_EXPL=0;
 
11171
  GNULIB_EXP2=0;
 
11172
  GNULIB_EXP2F=0;
 
11173
  GNULIB_EXP2L=0;
 
11174
  GNULIB_EXPM1=0;
 
11175
  GNULIB_EXPM1F=0;
 
11176
  GNULIB_EXPM1L=0;
 
11177
  GNULIB_FABSF=0;
 
11178
  GNULIB_FABSL=0;
11069
11179
  GNULIB_FLOOR=0;
11070
11180
  GNULIB_FLOORF=0;
11071
11181
  GNULIB_FLOORL=0;
 
11182
  GNULIB_FMA=0;
 
11183
  GNULIB_FMAF=0;
 
11184
  GNULIB_FMAL=0;
 
11185
  GNULIB_FMOD=0;
 
11186
  GNULIB_FMODF=0;
 
11187
  GNULIB_FMODL=0;
 
11188
  GNULIB_FREXPF=0;
11072
11189
  GNULIB_FREXP=0;
11073
11190
  GNULIB_FREXPL=0;
 
11191
  GNULIB_HYPOT=0;
 
11192
  GNULIB_HYPOTF=0;
 
11193
  GNULIB_HYPOTL=0;
 
11194
  GNULIB_ILOGB=0;
 
11195
  GNULIB_ILOGBF=0;
 
11196
  GNULIB_ILOGBL=0;
11074
11197
  GNULIB_ISFINITE=0;
11075
11198
  GNULIB_ISINF=0;
11076
11199
  GNULIB_ISNAN=0;
11077
11200
  GNULIB_ISNANF=0;
11078
11201
  GNULIB_ISNAND=0;
11079
11202
  GNULIB_ISNANL=0;
 
11203
  GNULIB_LDEXPF=0;
11080
11204
  GNULIB_LDEXPL=0;
 
11205
  GNULIB_LOG=0;
 
11206
  GNULIB_LOGF=0;
 
11207
  GNULIB_LOGL=0;
 
11208
  GNULIB_LOG10=0;
 
11209
  GNULIB_LOG10F=0;
 
11210
  GNULIB_LOG10L=0;
 
11211
  GNULIB_LOG1P=0;
 
11212
  GNULIB_LOG1PF=0;
 
11213
  GNULIB_LOG1PL=0;
 
11214
  GNULIB_LOG2=0;
 
11215
  GNULIB_LOG2F=0;
 
11216
  GNULIB_LOG2L=0;
11081
11217
  GNULIB_LOGB=0;
11082
 
  GNULIB_LOGL=0;
 
11218
  GNULIB_LOGBF=0;
 
11219
  GNULIB_LOGBL=0;
 
11220
  GNULIB_MODF=0;
 
11221
  GNULIB_MODFF=0;
 
11222
  GNULIB_MODFL=0;
 
11223
  GNULIB_POWF=0;
 
11224
  GNULIB_REMAINDER=0;
 
11225
  GNULIB_REMAINDERF=0;
 
11226
  GNULIB_REMAINDERL=0;
 
11227
  GNULIB_RINT=0;
 
11228
  GNULIB_RINTF=0;
 
11229
  GNULIB_RINTL=0;
11083
11230
  GNULIB_ROUND=0;
11084
11231
  GNULIB_ROUNDF=0;
11085
11232
  GNULIB_ROUNDL=0;
11086
11233
  GNULIB_SIGNBIT=0;
 
11234
  GNULIB_SINF=0;
11087
11235
  GNULIB_SINL=0;
 
11236
  GNULIB_SINHF=0;
 
11237
  GNULIB_SQRTF=0;
11088
11238
  GNULIB_SQRTL=0;
 
11239
  GNULIB_TANF=0;
11089
11240
  GNULIB_TANL=0;
 
11241
  GNULIB_TANHF=0;
11090
11242
  GNULIB_TRUNC=0;
11091
11243
  GNULIB_TRUNCF=0;
11092
11244
  GNULIB_TRUNCL=0;
11093
 
    HAVE_ACOSL=1;
 
11245
    HAVE_ACOSF=1;
 
11246
  HAVE_ACOSL=1;
 
11247
  HAVE_ASINF=1;
11094
11248
  HAVE_ASINL=1;
 
11249
  HAVE_ATANF=1;
11095
11250
  HAVE_ATANL=1;
 
11251
  HAVE_ATAN2F=1;
 
11252
  HAVE_CBRT=1;
 
11253
  HAVE_CBRTF=1;
 
11254
  HAVE_CBRTL=1;
 
11255
  HAVE_COPYSIGN=1;
 
11256
  HAVE_COPYSIGNL=1;
 
11257
  HAVE_COSF=1;
11096
11258
  HAVE_COSL=1;
 
11259
  HAVE_COSHF=1;
 
11260
  HAVE_EXPF=1;
11097
11261
  HAVE_EXPL=1;
 
11262
  HAVE_EXPM1=1;
 
11263
  HAVE_EXPM1F=1;
 
11264
  HAVE_FABSF=1;
 
11265
  HAVE_FABSL=1;
 
11266
  HAVE_FMA=1;
 
11267
  HAVE_FMAF=1;
 
11268
  HAVE_FMAL=1;
 
11269
  HAVE_FMODF=1;
 
11270
  HAVE_FMODL=1;
 
11271
  HAVE_FREXPF=1;
 
11272
  HAVE_HYPOTF=1;
 
11273
  HAVE_HYPOTL=1;
 
11274
  HAVE_ILOGB=1;
 
11275
  HAVE_ILOGBF=1;
 
11276
  HAVE_ILOGBL=1;
11098
11277
  HAVE_ISNANF=1;
11099
11278
  HAVE_ISNAND=1;
11100
11279
  HAVE_ISNANL=1;
 
11280
  HAVE_LDEXPF=1;
 
11281
  HAVE_LOGF=1;
11101
11282
  HAVE_LOGL=1;
 
11283
  HAVE_LOG10F=1;
 
11284
  HAVE_LOG10L=1;
 
11285
  HAVE_LOG1P=1;
 
11286
  HAVE_LOG1PF=1;
 
11287
  HAVE_LOG1PL=1;
 
11288
  HAVE_LOGBF=1;
 
11289
  HAVE_LOGBL=1;
 
11290
  HAVE_MODFF=1;
 
11291
  HAVE_MODFL=1;
 
11292
  HAVE_POWF=1;
 
11293
  HAVE_REMAINDER=1;
 
11294
  HAVE_REMAINDERF=1;
 
11295
  HAVE_RINT=1;
 
11296
  HAVE_RINTL=1;
 
11297
  HAVE_SINF=1;
11102
11298
  HAVE_SINL=1;
 
11299
  HAVE_SINHF=1;
 
11300
  HAVE_SQRTF=1;
11103
11301
  HAVE_SQRTL=1;
 
11302
  HAVE_TANF=1;
11104
11303
  HAVE_TANL=1;
 
11304
  HAVE_TANHF=1;
11105
11305
  HAVE_DECL_ACOSL=1;
11106
11306
  HAVE_DECL_ASINL=1;
11107
11307
  HAVE_DECL_ATANL=1;
 
11308
  HAVE_DECL_CBRTF=1;
 
11309
  HAVE_DECL_CBRTL=1;
11108
11310
  HAVE_DECL_CEILF=1;
11109
11311
  HAVE_DECL_CEILL=1;
 
11312
  HAVE_DECL_COPYSIGNF=1;
11110
11313
  HAVE_DECL_COSL=1;
11111
11314
  HAVE_DECL_EXPL=1;
 
11315
  HAVE_DECL_EXP2=1;
 
11316
  HAVE_DECL_EXP2F=1;
 
11317
  HAVE_DECL_EXP2L=1;
 
11318
  HAVE_DECL_EXPM1L=1;
11112
11319
  HAVE_DECL_FLOORF=1;
11113
11320
  HAVE_DECL_FLOORL=1;
11114
11321
  HAVE_DECL_FREXPL=1;
11115
11322
  HAVE_DECL_LDEXPL=1;
 
11323
  HAVE_DECL_LOGL=1;
 
11324
  HAVE_DECL_LOG10L=1;
 
11325
  HAVE_DECL_LOG2=1;
 
11326
  HAVE_DECL_LOG2F=1;
 
11327
  HAVE_DECL_LOG2L=1;
11116
11328
  HAVE_DECL_LOGB=1;
11117
 
  HAVE_DECL_LOGL=1;
 
11329
  HAVE_DECL_REMAINDER=1;
 
11330
  HAVE_DECL_REMAINDERL=1;
 
11331
  HAVE_DECL_RINTF=1;
11118
11332
  HAVE_DECL_ROUND=1;
11119
11333
  HAVE_DECL_ROUNDF=1;
11120
11334
  HAVE_DECL_ROUNDL=1;
11124
11338
  HAVE_DECL_TRUNC=1;
11125
11339
  HAVE_DECL_TRUNCF=1;
11126
11340
  HAVE_DECL_TRUNCL=1;
 
11341
  REPLACE_CBRTF=0;
 
11342
  REPLACE_CBRTL=0;
11127
11343
  REPLACE_CEIL=0;
11128
11344
  REPLACE_CEILF=0;
11129
11345
  REPLACE_CEILL=0;
 
11346
  REPLACE_EXPM1=0;
 
11347
  REPLACE_EXPM1F=0;
 
11348
  REPLACE_EXP2=0;
 
11349
  REPLACE_EXP2L=0;
 
11350
  REPLACE_FABSL=0;
11130
11351
  REPLACE_FLOOR=0;
11131
11352
  REPLACE_FLOORF=0;
11132
11353
  REPLACE_FLOORL=0;
 
11354
  REPLACE_FMA=0;
 
11355
  REPLACE_FMAF=0;
 
11356
  REPLACE_FMAL=0;
 
11357
  REPLACE_FMOD=0;
 
11358
  REPLACE_FMODF=0;
 
11359
  REPLACE_FMODL=0;
 
11360
  REPLACE_FREXPF=0;
11133
11361
  REPLACE_FREXP=0;
11134
11362
  REPLACE_FREXPL=0;
11135
11363
  REPLACE_HUGE_VAL=0;
 
11364
  REPLACE_HYPOT=0;
 
11365
  REPLACE_HYPOTF=0;
 
11366
  REPLACE_HYPOTL=0;
 
11367
  REPLACE_ILOGB=0;
 
11368
  REPLACE_ILOGBF=0;
11136
11369
  REPLACE_ISFINITE=0;
11137
11370
  REPLACE_ISINF=0;
11138
11371
  REPLACE_ISNAN=0;
11139
11372
  REPLACE_LDEXPL=0;
 
11373
  REPLACE_LOG=0;
 
11374
  REPLACE_LOGF=0;
 
11375
  REPLACE_LOGL=0;
 
11376
  REPLACE_LOG10=0;
 
11377
  REPLACE_LOG10F=0;
 
11378
  REPLACE_LOG10L=0;
 
11379
  REPLACE_LOG1P=0;
 
11380
  REPLACE_LOG1PF=0;
 
11381
  REPLACE_LOG1PL=0;
 
11382
  REPLACE_LOG2=0;
 
11383
  REPLACE_LOG2F=0;
 
11384
  REPLACE_LOG2L=0;
 
11385
  REPLACE_LOGB=0;
 
11386
  REPLACE_LOGBF=0;
 
11387
  REPLACE_LOGBL=0;
 
11388
  REPLACE_MODF=0;
 
11389
  REPLACE_MODFF=0;
 
11390
  REPLACE_MODFL=0;
11140
11391
  REPLACE_NAN=0;
 
11392
  REPLACE_REMAINDER=0;
 
11393
  REPLACE_REMAINDERF=0;
 
11394
  REPLACE_REMAINDERL=0;
11141
11395
  REPLACE_ROUND=0;
11142
11396
  REPLACE_ROUNDF=0;
11143
11397
  REPLACE_ROUNDL=0;
11144
11398
  REPLACE_SIGNBIT=0;
11145
11399
  REPLACE_SIGNBIT_USING_GCC=0;
 
11400
  REPLACE_SQRTL=0;
11146
11401
  REPLACE_TRUNC=0;
11147
11402
  REPLACE_TRUNCF=0;
11148
11403
  REPLACE_TRUNCL=0;
11179
11434
$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
11180
11435
 
11181
11436
 
 
11437
 
 
11438
 
 
11439
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
 
11440
$as_echo_n "checking whether long double and double are the same... " >&6; }
 
11441
if ${gl_cv_long_double_equals_double+:} false; then :
 
11442
  $as_echo_n "(cached) " >&6
 
11443
else
 
11444
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11445
/* end confdefs.h.  */
 
11446
#include <float.h>
 
11447
int
 
11448
main ()
 
11449
{
 
11450
typedef int check[sizeof (long double) == sizeof (double)
 
11451
                              && LDBL_MANT_DIG == DBL_MANT_DIG
 
11452
                              && LDBL_MAX_EXP == DBL_MAX_EXP
 
11453
                              && LDBL_MIN_EXP == DBL_MIN_EXP
 
11454
                              ? 1 : -1];
 
11455
 
 
11456
  ;
 
11457
  return 0;
 
11458
}
 
11459
_ACEOF
 
11460
if ac_fn_c_try_compile "$LINENO"; then :
 
11461
  gl_cv_long_double_equals_double=yes
 
11462
else
 
11463
  gl_cv_long_double_equals_double=no
 
11464
fi
 
11465
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
11466
 
 
11467
fi
 
11468
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
 
11469
$as_echo "$gl_cv_long_double_equals_double" >&6; }
 
11470
  if test $gl_cv_long_double_equals_double = yes; then
 
11471
 
 
11472
$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
 
11473
 
 
11474
    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
 
11475
  else
 
11476
    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
 
11477
  fi
 
11478
 
 
11479
 
 
11480
 
11182
11481
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11183
11482
$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11184
11483
if ${gl_cv_var_stdin_large_offset+:} false; then :
11214
11513
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11215
11514
$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11216
11515
 
 
11516
 
 
11517
 
 
11518
 
 
11519
 
 
11520
  case "$host_os" in
 
11521
    mingw*)
 
11522
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
 
11523
$as_echo_n "checking for 64-bit off_t... " >&6; }
 
11524
if ${gl_cv_type_off_t_64+:} false; then :
 
11525
  $as_echo_n "(cached) " >&6
 
11526
else
 
11527
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11528
/* end confdefs.h.  */
 
11529
#include <sys/types.h>
 
11530
                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
 
11531
 
 
11532
int
 
11533
main ()
 
11534
{
 
11535
 
 
11536
  ;
 
11537
  return 0;
 
11538
}
 
11539
_ACEOF
 
11540
if ac_fn_c_try_compile "$LINENO"; then :
 
11541
  gl_cv_type_off_t_64=yes
 
11542
else
 
11543
  gl_cv_type_off_t_64=no
 
11544
fi
 
11545
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
11546
 
 
11547
fi
 
11548
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
 
11549
$as_echo "$gl_cv_type_off_t_64" >&6; }
 
11550
      if test $gl_cv_type_off_t_64 = no; then
 
11551
        WINDOWS_64_BIT_OFF_T=1
 
11552
      else
 
11553
        WINDOWS_64_BIT_OFF_T=0
 
11554
      fi
 
11555
                  WINDOWS_64_BIT_ST_SIZE=1
 
11556
      ;;
 
11557
    *)
 
11558
                                                      WINDOWS_64_BIT_OFF_T=0
 
11559
      WINDOWS_64_BIT_ST_SIZE=0
 
11560
      ;;
 
11561
  esac
 
11562
 
 
11563
 
 
11564
 
 
11565
 
 
11566
 
 
11567
 
 
11568
 
 
11569
 
 
11570
 
 
11571
 
 
11572
 
 
11573
 
 
11574
 
 
11575
 
 
11576
 
 
11577
 
 
11578
 
 
11579
     if test $gl_cv_have_include_next = yes; then
 
11580
       gl_cv_next_sys_types_h='<'sys/types.h'>'
 
11581
     else
 
11582
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
 
11583
$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
 
11584
if ${gl_cv_next_sys_types_h+:} false; then :
 
11585
  $as_echo_n "(cached) " >&6
 
11586
else
 
11587
 
 
11588
               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11589
/* end confdefs.h.  */
 
11590
#include <sys/types.h>
 
11591
 
 
11592
_ACEOF
 
11593
                                                                                                                        case "$host_os" in
 
11594
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 
11595
                 *)    gl_absname_cpp="$ac_cpp" ;;
 
11596
               esac
 
11597
 
 
11598
               case "$host_os" in
 
11599
                 mingw*)
 
11600
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
11601
                   ;;
 
11602
                 *)
 
11603
                   gl_dirsep_regex='\/'
 
11604
                   ;;
 
11605
               esac
 
11606
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
11607
 
 
11608
               gl_header_literal_regex=`echo 'sys/types.h' \
 
11609
                                        | sed -e "$gl_make_literal_regex_sed"`
 
11610
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
11611
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
11612
                   s|^/[^/]|//&|
 
11613
                   p
 
11614
                   q
 
11615
                 }'
 
11616
                                                            gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 
11617
                      sed -n "$gl_absolute_header_sed"`'"'
 
11618
 
 
11619
 
 
11620
fi
 
11621
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
 
11622
$as_echo "$gl_cv_next_sys_types_h" >&6; }
 
11623
     fi
 
11624
     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
 
11625
 
 
11626
     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
 
11627
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 
11628
       gl_next_as_first_directive='<'sys/types.h'>'
 
11629
     else
 
11630
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 
11631
       gl_next_as_first_directive=$gl_cv_next_sys_types_h
 
11632
     fi
 
11633
     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
 
11634
 
 
11635
 
 
11636
 
 
11637
 
 
11638
 
 
11639
 
 
11640
 
 
11641
 
 
11642
 
 
11643
 
 
11644
 
11217
11645
ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11218
11646
if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11219
11647
  ac_have_decl=1
11232
11660
 
11233
11661
 
11234
11662
 
 
11663
 
11235
11664
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11236
11665
$as_echo_n "checking for fseeko... " >&6; }
11237
11666
if ${gl_cv_func_fseeko+:} false; then :
11270
11699
  if test $gl_cv_func_fseeko = no; then
11271
11700
    HAVE_FSEEKO=0
11272
11701
  else
 
11702
    if test $WINDOWS_64_BIT_OFF_T = 1; then
 
11703
      REPLACE_FSEEKO=1
 
11704
    fi
11273
11705
    if test $gl_cv_var_stdin_large_offset = no; then
11274
11706
      REPLACE_FSEEKO=1
11275
11707
    fi
11276
11708
 
11277
11709
 
 
11710
 
11278
11711
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11279
11712
$as_echo_n "checking whether fflush works on input streams... " >&6; }
11280
11713
if ${gl_cv_func_fflush_stdin+:} false; then :
11288
11721
/* end confdefs.h.  */
11289
11722
 
11290
11723
#include <stdio.h>
11291
 
#include <unistd.h>
 
11724
#if HAVE_UNISTD_H
 
11725
# include <unistd.h>
 
11726
#else /* on Windows with MSVC */
 
11727
# include <io.h>
 
11728
#endif
11292
11729
 
11293
11730
int
11294
11731
main ()
11356
11793
 
11357
11794
 
11358
11795
 
 
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
 
11800
else
 
11801
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11802
/* end confdefs.h.  */
 
11803
#include <sys/types.h>
 
11804
#include <sys/stat.h>
 
11805
 
 
11806
#if defined S_ISBLK && defined S_IFDIR
 
11807
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
 
11808
#endif
 
11809
 
 
11810
#if defined S_ISBLK && defined S_IFCHR
 
11811
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
 
11812
#endif
 
11813
 
 
11814
#if defined S_ISLNK && defined S_IFREG
 
11815
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
 
11816
#endif
 
11817
 
 
11818
#if defined S_ISSOCK && defined S_IFREG
 
11819
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
 
11820
#endif
 
11821
 
 
11822
_ACEOF
 
11823
if ac_fn_c_try_compile "$LINENO"; then :
 
11824
  ac_cv_header_stat_broken=no
 
11825
else
 
11826
  ac_cv_header_stat_broken=yes
 
11827
fi
 
11828
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
11829
fi
 
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
 
11833
 
 
11834
$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
 
11835
 
 
11836
fi
 
11837
 
 
11838
 
 
11839
 
 
11840
 
 
11841
 
 
11842
 
 
11843
 
 
11844
 
 
11845
 
 
11846
 
 
11847
 
 
11848
 
 
11849
 
 
11850
 
 
11851
 
 
11852
 
 
11853
 
 
11854
 
 
11855
 
 
11856
     if test $gl_cv_have_include_next = yes; then
 
11857
       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
 
11858
     else
 
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
 
11863
else
 
11864
 
 
11865
             if test $ac_cv_header_sys_stat_h = yes; then
 
11866
 
 
11867
 
 
11868
               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11869
/* end confdefs.h.  */
 
11870
#include <sys/stat.h>
 
11871
 
 
11872
_ACEOF
 
11873
                                                                                                                        case "$host_os" in
 
11874
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 
11875
                 *)    gl_absname_cpp="$ac_cpp" ;;
 
11876
               esac
 
11877
 
 
11878
               case "$host_os" in
 
11879
                 mingw*)
 
11880
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
11881
                   ;;
 
11882
                 *)
 
11883
                   gl_dirsep_regex='\/'
 
11884
                   ;;
 
11885
               esac
 
11886
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
11887
 
 
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/
 
11892
                   s|^/[^/]|//&|
 
11893
                   p
 
11894
                   q
 
11895
                 }'
 
11896
                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 
11897
                      sed -n "$gl_absolute_header_sed"`'"'
 
11898
          else
 
11899
               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
 
11900
             fi
 
11901
 
 
11902
 
 
11903
fi
 
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; }
 
11906
     fi
 
11907
     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
 
11908
 
 
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'>'
 
11912
     else
 
11913
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 
11914
       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
 
11915
     fi
 
11916
     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
 
11917
 
 
11918
 
 
11919
 
 
11920
 
 
11921
 
 
11922
 
 
11923
 
 
11924
 
 
11925
 
 
11926
 
 
11927
 
 
11928
  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
 
11929
 
 
11930
$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
 
11931
 
 
11932
  fi
 
11933
 
 
11934
      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
 
11935
     #include <sys/stat.h>
 
11936
"
 
11937
if test "x$ac_cv_type_nlink_t" = xyes; then :
 
11938
 
 
11939
else
 
11940
 
 
11941
$as_echo "#define nlink_t int" >>confdefs.h
 
11942
 
 
11943
fi
 
11944
 
 
11945
 
 
11946
 
 
11947
 
 
11948
 
 
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
 
11953
else
 
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 :
 
11958
  case "$host_os" in
 
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" ;;
 
11963
          esac
 
11964
 
 
11965
else
 
11966
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11967
/* end confdefs.h.  */
 
11968
$ac_includes_default
 
11969
int
 
11970
main ()
 
11971
{
 
11972
struct stat sbuf;
 
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;
 
11977
 
 
11978
  ;
 
11979
  return 0;
 
11980
}
 
11981
_ACEOF
 
11982
if ac_fn_c_try_run "$LINENO"; then :
 
11983
  gl_cv_func_lstat_dereferences_slashed_symlink=yes
 
11984
else
 
11985
  gl_cv_func_lstat_dereferences_slashed_symlink=no
 
11986
fi
 
11987
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
11988
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
11989
fi
 
11990
 
 
11991
     else
 
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"
 
11995
     fi
 
11996
     rm -f conftest.sym conftest.file
 
11997
 
 
11998
fi
 
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
 
12002
    *yes)
 
12003
 
 
12004
cat >>confdefs.h <<_ACEOF
 
12005
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
 
12006
_ACEOF
 
12007
 
 
12008
      ;;
 
12009
  esac
 
12010
 
 
12011
 
 
12012
 
 
12013
 
 
12014
 
11359
12015
 
11360
12016
 
11361
12017
 
11379
12035
 
11380
12036
 
11381
12037
 
 
12038
 
11382
12039
  if test $ac_cv_have_decl_ftello = no; then
11383
12040
    HAVE_DECL_FTELLO=0
11384
12041
  fi
11414
12071
  if test $gl_cv_func_ftello = no; then
11415
12072
    HAVE_FTELLO=0
11416
12073
  else
 
12074
    if test $WINDOWS_64_BIT_OFF_T = 1; then
 
12075
      REPLACE_FTELLO=1
 
12076
    fi
11417
12077
    if test $gl_cv_var_stdin_large_offset = no; then
11418
12078
      REPLACE_FTELLO=1
11419
 
    else
 
12079
    fi
 
12080
    if test $REPLACE_FTELLO = 0; then
11420
12081
 
11421
12082
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
11422
12083
$as_echo_n "checking whether ftello works... " >&6; }
11526
12187
 
11527
12188
 
11528
12189
 
 
12190
 
 
12191
 
 
12192
 
 
12193
 
11529
12194
  GNULIB_SOCKET=0;
11530
12195
  GNULIB_CONNECT=0;
11531
12196
  GNULIB_ACCEPT=0;
11681
12346
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11682
12347
                 *)    gl_absname_cpp="$ac_cpp" ;;
11683
12348
               esac
 
12349
 
 
12350
               case "$host_os" in
 
12351
                 mingw*)
 
12352
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
12353
                   ;;
 
12354
                 *)
 
12355
                   gl_dirsep_regex='\/'
 
12356
                   ;;
 
12357
               esac
 
12358
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
12359
 
 
12360
               gl_header_literal_regex=`echo 'sys/socket.h' \
 
12361
                                        | sed -e "$gl_make_literal_regex_sed"`
 
12362
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
12363
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
12364
                   s|^/[^/]|//&|
 
12365
                   p
 
12366
                   q
 
12367
                 }'
11684
12368
                                                            gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11685
 
                  sed -n '\#/sys/socket.h#{
11686
 
                    s#.*"\(.*/sys/socket.h\)".*#\1#
11687
 
                    s#^/[^/]#//&#
11688
 
                    p
11689
 
                    q
11690
 
                  }'`'"'
 
12369
                      sed -n "$gl_absolute_header_sed"`'"'
11691
12370
          else
11692
12371
               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11693
12372
             fi
11829
12508
 
11830
12509
 
11831
12510
 
11832
 
    for gl_func in socket connect accept bind getpeername getsockname getsockopt     listen recv send recvfrom sendto setsockopt shutdown accept4; do
11833
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11834
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11835
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11836
 
if eval \${$as_gl_Symbol+:} false; then :
11837
 
  $as_echo_n "(cached) " >&6
11838
 
else
11839
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840
 
/* end confdefs.h.  */
11841
 
 
11842
 
/* Some systems require prerequisite headers.  */
11843
 
#include <sys/types.h>
11844
 
#include <sys/socket.h>
11845
 
 
11846
 
int
11847
 
main ()
11848
 
{
11849
 
#undef $gl_func
11850
 
  (void) $gl_func;
11851
 
  ;
11852
 
  return 0;
11853
 
}
11854
 
_ACEOF
11855
 
if ac_fn_c_try_compile "$LINENO"; then :
11856
 
  eval "$as_gl_Symbol=yes"
11857
 
else
11858
 
  eval "$as_gl_Symbol=no"
11859
 
fi
11860
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11861
 
fi
11862
 
eval ac_res=\$$as_gl_Symbol
11863
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11864
 
$as_echo "$ac_res" >&6; }
11865
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11866
 
  cat >>confdefs.h <<_ACEOF
11867
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11868
 
_ACEOF
11869
 
 
11870
 
                     eval ac_cv_have_decl_$gl_func=yes
11871
 
fi
11872
 
      done
11873
 
 
11874
12511
 
11875
12512
 
11876
12513
  GNULIB_GETADDRINFO=0;
11915
12552
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11916
12553
                 *)    gl_absname_cpp="$ac_cpp" ;;
11917
12554
               esac
 
12555
 
 
12556
               case "$host_os" in
 
12557
                 mingw*)
 
12558
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
12559
                   ;;
 
12560
                 *)
 
12561
                   gl_dirsep_regex='\/'
 
12562
                   ;;
 
12563
               esac
 
12564
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
12565
 
 
12566
               gl_header_literal_regex=`echo 'netdb.h' \
 
12567
                                        | sed -e "$gl_make_literal_regex_sed"`
 
12568
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
12569
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
12570
                   s|^/[^/]|//&|
 
12571
                   p
 
12572
                   q
 
12573
                 }'
11918
12574
                                                            gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11919
 
                  sed -n '\#/netdb.h#{
11920
 
                    s#.*"\(.*/netdb.h\)".*#\1#
11921
 
                    s#^/[^/]#//&#
11922
 
                    p
11923
 
                    q
11924
 
                  }'`'"'
 
12575
                      sed -n "$gl_absolute_header_sed"`'"'
11925
12576
          else
11926
12577
               gl_cv_next_netdb_h='<'netdb.h'>'
11927
12578
             fi
11953
12604
 
11954
12605
 
11955
12606
 
11956
 
    for gl_func in getaddrinfo freeaddrinfo gai_strerror getnameinfo; do
11957
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11958
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11959
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11960
 
if eval \${$as_gl_Symbol+:} false; then :
11961
 
  $as_echo_n "(cached) " >&6
11962
 
else
11963
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964
 
/* end confdefs.h.  */
11965
 
#include <netdb.h>
11966
 
int
11967
 
main ()
11968
 
{
11969
 
#undef $gl_func
11970
 
  (void) $gl_func;
11971
 
  ;
11972
 
  return 0;
11973
 
}
11974
 
_ACEOF
11975
 
if ac_fn_c_try_compile "$LINENO"; then :
11976
 
  eval "$as_gl_Symbol=yes"
11977
 
else
11978
 
  eval "$as_gl_Symbol=no"
11979
 
fi
11980
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11981
 
fi
11982
 
eval ac_res=\$$as_gl_Symbol
11983
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11984
 
$as_echo "$ac_res" >&6; }
11985
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11986
 
  cat >>confdefs.h <<_ACEOF
11987
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11988
 
_ACEOF
11989
 
 
11990
 
                     eval ac_cv_have_decl_$gl_func=yes
11991
 
fi
11992
 
      done
11993
 
 
11994
12607
 
11995
12608
 
11996
12609
                  HOSTENT_LIB=
12229
12842
 
12230
12843
 
12231
12844
 
12232
 
      HAVE_INET_NTOP=1
12233
 
  gl_save_LIBS=$LIBS
12234
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
 
12845
 
 
12846
 
 
12847
 
 
12848
 
 
12849
              HAVE_INET_NTOP=1
 
12850
  INET_NTOP_LIB=
 
12851
 
 
12852
 
 
12853
 
 
12854
 
 
12855
  if test $ac_cv_header_sys_socket_h != yes; then
 
12856
                    for ac_header in winsock2.h
 
12857
do :
 
12858
  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 
12859
if test "x$ac_cv_header_winsock2_h" = xyes; then :
 
12860
  cat >>confdefs.h <<_ACEOF
 
12861
#define HAVE_WINSOCK2_H 1
 
12862
_ACEOF
 
12863
 
 
12864
fi
 
12865
 
 
12866
done
 
12867
 
 
12868
  fi
 
12869
  if test "$ac_cv_header_winsock2_h" = yes; then
 
12870
    HAVE_WINSOCK2_H=1
 
12871
    UNISTD_H_HAVE_WINSOCK2_H=1
 
12872
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 
12873
  else
 
12874
    HAVE_WINSOCK2_H=0
 
12875
  fi
 
12876
 
 
12877
 
 
12878
  if test $HAVE_WINSOCK2_H = 1; then
 
12879
    ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
 
12880
"
 
12881
if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
 
12882
  ac_have_decl=1
 
12883
else
 
12884
  ac_have_decl=0
 
12885
fi
 
12886
 
 
12887
cat >>confdefs.h <<_ACEOF
 
12888
#define HAVE_DECL_INET_NTOP $ac_have_decl
 
12889
_ACEOF
 
12890
 
 
12891
    if test $ac_cv_have_decl_inet_ntop = yes; then
 
12892
                  REPLACE_INET_NTOP=1
 
12893
      INET_NTOP_LIB="-lws2_32"
 
12894
    else
 
12895
      HAVE_DECL_INET_NTOP=0
 
12896
      HAVE_INET_NTOP=0
 
12897
    fi
 
12898
  else
 
12899
    gl_save_LIBS=$LIBS
 
12900
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
12235
12901
$as_echo_n "checking for library containing inet_ntop... " >&6; }
12236
12902
if ${ac_cv_search_inet_ntop+:} false; then :
12237
12903
  $as_echo_n "(cached) " >&6
12255
12921
  return 0;
12256
12922
}
12257
12923
_ACEOF
12258
 
for ac_lib in '' nsl; do
 
12924
for ac_lib in '' nsl resolv; do
12259
12925
  if test -z "$ac_lib"; then
12260
12926
    ac_res="none required"
12261
12927
  else
12297
12963
fi
12298
12964
done
12299
12965
 
12300
 
     if test $ac_cv_func_inet_ntop = no; then
12301
 
       HAVE_INET_NTOP=0
12302
 
     fi
 
12966
       if test $ac_cv_func_inet_ntop = no; then
 
12967
         HAVE_INET_NTOP=0
 
12968
       fi
12303
12969
 
12304
12970
fi
12305
12971
 
12306
 
  LIBS=$gl_save_LIBS
12307
 
 
12308
 
  INET_NTOP_LIB=
12309
 
  if test "$ac_cv_search_inet_ntop" != "no" &&
12310
 
     test "$ac_cv_search_inet_ntop" != "none required"; then
12311
 
    INET_NTOP_LIB="$ac_cv_search_inet_ntop"
12312
 
  fi
12313
 
 
12314
 
 
12315
 
 
12316
 
  ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
12317
 
     #if HAVE_NETDB_H
12318
 
     # include <netdb.h>
12319
 
     #endif
 
12972
    LIBS=$gl_save_LIBS
 
12973
 
 
12974
    if test "$ac_cv_search_inet_ntop" != "no" \
 
12975
       && test "$ac_cv_search_inet_ntop" != "none required"; then
 
12976
      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
 
12977
    fi
 
12978
 
 
12979
 
 
12980
    ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
 
12981
        #if HAVE_NETDB_H
 
12982
        # include <netdb.h>
 
12983
        #endif
12320
12984
 
12321
12985
"
12322
12986
if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
12329
12993
#define HAVE_DECL_INET_NTOP $ac_have_decl
12330
12994
_ACEOF
12331
12995
 
12332
 
  if test $ac_cv_have_decl_inet_ntop = no; then
12333
 
    HAVE_DECL_INET_NTOP=0
12334
 
 
 
12996
    if test $ac_cv_have_decl_inet_ntop = no; then
 
12997
      HAVE_DECL_INET_NTOP=0
 
12998
    fi
12335
12999
  fi
12336
13000
 
12337
13001
 
12340
13004
 
12341
13005
 
12342
13006
 
 
13007
 
12343
13008
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
12344
13009
$as_echo_n "checking for IPv4 sockets... " >&6; }
12345
13010
  if ${gl_cv_socket_ipv4+:} false; then :
12428
13093
  fi
12429
13094
 
12430
13095
 
12431
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
 
13096
 
 
13097
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12432
13098
$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12433
13099
if ${gl_cv_func_getcwd_null+:} false; then :
12434
13100
  $as_echo_n "(cached) " >&6
12435
13101
else
12436
13102
  if test "$cross_compiling" = yes; then :
12437
 
 
12438
 
       case "$host_os" in
12439
 
                               # Guess yes on glibc systems.
12440
 
         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
12441
 
                               # Guess yes on Cygwin.
12442
 
         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
12443
 
                               # If we don't know, assume the worst.
12444
 
         *)                    gl_cv_func_getcwd_null="guessing no";;
12445
 
       esac
 
13103
  case "$host_os" in
 
13104
                     # Guess yes on glibc systems.
 
13105
            *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
 
13106
                     # Guess yes on Cygwin.
 
13107
            cygwin*) gl_cv_func_getcwd_null="guessing yes";;
 
13108
                     # If we don't know, assume the worst.
 
13109
            *)       gl_cv_func_getcwd_null="guessing no";;
 
13110
          esac
12446
13111
 
12447
13112
else
12448
13113
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12449
13114
/* end confdefs.h.  */
12450
13115
 
12451
 
#        include <unistd.h>
 
13116
#        if HAVE_UNISTD_H
 
13117
#         include <unistd.h>
 
13118
#        else /* on Windows with MSVC */
 
13119
#         include <direct.h>
 
13120
#        endif
12452
13121
#        ifndef getcwd
12453
13122
         char *getcwd ();
12454
13123
#        endif
12724
13393
_ACEOF
12725
13394
 
12726
13395
 
 
13396
 
 
13397
 
12727
13398
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
12728
13399
$as_echo_n "checking for ssize_t... " >&6; }
12729
13400
if ${gt_cv_ssize_t+:} false; then :
12796
13467
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12797
13468
                 *)    gl_absname_cpp="$ac_cpp" ;;
12798
13469
               esac
 
13470
 
 
13471
               case "$host_os" in
 
13472
                 mingw*)
 
13473
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
13474
                   ;;
 
13475
                 *)
 
13476
                   gl_dirsep_regex='\/'
 
13477
                   ;;
 
13478
               esac
 
13479
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
13480
 
 
13481
               gl_header_literal_regex=`echo 'getopt.h' \
 
13482
                                        | sed -e "$gl_make_literal_regex_sed"`
 
13483
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
13484
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
13485
                   s|^/[^/]|//&|
 
13486
                   p
 
13487
                   q
 
13488
                 }'
12799
13489
                                                            gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12800
 
                  sed -n '\#/getopt.h#{
12801
 
                    s#.*"\(.*/getopt.h\)".*#\1#
12802
 
                    s#^/[^/]#//&#
12803
 
                    p
12804
 
                    q
12805
 
                  }'`'"'
 
13490
                      sed -n "$gl_absolute_header_sed"`'"'
12806
13491
          else
12807
13492
               gl_cv_next_getopt_h='<'getopt.h'>'
12808
13493
             fi
12868
13553
 
12869
13554
  fi
12870
13555
 
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
12876
13561
else
12877
13562
 
12878
 
                                                                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12879
 
/* end confdefs.h.  */
12880
 
#include <unistd.h>
12881
 
int
12882
 
main ()
12883
 
{
12884
 
int *p = &optreset; return optreset;
12885
 
  ;
12886
 
  return 0;
12887
 
}
12888
 
_ACEOF
12889
 
if ac_fn_c_try_link "$LINENO"; then :
12890
 
  gl_optind_min=1
12891
 
else
12892
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893
 
/* end confdefs.h.  */
12894
 
#include <getopt.h>
12895
 
int
12896
 
main ()
12897
 
{
12898
 
return !getopt_clip;
12899
 
  ;
12900
 
  return 0;
12901
 
}
12902
 
_ACEOF
12903
 
if ac_fn_c_try_compile "$LINENO"; then :
12904
 
  gl_optind_min=1
12905
 
else
12906
 
  gl_optind_min=0
12907
 
fi
12908
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12909
 
fi
12910
 
rm -f core conftest.err conftest.$ac_objext \
12911
 
    conftest$ac_exeext conftest.$ac_ext
12912
 
 
12913
 
                gl_save_CPPFLAGS=$CPPFLAGS
12914
 
        CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
12915
 
        if test "$cross_compiling" = yes; then :
12916
 
  case "$host_os" in
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";;
12920
 
           esac
12921
 
 
12922
 
else
12923
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12924
 
/* end confdefs.h.  */
12925
 
 
12926
 
#include <unistd.h>
12927
 
#include <stdlib.h>
12928
 
#include <string.h>
12929
 
 
12930
 
int
12931
 
main ()
12932
 
{
12933
 
  {
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 };
12939
 
    int c;
12940
 
 
12941
 
    optind = OPTIND_MIN;
12942
 
    opterr = 0;
12943
 
 
12944
 
    c = getopt (4, argv, "ab");
12945
 
    if (!(c == 'a'))
12946
 
      return 1;
12947
 
    c = getopt (4, argv, "ab");
12948
 
    if (!(c == -1))
12949
 
      return 2;
12950
 
    if (!(optind == 2))
12951
 
      return 3;
12952
 
  }
12953
 
  /* Some internal state exists at this point.  */
12954
 
  {
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 };
12963
 
    int c;
12964
 
 
12965
 
    optind = OPTIND_MIN;
12966
 
    opterr = 0;
12967
 
 
12968
 
    c = getopt (7, argv, "+abp:q:");
12969
 
    if (!(c == -1))
12970
 
      return 4;
12971
 
    if (!(strcmp (argv[0], "program") == 0))
12972
 
      return 5;
12973
 
    if (!(strcmp (argv[1], "donald") == 0))
12974
 
      return 6;
12975
 
    if (!(strcmp (argv[2], "-p") == 0))
12976
 
      return 7;
12977
 
    if (!(strcmp (argv[3], "billy") == 0))
12978
 
      return 8;
12979
 
    if (!(strcmp (argv[4], "duck") == 0))
12980
 
      return 9;
12981
 
    if (!(strcmp (argv[5], "-a") == 0))
12982
 
      return 10;
12983
 
    if (!(strcmp (argv[6], "bar") == 0))
12984
 
      return 11;
12985
 
    if (!(optind == 1))
12986
 
      return 12;
12987
 
  }
12988
 
  /* Detect MacOS 10.5, AIX 7.1 bug.  */
12989
 
  {
12990
 
    static char program[] = "program";
12991
 
    static char ab[] = "-ab";
12992
 
    char *argv[3] = { program, ab, NULL };
12993
 
    optind = OPTIND_MIN;
12994
 
    opterr = 0;
12995
 
    if (getopt (2, argv, "ab:") != 'a')
12996
 
      return 13;
12997
 
    if (getopt (2, argv, "ab:") != '?')
12998
 
      return 14;
12999
 
    if (optopt != 'b')
13000
 
      return 15;
13001
 
    if (optind != 2)
13002
 
      return 16;
13003
 
  }
13004
 
 
 
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; }
 
13569
else
 
13570
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
13571
/* end confdefs.h.  */
 
13572
 
 
13573
#include <unistd.h>
 
13574
#include <stdlib.h>
 
13575
#include <string.h>
 
13576
 
 
13577
int
 
13578
main ()
 
13579
{
 
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 };
 
13585
  int c;
 
13586
 
 
13587
  c = getopt (4, argv, "ab");
 
13588
  if (!(c == 'a'))
 
13589
    return 1;
 
13590
  c = getopt (4, argv, "ab");
 
13591
  if (!(c == -1))
 
13592
    return 2;
 
13593
  if (!(optind == 2))
 
13594
    return 3;
 
13595
  return 0;
 
13596
}
 
13597
 
 
13598
_ACEOF
 
13599
if ac_fn_c_try_run "$LINENO"; then :
 
13600
  gl_cv_func_getopt_posix=maybe
 
13601
else
 
13602
  gl_cv_func_getopt_posix=no
 
13603
fi
 
13604
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
13605
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
13606
fi
 
13607
 
 
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; }
 
13614
else
 
13615
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
13616
/* end confdefs.h.  */
 
13617
 
 
13618
#include <unistd.h>
 
13619
#include <stdlib.h>
 
13620
#include <string.h>
 
13621
 
 
13622
int
 
13623
main ()
 
13624
{
 
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 };
 
13633
  int c;
 
13634
 
 
13635
  c = getopt (7, argv, "+abp:q:");
 
13636
  if (!(c == -1))
 
13637
    return 4;
 
13638
  if (!(strcmp (argv[0], "program") == 0))
 
13639
    return 5;
 
13640
  if (!(strcmp (argv[1], "donald") == 0))
 
13641
    return 6;
 
13642
  if (!(strcmp (argv[2], "-p") == 0))
 
13643
    return 7;
 
13644
  if (!(strcmp (argv[3], "billy") == 0))
 
13645
    return 8;
 
13646
  if (!(strcmp (argv[4], "duck") == 0))
 
13647
    return 9;
 
13648
  if (!(strcmp (argv[5], "-a") == 0))
 
13649
    return 10;
 
13650
  if (!(strcmp (argv[6], "bar") == 0))
 
13651
    return 11;
 
13652
  if (!(optind == 1))
 
13653
    return 12;
 
13654
  return 0;
 
13655
}
 
13656
 
 
13657
_ACEOF
 
13658
if ac_fn_c_try_run "$LINENO"; then :
 
13659
  gl_cv_func_getopt_posix=maybe
 
13660
else
 
13661
  gl_cv_func_getopt_posix=no
 
13662
fi
 
13663
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
13664
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
13665
fi
 
13666
 
 
13667
          fi
 
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; }
 
13674
else
 
13675
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
13676
/* end confdefs.h.  */
 
13677
 
 
13678
#include <unistd.h>
 
13679
#include <stdlib.h>
 
13680
#include <string.h>
 
13681
 
 
13682
int
 
13683
main ()
 
13684
{
 
13685
  static char program[] = "program";
 
13686
  static char ab[] = "-ab";
 
13687
  char *argv[3] = { program, ab, NULL };
 
13688
  if (getopt (2, argv, "ab:") != 'a')
 
13689
    return 13;
 
13690
  if (getopt (2, argv, "ab:") != '?')
 
13691
    return 14;
 
13692
  if (optopt != 'b')
 
13693
    return 15;
 
13694
  if (optind != 2)
 
13695
    return 16;
13005
13696
  return 0;
13006
13697
}
13007
13698
 
13015
13706
  conftest.$ac_objext conftest.beam conftest.$ac_ext
13016
13707
fi
13017
13708
 
13018
 
        CPPFLAGS=$gl_save_CPPFLAGS
 
13709
          fi
 
13710
        else
 
13711
          case "$host_os" in
 
13712
            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
 
13713
            *)                       gl_cv_func_getopt_posix="guessing yes";;
 
13714
          esac
 
13715
        fi
13019
13716
 
13020
13717
fi
13021
13718
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13046
13743
       POSIXLY_CORRECT=1
13047
13744
       export POSIXLY_CORRECT
13048
13745
       if test "$cross_compiling" = yes; then :
13049
 
           case $host_os:$ac_cv_have_decl_optreset in
13050
 
           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
13051
 
           *:yes)               gl_cv_func_getopt_gnu=no;;
13052
 
           *)                   gl_cv_func_getopt_gnu=yes;;
13053
 
         esac
 
13746
           gl_cv_func_getopt_gnu="guessing no"
13054
13747
 
13055
13748
else
13056
13749
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061
13754
 
13062
13755
#include <stdlib.h>
13063
13756
#if defined __MACH__ && defined __APPLE__
13064
 
/* Avoid a crash on MacOS X.  */
 
13757
/* Avoid a crash on Mac OS X.  */
13065
13758
#include <mach/mach.h>
13066
13759
#include <mach/mach_error.h>
13067
13760
#include <mach/thread_status.h>
13122
13815
    }
13123
13816
  }
13124
13817
}
 
13818
#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
13819
/* Avoid a crash on native Windows.  */
 
13820
#define WIN32_LEAN_AND_MEAN
 
13821
#include <windows.h>
 
13822
#include <winerror.h>
 
13823
static LONG WINAPI
 
13824
exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
 
13825
{
 
13826
  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
 
13827
    {
 
13828
    case EXCEPTION_ACCESS_VIOLATION:
 
13829
    case EXCEPTION_IN_PAGE_ERROR:
 
13830
    case EXCEPTION_STACK_OVERFLOW:
 
13831
    case EXCEPTION_GUARD_PAGE:
 
13832
    case EXCEPTION_PRIV_INSTRUCTION:
 
13833
    case EXCEPTION_ILLEGAL_INSTRUCTION:
 
13834
    case EXCEPTION_DATATYPE_MISALIGNMENT:
 
13835
    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
 
13836
    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
 
13837
      exit (1);
 
13838
    }
 
13839
  return EXCEPTION_CONTINUE_SEARCH;
 
13840
}
 
13841
static void
 
13842
nocrash_init (void)
 
13843
{
 
13844
  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
 
13845
}
13125
13846
#else
13126
13847
/* Avoid a crash on POSIX systems.  */
13127
13848
#include <signal.h>
13153
13874
             nocrash_init();
13154
13875
 
13155
13876
             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13156
 
                and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
 
13877
                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13157
13878
                OSF/1 5.1, Solaris 10.  */
13158
13879
             {
13159
13880
               static char conftest[] = "conftest";
13164
13885
                 result |= 1;
13165
13886
             }
13166
13887
             /* This code succeeds on glibc 2.8, mingw,
13167
 
                and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 
13888
                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13168
13889
                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
13169
13890
             {
13170
13891
               static char program[] = "program";
13193
13914
               if (getopt (3, argv, "-p") != 1)
13194
13915
                 result |= 16;
13195
13916
               else if (getopt (3, argv, "-p") != 'p')
13196
 
                 result |= 32;
 
13917
                 result |= 16;
13197
13918
             }
13198
13919
             /* This code fails on glibc 2.11.  */
13199
13920
             {
13203
13924
               char *argv[] = { program, b, a, NULL };
13204
13925
               optind = opterr = 0;
13205
13926
               if (getopt (3, argv, "+:a:b") != 'b')
13206
 
                 result |= 64;
 
13927
                 result |= 32;
13207
13928
               else if (getopt (3, argv, "+:a:b") != ':')
13208
 
                 result |= 64;
 
13929
                 result |= 32;
13209
13930
             }
13210
13931
             /* This code dumps core on glibc 2.14.  */
13211
13932
             {
13215
13936
               char *argv[] = { program, w, dummy, NULL };
13216
13937
               optind = opterr = 1;
13217
13938
               if (getopt (3, argv, "W;") != 'W')
13218
 
                 result |= 128;
 
13939
                 result |= 64;
13219
13940
             }
13220
13941
             return result;
13221
13942
 
13241
13962
fi
13242
13963
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13243
13964
$as_echo "$gl_cv_func_getopt_gnu" >&6; }
13244
 
    if test "$gl_cv_func_getopt_gnu" = "no"; then
 
13965
    if test "$gl_cv_func_getopt_gnu" != yes; then
13245
13966
      gl_replace_getopt=yes
 
13967
    else
 
13968
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
 
13969
$as_echo_n "checking for working GNU getopt_long function... " >&6; }
 
13970
if ${gl_cv_func_getopt_long_gnu+:} false; then :
 
13971
  $as_echo_n "(cached) " >&6
 
13972
else
 
13973
  if test "$cross_compiling" = yes; then :
 
13974
              case "$host_os" in
 
13975
              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
 
13976
              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
 
13977
            esac
 
13978
 
 
13979
else
 
13980
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
13981
/* end confdefs.h.  */
 
13982
#include <getopt.h>
 
13983
                #include <stddef.h>
 
13984
                #include <string.h>
 
13985
 
 
13986
int
 
13987
main ()
 
13988
{
 
13989
static const struct option long_options[] =
 
13990
                  {
 
13991
                    { "xtremely-",no_argument,       NULL, 1003 },
 
13992
                    { "xtra",     no_argument,       NULL, 1001 },
 
13993
                    { "xtreme",   no_argument,       NULL, 1002 },
 
13994
                    { "xtremely", no_argument,       NULL, 1003 },
 
13995
                    { NULL,       0,                 NULL, 0 }
 
13996
                  };
 
13997
                /* This code fails on OpenBSD 5.0.  */
 
13998
                {
 
13999
                  static char program[] = "program";
 
14000
                  static char xtremel[] = "--xtremel";
 
14001
                  char *argv[] = { program, xtremel, NULL };
 
14002
                  int option_index;
 
14003
                  optind = 1; opterr = 0;
 
14004
                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
 
14005
                    return 1;
 
14006
                }
 
14007
                return 0;
 
14008
 
 
14009
  ;
 
14010
  return 0;
 
14011
}
 
14012
_ACEOF
 
14013
if ac_fn_c_try_run "$LINENO"; then :
 
14014
  gl_cv_func_getopt_long_gnu=yes
 
14015
else
 
14016
  gl_cv_func_getopt_long_gnu=no
 
14017
fi
 
14018
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
14019
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
14020
fi
 
14021
 
 
14022
 
 
14023
fi
 
14024
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
 
14025
$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
 
14026
      case "$gl_cv_func_getopt_long_gnu" in
 
14027
        *yes) ;;
 
14028
        *) gl_replace_getopt=yes ;;
 
14029
      esac
13246
14030
    fi
13247
14031
  fi
13248
14032
 
13250
14034
 
13251
14035
 
13252
14036
 
 
14037
 
13253
14038
    REPLACE_GETOPT=0
13254
 
 
13255
 
 
13256
 
  if test -n "$gl_replace_getopt"; then :
13257
 
 
 
14039
    if test -n "$gl_replace_getopt"; then
13258
14040
      REPLACE_GETOPT=1
13259
 
 
13260
 
fi
13261
 
 
 
14041
    fi
13262
14042
 
13263
14043
  if test $REPLACE_GETOPT = 1; then
13264
14044
 
13268
14048
 
13269
14049
 
13270
14050
 
13271
 
        GNULIB_UNISTD_H_GETOPT=1
13272
14051
  fi
13273
14052
 
13274
14053
ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
13356
14135
#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
13357
14136
_ACEOF
13358
14137
 
13359
 
 
13360
 
 
13361
 
 
 
14138
:
13362
14139
 
13363
14140
 
13364
14141
 
13369
14146
  HAVE_STRUCT_TIMEVAL=1;
13370
14147
  HAVE_SYS_TIME_H=1;
13371
14148
  REPLACE_GETTIMEOFDAY=0;
 
14149
  REPLACE_STRUCT_TIMEVAL=0;
13372
14150
 
13373
14151
 
13374
14152
 
13406
14184
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13407
14185
                 *)    gl_absname_cpp="$ac_cpp" ;;
13408
14186
               esac
 
14187
 
 
14188
               case "$host_os" in
 
14189
                 mingw*)
 
14190
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
14191
                   ;;
 
14192
                 *)
 
14193
                   gl_dirsep_regex='\/'
 
14194
                   ;;
 
14195
               esac
 
14196
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
14197
 
 
14198
               gl_header_literal_regex=`echo 'sys/time.h' \
 
14199
                                        | sed -e "$gl_make_literal_regex_sed"`
 
14200
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
14201
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
14202
                   s|^/[^/]|//&|
 
14203
                   p
 
14204
                   q
 
14205
                 }'
13409
14206
                                                            gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13410
 
                  sed -n '\#/sys/time.h#{
13411
 
                    s#.*"\(.*/sys/time.h\)".*#\1#
13412
 
                    s#^/[^/]#//&#
13413
 
                    p
13414
 
                    q
13415
 
                  }'`'"'
 
14207
                      sed -n "$gl_absolute_header_sed"`'"'
13416
14208
          else
13417
14209
               gl_cv_next_sys_time_h='<'sys/time.h'>'
13418
14210
             fi
13441
14233
    HAVE_SYS_TIME_H=0
13442
14234
  fi
13443
14235
 
 
14236
 
 
14237
 
 
14238
 
 
14239
 
 
14240
  if test $ac_cv_header_sys_socket_h != yes; then
 
14241
                    for ac_header in winsock2.h
 
14242
do :
 
14243
  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 
14244
if test "x$ac_cv_header_winsock2_h" = xyes; then :
 
14245
  cat >>confdefs.h <<_ACEOF
 
14246
#define HAVE_WINSOCK2_H 1
 
14247
_ACEOF
 
14248
 
 
14249
fi
 
14250
 
 
14251
done
 
14252
 
 
14253
  fi
 
14254
  if test "$ac_cv_header_winsock2_h" = yes; then
 
14255
    HAVE_WINSOCK2_H=1
 
14256
    UNISTD_H_HAVE_WINSOCK2_H=1
 
14257
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 
14258
  else
 
14259
    HAVE_WINSOCK2_H=0
 
14260
  fi
 
14261
 
 
14262
 
13444
14263
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13445
14264
$as_echo_n "checking for struct timeval... " >&6; }
13446
14265
if ${gl_cv_sys_struct_timeval+:} false; then :
13452
14271
             #include <sys/time.h>
13453
14272
            #endif
13454
14273
            #include <time.h>
 
14274
            #if HAVE_WINSOCK2_H
 
14275
            # include <winsock2.h>
 
14276
            #endif
13455
14277
 
13456
14278
int
13457
14279
main ()
13467
14289
  gl_cv_sys_struct_timeval=no
13468
14290
fi
13469
14291
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
14292
 
13470
14293
fi
13471
14294
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13472
14295
$as_echo "$gl_cv_sys_struct_timeval" >&6; }
13473
14296
  if test $gl_cv_sys_struct_timeval != yes; then
13474
14297
    HAVE_STRUCT_TIMEVAL=0
13475
 
  fi
13476
 
 
13477
 
 
13478
 
    for gl_func in gettimeofday; do
13479
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13480
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13481
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13482
 
if eval \${$as_gl_Symbol+:} false; then :
 
14298
  else
 
14299
                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
 
14300
$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
 
14301
if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13483
14302
  $as_echo_n "(cached) " >&6
13484
14303
else
13485
14304
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13486
14305
/* end confdefs.h.  */
13487
 
 
13488
14306
#if HAVE_SYS_TIME_H
13489
 
# include <sys/time.h>
13490
 
#endif
13491
 
#include <time.h>
 
14307
               #include <sys/time.h>
 
14308
              #endif
 
14309
              #include <time.h>
 
14310
              #if HAVE_WINSOCK2_H
 
14311
              # include <winsock2.h>
 
14312
              #endif
13492
14313
 
13493
14314
int
13494
14315
main ()
13495
14316
{
13496
 
#undef $gl_func
13497
 
  (void) $gl_func;
 
14317
static struct timeval x;
 
14318
              typedef int verify_tv_sec_type[
 
14319
                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
 
14320
              ];
 
14321
 
13498
14322
  ;
13499
14323
  return 0;
13500
14324
}
13501
14325
_ACEOF
13502
14326
if ac_fn_c_try_compile "$LINENO"; then :
13503
 
  eval "$as_gl_Symbol=yes"
 
14327
  gl_cv_sys_struct_timeval_tv_sec=yes
13504
14328
else
13505
 
  eval "$as_gl_Symbol=no"
 
14329
  gl_cv_sys_struct_timeval_tv_sec=no
13506
14330
fi
13507
14331
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13508
 
fi
13509
 
eval ac_res=\$$as_gl_Symbol
13510
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13511
 
$as_echo "$ac_res" >&6; }
13512
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13513
 
  cat >>confdefs.h <<_ACEOF
13514
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13515
 
_ACEOF
13516
 
 
13517
 
                     eval ac_cv_have_decl_$gl_func=yes
13518
 
fi
13519
 
      done
 
14332
 
 
14333
fi
 
14334
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
 
14335
$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
 
14336
    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
 
14337
      REPLACE_STRUCT_TIMEVAL=1
 
14338
    fi
 
14339
  fi
 
14340
 
13520
14341
 
13521
14342
 
13522
14343
 
13543
14364
  prefix="$acl_save_prefix"
13544
14365
 
13545
14366
 
 
14367
 
13546
14368
# Check whether --with-gnu-ld was given.
13547
14369
if test "${with_gnu_ld+set}" = set; then :
13548
14370
  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13562
14384
           || PATH_SEPARATOR=';'
13563
14385
       }
13564
14386
fi
 
14387
 
13565
14388
ac_prog=ld
13566
14389
if test "$GCC" = yes; then
13567
14390
  # Check if gcc -print-prog-name=ld gives a path.
13568
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
13569
 
$as_echo_n "checking for ld used by GCC... " >&6; }
 
14391
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 
14392
$as_echo_n "checking for ld used by $CC... " >&6; }
13570
14393
  case $host in
13571
14394
  *-*-mingw*)
13572
14395
    # gcc leaves a trailing carriage return which upsets mingw
13576
14399
  esac
13577
14400
  case $ac_prog in
13578
14401
    # Accept absolute paths.
13579
 
    [\\/]* | [A-Za-z]:[\\/]*)
 
14402
    [\\/]* | ?:[\\/]*)
13580
14403
      re_direlt='/[^/][^/]*/\.\./'
13581
 
      # Canonicalize the path of ld
13582
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
13583
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
14404
      # Canonicalize the pathname of ld
 
14405
      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
 
14406
      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
13584
14407
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13585
14408
      done
13586
14409
      test -z "$LD" && LD="$ac_prog"
13605
14428
  $as_echo_n "(cached) " >&6
13606
14429
else
13607
14430
  if test -z "$LD"; then
13608
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
14431
  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13609
14432
  for ac_dir in $PATH; do
 
14433
    IFS="$acl_save_ifs"
13610
14434
    test -z "$ac_dir" && ac_dir=.
13611
14435
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13612
14436
      acl_cv_path_LD="$ac_dir/$ac_prog"
13613
14437
      # Check to see if the program is GNU ld.  I'd rather use --version,
13614
 
      # but apparently some GNU ld's only accept -v.
 
14438
      # but apparently some variants of GNU ld only accept -v.
13615
14439
      # Break only if it was the GNU/non-GNU ld that we prefer.
13616
 
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
14440
      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13617
14441
      *GNU* | *'with BFD'*)
13618
 
        test "$with_gnu_ld" != no && break ;;
 
14442
        test "$with_gnu_ld" != no && break
 
14443
        ;;
13619
14444
      *)
13620
 
        test "$with_gnu_ld" != yes && break ;;
 
14445
        test "$with_gnu_ld" != yes && break
 
14446
        ;;
13621
14447
      esac
13622
14448
    fi
13623
14449
  done
13624
 
  IFS="$ac_save_ifs"
 
14450
  IFS="$acl_save_ifs"
13625
14451
else
13626
14452
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
13627
14453
fi
13641
14467
if ${acl_cv_prog_gnu_ld+:} false; then :
13642
14468
  $as_echo_n "(cached) " >&6
13643
14469
else
13644
 
  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
14470
  # I'd rather use --version here, but apparently some GNU lds only accept -v.
13645
14471
case `$LD -v 2>&1 </dev/null` in
13646
14472
*GNU* | *'with BFD'*)
13647
 
  acl_cv_prog_gnu_ld=yes ;;
 
14473
  acl_cv_prog_gnu_ld=yes
 
14474
  ;;
13648
14475
*)
13649
 
  acl_cv_prog_gnu_ld=no ;;
 
14476
  acl_cv_prog_gnu_ld=no
 
14477
  ;;
13650
14478
esac
13651
14479
fi
13652
14480
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
14499
15327
#ifdef __cplusplus
14500
15328
"C"
14501
15329
#endif
14502
 
#if defined(__STDC__) || defined(__cplusplus)
 
15330
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
14503
15331
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
14504
15332
#else
14505
15333
size_t iconv();
14667
15495
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14668
15496
                 *)    gl_absname_cpp="$ac_cpp" ;;
14669
15497
               esac
 
15498
 
 
15499
               case "$host_os" in
 
15500
                 mingw*)
 
15501
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
15502
                   ;;
 
15503
                 *)
 
15504
                   gl_dirsep_regex='\/'
 
15505
                   ;;
 
15506
               esac
 
15507
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
15508
 
 
15509
               gl_header_literal_regex=`echo 'stdint.h' \
 
15510
                                        | sed -e "$gl_make_literal_regex_sed"`
 
15511
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
15512
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
15513
                   s|^/[^/]|//&|
 
15514
                   p
 
15515
                   q
 
15516
                 }'
14670
15517
                                                            gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14671
 
                  sed -n '\#/stdint.h#{
14672
 
                    s#.*"\(.*/stdint.h\)".*#\1#
14673
 
                    s#^/[^/]#//&#
14674
 
                    p
14675
 
                    q
14676
 
                  }'`'"'
 
15518
                      sed -n "$gl_absolute_header_sed"`'"'
14677
15519
          else
14678
15520
               gl_cv_next_stdint_h='<'stdint.h'>'
14679
15521
             fi
14715
15557
/* end confdefs.h.  */
14716
15558
 
14717
15559
 
14718
 
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
14719
 
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
14720
15560
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
14721
15561
#include <stdint.h>
14722
15562
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
14885
15725
/* end confdefs.h.  */
14886
15726
 
14887
15727
 
14888
 
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
14889
 
#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
14890
15728
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
14891
15729
#include <stdint.h>
14892
15730
 
15297
16135
 
15298
16136
 
15299
16137
 
 
16138
          if test $BITSIZEOF_WINT_T -lt 32; then
 
16139
    BITSIZEOF_WINT_T=32
 
16140
  fi
 
16141
 
15300
16142
    STDINT_H=stdint.h
15301
16143
  fi
15302
16144
 
15320
16162
  HAVE_DECL_IMAXDIV=1;
15321
16163
  HAVE_DECL_STRTOIMAX=1;
15322
16164
  HAVE_DECL_STRTOUMAX=1;
 
16165
  REPLACE_STRTOIMAX=0;
15323
16166
  INT32_MAX_LT_INTMAX_MAX=1;
15324
16167
  INT64_MAX_EQ_LONG_MAX='defined _LP64';
15325
16168
  PRI_MACROS_BROKEN=0;
15362
16205
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15363
16206
                 *)    gl_absname_cpp="$ac_cpp" ;;
15364
16207
               esac
 
16208
 
 
16209
               case "$host_os" in
 
16210
                 mingw*)
 
16211
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
16212
                   ;;
 
16213
                 *)
 
16214
                   gl_dirsep_regex='\/'
 
16215
                   ;;
 
16216
               esac
 
16217
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
16218
 
 
16219
               gl_header_literal_regex=`echo 'inttypes.h' \
 
16220
                                        | sed -e "$gl_make_literal_regex_sed"`
 
16221
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
16222
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
16223
                   s|^/[^/]|//&|
 
16224
                   p
 
16225
                   q
 
16226
                 }'
15365
16227
                                                            gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15366
 
                  sed -n '\#/inttypes.h#{
15367
 
                    s#.*"\(.*/inttypes.h\)".*#\1#
15368
 
                    s#^/[^/]#//&#
15369
 
                    p
15370
 
                    q
15371
 
                  }'`'"'
 
16228
                      sed -n "$gl_absolute_header_sed"`'"'
15372
16229
          else
15373
16230
               gl_cv_next_inttypes_h='<'inttypes.h'>'
15374
16231
             fi
15396
16253
 
15397
16254
 
15398
16255
 
15399
 
$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
15400
 
 
15401
 
 
15402
 
 
15403
 
 
15404
 
    for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
15405
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15406
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15407
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15408
 
if eval \${$as_gl_Symbol+:} false; then :
15409
 
  $as_echo_n "(cached) " >&6
15410
 
else
15411
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15412
 
/* end confdefs.h.  */
15413
 
#include <inttypes.h>
15414
 
 
15415
 
int
15416
 
main ()
15417
 
{
15418
 
#undef $gl_func
15419
 
  (void) $gl_func;
15420
 
  ;
15421
 
  return 0;
15422
 
}
15423
 
_ACEOF
15424
 
if ac_fn_c_try_compile "$LINENO"; then :
15425
 
  eval "$as_gl_Symbol=yes"
15426
 
else
15427
 
  eval "$as_gl_Symbol=no"
15428
 
fi
15429
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15430
 
fi
15431
 
eval ac_res=\$$as_gl_Symbol
15432
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15433
 
$as_echo "$ac_res" >&6; }
15434
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15435
 
  cat >>confdefs.h <<_ACEOF
15436
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15437
 
_ACEOF
15438
 
 
15439
 
                     eval ac_cv_have_decl_$gl_func=yes
15440
 
fi
15441
 
      done
15442
 
 
15443
16256
 
15444
16257
 
15445
16258
  for ac_header in inttypes.h
15501
16314
 
15502
16315
 
15503
16316
 
 
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
 
16321
else
 
16322
 
 
16323
      if test "$cross_compiling" = yes; then :
 
16324
 
 
16325
                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
16326
/* end confdefs.h.  */
 
16327
 
 
16328
#if defined arm || defined __arm || defined __arm__
 
16329
  mixed_endianness
 
16330
#endif
 
16331
 
 
16332
_ACEOF
 
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"
 
16336
else
 
16337
 
 
16338
                                                         :
 
16339
if ${ac_cv_c_bigendian+:} false; then :
 
16340
  $as_echo_n "(cached) " >&6
 
16341
else
 
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
 
16348
             #endif
 
16349
             typedef int dummy;
 
16350
 
 
16351
_ACEOF
 
16352
if ac_fn_c_try_compile "$LINENO"; then :
 
16353
 
 
16354
        # Check for potential -arch flags.  It is not universal unless
 
16355
        # there are at least two -arch flags with different values.
 
16356
        ac_arch=
 
16357
        ac_prev=
 
16358
        for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
 
16359
         if test -n "$ac_prev"; then
 
16360
           case $ac_word in
 
16361
             i?86 | x86_64 | ppc | ppc64)
 
16362
               if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
 
16363
                 ac_arch=$ac_word
 
16364
               else
 
16365
                 ac_cv_c_bigendian=universal
 
16366
                 break
 
16367
               fi
 
16368
               ;;
 
16369
           esac
 
16370
           ac_prev=
 
16371
         elif test "x$ac_word" = "x-arch"; then
 
16372
           ac_prev=arch
 
16373
         fi
 
16374
       done
 
16375
fi
 
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>
 
16383
 
 
16384
int
 
16385
main ()
 
16386
{
 
16387
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
 
16388
                     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
 
16389
                     && LITTLE_ENDIAN)
 
16390
              bogus endian macros
 
16391
             #endif
 
16392
 
 
16393
  ;
 
16394
  return 0;
 
16395
}
 
16396
_ACEOF
 
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>
 
16403
 
 
16404
int
 
16405
main ()
 
16406
{
 
16407
#if BYTE_ORDER != BIG_ENDIAN
 
16408
                 not big endian
 
16409
                #endif
 
16410
 
 
16411
  ;
 
16412
  return 0;
 
16413
}
 
16414
_ACEOF
 
16415
if ac_fn_c_try_compile "$LINENO"; then :
 
16416
  ac_cv_c_bigendian=yes
 
16417
else
 
16418
  ac_cv_c_bigendian=no
 
16419
fi
 
16420
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
16421
fi
 
16422
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
16423
    fi
 
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>
 
16429
 
 
16430
int
 
16431
main ()
 
16432
{
 
16433
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
 
16434
              bogus endian macros
 
16435
             #endif
 
16436
 
 
16437
  ;
 
16438
  return 0;
 
16439
}
 
16440
_ACEOF
 
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>
 
16446
 
 
16447
int
 
16448
main ()
 
16449
{
 
16450
#ifndef _BIG_ENDIAN
 
16451
                 not big endian
 
16452
                #endif
 
16453
 
 
16454
  ;
 
16455
  return 0;
 
16456
}
 
16457
_ACEOF
 
16458
if ac_fn_c_try_compile "$LINENO"; then :
 
16459
  ac_cv_c_bigendian=yes
 
16460
else
 
16461
  ac_cv_c_bigendian=no
 
16462
fi
 
16463
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
16464
fi
 
16465
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
16466
    fi
 
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];
 
16479
                }
 
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];
 
16486
                }
 
16487
                extern int foo;
 
16488
 
 
16489
int
 
16490
main ()
 
16491
{
 
16492
return use_ascii (foo) == use_ebcdic (foo);
 
16493
  ;
 
16494
  return 0;
 
16495
}
 
16496
_ACEOF
 
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
 
16500
            fi
 
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
 
16504
              else
 
16505
                # finding both strings is unlikely to happen, but who knows?
 
16506
                ac_cv_c_bigendian=unknown
 
16507
              fi
 
16508
            fi
 
16509
fi
 
16510
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
16511
else
 
16512
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
16513
/* end confdefs.h.  */
 
16514
$ac_includes_default
 
16515
int
 
16516
main ()
 
16517
{
 
16518
 
 
16519
             /* Are we little or big endian?  From Harbison&Steele.  */
 
16520
             union
 
16521
             {
 
16522
               long int l;
 
16523
               char c[sizeof (long int)];
 
16524
             } u;
 
16525
             u.l = 1;
 
16526
             return u.c[sizeof (long int) - 1] == 1;
 
16527
 
 
16528
  ;
 
16529
  return 0;
 
16530
}
 
16531
_ACEOF
 
16532
if ac_fn_c_try_run "$LINENO"; then :
 
16533
  ac_cv_c_bigendian=no
 
16534
else
 
16535
  ac_cv_c_bigendian=yes
 
16536
fi
 
16537
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
16538
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
16539
fi
 
16540
 
 
16541
    fi
 
16542
fi
 
16543
:
 
16544
 case $ac_cv_c_bigendian in #(
 
16545
   yes)
 
16546
     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
 
16547
   no)
 
16548
     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
 
16549
   universal)
 
16550
 
 
16551
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
16552
 
 
16553
     ;; #(
 
16554
   *)
 
16555
     gl_cv_cc_double_expbit0="unknown" ;;
 
16556
 esac
 
16557
 
 
16558
 
 
16559
fi
 
16560
rm -f conftest*
 
16561
 
 
16562
 
 
16563
else
 
16564
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
16565
/* end confdefs.h.  */
 
16566
 
 
16567
#include <float.h>
 
16568
#include <stddef.h>
 
16569
#include <stdio.h>
 
16570
#include <string.h>
 
16571
#define NWORDS \
 
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)
 
16577
{
 
16578
  memory_double m;
 
16579
  size_t i;
 
16580
  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
 
16581
  memset (&m, 0, sizeof (memory_double));
 
16582
  m.value = x;
 
16583
  for (i = 0; i < NWORDS; i++)
 
16584
    {
 
16585
      ored_words[i] |= m.word[i];
 
16586
      anded_words[i] &= m.word[i];
 
16587
    }
 
16588
}
 
16589
int main ()
 
16590
{
 
16591
  size_t j;
 
16592
  FILE *fp = fopen ("conftest.out", "w");
 
16593
  if (fp == NULL)
 
16594
    return 1;
 
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)
 
16609
      break;
 
16610
  if (j < NWORDS)
 
16611
    {
 
16612
      size_t i;
 
16613
      for (i = j + 1; i < NWORDS; i++)
 
16614
        if (ored_words[i] != 0)
 
16615
          {
 
16616
            fprintf (fp, "unknown");
 
16617
            return (fclose (fp) != 0);
 
16618
          }
 
16619
      for (i = 0; ; i++)
 
16620
        if ((ored_words[j] >> i) & 1)
 
16621
          {
 
16622
            fprintf (fp, "word %d bit %d", (int) j, (int) i);
 
16623
            return (fclose (fp) != 0);
 
16624
          }
 
16625
    }
 
16626
  fprintf (fp, "unknown");
 
16627
  return (fclose (fp) != 0);
 
16628
}
 
16629
 
 
16630
_ACEOF
 
16631
if ac_fn_c_try_run "$LINENO"; then :
 
16632
  gl_cv_cc_double_expbit0=`cat conftest.out`
 
16633
else
 
16634
  gl_cv_cc_double_expbit0="unknown"
 
16635
fi
 
16636
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
16637
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
16638
fi
 
16639
 
 
16640
      rm -f conftest.out
 
16641
 
 
16642
fi
 
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
 
16646
    word*bit*)
 
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 //'`
 
16649
 
 
16650
cat >>confdefs.h <<_ACEOF
 
16651
#define DBL_EXPBIT0_WORD $word
 
16652
_ACEOF
 
16653
 
 
16654
 
 
16655
cat >>confdefs.h <<_ACEOF
 
16656
#define DBL_EXPBIT0_BIT $bit
 
16657
_ACEOF
 
16658
 
 
16659
      ;;
 
16660
  esac
 
16661
 
 
16662
 
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 :
15715
16874
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15716
16875
                 *)    gl_absname_cpp="$ac_cpp" ;;
15717
16876
               esac
 
16877
 
 
16878
               case "$host_os" in
 
16879
                 mingw*)
 
16880
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
16881
                   ;;
 
16882
                 *)
 
16883
                   gl_dirsep_regex='\/'
 
16884
                   ;;
 
16885
               esac
 
16886
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
16887
 
 
16888
               gl_header_literal_regex=`echo 'wctype.h' \
 
16889
                                        | sed -e "$gl_make_literal_regex_sed"`
 
16890
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
16891
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
16892
                   s|^/[^/]|//&|
 
16893
                   p
 
16894
                   q
 
16895
                 }'
15718
16896
                                                            gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15719
 
                  sed -n '\#/wctype.h#{
15720
 
                    s#.*"\(.*/wctype.h\)".*#\1#
15721
 
                    s#^/[^/]#//&#
15722
 
                    p
15723
 
                    q
15724
 
                  }'`'"'
 
16897
                      sed -n "$gl_absolute_header_sed"`'"'
15725
16898
          else
15726
16899
               gl_cv_next_wctype_h='<'wctype.h'>'
15727
16900
             fi
15769
16942
}
15770
16943
_ACEOF
15771
16944
if ac_fn_c_try_compile "$LINENO"; then :
15772
 
  gl_cv_func_iswcntrl_works=yes
 
16945
  gl_cv_func_iswcntrl_works="guessing yes"
15773
16946
else
15774
 
  gl_cv_func_iswcntrl_works=no
 
16947
  gl_cv_func_iswcntrl_works="guessing no"
15775
16948
fi
15776
16949
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15777
16950
 
15811
16984
  fi
15812
16985
 
15813
16986
 
15814
 
  if test "$gl_cv_func_iswcntrl_works" = no; then
15815
 
    REPLACE_ISWCNTRL=1
15816
 
  else
15817
 
    REPLACE_ISWCNTRL=0
15818
 
  fi
 
16987
  case "$gl_cv_func_iswcntrl_works" in
 
16988
    *yes) REPLACE_ISWCNTRL=0 ;;
 
16989
    *)    REPLACE_ISWCNTRL=1 ;;
 
16990
  esac
15819
16991
 
15820
16992
 
15821
16993
  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
15958
17130
  fi
15959
17131
 
15960
17132
 
15961
 
    for gl_func in wctype iswctype wctrans towctrans     ; do
15962
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15963
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15964
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15965
 
if eval \${$as_gl_Symbol+:} false; then :
15966
 
  $as_echo_n "(cached) " >&6
15967
 
else
15968
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15969
 
/* end confdefs.h.  */
15970
 
 
15971
 
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15972
 
   <wchar.h>.
15973
 
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15974
 
   included before <wchar.h>.  */
15975
 
#if !(defined __GLIBC__ && !defined __UCLIBC__)
15976
 
# include <stddef.h>
15977
 
# include <stdio.h>
15978
 
# include <time.h>
15979
 
# include <wchar.h>
15980
 
#endif
15981
 
#include <wctype.h>
15982
 
 
15983
 
int
15984
 
main ()
15985
 
{
15986
 
#undef $gl_func
15987
 
  (void) $gl_func;
15988
 
  ;
15989
 
  return 0;
15990
 
}
15991
 
_ACEOF
15992
 
if ac_fn_c_try_compile "$LINENO"; then :
15993
 
  eval "$as_gl_Symbol=yes"
15994
 
else
15995
 
  eval "$as_gl_Symbol=no"
15996
 
fi
15997
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998
 
fi
15999
 
eval ac_res=\$$as_gl_Symbol
16000
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16001
 
$as_echo "$ac_res" >&6; }
16002
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16003
 
  cat >>confdefs.h <<_ACEOF
16004
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16005
 
_ACEOF
16006
 
 
16007
 
                     eval ac_cv_have_decl_$gl_func=yes
16008
 
fi
16009
 
      done
16010
 
 
16011
17133
 
16012
17134
 
16013
17135
 
16024
17146
 
16025
17147
 
16026
17148
 
16027
 
 
16028
 
 
16029
17149
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
16030
17150
if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
16031
17151
  ac_have_decl=1
16075
17195
 
16076
17196
 
16077
17197
 
 
17198
  GNULIB_LOCALECONV=0;
16078
17199
  GNULIB_SETLOCALE=0;
16079
17200
  GNULIB_DUPLOCALE=0;
16080
17201
    HAVE_DUPLOCALE=1;
 
17202
  REPLACE_LOCALECONV=0;
16081
17203
  REPLACE_SETLOCALE=0;
16082
17204
  REPLACE_DUPLOCALE=0;
 
17205
  REPLACE_STRUCT_LCONV=0;
16083
17206
 
16084
17207
 
16085
17208
    REPLACE_NULL=0;
16193
17316
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16194
17317
                 *)    gl_absname_cpp="$ac_cpp" ;;
16195
17318
               esac
 
17319
 
 
17320
               case "$host_os" in
 
17321
                 mingw*)
 
17322
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
17323
                   ;;
 
17324
                 *)
 
17325
                   gl_dirsep_regex='\/'
 
17326
                   ;;
 
17327
               esac
 
17328
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
17329
 
 
17330
               gl_header_literal_regex=`echo 'stddef.h' \
 
17331
                                        | sed -e "$gl_make_literal_regex_sed"`
 
17332
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
17333
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
17334
                   s|^/[^/]|//&|
 
17335
                   p
 
17336
                   q
 
17337
                 }'
16196
17338
                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16197
 
                  sed -n '\#/stddef.h#{
16198
 
                    s#.*"\(.*/stddef.h\)".*#\1#
16199
 
                    s#^/[^/]#//&#
16200
 
                    p
16201
 
                    q
16202
 
                  }'`'"'
 
17339
                      sed -n "$gl_absolute_header_sed"`'"'
16203
17340
 
16204
17341
 
16205
17342
fi
17100
18237
      fi
17101
18238
    fi
17102
18239
    if test -z "$gl_have_pthread"; then
17103
 
      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
17104
 
        if { case "$host_os" in
17105
 
               mingw*) true;;
17106
 
               *) false;;
17107
 
             esac
17108
 
           }; then
17109
 
          gl_threads_api=win32
17110
 
 
17111
 
$as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h
17112
 
 
17113
 
        fi
17114
 
      fi
 
18240
      case "$gl_use_threads" in
 
18241
        yes | windows | win32) # The 'win32' is for backward compatibility.
 
18242
          if { case "$host_os" in
 
18243
                 mingw*) true;;
 
18244
                 *) false;;
 
18245
               esac
 
18246
             }; then
 
18247
            gl_threads_api=windows
 
18248
 
 
18249
$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
 
18250
 
 
18251
          fi
 
18252
          ;;
 
18253
      esac
17115
18254
    fi
17116
18255
  fi
17117
18256
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
17130
18269
 
17131
18270
 
17132
18271
 
17133
 
  for ac_header in stdlib.h
 
18272
 
 
18273
      for ac_header in stdlib.h
17134
18274
do :
17135
18275
  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
17136
18276
if test "x$ac_cv_header_stdlib_h" = xyes; then :
17142
18282
 
17143
18283
done
17144
18284
 
17145
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
 
18285
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
17146
18286
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
17147
18287
if ${ac_cv_func_malloc_0_nonnull+:} false; then :
17148
18288
  $as_echo_n "(cached) " >&6
17149
18289
else
17150
18290
  if test "$cross_compiling" = yes; then :
17151
 
  ac_cv_func_malloc_0_nonnull=no
 
18291
  case "$host_os" in
 
18292
          # Guess yes on platforms where we know the result.
 
18293
          *-gnu* | freebsd* | netbsd* | openbsd* \
 
18294
          | hpux* | solaris* | cygwin* | mingw*)
 
18295
            ac_cv_func_malloc_0_nonnull=yes ;;
 
18296
          # If we don't know, assume the worst.
 
18297
          *) ac_cv_func_malloc_0_nonnull=no ;;
 
18298
        esac
 
18299
 
17152
18300
else
17153
18301
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17154
18302
/* end confdefs.h.  */
17155
18303
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
17156
 
# include <stdlib.h>
17157
 
#else
17158
 
char *malloc ();
17159
 
#endif
 
18304
            # include <stdlib.h>
 
18305
            #else
 
18306
            char *malloc ();
 
18307
            #endif
17160
18308
 
17161
18309
int
17162
18310
main ()
17165
18313
  ;
17166
18314
  return 0;
17167
18315
}
 
18316
 
17168
18317
_ACEOF
17169
18318
if ac_fn_c_try_run "$LINENO"; then :
17170
18319
  ac_cv_func_malloc_0_nonnull=yes
17175
18324
  conftest.$ac_objext conftest.beam conftest.$ac_ext
17176
18325
fi
17177
18326
 
 
18327
 
17178
18328
fi
17179
18329
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
17180
18330
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
17181
 
if test $ac_cv_func_malloc_0_nonnull = yes; then :
 
18331
  if test $ac_cv_func_malloc_0_nonnull = yes; then :
17182
18332
  gl_cv_func_malloc_0_nonnull=1
17183
18333
else
17184
18334
  gl_cv_func_malloc_0_nonnull=0
17222
18372
  const char *p;
17223
18373
  /* Check whether the given locale name is recognized by the system.  */
17224
18374
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
17225
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
18375
  /* On native Windows, setlocale(category, "") looks at the system settings,
17226
18376
     not at the environment variables.  Also, when an encoding suffix such
17227
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
18377
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17228
18378
     category of the locale to "C".  */
17229
18379
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17230
18380
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17233
18383
  if (setlocale (LC_ALL, "") == NULL) return 1;
17234
18384
#endif
17235
18385
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17236
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
18386
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17237
18387
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17238
18388
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17239
18389
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17282
18432
        # "ja" as "Japanese" or "Japanese_Japan.932",
17283
18433
        # and similar.
17284
18434
        mingw*)
17285
 
          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
17286
 
          # and CP932 is very different from EUC-JP, so we cannot use it here.
 
18435
          # Note that on native Windows, the Japanese locale is
 
18436
          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
 
18437
          # cannot use it here.
17287
18438
          gt_cv_locale_ja=none
17288
18439
          ;;
17289
18440
        *)
17290
18441
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17291
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
18442
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17292
18443
          # configure script would override the LC_ALL setting. Likewise for
17293
18444
          # LC_CTYPE, which is also set at the beginning of the configure script.
17294
18445
          # Test for the AIX locale name.
17361
18512
  const char *p;
17362
18513
  /* Check whether the given locale name is recognized by the system.  */
17363
18514
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
17364
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
18515
  /* On native Windows, setlocale(category, "") looks at the system settings,
17365
18516
     not at the environment variables.  Also, when an encoding suffix such
17366
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
18517
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17367
18518
     category of the locale to "C".  */
17368
18519
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17369
18520
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17372
18523
  if (setlocale (LC_ALL, "") == NULL) return 1;
17373
18524
#endif
17374
18525
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17375
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
18526
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17376
18527
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17377
18528
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17378
18529
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17421
18572
        # "ja" as "Japanese" or "Japanese_Japan.932",
17422
18573
        # and similar.
17423
18574
        mingw*)
17424
 
          # Test for the hypothetical native Win32 locale name.
 
18575
          # Test for the hypothetical native Windows locale name.
17425
18576
          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17426
18577
            gt_cv_locale_zh_CN=Chinese_China.54936
17427
18578
          else
17437
18588
          ;;
17438
18589
        *)
17439
18590
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17440
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
18591
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17441
18592
          # configure script would override the LC_ALL setting. Likewise for
17442
18593
          # LC_CTYPE, which is also set at the beginning of the configure script.
17443
18594
          # Test for the locale name without encoding suffix.
17494
18645
#if !(defined __BEOS__ || defined __HAIKU__)
17495
18646
  /* Check whether the given locale name is recognized by the system.  */
17496
18647
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
17497
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
18648
  /* On native Windows, setlocale(category, "") looks at the system settings,
17498
18649
     not at the environment variables.  Also, when an encoding suffix such
17499
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
18650
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17500
18651
     category of the locale to "C".  */
17501
18652
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17502
18653
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17505
18656
  if (setlocale (LC_ALL, "") == NULL) return 1;
17506
18657
# endif
17507
18658
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17508
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
18659
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17509
18660
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17510
18661
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17511
18662
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17531
18682
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
17532
18683
    return 1;
17533
18684
#endif
 
18685
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
17534
18686
  /* Check whether the decimal separator is a comma.
17535
18687
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
17536
18688
     are nl_langinfo(RADIXCHAR) are both ".".  */
17537
18689
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
18690
#endif
17538
18691
  return 0;
17539
18692
}
17540
18693
 
17552
18705
        # "ja" as "Japanese" or "Japanese_Japan.932",
17553
18706
        # and similar.
17554
18707
        mingw*)
17555
 
          # Test for the hypothetical native Win32 locale name.
 
18708
          # Test for the hypothetical native Windows locale name.
17556
18709
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17557
18710
            gt_cv_locale_fr_utf8=French_France.65001
17558
18711
          else
17562
18715
          ;;
17563
18716
        *)
17564
18717
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17565
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
18718
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17566
18719
          # configure script would override the LC_ALL setting. Likewise for
17567
18720
          # LC_CTYPE, which is also set at the beginning of the configure script.
17568
18721
          # Test for the usual locale name.
18266
19419
 
18267
19420
#include <sys/mman.h>
18268
19421
#ifdef MAP_ANONYMOUS
18269
 
    I cant identify this map
 
19422
    I cannot identify this map
18270
19423
#endif
18271
19424
 
18272
19425
_ACEOF
18273
19426
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18274
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
 
19427
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
18275
19428
  gl_have_mmap_anonymous=yes
18276
19429
fi
18277
19430
rm -f conftest*
18282
19435
 
18283
19436
#include <sys/mman.h>
18284
19437
#ifdef MAP_ANON
18285
 
    I cant identify this map
 
19438
    I cannot identify this map
18286
19439
#endif
18287
19440
 
18288
19441
_ACEOF
18289
19442
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18290
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
 
19443
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
18291
19444
 
18292
19445
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
18293
19446
 
18418
19571
 
18419
19572
 
18420
19573
 
 
19574
 
 
19575
 
18421
19576
  GNULIB_MKTIME=0;
18422
19577
  GNULIB_NANOSLEEP=0;
18423
19578
  GNULIB_STRPTIME=0;
18435
19590
 
18436
19591
 
18437
19592
 
18438
 
 
18439
 
 
18440
19593
  GNULIB_PSELECT=0;
18441
19594
  GNULIB_SELECT=0;
18442
19595
    HAVE_PSELECT=1;
18559
19712
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18560
19713
                 *)    gl_absname_cpp="$ac_cpp" ;;
18561
19714
               esac
 
19715
 
 
19716
               case "$host_os" in
 
19717
                 mingw*)
 
19718
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
19719
                   ;;
 
19720
                 *)
 
19721
                   gl_dirsep_regex='\/'
 
19722
                   ;;
 
19723
               esac
 
19724
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
19725
 
 
19726
               gl_header_literal_regex=`echo 'sys/select.h' \
 
19727
                                        | sed -e "$gl_make_literal_regex_sed"`
 
19728
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
19729
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
19730
                   s|^/[^/]|//&|
 
19731
                   p
 
19732
                   q
 
19733
                 }'
18562
19734
                                                            gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18563
 
                  sed -n '\#/sys/select.h#{
18564
 
                    s#.*"\(.*/sys/select.h\)".*#\1#
18565
 
                    s#^/[^/]#//&#
18566
 
                    p
18567
 
                    q
18568
 
                  }'`'"'
 
19735
                      sed -n "$gl_absolute_header_sed"`'"'
18569
19736
          else
18570
19737
               gl_cv_next_sys_select_h='<'sys/select.h'>'
18571
19738
             fi
18624
19791
 
18625
19792
 
18626
19793
 
18627
 
    for gl_func in pselect select; do
18628
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18629
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18630
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18631
 
if eval \${$as_gl_Symbol+:} false; then :
18632
 
  $as_echo_n "(cached) " >&6
18633
 
else
18634
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18635
 
/* end confdefs.h.  */
18636
 
 
18637
 
/* Some systems require prerequisite headers.  */
18638
 
#include <sys/types.h>
18639
 
#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
18640
 
# include <sys/time.h>
18641
 
#endif
18642
 
#include <sys/select.h>
18643
 
 
18644
 
int
18645
 
main ()
18646
 
{
18647
 
#undef $gl_func
18648
 
  (void) $gl_func;
18649
 
  ;
18650
 
  return 0;
18651
 
}
18652
 
_ACEOF
18653
 
if ac_fn_c_try_compile "$LINENO"; then :
18654
 
  eval "$as_gl_Symbol=yes"
18655
 
else
18656
 
  eval "$as_gl_Symbol=no"
18657
 
fi
18658
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18659
 
fi
18660
 
eval ac_res=\$$as_gl_Symbol
18661
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18662
 
$as_echo "$ac_res" >&6; }
18663
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18664
 
  cat >>confdefs.h <<_ACEOF
18665
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18666
 
_ACEOF
18667
 
 
18668
 
                     eval ac_cv_have_decl_$gl_func=yes
18669
 
fi
18670
 
      done
18671
 
 
18672
19794
 
18673
19795
 
18674
19796
 
18918
20040
      *yes) ;;
18919
20041
      *) REPLACE_SELECT=1 ;;
18920
20042
    esac
18921
 
  fi
 
20043
 
 
20044
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
 
20045
$as_echo_n "checking whether select detects invalid fds... " >&6; }
 
20046
if ${gl_cv_func_select_detects_ebadf+:} false; then :
 
20047
  $as_echo_n "(cached) " >&6
 
20048
else
 
20049
 
 
20050
        if test "$cross_compiling" = yes; then :
 
20051
 
 
20052
           case "$host_os" in
 
20053
                    # Guess yes on glibc systems.
 
20054
            *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
 
20055
                    # If we don't know, assume the worst.
 
20056
            *)      gl_cv_func_select_detects_ebadf="guessing no" ;;
 
20057
           esac
 
20058
 
 
20059
else
 
20060
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20061
/* end confdefs.h.  */
 
20062
 
 
20063
#include <sys/types.h>
 
20064
#include <sys/time.h>
 
20065
#if HAVE_SYS_SELECT_H
 
20066
# include <sys/select.h>
 
20067
#endif
 
20068
#include <unistd.h>
 
20069
#include <errno.h>
 
20070
 
 
20071
int
 
20072
main ()
 
20073
{
 
20074
 
 
20075
  fd_set set;
 
20076
  dup2(0, 16);
 
20077
  FD_ZERO(&set);
 
20078
  FD_SET(16, &set);
 
20079
  close(16);
 
20080
  struct timeval timeout;
 
20081
  timeout.tv_sec = 0;
 
20082
  timeout.tv_usec = 5;
 
20083
  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
 
20084
 
 
20085
  ;
 
20086
  return 0;
 
20087
}
 
20088
_ACEOF
 
20089
if ac_fn_c_try_run "$LINENO"; then :
 
20090
  gl_cv_func_select_detects_ebadf=yes
 
20091
else
 
20092
  gl_cv_func_select_detects_ebadf=no
 
20093
fi
 
20094
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
20095
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
20096
fi
 
20097
 
 
20098
 
 
20099
fi
 
20100
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
 
20101
$as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
 
20102
    case $gl_cv_func_select_detects_ebadf in
 
20103
      *yes) ;;
 
20104
      *) REPLACE_SELECT=1 ;;
 
20105
    esac
 
20106
  fi
 
20107
 
 
20108
    LIB_SELECT="$LIBSOCKET"
 
20109
  if test $REPLACE_SELECT = 1; then
 
20110
    case "$host_os" in
 
20111
      mingw*)
 
20112
                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20113
/* end confdefs.h.  */
 
20114
 
 
20115
#define WIN32_LEAN_AND_MEAN
 
20116
#include <windows.h>
 
20117
int
 
20118
main ()
 
20119
{
 
20120
  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
 
20121
  return 0;
 
20122
}
 
20123
_ACEOF
 
20124
if ac_fn_c_try_link "$LINENO"; then :
 
20125
 
 
20126
else
 
20127
  LIB_SELECT="$LIB_SELECT -luser32"
 
20128
fi
 
20129
rm -f core conftest.err conftest.$ac_objext \
 
20130
    conftest$ac_exeext conftest.$ac_ext
 
20131
        ;;
 
20132
    esac
 
20133
  fi
 
20134
 
18922
20135
 
18923
20136
 
18924
20137
 
19155
20368
 
19156
20369
 
19157
20370
 
 
20371
 
 
20372
 
 
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;
 
20397
 
 
20398
  REPLACE_POSIX_SPAWN=0;
 
20399
  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
 
20400
 
 
20401
  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
 
20402
 
 
20403
  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
 
20404
 
 
20405
 
 
20406
 
 
20407
 
 
20408
 
 
20409
 
 
20410
 
 
20411
 
 
20412
  if test $ac_cv_func_posix_spawn != yes; then
 
20413
    HAVE_POSIX_SPAWN=0
 
20414
  fi
 
20415
 
 
20416
 
 
20417
 
 
20418
 
 
20419
                                      if test $ac_cv_func_posix_spawn = yes; then
 
20420
 
 
20421
 
 
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
 
20426
else
 
20427
  if test $cross_compiling = no; then
 
20428
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20429
/* end confdefs.h.  */
 
20430
 
 
20431
#include <errno.h>
 
20432
#include <fcntl.h>
 
20433
#include <signal.h>
 
20434
#include <spawn.h>
 
20435
#include <stdbool.h>
 
20436
#include <stdio.h>
 
20437
#include <stdlib.h>
 
20438
#include <string.h>
 
20439
#include <unistd.h>
 
20440
#include <sys/types.h>
 
20441
#include <sys/wait.h>
 
20442
 
 
20443
extern char **environ;
 
20444
 
 
20445
#ifndef STDIN_FILENO
 
20446
# define STDIN_FILENO 0
 
20447
#endif
 
20448
#ifndef STDOUT_FILENO
 
20449
# define STDOUT_FILENO 1
 
20450
#endif
 
20451
#ifndef STDERR_FILENO
 
20452
# define STDERR_FILENO 2
 
20453
#endif
 
20454
 
 
20455
#ifndef WTERMSIG
 
20456
# define WTERMSIG(x) ((x) & 0x7f)
 
20457
#endif
 
20458
#ifndef WIFEXITED
 
20459
# define WIFEXITED(x) (WTERMSIG (x) == 0)
 
20460
#endif
 
20461
#ifndef WEXITSTATUS
 
20462
# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
 
20463
#endif
 
20464
 
 
20465
#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
 
20466
 
 
20467
static int
 
20468
fd_safer (int fd)
 
20469
{
 
20470
  if (0 <= fd && fd <= 2)
 
20471
    {
 
20472
      int f = fd_safer (dup (fd));
 
20473
      int e = errno;
 
20474
      close (fd);
 
20475
      errno = e;
 
20476
      fd = f;
 
20477
    }
 
20478
 
 
20479
  return fd;
 
20480
}
 
20481
 
 
20482
int
 
20483
main ()
 
20484
{
 
20485
  char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
 
20486
  int ofd[2];
 
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;
 
20493
  int err;
 
20494
  pid_t child;
 
20495
  int status;
 
20496
  int exitstatus;
 
20497
 
 
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)
 
20501
    {
 
20502
      perror ("cannot create pipe");
 
20503
      exit (1);
 
20504
    }
 
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))
 
20524
    {
 
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);
 
20530
      if (err == ENOENT)
 
20531
        return 0;
 
20532
      else
 
20533
        {
 
20534
          errno = err;
 
20535
          perror ("subprocess failed");
 
20536
          exit (1);
 
20537
        }
 
20538
    }
 
20539
  posix_spawn_file_actions_destroy (&actions);
 
20540
  posix_spawnattr_destroy (&attrs);
 
20541
  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
 
20542
  close (ofd[0]);
 
20543
  close (ofd[1]);
 
20544
  status = 0;
 
20545
  while (waitpid (child, &status, 0) != child)
 
20546
    ;
 
20547
  if (!WIFEXITED (status))
 
20548
    {
 
20549
      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
 
20550
      exit (1);
 
20551
    }
 
20552
  exitstatus = WEXITSTATUS (status);
 
20553
  if (exitstatus != 127)
 
20554
    {
 
20555
      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
 
20556
      exit (1);
 
20557
    }
 
20558
  return 0;
 
20559
}
 
20560
 
 
20561
_ACEOF
 
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
 
20568
          else
 
20569
            gl_cv_func_posix_spawn_works=no
 
20570
          fi
 
20571
else
 
20572
  gl_cv_func_posix_spawn_works=no
 
20573
fi
 
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; }
 
20582
else
 
20583
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20584
/* end confdefs.h.  */
 
20585
 
 
20586
/* Test whether posix_spawn_file_actions_addopen supports filename arguments
 
20587
   that contain special characters such as '*'.  */
 
20588
 
 
20589
#include <errno.h>
 
20590
#include <fcntl.h>
 
20591
#include <signal.h>
 
20592
#include <spawn.h>
 
20593
#include <stdbool.h>
 
20594
#include <stdio.h>
 
20595
#include <string.h>
 
20596
#include <unistd.h>
 
20597
#include <sys/types.h>
 
20598
#include <sys/wait.h>
 
20599
 
 
20600
extern char **environ;
 
20601
 
 
20602
#ifndef STDIN_FILENO
 
20603
# define STDIN_FILENO 0
 
20604
#endif
 
20605
#ifndef STDOUT_FILENO
 
20606
# define STDOUT_FILENO 1
 
20607
#endif
 
20608
#ifndef STDERR_FILENO
 
20609
# define STDERR_FILENO 2
 
20610
#endif
 
20611
 
 
20612
#ifndef WTERMSIG
 
20613
# define WTERMSIG(x) ((x) & 0x7f)
 
20614
#endif
 
20615
#ifndef WIFEXITED
 
20616
# define WIFEXITED(x) (WTERMSIG (x) == 0)
 
20617
#endif
 
20618
#ifndef WEXITSTATUS
 
20619
# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
 
20620
#endif
 
20621
 
 
20622
#define CHILD_PROGRAM_FILENAME "conftest"
 
20623
#define DATA_FILENAME "conftest%=*#?"
 
20624
 
 
20625
static int
 
20626
parent_main (void)
 
20627
{
 
20628
  FILE *fp;
 
20629
  char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
 
20630
  posix_spawn_file_actions_t actions;
 
20631
  bool actions_allocated;
 
20632
  int err;
 
20633
  pid_t child;
 
20634
  int status;
 
20635
  int exitstatus;
 
20636
 
 
20637
  /* Create a data file with specific contents.  */
 
20638
  fp = fopen (DATA_FILENAME, "wb");
 
20639
  if (fp == NULL)
 
20640
    {
 
20641
      perror ("cannot create data file");
 
20642
      return 1;
 
20643
    }
 
20644
  fwrite ("Halle Potta", 1, 11, fp);
 
20645
  if (fflush (fp) || fclose (fp))
 
20646
    {
 
20647
      perror ("cannot prepare data file");
 
20648
      return 2;
 
20649
    }
 
20650
 
 
20651
  /* Avoid reading from our stdin, as it could block.  */
 
20652
  freopen ("/dev/null", "rb", stdin);
 
20653
 
 
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))
 
20661
    {
 
20662
      if (actions_allocated)
 
20663
        posix_spawn_file_actions_destroy (&actions);
 
20664
      errno = err;
 
20665
      perror ("subprocess failed");
 
20666
      return 3;
 
20667
    }
 
20668
  posix_spawn_file_actions_destroy (&actions);
 
20669
  status = 0;
 
20670
  while (waitpid (child, &status, 0) != child)
 
20671
    ;
 
20672
  if (!WIFEXITED (status))
 
20673
    {
 
20674
      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
 
20675
      return 4;
 
20676
    }
 
20677
  exitstatus = WEXITSTATUS (status);
 
20678
  if (exitstatus != 0)
 
20679
    {
 
20680
      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
 
20681
      return 5;
 
20682
    }
 
20683
  return 0;
 
20684
}
 
20685
 
 
20686
static int
 
20687
child_main (void)
 
20688
{
 
20689
  char buf[1024];
 
20690
 
 
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)
 
20694
    return 0;
 
20695
  else
 
20696
    return 8;
 
20697
}
 
20698
 
 
20699
static void
 
20700
cleanup_then_die (int sig)
 
20701
{
 
20702
  /* Clean up data file.  */
 
20703
  unlink (DATA_FILENAME);
 
20704
 
 
20705
  /* Re-raise the signal and die from it.  */
 
20706
  signal (sig, SIG_DFL);
 
20707
  raise (sig);
 
20708
}
 
20709
 
 
20710
int
 
20711
main (int argc, char *argv[])
 
20712
{
 
20713
  int exitstatus;
 
20714
 
 
20715
  if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
 
20716
    {
 
20717
      /* This is the parent process.  */
 
20718
      signal (SIGINT, cleanup_then_die);
 
20719
      signal (SIGTERM, cleanup_then_die);
 
20720
      #ifdef SIGHUP
 
20721
      signal (SIGHUP, cleanup_then_die);
 
20722
      #endif
 
20723
 
 
20724
      exitstatus = parent_main ();
 
20725
    }
 
20726
  else
 
20727
    {
 
20728
      /* This is the child process.  */
 
20729
 
 
20730
      exitstatus = child_main ();
 
20731
    }
 
20732
  unlink (DATA_FILENAME);
 
20733
  return exitstatus;
 
20734
}
 
20735
 
 
20736
_ACEOF
 
20737
if ac_fn_c_try_run "$LINENO"; then :
 
20738
 
 
20739
else
 
20740
  gl_cv_func_posix_spawn_works=no
 
20741
fi
 
20742
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
20743
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
20744
fi
 
20745
 
 
20746
       fi
 
20747
     else
 
20748
       case "$host_os" in
 
20749
         aix*) gl_cv_func_posix_spawn_works="guessing no";;
 
20750
         *)    gl_cv_func_posix_spawn_works="guessing yes";;
 
20751
       esac
 
20752
     fi
 
20753
 
 
20754
fi
 
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; }
 
20757
 
 
20758
    case "$gl_cv_func_posix_spawn_works" in
 
20759
      *yes)
 
20760
 
 
20761
$as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
 
20762
 
 
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
 
20767
else
 
20768
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20769
/* end confdefs.h.  */
 
20770
 
 
20771
#include <spawn.h>
 
20772
#if POSIX_SPAWN_SETSCHEDULER
 
20773
 POSIX scheduling supported
 
20774
#endif
 
20775
 
 
20776
_ACEOF
 
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
 
20780
else
 
20781
  gl_cv_func_spawnattr_setschedpolicy=no
 
20782
fi
 
20783
rm -f conftest*
 
20784
 
 
20785
 
 
20786
fi
 
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
 
20793
else
 
20794
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20795
/* end confdefs.h.  */
 
20796
 
 
20797
#include <spawn.h>
 
20798
#if POSIX_SPAWN_SETSCHEDPARAM
 
20799
 POSIX scheduling supported
 
20800
#endif
 
20801
 
 
20802
_ACEOF
 
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
 
20806
else
 
20807
  gl_cv_func_spawnattr_setschedparam=no
 
20808
fi
 
20809
rm -f conftest*
 
20810
 
 
20811
 
 
20812
fi
 
20813
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
 
20814
$as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
 
20815
        ;;
 
20816
      *) REPLACE_POSIX_SPAWN=1 ;;
 
20817
    esac
 
20818
  fi
 
20819
 
 
20820
 
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
19180
20843
 
19181
20844
 
19182
20845
 
19183
 
 
19184
 
 
19185
 
 
19186
 
 
19187
 
 
19188
 
 
19189
 
 
19190
 
 
19191
 
 
19192
 
 
19193
 
 
19194
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
 
20846
  GNULIB_PTHREAD_SIGMASK=0;
 
20847
  GNULIB_RAISE=0;
 
20848
  GNULIB_SIGNAL_H_SIGPIPE=0;
 
20849
  GNULIB_SIGPROCMASK=0;
 
20850
  GNULIB_SIGACTION=0;
 
20851
    HAVE_POSIX_SIGNALBLOCKING=1;
 
20852
  HAVE_PTHREAD_SIGMASK=1;
 
20853
  HAVE_RAISE=1;
 
20854
  HAVE_SIGSET_T=1;
 
20855
  HAVE_SIGINFO_T=1;
 
20856
  HAVE_SIGACTION=1;
 
20857
  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
 
20858
 
 
20859
  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
 
20860
 
 
20861
  HAVE_SIGHANDLER_T=1;
 
20862
  REPLACE_PTHREAD_SIGMASK=0;
 
20863
  REPLACE_RAISE=0;
 
20864
 
 
20865
 
 
20866
  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
 
20867
      #include <signal.h>
 
20868
      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
 
20869
      #include <sys/types.h>
 
20870
 
 
20871
"
 
20872
if test "x$ac_cv_type_sigset_t" = xyes; then :
 
20873
 
 
20874
cat >>confdefs.h <<_ACEOF
 
20875
#define HAVE_SIGSET_T 1
 
20876
_ACEOF
 
20877
 
 
20878
gl_cv_type_sigset_t=yes
 
20879
else
 
20880
  gl_cv_type_sigset_t=no
 
20881
fi
 
20882
 
 
20883
  if test $gl_cv_type_sigset_t != yes; then
 
20884
    HAVE_SIGSET_T=0
 
20885
  fi
 
20886
 
 
20887
 
 
20888
 
 
20889
 
 
20890
 
 
20891
 
 
20892
 
 
20893
 
 
20894
 
 
20895
 
 
20896
 
 
20897
 
 
20898
 
 
20899
 
 
20900
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
19195
20901
$as_echo_n "checking whether rmdir works... " >&6; }
19196
20902
if ${gl_cv_func_rmdir_works+:} false; then :
19197
20903
  $as_echo_n "(cached) " >&6
19199
20905
  mkdir conftest.dir
19200
20906
     touch conftest.file
19201
20907
     if test "$cross_compiling" = yes; then :
19202
 
  gl_cv_func_rmdir_works="guessing no"
 
20908
  case "$host_os" in
 
20909
                  # Guess yes on glibc systems.
 
20910
          *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
 
20911
                  # If we don't know, assume the worst.
 
20912
          *)      gl_cv_func_rmdir_works="guessing no" ;;
 
20913
        esac
 
20914
 
19203
20915
else
19204
20916
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19205
20917
/* end confdefs.h.  */
19206
20918
#include <stdio.h>
19207
20919
           #include <errno.h>
19208
 
           #include <unistd.h>
 
20920
           #if HAVE_UNISTD_H
 
20921
           # include <unistd.h>
 
20922
           #else /* on Windows with MSVC */
 
20923
           # include <direct.h>
 
20924
           #endif
19209
20925
 
19210
20926
int
19211
20927
main ()
19236
20952
fi
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
19240
 
    REPLACE_RMDIR=1
19241
 
  fi
19242
 
 
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
19247
 
else
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
19253
 
else
19254
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19255
 
/* end confdefs.h.  */
19256
 
$ac_includes_default
19257
 
int
19258
 
main ()
19259
 
{
19260
 
struct stat sbuf;
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;
19265
 
  ;
19266
 
  return 0;
19267
 
}
19268
 
_ACEOF
19269
 
if ac_fn_c_try_run "$LINENO"; then :
19270
 
  ac_cv_func_lstat_dereferences_slashed_symlink=yes
19271
 
else
19272
 
  ac_cv_func_lstat_dereferences_slashed_symlink=no
19273
 
fi
19274
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19275
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
19276
 
fi
19277
 
 
19278
 
else
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
19282
 
fi
19283
 
rm -f conftest.sym conftest.file
19284
 
 
19285
 
fi
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; }
19288
 
 
19289
 
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
19290
 
 
19291
 
cat >>confdefs.h <<_ACEOF
19292
 
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19293
 
_ACEOF
19294
 
 
19295
 
 
19296
 
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
19297
 
 
19298
 
 
19299
 
 
19300
 
 
19301
 
 
19302
 
 
19303
 
 
19304
 
 
19305
 
  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19306
 
 
19307
 
fi
19308
 
 
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
19313
 
else
19314
 
  if test "$cross_compiling" = yes; then :
19315
 
  ac_cv_func_lstat_empty_string_bug=yes
19316
 
else
19317
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19318
 
/* end confdefs.h.  */
19319
 
$ac_includes_default
19320
 
int
19321
 
main ()
19322
 
{
19323
 
struct stat sbuf;
19324
 
  return lstat ("", &sbuf) == 0;
19325
 
  ;
19326
 
  return 0;
19327
 
}
19328
 
_ACEOF
19329
 
if ac_fn_c_try_run "$LINENO"; then :
19330
 
  ac_cv_func_lstat_empty_string_bug=no
19331
 
else
19332
 
  ac_cv_func_lstat_empty_string_bug=yes
19333
 
fi
19334
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19335
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
19336
 
fi
19337
 
 
19338
 
fi
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
19342
 
 
19343
 
 
19344
 
 
19345
 
 
19346
 
 
19347
 
 
19348
 
 
19349
 
 
19350
 
  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
19351
 
 
19352
 
 
19353
 
cat >>confdefs.h <<_ACEOF
19354
 
#define HAVE_LSTAT_EMPTY_STRING_BUG 1
19355
 
_ACEOF
19356
 
 
19357
 
fi
 
20955
  case "$gl_cv_func_rmdir_works" in
 
20956
    *yes) ;;
 
20957
    *)
 
20958
      REPLACE_RMDIR=1
 
20959
      ;;
 
20960
  esac
 
20961
 
 
20962
 
 
20963
 
 
20964
 
 
20965
 
 
20966
 
 
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
 
20971
else
 
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
 
20976
     fi
 
20977
     if test "$cross_compiling" = yes; then :
 
20978
  case "$host_os" in
 
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" ;;
 
20983
       esac
 
20984
 
 
20985
else
 
20986
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20987
/* end confdefs.h.  */
 
20988
#if HAVE_UNISTD_H
 
20989
           # include <unistd.h>
 
20990
           #else /* on Windows with MSVC */
 
20991
           # include <io.h>
 
20992
           #endif
 
20993
           #include <errno.h>
 
20994
 
 
20995
int
 
20996
main ()
 
20997
{
 
20998
int result = 0;
 
20999
           if (!unlink ("conftest.file/"))
 
21000
             result |= 1;
 
21001
           else if (errno != ENOTDIR)
 
21002
             result |= 2;
 
21003
#if HAVE_LSTAT
 
21004
           if (!unlink ("conftest.lnk/"))
 
21005
             result |= 4;
 
21006
           else if (errno != ENOTDIR)
 
21007
             result |= 8;
 
21008
#endif
 
21009
           return result;
 
21010
 
 
21011
  ;
 
21012
  return 0;
 
21013
}
 
21014
_ACEOF
 
21015
if ac_fn_c_try_run "$LINENO"; then :
 
21016
  gl_cv_func_unlink_honors_slashes=yes
 
21017
else
 
21018
  gl_cv_func_unlink_honors_slashes=no
 
21019
fi
 
21020
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
21021
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
21022
fi
 
21023
 
 
21024
     rm -f conftest.file conftest.lnk
 
21025
fi
 
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
 
21029
    *no)
 
21030
      REPLACE_UNLINK=1
 
21031
      ;;
 
21032
  esac
 
21033
 
 
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
 
21038
else
 
21039
  case "$host_os" in
 
21040
       darwin*)
 
21041
                                                      if {
 
21042
              # Use the mktemp program if available. If not available, hide the error
 
21043
              # message.
 
21044
              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
 
21045
              test -n "$tmp" && test -d "$tmp"
 
21046
            } ||
 
21047
            {
 
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
 
21052
              # directory.
 
21053
              tmp=/tmp/gt$$-$RANDOM
 
21054
              (umask 077 && mkdir "$tmp")
 
21055
            }; then
 
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"
 
21062
 
 
21063
else
 
21064
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21065
/* end confdefs.h.  */
 
21066
 
 
21067
                #include <stdlib.h>
 
21068
                #if HAVE_UNISTD_H
 
21069
                # include <unistd.h>
 
21070
                #else /* on Windows with MSVC */
 
21071
                # include <direct.h>
 
21072
                # include <io.h>
 
21073
                #endif
 
21074
                int main ()
 
21075
                {
 
21076
                  int result = 0;
 
21077
                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
 
21078
                    result |= 1;
 
21079
                  else if (unlink ("..") == 0)
 
21080
                    result |= 2;
 
21081
                  return result;
 
21082
                }
 
21083
 
 
21084
_ACEOF
 
21085
if ac_fn_c_try_run "$LINENO"; then :
 
21086
  gl_cv_func_unlink_parent_fails=yes
 
21087
else
 
21088
  gl_cv_func_unlink_parent_fails=no
 
21089
fi
 
21090
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
21091
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
21092
fi
 
21093
 
 
21094
           unset GL_SUBDIR_FOR_UNLINK
 
21095
           rm -rf "$tmp"
 
21096
         else
 
21097
           gl_cv_func_unlink_parent_fails="guessing no"
 
21098
         fi
 
21099
         ;;
 
21100
       *)
 
21101
         gl_cv_func_unlink_parent_fails="guessing yes"
 
21102
         ;;
 
21103
     esac
 
21104
 
 
21105
fi
 
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
 
21109
    *no)
 
21110
      REPLACE_UNLINK=1
 
21111
 
 
21112
$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
 
21113
 
 
21114
      ;;
 
21115
  esac
19358
21116
 
19359
21117
 
19360
21118
 
19500
21258
 
19501
21259
 
19502
21260
 
19503
 
  GNULIB_PTHREAD_SIGMASK=0;
19504
 
  GNULIB_SIGNAL_H_SIGPIPE=0;
19505
 
  GNULIB_SIGPROCMASK=0;
19506
 
  GNULIB_SIGACTION=0;
19507
 
    HAVE_POSIX_SIGNALBLOCKING=1;
19508
 
  HAVE_PTHREAD_SIGMASK=1;
19509
 
  HAVE_SIGSET_T=1;
19510
 
  HAVE_SIGINFO_T=1;
19511
 
  HAVE_SIGACTION=1;
19512
 
  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19513
 
 
19514
 
  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
19515
 
 
19516
 
  HAVE_SIGHANDLER_T=1;
19517
 
  REPLACE_PTHREAD_SIGMASK=0;
19518
 
 
19519
 
 
19520
 
 
19521
 
 
19522
 
 
19523
 
 
19524
 
 
19525
 
 
19526
 
  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19527
 
      #include <signal.h>
19528
 
      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
19529
 
      #include <sys/types.h>
19530
 
 
19531
 
"
19532
 
if test "x$ac_cv_type_sigset_t" = xyes; then :
19533
 
 
19534
 
cat >>confdefs.h <<_ACEOF
19535
 
#define HAVE_SIGSET_T 1
19536
 
_ACEOF
19537
 
 
19538
 
gl_cv_type_sigset_t=yes
19539
 
else
19540
 
  gl_cv_type_sigset_t=no
19541
 
fi
19542
 
 
19543
 
  if test $gl_cv_type_sigset_t != yes; then
19544
 
    HAVE_SIGSET_T=0
19545
 
  fi
19546
 
 
19547
 
 
19548
 
 
19549
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
 
21261
 
 
21262
 
 
21263
 
 
21264
 
 
21265
 
 
21266
 
 
21267
 
 
21268
 
 
21269
 
 
21270
 
 
21271
 
 
21272
 
 
21273
 
 
21274
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
19550
21275
$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
19551
21276
if ${gl_cv_func_snprintf_retval_c99+:} false; then :
19552
21277
  $as_echo_n "(cached) " >&6
19560
21285
                                 # Guess yes on FreeBSD >= 5.
19561
21286
           freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
19562
21287
           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
19563
 
                                 # Guess yes on MacOS X >= 10.3.
 
21288
                                 # Guess yes on Mac OS X >= 10.3.
19564
21289
           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
19565
21290
           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
19566
21291
                                 # Guess yes on OpenBSD >= 3.9.
19589
21314
 
19590
21315
#include <stdio.h>
19591
21316
#include <string.h>
 
21317
#if HAVE_SNPRINTF
 
21318
# define my_snprintf snprintf
 
21319
#else
 
21320
# include <stdarg.h>
 
21321
static int my_snprintf (char *buf, int size, const char *format, ...)
 
21322
{
 
21323
  va_list args;
 
21324
  int ret;
 
21325
  va_start (args, format);
 
21326
  ret = vsnprintf (buf, size, format, args);
 
21327
  va_end (args);
 
21328
  return ret;
 
21329
}
 
21330
#endif
19592
21331
static char buf[100];
19593
21332
int main ()
19594
21333
{
19595
21334
  strcpy (buf, "ABCDEF");
19596
 
  if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
 
21335
  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
19597
21336
    return 1;
19598
 
  if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
 
21337
  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
19599
21338
    return 2;
19600
 
  if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
 
21339
  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
19601
21340
    return 3;
19602
21341
  return 0;
19603
21342
}
19627
21366
#define HAVE_DECL_SNPRINTF $ac_have_decl
19628
21367
_ACEOF
19629
21368
 
 
21369
 
 
21370
 
19630
21371
ac_fn_c_check_decl "$LINENO" "stpncpy" "ac_cv_have_decl_stpncpy" "$ac_includes_default"
19631
21372
if test "x$ac_cv_have_decl_stpncpy" = xyes; then :
19632
21373
  ac_have_decl=1
19654
21395
_ACEOF
19655
21396
 
19656
21397
 
19657
 
  REPLACE_STRERROR_0=0
 
21398
     REPLACE_STRERROR_0=0
19658
21399
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
19659
21400
$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
19660
21401
if ${gl_cv_func_strerror_0_works+:} false; then :
19661
21402
  $as_echo_n "(cached) " >&6
19662
21403
else
19663
21404
  if test "$cross_compiling" = yes; then :
19664
 
         gl_cv_func_strerror_0_works="guessing no"
 
21405
  case "$host_os" in
 
21406
                 # Guess yes on glibc systems.
 
21407
         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
 
21408
                 # If we don't know, assume the worst.
 
21409
         *)      gl_cv_func_strerror_0_works="guessing no" ;;
 
21410
       esac
 
21411
 
19665
21412
else
19666
21413
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19667
21414
/* end confdefs.h.  */
19697
21444
fi
19698
21445
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
19699
21446
$as_echo "$gl_cv_func_strerror_0_works" >&6; }
19700
 
  if test "$gl_cv_func_strerror_0_works" != yes; then
19701
 
    REPLACE_STRERROR_0=1
 
21447
  case "$gl_cv_func_strerror_0_works" in
 
21448
    *yes) ;;
 
21449
    *)
 
21450
      REPLACE_STRERROR_0=1
19702
21451
 
19703
21452
$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
19704
21453
 
19705
 
  fi
 
21454
      ;;
 
21455
  esac
19706
21456
 
19707
21457
 
19708
21458
 
19904
21654
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19905
21655
                 *)    gl_absname_cpp="$ac_cpp" ;;
19906
21656
               esac
 
21657
 
 
21658
               case "$host_os" in
 
21659
                 mingw*)
 
21660
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
21661
                   ;;
 
21662
                 *)
 
21663
                   gl_dirsep_regex='\/'
 
21664
                   ;;
 
21665
               esac
 
21666
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
21667
 
 
21668
               gl_header_literal_regex=`echo 'string.h' \
 
21669
                                        | sed -e "$gl_make_literal_regex_sed"`
 
21670
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
21671
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
21672
                   s|^/[^/]|//&|
 
21673
                   p
 
21674
                   q
 
21675
                 }'
19907
21676
                                                            gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19908
 
                  sed -n '\#/string.h#{
19909
 
                    s#.*"\(.*/string.h\)".*#\1#
19910
 
                    s#^/[^/]#//&#
19911
 
                    p
19912
 
                    q
19913
 
                  }'`'"'
 
21677
                      sed -n "$gl_absolute_header_sed"`'"'
19914
21678
 
19915
21679
 
19916
21680
fi
19933
21697
 
19934
21698
 
19935
21699
 
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 :
 
21700
 
 
21701
 
 
21702
 
 
21703
 
 
21704
 
 
21705
 
 
21706
 
 
21707
 
 
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 :
 
21713
  gl_have_mmap=yes
 
21714
else
 
21715
  gl_have_mmap=no
 
21716
fi
 
21717
 
 
21718
 
 
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.  */
 
21726
 
 
21727
#include <sys/mman.h>
 
21728
#ifdef MAP_ANONYMOUS
 
21729
    I cannot identify this map
 
21730
#endif
 
21731
 
 
21732
_ACEOF
 
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
 
21736
fi
 
21737
rm -f conftest*
 
21738
 
 
21739
    if test $gl_have_mmap_anonymous != yes; then
 
21740
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21741
/* end confdefs.h.  */
 
21742
 
 
21743
#include <sys/mman.h>
 
21744
#ifdef MAP_ANON
 
21745
    I cannot identify this map
 
21746
#endif
 
21747
 
 
21748
_ACEOF
 
21749
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
21750
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
21751
 
 
21752
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
21753
 
 
21754
         gl_have_mmap_anonymous=yes
 
21755
fi
 
21756
rm -f conftest*
 
21757
 
 
21758
    fi
 
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
 
21762
 
 
21763
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
21764
 
 
21765
    fi
 
21766
  fi
 
21767
 
 
21768
 
 
21769
 
 
21770
 
 
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
19942
21775
else
 
21776
  if test "$cross_compiling" = yes; then :
 
21777
 
 
21778
        case "$host_os" in
 
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";;
 
21783
        esac
 
21784
 
 
21785
else
19943
21786
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19944
21787
/* end confdefs.h.  */
 
21788
 
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>
 
21795
# ifndef MAP_FILE
 
21796
#  define MAP_FILE 0
 
21797
# endif
 
21798
#endif
19946
21799
 
19947
21800
int
19948
21801
main ()
19949
21802
{
19950
 
#undef $gl_func
19951
 
  (void) $gl_func;
 
21803
 
 
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;
 
21808
  const int fd = -1;
 
21809
# else /* !HAVE_MAP_ANONYMOUS */
 
21810
  const int flags = MAP_FILE | MAP_PRIVATE;
 
21811
  int fd = open ("/dev/zero", O_RDONLY, 0666);
 
21812
  if (fd >= 0)
 
21813
# endif
 
21814
    {
 
21815
      int pagesize = getpagesize ();
 
21816
      char *two_pages =
 
21817
        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
 
21818
                       flags, fd, 0);
 
21819
      if (two_pages != (char *)(-1)
 
21820
          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
 
21821
        fence = two_pages + pagesize;
 
21822
    }
 
21823
#endif
 
21824
  if (fence)
 
21825
    {
 
21826
      char dest[8];
 
21827
 
 
21828
      dest[0] = '*';
 
21829
      dest[1] = 'a';
 
21830
      dest[2] = '\0';
 
21831
      dest[3] = 'w';
 
21832
      dest[4] = 'x';
 
21833
      dest[5] = 'y';
 
21834
      dest[6] = 'z';
 
21835
 
 
21836
      *(fence - 3) = '7';
 
21837
      *(fence - 2) = '2';
 
21838
      *(fence - 1) = '9';
 
21839
 
 
21840
      if (strncat (dest + 1, fence - 3, 3) != dest + 1)
 
21841
        return 1;
 
21842
      if (dest[0] != '*')
 
21843
        return 2;
 
21844
      if (dest[1] != 'a'
 
21845
          || dest[2] != '7' || dest[3] != '2' || dest[4] != '9'
 
21846
          || dest[5] != '\0')
 
21847
        return 3;
 
21848
      if (dest[6] != 'z')
 
21849
        return 4;
 
21850
    }
 
21851
  return 0;
 
21852
 
19952
21853
  ;
19953
21854
  return 0;
19954
21855
}
19955
21856
_ACEOF
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
19958
21859
else
19959
 
  eval "$as_gl_Symbol=no"
19960
 
fi
19961
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19962
 
fi
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
19969
 
_ACEOF
19970
 
 
19971
 
                     eval ac_cv_have_decl_$gl_func=yes
19972
 
fi
19973
 
      done
19974
 
 
 
21860
  gl_cv_func_strncat_works=no
 
21861
fi
 
21862
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
21863
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
21864
fi
 
21865
 
 
21866
 
 
21867
fi
 
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
 
21871
    *yes) ;;
 
21872
    *) REPLACE_STRNCAT=1 ;;
 
21873
  esac
19975
21874
 
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 :
20089
21988
 
20090
21989
 
20091
21990
 
20092
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
20093
 
$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
20094
 
if ${ac_cv_header_stat_broken+:} false; then :
20095
 
  $as_echo_n "(cached) " >&6
20096
 
else
20097
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20098
 
/* end confdefs.h.  */
20099
 
#include <sys/types.h>
20100
 
#include <sys/stat.h>
20101
 
 
20102
 
#if defined S_ISBLK && defined S_IFDIR
20103
 
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
20104
 
#endif
20105
 
 
20106
 
#if defined S_ISBLK && defined S_IFCHR
20107
 
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
20108
 
#endif
20109
 
 
20110
 
#if defined S_ISLNK && defined S_IFREG
20111
 
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
20112
 
#endif
20113
 
 
20114
 
#if defined S_ISSOCK && defined S_IFREG
20115
 
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
20116
 
#endif
20117
 
 
20118
 
_ACEOF
20119
 
if ac_fn_c_try_compile "$LINENO"; then :
20120
 
  ac_cv_header_stat_broken=no
20121
 
else
20122
 
  ac_cv_header_stat_broken=yes
20123
 
fi
20124
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20125
 
fi
20126
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
20127
 
$as_echo "$ac_cv_header_stat_broken" >&6; }
20128
 
if test $ac_cv_header_stat_broken = yes; then
20129
 
 
20130
 
$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
20131
 
 
20132
 
fi
 
21991
 
 
21992
  GNULIB_GETRUSAGE=0;
 
21993
    HAVE_GETRUSAGE=1;
20133
21994
 
20134
21995
 
20135
21996
 
20282
22143
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20283
22144
                 *)    gl_absname_cpp="$ac_cpp" ;;
20284
22145
               esac
 
22146
 
 
22147
               case "$host_os" in
 
22148
                 mingw*)
 
22149
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
22150
                   ;;
 
22151
                 *)
 
22152
                   gl_dirsep_regex='\/'
 
22153
                   ;;
 
22154
               esac
 
22155
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
22156
 
 
22157
               gl_header_literal_regex=`echo 'time.h' \
 
22158
                                        | sed -e "$gl_make_literal_regex_sed"`
 
22159
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
22160
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
22161
                   s|^/[^/]|//&|
 
22162
                   p
 
22163
                   q
 
22164
                 }'
20285
22165
                                                            gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20286
 
                  sed -n '\#/time.h#{
20287
 
                    s#.*"\(.*/time.h\)".*#\1#
20288
 
                    s#^/[^/]#//&#
20289
 
                    p
20290
 
                    q
20291
 
                  }'`'"'
 
22166
                      sed -n "$gl_absolute_header_sed"`'"'
20292
22167
 
20293
22168
 
20294
22169
fi
20311
22186
 
20312
22187
 
20313
22188
 
20314
 
ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
20315
 
if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
20316
 
  ac_have_decl=1
20317
 
else
20318
 
  ac_have_decl=0
20319
 
fi
20320
 
 
20321
 
cat >>confdefs.h <<_ACEOF
20322
 
#define HAVE_DECL_LOCALTIME_R $ac_have_decl
20323
 
_ACEOF
20324
 
 
20325
22189
 
20326
22190
 
20327
22191
 
20355
22219
    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
20356
22220
  fi
20357
22221
 
 
22222
 
 
22223
 
20358
22224
ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
20359
22225
if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
20360
22226
  ac_have_decl=1
20809
22675
_ACEOF
20810
22676
 
20811
22677
 
 
22678
 
20812
22679
  case "$gl_cv_func_snprintf_retval_c99" in
20813
22680
    *yes)
20814
22681
 
20835
22702
                                 # Guess yes on FreeBSD >= 5.
20836
22703
           freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
20837
22704
           freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
20838
 
                                 # Guess yes on MacOS X >= 10.3.
 
22705
                                 # Guess yes on Mac OS X >= 10.3.
20839
22706
           darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
20840
22707
           darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
20841
22708
                                 # Guess yes on OpenBSD >= 3.9.
20977
22844
                                 # Guess yes on FreeBSD >= 6.
20978
22845
           freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
20979
22846
           freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
20980
 
                                 # Guess yes on MacOS X >= 10.3.
 
22847
                                 # Guess yes on Mac OS X >= 10.3.
20981
22848
           darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
20982
22849
           darwin*)              gl_cv_func_printf_infinite="guessing yes";;
20983
22850
                                 # Guess yes on HP-UX >= 11.
21029
22896
int main ()
21030
22897
{
21031
22898
  int result = 0;
21032
 
  if (sprintf (buf, "%f", 1.0 / 0.0) < 0
 
22899
  if (sprintf (buf, "%f", 1.0 / zero) < 0
21033
22900
      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
21034
22901
    result |= 1;
21035
 
  if (sprintf (buf, "%f", -1.0 / 0.0) < 0
 
22902
  if (sprintf (buf, "%f", -1.0 / zero) < 0
21036
22903
      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
21037
22904
    result |= 1;
21038
22905
  if (sprintf (buf, "%f", zero / zero) < 0
21039
22906
      || !strisnan (buf, 0, strlen (buf)))
21040
22907
    result |= 2;
21041
 
  if (sprintf (buf, "%e", 1.0 / 0.0) < 0
 
22908
  if (sprintf (buf, "%e", 1.0 / zero) < 0
21042
22909
      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
21043
22910
    result |= 4;
21044
 
  if (sprintf (buf, "%e", -1.0 / 0.0) < 0
 
22911
  if (sprintf (buf, "%e", -1.0 / zero) < 0
21045
22912
      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
21046
22913
    result |= 4;
21047
22914
  if (sprintf (buf, "%e", zero / zero) < 0
21048
22915
      || !strisnan (buf, 0, strlen (buf)))
21049
22916
    result |= 8;
21050
 
  if (sprintf (buf, "%g", 1.0 / 0.0) < 0
 
22917
  if (sprintf (buf, "%g", 1.0 / zero) < 0
21051
22918
      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
21052
22919
    result |= 16;
21053
 
  if (sprintf (buf, "%g", -1.0 / 0.0) < 0
 
22920
  if (sprintf (buf, "%g", -1.0 / zero) < 0
21054
22921
      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
21055
22922
    result |= 16;
21056
22923
  if (sprintf (buf, "%g", zero / zero) < 0
21082
22949
 
21083
22950
 
21084
22951
 
 
22952
 
21085
22953
         if test -n "$gl_printf_safe"; then
21086
22954
 
21087
22955
$as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
21123
22991
 
21124
22992
#include <stdlib.h>
21125
22993
#if defined __MACH__ && defined __APPLE__
21126
 
/* Avoid a crash on MacOS X.  */
 
22994
/* Avoid a crash on Mac OS X.  */
21127
22995
#include <mach/mach.h>
21128
22996
#include <mach/mach_error.h>
21129
22997
#include <mach/thread_status.h>
21184
23052
    }
21185
23053
  }
21186
23054
}
 
23055
#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
23056
/* Avoid a crash on native Windows.  */
 
23057
#define WIN32_LEAN_AND_MEAN
 
23058
#include <windows.h>
 
23059
#include <winerror.h>
 
23060
static LONG WINAPI
 
23061
exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
 
23062
{
 
23063
  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
 
23064
    {
 
23065
    case EXCEPTION_ACCESS_VIOLATION:
 
23066
    case EXCEPTION_IN_PAGE_ERROR:
 
23067
    case EXCEPTION_STACK_OVERFLOW:
 
23068
    case EXCEPTION_GUARD_PAGE:
 
23069
    case EXCEPTION_PRIV_INSTRUCTION:
 
23070
    case EXCEPTION_ILLEGAL_INSTRUCTION:
 
23071
    case EXCEPTION_DATATYPE_MISALIGNMENT:
 
23072
    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
 
23073
    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
 
23074
      exit (1);
 
23075
    }
 
23076
  return EXCEPTION_CONTINUE_SEARCH;
 
23077
}
 
23078
static void
 
23079
nocrash_init (void)
 
23080
{
 
23081
  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
 
23082
}
21187
23083
#else
21188
23084
/* Avoid a crash on POSIX systems.  */
21189
23085
#include <signal.h>
21232
23128
{
21233
23129
  int result = 0;
21234
23130
  nocrash_init();
21235
 
  if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
 
23131
  if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
21236
23132
      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
21237
23133
    result |= 1;
21238
 
  if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
 
23134
  if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
21239
23135
      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
21240
23136
    result |= 1;
21241
23137
  if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
21242
23138
      || !strisnan (buf, 0, strlen (buf)))
21243
23139
    result |= 1;
21244
 
  if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
 
23140
  if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
21245
23141
      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
21246
23142
    result |= 1;
21247
 
  if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
 
23143
  if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
21248
23144
      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
21249
23145
    result |= 1;
21250
23146
  if (sprintf (buf, "%Le", zeroL / zeroL) < 0
21251
23147
      || !strisnan (buf, 0, strlen (buf)))
21252
23148
    result |= 1;
21253
 
  if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
 
23149
  if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
21254
23150
      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
21255
23151
    result |= 1;
21256
 
  if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
 
23152
  if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
21257
23153
      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
21258
23154
    result |= 1;
21259
23155
  if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
21260
23156
      || !strisnan (buf, 0, strlen (buf)))
21261
23157
    result |= 1;
21262
 
#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
 
23158
#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
21263
23159
/* Representation of an 80-bit 'long double' as an initializer for a sequence
21264
23160
   of 'unsigned int' words.  */
21265
23161
# ifdef WORDS_BIGENDIAN
21431
23327
#include <stdio.h>
21432
23328
#include <string.h>
21433
23329
static char buf[100];
 
23330
static double zero = 0.0;
21434
23331
int main ()
21435
23332
{
21436
23333
  int result = 0;
21455
23352
    result |= 4;
21456
23353
  /* This catches a FreeBSD 6.1 bug.  See
21457
23354
     <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
21458
 
  if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
 
23355
  if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
21459
23356
      || buf[0] == '0')
21460
23357
    result |= 8;
21461
 
  /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
 
23358
  /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
21462
23359
  if (sprintf (buf, "%.1a", 1.999) < 0
21463
23360
      || (strcmp (buf, "0x1.0p+1") != 0
21464
23361
          && strcmp (buf, "0x2.0p+0") != 0
21465
23362
          && strcmp (buf, "0x4.0p-1") != 0
21466
23363
          && strcmp (buf, "0x8.0p-2") != 0))
21467
23364
    result |= 16;
21468
 
  /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
 
23365
  /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
21469
23366
     glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
21470
23367
  if (sprintf (buf, "%.1La", 1.999L) < 0
21471
23368
      || (strcmp (buf, "0x1.0p+1") != 0
21506
23403
                                 # Guess yes on FreeBSD >= 6.
21507
23404
           freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
21508
23405
           freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
21509
 
                                 # Guess yes on MacOS X >= 10.3.
 
23406
                                 # Guess yes on Mac OS X >= 10.3.
21510
23407
           darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
21511
23408
           darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
21512
23409
                                 # Guess yes on Solaris >= 2.10.
21523
23420
#include <stdio.h>
21524
23421
#include <string.h>
21525
23422
static char buf[100];
 
23423
static double zero = 0.0;
21526
23424
int main ()
21527
23425
{
21528
23426
  int result = 0;
21529
23427
  if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
21530
23428
      || strcmp (buf, "1234567.000000 33") != 0)
21531
23429
    result |= 1;
21532
 
  if (sprintf (buf, "%F", 1.0 / 0.0) < 0
 
23430
  if (sprintf (buf, "%F", 1.0 / zero) < 0
21533
23431
      || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
21534
23432
    result |= 2;
21535
23433
  /* This catches a Cygwin 1.5.x bug.  */
21564
23462
      if test "$cross_compiling" = yes; then :
21565
23463
 
21566
23464
         case "$host_os" in
21567
 
           *)     gl_cv_func_printf_directive_n="guessing yes";;
 
23465
           mingw*) gl_cv_func_printf_directive_n="guessing no";;
 
23466
           *)      gl_cv_func_printf_directive_n="guessing yes";;
21568
23467
         esac
21569
23468
 
21570
23469
else
21572
23471
/* end confdefs.h.  */
21573
23472
 
21574
23473
#include <stdio.h>
 
23474
#include <stdlib.h>
21575
23475
#include <string.h>
 
23476
#ifdef _MSC_VER
 
23477
/* See page about "Parameter Validation" on msdn.microsoft.com.  */
 
23478
static void cdecl
 
23479
invalid_parameter_handler (const wchar_t *expression,
 
23480
                           const wchar_t *function,
 
23481
                           const wchar_t *file, unsigned int line,
 
23482
                           uintptr_t dummy)
 
23483
{
 
23484
  exit (1);
 
23485
}
 
23486
#endif
21576
23487
static char fmtstring[10];
21577
23488
static char buf[100];
21578
23489
int main ()
21579
23490
{
21580
23491
  int count = -1;
 
23492
#ifdef _MSC_VER
 
23493
  _set_invalid_parameter_handler (invalid_parameter_handler);
 
23494
#endif
21581
23495
  /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
21582
23496
     support %n in format strings in read-only memory but not in writable
21583
23497
     memory.  */
21811
23725
#include <stdio.h>
21812
23726
#include <string.h>
21813
23727
static char buf[100];
 
23728
static double zero = 0.0;
21814
23729
int main ()
21815
23730
{
21816
 
  if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
 
23731
  if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
21817
23732
      || (strcmp (buf, "       inf") != 0
21818
23733
          && strcmp (buf, "  infinity") != 0))
21819
23734
    return 1;
21845
23760
      if test "$cross_compiling" = yes; then :
21846
23761
 
21847
23762
         case "$host_os" in
21848
 
           # Guess no only on Solaris, native Win32, and BeOS systems.
 
23763
           # Guess no only on Solaris, native Windows, and BeOS systems.
21849
23764
           solaris*)     gl_cv_func_printf_precision="guessing no" ;;
21850
23765
           mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
21851
23766
           beos*)        gl_cv_func_printf_precision="guessing no" ;;
21911
23826
 
21912
23827
#include <stdlib.h>
21913
23828
#if defined __MACH__ && defined __APPLE__
21914
 
/* Avoid a crash on MacOS X.  */
 
23829
/* Avoid a crash on Mac OS X.  */
21915
23830
#include <mach/mach.h>
21916
23831
#include <mach/mach_error.h>
21917
23832
#include <mach/thread_status.h>
21972
23887
    }
21973
23888
  }
21974
23889
}
 
23890
#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
23891
/* Avoid a crash on native Windows.  */
 
23892
#define WIN32_LEAN_AND_MEAN
 
23893
#include <windows.h>
 
23894
#include <winerror.h>
 
23895
static LONG WINAPI
 
23896
exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
 
23897
{
 
23898
  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
 
23899
    {
 
23900
    case EXCEPTION_ACCESS_VIOLATION:
 
23901
    case EXCEPTION_IN_PAGE_ERROR:
 
23902
    case EXCEPTION_STACK_OVERFLOW:
 
23903
    case EXCEPTION_GUARD_PAGE:
 
23904
    case EXCEPTION_PRIV_INSTRUCTION:
 
23905
    case EXCEPTION_ILLEGAL_INSTRUCTION:
 
23906
    case EXCEPTION_DATATYPE_MISALIGNMENT:
 
23907
    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
 
23908
    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
 
23909
      exit (1);
 
23910
    }
 
23911
  return EXCEPTION_CONTINUE_SEARCH;
 
23912
}
 
23913
static void
 
23914
nocrash_init (void)
 
23915
{
 
23916
  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
 
23917
}
21975
23918
#else
21976
23919
/* Avoid a crash on POSIX systems.  */
21977
23920
#include <signal.h>
22044
23987
  ac_status=$?
22045
23988
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22046
23989
  test $ac_status = 0; } && test -s conftest$ac_exeext; then
22047
 
            (./conftest
 
23990
            (./conftest 2>&5
22048
23991
             result=$?
 
23992
             $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
22049
23993
             if test $result != 0 && test $result != 77; then result=1; fi
22050
23994
             exit $result
22051
23995
            ) >/dev/null 2>/dev/null
22149
24093
 
22150
24094
  if test $ac_cv_func_wcwidth = yes; then
22151
24095
    HAVE_WCWIDTH=1
22152
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
 
24096
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
22153
24097
$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
22154
24098
if ${gl_cv_func_wcwidth_works+:} false; then :
22155
24099
  $as_echo_n "(cached) " >&6
22192
24136
    {
22193
24137
      if (wcwidth (0x0301) > 0)
22194
24138
        result |= 1;
 
24139
      if (wcwidth (0x05B0) > 0)
 
24140
        result |= 2;
22195
24141
      if (wcwidth (0x200B) > 0)
22196
 
        result |= 2;
 
24142
        result |= 4;
22197
24143
    }
22198
24144
  return result;
22199
24145
}
22304
24250
  $as_echo_n "(cached) " >&6
22305
24251
else
22306
24252
  if test "$cross_compiling" = yes; then :
22307
 
  gl_cv_func_ungetc_works='guessing no'
 
24253
  case "$host_os" in
 
24254
                   # Guess yes on glibc systems.
 
24255
           *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
 
24256
                   # If we don't know, assume the worst.
 
24257
           *)      gl_cv_func_ungetc_works="guessing no" ;;
 
24258
         esac
 
24259
 
22308
24260
else
22309
24261
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22310
24262
/* end confdefs.h.  */
22345
24297
fi
22346
24298
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
22347
24299
$as_echo "$gl_cv_func_ungetc_works" >&6; }
22348
 
  if test "$gl_cv_func_ungetc_works" != yes; then
 
24300
  case "$gl_cv_func_ungetc_works" in
 
24301
    *yes) ;;
 
24302
    *)
22349
24303
 
22350
24304
$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
22351
24305
 
22352
 
  fi
 
24306
      ;;
 
24307
  esac
22353
24308
 
22354
24309
 
22355
24310
 
22543
24498
 
22544
24499
  LIB_ACL=
22545
24500
  use_acl=0
22546
 
 
22547
24501
  if test "x$enable_acl" != "xno"; then
22548
24502
        for ac_header in sys/acl.h
22549
24503
do :
22619
24573
           fi
22620
24574
           for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
22621
24575
              acl_free acl_from_mode acl_from_text \
22622
 
              acl_delete_def_file acl_extended_file acl_extended_file_nofollow \
 
24576
              acl_delete_def_file acl_extended_file \
22623
24577
              acl_delete_fd_np acl_delete_file_np \
22624
24578
              acl_copy_ext_native acl_create_entry_np \
22625
24579
              acl_to_short_text acl_free_text
23077
25031
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23078
25032
                 *)    gl_absname_cpp="$ac_cpp" ;;
23079
25033
               esac
 
25034
 
 
25035
               case "$host_os" in
 
25036
                 mingw*)
 
25037
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
25038
                   ;;
 
25039
                 *)
 
25040
                   gl_dirsep_regex='\/'
 
25041
                   ;;
 
25042
               esac
 
25043
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
25044
 
 
25045
               gl_header_literal_regex=`echo 'arpa/inet.h' \
 
25046
                                        | sed -e "$gl_make_literal_regex_sed"`
 
25047
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
25048
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
25049
                   s|^/[^/]|//&|
 
25050
                   p
 
25051
                   q
 
25052
                 }'
23080
25053
                                                            gl_cv_next_arpa_inet_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23081
 
                  sed -n '\#/arpa/inet.h#{
23082
 
                    s#.*"\(.*/arpa/inet.h\)".*#\1#
23083
 
                    s#^/[^/]#//&#
23084
 
                    p
23085
 
                    q
23086
 
                  }'`'"'
 
25054
                      sed -n "$gl_absolute_header_sed"`'"'
23087
25055
          else
23088
25056
               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23089
25057
             fi
23111
25079
 
23112
25080
 
23113
25081
 
23114
 
    for gl_func in inet_ntop inet_pton; do
23115
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23116
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23117
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23118
 
if eval \${$as_gl_Symbol+:} false; then :
23119
 
  $as_echo_n "(cached) " >&6
23120
 
else
23121
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23122
 
/* end confdefs.h.  */
23123
 
 
23124
 
/* On some systems, this header is not self-consistent.  */
23125
 
#if !(defined __GLIBC__ || defined __UCLIBC__)
23126
 
# include <sys/socket.h>
23127
 
#endif
23128
 
#ifdef __TANDEM
23129
 
# include <netdb.h>
23130
 
#endif
23131
 
#include <arpa/inet.h>
23132
 
 
23133
 
int
23134
 
main ()
23135
 
{
23136
 
#undef $gl_func
23137
 
  (void) $gl_func;
23138
 
  ;
23139
 
  return 0;
23140
 
}
23141
 
_ACEOF
23142
 
if ac_fn_c_try_compile "$LINENO"; then :
23143
 
  eval "$as_gl_Symbol=yes"
23144
 
else
23145
 
  eval "$as_gl_Symbol=no"
23146
 
fi
23147
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23148
 
fi
23149
 
eval ac_res=\$$as_gl_Symbol
23150
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23151
 
$as_echo "$ac_res" >&6; }
23152
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23153
 
  cat >>confdefs.h <<_ACEOF
23154
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23155
 
_ACEOF
23156
 
 
23157
 
                     eval ac_cv_have_decl_$gl_func=yes
23158
 
fi
23159
 
      done
23160
 
 
23161
25082
 
23162
25083
 
23163
25084
 
23189
25110
 
23190
25111
 
23191
25112
 
 
25113
  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
 
25114
 
 
25115
 
 
25116
 
 
25117
 
 
25118
 
 
25119
 
 
25120
 
 
25121
 
 
25122
 
23192
25123
 
23193
25124
 
23194
25125
 
23319
25250
    esac
23320
25251
  fi
23321
25252
 
23322
 
if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
 
25253
  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
23323
25254
 
23324
25255
 
23325
25256
 
23333
25264
 
23334
25265
  :
23335
25266
 
23336
 
fi
 
25267
  fi
23337
25268
 
23338
25269
 
23339
25270
 
23387
25318
 
23388
25319
 
23389
25320
 
23390
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
 
25321
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
23391
25322
$as_echo_n "checking for GNU libc compatible calloc... " >&6; }
23392
25323
if ${ac_cv_func_calloc_0_nonnull+:} false; then :
23393
25324
  $as_echo_n "(cached) " >&6
23394
25325
else
23395
25326
  if test "$cross_compiling" = yes; then :
23396
 
  ac_cv_func_calloc_0_nonnull=no
 
25327
  case "$host_os" in
 
25328
                  # Guess yes on glibc systems.
 
25329
          *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
 
25330
                  # If we don't know, assume the worst.
 
25331
          *)      ac_cv_func_calloc_0_nonnull="guessing no" ;;
 
25332
        esac
 
25333
 
23397
25334
else
23398
25335
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23399
25336
/* end confdefs.h.  */
23424
25361
fi
23425
25362
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
23426
25363
$as_echo "$ac_cv_func_calloc_0_nonnull" >&6; }
23427
 
  if test $ac_cv_func_calloc_0_nonnull = yes; then :
 
25364
  case "$ac_cv_func_calloc_0_nonnull" in
 
25365
    *yes)
23428
25366
 
23429
25367
$as_echo "#define HAVE_CALLOC_GNU 1" >>confdefs.h
23430
25368
 
23431
 
else
23432
 
  $as_echo "#define HAVE_CALLOC_GNU 0" >>confdefs.h
 
25369
      ;;
 
25370
    *)
 
25371
      $as_echo "#define HAVE_CALLOC_GNU 0" >>confdefs.h
23433
25372
 
23434
25373
     REPLACE_CALLOC=1
23435
25374
 
23436
 
fi
23437
 
 
23438
 
 
23439
 
if test $REPLACE_CALLOC = 1; then
 
25375
      ;;
 
25376
  esac
 
25377
 
 
25378
 
 
25379
  if test $REPLACE_CALLOC = 1; then
23440
25380
 
23441
25381
 
23442
25382
 
23447
25387
 
23448
25388
  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
23449
25389
 
23450
 
fi
 
25390
  fi
23451
25391
 
23452
25392
 
23453
25393
cat >>confdefs.h <<_ACEOF
23466
25406
    REPLACE_CALLOC=1
23467
25407
  fi
23468
25408
 
23469
 
if test $REPLACE_CALLOC = 1; then
 
25409
  if test $REPLACE_CALLOC = 1; then
23470
25410
 
23471
25411
 
23472
25412
 
23477
25417
 
23478
25418
  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
23479
25419
 
23480
 
fi
 
25420
  fi
23481
25421
 
23482
25422
 
23483
25423
 
23503
25443
 
23504
25444
  if test $ac_cv_func_canonicalize_file_name = no; then
23505
25445
    HAVE_CANONICALIZE_FILE_NAME=0
23506
 
  elif test "$gl_cv_func_realpath_works" != yes; then
23507
 
    REPLACE_CANONICALIZE_FILE_NAME=1
 
25446
  else
 
25447
    case "$gl_cv_func_realpath_works" in
 
25448
      *yes) ;;
 
25449
      *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
 
25450
    esac
23508
25451
  fi
23509
25452
 
23510
25453
 
23536
25479
 
23537
25480
 
23538
25481
 
 
25482
 
 
25483
 
 
25484
 
 
25485
 
 
25486
          GNULIB_CHDIR=1
 
25487
 
 
25488
 
 
25489
 
 
25490
 
 
25491
 
 
25492
$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
 
25493
 
 
25494
 
 
25495
 
 
25496
 
 
25497
 
23539
25498
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
23540
25499
$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
23541
25500
if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
23543
25502
else
23544
25503
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23545
25504
/* end confdefs.h.  */
23546
 
#include <unistd.h>
 
25505
 
 
25506
/* Arrange to define PATH_MAX, like "pathmax.h" does. */
 
25507
#if HAVE_UNISTD_H
 
25508
# include <unistd.h>
 
25509
#endif
23547
25510
#include <limits.h>
23548
 
#if defined PATH_MAX || defined MAXPATHLEN
 
25511
#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
 
25512
# include <sys/param.h>
 
25513
#endif
 
25514
#if !defined PATH_MAX && defined MAXPATHLEN
 
25515
# define PATH_MAX MAXPATHLEN
 
25516
#endif
 
25517
#ifdef __hpux
 
25518
# undef PATH_MAX
 
25519
# define PATH_MAX 1024
 
25520
#endif
 
25521
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
25522
# undef PATH_MAX
 
25523
# define PATH_MAX 260
 
25524
#endif
 
25525
 
 
25526
#ifdef PATH_MAX
23549
25527
have_arbitrary_file_name_length_limit
23550
25528
#endif
23551
25529
_ACEOF
23561
25539
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
23562
25540
$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
23563
25541
 
23564
 
if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
 
25542
  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
23565
25543
 
23566
25544
 
23567
25545
 
23576
25554
 
23577
25555
  :
23578
25556
 
23579
 
fi
 
25557
  fi
23580
25558
 
23581
 
if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
 
25559
  if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
23582
25560
 
23583
25561
 
23584
25562
 
23589
25567
 
23590
25568
  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
23591
25569
 
23592
 
fi
23593
 
if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
 
25570
  fi
 
25571
  if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
23594
25572
 
23595
25573
 
23596
25574
 
23601
25579
 
23602
25580
  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
23603
25581
 
23604
 
fi
 
25582
  fi
23605
25583
 
23606
25584
 
23607
25585
 
23708
25686
 
23709
25687
 
23710
25688
 
 
25689
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
25690
    REPLACE_CLOSE=1
 
25691
  fi
 
25692
 
23711
25693
 
23712
25694
 
23713
25695
 
23754
25736
    fi
23755
25737
 
23756
25738
 
23757
 
if test $REPLACE_CLOSE = 1; then
 
25739
  if test $REPLACE_CLOSE = 1; then
23758
25740
 
23759
25741
 
23760
25742
 
23765
25747
 
23766
25748
  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
23767
25749
 
23768
 
fi
 
25750
  fi
23769
25751
 
23770
25752
 
23771
25753
 
23792
25774
 
23793
25775
 
23794
25776
 
 
25777
 
 
25778
 
 
25779
  for ac_func in closedir
 
25780
do :
 
25781
  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
 
25782
if test "x$ac_cv_func_closedir" = xyes; then :
 
25783
  cat >>confdefs.h <<_ACEOF
 
25784
#define HAVE_CLOSEDIR 1
 
25785
_ACEOF
 
25786
 
 
25787
fi
 
25788
done
 
25789
 
 
25790
  if test $ac_cv_func_closedir = no; then
 
25791
    HAVE_CLOSEDIR=0
 
25792
  fi
 
25793
 
 
25794
 
 
25795
 
 
25796
 
 
25797
  if test $ac_cv_func_fchdir = no; then
 
25798
    HAVE_FCHDIR=0
 
25799
  fi
 
25800
 
 
25801
    if test $HAVE_FCHDIR = 0; then
 
25802
      if test $HAVE_CLOSEDIR = 1; then
 
25803
        REPLACE_CLOSEDIR=1
 
25804
      fi
 
25805
    fi
 
25806
 
 
25807
 
 
25808
  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
 
25809
 
 
25810
 
 
25811
 
 
25812
 
 
25813
 
 
25814
 
 
25815
 
 
25816
 
 
25817
  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
 
25818
 
 
25819
  fi
 
25820
 
 
25821
 
 
25822
 
 
25823
 
 
25824
 
 
25825
          GNULIB_CLOSEDIR=1
 
25826
 
 
25827
 
 
25828
 
 
25829
 
 
25830
 
 
25831
$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
 
25832
 
 
25833
 
 
25834
 
 
25835
 
23795
25836
  :
23796
25837
 
23797
25838
 
23882
25923
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23883
25924
                 *)    gl_absname_cpp="$ac_cpp" ;;
23884
25925
               esac
 
25926
 
 
25927
               case "$host_os" in
 
25928
                 mingw*)
 
25929
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
25930
                   ;;
 
25931
                 *)
 
25932
                   gl_dirsep_regex='\/'
 
25933
                   ;;
 
25934
               esac
 
25935
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
25936
 
 
25937
               gl_header_literal_regex=`echo 'ctype.h' \
 
25938
                                        | sed -e "$gl_make_literal_regex_sed"`
 
25939
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
25940
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
25941
                   s|^/[^/]|//&|
 
25942
                   p
 
25943
                   q
 
25944
                 }'
23885
25945
                                                            gl_cv_next_ctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23886
 
                  sed -n '\#/ctype.h#{
23887
 
                    s#.*"\(.*/ctype.h\)".*#\1#
23888
 
                    s#^/[^/]#//&#
23889
 
                    p
23890
 
                    q
23891
 
                  }'`'"'
 
25946
                      sed -n "$gl_absolute_header_sed"`'"'
23892
25947
 
23893
25948
 
23894
25949
fi
23911
25966
 
23912
25967
 
23913
25968
 
23914
 
    for gl_func in isblank; do
23915
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23916
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23917
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23918
 
if eval \${$as_gl_Symbol+:} false; then :
23919
 
  $as_echo_n "(cached) " >&6
23920
 
else
23921
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23922
 
/* end confdefs.h.  */
23923
 
#include <ctype.h>
23924
 
 
23925
 
int
23926
 
main ()
23927
 
{
23928
 
#undef $gl_func
23929
 
  (void) $gl_func;
23930
 
  ;
23931
 
  return 0;
23932
 
}
23933
 
_ACEOF
23934
 
if ac_fn_c_try_compile "$LINENO"; then :
23935
 
  eval "$as_gl_Symbol=yes"
23936
 
else
23937
 
  eval "$as_gl_Symbol=no"
23938
 
fi
23939
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23940
 
fi
23941
 
eval ac_res=\$$as_gl_Symbol
23942
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23943
 
$as_echo "$ac_res" >&6; }
23944
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23945
 
  cat >>confdefs.h <<_ACEOF
23946
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23947
 
_ACEOF
23948
 
 
23949
 
                     eval ac_cv_have_decl_$gl_func=yes
23950
 
fi
23951
 
      done
23952
 
 
23953
 
 
23954
 
 
23955
 
 
23956
 
 
23957
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
 
25969
 
 
25970
 
 
25971
 
 
25972
 
 
25973
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
23958
25974
$as_echo_n "checking for d_ino member in directory struct... " >&6; }
23959
25975
if ${gl_cv_struct_dirent_d_ino+:} false; then :
23960
25976
  $as_echo_n "(cached) " >&6
23961
25977
else
23962
25978
  if test "$cross_compiling" = yes; then :
23963
 
  gl_cv_struct_dirent_d_ino=no
 
25979
  case "$host_os" in
 
25980
                           # Guess yes on glibc systems with Linux kernel.
 
25981
              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
 
25982
                           # If we don't know, assume the worst.
 
25983
              *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
 
25984
            esac
 
25985
 
23964
25986
else
23965
25987
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23966
25988
/* end confdefs.h.  */
24001
26023
fi
24002
26024
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
24003
26025
$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
24004
 
   if test $gl_cv_struct_dirent_d_ino = yes; then
 
26026
   case "$gl_cv_struct_dirent_d_ino" in
 
26027
     *yes)
24005
26028
 
24006
26029
$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
24007
26030
 
24008
 
   fi
24009
 
 
24010
 
 
24011
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
 
26031
       ;;
 
26032
   esac
 
26033
 
 
26034
 
 
26035
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
24012
26036
$as_echo_n "checking for d_type member in directory struct... " >&6; }
24013
26037
if ${gl_cv_struct_dirent_d_type+:} false; then :
24014
26038
  $as_echo_n "(cached) " >&6
24079
26103
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24080
26104
                 *)    gl_absname_cpp="$ac_cpp" ;;
24081
26105
               esac
 
26106
 
 
26107
               case "$host_os" in
 
26108
                 mingw*)
 
26109
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
26110
                   ;;
 
26111
                 *)
 
26112
                   gl_dirsep_regex='\/'
 
26113
                   ;;
 
26114
               esac
 
26115
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
26116
 
 
26117
               gl_header_literal_regex=`echo 'dirent.h' \
 
26118
                                        | sed -e "$gl_make_literal_regex_sed"`
 
26119
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
26120
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
26121
                   s|^/[^/]|//&|
 
26122
                   p
 
26123
                   q
 
26124
                 }'
24082
26125
                                                            gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24083
 
                  sed -n '\#/dirent.h#{
24084
 
                    s#.*"\(.*/dirent.h\)".*#\1#
24085
 
                    s#^/[^/]#//&#
24086
 
                    p
24087
 
                    q
24088
 
                  }'`'"'
 
26126
                      sed -n "$gl_absolute_header_sed"`'"'
24089
26127
          else
24090
26128
               gl_cv_next_dirent_h='<'dirent.h'>'
24091
26129
             fi
24109
26147
 
24110
26148
 
24111
26149
 
24112
 
 
24113
 
 
24114
 
    for gl_func in alphasort dirfd fdopendir scandir; do
24115
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24116
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24117
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24118
 
if eval \${$as_gl_Symbol+:} false; then :
24119
 
  $as_echo_n "(cached) " >&6
24120
 
else
24121
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24122
 
/* end confdefs.h.  */
24123
 
#include <dirent.h>
24124
 
 
24125
 
int
24126
 
main ()
24127
 
{
24128
 
#undef $gl_func
24129
 
  (void) $gl_func;
24130
 
  ;
24131
 
  return 0;
24132
 
}
24133
 
_ACEOF
24134
 
if ac_fn_c_try_compile "$LINENO"; then :
24135
 
  eval "$as_gl_Symbol=yes"
24136
 
else
24137
 
  eval "$as_gl_Symbol=no"
24138
 
fi
24139
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24140
 
fi
24141
 
eval ac_res=\$$as_gl_Symbol
24142
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24143
 
$as_echo "$ac_res" >&6; }
24144
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24145
 
  cat >>confdefs.h <<_ACEOF
24146
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24147
 
_ACEOF
24148
 
 
24149
 
                     eval ac_cv_have_decl_$gl_func=yes
24150
 
fi
24151
 
      done
 
26150
  if test $ac_cv_header_dirent_h = yes; then
 
26151
    HAVE_DIRENT_H=1
 
26152
  else
 
26153
    HAVE_DIRENT_H=0
 
26154
  fi
 
26155
 
 
26156
 
24152
26157
 
24153
26158
 
24154
26159
 
24178
26183
done
24179
26184
 
24180
26185
  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
24181
 
     #include <dirent.h>
 
26186
      #include <dirent.h>
24182
26187
"
24183
26188
if test "x$ac_cv_have_decl_dirfd" = xyes; then :
24184
26189
  ac_have_decl=1
24228
26233
    fi
24229
26234
  fi
24230
26235
 
24231
 
if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
 
26236
  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
24232
26237
 
24233
26238
 
24234
26239
 
24288
26293
  fi
24289
26294
 
24290
26295
 
24291
 
fi
 
26296
  fi
24292
26297
 
24293
26298
 
24294
26299
 
24361
26366
 
24362
26367
 
24363
26368
 
 
26369
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
26370
    REPLACE_DUP=1
 
26371
  fi
 
26372
 
 
26373
 
 
26374
 
 
26375
 
 
26376
  if test $ac_cv_func_fchdir = no; then
 
26377
    HAVE_FCHDIR=0
 
26378
  fi
 
26379
 
 
26380
    if test $HAVE_FCHDIR = 0; then
 
26381
      REPLACE_DUP=1
 
26382
    fi
 
26383
 
 
26384
 
 
26385
  if test $REPLACE_DUP = 1; then
 
26386
 
 
26387
 
 
26388
 
 
26389
 
 
26390
 
 
26391
 
 
26392
 
 
26393
 
 
26394
  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
 
26395
 
 
26396
 
 
26397
 
 
26398
 
 
26399
  fi
 
26400
 
 
26401
 
 
26402
 
 
26403
 
 
26404
 
 
26405
          GNULIB_DUP=1
 
26406
 
 
26407
 
 
26408
 
 
26409
 
 
26410
 
 
26411
$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
 
26412
 
 
26413
 
 
26414
 
 
26415
 
 
26416
 
 
26417
 
24364
26418
 
24365
26419
 
24366
26420
$as_echo "#define HAVE_DUP2 1" >>confdefs.h
24375
26429
  if test "$cross_compiling" = yes; then :
24376
26430
  case "$host_os" in
24377
26431
           mingw*) # on this platform, dup2 always returns 0 for success
24378
 
             gl_cv_func_dup2_works=no;;
 
26432
             gl_cv_func_dup2_works="guessing no" ;;
24379
26433
           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
24380
 
             gl_cv_func_dup2_works=no;;
 
26434
             gl_cv_func_dup2_works="guessing no" ;;
24381
26435
           linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
24382
26436
                   # closed fd may yield -EBADF instead of -1 / errno=EBADF.
24383
 
             gl_cv_func_dup2_works=no;;
 
26437
             gl_cv_func_dup2_works="guessing no" ;;
24384
26438
           freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
24385
 
             gl_cv_func_dup2_works=no;;
 
26439
             gl_cv_func_dup2_works="guessing no" ;;
24386
26440
           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
24387
 
             gl_cv_func_dup2_works=no;;
24388
 
           *) gl_cv_func_dup2_works=yes;;
 
26441
             gl_cv_func_dup2_works="guessing no" ;;
 
26442
           *) gl_cv_func_dup2_works="guessing yes" ;;
24389
26443
         esac
24390
26444
else
24391
26445
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24434
26488
fi
24435
26489
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
24436
26490
$as_echo "$gl_cv_func_dup2_works" >&6; }
24437
 
    if test "$gl_cv_func_dup2_works" = no; then
24438
 
      REPLACE_DUP2=1
24439
 
    fi
 
26491
    case "$gl_cv_func_dup2_works" in
 
26492
      *yes) ;;
 
26493
      *)
 
26494
        REPLACE_DUP2=1
 
26495
        ;;
 
26496
    esac
24440
26497
  fi
24441
26498
 
24442
26499
 
24447
26504
  fi
24448
26505
 
24449
26506
    if test $HAVE_FCHDIR = 0; then
24450
 
      REPLACE_DUP2=1
 
26507
      if test $HAVE_DUP2 = 1; then
 
26508
        REPLACE_DUP2=1
 
26509
      fi
24451
26510
    fi
24452
26511
 
24453
26512
 
24454
 
if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
 
26513
  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
24455
26514
 
24456
26515
 
24457
26516
 
24462
26521
 
24463
26522
  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
24464
26523
 
24465
 
fi
 
26524
 
 
26525
  fi
24466
26526
 
24467
26527
 
24468
26528
 
24523
26583
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
24524
26584
$as_echo "$ac_cv_lib_error_at_line" >&6; }
24525
26585
 
24526
 
if test $ac_cv_lib_error_at_line = no; then
 
26586
  if test $ac_cv_lib_error_at_line = no; then
24527
26587
 
24528
26588
 
24529
26589
 
24539
26599
 
24540
26600
  :
24541
26601
 
24542
 
fi
 
26602
  fi
24543
26603
 
24544
26604
 
24545
26605
  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
24568
26628
    HAVE_EUIDACCESS=0
24569
26629
  fi
24570
26630
 
24571
 
if test $HAVE_EUIDACCESS = 0; then
 
26631
  if test $HAVE_EUIDACCESS = 0; then
24572
26632
 
24573
26633
 
24574
26634
 
24581
26641
 
24582
26642
 
24583
26643
 
24584
 
 
24585
 
 
24586
 
 
24587
 
 
24588
 
  # Solaris 9 needs -lgen to get the eaccess function.
 
26644
    for ac_header in libgen.h
 
26645
do :
 
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
 
26650
_ACEOF
 
26651
 
 
26652
fi
 
26653
 
 
26654
done
 
26655
 
 
26656
 
 
26657
        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
 
26658
if test "x$ac_cv_func_getgroups" = xyes; then :
 
26659
 
 
26660
fi
 
26661
 
 
26662
 
 
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.
 
26665
  ac_save_LIBS=$LIBS
 
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
 
26671
else
 
26672
  ac_check_lib_save_LIBS=$LIBS
 
26673
LIBS="-lbsd  $LIBS"
 
26674
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
26675
/* end confdefs.h.  */
 
26676
 
 
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.  */
 
26680
#ifdef __cplusplus
 
26681
extern "C"
 
26682
#endif
 
26683
char getgroups ();
 
26684
int
 
26685
main ()
 
26686
{
 
26687
return getgroups ();
 
26688
  ;
 
26689
  return 0;
 
26690
}
 
26691
_ACEOF
 
26692
if ac_fn_c_try_link "$LINENO"; then :
 
26693
  ac_cv_lib_bsd_getgroups=yes
 
26694
else
 
26695
  ac_cv_lib_bsd_getgroups=no
 
26696
fi
 
26697
rm -f core conftest.err conftest.$ac_objext \
 
26698
    conftest$ac_exeext conftest.$ac_ext
 
26699
LIBS=$ac_check_lib_save_LIBS
 
26700
fi
 
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
 
26705
fi
 
26706
 
 
26707
  fi
 
26708
 
 
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
 
26716
else
 
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" ;;
 
26723
          esac
 
26724
 
 
26725
else
 
26726
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
26727
/* end confdefs.h.  */
 
26728
$ac_includes_default
 
26729
int
 
26730
main ()
 
26731
{
 
26732
/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
 
26733
              return getgroups (0, 0) == -1;
 
26734
  ;
 
26735
  return 0;
 
26736
}
 
26737
 
 
26738
_ACEOF
 
26739
if ac_fn_c_try_run "$LINENO"; then :
 
26740
  ac_cv_func_getgroups_works=yes
 
26741
else
 
26742
  ac_cv_func_getgroups_works=no
 
26743
fi
 
26744
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
26745
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
26746
fi
 
26747
 
 
26748
 
 
26749
fi
 
26750
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
 
26751
$as_echo "$ac_cv_func_getgroups_works" >&6; }
 
26752
  else
 
26753
    ac_cv_func_getgroups_works=no
 
26754
  fi
 
26755
  case "$ac_cv_func_getgroups_works" in
 
26756
    *yes)
 
26757
 
 
26758
$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
 
26759
 
 
26760
      ;;
 
26761
  esac
 
26762
  LIBS=$ac_save_LIBS
 
26763
 
 
26764
 
 
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.
24662
26839
 
24663
26840
  LIBS=$gl_saved_libs
24664
26841
 
24665
 
fi
 
26842
  fi
24666
26843
 
24667
26844
 
24668
26845
 
24687
26864
 
24688
26865
  if test $ac_cv_func_faccessat = no; then
24689
26866
    HAVE_FACCESSAT=0
 
26867
  fi
 
26868
 
 
26869
  if test $HAVE_FACCESSAT = 0; then
24690
26870
 
24691
26871
 
24692
26872
 
24697
26877
 
24698
26878
  gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
24699
26879
 
 
26880
 
 
26881
  for ac_func in access
 
26882
do :
 
26883
  ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
 
26884
if test "x$ac_cv_func_access" = xyes; then :
 
26885
  cat >>confdefs.h <<_ACEOF
 
26886
#define HAVE_ACCESS 1
 
26887
_ACEOF
 
26888
 
 
26889
fi
 
26890
done
 
26891
 
 
26892
 
24700
26893
  fi
24701
26894
 
24702
26895
 
24703
 
 
24704
26896
cat >>confdefs.h <<_ACEOF
24705
26897
#define GNULIB_FACCESSAT 1
24706
26898
_ACEOF
24728
26920
 
24729
26921
 
24730
26922
 
 
26923
 
 
26924
 
 
26925
 
 
26926
 
 
26927
 
 
26928
 
 
26929
 
24731
26930
  if test $ac_cv_have_decl_fchdir = no; then
24732
26931
    HAVE_DECL_FCHDIR=0
24733
26932
  fi
24748
26947
 
24749
26948
$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
24750
26949
 
24751
 
                REPLACE_OPENDIR=1
24752
 
    REPLACE_CLOSEDIR=1
24753
 
    REPLACE_DUP=1
24754
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
 
26950
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
24755
26951
$as_echo_n "checking whether open can visit directories... " >&6; }
24756
26952
if ${gl_cv_func_open_directory_works+:} false; then :
24757
26953
  $as_echo_n "(cached) " >&6
24758
26954
else
24759
26955
  if test "$cross_compiling" = yes; then :
24760
 
  gl_cv_func_open_directory_works="guessing no"
 
26956
  case "$host_os" in
 
26957
                   # Guess yes on glibc systems.
 
26958
           *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
 
26959
                   # If we don't know, assume the worst.
 
26960
           *)      gl_cv_func_open_directory_works="guessing no" ;;
 
26961
         esac
 
26962
 
24761
26963
else
24762
26964
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24763
26965
/* end confdefs.h.  */
24783
26985
fi
24784
26986
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
24785
26987
$as_echo "$gl_cv_func_open_directory_works" >&6; }
24786
 
    if test "$gl_cv_func_open_directory_works" != yes; then
 
26988
    case "$gl_cv_func_open_directory_works" in
 
26989
      *yes) ;;
 
26990
      *)
24787
26991
 
24788
26992
$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
24789
26993
 
24790
 
      REPLACE_FSTAT=1
24791
 
    fi
 
26994
        ;;
 
26995
    esac
24792
26996
  fi
24793
26997
 
24794
26998
 
24810
27014
 
24811
27015
 
24812
27016
 
 
27017
  if test $ac_cv_func_fchmodat != yes; then
 
27018
    HAVE_FCHMODAT=0
 
27019
  fi
 
27020
 
 
27021
  if test $HAVE_FCHMODAT = 0; then
 
27022
 
 
27023
 
 
27024
 
 
27025
 
 
27026
 
 
27027
 
 
27028
 
 
27029
 
 
27030
  gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
 
27031
 
 
27032
  fi
 
27033
 
 
27034
 
 
27035
cat >>confdefs.h <<_ACEOF
 
27036
#define GNULIB_FCHMODAT 1
 
27037
_ACEOF
 
27038
 
 
27039
 
 
27040
 
 
27041
 
 
27042
 
 
27043
 
 
27044
          GNULIB_FCHMODAT=1
 
27045
 
 
27046
 
 
27047
 
 
27048
 
 
27049
 
 
27050
$as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
 
27051
 
 
27052
 
 
27053
 
 
27054
 
 
27055
 
 
27056
 
 
27057
 
 
27058
  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
 
27059
if test "x$ac_cv_func_fchownat" = xyes; then :
 
27060
 
 
27061
 
 
27062
 
 
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
 
27067
else
 
27068
 
 
27069
     gl_dangle=conftest.dangle
 
27070
     # Remove any remnants of a previous test.
 
27071
     rm -f $gl_dangle
 
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
 
27077
else
 
27078
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
27079
/* end confdefs.h.  */
 
27080
 
 
27081
#include <fcntl.h>
 
27082
#include <unistd.h>
 
27083
#include <stdlib.h>
 
27084
#include <errno.h>
 
27085
#include <sys/types.h>
 
27086
int
 
27087
main ()
 
27088
{
 
27089
  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
 
27090
                    AT_SYMLINK_NOFOLLOW) != 0
 
27091
          && errno == ENOENT);
 
27092
}
 
27093
 
 
27094
_ACEOF
 
27095
if ac_fn_c_try_run "$LINENO"; then :
 
27096
  gl_cv_func_fchownat_nofollow_works=yes
 
27097
else
 
27098
  gl_cv_func_fchownat_nofollow_works=no
 
27099
fi
 
27100
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
27101
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
27102
fi
 
27103
 
 
27104
 
 
27105
fi
 
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 :
 
27109
  REPLACE_FCHOWNAT=1
 
27110
 
 
27111
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
 
27112
 
 
27113
 
 
27114
fi
 
27115
 
 
27116
 
 
27117
 
 
27118
 
 
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
 
27123
else
 
27124
  if test "$cross_compiling" = yes; then :
 
27125
  gl_cv_func_fchownat_empty_filename_works="guessing no"
 
27126
else
 
27127
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
27128
/* end confdefs.h.  */
 
27129
#include <unistd.h>
 
27130
            #include <fcntl.h>
 
27131
 
 
27132
int
 
27133
main ()
 
27134
{
 
27135
int fd;
 
27136
            int ret;
 
27137
            if (mkdir ("conftestdir", 0700) < 0)
 
27138
              return 2;
 
27139
            fd = open ("conftestdir", O_RDONLY);
 
27140
            if (fd < 0)
 
27141
              return 3;
 
27142
            ret = fchownat (fd, "", -1, -1, 0);
 
27143
            close (fd);
 
27144
            rmdir ("conftestdir");
 
27145
            return ret == 0;
 
27146
 
 
27147
  ;
 
27148
  return 0;
 
27149
}
 
27150
_ACEOF
 
27151
if ac_fn_c_try_run "$LINENO"; then :
 
27152
  gl_cv_func_fchownat_empty_filename_works=yes
 
27153
else
 
27154
  gl_cv_func_fchownat_empty_filename_works=no
 
27155
fi
 
27156
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
27157
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
27158
fi
 
27159
 
 
27160
 
 
27161
fi
 
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 :
 
27165
  REPLACE_FCHOWNAT=1
 
27166
 
 
27167
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
 
27168
 
 
27169
 
 
27170
fi
 
27171
 
 
27172
     if test $REPLACE_CHOWN = 1; then
 
27173
       REPLACE_FCHOWNAT=1
 
27174
     fi
 
27175
else
 
27176
  HAVE_FCHOWNAT=0
 
27177
fi
 
27178
 
 
27179
 
 
27180
  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
 
27181
 
 
27182
 
 
27183
 
 
27184
 
 
27185
 
 
27186
 
 
27187
 
 
27188
 
 
27189
  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
 
27190
 
 
27191
  fi
 
27192
 
 
27193
 
 
27194
cat >>confdefs.h <<_ACEOF
 
27195
#define GNULIB_FCHOWNAT 1
 
27196
_ACEOF
 
27197
 
 
27198
 
 
27199
 
 
27200
 
 
27201
 
 
27202
 
 
27203
          GNULIB_FCHOWNAT=1
 
27204
 
 
27205
 
 
27206
 
 
27207
 
 
27208
 
 
27209
$as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
 
27210
 
 
27211
 
 
27212
 
 
27213
 
 
27214
 
 
27215
 
 
27216
 
 
27217
 
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 :
24823
27228
/* end confdefs.h.  */
24824
27229
 
24825
27230
#include <stdio.h>
24826
 
#include <unistd.h>
 
27231
#if HAVE_UNISTD_H
 
27232
# include <unistd.h>
 
27233
#else /* on Windows with MSVC */
 
27234
# include <io.h>
 
27235
#endif
24827
27236
 
24828
27237
int
24829
27238
main ()
24892
27301
    REPLACE_FCLOSE=1
24893
27302
  fi
24894
27303
 
24895
 
if test $REPLACE_FCLOSE = 1; then
 
27304
  if test $REPLACE_FCLOSE = 1; then
24896
27305
 
24897
27306
 
24898
27307
 
24903
27312
 
24904
27313
  gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
24905
27314
 
24906
 
fi
 
27315
  fi
24907
27316
 
24908
27317
 
24909
27318
 
25078
27487
    fi
25079
27488
 
25080
27489
 
25081
 
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
 
27490
  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
25082
27491
 
25083
27492
 
25084
27493
 
25089
27498
 
25090
27499
  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
25091
27500
 
25092
 
fi
 
27501
  fi
25093
27502
 
25094
27503
 
25095
27504
 
25134
27543
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25135
27544
                 *)    gl_absname_cpp="$ac_cpp" ;;
25136
27545
               esac
 
27546
 
 
27547
               case "$host_os" in
 
27548
                 mingw*)
 
27549
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
27550
                   ;;
 
27551
                 *)
 
27552
                   gl_dirsep_regex='\/'
 
27553
                   ;;
 
27554
               esac
 
27555
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
27556
 
 
27557
               gl_header_literal_regex=`echo 'fcntl.h' \
 
27558
                                        | sed -e "$gl_make_literal_regex_sed"`
 
27559
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
27560
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
27561
                   s|^/[^/]|//&|
 
27562
                   p
 
27563
                   q
 
27564
                 }'
25137
27565
                                                            gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25138
 
                  sed -n '\#/fcntl.h#{
25139
 
                    s#.*"\(.*/fcntl.h\)".*#\1#
25140
 
                    s#^/[^/]#//&#
25141
 
                    p
25142
 
                    q
25143
 
                  }'`'"'
 
27566
                      sed -n "$gl_absolute_header_sed"`'"'
25144
27567
 
25145
27568
 
25146
27569
fi
25163
27586
 
25164
27587
 
25165
27588
 
25166
 
    for gl_func in fcntl openat; do
25167
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25168
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25169
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25170
 
if eval \${$as_gl_Symbol+:} false; then :
25171
 
  $as_echo_n "(cached) " >&6
25172
 
else
25173
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25174
 
/* end confdefs.h.  */
25175
 
#include <fcntl.h>
25176
 
 
25177
 
int
25178
 
main ()
25179
 
{
25180
 
#undef $gl_func
25181
 
  (void) $gl_func;
25182
 
  ;
25183
 
  return 0;
25184
 
}
25185
 
_ACEOF
25186
 
if ac_fn_c_try_compile "$LINENO"; then :
25187
 
  eval "$as_gl_Symbol=yes"
25188
 
else
25189
 
  eval "$as_gl_Symbol=no"
25190
 
fi
25191
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25192
 
fi
25193
 
eval ac_res=\$$as_gl_Symbol
25194
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25195
 
$as_echo "$ac_res" >&6; }
25196
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25197
 
  cat >>confdefs.h <<_ACEOF
25198
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25199
 
_ACEOF
25200
 
 
25201
 
                     eval ac_cv_have_decl_$gl_func=yes
25202
 
fi
25203
 
      done
 
27589
 
 
27590
 
 
27591
 
25204
27592
 
25205
27593
 
25206
27594
 
25222
27610
 
25223
27611
 
25224
27612
 
 
27613
 
 
27614
 
 
27615
  LIB_FDATASYNC=
 
27616
 
 
27617
 
 
27618
  if test $ac_cv_have_decl_fdatasync = no; then
 
27619
    HAVE_DECL_FDATASYNC=0
 
27620
        for ac_func in fdatasync
 
27621
do :
 
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
 
27626
_ACEOF
 
27627
 
 
27628
fi
 
27629
done
 
27630
 
 
27631
    if test $ac_cv_func_fdatasync = no; then
 
27632
      HAVE_FDATASYNC=0
 
27633
    fi
 
27634
  else
 
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
 
27640
else
 
27641
  ac_func_search_save_LIBS=$LIBS
 
27642
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
27643
/* end confdefs.h.  */
 
27644
 
 
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.  */
 
27648
#ifdef __cplusplus
 
27649
extern "C"
 
27650
#endif
 
27651
char fdatasync ();
 
27652
int
 
27653
main ()
 
27654
{
 
27655
return fdatasync ();
 
27656
  ;
 
27657
  return 0;
 
27658
}
 
27659
_ACEOF
 
27660
for ac_lib in '' rt posix4; do
 
27661
  if test -z "$ac_lib"; then
 
27662
    ac_res="none required"
 
27663
  else
 
27664
    ac_res=-l$ac_lib
 
27665
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 
27666
  fi
 
27667
  if ac_fn_c_try_link "$LINENO"; then :
 
27668
  ac_cv_search_fdatasync=$ac_res
 
27669
fi
 
27670
rm -f core conftest.err conftest.$ac_objext \
 
27671
    conftest$ac_exeext
 
27672
  if ${ac_cv_search_fdatasync+:} false; then :
 
27673
  break
 
27674
fi
 
27675
done
 
27676
if ${ac_cv_search_fdatasync+:} false; then :
 
27677
 
 
27678
else
 
27679
  ac_cv_search_fdatasync=no
 
27680
fi
 
27681
rm conftest.$ac_ext
 
27682
LIBS=$ac_func_search_save_LIBS
 
27683
fi
 
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
 
27691
fi
 
27692
 
 
27693
    LIBS=$gl_saved_libs
 
27694
  fi
 
27695
 
 
27696
  if test $HAVE_FDATASYNC = 0; then
 
27697
 
 
27698
 
 
27699
 
 
27700
 
 
27701
 
 
27702
 
 
27703
 
 
27704
 
 
27705
  gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
 
27706
 
 
27707
  fi
 
27708
 
 
27709
 
 
27710
 
 
27711
 
 
27712
 
 
27713
          GNULIB_FDATASYNC=1
 
27714
 
 
27715
 
 
27716
 
 
27717
 
 
27718
 
 
27719
$as_echo "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
 
27720
 
 
27721
 
 
27722
 
 
27723
 
 
27724
 
 
27725
 
 
27726
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
27727
    REPLACE_FDOPEN=1
 
27728
  else
 
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
 
27733
else
 
27734
 
 
27735
        if test "$cross_compiling" = yes; then :
 
27736
  case "$host_os" in
 
27737
             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
 
27738
             *)      gl_cv_func_fdopen_works="guessing yes" ;;
 
27739
           esac
 
27740
 
 
27741
else
 
27742
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
27743
/* end confdefs.h.  */
 
27744
 
 
27745
#include <stdio.h>
 
27746
#include <errno.h>
 
27747
int
 
27748
main (void)
 
27749
{
 
27750
  FILE *fp;
 
27751
  errno = 0;
 
27752
  fp = fdopen (-1, "r");
 
27753
  if (fp == NULL && errno == 0)
 
27754
    return 1;
 
27755
  return 0;
 
27756
}
 
27757
_ACEOF
 
27758
if ac_fn_c_try_run "$LINENO"; then :
 
27759
  gl_cv_func_fdopen_works=yes
 
27760
else
 
27761
  gl_cv_func_fdopen_works=no
 
27762
fi
 
27763
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
27764
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
27765
fi
 
27766
 
 
27767
 
 
27768
fi
 
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 ;;
 
27773
    esac
 
27774
  fi
 
27775
 
 
27776
  if test $REPLACE_FDOPEN = 1; then
 
27777
 
 
27778
 
 
27779
 
 
27780
 
 
27781
 
 
27782
 
 
27783
 
 
27784
 
 
27785
  gl_LIBOBJS="$gl_LIBOBJS fdopen.$ac_objext"
 
27786
 
 
27787
 
 
27788
  fi
 
27789
 
 
27790
 
 
27791
 
 
27792
 
 
27793
 
 
27794
          GNULIB_FDOPEN=1
 
27795
 
 
27796
 
 
27797
 
 
27798
 
 
27799
 
 
27800
$as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
 
27801
 
 
27802
 
 
27803
 
 
27804
 
 
27805
 
 
27806
 
 
27807
 
 
27808
 
25225
27809
    ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
25226
27810
#include <dirent.h>
25227
27811
 
25251
27835
  $as_echo_n "(cached) " >&6
25252
27836
else
25253
27837
  if test "$cross_compiling" = yes; then :
25254
 
  gl_cv_func_fdopendir_works="guessing no"
 
27838
  case "$host_os" in
 
27839
                    # Guess yes on glibc systems.
 
27840
            *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
 
27841
                    # If we don't know, assume the worst.
 
27842
            *)      gl_cv_func_fdopendir_works="guessing no" ;;
 
27843
          esac
 
27844
 
25255
27845
else
25256
27846
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25257
27847
/* end confdefs.h.  */
25292
27882
fi
25293
27883
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
25294
27884
$as_echo "$gl_cv_func_fdopendir_works" >&6; }
25295
 
    if test "$gl_cv_func_fdopendir_works" != yes; then
25296
 
      REPLACE_FDOPENDIR=1
25297
 
    fi
 
27885
    case "$gl_cv_func_fdopendir_works" in
 
27886
      *yes) ;;
 
27887
      *)
 
27888
        REPLACE_FDOPENDIR=1
 
27889
        ;;
 
27890
    esac
25298
27891
  fi
25299
27892
 
25300
 
if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
 
27893
  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
25301
27894
 
25302
27895
 
25303
27896
 
25308
27901
 
25309
27902
  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
25310
27903
 
25311
 
fi
25312
 
if test $HAVE_FDOPENDIR = 0; then
25313
 
 
25314
 
 
25315
 
 
25316
 
 
25317
 
 
25318
 
 
25319
 
 
25320
 
 
25321
 
  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
25322
 
 
25323
 
fi
 
27904
  fi
25324
27905
 
25325
27906
 
25326
27907
 
25353
27934
 
25354
27935
 
25355
27936
 
 
27937
 
25356
27938
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
25357
27939
$as_echo_n "checking whether fflush works on input streams... " >&6; }
25358
27940
if ${gl_cv_func_fflush_stdin+:} false; then :
25366
27948
/* end confdefs.h.  */
25367
27949
 
25368
27950
#include <stdio.h>
25369
 
#include <unistd.h>
 
27951
#if HAVE_UNISTD_H
 
27952
# include <unistd.h>
 
27953
#else /* on Windows with MSVC */
 
27954
# include <io.h>
 
27955
#endif
25370
27956
 
25371
27957
int
25372
27958
main ()
25430
28016
    REPLACE_FFLUSH=1
25431
28017
  fi
25432
28018
 
25433
 
if test $REPLACE_FFLUSH = 1; then
 
28019
  if test $REPLACE_FFLUSH = 1; then
25434
28020
 
25435
28021
 
25436
28022
 
25445
28031
 
25446
28032
  :
25447
28033
 
25448
 
fi
 
28034
  fi
25449
28035
 
25450
28036
 
25451
28037
cat >>confdefs.h <<_ACEOF
25487
28073
 
25488
28074
 
25489
28075
 
25490
 
if test $ac_cv_member_struct_stat_st_blocks = no; then
 
28076
  if test $ac_cv_member_struct_stat_st_blocks = no; then
25491
28077
 
25492
28078
 
25493
28079
 
25502
28088
 
25503
28089
  :
25504
28090
 
25505
 
fi
 
28091
  fi
25506
28092
 
25507
28093
 
25508
28094
 
25597
28183
          ;;
25598
28184
      esac
25599
28185
      ;;
 
28186
    linux*)
 
28187
      case "$host_cpu" in
 
28188
        powerpc*)
 
28189
          FLOAT_H=float.h
 
28190
          ;;
 
28191
      esac
 
28192
      ;;
25600
28193
  esac
25601
28194
  case "$host_os" in
25602
 
    aix* | freebsd*)
 
28195
    aix* | freebsd* | linux*)
25603
28196
      if test -n "$FLOAT_H"; then
25604
28197
        REPLACE_FLOAT_LDBL=1
25605
28198
      fi
25606
28199
      ;;
25607
28200
  esac
 
28201
 
 
28202
    REPLACE_ITOLD=0
 
28203
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
 
28204
$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
 
28205
if ${gl_cv_func_itold_works+:} false; then :
 
28206
  $as_echo_n "(cached) " >&6
 
28207
else
 
28208
 
 
28209
      if test "$cross_compiling" = yes; then :
 
28210
  case "$host" in
 
28211
           sparc*-*-linux*)
 
28212
             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
28213
/* end confdefs.h.  */
 
28214
#if defined __LP64__ || defined __arch64__
 
28215
                yes
 
28216
                #endif
 
28217
_ACEOF
 
28218
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
28219
  $EGREP "yes" >/dev/null 2>&1; then :
 
28220
  gl_cv_func_itold_works="guessing no"
 
28221
else
 
28222
  gl_cv_func_itold_works="guessing yes"
 
28223
fi
 
28224
rm -f conftest*
 
28225
 
 
28226
             ;;
 
28227
           *) gl_cv_func_itold_works="guessing yes" ;;
 
28228
         esac
 
28229
 
 
28230
else
 
28231
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
28232
/* end confdefs.h.  */
 
28233
 
 
28234
int i = -1;
 
28235
volatile long double ld;
 
28236
int main ()
 
28237
{
 
28238
  ld += i * 1.0L;
 
28239
  if (ld > 0)
 
28240
    return 1;
 
28241
  return 0;
 
28242
}
 
28243
_ACEOF
 
28244
if ac_fn_c_try_run "$LINENO"; then :
 
28245
  gl_cv_func_itold_works=yes
 
28246
else
 
28247
  gl_cv_func_itold_works=no
 
28248
fi
 
28249
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
28250
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
28251
fi
 
28252
 
 
28253
 
 
28254
fi
 
28255
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
 
28256
$as_echo "$gl_cv_func_itold_works" >&6; }
 
28257
  case "$gl_cv_func_itold_works" in
 
28258
    *no)
 
28259
      REPLACE_ITOLD=1
 
28260
                  FLOAT_H=float.h
 
28261
      ;;
 
28262
  esac
 
28263
 
25608
28264
  if test -n "$FLOAT_H"; then
25609
28265
 
25610
28266
 
25632
28288
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25633
28289
                 *)    gl_absname_cpp="$ac_cpp" ;;
25634
28290
               esac
 
28291
 
 
28292
               case "$host_os" in
 
28293
                 mingw*)
 
28294
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
28295
                   ;;
 
28296
                 *)
 
28297
                   gl_dirsep_regex='\/'
 
28298
                   ;;
 
28299
               esac
 
28300
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
28301
 
 
28302
               gl_header_literal_regex=`echo 'float.h' \
 
28303
                                        | sed -e "$gl_make_literal_regex_sed"`
 
28304
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
28305
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
28306
                   s|^/[^/]|//&|
 
28307
                   p
 
28308
                   q
 
28309
                 }'
25635
28310
                                                            gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25636
 
                  sed -n '\#/float.h#{
25637
 
                    s#.*"\(.*/float.h\)".*#\1#
25638
 
                    s#^/[^/]#//&#
25639
 
                    p
25640
 
                    q
25641
 
                  }'`'"'
 
28311
                      sed -n "$gl_absolute_header_sed"`'"'
25642
28312
 
25643
28313
 
25644
28314
fi
25670
28340
fi
25671
28341
 
25672
28342
 
25673
 
if test $REPLACE_FLOAT_LDBL = 1; then
 
28343
 
 
28344
  if test $REPLACE_FLOAT_LDBL = 1; then
25674
28345
 
25675
28346
 
25676
28347
 
25681
28352
 
25682
28353
  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
25683
28354
 
25684
 
fi
 
28355
  fi
 
28356
  if test $REPLACE_ITOLD = 1; then
 
28357
 
 
28358
 
 
28359
 
 
28360
 
 
28361
 
 
28362
 
 
28363
 
 
28364
 
 
28365
  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
 
28366
 
 
28367
  fi
25685
28368
 
25686
28369
 
25687
28370
 
25689
28372
 
25690
28373
  FNMATCH_H=
25691
28374
  gl_fnmatch_required_lowercase=`
25692
 
    echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]'
 
28375
    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
25693
28376
  `
25694
28377
  gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
25695
28378
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
25823
28506
fi
25824
28507
 
25825
28508
 
25826
 
if test -n "$FNMATCH_H"; then
25827
 
 
25828
 
 
25829
 
 
25830
 
 
25831
 
 
25832
 
 
25833
 
 
25834
 
 
25835
 
  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
25836
 
 
25837
 
 
25838
 
 
25839
 
cat >>confdefs.h <<_ACEOF
25840
 
#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
25841
 
_ACEOF
25842
 
 
25843
 
 
25844
 
  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
25845
 
"
25846
 
if test "x$ac_cv_have_decl_isblank" = xyes; then :
25847
 
  ac_have_decl=1
25848
 
else
25849
 
  ac_have_decl=0
25850
 
fi
25851
 
 
25852
 
cat >>confdefs.h <<_ACEOF
25853
 
#define HAVE_DECL_ISBLANK $ac_have_decl
25854
 
_ACEOF
25855
 
 
25856
 
 
25857
 
 
25858
 
 
25859
 
fi
25860
 
 
25861
 
 
25862
 
 
25863
 
 
25864
 
 
25865
 
if test -n "$FNMATCH_H"; then
25866
 
 
25867
 
 
25868
 
 
25869
 
 
25870
 
 
25871
 
 
25872
 
 
25873
 
 
25874
 
  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
25875
 
 
25876
 
 
25877
 
 
25878
 
cat >>confdefs.h <<_ACEOF
25879
 
#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
25880
 
_ACEOF
25881
 
 
25882
 
 
25883
 
  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
25884
 
"
25885
 
if test "x$ac_cv_have_decl_isblank" = xyes; then :
25886
 
  ac_have_decl=1
25887
 
else
25888
 
  ac_have_decl=0
25889
 
fi
25890
 
 
25891
 
cat >>confdefs.h <<_ACEOF
25892
 
#define HAVE_DECL_ISBLANK $ac_have_decl
25893
 
_ACEOF
25894
 
 
25895
 
 
25896
 
 
25897
 
 
25898
 
fi
 
28509
  if test -n "$FNMATCH_H"; then
 
28510
 
 
28511
 
 
28512
 
 
28513
 
 
28514
 
 
28515
 
 
28516
 
 
28517
 
 
28518
  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
 
28519
 
 
28520
 
 
28521
 
 
28522
cat >>confdefs.h <<_ACEOF
 
28523
#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
 
28524
_ACEOF
 
28525
 
 
28526
 
 
28527
  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
 
28528
"
 
28529
if test "x$ac_cv_have_decl_isblank" = xyes; then :
 
28530
  ac_have_decl=1
 
28531
else
 
28532
  ac_have_decl=0
 
28533
fi
 
28534
 
 
28535
cat >>confdefs.h <<_ACEOF
 
28536
#define HAVE_DECL_ISBLANK $ac_have_decl
 
28537
_ACEOF
 
28538
 
 
28539
 
 
28540
 
 
28541
 
 
28542
  fi
 
28543
 
 
28544
 
 
28545
 
 
28546
 
 
28547
 
 
28548
  if test -n "$FNMATCH_H"; then
 
28549
 
 
28550
 
 
28551
 
 
28552
 
 
28553
 
 
28554
 
 
28555
 
 
28556
 
 
28557
  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
 
28558
 
 
28559
 
 
28560
 
 
28561
cat >>confdefs.h <<_ACEOF
 
28562
#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
 
28563
_ACEOF
 
28564
 
 
28565
 
 
28566
  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
 
28567
"
 
28568
if test "x$ac_cv_have_decl_isblank" = xyes; then :
 
28569
  ac_have_decl=1
 
28570
else
 
28571
  ac_have_decl=0
 
28572
fi
 
28573
 
 
28574
cat >>confdefs.h <<_ACEOF
 
28575
#define HAVE_DECL_ISBLANK $ac_have_decl
 
28576
_ACEOF
 
28577
 
 
28578
 
 
28579
 
 
28580
 
 
28581
  fi
25899
28582
 
25900
28583
 
25901
28584
 
25956
28639
      ;;
25957
28640
  esac
25958
28641
 
25959
 
if test $REPLACE_FOPEN = 1; then
 
28642
  if test $REPLACE_FOPEN = 1; then
25960
28643
 
25961
28644
 
25962
28645
 
25970
28653
 
25971
28654
 
25972
28655
 
25973
 
fi
 
28656
  fi
25974
28657
 
25975
28658
 
25976
28659
 
26015
28698
_ACEOF
26016
28699
 
26017
28700
 
26018
 
if test $ac_cv_func___fpending = no; then
 
28701
  if test $ac_cv_func___fpending = no; then
26019
28702
 
26020
28703
 
26021
28704
 
26062
28745
          '# Minix'                                                     \
26063
28746
          'fp->_ptr - fp->_buf'                                         \
26064
28747
                                                                        \
 
28748
          '# Plan9'                                                     \
 
28749
          'fp->wp - fp->buf'                                            \
 
28750
                                                                        \
26065
28751
          '# VMS'                                                       \
26066
28752
          '(*fp)->_ptr - (*fp)->_base'                                  \
26067
28753
                                                                        \
26103
28789
_ACEOF
26104
28790
 
26105
28791
 
26106
 
fi
 
28792
  fi
26107
28793
 
26108
28794
 
26109
28795
 
26180
28866
    HAVE_DECL_FPURGE=0
26181
28867
  fi
26182
28868
 
26183
 
if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
 
28869
  if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
26184
28870
 
26185
28871
 
26186
28872
 
26191
28877
 
26192
28878
  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
26193
28879
 
26194
 
fi
 
28880
  fi
26195
28881
 
26196
28882
 
26197
28883
 
26210
28896
 
26211
28897
 
26212
28898
 
 
28899
  if test $ac_cv_func___freadahead = no; then
 
28900
 
 
28901
 
 
28902
 
 
28903
 
 
28904
 
 
28905
 
 
28906
 
 
28907
 
 
28908
  gl_LIBOBJS="$gl_LIBOBJS freadahead.$ac_objext"
 
28909
 
 
28910
  fi
 
28911
 
 
28912
 
 
28913
 
 
28914
 
 
28915
 
 
28916
 
 
28917
  if test $ac_cv_func___freadptr = no; then
 
28918
 
 
28919
 
 
28920
 
 
28921
 
 
28922
 
 
28923
 
 
28924
 
 
28925
 
 
28926
  gl_LIBOBJS="$gl_LIBOBJS freadptr.$ac_objext"
 
28927
 
 
28928
  fi
 
28929
 
 
28930
 
 
28931
 
26213
28932
 
26214
28933
 
26215
28934
 
26220
28939
      ;;
26221
28940
  esac
26222
28941
 
26223
 
if test $REPLACE_FREOPEN = 1; then
 
28942
  if test $REPLACE_FREOPEN = 1; then
26224
28943
 
26225
28944
 
26226
28945
 
26234
28953
 
26235
28954
 
26236
28955
 
26237
 
fi
 
28956
  fi
26238
28957
 
26239
28958
 
26240
28959
 
26263
28982
  if test $gl_cv_func_frexp_no_libm = yes; then
26264
28983
 
26265
28984
 
26266
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
 
28985
 
 
28986
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
26267
28987
$as_echo_n "checking whether frexp works... " >&6; }
26268
28988
if ${gl_cv_func_frexp_works+:} false; then :
26269
28989
  $as_echo_n "(cached) " >&6
26282
29002
#include <float.h>
26283
29003
#include <math.h>
26284
29004
#include <string.h>
 
29005
#if HAVE_ALARM
 
29006
# include <unistd.h>
 
29007
#endif
26285
29008
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
26286
29009
   ICC 10.0 has a bug when optimizing the expression -zero.
26287
29010
   The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
26288
 
   to PowerPC on MacOS X 10.5.  */
 
29011
   to PowerPC on Mac OS X 10.5.  */
26289
29012
#if defined __hpux || defined __sgi || defined __ICC
26290
29013
static double
26291
29014
compute_minus_zero (void)
26302
29025
  int i;
26303
29026
  volatile double x;
26304
29027
  double zero = 0.0;
 
29028
#if HAVE_ALARM
 
29029
  /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
 
29030
     number.  Let the test fail in this case.  */
 
29031
  alarm (5);
 
29032
#endif
26305
29033
  /* Test on denormalized numbers.  */
26306
29034
  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
26307
29035
    ;
26315
29043
        result |= 1;
26316
29044
    }
26317
29045
  /* Test on infinite numbers.  */
26318
 
  x = 1.0 / 0.0;
 
29046
  x = 1.0 / zero;
26319
29047
  {
26320
29048
    int exp;
26321
29049
    double y = frexp (x, &exp);
26361
29089
 
26362
29090
  fi
26363
29091
 
26364
 
if test $gl_func_frexp_no_libm != yes; then
 
29092
  if test $gl_func_frexp_no_libm != yes; then
26365
29093
 
26366
29094
 
26367
29095
 
26372
29100
 
26373
29101
  gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
26374
29102
 
26375
 
fi
 
29103
  fi
26376
29104
 
26377
29105
 
26378
29106
 
26390
29118
 
26391
29119
 
26392
29120
 
 
29121
 
26393
29122
      ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
26394
29123
"
26395
29124
if test "x$ac_cv_have_decl_frexpl" = xyes; then :
26489
29218
    if (exp != 5)
26490
29219
      result |= 1;
26491
29220
  }
26492
 
  /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
 
29221
  /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
26493
29222
     function returns an invalid (incorrectly normalized) value: it returns
26494
29223
               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
26495
29224
     but the correct result is
26528
29257
        int exp;
26529
29258
        long double y = frexpl (x, &exp);
26530
29259
        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
26531
 
           exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
 
29260
           exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
26532
29261
        if (exp != LDBL_MIN_EXP - 1)
26533
29262
          result |= 8;
26534
29263
      }
26573
29302
    fi
26574
29303
  fi
26575
29304
 
26576
 
if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
 
29305
  if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
26577
29306
 
26578
29307
 
26579
29308
 
26584
29313
 
26585
29314
  gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
26586
29315
 
26587
 
fi
 
29316
  fi
26588
29317
 
26589
29318
 
26590
29319
 
26607
29336
    REPLACE_FSEEK=1
26608
29337
  fi
26609
29338
 
26610
 
if test $REPLACE_FSEEK = 1; then
 
29339
  if test $REPLACE_FSEEK = 1; then
26611
29340
 
26612
29341
 
26613
29342
 
26618
29347
 
26619
29348
  gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
26620
29349
 
26621
 
fi
 
29350
  fi
26622
29351
 
26623
29352
 
26624
29353
 
26641
29370
 
26642
29371
 
26643
29372
 
 
29373
 
26644
29374
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
26645
29375
$as_echo_n "checking for fseeko... " >&6; }
26646
29376
if ${gl_cv_func_fseeko+:} false; then :
26679
29409
  if test $gl_cv_func_fseeko = no; then
26680
29410
    HAVE_FSEEKO=0
26681
29411
  else
 
29412
    if test $WINDOWS_64_BIT_OFF_T = 1; then
 
29413
      REPLACE_FSEEKO=1
 
29414
    fi
26682
29415
    if test $gl_cv_var_stdin_large_offset = no; then
26683
29416
      REPLACE_FSEEKO=1
26684
29417
    fi
26685
29418
 
26686
29419
 
 
29420
 
26687
29421
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
26688
29422
$as_echo_n "checking whether fflush works on input streams... " >&6; }
26689
29423
if ${gl_cv_func_fflush_stdin+:} false; then :
26697
29431
/* end confdefs.h.  */
26698
29432
 
26699
29433
#include <stdio.h>
26700
 
#include <unistd.h>
 
29434
#if HAVE_UNISTD_H
 
29435
# include <unistd.h>
 
29436
#else /* on Windows with MSVC */
 
29437
# include <io.h>
 
29438
#endif
26701
29439
 
26702
29440
int
26703
29441
main ()
26763
29501
 
26764
29502
  fi
26765
29503
 
26766
 
if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
 
29504
  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
26767
29505
 
26768
29506
 
26769
29507
 
26774
29512
 
26775
29513
  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
26776
29514
 
 
29515
 
 
29516
      for ac_func in _fseeki64
 
29517
do :
 
29518
  ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
 
29519
if test "x$ac_cv_func__fseeki64" = xyes; then :
 
29520
  cat >>confdefs.h <<_ACEOF
 
29521
#define HAVE__FSEEKI64 1
 
29522
_ACEOF
 
29523
 
26777
29524
fi
 
29525
done
 
29526
 
 
29527
 
 
29528
  fi
26778
29529
 
26779
29530
 
26780
29531
 
26793
29544
 
26794
29545
 
26795
29546
 
 
29547
  if test $ac_cv_func___fseterr = no; then
 
29548
 
 
29549
 
 
29550
 
 
29551
 
 
29552
 
 
29553
 
 
29554
 
 
29555
 
 
29556
  gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
 
29557
 
 
29558
  fi
 
29559
 
 
29560
 
 
29561
 
 
29562
 
 
29563
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
29564
    REPLACE_FSTAT=1
 
29565
  fi
 
29566
 
 
29567
 
 
29568
  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
 
29569
    REPLACE_FSTAT=1
 
29570
  fi
 
29571
 
 
29572
 
 
29573
 
 
29574
 
 
29575
 
 
29576
  if test $ac_cv_func_fchdir = no; then
 
29577
    HAVE_FCHDIR=0
 
29578
  fi
 
29579
 
 
29580
    if test $HAVE_FCHDIR = 0; then
 
29581
      case "$gl_cv_func_open_directory_works" in
 
29582
        *yes) ;;
 
29583
        *)
 
29584
          REPLACE_FSTAT=1
 
29585
          ;;
 
29586
      esac
 
29587
    fi
 
29588
 
 
29589
 
 
29590
  if test $REPLACE_FSTAT = 1; then
 
29591
 
 
29592
 
 
29593
 
 
29594
 
 
29595
 
 
29596
 
 
29597
 
 
29598
 
 
29599
  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
 
29600
 
 
29601
 
 
29602
 
 
29603
 
 
29604
  fi
 
29605
 
 
29606
 
 
29607
 
 
29608
 
 
29609
 
 
29610
          GNULIB_FSTAT=1
 
29611
 
 
29612
 
 
29613
 
 
29614
 
 
29615
 
 
29616
$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
 
29617
 
 
29618
 
 
29619
 
 
29620
 
 
29621
 
 
29622
 
 
29623
 
 
29624
 
 
29625
 
 
29626
  if test $ac_cv_func_fstatat = no; then
 
29627
    HAVE_FSTATAT=0
 
29628
  else
 
29629
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
 
29630
$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
 
29631
if ${gl_cv_func_fstatat_zero_flag+:} false; then :
 
29632
  $as_echo_n "(cached) " >&6
 
29633
else
 
29634
  if test "$cross_compiling" = yes; then :
 
29635
  case "$host_os" in
 
29636
            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
 
29637
            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
 
29638
          esac
 
29639
 
 
29640
else
 
29641
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
29642
/* end confdefs.h.  */
 
29643
 
 
29644
              #include <fcntl.h>
 
29645
              #include <sys/stat.h>
 
29646
              int
 
29647
              main (void)
 
29648
              {
 
29649
                struct stat a;
 
29650
                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
 
29651
              }
 
29652
 
 
29653
_ACEOF
 
29654
if ac_fn_c_try_run "$LINENO"; then :
 
29655
  gl_cv_func_fstatat_zero_flag=yes
 
29656
else
 
29657
  gl_cv_func_fstatat_zero_flag=no
 
29658
fi
 
29659
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
29660
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
29661
fi
 
29662
 
 
29663
 
 
29664
fi
 
29665
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
 
29666
$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
 
29667
 
 
29668
    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
 
29669
    *yes+*yes) ;;
 
29670
    *) REPLACE_FSTATAT=1
 
29671
       case $gl_cv_func_fstatat_zero_flag in
 
29672
       *yes)
 
29673
 
 
29674
$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
 
29675
 
 
29676
         ;;
 
29677
       esac
 
29678
       ;;
 
29679
    esac
 
29680
  fi
 
29681
 
 
29682
  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
 
29683
 
 
29684
 
 
29685
 
 
29686
 
 
29687
 
 
29688
 
 
29689
 
 
29690
 
 
29691
  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
 
29692
 
 
29693
  fi
 
29694
 
 
29695
 
 
29696
cat >>confdefs.h <<_ACEOF
 
29697
#define GNULIB_FSTATAT 1
 
29698
_ACEOF
 
29699
 
 
29700
 
 
29701
 
 
29702
 
 
29703
 
 
29704
 
 
29705
          GNULIB_FSTATAT=1
 
29706
 
 
29707
 
 
29708
 
 
29709
 
 
29710
 
 
29711
$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
 
29712
 
 
29713
 
 
29714
 
 
29715
 
 
29716
 
 
29717
 
26796
29718
  for ac_header in sys/mount.h
26797
29719
do :
26798
29720
  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
26819
29741
# Perform only the link test since it seems there are no variants of the
26820
29742
# statvfs function.  This check is more than just AC_CHECK_FUNCS([statvfs])
26821
29743
# because that got a false positive on SCO OSR5.  Adding the declaration
26822
 
# of a `struct statvfs' causes this test to fail (as it should) on such
 
29744
# of a 'struct statvfs' causes this test to fail (as it should) on such
26823
29745
# systems.  That system is reported to work fine with STAT_STATFS4 which
26824
29746
# is what it gets when this test fails.
26825
29747
if test $ac_fsusage_space = no; then
26833
29755
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26834
29756
/* end confdefs.h.  */
26835
29757
#include <sys/types.h>
26836
 
#if (defined __GLIBC__ || defined __UCLIBC__) && defined __linux__
26837
 
Do not use statvfs on systems with GNU libc on Linux, because that function
26838
 
stats all preceding entries in /proc/mounts, and that makes df hang if even
26839
 
one of the corresponding file systems is hard-mounted, but not available.
26840
 
statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes
26841
 
a system call.
26842
 
#endif
26843
 
 
26844
29758
#ifdef __osf__
26845
29759
"Do not use Tru64's statvfs implementation"
26846
29760
#endif
26851
29765
 
26852
29766
#if defined __APPLE__ && defined __MACH__
26853
29767
#include <limits.h>
26854
 
/* On MacOS X >= 10.5, f_blocks in 'struct statvfs' is a 32-bit quantity;
 
29768
/* On Mac OS X >= 10.5, f_blocks in 'struct statvfs' is a 32-bit quantity;
26855
29769
   that commonly limits file systems to 4 TiB.  Whereas f_blocks in
26856
29770
   'struct statfs' is a 64-bit type, thanks to the large-file support
26857
29771
   that was enabled above.  In this case, don't use statvfs(); use statfs()
26928
29842
  fi
26929
29843
fi
26930
29844
 
 
29845
# Check for this unconditionally so we have a
 
29846
# good fallback on glibc/Linux > 2.6 < 2.6.36
 
29847
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_frsize member" >&5
 
29848
$as_echo_n "checking for two-argument statfs with statfs.f_frsize member... " >&6; }
 
29849
if ${fu_cv_sys_stat_statfs2_frsize+:} false; then :
 
29850
  $as_echo_n "(cached) " >&6
 
29851
else
 
29852
  if test "$cross_compiling" = yes; then :
 
29853
  fu_cv_sys_stat_statfs2_frsize=no
 
29854
else
 
29855
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
29856
/* end confdefs.h.  */
 
29857
 
 
29858
#ifdef HAVE_SYS_PARAM_H
 
29859
#include <sys/param.h>
 
29860
#endif
 
29861
#ifdef HAVE_SYS_MOUNT_H
 
29862
#include <sys/mount.h>
 
29863
#endif
 
29864
#ifdef HAVE_SYS_VFS_H
 
29865
#include <sys/vfs.h>
 
29866
#endif
 
29867
  int
 
29868
  main ()
 
29869
  {
 
29870
  struct statfs fsd;
 
29871
  fsd.f_frsize = 0;
 
29872
  return statfs (".", &fsd) != 0;
 
29873
  }
 
29874
_ACEOF
 
29875
if ac_fn_c_try_run "$LINENO"; then :
 
29876
  fu_cv_sys_stat_statfs2_frsize=yes
 
29877
else
 
29878
  fu_cv_sys_stat_statfs2_frsize=no
 
29879
fi
 
29880
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
29881
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
29882
fi
 
29883
 
 
29884
fi
 
29885
 
 
29886
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_frsize" >&5
 
29887
$as_echo "$fu_cv_sys_stat_statfs2_frsize" >&6; }
 
29888
if test $fu_cv_sys_stat_statfs2_frsize = yes; then
 
29889
    ac_fsusage_space=yes
 
29890
 
 
29891
$as_echo "#define STAT_STATFS2_FRSIZE 1" >>confdefs.h
 
29892
 
 
29893
fi
 
29894
 
26931
29895
if test $ac_fsusage_space = no; then
26932
29896
  # DEC Alpha running OSF/1
26933
29897
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3-argument statfs function (DEC OSF/1)" >&5
26974
29938
fi
26975
29939
 
26976
29940
if test $ac_fsusage_space = no; then
26977
 
  # glibc/Linux, MacOS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
 
29941
  # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
26978
29942
  # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,
26979
29943
  # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.)
26980
29944
  # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and
27204
30168
 
27205
30169
 
27206
30170
 
27207
 
if test $gl_cv_fs_space = yes; then
 
30171
  if test $gl_cv_fs_space = yes; then
27208
30172
 
27209
30173
 
27210
30174
 
27269
30233
$as_echo "$fu_cv_sys_truncating_statfs" >&6; }
27270
30234
 
27271
30235
 
27272
 
fi
 
30236
  fi
27273
30237
 
27274
30238
 
27275
30239
 
27277
30241
    HAVE_FSYNC=0
27278
30242
  fi
27279
30243
 
27280
 
if test $HAVE_FSYNC = 0; then
 
30244
  if test $HAVE_FSYNC = 0; then
27281
30245
 
27282
30246
 
27283
30247
 
27288
30252
 
27289
30253
  gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
27290
30254
 
27291
 
  :
27292
 
fi
 
30255
    :
 
30256
  fi
27293
30257
 
27294
30258
 
27295
30259
 
27312
30276
    REPLACE_FTELL=1
27313
30277
  fi
27314
30278
 
27315
 
if test $REPLACE_FTELL = 1; then
 
30279
  if test $REPLACE_FTELL = 1; then
27316
30280
 
27317
30281
 
27318
30282
 
27323
30287
 
27324
30288
  gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
27325
30289
 
27326
 
fi
 
30290
  fi
27327
30291
 
27328
30292
 
27329
30293
 
27347
30311
 
27348
30312
 
27349
30313
 
 
30314
 
27350
30315
  if test $ac_cv_have_decl_ftello = no; then
27351
30316
    HAVE_DECL_FTELLO=0
27352
30317
  fi
27382
30347
  if test $gl_cv_func_ftello = no; then
27383
30348
    HAVE_FTELLO=0
27384
30349
  else
 
30350
    if test $WINDOWS_64_BIT_OFF_T = 1; then
 
30351
      REPLACE_FTELLO=1
 
30352
    fi
27385
30353
    if test $gl_cv_var_stdin_large_offset = no; then
27386
30354
      REPLACE_FTELLO=1
27387
 
    else
 
30355
    fi
 
30356
    if test $REPLACE_FTELLO = 0; then
27388
30357
 
27389
30358
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
27390
30359
$as_echo_n "checking whether ftello works... " >&6; }
27487
30456
    fi
27488
30457
  fi
27489
30458
 
27490
 
if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
 
30459
  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
27491
30460
 
27492
30461
 
27493
30462
 
27498
30467
 
27499
30468
  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
27500
30469
 
 
30470
 
 
30471
      for ac_func in _ftelli64
 
30472
do :
 
30473
  ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
 
30474
if test "x$ac_cv_func__ftelli64" = xyes; then :
 
30475
  cat >>confdefs.h <<_ACEOF
 
30476
#define HAVE__FTELLI64 1
 
30477
_ACEOF
 
30478
 
27501
30479
fi
 
30480
done
 
30481
 
 
30482
 
 
30483
  fi
27502
30484
 
27503
30485
 
27504
30486
 
27519
30501
 
27520
30502
 
27521
30503
 
27522
 
 
27523
 
 
27524
 
  GNULIB_OPENAT=1
27525
 
 
27526
 
 
27527
 
  GNULIB_FCHMODAT=1
27528
 
  GNULIB_FSTATAT=1
27529
 
  GNULIB_MKDIRAT=1
27530
 
 
27531
 
 
27532
 
  GNULIB_FCHOWNAT=1
27533
 
  GNULIB_UNLINKAT=1
 
30504
  if test $ac_cv_func_ftruncate = yes; then
 
30505
 
 
30506
 
 
30507
      case "$host_os" in
 
30508
        mingw*)
 
30509
                                                                      REPLACE_FTRUNCATE=1
 
30510
          ;;
 
30511
      esac
 
30512
 
 
30513
  else
 
30514
    HAVE_FTRUNCATE=0
 
30515
  fi
 
30516
 
 
30517
  if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
 
30518
 
 
30519
 
 
30520
 
 
30521
 
 
30522
 
 
30523
 
 
30524
 
 
30525
 
 
30526
  gl_LIBOBJS="$gl_LIBOBJS ftruncate.$ac_objext"
 
30527
 
 
30528
 
 
30529
 
 
30530
  for ac_func in chsize
 
30531
do :
 
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
 
30536
_ACEOF
 
30537
 
 
30538
fi
 
30539
done
 
30540
 
 
30541
 
 
30542
  fi
 
30543
 
 
30544
 
 
30545
 
 
30546
 
 
30547
 
 
30548
          GNULIB_FTRUNCATE=1
 
30549
 
 
30550
 
 
30551
 
 
30552
 
 
30553
 
 
30554
$as_echo "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
 
30555
 
 
30556
 
 
30557
 
 
30558
 
 
30559
 
 
30560
 
27534
30561
 
27535
30562
 
27536
30563
 
27537
30564
 
27538
30565
 
27539
30566
  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
27540
 
  yes+yes)
27541
 
    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
27542
 
    if test $REPLACE_UNLINK = 1; then
27543
 
      REPLACE_UNLINKAT=1
27544
 
    fi ;;
 
30567
  yes+*yes)
 
30568
    ;;
27545
30569
  yes+*)
27546
30570
    # Solaris 9 has *at functions, but uniformly mishandles trailing
27547
30571
    # slash in all of them.
27548
30572
    REPLACE_OPENAT=1
27549
 
    REPLACE_UNLINKAT=1
27550
30573
    ;;
27551
30574
  *)
27552
30575
    HAVE_OPENAT=0
27553
 
    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
27554
 
 
27555
 
 
27556
 
 
27557
 
  :
27558
 
;;
 
30576
    ;;
27559
30577
  esac
27560
 
  if test $ac_cv_func_fchmodat != yes; then
27561
 
    HAVE_FCHMODAT=0
27562
 
  fi
27563
 
  if test $ac_cv_func_mkdirat != yes; then
27564
 
    HAVE_MKDIRAT=0
27565
 
  fi
27566
 
 
27567
 
 
27568
 
 
27569
 
  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
27570
 
if test "x$ac_cv_func_fchownat" = xyes; then :
27571
 
 
27572
 
 
27573
 
 
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
27578
 
else
27579
 
 
27580
 
     gl_dangle=conftest.dangle
27581
 
     # Remove any remnants of a previous test.
27582
 
     rm -f $gl_dangle
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
27588
 
else
27589
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27590
 
/* end confdefs.h.  */
27591
 
 
27592
 
#include <fcntl.h>
27593
 
#include <unistd.h>
27594
 
#include <stdlib.h>
27595
 
#include <errno.h>
27596
 
#include <sys/types.h>
27597
 
int
27598
 
main ()
27599
 
{
27600
 
  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
27601
 
                    AT_SYMLINK_NOFOLLOW) != 0
27602
 
          && errno == ENOENT);
27603
 
}
27604
 
 
27605
 
_ACEOF
27606
 
if ac_fn_c_try_run "$LINENO"; then :
27607
 
  gl_cv_func_fchownat_nofollow_works=yes
27608
 
else
27609
 
  gl_cv_func_fchownat_nofollow_works=no
27610
 
fi
27611
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27612
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
27613
 
fi
27614
 
 
27615
 
 
27616
 
fi
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 :
27620
 
  REPLACE_FCHOWNAT=1
27621
 
 
27622
 
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
27623
 
 
27624
 
 
27625
 
fi
27626
 
 
27627
 
 
27628
 
 
27629
 
 
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
27634
 
else
27635
 
  if test "$cross_compiling" = yes; then :
27636
 
  gl_cv_func_fchownat_empty_filename_works="guessing no"
27637
 
else
27638
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27639
 
/* end confdefs.h.  */
27640
 
#include <unistd.h>
27641
 
            #include <fcntl.h>
27642
 
 
27643
 
int
27644
 
main ()
27645
 
{
27646
 
int fd;
27647
 
            int ret;
27648
 
            if (mkdir ("conftestdir", 0700) < 0)
27649
 
              return 2;
27650
 
            fd = open ("conftestdir", O_RDONLY);
27651
 
            if (fd < 0)
27652
 
              return 3;
27653
 
            ret = fchownat (fd, "", -1, -1, 0);
27654
 
            close (fd);
27655
 
            rmdir ("conftestdir");
27656
 
            return ret == 0;
27657
 
 
27658
 
  ;
27659
 
  return 0;
27660
 
}
27661
 
_ACEOF
27662
 
if ac_fn_c_try_run "$LINENO"; then :
27663
 
  gl_cv_func_fchownat_empty_filename_works=yes
27664
 
else
27665
 
  gl_cv_func_fchownat_empty_filename_works=no
27666
 
fi
27667
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27668
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
27669
 
fi
27670
 
 
27671
 
 
27672
 
fi
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 :
27676
 
  REPLACE_FCHOWNAT=1
27677
 
 
27678
 
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
27679
 
 
27680
 
 
27681
 
fi
27682
 
 
27683
 
     if test $REPLACE_CHOWN = 1; then
27684
 
       REPLACE_FCHOWNAT=1
27685
 
     fi
27686
 
else
27687
 
  HAVE_FCHOWNAT=0
27688
 
fi
27689
 
 
27690
 
 
27691
 
 
27692
 
 
27693
 
 
27694
 
 
27695
 
 
27696
 
 
27697
 
  if test $ac_cv_func_fstatat = no; then
27698
 
    HAVE_FSTATAT=0
27699
 
  else
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
27704
 
else
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; }
27711
 
else
27712
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27713
 
/* end confdefs.h.  */
27714
 
 
27715
 
              #include <fcntl.h>
27716
 
              #include <sys/stat.h>
27717
 
              int
27718
 
              main (void)
27719
 
              {
27720
 
                struct stat a;
27721
 
                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
27722
 
              }
27723
 
 
27724
 
_ACEOF
27725
 
if ac_fn_c_try_run "$LINENO"; then :
27726
 
  gl_cv_func_fstatat_zero_flag=yes
27727
 
fi
27728
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27729
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
27730
 
fi
27731
 
 
27732
 
fi
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; }
27735
 
 
27736
 
    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
27737
 
    yes+yes) ;;
27738
 
    *) REPLACE_FSTATAT=1
27739
 
       if test $gl_cv_func_fstatat_zero_flag != yes; then
27740
 
 
27741
 
$as_echo "#define FSTATAT_ZERO_FLAG_BROKEN 1" >>confdefs.h
27742
 
 
27743
 
       fi
27744
 
       ;;
27745
 
    esac
27746
 
  fi
27747
 
 
27748
30578
 
27749
30579
 
27750
30580
 
27858
30688
    fi
27859
30689
  fi
27860
30690
 
27861
 
if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
 
30691
  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
27862
30692
 
27863
30693
 
27864
30694
 
27869
30699
 
27870
30700
  gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
27871
30701
 
27872
 
fi
 
30702
  fi
27873
30703
 
27874
30704
 
27875
30705
 
28284
31114
 
28285
31115
 
28286
31116
 
28287
 
if test $HAVE_GETADDRINFO = 0; then
 
31117
  if test $HAVE_GETADDRINFO = 0; then
28288
31118
 
28289
31119
 
28290
31120
 
28295
31125
 
28296
31126
  gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
28297
31127
 
28298
 
fi
28299
 
if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
 
31128
  fi
 
31129
  if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
28300
31130
 
28301
31131
 
28302
31132
 
28307
31137
 
28308
31138
  gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext"
28309
31139
 
28310
 
fi
 
31140
  fi
28311
31141
 
28312
31142
 
28313
31143
 
28329
31159
 
28330
31160
 
28331
31161
  gl_abort_bug=no
28332
 
  case $gl_cv_func_getcwd_null,$host_os in
28333
 
  *,mingw*)
28334
 
    gl_cv_func_getcwd_path_max=yes;;
28335
 
  yes,*)
 
31162
  case "$host_os" in
 
31163
    mingw*)
 
31164
      gl_cv_func_getcwd_path_max=yes
 
31165
      ;;
 
31166
    *)
 
31167
 
 
31168
 
28336
31169
 
28337
31170
 
28338
31171
 
28344
31177
  # Arrange for deletion of the temporary directory this test creates.
28345
31178
     ac_clean_files="$ac_clean_files confdir3"
28346
31179
          if test "$cross_compiling" = yes; then :
28347
 
  gl_cv_func_getcwd_path_max=no
 
31180
  case "$host_os" in
 
31181
       aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
 
31182
       *) gl_cv_func_getcwd_path_max=no;;
 
31183
     esac
28348
31184
else
28349
31185
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28350
31186
/* end confdefs.h.  */
28351
31187
 
28352
31188
#include <errno.h>
28353
31189
#include <stdlib.h>
28354
 
#include <unistd.h>
 
31190
#if HAVE_UNISTD_H
 
31191
# include <unistd.h>
 
31192
#else
 
31193
# include <direct.h>
 
31194
#endif
28355
31195
#include <string.h>
28356
31196
#include <limits.h>
28357
31197
#include <sys/stat.h>
28358
31198
#include <sys/types.h>
28359
31199
#include <fcntl.h>
28360
31200
 
 
31201
 
 
31202
/* Arrange to define PATH_MAX, like "pathmax.h" does. */
 
31203
#if HAVE_UNISTD_H
 
31204
# include <unistd.h>
 
31205
#endif
 
31206
#include <limits.h>
 
31207
#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
 
31208
# include <sys/param.h>
 
31209
#endif
 
31210
#if !defined PATH_MAX && defined MAXPATHLEN
 
31211
# define PATH_MAX MAXPATHLEN
 
31212
#endif
 
31213
#ifdef __hpux
 
31214
# undef PATH_MAX
 
31215
# define PATH_MAX 1024
 
31216
#endif
 
31217
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
31218
# undef PATH_MAX
 
31219
# define PATH_MAX 260
 
31220
#endif
 
31221
 
 
31222
 
28361
31223
#ifndef AT_FDCWD
28362
31224
# define AT_FDCWD 0
28363
31225
#endif
28440
31302
              fail = 11;
28441
31303
              break;
28442
31304
            }
28443
 
          if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
 
31305
          if (c)
 
31306
            {
 
31307
              fail = 31;
 
31308
              break;
 
31309
            }
 
31310
          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
28444
31311
            {
28445
31312
              fail = 21;
28446
31313
              break;
28503
31370
else
28504
31371
  case $? in
28505
31372
     10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
 
31373
     31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
28506
31374
     *) gl_cv_func_getcwd_path_max=no;;
28507
31375
     esac
28508
31376
fi
28514
31382
fi
28515
31383
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
28516
31384
$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
28517
 
  case $gl_cv_func_getcwd_path_max in
28518
 
  no,*)
28519
 
 
28520
 
$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
28521
 
;;
28522
 
  esac
 
31385
 
 
31386
      case "$gl_cv_func_getcwd_null" in
 
31387
        *yes)
 
31388
 
28523
31389
 
28524
31390
 
28525
31391
 
28550
31416
/* end confdefs.h.  */
28551
31417
 
28552
31418
#include <stdlib.h>
28553
 
#include <unistd.h>
28554
 
#include <limits.h>
 
31419
#if HAVE_UNISTD_H
 
31420
# include <unistd.h>
 
31421
#else /* on Windows with MSVC */
 
31422
# include <direct.h>
 
31423
#endif
28555
31424
#include <string.h>
28556
31425
#include <sys/stat.h>
28557
31426
 
 
31427
 
 
31428
/* Arrange to define PATH_MAX, like "pathmax.h" does. */
 
31429
#if HAVE_UNISTD_H
 
31430
# include <unistd.h>
 
31431
#endif
 
31432
#include <limits.h>
 
31433
#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
 
31434
# include <sys/param.h>
 
31435
#endif
 
31436
#if !defined PATH_MAX && defined MAXPATHLEN
 
31437
# define PATH_MAX MAXPATHLEN
 
31438
#endif
 
31439
#ifdef __hpux
 
31440
# undef PATH_MAX
 
31441
# define PATH_MAX 1024
 
31442
#endif
 
31443
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
31444
# undef PATH_MAX
 
31445
# define PATH_MAX 260
 
31446
#endif
 
31447
 
 
31448
 
28558
31449
/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
28559
31450
#undef mkdir
28560
31451
 
28608
31499
     results in a failed assertion.  */
28609
31500
  cwd = getcwd (NULL, 0);
28610
31501
  if (cwd == NULL)
28611
 
    fail = 4; /* getcwd failed.  This is ok, and expected.  */
 
31502
    fail = 4; /* getcwd failed: it refuses to return a string longer
 
31503
                 than PATH_MAX.  */
28612
31504
  free (cwd);
28613
31505
 
28614
31506
  /* Call rmdir first, in case the above chdir failed.  */
28630
31522
if ac_fn_c_try_run "$LINENO"; then :
28631
31523
  gl_cv_func_getcwd_abort_bug=no
28632
31524
else
28633
 
          test $? -gt 128 \
28634
 
      && gl_cv_func_getcwd_abort_bug=yes \
28635
 
      || gl_cv_func_getcwd_abort_bug=no
 
31525
                                ret=$?
 
31526
     if test $ret -ge 128 || test $ret = 4; then
 
31527
       gl_cv_func_getcwd_abort_bug=yes
 
31528
     else
 
31529
       gl_cv_func_getcwd_abort_bug=no
 
31530
     fi
28636
31531
fi
28637
31532
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28638
31533
  conftest.$ac_objext conftest.beam conftest.$ac_ext
28645
31540
  if test $gl_cv_func_getcwd_abort_bug = yes; then :
28646
31541
  gl_abort_bug=yes
28647
31542
fi
28648
 
;;
28649
 
  esac
28650
 
 
28651
 
  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature$gl_cv_func_getcwd_path_max,$gl_abort_bug in
28652
 
  *yes,yes,yes,no) ;;
28653
 
  *)
28654
 
        REPLACE_GETCWD=1;;
28655
 
  esac
28656
 
 
28657
 
if test $REPLACE_GETCWD = 1; then
 
31543
 
 
31544
          ;;
 
31545
      esac
 
31546
      ;;
 
31547
  esac
 
31548
      case "$gl_cv_func_getcwd_path_max" in
 
31549
    "no, it has the AIX bug") ;;
 
31550
    *)
 
31551
 
 
31552
$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
 
31553
 
 
31554
      ;;
 
31555
  esac
 
31556
  case "$gl_cv_func_getcwd_path_max" in
 
31557
    "no, but it is partly working")
 
31558
 
 
31559
$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
 
31560
 
 
31561
      ;;
 
31562
  esac
 
31563
 
 
31564
  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
 
31565
     || test $gl_cv_func_getcwd_posix_signature != yes \
 
31566
     || test "$gl_cv_func_getcwd_path_max" != yes \
 
31567
     || test $gl_abort_bug = yes; then
 
31568
    REPLACE_GETCWD=1
 
31569
  fi
 
31570
 
 
31571
  if test $REPLACE_GETCWD = 1; then
28658
31572
 
28659
31573
 
28660
31574
 
28670
31584
 
28671
31585
  :
28672
31586
 
28673
 
fi
 
31587
  fi
28674
31588
 
28675
31589
 
28676
31590
cat >>confdefs.h <<_ACEOF
28705
31619
    ;;
28706
31620
  esac
28707
31621
 
28708
 
if test $REPLACE_GETCWD = 1; then
 
31622
  if test $REPLACE_GETCWD = 1; then
28709
31623
 
28710
31624
 
28711
31625
 
28716
31630
 
28717
31631
  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
28718
31632
 
28719
 
fi
 
31633
  fi
28720
31634
 
28721
31635
 
28722
31636
 
28762
31676
_ACEOF
28763
31677
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28764
31678
  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
28765
 
  gl_cv_func_working_getdelim=yes
 
31679
  gl_cv_func_working_getdelim="guessing yes"
28766
31680
else
28767
 
  gl_cv_func_working_getdelim=no
 
31681
  gl_cv_func_working_getdelim="guessing no"
28768
31682
fi
28769
31683
rm -f conftest*
28770
31684
 
28814
31728
fi
28815
31729
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
28816
31730
$as_echo "$gl_cv_func_working_getdelim" >&6; }
28817
 
    if test $gl_cv_func_working_getdelim = no; then
28818
 
      REPLACE_GETDELIM=1
28819
 
    fi
 
31731
    case "$gl_cv_func_working_getdelim" in
 
31732
      *no)
 
31733
        REPLACE_GETDELIM=1
 
31734
        ;;
 
31735
    esac
28820
31736
  else
28821
31737
    HAVE_GETDELIM=0
28822
31738
  fi
28825
31741
    HAVE_DECL_GETDELIM=0
28826
31742
  fi
28827
31743
 
28828
 
if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
 
31744
  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
28829
31745
 
28830
31746
 
28831
31747
 
28861
31777
_ACEOF
28862
31778
 
28863
31779
 
28864
 
fi
 
31780
  fi
28865
31781
 
28866
31782
 
28867
31783
 
28884
31800
    HAVE_GETDTABLESIZE=0
28885
31801
  fi
28886
31802
 
28887
 
if test $HAVE_GETDTABLESIZE = 0; then
 
31803
  if test $HAVE_GETDTABLESIZE = 0; then
28888
31804
 
28889
31805
 
28890
31806
 
28895
31811
 
28896
31812
  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
28897
31813
 
28898
 
fi
 
31814
 
 
31815
 
 
31816
 
 
31817
  fi
28899
31818
 
28900
31819
 
28901
31820
 
28915
31834
 
28916
31835
 
28917
31836
 
28918
 
  if test "$ac_cv_func_getgroups" != yes; then
 
31837
 
 
31838
        ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
 
31839
if test "x$ac_cv_func_getgroups" = xyes; then :
 
31840
 
 
31841
fi
 
31842
 
 
31843
 
 
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.
 
31846
  ac_save_LIBS=$LIBS
 
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
 
31852
else
 
31853
  ac_check_lib_save_LIBS=$LIBS
 
31854
LIBS="-lbsd  $LIBS"
 
31855
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
31856
/* end confdefs.h.  */
 
31857
 
 
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.  */
 
31861
#ifdef __cplusplus
 
31862
extern "C"
 
31863
#endif
 
31864
char getgroups ();
 
31865
int
 
31866
main ()
 
31867
{
 
31868
return getgroups ();
 
31869
  ;
 
31870
  return 0;
 
31871
}
 
31872
_ACEOF
 
31873
if ac_fn_c_try_link "$LINENO"; then :
 
31874
  ac_cv_lib_bsd_getgroups=yes
 
31875
else
 
31876
  ac_cv_lib_bsd_getgroups=no
 
31877
fi
 
31878
rm -f core conftest.err conftest.$ac_objext \
 
31879
    conftest$ac_exeext conftest.$ac_ext
 
31880
LIBS=$ac_check_lib_save_LIBS
 
31881
fi
 
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
 
31886
fi
 
31887
 
 
31888
  fi
 
31889
 
 
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
 
31897
else
 
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" ;;
 
31904
          esac
 
31905
 
 
31906
else
 
31907
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
31908
/* end confdefs.h.  */
 
31909
$ac_includes_default
 
31910
int
 
31911
main ()
 
31912
{
 
31913
/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
 
31914
              return getgroups (0, 0) == -1;
 
31915
  ;
 
31916
  return 0;
 
31917
}
 
31918
 
 
31919
_ACEOF
 
31920
if ac_fn_c_try_run "$LINENO"; then :
 
31921
  ac_cv_func_getgroups_works=yes
 
31922
else
 
31923
  ac_cv_func_getgroups_works=no
 
31924
fi
 
31925
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
31926
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
31927
fi
 
31928
 
 
31929
 
 
31930
fi
 
31931
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
 
31932
$as_echo "$ac_cv_func_getgroups_works" >&6; }
 
31933
  else
 
31934
    ac_cv_func_getgroups_works=no
 
31935
  fi
 
31936
  case "$ac_cv_func_getgroups_works" in
 
31937
    *yes)
 
31938
 
 
31939
$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
 
31940
 
 
31941
      ;;
 
31942
  esac
 
31943
  LIBS=$ac_save_LIBS
 
31944
 
 
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
28921
 
  then
28922
 
    REPLACE_GETGROUPS=1
 
31947
  else
 
31948
    if test "$ac_cv_type_getgroups" != gid_t \
 
31949
       || { case "$ac_cv_func_getgroups_works" in
 
31950
              *yes) false;;
 
31951
              *) true;;
 
31952
            esac
 
31953
          }; then
 
31954
      REPLACE_GETGROUPS=1
28923
31955
 
28924
31956
$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28925
31957
 
28926
 
  else
28927
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
 
31958
    else
 
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
28931
31963
else
28932
31964
  if test "$cross_compiling" = yes; then :
28933
 
  gl_cv_func_getgroups_works="guessing no"
 
31965
  case "$host_os" in
 
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" ;;
 
31970
           esac
 
31971
 
28934
31972
else
28935
31973
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28936
31974
/* end confdefs.h.  */
28939
31977
main ()
28940
31978
{
28941
31979
int size = getgroups (0, 0);
28942
 
          gid_t *list = malloc (size * sizeof *list);
28943
 
          return getgroups (-1, list) != -1;
 
31980
            gid_t *list = malloc (size * sizeof *list);
 
31981
            return getgroups (-1, list) != -1;
28944
31982
  ;
28945
31983
  return 0;
28946
31984
}
28957
31995
fi
28958
31996
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28959
31997
$as_echo "$gl_cv_func_getgroups_works" >&6; }
28960
 
    if test "$gl_cv_func_getgroups_works" != yes; then
28961
 
      REPLACE_GETGROUPS=1
 
31998
      case "$gl_cv_func_getgroups_works" in
 
31999
        *yes) ;;
 
32000
        *) REPLACE_GETGROUPS=1 ;;
 
32001
      esac
28962
32002
    fi
28963
32003
  fi
28964
32004
  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28965
32005
 
28966
 
if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
 
32006
  if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28967
32007
 
28968
32008
 
28969
32009
 
28974
32014
 
28975
32015
  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28976
32016
 
28977
 
fi
 
32017
  fi
28978
32018
 
28979
32019
 
28980
32020
 
29081
32121
 
29082
32122
 
29083
32123
 
 
32124
 
29084
32125
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5
29085
32126
$as_echo_n "checking for HOST_NAME_MAX... " >&6; }
29086
32127
if ${gl_cv_decl_HOST_NAME_MAX+:} false; then :
29140
32181
 
29141
32182
  fi
29142
32183
 
29143
 
if test $HAVE_GETHOSTNAME = 0; then
 
32184
 
 
32185
  if test $HAVE_GETHOSTNAME = 0; then
29144
32186
 
29145
32187
 
29146
32188
 
29166
32208
 
29167
32209
  fi
29168
32210
 
29169
 
fi
 
32211
  fi
29170
32212
 
29171
32213
 
29172
32214
 
29237
32279
  fi
29238
32280
 
29239
32281
 
29240
 
if test $ac_cv_have_decl_gethrtime = no || test $gl_cv_arithmetic_hrtime_t = no; then
 
32282
  if test $ac_cv_have_decl_gethrtime = no || test $gl_cv_arithmetic_hrtime_t = no; then
29241
32283
 
29242
32284
 
29243
32285
 
29252
32294
 
29253
32295
  :
29254
32296
 
29255
 
fi
 
32297
  fi
29256
32298
 
29257
32299
 
29258
32300
 
29289
32331
_ACEOF
29290
32332
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29291
32333
  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
29292
 
  am_cv_func_working_getline=yes
 
32334
  am_cv_func_working_getline="guessing yes"
29293
32335
else
29294
 
  am_cv_func_working_getline=no
 
32336
  am_cv_func_working_getline="guessing no"
29295
32337
fi
29296
32338
rm -f conftest*
29297
32339
 
29347
32389
    HAVE_DECL_GETLINE=0
29348
32390
  fi
29349
32391
 
29350
 
  if test $am_cv_func_working_getline = no; then
29351
 
                REPLACE_GETLINE=1
29352
 
  fi
 
32392
  case "$am_cv_func_working_getline" in
 
32393
    *no)
 
32394
                        REPLACE_GETLINE=1
 
32395
      ;;
 
32396
  esac
29353
32397
 
29354
 
if test $REPLACE_GETLINE = 1; then
 
32398
  if test $REPLACE_GETLINE = 1; then
29355
32399
 
29356
32400
 
29357
32401
 
29365
32409
 
29366
32410
  :
29367
32411
 
29368
 
fi
 
32412
  fi
29369
32413
 
29370
32414
 
29371
32415
 
29388
32432
 
29389
32433
gl_save_LIBS=$LIBS
29390
32434
 
29391
 
# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
 
32435
# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
29392
32436
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
29393
32437
HAVE_GETLOADAVG=1
29394
32438
ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
29765
32809
  HAVE_SYS_LOADAVG_H=0
29766
32810
fi
29767
32811
ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
29768
 
   # include <sys/loadavg.h>
29769
 
   #endif
29770
 
   #include <stdlib.h>
 
32812
    # include <sys/loadavg.h>
 
32813
    #endif
 
32814
    #include <stdlib.h>
29771
32815
"
29772
32816
if test "x$ac_cv_have_decl_getloadavg" = xyes; then :
29773
32817
 
29776
32820
fi
29777
32821
 
29778
32822
 
29779
 
if test $HAVE_GETLOADAVG = 0; then
 
32823
  if test $HAVE_GETLOADAVG = 0; then
29780
32824
 
29781
32825
 
29782
32826
 
29790
32834
 
29791
32835
# Figure out what our getloadavg.c needs.
29792
32836
 
 
32837
 
 
32838
 
29793
32839
# On HPUX9, an unprivileged user can get load averages this way.
29794
32840
if test $gl_func_getloadavg_done = no; then
29795
32841
  for ac_func in pstat_getdynamic
29902
32948
 
29903
32949
done
29904
32950
 
29905
 
fi
 
32951
  fi
29906
32952
 
29907
32953
 
29908
32954
 
29921
32967
 
29922
32968
 
29923
32969
 
29924
 
 
29925
 
 
29926
 
 
29927
 
 
29928
 
 
29929
 
 
29930
 
 
29931
 
 
29932
 
 
29933
 
if test $REPLACE_GETOPT = 1; then
 
32970
  if test $ac_cv_func_getlogin = no; then
 
32971
    HAVE_GETLOGIN=0
 
32972
  fi
 
32973
 
 
32974
  if test $HAVE_GETLOGIN = 0; then
 
32975
 
 
32976
 
 
32977
 
 
32978
 
 
32979
 
 
32980
 
 
32981
 
 
32982
 
 
32983
  gl_LIBOBJS="$gl_LIBOBJS getlogin.$ac_objext"
 
32984
 
 
32985
  fi
 
32986
 
 
32987
 
 
32988
 
 
32989
 
 
32990
 
 
32991
          GNULIB_GETLOGIN=1
 
32992
 
 
32993
 
 
32994
 
 
32995
 
 
32996
 
 
32997
$as_echo "#define GNULIB_TEST_GETLOGIN 1" >>confdefs.h
 
32998
 
 
32999
 
 
33000
 
 
33001
 
 
33002
 
 
33003
 
 
33004
 
 
33005
 
 
33006
 
 
33007
 
 
33008
 
 
33009
 
 
33010
 
 
33011
 
 
33012
 
 
33013
  if test $REPLACE_GETOPT = 1; then
29934
33014
 
29935
33015
 
29936
33016
 
29954
33034
 
29955
33035
 
29956
33036
 
29957
 
fi
 
33037
        GNULIB_GL_UNISTD_H_GETOPT=1
 
33038
  fi
 
33039
 
29958
33040
 
29959
33041
 
29960
33042
$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
29964
33046
 
29965
33047
 
29966
33048
 
 
33049
 
29967
33050
    REPLACE_GETOPT=0
29968
 
 
29969
 
 
29970
 
  if test -n "$gl_replace_getopt"; then :
29971
 
 
 
33051
    if test -n "$gl_replace_getopt"; then
29972
33052
      REPLACE_GETOPT=1
29973
 
 
29974
 
fi
29975
 
 
 
33053
    fi
29976
33054
 
29977
33055
  if test $REPLACE_GETOPT = 1; then
29978
33056
 
29982
33060
 
29983
33061
 
29984
33062
 
29985
 
        GNULIB_UNISTD_H_GETOPT=1
29986
33063
  fi
29987
33064
 
29988
 
if test $REPLACE_GETOPT = 1; then
 
33065
  if test $REPLACE_GETOPT = 1; then
29989
33066
 
29990
33067
 
29991
33068
 
30009
33086
 
30010
33087
 
30011
33088
 
30012
 
fi
 
33089
        GNULIB_GL_UNISTD_H_GETOPT=1
 
33090
  fi
 
33091
 
30013
33092
 
30014
33093
 
30015
33094
 
30070
33149
fi
30071
33150
 
30072
33151
 
30073
 
if test $REPLACE_GETPAGESIZE = 1; then
 
33152
  if test $REPLACE_GETPAGESIZE = 1; then
30074
33153
 
30075
33154
 
30076
33155
 
30081
33160
 
30082
33161
  gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
30083
33162
 
30084
 
fi
 
33163
  fi
30085
33164
 
30086
33165
 
30087
33166
 
30109
33188
 
30110
33189
  fi
30111
33190
 
30112
 
if test $REPLACE_GETPASS = 1; then
 
33191
  if test $REPLACE_GETPASS = 1; then
30113
33192
 
30114
33193
 
30115
33194
 
30124
33203
 
30125
33204
 
30126
33205
  ac_fn_c_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include <stdio.h>
30127
 
     #if HAVE_STDIO_EXT_H
30128
 
      #include <stdio_ext.h>
30129
 
     #endif
 
33206
      #if HAVE_STDIO_EXT_H
 
33207
       #include <stdio_ext.h>
 
33208
      #endif
30130
33209
"
30131
33210
if test "x$ac_cv_have_decl___fsetlocking" = xyes; then :
30132
33211
  ac_have_decl=1
30145
33224
 
30146
33225
  :
30147
33226
 
30148
 
fi
30149
 
 
 
33227
  fi
30150
33228
 
30151
33229
 
30152
33230
 
30173
33251
  $as_echo_n "(cached) " >&6
30174
33252
else
30175
33253
  if test "$cross_compiling" = yes; then :
30176
 
       gl_cv_func_gettimeofday_clobber=yes
 
33254
  # When cross-compiling:
 
33255
      case "$host_os" in
 
33256
                # Guess all is fine on glibc systems.
 
33257
        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
 
33258
                # If we don't know, assume the worst.
 
33259
        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
 
33260
      esac
 
33261
 
30177
33262
else
30178
33263
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30179
33264
/* end confdefs.h.  */
30212
33297
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
30213
33298
$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
30214
33299
 
30215
 
 if test $gl_cv_func_gettimeofday_clobber = yes; then
30216
 
   REPLACE_GETTIMEOFDAY=1
 
33300
 case "$gl_cv_func_gettimeofday_clobber" in
 
33301
   *yes)
 
33302
     REPLACE_GETTIMEOFDAY=1
30217
33303
 
30218
33304
 
30219
33305
$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
30225
33311
 
30226
33312
$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
30227
33313
 
30228
 
 fi
 
33314
     ;;
 
33315
 esac
30229
33316
 
30230
33317
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
30231
33318
$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
30287
33374
    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
30288
33375
      REPLACE_GETTIMEOFDAY=1
30289
33376
    fi
30290
 
 
30291
 
 
30292
 
 
30293
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tzset clobbers localtime buffer" >&5
 
33377
        if test $REPLACE_STRUCT_TIMEVAL = 1; then
 
33378
      REPLACE_GETTIMEOFDAY=1
 
33379
    fi
 
33380
 
 
33381
 
 
33382
 
 
33383
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tzset clobbers localtime buffer" >&5
30294
33384
$as_echo_n "checking whether tzset clobbers localtime buffer... " >&6; }
30295
33385
if ${gl_cv_func_tzset_clobber+:} false; then :
30296
33386
  $as_echo_n "(cached) " >&6
30297
33387
else
30298
33388
 
30299
33389
  if test "$cross_compiling" = yes; then :
30300
 
  gl_cv_func_tzset_clobber=yes
 
33390
  case "$host_os" in
 
33391
                  # Guess all is fine on glibc systems.
 
33392
          *-gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
 
33393
                  # If we don't know, assume the worst.
 
33394
          *)      gl_cv_func_tzset_clobber="guessing yes" ;;
 
33395
        esac
 
33396
 
30301
33397
else
30302
33398
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30303
33399
/* end confdefs.h.  */
30341
33437
$as_echo "#define HAVE_RUN_TZSET_TEST 1" >>confdefs.h
30342
33438
 
30343
33439
 
30344
 
      if test $gl_cv_func_tzset_clobber = yes; then
30345
 
        REPLACE_GETTIMEOFDAY=1
 
33440
      case "$gl_cv_func_tzset_clobber" in
 
33441
        *yes)
 
33442
          REPLACE_GETTIMEOFDAY=1
30346
33443
 
30347
33444
 
30348
33445
$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
30357
33454
 
30358
33455
$as_echo "#define TZSET_CLOBBERS_LOCALTIME 1" >>confdefs.h
30359
33456
 
30360
 
      fi
 
33457
          ;;
 
33458
      esac
30361
33459
 
30362
33460
  fi
30363
33461
 
30366
33464
_ACEOF
30367
33465
 
30368
33466
 
30369
 
if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
 
33467
  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
30370
33468
 
30371
33469
 
30372
33470
 
30402
33500
done
30403
33501
 
30404
33502
 
30405
 
fi
 
33503
  fi
30406
33504
 
30407
33505
 
30408
33506
 
30448
33546
        HAVE_DECL_GETUSERSHELL=0
30449
33547
  fi
30450
33548
 
30451
 
if test $HAVE_GETUSERSHELL = 0; then
 
33549
  if test $HAVE_GETUSERSHELL = 0; then
30452
33550
 
30453
33551
 
30454
33552
 
30459
33557
 
30460
33558
  gl_LIBOBJS="$gl_LIBOBJS getusershell.$ac_objext"
30461
33559
 
30462
 
fi
 
33560
  fi
30463
33561
 
30464
33562
 
30465
33563
 
30485
33583
fi
30486
33584
 
30487
33585
 
30488
 
# Autoconf 2.61a.99 and earlier don't support linking a file only
30489
 
# in VPATH builds.  But since GNUmakefile is for maintainer use
30490
 
# only, it does not matter if we skip the link with older autoconf.
30491
 
# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
30492
 
# builds, so use a shell variable to bypass this.
30493
 
GNUmakefile=GNUmakefile
30494
 
ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
 
33586
  # Autoconf 2.61a.99 and earlier don't support linking a file only
 
33587
  # in VPATH builds.  But since GNUmakefile is for maintainer use
 
33588
  # only, it does not matter if we skip the link with older autoconf.
 
33589
  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
 
33590
  # builds, so use a shell variable to bypass this.
 
33591
  GNUmakefile=GNUmakefile
 
33592
  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
30495
33593
 
30496
33594
 
30497
33595
 
30508
33606
fi
30509
33607
 
30510
33608
 
30511
 
if test $HAVE_GROUP_MEMBER = 0; then
 
33609
  if test $HAVE_GROUP_MEMBER = 0; then
30512
33610
 
30513
33611
 
30514
33612
 
30522
33620
 
30523
33621
 
30524
33622
 
30525
 
fi
 
33623
  fi
30526
33624
 
30527
33625
 
30528
33626
 
30597
33695
       # from $host_os, but capitalizes its first letter.
30598
33696
       [A-Za-z]*)
30599
33697
         os=`
30600
 
           expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
 
33698
           expr "X$host_os" : 'X\([A-Za-z]\)' | LC_ALL=C tr '[a-z]' '[A-Z]'
30601
33699
         ``
30602
33700
           expr "X$host_os" : 'X.\([A-Za-z]*\)'
30603
33701
         `
30784
33882
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30785
33883
                 *)    gl_absname_cpp="$ac_cpp" ;;
30786
33884
               esac
 
33885
 
 
33886
               case "$host_os" in
 
33887
                 mingw*)
 
33888
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
33889
                   ;;
 
33890
                 *)
 
33891
                   gl_dirsep_regex='\/'
 
33892
                   ;;
 
33893
               esac
 
33894
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
33895
 
 
33896
               gl_header_literal_regex=`echo 'iconv.h' \
 
33897
                                        | sed -e "$gl_make_literal_regex_sed"`
 
33898
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
33899
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
33900
                   s|^/[^/]|//&|
 
33901
                   p
 
33902
                   q
 
33903
                 }'
30787
33904
                                                            gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30788
 
                  sed -n '\#/iconv.h#{
30789
 
                    s#.*"\(.*/iconv.h\)".*#\1#
30790
 
                    s#^/[^/]#//&#
30791
 
                    p
30792
 
                    q
30793
 
                  }'`'"'
 
33905
                      sed -n "$gl_absolute_header_sed"`'"'
30794
33906
          else
30795
33907
               gl_cv_next_iconv_h='<'iconv.h'>'
30796
33908
             fi
30884
33996
 
30885
33997
  fi
30886
33998
 
30887
 
if test $REPLACE_ICONV_OPEN = 1; then
 
33999
  if test $REPLACE_ICONV_OPEN = 1; then
30888
34000
 
30889
34001
 
30890
34002
 
30895
34007
 
30896
34008
  gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
30897
34009
 
30898
 
fi
30899
 
if test $REPLACE_ICONV = 1; then
 
34010
  fi
 
34011
  if test $REPLACE_ICONV = 1; then
30900
34012
 
30901
34013
 
30902
34014
 
30917
34029
 
30918
34030
  gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
30919
34031
 
30920
 
fi
 
34032
  fi
30921
34033
 
30922
34034
  :
30923
34035
 
30925
34037
 
30926
34038
 
30927
34039
 
30928
 
      HAVE_INET_NTOP=1
30929
 
  gl_save_LIBS=$LIBS
30930
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
 
34040
 
 
34041
 
 
34042
 
 
34043
              HAVE_INET_NTOP=1
 
34044
  INET_NTOP_LIB=
 
34045
 
 
34046
 
 
34047
 
 
34048
 
 
34049
  if test $ac_cv_header_sys_socket_h != yes; then
 
34050
                    for ac_header in winsock2.h
 
34051
do :
 
34052
  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 
34053
if test "x$ac_cv_header_winsock2_h" = xyes; then :
 
34054
  cat >>confdefs.h <<_ACEOF
 
34055
#define HAVE_WINSOCK2_H 1
 
34056
_ACEOF
 
34057
 
 
34058
fi
 
34059
 
 
34060
done
 
34061
 
 
34062
  fi
 
34063
  if test "$ac_cv_header_winsock2_h" = yes; then
 
34064
    HAVE_WINSOCK2_H=1
 
34065
    UNISTD_H_HAVE_WINSOCK2_H=1
 
34066
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 
34067
  else
 
34068
    HAVE_WINSOCK2_H=0
 
34069
  fi
 
34070
 
 
34071
 
 
34072
  if test $HAVE_WINSOCK2_H = 1; then
 
34073
    ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
 
34074
"
 
34075
if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
 
34076
  ac_have_decl=1
 
34077
else
 
34078
  ac_have_decl=0
 
34079
fi
 
34080
 
 
34081
cat >>confdefs.h <<_ACEOF
 
34082
#define HAVE_DECL_INET_NTOP $ac_have_decl
 
34083
_ACEOF
 
34084
 
 
34085
    if test $ac_cv_have_decl_inet_ntop = yes; then
 
34086
                  REPLACE_INET_NTOP=1
 
34087
      INET_NTOP_LIB="-lws2_32"
 
34088
    else
 
34089
      HAVE_DECL_INET_NTOP=0
 
34090
      HAVE_INET_NTOP=0
 
34091
    fi
 
34092
  else
 
34093
    gl_save_LIBS=$LIBS
 
34094
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
30931
34095
$as_echo_n "checking for library containing inet_ntop... " >&6; }
30932
34096
if ${ac_cv_search_inet_ntop+:} false; then :
30933
34097
  $as_echo_n "(cached) " >&6
30951
34115
  return 0;
30952
34116
}
30953
34117
_ACEOF
30954
 
for ac_lib in '' nsl; do
 
34118
for ac_lib in '' nsl resolv; do
30955
34119
  if test -z "$ac_lib"; then
30956
34120
    ac_res="none required"
30957
34121
  else
30993
34157
fi
30994
34158
done
30995
34159
 
30996
 
     if test $ac_cv_func_inet_ntop = no; then
30997
 
       HAVE_INET_NTOP=0
30998
 
     fi
 
34160
       if test $ac_cv_func_inet_ntop = no; then
 
34161
         HAVE_INET_NTOP=0
 
34162
       fi
30999
34163
 
31000
34164
fi
31001
34165
 
31002
 
  LIBS=$gl_save_LIBS
31003
 
 
31004
 
  INET_NTOP_LIB=
31005
 
  if test "$ac_cv_search_inet_ntop" != "no" &&
31006
 
     test "$ac_cv_search_inet_ntop" != "none required"; then
31007
 
    INET_NTOP_LIB="$ac_cv_search_inet_ntop"
31008
 
  fi
31009
 
 
31010
 
 
31011
 
 
31012
 
  ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
31013
 
     #if HAVE_NETDB_H
31014
 
     # include <netdb.h>
31015
 
     #endif
 
34166
    LIBS=$gl_save_LIBS
 
34167
 
 
34168
    if test "$ac_cv_search_inet_ntop" != "no" \
 
34169
       && test "$ac_cv_search_inet_ntop" != "none required"; then
 
34170
      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
 
34171
    fi
 
34172
 
 
34173
 
 
34174
    ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
 
34175
        #if HAVE_NETDB_H
 
34176
        # include <netdb.h>
 
34177
        #endif
31016
34178
 
31017
34179
"
31018
34180
if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
31025
34187
#define HAVE_DECL_INET_NTOP $ac_have_decl
31026
34188
_ACEOF
31027
34189
 
31028
 
  if test $ac_cv_have_decl_inet_ntop = no; then
31029
 
    HAVE_DECL_INET_NTOP=0
31030
 
 
 
34190
    if test $ac_cv_have_decl_inet_ntop = no; then
 
34191
      HAVE_DECL_INET_NTOP=0
 
34192
    fi
31031
34193
  fi
31032
34194
 
31033
 
if test $HAVE_INET_NTOP = 0; then
 
34195
 
 
34196
  if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
31034
34197
 
31035
34198
 
31036
34199
 
31044
34207
 
31045
34208
 
31046
34209
 
31047
 
fi
 
34210
  fi
31048
34211
 
31049
34212
 
31050
34213
 
31377
34540
    HAVE_ISAPIPE=0
31378
34541
  fi
31379
34542
 
31380
 
if test $HAVE_ISAPIPE = 0; then
 
34543
  if test $HAVE_ISAPIPE = 0; then
31381
34544
 
31382
34545
 
31383
34546
 
31477
34640
;;
31478
34641
  esac
31479
34642
 
31480
 
fi
 
34643
  fi
 
34644
 
 
34645
 
 
34646
         case $host_os in
 
34647
    mingw*) REPLACE_ISATTY=1 ;;
 
34648
  esac
 
34649
 
 
34650
  if test $REPLACE_ISATTY = 1; then
 
34651
 
 
34652
 
 
34653
 
 
34654
 
 
34655
 
 
34656
 
 
34657
 
 
34658
 
 
34659
  gl_LIBOBJS="$gl_LIBOBJS isatty.$ac_objext"
 
34660
 
 
34661
 
 
34662
 
 
34663
 
 
34664
  fi
 
34665
 
 
34666
 
 
34667
 
 
34668
 
 
34669
 
 
34670
          GNULIB_ISATTY=1
 
34671
 
 
34672
 
 
34673
 
 
34674
 
 
34675
 
 
34676
$as_echo "#define GNULIB_TEST_ISATTY 1" >>confdefs.h
 
34677
 
 
34678
 
 
34679
 
31481
34680
 
31482
34681
 
31483
34682
 
31487
34686
    HAVE_ISBLANK=0
31488
34687
  fi
31489
34688
 
31490
 
if test $HAVE_ISBLANK = 0; then
 
34689
  if test $HAVE_ISBLANK = 0; then
31491
34690
 
31492
34691
 
31493
34692
 
31498
34697
 
31499
34698
  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
31500
34699
 
31501
 
fi
 
34700
  fi
31502
34701
 
31503
34702
 
31504
34703
 
31555
34754
 
31556
34755
  fi
31557
34756
 
31558
 
if test $gl_func_isnand_no_libm != yes; then
 
34757
  if test $gl_func_isnand_no_libm != yes; then
31559
34758
 
31560
34759
 
31561
34760
 
31568
34767
 
31569
34768
 
31570
34769
 
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
31575
 
else
31576
 
 
31577
 
      if test "$cross_compiling" = yes; then :
31578
 
 
31579
 
                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31580
 
/* end confdefs.h.  */
31581
 
 
31582
 
#if defined arm || defined __arm || defined __arm__
31583
 
  mixed_endianness
31584
 
#endif
31585
 
 
31586
 
_ACEOF
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"
31590
 
else
31591
 
 
31592
 
                                                         :
31593
 
if ${ac_cv_c_bigendian+:} false; then :
31594
 
  $as_echo_n "(cached) " >&6
31595
 
else
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
31602
 
             #endif
31603
 
             typedef int dummy;
31604
 
 
31605
 
_ACEOF
31606
 
if ac_fn_c_try_compile "$LINENO"; then :
31607
 
 
31608
 
        # Check for potential -arch flags.  It is not universal unless
31609
 
        # there are at least two -arch flags with different values.
31610
 
        ac_arch=
31611
 
        ac_prev=
31612
 
        for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
31613
 
         if test -n "$ac_prev"; then
31614
 
           case $ac_word in
31615
 
             i?86 | x86_64 | ppc | ppc64)
31616
 
               if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
31617
 
                 ac_arch=$ac_word
31618
 
               else
31619
 
                 ac_cv_c_bigendian=universal
31620
 
                 break
31621
 
               fi
31622
 
               ;;
31623
 
           esac
31624
 
           ac_prev=
31625
 
         elif test "x$ac_word" = "x-arch"; then
31626
 
           ac_prev=arch
31627
 
         fi
31628
 
       done
31629
 
fi
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>
31637
 
 
31638
 
int
31639
 
main ()
31640
 
{
31641
 
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
31642
 
                     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
31643
 
                     && LITTLE_ENDIAN)
31644
 
              bogus endian macros
31645
 
             #endif
31646
 
 
31647
 
  ;
31648
 
  return 0;
31649
 
}
31650
 
_ACEOF
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>
31657
 
 
31658
 
int
31659
 
main ()
31660
 
{
31661
 
#if BYTE_ORDER != BIG_ENDIAN
31662
 
                 not big endian
31663
 
                #endif
31664
 
 
31665
 
  ;
31666
 
  return 0;
31667
 
}
31668
 
_ACEOF
31669
 
if ac_fn_c_try_compile "$LINENO"; then :
31670
 
  ac_cv_c_bigendian=yes
31671
 
else
31672
 
  ac_cv_c_bigendian=no
31673
 
fi
31674
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31675
 
fi
31676
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31677
 
    fi
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>
31683
 
 
31684
 
int
31685
 
main ()
31686
 
{
31687
 
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
31688
 
              bogus endian macros
31689
 
             #endif
31690
 
 
31691
 
  ;
31692
 
  return 0;
31693
 
}
31694
 
_ACEOF
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>
31700
 
 
31701
 
int
31702
 
main ()
31703
 
{
31704
 
#ifndef _BIG_ENDIAN
31705
 
                 not big endian
31706
 
                #endif
31707
 
 
31708
 
  ;
31709
 
  return 0;
31710
 
}
31711
 
_ACEOF
31712
 
if ac_fn_c_try_compile "$LINENO"; then :
31713
 
  ac_cv_c_bigendian=yes
31714
 
else
31715
 
  ac_cv_c_bigendian=no
31716
 
fi
31717
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31718
 
fi
31719
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31720
 
    fi
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];
31733
 
                }
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];
31740
 
                }
31741
 
                extern int foo;
31742
 
 
31743
 
int
31744
 
main ()
31745
 
{
31746
 
return use_ascii (foo) == use_ebcdic (foo);
31747
 
  ;
31748
 
  return 0;
31749
 
}
31750
 
_ACEOF
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
31754
 
            fi
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
31758
 
              else
31759
 
                # finding both strings is unlikely to happen, but who knows?
31760
 
                ac_cv_c_bigendian=unknown
31761
 
              fi
31762
 
            fi
31763
 
fi
31764
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31765
 
else
31766
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31767
 
/* end confdefs.h.  */
31768
 
$ac_includes_default
31769
 
int
31770
 
main ()
31771
 
{
31772
 
 
31773
 
             /* Are we little or big endian?  From Harbison&Steele.  */
31774
 
             union
31775
 
             {
31776
 
               long int l;
31777
 
               char c[sizeof (long int)];
31778
 
             } u;
31779
 
             u.l = 1;
31780
 
             return u.c[sizeof (long int) - 1] == 1;
31781
 
 
31782
 
  ;
31783
 
  return 0;
31784
 
}
31785
 
_ACEOF
31786
 
if ac_fn_c_try_run "$LINENO"; then :
31787
 
  ac_cv_c_bigendian=no
31788
 
else
31789
 
  ac_cv_c_bigendian=yes
31790
 
fi
31791
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31792
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
31793
 
fi
31794
 
 
31795
 
    fi
31796
 
fi
31797
 
:
31798
 
 case $ac_cv_c_bigendian in #(
31799
 
   yes)
31800
 
     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
31801
 
   no)
31802
 
     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
31803
 
   universal)
31804
 
 
31805
 
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
31806
 
 
31807
 
     ;; #(
31808
 
   *)
31809
 
     gl_cv_cc_double_expbit0="unknown" ;;
31810
 
 esac
31811
 
 
31812
 
 
31813
 
fi
31814
 
rm -f conftest*
31815
 
 
31816
 
 
31817
 
else
31818
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31819
 
/* end confdefs.h.  */
31820
 
 
31821
 
#include <float.h>
31822
 
#include <stddef.h>
31823
 
#include <stdio.h>
31824
 
#include <string.h>
31825
 
#define NWORDS \
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)
31831
 
{
31832
 
  memory_double m;
31833
 
  size_t i;
31834
 
  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
31835
 
  memset (&m, 0, sizeof (memory_double));
31836
 
  m.value = x;
31837
 
  for (i = 0; i < NWORDS; i++)
31838
 
    {
31839
 
      ored_words[i] |= m.word[i];
31840
 
      anded_words[i] &= m.word[i];
31841
 
    }
31842
 
}
31843
 
int main ()
31844
 
{
31845
 
  size_t j;
31846
 
  FILE *fp = fopen ("conftest.out", "w");
31847
 
  if (fp == NULL)
31848
 
    return 1;
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)
31863
 
      break;
31864
 
  if (j < NWORDS)
31865
 
    {
31866
 
      size_t i;
31867
 
      for (i = j + 1; i < NWORDS; i++)
31868
 
        if (ored_words[i] != 0)
31869
 
          {
31870
 
            fprintf (fp, "unknown");
31871
 
            return (fclose (fp) != 0);
31872
 
          }
31873
 
      for (i = 0; ; i++)
31874
 
        if ((ored_words[j] >> i) & 1)
31875
 
          {
31876
 
            fprintf (fp, "word %d bit %d", (int) j, (int) i);
31877
 
            return (fclose (fp) != 0);
31878
 
          }
31879
 
    }
31880
 
  fprintf (fp, "unknown");
31881
 
  return (fclose (fp) != 0);
31882
 
}
31883
 
 
31884
 
_ACEOF
31885
 
if ac_fn_c_try_run "$LINENO"; then :
31886
 
  gl_cv_cc_double_expbit0=`cat conftest.out`
31887
 
else
31888
 
  gl_cv_cc_double_expbit0="unknown"
31889
 
fi
31890
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31891
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
31892
 
fi
31893
 
 
31894
 
      rm -f conftest.out
31895
 
 
31896
 
fi
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
31900
 
    word*bit*)
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 //'`
31903
 
 
31904
 
cat >>confdefs.h <<_ACEOF
31905
 
#define DBL_EXPBIT0_WORD $word
31906
 
_ACEOF
31907
 
 
31908
 
 
31909
 
cat >>confdefs.h <<_ACEOF
31910
 
#define DBL_EXPBIT0_BIT $bit
31911
 
_ACEOF
31912
 
 
31913
 
      ;;
31914
 
  esac
31915
 
 
31916
 
 
31917
 
fi
 
34770
 
 
34771
  fi
31918
34772
 
31919
34773
 
31920
34774
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
32055
34909
    gl_func_isnanf_no_libm=no
32056
34910
  fi
32057
34911
 
32058
 
if test $gl_func_isnanf_no_libm != yes; then
 
34912
  if test $gl_func_isnanf_no_libm != yes; then
32059
34913
 
32060
34914
 
32061
34915
 
32177
35031
  esac
32178
35032
 
32179
35033
 
32180
 
fi
 
35034
  fi
32181
35035
 
32182
35036
 
32183
35037
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
32222
35076
 
32223
35077
 
32224
35078
 
 
35079
 
32225
35080
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
32226
35081
$as_echo_n "checking whether isnanl works... " >&6; }
32227
35082
if ${gl_cv_func_isnanl_works+:} false; then :
32292
35147
      result |= 1;
32293
35148
  }
32294
35149
 
32295
 
#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
 
35150
#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
32296
35151
/* Representation of an 80-bit 'long double' as an initializer for a sequence
32297
35152
   of 'unsigned int' words.  */
32298
35153
# ifdef WORDS_BIGENDIAN
32385
35240
 
32386
35241
  fi
32387
35242
 
32388
 
if test $gl_func_isnanl_no_libm != yes; then
 
35243
  if test $gl_func_isnanl_no_libm != yes; then
32389
35244
 
32390
35245
 
32391
35246
 
32511
35366
  esac
32512
35367
 
32513
35368
 
32514
 
fi
 
35369
 
 
35370
  fi
32515
35371
 
32516
35372
 
32517
35373
 
32554
35410
  fi
32555
35411
 
32556
35412
 
32557
 
if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32558
 
  :
32559
 
else
32560
 
  if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
 
35413
  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
 
35414
    :
 
35415
  else
 
35416
    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
32561
35417
 
32562
35418
 
32563
35419
 
32568
35424
 
32569
35425
  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
32570
35426
 
 
35427
    fi
32571
35428
  fi
32572
 
fi
32573
35429
 
32574
35430
 
32575
35431
 
32620
35476
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32621
35477
                 *)    gl_absname_cpp="$ac_cpp" ;;
32622
35478
               esac
 
35479
 
 
35480
               case "$host_os" in
 
35481
                 mingw*)
 
35482
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
35483
                   ;;
 
35484
                 *)
 
35485
                   gl_dirsep_regex='\/'
 
35486
                   ;;
 
35487
               esac
 
35488
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
35489
 
 
35490
               gl_header_literal_regex=`echo 'langinfo.h' \
 
35491
                                        | sed -e "$gl_make_literal_regex_sed"`
 
35492
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
35493
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
35494
                   s|^/[^/]|//&|
 
35495
                   p
 
35496
                   q
 
35497
                 }'
32623
35498
                                                            gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32624
 
                  sed -n '\#/langinfo.h#{
32625
 
                    s#.*"\(.*/langinfo.h\)".*#\1#
32626
 
                    s#^/[^/]#//&#
32627
 
                    p
32628
 
                    q
32629
 
                  }'`'"'
 
35499
                      sed -n "$gl_absolute_header_sed"`'"'
32630
35500
          else
32631
35501
               gl_cv_next_langinfo_h='<'langinfo.h'>'
32632
35502
             fi
32792
35662
 
32793
35663
 
32794
35664
 
32795
 
    for gl_func in nl_langinfo; do
32796
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32797
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32798
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32799
 
if eval \${$as_gl_Symbol+:} false; then :
32800
 
  $as_echo_n "(cached) " >&6
32801
 
else
32802
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32803
 
/* end confdefs.h.  */
32804
 
#include <langinfo.h>
32805
 
 
32806
 
int
32807
 
main ()
32808
 
{
32809
 
#undef $gl_func
32810
 
  (void) $gl_func;
32811
 
  ;
32812
 
  return 0;
32813
 
}
32814
 
_ACEOF
32815
 
if ac_fn_c_try_compile "$LINENO"; then :
32816
 
  eval "$as_gl_Symbol=yes"
32817
 
else
32818
 
  eval "$as_gl_Symbol=no"
32819
 
fi
32820
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32821
 
fi
32822
 
eval ac_res=\$$as_gl_Symbol
32823
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32824
 
$as_echo "$ac_res" >&6; }
32825
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32826
 
  cat >>confdefs.h <<_ACEOF
32827
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32828
 
_ACEOF
32829
 
 
32830
 
                     eval ac_cv_have_decl_$gl_func=yes
32831
 
fi
32832
 
      done
32833
35665
 
32834
35666
 
32835
35667
 
32874
35706
 
32875
35707
  if test $ac_cv_func_lchown = no; then
32876
35708
    HAVE_LCHOWN=0
32877
 
  elif test "$gl_cv_func_chown_slash_works" != yes \
32878
 
      || test "$gl_cv_func_chown_ctime_works" != yes; then
32879
 
        REPLACE_LCHOWN=1
 
35709
  else
 
35710
        case "$gl_cv_func_chown_slash_works" in
 
35711
      *yes) ;;
 
35712
      *)
 
35713
        REPLACE_LCHOWN=1
 
35714
        ;;
 
35715
    esac
 
35716
    case "$gl_cv_func_chown_ctime_works" in
 
35717
      *yes) ;;
 
35718
      *)
 
35719
        REPLACE_LCHOWN=1
 
35720
        ;;
 
35721
    esac
32880
35722
  fi
32881
35723
 
32882
 
if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
 
35724
  if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
32883
35725
 
32884
35726
 
32885
35727
 
32890
35732
 
32891
35733
  gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
32892
35734
 
32893
 
fi
 
35735
  fi
32894
35736
 
32895
35737
 
32896
35738
 
32981
35823
         ln -s conftest.a conftest.lnk
32982
35824
       fi
32983
35825
       if test "$cross_compiling" = yes; then :
32984
 
  gl_cv_func_link_works="guessing no"
 
35826
  case "$host_os" in
 
35827
                    # Guess yes on glibc systems.
 
35828
            *-gnu*) gl_cv_func_link_works="guessing yes" ;;
 
35829
                    # If we don't know, assume the worst.
 
35830
            *)      gl_cv_func_link_works="guessing no" ;;
 
35831
          esac
 
35832
 
32985
35833
else
32986
35834
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32987
35835
/* end confdefs.h.  */
33020
35868
fi
33021
35869
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
33022
35870
$as_echo "$gl_cv_func_link_works" >&6; }
33023
 
    if test "$gl_cv_func_link_works" != yes; then
33024
 
      REPLACE_LINK=1
33025
 
    fi
 
35871
    case "$gl_cv_func_link_works" in
 
35872
      *yes) ;;
 
35873
      *)
 
35874
        REPLACE_LINK=1
 
35875
        ;;
 
35876
    esac
33026
35877
  fi
33027
35878
 
33028
 
if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
 
35879
  if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
33029
35880
 
33030
35881
 
33031
35882
 
33036
35887
 
33037
35888
  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
33038
35889
 
33039
 
fi
 
35890
  fi
33040
35891
 
33041
35892
 
33042
35893
 
33094
35945
         # Create a regular file.
33095
35946
         echo > conftest.file
33096
35947
         if test "$cross_compiling" = yes; then :
33097
 
             gl_cv_func_link_follows_symlink=unknown
 
35948
                                                 case "$host_os" in
 
35949
                           # On glibc/Linux we know the result.
 
35950
              linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
 
35951
                           # Otherwise, we don't know.
 
35952
              *)           gl_cv_func_link_follows_symlink=unknown ;;
 
35953
            esac
 
35954
 
33098
35955
else
33099
35956
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33100
35957
/* end confdefs.h.  */
33149
36006
fi
33150
36007
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
33151
36008
$as_echo "$gl_cv_func_link_follows_symlink" >&6; }
33152
 
      case $gl_cv_func_link_follows_symlink in
33153
 
        yes) gl_link_follows_symlinks=1 ;;
33154
 
        no) ;; # already defaulted to 0
 
36009
      case "$gl_cv_func_link_follows_symlink" in
 
36010
        *yes) gl_link_follows_symlinks=1 ;;
 
36011
        *no) ;; # already defaulted to 0
33155
36012
        *) gl_link_follows_symlinks=-2 ;;
33156
36013
      esac
33157
36014
    fi
33290
36147
    fi
33291
36148
  fi
33292
36149
 
33293
 
if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
 
36150
  if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
33294
36151
 
33295
36152
 
33296
36153
 
33301
36158
 
33302
36159
  gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
33303
36160
 
33304
 
fi
33305
 
if test $HAVE_LINKAT = 0; then
 
36161
  fi
 
36162
  if test $HAVE_LINKAT = 0; then
33306
36163
 
33307
36164
 
33308
36165
 
33313
36170
 
33314
36171
  gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
33315
36172
 
33316
 
fi
 
36173
  fi
33317
36174
 
33318
36175
 
33319
36176
 
33337
36194
 
33338
36195
 
33339
36196
 
33340
 
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
33341
 
 
33342
 
 
33343
 
 
33344
 
 
33345
 
 
33346
 
 
33347
 
 
 
36197
  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
 
36198
 
 
36199
 
 
36200
 
 
36201
 
 
36202
 
 
36203
 
 
36204
 
 
36205
 
 
36206
 
 
36207
  case "$host_os" in
 
36208
    solaris*)
 
36209
 
 
36210
$as_echo "#define _LCONV_C99 1" >>confdefs.h
 
36211
 
 
36212
      ;;
 
36213
  esac
33348
36214
 
33349
36215
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
33350
36216
$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
33355
36221
/* end confdefs.h.  */
33356
36222
#include <locale.h>
33357
36223
            int x = LC_MESSAGES;
 
36224
            int y = sizeof (((struct lconv *) 0)->decimal_point);
33358
36225
int
33359
36226
main ()
33360
36227
{
33414
36281
  fi
33415
36282
 
33416
36283
 
 
36284
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
 
36285
$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
 
36286
if ${gl_cv_sys_struct_lconv_ok+:} false; then :
 
36287
  $as_echo_n "(cached) " >&6
 
36288
else
 
36289
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
36290
/* end confdefs.h.  */
 
36291
#include <locale.h>
 
36292
            struct lconv l;
 
36293
            int x = sizeof (l.decimal_point);
 
36294
            int y = sizeof (l.int_p_cs_precedes);
 
36295
int
 
36296
main ()
 
36297
{
 
36298
 
 
36299
  ;
 
36300
  return 0;
 
36301
}
 
36302
_ACEOF
 
36303
if ac_fn_c_try_compile "$LINENO"; then :
 
36304
  gl_cv_sys_struct_lconv_ok=yes
 
36305
else
 
36306
  gl_cv_sys_struct_lconv_ok=no
 
36307
fi
 
36308
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
36309
 
 
36310
fi
 
36311
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
 
36312
$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
 
36313
  if test $gl_cv_sys_struct_lconv_ok = no; then
 
36314
    REPLACE_STRUCT_LCONV=1
 
36315
  fi
 
36316
 
33417
36317
 
33418
36318
 
33419
36319
 
33440
36340
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33441
36341
                 *)    gl_absname_cpp="$ac_cpp" ;;
33442
36342
               esac
 
36343
 
 
36344
               case "$host_os" in
 
36345
                 mingw*)
 
36346
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
36347
                   ;;
 
36348
                 *)
 
36349
                   gl_dirsep_regex='\/'
 
36350
                   ;;
 
36351
               esac
 
36352
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
36353
 
 
36354
               gl_header_literal_regex=`echo 'locale.h' \
 
36355
                                        | sed -e "$gl_make_literal_regex_sed"`
 
36356
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
36357
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
36358
                   s|^/[^/]|//&|
 
36359
                   p
 
36360
                   q
 
36361
                 }'
33443
36362
                                                            gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33444
 
                  sed -n '\#/locale.h#{
33445
 
                    s#.*"\(.*/locale.h\)".*#\1#
33446
 
                    s#^/[^/]#//&#
33447
 
                    p
33448
 
                    q
33449
 
                  }'`'"'
 
36363
                      sed -n "$gl_absolute_header_sed"`'"'
33450
36364
 
33451
36365
 
33452
36366
fi
33469
36383
 
33470
36384
 
33471
36385
 
33472
 
    for gl_func in setlocale duplocale; do
33473
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33474
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33475
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33476
 
if eval \${$as_gl_Symbol+:} false; then :
33477
 
  $as_echo_n "(cached) " >&6
33478
 
else
33479
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33480
 
/* end confdefs.h.  */
33481
 
#include <locale.h>
33482
 
/* Some systems provide declarations in a non-standard header.  */
33483
 
#if HAVE_XLOCALE_H
33484
 
# include <xlocale.h>
33485
 
#endif
33486
 
 
33487
 
int
33488
 
main ()
33489
 
{
33490
 
#undef $gl_func
33491
 
  (void) $gl_func;
33492
 
  ;
33493
 
  return 0;
33494
 
}
33495
 
_ACEOF
33496
 
if ac_fn_c_try_compile "$LINENO"; then :
33497
 
  eval "$as_gl_Symbol=yes"
33498
 
else
33499
 
  eval "$as_gl_Symbol=no"
33500
 
fi
33501
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33502
 
fi
33503
 
eval ac_res=\$$as_gl_Symbol
33504
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33505
 
$as_echo "$ac_res" >&6; }
33506
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33507
 
  cat >>confdefs.h <<_ACEOF
33508
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33509
 
_ACEOF
33510
 
 
33511
 
                     eval ac_cv_have_decl_$gl_func=yes
33512
 
fi
33513
 
      done
 
36386
 
 
36387
 
 
36388
 
 
36389
 
 
36390
 
 
36391
  if test $REPLACE_STRUCT_LCONV = 1; then
 
36392
    REPLACE_LOCALECONV=1
 
36393
  fi
 
36394
 
 
36395
  if test $REPLACE_LOCALECONV = 1; then
 
36396
 
 
36397
 
 
36398
 
 
36399
 
 
36400
 
 
36401
 
 
36402
 
 
36403
 
 
36404
  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
 
36405
 
 
36406
 
 
36407
  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
 
36408
"
 
36409
if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
 
36410
 
 
36411
cat >>confdefs.h <<_ACEOF
 
36412
#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
 
36413
_ACEOF
 
36414
 
 
36415
 
 
36416
fi
 
36417
 
 
36418
 
 
36419
  fi
 
36420
 
 
36421
 
 
36422
 
 
36423
 
 
36424
 
 
36425
          GNULIB_LOCALECONV=1
 
36426
 
 
36427
 
 
36428
 
 
36429
 
 
36430
 
 
36431
$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
 
36432
 
33514
36433
 
33515
36434
 
33516
36435
 
33517
36436
 
33518
36437
  if test "$gl_threads_api" = posix; then
33519
 
    # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
 
36438
    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
33520
36439
    # pthread_rwlock_* functions.
33521
36440
    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
33522
36441
"
33560
36479
 
33561
36480
 
33562
36481
 
 
36482
 
 
36483
 
 
36484
 
33563
36485
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
33564
36486
$as_echo_n "checking whether lseek detects pipes... " >&6; }
33565
36487
if ${gl_cv_func_lseek_pipe+:} false; then :
33566
36488
  $as_echo_n "(cached) " >&6
33567
36489
else
33568
 
  if test $cross_compiling = no; then
33569
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
36490
  case "$host_os" in
 
36491
       mingw*)
 
36492
                                                               gl_cv_func_lseek_pipe=no
 
36493
         ;;
 
36494
       *)
 
36495
         if test $cross_compiling = no; then
 
36496
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33570
36497
/* end confdefs.h.  */
33571
36498
 
33572
36499
#include <sys/types.h> /* for off_t */
33573
36500
#include <stdio.h> /* for SEEK_CUR */
33574
 
#include <unistd.h>
 
36501
#if HAVE_UNISTD_H
 
36502
# include <unistd.h>
 
36503
#else /* on Windows with MSVC */
 
36504
# include <io.h>
 
36505
#endif
 
36506
 
33575
36507
int
33576
36508
main ()
33577
36509
{
33585
36517
_ACEOF
33586
36518
if ac_fn_c_try_link "$LINENO"; then :
33587
36519
  if test -s conftest$ac_exeext \
33588
 
             && ./conftest$ac_exeext < conftest.$ac_ext \
33589
 
             && test 1 = "`echo hi \
33590
 
               | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
33591
 
            gl_cv_func_lseek_pipe=yes
33592
 
          else
33593
 
            gl_cv_func_lseek_pipe=no
33594
 
          fi
 
36520
                 && ./conftest$ac_exeext < conftest.$ac_ext \
 
36521
                 && test 1 = "`echo hi \
 
36522
                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
 
36523
                gl_cv_func_lseek_pipe=yes
 
36524
              else
 
36525
                gl_cv_func_lseek_pipe=no
 
36526
              fi
 
36527
 
33595
36528
else
33596
36529
  gl_cv_func_lseek_pipe=no
33597
36530
fi
33598
36531
rm -f core conftest.err conftest.$ac_objext \
33599
36532
    conftest$ac_exeext conftest.$ac_ext
33600
 
     else
33601
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
36533
         else
 
36534
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33602
36535
/* end confdefs.h.  */
33603
36536
 
33604
 
#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
33605
 
/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
 
36537
#if defined __BEOS__
 
36538
/* BeOS mistakenly return 0 when trying to seek on pipes.  */
33606
36539
  Choke me.
33607
36540
#endif
33608
36541
_ACEOF
33612
36545
  gl_cv_func_lseek_pipe=no
33613
36546
fi
33614
36547
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33615
 
     fi
 
36548
         fi
 
36549
         ;;
 
36550
     esac
 
36551
 
33616
36552
fi
33617
36553
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
33618
36554
$as_echo "$gl_cv_func_lseek_pipe" >&6; }
33623
36559
 
33624
36560
  fi
33625
36561
 
33626
 
if test $REPLACE_LSEEK = 1; then
 
36562
 
 
36563
  if test $WINDOWS_64_BIT_OFF_T = 1; then
 
36564
    REPLACE_LSEEK=1
 
36565
  fi
 
36566
 
 
36567
  if test $REPLACE_LSEEK = 1; then
33627
36568
 
33628
36569
 
33629
36570
 
33634
36575
 
33635
36576
  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
33636
36577
 
33637
 
fi
 
36578
  fi
33638
36579
 
33639
36580
 
33640
36581
 
33655
36596
 
33656
36597
  if test $ac_cv_func_lstat = yes; then
33657
36598
 
33658
 
    if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
33659
 
      REPLACE_LSTAT=1
33660
 
    fi
 
36599
    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
 
36600
      *no)
 
36601
        REPLACE_LSTAT=1
 
36602
        ;;
 
36603
    esac
33661
36604
  else
33662
36605
    HAVE_LSTAT=0
33663
36606
  fi
33664
36607
 
33665
 
if test $REPLACE_LSTAT = 1; then
 
36608
  if test $REPLACE_LSTAT = 1; then
33666
36609
 
33667
36610
 
33668
36611
 
33677
36620
 
33678
36621
  :
33679
36622
 
33680
 
fi
 
36623
  fi
33681
36624
 
33682
36625
 
33683
36626
 
33696
36639
 
33697
36640
 
33698
36641
 
33699
 
    for ac_header in stdlib.h
 
36642
 
 
36643
      for ac_header in stdlib.h
33700
36644
do :
33701
36645
  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
33702
36646
if test "x$ac_cv_header_stdlib_h" = xyes; then :
33708
36652
 
33709
36653
done
33710
36654
 
33711
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
 
36655
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
33712
36656
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
33713
36657
if ${ac_cv_func_malloc_0_nonnull+:} false; then :
33714
36658
  $as_echo_n "(cached) " >&6
33715
36659
else
33716
36660
  if test "$cross_compiling" = yes; then :
33717
 
  ac_cv_func_malloc_0_nonnull=no
 
36661
  case "$host_os" in
 
36662
          # Guess yes on platforms where we know the result.
 
36663
          *-gnu* | freebsd* | netbsd* | openbsd* \
 
36664
          | hpux* | solaris* | cygwin* | mingw*)
 
36665
            ac_cv_func_malloc_0_nonnull=yes ;;
 
36666
          # If we don't know, assume the worst.
 
36667
          *) ac_cv_func_malloc_0_nonnull=no ;;
 
36668
        esac
 
36669
 
33718
36670
else
33719
36671
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33720
36672
/* end confdefs.h.  */
33721
36673
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
33722
 
# include <stdlib.h>
33723
 
#else
33724
 
char *malloc ();
33725
 
#endif
 
36674
            # include <stdlib.h>
 
36675
            #else
 
36676
            char *malloc ();
 
36677
            #endif
33726
36678
 
33727
36679
int
33728
36680
main ()
33731
36683
  ;
33732
36684
  return 0;
33733
36685
}
 
36686
 
33734
36687
_ACEOF
33735
36688
if ac_fn_c_try_run "$LINENO"; then :
33736
36689
  ac_cv_func_malloc_0_nonnull=yes
33741
36694
  conftest.$ac_objext conftest.beam conftest.$ac_ext
33742
36695
fi
33743
36696
 
 
36697
 
33744
36698
fi
33745
36699
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
33746
36700
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
33747
 
if test $ac_cv_func_malloc_0_nonnull = yes; then :
 
36701
  if test $ac_cv_func_malloc_0_nonnull = yes; then :
33748
36702
 
33749
36703
$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
33750
36704
 
33756
36710
fi
33757
36711
 
33758
36712
 
33759
 
if test $REPLACE_MALLOC = 1; then
 
36713
  if test $REPLACE_MALLOC = 1; then
33760
36714
 
33761
36715
 
33762
36716
 
33767
36721
 
33768
36722
  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33769
36723
 
33770
 
fi
 
36724
  fi
33771
36725
 
33772
36726
 
33773
36727
cat >>confdefs.h <<_ACEOF
33786
36740
    REPLACE_MALLOC=1
33787
36741
  fi
33788
36742
 
33789
 
if test $REPLACE_MALLOC = 1; then
 
36743
  if test $REPLACE_MALLOC = 1; then
33790
36744
 
33791
36745
 
33792
36746
 
33797
36751
 
33798
36752
  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33799
36753
 
33800
 
fi
 
36754
  fi
33801
36755
 
33802
36756
 
33803
36757
 
33849
36803
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33850
36804
                 *)    gl_absname_cpp="$ac_cpp" ;;
33851
36805
               esac
 
36806
 
 
36807
               case "$host_os" in
 
36808
                 mingw*)
 
36809
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
36810
                   ;;
 
36811
                 *)
 
36812
                   gl_dirsep_regex='\/'
 
36813
                   ;;
 
36814
               esac
 
36815
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
36816
 
 
36817
               gl_header_literal_regex=`echo 'math.h' \
 
36818
                                        | sed -e "$gl_make_literal_regex_sed"`
 
36819
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
36820
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
36821
                   s|^/[^/]|//&|
 
36822
                   p
 
36823
                   q
 
36824
                 }'
33852
36825
                                                            gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33853
 
                  sed -n '\#/math.h#{
33854
 
                    s#.*"\(.*/math.h\)".*#\1#
33855
 
                    s#^/[^/]#//&#
33856
 
                    p
33857
 
                    q
33858
 
                  }'`'"'
 
36826
                      sed -n "$gl_absolute_header_sed"`'"'
33859
36827
          else
33860
36828
               gl_cv_next_math_h='<'math.h'>'
33861
36829
             fi
33948
36916
  fi
33949
36917
 
33950
36918
 
33951
 
    for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl     ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do
33952
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33953
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33954
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33955
 
if eval \${$as_gl_Symbol+:} false; then :
33956
 
  $as_echo_n "(cached) " >&6
33957
 
else
33958
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33959
 
/* end confdefs.h.  */
33960
 
#include <math.h>
33961
 
 
33962
 
int
33963
 
main ()
33964
 
{
33965
 
#undef $gl_func
33966
 
  (void) $gl_func;
33967
 
  ;
33968
 
  return 0;
33969
 
}
33970
 
_ACEOF
33971
 
if ac_fn_c_try_compile "$LINENO"; then :
33972
 
  eval "$as_gl_Symbol=yes"
33973
 
else
33974
 
  eval "$as_gl_Symbol=no"
33975
 
fi
33976
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33977
 
fi
33978
 
eval ac_res=\$$as_gl_Symbol
33979
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33980
 
$as_echo "$ac_res" >&6; }
33981
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33982
 
  cat >>confdefs.h <<_ACEOF
33983
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33984
 
_ACEOF
33985
 
 
33986
 
                     eval ac_cv_have_decl_$gl_func=yes
33987
 
fi
33988
 
      done
33989
 
 
33990
 
 
33991
 
 
33992
36919
 
33993
36920
 
33994
36921
 
34035
36962
    fi
34036
36963
  fi
34037
36964
 
34038
 
if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
 
36965
  if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
34039
36966
 
34040
36967
 
34041
36968
 
34049
36976
 
34050
36977
  :
34051
36978
 
34052
 
fi
 
36979
  fi
34053
36980
 
34054
36981
 
34055
36982
 
34628
37555
    fi
34629
37556
  fi
34630
37557
 
34631
 
if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
 
37558
  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
34632
37559
 
34633
37560
 
34634
37561
 
34642
37569
 
34643
37570
  :
34644
37571
 
34645
 
fi
 
37572
  fi
34646
37573
 
34647
37574
 
34648
37575
 
34866
37793
    fi
34867
37794
  fi
34868
37795
 
34869
 
if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
 
37796
  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
34870
37797
 
34871
37798
 
34872
37799
 
34880
37807
 
34881
37808
  :
34882
37809
 
34883
 
fi
 
37810
  fi
34884
37811
 
34885
37812
 
34886
37813
 
35226
38153
    fi
35227
38154
  fi
35228
38155
 
35229
 
if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
 
38156
  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
35230
38157
 
35231
38158
 
35232
38159
 
35250
38177
 
35251
38178
  :
35252
38179
 
35253
 
fi
 
38180
  fi
35254
38181
 
35255
38182
 
35256
38183
 
35386
38313
    REPLACE_MBTOWC=1
35387
38314
  fi
35388
38315
 
35389
 
if test $REPLACE_MBTOWC = 1; then
 
38316
  if test $REPLACE_MBTOWC = 1; then
35390
38317
 
35391
38318
 
35392
38319
 
35400
38327
 
35401
38328
  :
35402
38329
 
35403
 
fi
 
38330
  fi
35404
38331
 
35405
38332
 
35406
38333
 
35418
38345
 
35419
38346
 
35420
38347
 
35421
 
 
35422
 
  :
35423
 
 
35424
 
 
35425
 
  :
35426
 
 
35427
 
 
35428
 
if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
 
38348
  :
 
38349
 
 
38350
 
 
38351
  :
 
38352
 
 
38353
 
 
38354
  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
35429
38355
 
35430
38356
 
35431
38357
 
35450
38376
done
35451
38377
 
35452
38378
 
35453
 
fi
 
38379
  fi
35454
38380
 
35455
38381
 
35456
38382
 
35490
38416
    HAVE_MEMPCPY=0
35491
38417
  fi
35492
38418
 
35493
 
if test $HAVE_MEMPCPY = 0; then
 
38419
  if test $HAVE_MEMPCPY = 0; then
35494
38420
 
35495
38421
 
35496
38422
 
35504
38430
 
35505
38431
  :
35506
38432
 
35507
 
fi
 
38433
  fi
35508
38434
 
35509
38435
 
35510
38436
 
35541
38467
done
35542
38468
 
35543
38469
 
35544
 
if test $ac_cv_func_memrchr = no; then
 
38470
  if test $ac_cv_func_memrchr = no; then
35545
38471
 
35546
38472
 
35547
38473
 
35552
38478
 
35553
38479
  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
35554
38480
 
35555
 
  :
35556
 
fi
 
38481
    :
 
38482
  fi
35557
38483
 
35558
38484
 
35559
38485
 
35584
38510
else
35585
38511
  rm -rf conftest.dir
35586
38512
      if test "$cross_compiling" = yes; then :
35587
 
  gl_cv_func_mkdir_trailing_slash_works="guessing no"
 
38513
  case "$host_os" in
 
38514
                 # Guess yes on glibc systems.
 
38515
         *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
 
38516
                 # If we don't know, assume the worst.
 
38517
         *)      gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
 
38518
       esac
 
38519
 
35588
38520
else
35589
38521
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35590
38522
/* end confdefs.h.  */
35615
38547
fi
35616
38548
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
35617
38549
$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
35618
 
  if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
35619
 
    REPLACE_MKDIR=1
35620
 
  fi
 
38550
  case "$gl_cv_func_mkdir_trailing_slash_works" in
 
38551
    *yes) ;;
 
38552
    *)
 
38553
      REPLACE_MKDIR=1
 
38554
      ;;
 
38555
  esac
35621
38556
 
35622
38557
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
35623
38558
$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
35626
38561
else
35627
38562
  rm -rf conftest.dir
35628
38563
      if test "$cross_compiling" = yes; then :
35629
 
  gl_cv_func_mkdir_trailing_dot_works="guessing no"
 
38564
  case "$host_os" in
 
38565
                 # Guess yes on glibc systems.
 
38566
         *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
 
38567
                 # If we don't know, assume the worst.
 
38568
         *)      gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
 
38569
       esac
 
38570
 
35630
38571
else
35631
38572
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35632
38573
/* end confdefs.h.  */
35657
38598
fi
35658
38599
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
35659
38600
$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
35660
 
  if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
35661
 
    REPLACE_MKDIR=1
 
38601
  case "$gl_cv_func_mkdir_trailing_dot_works" in
 
38602
    *yes) ;;
 
38603
    *)
 
38604
      REPLACE_MKDIR=1
35662
38605
 
35663
38606
$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
35664
38607
 
35665
 
  fi
 
38608
      ;;
 
38609
  esac
35666
38610
 
35667
 
if test $REPLACE_MKDIR = 1; then
 
38611
  if test $REPLACE_MKDIR = 1; then
35668
38612
 
35669
38613
 
35670
38614
 
35675
38619
 
35676
38620
  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
35677
38621
 
35678
 
fi
 
38622
  fi
 
38623
 
 
38624
 
 
38625
 
 
38626
 
 
38627
 
 
38628
 
 
38629
  if test $ac_cv_func_mkfifo = no; then
 
38630
    HAVE_MKFIFO=0
 
38631
  else
 
38632
 
 
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
 
38637
else
 
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
 
38641
       fi
 
38642
       if test "$cross_compiling" = yes; then :
 
38643
  case "$host_os" in
 
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" ;;
 
38648
          esac
 
38649
 
 
38650
else
 
38651
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
38652
/* end confdefs.h.  */
 
38653
#include <sys/stat.h>
 
38654
 
 
38655
int
 
38656
main ()
 
38657
{
 
38658
int result = 0;
 
38659
             if (!mkfifo ("conftest.tmp/", 0600))
 
38660
               result |= 1;
 
38661
#if HAVE_LSTAT
 
38662
             if (!mkfifo ("conftest.lnk/", 0600))
 
38663
               result |= 2;
 
38664
#endif
 
38665
             return result;
 
38666
 
 
38667
  ;
 
38668
  return 0;
 
38669
}
 
38670
_ACEOF
 
38671
if ac_fn_c_try_run "$LINENO"; then :
 
38672
  gl_cv_func_mkfifo_works=yes
 
38673
else
 
38674
  gl_cv_func_mkfifo_works=no
 
38675
fi
 
38676
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
38677
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
38678
fi
 
38679
 
 
38680
       rm -f conftest.tmp conftest.lnk
 
38681
fi
 
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
 
38685
      *yes) ;;
 
38686
      *)
 
38687
 
 
38688
$as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
 
38689
 
 
38690
        REPLACE_MKFIFO=1
 
38691
        ;;
 
38692
    esac
 
38693
  fi
 
38694
 
 
38695
  if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
 
38696
 
 
38697
 
 
38698
 
 
38699
 
 
38700
 
 
38701
 
 
38702
 
 
38703
 
 
38704
  gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
 
38705
 
 
38706
  fi
 
38707
 
 
38708
 
 
38709
 
 
38710
 
 
38711
 
 
38712
          GNULIB_MKFIFO=1
 
38713
 
 
38714
 
 
38715
 
 
38716
 
 
38717
 
 
38718
$as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
 
38719
 
 
38720
 
 
38721
 
 
38722
 
 
38723
 
 
38724
 
 
38725
 
 
38726
 
 
38727
  if test $ac_cv_func_mknod = no; then
 
38728
    HAVE_MKNOD=0
 
38729
  else
 
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
 
38734
else
 
38735
  if test "$cross_compiling" = yes; then :
 
38736
  case "$host_os" in
 
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" ;;
 
38741
          esac
 
38742
 
 
38743
else
 
38744
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
38745
/* end confdefs.h.  */
 
38746
#include <sys/stat.h>
 
38747
             #include <unistd.h>
 
38748
 
 
38749
             /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
 
38750
             #ifdef __TANDEM
 
38751
             # define ROOT_UID 65535
 
38752
             #else
 
38753
             # define ROOT_UID 0
 
38754
             #endif
 
38755
 
 
38756
int
 
38757
main ()
 
38758
{
 
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;
 
38763
  ;
 
38764
  return 0;
 
38765
}
 
38766
_ACEOF
 
38767
if ac_fn_c_try_run "$LINENO"; then :
 
38768
  gl_cv_func_mknod_works=yes
 
38769
else
 
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; }
 
38775
          fi
 
38776
          gl_cv_func_mknod_works=no
 
38777
fi
 
38778
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
38779
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
38780
fi
 
38781
 
 
38782
       rm -f conftest.fifo
 
38783
fi
 
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
 
38787
      *yes) ;;
 
38788
      *)
 
38789
        REPLACE_MKNOD=1
 
38790
 
 
38791
$as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
 
38792
 
 
38793
        ;;
 
38794
    esac
 
38795
        if test $REPLACE_MKFIFO = 1; then
 
38796
      REPLACE_MKNOD=1
 
38797
    fi
 
38798
  fi
 
38799
 
 
38800
  if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
 
38801
 
 
38802
 
 
38803
 
 
38804
 
 
38805
 
 
38806
 
 
38807
 
 
38808
 
 
38809
  gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
 
38810
 
 
38811
  fi
 
38812
 
 
38813
 
 
38814
 
 
38815
 
 
38816
 
 
38817
          GNULIB_MKNOD=1
 
38818
 
 
38819
 
 
38820
 
 
38821
 
 
38822
 
 
38823
$as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
35679
38824
 
35680
38825
 
35681
38826
 
35692
38837
 
35693
38838
        mkdir conftest.mkstemp
35694
38839
        if test "$cross_compiling" = yes; then :
35695
 
  gl_cv_func_working_mkstemp="guessing no"
 
38840
  case "$host_os" in
 
38841
                     # Guess yes on glibc systems.
 
38842
             *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
 
38843
                     # If we don't know, assume the worst.
 
38844
             *)      gl_cv_func_working_mkstemp="guessing no" ;;
 
38845
           esac
 
38846
 
35696
38847
else
35697
38848
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35698
38849
/* end confdefs.h.  */
35745
38896
fi
35746
38897
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
35747
38898
$as_echo "$gl_cv_func_working_mkstemp" >&6; }
35748
 
    if test "$gl_cv_func_working_mkstemp" != yes; then
35749
 
      REPLACE_MKSTEMP=1
35750
 
    fi
 
38899
    case "$gl_cv_func_working_mkstemp" in
 
38900
      *yes) ;;
 
38901
      *)
 
38902
        REPLACE_MKSTEMP=1
 
38903
        ;;
 
38904
    esac
35751
38905
  else
35752
38906
    HAVE_MKSTEMP=0
35753
38907
  fi
35754
38908
 
35755
 
if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
 
38909
  if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
35756
38910
 
35757
38911
 
35758
38912
 
35765
38919
 
35766
38920
 
35767
38921
 
35768
 
fi
 
38922
  fi
35769
38923
 
35770
38924
 
35771
38925
 
35788
38942
 
35789
38943
 
35790
38944
  if test $APPLE_UNIVERSAL_BUILD = 1; then
35791
 
    # A universal build on Apple MacOS X platforms.
 
38945
    # A universal build on Apple Mac OS X platforms.
35792
38946
    # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
35793
38947
    # But we need a configuration result that is valid in both modes.
35794
38948
    gl_cv_func_working_mktime=no
35970
39124
      if (tz_strings[i])
35971
39125
        putenv (tz_strings[i]);
35972
39126
 
35973
 
      for (t = 0; t <= time_t_max - delta; t += delta)
 
39127
      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
35974
39128
        if (! mktime_test (t))
35975
39129
          result |= 1;
35976
 
      if (! (mktime_test ((time_t) 1)
35977
 
             && mktime_test ((time_t) (60 * 60))
35978
 
             && mktime_test ((time_t) (60 * 60 * 24))))
 
39130
      if ((result & 2) == 0
 
39131
          && ! (mktime_test ((time_t) 1)
 
39132
                && mktime_test ((time_t) (60 * 60))
 
39133
                && mktime_test ((time_t) (60 * 60 * 24))))
35979
39134
        result |= 2;
35980
39135
 
35981
 
      for (j = 1; ; j <<= 1)
35982
 
        if (! bigtime_test (j))
35983
 
          result |= 4;
35984
 
        else if (INT_MAX / 2 < j)
35985
 
          break;
35986
 
      if (! bigtime_test (INT_MAX))
 
39136
      for (j = 1; (result & 4) == 0; j <<= 1)
 
39137
        {
 
39138
          if (! bigtime_test (j))
 
39139
            result |= 4;
 
39140
          if (INT_MAX / 2 < j)
 
39141
            break;
 
39142
        }
 
39143
      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
35987
39144
        result |= 8;
35988
39145
    }
35989
39146
  if (! irix_6_4_bug ())
36015
39172
    REPLACE_MKTIME=0
36016
39173
  fi
36017
39174
 
36018
 
if test $REPLACE_MKTIME = 1; then
 
39175
  if test $REPLACE_MKTIME = 1; then
36019
39176
 
36020
39177
 
36021
39178
 
36026
39183
 
36027
39184
  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
36028
39185
 
36029
 
 
36030
 
 
36031
 
 
36032
 
fi
 
39186
    :
 
39187
  fi
36033
39188
 
36034
39189
 
36035
39190
 
36219
39374
# with other getmntent implementations.
36220
39375
 
36221
39376
# NOTE: Normally, I wouldn't use a check for system type as I've done for
36222
 
# `CRAY' below since that goes against the whole autoconf philosophy.  But
 
39377
# 'CRAY' below since that goes against the whole autoconf philosophy.  But
36223
39378
# I think there is too great a chance that some non-Cray system has a
36224
39379
# function named listmntent to risk the false positive.
36225
39380
 
36693
39848
 
36694
39849
 
36695
39850
 
36696
 
if test $gl_cv_list_mounted_fs = yes; then
 
39851
  if test $gl_cv_list_mounted_fs = yes; then
36697
39852
 
36698
39853
 
36699
39854
 
36735
39890
 
36736
39891
 
36737
39892
 
36738
 
fi
36739
 
 
36740
 
 
 
39893
  fi
 
39894
 
 
39895
 
 
39896
 
 
39897
 
 
39898
 
 
39899
  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
 
39900
    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
 
39901
 
 
39902
$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
39903
 
 
39904
  else
 
39905
    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
 
39906
  fi
 
39907
 
 
39908
 
 
39909
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
39910
 
 
39911
 
 
39912
 
 
39913
 
 
39914
 
 
39915
 
 
39916
 
 
39917
 
 
39918
  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
 
39919
 
 
39920
  fi
 
39921
 
 
39922
 
 
39923
 
 
39924
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
39925
 
 
39926
 
 
39927
 
 
39928
 
 
39929
 
 
39930
 
 
39931
 
 
39932
 
 
39933
  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
 
39934
 
 
39935
  fi
36741
39936
 
36742
39937
 
36743
39938
 
36814
40009
 
36815
40010
 
36816
40011
   if test $APPLE_UNIVERSAL_BUILD = 1; then
36817
 
     # A universal build on Apple MacOS X platforms.
 
40012
     # A universal build on Apple Mac OS X platforms.
36818
40013
     # The test result would be 'no (mishandles large arguments)' in 64-bit
36819
40014
     # mode but 'yes' in 32-bit mode. But we need a configuration result that
36820
40015
     # is valid in both modes.
36828
40023
else
36829
40024
 
36830
40025
     if test "$cross_compiling" = yes; then :
36831
 
  gl_cv_func_nanosleep=cross-compiling
 
40026
  case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
 
40027
            gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
 
40028
          *)      # If we don't know, assume the worst.
 
40029
            gl_cv_func_nanosleep='guessing no' ;;
 
40030
        esac
 
40031
 
36832
40032
else
36833
40033
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36834
40034
/* end confdefs.h.  */
36860
40060
            static struct timespec ts_sleep;
36861
40061
            static struct timespec ts_remaining;
36862
40062
            static struct sigaction act;
 
40063
            /* Test for major problems first.  */
36863
40064
            if (! nanosleep)
36864
40065
              return 2;
36865
40066
            act.sa_handler = check_for_SIGALRM;
36870
40071
            alarm (1);
36871
40072
            if (nanosleep (&ts_sleep, NULL) != 0)
36872
40073
              return 3;
 
40074
            /* Test for a minor problem: the handling of large arguments.  */
36873
40075
            ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
36874
40076
            ts_sleep.tv_nsec = 999999999;
36875
40077
            alarm (1);
36896
40098
fi
36897
40099
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
36898
40100
$as_echo "$gl_cv_func_nanosleep" >&6; }
36899
 
   if test "$gl_cv_func_nanosleep" = yes; then
36900
 
     REPLACE_NANOSLEEP=0
36901
 
   else
36902
 
     REPLACE_NANOSLEEP=1
36903
 
     if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then
 
40101
   case "$gl_cv_func_nanosleep" in
 
40102
     *yes)
 
40103
       REPLACE_NANOSLEEP=0
 
40104
       ;;
 
40105
     *)
 
40106
       REPLACE_NANOSLEEP=1
 
40107
       case "$gl_cv_func_nanosleep" in
 
40108
         *"mishandles large arguments"*)
36904
40109
 
36905
40110
$as_echo "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
36906
40111
 
36907
 
     else
36908
 
       for ac_lib in $LIBSOCKET; do
36909
 
         case " $LIB_NANOSLEEP " in
36910
 
         *" $ac_lib "*) ;;
36911
 
         *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
36912
 
         esac
36913
 
       done
36914
 
     fi
36915
 
   fi
 
40112
           ;;
 
40113
         *)
 
40114
           # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
 
40115
           for ac_lib in $LIBSOCKET; do
 
40116
             case " $LIB_NANOSLEEP " in
 
40117
               *" $ac_lib "*) ;;
 
40118
               *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
 
40119
             esac
 
40120
           done
 
40121
           ;;
 
40122
       esac
 
40123
       ;;
 
40124
   esac
36916
40125
 else
36917
40126
   HAVE_NANOSLEEP=0
36918
40127
 fi
36919
40128
 LIBS=$nanosleep_save_libs
36920
40129
 
36921
 
if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
 
40130
  if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
36922
40131
 
36923
40132
 
36924
40133
 
36935
40144
 
36936
40145
 
36937
40146
 
36938
 
fi
 
40147
  fi
36939
40148
 
36940
40149
 
36941
40150
 
36983
40192
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36984
40193
                 *)    gl_absname_cpp="$ac_cpp" ;;
36985
40194
               esac
 
40195
 
 
40196
               case "$host_os" in
 
40197
                 mingw*)
 
40198
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
40199
                   ;;
 
40200
                 *)
 
40201
                   gl_dirsep_regex='\/'
 
40202
                   ;;
 
40203
               esac
 
40204
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
40205
 
 
40206
               gl_header_literal_regex=`echo 'netdb.h' \
 
40207
                                        | sed -e "$gl_make_literal_regex_sed"`
 
40208
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
40209
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
40210
                   s|^/[^/]|//&|
 
40211
                   p
 
40212
                   q
 
40213
                 }'
36986
40214
                                                            gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36987
 
                  sed -n '\#/netdb.h#{
36988
 
                    s#.*"\(.*/netdb.h\)".*#\1#
36989
 
                    s#^/[^/]#//&#
36990
 
                    p
36991
 
                    q
36992
 
                  }'`'"'
 
40215
                      sed -n "$gl_absolute_header_sed"`'"'
36993
40216
          else
36994
40217
               gl_cv_next_netdb_h='<'netdb.h'>'
36995
40218
             fi
37021
40244
 
37022
40245
 
37023
40246
 
37024
 
    for gl_func in getaddrinfo freeaddrinfo gai_strerror getnameinfo; do
37025
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37026
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37027
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37028
 
if eval \${$as_gl_Symbol+:} false; then :
37029
 
  $as_echo_n "(cached) " >&6
37030
 
else
37031
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37032
 
/* end confdefs.h.  */
37033
 
#include <netdb.h>
37034
 
int
37035
 
main ()
37036
 
{
37037
 
#undef $gl_func
37038
 
  (void) $gl_func;
37039
 
  ;
37040
 
  return 0;
37041
 
}
37042
 
_ACEOF
37043
 
if ac_fn_c_try_compile "$LINENO"; then :
37044
 
  eval "$as_gl_Symbol=yes"
37045
 
else
37046
 
  eval "$as_gl_Symbol=no"
37047
 
fi
37048
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37049
 
fi
37050
 
eval ac_res=\$$as_gl_Symbol
37051
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37052
 
$as_echo "$ac_res" >&6; }
37053
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37054
 
  cat >>confdefs.h <<_ACEOF
37055
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37056
 
_ACEOF
37057
 
 
37058
 
                     eval ac_cv_have_decl_$gl_func=yes
37059
 
fi
37060
 
      done
37061
 
 
37062
40247
 
37063
40248
 
37064
40249
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
37134
40319
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
37135
40320
                 *)    gl_absname_cpp="$ac_cpp" ;;
37136
40321
               esac
 
40322
 
 
40323
               case "$host_os" in
 
40324
                 mingw*)
 
40325
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
40326
                   ;;
 
40327
                 *)
 
40328
                   gl_dirsep_regex='\/'
 
40329
                   ;;
 
40330
               esac
 
40331
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
40332
 
 
40333
               gl_header_literal_regex=`echo 'netinet/in.h' \
 
40334
                                        | sed -e "$gl_make_literal_regex_sed"`
 
40335
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
40336
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
40337
                   s|^/[^/]|//&|
 
40338
                   p
 
40339
                   q
 
40340
                 }'
37137
40341
                                                            gl_cv_next_netinet_in_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37138
 
                  sed -n '\#/netinet/in.h#{
37139
 
                    s#.*"\(.*/netinet/in.h\)".*#\1#
37140
 
                    s#^/[^/]#//&#
37141
 
                    p
37142
 
                    q
37143
 
                  }'`'"'
 
40342
                      sed -n "$gl_absolute_header_sed"`'"'
37144
40343
          else
37145
40344
               gl_cv_next_netinet_in_h='<'netinet/in.h'>'
37146
40345
             fi
37251
40450
    HAVE_NL_LANGINFO=0
37252
40451
  fi
37253
40452
 
37254
 
if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
 
40453
  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
37255
40454
 
37256
40455
 
37257
40456
 
37262
40461
 
37263
40462
  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
37264
40463
 
37265
 
fi
 
40464
  fi
37266
40465
 
37267
40466
 
37268
40467
 
37282
40481
 
37283
40482
 
37284
40483
 
 
40484
 
37285
40485
  for ac_header in sys/pstat.h sys/sysmp.h sys/param.h
37286
40486
do :
37287
40487
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
37510
40710
 
37511
40711
 
37512
40712
 
37513
 
if test $REPLACE_OPEN = 1; then
 
40713
  if test $REPLACE_OPEN = 1; then
37514
40714
 
37515
40715
 
37516
40716
 
37526
40726
 
37527
40727
  :
37528
40728
 
37529
 
fi
 
40729
  fi
37530
40730
 
37531
40731
 
37532
40732
 
37544
40744
 
37545
40745
 
37546
40746
 
37547
 
  GNULIB_OPENAT=1
37548
 
 
37549
 
 
37550
 
  GNULIB_FCHMODAT=1
37551
 
  GNULIB_FSTATAT=1
37552
 
  GNULIB_MKDIRAT=1
37553
 
 
37554
 
 
37555
 
  GNULIB_FCHOWNAT=1
37556
 
  GNULIB_UNLINKAT=1
37557
 
 
37558
 
 
37559
40747
 
37560
40748
 
37561
40749
 
37562
40750
  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
37563
 
  yes+yes)
37564
 
    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
37565
 
    if test $REPLACE_UNLINK = 1; then
37566
 
      REPLACE_UNLINKAT=1
37567
 
    fi ;;
 
40751
  yes+*yes)
 
40752
    ;;
37568
40753
  yes+*)
37569
40754
    # Solaris 9 has *at functions, but uniformly mishandles trailing
37570
40755
    # slash in all of them.
37571
40756
    REPLACE_OPENAT=1
37572
 
    REPLACE_UNLINKAT=1
37573
40757
    ;;
37574
40758
  *)
37575
40759
    HAVE_OPENAT=0
37576
 
    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
37577
 
 
37578
 
 
37579
 
 
37580
 
  :
37581
 
;;
 
40760
    ;;
37582
40761
  esac
37583
 
  if test $ac_cv_func_fchmodat != yes; then
37584
 
    HAVE_FCHMODAT=0
37585
 
  fi
37586
 
  if test $ac_cv_func_mkdirat != yes; then
37587
 
    HAVE_MKDIRAT=0
37588
 
  fi
37589
 
 
37590
 
 
37591
 
 
37592
 
  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
37593
 
if test "x$ac_cv_func_fchownat" = xyes; then :
37594
 
 
37595
 
 
37596
 
 
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
37601
 
else
37602
 
 
37603
 
     gl_dangle=conftest.dangle
37604
 
     # Remove any remnants of a previous test.
37605
 
     rm -f $gl_dangle
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
37611
 
else
37612
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37613
 
/* end confdefs.h.  */
37614
 
 
37615
 
#include <fcntl.h>
37616
 
#include <unistd.h>
37617
 
#include <stdlib.h>
37618
 
#include <errno.h>
37619
 
#include <sys/types.h>
37620
 
int
37621
 
main ()
37622
 
{
37623
 
  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
37624
 
                    AT_SYMLINK_NOFOLLOW) != 0
37625
 
          && errno == ENOENT);
37626
 
}
37627
 
 
37628
 
_ACEOF
37629
 
if ac_fn_c_try_run "$LINENO"; then :
37630
 
  gl_cv_func_fchownat_nofollow_works=yes
37631
 
else
37632
 
  gl_cv_func_fchownat_nofollow_works=no
37633
 
fi
37634
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37635
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
37636
 
fi
37637
 
 
37638
 
 
37639
 
fi
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 :
37643
 
  REPLACE_FCHOWNAT=1
37644
 
 
37645
 
$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
37646
 
 
37647
 
 
37648
 
fi
37649
 
 
37650
 
 
37651
 
 
37652
 
 
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
37657
 
else
37658
 
  if test "$cross_compiling" = yes; then :
37659
 
  gl_cv_func_fchownat_empty_filename_works="guessing no"
37660
 
else
37661
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37662
 
/* end confdefs.h.  */
37663
 
#include <unistd.h>
37664
 
            #include <fcntl.h>
37665
 
 
37666
 
int
37667
 
main ()
37668
 
{
37669
 
int fd;
37670
 
            int ret;
37671
 
            if (mkdir ("conftestdir", 0700) < 0)
37672
 
              return 2;
37673
 
            fd = open ("conftestdir", O_RDONLY);
37674
 
            if (fd < 0)
37675
 
              return 3;
37676
 
            ret = fchownat (fd, "", -1, -1, 0);
37677
 
            close (fd);
37678
 
            rmdir ("conftestdir");
37679
 
            return ret == 0;
37680
 
 
37681
 
  ;
37682
 
  return 0;
37683
 
}
37684
 
_ACEOF
37685
 
if ac_fn_c_try_run "$LINENO"; then :
37686
 
  gl_cv_func_fchownat_empty_filename_works=yes
37687
 
else
37688
 
  gl_cv_func_fchownat_empty_filename_works=no
37689
 
fi
37690
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37691
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
37692
 
fi
37693
 
 
37694
 
 
37695
 
fi
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 :
37699
 
  REPLACE_FCHOWNAT=1
37700
 
 
37701
 
$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
37702
 
 
37703
 
 
37704
 
fi
37705
 
 
37706
 
     if test $REPLACE_CHOWN = 1; then
37707
 
       REPLACE_FCHOWNAT=1
37708
 
     fi
37709
 
else
37710
 
  HAVE_FCHOWNAT=0
37711
 
fi
37712
 
 
37713
 
 
37714
 
 
37715
 
 
37716
 
 
37717
 
 
37718
 
 
37719
 
 
37720
 
  if test $ac_cv_func_fstatat = no; then
37721
 
    HAVE_FSTATAT=0
37722
 
  else
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
37727
 
else
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; }
37734
 
else
37735
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37736
 
/* end confdefs.h.  */
37737
 
 
37738
 
              #include <fcntl.h>
37739
 
              #include <sys/stat.h>
37740
 
              int
37741
 
              main (void)
37742
 
              {
37743
 
                struct stat a;
37744
 
                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
37745
 
              }
37746
 
 
37747
 
_ACEOF
37748
 
if ac_fn_c_try_run "$LINENO"; then :
37749
 
  gl_cv_func_fstatat_zero_flag=yes
37750
 
fi
37751
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37752
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
37753
 
fi
37754
 
 
37755
 
fi
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; }
37758
 
 
37759
 
    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
37760
 
    yes+yes) ;;
37761
 
    *) REPLACE_FSTATAT=1
37762
 
       if test $gl_cv_func_fstatat_zero_flag != yes; then
37763
 
 
37764
 
$as_echo "#define FSTATAT_ZERO_FLAG_BROKEN 1" >>confdefs.h
37765
 
 
37766
 
       fi
37767
 
       ;;
37768
 
    esac
37769
 
  fi
37770
 
 
37771
 
 
37772
 
 
37773
 
 
37774
 
 
37775
 
 
37776
 
 
37777
 
 
37778
 
 
37779
 
 
37780
 
  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
37781
 
 
37782
 
if test $HAVE_FCHMODAT = 0; then
37783
 
 
37784
 
 
37785
 
 
37786
 
 
37787
 
 
37788
 
 
37789
 
 
37790
 
 
37791
 
  gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
37792
 
 
37793
 
fi
37794
 
if test $ac_cv_func_fstatat = no || test $REPLACE_FSTATAT = 1; then
37795
 
 
37796
 
 
37797
 
 
37798
 
 
37799
 
 
37800
 
 
37801
 
 
37802
 
 
37803
 
  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
37804
 
 
37805
 
fi
37806
 
if test $HAVE_MKDIRAT = 0; then
37807
 
 
37808
 
 
37809
 
 
37810
 
 
37811
 
 
37812
 
 
37813
 
 
37814
 
 
37815
 
  gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
37816
 
 
37817
 
fi
37818
 
if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
 
40762
 
 
40763
  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
37819
40764
 
37820
40765
 
37821
40766
 
37826
40771
 
37827
40772
  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
37828
40773
 
37829
 
fi
37830
 
if test $ac_cv_func_unlinkat = no || test $REPLACE_UNLINKAT = 1; then
37831
 
 
37832
 
 
37833
 
 
37834
 
 
37835
 
 
37836
 
 
37837
 
 
37838
 
 
37839
 
  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
37840
 
 
37841
 
fi
37842
 
if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
37843
 
 
37844
 
 
37845
 
 
37846
 
 
37847
 
 
37848
 
 
37849
 
 
37850
 
 
37851
 
  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
37852
 
 
37853
 
fi
 
40774
 
 
40775
 
 
40776
 
 
40777
  :
 
40778
 
 
40779
  fi
 
40780
 
 
40781
 
 
40782
cat >>confdefs.h <<_ACEOF
 
40783
#define GNULIB_OPENAT 1
 
40784
_ACEOF
 
40785
 
 
40786
 
 
40787
 
 
40788
 
 
40789
 
 
40790
 
 
40791
          GNULIB_OPENAT=1
 
40792
 
 
40793
 
 
40794
 
 
40795
 
 
40796
 
 
40797
$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
 
40798
 
 
40799
 
 
40800
 
37854
40801
 
37855
40802
 
37856
40803
 
37864
40811
 
37865
40812
 
37866
40813
 
 
40814
  for ac_func in opendir
 
40815
do :
 
40816
  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
 
40817
if test "x$ac_cv_func_opendir" = xyes; then :
 
40818
  cat >>confdefs.h <<_ACEOF
 
40819
#define HAVE_OPENDIR 1
 
40820
_ACEOF
 
40821
 
 
40822
fi
 
40823
done
 
40824
 
 
40825
  if test $ac_cv_func_opendir = no; then
 
40826
    HAVE_OPENDIR=0
 
40827
  fi
 
40828
 
 
40829
 
 
40830
 
 
40831
 
 
40832
  if test $ac_cv_func_fchdir = no; then
 
40833
    HAVE_FCHDIR=0
 
40834
  fi
 
40835
 
 
40836
    if test $HAVE_FCHDIR = 0; then
 
40837
      if test $HAVE_OPENDIR = 1; then
 
40838
        REPLACE_OPENDIR=1
 
40839
      fi
 
40840
    fi
 
40841
 
 
40842
 
 
40843
  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
 
40844
 
 
40845
 
 
40846
 
 
40847
 
 
40848
 
 
40849
 
 
40850
 
 
40851
 
 
40852
  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
 
40853
 
 
40854
  fi
 
40855
 
 
40856
 
 
40857
 
 
40858
 
 
40859
 
 
40860
          GNULIB_OPENDIR=1
 
40861
 
 
40862
 
 
40863
 
 
40864
 
 
40865
 
 
40866
$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
 
40867
 
 
40868
 
 
40869
 
 
40870
 
 
40871
 
 
40872
 
 
40873
 
37867
40874
 
37868
40875
 
37869
40876
 
37966
40973
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl5.005 or newer" >&5
37967
40974
$as_echo_n "checking for perl5.005 or newer... " >&6; }
37968
40975
  if test "${PERL+set}" = set; then
37969
 
    # `PERL' is set in the user's environment.
 
40976
    # 'PERL' is set in the user's environment.
37970
40977
    candidate_perl_names="$PERL"
37971
40978
    perl_specified=yes
37972
40979
  else
38052
41059
 
38053
41060
 
38054
41061
 
 
41062
 
 
41063
 
 
41064
 
 
41065
 
 
41066
 
 
41067
  if test $ac_cv_func_pipe2 != yes; then
 
41068
    HAVE_PIPE2=0
 
41069
  fi
 
41070
 
 
41071
 
 
41072
 
 
41073
 
 
41074
 
 
41075
 
 
41076
          GNULIB_PIPE2=1
 
41077
 
 
41078
 
 
41079
 
 
41080
 
 
41081
 
 
41082
$as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
 
41083
 
 
41084
 
 
41085
 
 
41086
 
 
41087
 
 
41088
cat >>confdefs.h <<_ACEOF
 
41089
#define GNULIB_PIPE2_SAFER 1
 
41090
_ACEOF
 
41091
 
 
41092
 
 
41093
 
38055
41094
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a shell that conforms to POSIX" >&5
38056
41095
$as_echo_n "checking for a shell that conforms to POSIX... " >&6; }
38057
41096
if ${gl_cv_posix_shell+:} false; then :
38107
41146
 
38108
41147
 
38109
41148
 
 
41149
 
 
41150
 
 
41151
 
 
41152
 
 
41153
 
 
41154
  if test $REPLACE_POSIX_SPAWN = 1; then
 
41155
    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
 
41156
  else
 
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
 
41161
else
 
41162
  if test "$cross_compiling" = yes; then :
 
41163
  # Guess no on Solaris, yes otherwise.
 
41164
          case "$host_os" in
 
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";;
 
41167
          esac
 
41168
 
 
41169
else
 
41170
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
41171
/* end confdefs.h.  */
 
41172
 
 
41173
#include <spawn.h>
 
41174
int main ()
 
41175
{
 
41176
  posix_spawn_file_actions_t actions;
 
41177
  if (posix_spawn_file_actions_init (&actions) != 0)
 
41178
    return 1;
 
41179
  if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
 
41180
    return 2;
 
41181
  return 0;
 
41182
}
 
41183
_ACEOF
 
41184
if ac_fn_c_try_run "$LINENO"; then :
 
41185
  gl_cv_func_posix_spawn_file_actions_addclose_works=yes
 
41186
else
 
41187
  gl_cv_func_posix_spawn_file_actions_addclose_works=no
 
41188
fi
 
41189
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
41190
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
41191
fi
 
41192
 
 
41193
 
 
41194
fi
 
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
 
41198
      *yes) ;;
 
41199
      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
 
41200
    esac
 
41201
  fi
 
41202
 
 
41203
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
 
41204
 
 
41205
 
 
41206
 
 
41207
 
 
41208
 
 
41209
 
 
41210
 
 
41211
 
 
41212
  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
 
41213
 
 
41214
  fi
 
41215
 
 
41216
 
 
41217
 
 
41218
 
 
41219
 
 
41220
          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
 
41221
 
 
41222
 
 
41223
 
 
41224
 
 
41225
 
 
41226
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
 
41227
 
 
41228
 
 
41229
 
 
41230
 
 
41231
 
 
41232
 
 
41233
 
 
41234
 
 
41235
 
 
41236
  if test $REPLACE_POSIX_SPAWN = 1; then
 
41237
    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
 
41238
  else
 
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
 
41243
else
 
41244
  if test "$cross_compiling" = yes; then :
 
41245
  # Guess no on Solaris, yes otherwise.
 
41246
          case "$host_os" in
 
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";;
 
41249
          esac
 
41250
 
 
41251
else
 
41252
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
41253
/* end confdefs.h.  */
 
41254
 
 
41255
#include <spawn.h>
 
41256
int main ()
 
41257
{
 
41258
  posix_spawn_file_actions_t actions;
 
41259
  if (posix_spawn_file_actions_init (&actions) != 0)
 
41260
    return 1;
 
41261
  if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
 
41262
    return 2;
 
41263
  return 0;
 
41264
}
 
41265
_ACEOF
 
41266
if ac_fn_c_try_run "$LINENO"; then :
 
41267
  gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
 
41268
else
 
41269
  gl_cv_func_posix_spawn_file_actions_adddup2_works=no
 
41270
fi
 
41271
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
41272
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
41273
fi
 
41274
 
 
41275
 
 
41276
fi
 
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
 
41280
      *yes) ;;
 
41281
      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
 
41282
    esac
 
41283
  fi
 
41284
 
 
41285
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
 
41286
 
 
41287
 
 
41288
 
 
41289
 
 
41290
 
 
41291
 
 
41292
 
 
41293
 
 
41294
  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
 
41295
 
 
41296
  fi
 
41297
 
 
41298
 
 
41299
 
 
41300
 
 
41301
 
 
41302
          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
 
41303
 
 
41304
 
 
41305
 
 
41306
 
 
41307
 
 
41308
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
 
41309
 
 
41310
 
 
41311
 
 
41312
 
 
41313
 
 
41314
 
 
41315
 
 
41316
 
 
41317
 
 
41318
  if test $REPLACE_POSIX_SPAWN = 1; then
 
41319
    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
 
41320
  else
 
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
 
41325
else
 
41326
  if test "$cross_compiling" = yes; then :
 
41327
  # Guess no on Solaris, yes otherwise.
 
41328
          case "$host_os" in
 
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";;
 
41331
          esac
 
41332
 
 
41333
else
 
41334
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
41335
/* end confdefs.h.  */
 
41336
 
 
41337
#include <spawn.h>
 
41338
#include <fcntl.h>
 
41339
int main ()
 
41340
{
 
41341
  posix_spawn_file_actions_t actions;
 
41342
  if (posix_spawn_file_actions_init (&actions) != 0)
 
41343
    return 1;
 
41344
  if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
 
41345
      == 0)
 
41346
    return 2;
 
41347
  return 0;
 
41348
}
 
41349
_ACEOF
 
41350
if ac_fn_c_try_run "$LINENO"; then :
 
41351
  gl_cv_func_posix_spawn_file_actions_addopen_works=yes
 
41352
else
 
41353
  gl_cv_func_posix_spawn_file_actions_addopen_works=no
 
41354
fi
 
41355
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
41356
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
41357
fi
 
41358
 
 
41359
 
 
41360
fi
 
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
 
41364
      *yes) ;;
 
41365
      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
 
41366
    esac
 
41367
  fi
 
41368
 
 
41369
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
 
41370
 
 
41371
 
 
41372
 
 
41373
 
 
41374
 
 
41375
 
 
41376
 
 
41377
 
 
41378
  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
 
41379
 
 
41380
  fi
 
41381
 
 
41382
 
 
41383
 
 
41384
 
 
41385
 
 
41386
          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
 
41387
 
 
41388
 
 
41389
 
 
41390
 
 
41391
 
 
41392
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
 
41393
 
 
41394
 
 
41395
 
 
41396
 
 
41397
 
 
41398
 
 
41399
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41400
 
 
41401
 
 
41402
 
 
41403
 
 
41404
 
 
41405
 
 
41406
 
 
41407
 
 
41408
  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
 
41409
 
 
41410
  fi
 
41411
 
 
41412
 
 
41413
 
 
41414
 
 
41415
 
 
41416
          GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
 
41417
 
 
41418
 
 
41419
 
 
41420
 
 
41421
 
 
41422
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
 
41423
 
 
41424
 
 
41425
 
 
41426
 
 
41427
 
 
41428
 
 
41429
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41430
 
 
41431
 
 
41432
 
 
41433
 
 
41434
 
 
41435
 
 
41436
 
 
41437
 
 
41438
  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
 
41439
 
 
41440
  fi
 
41441
 
 
41442
 
 
41443
 
 
41444
 
 
41445
 
 
41446
          GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
 
41447
 
 
41448
 
 
41449
 
 
41450
 
 
41451
 
 
41452
$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
 
41453
 
 
41454
 
 
41455
 
 
41456
 
 
41457
 
 
41458
 
 
41459
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41460
 
 
41461
 
 
41462
 
 
41463
 
 
41464
 
 
41465
 
 
41466
 
 
41467
 
 
41468
  gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
 
41469
 
 
41470
  fi
 
41471
 
 
41472
 
 
41473
 
 
41474
 
 
41475
 
 
41476
          GNULIB_POSIX_SPAWNATTR_DESTROY=1
 
41477
 
 
41478
 
 
41479
 
 
41480
 
 
41481
 
 
41482
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
 
41483
 
 
41484
 
 
41485
 
 
41486
 
 
41487
 
 
41488
 
 
41489
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41490
 
 
41491
 
 
41492
 
 
41493
 
 
41494
 
 
41495
 
 
41496
 
 
41497
 
 
41498
  gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
 
41499
 
 
41500
  fi
 
41501
 
 
41502
 
 
41503
 
 
41504
 
 
41505
 
 
41506
          GNULIB_POSIX_SPAWNATTR_INIT=1
 
41507
 
 
41508
 
 
41509
 
 
41510
 
 
41511
 
 
41512
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
 
41513
 
 
41514
 
 
41515
 
 
41516
 
 
41517
 
 
41518
 
 
41519
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41520
 
 
41521
 
 
41522
 
 
41523
 
 
41524
 
 
41525
 
 
41526
 
 
41527
 
 
41528
  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
 
41529
 
 
41530
  fi
 
41531
 
 
41532
 
 
41533
 
 
41534
 
 
41535
 
 
41536
          GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
 
41537
 
 
41538
 
 
41539
 
 
41540
 
 
41541
 
 
41542
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
 
41543
 
 
41544
 
 
41545
 
 
41546
 
 
41547
 
 
41548
 
 
41549
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41550
 
 
41551
 
 
41552
 
 
41553
 
 
41554
 
 
41555
 
 
41556
 
 
41557
 
 
41558
  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
 
41559
 
 
41560
  fi
 
41561
 
 
41562
 
 
41563
 
 
41564
 
 
41565
 
 
41566
          GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
 
41567
 
 
41568
 
 
41569
 
 
41570
 
 
41571
 
 
41572
$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
 
41573
 
 
41574
 
 
41575
 
 
41576
 
 
41577
 
 
41578
 
 
41579
  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
 
41580
 
 
41581
 
 
41582
 
 
41583
 
 
41584
 
 
41585
 
 
41586
 
 
41587
 
 
41588
  gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
 
41589
 
 
41590
 
 
41591
 
 
41592
 
 
41593
 
 
41594
 
 
41595
 
 
41596
 
 
41597
 
 
41598
  gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
 
41599
 
 
41600
 
 
41601
  for ac_header in paths.h
 
41602
do :
 
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
 
41607
_ACEOF
 
41608
 
 
41609
fi
 
41610
 
 
41611
done
 
41612
 
 
41613
  for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
 
41614
do :
 
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
 
41620
_ACEOF
 
41621
 
 
41622
fi
 
41623
done
 
41624
 
 
41625
 
 
41626
  fi
 
41627
 
 
41628
 
 
41629
 
 
41630
 
 
41631
 
 
41632
          GNULIB_POSIX_SPAWNP=1
 
41633
 
 
41634
 
 
41635
 
 
41636
 
 
41637
 
 
41638
$as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
 
41639
 
 
41640
 
 
41641
 
 
41642
 
38110
41643
    :
38111
41644
 
38112
41645
 
38117
41650
  if test $gl_cv_func_frexp_no_libm = yes; then
38118
41651
 
38119
41652
 
38120
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
 
41653
 
 
41654
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
38121
41655
$as_echo_n "checking whether frexp works... " >&6; }
38122
41656
if ${gl_cv_func_frexp_works+:} false; then :
38123
41657
  $as_echo_n "(cached) " >&6
38136
41670
#include <float.h>
38137
41671
#include <math.h>
38138
41672
#include <string.h>
 
41673
#if HAVE_ALARM
 
41674
# include <unistd.h>
 
41675
#endif
38139
41676
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
38140
41677
   ICC 10.0 has a bug when optimizing the expression -zero.
38141
41678
   The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
38142
 
   to PowerPC on MacOS X 10.5.  */
 
41679
   to PowerPC on Mac OS X 10.5.  */
38143
41680
#if defined __hpux || defined __sgi || defined __ICC
38144
41681
static double
38145
41682
compute_minus_zero (void)
38156
41693
  int i;
38157
41694
  volatile double x;
38158
41695
  double zero = 0.0;
 
41696
#if HAVE_ALARM
 
41697
  /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
 
41698
     number.  Let the test fail in this case.  */
 
41699
  alarm (5);
 
41700
#endif
38159
41701
  /* Test on denormalized numbers.  */
38160
41702
  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
38161
41703
    ;
38169
41711
        result |= 1;
38170
41712
    }
38171
41713
  /* Test on infinite numbers.  */
38172
 
  x = 1.0 / 0.0;
 
41714
  x = 1.0 / zero;
38173
41715
  {
38174
41716
    int exp;
38175
41717
    double y = frexp (x, &exp);
38249
41791
 
38250
41792
 
38251
41793
 
 
41794
 
 
41795
 
38252
41796
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
38253
41797
$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
38254
41798
if ${gl_cv_func_frexpl_no_libm+:} false; then :
38338
41882
    if (exp != 5)
38339
41883
      result |= 1;
38340
41884
  }
38341
 
  /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
 
41885
  /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
38342
41886
     function returns an invalid (incorrectly normalized) value: it returns
38343
41887
               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
38344
41888
     but the correct result is
38377
41921
        int exp;
38378
41922
        long double y = frexpl (x, &exp);
38379
41923
        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
38380
 
           exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
 
41924
           exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
38381
41925
        if (exp != LDBL_MIN_EXP - 1)
38382
41926
          result |= 8;
38383
41927
      }
38537
42081
 
38538
42082
 
38539
42083
 
38540
 
 
38541
42084
  for ac_func in getppriv
38542
42085
do :
38543
42086
  ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
38551
42094
 
38552
42095
 
38553
42096
 
38554
 
ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
 
42097
  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
38555
42098
"
38556
42099
if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
38557
42100
  ac_have_decl=1
38563
42106
#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
38564
42107
_ACEOF
38565
42108
 
38566
 
ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
 
42109
  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
38567
42110
"
38568
42111
if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
38569
42112
  ac_have_decl=1
38615
42158
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
38616
42159
                 *)    gl_absname_cpp="$ac_cpp" ;;
38617
42160
               esac
 
42161
 
 
42162
               case "$host_os" in
 
42163
                 mingw*)
 
42164
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
42165
                   ;;
 
42166
                 *)
 
42167
                   gl_dirsep_regex='\/'
 
42168
                   ;;
 
42169
               esac
 
42170
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
42171
 
 
42172
               gl_header_literal_regex=`echo 'pthread.h' \
 
42173
                                        | sed -e "$gl_make_literal_regex_sed"`
 
42174
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
42175
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
42176
                   s|^/[^/]|//&|
 
42177
                   p
 
42178
                   q
 
42179
                 }'
38618
42180
                                                            gl_cv_next_pthread_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38619
 
                  sed -n '\#/pthread.h#{
38620
 
                    s#.*"\(.*/pthread.h\)".*#\1#
38621
 
                    s#^/[^/]#//&#
38622
 
                    p
38623
 
                    q
38624
 
                  }'`'"'
 
42181
                      sed -n "$gl_absolute_header_sed"`'"'
38625
42182
          else
38626
42183
               gl_cv_next_pthread_h='<'pthread.h'>'
38627
42184
             fi
38704
42261
 
38705
42262
   LIB_PTHREAD=
38706
42263
   if test $ac_cv_header_pthread_h = yes; then
38707
 
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5
38708
 
$as_echo_n "checking for library containing pthread_join... " >&6; }
38709
 
if ${gl_cv_search_pthread_join+:} false; then :
 
42264
                              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create and pthread_join" >&5
 
42265
$as_echo_n "checking for library containing pthread_create and pthread_join... " >&6; }
 
42266
if ${gl_cv_lib_pthread+:} false; then :
38710
42267
  $as_echo_n "(cached) " >&6
38711
42268
else
38712
 
  gl_saved_libs="$LIBS"
38713
 
        gl_cv_search_pthread_join=
38714
 
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38715
 
/* end confdefs.h.  */
38716
 
#include <pthread.h>
38717
 
int
38718
 
main ()
38719
 
{
38720
 
pthread_join (pthread_self (), (void **) 0);
38721
 
  ;
38722
 
  return 0;
38723
 
}
38724
 
_ACEOF
38725
 
if ac_fn_c_try_link "$LINENO"; then :
38726
 
  gl_cv_search_pthread_join="none required"
38727
 
fi
38728
 
rm -f core conftest.err conftest.$ac_objext \
38729
 
    conftest$ac_exeext conftest.$ac_ext
38730
 
        if test -z "$gl_cv_search_pthread_join"; then
38731
 
          LIBS="-lpthread $gl_saved_libs"
 
42269
  gl_saved_libs=$LIBS
 
42270
        gl_cv_lib_pthread=
 
42271
        for gl_lib_prefix in '' '-lpthread'; do
 
42272
          LIBS="$gl_lib_prefix $gl_saved_libs"
38732
42273
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38733
42274
/* end confdefs.h.  */
38734
42275
#include <pthread.h>
 
42276
                 void *noop (void *p) { return p; }
38735
42277
int
38736
42278
main ()
38737
42279
{
38738
 
pthread_join (pthread_self (), (void **) 0);
 
42280
pthread_t pt;
 
42281
                 void *arg = 0;
 
42282
                 pthread_create (&pt, 0, noop, arg);
 
42283
                 pthread_join (pthread_self (), &arg);
38739
42284
  ;
38740
42285
  return 0;
38741
42286
}
38742
42287
_ACEOF
38743
42288
if ac_fn_c_try_link "$LINENO"; then :
38744
 
  gl_cv_search_pthread_join="-lpthread"
 
42289
  if test -z "$gl_lib_prefix"; then
 
42290
               gl_cv_lib_pthread="none required"
 
42291
             else
 
42292
               gl_cv_lib_pthread=$gl_lib_prefix
 
42293
             fi
38745
42294
fi
38746
42295
rm -f core conftest.err conftest.$ac_objext \
38747
42296
    conftest$ac_exeext conftest.$ac_ext
38748
 
        fi
 
42297
          test -n "$gl_cv_lib_pthread" && break
 
42298
        done
38749
42299
        LIBS="$gl_saved_libs"
38750
42300
 
38751
42301
fi
38752
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_search_pthread_join" >&5
38753
 
$as_echo "$gl_cv_search_pthread_join" >&6; }
38754
 
     if test "$gl_cv_search_pthread_join" != "none required"; then
38755
 
       LIB_PTHREAD="$gl_cv_search_pthread_join"
 
42302
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_pthread" >&5
 
42303
$as_echo "$gl_cv_lib_pthread" >&6; }
 
42304
     if test "$gl_cv_lib_pthread" != "none required"; then
 
42305
       LIB_PTHREAD="$gl_cv_lib_pthread"
38756
42306
     fi
38757
42307
   fi
38758
42308
 
38762
42312
 
38763
42313
 
38764
42314
 
38765
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
 
42315
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
38766
42316
$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
38767
42317
if ${gl_cv_func_svid_putenv+:} false; then :
38768
42318
  $as_echo_n "(cached) " >&6
38769
42319
else
38770
42320
  if test "$cross_compiling" = yes; then :
38771
 
               gl_cv_func_svid_putenv=no
 
42321
               case "$host_os" in
 
42322
                        # Guess yes on glibc systems.
 
42323
                *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
 
42324
                        # If we don't know, assume the worst.
 
42325
                *)      gl_cv_func_svid_putenv="guessing no" ;;
 
42326
              esac
 
42327
 
38772
42328
else
38773
42329
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38774
42330
/* end confdefs.h.  */
38808
42364
fi
38809
42365
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
38810
42366
$as_echo "$gl_cv_func_svid_putenv" >&6; }
38811
 
  if test $gl_cv_func_svid_putenv = no; then
38812
 
    REPLACE_PUTENV=1
38813
 
  fi
 
42367
  case "$gl_cv_func_svid_putenv" in
 
42368
    *yes) ;;
 
42369
    *)
 
42370
      REPLACE_PUTENV=1
 
42371
      ;;
 
42372
  esac
38814
42373
 
38815
 
if test $REPLACE_PUTENV = 1; then
 
42374
  if test $REPLACE_PUTENV = 1; then
38816
42375
 
38817
42376
 
38818
42377
 
38823
42382
 
38824
42383
  gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
38825
42384
 
38826
 
fi
 
42385
  fi
38827
42386
 
38828
42387
 
38829
42388
 
38849
42408
 
38850
42409
 
38851
42410
 
38852
 
if test $REPLACE_READ = 1; then
 
42411
  for ac_func in raise
 
42412
do :
 
42413
  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
 
42414
if test "x$ac_cv_func_raise" = xyes; then :
 
42415
  cat >>confdefs.h <<_ACEOF
 
42416
#define HAVE_RAISE 1
 
42417
_ACEOF
 
42418
 
 
42419
fi
 
42420
done
 
42421
 
 
42422
  if test $ac_cv_func_raise = no; then
 
42423
    HAVE_RAISE=0
 
42424
  else
 
42425
    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
42426
      REPLACE_RAISE=1
 
42427
    fi
 
42428
 
 
42429
 
 
42430
 
 
42431
 
 
42432
  if test $gl_cv_type_sigset_t = yes; then
 
42433
    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
 
42434
if test "x$ac_cv_func_sigprocmask" = xyes; then :
 
42435
  gl_cv_func_sigprocmask=1
 
42436
fi
 
42437
 
 
42438
  fi
 
42439
  if test -z "$gl_cv_func_sigprocmask"; then
 
42440
    HAVE_POSIX_SIGNALBLOCKING=0
 
42441
  fi
 
42442
 
 
42443
      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
 
42444
        :
 
42445
      fi
 
42446
 
 
42447
  fi
 
42448
 
 
42449
  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
 
42450
 
 
42451
 
 
42452
 
 
42453
 
 
42454
 
 
42455
 
 
42456
 
 
42457
 
 
42458
  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
 
42459
 
 
42460
 
 
42461
 
 
42462
 
 
42463
  fi
 
42464
 
 
42465
 
 
42466
 
 
42467
 
 
42468
 
 
42469
          GNULIB_RAISE=1
 
42470
 
 
42471
 
 
42472
 
 
42473
 
 
42474
 
 
42475
$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
 
42476
 
 
42477
 
 
42478
 
 
42479
 
 
42480
 
 
42481
 
 
42482
 
 
42483
  for ac_func in rawmemchr
 
42484
do :
 
42485
  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
 
42486
if test "x$ac_cv_func_rawmemchr" = xyes; then :
 
42487
  cat >>confdefs.h <<_ACEOF
 
42488
#define HAVE_RAWMEMCHR 1
 
42489
_ACEOF
 
42490
 
 
42491
fi
 
42492
done
 
42493
 
 
42494
  if test $ac_cv_func_rawmemchr = no; then
 
42495
    HAVE_RAWMEMCHR=0
 
42496
  fi
 
42497
 
 
42498
  if test $HAVE_RAWMEMCHR = 0; then
 
42499
 
 
42500
 
 
42501
 
 
42502
 
 
42503
 
 
42504
 
 
42505
 
 
42506
 
 
42507
  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
 
42508
 
 
42509
    :
 
42510
  fi
 
42511
 
 
42512
 
 
42513
 
 
42514
 
 
42515
 
 
42516
          GNULIB_RAWMEMCHR=1
 
42517
 
 
42518
 
 
42519
 
 
42520
 
 
42521
 
 
42522
$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
 
42523
 
 
42524
 
 
42525
 
 
42526
 
 
42527
 
 
42528
 
 
42529
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
42530
    REPLACE_READ=1
 
42531
  fi
 
42532
 
 
42533
 
 
42534
  if test $REPLACE_READ = 1; then
38853
42535
 
38854
42536
 
38855
42537
 
38860
42542
 
38861
42543
  gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
38862
42544
 
38863
 
fi
 
42545
 
 
42546
 
 
42547
 
 
42548
  fi
38864
42549
 
38865
42550
 
38866
42551
 
38876
42561
 
38877
42562
 
38878
42563
 
38879
 
:
 
42564
  :
 
42565
 
 
42566
 
 
42567
 
 
42568
  for ac_func in readdir
 
42569
do :
 
42570
  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
 
42571
if test "x$ac_cv_func_readdir" = xyes; then :
 
42572
  cat >>confdefs.h <<_ACEOF
 
42573
#define HAVE_READDIR 1
 
42574
_ACEOF
 
42575
 
 
42576
fi
 
42577
done
 
42578
 
 
42579
  if test $ac_cv_func_readdir = no; then
 
42580
    HAVE_READDIR=0
 
42581
  fi
 
42582
 
 
42583
  if test $HAVE_READDIR = 0; then
 
42584
 
 
42585
 
 
42586
 
 
42587
 
 
42588
 
 
42589
 
 
42590
 
 
42591
 
 
42592
  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
 
42593
 
 
42594
  fi
 
42595
 
 
42596
 
 
42597
 
 
42598
 
 
42599
 
 
42600
          GNULIB_READDIR=1
 
42601
 
 
42602
 
 
42603
 
 
42604
 
 
42605
 
 
42606
$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
 
42607
 
 
42608
 
 
42609
 
38880
42610
 
38881
42611
 
38882
42612
 
38919
42649
       ln -s conftest.no-such conftest.link
38920
42650
       ln -s conftest.link conftest.lnk2
38921
42651
       if test "$cross_compiling" = yes; then :
38922
 
  gl_cv_func_readlink_works="guessing no"
 
42652
  case "$host_os" in
 
42653
                    # Guess yes on glibc systems.
 
42654
            *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
 
42655
                    # If we don't know, assume the worst.
 
42656
            *)      gl_cv_func_readlink_works="guessing no" ;;
 
42657
          esac
 
42658
 
38923
42659
else
38924
42660
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38925
42661
/* end confdefs.h.  */
38947
42683
fi
38948
42684
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
38949
42685
$as_echo "$gl_cv_func_readlink_works" >&6; }
38950
 
    if test "$gl_cv_func_readlink_works" != yes; then
 
42686
    case "$gl_cv_func_readlink_works" in
 
42687
      *yes)
 
42688
        if test "$gl_cv_decl_readlink_works" != yes; then
 
42689
          REPLACE_READLINK=1
 
42690
        fi
 
42691
        ;;
 
42692
      *)
38951
42693
 
38952
42694
$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
38953
42695
 
38954
 
      REPLACE_READLINK=1
38955
 
    elif test "$gl_cv_decl_readlink_works" != yes; then
38956
 
      REPLACE_READLINK=1
38957
 
    fi
 
42696
        REPLACE_READLINK=1
 
42697
        ;;
 
42698
    esac
38958
42699
  fi
38959
42700
 
38960
 
if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
 
42701
  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
38961
42702
 
38962
42703
 
38963
42704
 
38971
42712
 
38972
42713
  :
38973
42714
 
38974
 
fi
 
42715
  fi
38975
42716
 
38976
42717
 
38977
42718
 
38996
42737
    HAVE_READLINKAT=0
38997
42738
  fi
38998
42739
 
38999
 
if test $HAVE_READLINKAT = 0; then
 
42740
  if test $HAVE_READLINKAT = 0; then
39000
42741
 
39001
42742
 
39002
42743
 
39007
42748
 
39008
42749
  gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
39009
42750
 
39010
 
fi
 
42751
  fi
39011
42752
 
39012
42753
 
39013
42754
 
39289
43030
 
39290
43031
  fi
39291
43032
 
39292
 
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
 
43033
  if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
39293
43034
 
39294
43035
 
39295
43036
 
39300
43041
 
39301
43042
  gl_LIBOBJS="$gl_LIBOBJS readutmp.$ac_objext"
39302
43043
 
39303
 
fi
39304
 
 
39305
 
 
39306
 
    for ac_header in stdlib.h
 
43044
  fi
 
43045
 
 
43046
 
 
43047
 
 
43048
      for ac_header in stdlib.h
39307
43049
do :
39308
43050
  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
39309
43051
if test "x$ac_cv_header_stdlib_h" = xyes; then :
39315
43057
 
39316
43058
done
39317
43059
 
39318
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
 
43060
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
39319
43061
$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
39320
43062
if ${ac_cv_func_realloc_0_nonnull+:} false; then :
39321
43063
  $as_echo_n "(cached) " >&6
39322
43064
else
39323
43065
  if test "$cross_compiling" = yes; then :
39324
 
  ac_cv_func_realloc_0_nonnull=no
 
43066
  case "$host_os" in
 
43067
          # Guess yes on platforms where we know the result.
 
43068
          *-gnu* | freebsd* | netbsd* | openbsd* \
 
43069
          | hpux* | solaris* | cygwin* | mingw*)
 
43070
            ac_cv_func_realloc_0_nonnull=yes ;;
 
43071
          # If we don't know, assume the worst.
 
43072
          *) ac_cv_func_realloc_0_nonnull=no ;;
 
43073
        esac
 
43074
 
39325
43075
else
39326
43076
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39327
43077
/* end confdefs.h.  */
39328
43078
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
39329
 
# include <stdlib.h>
39330
 
#else
39331
 
char *realloc ();
39332
 
#endif
 
43079
            # include <stdlib.h>
 
43080
            #else
 
43081
            char *realloc ();
 
43082
            #endif
39333
43083
 
39334
43084
int
39335
43085
main ()
39338
43088
  ;
39339
43089
  return 0;
39340
43090
}
 
43091
 
39341
43092
_ACEOF
39342
43093
if ac_fn_c_try_run "$LINENO"; then :
39343
43094
  ac_cv_func_realloc_0_nonnull=yes
39348
43099
  conftest.$ac_objext conftest.beam conftest.$ac_ext
39349
43100
fi
39350
43101
 
 
43102
 
39351
43103
fi
39352
43104
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
39353
43105
$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
39354
 
if test $ac_cv_func_realloc_0_nonnull = yes; then :
 
43106
  if test $ac_cv_func_realloc_0_nonnull = yes; then :
39355
43107
 
39356
43108
$as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
39357
43109
 
39363
43115
fi
39364
43116
 
39365
43117
 
39366
 
if test $REPLACE_REALLOC = 1; then
 
43118
  if test $REPLACE_REALLOC = 1; then
39367
43119
 
39368
43120
 
39369
43121
 
39374
43126
 
39375
43127
  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
39376
43128
 
39377
 
fi
 
43129
  fi
39378
43130
 
39379
43131
 
39380
43132
cat >>confdefs.h <<_ACEOF
39393
43145
    REPLACE_REALLOC=1
39394
43146
  fi
39395
43147
 
39396
 
if test $REPLACE_REALLOC = 1; then
 
43148
  if test $REPLACE_REALLOC = 1; then
39397
43149
 
39398
43150
 
39399
43151
 
39404
43156
 
39405
43157
  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
39406
43158
 
39407
 
fi
 
43159
  fi
39408
43160
 
39409
43161
 
39410
43162
 
39606
43358
 
39607
43359
  if test $ac_use_included_regex = yes; then
39608
43360
 
 
43361
$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
 
43362
 
 
43363
 
39609
43364
$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
39610
43365
 
39611
43366
 
39655
43410
 
39656
43411
  fi
39657
43412
 
39658
 
if test $ac_use_included_regex = yes; then
 
43413
  if test $ac_use_included_regex = yes; then
39659
43414
 
39660
43415
 
39661
43416
 
39697
43452
_ACEOF
39698
43453
 
39699
43454
 
39700
 
fi
39701
 
 
39702
 
 
39703
 
 
39704
 
 
39705
 
  if test "$gl_cv_func_rmdir_works:$gl_cv_func_unlink_works" != yes:yes; then
 
43455
  fi
 
43456
 
 
43457
 
 
43458
 
 
43459
 
 
43460
  if { case "$gl_cv_func_rmdir_works:$gl_cv_func_unlink_honors_slashes" in
 
43461
         *yes:*yes) false;;
 
43462
         *) true;;
 
43463
       esac
 
43464
     }; then
39706
43465
            REPLACE_REMOVE=1
39707
43466
  else
39708
43467
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether remove handles directories" >&5
39747
43506
    esac
39748
43507
  fi
39749
43508
 
39750
 
if test $REPLACE_REMOVE = 1; then
 
43509
  if test $REPLACE_REMOVE = 1; then
39751
43510
 
39752
43511
 
39753
43512
 
39758
43517
 
39759
43518
  gl_LIBOBJS="$gl_LIBOBJS remove.$ac_objext"
39760
43519
 
39761
 
fi
 
43520
  fi
39762
43521
 
39763
43522
 
39764
43523
 
39792
43551
      ln -s conftest.f conftest.lnk
39793
43552
    fi
39794
43553
    if test "$cross_compiling" = yes; then :
39795
 
        gl_cv_func_rename_slash_dst_works="guessing no"
 
43554
        case "$host_os" in
 
43555
                 # Guess yes on glibc systems.
 
43556
         *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
 
43557
                 # If we don't know, assume the worst.
 
43558
         *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
 
43559
       esac
 
43560
 
39796
43561
else
39797
43562
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39798
43563
/* end confdefs.h.  */
39832
43597
fi
39833
43598
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
39834
43599
$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
39835
 
  if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
39836
 
    REPLACE_RENAME=1
 
43600
  case "$gl_cv_func_rename_slash_dst_works" in
 
43601
    *yes) ;;
 
43602
    *)
 
43603
      REPLACE_RENAME=1
39837
43604
 
39838
43605
$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
39839
43606
 
39840
 
  fi
 
43607
      ;;
 
43608
  esac
39841
43609
 
39842
43610
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
39843
43611
$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
39852
43620
      ln -s conftest.f conftest.lnk
39853
43621
    fi
39854
43622
    if test "$cross_compiling" = yes; then :
39855
 
        gl_cv_func_rename_slash_src_works="guessing no"
 
43623
        case "$host_os" in
 
43624
                 # Guess yes on glibc systems.
 
43625
         *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
 
43626
                 # If we don't know, assume the worst.
 
43627
         *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
 
43628
       esac
 
43629
 
39856
43630
else
39857
43631
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39858
43632
/* end confdefs.h.  */
39892
43666
fi
39893
43667
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
39894
43668
$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
39895
 
  if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
39896
 
    REPLACE_RENAME=1
 
43669
  case "$gl_cv_func_rename_slash_src_works" in
 
43670
    *yes) ;;
 
43671
    *)
 
43672
      REPLACE_RENAME=1
39897
43673
 
39898
43674
$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
39899
43675
 
39900
 
  fi
39901
 
 
39902
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
 
43676
      ;;
 
43677
  esac
 
43678
 
 
43679
 
 
43680
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
39903
43681
$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
39904
43682
if ${gl_cv_func_rename_link_works+:} false; then :
39905
43683
  $as_echo_n "(cached) " >&6
39906
43684
else
39907
 
  rm -rf conftest.f conftest.f1
39908
 
    if touch conftest.f && ln conftest.f conftest.f1 &&
39909
 
        set x `ls -i conftest.f conftest.f1` && test "" = ""; then
39910
 
      if test "$cross_compiling" = yes; then :
39911
 
          gl_cv_func_rename_link_works="guessing no"
 
43685
  if test $ac_cv_func_link = yes; then
 
43686
       rm -rf conftest.f conftest.f1
 
43687
       if touch conftest.f && ln conftest.f conftest.f1 &&
 
43688
           set x `ls -i conftest.f conftest.f1` && test "" = ""; then
 
43689
         if test "$cross_compiling" = yes; then :
 
43690
             case "$host_os" in
 
43691
                      # Guess yes on glibc systems.
 
43692
              *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
 
43693
                      # If we don't know, assume the worst.
 
43694
              *)      gl_cv_func_rename_link_works="guessing no" ;;
 
43695
            esac
 
43696
 
39912
43697
else
39913
43698
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39914
43699
/* end confdefs.h.  */
39915
43700
 
39916
 
#          include <stdio.h>
39917
 
#          include <stdlib.h>
39918
 
#          include <unistd.h>
 
43701
#             include <stdio.h>
 
43702
#             include <stdlib.h>
 
43703
#             include <unistd.h>
39919
43704
 
39920
43705
int
39921
43706
main ()
39922
43707
{
39923
43708
int result = 0;
39924
 
             if (rename ("conftest.f", "conftest.f1"))
39925
 
               result |= 1;
39926
 
             if (unlink ("conftest.f1"))
39927
 
               result |= 2;
39928
 
             if (rename ("conftest.f", "conftest.f"))
39929
 
               result |= 4;
39930
 
             if (rename ("conftest.f1", "conftest.f1") == 0)
39931
 
               result |= 8;
39932
 
             return result;
 
43709
                if (rename ("conftest.f", "conftest.f1"))
 
43710
                  result |= 1;
 
43711
                if (unlink ("conftest.f1"))
 
43712
                  result |= 2;
 
43713
                if (rename ("conftest.f", "conftest.f"))
 
43714
                  result |= 4;
 
43715
                if (rename ("conftest.f1", "conftest.f1") == 0)
 
43716
                  result |= 8;
 
43717
                return result;
39933
43718
 
39934
43719
  ;
39935
43720
  return 0;
39944
43729
  conftest.$ac_objext conftest.beam conftest.$ac_ext
39945
43730
fi
39946
43731
 
39947
 
    else
39948
 
      gl_cv_func_rename_link_works="guessing no"
39949
 
    fi
39950
 
    rm -rf conftest.f conftest.f1
 
43732
       else
 
43733
         gl_cv_func_rename_link_works="guessing no"
 
43734
       fi
 
43735
       rm -rf conftest.f conftest.f1
 
43736
     else
 
43737
       gl_cv_func_rename_link_works=yes
 
43738
     fi
39951
43739
 
39952
43740
fi
39953
43741
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
39954
43742
$as_echo "$gl_cv_func_rename_link_works" >&6; }
39955
 
  if test "x$gl_cv_func_rename_link_works" != xyes; then
39956
 
    REPLACE_RENAME=1
 
43743
  case "$gl_cv_func_rename_link_works" in
 
43744
    *yes) ;;
 
43745
    *)
 
43746
      REPLACE_RENAME=1
39957
43747
 
39958
43748
$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
39959
43749
 
39960
 
  fi
 
43750
      ;;
 
43751
  esac
39961
43752
 
39962
43753
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
39963
43754
$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
39968
43759
    touch conftest.f && mkdir conftest.d1 conftest.d2 ||
39969
43760
      as_fn_error $? "cannot create temporary files" "$LINENO" 5
39970
43761
    if test "$cross_compiling" = yes; then :
39971
 
        gl_cv_func_rename_dest_works="guessing no"
 
43762
        case "$host_os" in
 
43763
                 # Guess yes on glibc systems.
 
43764
         *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
 
43765
                 # If we don't know, assume the worst.
 
43766
         *)      gl_cv_func_rename_dest_works="guessing no" ;;
 
43767
       esac
 
43768
 
39972
43769
else
39973
43770
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39974
43771
/* end confdefs.h.  */
40004
43801
fi
40005
43802
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
40006
43803
$as_echo "$gl_cv_func_rename_dest_works" >&6; }
40007
 
  if test "x$gl_cv_func_rename_dest_works" != xyes; then
40008
 
    REPLACE_RENAME=1
 
43804
  case "$gl_cv_func_rename_dest_works" in
 
43805
    *yes) ;;
 
43806
    *)
 
43807
      REPLACE_RENAME=1
40009
43808
 
40010
43809
$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
40011
43810
 
40012
 
  fi
 
43811
      ;;
 
43812
  esac
40013
43813
 
40014
 
if test $REPLACE_RENAME = 1; then
 
43814
  if test $REPLACE_RENAME = 1; then
40015
43815
 
40016
43816
 
40017
43817
 
40022
43822
 
40023
43823
  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
40024
43824
 
40025
 
fi
 
43825
  fi
40026
43826
 
40027
43827
 
40028
43828
 
40040
43840
 
40041
43841
 
40042
43842
 
40043
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
 
43843
 
 
43844
  for ac_func in rewinddir
 
43845
do :
 
43846
  ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
 
43847
if test "x$ac_cv_func_rewinddir" = xyes; then :
 
43848
  cat >>confdefs.h <<_ACEOF
 
43849
#define HAVE_REWINDDIR 1
 
43850
_ACEOF
 
43851
 
 
43852
fi
 
43853
done
 
43854
 
 
43855
  if test $ac_cv_func_rewinddir = no; then
 
43856
    HAVE_REWINDDIR=0
 
43857
  fi
 
43858
 
 
43859
  if test $HAVE_REWINDDIR = 0; then
 
43860
 
 
43861
 
 
43862
 
 
43863
 
 
43864
 
 
43865
 
 
43866
 
 
43867
 
 
43868
  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
 
43869
 
 
43870
  fi
 
43871
 
 
43872
 
 
43873
 
 
43874
 
 
43875
 
 
43876
          GNULIB_REWINDDIR=1
 
43877
 
 
43878
 
 
43879
 
 
43880
 
 
43881
 
 
43882
$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
 
43883
 
 
43884
 
 
43885
 
 
43886
 
 
43887
 
 
43888
 
 
43889
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
40044
43890
$as_echo_n "checking whether rmdir works... " >&6; }
40045
43891
if ${gl_cv_func_rmdir_works+:} false; then :
40046
43892
  $as_echo_n "(cached) " >&6
40048
43894
  mkdir conftest.dir
40049
43895
     touch conftest.file
40050
43896
     if test "$cross_compiling" = yes; then :
40051
 
  gl_cv_func_rmdir_works="guessing no"
 
43897
  case "$host_os" in
 
43898
                  # Guess yes on glibc systems.
 
43899
          *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
 
43900
                  # If we don't know, assume the worst.
 
43901
          *)      gl_cv_func_rmdir_works="guessing no" ;;
 
43902
        esac
 
43903
 
40052
43904
else
40053
43905
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40054
43906
/* end confdefs.h.  */
40055
43907
#include <stdio.h>
40056
43908
           #include <errno.h>
40057
 
           #include <unistd.h>
 
43909
           #if HAVE_UNISTD_H
 
43910
           # include <unistd.h>
 
43911
           #else /* on Windows with MSVC */
 
43912
           # include <direct.h>
 
43913
           #endif
40058
43914
 
40059
43915
int
40060
43916
main ()
40085
43941
fi
40086
43942
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
40087
43943
$as_echo "$gl_cv_func_rmdir_works" >&6; }
40088
 
  if test x"$gl_cv_func_rmdir_works" != xyes; then
40089
 
    REPLACE_RMDIR=1
40090
 
  fi
 
43944
  case "$gl_cv_func_rmdir_works" in
 
43945
    *yes) ;;
 
43946
    *)
 
43947
      REPLACE_RMDIR=1
 
43948
      ;;
 
43949
  esac
40091
43950
 
40092
 
if test $REPLACE_RMDIR = 1; then
 
43951
  if test $REPLACE_RMDIR = 1; then
40093
43952
 
40094
43953
 
40095
43954
 
40100
43959
 
40101
43960
  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
40102
43961
 
40103
 
fi
 
43962
  fi
40104
43963
 
40105
43964
 
40106
43965
 
40120
43979
 
40121
43980
 
40122
43981
 
40123
 
 
40124
 
 
40125
 
 
40126
 
 
40127
 
 
40128
 
  gl_LIBOBJS="$gl_LIBOBJS root-dev-ino.$ac_objext"
40129
 
 
40130
 
 
40131
 
 
40132
 
  :
40133
 
 
40134
 
 
40135
 
 
40136
 
 
40137
 
 
40138
43982
  for ac_func in rpmatch
40139
43983
do :
40140
43984
  ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
40150
43994
    HAVE_RPMATCH=0
40151
43995
  fi
40152
43996
 
40153
 
if test $HAVE_RPMATCH = 0; then
 
43997
  if test $HAVE_RPMATCH = 0; then
40154
43998
 
40155
43999
 
40156
44000
 
40195
44039
 
40196
44040
  fi
40197
44041
 
40198
 
fi
 
44042
  fi
40199
44043
 
40200
44044
 
40201
44045
 
40237
44081
       #include <sched.h>
40238
44082
       struct sched_param a;
40239
44083
       int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
 
44084
       pid_t t1;
40240
44085
 
40241
44086
int
40242
44087
main ()
40281
44126
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
40282
44127
                 *)    gl_absname_cpp="$ac_cpp" ;;
40283
44128
               esac
 
44129
 
 
44130
               case "$host_os" in
 
44131
                 mingw*)
 
44132
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
44133
                   ;;
 
44134
                 *)
 
44135
                   gl_dirsep_regex='\/'
 
44136
                   ;;
 
44137
               esac
 
44138
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
44139
 
 
44140
               gl_header_literal_regex=`echo 'sched.h' \
 
44141
                                        | sed -e "$gl_make_literal_regex_sed"`
 
44142
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
44143
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
44144
                   s|^/[^/]|//&|
 
44145
                   p
 
44146
                   q
 
44147
                 }'
40284
44148
                                                            gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
40285
 
                  sed -n '\#/sched.h#{
40286
 
                    s#.*"\(.*/sched.h\)".*#\1#
40287
 
                    s#^/[^/]#//&#
40288
 
                    p
40289
 
                    q
40290
 
                  }'`'"'
 
44149
                      sed -n "$gl_absolute_header_sed"`'"'
40291
44150
          else
40292
44151
               gl_cv_next_sched_h='<'sched.h'>'
40293
44152
             fi
40329
44188
 
40330
44189
 
40331
44190
 
 
44191
 
 
44192
 
40332
44193
fi
40333
44194
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40334
44195
 
40397
44258
      *yes) ;;
40398
44259
      *) REPLACE_SELECT=1 ;;
40399
44260
    esac
40400
 
  fi
40401
 
 
40402
 
if test $REPLACE_SELECT = 1; then
 
44261
 
 
44262
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
 
44263
$as_echo_n "checking whether select detects invalid fds... " >&6; }
 
44264
if ${gl_cv_func_select_detects_ebadf+:} false; then :
 
44265
  $as_echo_n "(cached) " >&6
 
44266
else
 
44267
 
 
44268
        if test "$cross_compiling" = yes; then :
 
44269
 
 
44270
           case "$host_os" in
 
44271
                    # Guess yes on glibc systems.
 
44272
            *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
 
44273
                    # If we don't know, assume the worst.
 
44274
            *)      gl_cv_func_select_detects_ebadf="guessing no" ;;
 
44275
           esac
 
44276
 
 
44277
else
 
44278
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
44279
/* end confdefs.h.  */
 
44280
 
 
44281
#include <sys/types.h>
 
44282
#include <sys/time.h>
 
44283
#if HAVE_SYS_SELECT_H
 
44284
# include <sys/select.h>
 
44285
#endif
 
44286
#include <unistd.h>
 
44287
#include <errno.h>
 
44288
 
 
44289
int
 
44290
main ()
 
44291
{
 
44292
 
 
44293
  fd_set set;
 
44294
  dup2(0, 16);
 
44295
  FD_ZERO(&set);
 
44296
  FD_SET(16, &set);
 
44297
  close(16);
 
44298
  struct timeval timeout;
 
44299
  timeout.tv_sec = 0;
 
44300
  timeout.tv_usec = 5;
 
44301
  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
 
44302
 
 
44303
  ;
 
44304
  return 0;
 
44305
}
 
44306
_ACEOF
 
44307
if ac_fn_c_try_run "$LINENO"; then :
 
44308
  gl_cv_func_select_detects_ebadf=yes
 
44309
else
 
44310
  gl_cv_func_select_detects_ebadf=no
 
44311
fi
 
44312
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
44313
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
44314
fi
 
44315
 
 
44316
 
 
44317
fi
 
44318
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
 
44319
$as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
 
44320
    case $gl_cv_func_select_detects_ebadf in
 
44321
      *yes) ;;
 
44322
      *) REPLACE_SELECT=1 ;;
 
44323
    esac
 
44324
  fi
 
44325
 
 
44326
    LIB_SELECT="$LIBSOCKET"
 
44327
  if test $REPLACE_SELECT = 1; then
 
44328
    case "$host_os" in
 
44329
      mingw*)
 
44330
                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
44331
/* end confdefs.h.  */
 
44332
 
 
44333
#define WIN32_LEAN_AND_MEAN
 
44334
#include <windows.h>
 
44335
int
 
44336
main ()
 
44337
{
 
44338
  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
 
44339
  return 0;
 
44340
}
 
44341
_ACEOF
 
44342
if ac_fn_c_try_link "$LINENO"; then :
 
44343
 
 
44344
else
 
44345
  LIB_SELECT="$LIB_SELECT -luser32"
 
44346
fi
 
44347
rm -f core conftest.err conftest.$ac_objext \
 
44348
    conftest$ac_exeext conftest.$ac_ext
 
44349
        ;;
 
44350
    esac
 
44351
  fi
 
44352
 
 
44353
 
 
44354
  if test $REPLACE_SELECT = 1; then
40403
44355
 
40404
44356
 
40405
44357
 
40410
44362
 
40411
44363
  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
40412
44364
 
40413
 
fi
 
44365
  fi
40414
44366
 
40415
44367
 
40416
44368
 
40426
44378
 
40427
44379
 
40428
44380
 
40429
 
for ac_header in selinux/flask.h
 
44381
  for ac_header in selinux/flask.h
40430
44382
do :
40431
44383
  ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
40432
44384
if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
40497
44449
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
40498
44450
                 *)    gl_absname_cpp="$ac_cpp" ;;
40499
44451
               esac
 
44452
 
 
44453
               case "$host_os" in
 
44454
                 mingw*)
 
44455
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
44456
                   ;;
 
44457
                 *)
 
44458
                   gl_dirsep_regex='\/'
 
44459
                   ;;
 
44460
               esac
 
44461
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
44462
 
 
44463
               gl_header_literal_regex=`echo 'selinux/selinux.h' \
 
44464
                                        | sed -e "$gl_make_literal_regex_sed"`
 
44465
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
44466
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
44467
                   s|^/[^/]|//&|
 
44468
                   p
 
44469
                   q
 
44470
                 }'
40500
44471
                                                            gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
40501
 
                  sed -n '\#/selinux/selinux.h#{
40502
 
                    s#.*"\(.*/selinux/selinux.h\)".*#\1#
40503
 
                    s#^/[^/]#//&#
40504
 
                    p
40505
 
                    q
40506
 
                  }'`'"'
 
44472
                      sed -n "$gl_absolute_header_sed"`'"'
40507
44473
          else
40508
44474
               gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
40509
44475
             fi
40585
44551
 
40586
44552
 
40587
44553
 
40588
 
if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
 
44554
  if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
40589
44555
 
40590
44556
 
40591
44557
 
40596
44562
 
40597
44563
  gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
40598
44564
 
40599
 
fi
 
44565
  fi
40600
44566
 
40601
44567
                      SERVENT_LIB=
40602
44568
  gl_saved_libs="$LIBS"
40716
44682
 
40717
44683
 
40718
44684
 
40719
 
  if test $ac_cv_func_setenv = no; then
 
44685
     if test $ac_cv_func_setenv = no; then
40720
44686
    HAVE_SETENV=0
40721
44687
  else
40722
44688
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
40725
44691
  $as_echo_n "(cached) " >&6
40726
44692
else
40727
44693
  if test "$cross_compiling" = yes; then :
40728
 
  gl_cv_func_setenv_works="guessing no"
 
44694
  case "$host_os" in
 
44695
                 # Guess yes on glibc systems.
 
44696
         *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
 
44697
                 # If we don't know, assume the worst.
 
44698
         *)      gl_cv_func_setenv_works="guessing no" ;;
 
44699
       esac
 
44700
 
40729
44701
else
40730
44702
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40731
44703
/* end confdefs.h.  */
40769
44741
fi
40770
44742
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
40771
44743
$as_echo "$gl_cv_func_setenv_works" >&6; }
40772
 
    if test "$gl_cv_func_setenv_works" != yes; then
40773
 
      REPLACE_SETENV=1
40774
 
    fi
 
44744
    case "$gl_cv_func_setenv_works" in
 
44745
      *yes) ;;
 
44746
      *)
 
44747
        REPLACE_SETENV=1
 
44748
        ;;
 
44749
    esac
40775
44750
  fi
40776
44751
 
40777
 
if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
 
44752
  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
40778
44753
 
40779
44754
 
40780
44755
 
40785
44760
 
40786
44761
  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
40787
44762
 
40788
 
fi
 
44763
  fi
40789
44764
 
40790
44765
 
40791
44766
 
40819
44794
done
40820
44795
 
40821
44796
 
40822
 
if test $ac_cv_func_sig2str = no; then
 
44797
  if test $ac_cv_func_sig2str = no; then
40823
44798
 
40824
44799
 
40825
44800
 
40833
44808
 
40834
44809
  :
40835
44810
 
40836
 
fi
 
44811
  fi
40837
44812
 
40838
44813
 
40839
44814
 
40856
44831
    HAVE_SIGACTION=0
40857
44832
  fi
40858
44833
 
40859
 
if test $HAVE_SIGACTION = 0; then
 
44834
  if test $HAVE_SIGACTION = 0; then
40860
44835
 
40861
44836
 
40862
44837
 
40890
44865
    HAVE_SIGINFO_T=0
40891
44866
  fi
40892
44867
 
40893
 
fi
 
44868
  fi
40894
44869
 
40895
44870
 
40896
44871
 
40935
44910
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
40936
44911
                 *)    gl_absname_cpp="$ac_cpp" ;;
40937
44912
               esac
 
44913
 
 
44914
               case "$host_os" in
 
44915
                 mingw*)
 
44916
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
44917
                   ;;
 
44918
                 *)
 
44919
                   gl_dirsep_regex='\/'
 
44920
                   ;;
 
44921
               esac
 
44922
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
44923
 
 
44924
               gl_header_literal_regex=`echo 'signal.h' \
 
44925
                                        | sed -e "$gl_make_literal_regex_sed"`
 
44926
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
44927
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
44928
                   s|^/[^/]|//&|
 
44929
                   p
 
44930
                   q
 
44931
                 }'
40938
44932
                                                            gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
40939
 
                  sed -n '\#/signal.h#{
40940
 
                    s#.*"\(.*/signal.h\)".*#\1#
40941
 
                    s#^/[^/]#//&#
40942
 
                    p
40943
 
                    q
40944
 
                  }'`'"'
 
44933
                      sed -n "$gl_absolute_header_sed"`'"'
40945
44934
 
40946
44935
 
40947
44936
fi
40979
44968
 
40980
44969
 
40981
44970
 
 
44971
 
 
44972
 
40982
44973
  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
40983
44974
#include <signal.h>
40984
44975
 
40991
44982
 
40992
44983
 
40993
44984
 
40994
 
    for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
40995
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
40996
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
40997
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
40998
 
if eval \${$as_gl_Symbol+:} false; then :
40999
 
  $as_echo_n "(cached) " >&6
41000
 
else
41001
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41002
 
/* end confdefs.h.  */
41003
 
#include <signal.h>
41004
 
 
41005
 
int
41006
 
main ()
41007
 
{
41008
 
#undef $gl_func
41009
 
  (void) $gl_func;
41010
 
  ;
41011
 
  return 0;
41012
 
}
41013
 
_ACEOF
41014
 
if ac_fn_c_try_compile "$LINENO"; then :
41015
 
  eval "$as_gl_Symbol=yes"
41016
 
else
41017
 
  eval "$as_gl_Symbol=no"
41018
 
fi
41019
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41020
 
fi
41021
 
eval ac_res=\$$as_gl_Symbol
41022
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
41023
 
$as_echo "$ac_res" >&6; }
41024
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
41025
 
  cat >>confdefs.h <<_ACEOF
41026
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
41027
 
_ACEOF
41028
 
 
41029
 
                     eval ac_cv_have_decl_$gl_func=yes
41030
 
fi
41031
 
      done
41032
 
 
41033
 
 
41034
 
 
41035
 
 
41036
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
 
44985
 
 
44986
 
 
44987
 
 
44988
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
41037
44989
$as_echo_n "checking for signbit macro... " >&6; }
41038
44990
if ${gl_cv_func_signbit+:} false; then :
41039
44991
  $as_echo_n "(cached) " >&6
41040
44992
else
41041
44993
 
41042
44994
      if test "$cross_compiling" = yes; then :
41043
 
  gl_cv_func_signbit="guessing no"
 
44995
  case "$host_os" in
 
44996
                   # Guess yes on glibc systems.
 
44997
           *-gnu*) gl_cv_func_signbit="guessing yes" ;;
 
44998
                   # If we don't know, assume the worst.
 
44999
           *)      gl_cv_func_signbit="guessing no" ;;
 
45000
         esac
 
45001
 
41044
45002
else
41045
45003
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41046
45004
/* end confdefs.h.  */
41075
45033
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
41076
45034
   So we use another constant expression instead.
41077
45035
   But that expression does not work on other platforms, such as when
41078
 
   cross-compiling to PowerPC on MacOS X 10.5.  */
 
45036
   cross-compiling to PowerPC on Mac OS X 10.5.  */
41079
45037
long double p0l = 0.0L;
41080
45038
#if defined __hpux || defined __sgi
41081
45039
long double m0l = -LDBL_MIN * LDBL_MIN;
41152
45110
else
41153
45111
 
41154
45112
      if test "$cross_compiling" = yes; then :
41155
 
  gl_cv_func_signbit_gcc="guessing no"
 
45113
  case "$host_os" in
 
45114
                   # Guess yes on glibc systems.
 
45115
           *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
 
45116
                   # If we don't know, assume the worst.
 
45117
           *)      gl_cv_func_signbit_gcc="guessing no" ;;
 
45118
         esac
 
45119
 
41156
45120
else
41157
45121
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41158
45122
/* end confdefs.h.  */
41184
45148
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
41185
45149
   So we use another constant expression instead.
41186
45150
   But that expression does not work on other platforms, such as when
41187
 
   cross-compiling to PowerPC on MacOS X 10.5.  */
 
45151
   cross-compiling to PowerPC on Mac OS X 10.5.  */
41188
45152
long double p0l = 0.0L;
41189
45153
#if defined __hpux || defined __sgi
41190
45154
long double m0l = -LDBL_MIN * LDBL_MIN;
41254
45218
fi
41255
45219
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
41256
45220
$as_echo "$gl_cv_func_signbit_gcc" >&6; }
41257
 
      if test "$gl_cv_func_signbit_gcc" = yes; then
41258
 
    REPLACE_SIGNBIT_USING_GCC=1
41259
 
  else
41260
 
    if test "$gl_cv_func_signbit" != yes; then
41261
 
            REPLACE_SIGNBIT=1
 
45221
      case "$gl_cv_func_signbit_gcc" in
 
45222
    *yes)
 
45223
      REPLACE_SIGNBIT_USING_GCC=1
 
45224
      ;;
 
45225
    *)
 
45226
      case "$gl_cv_func_signbit" in
 
45227
        *yes) ;;
 
45228
        *)
 
45229
                    REPLACE_SIGNBIT=1
41262
45230
 
41263
45231
 
41264
45232
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
41571
45539
  esac
41572
45540
 
41573
45541
 
41574
 
      if test "$gl_cv_cc_float_signbit" = unknown; then
41575
 
                ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
 
45542
          if test "$gl_cv_cc_float_signbit" = unknown; then
 
45543
                        ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
41576
45544
"
41577
45545
if test "x$ac_cv_have_decl_copysignf" = xyes; then :
41578
45546
  ac_have_decl=1
41584
45552
#define HAVE_DECL_COPYSIGNF $ac_have_decl
41585
45553
_ACEOF
41586
45554
 
41587
 
        if test "$ac_cv_have_decl_copysignf" = yes; then
41588
 
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
 
45555
            if test "$ac_cv_have_decl_copysignf" = yes; then
 
45556
                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
41589
45557
$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
41590
45558
if ${gl_cv_func_copysignf_no_libm+:} false; then :
41591
45559
  $as_echo_n "(cached) " >&6
41592
45560
else
41593
45561
 
41594
 
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
45562
                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41595
45563
/* end confdefs.h.  */
41596
45564
#include <math.h>
41597
 
                     float x, y;
 
45565
                         float x, y;
41598
45566
int
41599
45567
main ()
41600
45568
{
41614
45582
fi
41615
45583
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
41616
45584
$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
41617
 
          if test $gl_cv_func_copysignf_no_libm = yes; then
 
45585
              if test $gl_cv_func_copysignf_no_libm = yes; then
41618
45586
 
41619
45587
$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
41620
45588
 
 
45589
              fi
 
45590
            fi
41621
45591
          fi
41622
 
        fi
41623
 
      fi
41624
 
      if test "$gl_cv_cc_double_signbit" = unknown; then
41625
 
                ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
 
45592
          if test "$gl_cv_cc_double_signbit" = unknown; then
 
45593
                        ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
41626
45594
"
41627
45595
if test "x$ac_cv_have_decl_copysign" = xyes; then :
41628
45596
  ac_have_decl=1
41634
45602
#define HAVE_DECL_COPYSIGN $ac_have_decl
41635
45603
_ACEOF
41636
45604
 
41637
 
        if test "$ac_cv_have_decl_copysign" = yes; then
41638
 
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
 
45605
            if test "$ac_cv_have_decl_copysign" = yes; then
 
45606
                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
41639
45607
$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
41640
45608
if ${gl_cv_func_copysign_no_libm+:} false; then :
41641
45609
  $as_echo_n "(cached) " >&6
41642
45610
else
41643
45611
 
41644
 
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
45612
                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41645
45613
/* end confdefs.h.  */
41646
45614
#include <math.h>
41647
 
                     double x, y;
 
45615
                         double x, y;
41648
45616
int
41649
45617
main ()
41650
45618
{
41664
45632
fi
41665
45633
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
41666
45634
$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
41667
 
          if test $gl_cv_func_copysign_no_libm = yes; then
 
45635
              if test $gl_cv_func_copysign_no_libm = yes; then
41668
45636
 
41669
45637
$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
41670
45638
 
 
45639
              fi
 
45640
            fi
41671
45641
          fi
41672
 
        fi
41673
 
      fi
41674
 
      if test "$gl_cv_cc_long_double_signbit" = unknown; then
41675
 
                ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
 
45642
          if test "$gl_cv_cc_long_double_signbit" = unknown; then
 
45643
                        ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
41676
45644
"
41677
45645
if test "x$ac_cv_have_decl_copysignl" = xyes; then :
41678
45646
  ac_have_decl=1
41684
45652
#define HAVE_DECL_COPYSIGNL $ac_have_decl
41685
45653
_ACEOF
41686
45654
 
41687
 
        if test "$ac_cv_have_decl_copysignl" = yes; then
41688
 
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
 
45655
            if test "$ac_cv_have_decl_copysignl" = yes; then
 
45656
                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
41689
45657
$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
41690
45658
if ${gl_cv_func_copysignl_no_libm+:} false; then :
41691
45659
  $as_echo_n "(cached) " >&6
41692
45660
else
41693
45661
 
41694
 
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
45662
                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41695
45663
/* end confdefs.h.  */
41696
45664
#include <math.h>
41697
 
                     long double x, y;
 
45665
                         long double x, y;
41698
45666
int
41699
45667
main ()
41700
45668
{
41714
45682
fi
41715
45683
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
41716
45684
$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
41717
 
          if test $gl_cv_func_copysignl_no_libm = yes; then
 
45685
              if test $gl_cv_func_copysignl_no_libm = yes; then
41718
45686
 
41719
45687
$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
41720
45688
 
 
45689
              fi
 
45690
            fi
41721
45691
          fi
41722
 
        fi
41723
 
      fi
41724
 
    fi
41725
 
  fi
 
45692
          ;;
 
45693
      esac
 
45694
      ;;
 
45695
  esac
41726
45696
 
41727
 
if test $REPLACE_SIGNBIT = 1; then
 
45697
  if test $REPLACE_SIGNBIT = 1; then
41728
45698
 
41729
45699
 
41730
45700
 
41755
45725
 
41756
45726
  gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
41757
45727
 
41758
 
fi
 
45728
  fi
41759
45729
 
41760
45730
 
41761
45731
 
41785
45755
    HAVE_POSIX_SIGNALBLOCKING=0
41786
45756
  fi
41787
45757
 
41788
 
if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
 
45758
  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
41789
45759
 
41790
45760
 
41791
45761
 
41796
45766
 
41797
45767
  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
41798
45768
 
41799
 
  :
41800
 
fi
 
45769
 
 
45770
 
 
45771
 
 
45772
  fi
41801
45773
 
41802
45774
 
41803
45775
 
41925
45897
  if test $ac_cv_func_snprintf = yes; then
41926
45898
 
41927
45899
 
 
45900
 
41928
45901
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
41929
45902
$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
41930
45903
if ${gl_cv_func_snprintf_size1+:} false; then :
41938
45911
/* end confdefs.h.  */
41939
45912
 
41940
45913
#include <stdio.h>
 
45914
#if HAVE_SNPRINTF
 
45915
# define my_snprintf snprintf
 
45916
#else
 
45917
# include <stdarg.h>
 
45918
static int my_snprintf (char *buf, int size, const char *format, ...)
 
45919
{
 
45920
  va_list args;
 
45921
  int ret;
 
45922
  va_start (args, format);
 
45923
  ret = vsnprintf (buf, size, format, args);
 
45924
  va_end (args);
 
45925
  return ret;
 
45926
}
 
45927
#endif
41941
45928
int main()
41942
45929
{
41943
45930
  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
41944
 
  snprintf (buf, 1, "%d", 12345);
 
45931
  my_snprintf (buf, 1, "%d", 12345);
41945
45932
  return buf[1] != 'E';
41946
45933
}
41947
45934
_ACEOF
42260
46247
  :
42261
46248
 
42262
46249
 
42263
 
   ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
 
46250
     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
42264
46251
/* <sys/types.h> is not needed according to POSIX, but the
42265
46252
   <sys/socket.h> in i386-unknown-freebsd4.10 and
42266
46253
   powerpc-apple-darwin5.5 required it. */
42324
46311
fi
42325
46312
 
42326
46313
 
 
46314
 
 
46315
 
 
46316
 
 
46317
 
 
46318
 
 
46319
 
 
46320
 
 
46321
 
 
46322
 
 
46323
 
 
46324
 
 
46325
     if test $gl_cv_have_include_next = yes; then
 
46326
       gl_cv_next_spawn_h='<'spawn.h'>'
 
46327
     else
 
46328
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
 
46329
$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
 
46330
if ${gl_cv_next_spawn_h+:} false; then :
 
46331
  $as_echo_n "(cached) " >&6
 
46332
else
 
46333
 
 
46334
             if test $ac_cv_header_spawn_h = yes; then
 
46335
 
 
46336
 
 
46337
               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
46338
/* end confdefs.h.  */
 
46339
#include <spawn.h>
 
46340
 
 
46341
_ACEOF
 
46342
                                                                                                                        case "$host_os" in
 
46343
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 
46344
                 *)    gl_absname_cpp="$ac_cpp" ;;
 
46345
               esac
 
46346
 
 
46347
               case "$host_os" in
 
46348
                 mingw*)
 
46349
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
46350
                   ;;
 
46351
                 *)
 
46352
                   gl_dirsep_regex='\/'
 
46353
                   ;;
 
46354
               esac
 
46355
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
46356
 
 
46357
               gl_header_literal_regex=`echo 'spawn.h' \
 
46358
                                        | sed -e "$gl_make_literal_regex_sed"`
 
46359
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
46360
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
46361
                   s|^/[^/]|//&|
 
46362
                   p
 
46363
                   q
 
46364
                 }'
 
46365
                                                            gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 
46366
                      sed -n "$gl_absolute_header_sed"`'"'
 
46367
          else
 
46368
               gl_cv_next_spawn_h='<'spawn.h'>'
 
46369
             fi
 
46370
 
 
46371
 
 
46372
fi
 
46373
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
 
46374
$as_echo "$gl_cv_next_spawn_h" >&6; }
 
46375
     fi
 
46376
     NEXT_SPAWN_H=$gl_cv_next_spawn_h
 
46377
 
 
46378
     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
 
46379
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 
46380
       gl_next_as_first_directive='<'spawn.h'>'
 
46381
     else
 
46382
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 
46383
       gl_next_as_first_directive=$gl_cv_next_spawn_h
 
46384
     fi
 
46385
     NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
 
46386
 
 
46387
 
 
46388
 
 
46389
 
 
46390
 
 
46391
  if test $ac_cv_header_spawn_h = yes; then
 
46392
    HAVE_SPAWN_H=1
 
46393
    ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
 
46394
#include <spawn.h>
 
46395
 
 
46396
"
 
46397
if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
 
46398
 
 
46399
cat >>confdefs.h <<_ACEOF
 
46400
#define HAVE_POSIX_SPAWNATTR_T 1
 
46401
_ACEOF
 
46402
 
 
46403
 
 
46404
else
 
46405
  HAVE_POSIX_SPAWNATTR_T=0
 
46406
fi
 
46407
 
 
46408
    ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
 
46409
#include <spawn.h>
 
46410
 
 
46411
"
 
46412
if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
 
46413
 
 
46414
cat >>confdefs.h <<_ACEOF
 
46415
#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
 
46416
_ACEOF
 
46417
 
 
46418
 
 
46419
else
 
46420
  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
 
46421
fi
 
46422
 
 
46423
  else
 
46424
    HAVE_SPAWN_H=0
 
46425
    HAVE_POSIX_SPAWNATTR_T=0
 
46426
    HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
 
46427
  fi
 
46428
 
 
46429
 
 
46430
 
 
46431
 
 
46432
 
 
46433
 
 
46434
 
 
46435
 
 
46436
 
 
46437
 
 
46438
 
 
46439
 
 
46440
 
 
46441
 
 
46442
 
 
46443
 
 
46444
 
42327
46445
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
42328
46446
$as_echo_n "checking for ssize_t... " >&6; }
42329
46447
if ${gt_cv_ssize_t+:} false; then :
42394
46512
fi
42395
46513
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
42396
46514
$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
42397
 
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
 
46515
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
42398
46516
$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
42399
46517
if ${gl_cv_func_stat_file_slash+:} false; then :
42400
46518
  $as_echo_n "(cached) " >&6
42405
46523
         ln -s conftest.tmp conftest.lnk
42406
46524
       fi
42407
46525
       if test "$cross_compiling" = yes; then :
42408
 
  gl_cv_func_stat_file_slash="guessing no"
 
46526
  case "$host_os" in
 
46527
                    # Guess yes on glibc systems.
 
46528
            *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
 
46529
                    # If we don't know, assume the worst.
 
46530
            *)      gl_cv_func_stat_file_slash="guessing no" ;;
 
46531
          esac
 
46532
 
42409
46533
else
42410
46534
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42411
46535
/* end confdefs.h.  */
42454
46578
;;
42455
46579
  esac
42456
46580
 
42457
 
if test $REPLACE_STAT = 1; then
 
46581
  if test $REPLACE_STAT = 1; then
42458
46582
 
42459
46583
 
42460
46584
 
42469
46593
 
42470
46594
  :
42471
46595
 
42472
 
fi
 
46596
  fi
42473
46597
 
42474
46598
 
42475
46599
 
42494
46618
 
42495
46619
 
42496
46620
 
42497
 
 
42498
46621
  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
42499
46622
     #include <sys/stat.h>
42500
46623
"
42590
46713
 
42591
46714
 
42592
46715
 
42593
 
 
42594
46716
  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
42595
46717
     #include <sys/stat.h>
42596
46718
"
42631
46753
 
42632
46754
 
42633
46755
 
 
46756
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
 
46757
$as_echo_n "checking for working stdalign.h... " >&6; }
 
46758
if ${gl_cv_header_working_stdalign_h+:} false; then :
 
46759
  $as_echo_n "(cached) " >&6
 
46760
else
 
46761
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
46762
/* end confdefs.h.  */
 
46763
#include <stdalign.h>
 
46764
            #include <stddef.h>
 
46765
 
 
46766
            /* Test that alignof yields a result consistent with offsetof.
 
46767
               This catches GCC bug 52023
 
46768
               <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
 
46769
            #ifdef __cplusplus
 
46770
               template <class t> struct alignof_helper { char a; t b; };
 
46771
            # define ao(type) offsetof (alignof_helper<type>, b)
 
46772
            #else
 
46773
            # define ao(type) offsetof (struct { char a; type b; }, b)
 
46774
            #endif
 
46775
            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
 
46776
            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
 
46777
            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
 
46778
 
 
46779
            /* Test _Alignas only on platforms where gnulib can help.  */
 
46780
            #if \
 
46781
                (__GNUC__ || __IBMC__ || __IBMCPP__ \
 
46782
                 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
 
46783
              int alignas (8) alignas_int = 1;
 
46784
              char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
 
46785
            #endif
 
46786
 
 
46787
int
 
46788
main ()
 
46789
{
 
46790
 
 
46791
  ;
 
46792
  return 0;
 
46793
}
 
46794
_ACEOF
 
46795
if ac_fn_c_try_compile "$LINENO"; then :
 
46796
  gl_cv_header_working_stdalign_h=yes
 
46797
else
 
46798
  gl_cv_header_working_stdalign_h=no
 
46799
fi
 
46800
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
46801
fi
 
46802
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
 
46803
$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
 
46804
 
 
46805
  if test $gl_cv_header_working_stdalign_h = yes; then
 
46806
    STDALIGN_H=''
 
46807
  else
 
46808
    STDALIGN_H='stdalign.h'
 
46809
  fi
 
46810
 
 
46811
 
 
46812
   if test -n "$STDALIGN_H"; then
 
46813
  GL_GENERATE_STDALIGN_H_TRUE=
 
46814
  GL_GENERATE_STDALIGN_H_FALSE='#'
 
46815
else
 
46816
  GL_GENERATE_STDALIGN_H_TRUE='#'
 
46817
  GL_GENERATE_STDALIGN_H_FALSE=
 
46818
fi
 
46819
 
 
46820
 
 
46821
 
42634
46822
  STDARG_H=''
42635
46823
  NEXT_STDARG_H='<stdarg.h>'
42636
46824
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
42708
46896
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
42709
46897
                 *)    gl_absname_cpp="$ac_cpp" ;;
42710
46898
               esac
 
46899
 
 
46900
               case "$host_os" in
 
46901
                 mingw*)
 
46902
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
46903
                   ;;
 
46904
                 *)
 
46905
                   gl_dirsep_regex='\/'
 
46906
                   ;;
 
46907
               esac
 
46908
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
46909
 
 
46910
               gl_header_literal_regex=`echo 'stdarg.h' \
 
46911
                                        | sed -e "$gl_make_literal_regex_sed"`
 
46912
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
46913
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
46914
                   s|^/[^/]|//&|
 
46915
                   p
 
46916
                   q
 
46917
                 }'
42711
46918
                                                            gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42712
 
                  sed -n '\#/stdarg.h#{
42713
 
                    s#.*"\(.*/stdarg.h\)".*#\1#
42714
 
                    s#^/[^/]#//&#
42715
 
                    p
42716
 
                    q
42717
 
                  }'`'"'
 
46919
                      sed -n "$gl_absolute_header_sed"`'"'
42718
46920
 
42719
46921
 
42720
46922
fi
42897
47099
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
42898
47100
                 *)    gl_absname_cpp="$ac_cpp" ;;
42899
47101
               esac
 
47102
 
 
47103
               case "$host_os" in
 
47104
                 mingw*)
 
47105
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
47106
                   ;;
 
47107
                 *)
 
47108
                   gl_dirsep_regex='\/'
 
47109
                   ;;
 
47110
               esac
 
47111
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
47112
 
 
47113
               gl_header_literal_regex=`echo 'stddef.h' \
 
47114
                                        | sed -e "$gl_make_literal_regex_sed"`
 
47115
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
47116
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
47117
                   s|^/[^/]|//&|
 
47118
                   p
 
47119
                   q
 
47120
                 }'
42900
47121
                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42901
 
                  sed -n '\#/stddef.h#{
42902
 
                    s#.*"\(.*/stddef.h\)".*#\1#
42903
 
                    s#^/[^/]#//&#
42904
 
                    p
42905
 
                    q
42906
 
                  }'`'"'
 
47122
                      sed -n "$gl_absolute_header_sed"`'"'
42907
47123
 
42908
47124
 
42909
47125
fi
42956
47172
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
42957
47173
                 *)    gl_absname_cpp="$ac_cpp" ;;
42958
47174
               esac
 
47175
 
 
47176
               case "$host_os" in
 
47177
                 mingw*)
 
47178
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
47179
                   ;;
 
47180
                 *)
 
47181
                   gl_dirsep_regex='\/'
 
47182
                   ;;
 
47183
               esac
 
47184
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
47185
 
 
47186
               gl_header_literal_regex=`echo 'stdio.h' \
 
47187
                                        | sed -e "$gl_make_literal_regex_sed"`
 
47188
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
47189
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
47190
                   s|^/[^/]|//&|
 
47191
                   p
 
47192
                   q
 
47193
                 }'
42959
47194
                                                            gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42960
 
                  sed -n '\#/stdio.h#{
42961
 
                    s#.*"\(.*/stdio.h\)".*#\1#
42962
 
                    s#^/[^/]#//&#
42963
 
                    p
42964
 
                    q
42965
 
                  }'`'"'
 
47195
                      sed -n "$gl_absolute_header_sed"`'"'
42966
47196
 
42967
47197
 
42968
47198
fi
42985
47215
 
42986
47216
 
42987
47217
      GNULIB_FSCANF=1
 
47218
 
 
47219
 
 
47220
cat >>confdefs.h <<_ACEOF
 
47221
#define GNULIB_FSCANF 1
 
47222
_ACEOF
 
47223
 
 
47224
 
42988
47225
  GNULIB_SCANF=1
 
47226
 
 
47227
 
 
47228
cat >>confdefs.h <<_ACEOF
 
47229
#define GNULIB_SCANF 1
 
47230
_ACEOF
 
47231
 
 
47232
 
42989
47233
  GNULIB_FGETC=1
42990
47234
  GNULIB_GETC=1
42991
47235
  GNULIB_GETCHAR=1
42992
47236
  GNULIB_FGETS=1
42993
 
  GNULIB_GETS=1
42994
47237
  GNULIB_FREAD=1
42995
47238
 
42996
47239
 
43008
47251
 
43009
47252
 
43010
47253
 
43011
 
    for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat     snprintf tmpfile vdprintf vsnprintf; do
43012
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
43013
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
43014
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
43015
 
if eval \${$as_gl_Symbol+:} false; then :
43016
 
  $as_echo_n "(cached) " >&6
43017
 
else
43018
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43019
 
/* end confdefs.h.  */
43020
 
#include <stdio.h>
43021
 
 
43022
 
int
43023
 
main ()
43024
 
{
43025
 
#undef $gl_func
43026
 
  (void) $gl_func;
43027
 
  ;
43028
 
  return 0;
43029
 
}
43030
 
_ACEOF
43031
 
if ac_fn_c_try_compile "$LINENO"; then :
43032
 
  eval "$as_gl_Symbol=yes"
43033
 
else
43034
 
  eval "$as_gl_Symbol=no"
43035
 
fi
43036
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43037
 
fi
43038
 
eval ac_res=\$$as_gl_Symbol
43039
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
43040
 
$as_echo "$ac_res" >&6; }
43041
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
43042
 
  cat >>confdefs.h <<_ACEOF
43043
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
43044
 
_ACEOF
43045
 
 
43046
 
                     eval ac_cv_have_decl_$gl_func=yes
43047
 
fi
43048
 
      done
43049
 
 
43050
47254
 
43051
47255
 
43052
47256
 
43076
47280
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
43077
47281
                 *)    gl_absname_cpp="$ac_cpp" ;;
43078
47282
               esac
 
47283
 
 
47284
               case "$host_os" in
 
47285
                 mingw*)
 
47286
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
47287
                   ;;
 
47288
                 *)
 
47289
                   gl_dirsep_regex='\/'
 
47290
                   ;;
 
47291
               esac
 
47292
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
47293
 
 
47294
               gl_header_literal_regex=`echo 'stdlib.h' \
 
47295
                                        | sed -e "$gl_make_literal_regex_sed"`
 
47296
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
47297
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
47298
                   s|^/[^/]|//&|
 
47299
                   p
 
47300
                   q
 
47301
                 }'
43079
47302
                                                            gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43080
 
                  sed -n '\#/stdlib.h#{
43081
 
                    s#.*"\(.*/stdlib.h\)".*#\1#
43082
 
                    s#^/[^/]#//&#
43083
 
                    p
43084
 
                    q
43085
 
                  }'`'"'
 
47303
                      sed -n "$gl_absolute_header_sed"`'"'
43086
47304
 
43087
47305
 
43088
47306
fi
43105
47323
 
43106
47324
 
43107
47325
 
43108
 
    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp     mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r     setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt     unsetenv; do
43109
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
43110
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
43111
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
43112
 
if eval \${$as_gl_Symbol+:} false; then :
43113
 
  $as_echo_n "(cached) " >&6
43114
 
else
43115
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43116
 
/* end confdefs.h.  */
43117
 
#include <stdlib.h>
43118
 
#if HAVE_SYS_LOADAVG_H
43119
 
# include <sys/loadavg.h>
43120
 
#endif
43121
 
#if HAVE_RANDOM_H
43122
 
# include <random.h>
43123
 
#endif
43124
 
 
43125
 
int
43126
 
main ()
43127
 
{
43128
 
#undef $gl_func
43129
 
  (void) $gl_func;
43130
 
  ;
43131
 
  return 0;
43132
 
}
43133
 
_ACEOF
43134
 
if ac_fn_c_try_compile "$LINENO"; then :
43135
 
  eval "$as_gl_Symbol=yes"
43136
 
else
43137
 
  eval "$as_gl_Symbol=no"
43138
 
fi
43139
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43140
 
fi
43141
 
eval ac_res=\$$as_gl_Symbol
43142
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
43143
 
$as_echo "$ac_res" >&6; }
43144
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
43145
 
  cat >>confdefs.h <<_ACEOF
43146
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
43147
 
_ACEOF
43148
 
 
43149
 
                     eval ac_cv_have_decl_$gl_func=yes
43150
 
fi
43151
 
      done
43152
 
 
43153
47326
 
43154
47327
 
43155
47328
 
43172
47345
    HAVE_STPCPY=0
43173
47346
  fi
43174
47347
 
43175
 
if test $HAVE_STPCPY = 0; then
 
47348
  if test $HAVE_STPCPY = 0; then
43176
47349
 
43177
47350
 
43178
47351
 
43186
47359
 
43187
47360
  :
43188
47361
 
43189
 
fi
 
47362
  fi
43190
47363
 
43191
47364
 
43192
47365
 
43231
47404
_ACEOF
43232
47405
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43233
47406
  $EGREP "Thanks for using GNU" >/dev/null 2>&1; then :
43234
 
  gl_cv_func_stpncpy=yes
 
47407
  gl_cv_func_stpncpy="guessing yes"
43235
47408
else
43236
 
  gl_cv_func_stpncpy=no
 
47409
  gl_cv_func_stpncpy="guessing no"
43237
47410
fi
43238
47411
rm -f conftest*
43239
47412
 
43292
47465
fi
43293
47466
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stpncpy" >&5
43294
47467
$as_echo "$gl_cv_func_stpncpy" >&6; }
43295
 
    if test $gl_cv_func_stpncpy = yes; then
 
47468
    case "$gl_cv_func_stpncpy" in
 
47469
      *yes)
43296
47470
 
43297
47471
$as_echo "#define HAVE_STPNCPY 1" >>confdefs.h
43298
47472
 
43299
 
    else
43300
 
      REPLACE_STPNCPY=1
43301
 
    fi
 
47473
        ;;
 
47474
      *)
 
47475
        REPLACE_STPNCPY=1
 
47476
        ;;
 
47477
    esac
43302
47478
  else
43303
47479
    HAVE_STPNCPY=0
43304
47480
  fi
43305
47481
 
43306
 
if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then
 
47482
  if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then
43307
47483
 
43308
47484
 
43309
47485
 
43317
47493
 
43318
47494
  :
43319
47495
 
43320
 
fi
 
47496
  fi
43321
47497
 
43322
47498
 
43323
47499
 
43337
47513
 
43338
47514
 
43339
47515
 
 
47516
  for ac_func in strchrnul
 
47517
do :
 
47518
  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
 
47519
if test "x$ac_cv_func_strchrnul" = xyes; then :
 
47520
  cat >>confdefs.h <<_ACEOF
 
47521
#define HAVE_STRCHRNUL 1
 
47522
_ACEOF
 
47523
 
 
47524
fi
 
47525
done
 
47526
 
 
47527
  if test $ac_cv_func_strchrnul = no; then
 
47528
    HAVE_STRCHRNUL=0
 
47529
  else
 
47530
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
 
47531
$as_echo_n "checking whether strchrnul works... " >&6; }
 
47532
if ${gl_cv_func_strchrnul_works+:} false; then :
 
47533
  $as_echo_n "(cached) " >&6
 
47534
else
 
47535
  if test "$cross_compiling" = yes; then :
 
47536
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
47537
/* end confdefs.h.  */
 
47538
 
 
47539
#if defined __CYGWIN__
 
47540
 #include <cygwin/version.h>
 
47541
 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
 
47542
  Lucky user
 
47543
 #endif
 
47544
#else
 
47545
  Lucky user
 
47546
#endif
 
47547
 
 
47548
_ACEOF
 
47549
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
47550
  $EGREP "Lucky user" >/dev/null 2>&1; then :
 
47551
  gl_cv_func_strchrnul_works="guessing yes"
 
47552
else
 
47553
  gl_cv_func_strchrnul_works="guessing no"
 
47554
fi
 
47555
rm -f conftest*
 
47556
 
 
47557
 
 
47558
else
 
47559
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
47560
/* end confdefs.h.  */
 
47561
 
 
47562
#include <string.h> /* for strchrnul */
 
47563
 
 
47564
int
 
47565
main ()
 
47566
{
 
47567
const char *buf = "a";
 
47568
      return strchrnul (buf, 'b') != buf + 1;
 
47569
 
 
47570
  ;
 
47571
  return 0;
 
47572
}
 
47573
_ACEOF
 
47574
if ac_fn_c_try_run "$LINENO"; then :
 
47575
  gl_cv_func_strchrnul_works=yes
 
47576
else
 
47577
  gl_cv_func_strchrnul_works=no
 
47578
fi
 
47579
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
47580
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
47581
fi
 
47582
 
 
47583
 
 
47584
fi
 
47585
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
 
47586
$as_echo "$gl_cv_func_strchrnul_works" >&6; }
 
47587
    case "$gl_cv_func_strchrnul_works" in
 
47588
      *yes) ;;
 
47589
      *) REPLACE_STRCHRNUL=1 ;;
 
47590
    esac
 
47591
  fi
 
47592
 
 
47593
  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
 
47594
 
 
47595
 
 
47596
 
 
47597
 
 
47598
 
 
47599
 
 
47600
 
 
47601
 
 
47602
  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
 
47603
 
 
47604
    :
 
47605
  fi
 
47606
 
 
47607
 
 
47608
 
 
47609
 
 
47610
 
 
47611
          GNULIB_STRCHRNUL=1
 
47612
 
 
47613
 
 
47614
 
 
47615
 
 
47616
 
 
47617
$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
 
47618
 
 
47619
 
 
47620
 
 
47621
 
 
47622
 
 
47623
 
 
47624
 
43340
47625
  if test $ac_cv_func_strdup = yes; then
43341
47626
    if test $gl_cv_func_malloc_posix != yes; then
43342
47627
      REPLACE_STRDUP=1
43347
47632
    HAVE_DECL_STRDUP=0
43348
47633
  fi
43349
47634
 
43350
 
if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
 
47635
  if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
43351
47636
 
43352
47637
 
43353
47638
 
43358
47643
 
43359
47644
  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
43360
47645
 
43361
 
  :
43362
 
fi
 
47646
    :
 
47647
  fi
43363
47648
 
43364
47649
 
43365
47650
 
43389
47674
  $as_echo_n "(cached) " >&6
43390
47675
else
43391
47676
  if test "$cross_compiling" = yes; then :
43392
 
           gl_cv_func_working_strerror="guessing no"
 
47677
  case "$host_os" in
 
47678
                   # Guess yes on glibc systems.
 
47679
           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
 
47680
                   # If we don't know, assume the worst.
 
47681
           *)      gl_cv_func_working_strerror="guessing no" ;;
 
47682
         esac
 
47683
 
43393
47684
else
43394
47685
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43395
47686
/* end confdefs.h.  */
43416
47707
fi
43417
47708
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
43418
47709
$as_echo "$gl_cv_func_working_strerror" >&6; }
43419
 
    if test "$gl_cv_func_working_strerror" != yes; then
43420
 
                  REPLACE_STRERROR=1
43421
 
    fi
 
47710
    case "$gl_cv_func_working_strerror" in
 
47711
      *yes) ;;
 
47712
      *)
 
47713
                        REPLACE_STRERROR=1
 
47714
        ;;
 
47715
    esac
43422
47716
 
43423
47717
                  case "$gl_cv_func_strerror_r_works" in
43424
47718
        *no) REPLACE_STRERROR=1 ;;
43428
47722
            REPLACE_STRERROR=1
43429
47723
  fi
43430
47724
 
43431
 
if test $REPLACE_STRERROR = 1; then
 
47725
  if test $REPLACE_STRERROR = 1; then
43432
47726
 
43433
47727
 
43434
47728
 
43439
47733
 
43440
47734
  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
43441
47735
 
43442
 
fi
 
47736
  fi
43443
47737
 
43444
47738
 
43445
47739
cat >>confdefs.h <<_ACEOF
43464
47758
 
43465
47759
 
43466
47760
 
43467
 
if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
 
47761
  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
43468
47762
 
43469
47763
 
43470
47764
 
43502
47796
  fi
43503
47797
 
43504
47798
 
43505
 
fi
 
47799
  fi
43506
47800
 
43507
47801
 
43508
47802
 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
43517
47811
 
43518
47812
 
43519
47813
 
43520
 
if test $gl_cond_libtool = false; then
43521
 
  gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
43522
 
  gl_libdeps="$gl_libdeps $LIBICONV"
43523
 
fi
 
47814
  if test $gl_cond_libtool = false; then
 
47815
    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
 
47816
    gl_libdeps="$gl_libdeps $LIBICONV"
 
47817
  fi
 
47818
 
 
47819
 
 
47820
 
 
47821
 
 
47822
  if test $REPLACE_STRNCAT = 1; then
 
47823
 
 
47824
 
 
47825
 
 
47826
 
 
47827
 
 
47828
 
 
47829
 
 
47830
 
 
47831
  gl_LIBOBJS="$gl_LIBOBJS strncat.$ac_objext"
 
47832
 
 
47833
 
 
47834
  :
 
47835
 
 
47836
  fi
 
47837
 
 
47838
 
 
47839
 
 
47840
 
 
47841
 
 
47842
          GNULIB_STRNCAT=1
 
47843
 
 
47844
 
 
47845
 
 
47846
 
 
47847
 
 
47848
$as_echo "#define GNULIB_TEST_STRNCAT 1" >>confdefs.h
43524
47849
 
43525
47850
 
43526
47851
 
43559
47884
main ()
43560
47885
{
43561
47886
 
43562
 
#ifndef HAVE_DECL_STRNDUP
 
47887
#if !HAVE_DECL_STRNDUP
43563
47888
  extern
43564
47889
  #ifdef __cplusplus
43565
47890
  "C"
43594
47919
    HAVE_STRNDUP=0
43595
47920
  fi
43596
47921
 
43597
 
if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
 
47922
  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
43598
47923
 
43599
47924
 
43600
47925
 
43605
47930
 
43606
47931
  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
43607
47932
 
43608
 
fi
 
47933
  fi
43609
47934
 
43610
47935
 
43611
47936
 
43689
48014
    fi
43690
48015
  fi
43691
48016
 
43692
 
if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
 
48017
  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
43693
48018
 
43694
48019
 
43695
48020
 
43700
48025
 
43701
48026
  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
43702
48027
 
43703
 
  :
43704
 
fi
 
48028
    :
 
48029
  fi
43705
48030
 
43706
48031
 
43707
48032
 
43719
48044
 
43720
48045
 
43721
48046
 
 
48047
  for ac_func in strpbrk
 
48048
do :
 
48049
  ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
 
48050
if test "x$ac_cv_func_strpbrk" = xyes; then :
 
48051
  cat >>confdefs.h <<_ACEOF
 
48052
#define HAVE_STRPBRK 1
 
48053
_ACEOF
 
48054
 
 
48055
fi
 
48056
done
 
48057
 
 
48058
  if test $ac_cv_func_strpbrk = no; then
 
48059
    HAVE_STRPBRK=0
 
48060
  fi
 
48061
 
 
48062
  if test $HAVE_STRPBRK = 0; then
 
48063
 
 
48064
 
 
48065
 
 
48066
 
 
48067
 
 
48068
 
 
48069
 
 
48070
 
 
48071
  gl_LIBOBJS="$gl_LIBOBJS strpbrk.$ac_objext"
 
48072
 
 
48073
    :
 
48074
  fi
 
48075
 
 
48076
 
 
48077
 
 
48078
 
 
48079
 
 
48080
          GNULIB_STRPBRK=1
 
48081
 
 
48082
 
 
48083
 
 
48084
 
 
48085
 
 
48086
$as_echo "#define GNULIB_TEST_STRPBRK 1" >>confdefs.h
 
48087
 
 
48088
 
 
48089
 
 
48090
 
 
48091
 
43722
48092
 
43723
48093
 
43724
48094
 
43790
48160
    HAVE_STRSIGNAL=0
43791
48161
  fi
43792
48162
 
43793
 
if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
 
48163
  if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
43794
48164
 
43795
48165
 
43796
48166
 
43803
48173
 
43804
48174
 
43805
48175
 
 
48176
 
43806
48177
  ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
43807
48178
"
43808
48179
if test "x$ac_cv_have_decl__sys_siglist" = xyes; then :
43816
48187
_ACEOF
43817
48188
 
43818
48189
 
43819
 
fi
 
48190
  fi
43820
48191
 
43821
48192
 
43822
48193
 
43865
48236
_ACEOF
43866
48237
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43867
48238
  $EGREP "Lucky user" >/dev/null 2>&1; then :
43868
 
  gl_cv_func_strstr_works_always=yes
 
48239
  gl_cv_func_strstr_works_always="guessing yes"
43869
48240
else
43870
48241
  gl_cv_func_strstr_works_always="guessing no"
43871
48242
fi
43903
48274
fi
43904
48275
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
43905
48276
$as_echo "$gl_cv_func_strstr_works_always" >&6; }
43906
 
    if test "$gl_cv_func_strstr_works_always" != yes; then
43907
 
      REPLACE_STRSTR=1
43908
 
    fi
 
48277
    case "$gl_cv_func_strstr_works_always" in
 
48278
      *yes) ;;
 
48279
      *)
 
48280
        REPLACE_STRSTR=1
 
48281
        ;;
 
48282
    esac
43909
48283
  fi
43910
48284
 
43911
 
if test $REPLACE_STRSTR = 1; then
 
48285
  if test $REPLACE_STRSTR = 1; then
43912
48286
 
43913
48287
 
43914
48288
 
43919
48293
 
43920
48294
  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
43921
48295
 
43922
 
fi
 
48296
  fi
43923
48297
 
43924
48298
 
43925
48299
 
43959
48333
_ACEOF
43960
48334
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43961
48335
  $EGREP "Lucky user" >/dev/null 2>&1; then :
43962
 
  gl_cv_func_strtod_works=yes
 
48336
  gl_cv_func_strtod_works="guessing yes"
43963
48337
else
43964
48338
  gl_cv_func_strtod_works="guessing no"
43965
48339
fi
44066
48440
fi
44067
48441
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
44068
48442
$as_echo "$gl_cv_func_strtod_works" >&6; }
44069
 
    if test "$gl_cv_func_strtod_works" != yes; then
44070
 
      REPLACE_STRTOD=1
44071
 
    fi
 
48443
    case "$gl_cv_func_strtod_works" in
 
48444
      *yes) ;;
 
48445
      *)
 
48446
        REPLACE_STRTOD=1
 
48447
        ;;
 
48448
    esac
44072
48449
  fi
44073
48450
 
44074
 
if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
 
48451
  if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
44075
48452
 
44076
48453
 
44077
48454
 
44090
48467
 
44091
48468
  fi
44092
48469
 
44093
 
fi
 
48470
  fi
44094
48471
 
44095
48472
 
44096
48473
 
44115
48492
    HAVE_DECL_STRTOIMAX=0
44116
48493
  fi
44117
48494
 
44118
 
if test $ac_cv_func_strtoimax = no; then
 
48495
  if test $ac_cv_func_strtoimax = yes; then
 
48496
    HAVE_STRTOIMAX=1
 
48497
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
 
48498
$as_echo_n "checking whether strtoimax works... " >&6; }
 
48499
if ${gl_cv_func_strtoimax+:} false; then :
 
48500
  $as_echo_n "(cached) " >&6
 
48501
else
 
48502
  if test "$cross_compiling" = yes; then :
 
48503
  case "$host_os" in
 
48504
                   # Guess no on AIX 5.
 
48505
            aix5*) gl_cv_func_strtoimax="guessing no" ;;
 
48506
                   # Guess yes otherwise.
 
48507
            *)     gl_cv_func_strtoimax="guessing yes" ;;
 
48508
          esac
 
48509
 
 
48510
else
 
48511
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
48512
/* end confdefs.h.  */
 
48513
 
 
48514
#include <errno.h>
 
48515
#include <string.h>
 
48516
#include <inttypes.h>
 
48517
int main ()
 
48518
{
 
48519
  if (sizeof (intmax_t) > sizeof (int))
 
48520
    {
 
48521
      const char *s = "4294967295";
 
48522
      char *p;
 
48523
      intmax_t res;
 
48524
      errno = 0;
 
48525
      res = strtoimax (s, &p, 10);
 
48526
      if (p != s + strlen (s))
 
48527
        return 1;
 
48528
      if (errno != 0)
 
48529
        return 2;
 
48530
      if (res != (intmax_t) 65535 * (intmax_t) 65537)
 
48531
        return 3;
 
48532
    }
 
48533
  else
 
48534
    {
 
48535
      const char *s = "2147483647";
 
48536
      char *p;
 
48537
      intmax_t res;
 
48538
      errno = 0;
 
48539
      res = strtoimax (s, &p, 10);
 
48540
      if (p != s + strlen (s))
 
48541
        return 1;
 
48542
      if (errno != 0)
 
48543
        return 2;
 
48544
      if (res != 2147483647)
 
48545
        return 3;
 
48546
    }
 
48547
  return 0;
 
48548
}
 
48549
 
 
48550
_ACEOF
 
48551
if ac_fn_c_try_run "$LINENO"; then :
 
48552
  gl_cv_func_strtoimax=yes
 
48553
else
 
48554
  gl_cv_func_strtoimax=no
 
48555
fi
 
48556
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
48557
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
48558
fi
 
48559
 
 
48560
 
 
48561
fi
 
48562
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
 
48563
$as_echo "$gl_cv_func_strtoimax" >&6; }
 
48564
    case "$gl_cv_func_strtoimax" in
 
48565
      *no) REPLACE_STRTOIMAX=1 ;;
 
48566
    esac
 
48567
  else
 
48568
    HAVE_STRTOIMAX=0
 
48569
  fi
 
48570
 
 
48571
  if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
44119
48572
 
44120
48573
 
44121
48574
 
44140
48593
 
44141
48594
 
44142
48595
 
44143
 
fi
 
48596
  fi
44144
48597
 
44145
48598
 
44146
48599
 
44171
48624
    fi
44172
48625
  fi
44173
48626
 
44174
 
if test $HAVE_STRTOLL = 0; then
 
48627
  if test $HAVE_STRTOLL = 0; then
44175
48628
 
44176
48629
 
44177
48630
 
44185
48638
 
44186
48639
  :
44187
48640
 
44188
 
fi
 
48641
  fi
44189
48642
 
44190
48643
 
44191
48644
 
44221
48674
    fi
44222
48675
  fi
44223
48676
 
44224
 
if test $HAVE_STRTOULL = 0; then
 
48677
  if test $HAVE_STRTOULL = 0; then
44225
48678
 
44226
48679
 
44227
48680
 
44235
48688
 
44236
48689
  :
44237
48690
 
44238
 
fi
 
48691
  fi
44239
48692
 
44240
48693
 
44241
48694
 
44260
48713
    HAVE_DECL_STRTOUMAX=0
44261
48714
  fi
44262
48715
 
44263
 
if test $ac_cv_func_strtoumax = no; then
 
48716
  if test $ac_cv_func_strtoumax = no; then
44264
48717
 
44265
48718
 
44266
48719
 
44285
48738
 
44286
48739
 
44287
48740
 
44288
 
fi
 
48741
  fi
44289
48742
 
44290
48743
 
44291
48744
 
44308
48761
  $as_echo_n "(cached) " >&6
44309
48762
else
44310
48763
  if test "$cross_compiling" = yes; then :
44311
 
  gl_cv_func_symlink_works="guessing no"
 
48764
  case "$host_os" in
 
48765
                    # Guess yes on glibc systems.
 
48766
            *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
 
48767
                    # If we don't know, assume the worst.
 
48768
            *)      gl_cv_func_symlink_works="guessing no" ;;
 
48769
          esac
 
48770
 
44312
48771
else
44313
48772
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44314
48773
/* end confdefs.h.  */
44343
48802
fi
44344
48803
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
44345
48804
$as_echo "$gl_cv_func_symlink_works" >&6; }
44346
 
    if test "$gl_cv_func_symlink_works" != yes; then
44347
 
      REPLACE_SYMLINK=1
44348
 
    fi
 
48805
    case "$gl_cv_func_symlink_works" in
 
48806
      *yes) ;;
 
48807
      *)
 
48808
        REPLACE_SYMLINK=1
 
48809
        ;;
 
48810
    esac
44349
48811
  fi
44350
48812
 
44351
 
if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
 
48813
  if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
44352
48814
 
44353
48815
 
44354
48816
 
44359
48821
 
44360
48822
  gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
44361
48823
 
44362
 
fi
 
48824
  fi
44363
48825
 
44364
48826
 
44365
48827
 
44442
48904
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
44443
48905
                 *)    gl_absname_cpp="$ac_cpp" ;;
44444
48906
               esac
 
48907
 
 
48908
               case "$host_os" in
 
48909
                 mingw*)
 
48910
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
48911
                   ;;
 
48912
                 *)
 
48913
                   gl_dirsep_regex='\/'
 
48914
                   ;;
 
48915
               esac
 
48916
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
48917
 
 
48918
               gl_header_literal_regex=`echo 'sys/ioctl.h' \
 
48919
                                        | sed -e "$gl_make_literal_regex_sed"`
 
48920
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
48921
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
48922
                   s|^/[^/]|//&|
 
48923
                   p
 
48924
                   q
 
48925
                 }'
44445
48926
                                                            gl_cv_next_sys_ioctl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44446
 
                  sed -n '\#/sys/ioctl.h#{
44447
 
                    s#.*"\(.*/sys/ioctl.h\)".*#\1#
44448
 
                    s#^/[^/]#//&#
44449
 
                    p
44450
 
                    q
44451
 
                  }'`'"'
 
48927
                      sed -n "$gl_absolute_header_sed"`'"'
44452
48928
          else
44453
48929
               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
44454
48930
             fi
44474
48950
 
44475
48951
 
44476
48952
 
44477
 
    for gl_func in ioctl; do
44478
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
44479
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
44480
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
44481
 
if eval \${$as_gl_Symbol+:} false; then :
 
48953
 
 
48954
 
 
48955
 
 
48956
 
 
48957
 
 
48958
 
 
48959
 
 
48960
 
 
48961
 
 
48962
 
 
48963
 
 
48964
 
 
48965
 
 
48966
     if test $gl_cv_have_include_next = yes; then
 
48967
       gl_cv_next_sys_resource_h='<'sys/resource.h'>'
 
48968
     else
 
48969
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/resource.h>" >&5
 
48970
$as_echo_n "checking absolute name of <sys/resource.h>... " >&6; }
 
48971
if ${gl_cv_next_sys_resource_h+:} false; then :
44482
48972
  $as_echo_n "(cached) " >&6
44483
48973
else
44484
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
48974
 
 
48975
             if test $ac_cv_header_sys_resource_h = yes; then
 
48976
 
 
48977
 
 
48978
               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44485
48979
/* end confdefs.h.  */
44486
 
#include <sys/ioctl.h>
44487
 
/* Some platforms declare ioctl in the wrong header.  */
44488
 
#if !(defined __GLIBC__ && !defined __UCLIBC__)
44489
 
# include <unistd.h>
44490
 
#endif
44491
 
 
44492
 
int
44493
 
main ()
44494
 
{
44495
 
#undef $gl_func
44496
 
  (void) $gl_func;
44497
 
  ;
44498
 
  return 0;
44499
 
}
44500
 
_ACEOF
44501
 
if ac_fn_c_try_compile "$LINENO"; then :
44502
 
  eval "$as_gl_Symbol=yes"
44503
 
else
44504
 
  eval "$as_gl_Symbol=no"
44505
 
fi
44506
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44507
 
fi
44508
 
eval ac_res=\$$as_gl_Symbol
44509
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
44510
 
$as_echo "$ac_res" >&6; }
44511
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
44512
 
  cat >>confdefs.h <<_ACEOF
44513
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
44514
 
_ACEOF
44515
 
 
44516
 
                     eval ac_cv_have_decl_$gl_func=yes
44517
 
fi
44518
 
      done
 
48980
#include <sys/resource.h>
 
48981
 
 
48982
_ACEOF
 
48983
                                                                                                                        case "$host_os" in
 
48984
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 
48985
                 *)    gl_absname_cpp="$ac_cpp" ;;
 
48986
               esac
 
48987
 
 
48988
               case "$host_os" in
 
48989
                 mingw*)
 
48990
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
48991
                   ;;
 
48992
                 *)
 
48993
                   gl_dirsep_regex='\/'
 
48994
                   ;;
 
48995
               esac
 
48996
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
48997
 
 
48998
               gl_header_literal_regex=`echo 'sys/resource.h' \
 
48999
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49000
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49001
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49002
                   s|^/[^/]|//&|
 
49003
                   p
 
49004
                   q
 
49005
                 }'
 
49006
                                                            gl_cv_next_sys_resource_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 
49007
                      sed -n "$gl_absolute_header_sed"`'"'
 
49008
          else
 
49009
               gl_cv_next_sys_resource_h='<'sys/resource.h'>'
 
49010
             fi
 
49011
 
 
49012
 
 
49013
fi
 
49014
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_resource_h" >&5
 
49015
$as_echo "$gl_cv_next_sys_resource_h" >&6; }
 
49016
     fi
 
49017
     NEXT_SYS_RESOURCE_H=$gl_cv_next_sys_resource_h
 
49018
 
 
49019
     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
 
49020
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 
49021
       gl_next_as_first_directive='<'sys/resource.h'>'
 
49022
     else
 
49023
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 
49024
       gl_next_as_first_directive=$gl_cv_next_sys_resource_h
 
49025
     fi
 
49026
     NEXT_AS_FIRST_DIRECTIVE_SYS_RESOURCE_H=$gl_next_as_first_directive
 
49027
 
 
49028
 
 
49029
 
 
49030
 
 
49031
  if test $ac_cv_header_sys_resource_h = yes; then
 
49032
    HAVE_SYS_RESOURCE_H=1
 
49033
  else
 
49034
    HAVE_SYS_RESOURCE_H=0
 
49035
  fi
 
49036
 
 
49037
 
44519
49038
 
44520
49039
 
44521
49040
 
44633
49152
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
44634
49153
                 *)    gl_absname_cpp="$ac_cpp" ;;
44635
49154
               esac
 
49155
 
 
49156
               case "$host_os" in
 
49157
                 mingw*)
 
49158
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49159
                   ;;
 
49160
                 *)
 
49161
                   gl_dirsep_regex='\/'
 
49162
                   ;;
 
49163
               esac
 
49164
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49165
 
 
49166
               gl_header_literal_regex=`echo 'sys/select.h' \
 
49167
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49168
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49169
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49170
                   s|^/[^/]|//&|
 
49171
                   p
 
49172
                   q
 
49173
                 }'
44636
49174
                                                            gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44637
 
                  sed -n '\#/sys/select.h#{
44638
 
                    s#.*"\(.*/sys/select.h\)".*#\1#
44639
 
                    s#^/[^/]#//&#
44640
 
                    p
44641
 
                    q
44642
 
                  }'`'"'
 
49175
                      sed -n "$gl_absolute_header_sed"`'"'
44643
49176
          else
44644
49177
               gl_cv_next_sys_select_h='<'sys/select.h'>'
44645
49178
             fi
44698
49231
 
44699
49232
 
44700
49233
 
44701
 
    for gl_func in pselect select; do
44702
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
44703
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
44704
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
44705
 
if eval \${$as_gl_Symbol+:} false; then :
44706
 
  $as_echo_n "(cached) " >&6
44707
 
else
44708
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44709
 
/* end confdefs.h.  */
44710
 
 
44711
 
/* Some systems require prerequisite headers.  */
44712
 
#include <sys/types.h>
44713
 
#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
44714
 
# include <sys/time.h>
44715
 
#endif
44716
 
#include <sys/select.h>
44717
 
 
44718
 
int
44719
 
main ()
44720
 
{
44721
 
#undef $gl_func
44722
 
  (void) $gl_func;
44723
 
  ;
44724
 
  return 0;
44725
 
}
44726
 
_ACEOF
44727
 
if ac_fn_c_try_compile "$LINENO"; then :
44728
 
  eval "$as_gl_Symbol=yes"
44729
 
else
44730
 
  eval "$as_gl_Symbol=no"
44731
 
fi
44732
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44733
 
fi
44734
 
eval ac_res=\$$as_gl_Symbol
44735
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
44736
 
$as_echo "$ac_res" >&6; }
44737
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
44738
 
  cat >>confdefs.h <<_ACEOF
44739
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
44740
 
_ACEOF
44741
 
 
44742
 
                     eval ac_cv_have_decl_$gl_func=yes
44743
 
fi
44744
 
      done
44745
 
 
44746
49234
 
44747
49235
 
44748
49236
 
44863
49351
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
44864
49352
                 *)    gl_absname_cpp="$ac_cpp" ;;
44865
49353
               esac
 
49354
 
 
49355
               case "$host_os" in
 
49356
                 mingw*)
 
49357
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49358
                   ;;
 
49359
                 *)
 
49360
                   gl_dirsep_regex='\/'
 
49361
                   ;;
 
49362
               esac
 
49363
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49364
 
 
49365
               gl_header_literal_regex=`echo 'sys/socket.h' \
 
49366
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49367
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49368
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49369
                   s|^/[^/]|//&|
 
49370
                   p
 
49371
                   q
 
49372
                 }'
44866
49373
                                                            gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44867
 
                  sed -n '\#/sys/socket.h#{
44868
 
                    s#.*"\(.*/sys/socket.h\)".*#\1#
44869
 
                    s#^/[^/]#//&#
44870
 
                    p
44871
 
                    q
44872
 
                  }'`'"'
 
49374
                      sed -n "$gl_absolute_header_sed"`'"'
44873
49375
          else
44874
49376
               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
44875
49377
             fi
45011
49513
 
45012
49514
 
45013
49515
 
45014
 
    for gl_func in socket connect accept bind getpeername getsockname getsockopt     listen recv send recvfrom sendto setsockopt shutdown accept4; do
45015
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
45016
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
45017
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
45018
 
if eval \${$as_gl_Symbol+:} false; then :
45019
 
  $as_echo_n "(cached) " >&6
45020
 
else
45021
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45022
 
/* end confdefs.h.  */
45023
 
 
45024
 
/* Some systems require prerequisite headers.  */
45025
 
#include <sys/types.h>
45026
 
#include <sys/socket.h>
45027
 
 
45028
 
int
45029
 
main ()
45030
 
{
45031
 
#undef $gl_func
45032
 
  (void) $gl_func;
45033
 
  ;
45034
 
  return 0;
45035
 
}
45036
 
_ACEOF
45037
 
if ac_fn_c_try_compile "$LINENO"; then :
45038
 
  eval "$as_gl_Symbol=yes"
45039
 
else
45040
 
  eval "$as_gl_Symbol=no"
45041
 
fi
45042
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45043
 
fi
45044
 
eval ac_res=\$$as_gl_Symbol
45045
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45046
 
$as_echo "$ac_res" >&6; }
45047
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
45048
 
  cat >>confdefs.h <<_ACEOF
45049
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
45050
 
_ACEOF
45051
 
 
45052
 
                     eval ac_cv_have_decl_$gl_func=yes
45053
 
fi
45054
 
      done
45055
 
 
45056
49516
 
45057
49517
 
45058
49518
 
45092
49552
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45093
49553
                 *)    gl_absname_cpp="$ac_cpp" ;;
45094
49554
               esac
 
49555
 
 
49556
               case "$host_os" in
 
49557
                 mingw*)
 
49558
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49559
                   ;;
 
49560
                 *)
 
49561
                   gl_dirsep_regex='\/'
 
49562
                   ;;
 
49563
               esac
 
49564
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49565
 
 
49566
               gl_header_literal_regex=`echo 'sys/stat.h' \
 
49567
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49568
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49569
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49570
                   s|^/[^/]|//&|
 
49571
                   p
 
49572
                   q
 
49573
                 }'
45095
49574
                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45096
 
                  sed -n '\#/sys/stat.h#{
45097
 
                    s#.*"\(.*/sys/stat.h\)".*#\1#
45098
 
                    s#^/[^/]#//&#
45099
 
                    p
45100
 
                    q
45101
 
                  }'`'"'
 
49575
                      sed -n "$gl_absolute_header_sed"`'"'
45102
49576
          else
45103
49577
               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
45104
49578
             fi
45123
49597
 
45124
49598
 
45125
49599
 
 
49600
 
 
49601
 
 
49602
 
 
49603
 
 
49604
 
 
49605
 
 
49606
  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
 
49607
 
 
49608
$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
 
49609
 
 
49610
  fi
 
49611
 
45126
49612
      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
45127
49613
     #include <sys/stat.h>
45128
49614
"
45136
49622
 
45137
49623
 
45138
49624
 
45139
 
    for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
45140
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
45141
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
45142
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
45143
 
if eval \${$as_gl_Symbol+:} false; then :
 
49625
 
 
49626
 
 
49627
 
 
49628
 
 
49629
 
 
49630
 
 
49631
 
 
49632
 
 
49633
 
 
49634
 
 
49635
 
 
49636
 
 
49637
 
 
49638
 
 
49639
 
 
49640
 
 
49641
     if test $gl_cv_have_include_next = yes; then
 
49642
       gl_cv_next_sys_types_h='<'sys/types.h'>'
 
49643
     else
 
49644
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
 
49645
$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
 
49646
if ${gl_cv_next_sys_types_h+:} false; then :
45144
49647
  $as_echo_n "(cached) " >&6
45145
49648
else
45146
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
49649
 
 
49650
               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45147
49651
/* end confdefs.h.  */
45148
 
#include <sys/stat.h>
45149
 
 
45150
 
int
45151
 
main ()
45152
 
{
45153
 
#undef $gl_func
45154
 
  (void) $gl_func;
45155
 
  ;
45156
 
  return 0;
45157
 
}
45158
 
_ACEOF
45159
 
if ac_fn_c_try_compile "$LINENO"; then :
45160
 
  eval "$as_gl_Symbol=yes"
45161
 
else
45162
 
  eval "$as_gl_Symbol=no"
45163
 
fi
45164
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45165
 
fi
45166
 
eval ac_res=\$$as_gl_Symbol
45167
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45168
 
$as_echo "$ac_res" >&6; }
45169
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
45170
 
  cat >>confdefs.h <<_ACEOF
45171
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
45172
 
_ACEOF
45173
 
 
45174
 
                     eval ac_cv_have_decl_$gl_func=yes
45175
 
fi
45176
 
      done
 
49652
#include <sys/types.h>
 
49653
 
 
49654
_ACEOF
 
49655
                                                                                                                        case "$host_os" in
 
49656
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
 
49657
                 *)    gl_absname_cpp="$ac_cpp" ;;
 
49658
               esac
 
49659
 
 
49660
               case "$host_os" in
 
49661
                 mingw*)
 
49662
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49663
                   ;;
 
49664
                 *)
 
49665
                   gl_dirsep_regex='\/'
 
49666
                   ;;
 
49667
               esac
 
49668
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49669
 
 
49670
               gl_header_literal_regex=`echo 'sys/types.h' \
 
49671
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49672
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49673
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49674
                   s|^/[^/]|//&|
 
49675
                   p
 
49676
                   q
 
49677
                 }'
 
49678
                                                            gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
 
49679
                      sed -n "$gl_absolute_header_sed"`'"'
 
49680
 
 
49681
 
 
49682
fi
 
49683
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
 
49684
$as_echo "$gl_cv_next_sys_types_h" >&6; }
 
49685
     fi
 
49686
     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
 
49687
 
 
49688
     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
 
49689
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
 
49690
       gl_next_as_first_directive='<'sys/types.h'>'
 
49691
     else
 
49692
       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
 
49693
       gl_next_as_first_directive=$gl_cv_next_sys_types_h
 
49694
     fi
 
49695
     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
 
49696
 
 
49697
 
 
49698
 
 
49699
 
 
49700
 
45177
49701
 
45178
49702
 
45179
49703
 
45213
49737
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45214
49738
                 *)    gl_absname_cpp="$ac_cpp" ;;
45215
49739
               esac
 
49740
 
 
49741
               case "$host_os" in
 
49742
                 mingw*)
 
49743
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49744
                   ;;
 
49745
                 *)
 
49746
                   gl_dirsep_regex='\/'
 
49747
                   ;;
 
49748
               esac
 
49749
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49750
 
 
49751
               gl_header_literal_regex=`echo 'sys/uio.h' \
 
49752
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49753
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49754
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49755
                   s|^/[^/]|//&|
 
49756
                   p
 
49757
                   q
 
49758
                 }'
45216
49759
                                                            gl_cv_next_sys_uio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45217
 
                  sed -n '\#/sys/uio.h#{
45218
 
                    s#.*"\(.*/sys/uio.h\)".*#\1#
45219
 
                    s#^/[^/]#//&#
45220
 
                    p
45221
 
                    q
45222
 
                  }'`'"'
 
49760
                      sed -n "$gl_absolute_header_sed"`'"'
45223
49761
          else
45224
49762
               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
45225
49763
             fi
45284
49822
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45285
49823
                 *)    gl_absname_cpp="$ac_cpp" ;;
45286
49824
               esac
 
49825
 
 
49826
               case "$host_os" in
 
49827
                 mingw*)
 
49828
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49829
                   ;;
 
49830
                 *)
 
49831
                   gl_dirsep_regex='\/'
 
49832
                   ;;
 
49833
               esac
 
49834
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49835
 
 
49836
               gl_header_literal_regex=`echo 'sys/utsname.h' \
 
49837
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49838
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49839
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49840
                   s|^/[^/]|//&|
 
49841
                   p
 
49842
                   q
 
49843
                 }'
45287
49844
                                                            gl_cv_next_sys_utsname_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45288
 
                  sed -n '\#/sys/utsname.h#{
45289
 
                    s#.*"\(.*/sys/utsname.h\)".*#\1#
45290
 
                    s#^/[^/]#//&#
45291
 
                    p
45292
 
                    q
45293
 
                  }'`'"'
 
49845
                      sed -n "$gl_absolute_header_sed"`'"'
45294
49846
          else
45295
49847
               gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
45296
49848
             fi
45341
49893
 
45342
49894
 
45343
49895
 
45344
 
    for gl_func in uname; do
45345
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
45346
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
45347
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
45348
 
if eval \${$as_gl_Symbol+:} false; then :
45349
 
  $as_echo_n "(cached) " >&6
45350
 
else
45351
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45352
 
/* end confdefs.h.  */
45353
 
 
45354
 
    /* Minix 3.1.8 has a bug: <stddef.h> must be included before
45355
 
       <sys/utsname.h>.  */
45356
 
    #include <stddef.h>
45357
 
    #include <sys/utsname.h>
45358
 
 
45359
 
int
45360
 
main ()
45361
 
{
45362
 
#undef $gl_func
45363
 
  (void) $gl_func;
45364
 
  ;
45365
 
  return 0;
45366
 
}
45367
 
_ACEOF
45368
 
if ac_fn_c_try_compile "$LINENO"; then :
45369
 
  eval "$as_gl_Symbol=yes"
45370
 
else
45371
 
  eval "$as_gl_Symbol=no"
45372
 
fi
45373
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45374
 
fi
45375
 
eval ac_res=\$$as_gl_Symbol
45376
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45377
 
$as_echo "$ac_res" >&6; }
45378
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
45379
 
  cat >>confdefs.h <<_ACEOF
45380
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
45381
 
_ACEOF
45382
 
 
45383
 
                     eval ac_cv_have_decl_$gl_func=yes
45384
 
fi
45385
 
      done
45386
 
 
45387
49896
 
45388
49897
 
45389
49898
 
45419
49928
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45420
49929
                 *)    gl_absname_cpp="$ac_cpp" ;;
45421
49930
               esac
 
49931
 
 
49932
               case "$host_os" in
 
49933
                 mingw*)
 
49934
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
49935
                   ;;
 
49936
                 *)
 
49937
                   gl_dirsep_regex='\/'
 
49938
                   ;;
 
49939
               esac
 
49940
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
49941
 
 
49942
               gl_header_literal_regex=`echo 'sys/wait.h' \
 
49943
                                        | sed -e "$gl_make_literal_regex_sed"`
 
49944
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
49945
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
49946
                   s|^/[^/]|//&|
 
49947
                   p
 
49948
                   q
 
49949
                 }'
45422
49950
                                                            gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45423
 
                  sed -n '\#/sys/wait.h#{
45424
 
                    s#.*"\(.*/sys/wait.h\)".*#\1#
45425
 
                    s#^/[^/]#//&#
45426
 
                    p
45427
 
                    q
45428
 
                  }'`'"'
 
49951
                      sed -n "$gl_absolute_header_sed"`'"'
45429
49952
          else
45430
49953
               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
45431
49954
             fi
45451
49974
 
45452
49975
 
45453
49976
 
45454
 
    for gl_func in waitpid; do
45455
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
45456
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
45457
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
45458
 
if eval \${$as_gl_Symbol+:} false; then :
45459
 
  $as_echo_n "(cached) " >&6
45460
 
else
45461
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45462
 
/* end confdefs.h.  */
45463
 
#include <sys/wait.h>
45464
 
int
45465
 
main ()
45466
 
{
45467
 
#undef $gl_func
45468
 
  (void) $gl_func;
45469
 
  ;
45470
 
  return 0;
45471
 
}
45472
 
_ACEOF
45473
 
if ac_fn_c_try_compile "$LINENO"; then :
45474
 
  eval "$as_gl_Symbol=yes"
45475
 
else
45476
 
  eval "$as_gl_Symbol=no"
45477
 
fi
45478
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45479
 
fi
45480
 
eval ac_res=\$$as_gl_Symbol
45481
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45482
 
$as_echo "$ac_res" >&6; }
45483
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
45484
 
  cat >>confdefs.h <<_ACEOF
45485
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
45486
 
_ACEOF
45487
49977
 
45488
 
                     eval ac_cv_have_decl_$gl_func=yes
45489
 
fi
45490
 
      done
45491
49978
 
45492
49979
 
45493
49980
 
45529
50016
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45530
50017
                 *)    gl_absname_cpp="$ac_cpp" ;;
45531
50018
               esac
 
50019
 
 
50020
               case "$host_os" in
 
50021
                 mingw*)
 
50022
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
50023
                   ;;
 
50024
                 *)
 
50025
                   gl_dirsep_regex='\/'
 
50026
                   ;;
 
50027
               esac
 
50028
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
50029
 
 
50030
               gl_header_literal_regex=`echo 'termios.h' \
 
50031
                                        | sed -e "$gl_make_literal_regex_sed"`
 
50032
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
50033
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
50034
                   s|^/[^/]|//&|
 
50035
                   p
 
50036
                   q
 
50037
                 }'
45532
50038
                                                            gl_cv_next_termios_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45533
 
                  sed -n '\#/termios.h#{
45534
 
                    s#.*"\(.*/termios.h\)".*#\1#
45535
 
                    s#^/[^/]#//&#
45536
 
                    p
45537
 
                    q
45538
 
                  }'`'"'
 
50039
                      sed -n "$gl_absolute_header_sed"`'"'
45539
50040
          else
45540
50041
               gl_cv_next_termios_h='<'termios.h'>'
45541
50042
             fi
45564
50065
  fi
45565
50066
 
45566
50067
 
45567
 
    for gl_func in tcgetsid; do
45568
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
45569
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
45570
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
45571
 
if eval \${$as_gl_Symbol+:} false; then :
45572
 
  $as_echo_n "(cached) " >&6
45573
 
else
45574
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45575
 
/* end confdefs.h.  */
45576
 
#include <termios.h>
45577
 
int
45578
 
main ()
45579
 
{
45580
 
#undef $gl_func
45581
 
  (void) $gl_func;
45582
 
  ;
45583
 
  return 0;
45584
 
}
45585
 
_ACEOF
45586
 
if ac_fn_c_try_compile "$LINENO"; then :
45587
 
  eval "$as_gl_Symbol=yes"
45588
 
else
45589
 
  eval "$as_gl_Symbol=no"
45590
 
fi
45591
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45592
 
fi
45593
 
eval ac_res=\$$as_gl_Symbol
45594
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45595
 
$as_echo "$ac_res" >&6; }
45596
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
45597
 
  cat >>confdefs.h <<_ACEOF
45598
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
45599
 
_ACEOF
45600
 
 
45601
 
                     eval ac_cv_have_decl_$gl_func=yes
45602
 
fi
45603
 
      done
45604
 
 
45605
 
 
45606
 
 
45607
 
 
45608
 
 
45609
 
 
45610
 
 
45611
 
 
45612
 
 
45613
 
 
45614
 
 
45615
 
 
45616
 
 
45617
 
 
45618
 
 
 
50068
 
 
50069
 
 
50070
 
 
50071
 
 
50072
 
 
50073
 
 
50074
 
 
50075
 
 
50076
 
 
50077
 
 
50078
 
 
50079
 
 
50080
 
 
50081
 
 
50082
 
 
50083
 
 
50084
      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
 
50085
"
 
50086
if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
 
50087
  ac_have_decl=1
 
50088
else
 
50089
  ac_have_decl=0
 
50090
fi
 
50091
 
 
50092
cat >>confdefs.h <<_ACEOF
 
50093
#define HAVE_DECL_LOCALTIME_R $ac_have_decl
 
50094
_ACEOF
45619
50095
 
45620
50096
  if test $ac_cv_have_decl_localtime_r = no; then
45621
50097
    HAVE_DECL_LOCALTIME_R=0
45667
50143
    HAVE_LOCALTIME_R=0
45668
50144
  fi
45669
50145
 
45670
 
if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
 
50146
  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
45671
50147
 
45672
50148
 
45673
50149
 
45681
50157
 
45682
50158
  :
45683
50159
 
45684
 
fi
 
50160
  fi
45685
50161
 
45686
50162
 
45687
50163
 
45701
50177
 
45702
50178
 
45703
50179
 
 
50180
 
45704
50181
  LIB_TIMER_TIME=
45705
50182
 
45706
50183
  gl_saved_libs=$LIBS
45761
50238
                    LIB_TIMER_TIME=$ac_cv_search_timer_settime
45762
50239
fi
45763
50240
 
 
50241
                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
50242
/* end confdefs.h.  */
 
50243
 
 
50244
#include <features.h>
 
50245
#ifdef __GNU_LIBRARY__
 
50246
 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
 
50247
     && !defined __UCLIBC__
 
50248
  Thread emulation available
 
50249
 #endif
 
50250
#endif
 
50251
 
 
50252
_ACEOF
 
50253
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
50254
  $EGREP "Thread" >/dev/null 2>&1; then :
 
50255
  LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
 
50256
fi
 
50257
rm -f conftest*
 
50258
 
45764
50259
    for ac_func in timer_settime
45765
50260
do :
45766
50261
  ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
45774
50269
 
45775
50270
  LIBS=$gl_saved_libs
45776
50271
 
45777
 
 
45778
 
 
45779
 
 
45780
 
 
 
50272
  :
45781
50273
 
45782
50274
 
45783
50275
 
45799
50291
    HAVE_UNAME=0
45800
50292
  fi
45801
50293
 
45802
 
if test $HAVE_UNAME = 0; then
 
50294
  if test $HAVE_UNAME = 0; then
45803
50295
 
45804
50296
 
45805
50297
 
45813
50305
 
45814
50306
  :
45815
50307
 
45816
 
fi
 
50308
  fi
45817
50309
 
45818
50310
 
45819
50311
 
45861
50353
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45862
50354
                 *)    gl_absname_cpp="$ac_cpp" ;;
45863
50355
               esac
 
50356
 
 
50357
               case "$host_os" in
 
50358
                 mingw*)
 
50359
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
50360
                   ;;
 
50361
                 *)
 
50362
                   gl_dirsep_regex='\/'
 
50363
                   ;;
 
50364
               esac
 
50365
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
50366
 
 
50367
               gl_header_literal_regex=`echo 'unistd.h' \
 
50368
                                        | sed -e "$gl_make_literal_regex_sed"`
 
50369
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
50370
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
50371
                   s|^/[^/]|//&|
 
50372
                   p
 
50373
                   q
 
50374
                 }'
45864
50375
                                                            gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45865
 
                  sed -n '\#/unistd.h#{
45866
 
                    s#.*"\(.*/unistd.h\)".*#\1#
45867
 
                    s#^/[^/]#//&#
45868
 
                    p
45869
 
                    q
45870
 
                  }'`'"'
 
50376
                      sed -n "$gl_absolute_header_sed"`'"'
45871
50377
          else
45872
50378
               gl_cv_next_unistd_h='<'unistd.h'>'
45873
50379
             fi
45899
50405
 
45900
50406
 
45901
50407
 
45902
 
    for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat     fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize getusershell setusershell     endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat     usleep; do
45903
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
45904
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
45905
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
45906
 
if eval \${$as_gl_Symbol+:} false; then :
45907
 
  $as_echo_n "(cached) " >&6
45908
 
else
45909
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45910
 
/* end confdefs.h.  */
45911
 
#include <unistd.h>
45912
 
/* Some systems declare various items in the wrong headers.  */
45913
 
#if !(defined __GLIBC__ && !defined __UCLIBC__)
45914
 
# include <fcntl.h>
45915
 
# include <stdio.h>
45916
 
# include <stdlib.h>
45917
 
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
45918
 
#  include <io.h>
45919
 
# endif
45920
 
#endif
45921
 
 
45922
 
int
45923
 
main ()
45924
 
{
45925
 
#undef $gl_func
45926
 
  (void) $gl_func;
45927
 
  ;
45928
 
  return 0;
45929
 
}
45930
 
_ACEOF
45931
 
if ac_fn_c_try_compile "$LINENO"; then :
45932
 
  eval "$as_gl_Symbol=yes"
45933
 
else
45934
 
  eval "$as_gl_Symbol=no"
45935
 
fi
45936
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45937
 
fi
45938
 
eval ac_res=\$$as_gl_Symbol
45939
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45940
 
$as_echo "$ac_res" >&6; }
45941
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
45942
 
  cat >>confdefs.h <<_ACEOF
45943
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
45944
 
_ACEOF
45945
 
 
45946
 
                     eval ac_cv_have_decl_$gl_func=yes
45947
 
fi
45948
 
      done
 
50408
 
 
50409
 
 
50410
 
45949
50411
 
45950
50412
 
45951
50413
 
46136
50598
 
46137
50599
 
46138
50600
 
 
50601
 
 
50602
 
46139
50603
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
46140
50604
$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
46141
50605
if ${gl_cv_func_unlink_honors_slashes+:} false; then :
46147
50611
       ln -s conftest.file conftest.lnk
46148
50612
     fi
46149
50613
     if test "$cross_compiling" = yes; then :
46150
 
  gl_cv_func_unlink_honors_slashes="guessing no"
 
50614
  case "$host_os" in
 
50615
                 # Guess yes on glibc systems.
 
50616
         *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
 
50617
                 # If we don't know, assume the worst.
 
50618
         *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
 
50619
       esac
 
50620
 
46151
50621
else
46152
50622
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46153
50623
/* end confdefs.h.  */
46154
 
#include <unistd.h>
 
50624
#if HAVE_UNISTD_H
 
50625
           # include <unistd.h>
 
50626
           #else /* on Windows with MSVC */
 
50627
           # include <io.h>
 
50628
           #endif
46155
50629
           #include <errno.h>
46156
50630
 
46157
50631
int
46187
50661
fi
46188
50662
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
46189
50663
$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
 
50664
  case "$gl_cv_func_unlink_honors_slashes" in
 
50665
    *no)
 
50666
      REPLACE_UNLINK=1
 
50667
      ;;
 
50668
  esac
 
50669
 
46190
50670
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
46191
50671
$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
46192
50672
if ${gl_cv_func_unlink_parent_fails+:} false; then :
46213
50693
           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
46214
50694
           export GL_SUBDIR_FOR_UNLINK
46215
50695
           if test "$cross_compiling" = yes; then :
46216
 
  gl_cv_func_unlink_parent_fails="guessing no"
 
50696
  # If we don't know, assume the worst.
 
50697
              gl_cv_func_unlink_parent_fails="guessing no"
 
50698
 
46217
50699
else
46218
50700
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46219
50701
/* end confdefs.h.  */
46220
50702
 
46221
50703
                #include <stdlib.h>
46222
 
                #include <unistd.h>
 
50704
                #if HAVE_UNISTD_H
 
50705
                # include <unistd.h>
 
50706
                #else /* on Windows with MSVC */
 
50707
                # include <direct.h>
 
50708
                # include <io.h>
 
50709
                #endif
46223
50710
                int main ()
46224
50711
                {
46225
50712
                  int result = 0;
46256
50743
$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
46257
50744
  case "$gl_cv_func_unlink_parent_fails" in
46258
50745
    *no)
 
50746
      REPLACE_UNLINK=1
46259
50747
 
46260
50748
$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
46261
50749
 
46262
50750
      ;;
46263
50751
  esac
46264
 
  if test "$gl_cv_func_unlink_honors_slashes" != yes \
46265
 
     || { case "$gl_cv_func_unlink_parent_fails" in
46266
 
            *yes) false;;
46267
 
            *no) true;;
46268
 
          esac
46269
 
        }; then
46270
 
    REPLACE_UNLINK=1
46271
 
  fi
46272
50752
 
46273
 
if test $REPLACE_UNLINK = 1; then
 
50753
  if test $REPLACE_UNLINK = 1; then
46274
50754
 
46275
50755
 
46276
50756
 
46281
50761
 
46282
50762
  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
46283
50763
 
46284
 
fi
 
50764
  fi
46285
50765
 
46286
50766
 
46287
50767
 
46297
50777
 
46298
50778
 
46299
50779
 
46300
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a running program can be unlinked" >&5
 
50780
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a running program can be unlinked" >&5
46301
50781
$as_echo_n "checking whether a running program can be unlinked... " >&6; }
46302
50782
if ${gl_cv_func_unlink_busy_text+:} false; then :
46303
50783
  $as_echo_n "(cached) " >&6
46342
50822
 
46343
50823
 
46344
50824
 
 
50825
 
 
50826
 
 
50827
 
 
50828
 
 
50829
  if test $ac_cv_func_unlinkat = no; then
 
50830
    HAVE_UNLINKAT=0
 
50831
  else
 
50832
    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
 
50833
      *no)
 
50834
        # Solaris 9 has *at functions, but uniformly mishandles trailing
 
50835
        # slash in all of them.
 
50836
        REPLACE_UNLINKAT=1
 
50837
        ;;
 
50838
      *)
 
50839
        # GNU/Hurd has unlinkat, but it has the same bug as unlink.
 
50840
        if test $REPLACE_UNLINK = 1; then
 
50841
          REPLACE_UNLINKAT=1
 
50842
        fi
 
50843
        ;;
 
50844
    esac
 
50845
  fi
 
50846
 
 
50847
  if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
 
50848
 
 
50849
 
 
50850
 
 
50851
 
 
50852
 
 
50853
 
 
50854
 
 
50855
 
 
50856
  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
 
50857
 
 
50858
  fi
 
50859
 
 
50860
 
 
50861
 
 
50862
 
 
50863
 
 
50864
          GNULIB_UNLINKAT=1
 
50865
 
 
50866
 
 
50867
 
 
50868
 
 
50869
 
 
50870
$as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
 
50871
 
 
50872
 
 
50873
 
 
50874
 
 
50875
 
46345
50876
$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
46346
50877
 
46347
50878
 
46397
50928
#ifdef __cplusplus
46398
50929
"C"
46399
50930
#endif
46400
 
#if defined(__STDC__) || defined(__cplusplus)
46401
50931
int unsetenv (const char *name);
46402
 
#else
46403
 
int unsetenv();
46404
 
#endif
46405
50932
 
46406
50933
int
46407
50934
main ()
46433
50960
  $as_echo_n "(cached) " >&6
46434
50961
else
46435
50962
  if test "$cross_compiling" = yes; then :
46436
 
  gl_cv_func_unsetenv_works="guessing no"
 
50963
  case "$host_os" in
 
50964
                 # Guess yes on glibc systems.
 
50965
         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
 
50966
                 # If we don't know, assume the worst.
 
50967
         *)      gl_cv_func_unsetenv_works="guessing no" ;;
 
50968
       esac
 
50969
 
46437
50970
else
46438
50971
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46439
50972
/* end confdefs.h.  */
46478
51011
fi
46479
51012
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
46480
51013
$as_echo "$gl_cv_func_unsetenv_works" >&6; }
46481
 
    if test "$gl_cv_func_unsetenv_works" != yes; then
46482
 
      REPLACE_UNSETENV=1
46483
 
    fi
 
51014
    case "$gl_cv_func_unsetenv_works" in
 
51015
      *yes) ;;
 
51016
      *)
 
51017
        REPLACE_UNSETENV=1
 
51018
        ;;
 
51019
    esac
46484
51020
  fi
46485
51021
 
46486
 
if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
 
51022
  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
46487
51023
 
46488
51024
 
46489
51025
 
46498
51034
 
46499
51035
 
46500
51036
 
46501
 
fi
 
51037
  fi
46502
51038
 
46503
51039
 
46504
51040
 
46555
51091
else
46556
51092
  touch conftest.file
46557
51093
       if test "$cross_compiling" = yes; then :
46558
 
  gl_cv_func_futimesat_works="guessing no"
 
51094
  case "$host_os" in
 
51095
                   # Guess yes on glibc systems.
 
51096
           *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
 
51097
                   # If we don't know, assume the worst.
 
51098
           *)      gl_cv_func_futimesat_works="guessing no" ;;
 
51099
         esac
 
51100
 
46559
51101
else
46560
51102
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46561
51103
/* end confdefs.h.  */
46588
51130
fi
46589
51131
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
46590
51132
$as_echo "$gl_cv_func_futimesat_works" >&6; }
46591
 
    if test "$gl_cv_func_futimesat_works" != yes; then
 
51133
    case "$gl_cv_func_futimesat_works" in
 
51134
      *yes) ;;
 
51135
      *)
46592
51136
 
46593
51137
$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
46594
51138
 
46595
 
    fi
 
51139
        ;;
 
51140
    esac
46596
51141
  fi
46597
51142
 
46598
51143
 
46692
51237
    fi
46693
51238
  fi
46694
51239
 
46695
 
if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
 
51240
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
46696
51241
 
46697
51242
 
46698
51243
 
46703
51248
 
46704
51249
  gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
46705
51250
 
46706
 
fi
 
51251
  fi
46707
51252
 
46708
51253
 
46709
51254
 
47654
52199
 
47655
52200
 
47656
52201
 
 
52202
  for ac_func in waitid
 
52203
do :
 
52204
  ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
 
52205
if test "x$ac_cv_func_waitid" = xyes; then :
 
52206
  cat >>confdefs.h <<_ACEOF
 
52207
#define HAVE_WAITID 1
 
52208
_ACEOF
 
52209
 
 
52210
fi
 
52211
done
 
52212
 
 
52213
 
 
52214
 
 
52215
 
 
52216
  HAVE_WAITPID=1
 
52217
  case $host_os in
 
52218
    mingw*) HAVE_WAITPID=0 ;;
 
52219
  esac
 
52220
 
 
52221
  if test $HAVE_WAITPID = 0; then
 
52222
 
 
52223
 
 
52224
 
 
52225
 
 
52226
 
 
52227
 
 
52228
 
 
52229
 
 
52230
  gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
 
52231
 
 
52232
  fi
 
52233
 
 
52234
 
 
52235
 
 
52236
 
 
52237
 
 
52238
          GNULIB_WAITPID=1
 
52239
 
 
52240
 
 
52241
 
 
52242
 
 
52243
 
 
52244
$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
 
52245
 
 
52246
 
 
52247
 
 
52248
 
 
52249
 
47657
52250
 
47658
52251
 
47659
52252
 
47685
52278
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
47686
52279
                 *)    gl_absname_cpp="$ac_cpp" ;;
47687
52280
               esac
 
52281
 
 
52282
               case "$host_os" in
 
52283
                 mingw*)
 
52284
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
52285
                   ;;
 
52286
                 *)
 
52287
                   gl_dirsep_regex='\/'
 
52288
                   ;;
 
52289
               esac
 
52290
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
52291
 
 
52292
               gl_header_literal_regex=`echo 'wchar.h' \
 
52293
                                        | sed -e "$gl_make_literal_regex_sed"`
 
52294
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
52295
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
52296
                   s|^/[^/]|//&|
 
52297
                   p
 
52298
                   q
 
52299
                 }'
47688
52300
                                                            gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47689
 
                  sed -n '\#/wchar.h#{
47690
 
                    s#.*"\(.*/wchar.h\)".*#\1#
47691
 
                    s#^/[^/]#//&#
47692
 
                    p
47693
 
                    q
47694
 
                  }'`'"'
 
52301
                      sed -n "$gl_absolute_header_sed"`'"'
47695
52302
          else
47696
52303
               gl_cv_next_wchar_h='<'wchar.h'>'
47697
52304
             fi
47733
52340
 
47734
52341
 
47735
52342
 
47736
 
    for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
47737
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
47738
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
47739
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
47740
 
if eval \${$as_gl_Symbol+:} false; then :
47741
 
  $as_echo_n "(cached) " >&6
47742
 
else
47743
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47744
 
/* end confdefs.h.  */
47745
 
 
47746
 
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
47747
 
   <wchar.h>.
47748
 
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
47749
 
   included before <wchar.h>.  */
47750
 
#if !(defined __GLIBC__ && !defined __UCLIBC__)
47751
 
# include <stddef.h>
47752
 
# include <stdio.h>
47753
 
# include <time.h>
47754
 
#endif
47755
 
#include <wchar.h>
47756
 
 
47757
 
int
47758
 
main ()
47759
 
{
47760
 
#undef $gl_func
47761
 
  (void) $gl_func;
47762
 
  ;
47763
 
  return 0;
47764
 
}
47765
 
_ACEOF
47766
 
if ac_fn_c_try_compile "$LINENO"; then :
47767
 
  eval "$as_gl_Symbol=yes"
47768
 
else
47769
 
  eval "$as_gl_Symbol=no"
47770
 
fi
47771
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47772
 
fi
47773
 
eval ac_res=\$$as_gl_Symbol
47774
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47775
 
$as_echo "$ac_res" >&6; }
47776
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
47777
 
  cat >>confdefs.h <<_ACEOF
47778
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
47779
 
_ACEOF
47780
 
 
47781
 
                     eval ac_cv_have_decl_$gl_func=yes
47782
 
fi
47783
 
      done
47784
 
 
47785
52343
 
47786
52344
 
47787
52345
 
48050
52608
    fi
48051
52609
  fi
48052
52610
 
48053
 
if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
 
52611
  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
48054
52612
 
48055
52613
 
48056
52614
 
48064
52622
 
48065
52623
  :
48066
52624
 
48067
 
fi
 
52625
  fi
48068
52626
 
48069
52627
 
48070
52628
 
48092
52650
    fi
48093
52651
  fi
48094
52652
 
48095
 
if test $HAVE_WCSWIDTH = 0 || test $REPLACE_WCSWIDTH = 1; then
 
52653
  if test $HAVE_WCSWIDTH = 0 || test $REPLACE_WCSWIDTH = 1; then
48096
52654
 
48097
52655
 
48098
52656
 
48103
52661
 
48104
52662
  gl_LIBOBJS="$gl_LIBOBJS wcswidth.$ac_objext"
48105
52663
 
48106
 
fi
 
52664
  fi
48107
52665
 
48108
52666
 
48109
52667
 
48171
52729
                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
48172
52730
                 *)    gl_absname_cpp="$ac_cpp" ;;
48173
52731
               esac
 
52732
 
 
52733
               case "$host_os" in
 
52734
                 mingw*)
 
52735
                                                                                                                                     gl_dirsep_regex='[/\\]'
 
52736
                   ;;
 
52737
                 *)
 
52738
                   gl_dirsep_regex='\/'
 
52739
                   ;;
 
52740
               esac
 
52741
                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
52742
 
 
52743
               gl_header_literal_regex=`echo 'wctype.h' \
 
52744
                                        | sed -e "$gl_make_literal_regex_sed"`
 
52745
               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
 
52746
                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
 
52747
                   s|^/[^/]|//&|
 
52748
                   p
 
52749
                   q
 
52750
                 }'
48174
52751
                                                            gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
48175
 
                  sed -n '\#/wctype.h#{
48176
 
                    s#.*"\(.*/wctype.h\)".*#\1#
48177
 
                    s#^/[^/]#//&#
48178
 
                    p
48179
 
                    q
48180
 
                  }'`'"'
 
52752
                      sed -n "$gl_absolute_header_sed"`'"'
48181
52753
          else
48182
52754
               gl_cv_next_wctype_h='<'wctype.h'>'
48183
52755
             fi
48225
52797
}
48226
52798
_ACEOF
48227
52799
if ac_fn_c_try_compile "$LINENO"; then :
48228
 
  gl_cv_func_iswcntrl_works=yes
 
52800
  gl_cv_func_iswcntrl_works="guessing yes"
48229
52801
else
48230
 
  gl_cv_func_iswcntrl_works=no
 
52802
  gl_cv_func_iswcntrl_works="guessing no"
48231
52803
fi
48232
52804
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48233
52805
 
48267
52839
  fi
48268
52840
 
48269
52841
 
48270
 
  if test "$gl_cv_func_iswcntrl_works" = no; then
48271
 
    REPLACE_ISWCNTRL=1
48272
 
  else
48273
 
    REPLACE_ISWCNTRL=0
48274
 
  fi
 
52842
  case "$gl_cv_func_iswcntrl_works" in
 
52843
    *yes) REPLACE_ISWCNTRL=0 ;;
 
52844
    *)    REPLACE_ISWCNTRL=1 ;;
 
52845
  esac
48275
52846
 
48276
52847
 
48277
52848
  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
48414
52985
  fi
48415
52986
 
48416
52987
 
48417
 
    for gl_func in wctype iswctype wctrans towctrans     ; do
48418
 
    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
48419
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
48420
 
$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
48421
 
if eval \${$as_gl_Symbol+:} false; then :
48422
 
  $as_echo_n "(cached) " >&6
48423
 
else
48424
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48425
 
/* end confdefs.h.  */
48426
 
 
48427
 
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48428
 
   <wchar.h>.
48429
 
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48430
 
   included before <wchar.h>.  */
48431
 
#if !(defined __GLIBC__ && !defined __UCLIBC__)
48432
 
# include <stddef.h>
48433
 
# include <stdio.h>
48434
 
# include <time.h>
48435
 
# include <wchar.h>
48436
 
#endif
48437
 
#include <wctype.h>
48438
 
 
48439
 
int
48440
 
main ()
48441
 
{
48442
 
#undef $gl_func
48443
 
  (void) $gl_func;
48444
 
  ;
48445
 
  return 0;
48446
 
}
48447
 
_ACEOF
48448
 
if ac_fn_c_try_compile "$LINENO"; then :
48449
 
  eval "$as_gl_Symbol=yes"
48450
 
else
48451
 
  eval "$as_gl_Symbol=no"
48452
 
fi
48453
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48454
 
fi
48455
 
eval ac_res=\$$as_gl_Symbol
48456
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48457
 
$as_echo "$ac_res" >&6; }
48458
 
    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
48459
 
  cat >>confdefs.h <<_ACEOF
48460
 
#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
48461
 
_ACEOF
48462
 
 
48463
 
                     eval ac_cv_have_decl_$gl_func=yes
48464
 
fi
48465
 
      done
48466
 
 
48467
52988
 
48468
52989
 
48469
52990
 
48505
53026
 
48506
53027
  if test $ac_cv_func_wcwidth = yes; then
48507
53028
    HAVE_WCWIDTH=1
48508
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
 
53029
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
48509
53030
$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
48510
53031
if ${gl_cv_func_wcwidth_works+:} false; then :
48511
53032
  $as_echo_n "(cached) " >&6
48548
53069
    {
48549
53070
      if (wcwidth (0x0301) > 0)
48550
53071
        result |= 1;
 
53072
      if (wcwidth (0x05B0) > 0)
 
53073
        result |= 2;
48551
53074
      if (wcwidth (0x200B) > 0)
48552
 
        result |= 2;
 
53075
        result |= 4;
48553
53076
    }
48554
53077
  return result;
48555
53078
}
48575
53098
    HAVE_WCWIDTH=0
48576
53099
  fi
48577
53100
 
48578
 
if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
 
53101
  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
48579
53102
 
48580
53103
 
48581
53104
 
48586
53109
 
48587
53110
  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
48588
53111
 
48589
 
fi
 
53112
  fi
48590
53113
 
48591
53114
 
48592
53115
 
48723
53246
 
48724
53247
 
48725
53248
 
48726
 
 
48727
 
 
48728
 
if test $REPLACE_WRITE = 1; then
 
53249
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
53250
    REPLACE_WRITE=1
 
53251
  fi
 
53252
 
 
53253
 
 
53254
 
 
53255
  if test $REPLACE_WRITE = 1; then
48729
53256
 
48730
53257
 
48731
53258
 
48736
53263
 
48737
53264
  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
48738
53265
 
48739
 
fi
 
53266
 
 
53267
 
 
53268
 
 
53269
  fi
48740
53270
 
48741
53271
 
48742
53272
 
48795
53325
 
48796
53326
 
48797
53327
 
48798
 
 
48799
53328
  for ac_header in stdint.h
48800
53329
do :
48801
53330
  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
48860
53389
  gl_module_indicator_condition=$gltests_WITNESS
48861
53390
 
48862
53391
 
48863
 
if test "$ac_cv_header_winsock2_h" = yes; then
 
53392
  if test "$ac_cv_header_winsock2_h" = yes; then
48864
53393
 
48865
53394
 
48866
53395
 
48871
53400
 
48872
53401
  gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
48873
53402
 
48874
 
fi
 
53403
  fi
48875
53404
 
48876
53405
 
48877
53406
 
48895
53424
 
48896
53425
 
48897
53426
 
48898
 
if test "$ac_cv_header_winsock2_h" = yes; then
 
53427
  if test "$ac_cv_header_winsock2_h" = yes; then
48899
53428
 
48900
53429
 
48901
53430
 
48906
53435
 
48907
53436
  gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
48908
53437
 
48909
 
fi
 
53438
  fi
48910
53439
 
48911
53440
 
48912
53441
 
48952
53481
int main () {
48953
53482
  /* Check whether the given locale name is recognized by the system.  */
48954
53483
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48955
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
53484
  /* On native Windows, setlocale(category, "") looks at the system settings,
48956
53485
     not at the environment variables.  Also, when an encoding suffix such
48957
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
53486
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48958
53487
     category of the locale to "C".  */
48959
53488
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48960
53489
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48963
53492
  if (setlocale (LC_ALL, "") == NULL) return 1;
48964
53493
#endif
48965
53494
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48966
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
53495
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48967
53496
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48968
53497
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48969
53498
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48989
53518
     one byte long. This excludes the UTF-8 encoding.  */
48990
53519
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48991
53520
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
53521
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
48992
53522
  /* Check whether the decimal separator is a comma.
48993
53523
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
48994
53524
     are nl_langinfo(RADIXCHAR) are both ".".  */
48995
53525
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
53526
#endif
48996
53527
  return 0;
48997
53528
}
48998
53529
 
49010
53541
        # "ja" as "Japanese" or "Japanese_Japan.932",
49011
53542
        # and similar.
49012
53543
        mingw*)
49013
 
          # Test for the native Win32 locale name.
 
53544
          # Test for the native Windows locale name.
49014
53545
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
49015
53546
            gt_cv_locale_fr=French_France.1252
49016
53547
          else
49020
53551
          ;;
49021
53552
        *)
49022
53553
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
49023
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
53554
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
49024
53555
          # configure script would override the LC_ALL setting. Likewise for
49025
53556
          # LC_CTYPE, which is also set at the beginning of the configure script.
49026
53557
          # Test for the usual locale name.
49088
53619
#if !(defined __BEOS__ || defined __HAIKU__)
49089
53620
  /* Check whether the given locale name is recognized by the system.  */
49090
53621
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
49091
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
53622
  /* On native Windows, setlocale(category, "") looks at the system settings,
49092
53623
     not at the environment variables.  Also, when an encoding suffix such
49093
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
53624
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
49094
53625
     category of the locale to "C".  */
49095
53626
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
49096
53627
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
49099
53630
  if (setlocale (LC_ALL, "") == NULL) return 1;
49100
53631
# endif
49101
53632
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
49102
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
53633
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
49103
53634
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
49104
53635
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
49105
53636
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
49125
53656
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
49126
53657
    return 1;
49127
53658
#endif
 
53659
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
49128
53660
  /* Check whether the decimal separator is a comma.
49129
53661
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
49130
53662
     are nl_langinfo(RADIXCHAR) are both ".".  */
49131
53663
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
53664
#endif
49132
53665
  return 0;
49133
53666
}
49134
53667
 
49146
53679
        # "ja" as "Japanese" or "Japanese_Japan.932",
49147
53680
        # and similar.
49148
53681
        mingw*)
49149
 
          # Test for the hypothetical native Win32 locale name.
 
53682
          # Test for the hypothetical native Windows locale name.
49150
53683
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
49151
53684
            gt_cv_locale_fr_utf8=French_France.65001
49152
53685
          else
49156
53689
          ;;
49157
53690
        *)
49158
53691
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
49159
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
53692
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
49160
53693
          # configure script would override the LC_ALL setting. Likewise for
49161
53694
          # LC_CTYPE, which is also set at the beginning of the configure script.
49162
53695
          # Test for the usual locale name.
49211
53744
int main () {
49212
53745
  /* Check whether the given locale name is recognized by the system.  */
49213
53746
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
49214
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
53747
  /* On native Windows, setlocale(category, "") looks at the system settings,
49215
53748
     not at the environment variables.  Also, when an encoding suffix such
49216
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
53749
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
49217
53750
     category of the locale to "C".  */
49218
53751
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
49219
53752
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
49222
53755
  if (setlocale (LC_ALL, "") == NULL) return 1;
49223
53756
#endif
49224
53757
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
49225
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
53758
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
49226
53759
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
49227
53760
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
49228
53761
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
49248
53781
     one byte long. This excludes the UTF-8 encoding.  */
49249
53782
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
49250
53783
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
53784
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
49251
53785
  /* Check whether the decimal separator is a comma.
49252
53786
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
49253
53787
     are nl_langinfo(RADIXCHAR) are both ".".  */
49254
53788
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
53789
#endif
49255
53790
  return 0;
49256
53791
}
49257
53792
 
49269
53804
        # "ja" as "Japanese" or "Japanese_Japan.932",
49270
53805
        # and similar.
49271
53806
        mingw*)
49272
 
          # Test for the native Win32 locale name.
 
53807
          # Test for the native Windows locale name.
49273
53808
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
49274
53809
            gt_cv_locale_fr=French_France.1252
49275
53810
          else
49279
53814
          ;;
49280
53815
        *)
49281
53816
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
49282
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
53817
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
49283
53818
          # configure script would override the LC_ALL setting. Likewise for
49284
53819
          # LC_CTYPE, which is also set at the beginning of the configure script.
49285
53820
          # Test for the usual locale name.
49349
53884
     program return 1 on BeOS.  */
49350
53885
  /* Check whether the given locale name is recognized by the system.  */
49351
53886
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
49352
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
53887
  /* On native Windows, setlocale(category, "") looks at the system settings,
49353
53888
     not at the environment variables.  Also, when an encoding suffix such
49354
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
53889
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
49355
53890
     category of the locale to "C".  */
49356
53891
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
49357
53892
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
49360
53895
  if (setlocale (LC_ALL, "") == NULL) return 1;
49361
53896
#endif
49362
53897
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
49363
 
     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
 
53898
     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
49364
53899
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
49365
53900
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
49366
53901
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
49407
53942
        # "ja" as "Japanese" or "Japanese_Japan.932",
49408
53943
        # and similar.
49409
53944
        mingw*)
49410
 
          # Test for the hypothetical native Win32 locale name.
 
53945
          # Test for the hypothetical native Windows locale name.
49411
53946
          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
49412
53947
            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
49413
53948
          else
49417
53952
          ;;
49418
53953
        *)
49419
53954
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
49420
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
53955
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
49421
53956
          # configure script would override the LC_ALL setting. Likewise for
49422
53957
          # LC_CTYPE, which is also set at the beginning of the configure script.
49423
53958
          # Test for the usual locale name.
49452
53987
 
49453
53988
 
49454
53989
 
49455
 
if test "$ac_cv_header_winsock2_h" = yes; then
 
53990
  if test "$ac_cv_header_winsock2_h" = yes; then
49456
53991
 
49457
53992
 
49458
53993
 
49463
53998
 
49464
53999
  gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
49465
54000
 
49466
 
fi
 
54001
  fi
49467
54002
 
49468
54003
 
49469
54004
 
49489
54024
 
49490
54025
 
49491
54026
 
49492
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 
54027
 
 
54028
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49493
54029
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49494
54030
if ${ac_cv_c_bigendian+:} false; then :
49495
54031
  $as_echo_n "(cached) " >&6
49716
54252
 
49717
54253
 
49718
54254
 
49719
 
      HAVE_INET_PTON=1
49720
 
  gl_save_LIBS=$LIBS
49721
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
 
54255
 
 
54256
 
 
54257
 
 
54258
 
 
54259
              HAVE_INET_PTON=1
 
54260
  INET_PTON_LIB=
 
54261
 
 
54262
 
 
54263
 
 
54264
 
 
54265
  if test $ac_cv_header_sys_socket_h != yes; then
 
54266
                    for ac_header in winsock2.h
 
54267
do :
 
54268
  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
 
54269
if test "x$ac_cv_header_winsock2_h" = xyes; then :
 
54270
  cat >>confdefs.h <<_ACEOF
 
54271
#define HAVE_WINSOCK2_H 1
 
54272
_ACEOF
 
54273
 
 
54274
fi
 
54275
 
 
54276
done
 
54277
 
 
54278
  fi
 
54279
  if test "$ac_cv_header_winsock2_h" = yes; then
 
54280
    HAVE_WINSOCK2_H=1
 
54281
    UNISTD_H_HAVE_WINSOCK2_H=1
 
54282
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 
54283
  else
 
54284
    HAVE_WINSOCK2_H=0
 
54285
  fi
 
54286
 
 
54287
 
 
54288
  if test $HAVE_WINSOCK2_H = 1; then
 
54289
    ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
 
54290
"
 
54291
if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
 
54292
  ac_have_decl=1
 
54293
else
 
54294
  ac_have_decl=0
 
54295
fi
 
54296
 
 
54297
cat >>confdefs.h <<_ACEOF
 
54298
#define HAVE_DECL_INET_PTON $ac_have_decl
 
54299
_ACEOF
 
54300
 
 
54301
    if test $ac_cv_have_decl_inet_pton = yes; then
 
54302
                  REPLACE_INET_PTON=1
 
54303
      INET_PTON_LIB="-lws2_32"
 
54304
    else
 
54305
      HAVE_DECL_INET_PTON=0
 
54306
      HAVE_INET_PTON=0
 
54307
    fi
 
54308
  else
 
54309
    gl_save_LIBS=$LIBS
 
54310
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
49722
54311
$as_echo_n "checking for library containing inet_pton... " >&6; }
49723
54312
if ${ac_cv_search_inet_pton+:} false; then :
49724
54313
  $as_echo_n "(cached) " >&6
49742
54331
  return 0;
49743
54332
}
49744
54333
_ACEOF
49745
 
for ac_lib in '' nsl; do
 
54334
for ac_lib in '' nsl resolv; do
49746
54335
  if test -z "$ac_lib"; then
49747
54336
    ac_res="none required"
49748
54337
  else
49784
54373
fi
49785
54374
done
49786
54375
 
49787
 
     if test $ac_cv_func_inet_pton = no; then
49788
 
       HAVE_INET_PTON=0
49789
 
     fi
 
54376
       if test $ac_cv_func_inet_pton = no; then
 
54377
         HAVE_INET_PTON=0
 
54378
       fi
49790
54379
 
49791
54380
fi
49792
54381
 
49793
 
  LIBS=$gl_save_LIBS
49794
 
 
49795
 
  INET_PTON_LIB=
49796
 
  if test "$ac_cv_search_inet_pton" != "no" &&
49797
 
     test "$ac_cv_search_inet_pton" != "none required"; then
49798
 
    INET_PTON_LIB="$ac_cv_search_inet_pton"
49799
 
  fi
49800
 
 
49801
 
 
49802
 
 
49803
 
  ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
49804
 
     #if HAVE_NETDB_H
49805
 
     # include <netdb.h>
49806
 
     #endif
 
54382
    LIBS=$gl_save_LIBS
 
54383
 
 
54384
    if test "$ac_cv_search_inet_pton" != "no" \
 
54385
       && test "$ac_cv_search_inet_pton" != "none required"; then
 
54386
      INET_PTON_LIB="$ac_cv_search_inet_pton"
 
54387
    fi
 
54388
 
 
54389
 
 
54390
    ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
 
54391
        #if HAVE_NETDB_H
 
54392
        # include <netdb.h>
 
54393
        #endif
49807
54394
 
49808
54395
"
49809
54396
if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
49816
54403
#define HAVE_DECL_INET_PTON $ac_have_decl
49817
54404
_ACEOF
49818
54405
 
49819
 
  if test $ac_cv_have_decl_inet_pton = no; then
49820
 
    HAVE_DECL_INET_PTON=0
49821
 
 
 
54406
    if test $ac_cv_have_decl_inet_pton = no; then
 
54407
      HAVE_DECL_INET_PTON=0
 
54408
    fi
49822
54409
  fi
49823
54410
 
49824
 
if test $HAVE_INET_PTON = 0; then
 
54411
 
 
54412
  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
49825
54413
 
49826
54414
 
49827
54415
 
49835
54423
 
49836
54424
 
49837
54425
 
49838
 
fi
 
54426
  fi
49839
54427
 
49840
54428
 
49841
54429
 
49852
54440
 
49853
54441
 
49854
54442
 
49855
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 
54443
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49856
54444
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49857
54445
if ${ac_cv_c_bigendian+:} false; then :
49858
54446
  $as_echo_n "(cached) " >&6
50131
54719
    fi
50132
54720
  fi
50133
54721
 
50134
 
if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
 
54722
  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
50135
54723
 
50136
54724
 
50137
54725
 
50142
54730
 
50143
54731
  gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
50144
54732
 
50145
 
fi
 
54733
  fi
50146
54734
 
50147
54735
 
50148
54736
 
50173
54761
 
50174
54762
      if test "$cross_compiling" = yes; then :
50175
54763
 
50176
 
                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
54764
                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50177
54765
/* end confdefs.h.  */
50178
54766
 
50179
54767
#if defined arm || defined __arm || defined __arm__
50734
55322
 
50735
55323
 
50736
55324
 
50737
 
if test "$ac_cv_header_winsock2_h" = yes; then
 
55325
 
 
55326
  if test "$ac_cv_header_winsock2_h" = yes; then
50738
55327
 
50739
55328
 
50740
55329
 
50745
55334
 
50746
55335
  gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
50747
55336
 
50748
 
fi
 
55337
  fi
50749
55338
 
50750
55339
 
50751
55340
 
50809
55398
int main () {
50810
55399
  /* Check whether the given locale name is recognized by the system.  */
50811
55400
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
50812
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
55401
  /* On native Windows, setlocale(category, "") looks at the system settings,
50813
55402
     not at the environment variables.  Also, when an encoding suffix such
50814
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
55403
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
50815
55404
     category of the locale to "C".  */
50816
55405
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
50817
55406
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
50820
55409
  if (setlocale (LC_ALL, "") == NULL) return 1;
50821
55410
#endif
50822
55411
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
50823
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
55412
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
50824
55413
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
50825
55414
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
50826
55415
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
50846
55435
     one byte long. This excludes the UTF-8 encoding.  */
50847
55436
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
50848
55437
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
55438
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
50849
55439
  /* Check whether the decimal separator is a comma.
50850
55440
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
50851
55441
     are nl_langinfo(RADIXCHAR) are both ".".  */
50852
55442
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
55443
#endif
50853
55444
  return 0;
50854
55445
}
50855
55446
 
50867
55458
        # "ja" as "Japanese" or "Japanese_Japan.932",
50868
55459
        # and similar.
50869
55460
        mingw*)
50870
 
          # Test for the native Win32 locale name.
 
55461
          # Test for the native Windows locale name.
50871
55462
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50872
55463
            gt_cv_locale_fr=French_France.1252
50873
55464
          else
50877
55468
          ;;
50878
55469
        *)
50879
55470
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
50880
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
55471
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
50881
55472
          # configure script would override the LC_ALL setting. Likewise for
50882
55473
          # LC_CTYPE, which is also set at the beginning of the configure script.
50883
55474
          # Test for the usual locale name.
50945
55536
#if !(defined __BEOS__ || defined __HAIKU__)
50946
55537
  /* Check whether the given locale name is recognized by the system.  */
50947
55538
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
50948
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
55539
  /* On native Windows, setlocale(category, "") looks at the system settings,
50949
55540
     not at the environment variables.  Also, when an encoding suffix such
50950
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
55541
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
50951
55542
     category of the locale to "C".  */
50952
55543
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
50953
55544
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
50956
55547
  if (setlocale (LC_ALL, "") == NULL) return 1;
50957
55548
# endif
50958
55549
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
50959
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
55550
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
50960
55551
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
50961
55552
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
50962
55553
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
50982
55573
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
50983
55574
    return 1;
50984
55575
#endif
 
55576
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
50985
55577
  /* Check whether the decimal separator is a comma.
50986
55578
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
50987
55579
     are nl_langinfo(RADIXCHAR) are both ".".  */
50988
55580
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
55581
#endif
50989
55582
  return 0;
50990
55583
}
50991
55584
 
51003
55596
        # "ja" as "Japanese" or "Japanese_Japan.932",
51004
55597
        # and similar.
51005
55598
        mingw*)
51006
 
          # Test for the hypothetical native Win32 locale name.
 
55599
          # Test for the hypothetical native Windows locale name.
51007
55600
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51008
55601
            gt_cv_locale_fr_utf8=French_France.65001
51009
55602
          else
51013
55606
          ;;
51014
55607
        *)
51015
55608
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51016
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
55609
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51017
55610
          # configure script would override the LC_ALL setting. Likewise for
51018
55611
          # LC_CTYPE, which is also set at the beginning of the configure script.
51019
55612
          # Test for the usual locale name.
51070
55663
  const char *p;
51071
55664
  /* Check whether the given locale name is recognized by the system.  */
51072
55665
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51073
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
55666
  /* On native Windows, setlocale(category, "") looks at the system settings,
51074
55667
     not at the environment variables.  Also, when an encoding suffix such
51075
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
55668
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51076
55669
     category of the locale to "C".  */
51077
55670
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51078
55671
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51081
55674
  if (setlocale (LC_ALL, "") == NULL) return 1;
51082
55675
#endif
51083
55676
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51084
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
55677
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51085
55678
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51086
55679
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51087
55680
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51130
55723
        # "ja" as "Japanese" or "Japanese_Japan.932",
51131
55724
        # and similar.
51132
55725
        mingw*)
51133
 
          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
51134
 
          # and CP932 is very different from EUC-JP, so we cannot use it here.
 
55726
          # Note that on native Windows, the Japanese locale is
 
55727
          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
 
55728
          # cannot use it here.
51135
55729
          gt_cv_locale_ja=none
51136
55730
          ;;
51137
55731
        *)
51138
55732
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51139
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
55733
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51140
55734
          # configure script would override the LC_ALL setting. Likewise for
51141
55735
          # LC_CTYPE, which is also set at the beginning of the configure script.
51142
55736
          # Test for the AIX locale name.
51209
55803
  const char *p;
51210
55804
  /* Check whether the given locale name is recognized by the system.  */
51211
55805
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51212
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
55806
  /* On native Windows, setlocale(category, "") looks at the system settings,
51213
55807
     not at the environment variables.  Also, when an encoding suffix such
51214
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
55808
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51215
55809
     category of the locale to "C".  */
51216
55810
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51217
55811
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51220
55814
  if (setlocale (LC_ALL, "") == NULL) return 1;
51221
55815
#endif
51222
55816
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51223
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
55817
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51224
55818
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51225
55819
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51226
55820
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51269
55863
        # "ja" as "Japanese" or "Japanese_Japan.932",
51270
55864
        # and similar.
51271
55865
        mingw*)
51272
 
          # Test for the hypothetical native Win32 locale name.
 
55866
          # Test for the hypothetical native Windows locale name.
51273
55867
          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51274
55868
            gt_cv_locale_zh_CN=Chinese_China.54936
51275
55869
          else
51285
55879
          ;;
51286
55880
        *)
51287
55881
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51288
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
55882
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51289
55883
          # configure script would override the LC_ALL setting. Likewise for
51290
55884
          # LC_CTYPE, which is also set at the beginning of the configure script.
51291
55885
          # Test for the locale name without encoding suffix.
51344
55938
     program return 1 on BeOS.  */
51345
55939
  /* Check whether the given locale name is recognized by the system.  */
51346
55940
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51347
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
55941
  /* On native Windows, setlocale(category, "") looks at the system settings,
51348
55942
     not at the environment variables.  Also, when an encoding suffix such
51349
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
55943
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51350
55944
     category of the locale to "C".  */
51351
55945
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51352
55946
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51355
55949
  if (setlocale (LC_ALL, "") == NULL) return 1;
51356
55950
#endif
51357
55951
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51358
 
     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
 
55952
     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
51359
55953
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51360
55954
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51361
55955
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51402
55996
        # "ja" as "Japanese" or "Japanese_Japan.932",
51403
55997
        # and similar.
51404
55998
        mingw*)
51405
 
          # Test for the hypothetical native Win32 locale name.
 
55999
          # Test for the hypothetical native Windows locale name.
51406
56000
          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51407
56001
            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
51408
56002
          else
51412
56006
          ;;
51413
56007
        *)
51414
56008
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51415
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56009
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51416
56010
          # configure script would override the LC_ALL setting. Likewise for
51417
56011
          # LC_CTYPE, which is also set at the beginning of the configure script.
51418
56012
          # Test for the usual locale name.
51472
56066
#if !(defined __BEOS__ || defined __HAIKU__)
51473
56067
  /* Check whether the given locale name is recognized by the system.  */
51474
56068
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51475
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56069
  /* On native Windows, setlocale(category, "") looks at the system settings,
51476
56070
     not at the environment variables.  Also, when an encoding suffix such
51477
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56071
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51478
56072
     category of the locale to "C".  */
51479
56073
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51480
56074
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51483
56077
  if (setlocale (LC_ALL, "") == NULL) return 1;
51484
56078
# endif
51485
56079
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51486
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56080
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51487
56081
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51488
56082
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51489
56083
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51509
56103
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
51510
56104
    return 1;
51511
56105
#endif
 
56106
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
51512
56107
  /* Check whether the decimal separator is a comma.
51513
56108
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51514
56109
     are nl_langinfo(RADIXCHAR) are both ".".  */
51515
56110
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
56111
#endif
51516
56112
  return 0;
51517
56113
}
51518
56114
 
51530
56126
        # "ja" as "Japanese" or "Japanese_Japan.932",
51531
56127
        # and similar.
51532
56128
        mingw*)
51533
 
          # Test for the hypothetical native Win32 locale name.
 
56129
          # Test for the hypothetical native Windows locale name.
51534
56130
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51535
56131
            gt_cv_locale_fr_utf8=French_France.65001
51536
56132
          else
51540
56136
          ;;
51541
56137
        *)
51542
56138
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51543
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56139
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51544
56140
          # configure script would override the LC_ALL setting. Likewise for
51545
56141
          # LC_CTYPE, which is also set at the beginning of the configure script.
51546
56142
          # Test for the usual locale name.
51595
56191
int main () {
51596
56192
  /* Check whether the given locale name is recognized by the system.  */
51597
56193
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51598
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56194
  /* On native Windows, setlocale(category, "") looks at the system settings,
51599
56195
     not at the environment variables.  Also, when an encoding suffix such
51600
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56196
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51601
56197
     category of the locale to "C".  */
51602
56198
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51603
56199
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51606
56202
  if (setlocale (LC_ALL, "") == NULL) return 1;
51607
56203
#endif
51608
56204
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51609
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56205
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51610
56206
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51611
56207
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51612
56208
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51632
56228
     one byte long. This excludes the UTF-8 encoding.  */
51633
56229
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
51634
56230
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
56231
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
51635
56232
  /* Check whether the decimal separator is a comma.
51636
56233
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51637
56234
     are nl_langinfo(RADIXCHAR) are both ".".  */
51638
56235
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
56236
#endif
51639
56237
  return 0;
51640
56238
}
51641
56239
 
51653
56251
        # "ja" as "Japanese" or "Japanese_Japan.932",
51654
56252
        # and similar.
51655
56253
        mingw*)
51656
 
          # Test for the native Win32 locale name.
 
56254
          # Test for the native Windows locale name.
51657
56255
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51658
56256
            gt_cv_locale_fr=French_France.1252
51659
56257
          else
51663
56261
          ;;
51664
56262
        *)
51665
56263
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51666
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56264
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51667
56265
          # configure script would override the LC_ALL setting. Likewise for
51668
56266
          # LC_CTYPE, which is also set at the beginning of the configure script.
51669
56267
          # Test for the usual locale name.
51731
56329
#if !(defined __BEOS__ || defined __HAIKU__)
51732
56330
  /* Check whether the given locale name is recognized by the system.  */
51733
56331
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51734
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56332
  /* On native Windows, setlocale(category, "") looks at the system settings,
51735
56333
     not at the environment variables.  Also, when an encoding suffix such
51736
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56334
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51737
56335
     category of the locale to "C".  */
51738
56336
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51739
56337
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51742
56340
  if (setlocale (LC_ALL, "") == NULL) return 1;
51743
56341
# endif
51744
56342
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51745
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56343
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51746
56344
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51747
56345
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51748
56346
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51768
56366
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
51769
56367
    return 1;
51770
56368
#endif
 
56369
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
51771
56370
  /* Check whether the decimal separator is a comma.
51772
56371
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51773
56372
     are nl_langinfo(RADIXCHAR) are both ".".  */
51774
56373
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
56374
#endif
51775
56375
  return 0;
51776
56376
}
51777
56377
 
51789
56389
        # "ja" as "Japanese" or "Japanese_Japan.932",
51790
56390
        # and similar.
51791
56391
        mingw*)
51792
 
          # Test for the hypothetical native Win32 locale name.
 
56392
          # Test for the hypothetical native Windows locale name.
51793
56393
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51794
56394
            gt_cv_locale_fr_utf8=French_France.65001
51795
56395
          else
51799
56399
          ;;
51800
56400
        *)
51801
56401
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51802
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56402
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51803
56403
          # configure script would override the LC_ALL setting. Likewise for
51804
56404
          # LC_CTYPE, which is also set at the beginning of the configure script.
51805
56405
          # Test for the usual locale name.
51856
56456
  const char *p;
51857
56457
  /* Check whether the given locale name is recognized by the system.  */
51858
56458
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51859
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56459
  /* On native Windows, setlocale(category, "") looks at the system settings,
51860
56460
     not at the environment variables.  Also, when an encoding suffix such
51861
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56461
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51862
56462
     category of the locale to "C".  */
51863
56463
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51864
56464
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51867
56467
  if (setlocale (LC_ALL, "") == NULL) return 1;
51868
56468
#endif
51869
56469
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51870
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56470
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51871
56471
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51872
56472
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51873
56473
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51916
56516
        # "ja" as "Japanese" or "Japanese_Japan.932",
51917
56517
        # and similar.
51918
56518
        mingw*)
51919
 
          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
51920
 
          # and CP932 is very different from EUC-JP, so we cannot use it here.
 
56519
          # Note that on native Windows, the Japanese locale is
 
56520
          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
 
56521
          # cannot use it here.
51921
56522
          gt_cv_locale_ja=none
51922
56523
          ;;
51923
56524
        *)
51924
56525
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51925
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56526
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51926
56527
          # configure script would override the LC_ALL setting. Likewise for
51927
56528
          # LC_CTYPE, which is also set at the beginning of the configure script.
51928
56529
          # Test for the AIX locale name.
51995
56596
  const char *p;
51996
56597
  /* Check whether the given locale name is recognized by the system.  */
51997
56598
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
51998
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56599
  /* On native Windows, setlocale(category, "") looks at the system settings,
51999
56600
     not at the environment variables.  Also, when an encoding suffix such
52000
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56601
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
52001
56602
     category of the locale to "C".  */
52002
56603
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
52003
56604
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
52006
56607
  if (setlocale (LC_ALL, "") == NULL) return 1;
52007
56608
#endif
52008
56609
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
52009
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56610
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
52010
56611
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
52011
56612
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
52012
56613
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
52055
56656
        # "ja" as "Japanese" or "Japanese_Japan.932",
52056
56657
        # and similar.
52057
56658
        mingw*)
52058
 
          # Test for the hypothetical native Win32 locale name.
 
56659
          # Test for the hypothetical native Windows locale name.
52059
56660
          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
52060
56661
            gt_cv_locale_zh_CN=Chinese_China.54936
52061
56662
          else
52071
56672
          ;;
52072
56673
        *)
52073
56674
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
52074
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56675
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
52075
56676
          # configure script would override the LC_ALL setting. Likewise for
52076
56677
          # LC_CTYPE, which is also set at the beginning of the configure script.
52077
56678
          # Test for the locale name without encoding suffix.
52128
56729
#if !(defined __BEOS__ || defined __HAIKU__)
52129
56730
  /* Check whether the given locale name is recognized by the system.  */
52130
56731
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
52131
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56732
  /* On native Windows, setlocale(category, "") looks at the system settings,
52132
56733
     not at the environment variables.  Also, when an encoding suffix such
52133
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56734
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
52134
56735
     category of the locale to "C".  */
52135
56736
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
52136
56737
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
52139
56740
  if (setlocale (LC_ALL, "") == NULL) return 1;
52140
56741
# endif
52141
56742
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
52142
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56743
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
52143
56744
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
52144
56745
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
52145
56746
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
52165
56766
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
52166
56767
    return 1;
52167
56768
#endif
 
56769
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
52168
56770
  /* Check whether the decimal separator is a comma.
52169
56771
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
52170
56772
     are nl_langinfo(RADIXCHAR) are both ".".  */
52171
56773
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
56774
#endif
52172
56775
  return 0;
52173
56776
}
52174
56777
 
52186
56789
        # "ja" as "Japanese" or "Japanese_Japan.932",
52187
56790
        # and similar.
52188
56791
        mingw*)
52189
 
          # Test for the hypothetical native Win32 locale name.
 
56792
          # Test for the hypothetical native Windows locale name.
52190
56793
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
52191
56794
            gt_cv_locale_fr_utf8=French_France.65001
52192
56795
          else
52196
56799
          ;;
52197
56800
        *)
52198
56801
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
52199
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56802
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
52200
56803
          # configure script would override the LC_ALL setting. Likewise for
52201
56804
          # LC_CTYPE, which is also set at the beginning of the configure script.
52202
56805
          # Test for the usual locale name.
52254
56857
  const char *p;
52255
56858
  /* Check whether the given locale name is recognized by the system.  */
52256
56859
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
52257
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
56860
  /* On native Windows, setlocale(category, "") looks at the system settings,
52258
56861
     not at the environment variables.  Also, when an encoding suffix such
52259
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
56862
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
52260
56863
     category of the locale to "C".  */
52261
56864
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
52262
56865
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
52265
56868
  if (setlocale (LC_ALL, "") == NULL) return 1;
52266
56869
#endif
52267
56870
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
52268
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
56871
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
52269
56872
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
52270
56873
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
52271
56874
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
52314
56917
        # "ja" as "Japanese" or "Japanese_Japan.932",
52315
56918
        # and similar.
52316
56919
        mingw*)
52317
 
          # Test for the hypothetical native Win32 locale name.
 
56920
          # Test for the hypothetical native Windows locale name.
52318
56921
          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
52319
56922
            gt_cv_locale_zh_CN=Chinese_China.54936
52320
56923
          else
52330
56933
          ;;
52331
56934
        *)
52332
56935
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
52333
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
56936
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
52334
56937
          # configure script would override the LC_ALL setting. Likewise for
52335
56938
          # LC_CTYPE, which is also set at the beginning of the configure script.
52336
56939
          # Test for the locale name without encoding suffix.
52384
56987
 
52385
56988
#include <sys/mman.h>
52386
56989
#ifdef MAP_ANONYMOUS
52387
 
    I cant identify this map
52388
 
#endif
52389
 
 
52390
 
_ACEOF
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
52394
 
fi
52395
 
rm -f conftest*
52396
 
 
52397
 
    if test $gl_have_mmap_anonymous != yes; then
52398
 
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52399
 
/* end confdefs.h.  */
52400
 
 
52401
 
#include <sys/mman.h>
52402
 
#ifdef MAP_ANON
52403
 
    I cant identify this map
52404
 
#endif
52405
 
 
52406
 
_ACEOF
52407
 
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52408
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
52409
 
 
52410
 
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52411
 
 
52412
 
         gl_have_mmap_anonymous=yes
52413
 
fi
52414
 
rm -f conftest*
52415
 
 
52416
 
    fi
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
52420
 
 
52421
 
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
52422
 
 
52423
 
    fi
52424
 
  fi
52425
 
 
52426
 
 
52427
 
 
52428
 
 
52429
 
 
52430
 
 
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 :
52436
 
  gl_have_mmap=yes
52437
 
else
52438
 
  gl_have_mmap=no
52439
 
fi
52440
 
 
52441
 
 
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.  */
52449
 
 
52450
 
#include <sys/mman.h>
52451
 
#ifdef MAP_ANONYMOUS
52452
 
    I cant identify this map
52453
 
#endif
52454
 
 
52455
 
_ACEOF
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
52459
 
fi
52460
 
rm -f conftest*
52461
 
 
52462
 
    if test $gl_have_mmap_anonymous != yes; then
52463
 
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52464
 
/* end confdefs.h.  */
52465
 
 
52466
 
#include <sys/mman.h>
52467
 
#ifdef MAP_ANON
52468
 
    I cant identify this map
52469
 
#endif
52470
 
 
52471
 
_ACEOF
52472
 
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52473
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
52474
 
 
52475
 
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52476
 
 
52477
 
         gl_have_mmap_anonymous=yes
52478
 
fi
52479
 
rm -f conftest*
52480
 
 
52481
 
    fi
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
52485
 
 
52486
 
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
52487
 
 
52488
 
    fi
52489
 
  fi
52490
 
 
52491
 
 
52492
 
 
52493
 
 
52494
 
 
52495
 
 
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 :
52501
 
  gl_have_mmap=yes
52502
 
else
52503
 
  gl_have_mmap=no
52504
 
fi
52505
 
 
52506
 
 
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.  */
52514
 
 
52515
 
#include <sys/mman.h>
52516
 
#ifdef MAP_ANONYMOUS
52517
 
    I cant identify this map
52518
 
#endif
52519
 
 
52520
 
_ACEOF
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
52524
 
fi
52525
 
rm -f conftest*
52526
 
 
52527
 
    if test $gl_have_mmap_anonymous != yes; then
52528
 
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52529
 
/* end confdefs.h.  */
52530
 
 
52531
 
#include <sys/mman.h>
52532
 
#ifdef MAP_ANON
52533
 
    I cant identify this map
52534
 
#endif
52535
 
 
52536
 
_ACEOF
52537
 
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52538
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
52539
 
 
52540
 
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52541
 
 
52542
 
         gl_have_mmap_anonymous=yes
52543
 
fi
52544
 
rm -f conftest*
52545
 
 
52546
 
    fi
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
52550
 
 
52551
 
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
52552
 
 
52553
 
    fi
52554
 
  fi
52555
 
 
52556
 
 
52557
 
 
52558
 
 
52559
 
 
52560
 
 
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 :
52566
 
  gl_have_mmap=yes
52567
 
else
52568
 
  gl_have_mmap=no
52569
 
fi
52570
 
 
52571
 
 
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.  */
52579
 
 
52580
 
#include <sys/mman.h>
52581
 
#ifdef MAP_ANONYMOUS
52582
 
    I cant identify this map
52583
 
#endif
52584
 
 
52585
 
_ACEOF
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
52589
 
fi
52590
 
rm -f conftest*
52591
 
 
52592
 
    if test $gl_have_mmap_anonymous != yes; then
52593
 
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52594
 
/* end confdefs.h.  */
52595
 
 
52596
 
#include <sys/mman.h>
52597
 
#ifdef MAP_ANON
52598
 
    I cant identify this map
52599
 
#endif
52600
 
 
52601
 
_ACEOF
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
 
56991
#endif
 
56992
 
 
56993
_ACEOF
 
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
 
56997
fi
 
56998
rm -f conftest*
 
56999
 
 
57000
    if test $gl_have_mmap_anonymous != yes; then
 
57001
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57002
/* end confdefs.h.  */
 
57003
 
 
57004
#include <sys/mman.h>
 
57005
#ifdef MAP_ANON
 
57006
    I cannot identify this map
 
57007
#endif
 
57008
 
 
57009
_ACEOF
 
57010
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57011
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
57012
 
 
57013
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
57014
 
 
57015
         gl_have_mmap_anonymous=yes
 
57016
fi
 
57017
rm -f conftest*
 
57018
 
 
57019
    fi
 
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
 
57023
 
 
57024
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
57025
 
 
57026
    fi
 
57027
  fi
 
57028
 
 
57029
 
 
57030
 
 
57031
 
 
57032
 
 
57033
 
 
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 :
 
57039
  gl_have_mmap=yes
 
57040
else
 
57041
  gl_have_mmap=no
 
57042
fi
 
57043
 
 
57044
 
 
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.  */
 
57052
 
 
57053
#include <sys/mman.h>
 
57054
#ifdef MAP_ANONYMOUS
 
57055
    I cannot identify this map
 
57056
#endif
 
57057
 
 
57058
_ACEOF
 
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
 
57062
fi
 
57063
rm -f conftest*
 
57064
 
 
57065
    if test $gl_have_mmap_anonymous != yes; then
 
57066
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57067
/* end confdefs.h.  */
 
57068
 
 
57069
#include <sys/mman.h>
 
57070
#ifdef MAP_ANON
 
57071
    I cannot identify this map
 
57072
#endif
 
57073
 
 
57074
_ACEOF
 
57075
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57076
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
57077
 
 
57078
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
57079
 
 
57080
         gl_have_mmap_anonymous=yes
 
57081
fi
 
57082
rm -f conftest*
 
57083
 
 
57084
    fi
 
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
 
57088
 
 
57089
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
57090
 
 
57091
    fi
 
57092
  fi
 
57093
 
 
57094
 
 
57095
 
 
57096
 
 
57097
 
 
57098
 
 
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 :
 
57104
  gl_have_mmap=yes
 
57105
else
 
57106
  gl_have_mmap=no
 
57107
fi
 
57108
 
 
57109
 
 
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.  */
 
57117
 
 
57118
#include <sys/mman.h>
 
57119
#ifdef MAP_ANONYMOUS
 
57120
    I cannot identify this map
 
57121
#endif
 
57122
 
 
57123
_ACEOF
 
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
 
57127
fi
 
57128
rm -f conftest*
 
57129
 
 
57130
    if test $gl_have_mmap_anonymous != yes; then
 
57131
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57132
/* end confdefs.h.  */
 
57133
 
 
57134
#include <sys/mman.h>
 
57135
#ifdef MAP_ANON
 
57136
    I cannot identify this map
 
57137
#endif
 
57138
 
 
57139
_ACEOF
 
57140
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57141
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
57142
 
 
57143
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
57144
 
 
57145
         gl_have_mmap_anonymous=yes
 
57146
fi
 
57147
rm -f conftest*
 
57148
 
 
57149
    fi
 
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
 
57153
 
 
57154
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
57155
 
 
57156
    fi
 
57157
  fi
 
57158
 
 
57159
 
 
57160
 
 
57161
 
 
57162
 
 
57163
 
 
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 :
 
57169
  gl_have_mmap=yes
 
57170
else
 
57171
  gl_have_mmap=no
 
57172
fi
 
57173
 
 
57174
 
 
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.  */
 
57182
 
 
57183
#include <sys/mman.h>
 
57184
#ifdef MAP_ANONYMOUS
 
57185
    I cannot identify this map
 
57186
#endif
 
57187
 
 
57188
_ACEOF
 
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
 
57192
fi
 
57193
rm -f conftest*
 
57194
 
 
57195
    if test $gl_have_mmap_anonymous != yes; then
 
57196
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57197
/* end confdefs.h.  */
 
57198
 
 
57199
#include <sys/mman.h>
 
57200
#ifdef MAP_ANON
 
57201
    I cannot identify this map
 
57202
#endif
 
57203
 
 
57204
_ACEOF
 
57205
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57206
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
52604
57207
 
52605
57208
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
52606
57209
 
52645
57248
int main () {
52646
57249
  /* Check whether the given locale name is recognized by the system.  */
52647
57250
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
52648
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
57251
  /* On native Windows, setlocale(category, "") looks at the system settings,
52649
57252
     not at the environment variables.  Also, when an encoding suffix such
52650
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
57253
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
52651
57254
     category of the locale to "C".  */
52652
57255
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
52653
57256
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
52656
57259
  if (setlocale (LC_ALL, "") == NULL) return 1;
52657
57260
#endif
52658
57261
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
52659
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
57262
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
52660
57263
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
52661
57264
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
52662
57265
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
52682
57285
     one byte long. This excludes the UTF-8 encoding.  */
52683
57286
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
52684
57287
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
57288
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
52685
57289
  /* Check whether the decimal separator is a comma.
52686
57290
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
52687
57291
     are nl_langinfo(RADIXCHAR) are both ".".  */
52688
57292
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
57293
#endif
52689
57294
  return 0;
52690
57295
}
52691
57296
 
52703
57308
        # "ja" as "Japanese" or "Japanese_Japan.932",
52704
57309
        # and similar.
52705
57310
        mingw*)
52706
 
          # Test for the native Win32 locale name.
 
57311
          # Test for the native Windows locale name.
52707
57312
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
52708
57313
            gt_cv_locale_fr=French_France.1252
52709
57314
          else
52713
57318
          ;;
52714
57319
        *)
52715
57320
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
52716
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
57321
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
52717
57322
          # configure script would override the LC_ALL setting. Likewise for
52718
57323
          # LC_CTYPE, which is also set at the beginning of the configure script.
52719
57324
          # Test for the usual locale name.
52781
57386
#if !(defined __BEOS__ || defined __HAIKU__)
52782
57387
  /* Check whether the given locale name is recognized by the system.  */
52783
57388
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
52784
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
57389
  /* On native Windows, setlocale(category, "") looks at the system settings,
52785
57390
     not at the environment variables.  Also, when an encoding suffix such
52786
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
57391
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
52787
57392
     category of the locale to "C".  */
52788
57393
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
52789
57394
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
52792
57397
  if (setlocale (LC_ALL, "") == NULL) return 1;
52793
57398
# endif
52794
57399
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
52795
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
57400
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
52796
57401
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
52797
57402
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
52798
57403
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
52818
57423
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
52819
57424
    return 1;
52820
57425
#endif
 
57426
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
52821
57427
  /* Check whether the decimal separator is a comma.
52822
57428
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
52823
57429
     are nl_langinfo(RADIXCHAR) are both ".".  */
52824
57430
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
57431
#endif
52825
57432
  return 0;
52826
57433
}
52827
57434
 
52839
57446
        # "ja" as "Japanese" or "Japanese_Japan.932",
52840
57447
        # and similar.
52841
57448
        mingw*)
52842
 
          # Test for the hypothetical native Win32 locale name.
 
57449
          # Test for the hypothetical native Windows locale name.
52843
57450
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
52844
57451
            gt_cv_locale_fr_utf8=French_France.65001
52845
57452
          else
52849
57456
          ;;
52850
57457
        *)
52851
57458
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
52852
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
57459
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
52853
57460
          # configure script would override the LC_ALL setting. Likewise for
52854
57461
          # LC_CTYPE, which is also set at the beginning of the configure script.
52855
57462
          # Test for the usual locale name.
52885
57492
 
52886
57493
 
52887
57494
 
52888
 
 
52889
57495
          if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
52890
57496
            REPLACE_PERROR=1
52891
57497
  fi
52898
57504
else
52899
57505
  if test "$cross_compiling" = yes; then :
52900
57506
              gl_cv_func_perror_works="guessing no"
 
57507
 
52901
57508
else
52902
57509
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52903
57510
/* end confdefs.h.  */
52904
57511
#include <errno.h>
52905
57512
                #include <stdio.h>
 
57513
                #include <stdlib.h>
 
57514
                #include <string.h>
52906
57515
 
52907
57516
int
52908
57517
main ()
52913
57522
                puts (str);
52914
57523
                errno = -1;
52915
57524
                perror ("");
 
57525
                return 0;
52916
57526
 
52917
57527
  ;
52918
57528
  return 0;
52919
57529
}
52920
57530
_ACEOF
52921
57531
if ac_fn_c_try_run "$LINENO"; then :
52922
 
  CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2
52923
 
            if cmp conftest.txt1 conftest.txt2 >/dev/null; then
 
57532
  if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
 
57533
               && cmp conftest.txt1 conftest.txt2 >/dev/null; then
52924
57534
              gl_cv_func_perror_works=yes
52925
57535
            else
52926
57536
              gl_cv_func_perror_works=no
52933
57543
  conftest.$ac_objext conftest.beam conftest.$ac_ext
52934
57544
fi
52935
57545
 
 
57546
 
52936
57547
fi
52937
57548
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
52938
57549
$as_echo "$gl_cv_func_perror_works" >&6; }
52939
 
       if test "$gl_cv_func_perror_works" != yes; then
52940
 
         REPLACE_PERROR=1
52941
 
       fi ;;
52942
 
    *)              REPLACE_PERROR=1 ;;
 
57550
      if test "$gl_cv_func_perror_works" != yes; then
 
57551
        REPLACE_PERROR=1
 
57552
      fi
 
57553
      ;;
 
57554
    *)
 
57555
                  REPLACE_PERROR=1
 
57556
      ;;
52943
57557
  esac
52944
57558
 
52945
 
if test $REPLACE_PERROR = 1; then
 
57559
  if test $REPLACE_PERROR = 1; then
52946
57560
 
52947
57561
 
52948
57562
 
52953
57567
 
52954
57568
  gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
52955
57569
 
52956
 
fi
 
57570
  fi
52957
57571
 
52958
57572
 
52959
57573
 
52983
57597
    HAVE_PIPE=0
52984
57598
  fi
52985
57599
 
52986
 
if test $HAVE_PIPE = 0; then
 
57600
  if test $HAVE_PIPE = 0; then
52987
57601
 
52988
57602
 
52989
57603
 
52994
57608
 
52995
57609
  gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
52996
57610
 
52997
 
fi
 
57611
  fi
52998
57612
 
52999
57613
 
53000
57614
 
53016
57630
 
53017
57631
 
53018
57632
 
 
57633
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57634
/* end confdefs.h.  */
 
57635
[
 
57636
  #if defined _MSC_VER || defined __MINGW32__
 
57637
    notposix
 
57638
  #endif
 
57639
    ]
 
57640
_ACEOF
 
57641
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57642
  $EGREP "notposix" >/dev/null 2>&1; then :
 
57643
  posix_spawn_ported=no
 
57644
else
 
57645
  posix_spawn_ported=yes
 
57646
fi
 
57647
rm -f conftest*
 
57648
 
 
57649
   if test $posix_spawn_ported = yes; then
 
57650
  POSIX_SPAWN_PORTED_TRUE=
 
57651
  POSIX_SPAWN_PORTED_FALSE='#'
 
57652
else
 
57653
  POSIX_SPAWN_PORTED_TRUE='#'
 
57654
  POSIX_SPAWN_PORTED_FALSE=
 
57655
fi
 
57656
 
 
57657
 
 
57658
 
 
57659
 
 
57660
  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
 
57661
  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
 
57662
  # irrelevant for anonymous mappings.
 
57663
  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
 
57664
if test "x$ac_cv_func_mmap" = xyes; then :
 
57665
  gl_have_mmap=yes
 
57666
else
 
57667
  gl_have_mmap=no
 
57668
fi
 
57669
 
 
57670
 
 
57671
  # Try to allow MAP_ANONYMOUS.
 
57672
  gl_have_mmap_anonymous=no
 
57673
  if test $gl_have_mmap = yes; then
 
57674
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
 
57675
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
 
57676
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57677
/* end confdefs.h.  */
 
57678
 
 
57679
#include <sys/mman.h>
 
57680
#ifdef MAP_ANONYMOUS
 
57681
    I cannot identify this map
 
57682
#endif
 
57683
 
 
57684
_ACEOF
 
57685
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57686
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
57687
  gl_have_mmap_anonymous=yes
 
57688
fi
 
57689
rm -f conftest*
 
57690
 
 
57691
    if test $gl_have_mmap_anonymous != yes; then
 
57692
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
57693
/* end confdefs.h.  */
 
57694
 
 
57695
#include <sys/mman.h>
 
57696
#ifdef MAP_ANON
 
57697
    I cannot identify this map
 
57698
#endif
 
57699
 
 
57700
_ACEOF
 
57701
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
57702
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
57703
 
 
57704
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
57705
 
 
57706
         gl_have_mmap_anonymous=yes
 
57707
fi
 
57708
rm -f conftest*
 
57709
 
 
57710
    fi
 
57711
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
 
57712
$as_echo "$gl_have_mmap_anonymous" >&6; }
 
57713
    if test $gl_have_mmap_anonymous = yes; then
 
57714
 
 
57715
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
57716
 
 
57717
    fi
 
57718
  fi
 
57719
 
 
57720
 
 
57721
 
53019
57722
 
53020
57723
 
53021
57724
 
53029
57732
      ;;
53030
57733
  esac
53031
57734
 
53032
 
if test $REPLACE_SETLOCALE = 1; then
 
57735
  if test $REPLACE_SETLOCALE = 1; then
53033
57736
 
53034
57737
 
53035
57738
 
53043
57746
 
53044
57747
  :
53045
57748
 
53046
 
fi
 
57749
  fi
53047
57750
 
53048
57751
 
53049
57752
 
53089
57792
int main () {
53090
57793
  /* Check whether the given locale name is recognized by the system.  */
53091
57794
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
53092
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
57795
  /* On native Windows, setlocale(category, "") looks at the system settings,
53093
57796
     not at the environment variables.  Also, when an encoding suffix such
53094
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
57797
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53095
57798
     category of the locale to "C".  */
53096
57799
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53097
57800
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53100
57803
  if (setlocale (LC_ALL, "") == NULL) return 1;
53101
57804
#endif
53102
57805
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53103
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
57806
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53104
57807
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53105
57808
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53106
57809
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53126
57829
     one byte long. This excludes the UTF-8 encoding.  */
53127
57830
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53128
57831
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
57832
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
53129
57833
  /* Check whether the decimal separator is a comma.
53130
57834
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53131
57835
     are nl_langinfo(RADIXCHAR) are both ".".  */
53132
57836
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
57837
#endif
53133
57838
  return 0;
53134
57839
}
53135
57840
 
53147
57852
        # "ja" as "Japanese" or "Japanese_Japan.932",
53148
57853
        # and similar.
53149
57854
        mingw*)
53150
 
          # Test for the native Win32 locale name.
 
57855
          # Test for the native Windows locale name.
53151
57856
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53152
57857
            gt_cv_locale_fr=French_France.1252
53153
57858
          else
53157
57862
          ;;
53158
57863
        *)
53159
57864
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53160
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
57865
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53161
57866
          # configure script would override the LC_ALL setting. Likewise for
53162
57867
          # LC_CTYPE, which is also set at the beginning of the configure script.
53163
57868
          # Test for the usual locale name.
53225
57930
#if !(defined __BEOS__ || defined __HAIKU__)
53226
57931
  /* Check whether the given locale name is recognized by the system.  */
53227
57932
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
53228
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
57933
  /* On native Windows, setlocale(category, "") looks at the system settings,
53229
57934
     not at the environment variables.  Also, when an encoding suffix such
53230
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
57935
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53231
57936
     category of the locale to "C".  */
53232
57937
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53233
57938
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53236
57941
  if (setlocale (LC_ALL, "") == NULL) return 1;
53237
57942
# endif
53238
57943
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53239
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
57944
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53240
57945
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53241
57946
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53242
57947
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53262
57967
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
53263
57968
    return 1;
53264
57969
#endif
 
57970
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
53265
57971
  /* Check whether the decimal separator is a comma.
53266
57972
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53267
57973
     are nl_langinfo(RADIXCHAR) are both ".".  */
53268
57974
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
57975
#endif
53269
57976
  return 0;
53270
57977
}
53271
57978
 
53283
57990
        # "ja" as "Japanese" or "Japanese_Japan.932",
53284
57991
        # and similar.
53285
57992
        mingw*)
53286
 
          # Test for the hypothetical native Win32 locale name.
 
57993
          # Test for the hypothetical native Windows locale name.
53287
57994
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53288
57995
            gt_cv_locale_fr_utf8=French_France.65001
53289
57996
          else
53293
58000
          ;;
53294
58001
        *)
53295
58002
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53296
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
58003
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53297
58004
          # configure script would override the LC_ALL setting. Likewise for
53298
58005
          # LC_CTYPE, which is also set at the beginning of the configure script.
53299
58006
          # Test for the usual locale name.
53350
58057
  const char *p;
53351
58058
  /* Check whether the given locale name is recognized by the system.  */
53352
58059
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
53353
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
58060
  /* On native Windows, setlocale(category, "") looks at the system settings,
53354
58061
     not at the environment variables.  Also, when an encoding suffix such
53355
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
58062
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53356
58063
     category of the locale to "C".  */
53357
58064
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53358
58065
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53361
58068
  if (setlocale (LC_ALL, "") == NULL) return 1;
53362
58069
#endif
53363
58070
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53364
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
58071
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53365
58072
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53366
58073
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53367
58074
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53410
58117
        # "ja" as "Japanese" or "Japanese_Japan.932",
53411
58118
        # and similar.
53412
58119
        mingw*)
53413
 
          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
53414
 
          # and CP932 is very different from EUC-JP, so we cannot use it here.
 
58120
          # Note that on native Windows, the Japanese locale is
 
58121
          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
 
58122
          # cannot use it here.
53415
58123
          gt_cv_locale_ja=none
53416
58124
          ;;
53417
58125
        *)
53418
58126
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53419
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
58127
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53420
58128
          # configure script would override the LC_ALL setting. Likewise for
53421
58129
          # LC_CTYPE, which is also set at the beginning of the configure script.
53422
58130
          # Test for the AIX locale name.
53489
58197
  const char *p;
53490
58198
  /* Check whether the given locale name is recognized by the system.  */
53491
58199
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
53492
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
58200
  /* On native Windows, setlocale(category, "") looks at the system settings,
53493
58201
     not at the environment variables.  Also, when an encoding suffix such
53494
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
58202
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53495
58203
     category of the locale to "C".  */
53496
58204
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53497
58205
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53500
58208
  if (setlocale (LC_ALL, "") == NULL) return 1;
53501
58209
#endif
53502
58210
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53503
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
58211
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53504
58212
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53505
58213
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53506
58214
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53549
58257
        # "ja" as "Japanese" or "Japanese_Japan.932",
53550
58258
        # and similar.
53551
58259
        mingw*)
53552
 
          # Test for the hypothetical native Win32 locale name.
 
58260
          # Test for the hypothetical native Windows locale name.
53553
58261
          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53554
58262
            gt_cv_locale_zh_CN=Chinese_China.54936
53555
58263
          else
53565
58273
          ;;
53566
58274
        *)
53567
58275
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53568
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
58276
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53569
58277
          # configure script would override the LC_ALL setting. Likewise for
53570
58278
          # LC_CTYPE, which is also set at the beginning of the configure script.
53571
58279
          # Test for the locale name without encoding suffix.
53596
58304
 
53597
58305
 
53598
58306
 
53599
 
if test "$ac_cv_header_winsock2_h" = yes; then
 
58307
  if test "$ac_cv_header_winsock2_h" = yes; then
53600
58308
 
53601
58309
 
53602
58310
 
53607
58315
 
53608
58316
  gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
53609
58317
 
53610
 
fi
 
58318
  fi
53611
58319
 
53612
58320
 
53613
58321
 
53634
58342
 
53635
58343
 
53636
58344
 
53637
 
            ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
 
58345
               ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
53638
58346
"
53639
58347
if test "x$ac_cv_have_decl_sleep" = xyes; then :
53640
58348
  ac_have_decl=1
53656
58364
  $as_echo_n "(cached) " >&6
53657
58365
else
53658
58366
  if test "$cross_compiling" = yes; then :
53659
 
  gl_cv_func_sleep_works="guessing no"
 
58367
  case "$host_os" in
 
58368
                 # Guess yes on glibc systems.
 
58369
         *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
 
58370
                 # If we don't know, assume the worst.
 
58371
         *)      gl_cv_func_sleep_works="guessing no" ;;
 
58372
       esac
 
58373
 
53660
58374
else
53661
58375
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53662
58376
/* end confdefs.h.  */
53704
58418
fi
53705
58419
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
53706
58420
$as_echo "$gl_cv_func_sleep_works" >&6; }
53707
 
    if test "$gl_cv_func_sleep_works" != yes; then
53708
 
      REPLACE_SLEEP=1
53709
 
    fi
 
58421
    case "$gl_cv_func_sleep_works" in
 
58422
      *yes) ;;
 
58423
      *)
 
58424
        REPLACE_SLEEP=1
 
58425
        ;;
 
58426
    esac
53710
58427
  fi
53711
58428
 
53712
 
if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
 
58429
  if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
53713
58430
 
53714
58431
 
53715
58432
 
53720
58437
 
53721
58438
  gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
53722
58439
 
53723
 
fi
 
58440
  fi
53724
58441
 
53725
58442
 
53726
58443
 
53744
58461
 
53745
58462
 
53746
58463
 
53747
 
if test "$ac_cv_header_winsock2_h" = yes; then
 
58464
  if test "$ac_cv_header_winsock2_h" = yes; then
53748
58465
 
53749
58466
 
53750
58467
 
53755
58472
 
53756
58473
  gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
53757
58474
 
53758
 
fi
53759
 
# When this module is used, sockets may actually occur as file descriptors,
53760
 
# hence it is worth warning if the modules 'close' and 'ioctl' are not used.
53761
 
 
53762
 
 
53763
 
 
53764
 
if test "$ac_cv_header_winsock2_h" = yes; then
53765
 
  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
53766
 
  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
53767
 
fi
 
58475
  fi
 
58476
  # When this module is used, sockets may actually occur as file descriptors,
 
58477
  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
 
58478
 
 
58479
 
 
58480
 
 
58481
  if test "$ac_cv_header_winsock2_h" = yes; then
 
58482
    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
 
58483
    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
 
58484
  fi
53768
58485
 
53769
58486
 
53770
58487
 
53885
58602
    fi
53886
58603
  fi
53887
58604
 
53888
 
if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
 
58605
  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
53889
58606
 
53890
58607
 
53891
58608
 
53900
58617
 
53901
58618
 
53902
58619
 
53903
 
fi
 
58620
 
 
58621
  fi
53904
58622
 
53905
58623
 
53906
58624
 
53946
58664
 
53947
58665
#include <sys/mman.h>
53948
58666
#ifdef MAP_ANONYMOUS
53949
 
    I cant identify this map
53950
 
#endif
53951
 
 
53952
 
_ACEOF
53953
 
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53954
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
53955
 
  gl_have_mmap_anonymous=yes
53956
 
fi
53957
 
rm -f conftest*
53958
 
 
53959
 
    if test $gl_have_mmap_anonymous != yes; then
53960
 
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53961
 
/* end confdefs.h.  */
53962
 
 
53963
 
#include <sys/mman.h>
53964
 
#ifdef MAP_ANON
53965
 
    I cant identify this map
53966
 
#endif
53967
 
 
53968
 
_ACEOF
53969
 
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53970
 
  $EGREP "I cant identify this map" >/dev/null 2>&1; then :
 
58667
    I cannot identify this map
 
58668
#endif
 
58669
 
 
58670
_ACEOF
 
58671
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
58672
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
58673
  gl_have_mmap_anonymous=yes
 
58674
fi
 
58675
rm -f conftest*
 
58676
 
 
58677
    if test $gl_have_mmap_anonymous != yes; then
 
58678
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
58679
/* end confdefs.h.  */
 
58680
 
 
58681
#include <sys/mman.h>
 
58682
#ifdef MAP_ANON
 
58683
    I cannot identify this map
 
58684
#endif
 
58685
 
 
58686
_ACEOF
 
58687
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
58688
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
58689
 
 
58690
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
58691
 
 
58692
         gl_have_mmap_anonymous=yes
 
58693
fi
 
58694
rm -f conftest*
 
58695
 
 
58696
    fi
 
58697
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
 
58698
$as_echo "$gl_have_mmap_anonymous" >&6; }
 
58699
    if test $gl_have_mmap_anonymous = yes; then
 
58700
 
 
58701
$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
58702
 
 
58703
    fi
 
58704
  fi
 
58705
 
 
58706
 
 
58707
 
 
58708
 
 
58709
 
 
58710
 
 
58711
  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
 
58712
  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
 
58713
  # irrelevant for anonymous mappings.
 
58714
  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
 
58715
if test "x$ac_cv_func_mmap" = xyes; then :
 
58716
  gl_have_mmap=yes
 
58717
else
 
58718
  gl_have_mmap=no
 
58719
fi
 
58720
 
 
58721
 
 
58722
  # Try to allow MAP_ANONYMOUS.
 
58723
  gl_have_mmap_anonymous=no
 
58724
  if test $gl_have_mmap = yes; then
 
58725
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
 
58726
$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
 
58727
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
58728
/* end confdefs.h.  */
 
58729
 
 
58730
#include <sys/mman.h>
 
58731
#ifdef MAP_ANONYMOUS
 
58732
    I cannot identify this map
 
58733
#endif
 
58734
 
 
58735
_ACEOF
 
58736
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
58737
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
58738
  gl_have_mmap_anonymous=yes
 
58739
fi
 
58740
rm -f conftest*
 
58741
 
 
58742
    if test $gl_have_mmap_anonymous != yes; then
 
58743
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
58744
/* end confdefs.h.  */
 
58745
 
 
58746
#include <sys/mman.h>
 
58747
#ifdef MAP_ANON
 
58748
    I cannot identify this map
 
58749
#endif
 
58750
 
 
58751
_ACEOF
 
58752
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
58753
  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
53971
58754
 
53972
58755
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
53973
58756
 
53996
58779
    HAVE_SYMLINKAT=0
53997
58780
  fi
53998
58781
 
53999
 
if test $HAVE_SYMLINKAT = 0; then
 
58782
  if test $HAVE_SYMLINKAT = 0; then
54000
58783
 
54001
58784
 
54002
58785
 
54007
58790
 
54008
58791
  gltests_LIBOBJS="$gltests_LIBOBJS symlinkat.$ac_objext"
54009
58792
 
54010
 
fi
 
58793
  fi
54011
58794
 
54012
58795
 
54013
58796
 
54073
58856
;;
54074
58857
  esac
54075
58858
 
54076
 
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
 
58859
  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
54077
58860
 
54078
58861
 
54079
58862
 
54097
58880
  $as_echo_n "(cached) " >&6
54098
58881
else
54099
58882
  if test "$cross_compiling" = yes; then :
54100
 
  gl_cv_func_usleep_works="guessing no"
 
58883
  case "$host_os" in
 
58884
                   # Guess yes on glibc systems.
 
58885
           *-gnu*) gl_cv_func_usleep_works="guessing yes" ;;
 
58886
                   # If we don't know, assume the worst.
 
58887
           *)      gl_cv_func_usleep_works="guessing no" ;;
 
58888
         esac
 
58889
 
54101
58890
else
54102
58891
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54103
58892
/* end confdefs.h.  */
54124
58913
fi
54125
58914
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_usleep_works" >&5
54126
58915
$as_echo "$gl_cv_func_usleep_works" >&6; }
54127
 
    if test "$gl_cv_func_usleep_works" != yes; then
54128
 
      REPLACE_USLEEP=1
54129
 
    fi
 
58916
    case "$gl_cv_func_usleep_works" in
 
58917
      *yes) ;;
 
58918
      *)
 
58919
        REPLACE_USLEEP=1
 
58920
        ;;
 
58921
    esac
54130
58922
  fi
54131
58923
 
54132
 
if test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1; then
 
58924
  if test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1; then
54133
58925
 
54134
58926
 
54135
58927
 
54140
58932
 
54141
58933
  gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
54142
58934
 
54143
 
fi
 
58935
  fi
54144
58936
 
54145
58937
 
54146
58938
 
54162
58954
 
54163
58955
 
54164
58956
 
54165
 
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
 
58957
 
 
58958
  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
54166
58959
 
54167
58960
 
54168
58961
 
54188
58981
int main () {
54189
58982
  /* Check whether the given locale name is recognized by the system.  */
54190
58983
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
54191
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
58984
  /* On native Windows, setlocale(category, "") looks at the system settings,
54192
58985
     not at the environment variables.  Also, when an encoding suffix such
54193
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
58986
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54194
58987
     category of the locale to "C".  */
54195
58988
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54196
58989
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54199
58992
  if (setlocale (LC_ALL, "") == NULL) return 1;
54200
58993
#endif
54201
58994
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54202
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
58995
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54203
58996
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54204
58997
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54205
58998
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54225
59018
     one byte long. This excludes the UTF-8 encoding.  */
54226
59019
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54227
59020
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
59021
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
54228
59022
  /* Check whether the decimal separator is a comma.
54229
59023
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
54230
59024
     are nl_langinfo(RADIXCHAR) are both ".".  */
54231
59025
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
59026
#endif
54232
59027
  return 0;
54233
59028
}
54234
59029
 
54246
59041
        # "ja" as "Japanese" or "Japanese_Japan.932",
54247
59042
        # and similar.
54248
59043
        mingw*)
54249
 
          # Test for the native Win32 locale name.
 
59044
          # Test for the native Windows locale name.
54250
59045
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54251
59046
            gt_cv_locale_fr=French_France.1252
54252
59047
          else
54256
59051
          ;;
54257
59052
        *)
54258
59053
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54259
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
59054
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54260
59055
          # configure script would override the LC_ALL setting. Likewise for
54261
59056
          # LC_CTYPE, which is also set at the beginning of the configure script.
54262
59057
          # Test for the usual locale name.
54324
59119
#if !(defined __BEOS__ || defined __HAIKU__)
54325
59120
  /* Check whether the given locale name is recognized by the system.  */
54326
59121
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
54327
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
59122
  /* On native Windows, setlocale(category, "") looks at the system settings,
54328
59123
     not at the environment variables.  Also, when an encoding suffix such
54329
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
59124
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54330
59125
     category of the locale to "C".  */
54331
59126
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54332
59127
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54335
59130
  if (setlocale (LC_ALL, "") == NULL) return 1;
54336
59131
# endif
54337
59132
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54338
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
59133
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54339
59134
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54340
59135
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54341
59136
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54361
59156
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
54362
59157
    return 1;
54363
59158
#endif
 
59159
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
54364
59160
  /* Check whether the decimal separator is a comma.
54365
59161
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
54366
59162
     are nl_langinfo(RADIXCHAR) are both ".".  */
54367
59163
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
59164
#endif
54368
59165
  return 0;
54369
59166
}
54370
59167
 
54382
59179
        # "ja" as "Japanese" or "Japanese_Japan.932",
54383
59180
        # and similar.
54384
59181
        mingw*)
54385
 
          # Test for the hypothetical native Win32 locale name.
 
59182
          # Test for the hypothetical native Windows locale name.
54386
59183
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54387
59184
            gt_cv_locale_fr_utf8=French_France.65001
54388
59185
          else
54392
59189
          ;;
54393
59190
        *)
54394
59191
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54395
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
59192
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54396
59193
          # configure script would override the LC_ALL setting. Likewise for
54397
59194
          # LC_CTYPE, which is also set at the beginning of the configure script.
54398
59195
          # Test for the usual locale name.
54449
59246
  const char *p;
54450
59247
  /* Check whether the given locale name is recognized by the system.  */
54451
59248
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
54452
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
59249
  /* On native Windows, setlocale(category, "") looks at the system settings,
54453
59250
     not at the environment variables.  Also, when an encoding suffix such
54454
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
59251
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54455
59252
     category of the locale to "C".  */
54456
59253
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54457
59254
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54460
59257
  if (setlocale (LC_ALL, "") == NULL) return 1;
54461
59258
#endif
54462
59259
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54463
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
59260
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54464
59261
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54465
59262
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54466
59263
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54509
59306
        # "ja" as "Japanese" or "Japanese_Japan.932",
54510
59307
        # and similar.
54511
59308
        mingw*)
54512
 
          # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
54513
 
          # and CP932 is very different from EUC-JP, so we cannot use it here.
 
59309
          # Note that on native Windows, the Japanese locale is
 
59310
          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
 
59311
          # cannot use it here.
54514
59312
          gt_cv_locale_ja=none
54515
59313
          ;;
54516
59314
        *)
54517
59315
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54518
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
59316
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54519
59317
          # configure script would override the LC_ALL setting. Likewise for
54520
59318
          # LC_CTYPE, which is also set at the beginning of the configure script.
54521
59319
          # Test for the AIX locale name.
54588
59386
  const char *p;
54589
59387
  /* Check whether the given locale name is recognized by the system.  */
54590
59388
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
54591
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
59389
  /* On native Windows, setlocale(category, "") looks at the system settings,
54592
59390
     not at the environment variables.  Also, when an encoding suffix such
54593
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
59391
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54594
59392
     category of the locale to "C".  */
54595
59393
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54596
59394
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54599
59397
  if (setlocale (LC_ALL, "") == NULL) return 1;
54600
59398
#endif
54601
59399
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54602
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
59400
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54603
59401
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54604
59402
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54605
59403
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54648
59446
        # "ja" as "Japanese" or "Japanese_Japan.932",
54649
59447
        # and similar.
54650
59448
        mingw*)
54651
 
          # Test for the hypothetical native Win32 locale name.
 
59449
          # Test for the hypothetical native Windows locale name.
54652
59450
          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54653
59451
            gt_cv_locale_zh_CN=Chinese_China.54936
54654
59452
          else
54664
59462
          ;;
54665
59463
        *)
54666
59464
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54667
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
59465
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54668
59466
          # configure script would override the LC_ALL setting. Likewise for
54669
59467
          # LC_CTYPE, which is also set at the beginning of the configure script.
54670
59468
          # Test for the locale name without encoding suffix.
54839
59637
    fi
54840
59638
  fi
54841
59639
 
54842
 
if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
 
59640
  if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
54843
59641
 
54844
59642
 
54845
59643
 
54853
59651
 
54854
59652
  :
54855
59653
 
54856
 
fi
 
59654
  fi
54857
59655
 
54858
59656
 
54859
59657
 
54882
59680
    REPLACE_WCTOMB=1
54883
59681
  fi
54884
59682
 
54885
 
if test $REPLACE_WCTOMB = 1; then
 
59683
  if test $REPLACE_WCTOMB = 1; then
54886
59684
 
54887
59685
 
54888
59686
 
54896
59694
 
54897
59695
  :
54898
59696
 
54899
 
fi
 
59697
  fi
54900
59698
 
54901
59699
 
54902
59700
 
55079
59877
 
55080
59878
fi
55081
59879
 
55082
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
55083
 
$as_echo_n "checking for function prototypes... " >&6; }
55084
 
if test "$ac_cv_prog_cc_c89" != no; then
55085
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55086
 
$as_echo "yes" >&6; }
55087
 
 
55088
 
$as_echo "#define PROTOTYPES 1" >>confdefs.h
55089
 
 
55090
 
 
55091
 
$as_echo "#define __PROTOTYPES 1" >>confdefs.h
55092
 
 
55093
 
else
55094
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55095
 
$as_echo "no" >&6; }
55096
 
fi
55097
 
 
55098
 
 
55099
 
 
55100
 
if test "$ac_cv_prog_cc_stdc" != no; then
55101
 
  U= ANSI2KNR=
55102
 
else
55103
 
  U=_ ANSI2KNR=./ansi2knr
55104
 
fi
55105
 
# Ensure some checks needed by ansi2knr itself.
55106
 
 
55107
 
for ac_header in string.h
55108
 
do :
55109
 
  ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
55110
 
if test "x$ac_cv_header_string_h" = xyes; then :
55111
 
  cat >>confdefs.h <<_ACEOF
55112
 
#define HAVE_STRING_H 1
55113
 
_ACEOF
55114
 
 
55115
 
fi
55116
 
 
55117
 
done
55118
 
 
55119
 
 
55120
59880
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
55121
59881
$as_echo_n "checking for working volatile... " >&6; }
55122
59882
if ${ac_cv_c_volatile+:} false; then :
55163
59923
 
55164
59924
 
55165
59925
 
55166
 
 
55167
 
 
55168
59926
  for ac_header in sys/sysctl.h
55169
59927
do :
55170
59928
  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
55182
59940
done
55183
59941
 
55184
59942
 
55185
 
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
55186
 
if test "x$ac_cv_type_pid_t" = xyes; then :
55187
 
 
55188
 
else
55189
 
 
55190
 
cat >>confdefs.h <<_ACEOF
55191
 
#define pid_t int
55192
 
_ACEOF
55193
 
 
55194
 
fi
55195
 
 
55196
59943
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
55197
59944
$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
55198
59945
if ${ac_cv_header_sys_types_h_makedev+:} false; then :
55371
60118
 
55372
60119
 
55373
60120
 
 
60121
  ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
 
60122
if test "x$ac_cv_have_decl_setregid" = xyes; then :
 
60123
  ac_have_decl=1
 
60124
else
 
60125
  ac_have_decl=0
 
60126
fi
 
60127
 
 
60128
cat >>confdefs.h <<_ACEOF
 
60129
#define HAVE_DECL_SETREGID $ac_have_decl
 
60130
_ACEOF
 
60131
 
55374
60132
 
55375
60133
$as_echo "#define PREFER_NONREENTRANT_EUIDACCESS 1" >>confdefs.h
55376
60134
 
55377
60135
 
55378
60136
 
55379
 
 
55380
 
  case " $LIBOBJS " in
55381
 
  *" euidaccess-stat.$ac_objext "* ) ;;
55382
 
  *) LIBOBJS="$LIBOBJS euidaccess-stat.$ac_objext"
55383
 
 ;;
55384
 
esac
55385
 
 
55386
 
 
55387
 
 
55388
 
 
55389
 
  case " $LIBOBJS " in
55390
 
  *" fd-reopen.$ac_objext "* ) ;;
55391
 
  *) LIBOBJS="$LIBOBJS fd-reopen.$ac_objext"
55392
 
 ;;
55393
 
esac
55394
 
 
55395
 
 
55396
 
 
55397
60137
  # Check whether --enable-xattr was given.
55398
60138
if test "${enable_xattr+set}" = set; then :
55399
60139
  enableval=$enable_xattr; use_xattr=$enableval
55510
60250
 
55511
60251
 
55512
60252
 
55513
 
 
55514
 
  case " $LIBOBJS " in
55515
 
  *" xfts.$ac_objext "* ) ;;
55516
 
  *) LIBOBJS="$LIBOBJS xfts.$ac_objext"
55517
 
 ;;
55518
 
esac
55519
 
 
55520
 
 
55521
 
    :
55522
 
 
55523
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
55524
 
$as_echo_n "checking for inline... " >&6; }
55525
 
if ${ac_cv_c_inline+:} false; then :
55526
 
  $as_echo_n "(cached) " >&6
55527
 
else
55528
 
  ac_cv_c_inline=no
55529
 
for ac_kw in inline __inline__ __inline; do
55530
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55531
 
/* end confdefs.h.  */
55532
 
#ifndef __cplusplus
55533
 
typedef int foo_t;
55534
 
static $ac_kw foo_t static_foo () {return 0; }
55535
 
$ac_kw foo_t foo () {return 0; }
55536
 
#endif
55537
 
 
55538
 
_ACEOF
55539
 
if ac_fn_c_try_compile "$LINENO"; then :
55540
 
  ac_cv_c_inline=$ac_kw
55541
 
fi
55542
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55543
 
  test "$ac_cv_c_inline" != no && break
55544
 
done
55545
 
 
55546
 
fi
55547
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
55548
 
$as_echo "$ac_cv_c_inline" >&6; }
55549
 
 
55550
 
case $ac_cv_c_inline in
55551
 
  inline | yes) ;;
55552
 
  *)
55553
 
    case $ac_cv_c_inline in
55554
 
      no) ac_val=;;
55555
 
      *) ac_val=$ac_cv_c_inline;;
55556
 
    esac
55557
 
    cat >>confdefs.h <<_ACEOF
55558
 
#ifndef __cplusplus
55559
 
#define inline $ac_val
55560
 
#endif
55561
 
_ACEOF
55562
 
    ;;
55563
 
esac
55564
 
 
55565
 
 
55566
 
 
55567
 
  case " $LIBOBJS " in
55568
 
  *" strintcmp.$ac_objext "* ) ;;
55569
 
  *) LIBOBJS="$LIBOBJS strintcmp.$ac_objext"
55570
 
 ;;
55571
 
esac
55572
 
 
55573
 
 
55574
 
 
55575
 
 
55576
 
 
55577
 
 
55578
 
  case " $LIBOBJS " in
55579
 
  *" strnumcmp.$ac_objext "* ) ;;
55580
 
  *) LIBOBJS="$LIBOBJS strnumcmp.$ac_objext"
55581
 
 ;;
55582
 
esac
55583
 
 
55584
 
 
55585
 
 
55586
 
 
55587
 
 
55588
60253
  # gnulib settings.
55589
60254
 
55590
60255
 
55629
60294
 
55630
60295
 
55631
60296
 
55632
 
ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
55633
 
if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
55634
 
  ac_have_decl=1
55635
 
else
55636
 
  ac_have_decl=0
55637
 
fi
55638
 
 
55639
 
cat >>confdefs.h <<_ACEOF
55640
 
#define HAVE_DECL_FDATASYNC $ac_have_decl
55641
 
_ACEOF
55642
 
 
55643
 
 
55644
60297
 
55645
60298
HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
55646
60299
 
55654
60307
 
55655
60308
 
55656
60309
 
55657
 
 
55658
 
 
55659
60310
  ac_fn_c_check_member "$LINENO" "struct stat" "st_author" "ac_cv_member_struct_stat_st_author" "$ac_includes_default
55660
60311
#include <sys/stat.h>
55661
60312
 
55785
60436
 
55786
60437
 
55787
60438
 
 
60439
  # These checks are for Interix, to avoid its getgr* functions, in favor
 
60440
  # of these replacements.  The replacement functions are much more efficient
 
60441
  # because they do not query the domain controller for user information
 
60442
  # when it is not needed.
 
60443
 
 
60444
 
55788
60445
 
55789
60446
 
55790
60447
 
55926
60583
 
55927
60584
 
55928
60585
fi
 
60586
ac_fn_c_check_member "$LINENO" "struct statfs" "f_frsize" "ac_cv_member_struct_statfs_f_frsize" "$statfs_includes
 
60587
"
 
60588
if test "x$ac_cv_member_struct_statfs_f_frsize" = xyes; then :
 
60589
 
 
60590
cat >>confdefs.h <<_ACEOF
 
60591
#define HAVE_STRUCT_STATFS_F_FRSIZE 1
 
60592
_ACEOF
 
60593
 
 
60594
 
 
60595
fi
55929
60596
 
55930
60597
    if test $ac_cv_header_OS_h != yes; then
55931
60598
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56103
60770
  fi
56104
60771
 
56105
60772
 
56106
 
  # See if linking `seq' requires -lm.
 
60773
  # See if linking 'seq' requires -lm.
56107
60774
  # It does on nearly every system.  The single exception (so far) is
56108
60775
  # BeOS which has all the math functions in the normal runtime library
56109
60776
  # and doesn't have a separate math library.
56180
60847
  fi
56181
60848
 
56182
60849
 
 
60850
# The test suite needs to know if we have a working perl.
 
60851
# FIXME: this is suboptimal.  Ideally, we would be able to call gl_PERL
 
60852
# with an ACTION-IF-NOT-FOUND argument ...
 
60853
cu_have_perl=yes
 
60854
case $PERL in *"/missing "*) cu_have_perl=no;; esac
 
60855
 if test $cu_have_perl = yes; then
 
60856
  HAVE_PERL_TRUE=
 
60857
  HAVE_PERL_FALSE='#'
 
60858
else
 
60859
  HAVE_PERL_TRUE='#'
 
60860
  HAVE_PERL_FALSE=
 
60861
fi
 
60862
 
 
60863
 
56183
60864
# Check whether --enable-gcc-warnings was given.
56184
60865
if test "${enable_gcc_warnings+set}" = set; then :
56185
60866
  enableval=$enable_gcc_warnings; case $enableval in
56188
60869
   esac
56189
60870
   gl_gcc_warnings=$enableval
56190
60871
else
56191
 
  gl_gcc_warnings=no
 
60872
  if test -d "$srcdir"/.git; then
 
60873
     gl_gcc_warnings=yes
 
60874
   else
 
60875
     gl_gcc_warnings=no
 
60876
   fi
56192
60877
 
56193
60878
fi
56194
60879
 
56195
60880
 
 
60881
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
 
60882
# ------------------------------------------------
 
60883
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
 
60884
# Otherwise, run RUN-IF-NOT-FOUND.
 
60885
 
 
60886
 
56196
60887
if test "$gl_gcc_warnings" = yes; then
56197
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
56198
 
$as_echo_n "checking whether compiler handles -Werror... " >&6; }
56199
 
if ${gl_cv_warn__Werror+:} false; then :
 
60888
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
 
60889
$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
 
60890
if ${gl_cv_warn_c__Werror+:} false; then :
56200
60891
  $as_echo_n "(cached) " >&6
56201
60892
else
56202
60893
 
56203
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56204
 
  CPPFLAGS="${CPPFLAGS} -Werror"
 
60894
  gl_save_compiler_FLAGS="$CFLAGS"
 
60895
  as_fn_append CFLAGS " -Werror"
56205
60896
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56206
60897
/* end confdefs.h.  */
56207
60898
 
56213
60904
  return 0;
56214
60905
}
56215
60906
_ACEOF
56216
 
if ac_fn_c_try_cpp "$LINENO"; then :
56217
 
  gl_cv_warn__Werror=yes
 
60907
if ac_fn_c_try_compile "$LINENO"; then :
 
60908
  gl_cv_warn_c__Werror=yes
56218
60909
else
56219
 
  gl_cv_warn__Werror=no
 
60910
  gl_cv_warn_c__Werror=no
56220
60911
fi
56221
 
rm -f conftest.err conftest.i conftest.$ac_ext
56222
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
60912
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
60913
  CFLAGS="$gl_save_compiler_FLAGS"
56223
60914
 
56224
60915
fi
56225
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
56226
 
$as_echo "$gl_cv_warn__Werror" >&6; }
56227
 
if test "x$gl_cv_warn__Werror" = xyes; then :
 
60916
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
 
60917
$as_echo "$gl_cv_warn_c__Werror" >&6; }
 
60918
if test "x$gl_cv_warn_c__Werror" = xyes; then :
56228
60919
  as_fn_append WERROR_CFLAGS " -Werror"
56229
60920
fi
56230
60921
 
56231
60922
 
56232
60923
 
 
60924
 
56233
60925
  nw=
56234
60926
  # This, $nw, is the list of warnings we disable.
56235
60927
  nw="$nw -Wdeclaration-after-statement" # too useful to forbid
56258
60950
  nw="$nw -Wmissing-format-attribute" # copy.c
56259
60951
  nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
56260
60952
  nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
 
60953
  nw="$nw -Wsuggest-attribute=format" # warns about copy.c and factor.c
56261
60954
 
56262
60955
  # Using -Wstrict-overflow is a pain, but the alternative is worse.
56263
60956
  # For an example, see the code that provoked this report:
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; }
56339
61032
    fi
 
61033
 
 
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
 
61038
else
 
61039
 
 
61040
      gl_save_CFLAGS="$CFLAGS"
 
61041
      CFLAGS="$CFLAGS -Werror -Wuninitialized"
 
61042
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
61043
/* end confdefs.h.  */
 
61044
 
 
61045
int
 
61046
main ()
 
61047
{
 
61048
 
 
61049
  ;
 
61050
  return 0;
 
61051
}
 
61052
_ACEOF
 
61053
if ac_fn_c_try_compile "$LINENO"; then :
 
61054
  gl_cv_cc_uninitialized_supported=yes
 
61055
else
 
61056
  gl_cv_cc_uninitialized_supported=no
 
61057
fi
 
61058
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61059
      CFLAGS="$gl_save_CFLAGS"
 
61060
fi
 
61061
 
 
61062
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
 
61063
$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
 
61064
 
56340
61065
  fi
56341
61066
 
 
61067
  # List all gcc warning categories.
56342
61068
  gl_manywarn_set=
56343
61069
  for gl_manywarn_item in \
 
61070
    -W \
 
61071
    -Wabi \
 
61072
    -Waddress \
56344
61073
    -Wall \
56345
 
    -W \
56346
 
    -Wformat-y2k \
 
61074
    -Warray-bounds \
 
61075
    -Wattributes \
 
61076
    -Wbad-function-cast \
 
61077
    -Wbuiltin-macro-redefined \
 
61078
    -Wcast-align \
 
61079
    -Wchar-subscripts \
 
61080
    -Wclobbered \
 
61081
    -Wcomment \
 
61082
    -Wcomments \
 
61083
    -Wcoverage-mismatch \
 
61084
    -Wcpp \
 
61085
    -Wdeprecated \
 
61086
    -Wdeprecated-declarations \
 
61087
    -Wdisabled-optimization \
 
61088
    -Wdiv-by-zero \
 
61089
    -Wdouble-promotion \
 
61090
    -Wempty-body \
 
61091
    -Wendif-labels \
 
61092
    -Wenum-compare \
 
61093
    -Wextra \
 
61094
    -Wformat-contains-nul \
 
61095
    -Wformat-extra-args \
56347
61096
    -Wformat-nonliteral \
56348
61097
    -Wformat-security \
 
61098
    -Wformat-y2k \
 
61099
    -Wformat-zero-length \
 
61100
    -Wformat=2 \
 
61101
    -Wfree-nonheap-object \
 
61102
    -Wignored-qualifiers \
 
61103
    -Wimplicit \
 
61104
    -Wimplicit-function-declaration \
 
61105
    -Wimplicit-int \
56349
61106
    -Winit-self \
56350
 
    -Wmissing-include-dirs \
56351
 
    -Wswitch-default \
56352
 
    -Wswitch-enum \
56353
 
    -Wunused \
56354
 
    -Wunknown-pragmas \
56355
 
    -Wstrict-aliasing \
56356
 
    -Wstrict-overflow \
56357
 
    -Wsystem-headers \
56358
 
    -Wfloat-equal \
56359
 
    -Wtraditional \
56360
 
    -Wtraditional-conversion \
56361
 
    -Wdeclaration-after-statement \
56362
 
    -Wundef \
56363
 
    -Wshadow \
56364
 
    -Wunsafe-loop-optimizations \
56365
 
    -Wpointer-arith \
56366
 
    -Wbad-function-cast \
56367
 
    -Wc++-compat \
56368
 
    -Wcast-qual \
56369
 
    -Wcast-align \
56370
 
    -Wwrite-strings \
56371
 
    -Wconversion \
56372
 
    -Wsign-conversion \
 
61107
    -Winline \
 
61108
    -Wint-to-pointer-cast \
 
61109
    -Winvalid-memory-model \
 
61110
    -Winvalid-pch \
 
61111
    -Wjump-misses-init \
56373
61112
    -Wlogical-op \
56374
 
    -Waggregate-return \
56375
 
    -Wstrict-prototypes \
56376
 
    -Wold-style-definition \
56377
 
    -Wmissing-prototypes \
 
61113
    -Wmain \
 
61114
    -Wmaybe-uninitialized \
 
61115
    -Wmissing-braces \
56378
61116
    -Wmissing-declarations \
 
61117
    -Wmissing-field-initializers \
 
61118
    -Wmissing-format-attribute \
 
61119
    -Wmissing-include-dirs \
56379
61120
    -Wmissing-noreturn \
56380
 
    -Wmissing-format-attribute \
56381
 
    -Wpacked \
56382
 
    -Wpadded \
56383
 
    -Wredundant-decls \
 
61121
    -Wmissing-parameter-type \
 
61122
    -Wmissing-prototypes \
 
61123
    -Wmudflap \
 
61124
    -Wmultichar \
 
61125
    -Wnarrowing \
56384
61126
    -Wnested-externs \
56385
 
    -Wunreachable-code \
56386
 
    -Winline \
56387
 
    -Winvalid-pch \
56388
 
    -Wlong-long \
56389
 
    -Wvla \
56390
 
    -Wvolatile-register-var \
56391
 
    -Wdisabled-optimization \
56392
 
    -Wstack-protector \
 
61127
    -Wnonnull \
 
61128
    -Wnormalized=nfc \
 
61129
    -Wold-style-declaration \
 
61130
    -Wold-style-definition \
 
61131
    -Woverflow \
56393
61132
    -Woverlength-strings \
56394
 
    -Wbuiltin-macro-redefined \
56395
 
    -Wmudflap \
 
61133
    -Woverride-init \
 
61134
    -Wpacked \
56396
61135
    -Wpacked-bitfield-compat \
 
61136
    -Wparentheses \
 
61137
    -Wpointer-arith \
 
61138
    -Wpointer-sign \
 
61139
    -Wpointer-to-int-cast \
 
61140
    -Wpragmas \
 
61141
    -Wreturn-type \
 
61142
    -Wsequence-point \
 
61143
    -Wshadow \
 
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 \
 
61153
    -Wswitch \
 
61154
    -Wswitch-default \
56397
61155
    -Wsync-nand \
56398
 
    ; do
56399
 
    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
56400
 
  done
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 \
56404
 
    -Wattributes \
56405
 
    -Wcoverage-mismatch \
56406
 
    -Wmultichar \
 
61156
    -Wsystem-headers \
 
61157
    -Wtrampolines \
 
61158
    -Wtrigraphs \
 
61159
    -Wtype-limits \
 
61160
    -Wuninitialized \
 
61161
    -Wunknown-pragmas \
 
61162
    -Wunreachable-code \
 
61163
    -Wunsafe-loop-optimizations \
 
61164
    -Wunused \
 
61165
    -Wunused-but-set-parameter \
 
61166
    -Wunused-but-set-variable \
 
61167
    -Wunused-function \
 
61168
    -Wunused-label \
 
61169
    -Wunused-local-typedefs \
56407
61170
    -Wunused-macros \
 
61171
    -Wunused-parameter \
 
61172
    -Wunused-result \
 
61173
    -Wunused-value \
 
61174
    -Wunused-variable \
 
61175
    -Wvarargs \
 
61176
    -Wvariadic-macros \
 
61177
    -Wvector-operation-performance \
 
61178
    -Wvla \
 
61179
    -Wvolatile-register-var \
 
61180
    -Wwrite-strings \
 
61181
    \
56408
61182
    ; do
56409
61183
    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
56410
61184
  done
56411
61185
 
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"
56415
61189
  fi
56416
61190
 
 
61191
  if test "$gl_cv_cc_uninitialized_supported" = no; then
 
61192
    gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
 
61193
  fi
 
61194
 
56417
61195
  ws=$gl_manywarn_set
56418
61196
 
56419
61197
 
56432
61210
  ws=$gl_warn_set
56433
61211
 
56434
61212
  for w in $ws; do
56435
 
    as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
56436
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
56437
 
$as_echo_n "checking whether compiler handles $w... " >&6; }
 
61213
    as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
 
61214
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
 
61215
$as_echo_n "checking whether C compiler handles $w... " >&6; }
56438
61216
if eval \${$as_gl_Warn+:} false; then :
56439
61217
  $as_echo_n "(cached) " >&6
56440
61218
else
56441
61219
 
56442
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56443
 
  CPPFLAGS="${CPPFLAGS} $w"
 
61220
  gl_save_compiler_FLAGS="$CFLAGS"
 
61221
  as_fn_append CFLAGS " $w"
56444
61222
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56445
61223
/* end confdefs.h.  */
56446
61224
 
56452
61230
  return 0;
56453
61231
}
56454
61232
_ACEOF
56455
 
if ac_fn_c_try_cpp "$LINENO"; then :
 
61233
if ac_fn_c_try_compile "$LINENO"; then :
56456
61234
  eval "$as_gl_Warn=yes"
56457
61235
else
56458
61236
  eval "$as_gl_Warn=no"
56459
61237
fi
56460
 
rm -f conftest.err conftest.i conftest.$ac_ext
56461
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
61238
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61239
  CFLAGS="$gl_save_compiler_FLAGS"
56462
61240
 
56463
61241
fi
56464
61242
eval ac_res=\$$as_gl_Warn
56468
61246
  as_fn_append WARN_CFLAGS " $w"
56469
61247
fi
56470
61248
 
 
61249
 
56471
61250
  done
56472
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-sign-compare" >&5
56473
 
$as_echo_n "checking whether compiler handles -Wno-sign-compare... " >&6; }
56474
 
if ${gl_cv_warn__Wno_sign_compare+:} false; then :
 
61251
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
 
61252
$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
 
61253
if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
56475
61254
  $as_echo_n "(cached) " >&6
56476
61255
else
56477
61256
 
56478
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56479
 
  CPPFLAGS="${CPPFLAGS} -Wno-sign-compare"
 
61257
  gl_save_compiler_FLAGS="$CFLAGS"
 
61258
  as_fn_append CFLAGS " -Wno-sign-compare"
56480
61259
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56481
61260
/* end confdefs.h.  */
56482
61261
 
56488
61267
  return 0;
56489
61268
}
56490
61269
_ACEOF
56491
 
if ac_fn_c_try_cpp "$LINENO"; then :
56492
 
  gl_cv_warn__Wno_sign_compare=yes
 
61270
if ac_fn_c_try_compile "$LINENO"; then :
 
61271
  gl_cv_warn_c__Wno_sign_compare=yes
56493
61272
else
56494
 
  gl_cv_warn__Wno_sign_compare=no
 
61273
  gl_cv_warn_c__Wno_sign_compare=no
56495
61274
fi
56496
 
rm -f conftest.err conftest.i conftest.$ac_ext
56497
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
61275
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61276
  CFLAGS="$gl_save_compiler_FLAGS"
56498
61277
 
56499
61278
fi
56500
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_sign_compare" >&5
56501
 
$as_echo "$gl_cv_warn__Wno_sign_compare" >&6; }
56502
 
if test "x$gl_cv_warn__Wno_sign_compare" = xyes; then :
 
61279
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
 
61280
$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
 
61281
if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
56503
61282
  as_fn_append WARN_CFLAGS " -Wno-sign-compare"
56504
61283
fi
 
61284
 
56505
61285
     # Too many warnings for now
56506
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-unused-parameter" >&5
56507
 
$as_echo_n "checking whether compiler handles -Wno-unused-parameter... " >&6; }
56508
 
if ${gl_cv_warn__Wno_unused_parameter+:} false; then :
 
61286
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
 
61287
$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
 
61288
if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
56509
61289
  $as_echo_n "(cached) " >&6
56510
61290
else
56511
61291
 
56512
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56513
 
  CPPFLAGS="${CPPFLAGS} -Wno-unused-parameter"
 
61292
  gl_save_compiler_FLAGS="$CFLAGS"
 
61293
  as_fn_append CFLAGS " -Wno-unused-parameter"
56514
61294
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56515
61295
/* end confdefs.h.  */
56516
61296
 
56522
61302
  return 0;
56523
61303
}
56524
61304
_ACEOF
56525
 
if ac_fn_c_try_cpp "$LINENO"; then :
56526
 
  gl_cv_warn__Wno_unused_parameter=yes
 
61305
if ac_fn_c_try_compile "$LINENO"; then :
 
61306
  gl_cv_warn_c__Wno_unused_parameter=yes
56527
61307
else
56528
 
  gl_cv_warn__Wno_unused_parameter=no
 
61308
  gl_cv_warn_c__Wno_unused_parameter=no
56529
61309
fi
56530
 
rm -f conftest.err conftest.i conftest.$ac_ext
56531
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
61310
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61311
  CFLAGS="$gl_save_compiler_FLAGS"
56532
61312
 
56533
61313
fi
56534
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_unused_parameter" >&5
56535
 
$as_echo "$gl_cv_warn__Wno_unused_parameter" >&6; }
56536
 
if test "x$gl_cv_warn__Wno_unused_parameter" = xyes; then :
 
61314
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
 
61315
$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
 
61316
if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
56537
61317
  as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
56538
61318
fi
 
61319
 
56539
61320
 # Too many warnings for now
56540
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wsuggest-attribute=const" >&5
56541
 
$as_echo_n "checking whether compiler handles -Wsuggest-attribute=const... " >&6; }
56542
 
if ${gl_cv_warn__Wsuggest_attribute_const+:} false; then :
 
61321
  as_gl_Warn=`$as_echo "gl_cv_warn_c_-Wsuggest-attribute=const" | $as_tr_sh`
 
61322
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
 
61323
$as_echo_n "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
 
61324
if eval \${$as_gl_Warn+:} false; then :
56543
61325
  $as_echo_n "(cached) " >&6
56544
61326
else
56545
61327
 
56546
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56547
 
  CPPFLAGS="${CPPFLAGS} -Wsuggest-attribute=const"
 
61328
  gl_save_compiler_FLAGS="$CFLAGS"
 
61329
  as_fn_append CFLAGS " -Wsuggest-attribute=const"
56548
61330
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56549
61331
/* end confdefs.h.  */
56550
61332
 
56556
61338
  return 0;
56557
61339
}
56558
61340
_ACEOF
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"
56561
61343
else
56562
 
  gl_cv_warn__Wsuggest_attribute_const=no
 
61344
  eval "$as_gl_Warn=no"
56563
61345
fi
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"
56566
61348
 
56567
61349
fi
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"
56572
61355
fi
56573
61356
 
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
56578
 
else
56579
 
 
56580
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56581
 
  CPPFLAGS="${CPPFLAGS} -Wsuggest-attribute=pure"
56582
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56583
 
/* end confdefs.h.  */
56584
 
 
56585
 
int
56586
 
main ()
56587
 
{
56588
 
 
56589
 
  ;
56590
 
  return 0;
56591
 
}
 
61357
 
 
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
 
61363
else
 
61364
 
 
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.  */
 
61369
 
 
61370
int
 
61371
main ()
 
61372
{
 
61373
 
 
61374
  ;
 
61375
  return 0;
 
61376
}
 
61377
_ACEOF
 
61378
if ac_fn_c_try_compile "$LINENO"; then :
 
61379
  eval "$as_gl_Warn=yes"
 
61380
else
 
61381
  eval "$as_gl_Warn=no"
 
61382
fi
 
61383
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61384
  CFLAGS="$gl_save_compiler_FLAGS"
 
61385
 
 
61386
fi
 
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"
 
61392
fi
 
61393
 
 
61394
 
 
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
 
61399
else
 
61400
 
 
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.  */
 
61405
 
 
61406
int
 
61407
main ()
 
61408
{
 
61409
 
 
61410
  ;
 
61411
  return 0;
 
61412
}
 
61413
_ACEOF
 
61414
if ac_fn_c_try_compile "$LINENO"; then :
 
61415
  gl_cv_warn_c__Wno_format_nonliteral=yes
 
61416
else
 
61417
  gl_cv_warn_c__Wno_format_nonliteral=no
 
61418
fi
 
61419
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61420
  CFLAGS="$gl_save_compiler_FLAGS"
 
61421
 
 
61422
fi
 
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"
 
61427
fi
 
61428
 
 
61429
 
 
61430
 
 
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.  */
 
61438
 
 
61439
#if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
 
61440
/* ok */
 
61441
#else
 
61442
# error "your version of gcc is older than 4.7"
 
61443
#endif
 
61444
 
 
61445
int
 
61446
main ()
 
61447
{
 
61448
 
 
61449
  ;
 
61450
  return 0;
 
61451
},
 
61452
 
56592
61453
_ACEOF
56593
61454
if ac_fn_c_try_cpp "$LINENO"; then :
56594
 
  gl_cv_warn__Wsuggest_attribute_pure=yes
56595
 
else
56596
 
  gl_cv_warn__Wsuggest_attribute_pure=no
56597
 
fi
56598
 
rm -f conftest.err conftest.i conftest.$ac_ext
56599
 
  CPPFLAGS="$gl_save_CPPFLAGS"
56600
 
 
56601
 
fi
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
 
61460
else
 
61461
 
 
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.  */
 
61466
 
 
61467
int
 
61468
main ()
 
61469
{
 
61470
 
 
61471
  ;
 
61472
  return 0;
 
61473
}
 
61474
_ACEOF
 
61475
if ac_fn_c_try_compile "$LINENO"; then :
 
61476
  eval "$as_gl_Warn=yes"
 
61477
else
 
61478
  eval "$as_gl_Warn=no"
 
61479
fi
 
61480
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61481
  CFLAGS="$gl_save_compiler_FLAGS"
 
61482
 
 
61483
fi
 
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"
56606
61489
fi
56607
61490
 
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
56612
 
else
56613
 
 
56614
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56615
 
  CPPFLAGS="${CPPFLAGS} -Wsuggest-attribute=noreturn"
56616
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56617
 
/* end confdefs.h.  */
56618
 
 
56619
 
int
56620
 
main ()
56621
 
{
56622
 
 
56623
 
  ;
56624
 
  return 0;
56625
 
}
56626
 
_ACEOF
56627
 
if ac_fn_c_try_cpp "$LINENO"; then :
56628
 
  gl_cv_warn__Wsuggest_attribute_noreturn=yes
56629
 
else
56630
 
  gl_cv_warn__Wsuggest_attribute_noreturn=no
 
61491
 
56631
61492
fi
56632
61493
rm -f conftest.err conftest.i conftest.$ac_ext
56633
 
  CPPFLAGS="$gl_save_CPPFLAGS"
56634
61494
 
56635
 
fi
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"
56640
 
fi
56641
61495
 
56642
61496
 
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
56649
61503
else
56650
61504
 
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.  */
56655
61509
 
56661
61515
  return 0;
56662
61516
}
56663
61517
_ACEOF
56664
 
if ac_fn_c_try_cpp "$LINENO"; then :
56665
 
  gl_cv_warn__Wno_logical_op=yes
 
61518
if ac_fn_c_try_compile "$LINENO"; then :
 
61519
  gl_cv_warn_c__Wno_logical_op=yes
56666
61520
else
56667
 
  gl_cv_warn__Wno_logical_op=no
 
61521
  gl_cv_warn_c__Wno_logical_op=no
56668
61522
fi
56669
 
rm -f conftest.err conftest.i conftest.$ac_ext
56670
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
61523
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61524
  CFLAGS="$gl_save_compiler_FLAGS"
56671
61525
 
56672
61526
fi
56673
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_logical_op" >&5
56674
 
$as_echo "$gl_cv_warn__Wno_logical_op" >&6; }
56675
 
if test "x$gl_cv_warn__Wno_logical_op" = xyes; then :
 
61527
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
 
61528
$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
 
61529
if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
56676
61530
  as_fn_append WARN_CFLAGS " -Wno-logical-op"
56677
61531
fi
56678
61532
 
56679
61533
 
56680
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
56681
 
$as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
56682
 
if ${gl_cv_warn__fdiagnostics_show_option+:} false; then :
 
61534
 
 
61535
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
 
61536
$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
 
61537
if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
56683
61538
  $as_echo_n "(cached) " >&6
56684
61539
else
56685
61540
 
56686
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56687
 
  CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
 
61541
  gl_save_compiler_FLAGS="$CFLAGS"
 
61542
  as_fn_append CFLAGS " -fdiagnostics-show-option"
56688
61543
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56689
61544
/* end confdefs.h.  */
56690
61545
 
56696
61551
  return 0;
56697
61552
}
56698
61553
_ACEOF
56699
 
if ac_fn_c_try_cpp "$LINENO"; then :
56700
 
  gl_cv_warn__fdiagnostics_show_option=yes
 
61554
if ac_fn_c_try_compile "$LINENO"; then :
 
61555
  gl_cv_warn_c__fdiagnostics_show_option=yes
56701
61556
else
56702
 
  gl_cv_warn__fdiagnostics_show_option=no
 
61557
  gl_cv_warn_c__fdiagnostics_show_option=no
56703
61558
fi
56704
 
rm -f conftest.err conftest.i conftest.$ac_ext
56705
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
61559
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61560
  CFLAGS="$gl_save_compiler_FLAGS"
56706
61561
 
56707
61562
fi
56708
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
56709
 
$as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
56710
 
if test "x$gl_cv_warn__fdiagnostics_show_option" = xyes; then :
 
61563
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
 
61564
$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
 
61565
if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
56711
61566
  as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
56712
61567
fi
56713
61568
 
56714
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
56715
 
$as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
56716
 
if ${gl_cv_warn__funit_at_a_time+:} false; then :
 
61569
 
 
61570
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
 
61571
$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
 
61572
if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
56717
61573
  $as_echo_n "(cached) " >&6
56718
61574
else
56719
61575
 
56720
 
  gl_save_CPPFLAGS="$CPPFLAGS"
56721
 
  CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
 
61576
  gl_save_compiler_FLAGS="$CFLAGS"
 
61577
  as_fn_append CFLAGS " -funit-at-a-time"
56722
61578
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56723
61579
/* end confdefs.h.  */
56724
61580
 
56730
61586
  return 0;
56731
61587
}
56732
61588
_ACEOF
56733
 
if ac_fn_c_try_cpp "$LINENO"; then :
56734
 
  gl_cv_warn__funit_at_a_time=yes
 
61589
if ac_fn_c_try_compile "$LINENO"; then :
 
61590
  gl_cv_warn_c__funit_at_a_time=yes
56735
61591
else
56736
 
  gl_cv_warn__funit_at_a_time=no
 
61592
  gl_cv_warn_c__funit_at_a_time=no
56737
61593
fi
56738
 
rm -f conftest.err conftest.i conftest.$ac_ext
56739
 
  CPPFLAGS="$gl_save_CPPFLAGS"
 
61594
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
61595
  CFLAGS="$gl_save_compiler_FLAGS"
56740
61596
 
56741
61597
fi
56742
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
56743
 
$as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
56744
 
if test "x$gl_cv_warn__funit_at_a_time" = xyes; then :
 
61598
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
 
61599
$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
 
61600
if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
56745
61601
  as_fn_append WARN_CFLAGS " -funit-at-a-time"
56746
61602
fi
56747
61603
 
56749
61605
 
56750
61606
 
56751
61607
 
 
61608
 
56752
61609
$as_echo "#define lint 1" >>confdefs.h
56753
61610
 
56754
61611
 
56755
 
$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
56756
 
 
56757
61612
 
56758
61613
$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
56759
61614
 
56766
61621
  nw="$nw -Wunused-macros"
56767
61622
  nw="$nw -Wmissing-prototypes"
56768
61623
  nw="$nw -Wold-style-definition"
56769
 
  # FIXME: remove/reenable the following two, once gnulib is adjusted.
56770
 
  nw="$nw -Wsuggest-attribute=const"
56771
 
  nw="$nw -Wsuggest-attribute=pure"
 
61624
  # FIXME: it may be easy to remove this, since it affects only one file:
 
61625
  # the snprintf call at ftoastr.c:132.
 
61626
  nw="$nw -Wdouble-promotion"
56772
61627
 
56773
61628
  gl_warn_set=
56774
61629
  set x $WARN_CFLAGS; shift
56789
61644
  # For gnulib-tests, the set is slightly smaller still.
56790
61645
  nw=
56791
61646
  nw="$nw -Wstrict-prototypes"
 
61647
  # It's not worth being this picky about test programs.
 
61648
  nw="$nw -Wsuggest-attribute=const"
 
61649
  nw="$nw -Wsuggest-attribute=pure"
56792
61650
 
56793
61651
  gl_warn_set=
56794
61652
  set x $GNULIB_WARN_CFLAGS; shift
57883
62741
 
57884
62742
 
57885
62743
 
57886
 
 
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
57892
 
else
57893
 
  ac_check_lib_save_LIBS=$LIBS
57894
 
LIBS="-lypsec  $LIBS"
57895
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57896
 
/* end confdefs.h.  */
57897
 
 
57898
 
 
57899
 
int
57900
 
main ()
57901
 
{
57902
 
return main ();
57903
 
  ;
57904
 
  return 0;
57905
 
}
57906
 
_ACEOF
57907
 
if ac_fn_c_try_link "$LINENO"; then :
57908
 
  ac_cv_lib_ypsec_main=yes
57909
 
else
57910
 
  ac_cv_lib_ypsec_main=no
57911
 
fi
57912
 
rm -f core conftest.err conftest.$ac_objext \
57913
 
    conftest$ac_exeext conftest.$ac_ext
57914
 
LIBS=$ac_check_lib_save_LIBS
57915
 
fi
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
57921
 
_ACEOF
57922
 
 
57923
 
  LIBS="-lypsec $LIBS"
57924
 
 
57925
 
fi
57926
 
 
57927
 
 
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
57933
 
else
57934
 
  ac_check_lib_save_LIBS=$LIBS
57935
 
LIBS="-lldgc  $LIBS"
57936
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57937
 
/* end confdefs.h.  */
57938
 
 
57939
 
 
57940
 
int
57941
 
main ()
57942
 
{
57943
 
return main ();
57944
 
  ;
57945
 
  return 0;
57946
 
}
57947
 
_ACEOF
57948
 
if ac_fn_c_try_link "$LINENO"; then :
57949
 
  ac_cv_lib_ldgc_main=yes
57950
 
else
57951
 
  ac_cv_lib_ldgc_main=no
57952
 
fi
57953
 
rm -f core conftest.err conftest.$ac_objext \
57954
 
    conftest$ac_exeext conftest.$ac_ext
57955
 
LIBS=$ac_check_lib_save_LIBS
57956
 
fi
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
57962
 
_ACEOF
57963
 
 
57964
 
  LIBS="-lldgc $LIBS"
57965
 
 
57966
 
fi
57967
 
 
57968
 
 
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
57975
 
else
57976
 
  ac_func_search_save_LIBS=$LIBS
57977
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57978
 
/* end confdefs.h.  */
57979
 
 
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.  */
57983
 
#ifdef __cplusplus
57984
 
extern "C"
57985
 
#endif
57986
 
char yp_match ();
57987
 
int
57988
 
main ()
57989
 
{
57990
 
return yp_match ();
57991
 
  ;
57992
 
  return 0;
57993
 
}
57994
 
_ACEOF
57995
 
for ac_lib in '' sun ypsec; do
57996
 
  if test -z "$ac_lib"; then
57997
 
    ac_res="none required"
57998
 
  else
57999
 
    ac_res=-l$ac_lib
58000
 
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58001
 
  fi
58002
 
  if ac_fn_c_try_link "$LINENO"; then :
58003
 
  ac_cv_search_yp_match=$ac_res
58004
 
fi
58005
 
rm -f core conftest.err conftest.$ac_objext \
58006
 
    conftest$ac_exeext
58007
 
  if ${ac_cv_search_yp_match+:} false; then :
58008
 
  break
58009
 
fi
58010
 
done
58011
 
if ${ac_cv_search_yp_match+:} false; then :
58012
 
 
58013
 
else
58014
 
  ac_cv_search_yp_match=no
58015
 
fi
58016
 
rm conftest.$ac_ext
58017
 
LIBS=$ac_func_search_save_LIBS
58018
 
fi
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"
58024
 
 
58025
 
fi
58026
 
 
58027
 
 
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
58034
 
else
58035
 
  ac_func_search_save_LIBS=$LIBS
58036
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58037
 
/* end confdefs.h.  */
58038
 
 
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.  */
58042
 
#ifdef __cplusplus
58043
 
extern "C"
58044
 
#endif
58045
 
char getspnam ();
58046
 
int
58047
 
main ()
58048
 
{
58049
 
return getspnam ();
58050
 
  ;
58051
 
  return 0;
58052
 
}
58053
 
_ACEOF
58054
 
for ac_lib in '' shadow sec gen; do
58055
 
  if test -z "$ac_lib"; then
58056
 
    ac_res="none required"
58057
 
  else
58058
 
    ac_res=-l$ac_lib
58059
 
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58060
 
  fi
58061
 
  if ac_fn_c_try_link "$LINENO"; then :
58062
 
  ac_cv_search_getspnam=$ac_res
58063
 
fi
58064
 
rm -f core conftest.err conftest.$ac_objext \
58065
 
    conftest$ac_exeext
58066
 
  if ${ac_cv_search_getspnam+:} false; then :
58067
 
  break
58068
 
fi
58069
 
done
58070
 
if ${ac_cv_search_getspnam+:} false; then :
58071
 
 
58072
 
else
58073
 
  ac_cv_search_getspnam=no
58074
 
fi
58075
 
rm conftest.$ac_ext
58076
 
LIBS=$ac_func_search_save_LIBS
58077
 
fi
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"
58083
 
 
58084
 
fi
58085
 
 
58086
 
 
58087
 
  for ac_header in shadow.h
58088
 
do :
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
58093
 
_ACEOF
58094
 
 
58095
 
fi
58096
 
 
58097
 
done
58098
 
 
58099
 
 
58100
 
  # Requirements for su.c.
58101
 
  shadow_includes="\
58102
 
$ac_includes_default
58103
 
#if HAVE_SHADOW_H
58104
 
# include <shadow.h>
58105
 
#endif
58106
 
"
58107
 
  ac_fn_c_check_member "$LINENO" "struct spwd" "sp_pwdp" "ac_cv_member_struct_spwd_sp_pwdp" "$shadow_includes
58108
 
"
58109
 
if test "x$ac_cv_member_struct_spwd_sp_pwdp" = xyes; then :
58110
 
 
58111
 
cat >>confdefs.h <<_ACEOF
58112
 
#define HAVE_STRUCT_SPWD_SP_PWDP 1
58113
 
_ACEOF
58114
 
 
58115
 
 
58116
 
fi
58117
 
 
58118
 
  for ac_func in getspnam
58119
 
do :
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
58124
 
_ACEOF
58125
 
 
58126
 
fi
58127
 
done
58128
 
 
58129
 
 
58130
 
  # SCO-ODT-3.0 is reported to need -lufc for crypt.
58131
 
  # NetBSD needs -lcrypt for crypt.
58132
 
  LIB_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
58138
 
else
58139
 
  ac_func_search_save_LIBS=$LIBS
58140
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58141
 
/* end confdefs.h.  */
58142
 
 
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.  */
58146
 
#ifdef __cplusplus
58147
 
extern "C"
58148
 
#endif
58149
 
char crypt ();
58150
 
int
58151
 
main ()
58152
 
{
58153
 
return crypt ();
58154
 
  ;
58155
 
  return 0;
58156
 
}
58157
 
_ACEOF
58158
 
for ac_lib in '' ufc crypt; do
58159
 
  if test -z "$ac_lib"; then
58160
 
    ac_res="none required"
58161
 
  else
58162
 
    ac_res=-l$ac_lib
58163
 
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
58164
 
  fi
58165
 
  if ac_fn_c_try_link "$LINENO"; then :
58166
 
  ac_cv_search_crypt=$ac_res
58167
 
fi
58168
 
rm -f core conftest.err conftest.$ac_objext \
58169
 
    conftest$ac_exeext
58170
 
  if ${ac_cv_search_crypt+:} false; then :
58171
 
  break
58172
 
fi
58173
 
done
58174
 
if ${ac_cv_search_crypt+:} false; then :
58175
 
 
58176
 
else
58177
 
  ac_cv_search_crypt=no
58178
 
fi
58179
 
rm conftest.$ac_ext
58180
 
LIBS=$ac_func_search_save_LIBS
58181
 
fi
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"
58189
 
fi
58190
 
 
58191
 
  LIBS="$cu_saved_libs"
58192
 
 
58193
 
 
58194
 
 
58195
62744
  LIB_GMP=
58196
62745
 
58197
62746
 
58265
62814
 
58266
62815
$as_echo "#define HAVE_GMP 1" >>confdefs.h
58267
62816
 
 
62817
        # This only available in GMP >= 5
 
62818
        ac_fn_c_check_decl "$LINENO" "mpz_inits" "ac_cv_have_decl_mpz_inits" "#include <gmp.h>
 
62819
"
 
62820
if test "x$ac_cv_have_decl_mpz_inits" = xyes; then :
 
62821
  ac_have_decl=1
 
62822
else
 
62823
  ac_have_decl=0
 
62824
fi
 
62825
 
 
62826
cat >>confdefs.h <<_ACEOF
 
62827
#define HAVE_DECL_MPZ_INITS $ac_have_decl
 
62828
_ACEOF
 
62829
 
58268
62830
       }
58269
62831
else
58270
62832
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libgmp development library was not found or not usable." >&5
58319
62881
fi
58320
62882
 
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.
58326
 
v=EXTRA_PROGRAMS
58327
 
for gl_i in `sed -n '/^'$v' =/,/[^\]$/p' $mk \
58328
 
    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
58329
 
    | tr -s '\\015\\012\\\\' '   '`; do
58330
 
  {
58331
 
  if test -z "$optional_bin_progs"; then
58332
 
    optional_bin_progs=$gl_i
58333
 
  else
58334
 
    optional_bin_progs="$optional_bin_progs $gl_i"
58335
 
  fi
58336
 
}
58337
 
done
58338
 
 
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/ $//'`
58347
 
 
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
58358
 
}' $c`
58359
 
case $t in
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 ;;
58364
 
esac
58365
 
 
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.
58375
 
{
58376
 
  gl_no_install_progs_default=`echo 'arch,hostname,su'|sed 's/,/ /g'`
 
62884
 
 
62885
{
 
62886
  if test -z "$optional_bin_progs"; then
 
62887
    optional_bin_progs=[
 
62888
  else
 
62889
    optional_bin_progs="$optional_bin_progs ["
 
62890
  fi
 
62891
}
 
62892
{
 
62893
  if test -z "$optional_bin_progs"; then
 
62894
    optional_bin_progs=base64
 
62895
  else
 
62896
    optional_bin_progs="$optional_bin_progs base64"
 
62897
  fi
 
62898
}
 
62899
{
 
62900
  if test -z "$optional_bin_progs"; then
 
62901
    optional_bin_progs=basename
 
62902
  else
 
62903
    optional_bin_progs="$optional_bin_progs basename"
 
62904
  fi
 
62905
}
 
62906
{
 
62907
  if test -z "$optional_bin_progs"; then
 
62908
    optional_bin_progs=cat
 
62909
  else
 
62910
    optional_bin_progs="$optional_bin_progs cat"
 
62911
  fi
 
62912
}
 
62913
{
 
62914
  if test -z "$optional_bin_progs"; then
 
62915
    optional_bin_progs=chcon
 
62916
  else
 
62917
    optional_bin_progs="$optional_bin_progs chcon"
 
62918
  fi
 
62919
}
 
62920
{
 
62921
  if test -z "$optional_bin_progs"; then
 
62922
    optional_bin_progs=chgrp
 
62923
  else
 
62924
    optional_bin_progs="$optional_bin_progs chgrp"
 
62925
  fi
 
62926
}
 
62927
{
 
62928
  if test -z "$optional_bin_progs"; then
 
62929
    optional_bin_progs=chmod
 
62930
  else
 
62931
    optional_bin_progs="$optional_bin_progs chmod"
 
62932
  fi
 
62933
}
 
62934
{
 
62935
  if test -z "$optional_bin_progs"; then
 
62936
    optional_bin_progs=chown
 
62937
  else
 
62938
    optional_bin_progs="$optional_bin_progs chown"
 
62939
  fi
 
62940
}
 
62941
{
 
62942
  if test -z "$optional_bin_progs"; then
 
62943
    optional_bin_progs=cksum
 
62944
  else
 
62945
    optional_bin_progs="$optional_bin_progs cksum"
 
62946
  fi
 
62947
}
 
62948
{
 
62949
  if test -z "$optional_bin_progs"; then
 
62950
    optional_bin_progs=comm
 
62951
  else
 
62952
    optional_bin_progs="$optional_bin_progs comm"
 
62953
  fi
 
62954
}
 
62955
{
 
62956
  if test -z "$optional_bin_progs"; then
 
62957
    optional_bin_progs=cp
 
62958
  else
 
62959
    optional_bin_progs="$optional_bin_progs cp"
 
62960
  fi
 
62961
}
 
62962
{
 
62963
  if test -z "$optional_bin_progs"; then
 
62964
    optional_bin_progs=csplit
 
62965
  else
 
62966
    optional_bin_progs="$optional_bin_progs csplit"
 
62967
  fi
 
62968
}
 
62969
{
 
62970
  if test -z "$optional_bin_progs"; then
 
62971
    optional_bin_progs=cut
 
62972
  else
 
62973
    optional_bin_progs="$optional_bin_progs cut"
 
62974
  fi
 
62975
}
 
62976
{
 
62977
  if test -z "$optional_bin_progs"; then
 
62978
    optional_bin_progs=date
 
62979
  else
 
62980
    optional_bin_progs="$optional_bin_progs date"
 
62981
  fi
 
62982
}
 
62983
{
 
62984
  if test -z "$optional_bin_progs"; then
 
62985
    optional_bin_progs=dd
 
62986
  else
 
62987
    optional_bin_progs="$optional_bin_progs dd"
 
62988
  fi
 
62989
}
 
62990
{
 
62991
  if test -z "$optional_bin_progs"; then
 
62992
    optional_bin_progs=dir
 
62993
  else
 
62994
    optional_bin_progs="$optional_bin_progs dir"
 
62995
  fi
 
62996
}
 
62997
{
 
62998
  if test -z "$optional_bin_progs"; then
 
62999
    optional_bin_progs=dircolors
 
63000
  else
 
63001
    optional_bin_progs="$optional_bin_progs dircolors"
 
63002
  fi
 
63003
}
 
63004
{
 
63005
  if test -z "$optional_bin_progs"; then
 
63006
    optional_bin_progs=dirname
 
63007
  else
 
63008
    optional_bin_progs="$optional_bin_progs dirname"
 
63009
  fi
 
63010
}
 
63011
{
 
63012
  if test -z "$optional_bin_progs"; then
 
63013
    optional_bin_progs=du
 
63014
  else
 
63015
    optional_bin_progs="$optional_bin_progs du"
 
63016
  fi
 
63017
}
 
63018
{
 
63019
  if test -z "$optional_bin_progs"; then
 
63020
    optional_bin_progs=echo
 
63021
  else
 
63022
    optional_bin_progs="$optional_bin_progs echo"
 
63023
  fi
 
63024
}
 
63025
{
 
63026
  if test -z "$optional_bin_progs"; then
 
63027
    optional_bin_progs=env
 
63028
  else
 
63029
    optional_bin_progs="$optional_bin_progs env"
 
63030
  fi
 
63031
}
 
63032
{
 
63033
  if test -z "$optional_bin_progs"; then
 
63034
    optional_bin_progs=expand
 
63035
  else
 
63036
    optional_bin_progs="$optional_bin_progs expand"
 
63037
  fi
 
63038
}
 
63039
{
 
63040
  if test -z "$optional_bin_progs"; then
 
63041
    optional_bin_progs=expr
 
63042
  else
 
63043
    optional_bin_progs="$optional_bin_progs expr"
 
63044
  fi
 
63045
}
 
63046
{
 
63047
  if test -z "$optional_bin_progs"; then
 
63048
    optional_bin_progs=factor
 
63049
  else
 
63050
    optional_bin_progs="$optional_bin_progs factor"
 
63051
  fi
 
63052
}
 
63053
{
 
63054
  if test -z "$optional_bin_progs"; then
 
63055
    optional_bin_progs=false
 
63056
  else
 
63057
    optional_bin_progs="$optional_bin_progs false"
 
63058
  fi
 
63059
}
 
63060
{
 
63061
  if test -z "$optional_bin_progs"; then
 
63062
    optional_bin_progs=fmt
 
63063
  else
 
63064
    optional_bin_progs="$optional_bin_progs fmt"
 
63065
  fi
 
63066
}
 
63067
{
 
63068
  if test -z "$optional_bin_progs"; then
 
63069
    optional_bin_progs=fold
 
63070
  else
 
63071
    optional_bin_progs="$optional_bin_progs fold"
 
63072
  fi
 
63073
}
 
63074
{
 
63075
  if test -z "$optional_bin_progs"; then
 
63076
    optional_bin_progs=ginstall
 
63077
  else
 
63078
    optional_bin_progs="$optional_bin_progs ginstall"
 
63079
  fi
 
63080
}
 
63081
{
 
63082
  if test -z "$optional_bin_progs"; then
 
63083
    optional_bin_progs=groups
 
63084
  else
 
63085
    optional_bin_progs="$optional_bin_progs groups"
 
63086
  fi
 
63087
}
 
63088
{
 
63089
  if test -z "$optional_bin_progs"; then
 
63090
    optional_bin_progs=head
 
63091
  else
 
63092
    optional_bin_progs="$optional_bin_progs head"
 
63093
  fi
 
63094
}
 
63095
{
 
63096
  if test -z "$optional_bin_progs"; then
 
63097
    optional_bin_progs=id
 
63098
  else
 
63099
    optional_bin_progs="$optional_bin_progs id"
 
63100
  fi
 
63101
}
 
63102
{
 
63103
  if test -z "$optional_bin_progs"; then
 
63104
    optional_bin_progs=join
 
63105
  else
 
63106
    optional_bin_progs="$optional_bin_progs join"
 
63107
  fi
 
63108
}
 
63109
{
 
63110
  if test -z "$optional_bin_progs"; then
 
63111
    optional_bin_progs=kill
 
63112
  else
 
63113
    optional_bin_progs="$optional_bin_progs kill"
 
63114
  fi
 
63115
}
 
63116
{
 
63117
  if test -z "$optional_bin_progs"; then
 
63118
    optional_bin_progs=link
 
63119
  else
 
63120
    optional_bin_progs="$optional_bin_progs link"
 
63121
  fi
 
63122
}
 
63123
{
 
63124
  if test -z "$optional_bin_progs"; then
 
63125
    optional_bin_progs=ln
 
63126
  else
 
63127
    optional_bin_progs="$optional_bin_progs ln"
 
63128
  fi
 
63129
}
 
63130
{
 
63131
  if test -z "$optional_bin_progs"; then
 
63132
    optional_bin_progs=logname
 
63133
  else
 
63134
    optional_bin_progs="$optional_bin_progs logname"
 
63135
  fi
 
63136
}
 
63137
{
 
63138
  if test -z "$optional_bin_progs"; then
 
63139
    optional_bin_progs=ls
 
63140
  else
 
63141
    optional_bin_progs="$optional_bin_progs ls"
 
63142
  fi
 
63143
}
 
63144
{
 
63145
  if test -z "$optional_bin_progs"; then
 
63146
    optional_bin_progs=md5sum
 
63147
  else
 
63148
    optional_bin_progs="$optional_bin_progs md5sum"
 
63149
  fi
 
63150
}
 
63151
{
 
63152
  if test -z "$optional_bin_progs"; then
 
63153
    optional_bin_progs=mkdir
 
63154
  else
 
63155
    optional_bin_progs="$optional_bin_progs mkdir"
 
63156
  fi
 
63157
}
 
63158
{
 
63159
  if test -z "$optional_bin_progs"; then
 
63160
    optional_bin_progs=mkfifo
 
63161
  else
 
63162
    optional_bin_progs="$optional_bin_progs mkfifo"
 
63163
  fi
 
63164
}
 
63165
{
 
63166
  if test -z "$optional_bin_progs"; then
 
63167
    optional_bin_progs=mknod
 
63168
  else
 
63169
    optional_bin_progs="$optional_bin_progs mknod"
 
63170
  fi
 
63171
}
 
63172
{
 
63173
  if test -z "$optional_bin_progs"; then
 
63174
    optional_bin_progs=mktemp
 
63175
  else
 
63176
    optional_bin_progs="$optional_bin_progs mktemp"
 
63177
  fi
 
63178
}
 
63179
{
 
63180
  if test -z "$optional_bin_progs"; then
 
63181
    optional_bin_progs=mv
 
63182
  else
 
63183
    optional_bin_progs="$optional_bin_progs mv"
 
63184
  fi
 
63185
}
 
63186
{
 
63187
  if test -z "$optional_bin_progs"; then
 
63188
    optional_bin_progs=nl
 
63189
  else
 
63190
    optional_bin_progs="$optional_bin_progs nl"
 
63191
  fi
 
63192
}
 
63193
{
 
63194
  if test -z "$optional_bin_progs"; then
 
63195
    optional_bin_progs=nproc
 
63196
  else
 
63197
    optional_bin_progs="$optional_bin_progs nproc"
 
63198
  fi
 
63199
}
 
63200
{
 
63201
  if test -z "$optional_bin_progs"; then
 
63202
    optional_bin_progs=nohup
 
63203
  else
 
63204
    optional_bin_progs="$optional_bin_progs nohup"
 
63205
  fi
 
63206
}
 
63207
{
 
63208
  if test -z "$optional_bin_progs"; then
 
63209
    optional_bin_progs=od
 
63210
  else
 
63211
    optional_bin_progs="$optional_bin_progs od"
 
63212
  fi
 
63213
}
 
63214
{
 
63215
  if test -z "$optional_bin_progs"; then
 
63216
    optional_bin_progs=paste
 
63217
  else
 
63218
    optional_bin_progs="$optional_bin_progs paste"
 
63219
  fi
 
63220
}
 
63221
{
 
63222
  if test -z "$optional_bin_progs"; then
 
63223
    optional_bin_progs=pathchk
 
63224
  else
 
63225
    optional_bin_progs="$optional_bin_progs pathchk"
 
63226
  fi
 
63227
}
 
63228
{
 
63229
  if test -z "$optional_bin_progs"; then
 
63230
    optional_bin_progs=pr
 
63231
  else
 
63232
    optional_bin_progs="$optional_bin_progs pr"
 
63233
  fi
 
63234
}
 
63235
{
 
63236
  if test -z "$optional_bin_progs"; then
 
63237
    optional_bin_progs=printenv
 
63238
  else
 
63239
    optional_bin_progs="$optional_bin_progs printenv"
 
63240
  fi
 
63241
}
 
63242
{
 
63243
  if test -z "$optional_bin_progs"; then
 
63244
    optional_bin_progs=printf
 
63245
  else
 
63246
    optional_bin_progs="$optional_bin_progs printf"
 
63247
  fi
 
63248
}
 
63249
{
 
63250
  if test -z "$optional_bin_progs"; then
 
63251
    optional_bin_progs=ptx
 
63252
  else
 
63253
    optional_bin_progs="$optional_bin_progs ptx"
 
63254
  fi
 
63255
}
 
63256
{
 
63257
  if test -z "$optional_bin_progs"; then
 
63258
    optional_bin_progs=pwd
 
63259
  else
 
63260
    optional_bin_progs="$optional_bin_progs pwd"
 
63261
  fi
 
63262
}
 
63263
{
 
63264
  if test -z "$optional_bin_progs"; then
 
63265
    optional_bin_progs=readlink
 
63266
  else
 
63267
    optional_bin_progs="$optional_bin_progs readlink"
 
63268
  fi
 
63269
}
 
63270
{
 
63271
  if test -z "$optional_bin_progs"; then
 
63272
    optional_bin_progs=realpath
 
63273
  else
 
63274
    optional_bin_progs="$optional_bin_progs realpath"
 
63275
  fi
 
63276
}
 
63277
{
 
63278
  if test -z "$optional_bin_progs"; then
 
63279
    optional_bin_progs=rm
 
63280
  else
 
63281
    optional_bin_progs="$optional_bin_progs rm"
 
63282
  fi
 
63283
}
 
63284
{
 
63285
  if test -z "$optional_bin_progs"; then
 
63286
    optional_bin_progs=rmdir
 
63287
  else
 
63288
    optional_bin_progs="$optional_bin_progs rmdir"
 
63289
  fi
 
63290
}
 
63291
{
 
63292
  if test -z "$optional_bin_progs"; then
 
63293
    optional_bin_progs=runcon
 
63294
  else
 
63295
    optional_bin_progs="$optional_bin_progs runcon"
 
63296
  fi
 
63297
}
 
63298
{
 
63299
  if test -z "$optional_bin_progs"; then
 
63300
    optional_bin_progs=seq
 
63301
  else
 
63302
    optional_bin_progs="$optional_bin_progs seq"
 
63303
  fi
 
63304
}
 
63305
{
 
63306
  if test -z "$optional_bin_progs"; then
 
63307
    optional_bin_progs=sha1sum
 
63308
  else
 
63309
    optional_bin_progs="$optional_bin_progs sha1sum"
 
63310
  fi
 
63311
}
 
63312
{
 
63313
  if test -z "$optional_bin_progs"; then
 
63314
    optional_bin_progs=sha224sum
 
63315
  else
 
63316
    optional_bin_progs="$optional_bin_progs sha224sum"
 
63317
  fi
 
63318
}
 
63319
{
 
63320
  if test -z "$optional_bin_progs"; then
 
63321
    optional_bin_progs=sha256sum
 
63322
  else
 
63323
    optional_bin_progs="$optional_bin_progs sha256sum"
 
63324
  fi
 
63325
}
 
63326
{
 
63327
  if test -z "$optional_bin_progs"; then
 
63328
    optional_bin_progs=sha384sum
 
63329
  else
 
63330
    optional_bin_progs="$optional_bin_progs sha384sum"
 
63331
  fi
 
63332
}
 
63333
{
 
63334
  if test -z "$optional_bin_progs"; then
 
63335
    optional_bin_progs=sha512sum
 
63336
  else
 
63337
    optional_bin_progs="$optional_bin_progs sha512sum"
 
63338
  fi
 
63339
}
 
63340
{
 
63341
  if test -z "$optional_bin_progs"; then
 
63342
    optional_bin_progs=shred
 
63343
  else
 
63344
    optional_bin_progs="$optional_bin_progs shred"
 
63345
  fi
 
63346
}
 
63347
{
 
63348
  if test -z "$optional_bin_progs"; then
 
63349
    optional_bin_progs=shuf
 
63350
  else
 
63351
    optional_bin_progs="$optional_bin_progs shuf"
 
63352
  fi
 
63353
}
 
63354
{
 
63355
  if test -z "$optional_bin_progs"; then
 
63356
    optional_bin_progs=sleep
 
63357
  else
 
63358
    optional_bin_progs="$optional_bin_progs sleep"
 
63359
  fi
 
63360
}
 
63361
{
 
63362
  if test -z "$optional_bin_progs"; then
 
63363
    optional_bin_progs=sort
 
63364
  else
 
63365
    optional_bin_progs="$optional_bin_progs sort"
 
63366
  fi
 
63367
}
 
63368
{
 
63369
  if test -z "$optional_bin_progs"; then
 
63370
    optional_bin_progs=split
 
63371
  else
 
63372
    optional_bin_progs="$optional_bin_progs split"
 
63373
  fi
 
63374
}
 
63375
{
 
63376
  if test -z "$optional_bin_progs"; then
 
63377
    optional_bin_progs=stat
 
63378
  else
 
63379
    optional_bin_progs="$optional_bin_progs stat"
 
63380
  fi
 
63381
}
 
63382
{
 
63383
  if test -z "$optional_bin_progs"; then
 
63384
    optional_bin_progs=sum
 
63385
  else
 
63386
    optional_bin_progs="$optional_bin_progs sum"
 
63387
  fi
 
63388
}
 
63389
{
 
63390
  if test -z "$optional_bin_progs"; then
 
63391
    optional_bin_progs=sync
 
63392
  else
 
63393
    optional_bin_progs="$optional_bin_progs sync"
 
63394
  fi
 
63395
}
 
63396
{
 
63397
  if test -z "$optional_bin_progs"; then
 
63398
    optional_bin_progs=tac
 
63399
  else
 
63400
    optional_bin_progs="$optional_bin_progs tac"
 
63401
  fi
 
63402
}
 
63403
{
 
63404
  if test -z "$optional_bin_progs"; then
 
63405
    optional_bin_progs=tail
 
63406
  else
 
63407
    optional_bin_progs="$optional_bin_progs tail"
 
63408
  fi
 
63409
}
 
63410
{
 
63411
  if test -z "$optional_bin_progs"; then
 
63412
    optional_bin_progs=tee
 
63413
  else
 
63414
    optional_bin_progs="$optional_bin_progs tee"
 
63415
  fi
 
63416
}
 
63417
{
 
63418
  if test -z "$optional_bin_progs"; then
 
63419
    optional_bin_progs=test
 
63420
  else
 
63421
    optional_bin_progs="$optional_bin_progs test"
 
63422
  fi
 
63423
}
 
63424
{
 
63425
  if test -z "$optional_bin_progs"; then
 
63426
    optional_bin_progs=timeout
 
63427
  else
 
63428
    optional_bin_progs="$optional_bin_progs timeout"
 
63429
  fi
 
63430
}
 
63431
{
 
63432
  if test -z "$optional_bin_progs"; then
 
63433
    optional_bin_progs=touch
 
63434
  else
 
63435
    optional_bin_progs="$optional_bin_progs touch"
 
63436
  fi
 
63437
}
 
63438
{
 
63439
  if test -z "$optional_bin_progs"; then
 
63440
    optional_bin_progs=tr
 
63441
  else
 
63442
    optional_bin_progs="$optional_bin_progs tr"
 
63443
  fi
 
63444
}
 
63445
{
 
63446
  if test -z "$optional_bin_progs"; then
 
63447
    optional_bin_progs=true
 
63448
  else
 
63449
    optional_bin_progs="$optional_bin_progs true"
 
63450
  fi
 
63451
}
 
63452
{
 
63453
  if test -z "$optional_bin_progs"; then
 
63454
    optional_bin_progs=truncate
 
63455
  else
 
63456
    optional_bin_progs="$optional_bin_progs truncate"
 
63457
  fi
 
63458
}
 
63459
{
 
63460
  if test -z "$optional_bin_progs"; then
 
63461
    optional_bin_progs=tsort
 
63462
  else
 
63463
    optional_bin_progs="$optional_bin_progs tsort"
 
63464
  fi
 
63465
}
 
63466
{
 
63467
  if test -z "$optional_bin_progs"; then
 
63468
    optional_bin_progs=tty
 
63469
  else
 
63470
    optional_bin_progs="$optional_bin_progs tty"
 
63471
  fi
 
63472
}
 
63473
{
 
63474
  if test -z "$optional_bin_progs"; then
 
63475
    optional_bin_progs=uname
 
63476
  else
 
63477
    optional_bin_progs="$optional_bin_progs uname"
 
63478
  fi
 
63479
}
 
63480
{
 
63481
  if test -z "$optional_bin_progs"; then
 
63482
    optional_bin_progs=unexpand
 
63483
  else
 
63484
    optional_bin_progs="$optional_bin_progs unexpand"
 
63485
  fi
 
63486
}
 
63487
{
 
63488
  if test -z "$optional_bin_progs"; then
 
63489
    optional_bin_progs=uniq
 
63490
  else
 
63491
    optional_bin_progs="$optional_bin_progs uniq"
 
63492
  fi
 
63493
}
 
63494
{
 
63495
  if test -z "$optional_bin_progs"; then
 
63496
    optional_bin_progs=unlink
 
63497
  else
 
63498
    optional_bin_progs="$optional_bin_progs unlink"
 
63499
  fi
 
63500
}
 
63501
{
 
63502
  if test -z "$optional_bin_progs"; then
 
63503
    optional_bin_progs=vdir
 
63504
  else
 
63505
    optional_bin_progs="$optional_bin_progs vdir"
 
63506
  fi
 
63507
}
 
63508
{
 
63509
  if test -z "$optional_bin_progs"; then
 
63510
    optional_bin_progs=wc
 
63511
  else
 
63512
    optional_bin_progs="$optional_bin_progs wc"
 
63513
  fi
 
63514
}
 
63515
{
 
63516
  if test -z "$optional_bin_progs"; then
 
63517
    optional_bin_progs=whoami
 
63518
  else
 
63519
    optional_bin_progs="$optional_bin_progs whoami"
 
63520
  fi
 
63521
}
 
63522
{
 
63523
  if test -z "$optional_bin_progs"; then
 
63524
    optional_bin_progs=yes
 
63525
  else
 
63526
    optional_bin_progs="$optional_bin_progs yes"
 
63527
  fi
 
63528
}
 
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.
 
63540
{
 
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
58447
63612
  done
58448
63613
}
58449
63614
 
58450
 
# Now that we know which programs will actually be built up, figure out
 
63615
 
 
63616
# Now that we know which programs will actually be built, determine
58451
63617
# which optional helper progs should be compiled.
58452
 
optional_pkglib_progs=
58453
 
case " $optional_bin_progs " in
58454
 
  *' stdbuf '*) {
58455
 
  if test -z "$optional_pkglib_progs"; then
58456
 
    optional_pkglib_progs=libstdbuf.so
58457
 
  else
58458
 
    optional_pkglib_progs="$optional_pkglib_progs libstdbuf.so"
58459
 
  fi
58460
 
} ;;
58461
 
esac
58462
 
 
58463
 
# Set INSTALL_SU if su installation has been requested via
58464
 
# --enable-install-program=su.
58465
 
 
58466
 
case " $optional_bin_progs " in
58467
 
  *' su '*) INSTALL_SU=yes ;;
58468
 
  *)        INSTALL_SU=no ;;
58469
 
esac
58470
 
 
58471
 
MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
58472
 
 
58473
 
# Change "ginstall.1" to "install.1" in $MAN.
58474
 
MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
58475
 
  | tr '\015\012' '  '; echo`
58476
 
 
58477
 
# Remove [.1, since writing a portable rule for it in man/Makefile.am
58478
 
# is not practical.  The sed LHS below uses the autoconf quadrigraph
58479
 
# representing '['.
58480
 
MAN=`echo "$MAN"|sed 's/\[\.1//'`
58481
 
 
58482
 
OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
58483
 
 
58484
 
OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
58485
 
 
58486
 
NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
 
63618
case " $optional_bin_progs " in
 
63619
  *' stdbuf '*) pkglibexec_PROGRAMS='src/libstdbuf.so';;
 
63620
  *) pkglibexec_PROGRAMS='';;
 
63621
esac
 
63622
 
 
63623
man1_MANS=`
 
63624
  for p in $optional_bin_progs; do
 
63625
    # Change "ginstall.1" to "install.1".
 
63626
    test $p = ginstall && p=install
 
63627
    # Ignore the "[" program, since writing a portable make rule to
 
63628
    # generate its manpage is not practical.
 
63629
            test x$p = x'[' && continue
 
63630
    echo "man/$p.1"
 
63631
  done`
 
63632
 
 
63633
# Not installed by "make install", but must be built when creating
 
63634
# a distribution tarball.
 
63635
EXTRA_MANS=`for p in $no_install_progs_default; do echo man/$p.1; done`
 
63636
 
 
63637
# The programs built and installed by "make && make install".
 
63638
# Since this is AC_SUBST'd, Automake won't be able to perform rewrite
 
63639
# with $(EXEEXT) appending on it, so we have to do it ourselves -- in
 
63640
# this case, only for $(bin_PROGRAMS).
 
63641
bin_PROGRAMS=`
 
63642
  for p in $optional_bin_progs; do echo src/"$p"'$(EXEEXT)'; done`
 
63643
 
 
63644
# Normalize whitespace.
 
63645
man1_MANS=`echo $man1_MANS`
 
63646
EXTRA_MANS=`echo $EXTRA_MANS`
 
63647
bin_PROGRAMS=`echo $bin_PROGRAMS`
 
63648
pkglibexec_PROGS=`echo $pkglibexec_PROGRAMS`
 
63649
 
 
63650
 
 
63651
 
 
63652
 
 
63653
 
 
63654
 
 
63655
built_programs=$optional_bin_progs
58487
63656
 
58488
63657
 
58489
63658
 if test "$cross_compiling" = yes; then
58495
63664
fi
58496
63665
 
58497
63666
 
58498
 
# Arrange to rerun configure whenever the file, src/Makefile.am,
58499
 
# containing the list of program names changes.
58500
 
CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/src/Makefile.am'
58501
 
 
58502
63667
############################################################################
58503
63668
 
58504
63669
# As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
58527
63692
# Prepare PATH_SEPARATOR.
58528
63693
# The user is always right.
58529
63694
if test "${PATH_SEPARATOR+set}" != set; then
58530
 
  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
58531
 
  # contains only /bin. Note that ksh looks also at the FPATH variable,
58532
 
  # so we have to set that as well for the test.
58533
 
  PATH_SEPARATOR=:
58534
 
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
58535
 
    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
58536
 
           || PATH_SEPARATOR=';'
58537
 
       }
 
63695
  echo "#! /bin/sh" >conf$$.sh
 
63696
  echo  "exit 0"   >>conf$$.sh
 
63697
  chmod +x conf$$.sh
 
63698
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
63699
    PATH_SEPARATOR=';'
 
63700
  else
 
63701
    PATH_SEPARATOR=:
 
63702
  fi
 
63703
  rm -f conf$$.sh
58538
63704
fi
58539
63705
 
58540
63706
# Find out how to test for executable files. Don't use a zero-byte file,
58649
63815
# Prepare PATH_SEPARATOR.
58650
63816
# The user is always right.
58651
63817
if test "${PATH_SEPARATOR+set}" != set; then
58652
 
  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
58653
 
  # contains only /bin. Note that ksh looks also at the FPATH variable,
58654
 
  # so we have to set that as well for the test.
58655
 
  PATH_SEPARATOR=:
58656
 
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
58657
 
    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
58658
 
           || PATH_SEPARATOR=';'
58659
 
       }
 
63818
  echo "#! /bin/sh" >conf$$.sh
 
63819
  echo  "exit 0"   >>conf$$.sh
 
63820
  chmod +x conf$$.sh
 
63821
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
63822
    PATH_SEPARATOR=';'
 
63823
  else
 
63824
    PATH_SEPARATOR=:
 
63825
  fi
 
63826
  rm -f conf$$.sh
58660
63827
fi
58661
63828
 
58662
63829
# Find out how to test for executable files. Don't use a zero-byte file,
58726
63893
# Prepare PATH_SEPARATOR.
58727
63894
# The user is always right.
58728
63895
if test "${PATH_SEPARATOR+set}" != set; then
58729
 
  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
58730
 
  # contains only /bin. Note that ksh looks also at the FPATH variable,
58731
 
  # so we have to set that as well for the test.
58732
 
  PATH_SEPARATOR=:
58733
 
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
58734
 
    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
58735
 
           || PATH_SEPARATOR=';'
58736
 
       }
 
63896
  echo "#! /bin/sh" >conf$$.sh
 
63897
  echo  "exit 0"   >>conf$$.sh
 
63898
  chmod +x conf$$.sh
 
63899
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
63900
    PATH_SEPARATOR=';'
 
63901
  else
 
63902
    PATH_SEPARATOR=:
 
63903
  fi
 
63904
  rm -f conf$$.sh
58737
63905
fi
58738
63906
 
58739
63907
# Find out how to test for executable files. Don't use a zero-byte file,
58941
64109
else
58942
64110
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58943
64111
/* end confdefs.h.  */
58944
 
 
58945
64112
#include <libintl.h>
58946
64113
$gt_revision_test_code
58947
64114
extern int _nl_msg_cat_cntr;
58948
64115
extern int *_nl_domain_bindings;
58949
 
 
58950
64116
int
58951
64117
main ()
58952
64118
{
58953
 
 
58954
64119
bindtextdomain ("", "");
58955
64120
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
58956
 
 
58957
64121
  ;
58958
64122
  return 0;
58959
64123
}
59694
64858
            LIBS="$LIBS $LIBINTL"
59695
64859
                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59696
64860
/* end confdefs.h.  */
59697
 
 
59698
64861
#include <libintl.h>
59699
64862
$gt_revision_test_code
59700
64863
extern int _nl_msg_cat_cntr;
59703
64866
"C"
59704
64867
#endif
59705
64868
const char *_nl_expand_alias (const char *);
59706
 
 
59707
64869
int
59708
64870
main ()
59709
64871
{
59710
 
 
59711
64872
bindtextdomain ("", "");
59712
64873
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
59713
 
 
59714
64874
  ;
59715
64875
  return 0;
59716
64876
}
59726
64886
              LIBS="$LIBS $LIBICONV"
59727
64887
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59728
64888
/* end confdefs.h.  */
59729
 
 
59730
64889
#include <libintl.h>
59731
64890
$gt_revision_test_code
59732
64891
extern int _nl_msg_cat_cntr;
59735
64894
"C"
59736
64895
#endif
59737
64896
const char *_nl_expand_alias (const char *);
59738
 
 
59739
64897
int
59740
64898
main ()
59741
64899
{
59742
 
 
59743
64900
bindtextdomain ("", "");
59744
64901
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
59745
 
 
59746
64902
  ;
59747
64903
  return 0;
59748
64904
}
59749
64905
_ACEOF
59750
64906
if ac_fn_c_try_link "$LINENO"; then :
59751
64907
  LIBINTL="$LIBINTL $LIBICONV"
59752
 
                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
59753
 
                 eval "$gt_func_gnugettext_libintl=yes"
 
64908
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
 
64909
                eval "$gt_func_gnugettext_libintl=yes"
59754
64910
 
59755
64911
fi
59756
64912
rm -f core conftest.err conftest.$ac_objext \
59895
65051
int main () {
59896
65052
  /* Check whether the given locale name is recognized by the system.  */
59897
65053
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
59898
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
65054
  /* On native Windows, setlocale(category, "") looks at the system settings,
59899
65055
     not at the environment variables.  Also, when an encoding suffix such
59900
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
65056
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59901
65057
     category of the locale to "C".  */
59902
65058
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59903
65059
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59906
65062
  if (setlocale (LC_ALL, "") == NULL) return 1;
59907
65063
#endif
59908
65064
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59909
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
65065
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59910
65066
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59911
65067
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59912
65068
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59932
65088
     one byte long. This excludes the UTF-8 encoding.  */
59933
65089
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59934
65090
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
65091
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
59935
65092
  /* Check whether the decimal separator is a comma.
59936
65093
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
59937
65094
     are nl_langinfo(RADIXCHAR) are both ".".  */
59938
65095
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
65096
#endif
59939
65097
  return 0;
59940
65098
}
59941
65099
 
59953
65111
        # "ja" as "Japanese" or "Japanese_Japan.932",
59954
65112
        # and similar.
59955
65113
        mingw*)
59956
 
          # Test for the native Win32 locale name.
 
65114
          # Test for the native Windows locale name.
59957
65115
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59958
65116
            gt_cv_locale_fr=French_France.1252
59959
65117
          else
59963
65121
          ;;
59964
65122
        *)
59965
65123
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59966
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
65124
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59967
65125
          # configure script would override the LC_ALL setting. Likewise for
59968
65126
          # LC_CTYPE, which is also set at the beginning of the configure script.
59969
65127
          # Test for the usual locale name.
60005
65163
 
60006
65164
 
60007
65165
 
60008
 
ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile man/Makefile po/Makefile.in src/Makefile tests/Makefile gnulib-tests/Makefile"
 
65166
ac_config_files="$ac_config_files Makefile po/Makefile.in gnulib-tests/Makefile"
60009
65167
 
60010
65168
cat >confcache <<\_ACEOF
60011
65169
# This file is a shell script that caches the results of configure
60101
65259
 
60102
65260
ac_libobjs=
60103
65261
ac_ltlibobjs=
 
65262
U=
60104
65263
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60105
65264
  # 1. Remove the extension, and $U if already installed.
60106
65265
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60115
65274
LTLIBOBJS=$ac_ltlibobjs
60116
65275
 
60117
65276
 
60118
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
60119
 
$as_echo_n "checking that generated files are newer than configure... " >&6; }
60120
 
   if test -n "$am_sleep_pid"; then
60121
 
     # Hide warnings about reused PIDs.
60122
 
     wait $am_sleep_pid 2>/dev/null
60123
 
   fi
60124
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
60125
 
$as_echo "done" >&6; }
60126
65277
 if test -n "$EXEEXT"; then
60127
65278
  am__EXEEXT_TRUE=
60128
65279
  am__EXEEXT_FALSE='#'
60192
65343
  as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
60193
65344
Usually this means the macro was only invoked conditionally." "$LINENO" 5
60194
65345
fi
 
65346
 
 
65347
 
 
65348
 
 
65349
  # Tell AC_LIBSOURCES where to find source files like alloca.c.
 
65350
 
 
65351
 
 
65352
  # This hack originated in bison.  It is required when using non-recursive
 
65353
  # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
 
65354
  # is usually simply "lib".  Those rules use the list of names like "fchdir.o"
 
65355
  # and "strstr.o" in gl_LIBOBJS.  With non-recursive make, we must prefix each
 
65356
  # such file name with the "lib/" prefix.  See also build-aux/prefix-gnulib-mk.
 
65357
  gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , lib/,g'`
 
65358
 
 
65359
  # Listing the names of the variables to prefix is error-prone.
 
65360
  # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
 
65361
  # and whose value ends in '.h'.
 
65362
  for ac_var in $ac_subst_vars
 
65363
  do
 
65364
    eval "ac_val=\$$ac_var"
 
65365
    case $ac_var:$ac_val in
 
65366
      (*_H:*.h) eval "$ac_var=lib/\$$ac_var";;
 
65367
    esac
 
65368
  done
 
65369
 
 
65370
  # If $ALLOCA is not empty, prefix its value with "lib/".
 
65371
  test -n "$ALLOCA" && ALLOCA="lib/$ALLOCA"
 
65372
 
 
65373
 
60195
65374
if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
60196
65375
  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
60197
65376
Usually this means the macro was only invoked conditionally." "$LINENO" 5
60208
65387
  as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
60209
65388
Usually this means the macro was only invoked conditionally." "$LINENO" 5
60210
65389
fi
 
65390
if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
 
65391
  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
 
65392
Usually this means the macro was only invoked conditionally." "$LINENO" 5
 
65393
fi
60211
65394
if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
60212
65395
  as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
60213
65396
Usually this means the macro was only invoked conditionally." "$LINENO" 5
60251
65434
 
60252
65435
 
60253
65436
 
 
65437
if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
 
65438
  as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
 
65439
Usually this means the macro was only invoked conditionally." "$LINENO" 5
 
65440
fi
60254
65441
 
60255
65442
    gltests_libobjs=
60256
65443
    gltests_ltlibobjs=
60267
65454
    gltests_LTLIBOBJS=$gltests_ltlibobjs
60268
65455
 
60269
65456
 
 
65457
if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then
 
65458
  as_fn_error $? "conditional \"HAVE_PERL\" was never defined.
 
65459
Usually this means the macro was only invoked conditionally." "$LINENO" 5
 
65460
fi
60270
65461
if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
60271
65462
  as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
60272
65463
Usually this means the macro was only invoked conditionally." "$LINENO" 5
60680
65871
# report actual input values of CONFIG_FILES etc. instead of their
60681
65872
# values after options handling.
60682
65873
ac_log="
60683
 
This file was extended by GNU coreutils $as_me 8.13, which was
60684
 
generated by GNU Autoconf 2.68.79-5e017.  Invocation command line was
 
65874
This file was extended by GNU coreutils $as_me 8.20, which was
 
65875
generated by GNU Autoconf 2.68.  Invocation command line was
60685
65876
 
60686
65877
  CONFIG_FILES    = $CONFIG_FILES
60687
65878
  CONFIG_HEADERS  = $CONFIG_HEADERS
60752
65943
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60753
65944
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
60754
65945
ac_cs_version="\\
60755
 
GNU coreutils config.status 8.13
60756
 
configured by $0, generated by GNU Autoconf 2.68.79-5e017,
 
65946
GNU coreutils config.status 8.20
 
65947
configured by $0, generated by GNU Autoconf 2.68,
60757
65948
  with options \\"\$ac_cs_config\\"
60758
65949
 
60759
 
Copyright (C) 2011 Free Software Foundation, Inc.
 
65950
Copyright (C) 2010 Free Software Foundation, Inc.
60760
65951
This config.status script is free software; the Free Software Foundation
60761
65952
gives unlimited permission to copy, distribute and modify it."
60762
65953
 
60847
66038
_ACEOF
60848
66039
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60849
66040
if \$ac_cs_recheck; then
60850
 
  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 
66041
  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60851
66042
  shift
60852
66043
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
60853
66044
  CONFIG_SHELL='$SHELL'
60894
66085
    "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
60895
66086
    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
60896
66087
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
60897
 
    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
60898
 
    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
60899
 
    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
60900
66088
    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
60901
 
    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
60902
 
    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
60903
66089
    "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
60904
66090
 
60905
66091
  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61649
66835
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
61650
66836
          rm -f "$ac_dir/POTFILES"
61651
66837
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
61652
 
          gt_tab=`printf '\t'`
61653
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
66838
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
61654
66839
          POMAKEFILEDEPS="POTFILES.in"
61655
66840
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
61656
66841
          # on $ac_dir but don't depend on user-specified configuration