Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[platform/kernel/linux-starfive.git] / scripts / kconfig / mconf-cfg.sh
index b520e40..025b565 100755 (executable)
@@ -4,16 +4,16 @@
 PKG="ncursesw"
 PKG2="ncurses"
 
-if [ -n "$(command -v pkg-config)" ]; then
-       if pkg-config --exists $PKG; then
-               echo cflags=\"$(pkg-config --cflags $PKG)\"
-               echo libs=\"$(pkg-config --libs $PKG)\"
+if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then
+       if ${HOSTPKG_CONFIG} --exists $PKG; then
+               echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\"
+               echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\"
                exit 0
        fi
 
-       if pkg-config --exists $PKG2; then
-               echo cflags=\"$(pkg-config --cflags $PKG2)\"
-               echo libs=\"$(pkg-config --libs $PKG2)\"
+       if ${HOSTPKG_CONFIG} --exists $PKG2; then
+               echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG2)\"
+               echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG2)\"
                exit 0
        fi
 fi
@@ -46,7 +46,7 @@ echo >&2 "* Unable to find the ncurses package."
 echo >&2 "* Install ncurses (ncurses-devel or libncurses-dev"
 echo >&2 "* depending on your distribution)."
 echo >&2 "*"
-echo >&2 "* You may also need to install pkg-config to find the"
+echo >&2 "* You may also need to install ${HOSTPKG_CONFIG} to find the"
 echo >&2 "* ncurses installed in a non-default location."
 echo >&2 "*"
 exit 1