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

Add implementation of autoconf macro #392

Closed
wants to merge 1 commit into from

Conversation

zvr
Copy link

@zvr zvr commented Dec 1, 2024

When trying to build on a new development machine, the build failed because the PKG_CHECK_MODULES() autoconf macro was not known.

This PR simply adds its definition in the standard way: as a file in a directory named m4 and updates ./autogen.sh to call autoreconf to use this directory. I've put the latest version of pkg.m4 in the directory.

From a quick search on sources on my system, this is handled the same way in gcc, gdb, binutils, grep, gnupg, freetype, mosh, GraphicsMagick and many other projects.

Signed-off-by: Alexios Zavras (zvr) zvr+github@zvr.gr

Signed-off-by: Alexios Zavras (zvr) <zvr+github@zvr.gr>
@N-R-K
Copy link
Collaborator

N-R-K commented Dec 1, 2024

pkg.m4 should be distributed along with pkg-config. Why do we need to bundle it? Which distro you're using that doesn't provide pkg.m4 along with pkg-config?

@zvr
Copy link
Author

zvr commented Dec 1, 2024

Ah, you are correct that it shouldn't be needed, if pkg-config is present. It's happening on my system because I have self-compiled autotools that only look at /usr/local/share/aclocal and not /usr/share/aclocal.

I assume then a check in configure.ac is needed, to ensure pkg-config is present.
Copying from the comments in the fie:

m4_ifndef([PKG_PREREQ],
     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])

@N-R-K
Copy link
Collaborator

N-R-K commented Dec 1, 2024

I assume then a check in configure.ac is needed, to ensure pkg-config is present. Copying from the comments in the fie:

m4_ifndef([PKG_PREREQ],
     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])

Sure, feel free to add that.

@N-R-K N-R-K closed this in 3f07e18 Dec 30, 2024
Sign up for free to 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.

2 participants