Skip to content

Conversation

@tiran
Copy link
Member

@tirantiran commented Nov 10, 2021

Let users require or ignore pkg-config. --with-pkg-config makes
pkg-config mandatory. --without-pkg-config disables use of
pkg-config. Disabling is also useful to check how configure behaves
without pkg-config installed.

Signed-off-by: Christian Heimes christian@python.org

https://bugs.python.org/issue45723

Let users require or ignore pkg-config. ``--with-pkg-config`` makes pkg-config mandatory. ``--without-pkg-config`` disables use of pkg-config. Disabling is also useful to check how configure behaves without pkg-config installed. Signed-off-by: Christian Heimes <christian@python.org>
@tirantiranforce-pushed the bpo-45723-with-pkg-config branch from d0e72b7 to f1bd071CompareNovember 10, 2021 15:32
@tirantiran marked this pull request as ready for review November 10, 2021 15:33
Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I think a note in Build Changes in What's New would be nice.

Comment on lines +167 to +172
if test -z "$PKG_CONFIG" then
dnl invalidate stale config.cache values
AS_UNSET([PKG_CONFIG])
AS_UNSET([ac_cv_path_ac_pt_PKG_CONFIG])
AS_UNSET([ac_cv_prog_ac_ct_PKG_CONFIG])
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsetting PKG_CONFIG and friends if PKG_CONFIG is not set? Is there a missing ! in the test? Is this check needed at all; the config.cache guard is pretty strict.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's un-declaring the variables when it's empty. This solves a corner case when going from ./configure -C --without-pkg-config to ./configure -C --with-pkg-config=yes.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you are able to find a better way...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. No, this is fine. I can't think of a better way.

@erlend-aasland
Copy link
Contributor

Is it worth it listing the packages we actually use pkg-config to detect?

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
@tiran
Copy link
MemberAuthor

Is it worth it listing the packages we actually use pkg-config to detect?

The pkg-config m4 macro will do that for us.

@tirantiran changed the title bpo-45723: Add --with-pkg-config to configurebpo-45723: Add --with-pkg-config to configure (GH-29517)Nov 10, 2021
@tirantiran merged commit fc9b622 into python:mainNov 10, 2021
@tirantiran deleted the bpo-45723-with-pkg-config branch November 10, 2021 22:02
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
remykarem pushed a commit to remykarem/cpython that referenced this pull request Jan 30, 2022
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@tiran@erlend-aasland@the-knights-who-say-ni@bedevere-bot