]> mj.ucw.cz Git - pciutils.git/commitdiff
Configure: pkg-config can be overridden by $PKG_CONFIG
authorMartin Mares <mj@ucw.cz>
Mon, 1 Apr 2013 19:23:44 +0000 (21:23 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 1 Apr 2013 19:23:44 +0000 (21:23 +0200)
lib/configure

index 86bd43c9bb6bf203ae2b261ea5a6d233f71f9d1b..4b58c74f028b45ef42b5af12301cdd46db2839ad 100755 (executable)
@@ -182,10 +182,13 @@ fi
 if [ "$sys" = linux ] ; then
        echo_n "Checking for libkmod... "
        LIBKMOD_DETECTED=
+       if [ -z "$PKG_CONFIG" ] ; then
+               PKG_CONFIG=pkg-config
+       fi
        if [ "$LIBKMOD" != no ] ; then
-               if ! which pkg-config >/dev/null ; then
-                       echo_n "(pkg-config not found) "
-               elif pkg-config libkmod ; then
+               if ! which $PKG_CONFIG >/dev/null ; then
+                       echo_n "($PKG_CONFIG not found) "
+               elif $PKG_CONFIG libkmod ; then
                        LIBKMOD_DETECTED=1
                fi
        fi
@@ -205,8 +208,8 @@ if [ "$sys" = linux ] ; then
        fi
        if [ "$LIBKMOD" = yes ] ; then
                echo >>$c "#define PCI_USE_LIBKMOD"
-               echo >>$m "LIBKMOD_CFLAGS=$(pkg-config --cflags libkmod)"
-               echo >>$m "LIBKMOD_LIBS=$(pkg-config --libs libkmod)"
+               echo >>$m "LIBKMOD_CFLAGS=$($PKG_CONFIG --cflags libkmod)"
+               echo >>$m "LIBKMOD_LIBS=$($PKG_CONFIG --libs libkmod)"
        fi
 fi