resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
512 stars 51 forks source link

Add implementation of autoconf macro #392

Open zvr opened 2 days ago

zvr commented 2 days ago

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

N-R-K commented 2 days ago

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 commented 2 days ago

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 commented 2 days ago

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.