2018-05-22 07:22:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
PKG="Qt5Core Qt5Gui Qt5Widgets"
|
|
|
|
|
kconfig: do not require pkg-config on make {menu,n}config
Meelis Roos reported a {menu,n}config regression:
"I have libncurses devel package installed in the default system
location (as do 99%+ on actual developers probably) and in this
case, pkg-config is useless. pkg-config is needed only when
libraries and headers are installed in non-default locations but
it is bad to require installation of pkg-config on all the machines
where make menuconfig would be possibly run."
For {menu,n}config, do not use pkg-config if it is not installed.
For {g,x}config, keep checking pkg-config since we really rely on it
for finding the installation paths of the required packages.
Fixes: 4ab3b80159d4 ("kconfig: check for pkg-config on make {menu,n,g,x}config")
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
2018-08-31 09:34:55 +00:00
|
|
|
if [ -z "$(command -v pkg-config)" ]; then
|
|
|
|
echo >&2 "*"
|
|
|
|
echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it."
|
|
|
|
echo >&2 "*"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-05-22 07:22:19 +00:00
|
|
|
if pkg-config --exists $PKG; then
|
2020-10-24 12:38:40 +00:00
|
|
|
echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags $PKG)\"
|
2018-05-22 07:22:19 +00:00
|
|
|
echo libs=\"$(pkg-config --libs $PKG)\"
|
|
|
|
echo moc=\"$(pkg-config --variable=host_bins Qt5Core)/moc\"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo >&2 "*"
|
2020-10-24 12:38:39 +00:00
|
|
|
echo >&2 "* Could not find Qt5 via pkg-config."
|
|
|
|
echo >&2 "* Please install Qt5 and make sure it's in PKG_CONFIG_PATH"
|
2018-05-22 07:22:19 +00:00
|
|
|
echo >&2 "*"
|
|
|
|
exit 1
|