summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-11-08 11:41:17 -0500
committerStephen Hemminger <shemminger@vyatta.com>2012-11-11 16:21:34 -0800
commite4fc4ada3317ea94452576add25981279d705b14 (patch)
treef0b232bc454841db346ad2191fb93b199264b27e /configure
parent1465db1a14408fae2cdd9c4f5e80e28f9bdb352e (diff)
allow pkg-config to be customized
Rather than hard coding `pkg-config`, use ${PKG_CONFIG} so people can override it to their specific version (like when cross-compiling). This is the same way the upstream pkg-config code works. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure b/configure
index 2c2d1c45..0bfedf9d 100755
--- a/configure
+++ b/configure
@@ -2,6 +2,8 @@
# This is not an autconf generated configure
#
INCLUDE=${1:-"$PWD/include"}
+: ${PKG_CONFIG:=pkg-config}
+echo "PKG_CONFIG:=${PKG_CONFIG}" >>Config
# Make a temp directory in build tree.
TMPDIR=$(mktemp -d config.XXXXXX)
@@ -51,7 +53,7 @@ int main(int argc, char **argv)
EOF
-if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
+if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(${PKG_CONFIG} xtables --cflags --libs) -ldl >/dev/null 2>&1
then
echo "TC_CONFIG_XT:=y" >>Config
echo "using xtables"
@@ -148,7 +150,7 @@ check_ipt()
check_ipt_lib_dir()
{
- IPT_LIB_DIR=$(pkg-config --variable=xtlibdir xtables)
+ IPT_LIB_DIR=$(${PKG_CONFIG} --variable=xtlibdir xtables)
if [ -n "$IPT_LIB_DIR" ]; then
echo $IPT_LIB_DIR
echo "IPT_LIB_DIR:=$IPT_LIB_DIR" >> Config