From 16f823bfa0e521e991cc8e14d266cb3ed1f52917 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 25 May 2020 12:42:21 -0400 Subject: Don't hard code build architecture so that we can cross-build Thanks to Helmut Grohne for the patch, https://bugs.debian.org/958485 --- configure.ac | 20 ++++++++------------ 1 file 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 -- cgit v1.2.3-59-g8ed1b