xref: /openbmc/linux/scripts/kconfig/gconf-cfg.sh (revision 3122c844)
1b464ef58SMasahiro Yamada#!/bin/sh
2b464ef58SMasahiro Yamada# SPDX-License-Identifier: GPL-2.0
3b464ef58SMasahiro Yamada
4*3122c844SMasahiro Yamadacflags=$1
5*3122c844SMasahiro Yamadalibs=$2
6*3122c844SMasahiro Yamada
7b464ef58SMasahiro YamadaPKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
8b464ef58SMasahiro Yamada
9d5ea4fecSChun-Tse Shaoif [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
10fd65465bSMasahiro Yamada	echo >&2 "*"
11d5ea4fecSChun-Tse Shao	echo >&2 "* 'make gconfig' requires '${HOSTPKG_CONFIG}'. Please install it."
12fd65465bSMasahiro Yamada	echo >&2 "*"
13fd65465bSMasahiro Yamada	exit 1
14fd65465bSMasahiro Yamadafi
15fd65465bSMasahiro Yamada
16d5ea4fecSChun-Tse Shaoif ! ${HOSTPKG_CONFIG} --exists $PKG; then
17b464ef58SMasahiro Yamada	echo >&2 "*"
18b464ef58SMasahiro Yamada	echo >&2 "* Unable to find the GTK+ installation. Please make sure that"
19b464ef58SMasahiro Yamada	echo >&2 "* the GTK+ 2.0 development package is correctly installed."
20b464ef58SMasahiro Yamada	echo >&2 "* You need $PKG"
21b464ef58SMasahiro Yamada	echo >&2 "*"
22b464ef58SMasahiro Yamada	exit 1
23b464ef58SMasahiro Yamadafi
24b464ef58SMasahiro Yamada
25d5ea4fecSChun-Tse Shaoif ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then
26b464ef58SMasahiro Yamada	echo >&2 "*"
27b464ef58SMasahiro Yamada	echo >&2 "* GTK+ is present but version >= 2.0.0 is required."
28b464ef58SMasahiro Yamada	echo >&2 "*"
29b464ef58SMasahiro Yamada	exit 1
30b464ef58SMasahiro Yamadafi
31b464ef58SMasahiro Yamada
32*3122c844SMasahiro Yamada${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
33*3122c844SMasahiro Yamada${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
34