logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://anongit.hacktivis.me/git/badwolf.git/
commit: 3e607fcf1a1bf315de321e83574765f2dfc88fa6
parent c39bbd4313740a2da380016d4296d6975b31749f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  4 Feb 2026 23:02:00 +0100

configure: Use $PKG_CONFIG as main with fallback to $PKGCONFIG

Both are pretty common, although $PKG_CONFIG seems to be by far
the most popular one and effectively standard one as it's used by:
pkg.m4, meson, CMake, …

Diffstat:

Mconfigure18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure b/configure @@ -36,7 +36,7 @@ Variables: DATADIR=DIR APPSDIR=DIR - PKGCONFIG=BIN + PKG_CONFIG=BIN MSGFMT=BIN INKSCAPE=BIN CC=BIN @@ -78,8 +78,8 @@ required() { } pkg_config_check() { - printf 'Checking: %s %s ...' "${PKGCONFIG}" "$*" - "${PKGCONFIG}" "$@" + printf 'Checking: %s %s ...' "${PKG_CONFIG}" "$*" + "${PKG_CONFIG}" "$@" is_ok } @@ -87,7 +87,7 @@ pkg_config_check() { # defaults PREFIX="${PREFIX:-/usr/local}" -PKGCONFIG="${PKGCONFIG:-pkg-config}" +PKG_CONFIG="${PKG_CONFIG:-${PKGCONFIG:-pkg-config}}" MSGFMT="${MSGFMT:-msgfmt}" INKSCAPE="${INKSCAPE:-inkscape}" CC="${CC:-cc}" @@ -138,8 +138,8 @@ CFLAGS="${CFLAGS} -Wall -Wextra -Wconversion -Wsign-conversion -Werror=implicit- ## System checks # commands -printf 'Checking %s command existence ...' "${PKGCONFIG}" -command -v "${PKGCONFIG}" >/dev/null ; required +printf 'Checking %s command existence ...' "${PKG_CONFIG}" +command -v "${PKG_CONFIG}" >/dev/null ; required printf 'Checking %s command existence ...' "${CC}" command -v "${CC}" >/dev/null ; required @@ -286,12 +286,12 @@ case "${WITH_URI_PARSER}n" in esac printf 'Using pkg-config to get CFLAGS for %s ...' "${DEPS}" -get_cflags() { "${PKGCONFIG}" --cflags "${DEPS}"; } +get_cflags() { "${PKG_CONFIG}" --cflags "${DEPS}"; } DEPS_cflags="$(get_cflags)" required printf 'Using pkg-config to get LIBS for %s ...' "${DEPS}" -get_libs() { "${PKGCONFIG}" --libs "${DEPS}"; } +get_libs() { "${PKG_CONFIG}" --libs "${DEPS}"; } DEPS_libs="$(get_libs)" required @@ -318,7 +318,7 @@ rule gen_config build config.ninja: gen_config configure PREFIX = ${PREFIX} -PKGCONFIG = ${PKGCONFIG} +PKG_CONFIG = ${PKG_CONFIG} MSGFMT = ${MSGFMT} INKSCAPE = ${INKSCAPE} CC = ${CC}