From 283de9488bbe4a905bab6e0f05a7745fcf5fa547 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 5 Jan 2025 01:04:12 +0100 Subject: [PATCH 1/5] Add PY_DEFINE and PY_DEFINE_UNQUOTED macros --- configure | 3 +++ configure.ac | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/configure b/configure index aa88c74c61156c..ab931932e529ac 100755 --- a/configure +++ b/configure @@ -3543,6 +3543,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then # If we're building out-of-tree, we need to make sure the following # resources get picked up before their $srcdir counterparts. diff --git a/configure.ac b/configure.ac index 1def41176337e3..255015bea39a62 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,16 @@ AC_DEFUN([WITH_SAVE_ENV], [RESTORE_ENV] )dnl +dnl AC_DEFINE*() wrappers. +AC_DEFUN([PY_DEFINE], [dnl + AC_DEFINE([Py_$1], [$2], [$3])dnl + AC_DEFINE([$1], [$2], [$3])dnl +]) +AC_DEFUN([PY_DEFINE_UNQUOTED], [dnl + AC_DEFINE_UNQUOTED([Py_$1], [$2], [$3])dnl + AC_DEFINE_UNQUOTED([$1], [$2], [$3])dnl +]) + dnl PY_CHECK_FUNC(FUNCTION, [INCLUDES], [AC_DEFINE-VAR]) AC_DEFUN([PY_CHECK_FUNC], [ AS_VAR_PUSHDEF([py_var], [ac_cv_func_$1]) From c243b68ccc24799e147eba83e6ae4db3b023d586 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 5 Jan 2025 01:07:37 +0100 Subject: [PATCH 2/5] Adapt PY_CHECK_FUNC --- configure | 80 +++++++++++++++++++++++++++++++++ configure.ac | 2 +- pyconfig.h.in | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ab931932e529ac..8e105ed397f0d8 100755 --- a/configure +++ b/configure @@ -15327,6 +15327,8 @@ printf "%s\n" "$ac_cv_func_ffi_prep_cif_var" >&6; } if test "x$ac_cv_func_ffi_prep_cif_var" = xyes then : +printf "%s\n" "#define Py_HAVE_FFI_PREP_CIF_VAR 1" >>confdefs.h + printf "%s\n" "#define HAVE_FFI_PREP_CIF_VAR 1" >>confdefs.h fi @@ -15368,6 +15370,8 @@ printf "%s\n" "$ac_cv_func_ffi_prep_closure_loc" >&6; } if test "x$ac_cv_func_ffi_prep_closure_loc" = xyes then : +printf "%s\n" "#define Py_HAVE_FFI_PREP_CLOSURE_LOC 1" >>confdefs.h + printf "%s\n" "#define HAVE_FFI_PREP_CLOSURE_LOC 1" >>confdefs.h fi @@ -15409,6 +15413,8 @@ printf "%s\n" "$ac_cv_func_ffi_closure_alloc" >&6; } if test "x$ac_cv_func_ffi_closure_alloc" = xyes then : +printf "%s\n" "#define Py_HAVE_FFI_CLOSURE_ALLOC 1" >>confdefs.h + printf "%s\n" "#define HAVE_FFI_CLOSURE_ALLOC 1" >>confdefs.h fi @@ -20254,6 +20260,8 @@ printf "%s\n" "$ac_cv_func_chroot" >&6; } if test "x$ac_cv_func_chroot" = xyes then : +printf "%s\n" "#define Py_HAVE_CHROOT 1" >>confdefs.h + printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h fi @@ -20295,6 +20303,8 @@ printf "%s\n" "$ac_cv_func_link" >&6; } if test "x$ac_cv_func_link" = xyes then : +printf "%s\n" "#define Py_HAVE_LINK 1" >>confdefs.h + printf "%s\n" "#define HAVE_LINK 1" >>confdefs.h fi @@ -20336,6 +20346,8 @@ printf "%s\n" "$ac_cv_func_symlink" >&6; } if test "x$ac_cv_func_symlink" = xyes then : +printf "%s\n" "#define Py_HAVE_SYMLINK 1" >>confdefs.h + printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h fi @@ -20377,6 +20389,8 @@ printf "%s\n" "$ac_cv_func_fchdir" >&6; } if test "x$ac_cv_func_fchdir" = xyes then : +printf "%s\n" "#define Py_HAVE_FCHDIR 1" >>confdefs.h + printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h fi @@ -20418,6 +20432,8 @@ printf "%s\n" "$ac_cv_func_fsync" >&6; } if test "x$ac_cv_func_fsync" = xyes then : +printf "%s\n" "#define Py_HAVE_FSYNC 1" >>confdefs.h + printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h fi @@ -20459,6 +20475,8 @@ printf "%s\n" "$ac_cv_func_fdatasync" >&6; } if test "x$ac_cv_func_fdatasync" = xyes then : +printf "%s\n" "#define Py_HAVE_FDATASYNC 1" >>confdefs.h + printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h fi @@ -20500,6 +20518,8 @@ printf "%s\n" "$ac_cv_func_epoll_create" >&6; } if test "x$ac_cv_func_epoll_create" = xyes then : +printf "%s\n" "#define Py_HAVE_EPOLL 1" >>confdefs.h + printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h fi @@ -20541,6 +20561,8 @@ printf "%s\n" "$ac_cv_func_epoll_create1" >&6; } if test "x$ac_cv_func_epoll_create1" = xyes then : +printf "%s\n" "#define Py_HAVE_EPOLL_CREATE1 1" >>confdefs.h + printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h fi @@ -20585,6 +20607,8 @@ printf "%s\n" "$ac_cv_func_kqueue" >&6; } if test "x$ac_cv_func_kqueue" = xyes then : +printf "%s\n" "#define Py_HAVE_KQUEUE 1" >>confdefs.h + printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h fi @@ -20629,6 +20653,8 @@ printf "%s\n" "$ac_cv_func_prlimit" >&6; } if test "x$ac_cv_func_prlimit" = xyes then : +printf "%s\n" "#define Py_HAVE_PRLIMIT 1" >>confdefs.h + printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h fi @@ -20671,6 +20697,8 @@ printf "%s\n" "$ac_cv_func__dyld_shared_cache_contains_path" >&6; } if test "x$ac_cv_func__dyld_shared_cache_contains_path" = xyes then : +printf "%s\n" "#define Py_HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h + printf "%s\n" "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h fi @@ -20720,6 +20748,8 @@ printf "%s\n" "$ac_cv_func_memfd_create" >&6; } if test "x$ac_cv_func_memfd_create" = xyes then : +printf "%s\n" "#define Py_HAVE_MEMFD_CREATE 1" >>confdefs.h + printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h fi @@ -20766,6 +20796,8 @@ printf "%s\n" "$ac_cv_func_eventfd" >&6; } if test "x$ac_cv_func_eventfd" = xyes then : +printf "%s\n" "#define Py_HAVE_EVENTFD 1" >>confdefs.h + printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h fi @@ -20812,6 +20844,8 @@ printf "%s\n" "$ac_cv_func_timerfd_create" >&6; } if test "x$ac_cv_func_timerfd_create" = xyes then : +printf "%s\n" "#define Py_HAVE_TIMERFD_CREATE 1" >>confdefs.h + printf "%s\n" "#define HAVE_TIMERFD_CREATE 1" >>confdefs.h fi @@ -20860,6 +20894,8 @@ printf "%s\n" "$ac_cv_func_ctermid_r" >&6; } if test "x$ac_cv_func_ctermid_r" = xyes then : +printf "%s\n" "#define Py_HAVE_CTERMID_R 1" >>confdefs.h + printf "%s\n" "#define HAVE_CTERMID_R 1" >>confdefs.h fi @@ -20999,6 +21035,8 @@ printf "%s\n" "$ac_cv_func_getpagesize" >&6; } if test "x$ac_cv_func_getpagesize" = xyes then : +printf "%s\n" "#define Py_HAVE_GETPAGESIZE 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h fi @@ -22344,6 +22382,8 @@ printf "%s\n" "$ac_cv_func_hstrerror" >&6; } if test "x$ac_cv_func_hstrerror" = xyes then : +printf "%s\n" "#define Py_HAVE_HSTRERROR 1" >>confdefs.h + printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h fi @@ -22385,6 +22425,8 @@ printf "%s\n" "$ac_cv_func_getservbyname" >&6; } if test "x$ac_cv_func_getservbyname" = xyes then : +printf "%s\n" "#define Py_HAVE_GETSERVBYNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h fi @@ -22426,6 +22468,8 @@ printf "%s\n" "$ac_cv_func_getservbyport" >&6; } if test "x$ac_cv_func_getservbyport" = xyes then : +printf "%s\n" "#define Py_HAVE_GETSERVBYPORT 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETSERVBYPORT 1" >>confdefs.h fi @@ -22467,6 +22511,8 @@ printf "%s\n" "$ac_cv_func_gethostbyname" >&6; } if test "x$ac_cv_func_gethostbyname" = xyes then : +printf "%s\n" "#define Py_HAVE_GETHOSTBYNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h fi @@ -22508,6 +22554,8 @@ printf "%s\n" "$ac_cv_func_gethostbyaddr" >&6; } if test "x$ac_cv_func_gethostbyaddr" = xyes then : +printf "%s\n" "#define Py_HAVE_GETHOSTBYADDR 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h fi @@ -22549,6 +22597,8 @@ printf "%s\n" "$ac_cv_func_getprotobyname" >&6; } if test "x$ac_cv_func_getprotobyname" = xyes then : +printf "%s\n" "#define Py_HAVE_GETPROTOBYNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETPROTOBYNAME 1" >>confdefs.h fi @@ -22598,6 +22648,8 @@ printf "%s\n" "$ac_cv_func_inet_aton" >&6; } if test "x$ac_cv_func_inet_aton" = xyes then : +printf "%s\n" "#define Py_HAVE_INET_ATON 1" >>confdefs.h + printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h fi @@ -22644,6 +22696,8 @@ printf "%s\n" "$ac_cv_func_inet_ntoa" >&6; } if test "x$ac_cv_func_inet_ntoa" = xyes then : +printf "%s\n" "#define Py_HAVE_INET_NTOA 1" >>confdefs.h + printf "%s\n" "#define HAVE_INET_NTOA 1" >>confdefs.h fi @@ -22690,6 +22744,8 @@ printf "%s\n" "$ac_cv_func_inet_pton" >&6; } if test "x$ac_cv_func_inet_pton" = xyes then : +printf "%s\n" "#define Py_HAVE_INET_PTON 1" >>confdefs.h + printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h fi @@ -22736,6 +22792,8 @@ printf "%s\n" "$ac_cv_func_getpeername" >&6; } if test "x$ac_cv_func_getpeername" = xyes then : +printf "%s\n" "#define Py_HAVE_GETPEERNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h fi @@ -22782,6 +22840,8 @@ printf "%s\n" "$ac_cv_func_getsockname" >&6; } if test "x$ac_cv_func_getsockname" = xyes then : +printf "%s\n" "#define Py_HAVE_GETSOCKNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETSOCKNAME 1" >>confdefs.h fi @@ -22828,6 +22888,8 @@ printf "%s\n" "$ac_cv_func_accept" >&6; } if test "x$ac_cv_func_accept" = xyes then : +printf "%s\n" "#define Py_HAVE_ACCEPT 1" >>confdefs.h + printf "%s\n" "#define HAVE_ACCEPT 1" >>confdefs.h fi @@ -22874,6 +22936,8 @@ printf "%s\n" "$ac_cv_func_bind" >&6; } if test "x$ac_cv_func_bind" = xyes then : +printf "%s\n" "#define Py_HAVE_BIND 1" >>confdefs.h + printf "%s\n" "#define HAVE_BIND 1" >>confdefs.h fi @@ -22920,6 +22984,8 @@ printf "%s\n" "$ac_cv_func_connect" >&6; } if test "x$ac_cv_func_connect" = xyes then : +printf "%s\n" "#define Py_HAVE_CONNECT 1" >>confdefs.h + printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h fi @@ -22966,6 +23032,8 @@ printf "%s\n" "$ac_cv_func_listen" >&6; } if test "x$ac_cv_func_listen" = xyes then : +printf "%s\n" "#define Py_HAVE_LISTEN 1" >>confdefs.h + printf "%s\n" "#define HAVE_LISTEN 1" >>confdefs.h fi @@ -23012,6 +23080,8 @@ printf "%s\n" "$ac_cv_func_recvfrom" >&6; } if test "x$ac_cv_func_recvfrom" = xyes then : +printf "%s\n" "#define Py_HAVE_RECVFROM 1" >>confdefs.h + printf "%s\n" "#define HAVE_RECVFROM 1" >>confdefs.h fi @@ -23058,6 +23128,8 @@ printf "%s\n" "$ac_cv_func_sendto" >&6; } if test "x$ac_cv_func_sendto" = xyes then : +printf "%s\n" "#define Py_HAVE_SENDTO 1" >>confdefs.h + printf "%s\n" "#define HAVE_SENDTO 1" >>confdefs.h fi @@ -23104,6 +23176,8 @@ printf "%s\n" "$ac_cv_func_setsockopt" >&6; } if test "x$ac_cv_func_setsockopt" = xyes then : +printf "%s\n" "#define Py_HAVE_SETSOCKOPT 1" >>confdefs.h + printf "%s\n" "#define HAVE_SETSOCKOPT 1" >>confdefs.h fi @@ -23150,6 +23224,8 @@ printf "%s\n" "$ac_cv_func_socket" >&6; } if test "x$ac_cv_func_socket" = xyes then : +printf "%s\n" "#define Py_HAVE_SOCKET 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h fi @@ -23198,6 +23274,8 @@ printf "%s\n" "$ac_cv_func_setgroups" >&6; } if test "x$ac_cv_func_setgroups" = xyes then : +printf "%s\n" "#define Py_HAVE_SETGROUPS 1" >>confdefs.h + printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h fi @@ -24786,6 +24864,8 @@ printf "%s\n" "$ac_cv_func_socketpair" >&6; } if test "x$ac_cv_func_socketpair" = xyes then : +printf "%s\n" "#define Py_HAVE_SOCKETPAIR 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h fi diff --git a/configure.ac b/configure.ac index 255015bea39a62..d4609eeef4dcdb 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,7 @@ AC_DEFUN([PY_CHECK_FUNC], AS_VAR_IF( [py_var], [yes], - [AC_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) + [PY_DEFINE(py_define, [1], [Define if you have the '$1' function.])]) AS_VAR_POPDEF([py_var]) AS_VAR_POPDEF([py_define]) ]) diff --git a/pyconfig.h.in b/pyconfig.h.in index d862966b7de4c8..e938a42aa80cda 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1703,9 +1703,129 @@ SipHash13: 3, externally defined: 0 */ #undef Py_HASH_ALGORITHM +/* Define if you have the 'accept' function. */ +#undef Py_HAVE_ACCEPT + +/* Define if you have the 'bind' function. */ +#undef Py_HAVE_BIND + +/* Define if you have the 'chroot' function. */ +#undef Py_HAVE_CHROOT + +/* Define if you have the 'connect' function. */ +#undef Py_HAVE_CONNECT + +/* Define if you have the 'ctermid_r' function. */ +#undef Py_HAVE_CTERMID_R + /* Defined if _Complex C type is available. */ #undef Py_HAVE_C_COMPLEX +/* Define if you have the '_dyld_shared_cache_contains_path' function. */ +#undef Py_HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH + +/* Define if you have the 'epoll_create' function. */ +#undef Py_HAVE_EPOLL + +/* Define if you have the 'epoll_create1' function. */ +#undef Py_HAVE_EPOLL_CREATE1 + +/* Define if you have the 'eventfd' function. */ +#undef Py_HAVE_EVENTFD + +/* Define if you have the 'fchdir' function. */ +#undef Py_HAVE_FCHDIR + +/* Define if you have the 'fdatasync' function. */ +#undef Py_HAVE_FDATASYNC + +/* Define if you have the 'ffi_closure_alloc' function. */ +#undef Py_HAVE_FFI_CLOSURE_ALLOC + +/* Define if you have the 'ffi_prep_cif_var' function. */ +#undef Py_HAVE_FFI_PREP_CIF_VAR + +/* Define if you have the 'ffi_prep_closure_loc' function. */ +#undef Py_HAVE_FFI_PREP_CLOSURE_LOC + +/* Define if you have the 'fsync' function. */ +#undef Py_HAVE_FSYNC + +/* Define if you have the 'gethostbyaddr' function. */ +#undef Py_HAVE_GETHOSTBYADDR + +/* Define if you have the 'gethostbyname' function. */ +#undef Py_HAVE_GETHOSTBYNAME + +/* Define if you have the 'getpagesize' function. */ +#undef Py_HAVE_GETPAGESIZE + +/* Define if you have the 'getpeername' function. */ +#undef Py_HAVE_GETPEERNAME + +/* Define if you have the 'getprotobyname' function. */ +#undef Py_HAVE_GETPROTOBYNAME + +/* Define if you have the 'getservbyname' function. */ +#undef Py_HAVE_GETSERVBYNAME + +/* Define if you have the 'getservbyport' function. */ +#undef Py_HAVE_GETSERVBYPORT + +/* Define if you have the 'getsockname' function. */ +#undef Py_HAVE_GETSOCKNAME + +/* Define if you have the 'hstrerror' function. */ +#undef Py_HAVE_HSTRERROR + +/* Define if you have the 'inet_aton' function. */ +#undef Py_HAVE_INET_ATON + +/* Define if you have the 'inet_ntoa' function. */ +#undef Py_HAVE_INET_NTOA + +/* Define if you have the 'inet_pton' function. */ +#undef Py_HAVE_INET_PTON + +/* Define if you have the 'kqueue' function. */ +#undef Py_HAVE_KQUEUE + +/* Define if you have the 'link' function. */ +#undef Py_HAVE_LINK + +/* Define if you have the 'listen' function. */ +#undef Py_HAVE_LISTEN + +/* Define if you have the 'memfd_create' function. */ +#undef Py_HAVE_MEMFD_CREATE + +/* Define if you have the 'prlimit' function. */ +#undef Py_HAVE_PRLIMIT + +/* Define if you have the 'recvfrom' function. */ +#undef Py_HAVE_RECVFROM + +/* Define if you have the 'sendto' function. */ +#undef Py_HAVE_SENDTO + +/* Define if you have the 'setgroups' function. */ +#undef Py_HAVE_SETGROUPS + +/* Define if you have the 'setsockopt' function. */ +#undef Py_HAVE_SETSOCKOPT + +/* Define if you have the 'socket' function. */ +#undef Py_HAVE_SOCKET + +/* Define if you have the 'socketpair' function. */ +#undef Py_HAVE_SOCKETPAIR + +/* Define if you have the 'symlink' function. */ +#undef Py_HAVE_SYMLINK + +/* Define if you have the 'timerfd_create' function. */ +#undef Py_HAVE_TIMERFD_CREATE + /* Define if year with century should be normalized for strftime. */ #undef Py_NORMALIZE_CENTURY From 1996f3a34677c85b8deb3b38d8d27f0c9aea5573 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 5 Jan 2025 01:21:35 +0100 Subject: [PATCH 3/5] Adapt most other uses --- configure | 216 ++++++++++++++++++++++++++++++++ configure.ac | 192 ++++++++++++++--------------- pyconfig.h.in | 333 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 645 insertions(+), 96 deletions(-) diff --git a/configure b/configure index 8e105ed397f0d8..5e71ccf6a8480a 100755 --- a/configure +++ b/configure @@ -7306,6 +7306,8 @@ printf "%s\n" "$ANDROID_API_LEVEL" >&6; } as_fn_error $? "Fatal: you must define __ANDROID_API__" "$LINENO" 5 fi +printf "%s\n" "#define Py_ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h + printf "%s\n" "#define ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h @@ -12058,6 +12060,8 @@ if test "x$ac_cv_func_makedev" = xyes then : +printf "%s\n" "#define Py_HAVE_MAKEDEV 1" >>confdefs.h + printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h @@ -12109,6 +12113,8 @@ if test "x$ac_cv_func_le64toh" = xyes then : +printf "%s\n" "#define Py_HAVE_HTOLE64 1" >>confdefs.h + printf "%s\n" "#define HAVE_HTOLE64 1" >>confdefs.h @@ -12208,6 +12214,8 @@ fi +printf "%s\n" "#define Py_RETSIGTYPE void" >>confdefs.h + printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" @@ -12260,6 +12268,8 @@ then : printf "%s\n" "#define HAVE___UINT128_T 1" >>confdefs.h +printf "%s\n" "#define Py_HAVE_GCC_UINT128_T 1" >>confdefs.h + printf "%s\n" "#define HAVE_GCC_UINT128_T 1" >>confdefs.h fi @@ -12933,6 +12943,8 @@ if test "x$have_largefile_support" = xyes then : +printf "%s\n" "#define Py_HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h + printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -13157,6 +13169,8 @@ if test "x$ac_cv_pthread_key_t_is_arithmetic_type" = xyes then : +printf "%s\n" "#define Py_PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h + printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h @@ -13172,6 +13186,8 @@ then # -F. is needed to allow linking to the framework while # in the build location. +printf "%s\n" "#define Py_WITH_NEXT_FRAMEWORK 1" >>confdefs.h + printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -13273,6 +13289,8 @@ printf %s "checking for dyld... " >&6; } case $ac_sys_system/$ac_sys_release in Darwin/*) +printf "%s\n" "#define Py_WITH_DYLD 1" >>confdefs.h + printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5 @@ -13664,6 +13682,8 @@ then fi +printf "%s\n" "#define Py_THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h + printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h @@ -14493,6 +14513,8 @@ printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; } if test "x$ac_cv_lib_intl_textdomain" = xyes then : +printf "%s\n" "#define Py_WITH_LIBINTL 1" >>confdefs.h + printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -14649,6 +14671,8 @@ fi printf "%s\n" "$ac_cv_aligned_required" >&6; } if test "$ac_cv_aligned_required" = yes ; then +printf "%s\n" "#define Py_HAVE_ALIGNED_REQUIRED 1" >>confdefs.h + printf "%s\n" "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h fi @@ -17165,6 +17189,8 @@ if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes then : +printf "%s\n" "#define Py_HAVE_GDBM_NDBM_H 1" >>confdefs.h + printf "%s\n" "#define HAVE_GDBM_NDBM_H 1" >>confdefs.h @@ -17194,6 +17220,8 @@ if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes then : +printf "%s\n" "#define Py_HAVE_GDBM_DASH_NDBM_H 1" >>confdefs.h + printf "%s\n" "#define HAVE_GDBM_DASH_NDBM_H 1" >>confdefs.h @@ -17353,6 +17381,8 @@ printf "%s\n" "$ac_cv_have_libdb" >&6; } then : +printf "%s\n" "#define Py_HAVE_LIBDB 1" >>confdefs.h + printf "%s\n" "#define HAVE_LIBDB 1" >>confdefs.h @@ -17869,18 +17899,26 @@ printf "%s\n" "#define _POSIX_THREADS 1" >>confdefs.h # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. case $ac_sys_system/$ac_sys_release in SunOS/5.6) +printf "%s\n" "#define Py_HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h + printf "%s\n" "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h ;; SunOS/5.8) +printf "%s\n" "#define Py_HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ;; AIX/*) +printf "%s\n" "#define Py_HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ;; NetBSD/*) +printf "%s\n" "#define Py_HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ;; @@ -17932,6 +17970,8 @@ fi printf "%s\n" "$ac_cv_pthread_system_supported" >&6; } if test "$ac_cv_pthread_system_supported" = "yes"; then +printf "%s\n" "#define Py_PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h + printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h fi @@ -17945,6 +17985,8 @@ then : case $ac_sys_system in CYGWIN*) +printf "%s\n" "#define Py_HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h ;; @@ -17965,6 +18007,8 @@ if test "x$posix_threads" = xstub then : +printf "%s\n" "#define Py_HAVE_PTHREAD_STUBS 1" >>confdefs.h + printf "%s\n" "#define HAVE_PTHREAD_STUBS 1" >>confdefs.h @@ -18438,6 +18482,8 @@ if test "x$ac_cv_can_raw_fd_frames" = xyes then : +printf "%s\n" "#define Py_HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h + printf "%s\n" "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h @@ -18479,6 +18525,8 @@ if test "x$ac_cv_can_raw_join_filters" = xyes then : +printf "%s\n" "#define Py_HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h + printf "%s\n" "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h @@ -18501,6 +18549,8 @@ fi if test "$with_doc_strings" != "no" then +printf "%s\n" "#define Py_WITH_DOC_STRINGS 1" >>confdefs.h + printf "%s\n" "#define WITH_DOC_STRINGS 1" >>confdefs.h fi @@ -18550,6 +18600,8 @@ if test "x$ac_cv_header_stdatomic_h" = xyes then : +printf "%s\n" "#define Py_HAVE_STD_ATOMIC 1" >>confdefs.h + printf "%s\n" "#define HAVE_STD_ATOMIC 1" >>confdefs.h @@ -18595,6 +18647,8 @@ if test "x$ac_cv_builtin_atomic" = xyes then : +printf "%s\n" "#define Py_HAVE_BUILTIN_ATOMIC 1" >>confdefs.h + printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h @@ -18622,6 +18676,8 @@ if test "$with_mimalloc" != no; then fi with_mimalloc=yes +printf "%s\n" "#define Py_WITH_MIMALLOC 1" >>confdefs.h + printf "%s\n" "#define WITH_MIMALLOC 1" >>confdefs.h MIMALLOC_HEADERS='$(MIMALLOC_HEADERS)' @@ -18662,6 +18718,8 @@ fi if test "$with_pymalloc" != "no" then +printf "%s\n" "#define Py_WITH_PYMALLOC 1" >>confdefs.h + printf "%s\n" "#define WITH_PYMALLOC 1" >>confdefs.h fi @@ -18713,6 +18771,8 @@ if test "$with_valgrind" != no; then if test "x$ac_cv_header_valgrind_valgrind_h" = xyes then : +printf "%s\n" "#define Py_WITH_VALGRIND 1" >>confdefs.h + printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h else case e in #( @@ -18801,6 +18861,8 @@ fi as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 fi +printf "%s\n" "#define Py_WITH_DTRACE 1" >>confdefs.h + printf "%s\n" "#define WITH_DTRACE 1" >>confdefs.h DTRACE_HEADERS="Include/pydtrace_probes.h" @@ -18882,6 +18944,8 @@ printf "%s\n" "$DYNLOADFILE" >&6; } if test "$DYNLOADFILE" != "dynload_stub.o" then +printf "%s\n" "#define Py_HAVE_DYNAMIC_LOADING 1" >>confdefs.h + printf "%s\n" "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h fi @@ -20219,6 +20283,8 @@ ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include >confdefs.h + printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h fi @@ -21079,6 +21145,8 @@ if test "x$ac_cv_broken_unsetenv" = xyes then : +printf "%s\n" "#define Py_HAVE_BROKEN_UNSETENV 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h @@ -21388,6 +21456,8 @@ fi fi if test "$ac_cv_have_chflags" = yes ; then +printf "%s\n" "#define Py_HAVE_CHFLAGS 1" >>confdefs.h + printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h fi @@ -21445,6 +21515,8 @@ fi fi if test "$ac_cv_have_lchflags" = yes ; then +printf "%s\n" "#define Py_HAVE_LCHFLAGS 1" >>confdefs.h + printf "%s\n" "#define HAVE_LCHFLAGS 1" >>confdefs.h fi @@ -23463,6 +23535,8 @@ if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +printf "%s\n" "#define Py_HAVE_LOGIN_TTY 1" >>confdefs.h + printf "%s\n" "#define HAVE_LOGIN_TTY 1" >>confdefs.h @@ -23657,6 +23731,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : +printf "%s\n" "#define Py_GETPGRP_HAVE_ARG 1" >>confdefs.h + printf "%s\n" "#define GETPGRP_HAVE_ARG 1" >>confdefs.h fi @@ -23685,6 +23761,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : +printf "%s\n" "#define Py_SETPGRP_HAVE_ARG 1" >>confdefs.h + printf "%s\n" "#define SETPGRP_HAVE_ARG 1" >>confdefs.h fi @@ -23768,6 +23846,8 @@ then : printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h +printf "%s\n" "#define Py_TIMEMODULE_LIB rt" >>confdefs.h + printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h @@ -24105,12 +24185,16 @@ if test "x$ac_cv_device_macros" = xyes then : +printf "%s\n" "#define Py_HAVE_DEVICE_MACROS 1" >>confdefs.h + printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h fi +printf "%s\n" "#define Py_SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h + printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h @@ -24297,6 +24381,8 @@ then : fi else +printf "%s\n" "#define Py_HAVE_GETADDRINFO 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h fi @@ -24542,6 +24628,8 @@ fi printf "%s\n" "$ac_cv_header_time_altzone" >&6; } if test $ac_cv_header_time_altzone = yes; then +printf "%s\n" "#define Py_HAVE_ALTZONE 1" >>confdefs.h + printf "%s\n" "#define HAVE_ALTZONE 1" >>confdefs.h fi @@ -24577,6 +24665,8 @@ fi printf "%s\n" "$ac_cv_struct_addrinfo" >&6; } if test $ac_cv_struct_addrinfo = yes; then +printf "%s\n" "#define Py_HAVE_ADDRINFO 1" >>confdefs.h + printf "%s\n" "#define HAVE_ADDRINFO 1" >>confdefs.h fi @@ -24614,6 +24704,8 @@ fi printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; } if test $ac_cv_struct_sockaddr_storage = yes; then +printf "%s\n" "#define Py_HAVE_SOCKADDR_STORAGE 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h fi @@ -24652,6 +24744,8 @@ fi printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; } if test $ac_cv_struct_sockaddr_alg = yes; then +printf "%s\n" "#define Py_HAVE_SOCKADDR_ALG 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h fi @@ -24819,6 +24913,8 @@ if test "x$ac_cv_function_prototypes" = xyes then : +printf "%s\n" "#define Py_HAVE_PROTOTYPES 1" >>confdefs.h + printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h @@ -24911,6 +25007,8 @@ if test "x$ac_cv_struct_sockaddr_sa_len" = xyes then : +printf "%s\n" "#define Py_HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h @@ -25236,6 +25334,8 @@ if test "x$ac_cv_gcc_asm_for_x64" = xyes then : +printf "%s\n" "#define Py_HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h + printf "%s\n" "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h @@ -25297,10 +25397,14 @@ printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; } case $ax_cv_c_float_words_bigendian in yes) +printf "%s\n" "#define Py_DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h + printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h ;; no) +printf "%s\n" "#define Py_DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h + printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h ;; *) @@ -25313,6 +25417,8 @@ printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, # but if it's not big or little, then it must be this? +printf "%s\n" "#define Py_DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h + printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h ;; #( *) : @@ -25372,6 +25478,8 @@ if test "x$ac_cv_gcc_asm_for_x87" = xyes then : +printf "%s\n" "#define Py_HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h + printf "%s\n" "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h @@ -25417,6 +25525,8 @@ if test "x$ac_cv_gcc_asm_for_mc68881" = xyes then : +printf "%s\n" "#define Py_HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h + printf "%s\n" "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h @@ -25487,6 +25597,8 @@ if test "x$ac_cv_x87_double_rounding" = xyes then : +printf "%s\n" "#define Py_X87_DOUBLE_ROUNDING 1" >>confdefs.h + printf "%s\n" "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h @@ -25573,6 +25685,8 @@ if test "x$ac_cv_posix_semaphores_enabled" = xno then : +printf "%s\n" "#define Py_POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h + printf "%s\n" "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h @@ -25636,6 +25750,8 @@ if test "x$ac_cv_broken_sem_getvalue" = xyes then : +printf "%s\n" "#define Py_HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h @@ -25758,6 +25874,8 @@ if test "x$ac_cv_header_wchar_h" = xyes then : +printf "%s\n" "#define Py_HAVE_WCHAR_H 1" >>confdefs.h + printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h wchar_h="yes" @@ -25861,6 +25979,8 @@ if test "$ac_cv_sizeof_wchar_t" -ge 2 \ -a "$ac_cv_wchar_t_signed" = "no" then +printf "%s\n" "#define Py_HAVE_USABLE_WCHAR_T 1" >>confdefs.h + printf "%s\n" "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -25879,6 +25999,8 @@ SunOS/*) # non-Unicode locales is not Unicode and hence cannot be used directly. # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html +printf "%s\n" "#define Py_HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h + printf "%s\n" "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h fi @@ -26162,6 +26284,8 @@ if test "$Py_DEBUG" = 'true'; then ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM} +printf "%s\n" "#define Py_ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h + printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h fi @@ -26307,6 +26431,8 @@ printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; } if test "$ac_cv_rshift_extends_sign" = no then +printf "%s\n" "#define Py_SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h + printf "%s\n" "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h fi @@ -26351,6 +26477,8 @@ printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; } if test "$ac_cv_have_getc_unlocked" = yes then +printf "%s\n" "#define Py_HAVE_GETC_UNLOCKED 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h fi @@ -26932,6 +27060,8 @@ if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes then : +printf "%s\n" "#define Py_HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h @@ -26951,6 +27081,8 @@ if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes then : +printf "%s\n" "#define Py_HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h @@ -27002,6 +27134,8 @@ printf "%s\n" "$ac_cv_readline_rl_pre_input_hook" >&6; } then : +printf "%s\n" "#define Py_HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h @@ -27053,6 +27187,8 @@ printf "%s\n" "$ac_cv_readline_rl_completion_display_matches_hook" >&6; } then : +printf "%s\n" "#define Py_HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h @@ -27104,6 +27240,8 @@ printf "%s\n" "$ac_cv_readline_rl_resize_terminal" >&6; } then : +printf "%s\n" "#define Py_HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h @@ -27155,6 +27293,8 @@ printf "%s\n" "$ac_cv_readline_rl_completion_matches" >&6; } then : +printf "%s\n" "#define Py_HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h @@ -27175,6 +27315,8 @@ if test "x$ac_cv_have_decl_rl_catch_signals" = xyes then : +printf "%s\n" "#define Py_HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h @@ -27225,6 +27367,8 @@ printf "%s\n" "$ac_cv_readline_append_history" >&6; } then : +printf "%s\n" "#define Py_HAVE_RL_APPEND_HISTORY 1" >>confdefs.h + printf "%s\n" "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h @@ -27357,6 +27501,8 @@ printf "%s\n" "$ac_cv_broken_nice" >&6; } if test "$ac_cv_broken_nice" = yes then +printf "%s\n" "#define Py_HAVE_BROKEN_NICE 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_NICE 1" >>confdefs.h fi @@ -27413,6 +27559,8 @@ printf "%s\n" "$ac_cv_broken_poll" >&6; } if test "$ac_cv_broken_poll" = yes then +printf "%s\n" "#define Py_HAVE_BROKEN_POLL 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_POLL 1" >>confdefs.h fi @@ -27515,6 +27663,8 @@ printf "%s\n" "$ac_cv_working_tzset" >&6; } if test "$ac_cv_working_tzset" = yes then +printf "%s\n" "#define Py_HAVE_WORKING_TZSET 1" >>confdefs.h + printf "%s\n" "#define HAVE_WORKING_TZSET 1" >>confdefs.h fi @@ -27555,6 +27705,8 @@ printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; } if test "$ac_cv_stat_tv_nsec" = yes then +printf "%s\n" "#define Py_HAVE_STAT_TV_NSEC 1" >>confdefs.h + printf "%s\n" "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h fi @@ -27595,6 +27747,8 @@ printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; } if test "$ac_cv_stat_tv_nsec2" = yes then +printf "%s\n" "#define Py_HAVE_STAT_TV_NSEC2 1" >>confdefs.h + printf "%s\n" "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h fi @@ -27781,6 +27935,8 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } +printf "%s\n" "#define Py_HAVE_NCURSESW 1" >>confdefs.h + printf "%s\n" "#define HAVE_NCURSESW 1" >>confdefs.h have_curses=yes @@ -27854,6 +28010,8 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } +printf "%s\n" "#define Py_HAVE_PANELW 1" >>confdefs.h + printf "%s\n" "#define HAVE_PANELW 1" >>confdefs.h have_panel=yes @@ -27935,6 +28093,8 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } +printf "%s\n" "#define Py_HAVE_NCURSES 1" >>confdefs.h + printf "%s\n" "#define HAVE_NCURSES 1" >>confdefs.h have_curses=yes @@ -28008,6 +28168,8 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } +printf "%s\n" "#define Py_HAVE_PANEL 1" >>confdefs.h + printf "%s\n" "#define HAVE_PANEL 1" >>confdefs.h have_panel=yes @@ -28327,6 +28489,8 @@ printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; } if test "$ac_cv_mvwdelch_is_expression" = yes then +printf "%s\n" "#define Py_MVWDELCH_IS_EXPRESSION 1" >>confdefs.h + printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h fi @@ -28383,6 +28547,8 @@ printf "%s\n" "$ac_cv_window_has_flags" >&6; } if test "$ac_cv_window_has_flags" = yes then +printf "%s\n" "#define Py_WINDOW_HAS_FLAGS 1" >>confdefs.h + printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h fi @@ -28443,6 +28609,8 @@ printf "%s\n" "$ac_cv_lib_curses_is_pad" >&6; } if test "x$ac_cv_lib_curses_is_pad" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_IS_PAD 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h fi @@ -28503,6 +28671,8 @@ printf "%s\n" "$ac_cv_lib_curses_is_term_resized" >&6; } if test "x$ac_cv_lib_curses_is_term_resized" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h fi @@ -28563,6 +28733,8 @@ printf "%s\n" "$ac_cv_lib_curses_resize_term" >&6; } if test "x$ac_cv_lib_curses_resize_term" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h fi @@ -28623,6 +28795,8 @@ printf "%s\n" "$ac_cv_lib_curses_resizeterm" >&6; } if test "x$ac_cv_lib_curses_resizeterm" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_RESIZETERM 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h fi @@ -28683,6 +28857,8 @@ printf "%s\n" "$ac_cv_lib_curses_immedok" >&6; } if test "x$ac_cv_lib_curses_immedok" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_IMMEDOK 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h fi @@ -28743,6 +28919,8 @@ printf "%s\n" "$ac_cv_lib_curses_syncok" >&6; } if test "x$ac_cv_lib_curses_syncok" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_SYNCOK 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h fi @@ -28803,6 +28981,8 @@ printf "%s\n" "$ac_cv_lib_curses_wchgat" >&6; } if test "x$ac_cv_lib_curses_wchgat" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_WCHGAT 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h fi @@ -28863,6 +29043,8 @@ printf "%s\n" "$ac_cv_lib_curses_filter" >&6; } if test "x$ac_cv_lib_curses_filter" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_FILTER 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h fi @@ -28923,6 +29105,8 @@ printf "%s\n" "$ac_cv_lib_curses_has_key" >&6; } if test "x$ac_cv_lib_curses_has_key" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_HAS_KEY 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h fi @@ -28983,6 +29167,8 @@ printf "%s\n" "$ac_cv_lib_curses_typeahead" >&6; } if test "x$ac_cv_lib_curses_typeahead" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h fi @@ -29043,6 +29229,8 @@ printf "%s\n" "$ac_cv_lib_curses_use_env" >&6; } if test "x$ac_cv_lib_curses_use_env" = xyes then : +printf "%s\n" "#define Py_HAVE_CURSES_USE_ENV 1" >>confdefs.h + printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h fi @@ -29106,6 +29294,8 @@ fi if test "x$ac_cv_file__dev_ptmx" = xyes; then +printf "%s\n" "#define Py_HAVE_DEV_PTMX 1" >>confdefs.h + printf "%s\n" "#define HAVE_DEV_PTMX 1" >>confdefs.h fi @@ -29133,6 +29323,8 @@ fi if test "x$ac_cv_file__dev_ptc" = xyes; then +printf "%s\n" "#define Py_HAVE_DEV_PTC 1" >>confdefs.h + printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h fi @@ -29209,6 +29401,8 @@ printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; } if test "$ac_cv_broken_mbstowcs" = yes then +printf "%s\n" "#define Py_HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h fi @@ -29224,6 +29418,8 @@ then : if test "$withval" = yes then +printf "%s\n" "#define Py_USE_COMPUTED_GOTOS 1" >>confdefs.h + printf "%s\n" "#define USE_COMPUTED_GOTOS 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -29232,6 +29428,8 @@ fi if test "$withval" = no then +printf "%s\n" "#define Py_USE_COMPUTED_GOTOS 0" >>confdefs.h + printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -29292,6 +29490,8 @@ fi printf "%s\n" "$ac_cv_computed_gotos" >&6; } case "$ac_cv_computed_gotos" in yes*) +printf "%s\n" "#define Py_HAVE_COMPUTED_GOTOS 1" >>confdefs.h + printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h esac @@ -29299,6 +29499,8 @@ esac case $ac_sys_system in AIX*) +printf "%s\n" "#define Py_HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h + printf "%s\n" "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h ;; esac @@ -29432,6 +29634,8 @@ CFLAGS="$saved_cflags" printf "%s\n" "$have_glibc_memmove_bug" >&6; } if test "$have_glibc_memmove_bug" = yes; then +printf "%s\n" "#define Py_HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h + printf "%s\n" "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h fi @@ -29487,6 +29691,8 @@ fi printf "%s\n" "$have_ipa_pure_const_bug" >&6; } if test "$have_ipa_pure_const_bug" = yes; then +printf "%s\n" "#define Py_HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h + printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h fi @@ -29573,6 +29779,8 @@ if test "x$ac_cv_dirent_d_type" = xyes then : +printf "%s\n" "#define Py_HAVE_DIRENT_D_TYPE 1" >>confdefs.h + printf "%s\n" "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h @@ -29625,6 +29833,8 @@ if test "x$ac_cv_getrandom_syscall" = xyes then : +printf "%s\n" "#define Py_HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h @@ -29676,6 +29886,8 @@ if test "x$ac_cv_func_getrandom" = xyes then : +printf "%s\n" "#define Py_HAVE_GETRANDOM 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h @@ -32126,6 +32338,8 @@ then : LIBHACL_SIMD128_FLAGS="-msse -msse2 -msse3 -msse4.1 -msse4.2" +printf "%s\n" "#define Py_HACL_CAN_COMPILE_SIMD128 1" >>confdefs.h + printf "%s\n" "#define HACL_CAN_COMPILE_SIMD128 1" >>confdefs.h @@ -32200,6 +32414,8 @@ then : LIBHACL_SIMD256_FLAGS="-mavx2" +printf "%s\n" "#define Py_HACL_CAN_COMPILE_SIMD256 1" >>confdefs.h + printf "%s\n" "#define HACL_CAN_COMPILE_SIMD256 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index d4609eeef4dcdb..ac58d214a8b146 100644 --- a/configure.ac +++ b/configure.ac @@ -1268,7 +1268,7 @@ if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then if test -z "$ANDROID_API_LEVEL"; then AC_MSG_ERROR([Fatal: you must define __ANDROID_API__]) fi - AC_DEFINE_UNQUOTED([ANDROID_API_LEVEL], [$ANDROID_API_LEVEL], + PY_DEFINE_UNQUOTED([ANDROID_API_LEVEL], [$ANDROID_API_LEVEL], [The Android API level.]) # For __android_log_write() in Python/pylifecycle.c. @@ -3036,7 +3036,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]) AS_VAR_IF([ac_cv_func_makedev], [yes], [ - AC_DEFINE([HAVE_MAKEDEV], [1], + PY_DEFINE([HAVE_MAKEDEV], [1], [Define this if you have the makedev macro.]) ]) @@ -3054,7 +3054,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]) AS_VAR_IF([ac_cv_func_le64toh], [yes], [ - AC_DEFINE([HAVE_HTOLE64], [1], + PY_DEFINE([HAVE_HTOLE64], [1], [Define this if you have le64toh()]) ]) @@ -3090,13 +3090,13 @@ EOF AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T -AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) +PY_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) AC_TYPE_SIZE_T AC_TYPE_UID_T AC_CHECK_TYPES([ssize_t]) AC_CHECK_TYPES([__uint128_t], - [AC_DEFINE([HAVE_GCC_UINT128_T], [1], + [PY_DEFINE([HAVE_GCC_UINT128_T], [1], [Define if your compiler provides __uint128_t])]) # Sizes and alignments of various common basic types @@ -3139,7 +3139,7 @@ AS_CASE([$ac_sys_system], [Emscripten], [have_largefile_support="no"] ) AS_VAR_IF([have_largefile_support], [yes], [ - AC_DEFINE([HAVE_LARGEFILE_SUPPORT], [1], + PY_DEFINE([HAVE_LARGEFILE_SUPPORT], [1], [Defined to enable large file support when an off_t is bigger than a long and long long is at least as big as an off_t. You may need to add some flags for configuration and compilation to enable this mode. @@ -3196,7 +3196,7 @@ else fi ]) AS_VAR_IF([ac_cv_pthread_key_t_is_arithmetic_type], [yes], [ - AC_DEFINE([PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT], [1], + PY_DEFINE([PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT], [1], [Define if pthread_key_t is compatible with int.]) ]) @@ -3208,7 +3208,7 @@ then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" # -F. is needed to allow linking to the framework while # in the build location. - AC_DEFINE([WITH_NEXT_FRAMEWORK], [1], + PY_DEFINE([WITH_NEXT_FRAMEWORK], [1], [Define if you want to produce an OpenStep/Rhapsody framework (shared library plus accessory files).]) AC_MSG_RESULT([yes]) @@ -3254,7 +3254,7 @@ fi AC_MSG_CHECKING([for dyld]) case $ac_sys_system/$ac_sys_release in Darwin/*) - AC_DEFINE([WITH_DYLD], [1], + PY_DEFINE([WITH_DYLD], [1], [Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). Dyld is necessary to support frameworks.]) @@ -3569,7 +3569,7 @@ then stack_size="4000000" # 64 MB fi - AC_DEFINE_UNQUOTED([THREAD_STACK_SIZE], + PY_DEFINE_UNQUOTED([THREAD_STACK_SIZE], [0x$stack_size], [Custom thread stack size depending on chosen sanitizer runtimes.]) @@ -3753,7 +3753,7 @@ AC_SEARCH_LIBS([sem_init], [pthread rt posix4]) # check if we need libintl for locale functions AC_CHECK_LIB([intl], [textdomain], - [AC_DEFINE([WITH_LIBINTL], [1], + [PY_DEFINE([WITH_LIBINTL], [1], [Define to 1 if libintl is needed for locale functions.]) LIBS="-lintl $LIBS"]) @@ -3840,7 +3840,7 @@ else fi]) ]) if test "$ac_cv_aligned_required" = yes ; then - AC_DEFINE([HAVE_ALIGNED_REQUIRED], [1], + PY_DEFINE([HAVE_ALIGNED_REQUIRED], [1], [Define if aligned memory access is required]) fi @@ -4415,7 +4415,7 @@ AC_CACHE_VAL([ac_cv_header_gdbm_slash_ndbm_h], [ ) ]) AS_VAR_IF([ac_cv_header_gdbm_slash_ndbm_h], [yes], [ - AC_DEFINE([HAVE_GDBM_NDBM_H], [1], [Define to 1 if you have the header file.]) + PY_DEFINE([HAVE_GDBM_NDBM_H], [1], [Define to 1 if you have the header file.]) ]) AS_UNSET([ac_cv_header_gdbm_ndbm_h]) @@ -4426,7 +4426,7 @@ AC_CACHE_VAL([ac_cv_header_gdbm_dash_ndbm_h], [ ) ]) AS_VAR_IF([ac_cv_header_gdbm_dash_ndbm_h], [yes], [ - AC_DEFINE([HAVE_GDBM_DASH_NDBM_H], [1], [Define to 1 if you have the header file.]) + PY_DEFINE([HAVE_GDBM_DASH_NDBM_H], [1], [Define to 1 if you have the header file.]) ]) AS_UNSET([ac_cv_header_gdbm_ndbm_h]) @@ -4454,7 +4454,7 @@ AC_CHECK_HEADERS([db.h], [ ]) ]) AS_VAR_IF([ac_cv_have_libdb], [yes], [ - AC_DEFINE([HAVE_LIBDB], [1], [Define to 1 if you have the `db' library (-ldb).]) + PY_DEFINE([HAVE_LIBDB], [1], [Define to 1 if you have the `db' library (-ldb).]) ]) ]) @@ -4626,16 +4626,16 @@ if test "$posix_threads" = "yes"; then # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. case $ac_sys_system/$ac_sys_release in - SunOS/5.6) AC_DEFINE([HAVE_PTHREAD_DESTRUCTOR], [1], + SunOS/5.6) PY_DEFINE([HAVE_PTHREAD_DESTRUCTOR], [1], [Defined for Solaris 2.6 bug in pthread header.]) ;; - SunOS/5.8) AC_DEFINE([HAVE_BROKEN_POSIX_SEMAPHORES], [1], + SunOS/5.8) PY_DEFINE([HAVE_BROKEN_POSIX_SEMAPHORES], [1], [Define if the Posix semaphores do not work on your system]) ;; - AIX/*) AC_DEFINE([HAVE_BROKEN_POSIX_SEMAPHORES], [1], + AIX/*) PY_DEFINE([HAVE_BROKEN_POSIX_SEMAPHORES], [1], [Define if the Posix semaphores do not work on your system]) ;; - NetBSD/*) AC_DEFINE([HAVE_BROKEN_POSIX_SEMAPHORES], [1], + NetBSD/*) PY_DEFINE([HAVE_BROKEN_POSIX_SEMAPHORES], [1], [Define if the Posix semaphores do not work on your system]) ;; esac @@ -4660,13 +4660,13 @@ if test "$posix_threads" = "yes"; then [ac_cv_pthread_system_supported=no]) ]) if test "$ac_cv_pthread_system_supported" = "yes"; then - AC_DEFINE([PTHREAD_SYSTEM_SCHED_SUPPORTED], [1], + PY_DEFINE([PTHREAD_SYSTEM_SCHED_SUPPORTED], [1], [Defined if PTHREAD_SCOPE_SYSTEM supported.]) fi AC_CHECK_FUNCS([pthread_sigmask], [case $ac_sys_system in CYGWIN*) - AC_DEFINE([HAVE_BROKEN_PTHREAD_SIGMASK], [1], + PY_DEFINE([HAVE_BROKEN_PTHREAD_SIGMASK], [1], [Define if pthread_sigmask() does not work on your system.]) ;; esac]) @@ -4674,7 +4674,7 @@ if test "$posix_threads" = "yes"; then fi AS_VAR_IF([posix_threads], [stub], [ - AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support]) + PY_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support]) ]) # Check for enable-ipv6 @@ -4832,7 +4832,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_FD_FRAMES available check */ [ac_cv_can_raw_fd_frames=no]) ]) AS_VAR_IF([ac_cv_can_raw_fd_frames], [yes], [ - AC_DEFINE([HAVE_LINUX_CAN_RAW_FD_FRAMES], [1], + PY_DEFINE([HAVE_LINUX_CAN_RAW_FD_FRAMES], [1], [Define if compiling using Linux 3.6 or later.]) ]) @@ -4844,7 +4844,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [ac_cv_can_raw_join_filters=no]) ]) AS_VAR_IF([ac_cv_can_raw_join_filters], [yes], [ - AC_DEFINE([HAVE_LINUX_CAN_RAW_JOIN_FILTERS], [1], + PY_DEFINE([HAVE_LINUX_CAN_RAW_JOIN_FILTERS], [1], [Define if compiling using Linux 4.1 or later.]) ]) @@ -4859,7 +4859,7 @@ then with_doc_strings="yes" fi if test "$with_doc_strings" != "no" then - AC_DEFINE([WITH_DOC_STRINGS], [1], + PY_DEFINE([WITH_DOC_STRINGS], [1], [Define if you want documentation strings in extension modules]) fi AC_MSG_RESULT([$with_doc_strings]) @@ -4883,7 +4883,7 @@ AC_LINK_IFELSE( ]) AS_VAR_IF([ac_cv_header_stdatomic_h], [yes], [ - AC_DEFINE(HAVE_STD_ATOMIC, 1, + PY_DEFINE(HAVE_STD_ATOMIC, 1, [Has stdatomic.h with atomic_int and atomic_uintptr_t]) ]) @@ -4903,7 +4903,7 @@ AC_LINK_IFELSE( ]) AS_VAR_IF([ac_cv_builtin_atomic], [yes], [ - AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin __atomic_load_n() and __atomic_store_n() functions]) + PY_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin __atomic_load_n() and __atomic_store_n() functions]) ]) # --with-mimalloc @@ -4921,7 +4921,7 @@ if test "$with_mimalloc" != no; then AC_MSG_ERROR([mimalloc requires stdatomic.h, use --without-mimalloc to disable mimalloc.]) fi with_mimalloc=yes - AC_DEFINE([WITH_MIMALLOC], [1], [Define if you want to compile in mimalloc memory allocator.]) + PY_DEFINE([WITH_MIMALLOC], [1], [Define if you want to compile in mimalloc memory allocator.]) AC_SUBST([MIMALLOC_HEADERS], ['$(MIMALLOC_HEADERS)']) elif test "$disable_gil" = "yes"; then AC_MSG_ERROR([--disable-gil requires mimalloc memory allocator (--with-mimalloc).]) @@ -4948,7 +4948,7 @@ then fi if test "$with_pymalloc" != "no" then - AC_DEFINE([WITH_PYMALLOC], [1], + PY_DEFINE([WITH_PYMALLOC], [1], [Define if you want to compile in Python-specific mallocs]) fi AC_MSG_RESULT([$with_pymalloc]) @@ -4980,7 +4980,7 @@ AC_ARG_WITH( AC_MSG_RESULT([$with_valgrind]) if test "$with_valgrind" != no; then AC_CHECK_HEADER([valgrind/valgrind.h], - [AC_DEFINE([WITH_VALGRIND], 1, [Define if you want pymalloc to be disabled when running under valgrind])], + [PY_DEFINE([WITH_VALGRIND], 1, [Define if you want pymalloc to be disabled when running under valgrind])], [AC_MSG_ERROR([Valgrind support requested but headers not available])] ) OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" @@ -5008,7 +5008,7 @@ then if test "$DTRACE" = "not found"; then AC_MSG_ERROR([dtrace command not found on \$PATH]) fi - AC_DEFINE([WITH_DTRACE], [1], + PY_DEFINE([WITH_DTRACE], [1], [Define if you want to compile in DTrace support]) DTRACE_HEADERS="Include/pydtrace_probes.h" @@ -5070,7 +5070,7 @@ fi AC_MSG_RESULT([$DYNLOADFILE]) if test "$DYNLOADFILE" != "dynload_stub.o" then - AC_DEFINE([HAVE_DYNAMIC_LOADING], [1], + PY_DEFINE([HAVE_DYNAMIC_LOADING], [1], [Defined when any dynamic module loading is enabled.]) fi @@ -5161,7 +5161,7 @@ if test "$ac_sys_system" != "iOS" ; then fi AC_CHECK_DECL([dirfd], - [AC_DEFINE([HAVE_DIRFD], [1], + [PY_DEFINE([HAVE_DIRFD], [1], [Define if you have the 'dirfd' function or macro.])], [], [@%:@include @@ -5245,7 +5245,7 @@ AC_CACHE_CHECK([for broken unsetenv], [ac_cv_broken_unsetenv], ) ]) AS_VAR_IF([ac_cv_broken_unsetenv], [yes], [ - AC_DEFINE([HAVE_BROKEN_UNSETENV], [1], + PY_DEFINE([HAVE_BROKEN_UNSETENV], [1], [Define if 'unsetenv' does not return an int.]) ]) @@ -5282,7 +5282,7 @@ if test "$ac_cv_have_chflags" = cross ; then AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"]) fi if test "$ac_cv_have_chflags" = yes ; then - AC_DEFINE([HAVE_CHFLAGS], [1], + PY_DEFINE([HAVE_CHFLAGS], [1], [Define to 1 if you have the 'chflags' function.]) fi @@ -5302,7 +5302,7 @@ if test "$ac_cv_have_lchflags" = cross ; then AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"]) fi if test "$ac_cv_have_lchflags" = yes ; then - AC_DEFINE([HAVE_LCHFLAGS], [1], + PY_DEFINE([HAVE_LCHFLAGS], [1], [Define to 1 if you have the 'lchflags' function.]) fi @@ -5418,7 +5418,7 @@ AC_CHECK_FUNCS([openpty], [], [AC_CHECK_LIB([bsd], [openpty], [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lbsd"])])]) AC_SEARCH_LIBS([login_tty], [util], - [AC_DEFINE([HAVE_LOGIN_TTY], [1], [Define to 1 if you have the `login_tty' function.])] + [PY_DEFINE([HAVE_LOGIN_TTY], [1], [Define to 1 if you have the `login_tty' function.])] ) AC_CHECK_FUNCS([forkpty], [], [AC_CHECK_LIB([util], [forkpty], @@ -5434,14 +5434,14 @@ AC_CHECK_FUNCS([getpgrp], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([@%:@include ], [getpgrp(0);])], - [AC_DEFINE([GETPGRP_HAVE_ARG], [1], + [PY_DEFINE([GETPGRP_HAVE_ARG], [1], [Define if getpgrp() must be called as getpgrp(0).])], [])]) AC_CHECK_FUNCS([setpgrp], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([@%:@include ], [setpgrp(0,0);])], - [AC_DEFINE([SETPGRP_HAVE_ARG], [1], + [PY_DEFINE([SETPGRP_HAVE_ARG], [1], [Define if setpgrp() must be called as setpgrp(0, 0).])], [])]) @@ -5452,7 +5452,7 @@ AC_CHECK_FUNCS([clock_gettime], [], [ AC_CHECK_LIB([rt], [clock_gettime], [ LIBS="$LIBS -lrt" AC_DEFINE([HAVE_CLOCK_GETTIME], [1]) - AC_DEFINE([TIMEMODULE_LIB], [rt], + PY_DEFINE([TIMEMODULE_LIB], [rt], [Library needed by timemodule.c: librt may be needed for clock_gettime()]) ]) ]) @@ -5507,12 +5507,12 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]])],[ac_cv_device_macros=yes], [ac_cv_device_macros=no]) ]) AS_VAR_IF([ac_cv_device_macros], [yes], [ - AC_DEFINE([HAVE_DEVICE_MACROS], [1], + PY_DEFINE([HAVE_DEVICE_MACROS], [1], [Define to 1 if you have the device macros.]) ]) dnl no longer used, now always defined for backwards compatibility -AC_DEFINE([SYS_SELECT_WITH_SYS_TIME], [1], +PY_DEFINE([SYS_SELECT_WITH_SYS_TIME], [1], [Define if you can safely include both and (which you can't on SCO ODT 3.0).]) @@ -5644,7 +5644,7 @@ then ])]) ]) else - AC_DEFINE([HAVE_GETADDRINFO], [1], + PY_DEFINE([HAVE_GETADDRINFO], [1], [Define if you have the getaddrinfo function.]) fi @@ -5672,7 +5672,7 @@ AC_CACHE_CHECK([for time.h that defines altzone], [ac_cv_header_time_altzone], [ [ac_cv_header_time_altzone=no]) ]) if test $ac_cv_header_time_altzone = yes; then - AC_DEFINE([HAVE_ALTZONE], [1], + PY_DEFINE([HAVE_ALTZONE], [1], [Define this if your time.h defines altzone.]) fi @@ -5681,7 +5681,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[struct addrinfo [ac_cv_struct_addrinfo=yes], [ac_cv_struct_addrinfo=no])) if test $ac_cv_struct_addrinfo = yes; then - AC_DEFINE([HAVE_ADDRINFO], [1], [struct addrinfo (netdb.h)]) + PY_DEFINE([HAVE_ADDRINFO], [1], [struct addrinfo (netdb.h)]) fi AC_CACHE_CHECK([for sockaddr_storage], [ac_cv_struct_sockaddr_storage], @@ -5691,7 +5691,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [ac_cv_struct_sockaddr_storage=yes], [ac_cv_struct_sockaddr_storage=no])) if test $ac_cv_struct_sockaddr_storage = yes; then - AC_DEFINE([HAVE_SOCKADDR_STORAGE], [1], + PY_DEFINE([HAVE_SOCKADDR_STORAGE], [1], [struct sockaddr_storage (sys/socket.h)]) fi @@ -5703,7 +5703,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [ac_cv_struct_sockaddr_alg=yes], [ac_cv_struct_sockaddr_alg=no])) if test $ac_cv_struct_sockaddr_alg = yes; then - AC_DEFINE([HAVE_SOCKADDR_ALG], [1], + PY_DEFINE([HAVE_SOCKADDR_ALG], [1], [struct sockaddr_alg (linux/if_alg.h)]) fi @@ -5724,7 +5724,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return fo [ac_cv_function_prototypes=yes], [ac_cv_function_prototypes=no]) ]) AS_VAR_IF([ac_cv_function_prototypes], [yes], [ - AC_DEFINE([HAVE_PROTOTYPES], [1], + PY_DEFINE([HAVE_PROTOTYPES], [1], [Define if your compiler supports function prototype]) ]) @@ -5743,7 +5743,7 @@ x.sa_len = 0;]])], [ac_cv_struct_sockaddr_sa_len=yes], [ac_cv_struct_sockaddr_sa_len=no]) ]) AS_VAR_IF([ac_cv_struct_sockaddr_sa_len], [yes], [ - AC_DEFINE([HAVE_SOCKADDR_SA_LEN], [1], + PY_DEFINE([HAVE_SOCKADDR_SA_LEN], [1], [Define if sockaddr has sa_len member]) ]) @@ -5879,7 +5879,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ ]) AS_VAR_IF([ac_cv_gcc_asm_for_x64], [yes], [ - AC_DEFINE([HAVE_GCC_ASM_FOR_X64], [1], + PY_DEFINE([HAVE_GCC_ASM_FOR_X64], [1], [Define if we can use x64 gcc inline assembler]) ]) @@ -5888,10 +5888,10 @@ AS_VAR_IF([ac_cv_gcc_asm_for_x64], [yes], [ # ************************************************** AX_C_FLOAT_WORDS_BIGENDIAN( - [AC_DEFINE([DOUBLE_IS_BIG_ENDIAN_IEEE754], [1], + [PY_DEFINE([DOUBLE_IS_BIG_ENDIAN_IEEE754], [1], [Define if C doubles are 64-bit IEEE 754 binary format, stored with the most significant byte first])], - [AC_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1], + [PY_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1], [Define if C doubles are 64-bit IEEE 754 binary format, stored with the least significant byte first])], [AS_CASE([$host_cpu], @@ -5901,7 +5901,7 @@ AX_C_FLOAT_WORDS_BIGENDIAN( # least make sure that float <-> string conversions work. # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, # but if it's not big or little, then it must be this? - AC_DEFINE([DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754], [1], + PY_DEFINE([DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754], [1], [Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM mixed-endian order (byte order 45670123)])], [AC_MSG_ERROR([m4_normalize([ @@ -5928,7 +5928,7 @@ AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[ ]])],[ac_cv_gcc_asm_for_x87=yes],[ac_cv_gcc_asm_for_x87=no]) ]) AS_VAR_IF([ac_cv_gcc_asm_for_x87], [yes], [ - AC_DEFINE([HAVE_GCC_ASM_FOR_X87], [1], + PY_DEFINE([HAVE_GCC_ASM_FOR_X87], [1], [Define if we can use gcc inline assembler to get and set x87 control word]) ]) @@ -5940,7 +5940,7 @@ AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[ ]])],[ac_cv_gcc_asm_for_mc68881=yes],[ac_cv_gcc_asm_for_mc68881=no]) ]) AS_VAR_IF([ac_cv_gcc_asm_for_mc68881], [yes], [ - AC_DEFINE([HAVE_GCC_ASM_FOR_MC68881], [1], + PY_DEFINE([HAVE_GCC_ASM_FOR_MC68881], [1], [Define if we can use gcc inline assembler to get and set mc68881 fpcr]) ]) @@ -5980,7 +5980,7 @@ CC="$ac_save_cc" ]) AS_VAR_IF([ac_cv_x87_double_rounding], [yes], [ - AC_DEFINE([X87_DOUBLE_ROUNDING], [1], + PY_DEFINE([X87_DOUBLE_ROUNDING], [1], [Define if arithmetic is subject to x87-style double rounding issue]) ]) @@ -6029,7 +6029,7 @@ AC_CACHE_CHECK([whether POSIX semaphores are enabled], [ac_cv_posix_semaphores_e [ac_cv_posix_semaphores_enabled=yes]) ) AS_VAR_IF([ac_cv_posix_semaphores_enabled], [no], [ - AC_DEFINE( + PY_DEFINE( [POSIX_SEMAPHORES_NOT_ENABLED], [1], [Define if POSIX semaphores aren't enabled on your system] ) @@ -6066,7 +6066,7 @@ AC_CACHE_CHECK([for broken sem_getvalue], [ac_cv_broken_sem_getvalue], [ac_cv_broken_sem_getvalue=yes]) ) AS_VAR_IF([ac_cv_broken_sem_getvalue], [yes], [ - AC_DEFINE( + PY_DEFINE( [HAVE_BROKEN_SEM_GETVALUE], [1], [define to 1 if your sem_getvalue is broken.] ) @@ -6096,7 +6096,7 @@ AC_DEFINE_UNQUOTED([PYLONG_BITS_IN_DIGIT], [$enable_big_digits], # check for wchar.h AC_CHECK_HEADER([wchar.h], [ - AC_DEFINE([HAVE_WCHAR_H], [1], + PY_DEFINE([HAVE_WCHAR_H], [1], [Define if the compiler provides a wchar.h header file.]) wchar_h="yes" ], @@ -6134,7 +6134,7 @@ AC_MSG_CHECKING([whether wchar_t is usable]) if test "$ac_cv_sizeof_wchar_t" -ge 2 \ -a "$ac_cv_wchar_t_signed" = "no" then - AC_DEFINE([HAVE_USABLE_WCHAR_T], [1], + PY_DEFINE([HAVE_USABLE_WCHAR_T], [1], [Define if you have a useable wchar_t type defined in wchar.h; useable means wchar_t must be an unsigned type with at least 16 bits. (see Include/unicodeobject.h).]) @@ -6151,7 +6151,7 @@ SunOS/*) # 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 - AC_DEFINE([HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION], [1], + PY_DEFINE([HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION], [1], [Define if the internal form of wchar_t in non-Unicode locales is not Unicode.]) fi @@ -6191,7 +6191,7 @@ if test "$Py_DEBUG" = 'true'; then # Similar to SOABI but remove "d" flag from ABIFLAGS AC_SUBST([ALT_SOABI]) ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM} - AC_DEFINE_UNQUOTED([ALT_SOABI], ["${ALT_SOABI}"], + PY_DEFINE_UNQUOTED([ALT_SOABI], ["${ALT_SOABI}"], [Alternative SOABI used in debug build to load C extensions built in release mode]) fi @@ -6296,7 +6296,7 @@ int main(void) [ac_cv_rshift_extends_sign=yes])]) if test "$ac_cv_rshift_extends_sign" = no then - AC_DEFINE([SIGNED_RIGHT_SHIFT_ZERO_FILLS], [1], + PY_DEFINE([SIGNED_RIGHT_SHIFT_ZERO_FILLS], [1], [Define if i>>j for signed int i does not extend the sign bit when i < 0]) fi @@ -6311,7 +6311,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[ ]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])]) if test "$ac_cv_have_getc_unlocked" = yes then - AC_DEFINE([HAVE_GETC_UNLOCKED], [1], + PY_DEFINE([HAVE_GETC_UNLOCKED], [1], [Define this if you have flockfile(), getc_unlocked(), and funlockfile()]) fi @@ -6411,11 +6411,11 @@ AS_VAR_IF([with_readline], [no], [ # check for readline 2.2 AC_CHECK_DECL([rl_completion_append_character], [ - AC_DEFINE([HAVE_RL_COMPLETION_APPEND_CHARACTER], [1], [Define if you have readline 2.2]) + PY_DEFINE([HAVE_RL_COMPLETION_APPEND_CHARACTER], [1], [Define if you have readline 2.2]) ], [], [readline_includes]) AC_CHECK_DECL([rl_completion_suppress_append], [ - AC_DEFINE([HAVE_RL_COMPLETION_SUPPRESS_APPEND], [1], [Define if you have rl_completion_suppress_append]) + PY_DEFINE([HAVE_RL_COMPLETION_SUPPRESS_APPEND], [1], [Define if you have rl_completion_suppress_append]) ], [], [readline_includes]) # check for readline 4.0 @@ -6426,7 +6426,7 @@ AS_VAR_IF([with_readline], [no], [ ) ]) AS_VAR_IF([ac_cv_readline_rl_pre_input_hook], [yes], [ - AC_DEFINE([HAVE_RL_PRE_INPUT_HOOK], [1], [Define if you have readline 4.0]) + PY_DEFINE([HAVE_RL_PRE_INPUT_HOOK], [1], [Define if you have readline 4.0]) ]) # also in 4.0 @@ -6437,7 +6437,7 @@ AS_VAR_IF([with_readline], [no], [ ) ]) AS_VAR_IF([ac_cv_readline_rl_completion_display_matches_hook], [yes], [ - AC_DEFINE([HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK], [1], [Define if you have readline 4.0]) + PY_DEFINE([HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK], [1], [Define if you have readline 4.0]) ]) # also in 4.0, but not in editline @@ -6448,7 +6448,7 @@ AS_VAR_IF([with_readline], [no], [ ) ]) AS_VAR_IF([ac_cv_readline_rl_resize_terminal], [yes], [ - AC_DEFINE([HAVE_RL_RESIZE_TERMINAL], [1], [Define if you have readline 4.0]) + PY_DEFINE([HAVE_RL_RESIZE_TERMINAL], [1], [Define if you have readline 4.0]) ]) # check for readline 4.2 @@ -6459,12 +6459,12 @@ AS_VAR_IF([with_readline], [no], [ ) ]) AS_VAR_IF([ac_cv_readline_rl_completion_matches], [yes], [ - AC_DEFINE([HAVE_RL_COMPLETION_MATCHES], [1], [Define if you have readline 4.2]) + PY_DEFINE([HAVE_RL_COMPLETION_MATCHES], [1], [Define if you have readline 4.2]) ]) # also in readline 4.2 AC_CHECK_DECL([rl_catch_signals], [ - AC_DEFINE([HAVE_RL_CATCH_SIGNAL], [1], [Define if you can turn off readline's signal handling.]) + PY_DEFINE([HAVE_RL_CATCH_SIGNAL], [1], [Define if you can turn off readline's signal handling.]) ], [], [readline_includes]) AC_CACHE_CHECK([for append_history in -l$LIBREADLINE], [ac_cv_readline_append_history], [ @@ -6474,7 +6474,7 @@ AS_VAR_IF([with_readline], [no], [ ) ]) AS_VAR_IF([ac_cv_readline_append_history], [yes], [ - AC_DEFINE([HAVE_RL_APPEND_HISTORY], [1], [Define if readline supports append_history]) + PY_DEFINE([HAVE_RL_APPEND_HISTORY], [1], [Define if readline supports append_history]) ]) # in readline as well as newer editline (April 2023) @@ -6516,7 +6516,7 @@ int main(void) [ac_cv_broken_nice=no])]) if test "$ac_cv_broken_nice" = yes then - AC_DEFINE([HAVE_BROKEN_NICE], [1], + PY_DEFINE([HAVE_BROKEN_NICE], [1], [Define if nice() returns success/failure instead of the new priority.]) fi @@ -6546,7 +6546,7 @@ int main(void) [ac_cv_broken_poll=no])) if test "$ac_cv_broken_poll" = yes then - AC_DEFINE([HAVE_BROKEN_POLL], [1], + PY_DEFINE([HAVE_BROKEN_POLL], [1], [Define if poll() sets errno on invalid file descriptors.]) fi @@ -6621,7 +6621,7 @@ int main(void) [ac_cv_working_tzset=no])]) if test "$ac_cv_working_tzset" = yes then - AC_DEFINE([HAVE_WORKING_TZSET], [1], + PY_DEFINE([HAVE_WORKING_TZSET], [1], [Define if tzset() actually switches the local timezone in a meaningful way.]) fi @@ -6635,7 +6635,7 @@ st.st_mtim.tv_nsec = 1; [ac_cv_stat_tv_nsec=no])) if test "$ac_cv_stat_tv_nsec" = yes then - AC_DEFINE([HAVE_STAT_TV_NSEC], [1], + PY_DEFINE([HAVE_STAT_TV_NSEC], [1], [Define if you have struct stat.st_mtim.tv_nsec]) fi @@ -6649,7 +6649,7 @@ st.st_mtimespec.tv_nsec = 1; [ac_cv_stat_tv_nsec2=no])) if test "$ac_cv_stat_tv_nsec2" = yes then - AC_DEFINE([HAVE_STAT_TV_NSEC2], [1], + PY_DEFINE([HAVE_STAT_TV_NSEC2], [1], [Define if you have struct stat.st_mtimensec]) fi @@ -6720,10 +6720,10 @@ AC_DEFUN([PY_CHECK_CURSES], [dnl AS_VAR_PUSHDEF([curses_var], [m4_toupper([$1])]) AS_VAR_PUSHDEF([panel_var], [m4_toupper([$2])]) PKG_CHECK_MODULES([CURSES], [$1], - [AC_DEFINE([HAVE_]curses_var, [1], [Define if you have the '$1' library]) + [PY_DEFINE([HAVE_]curses_var, [1], [Define if you have the '$1' library]) AS_VAR_SET([have_curses], [yes]) PKG_CHECK_MODULES([PANEL], [$2], - [AC_DEFINE([HAVE_]panel_var, [1], [Define if you have the '$2' library]) + [PY_DEFINE([HAVE_]panel_var, [1], [Define if you have the '$2' library]) AS_VAR_SET([have_panel], [yes])], [AS_VAR_SET([have_panel], [no])])], [AS_VAR_SET([have_curses], [no])]) @@ -6814,7 +6814,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(_CURSES_INCLUDES, [[ if test "$ac_cv_mvwdelch_is_expression" = yes then - AC_DEFINE([MVWDELCH_IS_EXPRESSION], [1], + PY_DEFINE([MVWDELCH_IS_EXPRESSION], [1], [Define if mvwdelch in curses.h is an expression.]) fi @@ -6829,7 +6829,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(_CURSES_INCLUDES, [[ if test "$ac_cv_window_has_flags" = yes then - AC_DEFINE([WINDOW_HAS_FLAGS], [1], + PY_DEFINE([WINDOW_HAS_FLAGS], [1], [Define if WINDOW in curses.h offers a field _flags.]) fi @@ -6852,7 +6852,7 @@ AC_DEFUN([PY_CHECK_CURSES_FUNC], AS_VAR_IF( [py_var], [yes], - [AC_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) + [PY_DEFINE(py_define, [1], [Define if you have the '$1' function.])]) AS_VAR_POPDEF([py_var]) AS_VAR_POPDEF([py_define]) ]) @@ -6896,12 +6896,12 @@ else AC_CHECK_FILE([/dev/ptmx], [], []) if test "x$ac_cv_file__dev_ptmx" = xyes; then - AC_DEFINE([HAVE_DEV_PTMX], [1], + PY_DEFINE([HAVE_DEV_PTMX], [1], [Define to 1 if you have the /dev/ptmx device file.]) fi AC_CHECK_FILE([/dev/ptc], [], []) if test "x$ac_cv_file__dev_ptc" = xyes; then - AC_DEFINE([HAVE_DEV_PTC], [1], + PY_DEFINE([HAVE_DEV_PTC], [1], [Define to 1 if you have the /dev/ptc device file.]) fi fi @@ -6939,7 +6939,7 @@ int main(void) { [ac_cv_broken_mbstowcs=no])) if test "$ac_cv_broken_mbstowcs" = yes then - AC_DEFINE([HAVE_BROKEN_MBSTOWCS], [1], + PY_DEFINE([HAVE_BROKEN_MBSTOWCS], [1], [Define if mbstowcs(NULL, "text", 0) does not return the number of wide chars that would be converted.]) fi @@ -6955,13 +6955,13 @@ AC_ARG_WITH( [ if test "$withval" = yes then - AC_DEFINE([USE_COMPUTED_GOTOS], [1], + PY_DEFINE([USE_COMPUTED_GOTOS], [1], [Define if you want to use computed gotos in ceval.c.]) AC_MSG_RESULT([yes]) fi if test "$withval" = no then - AC_DEFINE([USE_COMPUTED_GOTOS], [0], + PY_DEFINE([USE_COMPUTED_GOTOS], [0], [Define if you want to use computed gotos in ceval.c.]) AC_MSG_RESULT([no]) fi @@ -6989,13 +6989,13 @@ LABEL2: ac_cv_computed_gotos=no fi])) case "$ac_cv_computed_gotos" in yes*) - AC_DEFINE([HAVE_COMPUTED_GOTOS], [1], + PY_DEFINE([HAVE_COMPUTED_GOTOS], [1], [Define if the C compiler supports computed gotos.]) esac case $ac_sys_system in AIX*) - AC_DEFINE([HAVE_BROKEN_PIPE_BUF], [1], + PY_DEFINE([HAVE_BROKEN_PIPE_BUF], [1], [Define if the system reports an invalid PIPE_BUF value.]) ;; esac @@ -7079,7 +7079,7 @@ int main(void) { CFLAGS="$saved_cflags" AC_MSG_RESULT([$have_glibc_memmove_bug]) if test "$have_glibc_memmove_bug" = yes; then - AC_DEFINE([HAVE_GLIBC_MEMMOVE_BUG], [1], + PY_DEFINE([HAVE_GLIBC_MEMMOVE_BUG], [1], [Define if glibc has incorrect _FORTIFY_SOURCE wrappers for memmove and bcopy.]) fi @@ -7116,7 +7116,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then CFLAGS="$saved_cflags" AC_MSG_RESULT([$have_ipa_pure_const_bug]) if test "$have_ipa_pure_const_bug" = yes; then - AC_DEFINE([HAVE_IPA_PURE_CONST_BUG], [1], + PY_DEFINE([HAVE_IPA_PURE_CONST_BUG], [1], [Define if gcc has the ipa-pure-const bug.]) fi ;; @@ -7161,7 +7161,7 @@ AC_LINK_IFELSE( ]) AS_VAR_IF([ac_cv_dirent_d_type], [yes], [ - AC_DEFINE([HAVE_DIRENT_D_TYPE], [1], + PY_DEFINE([HAVE_DIRENT_D_TYPE], [1], [Define to 1 if the dirent structure has a d_type field]) ]) @@ -7188,7 +7188,7 @@ AC_LINK_IFELSE( ]) AS_VAR_IF([ac_cv_getrandom_syscall], [yes], [ - AC_DEFINE([HAVE_GETRANDOM_SYSCALL], [1], + PY_DEFINE([HAVE_GETRANDOM_SYSCALL], [1], [Define to 1 if the Linux getrandom() syscall is available]) ]) @@ -7214,7 +7214,7 @@ AC_LINK_IFELSE( ]) AS_VAR_IF([ac_cv_func_getrandom], [yes], [ - AC_DEFINE([HAVE_GETRANDOM], [1], + PY_DEFINE([HAVE_GETRANDOM], [1], [Define to 1 if the getrandom() function is available]) ]) @@ -7809,7 +7809,7 @@ if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || tes AX_CHECK_COMPILE_FLAG([-msse -msse2 -msse3 -msse4.1 -msse4.2],[ [LIBHACL_SIMD128_FLAGS="-msse -msse2 -msse3 -msse4.1 -msse4.2"] - AC_DEFINE([HACL_CAN_COMPILE_SIMD128], [1], [HACL* library can compile SIMD128 implementations]) + PY_DEFINE([HACL_CAN_COMPILE_SIMD128], [1], [HACL* library can compile SIMD128 implementations]) # macOS universal2 builds *support* the -msse etc flags because they're # available on x86_64. However, performance of the HACL SIMD128 implementation @@ -7838,7 +7838,7 @@ AC_SUBST([LIBHACL_SIMD128_OBJS]) if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then AX_CHECK_COMPILE_FLAG([-mavx2],[ [LIBHACL_SIMD256_FLAGS="-mavx2"] - AC_DEFINE([HACL_CAN_COMPILE_SIMD256], [1], [HACL* library can compile SIMD256 implementations]) + PY_DEFINE([HACL_CAN_COMPILE_SIMD256], [1], [HACL* library can compile SIMD256 implementations]) # macOS universal2 builds *support* the -mavx2 compiler flag because it's # available on x86_64; but the HACL SIMD256 build then fails because the diff --git a/pyconfig.h.in b/pyconfig.h.in index e938a42aa80cda..3c063285b206c2 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1687,18 +1687,46 @@ /* PEP 11 Support tier (1, 2, 3 or 0 for unsupported) */ #undef PY_SUPPORT_TIER +/* Alternative SOABI used in debug build to load C extensions built in release + mode */ +#undef Py_ALT_SOABI + +/* The Android API level. */ +#undef Py_ANDROID_API_LEVEL + /* Define if you want to build an interpreter with many run-time checks. */ #undef Py_DEBUG +/* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM + mixed-endian order (byte order 45670123) */ +#undef Py_DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 + +/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the most + significant byte first */ +#undef Py_DOUBLE_IS_BIG_ENDIAN_IEEE754 + +/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the + least significant byte first */ +#undef Py_DOUBLE_IS_LITTLE_ENDIAN_IEEE754 + /* Defined if Python is built as a shared library. */ #undef Py_ENABLE_SHARED /* Defined if _Complex C type can be used with libffi. */ #undef Py_FFI_SUPPORT_C_COMPLEX +/* Define if getpgrp() must be called as getpgrp(0). */ +#undef Py_GETPGRP_HAVE_ARG + /* Define if you want to disable the GIL */ #undef Py_GIL_DISABLED +/* HACL* library can compile SIMD128 implementations */ +#undef Py_HACL_CAN_COMPILE_SIMD128 + +/* HACL* library can compile SIMD256 implementations */ +#undef Py_HACL_CAN_COMPILE_SIMD256 + /* Define hash algorithm for str, bytes and memoryview. SipHash24: 1, FNV: 2, SipHash13: 3, externally defined: 0 */ #undef Py_HASH_ALGORITHM @@ -1706,24 +1734,118 @@ /* Define if you have the 'accept' function. */ #undef Py_HAVE_ACCEPT +/* struct addrinfo (netdb.h) */ +#undef Py_HAVE_ADDRINFO + +/* Define if aligned memory access is required */ +#undef Py_HAVE_ALIGNED_REQUIRED + +/* Define this if your time.h defines altzone. */ +#undef Py_HAVE_ALTZONE + /* Define if you have the 'bind' function. */ #undef Py_HAVE_BIND +/* Define if mbstowcs(NULL, "text", 0) does not return the number of wide + chars that would be converted. */ +#undef Py_HAVE_BROKEN_MBSTOWCS + +/* Define if nice() returns success/failure instead of the new priority. */ +#undef Py_HAVE_BROKEN_NICE + +/* Define if the system reports an invalid PIPE_BUF value. */ +#undef Py_HAVE_BROKEN_PIPE_BUF + +/* Define if poll() sets errno on invalid file descriptors. */ +#undef Py_HAVE_BROKEN_POLL + +/* Define if the Posix semaphores do not work on your system */ +#undef Py_HAVE_BROKEN_POSIX_SEMAPHORES + +/* Define if pthread_sigmask() does not work on your system. */ +#undef Py_HAVE_BROKEN_PTHREAD_SIGMASK + +/* define to 1 if your sem_getvalue is broken. */ +#undef Py_HAVE_BROKEN_SEM_GETVALUE + +/* Define if 'unsetenv' does not return an int. */ +#undef Py_HAVE_BROKEN_UNSETENV + +/* Has builtin __atomic_load_n() and __atomic_store_n() functions */ +#undef Py_HAVE_BUILTIN_ATOMIC + +/* Define to 1 if you have the 'chflags' function. */ +#undef Py_HAVE_CHFLAGS + /* Define if you have the 'chroot' function. */ #undef Py_HAVE_CHROOT +/* Define if the C compiler supports computed gotos. */ +#undef Py_HAVE_COMPUTED_GOTOS + /* Define if you have the 'connect' function. */ #undef Py_HAVE_CONNECT /* Define if you have the 'ctermid_r' function. */ #undef Py_HAVE_CTERMID_R +/* Define if you have the 'filter' function. */ +#undef Py_HAVE_CURSES_FILTER + +/* Define if you have the 'has_key' function. */ +#undef Py_HAVE_CURSES_HAS_KEY + +/* Define if you have the 'immedok' function. */ +#undef Py_HAVE_CURSES_IMMEDOK + +/* Define if you have the 'is_pad' function. */ +#undef Py_HAVE_CURSES_IS_PAD + +/* Define if you have the 'is_term_resized' function. */ +#undef Py_HAVE_CURSES_IS_TERM_RESIZED + +/* Define if you have the 'resizeterm' function. */ +#undef Py_HAVE_CURSES_RESIZETERM + +/* Define if you have the 'resize_term' function. */ +#undef Py_HAVE_CURSES_RESIZE_TERM + +/* Define if you have the 'syncok' function. */ +#undef Py_HAVE_CURSES_SYNCOK + +/* Define if you have the 'typeahead' function. */ +#undef Py_HAVE_CURSES_TYPEAHEAD + +/* Define if you have the 'use_env' function. */ +#undef Py_HAVE_CURSES_USE_ENV + +/* Define if you have the 'wchgat' function. */ +#undef Py_HAVE_CURSES_WCHGAT + /* Defined if _Complex C type is available. */ #undef Py_HAVE_C_COMPLEX +/* Define to 1 if you have the device macros. */ +#undef Py_HAVE_DEVICE_MACROS + +/* Define to 1 if you have the /dev/ptc device file. */ +#undef Py_HAVE_DEV_PTC + +/* Define to 1 if you have the /dev/ptmx device file. */ +#undef Py_HAVE_DEV_PTMX + +/* Define to 1 if the dirent structure has a d_type field */ +#undef Py_HAVE_DIRENT_D_TYPE + +/* Define if you have the 'dirfd' function or macro. */ +#undef Py_HAVE_DIRFD + /* Define if you have the '_dyld_shared_cache_contains_path' function. */ #undef Py_HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH +/* Defined when any dynamic module loading is enabled. */ +#undef Py_HAVE_DYNAMIC_LOADING + /* Define if you have the 'epoll_create' function. */ #undef Py_HAVE_EPOLL @@ -1751,6 +1873,31 @@ /* Define if you have the 'fsync' function. */ #undef Py_HAVE_FSYNC +/* Define if we can use gcc inline assembler to get and set mc68881 fpcr */ +#undef Py_HAVE_GCC_ASM_FOR_MC68881 + +/* Define if we can use x64 gcc inline assembler */ +#undef Py_HAVE_GCC_ASM_FOR_X64 + +/* Define if we can use gcc inline assembler to get and set x87 control word + */ +#undef Py_HAVE_GCC_ASM_FOR_X87 + +/* Define if your compiler provides __uint128_t */ +#undef Py_HAVE_GCC_UINT128_T + +/* Define to 1 if you have the header file. */ +#undef Py_HAVE_GDBM_DASH_NDBM_H + +/* Define to 1 if you have the header file. */ +#undef Py_HAVE_GDBM_NDBM_H + +/* Define if you have the getaddrinfo function. */ +#undef Py_HAVE_GETADDRINFO + +/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */ +#undef Py_HAVE_GETC_UNLOCKED + /* Define if you have the 'gethostbyaddr' function. */ #undef Py_HAVE_GETHOSTBYADDR @@ -1766,6 +1913,12 @@ /* Define if you have the 'getprotobyname' function. */ #undef Py_HAVE_GETPROTOBYNAME +/* Define to 1 if the getrandom() function is available */ +#undef Py_HAVE_GETRANDOM + +/* Define to 1 if the Linux getrandom() syscall is available */ +#undef Py_HAVE_GETRANDOM_SYSCALL + /* Define if you have the 'getservbyname' function. */ #undef Py_HAVE_GETSERVBYNAME @@ -1775,9 +1928,16 @@ /* Define if you have the 'getsockname' function. */ #undef Py_HAVE_GETSOCKNAME +/* Define if glibc has incorrect _FORTIFY_SOURCE wrappers for memmove and + bcopy. */ +#undef Py_HAVE_GLIBC_MEMMOVE_BUG + /* Define if you have the 'hstrerror' function. */ #undef Py_HAVE_HSTRERROR +/* Define this if you have le64toh() */ +#undef Py_HAVE_HTOLE64 + /* Define if you have the 'inet_aton' function. */ #undef Py_HAVE_INET_ATON @@ -1787,24 +1947,100 @@ /* Define if you have the 'inet_pton' function. */ #undef Py_HAVE_INET_PTON +/* Define if gcc has the ipa-pure-const bug. */ +#undef Py_HAVE_IPA_PURE_CONST_BUG + /* Define if you have the 'kqueue' function. */ #undef Py_HAVE_KQUEUE +/* Defined to enable large file support when an off_t is bigger than a long + and long long is at least as big as an off_t. You may need to add some + flags for configuration and compilation to enable this mode. (For Solaris + and Linux, the necessary defines are already defined.) */ +#undef Py_HAVE_LARGEFILE_SUPPORT + +/* Define to 1 if you have the 'lchflags' function. */ +#undef Py_HAVE_LCHFLAGS + +/* Define to 1 if you have the `db' library (-ldb). */ +#undef Py_HAVE_LIBDB + /* Define if you have the 'link' function. */ #undef Py_HAVE_LINK +/* Define if compiling using Linux 3.6 or later. */ +#undef Py_HAVE_LINUX_CAN_RAW_FD_FRAMES + +/* Define if compiling using Linux 4.1 or later. */ +#undef Py_HAVE_LINUX_CAN_RAW_JOIN_FILTERS + /* Define if you have the 'listen' function. */ #undef Py_HAVE_LISTEN +/* Define to 1 if you have the `login_tty' function. */ +#undef Py_HAVE_LOGIN_TTY + +/* Define this if you have the makedev macro. */ +#undef Py_HAVE_MAKEDEV + /* Define if you have the 'memfd_create' function. */ #undef Py_HAVE_MEMFD_CREATE +/* Define if you have the 'ncurses' library */ +#undef Py_HAVE_NCURSES + +/* Define if you have the 'ncursesw' library */ +#undef Py_HAVE_NCURSESW + +/* Define if the internal form of wchar_t in non-Unicode locales is not + Unicode. */ +#undef Py_HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION + +/* Define if you have the 'panel' library */ +#undef Py_HAVE_PANEL + +/* Define if you have the 'panelw' library */ +#undef Py_HAVE_PANELW + /* Define if you have the 'prlimit' function. */ #undef Py_HAVE_PRLIMIT +/* Define if your compiler supports function prototype */ +#undef Py_HAVE_PROTOTYPES + +/* Defined for Solaris 2.6 bug in pthread header. */ +#undef Py_HAVE_PTHREAD_DESTRUCTOR + +/* Define if platform requires stubbed pthreads support */ +#undef Py_HAVE_PTHREAD_STUBS + /* Define if you have the 'recvfrom' function. */ #undef Py_HAVE_RECVFROM +/* Define if readline supports append_history */ +#undef Py_HAVE_RL_APPEND_HISTORY + +/* Define if you can turn off readline's signal handling. */ +#undef Py_HAVE_RL_CATCH_SIGNAL + +/* Define if you have readline 2.2 */ +#undef Py_HAVE_RL_COMPLETION_APPEND_CHARACTER + +/* Define if you have readline 4.0 */ +#undef Py_HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK + +/* Define if you have readline 4.2 */ +#undef Py_HAVE_RL_COMPLETION_MATCHES + +/* Define if you have rl_completion_suppress_append */ +#undef Py_HAVE_RL_COMPLETION_SUPPRESS_APPEND + +/* Define if you have readline 4.0 */ +#undef Py_HAVE_RL_PRE_INPUT_HOOK + +/* Define if you have readline 4.0 */ +#undef Py_HAVE_RL_RESIZE_TERMINAL + /* Define if you have the 'sendto' function. */ #undef Py_HAVE_SENDTO @@ -1814,33 +2050,130 @@ /* Define if you have the 'setsockopt' function. */ #undef Py_HAVE_SETSOCKOPT +/* struct sockaddr_alg (linux/if_alg.h) */ +#undef Py_HAVE_SOCKADDR_ALG + +/* Define if sockaddr has sa_len member */ +#undef Py_HAVE_SOCKADDR_SA_LEN + +/* struct sockaddr_storage (sys/socket.h) */ +#undef Py_HAVE_SOCKADDR_STORAGE + /* Define if you have the 'socket' function. */ #undef Py_HAVE_SOCKET /* Define if you have the 'socketpair' function. */ #undef Py_HAVE_SOCKETPAIR +/* Define if you have struct stat.st_mtim.tv_nsec */ +#undef Py_HAVE_STAT_TV_NSEC + +/* Define if you have struct stat.st_mtimensec */ +#undef Py_HAVE_STAT_TV_NSEC2 + +/* Has stdatomic.h with atomic_int and atomic_uintptr_t */ +#undef Py_HAVE_STD_ATOMIC + /* Define if you have the 'symlink' function. */ #undef Py_HAVE_SYMLINK /* Define if you have the 'timerfd_create' function. */ #undef Py_HAVE_TIMERFD_CREATE +/* Define if you have a useable wchar_t type defined in wchar.h; useable means + wchar_t must be an unsigned type with at least 16 bits. (see + Include/unicodeobject.h). */ +#undef Py_HAVE_USABLE_WCHAR_T + +/* Define if the compiler provides a wchar.h header file. */ +#undef Py_HAVE_WCHAR_H + +/* Define if tzset() actually switches the local timezone in a meaningful way. + */ +#undef Py_HAVE_WORKING_TZSET + +/* Define if mvwdelch in curses.h is an expression. */ +#undef Py_MVWDELCH_IS_EXPRESSION + /* Define if year with century should be normalized for strftime. */ #undef Py_NORMALIZE_CENTURY +/* Define if POSIX semaphores aren't enabled on your system */ +#undef Py_POSIX_SEMAPHORES_NOT_ENABLED + +/* Define if pthread_key_t is compatible with int. */ +#undef Py_PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT + +/* Defined if PTHREAD_SCOPE_SYSTEM supported. */ +#undef Py_PTHREAD_SYSTEM_SCHED_SUPPORTED + +/* assume C89 semantics that RETSIGTYPE is always void */ +#undef Py_RETSIGTYPE + /* Define if rl_startup_hook takes arguments */ #undef Py_RL_STARTUP_HOOK_TAKES_ARGS +/* Define if setpgrp() must be called as setpgrp(0, 0). */ +#undef Py_SETPGRP_HAVE_ARG + +/* Define if i>>j for signed int i does not extend the sign bit when i < 0 */ +#undef Py_SIGNED_RIGHT_SHIFT_ZERO_FILLS + /* Define if you want to enable internal statistics gathering. */ #undef Py_STATS /* The version of SunOS/Solaris as reported by `uname -r' without the dot. */ #undef Py_SUNOS_VERSION +/* Define if you can safely include both and + (which you can't on SCO ODT 3.0). */ +#undef Py_SYS_SELECT_WITH_SYS_TIME + +/* Custom thread stack size depending on chosen sanitizer runtimes. */ +#undef Py_THREAD_STACK_SIZE + +/* Library needed by timemodule.c: librt may be needed for clock_gettime() */ +#undef Py_TIMEMODULE_LIB + /* Define if you want to enable tracing references for debugging purpose */ #undef Py_TRACE_REFS +/* Define if you want to use computed gotos in ceval.c. */ +#undef Py_USE_COMPUTED_GOTOS + +/* Define if WINDOW in curses.h offers a field _flags. */ +#undef Py_WINDOW_HAS_FLAGS + +/* Define if you want documentation strings in extension modules */ +#undef Py_WITH_DOC_STRINGS + +/* Define if you want to compile in DTrace support */ +#undef Py_WITH_DTRACE + +/* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic + linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). + Dyld is necessary to support frameworks. */ +#undef Py_WITH_DYLD + +/* Define to 1 if libintl is needed for locale functions. */ +#undef Py_WITH_LIBINTL + +/* Define if you want to compile in mimalloc memory allocator. */ +#undef Py_WITH_MIMALLOC + +/* Define if you want to produce an OpenStep/Rhapsody framework (shared + library plus accessory files). */ +#undef Py_WITH_NEXT_FRAMEWORK + +/* Define if you want to compile in Python-specific mallocs */ +#undef Py_WITH_PYMALLOC + +/* Define if you want pymalloc to be disabled when running under valgrind */ +#undef Py_WITH_VALGRIND + +/* Define if arithmetic is subject to x87-style double rounding issue */ +#undef Py_X87_DOUBLE_ROUNDING + /* assume C89 semantics that RETSIGTYPE is always void */ #undef RETSIGTYPE From c65798c0d146c8eb13492d8dfd2a9e37e7f859a5 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 5 Jan 2025 01:22:54 +0100 Subject: [PATCH 4/5] Fix macros --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index ac58d214a8b146..1c228678d13396 100644 --- a/configure.ac +++ b/configure.ac @@ -55,11 +55,11 @@ AC_DEFUN([WITH_SAVE_ENV], dnl AC_DEFINE*() wrappers. AC_DEFUN([PY_DEFINE], [dnl - AC_DEFINE([Py_$1], [$2], [$3])dnl + AC_DEFINE([[Py_]$1], [$2], [$3])dnl AC_DEFINE([$1], [$2], [$3])dnl ]) AC_DEFUN([PY_DEFINE_UNQUOTED], [dnl - AC_DEFINE_UNQUOTED([Py_$1], [$2], [$3])dnl + AC_DEFINE_UNQUOTED([[Py_]$1], [$2], [$3])dnl AC_DEFINE_UNQUOTED([$1], [$2], [$3])dnl ]) @@ -78,7 +78,7 @@ AC_DEFUN([PY_CHECK_FUNC], AS_VAR_IF( [py_var], [yes], - [PY_DEFINE(py_define, [1], [Define if you have the '$1' function.])]) + [PY_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) AS_VAR_POPDEF([py_var]) AS_VAR_POPDEF([py_define]) ]) @@ -6852,7 +6852,7 @@ AC_DEFUN([PY_CHECK_CURSES_FUNC], AS_VAR_IF( [py_var], [yes], - [PY_DEFINE(py_define, [1], [Define if you have the '$1' function.])]) + [PY_DEFINE([py_define], [1], [Define if you have the '$1' function.])]) AS_VAR_POPDEF([py_var]) AS_VAR_POPDEF([py_define]) ]) From 53b5348fda99ee39e9dc9efa9a285076d4ee2ff2 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 5 Jan 2025 22:21:42 +0100 Subject: [PATCH 5/5] Revert a few defs --- configure | 20 -------------------- configure.ac | 20 ++++++++++---------- pyconfig.h.in | 35 ----------------------------------- 3 files changed, 10 insertions(+), 65 deletions(-) diff --git a/configure b/configure index 5e71ccf6a8480a..499ba646c644fb 100755 --- a/configure +++ b/configure @@ -12214,8 +12214,6 @@ fi -printf "%s\n" "#define Py_RETSIGTYPE void" >>confdefs.h - printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" @@ -13169,8 +13167,6 @@ if test "x$ac_cv_pthread_key_t_is_arithmetic_type" = xyes then : -printf "%s\n" "#define Py_PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h - printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h @@ -13186,8 +13182,6 @@ then # -F. is needed to allow linking to the framework while # in the build location. -printf "%s\n" "#define Py_WITH_NEXT_FRAMEWORK 1" >>confdefs.h - printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -13289,8 +13283,6 @@ printf %s "checking for dyld... " >&6; } case $ac_sys_system/$ac_sys_release in Darwin/*) -printf "%s\n" "#define Py_WITH_DYLD 1" >>confdefs.h - printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5 @@ -13682,8 +13674,6 @@ then fi -printf "%s\n" "#define Py_THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h - printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h @@ -14513,8 +14503,6 @@ printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; } if test "x$ac_cv_lib_intl_textdomain" = xyes then : -printf "%s\n" "#define Py_WITH_LIBINTL 1" >>confdefs.h - printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -17970,8 +17958,6 @@ fi printf "%s\n" "$ac_cv_pthread_system_supported" >&6; } if test "$ac_cv_pthread_system_supported" = "yes"; then -printf "%s\n" "#define Py_PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h - printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h fi @@ -23846,8 +23832,6 @@ then : printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h -printf "%s\n" "#define Py_TIMEMODULE_LIB rt" >>confdefs.h - printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h @@ -24193,8 +24177,6 @@ printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h fi -printf "%s\n" "#define Py_SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h - printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h @@ -26284,8 +26266,6 @@ if test "$Py_DEBUG" = 'true'; then ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM} -printf "%s\n" "#define Py_ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h - printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h fi diff --git a/configure.ac b/configure.ac index 1c228678d13396..a1260b50deb0d2 100644 --- a/configure.ac +++ b/configure.ac @@ -3090,7 +3090,7 @@ EOF AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T -PY_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) +AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) AC_TYPE_SIZE_T AC_TYPE_UID_T @@ -3196,7 +3196,7 @@ else fi ]) AS_VAR_IF([ac_cv_pthread_key_t_is_arithmetic_type], [yes], [ - PY_DEFINE([PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT], [1], + AC_DEFINE([PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT], [1], [Define if pthread_key_t is compatible with int.]) ]) @@ -3208,7 +3208,7 @@ then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" # -F. is needed to allow linking to the framework while # in the build location. - PY_DEFINE([WITH_NEXT_FRAMEWORK], [1], + AC_DEFINE([WITH_NEXT_FRAMEWORK], [1], [Define if you want to produce an OpenStep/Rhapsody framework (shared library plus accessory files).]) AC_MSG_RESULT([yes]) @@ -3254,7 +3254,7 @@ fi AC_MSG_CHECKING([for dyld]) case $ac_sys_system/$ac_sys_release in Darwin/*) - PY_DEFINE([WITH_DYLD], [1], + AC_DEFINE([WITH_DYLD], [1], [Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). Dyld is necessary to support frameworks.]) @@ -3569,7 +3569,7 @@ then stack_size="4000000" # 64 MB fi - PY_DEFINE_UNQUOTED([THREAD_STACK_SIZE], + AC_DEFINE_UNQUOTED([THREAD_STACK_SIZE], [0x$stack_size], [Custom thread stack size depending on chosen sanitizer runtimes.]) @@ -3753,7 +3753,7 @@ AC_SEARCH_LIBS([sem_init], [pthread rt posix4]) # check if we need libintl for locale functions AC_CHECK_LIB([intl], [textdomain], - [PY_DEFINE([WITH_LIBINTL], [1], + [AC_DEFINE([WITH_LIBINTL], [1], [Define to 1 if libintl is needed for locale functions.]) LIBS="-lintl $LIBS"]) @@ -4660,7 +4660,7 @@ if test "$posix_threads" = "yes"; then [ac_cv_pthread_system_supported=no]) ]) if test "$ac_cv_pthread_system_supported" = "yes"; then - PY_DEFINE([PTHREAD_SYSTEM_SCHED_SUPPORTED], [1], + AC_DEFINE([PTHREAD_SYSTEM_SCHED_SUPPORTED], [1], [Defined if PTHREAD_SCOPE_SYSTEM supported.]) fi AC_CHECK_FUNCS([pthread_sigmask], @@ -5452,7 +5452,7 @@ AC_CHECK_FUNCS([clock_gettime], [], [ AC_CHECK_LIB([rt], [clock_gettime], [ LIBS="$LIBS -lrt" AC_DEFINE([HAVE_CLOCK_GETTIME], [1]) - PY_DEFINE([TIMEMODULE_LIB], [rt], + AC_DEFINE([TIMEMODULE_LIB], [rt], [Library needed by timemodule.c: librt may be needed for clock_gettime()]) ]) ]) @@ -5512,7 +5512,7 @@ AS_VAR_IF([ac_cv_device_macros], [yes], [ ]) dnl no longer used, now always defined for backwards compatibility -PY_DEFINE([SYS_SELECT_WITH_SYS_TIME], [1], +AC_DEFINE([SYS_SELECT_WITH_SYS_TIME], [1], [Define if you can safely include both and (which you can't on SCO ODT 3.0).]) @@ -6191,7 +6191,7 @@ if test "$Py_DEBUG" = 'true'; then # Similar to SOABI but remove "d" flag from ABIFLAGS AC_SUBST([ALT_SOABI]) ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${SOABI_PLATFORM:+-$SOABI_PLATFORM} - PY_DEFINE_UNQUOTED([ALT_SOABI], ["${ALT_SOABI}"], + AC_DEFINE_UNQUOTED([ALT_SOABI], ["${ALT_SOABI}"], [Alternative SOABI used in debug build to load C extensions built in release mode]) fi diff --git a/pyconfig.h.in b/pyconfig.h.in index 3c063285b206c2..b426fc20b63675 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1687,10 +1687,6 @@ /* PEP 11 Support tier (1, 2, 3 or 0 for unsupported) */ #undef PY_SUPPORT_TIER -/* Alternative SOABI used in debug build to load C extensions built in release - mode */ -#undef Py_ALT_SOABI - /* The Android API level. */ #undef Py_ANDROID_API_LEVEL @@ -2101,15 +2097,6 @@ /* Define if POSIX semaphores aren't enabled on your system */ #undef Py_POSIX_SEMAPHORES_NOT_ENABLED -/* Define if pthread_key_t is compatible with int. */ -#undef Py_PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT - -/* Defined if PTHREAD_SCOPE_SYSTEM supported. */ -#undef Py_PTHREAD_SYSTEM_SCHED_SUPPORTED - -/* assume C89 semantics that RETSIGTYPE is always void */ -#undef Py_RETSIGTYPE - /* Define if rl_startup_hook takes arguments */ #undef Py_RL_STARTUP_HOOK_TAKES_ARGS @@ -2125,16 +2112,6 @@ /* The version of SunOS/Solaris as reported by `uname -r' without the dot. */ #undef Py_SUNOS_VERSION -/* Define if you can safely include both and - (which you can't on SCO ODT 3.0). */ -#undef Py_SYS_SELECT_WITH_SYS_TIME - -/* Custom thread stack size depending on chosen sanitizer runtimes. */ -#undef Py_THREAD_STACK_SIZE - -/* Library needed by timemodule.c: librt may be needed for clock_gettime() */ -#undef Py_TIMEMODULE_LIB - /* Define if you want to enable tracing references for debugging purpose */ #undef Py_TRACE_REFS @@ -2150,21 +2127,9 @@ /* Define if you want to compile in DTrace support */ #undef Py_WITH_DTRACE -/* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic - linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). - Dyld is necessary to support frameworks. */ -#undef Py_WITH_DYLD - -/* Define to 1 if libintl is needed for locale functions. */ -#undef Py_WITH_LIBINTL - /* Define if you want to compile in mimalloc memory allocator. */ #undef Py_WITH_MIMALLOC -/* Define if you want to produce an OpenStep/Rhapsody framework (shared - library plus accessory files). */ -#undef Py_WITH_NEXT_FRAMEWORK - /* Define if you want to compile in Python-specific mallocs */ #undef Py_WITH_PYMALLOC