From c471bd3d66e5e43938dfaba24b294cec094be8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Wed, 22 Nov 2017 11:24:32 +0000 Subject: subr/ex_pkg_env.subr: explicitly export ${PKG_CONFIG} when building non-host packages. --- subr/ex_pkg_env.subr | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'subr/ex_pkg_env.subr') diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr index 25b00537..cbd0b77d 100644 --- a/subr/ex_pkg_env.subr +++ b/subr/ex_pkg_env.subr @@ -29,16 +29,17 @@ ex_pkg_env() { host) export AR="ar"; export CC="gcc"; export CXX="g++"; - export RANLIB="ranlib"; - export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; - export LIBTOOL="${PKG_SLIBTOOL:-slibtool}"; ;; + export RANLIB="ranlib"; ;; *) export AR="${PKG_TARGET}-ar"; export CC="${PKG_TARGET}-gcc"; export CXX="${PKG_TARGET}-g++"; export RANLIB="${PKG_TARGET}-ranlib"; - export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; - export LIBTOOL="${PKG_SLIBTOOL:-slibtool}"; ;; + [ -x "${PREFIX}/bin/${TARGET}-pkg-config" ]\ + && export PKG_CONFIG="${PREFIX}/bin/${TARGET}-pkg-config"; + ;; esac; + export LIBTOOL="${PKG_SLIBTOOL:-slibtool}"; + export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; case "${PKG_SUBDIR}" in ?*) ;; *) case "${PKG_URLS_GIT}" in -- cgit v1.2.3