Skip to content

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 November 10, 2021 15:06
@tiran tiran force-pushed the bpo-45723-with-pkg-config branch 2 times, most recently from e6a5f7e to d0e72b7 Compare November 10, 2021 15:22
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 Compare November 10, 2021 15:32
@tiran tiran marked this pull request as ready for review November 10, 2021 15:33
Copy link
Contributor

@erlend-aasland erlend-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
Member Author

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

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

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
@tiran tiran 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants