blob: 9b7472766f5d83637840be8075ee68e4b452e973 [file] [log] [blame]
Patrick Georgi53ea1d42019-11-22 16:55:58 +01001#!/bin/sh
Martin Rothbe08c1d2024-02-16 09:12:33 -07002# SPDX-License-Identifier: GPL-2.0-only
Patrick Georgi53ea1d42019-11-22 16:55:58 +01003
Patrick Georgi7eab8ef2023-11-20 18:03:34 +01004cflags=$1
5libs=$2
6
Patrick Georgi53ea1d42019-11-22 16:55:58 +01007PKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
8
Patrick Georgi1215cc72022-10-28 01:00:26 +02009if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
Patrick Georgi53ea1d42019-11-22 16:55:58 +010010 echo >&2 "*"
Patrick Georgi1215cc72022-10-28 01:00:26 +020011 echo >&2 "* 'make gconfig' requires '${HOSTPKG_CONFIG}'. Please install it."
Patrick Georgi53ea1d42019-11-22 16:55:58 +010012 echo >&2 "*"
13 exit 1
14fi
15
Patrick Georgi1215cc72022-10-28 01:00:26 +020016if ! ${HOSTPKG_CONFIG} --exists $PKG; then
Patrick Georgi53ea1d42019-11-22 16:55:58 +010017 echo >&2 "*"
18 echo >&2 "* Unable to find the GTK+ installation. Please make sure that"
19 echo >&2 "* the GTK+ 2.0 development package is correctly installed."
20 echo >&2 "* You need $PKG"
21 echo >&2 "*"
22 exit 1
23fi
24
Patrick Georgi1215cc72022-10-28 01:00:26 +020025if ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then
Patrick Georgi53ea1d42019-11-22 16:55:58 +010026 echo >&2 "*"
27 echo >&2 "* GTK+ is present but version >= 2.0.0 is required."
28 echo >&2 "*"
29 exit 1
30fi
31
Patrick Georgi7eab8ef2023-11-20 18:03:34 +010032${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
33${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}