Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45723: Add --with-pkg-config to configure (GH-29517) #29517

Merged
merged 2 commits into from Nov 10, 2021

Conversation

@tiran
Copy link
Member

@tiran tiran 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

@tiran tiran requested a review from erlend-aasland Nov 10, 2021
@tiran tiran force-pushed the bpo-45723-with-pkg-config branch 2 times, most recently from e6a5f7e to d0e72b7 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>
@tiran tiran force-pushed the bpo-45723-with-pkg-config branch from d0e72b7 to f1bd071 Nov 10, 2021
@tiran tiran marked this pull request as ready for review Nov 10, 2021
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

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

configure.ac Outdated Show resolved Hide resolved
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

@erlend-aasland erlend-aasland Nov 10, 2021

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
Member Author

@tiran tiran Nov 10, 2021

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
Member Author

@tiran tiran Nov 10, 2021

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

@erlend-aasland erlend-aasland Nov 10, 2021

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

@erlend-aasland erlend-aasland commented Nov 10, 2021

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
Member Author

@tiran tiran commented Nov 10, 2021

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

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

@tiran tiran changed the title bpo-45723: Add --with-pkg-config to configure bpo-45723: Add --with-pkg-config to configure (GH-29517) Nov 10, 2021
@tiran tiran merged commit fc9b622 into python:main Nov 10, 2021
12 checks passed
@tiran tiran deleted the bpo-45723-with-pkg-config branch Nov 10, 2021
remykarem added a commit to remykarem/cpython that referenced this issue Dec 7, 2021
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants