aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2020-05-25 12:42:21 -0400
committerRyan Kavanagh <rak@debian.org>2020-05-25 12:42:21 -0400
commit16f823bfa0e521e991cc8e14d266cb3ed1f52917 (patch)
tree1937cde66d48c9c62a162c41ce48a53d634c2d1c
parentUpdate README.md (diff)
downloadOpenSMTPD-extras-16f823bfa0e521e991cc8e14d266cb3ed1f52917.tar.xz
OpenSMTPD-extras-16f823bfa0e521e991cc8e14d266cb3ed1f52917.zip
Don't hard code build architecture so that we can cross-build
Thanks to Helmut Grohne for the patch, https://bugs.debian.org/958485
-rw-r--r--configure.ac20
1 files changed, 8 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 036fc99..410a61b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1357,6 +1357,8 @@ AC_ARG_WITH([lua-type],
]
)
+PKG_PROG_PKG_CONFIG
+
#
# check for python
#
@@ -1425,12 +1427,9 @@ LUA_CPPFLAGS=
LUA_LDFLAGS=
if test x"${need_lua}" = x"yes"; then
LUA_CONFIG=
- for path in /usr/local/bin /usr/bin; do
- if test -f ${path}/pkg-config; then
- LUA_CONFIG=${path}/pkg-config
- break
- fi
- done
+ if test "x$PKG_CONFIG" != x; then
+ LUA_CONFIG=$PKG_CONFIG
+ fi
# if lua provided --with-lua, override
if test x"${with_lua}" != x""; then
@@ -1471,12 +1470,9 @@ REDIS_CPPFLAGS=
REDIS_LDFLAGS=
if test x"${need_redis}" = x"yes"; then
REDIS_CONFIG=
- for path in /usr/local/bin /usr/bin; do
- if test -f ${path}/pkg-config; then
- REDIS_CONFIG=${path}/pkg-config
- break
- fi
- done
+ if test "x$PKG_CONFIG" != x; then
+ REDIS_CONFIG=$PKG_CONFIG
+ fi
# if redis provided --with-redis, override
if test x"${with_hiredis}" != x""; then