aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Michael Larson <sethmichaellarson@gmail.com>2023-12-06 17:26:42 -0600
committerGitHub <noreply@github.com>2023-12-07 00:26:42 +0100
commit575c99a5a1ebd7cc562de1dd6510a8a60f47e2a7 (patch)
tree41d05b7ce565552aa81fae2320aaf224975c71ae
parentc1c6bedfd3ee66ad208e0cd9cdd732374c95b83d (diff)
downloadcpython3-575c99a5a1ebd7cc562de1dd6510a8a60f47e2a7.tar.gz
[3.8] gh-112160: Add 'regen-configure' make target (#112167)
-rw-r--r--.github/workflows/build.yml13
-rw-r--r--Makefile.pre.in12
-rw-r--r--aclocal.m42
-rwxr-xr-xconfigure14
-rw-r--r--pyconfig.h.in6
5 files changed, 42 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e63ab9521a..700fe10e03 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -76,6 +76,19 @@ jobs:
- uses: actions/setup-python@v4
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
+ - name: Check Autoconf version 2.69 and aclocal 1.16.3
+ run: |
+ grep "Generated by GNU Autoconf 2.69" configure
+ grep "aclocal 1.16.3" aclocal.m4
+ grep -q "runstatedir" configure
+ grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
+ - name: Configure CPython
+ run: |
+ # Build Python with the libpython dynamic library
+ ./configure --config-cache --with-pydebug --enable-shared
+ - name: Regenerate autoconf files
+ run: |
+ make regen-configure
- name: Build CPython
run: |
./configure --with-pydebug
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 7e381283fe..67a99bdbea 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1742,6 +1742,18 @@ autoconf:
# Regenerate pyconfig.h.in from configure.ac using autoheader
(cd $(srcdir); autoheader -Wall)
+# See https://github.com/tiran/cpython_autoconf container
+.PHONY: regen-configure
+regen-configure:
+ @if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
+ if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
+ if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
+ # Manifest corresponds with tag '269' \
+ CPYTHON_AUTOCONF_MANIFEST="sha256:f370fee95eefa3d57b00488bce4911635411fa83e2d293ced8cf8a3674ead939" \
+ CMD="$$RUNTIME run --rm --pull=missing -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf@$$CPYTHON_AUTOCONF_MANIFEST"; \
+ echo $$CMD; \
+ $$CMD || exit $?
+
# Create a tags file for vi
tags::
ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h
diff --git a/aclocal.m4 b/aclocal.m4
index 04342a4982..e5e804276f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
diff --git a/configure b/configure
index c091865aff..7004660d2f 100755
--- a/configure
+++ b/configure
@@ -783,6 +783,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -897,6 +898,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1149,6 +1151,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1286,7 +1297,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1439,6 +1450,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 41cfe07902..75cd6905a0 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -281,6 +281,9 @@
/* Define to 1 if you have the `dup3' function. */
#undef HAVE_DUP3
+/* Define if you have the '_dyld_shared_cache_contains_path' function. */
+#undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
+
/* Defined when any dynamic module loading is enabled. */
#undef HAVE_DYNAMIC_LOADING
@@ -772,9 +775,6 @@
/* Define if you have the 'prlimit' functions. */
#undef HAVE_PRLIMIT
-/* Define if you have the '_dyld_shared_cache_contains_path' function. */
-#undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
-
/* Define to 1 if you have the <process.h> header file. */
#undef HAVE_PROCESS_H