summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-06-21 08:39:19 +0000
committerRoy Marples <roy@marples.name>2016-06-21 08:39:19 +0000
commitb45eaf86b9c296ecd0d4e0b879b399067d6de036 (patch)
tree79a61a8fad22b404ebb17bba225d25f9fed43096 /configure
parente2600fd4b728dea2a517c042264177e366b29a69 (diff)
downloaddhcpcd-b45eaf86b9c296ecd0d4e0b879b399067d6de036.tar.xz
Allow pkg-config to be host selectable like the compiler.
Tjhanks to Heiko Becker <heirecka@exherbo.org>.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure b/configure
index f11c797c..755e29cf 100755
--- a/configure
+++ b/configure
@@ -57,6 +57,7 @@ for x do
--with-ccopts|CFLAGS) CFLAGS=$var;;
CC) CC=$var;;
CPPFLAGS) CPPFLAGS=$var;;
+ PKG_CONFIG) PKG_CONFIG=$var;;
--with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";;
--with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var; HOOKSET=true;;
--build) BUILD=$var;;
@@ -141,6 +142,7 @@ Some influential environment variables:
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
+ PKG_CONFIG pkg-config executable
Use these variables to override the choices made by \`configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -153,6 +155,7 @@ done
: ${SED:=sed}
: ${GREP:=grep}
+: ${PKG_CONFIG:=pkg-config}
: ${WC:=wc}
: ${FORK:=yes}
@@ -1204,9 +1207,9 @@ fi
if [ "$DEV" != no -a "$UDEV" != no ]; then
printf "Checking for libudev ... "
- if type pkg-config >/dev/null 2>&1; then
- LIBUDEV_CFLAGS=$(pkg-config --cflags libudev 2>&3)
- LIBUDEV_LIBS=$(pkg-config --libs libudev 2>&3)
+ if type "$PKG_CONFIG" >/dev/null 2>&1; then
+ LIBUDEV_CFLAGS=$("$PKG_CONFIG" --cflags libudev 2>&3)
+ LIBUDEV_LIBS=$("$PKG_CONFIG" --libs libudev 2>&3)
fi
fi
if [ "$DEV" != no -a "$UDEV" != no -a -n "$LIBUDEV_LIBS" ]; then