diff --git a/edgedbpkg/edgedb/__init__.py b/edgedbpkg/edgedb/__init__.py index f2bb663b..bb5ac04a 100644 --- a/edgedbpkg/edgedb/__init__.py +++ b/edgedbpkg/edgedb/__init__.py @@ -83,10 +83,10 @@ class EdgeDB(packages.BundledPythonPackage): ] bundle_deps = [ - postgresql.PostgreSQL(version="14.9"), - postgresql.PostgreSQL(version="15.4"), + postgresql.PostgreSQL(version="14.10"), + postgresql.PostgreSQL(version="15.5"), python_bundle.Python(version="3.10.11"), - python_bundle.Python(version="3.11.3"), + python_bundle.Python(version="3.11.8"), pyentrypoint.PyEntryPoint(version="1.0.0"), pgvector.PgVector("v0.4.2"), pgvector.PgVector("v0.6.0"), diff --git a/edgedbpkg/postgresql/__init__.py b/edgedbpkg/postgresql/__init__.py index 67327dea..3d07ea01 100644 --- a/edgedbpkg/postgresql/__init__.py +++ b/edgedbpkg/postgresql/__init__.py @@ -44,10 +44,10 @@ class PostgreSQL(packages.BundledCPackage): ] bundle_deps = [ - icu.ICU("73.2"), - libuuid.LibUUID("2.39.2"), - openssl.OpenSSL("3.0.11"), - zlib.Zlib("1.3"), + icu.ICU("74.1"), + libuuid.LibUUID("2.39.3"), + openssl.OpenSSL("3.1.5"), + zlib.Zlib("1.3.1"), ] @classmethod diff --git a/edgedbpkg/python/__init__.py b/edgedbpkg/python/__init__.py index 5dd3bfc3..a9464da7 100644 --- a/edgedbpkg/python/__init__.py +++ b/edgedbpkg/python/__init__.py @@ -45,11 +45,11 @@ class Python(packages.BundledCPackage): ] bundle_deps = [ - openssl.OpenSSL("3.0.11"), + openssl.OpenSSL("3.1.5"), libb2.LibB2("0.98.1"), libffi.LibFFI("3.4.4"), - libuuid.LibUUID("2.39.2"), - zlib.Zlib("1.3"), + libuuid.LibUUID("2.39.3"), + zlib.Zlib("1.3.1"), ] @classmethod diff --git a/edgedbpkg/python/patches/python-edgedb__pkg-config-311.patch b/edgedbpkg/python/patches/python-edgedb__pkg-config-311.patch index 9810c94c..bc1c5563 100644 --- a/edgedbpkg/python/patches/python-edgedb__pkg-config-311.patch +++ b/edgedbpkg/python/patches/python-edgedb__pkg-config-311.patch @@ -1,7 +1,7 @@ -From 0454ab12486e6141cb87c1ccd2c8aa7ed76f9c72 Mon Sep 17 00:00:00 2001 +From 5890d13d7c136c2cb46c3efbb5501ad60681f592 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 26 Jun 2022 13:04:43 +0200 -Subject: [PATCH 1/5] Build C extensions without setup.py +Subject: [PATCH 1/6] Build C extensions without setup.py gh-90005: Port _ctypes to PY_STDLIB_MOD (GH-32229) @@ -32,30 +32,30 @@ gh-93939: Build C extensions without setup.py (GH-94474) Combines GH-93940, GH-94452, and GH-94433 --- - Lib/_bootsubprocess.py | 97 - - Lib/test/test_descr.py | 9 + - Makefile.pre.in | 112 +- - ...2-06-27-11-57-15.gh-issue-93939.rv7s8W.rst | 2 + - ...2-06-28-09-42-10.gh-issue-93939._VWxKW.rst | 2 + - ...2-06-30-09-57-39.gh-issue-90005.9-pQyR.rst | 1 + - ...2-06-30-17-18-23.gh-issue-90005.EIOOla.rst | 5 + - ...2-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst | 1 + - ...2-07-04-10-02-02.gh-issue-93939.U6sW6H.rst | 3 + - Modules/Setup | 2 +- - Modules/Setup.stdlib.in | 17 +- - Modules/_ctypes/callproc.c | 3 + - Modules/_ctypes/malloc_closure.c | 3 + - Python/stdlib_module_names.h | 1 - - Tools/scripts/2to3 | 2 +- - Tools/scripts/check_extension_modules.py | 484 + - Tools/scripts/generate_stdlib_module_names.py | 58 +- - Tools/scripts/idle3 | 2 +- - Tools/ssl/multissltests.py | 4 +- - configure | 9183 ++++++++++------- - configure.ac | 614 +- - pyconfig.h.in | 32 +- - setup.py | 1628 --- - 23 files changed, 6678 insertions(+), 5587 deletions(-) + Lib/_bootsubprocess.py | 97 - + Lib/test/test_descr.py | 9 + + Makefile.pre.in | 112 +- + ...2-06-27-11-57-15.gh-issue-93939.rv7s8W.rst | 2 + + ...2-06-28-09-42-10.gh-issue-93939._VWxKW.rst | 2 + + ...2-06-30-09-57-39.gh-issue-90005.9-pQyR.rst | 1 + + ...2-06-30-17-18-23.gh-issue-90005.EIOOla.rst | 5 + + ...2-04-01-12-35-44.gh-issue-90005.pvaLHQ.rst | 1 + + ...2-07-04-10-02-02.gh-issue-93939.U6sW6H.rst | 3 + + Modules/Setup | 2 +- + Modules/Setup.stdlib.in | 17 +- + Modules/_ctypes/callproc.c | 3 + + Modules/_ctypes/malloc_closure.c | 3 + + Python/stdlib_module_names.h | 1 - + Tools/scripts/2to3 | 2 +- + Tools/scripts/check_extension_modules.py | 484 + + Tools/scripts/generate_stdlib_module_names.py | 58 +- + Tools/scripts/idle3 | 2 +- + Tools/ssl/multissltests.py | 4 +- + configure | 14196 +++++++++------- + configure.ac | 628 +- + pyconfig.h.in | 32 +- + setup.py | 1629 -- + 23 files changed, 9176 insertions(+), 8117 deletions(-) delete mode 100644 Lib/_bootsubprocess.py create mode 100644 Misc/NEWS.d/next/Build/2022-06-27-11-57-15.gh-issue-93939.rv7s8W.rst create mode 100644 Misc/NEWS.d/next/Build/2022-06-28-09-42-10.gh-issue-93939._VWxKW.rst @@ -170,7 +170,7 @@ index 014782f616..0000000000 - - return stdout diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py -index 3145dff81b..4418fd2350 100644 +index e356624af0..cfe78de36b 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -21,6 +21,11 @@ @@ -218,7 +218,7 @@ index 3145dff81b..4418fd2350 100644 # Testing C-based static methods... import xxsubtype as spam diff --git a/Makefile.pre.in b/Makefile.pre.in -index b356f6293e..5f3f8ee88a 100644 +index 4d1921bf43..82f906cd1a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -150,6 +150,8 @@ CONFINCLUDEDIR= $(exec_prefix)/include @@ -254,7 +254,7 @@ index b356f6293e..5f3f8ee88a 100644 ########################################################################## # Parser -@@ -584,9 +576,10 @@ LIBEXPAT_HEADERS= \ +@@ -585,9 +577,10 @@ LIBEXPAT_HEADERS= \ # Default target all: @DEF_MAKE_ALL_RULE@ @@ -268,7 +268,7 @@ index b356f6293e..5f3f8ee88a 100644 # Check that the source is clean when building out of source. check-clean-src: -@@ -728,22 +721,6 @@ $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl +@@ -732,22 +725,6 @@ $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl $(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@ @@ -291,7 +291,7 @@ index b356f6293e..5f3f8ee88a 100644 # Build static library $(LIBRARY): $(LIBRARY_OBJS) -rm -f $@ -@@ -835,10 +812,6 @@ python.worker.js: $(srcdir)/Tools/wasm/python.worker.js +@@ -839,10 +816,6 @@ python.worker.js: $(srcdir)/Tools/wasm/python.worker.js # Build static libmpdec.a LIBMPDEC_CFLAGS=@LIBMPDEC_CFLAGS@ $(PY_STDMODULE_CFLAGS) $(CCSHARED) @@ -302,7 +302,7 @@ index b356f6293e..5f3f8ee88a 100644 # "%.o: %c" is not portable Modules/_decimal/libmpdec/basearith.o: $(srcdir)/Modules/_decimal/libmpdec/basearith.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS) $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/basearith.c -@@ -893,10 +866,6 @@ $(LIBMPDEC_A): $(LIBMPDEC_OBJS) +@@ -897,10 +870,6 @@ $(LIBMPDEC_A): $(LIBMPDEC_OBJS) # Build static libexpat.a LIBEXPAT_CFLAGS=@LIBEXPAT_CFLAGS@ $(PY_STDMODULE_CFLAGS) $(CCSHARED) @@ -313,7 +313,7 @@ index b356f6293e..5f3f8ee88a 100644 Modules/expat/xmlparse.o: $(srcdir)/Modules/expat/xmlparse.c $(LIBEXPAT_HEADERS) $(PYTHON_HEADERS) $(CC) -c $(LIBEXPAT_CFLAGS) -o $@ $(srcdir)/Modules/expat/xmlparse.c -@@ -913,7 +882,7 @@ $(LIBEXPAT_A): $(LIBEXPAT_OBJS) +@@ -917,7 +886,7 @@ $(LIBEXPAT_A): $(LIBEXPAT_OBJS) # create relative links from build/lib.platform/egg.so to Modules/egg.so # pybuilddir.txt is created too late. We cannot use it in Makefile # targets. ln --relative is not portable. @@ -322,7 +322,7 @@ index b356f6293e..5f3f8ee88a 100644 @target=`cat pybuilddir.txt`; \ $(MKDIR_P) $$target; \ for mod in X $(SHAREDMODS); do \ -@@ -922,6 +891,10 @@ oldsharedmods: $(SHAREDMODS) pybuilddir.txt +@@ -926,6 +895,10 @@ oldsharedmods: $(SHAREDMODS) pybuilddir.txt fi; \ done @@ -333,7 +333,7 @@ index b356f6293e..5f3f8ee88a 100644 Modules/Setup.local: @# Create empty Setup.local when file was deleted by user echo "# Edit this file for local setup changes" > $@ -@@ -942,7 +915,7 @@ Makefile Modules/config.c: Makefile.pre \ +@@ -946,7 +919,7 @@ Makefile Modules/config.c: Makefile.pre \ $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ -s Modules \ Modules/Setup.local \ @@ -342,13 +342,12 @@ index b356f6293e..5f3f8ee88a 100644 Modules/Setup.bootstrap \ $(srcdir)/Modules/Setup @mv config.c Modules -@@ -1764,13 +1737,13 @@ altinstall: commoninstall +@@ -1769,12 +1742,12 @@ altinstall: commoninstall commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \ altbininstall libinstall inclinstall libainstall \ -- sharedinstall oldsharedinstall altmaninstall \ -+ sharedinstall altmaninstall \ - @FRAMEWORKALTINSTALLLAST@ +- sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@ ++ sharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@ # Install shared libraries enabled by Setup DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) @@ -358,7 +357,7 @@ index b356f6293e..5f3f8ee88a 100644 @for i in X $(SHAREDMODS); do \ if test $$i != X; then \ echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \ -@@ -2121,7 +2094,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c +@@ -2176,7 +2149,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure @@ -367,7 +366,7 @@ index b356f6293e..5f3f8ee88a 100644 @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config @ # On Darwin, always use the python version of the script, the shell -@@ -2131,6 +2104,29 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2186,6 +2159,29 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh cp python-config.py python-config; \ fi @@ -397,7 +396,7 @@ index b356f6293e..5f3f8ee88a 100644 # Install the include files INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) -@@ -2177,7 +2173,7 @@ LIBPL= @LIBPL@ +@@ -2232,7 +2228,7 @@ LIBPL= @LIBPL@ # pkgconfig directory LIBPC= $(LIBDIR)/pkgconfig @@ -406,7 +405,7 @@ index b356f6293e..5f3f8ee88a 100644 @for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \ do \ if test ! -d $(DESTDIR)$$i; then \ -@@ -2213,6 +2209,9 @@ libainstall: all python-config +@@ -2268,6 +2264,9 @@ libainstall: all python-config $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config @@ -416,7 +415,7 @@ index b356f6293e..5f3f8ee88a 100644 @if [ -s Modules/python.exp -a \ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ echo; echo "Installing support files for building shared extension modules on AIX:"; \ -@@ -2229,17 +2228,6 @@ libainstall: all python-config +@@ -2284,17 +2283,6 @@ libainstall: all python-config else true; \ fi @@ -434,7 +433,7 @@ index b356f6293e..5f3f8ee88a 100644 # Here are a couple of targets for MacOSX again, to install a full # framework-based Python. frameworkinstall installs everything, the # subtargets install specific parts. Much of the actual work is offloaded to -@@ -2512,27 +2500,29 @@ update-config: +@@ -2570,27 +2558,29 @@ update-config: Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h # Declare targets that aren't real files @@ -1223,10 +1222,10 @@ index d7332bca48..2b4f1b5c95 100755 from idlelib.pyshell import main if __name__ == '__main__': diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 94d6b19a09..f9389c8512 100755 +index 99ecc45a63..8211515ebb 100755 --- a/Tools/ssl/multissltests.py +++ b/Tools/ssl/multissltests.py -@@ -359,7 +359,7 @@ def recompile_pymods(self): +@@ -361,7 +361,7 @@ def recompile_pymods(self): env["LD_RUN_PATH"] = self.lib_dir log.info("Rebuilding Python modules") @@ -1235,7 +1234,7 @@ index 94d6b19a09..f9389c8512 100755 self._subprocess_call(cmd, env=env) self.check_imports() -@@ -473,7 +473,7 @@ def main(): +@@ -475,7 +475,7 @@ def main(): start = datetime.now() if args.steps in {'modules', 'tests'}: @@ -1245,7 +1244,7 @@ index 94d6b19a09..f9389c8512 100755 parser.error( "Must be executed from CPython build dir" diff --git a/configure b/configure -index 9e76287725..c26d6a0079 100755 +index cb3db60f9c..d426a0c816 100755 --- a/configure +++ b/configure @@ -632,6 +632,8 @@ MODULE__CTYPES_TEST_FALSE @@ -1396,7 +1395,7 @@ index 9e76287725..c26d6a0079 100755 LIBB2_CFLAGS C compiler flags for LIBB2, overriding pkg-config LIBB2_LIBS linker flags for LIBB2, overriding pkg-config -@@ -4053,6 +4099,56 @@ esac +@@ -4064,6 +4110,56 @@ esac if test "$ac_sys_system" = "Darwin" then @@ -1453,7 +1452,7 @@ index 9e76287725..c26d6a0079 100755 # Compiler selection on MacOSX is more complicated than # AC_PROG_CC can handle, see Mac/README for more # information -@@ -6299,7 +6395,7 @@ if ${ac_cv_wl_no_as_needed+:} false; then : +@@ -6310,7 +6406,7 @@ if ${ac_cv_wl_no_as_needed+:} false; then : else save_LDFLAGS="$LDFLAGS" @@ -1462,7 +1461,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -12119,7 +12215,6 @@ fi +@@ -12168,7 +12264,6 @@ fi @@ -1470,7 +1469,7 @@ index 9e76287725..c26d6a0079 100755 # Check for use of the system libffi library { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5 $as_echo_n "checking for --with-system-ffi... " >&6; } -@@ -12155,166 +12250,24 @@ $as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" > +@@ -12204,166 +12299,24 @@ $as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" > with_system_ffi="yes" fi @@ -1646,7 +1645,7 @@ index 9e76287725..c26d6a0079 100755 test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes -@@ -12322,16 +12275,16 @@ fi +@@ -12371,16 +12324,16 @@ fi else pkg_failed=untried fi @@ -1668,7 +1667,7 @@ index 9e76287725..c26d6a0079 100755 test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes -@@ -12352,27 +12305,30 @@ else +@@ -12401,27 +12354,30 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then @@ -1708,7 +1707,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -12382,47 +12338,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -12431,47 +12387,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -1769,7 +1768,7 @@ index 9e76287725..c26d6a0079 100755 fi -@@ -12432,34 +12371,31 @@ LDFLAGS=$save_LDFLAGS +@@ -12481,34 +12420,31 @@ LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS @@ -1817,7 +1816,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -12469,47 +12405,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -12518,47 +12454,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -1878,7 +1877,7 @@ index 9e76287725..c26d6a0079 100755 fi -@@ -12519,45 +12438,82 @@ LDFLAGS=$save_LDFLAGS +@@ -12568,45 +12487,82 @@ LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS @@ -1984,7 +1983,7 @@ index 9e76287725..c26d6a0079 100755 CFLAGS=$save_CFLAGS -@@ -12569,459 +12525,372 @@ LIBS=$save_LIBS +@@ -12618,459 +12574,372 @@ LIBS=$save_LIBS fi @@ -2707,7 +2706,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13031,48 +12900,84 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13080,48 +12949,84 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -2815,7 +2814,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13082,44 +12987,249 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13131,44 +13036,249 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -3083,7 +3082,7 @@ index 9e76287725..c26d6a0079 100755 $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -@@ -13133,27 +13243,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13182,27 +13292,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -3118,7 +3117,7 @@ index 9e76287725..c26d6a0079 100755 cat >>confdefs.h <<_ACEOF #define HAVE_LIBSQLITE3 1 _ACEOF -@@ -13162,11 +13272,15 @@ _ACEOF +@@ -13211,11 +13321,15 @@ _ACEOF else @@ -3137,7 +3136,7 @@ index 9e76287725..c26d6a0079 100755 $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -@@ -13180,27 +13294,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13229,27 +13343,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -3172,7 +3171,7 @@ index 9e76287725..c26d6a0079 100755 cat >>confdefs.h <<_ACEOF #define HAVE_LIBSQLITE3 1 _ACEOF -@@ -13215,14 +13329,9 @@ fi +@@ -13264,14 +13378,9 @@ fi @@ -3190,7 +3189,7 @@ index 9e76287725..c26d6a0079 100755 $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -@@ -13236,27 +13345,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13285,27 +13394,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -3225,7 +3224,7 @@ index 9e76287725..c26d6a0079 100755 cat >>confdefs.h <<_ACEOF #define HAVE_LIBSQLITE3 1 _ACEOF -@@ -13270,9 +13379,10 @@ else +@@ -13319,9 +13428,10 @@ else fi @@ -3239,7 +3238,7 @@ index 9e76287725..c26d6a0079 100755 $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -@@ -13286,36 +13396,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13335,36 +13445,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -3296,7 +3295,7 @@ index 9e76287725..c26d6a0079 100755 $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -@@ -13329,384 +13447,354 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13378,1703 +13496,3074 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -3618,7 +3617,12 @@ index 9e76287725..c26d6a0079 100755 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes --else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_trace in -lsqlite3" >&5 ++$as_echo_n "checking for sqlite3_trace in -lsqlite3... " >&6; } ++if ${ac_cv_lib_sqlite3_sqlite3_trace+:} false; then : ++ $as_echo_n "(cached) " >&6 + else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then @@ -3628,28 +3632,16 @@ index 9e76287725..c26d6a0079 100755 - fi - # Put the nasty error message in config.log where it belongs - echo "$TCLTK_PKG_ERRORS" >&5 ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lsqlite3 $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ - found_tcltk=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - found_tcltk=no -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_trace in -lsqlite3" >&5 -+$as_echo_n "checking for sqlite3_trace in -lsqlite3... " >&6; } -+if ${ac_cv_lib_sqlite3_sqlite3_trace+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- TCLTK_CFLAGS=$pkg_cv_TCLTK_CFLAGS -- TCLTK_LIBS=$pkg_cv_TCLTK_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- found_tcltk=yes --fi -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lsqlite3 $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ - +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -3667,36 +3659,90 @@ index 9e76287725..c26d6a0079 100755 +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sqlite3_sqlite3_trace=yes -+else + else +- TCLTK_CFLAGS=$pkg_cv_TCLTK_CFLAGS +- TCLTK_LIBS=$pkg_cv_TCLTK_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- found_tcltk=yes + ac_cv_lib_sqlite3_sqlite3_trace=no - fi -- if test "x$found_tcltk" = xyes; then : -- break ++fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi --done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_trace" >&5 +$as_echo "$ac_cv_lib_sqlite3_sqlite3_trace" >&6; } +if test "x$ac_cv_lib_sqlite3_sqlite3_trace" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSQLITE3 1 +_ACEOF ++ ++ LIBS="-lsqlite3 $LIBS" ++ ++else ++ ++ have_supported_sqlite3=no + + fi +- if test "x$found_tcltk" = xyes; then : +- break ++ ++ ++ ++ + fi +-done -if test "x$found_tcltk" = xno; then : -+ LIBS="-lsqlite3 $LIBS" - TCLTK_CFLAGS=${TCLTK_CFLAGS-""} - TCLTK_LIBS=${TCLTK_LIBS-""} -+else --fi -+ have_supported_sqlite3=no ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_value_double in -lsqlite3" >&5 ++$as_echo_n "checking for sqlite3_value_double in -lsqlite3... " >&6; } ++if ${ac_cv_lib_sqlite3_sqlite3_value_double+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lsqlite3 $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char sqlite3_value_double (); ++int ++main () ++{ ++return sqlite3_value_double (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_sqlite3_sqlite3_value_double=yes ++else ++ ac_cv_lib_sqlite3_sqlite3_value_double=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_value_double" >&5 ++$as_echo "$ac_cv_lib_sqlite3_sqlite3_value_double" >&6; } ++if test "x$ac_cv_lib_sqlite3_sqlite3_value_double" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBSQLITE3 1 ++_ACEOF -case $ac_sys_system in #( - FreeBSD*) : -+fi ++ LIBS="-lsqlite3 $LIBS" - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 @@ -3704,11 +3750,14 @@ index 9e76287725..c26d6a0079 100755 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then ++else ++ have_supported_sqlite3=no -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 -$as_echo_n "checking for X11... " >&6; } ++fi -if test -n "$X11_CFLAGS"; then - pkg_cv_X11_CFLAGS="$X11_CFLAGS" @@ -3721,12 +3770,44 @@ index 9e76287725..c26d6a0079 100755 - test $ac_status = 0; }; then - pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes --else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_load_extension in -lsqlite3" >&5 ++$as_echo_n "checking for sqlite3_load_extension in -lsqlite3... " >&6; } ++if ${ac_cv_lib_sqlite3_sqlite3_load_extension+:} false; then : ++ $as_echo_n "(cached) " >&6 + else - pkg_failed=yes --fi ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lsqlite3 $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char sqlite3_load_extension (); ++int ++main () ++{ ++return sqlite3_load_extension (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_sqlite3_sqlite3_load_extension=yes ++else ++ ac_cv_lib_sqlite3_sqlite3_load_extension=no + fi - else - pkg_failed=untried --fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS + fi -if test -n "$X11_LIBS"; then - pkg_cv_X11_LIBS="$X11_LIBS" - elif test -n "$PKG_CONFIG"; then @@ -3738,3467 +3819,7009 @@ index 9e76287725..c26d6a0079 100755 - test $ac_status = 0; }; then - pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes --else ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5 ++$as_echo "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; } ++if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes; then : ++ have_sqlite3_load_extension=yes + else - pkg_failed=yes --fi -- else -- pkg_failed=untried ++ have_sqlite3_load_extension=no ++ fi - - - --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_value_double in -lsqlite3" >&5 -+$as_echo_n "checking for sqlite3_value_double in -lsqlite3... " >&6; } -+if ${ac_cv_lib_sqlite3_sqlite3_value_double+:} false; then : +- else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_serialize in -lsqlite3" >&5 ++$as_echo_n "checking for sqlite3_serialize in -lsqlite3... " >&6; } ++if ${ac_cv_lib_sqlite3_sqlite3_serialize+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsqlite3 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes ++ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif -+char sqlite3_value_double (); ++char sqlite3_serialize (); +int +main () +{ -+return sqlite3_value_double (); ++return sqlite3_serialize (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_sqlite3_sqlite3_value_double=yes - else -- _pkg_short_errors_supported=no -+ ac_cv_lib_sqlite3_sqlite3_value_double=no - fi -- if test $_pkg_short_errors_supported = yes; then -- X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` -- else -- X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$X11_PKG_ERRORS" >&5 ++ ac_cv_lib_sqlite3_sqlite3_serialize=yes ++else ++ ac_cv_lib_sqlite3_sqlite3_serialize=no ++fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_value_double" >&5 -+$as_echo "$ac_cv_lib_sqlite3_sqlite3_value_double" >&6; } -+if test "x$ac_cv_lib_sqlite3_sqlite3_value_double" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBSQLITE3 1 -+_ACEOF - -- as_fn_error $? "Package requirements (x11) were not met: -+ LIBS="-lsqlite3 $LIBS" - --$X11_PKG_ERRORS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_serialize" >&5 ++$as_echo "$ac_cv_lib_sqlite3_sqlite3_serialize" >&6; } ++if test "x$ac_cv_lib_sqlite3_sqlite3_serialize" = xyes; then : ++ ++ ++$as_echo "#define PY_SQLITE_HAVE_SERIALIZE 1" >>confdefs.h ++ ++ ++fi ++ ++ +else - --Consider adjusting the PKG_CONFIG_PATH environment variable if you --installed software in a non-standard prefix. -+ have_supported_sqlite3=no - --Alternatively, you may set the environment variables X11_CFLAGS --and X11_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details." "$LINENO" 5 --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it --is in your PATH or set the PKG_CONFIG environment variable to the full --path to pkg-config. ++ ++ have_supported_sqlite3=no ++ +fi - --Alternatively, you may set the environment variables X11_CFLAGS --and X11_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details. - --To get pkg-config, see . --See \`config.log' for more details" "$LINENO" 5; } --else -- X11_CFLAGS=$pkg_cv_X11_CFLAGS -- X11_LIBS=$pkg_cv_X11_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- -- TCLTK_CFLAGS="$TCLTK_CFLAGS $X11_CFLAGS" -- TCLTK_LIBS="$TCLTK_LIBS $X11_LIBS" -- --fi -- --fi -- -- ;; #( -- *) : -- ;; --esac ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++ ++ ++ ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5 ++$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; } ++# Check whether --enable-loadable-sqlite-extensions was given. ++if test "${enable_loadable_sqlite_extensions+set}" = set; then : ++ enableval=$enable_loadable_sqlite_extensions; ++ if test "x$have_sqlite3_load_extension" = xno; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: n/a" >&5 ++$as_echo "n/a" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of SQLite does not support loadable extensions" >&5 ++$as_echo "$as_me: WARNING: Your version of SQLite does not support loadable extensions" >&2;} ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++$as_echo "#define PY_SQLITE_ENABLE_LOAD_EXTENSION 1" >>confdefs.h ++ ++ ++fi ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++ ++fi ++ ++ ++found_tcltk=no ++for _QUERY in \ ++ "tcl >= 8.5.12 tk >= 8.5.12" \ ++ "tcl8.6 tk8.6" \ ++ "tcl86 tk86" \ ++ "tcl8.5 >= 8.5.12 tk8.5 >= 8.5.12" \ ++ "tcl85 >= 8.5.12 tk85 >= 8.5.12" \ ++; do ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$_QUERY\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "$_QUERY") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLTK" >&5 ++$as_echo_n "checking for TCLTK... " >&6; } ++ ++if test -n "$TCLTK_CFLAGS"; then ++ pkg_cv_TCLTK_CFLAGS="$TCLTK_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$_QUERY\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "$_QUERY") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_TCLTK_CFLAGS=`$PKG_CONFIG --cflags "$_QUERY" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$TCLTK_LIBS"; then ++ pkg_cv_TCLTK_LIBS="$TCLTK_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$_QUERY\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "$_QUERY") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_TCLTK_LIBS=`$PKG_CONFIG --libs "$_QUERY" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ TCLTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$_QUERY" 2>&1` ++ else ++ TCLTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$_QUERY" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$TCLTK_PKG_ERRORS" >&5 ++ ++ found_tcltk=no ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ found_tcltk=no ++else ++ TCLTK_CFLAGS=$pkg_cv_TCLTK_CFLAGS ++ TCLTK_LIBS=$pkg_cv_TCLTK_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ found_tcltk=yes ++fi ++ ++fi ++ if test "x$found_tcltk" = xyes; then : ++ break ++fi ++done ++ ++if test "x$found_tcltk" = xno; then : ++ ++ TCLTK_CFLAGS=${TCLTK_CFLAGS-""} ++ TCLTK_LIBS=${TCLTK_LIBS-""} ++ ++fi ++ ++case $ac_sys_system in #( ++ FreeBSD*) : ++ ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 ++$as_echo_n "checking for X11... " >&6; } ++ ++if test -n "$X11_CFLAGS"; then ++ pkg_cv_X11_CFLAGS="$X11_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$X11_LIBS"; then ++ pkg_cv_X11_LIBS="$X11_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else + pkg_failed=untried + fi + + +- +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` ++ else ++ X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$X11_PKG_ERRORS" >&5 ++ ++ as_fn_error $? "Package requirements (x11) were not met: ++ ++$X11_PKG_ERRORS ++ ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++Alternatively, you may set the environment variables X11_CFLAGS ++and X11_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details." "$LINENO" 5 ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. ++ ++Alternatively, you may set the environment variables X11_CFLAGS ++and X11_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details. ++ ++To get pkg-config, see . ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ X11_CFLAGS=$pkg_cv_X11_CFLAGS ++ X11_LIBS=$pkg_cv_X11_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++ TCLTK_CFLAGS="$TCLTK_CFLAGS $X11_CFLAGS" ++ TCLTK_LIBS="$TCLTK_LIBS $X11_LIBS" ++ ++fi ++ ++fi ++ ++ ;; #( ++ *) : ++ ;; ++esac ++ ++save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ ++ ++ CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS" ++ LIBS="$TCLTK_LIBS $LDFLAGS" ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ ++ #include ++ #include ++ #if defined(TK_HEX_VERSION) ++ # if TK_HEX_VERSION < 0x0805020c ++ # error "Tk older than 8.5.12 not supported" ++ # endif ++ #endif ++ #if (TCL_MAJOR_VERSION < 8) || \ ++ ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 5)) || \ ++ ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION == 5) && (TCL_RELEASE_SERIAL < 12)) ++ # error "Tcl older than 8.5.12 not supported" ++ #endif ++ #if (TK_MAJOR_VERSION < 8) || \ ++ ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION < 5)) || \ ++ ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION == 5) && (TK_RELEASE_SERIAL < 12)) ++ # error "Tk older than 8.5.12 not supported" ++ #endif ++ ++int ++main () ++{ ++ ++ void *x1 = Tcl_Init; ++ void *x2 = Tk_Init; ++ ++ ; ++ return 0; ++} ++ ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ++ have_tcltk=yes ++ as_fn_append TCLTK_CFLAGS " -Wno-strict-prototypes -DWITH_APPINIT=1" ++ ++else ++ ++ have_tcltk=no ++ ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++ ++ ++ ++save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ ++ ++ CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS" ++ LDFLAGS="$GDBM_LIBS $LDFLAGS" ++ for ac_header in gdbm.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default" ++if test "x$ac_cv_header_gdbm_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GDBM_H 1 ++_ACEOF ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5 ++$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; } ++if ${ac_cv_lib_gdbm_gdbm_open+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lgdbm $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char gdbm_open (); ++int ++main () ++{ ++return gdbm_open (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_gdbm_gdbm_open=yes ++else ++ ac_cv_lib_gdbm_gdbm_open=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5 ++$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; } ++if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then : ++ ++ have_gdbm=yes ++ GDBM_LIBS=${GDBM_LIBS-"-lgdbm"} ++ ++else ++ have_gdbm=no ++fi ++ ++ ++else ++ have_gdbm=no ++fi ++ ++done ++ ++ ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++ ++for ac_header in ndbm.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default" ++if test "x$ac_cv_header_ndbm_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_NDBM_H 1 ++_ACEOF ++ ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dbm_open" >&5 ++$as_echo_n "checking for library containing dbm_open... " >&6; } ++if ${ac_cv_search_dbm_open+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char dbm_open (); ++int ++main () ++{ ++return dbm_open (); ++ ; ++ return 0; ++} ++_ACEOF ++for ac_lib in '' ndbm gdbm_compat; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_dbm_open=$ac_res ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_dbm_open+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_dbm_open+:} false; then : ++ ++else ++ ac_cv_search_dbm_open=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5 ++$as_echo "$ac_cv_search_dbm_open" >&6; } ++ac_res=$ac_cv_search_dbm_open ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ ++fi ++ ++ ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++ ++fi ++ ++done ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndbm presence and linker args" >&5 ++$as_echo_n "checking for ndbm presence and linker args... " >&6; } ++case $ac_cv_search_dbm_open in #( ++ *ndbm*|*gdbm_compat*) : ++ ++ dbm_ndbm="$ac_cv_search_dbm_open" ++ have_ndbm=yes ++ ;; #( ++ none*) : ++ ++ dbm_ndbm="" ++ have_ndbm=yes ++ ;; #( ++ no) : ++ have_ndbm=no ++ ;; #( ++ *) : ++ ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ndbm ($dbm_ndbm)" >&5 ++$as_echo "$have_ndbm ($dbm_ndbm)" >&6; } ++ ++{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} ++if ${ac_cv_header_gdbm_slash_ndbm_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ ac_fn_c_check_header_mongrel "$LINENO" "gdbm/ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" ++if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : ++ ac_cv_header_gdbm_slash_ndbm_h=yes ++else ++ ac_cv_header_gdbm_slash_ndbm_h=no ++ ++fi ++ ++ ++ ++fi ++ ++if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes; then : ++ ++ ++$as_echo "#define HAVE_GDBM_NDBM_H 1" >>confdefs.h ++ ++ ++fi ++ ++{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} ++if ${ac_cv_header_gdbm_dash_ndbm_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ ac_fn_c_check_header_mongrel "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" ++if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : ++ ac_cv_header_gdbm_dash_ndbm_h=yes ++else ++ ac_cv_header_gdbm_dash_ndbm_h=no ++ ++fi ++ ++ ++ ++fi ++ ++if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes; then : ++ ++ ++$as_echo "#define HAVE_GDBM_DASH_NDBM_H 1" >>confdefs.h ++ ++ ++fi ++{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} ++ ++if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dbm_open" >&5 ++$as_echo_n "checking for library containing dbm_open... " >&6; } ++if ${ac_cv_search_dbm_open+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char dbm_open (); ++int ++main () ++{ ++return dbm_open (); ++ ; ++ return 0; ++} ++_ACEOF ++for ac_lib in '' gdbm_compat; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_dbm_open=$ac_res ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_dbm_open+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_dbm_open+:} false; then : ++ ++else ++ ac_cv_search_dbm_open=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5 ++$as_echo "$ac_cv_search_dbm_open" >&6; } ++ac_res=$ac_cv_search_dbm_open ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ ++fi ++ ++ ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++fi ++ ++# Check for libdb >= 5 with dbm_open() ++# db.h re-defines the name of the function ++for ac_header in db.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" ++if test "x$ac_cv_header_db_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_DB_H 1 ++_ACEOF ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdb" >&5 ++$as_echo_n "checking for libdb... " >&6; } ++if ${ac_cv_have_libdb+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ ++ ++ LIBS="$LIBS -ldb" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #define DB_DBM_HSEARCH 1 ++ #include ++ #if DB_VERSION_MAJOR < 5 ++ #error "dh.h: DB_VERSION_MAJOR < 5 is not supported." ++ #endif ++ ++int ++main () ++{ ++DBM *dbm = dbm_open(NULL, 0, 0) ++ ; ++ return 0; ++} ++ ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_have_libdb=yes ++else ++ ac_cv_have_libdb=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_libdb" >&5 ++$as_echo "$ac_cv_have_libdb" >&6; } ++ if test "x$ac_cv_have_libdb" = xyes; then : ++ ++ ++$as_echo "#define HAVE_LIBDB 1" >>confdefs.h ++ ++ ++fi ++ ++fi ++ ++done ++ ++ ++# Check for --with-dbmliborder ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 ++$as_echo_n "checking for --with-dbmliborder... " >&6; } ++ ++# Check whether --with-dbmliborder was given. ++if test "${with_dbmliborder+set}" = set; then : ++ withval=$with_dbmliborder; ++else ++ with_dbmliborder=gdbm:ndbm:bdb ++fi ++ ++ ++have_gdbm_dbmliborder=no ++as_save_IFS=$IFS ++IFS=: ++for db in $with_dbmliborder; do ++ case $db in #( ++ ndbm) : ++ ;; #( ++ gdbm) : ++ have_gdbm_dbmliborder=yes ;; #( ++ bdb) : ++ ;; #( ++ *) : ++ with_dbmliborder=error ++ ;; ++esac ++done ++IFS=$as_save_IFS ++if test "x$with_dbmliborder" = xerror; then : ++ ++ as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:... (gdbm:ndbm:bdb)" "$LINENO" 5 ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 ++$as_echo "$with_dbmliborder" >&6; } ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dbm module CFLAGS and LIBS" >&5 ++$as_echo_n "checking for _dbm module CFLAGS and LIBS... " >&6; } ++have_dbm=no ++as_save_IFS=$IFS ++IFS=: ++for db in $with_dbmliborder; do ++ case "$db" in ++ ndbm) ++ if test "$have_ndbm" = yes; then ++ DBM_CFLAGS="-DUSE_NDBM" ++ DBM_LIBS="$dbm_ndbm" ++ have_dbm=yes ++ break ++ fi ++ ;; ++ gdbm) ++ if test "$have_gdbm_compat" = yes; then ++ DBM_CFLAGS="-DUSE_GDBM_COMPAT" ++ DBM_LIBS="-lgdbm_compat" ++ have_dbm=yes ++ break ++ fi ++ ;; ++ bdb) ++ if test "$ac_cv_have_libdb" = yes; then ++ DBM_CFLAGS="-DUSE_BERKDB" ++ DBM_LIBS="-ldb" ++ have_dbm=yes ++ break ++ fi ++ ;; ++ esac ++done ++IFS=$as_save_IFS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBM_CFLAGS $DBM_LIBS" >&5 ++$as_echo "$DBM_CFLAGS $DBM_LIBS" >&6; } ++ ++# Templates for things AC_DEFINEd more than once. ++# For a single AC_DEFINE, no template is needed. ++ ++ ++if test "$ac_cv_pthread_is_default" = yes ++then ++ # Defining _REENTRANT on system with POSIX threads should not hurt. ++ $as_echo "#define _REENTRANT 1" >>confdefs.h ++ ++ posix_threads=yes ++ if test "$ac_sys_system" = "SunOS"; then ++ CFLAGS="$CFLAGS -D_REENTRANT" ++ fi ++elif test "$ac_cv_kpthread" = "yes" ++then ++ CC="$CC -Kpthread" ++ if test "$ac_cv_cxx_thread" = "yes"; then ++ CXX="$CXX -Kpthread" ++ fi ++ posix_threads=yes ++elif test "$ac_cv_kthread" = "yes" ++then ++ CC="$CC -Kthread" ++ if test "$ac_cv_cxx_thread" = "yes"; then ++ CXX="$CXX -Kthread" ++ fi ++ posix_threads=yes ++elif test "$ac_cv_pthread" = "yes" ++then ++ CC="$CC -pthread" ++ if test "$ac_cv_cxx_thread" = "yes"; then ++ CXX="$CXX -pthread" ++ fi ++ posix_threads=yes ++else ++ if test ! -z "$withval" -a -d "$withval" ++ then LDFLAGS="$LDFLAGS -L$withval" ++ fi ++ ++ # According to the POSIX spec, a pthreads implementation must ++ # define _POSIX_THREADS in unistd.h. Some apparently don't ++ # (e.g. gnu pth with pthread emulation) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 ++$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#ifdef _POSIX_THREADS ++yes ++#endif ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ unistd_defines_pthreads=yes ++else ++ unistd_defines_pthreads=no ++fi ++rm -f conftest* ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 ++$as_echo "$unistd_defines_pthreads" >&6; } ++ ++ $as_echo "#define _REENTRANT 1" >>confdefs.h ++ ++ # Just looking for pthread_create in libpthread is not enough: ++ # on HP/UX, pthread.h renames pthread_create to a different symbol name. ++ # So we really have to include pthread.h, and then link. ++ _libs=$LIBS ++ LIBS="$LIBS -lpthread" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 ++$as_echo_n "checking for pthread_create in -lpthread... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include ++#include ++ ++void * start_routine (void *arg) { exit (0); } ++int ++main () ++{ ++ ++pthread_create (NULL, NULL, start_routine, NULL) ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ posix_threads=yes ++ ++else ++ ++ LIBS=$_libs ++ ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" ++if test "x$ac_cv_func_pthread_detach" = xyes; then : ++ ++ posix_threads=yes ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 ++$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } ++if ${ac_cv_lib_pthreads_pthread_create+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lpthreads $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char pthread_create (); ++int ++main () ++{ ++return pthread_create (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_pthreads_pthread_create=yes ++else ++ ac_cv_lib_pthreads_pthread_create=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 ++$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } ++if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : ++ ++ posix_threads=yes ++ LIBS="$LIBS -lpthreads" ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 ++$as_echo_n "checking for pthread_create in -lc_r... " >&6; } ++if ${ac_cv_lib_c_r_pthread_create+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lc_r $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char pthread_create (); ++int ++main () ++{ ++return pthread_create (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_c_r_pthread_create=yes ++else ++ ac_cv_lib_c_r_pthread_create=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 ++$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } ++if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : ++ ++ posix_threads=yes ++ LIBS="$LIBS -lc_r" ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 ++$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } ++if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lpthread $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char __pthread_create_system (); ++int ++main () ++{ ++return __pthread_create_system (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_pthread___pthread_create_system=yes ++else ++ ac_cv_lib_pthread___pthread_create_system=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 ++$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } ++if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : ++ ++ posix_threads=yes ++ LIBS="$LIBS -lpthread" ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 ++$as_echo_n "checking for pthread_create in -lcma... " >&6; } ++if ${ac_cv_lib_cma_pthread_create+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lcma $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char pthread_create (); ++int ++main () ++{ ++return pthread_create (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_cma_pthread_create=yes ++else ++ ac_cv_lib_cma_pthread_create=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 ++$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } ++if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : ++ ++ posix_threads=yes ++ LIBS="$LIBS -lcma" ++ ++else ++ ++ case $ac_sys_system in #( ++ WASI) : ++ posix_threads=stub ;; #( ++ *) : ++ as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 ++ ;; ++esac ++ ++fi ++ ++fi ++ ++fi ++ ++fi ++ ++fi ++ ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 ++$as_echo_n "checking for usconfig in -lmpc... " >&6; } ++if ${ac_cv_lib_mpc_usconfig+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lmpc $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char usconfig (); ++int ++main () ++{ ++return usconfig (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_mpc_usconfig=yes ++else ++ ac_cv_lib_mpc_usconfig=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 ++$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } ++if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : ++ ++ LIBS="$LIBS -lmpc" ++ ++fi ++ ++ ++fi ++ ++if test "$posix_threads" = "yes"; then ++ if test "$unistd_defines_pthreads" = "no"; then ++ ++$as_echo "#define _POSIX_THREADS 1" >>confdefs.h ++ ++ fi ++ ++ # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. ++ case $ac_sys_system/$ac_sys_release in ++ SunOS/5.6) ++$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h ++ ++ ;; ++ SunOS/5.8) ++$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ++ ++ ;; ++ AIX/*) ++$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ++ ++ ;; ++ NetBSD/*) ++$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ++ ++ ;; ++ esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 ++$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } ++if ${ac_cv_pthread_system_supported+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ ac_cv_pthread_system_supported=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include ++ #include ++ void *foo(void *parm) { ++ return NULL; ++ } ++ int main(void) { ++ pthread_attr_t attr; ++ pthread_t id; ++ if (pthread_attr_init(&attr)) return (-1); ++ if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1); ++ if (pthread_create(&id, &attr, foo, NULL)) return (-1); ++ return (0); ++ } ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_pthread_system_supported=yes ++else ++ ac_cv_pthread_system_supported=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 ++$as_echo "$ac_cv_pthread_system_supported" >&6; } ++ if test "$ac_cv_pthread_system_supported" = "yes"; then ++ ++$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h ++ ++ fi ++ for ac_func in pthread_sigmask ++do : ++ ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" ++if test "x$ac_cv_func_pthread_sigmask" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_PTHREAD_SIGMASK 1 ++_ACEOF ++ case $ac_sys_system in ++ CYGWIN*) ++ ++$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h ++ ++ ;; ++ esac ++fi ++done ++ ++ for ac_func in pthread_getcpuclockid ++do : ++ ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" ++if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_PTHREAD_GETCPUCLOCKID 1 ++_ACEOF ++ ++fi ++done ++ ++fi ++ ++if test "x$posix_threads" = xstub; then : ++ ++ ++$as_echo "#define HAVE_PTHREAD_STUBS 1" >>confdefs.h ++ ++ ++fi ++ ++# Check for enable-ipv6 ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 ++$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } ++# Check whether --enable-ipv6 was given. ++if test "${enable_ipv6+set}" = set; then : ++ enableval=$enable_ipv6; case "$enableval" in ++ no) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ipv6=no ++ ;; ++ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ $as_echo "#define ENABLE_IPV6 1" >>confdefs.h ++ ++ ipv6=yes ++ ;; ++ esac ++else ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ /* AF_INET6 available check */ ++#include ++#include ++int ++main () ++{ ++int domain = AF_INET6; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ ipv6=yes ++ ++else ++ ++ ipv6=no ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++case $ac_sys_system in #( ++ WASI) : ++ ipv6=no ++ ;; #( ++ *) : ++ ;; ++esac ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6" >&5 ++$as_echo "$ipv6" >&6; } ++ ++if test "$ipv6" = "yes"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 ++$as_echo_n "checking if RFC2553 API is available... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include ++#include ++int ++main () ++{ ++struct sockaddr_in6 x; ++ x.sin6_scope_id; ++ ; ++ return 0; ++} ++ ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ipv6=yes ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ipv6=no ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++if test "$ipv6" = "yes"; then ++ $as_echo "#define ENABLE_IPV6 1" >>confdefs.h ++ ++fi ++ ++fi ++ ++ ++ipv6type=unknown ++ipv6lib=none ++ipv6trylibc=no ++ ++if test "$ipv6" = yes -a "$cross_compiling" = no; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 ++$as_echo_n "checking ipv6 stack type... " >&6; } ++ for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; ++ do ++ case $i in ++ inria) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#ifdef IPV6_INRIA_VERSION ++yes ++#endif ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ ipv6type=$i ++fi ++rm -f conftest* ++ ++ ;; ++ kame) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#ifdef __KAME__ ++yes ++#endif ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ ipv6type=$i; ++ ipv6lib=inet6 ++ ipv6libdir=/usr/local/v6/lib ++ ipv6trylibc=yes ++fi ++rm -f conftest* ++ ++ ;; ++ linux-glibc) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) ++yes ++#endif ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ ipv6type=$i; ++ ipv6trylibc=yes ++fi ++rm -f conftest* ++ ++ ;; ++ linux-inet6) ++ if test -d /usr/inet6; then ++ ipv6type=$i ++ ipv6lib=inet6 ++ ipv6libdir=/usr/inet6/lib ++ BASECFLAGS="-I/usr/inet6/include $BASECFLAGS" ++ fi ++ ;; ++ solaris) ++ if test -f /etc/netconfig; then ++ if $GREP -q tcp6 /etc/netconfig; then ++ ipv6type=$i ++ ipv6trylibc=yes ++ fi ++ fi ++ ;; ++ toshiba) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#ifdef _TOSHIBA_INET6 ++yes ++#endif ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ ipv6type=$i; ++ ipv6lib=inet6; ++ ipv6libdir=/usr/local/v6/lib ++fi ++rm -f conftest* ++ ++ ;; ++ v6d) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#ifdef __V6D__ ++yes ++#endif ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ ipv6type=$i; ++ ipv6lib=v6; ++ ipv6libdir=/usr/local/v6/lib; ++ BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" ++fi ++rm -f conftest* ++ ++ ;; ++ zeta) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#ifdef _ZETA_MINAMI_INET6 ++yes ++#endif ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ ipv6type=$i; ++ ipv6lib=inet6; ++ ipv6libdir=/usr/local/v6/lib + fi +- if test $_pkg_short_errors_supported = yes; then +- X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` +- else +- X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$X11_PKG_ERRORS" >&5 +- +- as_fn_error $? "Package requirements (x11) were not met: +- +-$X11_PKG_ERRORS ++rm -f conftest* + +-Consider adjusting the PKG_CONFIG_PATH environment variable if you +-installed software in a non-standard prefix. ++ ;; ++ esac ++ if test "$ipv6type" != "unknown"; then ++ break ++ fi ++ done ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 ++$as_echo "$ipv6type" >&6; } ++fi + +-Alternatively, you may set the environment variables X11_CFLAGS +-and X11_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details." "$LINENO" 5 +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +-is in your PATH or set the PKG_CONFIG environment variable to the full +-path to pkg-config. ++if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then ++ if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then ++ LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: using lib$ipv6lib" >&5 ++$as_echo "$as_me: using lib$ipv6lib" >&6;} ++ else ++ if test "x$ipv6trylibc" = xyes; then : + +-Alternatively, you may set the environment variables X11_CFLAGS +-and X11_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: using libc" >&5 ++$as_echo "$as_me: using libc" >&6;} + +-To get pkg-config, see . +-See \`config.log' for more details" "$LINENO" 5; } + else +- X11_CFLAGS=$pkg_cv_X11_CFLAGS +- X11_LIBS=$pkg_cv_X11_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } + +- TCLTK_CFLAGS="$TCLTK_CFLAGS $X11_CFLAGS" +- TCLTK_LIBS="$TCLTK_LIBS $X11_LIBS" ++ as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 + + fi +- ++ fi + fi + +- ;; #( +- *) : +- ;; +-esac +- +-save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS +- + +- CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS" +- LIBS="$TCLTK_LIBS $LDFLAGS" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CAN_RAW_FD_FRAMES" >&5 ++$as_echo_n "checking CAN_RAW_FD_FRAMES... " >&6; } ++if ${ac_cv_can_raw_fd_frames+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +- +- #include +- #include +- #if defined(TK_HEX_VERSION) +- # if TK_HEX_VERSION < 0x0805020c +- # error "Tk older than 8.5.12 not supported" +- # endif +- #endif +- #if (TCL_MAJOR_VERSION < 8) || \ +- ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 5)) || \ +- ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION == 5) && (TCL_RELEASE_SERIAL < 12)) +- # error "Tcl older than 8.5.12 not supported" +- #endif +- #if (TK_MAJOR_VERSION < 8) || \ +- ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION < 5)) || \ +- ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION == 5) && (TK_RELEASE_SERIAL < 12)) +- # error "Tk older than 8.5.12 not supported" +- #endif +- ++ /* CAN_RAW_FD_FRAMES available check */ ++#include + int + main () + { +- +- void *x1 = Tcl_Init; +- void *x2 = Tk_Init; +- ++int can_raw_fd_frames = CAN_RAW_FD_FRAMES; + ; + return 0; + } +- + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- +- have_tcltk=yes +- as_fn_append TCLTK_CFLAGS " -Wno-strict-prototypes -DWITH_APPINIT=1" +- ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_can_raw_fd_frames=yes + else +- +- have_tcltk=no +- ++ ac_cv_can_raw_fd_frames=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS +- +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_fd_frames" >&5 ++$as_echo "$ac_cv_can_raw_fd_frames" >&6; } ++if test "x$ac_cv_can_raw_fd_frames" = xyes; then : + + +-save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS ++$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h + + +- CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS" +- LDFLAGS="$GDBM_LIBS $LDFLAGS" +- for ac_header in gdbm.h +-do : +- ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default" +-if test "x$ac_cv_header_gdbm_h" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_GDBM_H 1 +-_ACEOF ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5 +-$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; } +-if ${ac_cv_lib_gdbm_gdbm_open+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5 ++$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; } ++if ${ac_cv_can_raw_join_filters+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lgdbm $LIBS" ++ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char gdbm_open (); ++#include + int + main () + { +-return gdbm_open (); ++int can_raw_join_filters = CAN_RAW_JOIN_FILTERS; + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_gdbm_gdbm_open=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_can_raw_join_filters=yes + else +- ac_cv_lib_gdbm_gdbm_open=no ++ ac_cv_can_raw_join_filters=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5 +-$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; } +-if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_join_filters" >&5 ++$as_echo "$ac_cv_can_raw_join_filters" >&6; } ++if test "x$ac_cv_can_raw_join_filters" = xyes; then : ++ ++ ++$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h ++ ++ ++fi ++ ++# Check for --with-doc-strings ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 ++$as_echo_n "checking for --with-doc-strings... " >&6; } ++ ++# Check whether --with-doc-strings was given. ++if test "${with_doc_strings+set}" = set; then : ++ withval=$with_doc_strings; ++fi ++ ++ ++if test -z "$with_doc_strings" ++then with_doc_strings="yes" ++fi ++if test "$with_doc_strings" != "no" ++then ++ ++$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 ++$as_echo "$with_doc_strings" >&6; } ++ ++# Check for Python-specific malloc support ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 ++$as_echo_n "checking for --with-pymalloc... " >&6; } ++ ++# Check whether --with-pymalloc was given. ++if test "${with_pymalloc+set}" = set; then : ++ withval=$with_pymalloc; ++fi ++ ++ ++if test -z "$with_pymalloc" ++then ++ case $ac_sys_system in #( ++ Emscripten) : ++ with_pymalloc="no" ;; #( ++ WASI) : ++ with_pymalloc="no" ;; #( ++ *) : ++ with_pymalloc="yes" ++ ;; ++esac ++fi ++if test "$with_pymalloc" != "no" ++then + +- have_gdbm=yes +- GDBM_LIBS=${GDBM_LIBS-"-lgdbm"} ++$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h + +-else +- have_gdbm=no + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 ++$as_echo "$with_pymalloc" >&6; } + ++# Check whether objects such as float, tuple and dict are using ++# freelists to optimization memory allocation. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-freelists" >&5 ++$as_echo_n "checking for --with-freelists... " >&6; } + +-else +- have_gdbm=no ++# Check whether --with-freelists was given. ++if test "${with_freelists+set}" = set; then : ++ withval=$with_freelists; + fi + +-done + ++if test -z "$with_freelists" ++then ++ with_freelists="yes" ++fi ++if test "$with_freelists" != "no" ++then + +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS ++$as_echo "#define WITH_FREELISTS 1" >>confdefs.h + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freelists" >&5 ++$as_echo "$with_freelists" >&6; } + ++# Check for --with-c-locale-coercion ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 ++$as_echo_n "checking for --with-c-locale-coercion... " >&6; } + +-# check for _dbmmodule.c dependencies +-for ac_header in ndbm.h +-do : +- ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default" +-if test "x$ac_cv_header_ndbm_h" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_NDBM_H 1 +-_ACEOF ++# Check whether --with-c-locale-coercion was given. ++if test "${with_c_locale_coercion+set}" = set; then : ++ withval=$with_c_locale_coercion; ++fi + +- LIBS_SAVE="$LIBS" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lndbm" >&5 +-$as_echo_n "checking for dbm_open in -lndbm... " >&6; } +-if ${ac_cv_lib_ndbm_dbm_open+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lndbm $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char dbm_open (); +-int +-main () +-{ +-return dbm_open (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_ndbm_dbm_open=yes +-else +- ac_cv_lib_ndbm_dbm_open=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++if test -z "$with_c_locale_coercion" ++then ++ with_c_locale_coercion="yes" + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbm_dbm_open" >&5 +-$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; } +-if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBNDBM 1 +-_ACEOF ++if test "$with_c_locale_coercion" != "no" ++then + +- LIBS="-lndbm $LIBS" ++$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 ++$as_echo "$with_c_locale_coercion" >&6; } + +- LIBS="$LIBS_SAVE" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm_compat" >&5 +-$as_echo_n "checking for dbm_open in -lgdbm_compat... " >&6; } +-if ${ac_cv_lib_gdbm_compat_dbm_open+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lgdbm_compat $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++# Check for Valgrind support ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 ++$as_echo_n "checking for --with-valgrind... " >&6; } + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char dbm_open (); +-int +-main () +-{ +-return dbm_open (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_gdbm_compat_dbm_open=yes ++# Check whether --with-valgrind was given. ++if test "${with_valgrind+set}" = set; then : ++ withval=$with_valgrind; + else +- ac_cv_lib_gdbm_compat_dbm_open=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ with_valgrind=no + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5 +-$as_echo "$ac_cv_lib_gdbm_compat_dbm_open" >&6; } +-if test "x$ac_cv_lib_gdbm_compat_dbm_open" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBGDBM_COMPAT 1 +-_ACEOF + +- LIBS="-lgdbm_compat $LIBS" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 ++$as_echo "$with_valgrind" >&6; } ++if test "$with_valgrind" != no; then ++ ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" ++if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : + +-fi ++$as_echo "#define WITH_VALGRIND 1" >>confdefs.h + +- LIBS="$LIBS_SAVE" ++else ++ as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 + + fi + +-done + ++ OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" ++fi + +-# "gdbm-ndbm.h" and "gdbm/ndbm.h" are both normalized to "gdbm_ndbm_h" +-# unset ac_cv_header_gdbm_ndbm_h to prevent false positive cache hits. +-{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} +-if ${ac_cv_header_gdbm_slash_ndbm_h+:} false; then : +- $as_echo_n "(cached) " >&6 +-else ++# Check for DTrace support ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 ++$as_echo_n "checking for --with-dtrace... " >&6; } + +- ac_fn_c_check_header_mongrel "$LINENO" "gdbm/ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" +-if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : +- ac_cv_header_gdbm_slash_ndbm_h=yes ++# Check whether --with-dtrace was given. ++if test "${with_dtrace+set}" = set; then : ++ withval=$with_dtrace; + else +- ac_cv_header_gdbm_slash_ndbm_h=no +- ++ with_dtrace=no + fi + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 ++$as_echo "$with_dtrace" >&6; } + + +-fi +- +-if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes; then : +- + +-$as_echo "#define HAVE_GDBM_NDBM_H 1" >>confdefs.h + + +-fi ++DTRACE= ++DTRACE_HEADERS= ++DTRACE_OBJS= + +-{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} +-if ${ac_cv_header_gdbm_dash_ndbm_h+:} false; then : ++if test "$with_dtrace" = "yes" ++then ++ # Extract the first word of "dtrace", so it can be a program name with args. ++set dummy dtrace; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_path_DTRACE+:} false; then : + $as_echo_n "(cached) " >&6 + else ++ case $DTRACE in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS + +- ac_fn_c_check_header_mongrel "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" +-if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : +- ac_cv_header_gdbm_dash_ndbm_h=yes +-else +- ac_cv_header_gdbm_dash_ndbm_h=no +- ++ test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" ++ ;; ++esac + fi +- +- +- ++DTRACE=$ac_cv_path_DTRACE ++if test -n "$DTRACE"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 ++$as_echo "$DTRACE" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + +-if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes; then : +- + +-$as_echo "#define HAVE_GDBM_DASH_NDBM_H 1" >>confdefs.h ++ if test "$DTRACE" = "not found"; then ++ as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 ++ fi + ++$as_echo "#define WITH_DTRACE 1" >>confdefs.h + +-fi +-{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} ++ DTRACE_HEADERS="Include/pydtrace_probes.h" + +-if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then +- LIBS_SAVE="$LIBS" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm_compat" >&5 +-$as_echo_n "checking for dbm_open in -lgdbm_compat... " >&6; } +-if ${ac_cv_lib_gdbm_compat_dbm_open+:} false; then : ++ # On OS X, DTrace providers do not need to be explicitly compiled and ++ # linked into the binary. Correspondingly, dtrace(1) is missing the ELF ++ # generation flag '-G'. We check for presence of this flag, rather than ++ # hardcoding support by OS, in the interest of robustness. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 ++$as_echo_n "checking whether DTrace probes require linking... " >&6; } ++if ${ac_cv_dtrace_link+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lgdbm_compat $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++ ac_cv_dtrace_link=no ++ echo 'BEGIN{}' > conftest.d ++ "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ ++ ac_cv_dtrace_link=yes + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char dbm_open (); +-int +-main () +-{ +-return dbm_open (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_gdbm_compat_dbm_open=yes +-else +- ac_cv_lib_gdbm_compat_dbm_open=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 ++$as_echo "$ac_cv_dtrace_link" >&6; } ++ if test "$ac_cv_dtrace_link" = "yes"; then ++ DTRACE_OBJS="Python/pydtrace.o" ++ fi + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5 +-$as_echo "$ac_cv_lib_gdbm_compat_dbm_open" >&6; } +-if test "x$ac_cv_lib_gdbm_compat_dbm_open" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBGDBM_COMPAT 1 +-_ACEOF + +- LIBS="-lgdbm_compat $LIBS" ++PLATFORM_HEADERS= ++PLATFORM_OBJS= ++ ++case $ac_sys_system in #( ++ Emscripten) : + +-fi ++ as_fn_append PLATFORM_OBJS ' Python/emscripten_signal.o' ++ as_fn_append PLATFORM_HEADERS ' $(srcdir)/Include/internal/pycore_emscripten_signal.h' ++ ;; #( ++ *) : ++ ;; ++esac + +- LIBS="$LIBS_SAVE" +-fi + +-# Check for libdb >= 5 with dbm_open() +-# db.h re-defines the name of the function +-for ac_header in db.h ++ ++# -I${DLINCLDIR} is added to the compile rule for importdl.o ++ ++DLINCLDIR=. ++ ++# the dlopen() function means we might want to use dynload_shlib.o. some ++# platforms have dlopen(), but don't want to use it. ++for ac_func in dlopen + do : +- ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" +-if test "x$ac_cv_header_db_h" = xyes; then : ++ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" ++if test "x$ac_cv_func_dlopen" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_DB_H 1 ++#define HAVE_DLOPEN 1 + _ACEOF + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdb" >&5 +-$as_echo_n "checking for libdb... " >&6; } +-if ${ac_cv_have_libdb+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- +- LIBS_SAVE="$LIBS" +- LIBS="$LIBS -ldb" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++fi ++done + +- #define DB_DBM_HSEARCH 1 +- #include +- #if DB_VERSION_MAJOR < 5 +- #error "dh.h: DB_VERSION_MAJOR < 5 is not supported." +- #endif + +-int +-main () +-{ +-DBM *dbm = dbm_open(NULL, 0, 0) +- ; +- return 0; +-} ++# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic ++# loading of modules. + +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_have_libdb=yes +-else +- ac_cv_have_libdb=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 ++$as_echo_n "checking DYNLOADFILE... " >&6; } ++if test -z "$DYNLOADFILE" ++then ++ case $ac_sys_system/$ac_sys_release in ++ hp*|HP*) DYNLOADFILE="dynload_hpux.o";; ++ *) ++ # use dynload_shlib.c and dlopen() if we have it; otherwise stub ++ # out any dynamic loading ++ if test "$ac_cv_func_dlopen" = yes ++ then DYNLOADFILE="dynload_shlib.o" ++ else DYNLOADFILE="dynload_stub.o" ++ fi ++ ;; ++ esac + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- LIBS="$LIBS_SAVE" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 ++$as_echo "$DYNLOADFILE" >&6; } ++if test "$DYNLOADFILE" != "dynload_stub.o" ++then + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_libdb" >&5 +-$as_echo "$ac_cv_have_libdb" >&6; } +- if test "x$ac_cv_have_libdb" = xyes; then : ++$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h + ++fi + +-$as_echo "#define HAVE_LIBDB 1" >>confdefs.h ++# MACHDEP_OBJS can be set to platform-specific object files needed by Python + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 ++$as_echo_n "checking MACHDEP_OBJS... " >&6; } ++if test -z "$MACHDEP_OBJS" ++then ++ MACHDEP_OBJS=$extra_machdep_objs ++else ++ MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" + fi +- ++if test -z "$MACHDEP_OBJS"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 ++$as_echo "none" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 ++$as_echo "$MACHDEP_OBJS" >&6; } + fi + ++# checks for library functions ++for ac_func in \ ++ accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ ++ copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ ++ fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ ++ gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ ++ getgrnam_r getgrouplist getgroups gethostname getitimer getloadavg getlogin \ ++ getpeername getpgid getpid getppid getpriority _getpty \ ++ getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \ ++ getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ ++ lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ ++ mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ ++ pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ ++ pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ ++ rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ ++ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ ++ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ ++ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ ++ setresuid setreuid setsid setuid setvbuf shutdown sigaction sigaltstack \ ++ sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ ++ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ ++ sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ ++ tmpnam tmpnam_r truncate ttyname umask uname unlinkat utimensat utimes vfork \ ++ wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \ ++ ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi + done + + +-# Check for --with-dbmliborder +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 +-$as_echo_n "checking for --with-dbmliborder... " >&6; } ++# Force lchmod off for Linux. Linux disallows changing the mode of symbolic ++# links. Some libc implementations have a stub lchmod implementation that always ++# returns an error. ++if test "$MACHDEP" != linux; then ++ for ac_func in lchmod ++do : ++ ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" ++if test "x$ac_cv_func_lchmod" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LCHMOD 1 ++_ACEOF + +-# Check whether --with-dbmliborder was given. +-if test "${with_dbmliborder+set}" = set; then : +- withval=$with_dbmliborder; +-else +- with_dbmliborder=gdbm:ndbm:bdb + fi ++done + ++fi + +-have_gdbm_dbmliborder=no +-as_save_IFS=$IFS +-IFS=: +-for db in $with_dbmliborder; do +- case $db in #( +- ndbm) : +- ;; #( +- gdbm) : +- have_gdbm_dbmliborder=yes ;; #( +- bdb) : +- ;; #( +- *) : +- with_dbmliborder=error +- ;; +-esac +-done +-IFS=$as_save_IFS +-if test "x$with_dbmliborder" = xerror; then : ++ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include ++ #include ++" ++if test "x$ac_cv_have_decl_dirfd" = xyes; then : + +- as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:... (gdbm:ndbm:bdb)" "$LINENO" 5 ++$as_echo "#define HAVE_DIRFD 1" >>confdefs.h + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 +-$as_echo "$with_dbmliborder" >&6; } + +-# Templates for things AC_DEFINEd more than once. +-# For a single AC_DEFINE, no template is needed. + ++# For some functions, having a definition is not sufficient, since ++# we want to take their address. + +-if test "$ac_cv_pthread_is_default" = yes +-then +- # Defining _REENTRANT on system with POSIX threads should not hurt. +- $as_echo "#define _REENTRANT 1" >>confdefs.h + +- posix_threads=yes +- if test "$ac_sys_system" = "SunOS"; then +- CFLAGS="$CFLAGS -D_REENTRANT" +- fi +-elif test "$ac_cv_kpthread" = "yes" +-then +- CC="$CC -Kpthread" +- if test "$ac_cv_cxx_thread" = "yes"; then +- CXX="$CXX -Kpthread" +- fi +- posix_threads=yes +-elif test "$ac_cv_kthread" = "yes" +-then +- CC="$CC -Kthread" +- if test "$ac_cv_cxx_thread" = "yes"; then +- CXX="$CXX -Kthread" +- fi +- posix_threads=yes +-elif test "$ac_cv_pthread" = "yes" +-then +- CC="$CC -pthread" +- if test "$ac_cv_cxx_thread" = "yes"; then +- CXX="$CXX -pthread" +- fi +- posix_threads=yes ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 ++$as_echo_n "checking for chroot... " >&6; } ++if ${ac_cv_func_chroot+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- if test ! -z "$withval" -a -d "$withval" +- then LDFLAGS="$LDFLAGS -L$withval" +- fi +- +- # According to the POSIX spec, a pthreads implementation must +- # define _POSIX_THREADS in unistd.h. Some apparently don't +- # (e.g. gnu pth with pthread emulation) +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 +-$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- + #include +-#ifdef _POSIX_THREADS +-yes +-#endif +- ++int ++main () ++{ ++void *x=chroot ++ ; ++ return 0; ++} + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- unistd_defines_pthreads=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_chroot=yes + else +- unistd_defines_pthreads=no ++ ac_cv_func_chroot=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chroot" >&5 ++$as_echo "$ac_cv_func_chroot" >&6; } ++ if test "x$ac_cv_func_chroot" = xyes; then : ++ ++$as_echo "#define HAVE_CHROOT 1" >>confdefs.h ++ + fi +-rm -f conftest* + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 +-$as_echo "$unistd_defines_pthreads" >&6; } + +- $as_echo "#define _REENTRANT 1" >>confdefs.h + +- # Just looking for pthread_create in libpthread is not enough: +- # on HP/UX, pthread.h renames pthread_create to a different symbol name. +- # So we really have to include pthread.h, and then link. +- _libs=$LIBS +- LIBS="$LIBS -lpthread" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +-$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#include +-#include +-#include + +-void * start_routine (void *arg) { exit (0); } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 ++$as_echo_n "checking for link... " >&6; } ++if ${ac_cv_func_link+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + int + main () + { +- +-pthread_create (NULL, NULL, start_routine, NULL) ++void *x=link + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_link=yes ++else ++ ac_cv_func_link=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- posix_threads=yes ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_link" >&5 ++$as_echo "$ac_cv_func_link" >&6; } ++ if test "x$ac_cv_func_link" = xyes; then : + +-else ++$as_echo "#define HAVE_LINK 1" >>confdefs.h + +- LIBS=$_libs +- ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" +-if test "x$ac_cv_func_pthread_detach" = xyes; then : ++fi + +- posix_threads=yes + +-else + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 +-$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } +-if ${ac_cv_lib_pthreads_pthread_create+:} false; then : ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 ++$as_echo_n "checking for symlink... " >&6; } ++if ${ac_cv_func_symlink+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpthreads $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pthread_create (); ++#include + int + main () + { +-return pthread_create (); ++void *x=symlink + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_pthreads_pthread_create=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_symlink=yes + else +- ac_cv_lib_pthreads_pthread_create=no ++ ac_cv_func_symlink=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 +-$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } +-if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_symlink" >&5 ++$as_echo "$ac_cv_func_symlink" >&6; } ++ if test "x$ac_cv_func_symlink" = xyes; then : + +- posix_threads=yes +- LIBS="$LIBS -lpthreads" ++$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h + +-else ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 +-$as_echo_n "checking for pthread_create in -lc_r... " >&6; } +-if ${ac_cv_lib_c_r_pthread_create+:} false; then : ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 ++$as_echo_n "checking for fchdir... " >&6; } ++if ${ac_cv_func_fchdir+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lc_r $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pthread_create (); ++#include + int + main () + { +-return pthread_create (); ++void *x=fchdir + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_c_r_pthread_create=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_fchdir=yes + else +- ac_cv_lib_c_r_pthread_create=no ++ ac_cv_func_fchdir=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 +-$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } +-if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fchdir" >&5 ++$as_echo "$ac_cv_func_fchdir" >&6; } ++ if test "x$ac_cv_func_fchdir" = xyes; then : + +- posix_threads=yes +- LIBS="$LIBS -lc_r" ++$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h + +-else ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 +-$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } +-if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 ++$as_echo_n "checking for fsync... " >&6; } ++if ${ac_cv_func_fsync+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpthread $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char __pthread_create_system (); ++#include + int + main () + { +-return __pthread_create_system (); ++void *x=fsync + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_pthread___pthread_create_system=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_fsync=yes + else +- ac_cv_lib_pthread___pthread_create_system=no ++ ac_cv_func_fsync=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 +-$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } +-if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fsync" >&5 ++$as_echo "$ac_cv_func_fsync" >&6; } ++ if test "x$ac_cv_func_fsync" = xyes; then : + +- posix_threads=yes +- LIBS="$LIBS -lpthread" ++$as_echo "#define HAVE_FSYNC 1" >>confdefs.h + +-else ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 +-$as_echo_n "checking for pthread_create in -lcma... " >&6; } +-if ${ac_cv_lib_cma_pthread_create+:} false; then : ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 ++$as_echo_n "checking for fdatasync... " >&6; } ++if ${ac_cv_func_fdatasync+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcma $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pthread_create (); ++#include + int + main () + { +-return pthread_create (); ++void *x=fdatasync + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_cma_pthread_create=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_fdatasync=yes + else +- ac_cv_lib_cma_pthread_create=no ++ ac_cv_func_fdatasync=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 +-$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } +-if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fdatasync" >&5 ++$as_echo "$ac_cv_func_fdatasync" >&6; } ++ if test "x$ac_cv_func_fdatasync" = xyes; then : ++ ++$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h ++ ++fi ++ ++ ++ + +- posix_threads=yes +- LIBS="$LIBS -lcma" + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create" >&5 ++$as_echo_n "checking for epoll_create... " >&6; } ++if ${ac_cv_func_epoll_create+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++void *x=epoll_create ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_epoll_create=yes + else +- +- case $ac_sys_system in #( +- WASI) : +- posix_threads=stub ;; #( +- *) : +- as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 +- ;; +-esac +- ++ ac_cv_func_epoll_create=no + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create" >&5 ++$as_echo "$ac_cv_func_epoll_create" >&6; } ++ if test "x$ac_cv_func_epoll_create" = xyes; then : + +-fi ++$as_echo "#define HAVE_EPOLL 1" >>confdefs.h + + fi + +-fi + +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 +-$as_echo_n "checking for usconfig in -lmpc... " >&6; } +-if ${ac_cv_lib_mpc_usconfig+:} false; then : ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 ++$as_echo_n "checking for epoll_create1... " >&6; } ++if ${ac_cv_func_epoll_create1+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lmpc $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char usconfig (); ++#include + int + main () + { +-return usconfig (); ++void *x=epoll_create1 + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_mpc_usconfig=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_epoll_create1=yes + else +- ac_cv_lib_mpc_usconfig=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ ac_cv_func_epoll_create1=no + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 +-$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } +-if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : +- +- LIBS="$LIBS -lmpc" ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create1" >&5 ++$as_echo "$ac_cv_func_epoll_create1" >&6; } ++ if test "x$ac_cv_func_epoll_create1" = xyes; then : + ++$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h + + fi + +-if test "$posix_threads" = "yes"; then +- if test "$unistd_defines_pthreads" = "no"; then +- +-$as_echo "#define _POSIX_THREADS 1" >>confdefs.h +- +- fi +- +- # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. +- case $ac_sys_system/$ac_sys_release in +- SunOS/5.6) +-$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h +- +- ;; +- SunOS/5.8) +-$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + +- ;; +- AIX/*) +-$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + +- ;; +- NetBSD/*) +-$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + +- ;; +- esac + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 +-$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } +-if ${ac_cv_pthread_system_supported+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 ++$as_echo_n "checking for kqueue... " >&6; } ++if ${ac_cv_func_kqueue+:} false; then : + $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then : +- ac_cv_pthread_system_supported=no + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- #include +- #include +- void *foo(void *parm) { +- return NULL; +- } +- int main(void) { +- pthread_attr_t attr; +- pthread_t id; +- if (pthread_attr_init(&attr)) return (-1); +- if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1); +- if (pthread_create(&id, &attr, foo, NULL)) return (-1); +- return (0); +- } ++#include ++#include ++ ++int ++main () ++{ ++void *x=kqueue ++ ; ++ return 0; ++} + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_pthread_system_supported=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_kqueue=yes + else +- ac_cv_pthread_system_supported=no ++ ac_cv_func_kqueue=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_kqueue" >&5 ++$as_echo "$ac_cv_func_kqueue" >&6; } ++ if test "x$ac_cv_func_kqueue" = xyes; then : + ++$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 +-$as_echo "$ac_cv_pthread_system_supported" >&6; } +- if test "$ac_cv_pthread_system_supported" = "yes"; then + +-$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h + +- fi +- for ac_func in pthread_sigmask +-do : +- ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" +-if test "x$ac_cv_func_pthread_sigmask" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_PTHREAD_SIGMASK 1 +-_ACEOF +- case $ac_sys_system in +- CYGWIN*) + +-$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h + +- ;; +- esac +-fi +-done + +- for ac_func in pthread_getcpuclockid +-do : +- ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" +-if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_PTHREAD_GETCPUCLOCKID 1 +-_ACEOF ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 ++$as_echo_n "checking for prlimit... " >&6; } ++if ${ac_cv_func_prlimit+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include + ++int ++main () ++{ ++void *x=prlimit ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_prlimit=yes ++else ++ ac_cv_func_prlimit=no + fi +-done ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_prlimit" >&5 ++$as_echo "$ac_cv_func_prlimit" >&6; } ++ if test "x$ac_cv_func_prlimit" = xyes; then : + +-if test "x$posix_threads" = xstub; then : ++$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h + ++fi + +-$as_echo "#define HAVE_PTHREAD_STUBS 1" >>confdefs.h + + +-fi + +-# Check for enable-ipv6 + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 +-$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } +-# Check whether --enable-ipv6 was given. +-if test "${enable_ipv6+set}" = set; then : +- enableval=$enable_ipv6; case "$enableval" in +- no) +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- ipv6=no +- ;; +- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- $as_echo "#define ENABLE_IPV6 1" >>confdefs.h + +- ipv6=yes +- ;; +- esac ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 ++$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; } ++if ${ac_cv_func__dyld_shared_cache_contains_path+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- /* AF_INET6 available check */ +-#include +-#include ++#include + int + main () + { +-int domain = AF_INET6; ++void *x=_dyld_shared_cache_contains_path + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- +- ipv6=yes +- ++ ac_cv_func__dyld_shared_cache_contains_path=yes + else ++ ac_cv_func__dyld_shared_cache_contains_path=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +- ipv6=no ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func__dyld_shared_cache_contains_path" >&5 ++$as_echo "$ac_cv_func__dyld_shared_cache_contains_path" >&6; } ++ if test "x$ac_cv_func__dyld_shared_cache_contains_path" = xyes; then : ++ ++$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h + + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-case $ac_sys_system in #( +- WASI) : +- ipv6=no +- ;; #( +- *) : +- ;; +-esac + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6" >&5 +-$as_echo "$ipv6" >&6; } + +-if test "$ipv6" = "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 +-$as_echo_n "checking if RFC2553 API is available... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 ++$as_echo_n "checking for memfd_create... " >&6; } ++if ${ac_cv_func_memfd_create+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- #include +-#include ++#ifdef HAVE_SYS_MMAN_H ++#include ++#endif ++#ifdef HAVE_SYS_MEMFD_H ++#include ++#endif ++ + int + main () + { +-struct sockaddr_in6 x; +- x.sin6_scope_id; ++void *x=memfd_create + ; + return 0; + } +- + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- ipv6=yes +- ++ ac_cv_func_memfd_create=yes + else +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- ipv6=no +- ++ ac_cv_func_memfd_create=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memfd_create" >&5 ++$as_echo "$ac_cv_func_memfd_create" >&6; } ++ if test "x$ac_cv_func_memfd_create" = xyes; then : + +-if test "$ipv6" = "yes"; then +- $as_echo "#define ENABLE_IPV6 1" >>confdefs.h ++$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h + + fi + +-fi + + +-ipv6type=unknown +-ipv6lib=none +-ipv6trylibc=no + +-if test "$ipv6" = yes -a "$cross_compiling" = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 +-$as_echo_n "checking ipv6 stack type... " >&6; } +- for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; +- do +- case $i in +- inria) +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#include +-#ifdef IPV6_INRIA_VERSION +-yes +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- ipv6type=$i +-fi +-rm -f conftest* + +- ;; +- kame) +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 ++$as_echo_n "checking for eventfd... " >&6; } ++if ${ac_cv_func_eventfd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#ifdef __KAME__ +-yes ++#ifdef HAVE_SYS_EVENTFD_H ++#include + #endif ++ ++int ++main () ++{ ++void *x=eventfd ++ ; ++ return 0; ++} + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- ipv6type=$i; +- ipv6lib=inet6 +- ipv6libdir=/usr/local/v6/lib +- ipv6trylibc=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_eventfd=yes ++else ++ ac_cv_func_eventfd=no + fi +-rm -f conftest* - --save_CFLAGS=$CFLAGS --save_CPPFLAGS=$CPPFLAGS --save_LDFLAGS=$LDFLAGS --save_LIBS=$LIBS +- ;; +- linux-glibc) +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-#include +-#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) +-yes +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- ipv6type=$i; +- ipv6trylibc=yes + fi +-rm -f conftest* ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_eventfd" >&5 ++$as_echo "$ac_cv_func_eventfd" >&6; } ++ if test "x$ac_cv_func_eventfd" = xyes; then : + +- ;; +- linux-inet6) +- if test -d /usr/inet6; then +- ipv6type=$i +- ipv6lib=inet6 +- ipv6libdir=/usr/inet6/lib +- BASECFLAGS="-I/usr/inet6/include $BASECFLAGS" +- fi +- ;; +- solaris) +- if test -f /etc/netconfig; then +- if $GREP -q tcp6 /etc/netconfig; then +- ipv6type=$i +- ipv6trylibc=yes +- fi +- fi +- ;; +- toshiba) +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h + +-#include +-#ifdef _TOSHIBA_INET6 +-yes +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- ipv6type=$i; +- ipv6lib=inet6; +- ipv6libdir=/usr/local/v6/lib + fi +-rm -f conftest* + +- ;; +- v6d) +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#include +-#ifdef __V6D__ +-yes +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- ipv6type=$i; +- ipv6lib=v6; +- ipv6libdir=/usr/local/v6/lib; +- BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" +-fi +-rm -f conftest* + +- ;; +- zeta) +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#include +-#ifdef _ZETA_MINAMI_INET6 +-yes +-#endif ++# On some systems (eg. FreeBSD 5), we would find a definition of the ++# functions ctermid_r, setgroups in the library, but no prototype ++# (e.g. because we use _XOPEN_SOURCE). See whether we can take their ++# address to avoid compiler warnings and potential miscompilations ++# because of the missing prototypes. ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 ++$as_echo_n "checking for ctermid_r... " >&6; } ++if ${ac_cv_func_ctermid_r+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++void *x=ctermid_r ++ ; ++ return 0; ++} + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- ipv6type=$i; +- ipv6lib=inet6; +- ipv6libdir=/usr/local/v6/lib ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_ctermid_r=yes ++else ++ ac_cv_func_ctermid_r=no + fi +-rm -f conftest* ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ctermid_r" >&5 ++$as_echo "$ac_cv_func_ctermid_r" >&6; } ++ if test "x$ac_cv_func_ctermid_r" = xyes; then : ++ ++$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h + +- ;; +- esac +- if test "$ipv6type" != "unknown"; then +- break +- fi +- done +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 +-$as_echo "$ipv6type" >&6; } + fi + +-if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then +- if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then +- LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" +- { $as_echo "$as_me:${as_lineno-$LINENO}: using lib$ipv6lib" >&5 +-$as_echo "$as_me: using lib$ipv6lib" >&6;} +- else +- if test "x$ipv6trylibc" = xyes; then : + +- { $as_echo "$as_me:${as_lineno-$LINENO}: using libc" >&5 +-$as_echo "$as_me: using libc" >&6;} + ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 ++$as_echo_n "checking for flock declaration... " >&6; } ++if ${ac_cv_flock_decl+:} false; then : ++ $as_echo_n "(cached) " >&6 + else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++void* p = flock + +- as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_flock_decl=yes ++else ++ ac_cv_flock_decl=no + + fi +- fi +-fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 ++$as_echo "$ac_cv_flock_decl" >&6; } ++if test "x$ac_cv_flock_decl" = xyes; then : ++ for ac_func in flock ++do : ++ ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" ++if test "x$ac_cv_func_flock" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_FLOCK 1 ++_ACEOF + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CAN_RAW_FD_FRAMES" >&5 +-$as_echo_n "checking CAN_RAW_FD_FRAMES... " >&6; } +-if ${ac_cv_can_raw_fd_frames+:} false; then : ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 ++$as_echo_n "checking for flock in -lbsd... " >&6; } ++if ${ac_cv_lib_bsd_flock+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- /* CAN_RAW_FD_FRAMES available check */ +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char flock (); + int + main () + { +-int can_raw_fd_frames = CAN_RAW_FD_FRAMES; ++return flock (); + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_can_raw_fd_frames=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_bsd_flock=yes + else +- ac_cv_can_raw_fd_frames=no ++ ac_cv_lib_bsd_flock=no + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 ++$as_echo "$ac_cv_lib_bsd_flock" >&6; } ++if test "x$ac_cv_lib_bsd_flock" = xyes; then : ++ FCNTL_LIBS="-lbsd" + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_fd_frames" >&5 +-$as_echo "$ac_cv_can_raw_fd_frames" >&6; } +-if test "x$ac_cv_can_raw_fd_frames" = xyes; then : + ++fi ++done + +-$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h ++fi + + +-fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5 +-$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; } +-if ${ac_cv_can_raw_join_filters+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 ++$as_echo_n "checking for getpagesize... " >&6; } ++if ${ac_cv_func_getpagesize+:} false; then : + $as_echo_n "(cached) " >&6 + else - -- CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS" -- LIBS="$TCLTK_LIBS $LDFLAGS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ - -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ +-#include ++#include + int + main () + { +-int can_raw_join_filters = CAN_RAW_JOIN_FILTERS; ++void *x=getpagesize + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_can_raw_join_filters=yes ++ ac_cv_func_getpagesize=yes + else +- ac_cv_can_raw_join_filters=no ++ ac_cv_func_getpagesize=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_join_filters" >&5 +-$as_echo "$ac_cv_can_raw_join_filters" >&6; } +-if test "x$ac_cv_can_raw_join_filters" = xyes; then : - - -- #include -- #include -- #if defined(TK_HEX_VERSION) -- # if TK_HEX_VERSION < 0x0805020c -- # error "Tk older than 8.5.12 not supported" -- # endif -- #endif -- #if (TCL_MAJOR_VERSION < 8) || \ -- ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 5)) || \ -- ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION == 5) && (TCL_RELEASE_SERIAL < 12)) -- # error "Tcl older than 8.5.12 not supported" -- #endif -- #if (TK_MAJOR_VERSION < 8) || \ -- ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION < 5)) || \ -- ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION == 5) && (TK_RELEASE_SERIAL < 12)) -- # error "Tk older than 8.5.12 not supported" -- #endif +-$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h - --int --main () --{ - -- void *x1 = Tcl_Init; -- void *x2 = Tk_Init; +-fi - -- ; -- return 0; --} +-# Check for --with-doc-strings +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 +-$as_echo_n "checking for --with-doc-strings... " >&6; } - --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : +-# Check whether --with-doc-strings was given. +-if test "${with_doc_strings+set}" = set; then : +- withval=$with_doc_strings; +-fi - -- have_tcltk=yes -- as_fn_append TCLTK_CFLAGS " -Wno-strict-prototypes -DWITH_APPINIT=1" - --else +-if test -z "$with_doc_strings" +-then with_doc_strings="yes" +-fi +-if test "$with_doc_strings" != "no" +-then - -- have_tcltk=no +-$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h - -fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 +-$as_echo "$with_doc_strings" >&6; } - --CFLAGS=$save_CFLAGS --CPPFLAGS=$save_CPPFLAGS --LDFLAGS=$save_LDFLAGS --LIBS=$save_LIBS +-# Check for Python-specific malloc support +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 +-$as_echo_n "checking for --with-pymalloc... " >&6; } - +-# Check whether --with-pymalloc was given. +-if test "${with_pymalloc+set}" = set; then : +- withval=$with_pymalloc; +-fi - - +-if test -z "$with_pymalloc" +-then +- case $ac_sys_system in #( +- Emscripten) : +- with_pymalloc="no" ;; #( +- WASI) : +- with_pymalloc="no" ;; #( +- *) : +- with_pymalloc="yes" +- ;; +-esac +-fi +-if test "$with_pymalloc" != "no" +-then - +-$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h - --save_CFLAGS=$CFLAGS --save_CPPFLAGS=$CPPFLAGS --save_LDFLAGS=$LDFLAGS --save_LIBS=$LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 +-$as_echo "$with_pymalloc" >&6; } - +-# Check whether objects such as float, tuple and dict are using +-# freelists to optimization memory allocation. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-freelists" >&5 +-$as_echo_n "checking for --with-freelists... " >&6; } - -- CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS" -- LDFLAGS="$GDBM_LIBS $LDFLAGS" -- for ac_header in gdbm.h --do : -- ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default" --if test "x$ac_cv_header_gdbm_h" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_GDBM_H 1 --_ACEOF +-# Check whether --with-freelists was given. +-if test "${with_freelists+set}" = set; then : +- withval=$with_freelists; +-fi - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5 --$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; } --if ${ac_cv_lib_gdbm_gdbm_open+:} false; then : -- $as_echo_n "(cached) " >&6 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_load_extension in -lsqlite3" >&5 -+$as_echo_n "checking for sqlite3_load_extension in -lsqlite3... " >&6; } -+if ${ac_cv_lib_sqlite3_sqlite3_load_extension+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lgdbm $LIBS" -+LIBS="-lsqlite3 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -13716,113 +13804,40 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char gdbm_open (); -+char sqlite3_load_extension (); - int - main () - { --return gdbm_open (); -+return sqlite3_load_extension (); - ; - return 0; - } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_gdbm_gdbm_open=yes -+ ac_cv_lib_sqlite3_sqlite3_load_extension=yes - else -- ac_cv_lib_gdbm_gdbm_open=no -+ ac_cv_lib_sqlite3_sqlite3_load_extension=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5 --$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; } --if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then : - -- have_gdbm=yes -- GDBM_LIBS=${GDBM_LIBS-"-lgdbm"} +-if test -z "$with_freelists" +-then +- with_freelists="yes" +-fi +-if test "$with_freelists" != "no" +-then +- +-$as_echo "#define WITH_FREELISTS 1" >>confdefs.h - --else -- have_gdbm=no -fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freelists" >&5 +-$as_echo "$with_freelists" >&6; } - +-# Check for --with-c-locale-coercion +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 +-$as_echo_n "checking for --with-c-locale-coercion... " >&6; } - --else -- have_gdbm=no +-# Check whether --with-c-locale-coercion was given. +-if test "${with_c_locale_coercion+set}" = set; then : +- withval=$with_c_locale_coercion; +-fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpagesize" >&5 ++$as_echo "$ac_cv_func_getpagesize" >&6; } ++ if test "x$ac_cv_func_getpagesize" = xyes; then : + ++$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h + +-if test -z "$with_c_locale_coercion" +-then +- with_c_locale_coercion="yes" + fi +-if test "$with_c_locale_coercion" != "no" +-then + +-$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 +-$as_echo "$with_c_locale_coercion" >&6; } + +-# Check for Valgrind support +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 +-$as_echo_n "checking for --with-valgrind... " >&6; } + +-# Check whether --with-valgrind was given. +-if test "${with_valgrind+set}" = set; then : +- withval=$with_valgrind; ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 ++$as_echo_n "checking for broken unsetenv... " >&6; } ++if ${ac_cv_broken_unsetenv+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- with_valgrind=no -fi - --done -- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 +-$as_echo "$with_valgrind" >&6; } +-if test "$with_valgrind" != no; then +- ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" +-if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : - --CFLAGS=$save_CFLAGS --CPPFLAGS=$save_CPPFLAGS --LDFLAGS=$save_LDFLAGS --LIBS=$save_LIBS +-$as_echo "#define WITH_VALGRIND 1" >>confdefs.h - ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++int res = unsetenv("DUMMY") ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_broken_unsetenv=no + else +- as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 - +-fi - --# check for _dbmmodule.c dependencies --for ac_header in ndbm.h --do : -- ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default" --if test "x$ac_cv_header_ndbm_h" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_NDBM_H 1 --_ACEOF ++ ac_cv_broken_unsetenv=yes + +- OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-# Check for DTrace support +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 +-$as_echo_n "checking for --with-dtrace... " >&6; } - -- LIBS_SAVE="$LIBS" -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lndbm" >&5 --$as_echo_n "checking for dbm_open in -lndbm... " >&6; } --if ${ac_cv_lib_ndbm_dbm_open+:} false; then : -- $as_echo_n "(cached) " >&6 +-# Check whether --with-dtrace was given. +-if test "${with_dtrace+set}" = set; then : +- withval=$with_dtrace; -else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lndbm $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ +- with_dtrace=no + fi - --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char dbm_open (); --int --main () --{ --return dbm_open (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_ndbm_dbm_open=yes -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5 -+$as_echo "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; } -+if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes; then : -+ have_sqlite3_load_extension=yes - else -- ac_cv_lib_ndbm_dbm_open=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbm_dbm_open" >&5 --$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; } --if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBNDBM 1 --_ACEOF +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 +-$as_echo "$with_dtrace" >&6; } - -- LIBS="-lndbm $LIBS" -+ have_sqlite3_load_extension=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_unsetenv" >&5 ++$as_echo "$ac_cv_broken_unsetenv" >&6; } ++if test "x$ac_cv_broken_unsetenv" = xyes; then : - fi -- LIBS="$LIBS_SAVE" -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm_compat" >&5 --$as_echo_n "checking for dbm_open in -lgdbm_compat... " >&6; } --if ${ac_cv_lib_gdbm_compat_dbm_open+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_serialize in -lsqlite3" >&5 -+$as_echo_n "checking for sqlite3_serialize in -lsqlite3... " >&6; } -+if ${ac_cv_lib_sqlite3_sqlite3_serialize+:} false; then : ++$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h + + +-DTRACE= +-DTRACE_HEADERS= +-DTRACE_OBJS= ++fi + +-if test "$with_dtrace" = "yes" +-then +- # Extract the first word of "dtrace", so it can be a program name with args. +-set dummy dtrace; ac_word=$2 ++for ac_prog in true ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_path_DTRACE+:} false; then : ++if ${ac_cv_prog_TRUE+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lgdbm_compat $LIBS" -+LIBS="-lsqlite3 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ +- case $DTRACE in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ if test -n "$TRUE"; then ++ ac_cv_prog_TRUE="$TRUE" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" ++ ac_cv_prog_TRUE="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -15082,339 +16571,568 @@ done + done + IFS=$as_save_IFS -@@ -13832,356 +13847,384 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char dbm_open (); -+char sqlite3_serialize (); - int - main () - { --return dbm_open (); -+return sqlite3_serialize (); - ; - return 0; - } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_gdbm_compat_dbm_open=yes -+ ac_cv_lib_sqlite3_sqlite3_serialize=yes - else -- ac_cv_lib_gdbm_compat_dbm_open=no -+ ac_cv_lib_sqlite3_sqlite3_serialize=no +- test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" +- ;; +-esac fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS +-DTRACE=$ac_cv_path_DTRACE +-if test -n "$DTRACE"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 +-$as_echo "$DTRACE" >&6; } ++fi ++TRUE=$ac_cv_prog_TRUE ++if test -n "$TRUE"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 ++$as_echo "$TRUE" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5 --$as_echo "$ac_cv_lib_gdbm_compat_dbm_open" >&6; } --if test "x$ac_cv_lib_gdbm_compat_dbm_open" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBGDBM_COMPAT 1 --_ACEOF -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_serialize" >&5 -+$as_echo "$ac_cv_lib_sqlite3_sqlite3_serialize" >&6; } -+if test "x$ac_cv_lib_sqlite3_sqlite3_serialize" = xyes; then : - -- LIBS="-lgdbm_compat $LIBS" --fi -+$as_echo "#define PY_SQLITE_HAVE_SERIALIZE 1" >>confdefs.h -- LIBS="$LIBS_SAVE" +- if test "$DTRACE" = "not found"; then +- as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 +- fi ++ test -n "$TRUE" && break ++done ++test -n "$TRUE" || TRUE="/bin/true" - fi +-$as_echo "#define WITH_DTRACE 1" >>confdefs.h --done -- +- DTRACE_HEADERS="Include/pydtrace_probes.h" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 ++$as_echo_n "checking for inet_aton in -lc... " >&6; } ++if ${ac_cv_lib_c_inet_aton+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lc $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ --# "gdbm-ndbm.h" and "gdbm/ndbm.h" are both normalized to "gdbm_ndbm_h" --# unset ac_cv_header_gdbm_ndbm_h to prevent false positive cache hits. --{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} --if ${ac_cv_header_gdbm_slash_ndbm_h+:} false; then : -- $as_echo_n "(cached) " >&6 +- # On OS X, DTrace providers do not need to be explicitly compiled and +- # linked into the binary. Correspondingly, dtrace(1) is missing the ELF +- # generation flag '-G'. We check for presence of this flag, rather than +- # hardcoding support by OS, in the interest of robustness. +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 +-$as_echo_n "checking whether DTrace probes require linking... " >&6; } +-if ${ac_cv_dtrace_link+:} false; then : ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char inet_aton (); ++int ++main () ++{ ++return inet_aton (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_c_inet_aton=yes ++else ++ ac_cv_lib_c_inet_aton=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 ++$as_echo "$ac_cv_lib_c_inet_aton" >&6; } ++if test "x$ac_cv_lib_c_inet_aton" = xyes; then : ++ $ac_cv_prog_TRUE ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 ++$as_echo_n "checking for inet_aton in -lresolv... " >&6; } ++if ${ac_cv_lib_resolv_inet_aton+:} false; then : + $as_echo_n "(cached) " >&6 else +- ac_cv_dtrace_link=no +- echo 'BEGIN{}' > conftest.d +- "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ +- ac_cv_dtrace_link=yes ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lresolv $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ -- ac_fn_c_check_header_mongrel "$LINENO" "gdbm/ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" --if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : -- ac_cv_header_gdbm_slash_ndbm_h=yes --else -- ac_cv_header_gdbm_slash_ndbm_h=no -+ have_supported_sqlite3=no - ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char inet_aton (); ++int ++main () ++{ ++return inet_aton (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_resolv_inet_aton=yes ++else ++ ac_cv_lib_resolv_inet_aton=no fi -- -- -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 +-$as_echo "$ac_cv_dtrace_link" >&6; } +- if test "$ac_cv_dtrace_link" = "yes"; then +- DTRACE_OBJS="Python/pydtrace.o" +- fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 ++$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } ++if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBRESOLV 1 ++_ACEOF --if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes; then : - - --$as_echo "#define HAVE_GDBM_NDBM_H 1" >>confdefs.h -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS - - --fi - --{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} --if ${ac_cv_header_gdbm_dash_ndbm_h+:} false; then : -- $as_echo_n "(cached) " >&6 --else -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5 -+$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; } -+# Check whether --enable-loadable-sqlite-extensions was given. -+if test "${enable_loadable_sqlite_extensions+set}" = set; then : -+ enableval=$enable_loadable_sqlite_extensions; -+ if test "x$have_sqlite3_load_extension" = xno; then : -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: n/a" >&5 -+$as_echo "n/a" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of SQLite does not support loadable extensions" >&5 -+$as_echo "$as_me: WARNING: Your version of SQLite does not support loadable extensions" >&2;} - -- ac_fn_c_check_header_mongrel "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" --if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : -- ac_cv_header_gdbm_dash_ndbm_h=yes - else -- ac_cv_header_gdbm_dash_ndbm_h=no +-PLATFORM_HEADERS= +-PLATFORM_OBJS= ++ LIBS="-lresolv $LIBS" --fi -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } +-case $ac_sys_system in #( +- Emscripten) : ++fi -+$as_echo "#define PY_SQLITE_ENABLE_LOAD_EXTENSION 1" >>confdefs.h +- as_fn_append PLATFORM_OBJS ' Python/emscripten_signal.o' +- as_fn_append PLATFORM_HEADERS ' $(srcdir)/Include/internal/pycore_emscripten_signal.h' +- ;; #( +- *) : +- ;; +-esac ++fi - fi --if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes; then : -- +-# -I${DLINCLDIR} is added to the compile rule for importdl.o ++# On Tru64, chflags seems to be present, but calling it will ++# exit Python ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 ++$as_echo_n "checking for chflags... " >&6; } ++if ${ac_cv_have_chflags+:} false; then : ++ $as_echo_n "(cached) " >&6 +else ++ if test "$cross_compiling" = yes; then : ++ ac_cv_have_chflags=cross ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ --$as_echo "#define HAVE_GDBM_DASH_NDBM_H 1" >>confdefs.h -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - - - fi --{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} - --if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then -- LIBS_SAVE="$LIBS" -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm_compat" >&5 --$as_echo_n "checking for dbm_open in -lgdbm_compat... " >&6; } --if ${ac_cv_lib_gdbm_compat_dbm_open+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lgdbm_compat $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ +-DLINCLDIR=. ++#include ++#include ++int main(int argc, char *argv[]) ++{ ++ if(chflags(argv[0], 0) != 0) ++ return 1; ++ return 0; ++} --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char dbm_open (); --int --main () --{ --return dbm_open (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_gdbm_compat_dbm_open=yes -+found_tcltk=no -+for _QUERY in \ -+ "tcl >= 8.5.12 tk >= 8.5.12" \ -+ "tcl8.6 tk8.6" \ -+ "tcl86 tk86" \ -+ "tcl8.5 >= 8.5.12 tk8.5 >= 8.5.12" \ -+ "tcl85 >= 8.5.12 tk85 >= 8.5.12" \ -+; do -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$_QUERY\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "$_QUERY") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ -+ -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLTK" >&5 -+$as_echo_n "checking for TCLTK... " >&6; } -+ -+if test -n "$TCLTK_CFLAGS"; then -+ pkg_cv_TCLTK_CFLAGS="$TCLTK_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$_QUERY\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "$_QUERY") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_TCLTK_CFLAGS=`$PKG_CONFIG --cflags "$_QUERY" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else -- ac_cv_lib_gdbm_compat_dbm_open=no -+ pkg_failed=yes - fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+ else -+ pkg_failed=untried - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5 --$as_echo "$ac_cv_lib_gdbm_compat_dbm_open" >&6; } --if test "x$ac_cv_lib_gdbm_compat_dbm_open" = xyes; then : +-# the dlopen() function means we might want to use dynload_shlib.o. some +-# platforms have dlopen(), but don't want to use it. +-for ac_func in dlopen +-do : +- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +-if test "x$ac_cv_func_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_LIBGDBM_COMPAT 1 --_ACEOF -+if test -n "$TCLTK_LIBS"; then -+ pkg_cv_TCLTK_LIBS="$TCLTK_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$_QUERY\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "$_QUERY") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_TCLTK_LIBS=`$PKG_CONFIG --libs "$_QUERY" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes +-#define HAVE_DLOPEN 1 + _ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_have_chflags=yes ++else ++ ac_cv_have_chflags=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ + + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 ++$as_echo "$ac_cv_have_chflags" >&6; } ++if test "$ac_cv_have_chflags" = cross ; then ++ ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" ++if test "x$ac_cv_func_chflags" = xyes; then : ++ ac_cv_have_chflags="yes" +else -+ pkg_failed=yes ++ ac_cv_have_chflags="no" +fi -+ else -+ pkg_failed=untried + +fi -+ ++if test "$ac_cv_have_chflags" = yes ; then -- LIBS="-lgdbm_compat $LIBS" +-# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic +-# loading of modules. ++$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 +-$as_echo_n "checking DYNLOADFILE... " >&6; } +-if test -z "$DYNLOADFILE" +-then +- case $ac_sys_system/$ac_sys_release in +- hp*|HP*) DYNLOADFILE="dynload_hpux.o";; +- *) +- # use dynload_shlib.c and dlopen() if we have it; otherwise stub +- # out any dynamic loading +- if test "$ac_cv_func_dlopen" = yes +- then DYNLOADFILE="dynload_shlib.o" +- else DYNLOADFILE="dynload_stub.o" +- fi +- ;; +- esac fi -+ if test $_pkg_short_errors_supported = yes; then -+ TCLTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$_QUERY" 2>&1` -+ else -+ TCLTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$_QUERY" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$TCLTK_PKG_ERRORS" >&5 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 +-$as_echo "$DYNLOADFILE" >&6; } +-if test "$DYNLOADFILE" != "dynload_stub.o" +-then -- LIBS="$LIBS_SAVE" -+ found_tcltk=no -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ found_tcltk=no +-$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 ++$as_echo_n "checking for lchflags... " >&6; } ++if ${ac_cv_have_lchflags+:} false; then : ++ $as_echo_n "(cached) " >&6 +else -+ TCLTK_CFLAGS=$pkg_cv_TCLTK_CFLAGS -+ TCLTK_LIBS=$pkg_cv_TCLTK_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ found_tcltk=yes - fi - --# Check for libdb >= 5 with dbm_open() --# db.h re-defines the name of the function --for ac_header in db.h --do : -- ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" --if test "x$ac_cv_header_db_h" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_DB_H 1 --_ACEOF ++ if test "$cross_compiling" = yes; then : ++ ac_cv_have_lchflags=cross ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include ++int main(int argc, char *argv[]) ++{ ++ if(lchflags(argv[0], 0) != 0) ++ return 1; ++ return 0; ++} ++ ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_have_lchflags=yes ++else ++ ac_cv_have_lchflags=no +fi -+ if test "x$found_tcltk" = xyes; then : -+ break ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -+done - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdb" >&5 --$as_echo_n "checking for libdb... " >&6; } --if ${ac_cv_have_libdb+:} false; then : -- $as_echo_n "(cached) " >&6 --else -+if test "x$found_tcltk" = xno; then : ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 ++$as_echo "$ac_cv_have_lchflags" >&6; } ++if test "$ac_cv_have_lchflags" = cross ; then ++ ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" ++if test "x$ac_cv_func_lchflags" = xyes; then : ++ ac_cv_have_lchflags="yes" ++else ++ ac_cv_have_lchflags="no" ++fi ++ ++fi ++if test "$ac_cv_have_lchflags" = yes ; then ++ ++$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h ++ ++fi ++ ++ ++ ++ ++ ++ ++ if test "$ac_sys_system" = "Emscripten" -a -z "$ZLIB_CFLAGS" -a -z "$ZLIB_LIBS"; then : ++ ++ ZLIB_CFLAGS="-sUSE_ZLIB" ++ ZLIB_LIBS="-sUSE_ZLIB" -- LIBS_SAVE="$LIBS" -- LIBS="$LIBS -ldb" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+ TCLTK_CFLAGS=${TCLTK_CFLAGS-""} -+ TCLTK_LIBS=${TCLTK_LIBS-""} + fi -- #define DB_DBM_HSEARCH 1 -- #include -- #if DB_VERSION_MAJOR < 5 -- #error "dh.h: DB_VERSION_MAJOR < 5 is not supported." -- #endif -+fi +-# MACHDEP_OBJS can be set to platform-specific object files needed by Python --int --main () --{ --DBM *dbm = dbm_open(NULL, 0, 0) -- ; -- return 0; --} -+case $ac_sys_system in #( -+ FreeBSD*) : --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_have_libdb=yes -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "x11") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 +-$as_echo_n "checking MACHDEP_OBJS... " >&6; } +-if test -z "$MACHDEP_OBJS" +-then +- MACHDEP_OBJS=$extra_machdep_objs + + +pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 -+$as_echo_n "checking for X11... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 ++$as_echo_n "checking for ZLIB... " >&6; } + -+if test -n "$X11_CFLAGS"; then -+ pkg_cv_X11_CFLAGS="$X11_CFLAGS" ++if test -n "$ZLIB_CFLAGS"; then ++ pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then -+ pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` ++ pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else -- ac_cv_have_libdb=no +- MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" + pkg_failed=yes fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- LIBS="$LIBS_SAVE" -- +-if test -z "$MACHDEP_OBJS"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +-$as_echo "none" >&6; } + else + pkg_failed=untried +fi -+if test -n "$X11_LIBS"; then -+ pkg_cv_X11_LIBS="$X11_LIBS" ++if test -n "$ZLIB_LIBS"; then ++ pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then -+ pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` ++ pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes -+else + else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 +-$as_echo "$MACHDEP_OBJS" >&6; } + pkg_failed=yes +fi + else + pkg_failed=untried fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_libdb" >&5 --$as_echo "$ac_cv_have_libdb" >&6; } -- if test "x$ac_cv_have_libdb" = xyes; then : +-# checks for library functions +-for ac_func in \ +- accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ +- faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ +- fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ +- gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +- getgrnam_r getgrouplist getgroups gethostname getitimer getloadavg getlogin \ +- getpeername getpgid getpid getppid getpriority _getpty \ +- getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \ +- getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ +- lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ +- mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ +- pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ +- pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ +- rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +- sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ +- sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ +- setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ +- setresuid setreuid setsid setuid setvbuf shutdown sigaction sigaltstack \ +- sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ +- sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ +- sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ +- tmpnam tmpnam_r truncate ttyname umask uname unlinkat utimensat utimes vfork \ +- wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \ --$as_echo "#define HAVE_LIBDB 1" >>confdefs.h +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - ++ +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi +-done + if test $_pkg_short_errors_supported = yes; then -+ X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` ++ ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` + else -+ X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` ++ ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs -+ echo "$X11_PKG_ERRORS" >&5 - --fi -+ as_fn_error $? "Package requirements (x11) were not met: - --done -+$X11_PKG_ERRORS - -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. ++ echo "$ZLIB_PKG_ERRORS" >&5 --# Check for --with-dbmliborder --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 --$as_echo_n "checking for --with-dbmliborder... " >&6; } -+Alternatively, you may set the environment variables X11_CFLAGS -+and X11_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details." "$LINENO" 5 -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -+is in your PATH or set the PKG_CONFIG environment variable to the full -+path to pkg-config. --# Check whether --with-dbmliborder was given. --if test "${with_dbmliborder+set}" = set; then : -- withval=$with_dbmliborder; -+Alternatively, you may set the environment variables X11_CFLAGS -+and X11_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details. -+ -+To get pkg-config, see . -+See \`config.log' for more details" "$LINENO" 5; } - else -- with_dbmliborder=gdbm:ndbm:bdb -+ X11_CFLAGS=$pkg_cv_X11_CFLAGS -+ X11_LIBS=$pkg_cv_X11_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } +-# Force lchmod off for Linux. Linux disallows changing the mode of symbolic +-# links. Some libc implementations have a stub lchmod implementation that always +-# returns an error. +-if test "$MACHDEP" != linux; then +- for ac_func in lchmod ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS + -+ TCLTK_CFLAGS="$TCLTK_CFLAGS $X11_CFLAGS" -+ TCLTK_LIBS="$TCLTK_LIBS $X11_LIBS" + - fi - -+fi ++ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" ++ LDFLAGS="$LDFLAGS $ZLIB_LIBS" ++ for ac_header in zlib.h + do : +- ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" +-if test "x$ac_cv_func_lchmod" = xyes; then : ++ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_zlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_LCHMOD 1 ++#define HAVE_ZLIB_H 1 + _ACEOF --have_gdbm_dbmliborder=no --as_save_IFS=$IFS --IFS=: --for db in $with_dbmliborder; do -- case $db in #( -- ndbm) : -- ;; #( -- gdbm) : -- have_gdbm_dbmliborder=yes ;; #( -- bdb) : -- ;; #( -+ ;; #( - *) : -- with_dbmliborder=error - ;; - esac +-fi -done --IFS=$as_save_IFS --if test "x$with_dbmliborder" = xerror; then : ++ py_check_lib_save_LIBS=$LIBS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 ++$as_echo_n "checking for gzread in -lz... " >&6; } ++if ${ac_cv_lib_z_gzread+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lz $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char gzread (); ++int ++main () ++{ ++return gzread (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_z_gzread=yes ++else ++ ac_cv_lib_z_gzread=no + fi - -- as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:... (gdbm:ndbm:bdb)" "$LINENO" 5 +-ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include +- #include +-" +-if test "x$ac_cv_have_decl_dirfd" = xyes; then : - --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 --$as_echo "$with_dbmliborder" >&6; } +-$as_echo "#define HAVE_DIRFD 1" >>confdefs.h - --# Templates for things AC_DEFINEd more than once. --# For a single AC_DEFINE, no template is needed. - -+save_CFLAGS=$CFLAGS -+save_CPPFLAGS=$CPPFLAGS -+save_LDFLAGS=$LDFLAGS -+save_LIBS=$LIBS ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 ++$as_echo "$ac_cv_lib_z_gzread" >&6; } ++if test "x$ac_cv_lib_z_gzread" = xyes; then : ++ have_zlib=yes ++else ++ have_zlib=no + fi --if test "$ac_cv_pthread_is_default" = yes --then -- # Defining _REENTRANT on system with POSIX threads should not hurt. -- $as_echo "#define _REENTRANT 1" >>confdefs.h ++LIBS=$py_check_lib_save_LIBS -- posix_threads=yes -- if test "$ac_sys_system" = "SunOS"; then -- CFLAGS="$CFLAGS -D_REENTRANT" -- fi --elif test "$ac_cv_kpthread" = "yes" --then -- CC="$CC -Kpthread" -- if test "$ac_cv_cxx_thread" = "yes"; then -- CXX="$CXX -Kpthread" -- fi -- posix_threads=yes --elif test "$ac_cv_kthread" = "yes" --then -- CC="$CC -Kthread" -- if test "$ac_cv_cxx_thread" = "yes"; then -- CXX="$CXX -Kthread" -- fi -- posix_threads=yes --elif test "$ac_cv_pthread" = "yes" --then -- CC="$CC -pthread" -- if test "$ac_cv_cxx_thread" = "yes"; then -- CXX="$CXX -pthread" -- fi -- posix_threads=yes --else -- if test ! -z "$withval" -a -d "$withval" -- then LDFLAGS="$LDFLAGS -L$withval" -- fi -+ CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS" -+ LIBS="$TCLTK_LIBS $LDFLAGS" -- # According to the POSIX spec, a pthreads implementation must -- # define _POSIX_THREADS in unistd.h. Some apparently don't -- # (e.g. gnu pth with pthread emulation) -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 --$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ ++else ++ have_zlib=no ++fi --#include --#ifdef _POSIX_THREADS --yes --#endif -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- unistd_defines_pthreads=yes --else -- unistd_defines_pthreads=no --fi --rm -f conftest* -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 --$as_echo "$unistd_defines_pthreads" >&6; } -- -- $as_echo "#define _REENTRANT 1" >>confdefs.h -- -- # Just looking for pthread_create in libpthread is not enough: -- # on HP/UX, pthread.h renames pthread_create to a different symbol name. -- # So we really have to include pthread.h, and then link. -- _libs=$LIBS -- LIBS="$LIBS -lpthread" -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 --$as_echo_n "checking for pthread_create in -lpthread... " >&6; } -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ +-# For some functions, having a definition is not sufficient, since +-# we want to take their address. ++done --#include --#include --#include -+ #include -+ #include -+ #if defined(TK_HEX_VERSION) -+ # if TK_HEX_VERSION < 0x0805020c -+ # error "Tk older than 8.5.12 not supported" -+ # endif -+ #endif -+ #if (TCL_MAJOR_VERSION < 8) || \ -+ ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 5)) || \ -+ ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION == 5) && (TCL_RELEASE_SERIAL < 12)) -+ # error "Tcl older than 8.5.12 not supported" -+ #endif -+ #if (TK_MAJOR_VERSION < 8) || \ -+ ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION < 5)) || \ -+ ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION == 5) && (TK_RELEASE_SERIAL < 12)) -+ # error "Tk older than 8.5.12 not supported" -+ #endif ++ if test "x$have_zlib" = xyes; then : --void * start_routine (void *arg) { exit (0); } +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 +-$as_echo_n "checking for chroot... " >&6; } +-if ${ac_cv_func_chroot+:} false; then : ++ ZLIB_CFLAGS=${ZLIB_CFLAGS-""} ++ ZLIB_LIBS=${ZLIB_LIBS-"-lz"} ++ py_check_lib_save_LIBS=$LIBS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 ++$as_echo_n "checking for inflateCopy in -lz... " >&6; } ++if ${ac_cv_lib_z_inflateCopy+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lz $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char inflateCopy (); int main () { - --pthread_create (NULL, NULL, start_routine, NULL) -+ void *x1 = Tcl_Init; -+ void *x2 = Tk_Init; -+ +-void *x=chroot ++return inflateCopy (); ; return 0; } -+ _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- posix_threads=yes -+ have_tcltk=yes -+ as_fn_append TCLTK_CFLAGS " -Wno-strict-prototypes -DWITH_APPINIT=1" - +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_chroot=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_z_inflateCopy=yes else - -- LIBS=$_libs -- ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" --if test "x$ac_cv_func_pthread_detach" = xyes; then : -+ have_tcltk=no - -- posix_threads=yes -+fi +- ac_cv_func_chroot=no ++ ac_cv_lib_z_inflateCopy=no + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 ++$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } ++if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : ++ $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chroot" >&5 +-$as_echo "$ac_cv_func_chroot" >&6; } +- if test "x$ac_cv_func_chroot" = xyes; then : + +-$as_echo "#define HAVE_CHROOT 1" >>confdefs.h ++LIBS=$py_check_lib_save_LIBS ++ + + fi --else +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 --$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } --if ${ac_cv_lib_pthreads_pthread_create+:} false; then : -+ + -+ -+ -+save_CFLAGS=$CFLAGS + + ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + ++ save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 +-$as_echo_n "checking for link... " >&6; } +-if ${ac_cv_func_link+:} false; then : + -+ -+ CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS" -+ LDFLAGS="$GDBM_LIBS $LDFLAGS" -+ for ac_header in gdbm.h ++ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" ++ LDFLAGS="$LDFLAGS $ZLIB_LIBS" ++ for ac_header in zlib.h +do : -+ ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default" -+if test "x$ac_cv_header_gdbm_h" = xyes; then : ++ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_zlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF -+#define HAVE_GDBM_H 1 ++#define HAVE_ZLIB_H 1 +_ACEOF + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5 -+$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; } -+if ${ac_cv_lib_gdbm_gdbm_open+:} false; then : ++ py_check_lib_save_LIBS=$LIBS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 ++$as_echo_n "checking for gzread in -lz... " >&6; } ++if ${ac_cv_lib_z_gzread+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lpthreads $LIBS" -+LIBS="-lgdbm $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lz $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char gzread (); + int + main () + { +-void *x=link ++return gzread (); + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_link=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_z_gzread=yes + else +- ac_cv_func_link=no ++ ac_cv_lib_z_gzread=no + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_link" >&5 +-$as_echo "$ac_cv_func_link" >&6; } +- if test "x$ac_cv_func_link" = xyes; then : +- +-$as_echo "#define HAVE_LINK 1" >>confdefs.h +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 ++$as_echo "$ac_cv_lib_z_gzread" >&6; } ++if test "x$ac_cv_lib_z_gzread" = xyes; then : ++ have_zlib=yes ++else ++ have_zlib=no + fi -@@ -14191,83 +14234,70 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char pthread_create (); -+char gdbm_open (); ++LIBS=$py_check_lib_save_LIBS ++ + ++else ++ have_zlib=no ++fi + ++done + ++ if test "x$have_zlib" = xyes; then : + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 +-$as_echo_n "checking for symlink... " >&6; } +-if ${ac_cv_func_symlink+:} false; then : ++ ZLIB_CFLAGS=${ZLIB_CFLAGS-""} ++ ZLIB_LIBS=${ZLIB_LIBS-"-lz"} ++ py_check_lib_save_LIBS=$LIBS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 ++$as_echo_n "checking for inflateCopy in -lz... " >&6; } ++if ${ac_cv_lib_z_inflateCopy+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lz $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char inflateCopy (); int main () { --return pthread_create (); -+return gdbm_open (); +-void *x=symlink ++return inflateCopy (); ; return 0; } _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_pthreads_pthread_create=yes -+ ac_cv_lib_gdbm_gdbm_open=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_symlink=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_z_inflateCopy=yes + else +- ac_cv_func_symlink=no ++ ac_cv_lib_z_inflateCopy=no + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 ++$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } ++if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : ++ $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_symlink" >&5 +-$as_echo "$ac_cv_func_symlink" >&6; } +- if test "x$ac_cv_func_symlink" = xyes; then : + +-$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h ++LIBS=$py_check_lib_save_LIBS + +-fi + ++fi + ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 +-$as_echo_n "checking for fchdir... " >&6; } +-if ${ac_cv_func_fchdir+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-void *x=fchdir +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_fchdir=yes else -- ac_cv_lib_pthreads_pthread_create=no -+ ac_cv_lib_gdbm_gdbm_open=no +- ac_cv_func_fchdir=no ++ ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS ++ ZLIB_LIBS=$pkg_cv_ZLIB_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++ have_zlib=yes ++ $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h ++ ++ fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++if test "x$have_zlib" = xyes; then : ++ ++ BINASCII_CFLAGS="-DUSE_ZLIB_CRC32 $ZLIB_CFLAGS" ++ BINASCII_LIBS="$ZLIB_LIBS" + fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 --$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } --if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5 -+$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; } -+if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fchdir" >&5 +-$as_echo "$ac_cv_func_fchdir" >&6; } +- if test "x$ac_cv_func_fchdir" = xyes; then : -- posix_threads=yes -- LIBS="$LIBS -lpthreads" -+ have_gdbm=yes -+ GDBM_LIBS=${GDBM_LIBS-"-lgdbm"} +-$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h ++ ++ ++ ++ if test "$ac_sys_system" = "Emscripten" -a -z "$BZIP2_CFLAGS" -a -z "$BZIP2_LIBS"; then : ++ ++ BZIP2_CFLAGS="-sUSE_BZIP2" ++ BZIP2_LIBS="-sUSE_BZIP2" - else -+ have_gdbm=no -+fi + fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 --$as_echo_n "checking for pthread_create in -lc_r... " >&6; } --if ${ac_cv_lib_c_r_pthread_create+:} false; then : +@@ -15422,258 +17140,498 @@ fi + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 +-$as_echo_n "checking for fsync... " >&6; } +-if ${ac_cv_func_fsync+:} false; then : - $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lc_r $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZIP2" >&5 ++$as_echo_n "checking for BZIP2... " >&6; } ++ ++if test -n "$BZIP2_CFLAGS"; then ++ pkg_cv_BZIP2_CFLAGS="$BZIP2_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_BZIP2_CFLAGS=`$PKG_CONFIG --cflags "bzip2" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char pthread_create (); +-#include -int -main () -{ --return pthread_create (); +-void *x=fsync - ; - return 0; -} -_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_c_r_pthread_create=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_fsync=yes ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$BZIP2_LIBS"; then ++ pkg_cv_BZIP2_LIBS="$BZIP2_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_BZIP2_LIBS=`$PKG_CONFIG --libs "bzip2" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes else -- ac_cv_lib_c_r_pthread_create=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+ have_gdbm=no +- ac_cv_func_fsync=no ++ pkg_failed=yes fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 --$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } --if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : - -- posix_threads=yes -- LIBS="$LIBS -lc_r" -+done +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++ else ++ pkg_failed=untried + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fsync" >&5 +-$as_echo "$ac_cv_func_fsync" >&6; } +- if test "x$ac_cv_func_fsync" = xyes; then : --else +-$as_echo "#define HAVE_FSYNC 1" >>confdefs.h -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 --$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } --if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS -+ -+ + -+for ac_header in ndbm.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default" -+if test "x$ac_cv_header_ndbm_h" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_NDBM_H 1 -+_ACEOF ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no + fi ++ if test $_pkg_short_errors_supported = yes; then ++ BZIP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "bzip2" 2>&1` ++ else ++ BZIP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "bzip2" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$BZIP2_PKG_ERRORS" >&5 + + + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dbm_open" >&5 -+$as_echo_n "checking for library containing dbm_open... " >&6; } -+if ${ac_cv_search_dbm_open+:} false; then : + + ++ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" ++ LDFLAGS="$LDFLAGS $BZIP2_LIBS" ++ for ac_header in bzlib.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_bzlib_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_BZLIB_H 1 ++_ACEOF + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 +-$as_echo_n "checking for fdatasync... " >&6; } +-if ${ac_cv_func_fdatasync+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 ++$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } ++if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : $as_echo_n "(cached) " >&6 else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lpthread $LIBS" -+ ac_func_search_save_LIBS=$LIBS - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lbz2 $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -@@ -14277,40 +14307,146 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char __pthread_create_system (); -+char dbm_open (); +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char BZ2_bzCompress (); int main () { --return __pthread_create_system (); -+return dbm_open (); +-void *x=fdatasync ++return BZ2_bzCompress (); ; return 0; } _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_pthread___pthread_create_system=yes --else -- ac_cv_lib_pthread___pthread_create_system=no -+for ac_lib in '' ndbm gdbm_compat; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_search_dbm_open=$ac_res - fi - rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+ conftest$ac_exeext -+ if ${ac_cv_search_dbm_open+:} false; then : -+ break - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 --$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } --if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : -+done -+if ${ac_cv_search_dbm_open+:} false; then : -+ +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_fdatasync=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_bz2_BZ2_bzCompress=yes +else -+ ac_cv_search_dbm_open=no ++ ac_cv_lib_bz2_BZ2_bzCompress=no +fi -+rm conftest.$ac_ext -+LIBS=$ac_func_search_save_LIBS ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5 -+$as_echo "$ac_cv_search_dbm_open" >&6; } -+ac_res=$ac_cv_search_dbm_open -+if test "$ac_res" != no; then : -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 ++$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } ++if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : ++ have_bzip2=yes + else +- ac_cv_func_fdatasync=no ++ have_bzip2=no + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + -+fi ++else ++ have_bzip2=no + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fdatasync" >&5 +-$as_echo "$ac_cv_func_fdatasync" >&6; } +- if test "x$ac_cv_func_fdatasync" = xyes; then : + +-$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h ++done + ++ if test "x$have_bzip2" = xyes; then : + ++ BZIP2_CFLAGS=${BZIP2_CFLAGS-""} ++ BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} + + fi + +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS -+ -+ -+ -+fi -+ -+done -- posix_threads=yes -- LIBS="$LIBS -lpthread" -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndbm presence and linker args" >&5 -+$as_echo_n "checking for ndbm presence and linker args... " >&6; } -+case $ac_cv_search_dbm_open in #( -+ *ndbm*|*gdbm_compat*) : -+ -+ dbm_ndbm="$ac_cv_search_dbm_open" -+ have_ndbm=yes -+ ;; #( -+ none*) : -+ -+ dbm_ndbm="" -+ have_ndbm=yes -+ ;; #( -+ no) : -+ have_ndbm=no -+ ;; #( -+ *) : -+ ;; -+esac -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ndbm ($dbm_ndbm)" >&5 -+$as_echo "$have_ndbm ($dbm_ndbm)" >&6; } -+ -+{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} -+if ${ac_cv_header_gdbm_slash_ndbm_h+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 --$as_echo_n "checking for pthread_create in -lcma... " >&6; } --if ${ac_cv_lib_cma_pthread_create+:} false; then : -+ ac_fn_c_check_header_mongrel "$LINENO" "gdbm/ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" -+if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : -+ ac_cv_header_gdbm_slash_ndbm_h=yes -+else -+ ac_cv_header_gdbm_slash_ndbm_h=no -+ -+fi -+ -+ -+ -+fi -+ -+if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes; then : -+ -+ -+$as_echo "#define HAVE_GDBM_NDBM_H 1" >>confdefs.h -+ -+ -+fi -+ -+{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} -+if ${ac_cv_header_gdbm_dash_ndbm_h+:} false; then : - $as_echo_n "(cached) " >&6 - else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lcma $LIBS" -+ -+ ac_fn_c_check_header_mongrel "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" -+if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : -+ ac_cv_header_gdbm_dash_ndbm_h=yes -+else -+ ac_cv_header_gdbm_dash_ndbm_h=no -+ -+fi -+ -+ -+ -+fi -+ -+if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes; then : -+ -+ -+$as_echo "#define HAVE_GDBM_DASH_NDBM_H 1" >>confdefs.h -+ -+ -+fi -+{ ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;} -+ -+if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create" >&5 +-$as_echo_n "checking for epoll_create... " >&6; } +-if ${ac_cv_func_epoll_create+:} false; then : + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS + + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dbm_open" >&5 -+$as_echo_n "checking for library containing dbm_open... " >&6; } -+if ${ac_cv_search_dbm_open+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_func_search_save_LIBS=$LIBS - cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" ++ LDFLAGS="$LDFLAGS $BZIP2_LIBS" ++ for ac_header in bzlib.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_bzlib_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_BZLIB_H 1 ++_ACEOF ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 ++$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } ++if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lbz2 $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -@@ -14320,1311 +14456,1389 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char pthread_create (); -+char dbm_open (); +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char BZ2_bzCompress (); int main () { --return pthread_create (); -+return dbm_open (); +-void *x=epoll_create ++return BZ2_bzCompress (); ; return 0; } _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_cma_pthread_create=yes --else -- ac_cv_lib_cma_pthread_create=no -+for ac_lib in '' gdbm_compat; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_search_dbm_open=$ac_res +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_epoll_create=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_bz2_BZ2_bzCompress=yes + else +- ac_cv_func_epoll_create=no ++ ac_cv_lib_bz2_BZ2_bzCompress=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 ++$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } ++if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : ++ have_bzip2=yes ++else ++ have_bzip2=no fi - rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+ conftest$ac_exeext -+ if ${ac_cv_search_dbm_open+:} false; then : -+ break +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++ ++else ++ have_bzip2=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 --$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } --if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : -- -- posix_threads=yes -- LIBS="$LIBS -lcma" +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create" >&5 +-$as_echo "$ac_cv_func_epoll_create" >&6; } +- if test "x$ac_cv_func_epoll_create" = xyes; then : + +-$as_echo "#define HAVE_EPOLL 1" >>confdefs.h +done -+if ${ac_cv_search_dbm_open+:} false; then : ++ ++ if test "x$have_bzip2" = xyes; then : ++ ++ BZIP2_CFLAGS=${BZIP2_CFLAGS-""} ++ BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} + + fi + ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ + + ++else ++ BZIP2_CFLAGS=$pkg_cv_BZIP2_CFLAGS ++ BZIP2_LIBS=$pkg_cv_BZIP2_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ have_bzip2=yes ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 +-$as_echo_n "checking for epoll_create1... " >&6; } +-if ${ac_cv_func_epoll_create1+:} false; then : +- $as_echo_n "(cached) " >&6 ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZMA" >&5 ++$as_echo_n "checking for LIBLZMA... " >&6; } ++ ++if test -n "$LIBLZMA_CFLAGS"; then ++ pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_LIBLZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes else -- -- case $ac_sys_system in #( -- WASI) : -- posix_threads=stub ;; #( -- *) : -- as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 -- ;; --esac -- -+ ac_cv_search_dbm_open=no +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-void *x=epoll_create1 +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_epoll_create1=yes ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$LIBLZMA_LIBS"; then ++ pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_LIBLZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else +- ac_cv_func_epoll_create1=no ++ pkg_failed=yes fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -+rm conftest.$ac_ext -+LIBS=$ac_func_search_save_LIBS ++ else ++ pkg_failed=untried fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5 -+$as_echo "$ac_cv_search_dbm_open" >&6; } -+ac_res=$ac_cv_search_dbm_open -+if test "$ac_res" != no; then : -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create1" >&5 +-$as_echo "$ac_cv_func_epoll_create1" >&6; } +- if test "x$ac_cv_func_epoll_create1" = xyes; then : +-$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h + ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no fi ++ if test $_pkg_short_errors_supported = yes; then ++ LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` ++ else ++ LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$LIBLZMA_PKG_ERRORS" >&5 --fi --fi -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS -+ ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS - fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 --$as_echo_n "checking for usconfig in -lmpc... " >&6; } --if ${ac_cv_lib_mpc_usconfig+:} false; then : -+# Check for libdb >= 5 with dbm_open() -+# db.h re-defines the name of the function -+for ac_header in db.h ++ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" ++ LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" ++ for ac_header in lzma.h +do : -+ ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" -+if test "x$ac_cv_header_db_h" = xyes; then : ++ ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" ++if test "x$ac_cv_header_lzma_h" = xyes; then : + cat >>confdefs.h <<_ACEOF -+#define HAVE_DB_H 1 ++#define HAVE_LZMA_H 1 +_ACEOF -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdb" >&5 -+$as_echo_n "checking for libdb... " >&6; } -+if ${ac_cv_have_libdb+:} false; then : + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 +-$as_echo_n "checking for kqueue... " >&6; } +-if ${ac_cv_func_kqueue+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 ++$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } ++if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : $as_echo_n "(cached) " >&6 else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lmpc $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ -+ save_CFLAGS=$CFLAGS -+save_CPPFLAGS=$CPPFLAGS -+save_LDFLAGS=$LDFLAGS -+save_LIBS=$LIBS -+ -+ -+ LIBS="$LIBS -ldb" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-llzma $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char usconfig (); -+ #define DB_DBM_HSEARCH 1 -+ #include -+ #if DB_VERSION_MAJOR < 5 -+ #error "dh.h: DB_VERSION_MAJOR < 5 is not supported." -+ #endif -+ +-#include +-#include +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char lzma_easy_encoder (); int main () { --return usconfig (); -+DBM *dbm = dbm_open(NULL, 0, 0) +-void *x=kqueue ++return lzma_easy_encoder (); ; return 0; } -+ _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_mpc_usconfig=yes -+ ac_cv_have_libdb=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_kqueue=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_lzma_lzma_easy_encoder=yes else -- ac_cv_lib_mpc_usconfig=no -+ ac_cv_have_libdb=no +- ac_cv_func_kqueue=no ++ ac_cv_lib_lzma_lzma_easy_encoder=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 ++$as_echo "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } ++if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes; then : ++ have_liblzma=yes ++else ++ have_liblzma=no fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 --$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } --if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : - -- LIBS="$LIBS -lmpc" -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS - --fi - +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++else ++ have_liblzma=no fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_libdb" >&5 -+$as_echo "$ac_cv_have_libdb" >&6; } -+ if test "x$ac_cv_have_libdb" = xyes; then : - --if test "$posix_threads" = "yes"; then -- if test "$unistd_defines_pthreads" = "no"; then - --$as_echo "#define _POSIX_THREADS 1" >>confdefs.h -+$as_echo "#define HAVE_LIBDB 1" >>confdefs.h +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_kqueue" >&5 +-$as_echo "$ac_cv_func_kqueue" >&6; } +- if test "x$ac_cv_func_kqueue" = xyes; then : -- fi +-$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h ++done ++ ++ if test "x$have_liblzma" = xyes; then : ++ ++ LIBLZMA_CFLAGS=${LIBLZMA_CFLAGS-""} ++ LIBLZMA_LIBS=${LIBLZMA_LIBS-"-llzma"} -- # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. -- case $ac_sys_system/$ac_sys_release in -- SunOS/5.6) --$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h -+fi + fi -- ;; -- SunOS/5.8) --$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h -+fi ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ -- ;; -- AIX/*) --$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h -+done -- ;; -- NetBSD/*) --$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ -- ;; -- esac -+# Check for --with-dbmliborder -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 -+$as_echo_n "checking for --with-dbmliborder... " >&6; } ++ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" ++ LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" ++ for ac_header in lzma.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" ++if test "x$ac_cv_header_lzma_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LZMA_H 1 ++_ACEOF -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 --$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } --if ${ac_cv_pthread_system_supported+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test "$cross_compiling" = yes; then : -- ac_cv_pthread_system_supported=no -+# Check whether --with-dbmliborder was given. -+if test "${with_dbmliborder+set}" = set; then : -+ withval=$with_dbmliborder; +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 +-$as_echo_n "checking for prlimit... " >&6; } +-if ${ac_cv_func_prlimit+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 ++$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } ++if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+ with_dbmliborder=gdbm:ndbm:bdb ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-llzma $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char lzma_easy_encoder (); + int + main () + { +-void *x=prlimit ++return lzma_easy_encoder (); + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_prlimit=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_lzma_lzma_easy_encoder=yes + else +- ac_cv_func_prlimit=no ++ ac_cv_lib_lzma_lzma_easy_encoder=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS +fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 ++$as_echo "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } ++if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes; then : ++ have_liblzma=yes ++else ++ have_liblzma=no + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- #include -- #include -- void *foo(void *parm) { -- return NULL; -- } -- int main(void) { -- pthread_attr_t attr; -- pthread_t id; -- if (pthread_attr_init(&attr)) return (-1); -- if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1); -- if (pthread_create(&id, &attr, foo, NULL)) return (-1); -- return (0); -- } --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_pthread_system_supported=yes --else -- ac_cv_pthread_system_supported=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi ++ ++else ++ have_liblzma=no + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_prlimit" >&5 +-$as_echo "$ac_cv_func_prlimit" >&6; } +- if test "x$ac_cv_func_prlimit" = xyes; then : -+have_gdbm_dbmliborder=no -+as_save_IFS=$IFS -+IFS=: -+for db in $with_dbmliborder; do -+ case $db in #( -+ ndbm) : -+ ;; #( -+ gdbm) : -+ have_gdbm_dbmliborder=yes ;; #( -+ bdb) : -+ ;; #( -+ *) : -+ with_dbmliborder=error -+ ;; -+esac +-$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h +done -+IFS=$as_save_IFS -+if test "x$with_dbmliborder" = xerror; then : + -+ as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:... (gdbm:ndbm:bdb)" "$LINENO" 5 ++ if test "x$have_liblzma" = xyes; then : ++ ++ LIBLZMA_CFLAGS=${LIBLZMA_CFLAGS-""} ++ LIBLZMA_LIBS=${LIBLZMA_LIBS-"-llzma"} fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 --$as_echo "$ac_cv_pthread_system_supported" >&6; } -- if test "$ac_cv_pthread_system_supported" = "yes"; then -- --$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 -+$as_echo "$with_dbmliborder" >&6; } - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dbm module CFLAGS and LIBS" >&5 -+$as_echo_n "checking for _dbm module CFLAGS and LIBS... " >&6; } -+have_dbm=no -+as_save_IFS=$IFS -+IFS=: -+for db in $with_dbmliborder; do -+ case "$db" in -+ ndbm) -+ if test "$have_ndbm" = yes; then -+ DBM_CFLAGS="-DUSE_NDBM" -+ DBM_LIBS="$dbm_ndbm" -+ have_dbm=yes -+ break - fi -- for ac_func in pthread_sigmask --do : -- ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" --if test "x$ac_cv_func_pthread_sigmask" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_PTHREAD_SIGMASK 1 --_ACEOF -- case $ac_sys_system in -- CYGWIN*) -- --$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h -- -- ;; -- esac --fi -+ ;; -+ gdbm) -+ if test "$have_gdbm_compat" = yes; then -+ DBM_CFLAGS="-DUSE_GDBM_COMPAT" -+ DBM_LIBS="-lgdbm_compat" -+ have_dbm=yes -+ break -+ fi -+ ;; -+ bdb) -+ if test "$ac_cv_have_libdb" = yes; then -+ DBM_CFLAGS="-DUSE_BERKDB" -+ DBM_LIBS="-ldb" -+ have_dbm=yes -+ break -+ fi -+ ;; -+ esac - done -+IFS=$as_save_IFS -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBM_CFLAGS $DBM_LIBS" >&5 -+$as_echo "$DBM_CFLAGS $DBM_LIBS" >&6; } - -- for ac_func in pthread_getcpuclockid --do : -- ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" --if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_PTHREAD_GETCPUCLOCKID 1 --_ACEOF -- --fi --done -+# Templates for things AC_DEFINEd more than once. -+# For a single AC_DEFINE, no template is needed. - --fi - --if test "x$posix_threads" = xstub; then : -+if test "$ac_cv_pthread_is_default" = yes -+then -+ # Defining _REENTRANT on system with POSIX threads should not hurt. -+ $as_echo "#define _REENTRANT 1" >>confdefs.h -+ posix_threads=yes -+ if test "$ac_sys_system" = "SunOS"; then -+ CFLAGS="$CFLAGS -D_REENTRANT" -+ fi -+elif test "$ac_cv_kpthread" = "yes" -+then -+ CC="$CC -Kpthread" -+ if test "$ac_cv_cxx_thread" = "yes"; then -+ CXX="$CXX -Kpthread" -+ fi -+ posix_threads=yes -+elif test "$ac_cv_kthread" = "yes" -+then -+ CC="$CC -Kthread" -+ if test "$ac_cv_cxx_thread" = "yes"; then -+ CXX="$CXX -Kthread" -+ fi -+ posix_threads=yes -+elif test "$ac_cv_pthread" = "yes" -+then -+ CC="$CC -pthread" -+ if test "$ac_cv_cxx_thread" = "yes"; then -+ CXX="$CXX -pthread" -+ fi -+ posix_threads=yes ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS ++ ++ ++ +else -+ if test ! -z "$withval" -a -d "$withval" -+ then LDFLAGS="$LDFLAGS -L$withval" -+ fi - --$as_echo "#define HAVE_PTHREAD_STUBS 1" >>confdefs.h -+ # According to the POSIX spec, a pthreads implementation must -+ # define _POSIX_THREADS in unistd.h. Some apparently don't -+ # (e.g. gnu pth with pthread emulation) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 -+$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ ++ LIBLZMA_CFLAGS=$pkg_cv_LIBLZMA_CFLAGS ++ LIBLZMA_LIBS=$pkg_cv_LIBLZMA_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ have_liblzma=yes ++fi -+#include -+#ifdef _POSIX_THREADS -+yes -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ unistd_defines_pthreads=yes -+else -+ unistd_defines_pthreads=no - fi -+rm -f conftest* --# Check for enable-ipv6 -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 --$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } --# Check whether --enable-ipv6 was given. --if test "${enable_ipv6+set}" = set; then : -- enableval=$enable_ipv6; case "$enableval" in -- no) -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- ipv6=no -- ;; -- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- $as_echo "#define ENABLE_IPV6 1" >>confdefs.h -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 -+$as_echo "$unistd_defines_pthreads" >&6; } -- ipv6=yes -- ;; -- esac --else -+ $as_echo "#define _REENTRANT 1" >>confdefs.h -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ # Just looking for pthread_create in libpthread is not enough: -+ # on HP/UX, pthread.h renames pthread_create to a different symbol name. -+ # So we really have to include pthread.h, and then link. -+ _libs=$LIBS -+ LIBS="$LIBS -lpthread" -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -+$as_echo_n "checking for pthread_create in -lpthread... " >&6; } -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 +-$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; } +-if ${ac_cv_func__dyld_shared_cache_contains_path+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 ++$as_echo_n "checking for hstrerror... " >&6; } ++if ${ac_cv_func_hstrerror+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- /* AF_INET6 available check */ --#include --#include -+ -+#include -+#include -+#include -+ -+void * start_routine (void *arg) { exit (0); } +-#include ++#include int main () { --int domain = AF_INET6; -+ -+pthread_create (NULL, NULL, start_routine, NULL) +-void *x=_dyld_shared_cache_contains_path ++void *x=hstrerror ; return 0; } _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func__dyld_shared_cache_contains_path=yes ++ ac_cv_func_hstrerror=yes + else +- ac_cv_func__dyld_shared_cache_contains_path=no ++ ac_cv_func_hstrerror=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- ipv6=yes -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ posix_threads=yes + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func__dyld_shared_cache_contains_path" >&5 +-$as_echo "$ac_cv_func__dyld_shared_cache_contains_path" >&6; } +- if test "x$ac_cv_func__dyld_shared_cache_contains_path" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_hstrerror" >&5 ++$as_echo "$ac_cv_func_hstrerror" >&6; } ++ if test "x$ac_cv_func_hstrerror" = xyes; then : - else +-$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h ++$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h -- ipv6=no -- --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ LIBS=$_libs -+ ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" -+if test "x$ac_cv_func_pthread_detach" = xyes; then : + fi --case $ac_sys_system in #( -- WASI) : -- ipv6=no -- ;; #( -- *) : -- ;; --esac -+ posix_threads=yes +@@ -15681,43 +17639,35 @@ fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6" >&5 --$as_echo "$ipv6" >&6; } -+else --if test "$ipv6" = "yes"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 --$as_echo_n "checking if RFC2553 API is available... " >&6; } -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 -+$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } -+if ${ac_cv_lib_pthreads_pthread_create+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lpthreads $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -- #include --#include -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char pthread_create (); +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 +-$as_echo_n "checking for memfd_create... " >&6; } +-if ${ac_cv_func_memfd_create+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname" >&5 ++$as_echo_n "checking for getservbyname... " >&6; } ++if ${ac_cv_func_getservbyname+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-#ifdef HAVE_SYS_MMAN_H +-#include +-#endif +-#ifdef HAVE_SYS_MEMFD_H +-#include +-#endif +- ++#include int main () { --struct sockaddr_in6 x; -- x.sin6_scope_id; -+return pthread_create (); +-void *x=memfd_create ++void *x=getservbyname ; return 0; } -- _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- ipv6=yes + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_memfd_create=yes ++ ac_cv_func_getservbyname=yes + else +- ac_cv_func_memfd_create=no ++ ac_cv_func_getservbyname=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memfd_create" >&5 +-$as_echo "$ac_cv_func_memfd_create" >&6; } +- if test "x$ac_cv_func_memfd_create" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyname" >&5 ++$as_echo "$ac_cv_func_getservbyname" >&6; } ++ if test "x$ac_cv_func_getservbyname" = xyes; then : + +-$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h ++$as_echo "#define HAVE_GETSERVBYNAME 1" >>confdefs.h + + fi + +@@ -15725,473 +17675,351 @@ fi + + + - -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_pthreads_pthread_create=yes +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 +-$as_echo_n "checking for eventfd... " >&6; } +-if ${ac_cv_func_eventfd+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyport" >&5 ++$as_echo_n "checking for getservbyport... " >&6; } ++if ${ac_cv_func_getservbyport+:} false; then : + $as_echo_n "(cached) " >&6 else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ - -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- ipv6=no +-#ifdef HAVE_SYS_EVENTFD_H +-#include +-#endif - --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ ac_cv_lib_pthreads_pthread_create=no ++#include + int + main () + { +-void *x=eventfd ++void *x=getservbyport + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_eventfd=yes ++ ac_cv_func_getservbyport=yes + else +- ac_cv_func_eventfd=no ++ ac_cv_func_getservbyport=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_eventfd" >&5 +-$as_echo "$ac_cv_func_eventfd" >&6; } +- if test "x$ac_cv_func_eventfd" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyport" >&5 ++$as_echo "$ac_cv_func_getservbyport" >&6; } ++ if test "x$ac_cv_func_getservbyport" = xyes; then : + +-$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h ++$as_echo "#define HAVE_GETSERVBYPORT 1" >>confdefs.h + + fi + + + + +-# On some systems (eg. FreeBSD 5), we would find a definition of the +-# functions ctermid_r, setgroups in the library, but no prototype +-# (e.g. because we use _XOPEN_SOURCE). See whether we can take their +-# address to avoid compiler warnings and potential miscompilations +-# because of the missing prototypes. - --if test "$ipv6" = "yes"; then -- $as_echo "#define ENABLE_IPV6 1" >>confdefs.h - -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 +-$as_echo_n "checking for ctermid_r... " >&6; } +-if ${ac_cv_func_ctermid_r+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname" >&5 ++$as_echo_n "checking for gethostbyname... " >&6; } ++if ${ac_cv_func_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + int + main () + { +-void *x=ctermid_r ++void *x=gethostbyname + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_ctermid_r=yes ++ ac_cv_func_gethostbyname=yes + else +- ac_cv_func_ctermid_r=no ++ ac_cv_func_gethostbyname=no fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 -+$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } -+if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ctermid_r" >&5 +-$as_echo "$ac_cv_func_ctermid_r" >&6; } +- if test "x$ac_cv_func_ctermid_r" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyname" >&5 ++$as_echo "$ac_cv_func_gethostbyname" >&6; } ++ if test "x$ac_cv_func_gethostbyname" = xyes; then : + +-$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h ++$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h + + fi + --fi -+ posix_threads=yes -+ LIBS="$LIBS -lpthreads" -+else --ipv6type=unknown --ipv6lib=none --ipv6trylibc=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 +-$as_echo_n "checking for flock declaration... " >&6; } +-if ${ac_cv_flock_decl+:} false; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr" >&5 ++$as_echo_n "checking for gethostbyaddr... " >&6; } ++if ${ac_cv_func_gethostbyaddr+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + int + main () + { +-void* p = flock - --if test "$ipv6" = "yes"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 --$as_echo_n "checking ipv6 stack type... " >&6; } -- for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; -- do -- case $i in -- inria) -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ ++void *x=gethostbyaddr + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_flock_decl=yes +-else +- ac_cv_flock_decl=no - --#include --#ifdef IPV6_INRIA_VERSION --yes --#endif --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- ipv6type=$i -fi --rm -f conftest* -- -- ;; -- kame) -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - --#include --#ifdef __KAME__ --yes --#endif --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- ipv6type=$i; -- ipv6lib=inet6 -- ipv6libdir=/usr/local/v6/lib -- ipv6trylibc=yes -fi --rm -f conftest* -- -- ;; -- linux-glibc) -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#include --#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) --yes --#endif +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 +-$as_echo "$ac_cv_flock_decl" >&6; } +-if test "x$ac_cv_flock_decl" = xyes; then : +- for ac_func in flock +-do : +- ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" +-if test "x$ac_cv_func_flock" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_FLOCK 1 -_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- ipv6type=$i; -- ipv6trylibc=yes --fi --rm -f conftest* - -- ;; -- linux-inet6) -- if test -d /usr/inet6; then -- ipv6type=$i -- ipv6lib=inet6 -- ipv6libdir=/usr/inet6/lib -- BASECFLAGS="-I/usr/inet6/include $BASECFLAGS" -- fi -- ;; -- solaris) -- if test -f /etc/netconfig; then -- if $GREP -q tcp6 /etc/netconfig; then -- ipv6type=$i -- ipv6trylibc=yes -- fi -- fi -- ;; -- toshiba) -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 +-$as_echo_n "checking for flock in -lbsd... " >&6; } +-if ${ac_cv_lib_bsd_flock+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lbsd $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - --#include --#ifdef _TOSHIBA_INET6 --yes +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" -#endif +-char flock (); +-int +-main () +-{ +-return flock (); +- ; +- return 0; +-} -_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- ipv6type=$i; -- ipv6lib=inet6; -- ipv6libdir=/usr/local/v6/lib +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_bsd_flock=yes ++ ac_cv_func_gethostbyaddr=yes + else +- ac_cv_lib_bsd_flock=no -fi --rm -f conftest* -- -- ;; -- v6d) -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#include --#ifdef __V6D__ --yes --#endif --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- ipv6type=$i; -- ipv6lib=v6; -- ipv6libdir=/usr/local/v6/lib; -- BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS -fi --rm -f conftest* -- -- ;; -- zeta) -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 -+$as_echo_n "checking for pthread_create in -lc_r... " >&6; } -+if ${ac_cv_lib_c_r_pthread_create+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lc_r $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - --#include --#ifdef _ZETA_MINAMI_INET6 --yes -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" - #endif -+char pthread_create (); -+int -+main () -+{ -+return pthread_create (); -+ ; -+ return 0; -+} - _ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "yes" >/dev/null 2>&1; then : -- ipv6type=$i; -- ipv6lib=inet6; -- ipv6libdir=/usr/local/v6/lib -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_c_r_pthread_create=yes -+else -+ ac_cv_lib_c_r_pthread_create=no - fi --rm -f conftest* -- -- ;; -- esac -- if test "$ipv6type" != "unknown"; then -- break -- fi -- done -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 --$as_echo "$ipv6type" >&6; } -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 +-$as_echo "$ac_cv_lib_bsd_flock" >&6; } +-if test "x$ac_cv_lib_bsd_flock" = xyes; then : +- FCNTL_LIBS="-lbsd" ++ ac_cv_func_gethostbyaddr=no fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 -+$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } -+if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : - --if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then -- if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then -- LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" -- { $as_echo "$as_me:${as_lineno-$LINENO}: using lib$ipv6lib" >&5 --$as_echo "$as_me: using lib$ipv6lib" >&6;} -- else -- if test "x$ipv6trylibc" = xyes; then : -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: using libc" >&5 --$as_echo "$as_me: using libc" >&6;} -+ posix_threads=yes -+ LIBS="$LIBS -lc_r" - - else ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 -- --fi -- fi --fi -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CAN_RAW_FD_FRAMES" >&5 --$as_echo_n "checking CAN_RAW_FD_FRAMES... " >&6; } --if ${ac_cv_can_raw_fd_frames+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 -+$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } -+if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyaddr" >&5 ++$as_echo "$ac_cv_func_gethostbyaddr" >&6; } ++ if test "x$ac_cv_func_gethostbyaddr" = xyes; then : ++ ++$as_echo "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h + + fi + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 +-$as_echo_n "checking for getpagesize... " >&6; } +-if ${ac_cv_func_getpagesize+:} false; then : ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprotobyname" >&5 ++$as_echo_n "checking for getprotobyname... " >&6; } ++if ${ac_cv_func_getprotobyname+:} false; then : $as_echo_n "(cached) " >&6 else -- -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lpthread $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- /* CAN_RAW_FD_FRAMES available check */ --#include -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char __pthread_create_system (); +-#include ++#include int main () { --int can_raw_fd_frames = CAN_RAW_FD_FRAMES; -+return __pthread_create_system (); +-void *x=getpagesize ++void *x=getprotobyname ; return 0; } _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_can_raw_fd_frames=yes -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_pthread___pthread_create_system=yes + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_getpagesize=yes ++ ac_cv_func_getprotobyname=yes else -- ac_cv_can_raw_fd_frames=no -+ ac_cv_lib_pthread___pthread_create_system=no +- ac_cv_func_getpagesize=no ++ ac_cv_func_getprotobyname=no fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_fd_frames" >&5 --$as_echo "$ac_cv_can_raw_fd_frames" >&6; } --if test "x$ac_cv_can_raw_fd_frames" = xyes; then : -- -- --$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 -+$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } -+if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpagesize" >&5 +-$as_echo "$ac_cv_func_getpagesize" >&6; } +- if test "x$ac_cv_func_getpagesize" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getprotobyname" >&5 ++$as_echo "$ac_cv_func_getprotobyname" >&6; } ++ if test "x$ac_cv_func_getprotobyname" = xyes; then : -+ posix_threads=yes -+ LIBS="$LIBS -lpthread" +-$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h ++$as_echo "#define HAVE_GETPROTOBYNAME 1" >>confdefs.h --fi -+else + fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5 --$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; } --if ${ac_cv_can_raw_join_filters+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 -+$as_echo_n "checking for pthread_create in -lcma... " >&6; } -+if ${ac_cv_lib_cma_pthread_create+:} false; then : + + + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 +-$as_echo_n "checking for broken unsetenv... " >&6; } +-if ${ac_cv_broken_unsetenv+:} false; then : ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 ++$as_echo_n "checking for inet_aton... " >&6; } ++if ${ac_cv_func_inet_aton+:} false; then : $as_echo_n "(cached) " >&6 else -- -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lcma $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - --#include -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char pthread_create (); +-#include ++ ++#include ++#include ++#include ++#include ++ int main () { --int can_raw_join_filters = CAN_RAW_JOIN_FILTERS; -+return pthread_create (); +-int res = unsetenv("DUMMY") ++void *x=inet_aton ; return 0; } _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_can_raw_join_filters=yes -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_cma_pthread_create=yes + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_broken_unsetenv=no ++ ac_cv_func_inet_aton=yes else -- ac_cv_can_raw_join_filters=no -+ ac_cv_lib_cma_pthread_create=no - fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_join_filters" >&5 --$as_echo "$ac_cv_can_raw_join_filters" >&6; } --if test "x$ac_cv_can_raw_join_filters" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 -+$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } -+if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : - -+ posix_threads=yes -+ LIBS="$LIBS -lcma" - --$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h -+else - -+ case $ac_sys_system in #( -+ WASI) : -+ posix_threads=stub ;; #( -+ *) : -+ as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 -+ ;; -+esac - - fi - --# Check for --with-doc-strings --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 --$as_echo_n "checking for --with-doc-strings... " >&6; } -- --# Check whether --with-doc-strings was given. --if test "${with_doc_strings+set}" = set; then : -- withval=$with_doc_strings; - fi - -- --if test -z "$with_doc_strings" --then with_doc_strings="yes" - fi --if test "$with_doc_strings" != "no" --then +- ac_cv_broken_unsetenv=yes - --$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 --$as_echo "$with_doc_strings" >&6; } - --# Check for Python-specific malloc support --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 --$as_echo_n "checking for --with-pymalloc... " >&6; } -+fi - --# Check whether --with-pymalloc was given. --if test "${with_pymalloc+set}" = set; then : -- withval=$with_pymalloc; - fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 -+$as_echo_n "checking for usconfig in -lmpc... " >&6; } -+if ${ac_cv_lib_mpc_usconfig+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lmpc $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ - --if test -z "$with_pymalloc" --then -- case $ac_sys_system in #( -- Emscripten) : -- with_pymalloc="no" ;; #( -- WASI) : -- with_pymalloc="no" ;; #( -- *) : -- with_pymalloc="yes" -- ;; --esac -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char usconfig (); -+int -+main () -+{ -+return usconfig (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_mpc_usconfig=yes -+else -+ ac_cv_lib_mpc_usconfig=no - fi --if test "$with_pymalloc" != "no" --then -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 -+$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } -+if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : - --$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h -+ LIBS="$LIBS -lmpc" - ++ ac_cv_func_inet_aton=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 --$as_echo "$with_pymalloc" >&6; } - --# Check whether objects such as float, tuple and dict are using --# freelists to optimization memory allocation. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-freelists" >&5 --$as_echo_n "checking for --with-freelists... " >&6; } + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --# Check whether --with-freelists was given. --if test "${with_freelists+set}" = set; then : -- withval=$with_freelists; fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_unsetenv" >&5 +-$as_echo "$ac_cv_broken_unsetenv" >&6; } +-if test "x$ac_cv_broken_unsetenv" = xyes; then : +- +- +-$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_aton" >&5 ++$as_echo "$ac_cv_func_inet_aton" >&6; } ++ if test "x$ac_cv_func_inet_aton" = xyes; then : -+if test "$posix_threads" = "yes"; then -+ if test "$unistd_defines_pthreads" = "no"; then - --if test -z "$with_freelists" --then -- with_freelists="yes" --fi --if test "$with_freelists" != "no" --then -+$as_echo "#define _POSIX_THREADS 1" >>confdefs.h - --$as_echo "#define WITH_FREELISTS 1" >>confdefs.h -+ fi - --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freelists" >&5 --$as_echo "$with_freelists" >&6; } -+ # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. -+ case $ac_sys_system/$ac_sys_release in -+ SunOS/5.6) -+$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h ++$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h --# Check for --with-c-locale-coercion --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 --$as_echo_n "checking for --with-c-locale-coercion... " >&6; } -+ ;; -+ SunOS/5.8) -+$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + fi --# Check whether --with-c-locale-coercion was given. --if test "${with_c_locale_coercion+set}" = set; then : -- withval=$with_c_locale_coercion; +-for ac_prog in true +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_prog_TRUE+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$TRUE"; then +- ac_cv_prog_TRUE="$TRUE" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_TRUE="$ac_prog" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +-fi +-fi +-TRUE=$ac_cv_prog_TRUE +-if test -n "$TRUE"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 +-$as_echo "$TRUE" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } -fi -+ ;; -+ AIX/*) -+$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h -+ ;; -+ NetBSD/*) -+$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h --if test -z "$with_c_locale_coercion" --then -- with_c_locale_coercion="yes" --fi --if test "$with_c_locale_coercion" != "no" --then -+ ;; -+ esac +- test -n "$TRUE" && break +-done +-test -n "$TRUE" || TRUE="/bin/true" --$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 -+$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } -+if ${ac_cv_pthread_system_supported+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ ac_cv_pthread_system_supported=no -+else + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 +-$as_echo_n "checking for inet_aton in -lc... " >&6; } +-if ${ac_cv_lib_c_inet_aton+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa" >&5 ++$as_echo_n "checking for inet_ntoa... " >&6; } ++if ${ac_cv_func_inet_ntoa+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lc $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ + /* end confdefs.h. */ -+ #include -+ #include -+ void *foo(void *parm) { -+ return NULL; -+ } -+ int main(void) { -+ pthread_attr_t attr; -+ pthread_t id; -+ if (pthread_attr_init(&attr)) return (-1); -+ if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1); -+ if (pthread_create(&id, &attr, foo, NULL)) return (-1); -+ return (0); -+ } -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_pthread_system_supported=yes -+else -+ ac_cv_pthread_system_supported=no +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char inet_aton (); ++#include ++#include ++#include ++#include ++ + int + main () + { +-return inet_aton (); ++void *x=inet_ntoa + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_c_inet_aton=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_inet_ntoa=yes + else +- ac_cv_lib_c_inet_aton=no ++ ac_cv_func_inet_ntoa=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 +-$as_echo "$ac_cv_lib_c_inet_aton" >&6; } +-if test "x$ac_cv_lib_c_inet_aton" = xyes; then : +- $ac_cv_prog_TRUE +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 +-$as_echo_n "checking for inet_aton in -lresolv... " >&6; } +-if ${ac_cv_lib_resolv_inet_aton+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_ntoa" >&5 ++$as_echo "$ac_cv_func_inet_ntoa" >&6; } ++ if test "x$ac_cv_func_inet_ntoa" = xyes; then : ++ ++$as_echo "#define HAVE_INET_NTOA 1" >>confdefs.h ++ +fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext ++ ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 ++$as_echo_n "checking for inet_pton... " >&6; } ++if ${ac_cv_func_inet_pton+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lresolv $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char inet_aton (); ++#include ++#include ++#include ++#include ++ + int + main () + { +-return inet_aton (); ++void *x=inet_pton + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_resolv_inet_aton=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_inet_pton=yes + else +- ac_cv_lib_resolv_inet_aton=no ++ ac_cv_func_inet_pton=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 --$as_echo "$with_c_locale_coercion" >&6; } +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 +-$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } +-if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBRESOLV 1 +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_pton" >&5 ++$as_echo "$ac_cv_func_inet_pton" >&6; } ++ if test "x$ac_cv_func_inet_pton" = xyes; then : --# Check for Valgrind support --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 --$as_echo_n "checking for --with-valgrind... " >&6; } +- LIBS="-lresolv $LIBS" ++$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h --# Check whether --with-valgrind was given. --if test "${with_valgrind+set}" = set; then : -- withval=$with_valgrind; + fi + + +-fi + + +-# On Tru64, chflags seems to be present, but calling it will +-# exit Python +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 +-$as_echo_n "checking for chflags... " >&6; } +-if ${ac_cv_have_chflags+:} false; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername" >&5 ++$as_echo_n "checking for getpeername... " >&6; } ++if ${ac_cv_func_getpeername+:} false; then : + $as_echo_n "(cached) " >&6 -else -- with_valgrind=no +- if test "$cross_compiling" = yes; then : +- ac_cv_have_chflags=cross + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-int main(int argc, char *argv[]) ++#include ++#include ++#include ++#include ++ ++int ++main () + { +- if(chflags(argv[0], 0) != 0) +- return 1; ++void *x=getpeername ++ ; + return 0; + } +- + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_have_chflags=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_getpeername=yes + else +- ac_cv_have_chflags=no ++ ac_cv_func_getpeername=no fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 -+$as_echo "$ac_cv_pthread_system_supported" >&6; } -+ if test "$ac_cv_pthread_system_supported" = "yes"; then - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 --$as_echo "$with_valgrind" >&6; } --if test "$with_valgrind" != no; then -- ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" --if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : -+$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpeername" >&5 ++$as_echo "$ac_cv_func_getpeername" >&6; } ++ if test "x$ac_cv_func_getpeername" = xyes; then : --$as_echo "#define WITH_VALGRIND 1" >>confdefs.h -+ fi -+ for ac_func in pthread_sigmask -+do : -+ ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" -+if test "x$ac_cv_func_pthread_sigmask" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_PTHREAD_SIGMASK 1 -+_ACEOF -+ case $ac_sys_system in -+ CYGWIN*) ++$as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 +-$as_echo "$ac_cv_have_chflags" >&6; } +-if test "$ac_cv_have_chflags" = cross ; then +- ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" +-if test "x$ac_cv_func_chflags" = xyes; then : +- ac_cv_have_chflags="yes" -else -- as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 -+$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h - -+ ;; -+ esac +- ac_cv_have_chflags="no" fi -+done -+ for ac_func in pthread_getcpuclockid -+do : -+ ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" -+if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_PTHREAD_GETCPUCLOCKID 1 -+_ACEOF +-fi +-if test "$ac_cv_have_chflags" = yes ; then -- OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" - fi -+done +-$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h --# Check for DTrace support --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 --$as_echo_n "checking for --with-dtrace... " >&6; } +-fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 +-$as_echo_n "checking for lchflags... " >&6; } +-if ${ac_cv_have_lchflags+:} false; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname" >&5 ++$as_echo_n "checking for getsockname... " >&6; } ++if ${ac_cv_func_getsockname+:} false; then : + $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then : +- ac_cv_have_lchflags=cross + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-int main(int argc, char *argv[]) ++#include ++#include ++#include ++#include ++ ++int ++main () + { +- if(lchflags(argv[0], 0) != 0) +- return 1; ++void *x=getsockname ++ ; + return 0; + } - --# Check whether --with-dtrace was given. --if test "${with_dtrace+set}" = set; then : -- withval=$with_dtrace; + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_have_lchflags=yes -else -- with_dtrace=no +- ac_cv_have_lchflags=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 +-$as_echo "$ac_cv_have_lchflags" >&6; } +-if test "$ac_cv_have_lchflags" = cross ; then +- ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" +-if test "x$ac_cv_func_lchflags" = xyes; then : +- ac_cv_have_lchflags="yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_getsockname=yes + else +- ac_cv_have_lchflags="no" ++ ac_cv_func_getsockname=no fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 --$as_echo "$with_dtrace" >&6; } -+if test "x$posix_threads" = xstub; then : - + fi +-if test "$ac_cv_have_lchflags" = yes ; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getsockname" >&5 ++$as_echo "$ac_cv_func_getsockname" >&6; } ++ if test "x$ac_cv_func_getsockname" = xyes; then : -+$as_echo "#define HAVE_PTHREAD_STUBS 1" >>confdefs.h +-$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h ++$as_echo "#define HAVE_GETSOCKNAME 1" >>confdefs.h + fi -+fi +@@ -16199,359 +18027,286 @@ fi --DTRACE= --DTRACE_HEADERS= --DTRACE_OBJS= -+# Check for enable-ipv6 --if test "$with_dtrace" = "yes" --then -- # Extract the first word of "dtrace", so it can be a program name with args. --set dummy dtrace; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_DTRACE+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- case $DTRACE in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" -- ;; --esac --fi --DTRACE=$ac_cv_path_DTRACE --if test -n "$DTRACE"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 --$as_echo "$DTRACE" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 -+$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } -+# Check whether --enable-ipv6 was given. -+if test "${enable_ipv6+set}" = set; then : -+ enableval=$enable_ipv6; case "$enableval" in -+ no) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } --fi -- -+ ipv6=no -+ ;; -+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ $as_echo "#define ENABLE_IPV6 1" >>confdefs.h -- if test "$DTRACE" = "not found"; then -- as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 -- fi -+ ipv6=yes -+ ;; -+ esac ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for accept" >&5 ++$as_echo_n "checking for accept... " >&6; } ++if ${ac_cv_func_accept+:} false; then : ++ $as_echo_n "(cached) " >&6 +else - --$as_echo "#define WITH_DTRACE 1" >>confdefs.h + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -+ /* AF_INET6 available check */ + +- if test "$ac_sys_system" = "Emscripten" -a -z "$ZLIB_CFLAGS" -a -z "$ZLIB_LIBS"; then : +#include +#include ++#include ++#include + +- ZLIB_CFLAGS="-sUSE_ZLIB" +- ZLIB_LIBS="-sUSE_ZLIB" +int +main () +{ -+int domain = AF_INET6; ++void *x=accept + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_accept=yes ++else ++ ac_cv_func_accept=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- DTRACE_HEADERS="Include/pydtrace_probes.h" -+ ipv6=yes - -- # On OS X, DTrace providers do not need to be explicitly compiled and -- # linked into the binary. Correspondingly, dtrace(1) is missing the ELF -- # generation flag '-G'. We check for presence of this flag, rather than -- # hardcoding support by OS, in the interest of robustness. -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 --$as_echo_n "checking whether DTrace probes require linking... " >&6; } --if ${ac_cv_dtrace_link+:} false; then : -- $as_echo_n "(cached) " >&6 - else -- ac_cv_dtrace_link=no -- echo 'BEGIN{}' > conftest.d -- "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ -- ac_cv_dtrace_link=yes + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept" >&5 ++$as_echo "$ac_cv_func_accept" >&6; } ++ if test "x$ac_cv_func_accept" = xyes; then : --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 --$as_echo "$ac_cv_dtrace_link" >&6; } -- if test "$ac_cv_dtrace_link" = "yes"; then -- DTRACE_OBJS="Python/pydtrace.o" -- fi --fi -+ ipv6=no ++$as_echo "#define HAVE_ACCEPT 1" >>confdefs.h --PLATFORM_HEADERS= --PLATFORM_OBJS= +fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - case $ac_sys_system in #( -- Emscripten) : -- -- as_fn_append PLATFORM_OBJS ' Python/emscripten_signal.o' -- as_fn_append PLATFORM_HEADERS ' $(srcdir)/Include/internal/pycore_emscripten_signal.h' -- ;; #( -+ WASI) : -+ ipv6=no -+ ;; #( - *) : - ;; - esac -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6" >&5 -+$as_echo "$ipv6" >&6; } -+if test "$ipv6" = "yes"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 -+$as_echo_n "checking if RFC2553 API is available... " >&6; } -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 +-$as_echo_n "checking for ZLIB... " >&6; } + +-if test -n "$ZLIB_CFLAGS"; then +- pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind" >&5 ++$as_echo_n "checking for bind... " >&6; } ++if ${ac_cv_func_bind+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$ZLIB_LIBS"; then +- pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - --# -I${DLINCLDIR} is added to the compile rule for importdl.o -- --DLINCLDIR=. -+ #include ++ ++#include ++#include +#include ++#include ++ +int +main () +{ -+struct sockaddr_in6 x; -+ x.sin6_scope_id; ++void *x=bind + ; + return 0; +} - --# the dlopen() function means we might want to use dynload_shlib.o. some --# platforms have dlopen(), but don't want to use it. --for ac_func in dlopen --do : -- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" --if test "x$ac_cv_func_dlopen" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_DLOPEN 1 - _ACEOF ++_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - ++ ac_cv_func_bind=yes + else +- pkg_failed=yes -fi --done -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ ipv6=yes - -+else - --# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic --# loading of modules. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ ipv6=no - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 --$as_echo_n "checking DYNLOADFILE... " >&6; } --if test -z "$DYNLOADFILE" --then -- case $ac_sys_system/$ac_sys_release in -- hp*|HP*) DYNLOADFILE="dynload_hpux.o";; -- *) -- # use dynload_shlib.c and dlopen() if we have it; otherwise stub -- # out any dynamic loading -- if test "$ac_cv_func_dlopen" = yes -- then DYNLOADFILE="dynload_shlib.o" -- else DYNLOADFILE="dynload_stub.o" -- fi -- ;; -- esac +- else +- pkg_failed=untried ++ ac_cv_func_bind=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 --$as_echo "$DYNLOADFILE" >&6; } --if test "$DYNLOADFILE" != "dynload_stub.o" --then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi --$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h -+if test "$ipv6" = "yes"; then -+ $as_echo "#define ENABLE_IPV6 1" >>confdefs.h - - fi - --# MACHDEP_OBJS can be set to platform-specific object files needed by Python +fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_bind" >&5 ++$as_echo "$ac_cv_func_bind" >&6; } ++ if test "x$ac_cv_func_bind" = xyes; then : ++$as_echo "#define HAVE_BIND 1" >>confdefs.h --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 --$as_echo_n "checking MACHDEP_OBJS... " >&6; } --if test -z "$MACHDEP_OBJS" --then -- MACHDEP_OBJS=$extra_machdep_objs --else -- MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" --fi --if test -z "$MACHDEP_OBJS"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 --$as_echo "none" >&6; } +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes -else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 --$as_echo "$MACHDEP_OBJS" >&6; } --fi -+ipv6type=unknown -+ipv6lib=none -+ipv6trylibc=no +- _pkg_short_errors_supported=no + fi +- if test $_pkg_short_errors_supported = yes; then +- ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` +- else +- ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$ZLIB_PKG_ERRORS" >&5 --# checks for library functions --for ac_func in \ -- accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ -- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ -- faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ -- fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ -- gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ -- getgrnam_r getgrouplist getgroups gethostname getitimer getloadavg getlogin \ -- getpeername getpgid getpid getppid getpriority _getpty \ -- getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \ -- getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ -- lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ -- mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ -- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ -- pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ -- pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ -- rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ -- sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ -- sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ -- setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ -- setresuid setreuid setsid setuid setvbuf shutdown sigaction sigaltstack \ -- sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ -- sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ -- sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -- tmpnam tmpnam_r truncate ttyname umask uname unlinkat utimensat utimes vfork \ -- wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \ -+if test "$ipv6" = "yes"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 -+$as_echo_n "checking ipv6 stack type... " >&6; } -+ for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; -+ do -+ case $i in -+ inria) -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ --do : -- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` --ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" --if eval test \"x\$"$as_ac_var"\" = x"yes"; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+#include -+#ifdef IPV6_INRIA_VERSION -+yes -+#endif - _ACEOF -- -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ ipv6type=$i - fi --done -+rm -f conftest* +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS -+ ;; -+ kame) -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ --# Force lchmod off for Linux. Linux disallows changing the mode of symbolic --# links. Some libc implementations have a stub lchmod implementation that always --# returns an error. --if test "$MACHDEP" != linux; then -- for ac_func in lchmod +- CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" +- LDFLAGS="$LDFLAGS $ZLIB_LIBS" +- for ac_header in zlib.h -do : -- ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" --if test "x$ac_cv_func_lchmod" = xyes; then : +- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +-if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_LCHMOD 1 -+#include -+#ifdef __KAME__ -+yes -+#endif - _ACEOF -- -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ ipv6type=$i; -+ ipv6lib=inet6 -+ ipv6libdir=/usr/local/v6/lib -+ ipv6trylibc=yes - fi --done -+rm -f conftest* +-#define HAVE_ZLIB_H 1 +-_ACEOF --fi -- --ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include -- #include --" --if test "x$ac_cv_have_decl_dirfd" = xyes; then : -- --$as_echo "#define HAVE_DIRFD 1" >>confdefs.h -+ ;; -+ linux-glibc) -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ +- py_check_lib_save_LIBS=$LIBS +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 +-$as_echo_n "checking for gzread in -lz... " >&6; } +-if ${ac_cv_lib_z_gzread+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect" >&5 ++$as_echo_n "checking for connect... " >&6; } ++if ${ac_cv_func_connect+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ -+#include -+#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) -+yes -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ ipv6type=$i; -+ ipv6trylibc=yes +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char gzread (); ++#include ++#include ++#include ++#include ++ + int + main () + { +-return gzread (); ++void *x=connect + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_z_gzread=yes +-else +- ac_cv_lib_z_gzread=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 +-$as_echo "$ac_cv_lib_z_gzread" >&6; } +-if test "x$ac_cv_lib_z_gzread" = xyes; then : +- have_zlib=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_connect=yes + else +- have_zlib=no ++ ac_cv_func_connect=no fi -+rm -f conftest* - -+ ;; -+ linux-inet6) -+ if test -d /usr/inet6; then -+ ipv6type=$i -+ ipv6lib=inet6 -+ ipv6libdir=/usr/inet6/lib -+ BASECFLAGS="-I/usr/inet6/include $BASECFLAGS" -+ fi -+ ;; -+ solaris) -+ if test -f /etc/netconfig; then -+ if $GREP -q tcp6 /etc/netconfig; then -+ ipv6type=$i -+ ipv6trylibc=yes -+ fi -+ fi -+ ;; -+ toshiba) -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+#include -+#ifdef _TOSHIBA_INET6 -+yes -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ ipv6type=$i; -+ ipv6lib=inet6; -+ ipv6libdir=/usr/local/v6/lib +-LIBS=$py_check_lib_save_LIBS +fi -+rm -f conftest* ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_connect" >&5 ++$as_echo "$ac_cv_func_connect" >&6; } ++ if test "x$ac_cv_func_connect" = xyes; then : -+ ;; -+ v6d) -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ - --# For some functions, having a definition is not sufficient, since --# we want to take their address. -- -+#include -+#ifdef __V6D__ -+yes -+#endif -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ ipv6type=$i; -+ ipv6lib=v6; -+ ipv6libdir=/usr/local/v6/lib; -+ BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" -+fi -+rm -f conftest* ++$as_echo "#define HAVE_CONNECT 1" >>confdefs.h -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 --$as_echo_n "checking for chroot... " >&6; } --if ${ac_cv_func_chroot+:} false; then : -- $as_echo_n "(cached) " >&6 -else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ ;; -+ zeta) -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- have_zlib=no + fi + +-done + +- if test "x$have_zlib" = xyes; then : + +- ZLIB_CFLAGS=${ZLIB_CFLAGS-""} +- ZLIB_LIBS=${ZLIB_LIBS-"-lz"} +- py_check_lib_save_LIBS=$LIBS +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 +-$as_echo_n "checking for inflateCopy in -lz... " >&6; } +-if ${ac_cv_lib_z_inflateCopy+:} false; then : ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listen" >&5 ++$as_echo_n "checking for listen... " >&6; } ++if ${ac_cv_func_listen+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include --int --main () --{ --void *x=chroot -- ; -- return 0; --} + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char inflateCopy (); ++#include ++#include ++#include ++#include + -+#include -+#ifdef _ZETA_MINAMI_INET6 -+yes -+#endif + int + main () + { +-return inflateCopy (); ++void *x=listen + ; + return 0; + } _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_chroot=yes --else -- ac_cv_func_chroot=no -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ ipv6type=$i; -+ ipv6lib=inet6; -+ ipv6libdir=/usr/local/v6/lib +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_z_inflateCopy=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_listen=yes + else +- ac_cv_lib_z_inflateCopy=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ ac_cv_func_listen=no fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+rm -f conftest* +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 +-$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } +-if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : +- $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ ;; -+ esac -+ if test "$ipv6type" != "unknown"; then -+ break -+ fi -+ done -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 -+$as_echo "$ipv6type" >&6; } fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chroot" >&5 --$as_echo "$ac_cv_func_chroot" >&6; } -- if test "x$ac_cv_func_chroot" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_listen" >&5 ++$as_echo "$ac_cv_func_listen" >&6; } ++ if test "x$ac_cv_func_listen" = xyes; then : --$as_echo "#define HAVE_CHROOT 1" >>confdefs.h -+if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then -+ if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then -+ LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" -+ { $as_echo "$as_me:${as_lineno-$LINENO}: using lib$ipv6lib" >&5 -+$as_echo "$as_me: using lib$ipv6lib" >&6;} -+ else -+ if test "x$ipv6trylibc" = xyes; then : +-LIBS=$py_check_lib_save_LIBS +- ++$as_echo "#define HAVE_LISTEN 1" >>confdefs.h --fi -+ { $as_echo "$as_me:${as_lineno-$LINENO}: using libc" >&5 -+$as_echo "$as_me: using libc" >&6;} + fi -+else +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS +- -+ as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 -+fi -+ fi -+fi +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 --$as_echo_n "checking for link... " >&6; } --if ${ac_cv_func_link+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CAN_RAW_FD_FRAMES" >&5 -+$as_echo_n "checking CAN_RAW_FD_FRAMES... " >&6; } -+if ${ac_cv_can_raw_fd_frames+:} false; then : +- CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" +- LDFLAGS="$LDFLAGS $ZLIB_LIBS" +- for ac_header in zlib.h +-do : +- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +-if test "x$ac_cv_header_zlib_h" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_ZLIB_H 1 +-_ACEOF +- +- py_check_lib_save_LIBS=$LIBS +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 +-$as_echo_n "checking for gzread in -lz... " >&6; } +-if ${ac_cv_lib_z_gzread+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvfrom" >&5 ++$as_echo_n "checking for recvfrom... " >&6; } ++if ${ac_cv_func_recvfrom+:} false; then : $as_echo_n "(cached) " >&6 else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include -+ /* CAN_RAW_FD_FRAMES available check */ -+#include + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char gzread (); ++#include ++#include ++#include ++#include ++ int main () { --void *x=link -+int can_raw_fd_frames = CAN_RAW_FD_FRAMES; +-return gzread (); ++void *x=recvfrom ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_link=yes -+ ac_cv_can_raw_fd_frames=yes +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_z_gzread=yes +-else +- ac_cv_lib_z_gzread=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 +-$as_echo "$ac_cv_lib_z_gzread" >&6; } +-if test "x$ac_cv_lib_z_gzread" = xyes; then : +- have_zlib=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_recvfrom=yes else -- ac_cv_func_link=no -+ ac_cv_can_raw_fd_frames=no +- have_zlib=no ++ ac_cv_func_recvfrom=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_link" >&5 --$as_echo "$ac_cv_func_link" >&6; } -- if test "x$ac_cv_func_link" = xyes; then : -- --$as_echo "#define HAVE_LINK 1" >>confdefs.h -- --fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_fd_frames" >&5 -+$as_echo "$ac_cv_can_raw_fd_frames" >&6; } -+if test "x$ac_cv_can_raw_fd_frames" = xyes; then : +-LIBS=$py_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_recvfrom" >&5 ++$as_echo "$ac_cv_func_recvfrom" >&6; } ++ if test "x$ac_cv_func_recvfrom" = xyes; then : ++$as_echo "#define HAVE_RECVFROM 1" >>confdefs.h -+$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h +-else +- have_zlib=no + fi +-done -+fi +- if test "x$have_zlib" = xyes; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 --$as_echo_n "checking for symlink... " >&6; } --if ${ac_cv_func_symlink+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5 -+$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; } -+if ${ac_cv_can_raw_join_filters+:} false; then : +- ZLIB_CFLAGS=${ZLIB_CFLAGS-""} +- ZLIB_LIBS=${ZLIB_LIBS-"-lz"} +- py_check_lib_save_LIBS=$LIBS +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 +-$as_echo_n "checking for inflateCopy in -lz... " >&6; } +-if ${ac_cv_lib_z_inflateCopy+:} false; then : ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendto" >&5 ++$as_echo_n "checking for sendto... " >&6; } ++if ${ac_cv_func_sendto+:} false; then : $as_echo_n "(cached) " >&6 else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char inflateCopy (); ++#include ++#include ++#include ++#include + -+#include int main () { --void *x=symlink -+int can_raw_join_filters = CAN_RAW_JOIN_FILTERS; +-return inflateCopy (); ++void *x=sendto ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_symlink=yes -+ ac_cv_can_raw_join_filters=yes +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_z_inflateCopy=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_sendto=yes else -- ac_cv_func_symlink=no -+ ac_cv_can_raw_join_filters=no - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_symlink" >&5 --$as_echo "$ac_cv_func_symlink" >&6; } -- if test "x$ac_cv_func_symlink" = xyes; then : -- --$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_join_filters" >&5 -+$as_echo "$ac_cv_can_raw_join_filters" >&6; } -+if test "x$ac_cv_can_raw_join_filters" = xyes; then : - +- ac_cv_lib_z_inflateCopy=no -fi - -+$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h - - -+fi - -+# Check for --with-doc-strings -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 -+$as_echo_n "checking for --with-doc-strings... " >&6; } - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 --$as_echo_n "checking for fchdir... " >&6; } --if ${ac_cv_func_fchdir+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --int --main () --{ --void *x=fchdir -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_fchdir=yes --else -- ac_cv_func_fchdir=no -+# Check whether --with-doc-strings was given. -+if test "${with_doc_strings+set}" = set; then : -+ withval=$with_doc_strings; +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ ac_cv_func_sendto=no fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 +-$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } +-if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : +- $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+if test -z "$with_doc_strings" -+then with_doc_strings="yes" fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fchdir" >&5 --$as_echo "$ac_cv_func_fchdir" >&6; } -- if test "x$ac_cv_func_fchdir" = xyes; then : -+if test "$with_doc_strings" != "no" -+then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sendto" >&5 ++$as_echo "$ac_cv_func_sendto" >&6; } ++ if test "x$ac_cv_func_sendto" = xyes; then : --$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h -+$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h +-LIBS=$py_check_lib_save_LIBS +- ++$as_echo "#define HAVE_SENDTO 1" >>confdefs.h fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 -+$as_echo "$with_doc_strings" >&6; } - -+# Check for Python-specific malloc support -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 -+$as_echo_n "checking for --with-pymalloc... " >&6; } -+# Check whether --with-pymalloc was given. -+if test "${with_pymalloc+set}" = set; then : -+ withval=$with_pymalloc; -+fi +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS -+if test -z "$with_pymalloc" -+then -+ case $ac_sys_system in #( -+ Emscripten) : -+ with_pymalloc="no" ;; #( -+ WASI) : -+ with_pymalloc="no" ;; #( -+ *) : -+ with_pymalloc="yes" -+ ;; -+esac -+fi -+if test "$with_pymalloc" != "no" -+then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 --$as_echo_n "checking for fsync... " >&6; } --if ${ac_cv_func_fsync+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --int --main () --{ --void *x=fsync -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_fsync=yes -else -- ac_cv_func_fsync=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fsync" >&5 --$as_echo "$ac_cv_func_fsync" >&6; } -- if test "x$ac_cv_func_fsync" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 -+$as_echo "$with_pymalloc" >&6; } - --$as_echo "#define HAVE_FSYNC 1" >>confdefs.h -+# Check whether objects such as float, tuple and dict are using -+# freelists to optimization memory allocation. -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-freelists" >&5 -+$as_echo_n "checking for --with-freelists... " >&6; } - -+# Check whether --with-freelists was given. -+if test "${with_freelists+set}" = set; then : -+ withval=$with_freelists; - fi - - -+if test -z "$with_freelists" -+then -+ with_freelists="yes" -+fi -+if test "$with_freelists" != "no" -+then +- ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS +- ZLIB_LIBS=$pkg_cv_ZLIB_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } -+$as_echo "#define WITH_FREELISTS 1" >>confdefs.h +- have_zlib=yes +- $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt" >&5 ++$as_echo_n "checking for setsockopt... " >&6; } ++if ${ac_cv_func_setsockopt+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 --$as_echo_n "checking for fdatasync... " >&6; } --if ${ac_cv_func_fdatasync+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --int --main () --{ --void *x=fdatasync -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_fdatasync=yes --else -- ac_cv_func_fdatasync=no ++#include ++#include ++#include ++#include + ++int ++main () ++{ ++void *x=setsockopt ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_setsockopt=yes ++else ++ ac_cv_func_setsockopt=no fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freelists" >&5 -+$as_echo "$with_freelists" >&6; } +- +-if test "x$have_zlib" = xyes; then : +- +- BINASCII_CFLAGS="-DUSE_ZLIB_CRC32 $ZLIB_CFLAGS" +- BINASCII_LIBS="$ZLIB_LIBS" ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+# Check for --with-c-locale-coercion -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 -+$as_echo_n "checking for --with-c-locale-coercion... " >&6; } -+ -+# Check whether --with-c-locale-coercion was given. -+if test "${with_c_locale_coercion+set}" = set; then : -+ withval=$with_c_locale_coercion; fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fdatasync" >&5 --$as_echo "$ac_cv_func_fdatasync" >&6; } -- if test "x$ac_cv_func_fdatasync" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setsockopt" >&5 ++$as_echo "$ac_cv_func_setsockopt" >&6; } ++ if test "x$ac_cv_func_setsockopt" = xyes; then : --$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h +- +- +- +- if test "$ac_sys_system" = "Emscripten" -a -z "$BZIP2_CFLAGS" -a -z "$BZIP2_LIBS"; then : +- +- BZIP2_CFLAGS="-sUSE_BZIP2" +- BZIP2_LIBS="-sUSE_BZIP2" ++$as_echo "#define HAVE_SETSOCKOPT 1" >>confdefs.h -+if test -z "$with_c_locale_coercion" -+then -+ with_c_locale_coercion="yes" fi -+if test "$with_c_locale_coercion" != "no" -+then -+$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h +@@ -16559,171 +18314,107 @@ fi -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 -+$as_echo "$with_c_locale_coercion" >&6; } -+# Check for Valgrind support -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 -+$as_echo_n "checking for --with-valgrind... " >&6; } +-pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZIP2" >&5 +-$as_echo_n "checking for BZIP2... " >&6; } - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create" >&5 --$as_echo_n "checking for epoll_create... " >&6; } --if ${ac_cv_func_epoll_create+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --int --main () --{ --void *x=epoll_create -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_epoll_create=yes -+# Check whether --with-valgrind was given. -+if test "${with_valgrind+set}" = set; then : -+ withval=$with_valgrind; +-if test -n "$BZIP2_CFLAGS"; then +- pkg_cv_BZIP2_CFLAGS="$BZIP2_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_BZIP2_CFLAGS=`$PKG_CONFIG --cflags "bzip2" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket" >&5 ++$as_echo_n "checking for socket... " >&6; } ++if ${ac_cv_func_socket+:} false; then : ++ $as_echo_n "(cached) " >&6 else -- ac_cv_func_epoll_create=no -+ with_valgrind=no - fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +- pkg_failed=yes -fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create" >&5 --$as_echo "$ac_cv_func_epoll_create" >&6; } -- if test "x$ac_cv_func_epoll_create" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 -+$as_echo "$with_valgrind" >&6; } -+if test "$with_valgrind" != no; then -+ ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" -+if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : - --$as_echo "#define HAVE_EPOLL 1" >>confdefs.h -+$as_echo "#define WITH_VALGRIND 1" >>confdefs.h - +- else +- pkg_failed=untried -fi -+else -+ as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 +-if test -n "$BZIP2_LIBS"; then +- pkg_cv_BZIP2_LIBS="$BZIP2_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_BZIP2_LIBS=`$PKG_CONFIG --libs "bzip2" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include ++#include ++#include ++ ++int ++main () ++{ ++void *x=socket ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_socket=yes + else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried ++ ac_cv_func_socket=no + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socket" >&5 ++$as_echo "$ac_cv_func_socket" >&6; } ++ if test "x$ac_cv_func_socket" = xyes; then : ++$as_echo "#define HAVE_SOCKET 1" >>confdefs.h -+ OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" -+fi +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no + fi +- if test $_pkg_short_errors_supported = yes; then +- BZIP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "bzip2" 2>&1` +- else +- BZIP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "bzip2" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$BZIP2_PKG_ERRORS" >&5 -+# Check for DTrace support -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 -+$as_echo_n "checking for --with-dtrace... " >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 --$as_echo_n "checking for epoll_create1... " >&6; } --if ${ac_cv_func_epoll_create1+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --int --main () --{ --void *x=epoll_create1 -- ; -- return 0; --} +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS + + +- CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" +- LDFLAGS="$LDFLAGS $BZIP2_LIBS" +- for ac_header in bzlib.h +-do : +- ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" +-if test "x$ac_cv_header_bzlib_h" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_BZLIB_H 1 -_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_epoll_create1=yes -+# Check whether --with-dtrace was given. -+if test "${with_dtrace+set}" = set; then : -+ withval=$with_dtrace; ++# On some systems, setgroups is in unistd.h, on others, in grp.h + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 +-$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } +-if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5 ++$as_echo_n "checking for setgroups... " >&6; } ++if ${ac_cv_func_setgroups+:} false; then : + $as_echo_n "(cached) " >&6 else -- ac_cv_func_epoll_create1=no +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lbz2 $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" ++#include ++#ifdef HAVE_GRP_H ++#include + #endif +-char BZ2_bzCompress (); ++ + int + main () + { +-return BZ2_bzCompress (); ++void *x=setgroups + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_bz2_BZ2_bzCompress=yes +-else +- ac_cv_lib_bz2_BZ2_bzCompress=no -fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 +-$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } +-if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : +- have_bzip2=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_setgroups=yes + else +- have_bzip2=no ++ ac_cv_func_setgroups=no + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + - -+ with_dtrace=no +-else +- have_bzip2=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create1" >&5 --$as_echo "$ac_cv_func_epoll_create1" >&6; } -- if test "x$ac_cv_func_epoll_create1" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setgroups" >&5 ++$as_echo "$ac_cv_func_setgroups" >&6; } ++ if test "x$ac_cv_func_setgroups" = xyes; then : + +-done +- +- if test "x$have_bzip2" = xyes; then : +- +- BZIP2_CFLAGS=${BZIP2_CFLAGS-""} +- BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} ++$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h --$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 -+$as_echo "$with_dtrace" >&6; } + fi --fi +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS +- +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS ++# check for openpty, login_tty, and forkpty -+DTRACE= -+DTRACE_HEADERS= -+DTRACE_OBJS= +- CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" +- LDFLAGS="$LDFLAGS $BZIP2_LIBS" +- for ac_header in bzlib.h ++for ac_func in openpty + do : +- ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" +-if test "x$ac_cv_header_bzlib_h" = xyes; then : ++ ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" ++if test "x$ac_cv_func_openpty" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_BZLIB_H 1 ++#define HAVE_OPENPTY 1 + _ACEOF -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 --$as_echo_n "checking for kqueue... " >&6; } --if ${ac_cv_func_kqueue+:} false; then : -+if test "$with_dtrace" = "yes" -+then -+ # Extract the first word of "dtrace", so it can be a program name with args. -+set dummy dtrace; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_path_DTRACE+:} false; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 +-$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } +-if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 ++$as_echo_n "checking for openpty in -lutil... " >&6; } ++if ${ac_cv_lib_util_openpty+:} false; then : $as_echo_n "(cached) " >&6 else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lbz2 $LIBS" ++LIBS="-lutil $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -16733,144 +18424,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char BZ2_bzCompress (); ++char openpty (); + int + main () + { +-return BZ2_bzCompress (); ++return openpty (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_bz2_BZ2_bzCompress=yes ++ ac_cv_lib_util_openpty=yes + else +- ac_cv_lib_bz2_BZ2_bzCompress=no ++ ac_cv_lib_util_openpty=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 +-$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } +-if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : +- have_bzip2=yes +-else +- have_bzip2=no +-fi - --#include --#include - --int --main () --{ --void *x=kqueue -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_kqueue=yes -else -- ac_cv_func_kqueue=no +- have_bzip2=no -fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ case $DTRACE in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS - -+ test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" -+ ;; -+esac - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_kqueue" >&5 --$as_echo "$ac_cv_func_kqueue" >&6; } -- if test "x$ac_cv_func_kqueue" = xyes; then : - --$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h +-done - -+DTRACE=$ac_cv_path_DTRACE -+if test -n "$DTRACE"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 -+$as_echo "$DTRACE" >&6; } +- if test "x$have_bzip2" = xyes; then : +- +- BZIP2_CFLAGS=${BZIP2_CFLAGS-""} +- BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} +- +-fi +- +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS +- +- +- +-else +- BZIP2_CFLAGS=$pkg_cv_BZIP2_CFLAGS +- BZIP2_LIBS=$pkg_cv_BZIP2_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- have_bzip2=yes +-fi +- +- +-pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZMA" >&5 +-$as_echo_n "checking for LIBLZMA... " >&6; } +- +-if test -n "$LIBLZMA_CFLAGS"; then +- pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_LIBLZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$LIBLZMA_LIBS"; then +- pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_LIBLZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +- +- +- +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no +-fi +- if test $_pkg_short_errors_supported = yes; then +- LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` +- else +- LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$LIBLZMA_PKG_ERRORS" >&5 +- +- +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS +- +- +- CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" +- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" +- for ac_header in lzma.h +-do : +- ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" +-if test "x$ac_cv_header_lzma_h" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LZMA_H 1 +-_ACEOF +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 +-$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } +-if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 ++$as_echo "$ac_cv_lib_util_openpty" >&6; } ++if test "x$ac_cv_lib_util_openpty" = xyes; then : ++ $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h ++ LIBS="$LIBS -lutil" +else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 ++$as_echo_n "checking for openpty in -lbsd... " >&6; } ++if ${ac_cv_lib_bsd_openpty+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-llzma $LIBS" ++LIBS="-lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -16880,80 +18464,113 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char lzma_easy_encoder (); ++char openpty (); + int + main () + { +-return lzma_easy_encoder (); ++return openpty (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_lzma_lzma_easy_encoder=yes ++ ac_cv_lib_bsd_openpty=yes + else +- ac_cv_lib_lzma_lzma_easy_encoder=no ++ ac_cv_lib_bsd_openpty=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 +-$as_echo "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } +-if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes; then : +- have_liblzma=yes +-else +- have_liblzma=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 ++$as_echo "$ac_cv_lib_bsd_openpty" >&6; } ++if test "x$ac_cv_lib_bsd_openpty" = xyes; then : ++ $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h ++ LIBS="$LIBS -lbsd" fi -+ if test "$DTRACE" = "not found"; then -+ as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 -+ fi +-else +- have_liblzma=no + fi -+$as_echo "#define WITH_DTRACE 1" >>confdefs.h +-done +- +- if test "x$have_liblzma" = xyes; then : +- +- LIBLZMA_CFLAGS=${LIBLZMA_CFLAGS-""} +- LIBLZMA_LIBS=${LIBLZMA_LIBS-"-llzma"} -+ DTRACE_HEADERS="Include/pydtrace_probes.h" + fi ++done -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 --$as_echo_n "checking for prlimit... " >&6; } --if ${ac_cv_func_prlimit+:} false; then : -+ # On OS X, DTrace providers do not need to be explicitly compiled and -+ # linked into the binary. Correspondingly, dtrace(1) is missing the ELF -+ # generation flag '-G'. We check for presence of this flag, rather than -+ # hardcoding support by OS, in the interest of robustness. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 -+$as_echo_n "checking whether DTrace probes require linking... " >&6; } -+if ${ac_cv_dtrace_link+:} false; then : - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+ ac_cv_dtrace_link=no -+ echo 'BEGIN{}' > conftest.d -+ "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ -+ ac_cv_dtrace_link=yes +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login_tty" >&5 ++$as_echo_n "checking for library containing login_tty... " >&6; } ++if ${ac_cv_search_login_tty+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ --#include --#include ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char login_tty (); ++int ++main () ++{ ++return login_tty (); ++ ; ++ return 0; ++} ++_ACEOF ++for ac_lib in '' util; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_login_tty=$ac_res +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 -+$as_echo "$ac_cv_dtrace_link" >&6; } -+ if test "$ac_cv_dtrace_link" = "yes"; then -+ DTRACE_OBJS="Python/pydtrace.o" -+ fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_login_tty+:} false; then : ++ break +fi ++done ++if ${ac_cv_search_login_tty+:} false; then : --int --main () --{ --void *x=prlimit -- ; -- return 0; --} -+PLATFORM_HEADERS= -+PLATFORM_OBJS= -+ -+case $ac_sys_system in #( -+ Emscripten) : -+ -+ as_fn_append PLATFORM_OBJS ' Python/emscripten_signal.o' -+ as_fn_append PLATFORM_HEADERS ' $(srcdir)/Include/internal/pycore_emscripten_signal.h' -+ ;; #( -+ *) : -+ ;; -+esac -+ -+ -+ -+# -I${DLINCLDIR} is added to the compile rule for importdl.o -+ -+DLINCLDIR=. -+ -+# the dlopen() function means we might want to use dynload_shlib.o. some -+# platforms have dlopen(), but don't want to use it. -+for ac_func in dlopen -+do : -+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -+if test "x$ac_cv_func_dlopen" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_DLOPEN 1 - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_prlimit=yes -+ ++else ++ ac_cv_search_login_tty=no +fi -+done -+ -+ -+# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic -+# loading of modules. -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 -+$as_echo_n "checking DYNLOADFILE... " >&6; } -+if test -z "$DYNLOADFILE" -+then -+ case $ac_sys_system/$ac_sys_release in -+ hp*|HP*) DYNLOADFILE="dynload_hpux.o";; -+ *) -+ # use dynload_shlib.c and dlopen() if we have it; otherwise stub -+ # out any dynamic loading -+ if test "$ac_cv_func_dlopen" = yes -+ then DYNLOADFILE="dynload_shlib.o" -+ else DYNLOADFILE="dynload_stub.o" -+ fi -+ ;; -+ esac ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 -+$as_echo "$DYNLOADFILE" >&6; } -+if test "$DYNLOADFILE" != "dynload_stub.o" -+then -+ -+$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h -+ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login_tty" >&5 ++$as_echo "$ac_cv_search_login_tty" >&6; } ++ac_res=$ac_cv_search_login_tty ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } ++$as_echo "#define HAVE_LOGIN_TTY 1" >>confdefs.h + +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS + +fi -+ -+# MACHDEP_OBJS can be set to platform-specific object files needed by Python -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 -+$as_echo_n "checking MACHDEP_OBJS... " >&6; } -+if test -z "$MACHDEP_OBJS" -+then -+ MACHDEP_OBJS=$extra_machdep_objs + +- CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" +- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" +- for ac_header in lzma.h ++for ac_func in forkpty + do : +- ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" +-if test "x$ac_cv_header_lzma_h" = xyes; then : ++ ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty" ++if test "x$ac_cv_func_forkpty" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_LZMA_H 1 ++#define HAVE_FORKPTY 1 + _ACEOF + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 +-$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } +-if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 ++$as_echo_n "checking for forkpty in -lutil... " >&6; } ++if ${ac_cv_lib_util_forkpty+:} false; then : + $as_echo_n "(cached) " >&6 else -- ac_cv_func_prlimit=no -+ MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" + ac_check_lib_save_LIBS=$LIBS +-LIBS="-llzma $LIBS" ++LIBS="-lutil $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -16963,1628 +18580,1774 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char lzma_easy_encoder (); ++char forkpty (); + int + main () + { +-return lzma_easy_encoder (); ++return forkpty (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_lzma_lzma_easy_encoder=yes ++ ac_cv_lib_util_forkpty=yes + else +- ac_cv_lib_lzma_lzma_easy_encoder=no ++ ac_cv_lib_util_forkpty=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 +-$as_echo "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } +-if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes; then : +- have_liblzma=yes ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 ++$as_echo "$ac_cv_lib_util_forkpty" >&6; } ++if test "x$ac_cv_lib_util_forkpty" = xyes; then : ++ $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h ++ LIBS="$LIBS -lutil" + else +- have_liblzma=no +-fi +- ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 ++$as_echo_n "checking for forkpty in -lbsd... " >&6; } ++if ${ac_cv_lib_bsd_forkpty+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lbsd $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char forkpty (); ++int ++main () ++{ ++return forkpty (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_bsd_forkpty=yes + else +- have_liblzma=no ++ ac_cv_lib_bsd_forkpty=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 ++$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } ++if test "x$ac_cv_lib_bsd_forkpty" = xyes; then : ++ $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h ++ LIBS="$LIBS -lbsd" fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+if test -z "$MACHDEP_OBJS"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -+$as_echo "none" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 -+$as_echo "$MACHDEP_OBJS" >&6; } + +-done + +- if test "x$have_liblzma" = xyes; then : +fi -+ -+# checks for library functions -+for ac_func in \ -+ accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ -+ copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ -+ faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ -+ fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ -+ gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ -+ getgrnam_r getgrouplist getgroups gethostname getitimer getloadavg getlogin \ -+ getpeername getpgid getpid getppid getpriority _getpty \ -+ getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \ -+ getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ -+ lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ -+ mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ -+ pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ -+ pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ -+ pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ -+ rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ -+ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ -+ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ -+ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ -+ setresuid setreuid setsid setuid setvbuf shutdown sigaction sigaltstack \ -+ sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ -+ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ -+ sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -+ tmpnam tmpnam_r truncate ttyname umask uname unlinkat utimensat utimes vfork \ -+ wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \ -+ + +- LIBLZMA_CFLAGS=${LIBLZMA_CFLAGS-""} +- LIBLZMA_LIBS=${LIBLZMA_LIBS-"-llzma"} + + fi +- +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS ++done + + ++# check for long file support functions ++for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -7207,943 +10830,1589 @@ index 9e76287725..c26d6a0079 100755 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +-else +- LIBLZMA_CFLAGS=$pkg_cv_LIBLZMA_CFLAGS +- LIBLZMA_LIBS=$pkg_cv_LIBLZMA_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- have_liblzma=yes fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_prlimit" >&5 --$as_echo "$ac_cv_func_prlimit" >&6; } -- if test "x$ac_cv_func_prlimit" = xyes; then : +done - --$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h + -+# Force lchmod off for Linux. Linux disallows changing the mode of symbolic -+# links. Some libc implementations have a stub lchmod implementation that always -+# returns an error. -+if test "$MACHDEP" != linux; then -+ for ac_func in lchmod + ++ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" ++if test "x$ac_cv_func_dup2" = xyes; then : ++ $as_echo "#define HAVE_DUP2 1" >>confdefs.h + ++else ++ case " $LIBOBJS " in ++ *" dup2.$ac_objext "* ) ;; ++ *) LIBOBJS="$LIBOBJS dup2.$ac_objext" ++ ;; ++esac + ++fi + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 +-$as_echo_n "checking for hstrerror... " >&6; } +-if ${ac_cv_func_hstrerror+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++for ac_func in getpgrp +do : -+ ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" -+if test "x$ac_cv_func_lchmod" = xyes; then : ++ ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp" ++if test "x$ac_cv_func_getpgrp" = xyes; then : + cat >>confdefs.h <<_ACEOF -+#define HAVE_LCHMOD 1 ++#define HAVE_GETPGRP 1 +_ACEOF -+ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + int + main () + { +-void *x=hstrerror ++getpgrp(0); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_hstrerror=yes +-else +- ac_cv_func_hstrerror=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_hstrerror" >&5 +-$as_echo "$ac_cv_func_hstrerror" >&6; } +- if test "x$ac_cv_func_hstrerror" = xyes; then : + +-$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h ++$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h + + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +- +- +- +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname" >&5 +-$as_echo_n "checking for getservbyname... " >&6; } +-if ${ac_cv_func_getservbyname+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi +done - ++ ++for ac_func in setpgrp ++do : ++ ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" ++if test "x$ac_cv_func_setpgrp" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SETPGRP 1 ++_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + int + main () + { +-void *x=getservbyname ++setpgrp(0,0); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_getservbyname=yes +-else +- ac_cv_func_getservbyname=no ++ ++$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h ++ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include -+ #include -+" -+if test "x$ac_cv_have_decl_dirfd" = xyes; then : + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyname" >&5 +-$as_echo "$ac_cv_func_getservbyname" >&6; } +- if test "x$ac_cv_func_getservbyname" = xyes; then : ++done -+$as_echo "#define HAVE_DIRFD 1" >>confdefs.h +-$as_echo "#define HAVE_GETSERVBYNAME 1" >>confdefs.h ++ ++ ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCRYPT" >&5 ++$as_echo_n "checking for LIBCRYPT... " >&6; } ++ ++if test -n "$LIBCRYPT_CFLAGS"; then ++ pkg_cv_LIBCRYPT_CFLAGS="$LIBCRYPT_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_LIBCRYPT_CFLAGS=`$PKG_CONFIG --cflags "libxcrypt >= 3.1.1" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$LIBCRYPT_LIBS"; then ++ pkg_cv_LIBCRYPT_LIBS="$LIBCRYPT_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_LIBCRYPT_LIBS=`$PKG_CONFIG --libs "libxcrypt >= 3.1.1" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes +fi ++ else ++ pkg_failed=untried + fi -+# For some functions, having a definition is not sufficient, since -+# we want to take their address. -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 --$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; } --if ${ac_cv_func__dyld_shared_cache_contains_path+:} false; then : ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 -+$as_echo_n "checking for chroot... " >&6; } -+if ${ac_cv_func_chroot+:} false; then : ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1` ++ else ++ LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$LIBCRYPT_PKG_ERRORS" >&5 ++ ++ ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyport" >&5 +-$as_echo_n "checking for getservbyport... " >&6; } +-if ${ac_cv_func_getservbyport+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 ++$as_echo_n "checking for library containing crypt_r... " >&6; } ++if ${ac_cv_search_crypt_r+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include -+#include +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char crypt_r (); int main () { --void *x=_dyld_shared_cache_contains_path -+void *x=chroot +-void *x=getservbyport ++return crypt_r (); ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func__dyld_shared_cache_contains_path=yes -+ ac_cv_func_chroot=yes - else -- ac_cv_func__dyld_shared_cache_contains_path=no -+ ac_cv_func_chroot=no +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_getservbyport=yes +-else +- ac_cv_func_getservbyport=no ++for ac_lib in '' crypt; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_crypt_r=$ac_res fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_crypt_r+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_crypt_r+:} false; then : ++else ++ ac_cv_search_crypt_r=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func__dyld_shared_cache_contains_path" >&5 --$as_echo "$ac_cv_func__dyld_shared_cache_contains_path" >&6; } -- if test "x$ac_cv_func__dyld_shared_cache_contains_path" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chroot" >&5 -+$as_echo "$ac_cv_func_chroot" >&6; } -+ if test "x$ac_cv_func_chroot" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyport" >&5 +-$as_echo "$ac_cv_func_getservbyport" >&6; } +- if test "x$ac_cv_func_getservbyport" = xyes; then : ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 ++$as_echo "$ac_cv_search_crypt_r" >&6; } ++ac_res=$ac_cv_search_crypt_r ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" --$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h -+$as_echo "#define HAVE_CHROOT 1" >>confdefs.h +-$as_echo "#define HAVE_GETSERVBYPORT 1" >>confdefs.h ++ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h ++ ++ if test "$ac_cv_search_crypt_r" = "none required"; then ++ libcrypt= ++ else ++ libcrypt="$ac_cv_search_crypt_r" ++ fi ++ LIBCRYPT_LIBS=${LIBCRYPT_LIBS-$libcrypt} fi -@@ -15632,43 +15846,35 @@ fi - - -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 --$as_echo_n "checking for memfd_create... " >&6; } --if ${ac_cv_func_memfd_create+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 -+$as_echo_n "checking for link... " >&6; } -+if ${ac_cv_func_link+:} false; then : ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname" >&5 +-$as_echo_n "checking for gethostbyname... " >&6; } +-if ${ac_cv_func_gethostbyname+:} false; then : ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++ save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 ++$as_echo_n "checking for library containing crypt_r... " >&6; } ++if ${ac_cv_search_crypt_r+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- --#ifdef HAVE_SYS_MMAN_H --#include --#endif --#ifdef HAVE_SYS_MEMFD_H --#include --#endif -- -+#include +-#include ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char crypt_r (); int main () { --void *x=memfd_create -+void *x=link +-void *x=gethostbyname ++return crypt_r (); ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_memfd_create=yes -+ ac_cv_func_link=yes - else -- ac_cv_func_memfd_create=no -+ ac_cv_func_link=no +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_gethostbyname=yes +-else +- ac_cv_func_gethostbyname=no ++for ac_lib in '' crypt; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_crypt_r=$ac_res fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_crypt_r+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_crypt_r+:} false; then : ++else ++ ac_cv_search_crypt_r=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memfd_create" >&5 --$as_echo "$ac_cv_func_memfd_create" >&6; } -- if test "x$ac_cv_func_memfd_create" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_link" >&5 -+$as_echo "$ac_cv_func_link" >&6; } -+ if test "x$ac_cv_func_link" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyname" >&5 +-$as_echo "$ac_cv_func_gethostbyname" >&6; } +- if test "x$ac_cv_func_gethostbyname" = xyes; then : ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 ++$as_echo "$ac_cv_search_crypt_r" >&6; } ++ac_res=$ac_cv_search_crypt_r ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" --$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h -+$as_echo "#define HAVE_LINK 1" >>confdefs.h +-$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h ++ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h ++ ++ if test "$ac_cv_search_crypt_r" = "none required"; then ++ libcrypt= ++ else ++ libcrypt="$ac_cv_search_crypt_r" ++ fi ++ LIBCRYPT_LIBS=${LIBCRYPT_LIBS-$libcrypt} fi -@@ -15676,473 +15882,374 @@ fi ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr" >&5 +-$as_echo_n "checking for gethostbyaddr... " >&6; } +-if ${ac_cv_func_gethostbyaddr+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-void *x=gethostbyaddr +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_gethostbyaddr=yes + else +- ac_cv_func_gethostbyaddr=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ LIBCRYPT_CFLAGS=$pkg_cv_LIBCRYPT_CFLAGS ++ LIBCRYPT_LIBS=$pkg_cv_LIBCRYPT_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyaddr" >&5 +-$as_echo "$ac_cv_func_gethostbyaddr" >&6; } +- if test "x$ac_cv_func_gethostbyaddr" = xyes; then : ++ $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h + +-$as_echo "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h + + fi + ++save_CFLAGS=$CFLAGS ++save_CPPFLAGS=$CPPFLAGS ++save_LDFLAGS=$LDFLAGS ++save_LIBS=$LIBS - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 --$as_echo_n "checking for eventfd... " >&6; } --if ${ac_cv_func_eventfd+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 -+$as_echo_n "checking for symlink... " >&6; } -+if ${ac_cv_func_symlink+:} false; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprotobyname" >&5 +-$as_echo_n "checking for getprotobyname... " >&6; } +-if ${ac_cv_func_getprotobyname+:} false; then : ++ CPPFLAGS="$CPPFLAGS $LIBCRYPT_CFLAGS" ++ LIBS="$LIBCRYPT_LIBS $LIBS" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt or crypt_r" >&5 ++$as_echo_n "checking for crypt or crypt_r... " >&6; } ++if ${ac_cv_crypt_crypt+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- --#ifdef HAVE_SYS_EVENTFD_H --#include --#endif -- -+#include +-#include ++ ++ #ifdef HAVE_CRYPT_H ++ #include ++ #endif ++ #include ++ int main () { --void *x=eventfd -+void *x=symlink +-void *x=getprotobyname ++ ++ #ifdef HAVE_CRYPT_R ++ void *x = crypt_r; ++ #else ++ void *x = crypt; ++ #endif ++ ; return 0; } ++ _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_eventfd=yes -+ ac_cv_func_symlink=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_getprotobyname=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_crypt_crypt=yes else -- ac_cv_func_eventfd=no -+ ac_cv_func_symlink=no +- ac_cv_func_getprotobyname=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++ ac_cv_crypt_crypt=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getprotobyname" >&5 +-$as_echo "$ac_cv_func_getprotobyname" >&6; } +- if test "x$ac_cv_func_getprotobyname" = xyes; then : +- +-$as_echo "#define HAVE_GETPROTOBYNAME 1" >>confdefs.h ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_eventfd" >&5 --$as_echo "$ac_cv_func_eventfd" >&6; } -- if test "x$ac_cv_func_eventfd" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_symlink" >&5 -+$as_echo "$ac_cv_func_symlink" >&6; } -+ if test "x$ac_cv_func_symlink" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_crypt" >&5 ++$as_echo "$ac_cv_crypt_crypt" >&6; } --$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h -+$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS - fi ++for ac_func in clock_gettime ++do : ++ ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" ++if test "x$ac_cv_func_clock_gettime" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_CLOCK_GETTIME 1 ++_ACEOF ++else --# On some systems (eg. FreeBSD 5), we would find a definition of the --# functions ctermid_r, setgroups in the library, but no prototype --# (e.g. because we use _XOPEN_SOURCE). See whether we can take their --# address to avoid compiler warnings and potential miscompilations --# because of the missing prototypes. - - - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 --$as_echo_n "checking for ctermid_r... " >&6; } --if ${ac_cv_func_ctermid_r+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 -+$as_echo_n "checking for fchdir... " >&6; } -+if ${ac_cv_func_fchdir+:} false; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 +-$as_echo_n "checking for inet_aton... " >&6; } +-if ${ac_cv_func_inet_aton+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 ++$as_echo_n "checking for clock_gettime in -lrt... " >&6; } ++if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lrt $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include -+#include + +-#include +-#include +-#include +-#include +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char clock_gettime (); int main () { --void *x=ctermid_r -+void *x=fchdir +-void *x=inet_aton ++return clock_gettime (); ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_ctermid_r=yes -+ ac_cv_func_fchdir=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_inet_aton=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_rt_clock_gettime=yes else -- ac_cv_func_ctermid_r=no -+ ac_cv_func_fchdir=no +- ac_cv_func_inet_aton=no ++ ac_cv_lib_rt_clock_gettime=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ctermid_r" >&5 --$as_echo "$ac_cv_func_ctermid_r" >&6; } -- if test "x$ac_cv_func_ctermid_r" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fchdir" >&5 -+$as_echo "$ac_cv_func_fchdir" >&6; } -+ if test "x$ac_cv_func_fchdir" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_aton" >&5 +-$as_echo "$ac_cv_func_inet_aton" >&6; } +- if test "x$ac_cv_func_inet_aton" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 ++$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } ++if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : ++ ++ LIBS="$LIBS -lrt" ++ $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h ++ ++ ++$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h --$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h -+$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h +-$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h fi ++fi ++done ++ + ++for ac_func in clock_getres ++do : ++ ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" ++if test "x$ac_cv_func_clock_getres" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_CLOCK_GETRES 1 ++_ACEOF ++else --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 --$as_echo_n "checking for flock declaration... " >&6; } --if ${ac_cv_flock_decl+:} false; then : -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 -+$as_echo_n "checking for fsync... " >&6; } -+if ${ac_cv_func_fsync+:} false; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa" >&5 +-$as_echo_n "checking for inet_ntoa... " >&6; } +-if ${ac_cv_func_inet_ntoa+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 ++$as_echo_n "checking for clock_getres in -lrt... " >&6; } ++if ${ac_cv_lib_rt_clock_getres+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lrt $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include -+#include + +-#include +-#include +-#include +-#include +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char clock_getres (); int main () { --void* p = flock -- -+void *x=fsync +-void *x=inet_ntoa ++return clock_getres (); ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_flock_decl=yes -+ ac_cv_func_fsync=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_inet_ntoa=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_rt_clock_getres=yes else -- ac_cv_flock_decl=no -- -+ ac_cv_func_fsync=no +- ac_cv_func_inet_ntoa=no ++ ac_cv_lib_rt_clock_getres=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 --$as_echo "$ac_cv_flock_decl" >&6; } --if test "x$ac_cv_flock_decl" = xyes; then : -- for ac_func in flock --do : -- ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" --if test "x$ac_cv_func_flock" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_FLOCK 1 --_ACEOF -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fsync" >&5 -+$as_echo "$ac_cv_func_fsync" >&6; } -+ if test "x$ac_cv_func_fsync" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_ntoa" >&5 +-$as_echo "$ac_cv_func_inet_ntoa" >&6; } +- if test "x$ac_cv_func_inet_ntoa" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 ++$as_echo "$ac_cv_lib_rt_clock_getres" >&6; } ++if test "x$ac_cv_lib_rt_clock_getres" = xyes; then : + -+$as_echo "#define HAVE_FSYNC 1" >>confdefs.h ++ $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h + +-$as_echo "#define HAVE_INET_NTOA 1" >>confdefs.h fi --done -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 --$as_echo_n "checking for flock in -lbsd... " >&6; } --if ${ac_cv_lib_bsd_flock+:} false; then : -+ -+ -+ + ++fi ++done + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 -+$as_echo_n "checking for fdatasync... " >&6; } -+if ${ac_cv_func_fdatasync+:} false; then : + ++for ac_func in clock_settime ++do : ++ ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime" ++if test "x$ac_cv_func_clock_settime" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_CLOCK_SETTIME 1 ++_ACEOF + ++else + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 +-$as_echo_n "checking for inet_pton... " >&6; } +-if ${ac_cv_func_inet_pton+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 ++$as_echo_n "checking for clock_settime in -lrt... " >&6; } ++if ${ac_cv_lib_rt_clock_settime+:} false; then : $as_echo_n "(cached) " >&6 else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lbsd $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lrt $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +-#include +-#include +-#include +-#include - --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char flock (); -+#include ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char clock_settime (); int main () { --return flock (); -+void *x=fdatasync +-void *x=inet_pton ++return clock_settime (); ; return 0; } _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_bsd_flock=yes -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_fdatasync=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_inet_pton=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_rt_clock_settime=yes else -- ac_cv_lib_bsd_flock=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+ ac_cv_func_fdatasync=no +- ac_cv_func_inet_pton=no ++ ac_cv_lib_rt_clock_settime=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 --$as_echo "$ac_cv_lib_bsd_flock" >&6; } --if test "x$ac_cv_lib_bsd_flock" = xyes; then : -- FCNTL_LIBS="-lbsd" -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fdatasync" >&5 -+$as_echo "$ac_cv_func_fdatasync" >&6; } -+ if test "x$ac_cv_func_fdatasync" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_pton" >&5 +-$as_echo "$ac_cv_func_inet_pton" >&6; } +- if test "x$ac_cv_func_inet_pton" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 ++$as_echo "$ac_cv_lib_rt_clock_settime" >&6; } ++if test "x$ac_cv_lib_rt_clock_settime" = xyes; then : ++ ++ $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h -+$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h +-$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h fi ++fi ++done -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 --$as_echo_n "checking for getpagesize... " >&6; } --if ${ac_cv_func_getpagesize+:} false; then : -+ + ++for ac_func in clock_nanosleep ++do : ++ ac_fn_c_check_func "$LINENO" "clock_nanosleep" "ac_cv_func_clock_nanosleep" ++if test "x$ac_cv_func_clock_nanosleep" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_CLOCK_NANOSLEEP 1 ++_ACEOF + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername" >&5 +-$as_echo_n "checking for getpeername... " >&6; } +-if ${ac_cv_func_getpeername+:} false; then : ++else + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create" >&5 -+$as_echo_n "checking for epoll_create... " >&6; } -+if ${ac_cv_func_epoll_create+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5 ++$as_echo_n "checking for clock_nanosleep in -lrt... " >&6; } ++if ${ac_cv_lib_rt_clock_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lrt $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include -+#include + +-#include +-#include +-#include +-#include +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char clock_nanosleep (); int main () { --void *x=getpagesize -+void *x=epoll_create +-void *x=getpeername ++return clock_nanosleep (); ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_getpagesize=yes -+ ac_cv_func_epoll_create=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_getpeername=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_rt_clock_nanosleep=yes else -- ac_cv_func_getpagesize=no -+ ac_cv_func_epoll_create=no +- ac_cv_func_getpeername=no ++ ac_cv_lib_rt_clock_nanosleep=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpagesize" >&5 --$as_echo "$ac_cv_func_getpagesize" >&6; } -- if test "x$ac_cv_func_getpagesize" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create" >&5 -+$as_echo "$ac_cv_func_epoll_create" >&6; } -+ if test "x$ac_cv_func_epoll_create" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpeername" >&5 +-$as_echo "$ac_cv_func_getpeername" >&6; } +- if test "x$ac_cv_func_getpeername" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_nanosleep" >&5 ++$as_echo "$ac_cv_lib_rt_clock_nanosleep" >&6; } ++if test "x$ac_cv_lib_rt_clock_nanosleep" = xyes; then : ++ ++ $as_echo "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h --$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h -+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h +-$as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h fi ++fi ++done --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 --$as_echo_n "checking for broken unsetenv... " >&6; } --if ${ac_cv_broken_unsetenv+:} false; then : ++for ac_func in nanosleep ++do : ++ ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" ++if test "x$ac_cv_func_nanosleep" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_NANOSLEEP 1 ++_ACEOF + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 -+$as_echo_n "checking for epoll_create1... " >&6; } -+if ${ac_cv_func_epoll_create1+:} false; then : ++else + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname" >&5 +-$as_echo_n "checking for getsockname... " >&6; } +-if ${ac_cv_func_getsockname+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 ++$as_echo_n "checking for nanosleep in -lrt... " >&6; } ++if ${ac_cv_lib_rt_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lrt $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --#include -+#include + +-#include +-#include +-#include +-#include +- ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char nanosleep (); int main () { --int res = unsetenv("DUMMY") -+void *x=epoll_create1 +-void *x=getsockname ++return nanosleep (); ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_broken_unsetenv=no -+ ac_cv_func_epoll_create1=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_getsockname=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_rt_nanosleep=yes else -- ac_cv_broken_unsetenv=yes -- -+ ac_cv_func_epoll_create1=no - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_unsetenv" >&5 --$as_echo "$ac_cv_broken_unsetenv" >&6; } --if test "x$ac_cv_broken_unsetenv" = xyes; then : -- -- --$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create1" >&5 -+$as_echo "$ac_cv_func_epoll_create1" >&6; } -+ if test "x$ac_cv_func_epoll_create1" = xyes; then : - -+$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h - +- ac_cv_func_getsockname=no ++ ac_cv_lib_rt_nanosleep=no fi - --for ac_prog in true --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_TRUE+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$TRUE"; then -- ac_cv_prog_TRUE="$TRUE" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_TRUE="$ac_prog" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --TRUE=$ac_cv_prog_TRUE --if test -n "$TRUE"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 --$as_echo "$TRUE" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getsockname" >&5 +-$as_echo "$ac_cv_func_getsockname" >&6; } +- if test "x$ac_cv_func_getsockname" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 ++$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } ++if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : + +-$as_echo "#define HAVE_GETSOCKNAME 1" >>confdefs.h ++ $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h + -fi ++fi -- test -n "$TRUE" && break --done --test -n "$TRUE" || TRUE="/bin/true" ++fi ++done --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 --$as_echo_n "checking for inet_aton in -lc... " >&6; } --if ${ac_cv_lib_c_inet_aton+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 -+$as_echo_n "checking for kqueue... " >&6; } -+if ${ac_cv_func_kqueue+:} false; then : + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for accept" >&5 +-$as_echo_n "checking for accept... " >&6; } +-if ${ac_cv_func_accept+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major, minor, and makedev" >&5 ++$as_echo_n "checking for major, minor, and makedev... " >&6; } ++if ${ac_cv_device_macros+:} false; then : $as_echo_n "(cached) " >&6 else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lc $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char inet_aton (); ++#if defined(MAJOR_IN_MKDEV) ++#include ++#elif defined(MAJOR_IN_SYSMACROS) + #include +-#include +-#include +-#include ++#include ++#else +#include -+#include -+ ++#endif + int main () { --return inet_aton (); -+void *x=kqueue +-void *x=accept ++ ++ makedev(major(0),minor(0)); ++ ; return 0; } _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_c_inet_aton=yes -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_kqueue=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_accept=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_device_macros=yes else -- ac_cv_lib_c_inet_aton=no -+ ac_cv_func_kqueue=no +- ac_cv_func_accept=no ++ ac_cv_device_macros=no fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 --$as_echo "$ac_cv_lib_c_inet_aton" >&6; } --if test "x$ac_cv_lib_c_inet_aton" = xyes; then : -- $ac_cv_prog_TRUE --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 --$as_echo_n "checking for inet_aton in -lresolv... " >&6; } --if ${ac_cv_lib_resolv_inet_aton+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_kqueue" >&5 -+$as_echo "$ac_cv_func_kqueue" >&6; } -+ if test "x$ac_cv_func_kqueue" = xyes; then : -+ -+$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept" >&5 +-$as_echo "$ac_cv_func_accept" >&6; } +- if test "x$ac_cv_func_accept" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_device_macros" >&5 ++$as_echo "$ac_cv_device_macros" >&6; } ++if test "x$ac_cv_device_macros" = xyes; then : + +-$as_echo "#define HAVE_ACCEPT 1" >>confdefs.h + +-fi ++$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h + + +fi -+ -+ -+ -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 -+$as_echo_n "checking for prlimit... " >&6; } -+if ${ac_cv_func_prlimit+:} false; then : + + ++$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind" >&5 +-$as_echo_n "checking for bind... " >&6; } +-if ${ac_cv_func_bind+:} false; then : ++# On OSF/1 V5.1, getaddrinfo is available, but a define ++# for [no]getaddrinfo in netdb.h. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 ++$as_echo_n "checking for getaddrinfo... " >&6; } ++if ${ac_cv_func_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lresolv $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char inet_aton (); -+#include -+#include -+ + #include + #include +-#include +-#include ++#include ++#include + int main () { --return inet_aton (); -+void *x=prlimit +-void *x=bind ++getaddrinfo(NULL, NULL, NULL, NULL); ; return 0; } _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_resolv_inet_aton=yes -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_prlimit=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_bind=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_func_getaddrinfo=yes else -- ac_cv_lib_resolv_inet_aton=no -+ ac_cv_func_prlimit=no +- ac_cv_func_bind=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++ ac_cv_func_getaddrinfo=no fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_bind" >&5 +-$as_echo "$ac_cv_func_bind" >&6; } +- if test "x$ac_cv_func_bind" = xyes; then : +- +-$as_echo "#define HAVE_BIND 1" >>confdefs.h ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5 ++$as_echo "$ac_cv_func_getaddrinfo" >&6; } + ++if test "x$ac_cv_func_getaddrinfo" = xyes; then : + +- +- +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect" >&5 +-$as_echo_n "checking for connect... " >&6; } +-if ${ac_cv_func_connect+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5 ++$as_echo_n "checking getaddrinfo bug... " >&6; } ++if ${ac_cv_buggy_getaddrinfo+:} false; then : + $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ ++if test "${enable_ipv6+set}" = set; then ++ ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" ++else ++ ac_cv_buggy_getaddrinfo=yes ++fi + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int main(void) ++{ ++ int passive, gaierr, inet4 = 0, inet6 = 0; ++ struct addrinfo hints, *ai, *aitop; ++ char straddr[INET6_ADDRSTRLEN], strport[16]; ++ ++ for (passive = 0; passive <= 1; passive++) { ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = AF_UNSPEC; ++ hints.ai_flags = passive ? AI_PASSIVE : 0; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_protocol = IPPROTO_TCP; ++ if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { ++ (void)gai_strerror(gaierr); ++ goto bad; ++ } ++ for (ai = aitop; ai; ai = ai->ai_next) { ++ if (ai->ai_addr == NULL || ++ ai->ai_addrlen == 0 || ++ getnameinfo(ai->ai_addr, ai->ai_addrlen, ++ straddr, sizeof(straddr), strport, sizeof(strport), ++ NI_NUMERICHOST|NI_NUMERICSERV) != 0) { ++ goto bad; ++ } ++ switch (ai->ai_family) { ++ case AF_INET: ++ if (strcmp(strport, "54321") != 0) { ++ goto bad; ++ } ++ if (passive) { ++ if (strcmp(straddr, "0.0.0.0") != 0) { ++ goto bad; ++ } ++ } else { ++ if (strcmp(straddr, "127.0.0.1") != 0) { ++ goto bad; ++ } ++ } ++ inet4++; ++ break; ++ case AF_INET6: ++ if (strcmp(strport, "54321") != 0) { ++ goto bad; ++ } ++ if (passive) { ++ if (strcmp(straddr, "::") != 0) { ++ goto bad; ++ } ++ } else { ++ if (strcmp(straddr, "::1") != 0) { ++ goto bad; ++ } ++ } ++ inet6++; ++ break; ++ case AF_UNSPEC: ++ goto bad; ++ break; ++ default: ++ /* another family support? */ ++ break; ++ } ++ } ++ freeaddrinfo(aitop); ++ aitop = NULL; ++ } + ++ if (!(inet4 == 0 || inet4 == 2)) ++ goto bad; ++ if (!(inet6 == 0 || inet6 == 2)) ++ goto bad; + +-int +-main () +-{ +-void *x=connect +- ; ++ if (aitop) ++ freeaddrinfo(aitop); + return 0; ++ ++ bad: ++ if (aitop) ++ freeaddrinfo(aitop); ++ return 1; + } ++ + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_connect=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_buggy_getaddrinfo=no + else +- ac_cv_func_connect=no ++ ac_cv_buggy_getaddrinfo=yes fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 --$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } --if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBRESOLV 1 --_ACEOF -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_prlimit" >&5 -+$as_echo "$ac_cv_func_prlimit" >&6; } -+ if test "x$ac_cv_func_prlimit" = xyes; then : +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_connect" >&5 +-$as_echo "$ac_cv_func_connect" >&6; } +- if test "x$ac_cv_func_connect" = xyes; then : +- +-$as_echo "#define HAVE_CONNECT 1" >>confdefs.h + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 ++$as_echo "$ac_cv_buggy_getaddrinfo" >&6; } -- LIBS="-lresolv $LIBS" -+$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h ++fi + ++if test "$ac_cv_func_getaddrinfo" = no -o "$ac_cv_buggy_getaddrinfo" = yes ++then ++ if test "x$ipv6" = xyes; then : + ++ as_fn_error $? "You must get working getaddrinfo() function or pass the \"--disable-ipv6\" option to configure." "$LINENO" 5 + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listen" >&5 +-$as_echo_n "checking for listen... " >&6; } +-if ${ac_cv_func_listen+:} false; then : +- $as_echo_n "(cached) " >&6 ++fi + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#include +-#include +-#include +-#include ++$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + +-int +-main () +-{ +-void *x=listen +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_listen=yes +-else +- ac_cv_func_listen=no fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++for ac_func in getnameinfo ++do : ++ ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" ++if test "x$ac_cv_func_getnameinfo" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETNAMEINFO 1 ++_ACEOF + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_listen" >&5 +-$as_echo "$ac_cv_func_listen" >&6; } +- if test "x$ac_cv_func_listen" = xyes; then : ++done +-$as_echo "#define HAVE_LISTEN 1" >>confdefs.h -fi ++if test "x$ac_cv_header_sys_time_h" = xyes; then : --# On Tru64, chflags seems to be present, but calling it will --# exit Python --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 --$as_echo_n "checking for chflags... " >&6; } --if ${ac_cv_have_chflags+:} false; then : -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 -+$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; } -+if ${ac_cv_func__dyld_shared_cache_contains_path+:} false; then : ++$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + + ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvfrom" >&5 +-$as_echo_n "checking for recvfrom... " >&6; } +-if ${ac_cv_func_recvfrom+:} false; then : ++# checks for structures ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 ++$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } ++if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 --else -- if test "$cross_compiling" = yes; then : -- ac_cv_have_chflags=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - --#include --#include --int main(int argc, char *argv[]) -+#include -+int -+main () - { -- if(chflags(argv[0], 0) != 0) -- return 1; -+void *x=_dyld_shared_cache_contains_path -+ ; + #include +-#include +-#include +-#include ++#include + + int + main () + { +-void *x=recvfrom ++struct tm tm; ++ int *p = &tm.tm_sec; ++ return !p; + ; return 0; } -- _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_have_chflags=yes -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func__dyld_shared_cache_contains_path=yes + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_recvfrom=yes ++ ac_cv_struct_tm=time.h else -- ac_cv_have_chflags=no -+ ac_cv_func__dyld_shared_cache_contains_path=no +- ac_cv_func_recvfrom=no ++ ac_cv_struct_tm=sys/time.h fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 ++$as_echo "$ac_cv_struct_tm" >&6; } ++if test $ac_cv_struct_tm = sys/time.h; then + ++$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func__dyld_shared_cache_contains_path" >&5 -+$as_echo "$ac_cv_func__dyld_shared_cache_contains_path" >&6; } -+ if test "x$ac_cv_func__dyld_shared_cache_contains_path" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_recvfrom" >&5 +-$as_echo "$ac_cv_func_recvfrom" >&6; } +- if test "x$ac_cv_func_recvfrom" = xyes; then : -+$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h +-$as_echo "#define HAVE_RECVFROM 1" >>confdefs.h ++ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include ++#include <$ac_cv_struct_tm> ++ ++" ++if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_TM_TM_ZONE 1 ++_ACEOF ++ --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 --$as_echo "$ac_cv_have_chflags" >&6; } --if test "$ac_cv_have_chflags" = cross ; then -- ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" --if test "x$ac_cv_func_chflags" = xyes; then : -- ac_cv_have_chflags="yes" --else -- ac_cv_have_chflags="no" fi --fi --if test "$ac_cv_have_chflags" = yes ; then ++if test "$ac_cv_member_struct_tm_tm_zone" = yes; then --$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h ++$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h --fi ++else ++ ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include ++" ++if test "x$ac_cv_have_decl_tzname" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 --$as_echo_n "checking for lchflags... " >&6; } --if ${ac_cv_have_lchflags+:} false; then : -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 -+$as_echo_n "checking for memfd_create... " >&6; } -+if ${ac_cv_func_memfd_create+:} false; then : ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_TZNAME $ac_have_decl ++_ACEOF + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendto" >&5 +-$as_echo_n "checking for sendto... " >&6; } +-if ${ac_cv_func_sendto+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 ++$as_echo_n "checking for tzname... " >&6; } ++if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 --else -- if test "$cross_compiling" = yes; then : -- ac_cv_have_lchflags=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - --#include --#include --int main(int argc, char *argv[]) -+#ifdef HAVE_SYS_MMAN_H -+#include -+#endif -+#ifdef HAVE_SYS_MEMFD_H -+#include +- +-#include +-#include +-#include +-#include ++#include ++#if !HAVE_DECL_TZNAME ++extern char *tzname[]; +#endif -+ -+int -+main () + + int + main () { -- if(lchflags(argv[0], 0) != 0) -- return 1; -+void *x=memfd_create -+ ; +-void *x=sendto ++return tzname[0][0]; + ; return 0; } -- _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_have_lchflags=yes --else -- ac_cv_have_lchflags=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 --$as_echo "$ac_cv_have_lchflags" >&6; } --if test "$ac_cv_have_lchflags" = cross ; then -- ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" --if test "x$ac_cv_func_lchflags" = xyes; then : -- ac_cv_have_lchflags="yes" -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_memfd_create=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_sendto=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_var_tzname=yes else -- ac_cv_have_lchflags="no" -+ ac_cv_func_memfd_create=no +- ac_cv_func_sendto=no ++ ac_cv_var_tzname=no fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext fi --if test "$ac_cv_have_lchflags" = yes ; then -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memfd_create" >&5 -+$as_echo "$ac_cv_func_memfd_create" >&6; } -+ if test "x$ac_cv_func_memfd_create" = xyes; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sendto" >&5 +-$as_echo "$ac_cv_func_sendto" >&6; } +- if test "x$ac_cv_func_sendto" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 ++$as_echo "$ac_cv_var_tzname" >&6; } ++ if test $ac_cv_var_tzname = yes; then --$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h -+$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h +-$as_echo "#define HAVE_SENDTO 1" >>confdefs.h ++$as_echo "#define HAVE_TZNAME 1" >>confdefs.h ++ fi fi -@@ -16151,156 +16258,135 @@ fi ++ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_RDEV 1 ++_ACEOF -- if test "$ac_sys_system" = "Emscripten" -a -z "$ZLIB_CFLAGS" -a -z "$ZLIB_LIBS"; then : -- -- ZLIB_CFLAGS="-sUSE_ZLIB" -- ZLIB_LIBS="-sUSE_ZLIB" ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt" >&5 +-$as_echo_n "checking for setsockopt... " >&6; } +-if ${ac_cv_func_setsockopt+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ - +-#include +-#include +-#include +-#include ++ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + +-int +-main () +-{ +-void *x=setsockopt +- ; +- return 0; +-} ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_setsockopt=yes +-else +- ac_cv_func_setsockopt=no -fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -- -- -- -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 -+$as_echo_n "checking for eventfd... " >&6; } -+if ${ac_cv_func_eventfd+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setsockopt" >&5 +-$as_echo "$ac_cv_func_setsockopt" >&6; } +- if test "x$ac_cv_func_setsockopt" = xyes; then : --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 --$as_echo_n "checking for ZLIB... " >&6; } -+#ifdef HAVE_SYS_EVENTFD_H -+#include -+#endif +-$as_echo "#define HAVE_SETSOCKOPT 1" >>confdefs.h --if test -n "$ZLIB_CFLAGS"; then -- pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.0" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes + fi + ++ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_FLAGS 1 ++_ACEOF + + ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket" >&5 +-$as_echo_n "checking for socket... " >&6; } +-if ${ac_cv_func_socket+:} false; then : +- $as_echo_n "(cached) " >&6 -else -- pkg_failed=yes +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#include ++ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : + +-int +-main () +-{ +-void *x=socket +- ; +- return 0; +-} ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_GEN 1 + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_socket=yes +-else +- ac_cv_func_socket=no -fi -- else -- pkg_failed=untried +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- -fi --if test -n "$ZLIB_LIBS"; then -- pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.0" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes -+int -+main () -+{ -+void *x=eventfd -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_eventfd=yes - else -- pkg_failed=yes -+ ac_cv_func_eventfd=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socket" >&5 +-$as_echo "$ac_cv_func_socket" >&6; } +- if test "x$ac_cv_func_socket" = xyes; then : + +-$as_echo "#define HAVE_SOCKET 1" >>confdefs.h + fi -- else -- pkg_failed=untried -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ + ++ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then : + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 ++_ACEOF + + +-# On some systems, setgroups is in unistd.h, on others, in grp.h ++fi + ++ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5 +-$as_echo_n "checking for setgroups... " >&6; } +-if ${ac_cv_func_setgroups+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BLOCKS 1 ++_ACEOF + +-#include +-#ifdef HAVE_GRP_H +-#include +-#endif + +-int +-main () +-{ +-void *x=setgroups +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_setgroups=yes +-else +- ac_cv_func_setgroups=no fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_eventfd" >&5 -+$as_echo "$ac_cv_func_eventfd" >&6; } -+ if test "x$ac_cv_func_eventfd" = xyes; then : +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setgroups" >&5 +-$as_echo "$ac_cv_func_setgroups" >&6; } +- if test "x$ac_cv_func_setgroups" = xyes; then : ++ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" " ++ #include ++ #include ++ ++" ++if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then : ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_PASSWD_PW_GECOS 1 ++_ACEOF -+fi +-$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } + fi ++ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" " ++ #include ++ #include --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` -- else -- ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$ZLIB_PKG_ERRORS" >&5 ++" ++if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then : ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_PASSWD_PW_PASSWD 1 ++_ACEOF -- save_CFLAGS=$CFLAGS --save_CPPFLAGS=$CPPFLAGS --save_LDFLAGS=$LDFLAGS --save_LIBS=$LIBS -+# On some systems (eg. FreeBSD 5), we would find a definition of the -+# functions ctermid_r, setgroups in the library, but no prototype -+# (e.g. because we use _XOPEN_SOURCE). See whether we can take their -+# address to avoid compiler warnings and potential miscompilations -+# because of the missing prototypes. +-# check for openpty, login_tty, and forkpty ++fi -- CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" -- LDFLAGS="$LDFLAGS $ZLIB_LIBS" -- for ac_header in zlib.h +-for ac_func in openpty -do : -- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" --if test "x$ac_cv_header_zlib_h" = xyes; then : +- ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" +-if test "x$ac_cv_func_openpty" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_ZLIB_H 1 --_ACEOF +-#define HAVE_OPENPTY 1 ++# Issue #21085: In Cygwin, siginfo_t does not have si_band field. ++ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include ++" ++if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then : ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_SIGINFO_T_SI_BAND 1 + _ACEOF -- py_check_lib_save_LIBS=$LIBS --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 --$as_echo_n "checking for gzread in -lz... " >&6; } --if ${ac_cv_lib_z_gzread+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 -+$as_echo_n "checking for ctermid_r... " >&6; } -+if ${ac_cv_func_ctermid_r+:} false; then : +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 +-$as_echo_n "checking for openpty in -lutil... " >&6; } +-if ${ac_cv_lib_util_openpty+:} false; then : ++ ++fi ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5 ++$as_echo_n "checking for time.h that defines altzone... " >&6; } ++if ${ac_cv_header_time_altzone+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lz $LIBS" +-LIBS="-lutil $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -- +-/* end confdefs.h. */ + -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif --char gzread (); -+#include +-char openpty (); ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include int main () { --return gzread (); -+void *x=ctermid_r +-return openpty (); ++return altzone; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_z_gzread=yes +- ac_cv_lib_util_openpty=yes +if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_ctermid_r=yes ++ ac_cv_header_time_altzone=yes else -- ac_cv_lib_z_gzread=no -+ ac_cv_func_ctermid_r=no +- ac_cv_lib_util_openpty=no ++ ac_cv_header_time_altzone=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext @@ -8151,1349 +12420,2497 @@ index 9e76287725..c26d6a0079 100755 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 --$as_echo "$ac_cv_lib_z_gzread" >&6; } --if test "x$ac_cv_lib_z_gzread" = xyes; then : -- have_zlib=yes +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 +-$as_echo "$ac_cv_lib_util_openpty" >&6; } +-if test "x$ac_cv_lib_util_openpty" = xyes; then : +- $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h +- LIBS="$LIBS -lutil" -else -- have_zlib=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ctermid_r" >&5 -+$as_echo "$ac_cv_func_ctermid_r" >&6; } -+ if test "x$ac_cv_func_ctermid_r" = xyes; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 +-$as_echo_n "checking for openpty in -lbsd... " >&6; } +-if ${ac_cv_lib_bsd_openpty+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 ++$as_echo "$ac_cv_header_time_altzone" >&6; } ++if test $ac_cv_header_time_altzone = yes; then + -+$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h ++$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h + - fi - --LIBS=$py_check_lib_save_LIBS - - ++fi + -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 -+$as_echo_n "checking for flock declaration... " >&6; } -+if ${ac_cv_flock_decl+:} false; then : -+ $as_echo_n "(cached) " >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5 ++$as_echo_n "checking for addrinfo... " >&6; } ++if ${ac_cv_struct_addrinfo+:} false; then : + $as_echo_n "(cached) " >&6 else -- have_zlib=no +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lbsd $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+void* p = flock -+ -+ ; -+ return 0; -+} -+_ACEOF + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char openpty (); ++#include + int + main () + { +-return openpty (); ++struct addrinfo a + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_bsd_openpty=yes +if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_flock_decl=yes -+else -+ ac_cv_flock_decl=no -+ ++ ac_cv_struct_addrinfo=yes + else +- ac_cv_lib_bsd_openpty=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 +-$as_echo "$ac_cv_lib_bsd_openpty" >&6; } +-if test "x$ac_cv_lib_bsd_openpty" = xyes; then : +- $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h +- LIBS="$LIBS -lbsd" ++ ac_cv_struct_addrinfo=no fi +- +- +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 ++$as_echo "$ac_cv_struct_addrinfo" >&6; } ++if test $ac_cv_struct_addrinfo = yes; then --done -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 -+$as_echo "$ac_cv_flock_decl" >&6; } -+if test "x$ac_cv_flock_decl" = xyes; then : -+ for ac_func in flock -+do : -+ ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" -+if test "x$ac_cv_func_flock" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_FLOCK 1 -+_ACEOF ++$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h -- if test "x$have_zlib" = xyes; then : -+fi -+done + fi +-done -- ZLIB_CFLAGS=${ZLIB_CFLAGS-""} -- ZLIB_LIBS=${ZLIB_LIBS-"-lz"} -- py_check_lib_save_LIBS=$LIBS --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 --$as_echo_n "checking for inflateCopy in -lz... " >&6; } --if ${ac_cv_lib_z_inflateCopy+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 -+$as_echo_n "checking for flock in -lbsd... " >&6; } -+if ${ac_cv_lib_bsd_flock+:} false; then : +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login_tty" >&5 +-$as_echo_n "checking for library containing login_tty... " >&6; } +-if ${ac_cv_search_login_tty+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 ++$as_echo_n "checking for sockaddr_storage... " >&6; } ++if ${ac_cv_struct_sockaddr_storage+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lz $LIBS" -+LIBS="-lbsd $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- ac_func_search_save_LIBS=$LIBS +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -16310,127 +16396,156 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char inflateCopy (); -+char flock (); +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char login_tty (); ++# include ++# include int main () { --return inflateCopy (); -+return flock (); +-return login_tty (); ++struct sockaddr_storage s ; return 0; } _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_z_inflateCopy=yes -+ ac_cv_lib_bsd_flock=yes - else -- ac_cv_lib_z_inflateCopy=no -+ ac_cv_lib_bsd_flock=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 --$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } --if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : -- $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 -+$as_echo "$ac_cv_lib_bsd_flock" >&6; } -+if test "x$ac_cv_lib_bsd_flock" = xyes; then : -+ FCNTL_LIBS="-lbsd" -+fi -+ - - fi - --LIBS=$py_check_lib_save_LIBS - - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 -+$as_echo_n "checking for getpagesize... " >&6; } -+if ${ac_cv_func_getpagesize+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+void *x=getpagesize -+ ; -+ return 0; -+} -+_ACEOF +-for ac_lib in '' util; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- fi +- if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_search_login_tty=$ac_res +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext +- if ${ac_cv_search_login_tty+:} false; then : +- break +-fi +-done +-if ${ac_cv_search_login_tty+:} false; then : +- +if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_getpagesize=yes -+else -+ ac_cv_func_getpagesize=no ++ ac_cv_struct_sockaddr_storage=yes + else +- ac_cv_search_login_tty=no ++ ac_cv_struct_sockaddr_storage=no fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - --CFLAGS=$save_CFLAGS --CPPFLAGS=$save_CPPFLAGS --LDFLAGS=$save_LDFLAGS --LIBS=$save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login_tty" >&5 +-$as_echo "$ac_cv_search_login_tty" >&6; } +-ac_res=$ac_cv_search_login_tty +-if test "$ac_res" != no; then : +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpagesize" >&5 -+$as_echo "$ac_cv_func_getpagesize" >&6; } -+ if test "x$ac_cv_func_getpagesize" = xyes; then : - -+$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h - --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -+fi +-$as_echo "#define HAVE_LOGIN_TTY 1" >>confdefs.h ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 ++$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } ++if test $ac_cv_struct_sockaddr_storage = yes; then -- save_CFLAGS=$CFLAGS --save_CPPFLAGS=$CPPFLAGS --save_LDFLAGS=$LDFLAGS --save_LIBS=$LIBS ++$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h + fi -- CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" -- LDFLAGS="$LDFLAGS $ZLIB_LIBS" -- for ac_header in zlib.h +-for ac_func in forkpty -do : -- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" --if test "x$ac_cv_header_zlib_h" = xyes; then : +- ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty" +-if test "x$ac_cv_func_forkpty" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_ZLIB_H 1 +-#define HAVE_FORKPTY 1 -_ACEOF +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 +-$as_echo_n "checking for forkpty in -lutil... " >&6; } +-if ${ac_cv_lib_util_forkpty+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5 ++$as_echo_n "checking for sockaddr_alg... " >&6; } ++if ${ac_cv_struct_sockaddr_alg+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lutil $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ -- py_check_lib_save_LIBS=$LIBS --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 --$as_echo_n "checking for gzread in -lz... " >&6; } --if ${ac_cv_lib_z_gzread+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 -+$as_echo_n "checking for broken unsetenv... " >&6; } -+if ${ac_cv_broken_unsetenv+:} false; then : +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char forkpty (); ++# include ++# include ++# include + int + main () + { +-return forkpty (); ++struct sockaddr_alg s + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_util_forkpty=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_struct_sockaddr_alg=yes + else +- ac_cv_lib_util_forkpty=no ++ ac_cv_struct_sockaddr_alg=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 +-$as_echo "$ac_cv_lib_util_forkpty" >&6; } +-if test "x$ac_cv_lib_util_forkpty" = xyes; then : +- $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h +- LIBS="$LIBS -lutil" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 +-$as_echo_n "checking for forkpty in -lbsd... " >&6; } +-if ${ac_cv_lib_bsd_forkpty+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 ++$as_echo "$ac_cv_struct_sockaddr_alg" >&6; } ++if test $ac_cv_struct_sockaddr_alg = yes; then ++ ++$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h ++ ++fi ++ ++# checks for compiler characteristics ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 ++$as_echo_n "checking for an ANSI C-conforming const... " >&6; } ++if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lz $LIBS" +-LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- + -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif --char gzread (); -+#include +-char forkpty (); int main () { --return gzread (); -+int res = unsetenv("DUMMY") +-return forkpty (); ++ ++#ifndef __cplusplus ++ /* Ultrix mips cc rejects this sort of thing. */ ++ typedef int charset[2]; ++ const charset cs = { 0, 0 }; ++ /* SunOS 4.1.1 cc rejects this. */ ++ char const *const *pcpcc; ++ char **ppc; ++ /* NEC SVR4.0.2 mips cc rejects this. */ ++ struct point {int x, y;}; ++ static struct point const zero = {0,0}; ++ /* AIX XL C 1.02.0.0 rejects this. ++ It does not let you subtract one const X* pointer from another in ++ an arm of an if-expression whose if-part is not a constant ++ expression */ ++ const char *g = "string"; ++ pcpcc = &g + (g ? g-g : 0); ++ /* HPUX 7.0 cc rejects these. */ ++ ++pcpcc; ++ ppc = (char**) pcpcc; ++ pcpcc = (char const *const *) ppc; ++ { /* SCO 3.2v4 cc rejects this sort of thing. */ ++ char tx; ++ char *t = &tx; ++ char const *s = 0 ? (char *) 0 : (char const *) 0; ++ ++ *t++ = 0; ++ if (s) return 0; ++ } ++ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ ++ int x[] = {25, 17}; ++ const int *foo = &x[0]; ++ ++foo; ++ } ++ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ ++ typedef const int *iptr; ++ iptr p = 0; ++ ++p; ++ } ++ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying ++ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ ++ struct s { int j; const int *ap[3]; } bx; ++ struct s *b = &bx; b->j = 5; ++ } ++ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ++ const int foo = 10; ++ if (!foo) return 0; ++ } ++ return !cs[0] && !zero.x; ++#endif ++ ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_z_gzread=yes +- ac_cv_lib_bsd_forkpty=yes +if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_broken_unsetenv=no ++ ac_cv_c_const=yes else -- ac_cv_lib_z_gzread=no +- ac_cv_lib_bsd_forkpty=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -+ ac_cv_broken_unsetenv=yes -+ +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 +-$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } +-if test "x$ac_cv_lib_bsd_forkpty" = xyes; then : +- $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h +- LIBS="$LIBS -lbsd" +-fi +- +- ++ ac_cv_c_const=no fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 --$as_echo "$ac_cv_lib_z_gzread" >&6; } --if test "x$ac_cv_lib_z_gzread" = xyes; then : -- have_zlib=yes --else -- have_zlib=no +- +- +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-done +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 ++$as_echo "$ac_cv_c_const" >&6; } ++if test $ac_cv_c_const = no; then + +-# check for long file support functions +-for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++$as_echo "#define const /**/" >>confdefs.h + + fi +-done + + +-ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" +-if test "x$ac_cv_func_dup2" = xyes; then : +- $as_echo "#define HAVE_DUP2 1" >>confdefs.h +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5 ++$as_echo_n "checking for working signed char... " >&6; } ++if ${ac_cv_working_signed_char_c+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- case " $LIBOBJS " in +- *" dup2.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS dup2.$ac_objext" +- ;; +-esac +- +-fi +- + +-for ac_func in getpgrp +-do : +- ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp" +-if test "x$ac_cv_func_getpgrp" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_GETPGRP 1 +-_ACEOF +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + + int + main () + { +-getpgrp(0); ++signed char c; + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- +-$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h +- ++ ac_cv_working_signed_char_c=yes ++else ++ ac_cv_working_signed_char_c=no fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_unsetenv" >&5 -+$as_echo "$ac_cv_broken_unsetenv" >&6; } -+if test "x$ac_cv_broken_unsetenv" = xyes; then : + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --LIBS=$py_check_lib_save_LIBS + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_signed_char_c" >&5 ++$as_echo "$ac_cv_working_signed_char_c" >&6; } ++if test "x$ac_cv_working_signed_char_c" = xno; then : -+$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h +-for ac_func in setpgrp +-do : +- ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" +-if test "x$ac_cv_func_setpgrp" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_SETPGRP 1 +-_ACEOF +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++$as_echo "#define signed /**/" >>confdefs.h + + +fi + -+for ac_prog in true -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_TRUE+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 ++$as_echo_n "checking for prototypes... " >&6; } ++if ${ac_cv_function_prototypes+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ if test -n "$TRUE"; then -+ ac_cv_prog_TRUE="$TRUE" # Let the user override the test. ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++int foo(int x) { return 0; } + int + main () + { +-setpgrp(0,0); ++return foo(10); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- +-$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h +- ++ ac_cv_function_prototypes=yes +else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_TRUE="$ac_prog" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS ++ ac_cv_function_prototypes=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-done +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_function_prototypes" >&5 ++$as_echo "$ac_cv_function_prototypes" >&6; } ++if test "x$ac_cv_function_prototypes" = xyes; then : + + ++$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h + + +-pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCRYPT" >&5 +-$as_echo_n "checking for LIBCRYPT... " >&6; } ++fi + +-if test -n "$LIBCRYPT_CFLAGS"; then +- pkg_cv_LIBCRYPT_CFLAGS="$LIBCRYPT_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_LIBCRYPT_CFLAGS=`$PKG_CONFIG --cflags "libxcrypt >= 3.1.1" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ++works=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 ++$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } ++if ${ac_cv_stdarg_prototypes+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$LIBCRYPT_LIBS"; then +- pkg_cv_LIBCRYPT_LIBS="$LIBCRYPT_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxcrypt >= 3.1.1\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libxcrypt >= 3.1.1") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_LIBCRYPT_LIBS=`$PKG_CONFIG --libs "libxcrypt >= 3.1.1" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++int foo(int x, ...) { ++ va_list va; ++ va_start(va, x); ++ va_arg(va, int); ++ va_arg(va, char *); ++ va_arg(va, double); ++ return 0; ++} ++ ++int ++main () ++{ ++return foo(10, "", 3.14); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_stdarg_prototypes=yes + else +- pkg_failed=yes ++ ac_cv_stdarg_prototypes=no + fi +- else +- pkg_failed=untried ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stdarg_prototypes" >&5 ++$as_echo "$ac_cv_stdarg_prototypes" >&6; } ++if test "x$ac_cv_stdarg_prototypes" = xyes; then : + + ++$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h -+fi -+fi -+TRUE=$ac_cv_prog_TRUE -+if test -n "$TRUE"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 -+$as_echo "$TRUE" >&6; } - else -- have_zlib=no -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no fi +- if test $_pkg_short_errors_supported = yes; then +- LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1` +- else +- LIBCRYPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxcrypt >= 3.1.1" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$LIBCRYPT_PKG_ERRORS" >&5 -+ -+ test -n "$TRUE" && break - done -+test -n "$TRUE" || TRUE="/bin/true" -- if test "x$have_zlib" = xyes; then : +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS ++# check for socketpair -- ZLIB_CFLAGS=${ZLIB_CFLAGS-""} -- ZLIB_LIBS=${ZLIB_LIBS-"-lz"} -- py_check_lib_save_LIBS=$LIBS --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 --$as_echo_n "checking for inflateCopy in -lz... " >&6; } --if ${ac_cv_lib_z_inflateCopy+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 -+$as_echo_n "checking for inet_aton in -lc... " >&6; } -+if ${ac_cv_lib_c_inet_aton+:} false; then : + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 +-$as_echo_n "checking for library containing crypt_r... " >&6; } +-if ${ac_cv_search_crypt_r+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5 ++$as_echo_n "checking for socketpair... " >&6; } ++if ${ac_cv_func_socketpair+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lz $LIBS" -+LIBS="-lc $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +- ac_func_search_save_LIBS=$LIBS +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -16440,69 +16555,187 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char inflateCopy (); -+char inet_aton (); +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char crypt_r (); ++#include ++#include ++ int main () { --return inflateCopy (); -+return inet_aton (); +-return crypt_r (); ++void *x=socketpair ; return 0; } _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_z_inflateCopy=yes -+ ac_cv_lib_c_inet_aton=yes - else -- ac_cv_lib_z_inflateCopy=no -+ ac_cv_lib_c_inet_aton=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 --$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } --if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : -- $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h -- +-for ac_lib in '' crypt; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- fi +- if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_search_crypt_r=$ac_res +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext +- if ${ac_cv_search_crypt_r+:} false; then : +- break -fi +-done +-if ${ac_cv_search_crypt_r+:} false; then : - --LIBS=$py_check_lib_save_LIBS ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_func_socketpair=yes + else +- ac_cv_search_crypt_r=no +-fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS ++ ac_cv_func_socketpair=no + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 +-$as_echo "$ac_cv_search_crypt_r" >&6; } +-ac_res=$ac_cv_search_crypt_r +-if test "$ac_res" != no; then : +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - +- $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h - --fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 -+$as_echo "$ac_cv_lib_c_inet_aton" >&6; } -+if test "x$ac_cv_lib_c_inet_aton" = xyes; then : -+ $ac_cv_prog_TRUE -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 -+$as_echo_n "checking for inet_aton in -lresolv... " >&6; } -+if ${ac_cv_lib_resolv_inet_aton+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lresolv $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ +- if test "$ac_cv_search_crypt_r" = "none required"; then +- libcrypt= +- else +- libcrypt="$ac_cv_search_crypt_r" +- fi +- LIBCRYPT_LIBS=${LIBCRYPT_LIBS-$libcrypt} ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socketpair" >&5 ++$as_echo "$ac_cv_func_socketpair" >&6; } ++ if test "x$ac_cv_func_socketpair" = xyes; then : + ++$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h -CFLAGS=$save_CFLAGS -CPPFLAGS=$save_CPPFLAGS -LDFLAGS=$save_LDFLAGS -LIBS=$save_LIBS -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char inet_aton (); -+int -+main () -+{ -+return inet_aton (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_resolv_inet_aton=yes -+else -+ ac_cv_lib_resolv_inet_aton=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 -+$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } -+if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBRESOLV 1 -+_ACEOF -+ -+ LIBS="-lresolv $LIBS" -+ +- +- +fi +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } -+fi -+ +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS -+# On Tru64, chflags seems to be present, but calling it will -+# exit Python -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 -+$as_echo_n "checking for chflags... " >&6; } -+if ${ac_cv_have_chflags+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS -- ZLIB_LIBS=$pkg_cv_ZLIB_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -+ if test "$cross_compiling" = yes; then : -+ ac_cv_have_chflags=cross -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -- have_zlib=yes -- $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h -+#include -+#include -+int main(int argc, char *argv[]) -+{ -+ if(chflags(argv[0], 0) != 0) -+ return 1; -+ return 0; -+} -+ -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_have_chflags=yes -+else -+ ac_cv_have_chflags=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 +-$as_echo_n "checking for library containing crypt_r... " >&6; } +-if ${ac_cv_search_crypt_r+:} false; then : ++# check if sockaddr has sa_len member ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5 ++$as_echo_n "checking if sockaddr has sa_len member... " >&6; } ++if ${ac_cv_struct_sockaddr_sa_len+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_func_search_save_LIBS=$LIBS + -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 -+$as_echo "$ac_cv_have_chflags" >&6; } -+if test "$ac_cv_have_chflags" = cross ; then -+ ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" -+if test "x$ac_cv_func_chflags" = xyes; then : -+ ac_cv_have_chflags="yes" -+else -+ ac_cv_have_chflags="no" -+fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char crypt_r (); ++#include ++#include + int + main () + { +-return crypt_r (); ++struct sockaddr x; ++x.sa_len = 0; + ; + return 0; + } + _ACEOF +-for ac_lib in '' crypt; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- fi +- if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_search_crypt_r=$ac_res +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext +- if ${ac_cv_search_crypt_r+:} false; then : +- break +-fi +-done +-if ${ac_cv_search_crypt_r+:} false; then : +- ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_struct_sockaddr_sa_len=yes + else +- ac_cv_search_crypt_r=no ++ ac_cv_struct_sockaddr_sa_len=no + fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + -+fi -+if test "$ac_cv_have_chflags" = yes ; then + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 +-$as_echo "$ac_cv_search_crypt_r" >&6; } +-ac_res=$ac_cv_search_crypt_r +-if test "$ac_res" != no; then : +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5 ++$as_echo "$ac_cv_struct_sockaddr_sa_len" >&6; } ++if test "x$ac_cv_struct_sockaddr_sa_len" = xyes; then : -+$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h +- $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h + +- if test "$ac_cv_search_crypt_r" = "none required"; then +- libcrypt= +- else +- libcrypt="$ac_cv_search_crypt_r" +- fi +- LIBCRYPT_LIBS=${LIBCRYPT_LIBS-$libcrypt} ++$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h ++ fi --if test "x$have_zlib" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 -+$as_echo_n "checking for lchflags... " >&6; } -+if ${ac_cv_have_lchflags+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ ac_cv_have_lchflags=cross -+else ++# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( + +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS + ++ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" ++if test "x$ac_cv_func_gethostbyname_r" = xyes; then : + ++ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + +-else +- LIBCRYPT_CFLAGS=$pkg_cv_LIBCRYPT_CFLAGS +- LIBCRYPT_LIBS=$pkg_cv_LIBCRYPT_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5 ++$as_echo_n "checking gethostbyname_r with 6 args... " >&6; } ++ OLD_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -- BINASCII_CFLAGS="-DUSE_ZLIB_CRC32 $ZLIB_CFLAGS" -- BINASCII_LIBS="$ZLIB_LIBS" -+#include -+#include -+int main(int argc, char *argv[]) +- $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h ++# include + ++int ++main () +{ -+ if(lchflags(argv[0], 0) != 0) -+ return 1; + +-fi ++ char *name; ++ struct hostent *he, *res; ++ char buffer[2048]; ++ int buflen = 2048; ++ int h_errnop; + +-save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS ++ (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) + ++ ; + return 0; +} -+ +_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_have_lchflags=yes -+else -+ ac_cv_have_lchflags=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi ++if ac_fn_c_try_compile "$LINENO"; then : + ++ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 -+$as_echo "$ac_cv_have_lchflags" >&6; } -+if test "$ac_cv_have_lchflags" = cross ; then -+ ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" -+if test "x$ac_cv_func_lchflags" = xyes; then : -+ ac_cv_have_lchflags="yes" -+else -+ ac_cv_have_lchflags="no" -+fi ++ ++$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } - fi -+if test "$ac_cv_have_lchflags" = yes ; then +- CPPFLAGS="$CPPFLAGS $LIBCRYPT_CFLAGS" +- LIBS="$LIBCRYPT_LIBS $LIBS" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt or crypt_r" >&5 +-$as_echo_n "checking for crypt or crypt_r... " >&6; } +-if ${ac_cv_crypt_crypt+:} false; then : +- $as_echo_n "(cached) " >&6 + else -+$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 ++$as_echo_n "checking gethostbyname_r with 5 args... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ -+fi +- #ifdef HAVE_CRYPT_H +- #include +- #endif +- #include ++# include + int + main () + { -- if test "$ac_sys_system" = "Emscripten" -a -z "$BZIP2_CFLAGS" -a -z "$BZIP2_LIBS"; then : +- #ifdef HAVE_CRYPT_R +- void *x = crypt_r; +- #else +- void *x = crypt; +- #endif ++ char *name; ++ struct hostent *he; ++ char buffer[2048]; ++ int buflen = 2048; ++ int h_errnop; ++ ++ (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) -- BZIP2_CFLAGS="-sUSE_BZIP2" -- BZIP2_LIBS="-sUSE_BZIP2" + ; + return 0; + } +- + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_crypt_crypt=yes +-else +- ac_cv_crypt_crypt=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_crypt" >&5 +-$as_echo "$ac_cv_crypt_crypt" >&6; } ++if ac_fn_c_try_compile "$LINENO"; then : + +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS ++ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + + ++$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h + +-for ac_func in clock_gettime +-do : +- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +-if test "x$ac_cv_func_clock_gettime" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_CLOCK_GETTIME 1 +-_ACEOF ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + + else + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +-$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +-if ${ac_cv_lib_rt_clock_gettime+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lrt $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 ++$as_echo_n "checking gethostbyname_r with 3 args... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char clock_gettime (); ++# include + + int + main () + { +-return clock_gettime (); + ++ char *name; ++ struct hostent *he; ++ struct hostent_data data; + -+ if test "$ac_sys_system" = "Emscripten" -a -z "$ZLIB_CFLAGS" -a -z "$ZLIB_LIBS"; then : ++ (void) gethostbyname_r(name, he, &data); + -+ ZLIB_CFLAGS="-sUSE_ZLIB" -+ ZLIB_LIBS="-sUSE_ZLIB" + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_rt_clock_gettime=yes +-else +- ac_cv_lib_rt_clock_gettime=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +-if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : ++if ac_fn_c_try_compile "$LINENO"; then : - fi +- LIBS="$LIBS -lrt" +- $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h ++ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h -@@ -16511,19 +16744,19 @@ fi +-$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h ++$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++else - pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZIP2" >&5 --$as_echo_n "checking for BZIP2... " >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 -+$as_echo_n "checking for ZLIB... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } --if test -n "$BZIP2_CFLAGS"; then -- pkg_cv_BZIP2_CFLAGS="$BZIP2_CFLAGS" -+if test -n "$ZLIB_CFLAGS"; then -+ pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_BZIP2_CFLAGS=`$PKG_CONFIG --cflags "bzip2" 2>/dev/null` -+ pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -16531,16 +16764,16 @@ fi - else - pkg_failed=untried fi --if test -n "$BZIP2_LIBS"; then -- pkg_cv_BZIP2_LIBS="$BZIP2_LIBS" -+if test -n "$ZLIB_LIBS"; then -+ pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_BZIP2_LIBS=`$PKG_CONFIG --libs "bzip2" 2>/dev/null` -+ pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -16561,12 +16794,12 @@ else - _pkg_short_errors_supported=no ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - if test $_pkg_short_errors_supported = yes; then -- BZIP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "bzip2" 2>&1` -+ ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` - else -- BZIP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "bzip2" 2>&1` -+ ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs -- echo "$BZIP2_PKG_ERRORS" >&5 -+ echo "$ZLIB_PKG_ERRORS" >&5 +-done ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS=$OLD_CFLAGS + ++else + +-for ac_func in clock_getres ++ for ac_func in gethostbyname + do : +- ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" +-if test "x$ac_cv_func_clock_getres" = xyes; then : ++ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" ++if test "x$ac_cv_func_gethostbyname" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_CLOCK_GETRES 1 ++#define HAVE_GETHOSTBYNAME 1 + _ACEOF + +-else ++fi ++done + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 +-$as_echo_n "checking for clock_getres in -lrt... " >&6; } +-if ${ac_cv_lib_rt_clock_getres+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lrt $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char clock_getres (); +-int +-main () +-{ +-return clock_getres (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_rt_clock_getres=yes +-else +- ac_cv_lib_rt_clock_getres=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 +-$as_echo "$ac_cv_lib_rt_clock_getres" >&6; } +-if test "x$ac_cv_lib_rt_clock_getres" = xyes; then : + +- $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h + + +-fi + +-fi +-done - save_CFLAGS=$CFLAGS -@@ -16575,23 +16808,24 @@ save_LDFLAGS=$LDFLAGS - save_LIBS=$LIBS +-for ac_func in clock_settime +-do : +- ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime" +-if test "x$ac_cv_func_clock_settime" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_CLOCK_SETTIME 1 +-_ACEOF ++# checks for system services ++# (none yet) -- CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" -- LDFLAGS="$LDFLAGS $BZIP2_LIBS" -- for ac_header in bzlib.h -+ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" -+ LDFLAGS="$LDFLAGS $ZLIB_LIBS" -+ for ac_header in zlib.h - do : -- ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" --if test "x$ac_cv_header_bzlib_h" = xyes; then : -+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -+if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_BZLIB_H 1 -+#define HAVE_ZLIB_H 1 - _ACEOF +-else ++# Linux requires this for correct f.p. operations ++ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control" ++if test "x$ac_cv_func___fpu_control" = xyes; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 --$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } --if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : -+ py_check_lib_save_LIBS=$LIBS -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 -+$as_echo_n "checking for gzread in -lz... " >&6; } -+if ${ac_cv_lib_z_gzread+:} false; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 +-$as_echo_n "checking for clock_settime in -lrt... " >&6; } +-if ${ac_cv_lib_rt_clock_settime+:} false; then : ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 ++$as_echo_n "checking for __fpu_control in -lieee... " >&6; } ++if ${ac_cv_lib_ieee___fpu_control+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS --LIBS="-lbz2 $LIBS" -+LIBS="-lz $LIBS" +-LIBS="-lrt $LIBS" ++LIBS="-lieee $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -16601,50 +16835,96 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -18594,1179 +20357,1279 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif --char BZ2_bzCompress (); -+char gzread (); +-char clock_settime (); ++char __fpu_control (); int main () { --return BZ2_bzCompress (); -+return gzread (); +-return clock_settime (); ++return __fpu_control (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_bz2_BZ2_bzCompress=yes -+ ac_cv_lib_z_gzread=yes +- ac_cv_lib_rt_clock_settime=yes ++ ac_cv_lib_ieee___fpu_control=yes else -- ac_cv_lib_bz2_BZ2_bzCompress=no -+ ac_cv_lib_z_gzread=no +- ac_cv_lib_rt_clock_settime=no ++ ac_cv_lib_ieee___fpu_control=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 --$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } --if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : -- have_bzip2=yes -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 -+$as_echo "$ac_cv_lib_z_gzread" >&6; } -+if test "x$ac_cv_lib_z_gzread" = xyes; then : -+ have_zlib=yes - else -- have_bzip2=no -+ have_zlib=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 +-$as_echo "$ac_cv_lib_rt_clock_settime" >&6; } +-if test "x$ac_cv_lib_rt_clock_settime" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 ++$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } ++if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBIEEE 1 ++_ACEOF + +- $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h ++ LIBS="-lieee $LIBS" ++ ++fi + + fi -+LIBS=$py_check_lib_save_LIBS + ++# check for --with-libm=... ++ ++case $ac_sys_system in ++Darwin) ;; ++*) LIBM=-lm ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 ++$as_echo_n "checking for --with-libm=STRING... " >&6; } ++ ++# Check whether --with-libm was given. ++if test "${with_libm+set}" = set; then : ++ withval=$with_libm; ++if test "$withval" = no ++then LIBM= ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5 ++$as_echo "force LIBM empty" >&6; } ++elif test "$withval" != yes ++then LIBM=$withval ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5 ++$as_echo "set LIBM=\"$withval\"" >&6; } ++else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5 ++fi ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 ++$as_echo "default LIBM=\"$LIBM\"" >&6; } + fi +-done + + +-for ac_func in clock_nanosleep +-do : +- ac_fn_c_check_func "$LINENO" "clock_nanosleep" "ac_cv_func_clock_nanosleep" +-if test "x$ac_cv_func_clock_nanosleep" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_CLOCK_NANOSLEEP 1 +-_ACEOF ++# check for --with-libc=... ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5 ++$as_echo_n "checking for --with-libc=STRING... " >&6; } + ++# Check whether --with-libc was given. ++if test "${with_libc+set}" = set; then : ++ withval=$with_libc; ++if test "$withval" = no ++then LIBC= ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5 ++$as_echo "force LIBC empty" >&6; } ++elif test "$withval" != yes ++then LIBC=$withval ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5 ++$as_echo "set LIBC=\"$withval\"" >&6; } ++else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5 ++fi + else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 ++$as_echo "default LIBC=\"$LIBC\"" >&6; } ++fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5 +-$as_echo_n "checking for clock_nanosleep in -lrt... " >&6; } +-if ${ac_cv_lib_rt_clock_nanosleep+:} false; then : ++ ++# ************************************** ++# * Check for gcc x64 inline assembler * ++# ************************************** ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5 ++$as_echo_n "checking for x64 gcc inline assembler... " >&6; } ++if ${ac_cv_gcc_asm_for_x64+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lrt $LIBS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char clock_nanosleep (); + int + main () + { +-return clock_nanosleep (); ++ ++ __asm__ __volatile__ ("movq %rcx, %rax"); ++ + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_rt_clock_nanosleep=yes ++ ac_cv_gcc_asm_for_x64=yes else -- have_bzip2=no -+ have_zlib=no +- ac_cv_lib_rt_clock_nanosleep=no ++ ac_cv_gcc_asm_for_x64=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_nanosleep" >&5 +-$as_echo "$ac_cv_lib_rt_clock_nanosleep" >&6; } +-if test "x$ac_cv_lib_rt_clock_nanosleep" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x64" >&5 ++$as_echo "$ac_cv_gcc_asm_for_x64" >&6; } - done +- $as_echo "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h ++if test "x$ac_cv_gcc_asm_for_x64" = xyes; then : -- if test "x$have_bzip2" = xyes; then : -- -- BZIP2_CFLAGS=${BZIP2_CFLAGS-""} -- BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} -+ if test "x$have_zlib" = xyes; then : -fi -+ ZLIB_CFLAGS=${ZLIB_CFLAGS-""} -+ ZLIB_LIBS=${ZLIB_LIBS-"-lz"} -+ py_check_lib_save_LIBS=$LIBS -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 -+$as_echo_n "checking for inflateCopy in -lz... " >&6; } -+if ${ac_cv_lib_z_inflateCopy+:} false; then : ++$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h + + + fi +-done ++ ++# ************************************************** ++# * Check for various properties of floating point * ++# ************************************************** ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5 ++$as_echo_n "checking whether float word ordering is bigendian... " >&6; } ++if ${ax_cv_c_float_words_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lz $LIBS" ++ ++ ++ax_cv_c_float_words_bigendian=unknown +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ ++ ++ ++double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; --CFLAGS=$save_CFLAGS --CPPFLAGS=$save_CPPFLAGS --LDFLAGS=$save_LDFLAGS --LIBS=$save_LIBS -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char inflateCopy (); -+int -+main () -+{ -+return inflateCopy (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_z_inflateCopy=yes -+else -+ ac_cv_lib_z_inflateCopy=no + +-for ac_func in nanosleep +-do : +- ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" +-if test "x$ac_cv_func_nanosleep" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_NANOSLEEP 1 + _ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ ++if grep noonsees conftest.$ac_objext >/dev/null ; then ++ ax_cv_c_float_words_bigendian=yes +fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS ++if grep seesnoon conftest.$ac_objext >/dev/null ; then ++ if test "$ax_cv_c_float_words_bigendian" = unknown; then ++ ax_cv_c_float_words_bigendian=no ++ else ++ ax_cv_c_float_words_bigendian=unknown ++ fi +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 -+$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } -+if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : -+ $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h + ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 ++$as_echo "$ax_cv_c_float_words_bigendian" >&6; } + -+LIBS=$py_check_lib_save_LIBS ++case $ax_cv_c_float_words_bigendian in ++ yes) ++ ++$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h ++ ;; ++ no) ++ ;; ++ *) ++ as_fn_error $? " ++ ++Unknown float word ordering. You need to manually preset ++ax_cv_c_float_words_bigendian=no (or yes) according to your system. ++ ++ " "$LINENO" 5 ;; ++esac ++ ++ ++if test "$ax_cv_c_float_words_bigendian" = "yes" ++then + ++$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h ++ ++elif test "$ax_cv_c_float_words_bigendian" = "no" ++then ++ ++$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h + + else ++ # Some ARM platforms use a mixed-endian representation for doubles. ++ # While Python doesn't currently have full support for these platforms ++ # (see e.g., issue 1762561), we can at least make sure that float <-> string ++ # conversions work. ++ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big ++ # or little, then it must be this? + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 +-$as_echo_n "checking for nanosleep in -lrt... " >&6; } +-if ${ac_cv_lib_rt_nanosleep+:} false; then : ++$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h + +fi + -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS ++# The short float repr introduced in Python 3.1 requires the ++# correctly-rounded string <-> double conversion functions from ++# Python/dtoa.c, which in turn require that the FPU uses 53-bit ++# rounding; this is a problem on x86, where the x87 FPU has a default ++# rounding precision of 64 bits. For gcc/x86, we can fix this by ++# using inline assembler to get and set the x87 FPU control word. ++ ++# This inline assembler syntax may also work for suncc and icc, ++# so we try it on all platforms. ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 ++$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } ++if ${ac_cv_gcc_asm_for_x87+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lrt $LIBS" ++ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char nanosleep (); + int + main () + { +-return nanosleep (); ++ ++ unsigned short cw; ++ __asm__ __volatile__ ("fnstcw %0" : "=m" (cw)); ++ __asm__ __volatile__ ("fldcw %0" : : "m" (cw)); ++ + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_rt_nanosleep=yes ++ ac_cv_gcc_asm_for_x87=yes + else +- ac_cv_lib_rt_nanosleep=no ++ ac_cv_gcc_asm_for_x87=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 +-$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } +-if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : +- $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x87" >&5 ++$as_echo "$ac_cv_gcc_asm_for_x87" >&6; } ++if test "x$ac_cv_gcc_asm_for_x87" = xyes; then : -@@ -16658,23 +16938,24 @@ save_LDFLAGS=$LDFLAGS - save_LIBS=$LIBS +-fi ++$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h -- CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" -- LDFLAGS="$LDFLAGS $BZIP2_LIBS" -- for ac_header in bzlib.h -+ CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" -+ LDFLAGS="$LDFLAGS $ZLIB_LIBS" -+ for ac_header in zlib.h - do : -- ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" --if test "x$ac_cv_header_bzlib_h" = xyes; then : -+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -+if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_BZLIB_H 1 -+#define HAVE_ZLIB_H 1 - _ACEOF + fi +-done -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 --$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } --if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : -+ py_check_lib_save_LIBS=$LIBS -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 -+$as_echo_n "checking for gzread in -lz... " >&6; } -+if ${ac_cv_lib_z_gzread+:} false; then : +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major, minor, and makedev" >&5 +-$as_echo_n "checking for major, minor, and makedev... " >&6; } +-if ${ac_cv_device_macros+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5 ++$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; } ++if ${ac_cv_gcc_asm_for_mc68881+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lbz2 $LIBS" -+LIBS="-lz $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -16684,43 +16965,89 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char BZ2_bzCompress (); -+char gzread (); +-#if defined(MAJOR_IN_MKDEV) +-#include +-#elif defined(MAJOR_IN_SYSMACROS) +-#include +-#include +-#else +-#include +-#endif +- int main () { --return BZ2_bzCompress (); -+return gzread (); + +- makedev(major(0),minor(0)); ++ unsigned int fpcr; ++ __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr)); ++ __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr)); + ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_bz2_BZ2_bzCompress=yes -+ ac_cv_lib_z_gzread=yes +- ac_cv_device_macros=yes ++ ac_cv_gcc_asm_for_mc68881=yes else -- ac_cv_lib_bz2_BZ2_bzCompress=no -+ ac_cv_lib_z_gzread=no +- ac_cv_device_macros=no ++ ac_cv_gcc_asm_for_mc68881=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 --$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } --if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : -- have_bzip2=yes -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 -+$as_echo "$ac_cv_lib_z_gzread" >&6; } -+if test "x$ac_cv_lib_z_gzread" = xyes; then : -+ have_zlib=yes - else -- have_bzip2=no -+ have_zlib=no - fi - -+LIBS=$py_check_lib_save_LIBS -+ - else -- have_bzip2=no -+ have_zlib=no fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_device_macros" >&5 +-$as_echo "$ac_cv_device_macros" >&6; } +-if test "x$ac_cv_device_macros" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_mc68881" >&5 ++$as_echo "$ac_cv_gcc_asm_for_mc68881" >&6; } ++if test "x$ac_cv_gcc_asm_for_mc68881" = xyes; then : - done -- if test "x$have_bzip2" = xyes; then : -+ if test "x$have_zlib" = xyes; then : -+ -+ ZLIB_CFLAGS=${ZLIB_CFLAGS-""} -+ ZLIB_LIBS=${ZLIB_LIBS-"-lz"} -+ py_check_lib_save_LIBS=$LIBS -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 -+$as_echo_n "checking for inflateCopy in -lz... " >&6; } -+if ${ac_cv_lib_z_inflateCopy+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lz $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char inflateCopy (); -+int -+main () -+{ -+return inflateCopy (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_z_inflateCopy=yes -+else -+ ac_cv_lib_z_inflateCopy=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 -+$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } -+if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : -+ $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h -+ -+fi -+ -+LIBS=$py_check_lib_save_LIBS +-$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h ++$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h -- BZIP2_CFLAGS=${BZIP2_CFLAGS-""} -- BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} fi -@@ -16732,28 +17059,52 @@ LIBS=$save_LIBS ++# Detect whether system arithmetic is subject to x87-style double ++# rounding issues. The result of this test has little meaning on non ++# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding ++# mode is round-to-nearest and double rounding issues are present, and ++# 0 otherwise. See https://github.com/python/cpython/issues/47186 for more info. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5 ++$as_echo_n "checking for x87-style double rounding... " >&6; } ++if ${ac_cv_x87_double_rounding+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +-$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h ++# $BASECFLAGS may affect the result ++ac_save_cc="$CC" ++CC="$CC $BASECFLAGS" ++if test "$cross_compiling" = yes; then : ++ ac_cv_x87_double_rounding=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++#include ++int main(void) { ++ volatile double x, y, z; ++ /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */ ++ x = 0.99999999999999989; /* 1-2**-53 */ ++ y = 1./x; ++ if (y != 1.) ++ exit(0); ++ /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */ ++ x = 1e16; ++ y = 2.99999; ++ z = x + y; ++ if (z != 1e16+4.) ++ exit(0); ++ /* both tests show evidence of double rounding */ ++ exit(1); ++} +-# On OSF/1 V5.1, getaddrinfo is available, but a define +-# for [no]getaddrinfo in netdb.h. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 +-$as_echo_n "checking for getaddrinfo... " >&6; } +-if ${ac_cv_func_getaddrinfo+:} false; then : +- $as_echo_n "(cached) " >&6 ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_x87_double_rounding=no else -- BZIP2_CFLAGS=$pkg_cv_BZIP2_CFLAGS -- BZIP2_LIBS=$pkg_cv_BZIP2_LIBS -+ ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS -+ ZLIB_LIBS=$pkg_cv_ZLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } -- have_bzip2=yes -+ -+ have_zlib=yes -+ $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h -+ -+ ++ ac_cv_x87_double_rounding=yes ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + -+if test "x$have_zlib" = xyes; then : -+ -+ BINASCII_CFLAGS="-DUSE_ZLIB_CRC32 $ZLIB_CFLAGS" -+ BINASCII_LIBS="$ZLIB_LIBS" ++CC="$ac_save_cc" + +fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 ++$as_echo "$ac_cv_x87_double_rounding" >&6; } + ++if test "x$ac_cv_x87_double_rounding" = xyes; then : + + ++$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h + -+ if test "$ac_sys_system" = "Emscripten" -a -z "$BZIP2_CFLAGS" -a -z "$BZIP2_LIBS"; then : + -+ BZIP2_CFLAGS="-sUSE_BZIP2" -+ BZIP2_LIBS="-sUSE_BZIP2" ++fi + +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++# ************************************ ++# * Check for mathematical functions * ++# ************************************ + +-#include +-#include +-#include +-#include ++LIBS_SAVE=$LIBS ++LIBS="$LIBS $LIBM" + +-int +-main () +-{ +-getaddrinfo(NULL, NULL, NULL, NULL); +- ; +- return 0; +-} ++for ac_func in acosh asinh atanh erf erfc expm1 log1p log2 ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_func_getaddrinfo=yes + + else +- ac_cv_func_getaddrinfo=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext ++ as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5 + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5 +-$as_echo "$ac_cv_func_getaddrinfo" >&6; } ++done +-if test "x$ac_cv_func_getaddrinfo" = xyes; then : ++LIBS=$LIBS_SAVE -+ -+ -+ - pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZMA" >&5 --$as_echo_n "checking for LIBLZMA... " >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZIP2" >&5 -+$as_echo_n "checking for BZIP2... " >&6; } +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5 +-$as_echo_n "checking getaddrinfo bug... " >&6; } +-if ${ac_cv_buggy_getaddrinfo+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 ++$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; } ++if ${ac_cv_posix_semaphores_enabled+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : +- +-if test "${enable_ipv6+set}" = set; then +- ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" +-else +- ac_cv_buggy_getaddrinfo=yes +-fi ++ ac_cv_posix_semaphores_enabled=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ --if test -n "$LIBLZMA_CFLAGS"; then -- pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS" -+if test -n "$BZIP2_CFLAGS"; then -+ pkg_cv_BZIP2_CFLAGS="$BZIP2_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_LIBLZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` -+ pkg_cv_BZIP2_CFLAGS=`$PKG_CONFIG --cflags "bzip2" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes +-#include +-#include +-#include +-#include +-#include +-#include + +-int main(void) +-{ +- int passive, gaierr, inet4 = 0, inet6 = 0; +- struct addrinfo hints, *ai, *aitop; +- char straddr[INET6_ADDRSTRLEN], strport[16]; ++ #include ++ #include ++ #include ++ #include ++ #include + +- for (passive = 0; passive <= 1; passive++) { +- memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_UNSPEC; +- hints.ai_flags = passive ? AI_PASSIVE : 0; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_protocol = IPPROTO_TCP; +- if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { +- (void)gai_strerror(gaierr); +- goto bad; +- } +- for (ai = aitop; ai; ai = ai->ai_next) { +- if (ai->ai_addr == NULL || +- ai->ai_addrlen == 0 || +- getnameinfo(ai->ai_addr, ai->ai_addrlen, +- straddr, sizeof(straddr), strport, sizeof(strport), +- NI_NUMERICHOST|NI_NUMERICSERV) != 0) { +- goto bad; +- } +- switch (ai->ai_family) { +- case AF_INET: +- if (strcmp(strport, "54321") != 0) { +- goto bad; +- } +- if (passive) { +- if (strcmp(straddr, "0.0.0.0") != 0) { +- goto bad; +- } +- } else { +- if (strcmp(straddr, "127.0.0.1") != 0) { +- goto bad; +- } +- } +- inet4++; +- break; +- case AF_INET6: +- if (strcmp(strport, "54321") != 0) { +- goto bad; +- } +- if (passive) { +- if (strcmp(straddr, "::") != 0) { +- goto bad; +- } +- } else { +- if (strcmp(straddr, "::1") != 0) { +- goto bad; +- } ++ int main(void) { ++ sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); ++ if (a == SEM_FAILED) { ++ perror("sem_open"); ++ return 1; + } +- inet6++; +- break; +- case AF_UNSPEC: +- goto bad; +- break; +- default: +- /* another family support? */ +- break; ++ sem_close(a); ++ sem_unlink("/autoconf"); ++ return 0; + } +- } +- freeaddrinfo(aitop); +- aitop = NULL; +- } +- +- if (!(inet4 == 0 || inet4 == 2)) +- goto bad; +- if (!(inet6 == 0 || inet6 == 2)) +- goto bad; +- +- if (aitop) +- freeaddrinfo(aitop); +- return 0; + +- bad: +- if (aitop) +- freeaddrinfo(aitop); +- return 1; +-} + + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_buggy_getaddrinfo=no ++ ac_cv_posix_semaphores_enabled=yes else - pkg_failed=yes -@@ -16761,16 +17112,16 @@ fi - else - pkg_failed=untried +- ac_cv_buggy_getaddrinfo=yes ++ ac_cv_posix_semaphores_enabled=no fi --if test -n "$LIBLZMA_LIBS"; then -- pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS" -+if test -n "$BZIP2_LIBS"; then -+ pkg_cv_BZIP2_LIBS="$BZIP2_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bzip2\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "bzip2") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_LIBLZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null` -+ pkg_cv_BZIP2_LIBS=`$PKG_CONFIG --libs "bzip2" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -16791,12 +17142,12 @@ else - _pkg_short_errors_supported=no + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test $_pkg_short_errors_supported = yes; then -- LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` -+ BZIP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "bzip2" 2>&1` - else -- LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` -+ BZIP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "bzip2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs -- echo "$LIBLZMA_PKG_ERRORS" >&5 -+ echo "$BZIP2_PKG_ERRORS" >&5 +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 +-$as_echo "$ac_cv_buggy_getaddrinfo" >&6; } +- +- +-fi +- +-if test "$ac_cv_func_getaddrinfo" = no -o "$ac_cv_buggy_getaddrinfo" = yes +-then +- if test "x$ipv6" = xyes; then : +- +- as_fn_error $? "You must get working getaddrinfo() function or pass the \"--disable-ipv6\" option to configure." "$LINENO" 5 + + fi +-else ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 ++$as_echo "$ac_cv_posix_semaphores_enabled" >&6; } ++if test "x$ac_cv_posix_semaphores_enabled" = xno; then : + +-$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + +-fi ++$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h + +-for ac_func in getnameinfo +-do : +- ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" +-if test "x$ac_cv_func_getnameinfo" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_GETNAMEINFO 1 +-_ACEOF + + fi +-done +- + +-if test "x$ac_cv_header_sys_time_h" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 ++$as_echo_n "checking for broken sem_getvalue... " >&6; } ++if ${ac_cv_broken_sem_getvalue+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ ac_cv_broken_sem_getvalue=yes ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ - save_CFLAGS=$CFLAGS -@@ -16805,23 +17156,23 @@ save_LDFLAGS=$LDFLAGS - save_LIBS=$LIBS +-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h ++ #include ++ #include ++ #include ++ #include ++ #include -- CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" -- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" -- for ac_header in lzma.h -+ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" -+ LDFLAGS="$LDFLAGS $BZIP2_LIBS" -+ for ac_header in bzlib.h - do : -- ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" --if test "x$ac_cv_header_lzma_h" = xyes; then : -+ ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" -+if test "x$ac_cv_header_bzlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_LZMA_H 1 -+#define HAVE_BZLIB_H 1 - _ACEOF ++ int main(void){ ++ sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0); ++ int count; ++ int res; ++ if(a==SEM_FAILED){ ++ perror("sem_open"); ++ return 1; -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 --$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } --if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 -+$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } -+if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-llzma $LIBS" -+LIBS="-lbz2 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ +-fi ++ } ++ res = sem_getvalue(a, &count); ++ sem_close(a); ++ sem_unlink("/autocftw"); ++ return res==-1 ? 1 : 0; ++ } -@@ -16831,43 +17182,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - #ifdef __cplusplus - extern "C" - #endif --char lzma_easy_encoder (); -+char BZ2_bzCompress (); - int - main () - { --return lzma_easy_encoder (); -+return BZ2_bzCompress (); - ; - return 0; - } +-# checks for structures +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +-if ${ac_cv_struct_tm+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include + +-int +-main () +-{ +-struct tm tm; +- int *p = &tm.tm_sec; +- return !p; +- ; +- return 0; +-} _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_lzma_lzma_easy_encoder=yes -+ ac_cv_lib_bz2_BZ2_bzCompress=yes +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_struct_tm=time.h ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_broken_sem_getvalue=no else -- ac_cv_lib_lzma_lzma_easy_encoder=no -+ ac_cv_lib_bz2_BZ2_bzCompress=no - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS +- ac_cv_struct_tm=sys/time.h ++ ac_cv_broken_sem_getvalue=yes fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 --$as_echo "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } --if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes; then : -- have_liblzma=yes -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 -+$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } -+if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : -+ have_bzip2=yes - else -- have_liblzma=no -+ have_bzip2=no +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +-$as_echo "$ac_cv_struct_tm" >&6; } +-if test $ac_cv_struct_tm = sys/time.h; then +-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - else -- have_liblzma=no -+ have_bzip2=no fi +- +-ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include +-#include <$ac_cv_struct_tm> +- +-" +-if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_TM_TM_ZONE 1 +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 ++$as_echo "$ac_cv_broken_sem_getvalue" >&6; } ++if test "x$ac_cv_broken_sem_getvalue" = xyes; then : - done -- if test "x$have_liblzma" = xyes; then : -+ if test "x$have_bzip2" = xyes; then : +-fi ++$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h -- LIBLZMA_CFLAGS=${LIBLZMA_CFLAGS-""} -- LIBLZMA_LIBS=${LIBLZMA_LIBS-"-llzma"} -+ BZIP2_CFLAGS=${BZIP2_CFLAGS-""} -+ BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} +-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then - fi +-$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h ++fi -@@ -16888,21 +17239,251 @@ save_LDFLAGS=$LDFLAGS - save_LIBS=$LIBS +-else +- ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include ++ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include + " +-if test "x$ac_cv_have_decl_tzname" = xyes; then : ++if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then : + ac_have_decl=1 + else + ac_have_decl=0 + fi + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_TZNAME $ac_have_decl ++#define HAVE_DECL_RTLD_LAZY $ac_have_decl + _ACEOF +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +-$as_echo_n "checking for tzname... " >&6; } +-if ${ac_cv_var_tzname+:} false; then : +- $as_echo_n "(cached) " >&6 ++ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then : ++ ac_have_decl=1 + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#if !HAVE_DECL_TZNAME +-extern char *tzname[]; +-#endif ++ ac_have_decl=0 ++fi -- CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" -- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" -- for ac_header in lzma.h -+ CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS" -+ LDFLAGS="$LDFLAGS $BZIP2_LIBS" -+ for ac_header in bzlib.h - do : -- ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" --if test "x$ac_cv_header_lzma_h" = xyes; then : -+ ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" -+if test "x$ac_cv_header_bzlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_LZMA_H 1 -+#define HAVE_BZLIB_H 1 +-int +-main () +-{ +-return tzname[0][0]; +- ; +- return 0; +-} ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_RTLD_NOW $ac_have_decl _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_var_tzname=yes ++ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then : ++ ac_have_decl=1 + else +- ac_cv_var_tzname=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +-$as_echo "$ac_cv_var_tzname" >&6; } +- if test $ac_cv_var_tzname = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 --$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } --if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : -- $as_echo_n "(cached) " >&6 --else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompress in -lbz2" >&5 -+$as_echo_n "checking for BZ2_bzCompress in -lbz2... " >&6; } -+if ${ac_cv_lib_bz2_BZ2_bzCompress+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lbz2 $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char BZ2_bzCompress (); -+int -+main () -+{ -+return BZ2_bzCompress (); -+ ; -+ return 0; -+} +-$as_echo "#define HAVE_TZNAME 1" >>confdefs.h +- +- fi ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl +_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_bz2_BZ2_bzCompress=yes -+else -+ ac_cv_lib_bz2_BZ2_bzCompress=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 -+$as_echo "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } -+if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes; then : -+ have_bzip2=yes -+else -+ have_bzip2=no -+fi -+ -+ ++ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then : ++ ac_have_decl=1 +else -+ have_bzip2=no -+fi -+ -+done -+ -+ if test "x$have_bzip2" = xyes; then : -+ -+ BZIP2_CFLAGS=${BZIP2_CFLAGS-""} -+ BZIP2_LIBS=${BZIP2_LIBS-"-lbz2"} -+ -+fi -+ -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS -+ -+ -+ ++ ac_have_decl=0 + fi + +-ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" +-if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : +- + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_RDEV 1 ++#define HAVE_DECL_RTLD_LOCAL $ac_have_decl + _ACEOF +- +- ++ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then : ++ ac_have_decl=1 +else -+ BZIP2_CFLAGS=$pkg_cv_BZIP2_CFLAGS -+ BZIP2_LIBS=$pkg_cv_BZIP2_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ have_bzip2=yes -+fi -+ -+ -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZMA" >&5 -+$as_echo_n "checking for LIBLZMA... " >&6; } -+ -+if test -n "$LIBLZMA_CFLAGS"; then -+ pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_LIBLZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes ++ ac_have_decl=0 + fi + +-ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +-if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : +- + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 ++#define HAVE_DECL_RTLD_NODELETE $ac_have_decl + _ACEOF +- +- ++ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then : ++ ac_have_decl=1 +else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$LIBLZMA_LIBS"; then -+ pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_LIBLZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes ++ ac_have_decl=0 + fi + +-ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" +-if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl ++_ACEOF ++ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then : ++ ac_have_decl=1 +else -+ pkg_failed=yes ++ ac_have_decl=0 +fi -+ else -+ pkg_failed=untried + + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_FLAGS 1 ++#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl + _ACEOF ++ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include ++" ++if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 +fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_RTLD_MEMBER $ac_have_decl ++_ACEOF + +-fi + +-ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" +-if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : ++# determine what size digit to use for Python's longs ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 ++$as_echo_n "checking digit size for Python's longs... " >&6; } ++# Check whether --enable-big-digits was given. ++if test "${enable_big_digits+set}" = set; then : ++ enableval=$enable_big_digits; case $enable_big_digits in ++yes) ++ enable_big_digits=30 ;; ++no) ++ enable_big_digits=15 ;; ++15|30) ++ ;; ++*) ++ as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5 ++$as_echo "$enable_big_digits" >&6; } + + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_GEN 1 ++#define PYLONG_BITS_IN_DIGIT $enable_big_digits + _ACEOF + + ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 ++$as_echo "no value specified" >&6; } + fi + +-ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default" +-if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then : + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 +-_ACEOF ++# check for wchar.h ++ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" ++if test "x$ac_cv_header_wchar_h" = xyes; then : + + ++$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h + -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } ++ wchar_h="yes" + ++else ++ wchar_h="no" + + fi + +-ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +-if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +-_ACEOF + ++# determine wchar_t size ++if test "$wchar_h" = yes ++then ++ # The cast to long int works around a bug in the HP C Compiler ++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects ++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. ++# This bug is HP SR number 8606223364. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 ++$as_echo_n "checking size of wchar_t... " >&6; } ++if ${ac_cv_sizeof_wchar_t+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include ++"; then : + -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes +else -+ _pkg_short_errors_supported=no ++ if test "$ac_cv_type_wchar_t" = yes; then ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error 77 "cannot compute sizeof (wchar_t) ++See \`config.log' for more details" "$LINENO" 5; } ++ else ++ ac_cv_sizeof_wchar_t=0 ++ fi +fi -+ if test $_pkg_short_errors_supported = yes; then -+ LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` -+ else -+ LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$LIBLZMA_PKG_ERRORS" >&5 -+ -+ -+ save_CFLAGS=$CFLAGS -+save_CPPFLAGS=$CPPFLAGS -+save_LDFLAGS=$LDFLAGS -+save_LIBS=$LIBS -+ -+ -+ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" -+ LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" -+ for ac_header in lzma.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" -+if test "x$ac_cv_header_lzma_h" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LZMA_H 1 -+_ACEOF -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 -+$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } -+if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 ++$as_echo "$ac_cv_sizeof_wchar_t" >&6; } + +-ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" " +- #include +- #include + +-" +-if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then : + + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_PASSWD_PW_GECOS 1 ++#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t + _ACEOF + + + fi +-ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" " +- #include +- #include + +-" +-if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then : ++# check whether wchar_t is signed or not ++if test "$wchar_h" = yes ++then ++ # check whether wchar_t is signed or not ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 ++$as_echo_n "checking whether wchar_t is signed... " >&6; } ++if ${ac_cv_wchar_t_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-llzma $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_PASSWD_PW_PASSWD 1 +-_ACEOF ++ if test "$cross_compiling" = yes; then : ++ ac_cv_wchar_t_signed=yes ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char lzma_easy_encoder (); -+int -+main () -+{ -+return lzma_easy_encoder (); -+ ; -+ return 0; -+} ++ #include ++ int main() ++ { ++ /* Success: exit code 0 */ ++ return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); ++ } + +_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_lzma_lzma_easy_encoder=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_wchar_t_signed=yes +else -+ ac_cv_lib_lzma_lzma_easy_encoder=no ++ ac_cv_wchar_t_signed=no +fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 -+$as_echo "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } -+if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes; then : -+ have_liblzma=yes -+else -+ have_liblzma=no + +fi -+ -+ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 ++$as_echo "$ac_cv_wchar_t_signed" >&6; } + fi + +-# Issue #21085: In Cygwin, siginfo_t does not have si_band field. +-ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include +-" +-if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5 ++$as_echo_n "checking whether wchar_t is usable... " >&6; } ++# wchar_t is only usable if it maps to an unsigned type ++if test "$ac_cv_sizeof_wchar_t" -ge 2 \ ++ -a "$ac_cv_wchar_t_signed" = "no" ++then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_SIGINFO_T_SI_BAND 1 +-_ACEOF ++$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } +else -+ have_liblzma=no -+fi -+ -+done -+ -+ if test "x$have_liblzma" = xyes; then : -+ -+ LIBLZMA_CFLAGS=${LIBLZMA_CFLAGS-""} -+ LIBLZMA_LIBS=${LIBLZMA_LIBS-"-llzma"} -+ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } +fi + -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS -+ -+ -+ -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } ++case $ac_sys_system/$ac_sys_release in ++SunOS/*) ++ if test -f /etc/os-release; then ++ OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release) ++ if test "x$OS_NAME" = "xOracle Solaris"; then ++ # bpo-43667: In Oracle Solaris, the internal form of wchar_t in ++ # non-Unicode locales is not Unicode and hence cannot be used directly. ++ # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html + +-fi ++$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h + ++ fi ++ fi ++ ;; ++esac + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5 +-$as_echo_n "checking for time.h that defines altzone... " >&6; } +-if ${ac_cv_header_time_altzone+:} false; then : ++# check for endianness ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 ++$as_echo_n "checking whether byte ordering is bigendian... " >&6; } ++if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ac_cv_c_bigendian=unknown ++ # See if we're dealing with a universal compiler. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +-int +-main () +-{ +-return altzone; +- ; +- return 0; +-} ++#ifndef __APPLE_CC__ ++ not a universal capable compiler ++ #endif ++ typedef int dummy; + -+ save_CFLAGS=$CFLAGS -+save_CPPFLAGS=$CPPFLAGS -+save_LDFLAGS=$LDFLAGS -+save_LIBS=$LIBS + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_header_time_altzone=yes +-else +- ac_cv_header_time_altzone=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 +-$as_echo "$ac_cv_header_time_altzone" >&6; } +-if test $ac_cv_header_time_altzone = yes; then +- +-$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h + ++ # Check for potential -arch flags. It is not universal unless ++ # there are at least two -arch flags with different values. ++ ac_arch= ++ ac_prev= ++ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do ++ if test -n "$ac_prev"; then ++ case $ac_word in ++ i?86 | x86_64 | ppc | ppc64) ++ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ++ ac_arch=$ac_word ++ else ++ ac_cv_c_bigendian=universal ++ break ++ fi ++ ;; ++ esac ++ ac_prev= ++ elif test "x$ac_word" = "x-arch"; then ++ ac_prev=arch ++ fi ++ done + fi +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5 +-$as_echo_n "checking for addrinfo... " >&6; } +-if ${ac_cv_struct_addrinfo+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ if test $ac_cv_c_bigendian = unknown; then ++ # See if sys/param.h defines the BYTE_ORDER macro. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include ++ #include + + int + main () + { +-struct addrinfo a ++#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ ++ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ ++ && LITTLE_ENDIAN) ++ bogus endian macros ++ #endif + -+ CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS" -+ LDFLAGS="$LDFLAGS $LIBLZMA_LIBS" -+ for ac_header in lzma.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" -+if test "x$ac_cv_header_lzma_h" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LZMA_H 1 -+_ACEOF + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_struct_addrinfo=yes +-else +- ac_cv_struct_addrinfo=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 +-$as_echo "$ac_cv_struct_addrinfo" >&6; } +-if test $ac_cv_struct_addrinfo = yes; then +- +-$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h +- +-fi +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 +-$as_echo_n "checking for sockaddr_storage... " >&6; } +-if ${ac_cv_struct_sockaddr_storage+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # It does; now see whether it defined to BIG_ENDIAN or not. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include ++ #include + +-# include +-# include + int + main () + { +-struct sockaddr_storage s ++#if BYTE_ORDER != BIG_ENDIAN ++ not big endian ++ #endif + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_easy_encoder in -llzma" >&5 -+$as_echo_n "checking for lzma_easy_encoder in -llzma... " >&6; } -+if ${ac_cv_lib_lzma_lzma_easy_encoder+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else - ac_check_lib_save_LIBS=$LIBS - LIBS="-llzma $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -20620,320 +21201,1518 @@ short int ascii_mm[] = + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_struct_sockaddr_storage=yes ++ ac_cv_c_bigendian=yes + else +- ac_cv_struct_sockaddr_storage=no ++ ac_cv_c_bigendian=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 +-$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } +-if test $ac_cv_struct_sockaddr_storage = yes; then +- +-$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h +- +-fi +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5 +-$as_echo_n "checking for sockaddr_alg... " >&6; } +-if ${ac_cv_struct_sockaddr_alg+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++ if test $ac_cv_c_bigendian = unknown; then ++ # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include + +-# include +-# include +-# include int main () { --return use_ascii (foo) == use_ebcdic (foo); +-struct sockaddr_alg s ++#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) ++ bogus endian macros ++ #endif ++ + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_struct_sockaddr_alg=yes +-else +- ac_cv_struct_sockaddr_alg=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 +-$as_echo "$ac_cv_struct_sockaddr_alg" >&6; } +-if test $ac_cv_struct_sockaddr_alg = yes; then +- +-$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h +- +-fi +- +-# checks for compiler characteristics +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +-$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +-if ${ac_cv_c_const+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # It does; now see whether it defined to _BIG_ENDIAN or not. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include + + int + main () + { +- +-#ifndef __cplusplus +- /* Ultrix mips cc rejects this sort of thing. */ +- typedef int charset[2]; +- const charset cs = { 0, 0 }; +- /* SunOS 4.1.1 cc rejects this. */ +- char const *const *pcpcc; +- char **ppc; +- /* NEC SVR4.0.2 mips cc rejects this. */ +- struct point {int x, y;}; +- static struct point const zero = {0,0}; +- /* AIX XL C 1.02.0.0 rejects this. +- It does not let you subtract one const X* pointer from another in +- an arm of an if-expression whose if-part is not a constant +- expression */ +- const char *g = "string"; +- pcpcc = &g + (g ? g-g : 0); +- /* HPUX 7.0 cc rejects these. */ +- ++pcpcc; +- ppc = (char**) pcpcc; +- pcpcc = (char const *const *) ppc; +- { /* SCO 3.2v4 cc rejects this sort of thing. */ +- char tx; +- char *t = &tx; +- char const *s = 0 ? (char *) 0 : (char const *) 0; +- +- *t++ = 0; +- if (s) return 0; +- } +- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ +- int x[] = {25, 17}; +- const int *foo = &x[0]; +- ++foo; +- } +- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ +- typedef const int *iptr; +- iptr p = 0; +- ++p; +- } +- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying +- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ +- struct s { int j; const int *ap[3]; } bx; +- struct s *b = &bx; b->j = 5; +- } +- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ +- const int foo = 10; +- if (!foo) return 0; +- } +- return !cs[0] && !zero.x; +-#endif ++#ifndef _BIG_ENDIAN ++ not big endian ++ #endif + + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_c_const=yes ++ ac_cv_c_bigendian=yes + else +- ac_cv_c_const=no ++ ac_cv_c_bigendian=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +-$as_echo "$ac_cv_c_const" >&6; } +-if test $ac_cv_c_const = no; then +- +-$as_echo "#define const /**/" >>confdefs.h +- +-fi +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5 +-$as_echo_n "checking for working signed char... " >&6; } +-if ${ac_cv_working_signed_char_c+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++ if test $ac_cv_c_bigendian = unknown; then ++ # Compile a test program. ++ if test "$cross_compiling" = yes; then : ++ # Try to guess by grepping values from an object file. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++short int ascii_mm[] = ++ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; ++ short int ascii_ii[] = ++ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; ++ int use_ascii (int i) { ++ return ascii_mm[i] + ascii_ii[i]; ++ } ++ short int ebcdic_ii[] = ++ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; ++ short int ebcdic_mm[] = ++ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; ++ int use_ebcdic (int i) { ++ return ebcdic_mm[i] + ebcdic_ii[i]; ++ } ++ extern int foo; + + int + main () + { +-signed char c; +return use_ascii (foo) == use_ebcdic (foo); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_working_signed_char_c=yes +-else +- ac_cv_working_signed_char_c=no + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi @@ -9505,15 +14922,35 @@ index 9e76287725..c26d6a0079 100755 + ac_cv_c_bigendian=unknown + fi + fi -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_signed_char_c" >&5 +-$as_echo "$ac_cv_working_signed_char_c" >&6; } +-if test "x$ac_cv_working_signed_char_c" = xno; then : +- +- +-$as_echo "#define signed /**/" >>confdefs.h +- +- +-fi +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 +-$as_echo_n "checking for prototypes... " >&6; } +-if ${ac_cv_function_prototypes+:} false; then : +- $as_echo_n "(cached) " >&6 + else +- +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ + /* end confdefs.h. */ +-int foo(int x) { return 0; } +$ac_includes_default -+int -+main () -+{ + int + main () + { +-return foo(10); + + /* Are we little or big endian? From Harbison&Steele. */ + union @@ -9524,21 +14961,33 @@ index 9e76287725..c26d6a0079 100755 + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + -+ ; -+ return 0; -+} -+_ACEOF + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_function_prototypes=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no -+else + else +- ac_cv_function_prototypes=no + ac_cv_c_bigendian=yes -+fi + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_function_prototypes" >&5 +-$as_echo "$ac_cv_function_prototypes" >&6; } +-if test "x$ac_cv_function_prototypes" = xyes; then : +- +- +-$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h +- + + fi -+fi + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( @@ -9548,16 +14997,47 @@ index 9e76287725..c26d6a0079 100755 + no) + ;; #( + universal) -+ + +-works=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 +-$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } +-if ${ac_cv_stdarg_prototypes+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h -+ + +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac -+ -+ + +-#include +-int foo(int x, ...) { +- va_list va; +- va_start(va, x); +- va_arg(va, int); +- va_arg(va, char *); +- va_arg(va, double); +- return 0; +-} + +-int +-main () +-{ +-return foo(10, "", 3.14); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_stdarg_prototypes=yes +-else +- ac_cv_stdarg_prototypes=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# ABI version string for Python extension modules. This appears between the +# periods in shared library file names, e.g. foo..so. It is calculated +# from the following attributes which affect the ABI of this Python build (in @@ -9573,7 +15053,11 @@ index 9e76287725..c26d6a0079 100755 +# +# In Python 3.2 and older, --with-wide-unicode added a 'u' flag. +# In Python 3.7 and older, --with-pymalloc added a 'm' flag. -+ + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stdarg_prototypes" >&5 +-$as_echo "$ac_cv_stdarg_prototypes" >&6; } +-if test "x$ac_cv_stdarg_prototypes" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5 +$as_echo_n "checking ABIFLAGS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5 @@ -9583,48 +15067,100 @@ index 9e76287725..c26d6a0079 100755 +SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5 +$as_echo "$SOABI" >&6; } -+ + +# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI +if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then + # Similar to SOABI but remove "d" flag from ABIFLAGS -+ + +-$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h + ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} -+ + +cat >>confdefs.h <<_ACEOF +#define ALT_SOABI "${ALT_SOABI}" +_ACEOF -+ -+fi -+ -+ + + fi + + +-# check for socketpair +- +EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX} -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5 +-$as_echo_n "checking for socketpair... " >&6; } +-if ${ac_cv_func_socketpair+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5 +$as_echo_n "checking LDVERSION... " >&6; } +LDVERSION='$(VERSION)$(ABIFLAGS)' +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5 +$as_echo "$LDVERSION" >&6; } -+ + +-#include +-#include +# On Android and Cygwin the shared libraries must be linked with libpython. -+ + +-int +-main () +-{ +-void *x=socketpair +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_socketpair=yes +if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then + LIBPYTHON="-lpython${VERSION}${ABIFLAGS}" -+else + else +- ac_cv_func_socketpair=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- + LIBPYTHON='' -+fi -+ -+ -+ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socketpair" >&5 +-$as_echo "$ac_cv_func_socketpair" >&6; } +- if test "x$ac_cv_func_socketpair" = xyes; then : + +-$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h + +-fi + +BINLIBDEST='$(LIBDIR)/python$(VERSION)' -+ -+ + + +# Check for --with-platlibdir +# /usr/$LIDIRNAME/python$VERSION -+ + +-# check if sockaddr has sa_len member +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5 +-$as_echo_n "checking if sockaddr has sa_len member... " >&6; } +-if ${ac_cv_struct_sockaddr_sa_len+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +PLATLIBDIR="lib" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5 +$as_echo_n "checking for --with-platlibdir... " >&6; } -+ + +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-int +-main () +-{ +-struct sockaddr x; +-x.sa_len = 0; +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_struct_sockaddr_sa_len=yes +# Check whether --with-platlibdir was given. +if test "${with_platlibdir+set}" = set; then : + withval=$with_platlibdir; @@ -9638,31 +15174,42 @@ index 9e76287725..c26d6a0079 100755 +$as_echo "yes" >&6; } + PLATLIBDIR="$withval" + BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)' -+else + else +- ac_cv_struct_sockaddr_sa_len=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -+fi + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -+fi -+ -+ -+ -+ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5 +-$as_echo "$ac_cv_struct_sockaddr_sa_len" >&6; } +-if test "x$ac_cv_struct_sockaddr_sa_len" = xyes; then : + + +-$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h + + +if test x$PLATFORM_TRIPLET = x; then + LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}" +else + LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+fi -+ -+ + fi + +-# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( + +# Check for --with-wheel-pkg-dir=PATH -+ + +-ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" +-if test "x$ac_cv_func_gethostbyname_r" = xyes; then : +WHEEL_PKG_DIR="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5 +$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; } -+ + +- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h +# Check whether --with-wheel-pkg-dir was given. +if test "${with_wheel_pkg_dir+set}" = set; then : + withval=$with_wheel_pkg_dir; @@ -9678,7 +15225,11 @@ index 9e76287725..c26d6a0079 100755 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5 +-$as_echo_n "checking gethostbyname_r with 6 args... " >&6; } +- OLD_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" + +# Check whether right shifting a negative integer extends the sign bit +# or fills with zeros (like the Cray J90, according to Tim Peters). @@ -9691,14 +15242,32 @@ index 9e76287725..c26d6a0079 100755 +if test "$cross_compiling" = yes; then : + ac_cv_rshift_extends_sign=yes +else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-# include +- +-int +-main () +int main(void) -+{ + { +- +- char *name; +- struct hostent *he, *res; +- char buffer[2048]; +- int buflen = 2048; +- int h_errnop; +- +- (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) +- +- ; +- return 0; + return (((-1)>>3 == -1) ? 0 : 1); -+} -+ + } +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : + +- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_rshift_extends_sign=yes @@ -9708,43 +15277,71 @@ index 9e76287725..c26d6a0079 100755 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -+ + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5 +$as_echo "$ac_cv_rshift_extends_sign" >&6; } +if test "$ac_cv_rshift_extends_sign" = no +then -+ + +-$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h +$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +fi -+ + +# check for getc_unlocked and related locking functions +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5 +$as_echo_n "checking for getc_unlocked() and friends... " >&6; } +if ${ac_cv_have_getc_unlocked+:} false; then : + $as_echo_n "(cached) " >&6 -+else -+ + else + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 +-$as_echo_n "checking gethostbyname_r with 5 args... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ + /* end confdefs.h. */ +- +-# include +- +#include -+int -+main () -+{ -+ + int + main () + { + +- char *name; +- struct hostent *he; +- char buffer[2048]; +- int buflen = 2048; +- int h_errnop; +- +- (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) + FILE *f = fopen("/dev/null", "r"); + flockfile(f); + getc_unlocked(f); + funlockfile(f); -+ -+ ; -+ return 0; -+} -+_ACEOF + + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- +- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h +- +- +-$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_have_getc_unlocked=yes -+else + else + ac_cv_have_getc_unlocked=no +fi +rm -f core conftest.err conftest.$ac_objext \ @@ -9754,15 +15351,35 @@ index 9e76287725..c26d6a0079 100755 +$as_echo "$ac_cv_have_getc_unlocked" >&6; } +if test "$ac_cv_have_getc_unlocked" = yes +then -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 +-$as_echo_n "checking gethostbyname_r with 3 args... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h -+ + +-# include +fi -+ -+ -+ -+ -+ + +-int +-main () +-{ + +- char *name; +- struct hostent *he; +- struct hostent_data data; + +- (void) gethostbyname_r(name, he, &data); + +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : + +- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h +# Check whether --with-readline was given. +if test "${with_readline+set}" = set; then : + withval=$with_readline; @@ -9777,20 +15394,28 @@ index 9e76287725..c26d6a0079 100755 + as_fn_error $? "proper usage is --with(out)-readline[=editline|readline|no]" "$LINENO" 5 + ;; +esac -+ + +else + with_readline=readline -+ + +-$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h +fi -+ -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } + +-else +if test "x$with_readline" = xreadline; then : -+ -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBREADLINE" >&5 +$as_echo_n "checking for LIBREADLINE... " >&6; } -+ + +if test -n "$LIBREADLINE_CFLAGS"; then + pkg_cv_LIBREADLINE_CFLAGS="$LIBREADLINE_CFLAGS" + elif test -n "$PKG_CONFIG"; then @@ -9804,10 +15429,15 @@ index 9e76287725..c26d6a0079 100755 + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes -+fi + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- + else + pkg_failed=untried -+fi + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS=$OLD_CFLAGS +- +if test -n "$LIBREADLINE_LIBS"; then + pkg_cv_LIBREADLINE_LIBS="$LIBREADLINE_LIBS" + elif test -n "$PKG_CONFIG"; then @@ -9819,19 +15449,31 @@ index 9e76287725..c26d6a0079 100755 + test $ac_status = 0; }; then + pkg_cv_LIBREADLINE_LIBS=`$PKG_CONFIG --libs "readline" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes -+else + else +- +- for ac_func in gethostbyname +-do : +- ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +-if test "x$ac_cv_func_gethostbyname" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_GETHOSTBYNAME 1 +-_ACEOF +- + pkg_failed=yes -+fi + fi +-done +- +- + else + pkg_failed=untried -+fi -+ -+ -+ + fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -+ + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else @@ -9844,8 +15486,8 @@ index 9e76287725..c26d6a0079 100755 + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBREADLINE_PKG_ERRORS" >&5 -+ -+ + + + for ac_header in readline/readline.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" @@ -9853,41 +15495,64 @@ index 9e76287725..c26d6a0079 100755 + cat >>confdefs.h <<_ACEOF +#define HAVE_READLINE_READLINE_H 1 +_ACEOF -+ + +-# checks for system services +-# (none yet) + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS -+ -+ + +-# Linux requires this for correct f.p. operations +-ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control" +-if test "x$ac_cv_func___fpu_control" = xyes; then : + +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 +-$as_echo_n "checking for __fpu_control in -lieee... " >&6; } +-if ${ac_cv_lib_ieee___fpu_control+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 +$as_echo_n "checking for readline in -lreadline... " >&6; } +if ${ac_cv_lib_readline_readline+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lieee $LIBS" +LIBS="-lreadline $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -19776,1214 +21639,1130 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char __fpu_control (); +char readline (); -+int -+main () -+{ + int + main () + { +-return __fpu_control (); +return readline (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_ieee___fpu_control=yes + ac_cv_lib_readline_readline=yes -+else + else +- ac_cv_lib_ieee___fpu_control=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 +-$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } +-if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBIEEE 1 +-_ACEOF + ac_cv_lib_readline_readline=no +fi +rm -f core conftest.err conftest.$ac_objext \ @@ -9897,36 +15562,81 @@ index 9e76287725..c26d6a0079 100755 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 +$as_echo "$ac_cv_lib_readline_readline" >&6; } +if test "x$ac_cv_lib_readline_readline" = xyes; then : -+ + +- LIBS="-lieee $LIBS" + LIBREADLINE=readline + READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""} + READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"} -+ + +-fi +else -+ + + with_readline=no -+ -+fi -+ -+ + + fi + + +-# check for --with-libm=... +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS + -+ -+ -+else + +-case $ac_sys_system in +-Darwin) ;; +-*) LIBM=-lm +-esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 +-$as_echo_n "checking for --with-libm=STRING... " >&6; } + +-# Check whether --with-libm was given. +-if test "${with_libm+set}" = set; then : +- withval=$with_libm; +-if test "$withval" = no +-then LIBM= +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5 +-$as_echo "force LIBM empty" >&6; } +-elif test "$withval" != yes +-then LIBM=$withval +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5 +-$as_echo "set LIBM=\"$withval\"" >&6; } +-else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5 +-fi + else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 +-$as_echo "default LIBM=\"$LIBM\"" >&6; } + with_readline=no -+fi -+ + fi + +done -+ -+ + +-# check for --with-libc=... +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5 +-$as_echo_n "checking for --with-libc=STRING... " >&6; } + +-# Check whether --with-libc was given. +-if test "${with_libc+set}" = set; then : +- withval=$with_libc; +-if test "$withval" = no +-then LIBC= +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5 +-$as_echo "force LIBC empty" >&6; } +-elif test "$withval" != yes +-then LIBC=$withval +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5 +-$as_echo "set LIBC=\"$withval\"" >&6; } +-else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5 +-fi +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 +-$as_echo "default LIBC=\"$LIBC\"" >&6; } +-fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -+ + + for ac_header in readline/readline.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" @@ -9934,23 +15644,30 @@ index 9e76287725..c26d6a0079 100755 + cat >>confdefs.h <<_ACEOF +#define HAVE_READLINE_READLINE_H 1 +_ACEOF -+ + +-# ************************************** +-# * Check for gcc x64 inline assembler * +-# ************************************** + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS -+ -+ + + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5 +-$as_echo_n "checking for x64 gcc inline assembler... " >&6; } +-if ${ac_cv_gcc_asm_for_x64+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 +$as_echo_n "checking for readline in -lreadline... " >&6; } +if ${ac_cv_lib_readline_readline+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else + $as_echo_n "(cached) " >&6 + else +- + ac_check_lib_save_LIBS=$LIBS +LIBS="-lreadline $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -9958,73 +15675,128 @@ index 9e76287725..c26d6a0079 100755 +extern "C" +#endif +char readline (); -+int -+main () -+{ + int + main () + { +- +- __asm__ __volatile__ ("movq %rcx, %rax"); +- +return readline (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_gcc_asm_for_x64=yes + ac_cv_lib_readline_readline=yes -+else + else +- ac_cv_gcc_asm_for_x64=no + ac_cv_lib_readline_readline=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- +LIBS=$ac_check_lib_save_LIBS -+fi + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x64" >&5 +-$as_echo "$ac_cv_gcc_asm_for_x64" >&6; } +- +-if test "x$ac_cv_gcc_asm_for_x64" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 +$as_echo "$ac_cv_lib_readline_readline" >&6; } +if test "x$ac_cv_lib_readline_readline" = xyes; then : -+ + + LIBREADLINE=readline + READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""} + READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"} -+ + +-$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h +else -+ + + with_readline=no -+ -+fi -+ -+ + + fi + +-# ************************************************** +-# * Check for various properties of floating point * +-# ************************************************** + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5 +-$as_echo_n "checking whether float word ordering is bigendian... " >&6; } +-if ${ax_cv_c_float_words_bigendian+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS -+ -+ -+ + + +-ax_cv_c_float_words_bigendian=unknown +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +else + with_readline=no +fi -+ + +-double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; +done -+ -+ + + +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +else + LIBREADLINE_CFLAGS=$pkg_cv_LIBREADLINE_CFLAGS + LIBREADLINE_LIBS=$pkg_cv_LIBREADLINE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -+ + + LIBREADLINE=readline + READLINE_CFLAGS=$LIBREADLINE_CFLAGS + READLINE_LIBS=$LIBREADLINE_LIBS -+ -+fi -+ -+fi -+ + +-if grep noonsees conftest.$ac_objext >/dev/null ; then +- ax_cv_c_float_words_bigendian=yes +-fi +-if grep seesnoon conftest.$ac_objext >/dev/null ; then +- if test "$ax_cv_c_float_words_bigendian" = unknown; then +- ax_cv_c_float_words_bigendian=no +- else +- ax_cv_c_float_words_bigendian=unknown +- fi + fi + +- +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 +-$as_echo "$ax_cv_c_float_words_bigendian" >&6; } +- +-case $ax_cv_c_float_words_bigendian in +- yes) +- +-$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h +- ;; +- no) +- ;; +- *) +- as_fn_error $? " + +-Unknown float word ordering. You need to manually preset +-ax_cv_c_float_words_bigendian=no (or yes) according to your system. +if test "x$with_readline" = xedit; then : -+ -+ + +- " "$LINENO" 5 ;; +-esac + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5 +$as_echo_n "checking for LIBEDIT... " >&6; } -+ + +-if test "$ax_cv_c_float_words_bigendian" = "yes" +-then +if test -n "$LIBEDIT_CFLAGS"; then + pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then @@ -10059,16 +15831,26 @@ index 9e76287725..c26d6a0079 100755 + else + pkg_failed=untried +fi -+ -+ -+ + +-$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h + +-elif test "$ax_cv_c_float_words_bigendian" = "no" +-then + +-$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -+ + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes -+else + else +- # Some ARM platforms use a mixed-endian representation for doubles. +- # While Python doesn't currently have full support for these platforms +- # (see e.g., issue 1762561), we can at least make sure that float <-> string +- # conversions work. +- # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big +- # or little, then it must be this? + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then @@ -10078,8 +15860,10 @@ index 9e76287725..c26d6a0079 100755 + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBEDIT_PKG_ERRORS" >&5 -+ -+ + +-$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h + +-fi + for ac_header in editline/readline.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default" @@ -10087,23 +15871,35 @@ index 9e76287725..c26d6a0079 100755 + cat >>confdefs.h <<_ACEOF +#define HAVE_EDITLINE_READLINE_H 1 +_ACEOF -+ + +-# The short float repr introduced in Python 3.1 requires the +-# correctly-rounded string <-> double conversion functions from +-# Python/dtoa.c, which in turn require that the FPU uses 53-bit +-# rounding; this is a problem on x86, where the x87 FPU has a default +-# rounding precision of 64 bits. For gcc/x86, we can fix this by +-# using inline assembler to get and set the x87 FPU control word. + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS -+ -+ + +-# This inline assembler syntax may also work for suncc and icc, +-# so we try it on all platforms. + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 +-$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } +-if ${ac_cv_gcc_asm_for_x87+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5 +$as_echo_n "checking for readline in -ledit... " >&6; } +if ${ac_cv_lib_edit_readline+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else + $as_echo_n "(cached) " >&6 + else +- + ac_check_lib_save_LIBS=$LIBS +LIBS="-ledit $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -10111,21 +15907,28 @@ index 9e76287725..c26d6a0079 100755 +extern "C" +#endif +char readline (); -+int -+main () -+{ + int + main () + { +- +- unsigned short cw; +- __asm__ __volatile__ ("fnstcw %0" : "=m" (cw)); +- __asm__ __volatile__ ("fldcw %0" : : "m" (cw)); +- +return readline (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_gcc_asm_for_x87=yes + ac_cv_lib_edit_readline=yes -+else + else +- ac_cv_gcc_asm_for_x87=no + ac_cv_lib_edit_readline=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5 @@ -10141,10 +15944,14 @@ index 9e76287725..c26d6a0079 100755 +else + + with_readline=no -+ -+fi -+ -+ + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x87" >&5 +-$as_echo "$ac_cv_gcc_asm_for_x87" >&6; } +-if test "x$ac_cv_gcc_asm_for_x87" = xyes; then : + + +-$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS @@ -10162,7 +15969,7 @@ index 9e76287725..c26d6a0079 100755 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -+ + + for ac_header in editline/readline.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default" @@ -10170,23 +15977,28 @@ index 9e76287725..c26d6a0079 100755 + cat >>confdefs.h <<_ACEOF +#define HAVE_EDITLINE_READLINE_H 1 +_ACEOF -+ + +-fi + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS -+ + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5 +-$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; } +-if ${ac_cv_gcc_asm_for_mc68881+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5 +$as_echo_n "checking for readline in -ledit... " >&6; } +if ${ac_cv_lib_edit_readline+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else + $as_echo_n "(cached) " >&6 + else +- + ac_check_lib_save_LIBS=$LIBS +LIBS="-ledit $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -10194,40 +16006,67 @@ index 9e76287725..c26d6a0079 100755 +extern "C" +#endif +char readline (); -+int -+main () -+{ + int + main () + { +- +- unsigned int fpcr; +- __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr)); +- __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr)); +- +return readline (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_gcc_asm_for_mc68881=yes + ac_cv_lib_edit_readline=yes -+else + else +- ac_cv_gcc_asm_for_mc68881=no + ac_cv_lib_edit_readline=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- +LIBS=$ac_check_lib_save_LIBS -+fi + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_mc68881" >&5 +-$as_echo "$ac_cv_gcc_asm_for_mc68881" >&6; } +-if test "x$ac_cv_gcc_asm_for_mc68881" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5 +$as_echo "$ac_cv_lib_edit_readline" >&6; } +if test "x$ac_cv_lib_edit_readline" = xyes; then : -+ + + LIBREADLINE=edit + $as_echo "#define WITH_EDITLINE 1" >>confdefs.h -+ + +-$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h + READLINE_CFLAGS=${LIBEDIT_CFLAGS-""} + READLINE_LIBS=${LIBEDIT_LIBS-"-ledit"} -+ + +else + + with_readline=no -+ -+fi -+ -+ + + fi + +-# Detect whether system arithmetic is subject to x87-style double +-# rounding issues. The result of this test has little meaning on non +-# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding +-# mode is round-to-nearest and double rounding issues are present, and +-# 0 otherwise. See https://github.com/python/cpython/issues/47186 for more info. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5 +-$as_echo_n "checking for x87-style double rounding... " >&6; } +-if ${ac_cv_x87_double_rounding+:} false; then : +- $as_echo_n "(cached) " >&6 +-else + +-# $BASECFLAGS may affect the result +-ac_save_cc="$CC" +-CC="$CC $BASECFLAGS" +-if test "$cross_compiling" = yes; then : +- ac_cv_x87_double_rounding=no +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS @@ -10235,14 +16074,38 @@ index 9e76287725..c26d6a0079 100755 + + + -+else + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + with_readline=no +fi + +done -+ -+ -+else + +-#include +-#include +-int main(void) { +- volatile double x, y, z; +- /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */ +- x = 0.99999999999999989; /* 1-2**-53 */ +- y = 1./x; +- if (y != 1.) +- exit(0); +- /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */ +- x = 1e16; +- y = 2.99999; +- z = x + y; +- if (z != 1e16+4.) +- exit(0); +- /* both tests show evidence of double rounding */ +- exit(1); +-} + +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_x87_double_rounding=no + else +- ac_cv_x87_double_rounding=yes + LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS + LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -10251,26 +16114,34 @@ index 9e76287725..c26d6a0079 100755 + $as_echo "#define WITH_EDITLINE 1" >>confdefs.h + + LIBREADLINE=edit -+ READLINE_CFLAGS=$LIBEDIT_CFLAGS -+ READLINE_LIBS=$LIBEDIT_LIBS -+ -+fi -+ -+fi ++ READLINE_CFLAGS=$LIBEDIT_CFLAGS ++ READLINE_LIBS=$LIBEDIT_LIBS + + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext + + fi + +-CC="$ac_save_cc" + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 +-$as_echo "$ac_cv_x87_double_rounding" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline" >&5 +$as_echo_n "checking how to link readline... " >&6; } +if test "x$with_readline" = xno; then : -+ + +-if test "x$ac_cv_x87_double_rounding" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else -+ + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)" >&5 +$as_echo "$with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)" >&6; } -+ + +-$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h + save_CFLAGS=$CFLAGS +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS @@ -10298,11 +16169,16 @@ index 9e76287725..c26d6a0079 100755 + + +$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h -+ -+ -+fi -+ -+ + + + fi + +-# ************************************ +-# * Check for mathematical functions * +-# ************************************ + +-LIBS_SAVE=$LIBS +-LIBS="$LIBS $LIBM" + ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" " + #include /* Must be first for Gnu Readline */ + #ifdef WITH_EDITLINE @@ -10311,27 +16187,64 @@ index 9e76287725..c26d6a0079 100755 + # include + # include + #endif -+ + +-for ac_func in acosh asinh atanh erf erfc expm1 log1p log2 +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +" +if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then : + + +$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h -+ -+ -+fi -+ -+ + +-else +- as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5 + + fi +-done + +-LIBS=$LIBS_SAVE + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 +-$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; } +-if ${ac_cv_posix_semaphores_enabled+:} false; then : + # check for readline 4.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; } +if ${ac_cv_readline_rl_pre_input_hook+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then : +- ac_cv_posix_semaphores_enabled=yes +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- +- #include +- #include +- #include +- #include +- #include + +- int main(void) { +- sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); +- if (a == SEM_FAILED) { +- perror("sem_open"); +- return 1; +- } +- sem_close(a); +- sem_unlink("/autoconf"); +- return 0; +- } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -+ + + #include /* Must be first for Gnu Readline */ + #ifdef WITH_EDITLINE + # include @@ -10339,7 +16252,7 @@ index 9e76287725..c26d6a0079 100755 + # include + # include + #endif -+ + +int +main () +{ @@ -10347,37 +16260,55 @@ index 9e76287725..c26d6a0079 100755 + ; + return 0; +} -+_ACEOF + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_posix_semaphores_enabled=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_readline_rl_pre_input_hook=yes -+else + else +- ac_cv_posix_semaphores_enabled=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + ac_cv_readline_rl_pre_input_hook=no -+ + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -+ -+fi + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 +-$as_echo "$ac_cv_posix_semaphores_enabled" >&6; } +-if test "x$ac_cv_posix_semaphores_enabled" = xno; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_pre_input_hook" >&5 +$as_echo "$ac_cv_readline_rl_pre_input_hook" >&6; } + if test "x$ac_cv_readline_rl_pre_input_hook" = xyes; then : -+ -+ + + +-$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h +$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h -+ -+ -+fi -+ + + + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 +-$as_echo_n "checking for broken sem_getvalue... " >&6; } +-if ${ac_cv_broken_sem_getvalue+:} false; then : + # also in 4.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; } +if ${ac_cv_readline_rl_completion_display_matches_hook+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then : +- ac_cv_broken_sem_getvalue=yes +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + /* end confdefs.h. */ + + #include /* Must be first for Gnu Readline */ + #ifdef WITH_EDITLINE + # include @@ -10385,7 +16316,12 @@ index 9e76287725..c26d6a0079 100755 + # include + # include + #endif -+ + +- #include +- #include +- #include +- #include +- #include +int +main () +{ @@ -10398,11 +16334,24 @@ index 9e76287725..c26d6a0079 100755 + ac_cv_readline_rl_completion_display_matches_hook=yes +else + ac_cv_readline_rl_completion_display_matches_hook=no -+ + +- int main(void){ +- sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0); +- int count; +- int res; +- if(a==SEM_FAILED){ +- perror("sem_open"); +- return 1; +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -+ + +- } +- res = sem_getvalue(a, &count); +- sem_close(a); +- sem_unlink("/autocftw"); +- return res==-1 ? 1 : 0; +- } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_completion_display_matches_hook" >&5 +$as_echo "$ac_cv_readline_rl_completion_display_matches_hook" >&6; } @@ -10413,7 +16362,7 @@ index 9e76287725..c26d6a0079 100755 + + +fi -+ + + # also in 4.0, but not in editline + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; } @@ -10431,7 +16380,7 @@ index 9e76287725..c26d6a0079 100755 + # include + # include + #endif -+ + +int +main () +{ @@ -10439,37 +16388,74 @@ index 9e76287725..c26d6a0079 100755 + ; + return 0; +} -+_ACEOF + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_broken_sem_getvalue=no +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_readline_rl_resize_terminal=yes -+else + else +- ac_cv_broken_sem_getvalue=yes +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + ac_cv_readline_rl_resize_terminal=no -+ + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -+ -+fi + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 +-$as_echo "$ac_cv_broken_sem_getvalue" >&6; } +-if test "x$ac_cv_broken_sem_getvalue" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_resize_terminal" >&5 +$as_echo "$ac_cv_readline_rl_resize_terminal" >&6; } + if test "x$ac_cv_readline_rl_resize_terminal" = xyes; then : -+ -+ + + +-$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h +$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h -+ -+ -+fi -+ + + + fi + +-ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then : +- ac_have_decl=1 + # check for readline 4.2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; } +if ${ac_cv_readline_rl_completion_matches+:} false; then : + $as_echo_n "(cached) " >&6 -+else -+ + else +- ac_have_decl=0 +-fi + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_LAZY $ac_have_decl +-_ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then : +- ac_have_decl=1 +-else +- ac_have_decl=0 +-fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -+ + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_NOW $ac_have_decl +-_ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then : +- ac_have_decl=1 +-else +- ac_have_decl=0 +-fi + #include /* Must be first for Gnu Readline */ + #ifdef WITH_EDITLINE + # include @@ -10477,7 +16463,9 @@ index 9e76287725..c26d6a0079 100755 + # include + # include + #endif -+ + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl +int +main () +{ @@ -10485,17 +16473,41 @@ index 9e76287725..c26d6a0079 100755 + ; + return 0; +} -+_ACEOF + _ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then : +- ac_have_decl=1 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_readline_rl_completion_matches=yes -+else + else +- ac_have_decl=0 +-fi + ac_cv_readline_rl_completion_matches=no -+ -+fi + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_LOCAL $ac_have_decl +-_ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then : +- ac_have_decl=1 +-else +- ac_have_decl=0 + fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -+ -+fi + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_NODELETE $ac_have_decl +-_ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then : +- ac_have_decl=1 +-else +- ac_have_decl=0 + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_completion_matches" >&5 +$as_echo "$ac_cv_readline_rl_completion_matches" >&6; } + if test "x$ac_cv_readline_rl_completion_matches" = xyes; then : @@ -10503,9 +16515,22 @@ index 9e76287725..c26d6a0079 100755 + +$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h + -+ -+fi -+ + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl +-_ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include +-" +-if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then : +- ac_have_decl=1 +-else +- ac_have_decl=0 + fi + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl +-_ACEOF +-ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include + # also in readline 4.2 + ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" " + #include /* Must be first for Gnu Readline */ @@ -10516,25 +16541,51 @@ index 9e76287725..c26d6a0079 100755 + # include + #endif + -+" + " +-if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then : +- ac_have_decl=1 +-else +- ac_have_decl=0 +if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then : + + +$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h + + -+fi -+ -+ + fi + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_RTLD_MEMBER $ac_have_decl +-_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5 +$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; } +if ${ac_cv_readline_append_history+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ + +-# determine what size digit to use for Python's longs +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 +-$as_echo_n "checking digit size for Python's longs... " >&6; } +-# Check whether --enable-big-digits was given. +-if test "${enable_big_digits+set}" = set; then : +- enableval=$enable_big_digits; case $enable_big_digits in +-yes) +- enable_big_digits=30 ;; +-no) +- enable_big_digits=15 ;; +-15|30) +- ;; +-*) +- as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;; +-esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5 +-$as_echo "$enable_big_digits" >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -+ + +-cat >>confdefs.h <<_ACEOF +-#define PYLONG_BITS_IN_DIGIT $enable_big_digits + #include /* Must be first for Gnu Readline */ + #ifdef WITH_EDITLINE + # include @@ -10550,43 +16601,66 @@ index 9e76287725..c26d6a0079 100755 + ; + return 0; +} -+_ACEOF + _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_readline_append_history=yes +else + ac_cv_readline_append_history=no -+ + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -+ -+fi + +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 +-$as_echo "no value specified" >&6; } + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_append_history" >&5 +$as_echo "$ac_cv_readline_append_history" >&6; } + if test "x$ac_cv_readline_append_history" = xyes; then : -+ -+ + + +-# check for wchar.h +-ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +-if test "x$ac_cv_header_wchar_h" = xyes; then : +$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h -+ -+ + + +-$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h +fi -+ -+ -+ + +- wchar_h="yes" + +-else +- wchar_h="no" + +-fi +CFLAGS=$save_CFLAGS +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS -+ -+ + + +fi -+ + +-# determine wchar_t size +-if test "$wchar_h" = yes +-then +- # The cast to long int works around a bug in the HP C Compiler +-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +-# This bug is HP SR number 8606223364. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +-$as_echo_n "checking size of wchar_t... " >&6; } +-if ${ac_cv_sizeof_wchar_t+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5 +$as_echo_n "checking for broken nice()... " >&6; } +if ${ac_cv_broken_nice+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ + $as_echo_n "(cached) " >&6 + else +- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include +-"; then : + +if test "$cross_compiling" = yes; then : + ac_cv_broken_nice=no +else @@ -10606,34 +16680,65 @@ index 9e76287725..c26d6a0079 100755 +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_broken_nice=yes -+else + else +- if test "$ac_cv_type_wchar_t" = yes; then +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error 77 "cannot compute sizeof (wchar_t) +-See \`config.log' for more details" "$LINENO" 5; } +- else +- ac_cv_sizeof_wchar_t=0 +- fi + ac_cv_broken_nice=no -+fi + fi +- +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +-$as_echo "$ac_cv_sizeof_wchar_t" >&6; } +- + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 +$as_echo "$ac_cv_broken_nice" >&6; } +if test "$ac_cv_broken_nice" = yes +then -+ + +-cat >>confdefs.h <<_ACEOF +-#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t +-_ACEOF +- +$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h -+ -+fi -+ + + fi + +-# check whether wchar_t is signed or not +-if test "$wchar_h" = yes +-then +- # check whether wchar_t is signed or not +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 +-$as_echo_n "checking whether wchar_t is signed... " >&6; } +-if ${ac_cv_wchar_t_signed+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5 +$as_echo_n "checking for broken poll()... " >&6; } +if ${ac_cv_broken_poll+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : + $as_echo_n "(cached) " >&6 + else +- + if test "$cross_compiling" = yes; then : +- ac_cv_wchar_t_signed=yes + ac_cv_broken_poll=no -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- #include +- int main() +- { +- /* Success: exit code 0 */ +- return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); +- } +#include +#include + @@ -10652,64 +16757,180 @@ index 9e76287725..c26d6a0079 100755 + else + return 1; +} -+ -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : + + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_wchar_t_signed=yes + ac_cv_broken_poll=yes -+else + else +- ac_cv_wchar_t_signed=no + ac_cv_broken_poll=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+fi + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 +-$as_echo "$ac_cv_wchar_t_signed" >&6; } +-fi +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5 +-$as_echo_n "checking whether wchar_t is usable... " >&6; } +-# wchar_t is only usable if it maps to an unsigned type +-if test "$ac_cv_sizeof_wchar_t" -ge 2 \ +- -a "$ac_cv_wchar_t_signed" = "no" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5 +$as_echo "$ac_cv_broken_poll" >&6; } +if test "$ac_cv_broken_poll" = yes -+then -+ + then + +-$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h -+ -+fi -+ + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + fi + +-case $ac_sys_system/$ac_sys_release in +-SunOS/*) +- if test -f /etc/os-release; then +- OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release) +- if test "x$OS_NAME" = "xOracle Solaris"; then +- # bpo-43667: In Oracle Solaris, the internal form of wchar_t in +- # non-Unicode locales is not Unicode and hence cannot be used directly. +- # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html +- +-$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h +- +- fi +- fi +- ;; +-esac +- +-# check for endianness +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +-$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +-if ${ac_cv_c_bigendian+:} false; then : +# check tzset(3) exists and works like we expect it to +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5 +$as_echo_n "checking for working tzset()... " >&6; } +if ${ac_cv_working_tzset+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else + $as_echo_n "(cached) " >&6 + else +- ac_cv_c_bigendian=unknown +- # See if we're dealing with a universal compiler. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +if test "$cross_compiling" = yes; then : + ac_cv_working_tzset=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ + /* end confdefs.h. */ +-#ifndef __APPLE_CC__ +- not a universal capable compiler +- #endif +- typedef int dummy; + +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +#include +#include +#include -+ + +- # Check for potential -arch flags. It is not universal unless +- # there are at least two -arch flags with different values. +- ac_arch= +- ac_prev= +- for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do +- if test -n "$ac_prev"; then +- case $ac_word in +- i?86 | x86_64 | ppc | ppc64) +- if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then +- ac_arch=$ac_word +- else +- ac_cv_c_bigendian=universal +- break +- fi +- ;; +- esac +- ac_prev= +- elif test "x$ac_word" = "x-arch"; then +- ac_prev=arch +- fi +- done +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- if test $ac_cv_c_bigendian = unknown; then +- # See if sys/param.h defines the BYTE_ORDER macro. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- #include +#if HAVE_TZNAME +extern char *tzname[]; +#endif -+ + +-int +-main () +int main(void) -+{ + { +-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ +- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +- && LITTLE_ENDIAN) +- bogus endian macros +- #endif + /* Note that we need to ensure that not only does tzset(3) + do 'something' with localtime, but it works as documented + in the library reference and as expected by the test suite. + This includes making sure that tzname is set properly if + tm->tm_zone does not exist since it is the alternative way + of getting timezone info. -+ + +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- # It does; now see whether it defined to BIG_ENDIAN or not. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- #include + Red Hat 6.2 doesn't understand the southern hemisphere + after New Year's Day. + */ -+ + +-int +-main () +-{ +-#if BYTE_ORDER != BIG_ENDIAN +- not big endian +- #endif + time_t groundhogday = 1044144000; /* GMT-based */ + time_t midyear = groundhogday + (365 * 24 * 3600 / 2); -+ + +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_c_bigendian=yes +-else +- ac_cv_c_bigendian=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- fi +- if test $ac_cv_c_bigendian = unknown; then +- # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include + putenv("TZ=UTC+0"); + tzset(); + if (localtime(&groundhogday)->tm_hour != 0) @@ -10720,7 +16941,13 @@ index 9e76287725..c26d6a0079 100755 + (tzname[1][0] != 0 && tzname[1][0] != ' ')) + exit(1); +#endif -+ + +-int +-main () +-{ +-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) +- bogus endian macros +- #endif + putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); + tzset(); + if (localtime(&groundhogday)->tm_hour != 19) @@ -10729,7 +16956,16 @@ index 9e76287725..c26d6a0079 100755 + if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT")) + exit(1); +#endif -+ + +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- # It does; now see whether it defined to _BIG_ENDIAN or not. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include + putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); + tzset(); + if (localtime(&groundhogday)->tm_hour != 11) @@ -10738,23 +16974,35 @@ index 9e76287725..c26d6a0079 100755 + if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT")) + exit(1); +#endif -+ + +-int +-main () +-{ +-#ifndef _BIG_ENDIAN +- not big endian +- #endif +#if HAVE_STRUCT_TM_TM_ZONE + if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) + exit(1); + if (strcmp(localtime(&midyear)->tm_zone, "AEST")) + exit(1); +#endif -+ + +- ; +- return 0; + exit(0); -+} + } + -+_ACEOF + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_c_bigendian=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_working_tzset=yes -+else + else +- ac_cv_c_bigendian=no + ac_cv_working_tzset=no -+fi + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi @@ -10767,8 +17015,31 @@ index 9e76287725..c26d6a0079 100755 + +$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h + -+fi -+ + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- fi +- if test $ac_cv_c_bigendian = unknown; then +- # Compile a test program. +- if test "$cross_compiling" = yes; then : +- # Try to guess by grepping values from an object file. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-short int ascii_mm[] = +- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +- short int ascii_ii[] = +- { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +- int use_ascii (int i) { +- return ascii_mm[i] + ascii_ii[i]; +- } +- short int ebcdic_ii[] = +- { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +- short int ebcdic_mm[] = +- { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +- int use_ebcdic (int i) { +- return ebcdic_mm[i] + ebcdic_ii[i]; +- } +- extern int foo; + +# Look for subsecond timestamps in struct stat +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5 +$as_echo_n "checking for tv_nsec in struct stat... " >&6; } @@ -10778,9 +17049,10 @@ index 9e76287725..c26d6a0079 100755 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -+int -+main () -+{ + int + main () + { +-return use_ascii (foo) == use_ebcdic (foo); + +struct stat st; +st.st_mtim.tv_nsec = 1; @@ -11063,26 +17335,26 @@ index 9e76287725..c26d6a0079 100755 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -- + -int main(void) -{ - return (((-1)>>3 == -1) ? 0 : 1); -} ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_rshift_extends_sign=yes -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes - else +-else - ac_cv_rshift_extends_sign=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then @@ -11237,7 +17509,7 @@ index 9e76287725..c26d6a0079 100755 /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. -@@ -20942,81 +22721,130 @@ $as_echo_n "checking how to link readline libs... " >&6; } +@@ -20992,81 +22771,130 @@ $as_echo_n "checking how to link readline libs... " >&6; } #ifdef __cplusplus extern "C" #endif @@ -11304,10 +17576,10 @@ index 9e76287725..c26d6a0079 100755 +CPPFLAGS=$save_CPPFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS ++ -$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h + -+ +else + CURSES_CFLAGS=$pkg_cv_CURSES_CFLAGS + CURSES_LIBS=$pkg_cv_CURSES_LIBS @@ -11413,7 +17685,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -21026,43 +22854,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -21076,43 +22904,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -11488,7 +17760,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -21072,89 +22916,172 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -21122,89 +22966,172 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -11711,7 +17983,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -21164,59 +23091,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -21214,59 +23141,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -11797,7 +18069,7 @@ index 9e76287725..c26d6a0079 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -21226,317 +23153,270 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -21276,334 +23203,270 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif @@ -11827,19 +18099,40 @@ index 9e76287725..c26d6a0079 100755 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : -- --$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_panelw_update_panels" >&5 +$as_echo "$ac_cv_lib_panelw_update_panels" >&6; } +if test "x$ac_cv_lib_panelw_update_panels" = xyes; then : --fi +-$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h + have_panel=panelw + PANEL_CFLAGS=${PANEL_CFLAGS-""} + PANEL_LIBS=${PANEL_LIBS-"-lpanelw"} fi + +- # in readline as well as newer editline (April 2023) +- ac_fn_c_check_type "$LINENO" "rl_compdisp_func_t" "ac_cv_type_rl_compdisp_func_t" " +-#include /* Must be first for Gnu Readline */ +-#ifdef WITH_EDITLINE +-# include +-#else +-# include +-#endif +- +-" +-if test "x$ac_cv_type_rl_compdisp_func_t" = xyes; then : +- +-$as_echo "#define HAVE_RL_COMPDISP_FUNC_T 1" >>confdefs.h +- +-fi +- +-fi ++CFLAGS=$save_CFLAGS ++CPPFLAGS=$save_CPPFLAGS ++LDFLAGS=$save_LDFLAGS ++LIBS=$save_LIBS + -# End of readline checks: restore LIBS -LIBS=$LIBS_no_readline @@ -11848,17 +18141,13 @@ index 9e76287725..c26d6a0079 100755 -if ${ac_cv_broken_nice+:} false; then : - $as_echo_n "(cached) " >&6 -else -+CFLAGS=$save_CFLAGS -+CPPFLAGS=$save_CPPFLAGS -+LDFLAGS=$save_LDFLAGS -+LIBS=$save_LIBS -if test "$cross_compiling" = yes; then : - ac_cv_broken_nice=no --else + else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - +- -#include -#include -int main(void) @@ -11868,31 +18157,32 @@ index 9e76287725..c26d6a0079 100755 - exit(0); - exit(1); -} ++ PANEL_CFLAGS=$pkg_cv_PANEL_CFLAGS ++ PANEL_LIBS=$pkg_cv_PANEL_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_broken_nice=yes - else +-else - ac_cv_broken_nice=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -- --fi ++ have_panel=panelw + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 -$as_echo "$ac_cv_broken_nice" >&6; } -if test "$ac_cv_broken_nice" = yes -then -+ PANEL_CFLAGS=$pkg_cv_PANEL_CFLAGS -+ PANEL_LIBS=$pkg_cv_PANEL_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - +- -$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h -+ have_panel=panelw fi ++ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5 -$as_echo_n "checking for broken poll()... " >&6; } @@ -11907,9 +18197,7 @@ index 9e76287725..c26d6a0079 100755 - -#include -#include -+fi -+ fi - +- -int main(void) -{ - struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; @@ -12293,7 +18581,7 @@ index 9e76287725..c26d6a0079 100755 # On Solaris, term.h requires curses.h for ac_header in term.h -@@ -23147,7 +25027,6 @@ esac +@@ -23214,7 +25077,6 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5 $as_echo "$OPENSSL_RPATH" >&6; } @@ -12301,7 +18589,7 @@ index 9e76287725..c26d6a0079 100755 # This static linking is NOT OFFICIALLY SUPPORTED and not advertised. # Requires static OpenSSL build with position-independent code. Some features # like DSO engines or external OSSL providers don't work. Only tested with GCC -@@ -23625,22 +25504,6 @@ case $host_cpu in #( +@@ -23692,22 +25554,6 @@ case $host_cpu in #( esac @@ -12324,7 +18612,7 @@ index 9e76287725..c26d6a0079 100755 MODULE_BLOCK= -@@ -25066,6 +26929,110 @@ fi +@@ -25133,6 +26979,110 @@ fi $as_echo "$py_cv_module__crypt" >&6; } @@ -12435,7 +18723,7 @@ index 9e76287725..c26d6a0079 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _decimal" >&5 $as_echo_n "checking for stdlib extension module _decimal... " >&6; } if test "$py_cv_module__decimal" != "n/a"; then : -@@ -25100,6 +27067,40 @@ fi +@@ -25167,6 +27117,40 @@ fi $as_echo "$py_cv_module__decimal" >&6; } @@ -12476,7 +18764,7 @@ index 9e76287725..c26d6a0079 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _gdbm" >&5 $as_echo_n "checking for stdlib extension module _gdbm... " >&6; } if test "$py_cv_module__gdbm" != "n/a"; then : -@@ -25168,6 +27169,40 @@ fi +@@ -25235,6 +27219,40 @@ fi $as_echo "$py_cv_module_nis" >&6; } @@ -12517,7 +18805,7 @@ index 9e76287725..c26d6a0079 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _sqlite3" >&5 $as_echo_n "checking for stdlib extension module _sqlite3... " >&6; } if test "$py_cv_module__sqlite3" != "n/a"; then : -@@ -25667,6 +27702,40 @@ fi +@@ -25734,6 +27752,40 @@ fi $as_echo "$py_cv_module__testmultiphase" >&6; } @@ -12558,7 +18846,7 @@ index 9e76287725..c26d6a0079 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _xxtestfuzz" >&5 $as_echo_n "checking for stdlib extension module _xxtestfuzz... " >&6; } if test "$py_cv_module__xxtestfuzz" != "n/a"; then : -@@ -25706,7 +27775,7 @@ $as_echo_n "checking for stdlib extension module _ctypes_test... " >&6; } +@@ -25773,7 +27825,7 @@ $as_echo_n "checking for stdlib extension module _ctypes_test... " >&6; } if test "$py_cv_module__ctypes_test" != "n/a"; then : if test "$TEST_MODULES" = yes; then : @@ -12567,7 +18855,7 @@ index 9e76287725..c26d6a0079 100755 py_cv_module__ctypes_test=yes else py_cv_module__ctypes_test=missing -@@ -25720,7 +27789,7 @@ fi +@@ -25787,7 +27839,7 @@ fi if test "x$py_cv_module__ctypes_test" = xyes; then : @@ -12576,7 +18864,7 @@ index 9e76287725..c26d6a0079 100755 fi if test "$py_cv_module__ctypes_test" = yes; then -@@ -26144,10 +28213,26 @@ if test -z "${MODULE__CRYPT_TRUE}" && test -z "${MODULE__CRYPT_FALSE}"; then +@@ -26211,10 +28263,26 @@ if test -z "${MODULE__CRYPT_TRUE}" && test -z "${MODULE__CRYPT_FALSE}"; then as_fn_error $? "conditional \"MODULE__CRYPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -12603,7 +18891,7 @@ index 9e76287725..c26d6a0079 100755 if test -z "${MODULE__GDBM_TRUE}" && test -z "${MODULE__GDBM_FALSE}"; then as_fn_error $? "conditional \"MODULE__GDBM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 -@@ -26156,6 +28241,10 @@ if test -z "${MODULE_NIS_TRUE}" && test -z "${MODULE_NIS_FALSE}"; then +@@ -26223,6 +28291,10 @@ if test -z "${MODULE_NIS_TRUE}" && test -z "${MODULE_NIS_FALSE}"; then as_fn_error $? "conditional \"MODULE_NIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -12614,7 +18902,7 @@ index 9e76287725..c26d6a0079 100755 if test -z "${MODULE__SQLITE3_TRUE}" && test -z "${MODULE__SQLITE3_FALSE}"; then as_fn_error $? "conditional \"MODULE__SQLITE3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 -@@ -26216,6 +28305,10 @@ if test -z "${MODULE__TESTMULTIPHASE_TRUE}" && test -z "${MODULE__TESTMULTIPHASE +@@ -26283,6 +28355,10 @@ if test -z "${MODULE__TESTMULTIPHASE_TRUE}" && test -z "${MODULE__TESTMULTIPHASE as_fn_error $? "conditional \"MODULE__TESTMULTIPHASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -12625,7 +18913,7 @@ index 9e76287725..c26d6a0079 100755 if test -z "${MODULE__XXTESTFUZZ_TRUE}" && test -z "${MODULE__XXTESTFUZZ_FALSE}"; then as_fn_error $? "conditional \"MODULE__XXTESTFUZZ\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 -@@ -27435,7 +29528,11 @@ fi +@@ -27502,7 +29578,11 @@ fi $as_echo "$as_me: creating Makefile" >&6;} $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ -s Modules \ @@ -12639,10 +18927,10 @@ index 9e76287725..c26d6a0079 100755 if test -z "$PKG_CONFIG"; then diff --git a/configure.ac b/configure.ac -index c62a565eb6..64bc74f484 100644 +index bbe7f891e7..5516095395 100644 --- a/configure.ac +++ b/configure.ac -@@ -765,6 +765,21 @@ AS_CASE([$host], +@@ -773,6 +773,21 @@ AS_CASE([$host], if test "$ac_sys_system" = "Darwin" then @@ -12664,7 +18952,7 @@ index c62a565eb6..64bc74f484 100644 # Compiler selection on MacOSX is more complicated than # AC_PROG_CC can handle, see Mac/README for more # information -@@ -1153,7 +1168,7 @@ AC_DEFINE_UNQUOTED([PY_SUPPORT_TIER], [$PY_SUPPORT_TIER], [PEP 11 Support tier ( +@@ -1161,7 +1176,7 @@ AC_DEFINE_UNQUOTED([PY_SUPPORT_TIER], [$PY_SUPPORT_TIER], [PEP 11 Support tier ( AC_CACHE_CHECK([for -Wl,--no-as-needed], [ac_cv_wl_no_as_needed], [ save_LDFLAGS="$LDFLAGS" @@ -12673,7 +18961,7 @@ index c62a565eb6..64bc74f484 100644 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [NO_AS_NEEDED="-Wl,--no-as-needed" ac_cv_wl_no_as_needed=yes], -@@ -3614,7 +3629,6 @@ AS_VAR_IF([with_system_expat], [yes], [ +@@ -3626,7 +3641,6 @@ AS_VAR_IF([with_system_expat], [yes], [ ]) AC_SUBST([LIBEXPAT_CFLAGS]) @@ -12681,7 +18969,7 @@ index c62a565eb6..64bc74f484 100644 AC_SUBST([LIBEXPAT_INTERNAL]) # Check for use of the system libffi library -@@ -3644,12 +3658,60 @@ else +@@ -3656,12 +3670,60 @@ else with_system_ffi="yes" fi @@ -12748,7 +19036,7 @@ index c62a565eb6..64bc74f484 100644 # Check for use of the system libmpdec library AC_MSG_CHECKING(for --with-system-libmpdec) -@@ -3675,7 +3737,6 @@ AS_VAR_IF([with_system_libmpdec], [yes], [ +@@ -3687,7 +3749,6 @@ AS_VAR_IF([with_system_libmpdec], [yes], [ ]) AC_SUBST([LIBMPDEC_CFLAGS]) @@ -12756,7 +19044,7 @@ index c62a565eb6..64bc74f484 100644 AC_SUBST([LIBMPDEC_INTERNAL]) # Check whether _decimal should use a coroutine-local or thread-local context -@@ -3958,17 +4019,30 @@ WITH_SAVE_ENV([ +@@ -3970,17 +4031,30 @@ WITH_SAVE_ENV([ ], [have_gdbm=no]) ]) @@ -12795,7 +19083,7 @@ index c62a565eb6..64bc74f484 100644 AS_UNSET([ac_cv_header_gdbm_ndbm_h]) AC_CACHE_VAL([ac_cv_header_gdbm_slash_ndbm_h], [ AC_CHECK_HEADER( -@@ -3993,26 +4067,26 @@ AS_VAR_IF([ac_cv_header_gdbm_dash_ndbm_h], [yes], [ +@@ -4005,26 +4079,26 @@ AS_VAR_IF([ac_cv_header_gdbm_dash_ndbm_h], [yes], [ AS_UNSET([ac_cv_header_gdbm_ndbm_h]) if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then @@ -12836,7 +19124,7 @@ index c62a565eb6..64bc74f484 100644 ]) AS_VAR_IF([ac_cv_have_libdb], [yes], [ AC_DEFINE([HAVE_LIBDB], [1], [Define to 1 if you have the `db' library (-ldb).]) -@@ -4020,7 +4094,7 @@ AC_CHECK_HEADERS([db.h], [ +@@ -4032,7 +4106,7 @@ AC_CHECK_HEADERS([db.h], [ ]) # Check for --with-dbmliborder @@ -12845,7 +19133,7 @@ index c62a565eb6..64bc74f484 100644 AC_ARG_WITH(dbmliborder, AS_HELP_STRING([--with-dbmliborder=db1:db2:...], [override order to check db backends for dbm; a valid value is a colon separated string with the backend names `ndbm', `gdbm' and `bdb'.]), [], [with_dbmliborder=gdbm:ndbm:bdb]) -@@ -4040,7 +4114,42 @@ IFS=$as_save_IFS +@@ -4052,7 +4126,42 @@ IFS=$as_save_IFS AS_VAR_IF([with_dbmliborder], [error], [ AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:... (gdbm:ndbm:bdb)]) ]) @@ -12889,7 +19177,7 @@ index c62a565eb6..64bc74f484 100644 # Templates for things AC_DEFINEd more than once. # For a single AC_DEFINE, no template is needed. -@@ -4620,26 +4729,6 @@ AC_CHECK_DECL(dirfd, +@@ -4632,26 +4741,6 @@ AC_CHECK_DECL(dirfd, [#include #include ]) @@ -12916,7 +19204,7 @@ index c62a565eb6..64bc74f484 100644 # For some functions, having a definition is not sufficient, since # we want to take their address. PY_CHECK_FUNC([chroot], [#include ]) -@@ -5798,127 +5887,169 @@ then +@@ -5810,141 +5899,169 @@ then [Define this if you have flockfile(), getc_unlocked(), and funlockfile()]) fi @@ -13149,6 +19437,20 @@ index c62a565eb6..64bc74f484 100644 - AC_CHECK_LIB($LIBREADLINE, append_history, - AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1, - [Define if readline supports append_history]),,$READLINE_LIBS) +- +- # in readline as well as newer editline (April 2023) +- AC_CHECK_TYPE([rl_compdisp_func_t], +- [AC_DEFINE([HAVE_RL_COMPDISP_FUNC_T], [1], +- [Define if readline supports rl_compdisp_func_t])], +- [], +- [ +-#include /* Must be first for Gnu Readline */ +-#ifdef WITH_EDITLINE +-# include +-#else +-# include +-#endif +- ]) -fi + # also in 4.0, but not in editline + AC_CACHE_CHECK([for rl_resize_terminal in -l$LIBREADLINE], [ac_cv_readline_rl_resize_terminal], [ @@ -13195,7 +19497,7 @@ index c62a565eb6..64bc74f484 100644 AC_CACHE_CHECK([for broken nice()], [ac_cv_broken_nice], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -@@ -6074,14 +6205,124 @@ then +@@ -6100,14 +6217,124 @@ then [Define if you have struct stat.st_mtimensec]) fi @@ -13322,7 +19624,7 @@ index c62a565eb6..64bc74f484 100644 # On Solaris, term.h requires curses.h AC_CHECK_HEADERS(term.h,,,[ #ifdef HAVE_CURSES_H -@@ -6644,7 +6885,6 @@ AS_CASE($with_openssl_rpath, +@@ -6670,7 +6897,6 @@ AS_CASE($with_openssl_rpath, ] ) AC_MSG_RESULT($OPENSSL_RPATH) @@ -13330,7 +19632,7 @@ index c62a565eb6..64bc74f484 100644 # This static linking is NOT OFFICIALLY SUPPORTED and not advertised. # Requires static OpenSSL build with position-independent code. Some features -@@ -6891,17 +7131,6 @@ AS_CASE([$host_cpu], +@@ -6917,17 +7143,6 @@ AS_CASE([$host_cpu], ) AC_SUBST([MODULE_BUILDTYPE]) @@ -13348,7 +19650,7 @@ index c62a565eb6..64bc74f484 100644 dnl _MODULE_BLOCK_ADD([VAR], [VALUE]) dnl internal: adds $1=quote($2) to MODULE_BLOCK AC_DEFUN([_MODULE_BLOCK_ADD], [AS_VAR_APPEND([MODULE_BLOCK], ["$1=_AS_QUOTE([$2])$as_nl"])]) -@@ -7049,18 +7278,30 @@ PY_STDLIB_MOD([_blake2], +@@ -7075,18 +7290,30 @@ PY_STDLIB_MOD([_blake2], PY_STDLIB_MOD([_crypt], [], [test "$ac_cv_crypt_crypt" = yes], [$LIBCRYPT_CFLAGS], [$LIBCRYPT_LIBS]) @@ -13384,7 +19686,7 @@ index c62a565eb6..64bc74f484 100644 PY_STDLIB_MOD([_sqlite3], [test "$have_sqlite3" = "yes"], [test "$have_supported_sqlite3" = "yes"], -@@ -7095,8 +7336,11 @@ PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes]) +@@ -7121,8 +7348,11 @@ PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) @@ -13397,7 +19699,7 @@ index c62a565eb6..64bc74f484 100644 dnl Limited API template modules. dnl The limited C API is not compatible with the Py_TRACE_REFS macro. -@@ -7122,7 +7366,11 @@ fi +@@ -7148,7 +7378,11 @@ fi AC_MSG_NOTICE([creating Makefile]) $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ -s Modules \ @@ -13411,7 +19713,7 @@ index c62a565eb6..64bc74f484 100644 if test -z "$PKG_CONFIG"; then diff --git a/pyconfig.h.in b/pyconfig.h.in -index 75f1d90e9b..3417956941 100644 +index a8c35bba44..7ab831842b 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -302,6 +302,9 @@ @@ -13462,7 +19764,7 @@ index 75f1d90e9b..3417956941 100644 /* Define to 1 if you have the `resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV -@@ -814,6 +817,9 @@ +@@ -817,6 +820,9 @@ /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP @@ -13472,7 +19774,7 @@ index 75f1d90e9b..3417956941 100644 /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H -@@ -854,6 +860,9 @@ +@@ -857,6 +863,9 @@ /* Define to 1 if you have the `openpty' function. */ #undef HAVE_OPENPTY @@ -13482,7 +19784,7 @@ index 75f1d90e9b..3417956941 100644 /* Define to 1 if you have the `pathconf' function. */ #undef HAVE_PATHCONF -@@ -941,6 +950,9 @@ +@@ -944,6 +953,9 @@ /* Define to 1 if you have the `pwritev2' function. */ #undef HAVE_PWRITEV2 @@ -13492,7 +19794,7 @@ index 75f1d90e9b..3417956941 100644 /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK -@@ -1717,7 +1729,7 @@ +@@ -1726,7 +1738,7 @@ Dyld is necessary to support frameworks. */ #undef WITH_DYLD @@ -13503,10 +19805,10 @@ index 75f1d90e9b..3417956941 100644 /* Define if you want to compile in object freelists optimization */ diff --git a/setup.py b/setup.py deleted file mode 100644 -index 4f122b62e0..0000000000 +index ad8fb81b21..0000000000 --- a/setup.py +++ /dev/null -@@ -1,1628 +0,0 @@ +@@ -1,1629 +0,0 @@ -# Autodetecting setup.py script for building the Python extensions - -import argparse @@ -13733,6 +20035,7 @@ index 4f122b62e0..0000000000 - -def grep_headers_for(function, headers): - for header in headers: +- if not os.path.exists(header): continue - with open(header, 'r', errors='surrogateescape') as f: - if function in f.read(): - return True @@ -15136,5 +21439,5 @@ index 4f122b62e0..0000000000 -if __name__ == '__main__': - main() -- -2.39.3 +2.43.0