mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Masahiro Yamada](/assets/img/avatar_default.png)
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: 4ab3b80159
("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>
32 lines
846 B
Bash
Executable file
32 lines
846 B
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
PKG="Qt5Core Qt5Gui Qt5Widgets"
|
|
PKG2="QtCore QtGui"
|
|
|
|
if [ -z "$(command -v pkg-config)" ]; then
|
|
echo >&2 "*"
|
|
echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it."
|
|
echo >&2 "*"
|
|
exit 1
|
|
fi
|
|
|
|
if pkg-config --exists $PKG; then
|
|
echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\"
|
|
echo libs=\"$(pkg-config --libs $PKG)\"
|
|
echo moc=\"$(pkg-config --variable=host_bins Qt5Core)/moc\"
|
|
exit 0
|
|
fi
|
|
|
|
if pkg-config --exists $PKG2; then
|
|
echo cflags=\"$(pkg-config --cflags $PKG2)\"
|
|
echo libs=\"$(pkg-config --libs $PKG2)\"
|
|
echo moc=\"$(pkg-config --variable=moc_location QtCore)\"
|
|
exit 0
|
|
fi
|
|
|
|
echo >&2 "*"
|
|
echo >&2 "* Could not find Qt via pkg-config."
|
|
echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"
|
|
echo >&2 "*"
|
|
exit 1
|