Skip to content

Commit be3cd5c

Browse files
authored
bpo-45723: Detect missing pkg-config (GH-29442)
1 parent 9127520 commit be3cd5c

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``configure`` now prints a warning when pkg-config is missing.

configure

+5-1
Original file line numberDiff line numberDiff line change
@@ -2777,7 +2777,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
27772777

27782778

27792779

2780-
27812780
if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
27822781
# If we're building out-of-tree, we need to make sure the following
27832782
# resources get picked up before their $srcdir counterparts.
@@ -19574,6 +19573,11 @@ $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
1957419573
Modules/Setup.local $srcdir/Modules/Setup
1957519574
mv config.c Modules
1957619575

19576+
if test -z "$PKG_CONFIG"; then
19577+
echo "" >&6
19578+
echo "pkg-config is missing. Some dependencies may not be detected correctly." >&6
19579+
fi
19580+
1957719581
if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
1957819582
echo "" >&6
1957919583
echo "" >&6

configure.ac

+11-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ m4_ifdef(
1616
[AX_C_FLOAT_WORDS_BIGENDIAN],
1717
[],
1818
[AC_MSG_ERROR([Please install autoconf-archive package and re-run autoreconf])]
19-
)
19+
)dnl
20+
m4_ifdef(
21+
[PKG_PROG_PKG_CONFIG],
22+
[],
23+
[AC_MSG_ERROR([Please install pkgconf's m4 macro package and re-run autoreconf])]
24+
)dnl
2025

2126
AC_SUBST(BASECPPFLAGS)
2227
if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
@@ -6114,6 +6119,11 @@ $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
61146119
Modules/Setup.local $srcdir/Modules/Setup
61156120
mv config.c Modules
61166121

6122+
if test -z "$PKG_CONFIG"; then
6123+
echo "" >&AS_MESSAGE_FD
6124+
echo "pkg-config is missing. Some dependencies may not be detected correctly." >&AS_MESSAGE_FD
6125+
fi
6126+
61176127
if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
61186128
echo "" >&AS_MESSAGE_FD
61196129
echo "" >&AS_MESSAGE_FD

0 commit comments

Comments
 (0)