aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorBastien Bouclet2018-07-30 13:40:55 +0200
committerBastien Bouclet2018-08-04 07:55:23 +0200
commitdf613af817c97b300555355848c4469f16302122 (patch)
treeaac17dc77e541d8ef74682e9f32df74a00b8803a /configure
parent2a0a5f496574aa576b0fcdc5f0e8b683ce1070d2 (diff)
downloadscummvm-rg350-df613af817c97b300555355848c4469f16302122.tar.gz
scummvm-rg350-df613af817c97b300555355848c4469f16302122.tar.bz2
scummvm-rg350-df613af817c97b300555355848c4469f16302122.zip
BUILD: Check if pkg-config is available
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure b/configure
index 46d036e56e..05c57177a3 100755
--- a/configure
+++ b/configure
@@ -4010,6 +4010,18 @@ EOF
cc_check -lm && append_var LIBS "-lm"
#
+# Check for pkg-config
+#
+echocheck "pkg-config"
+_pkg_config=no
+command -v pkg-config >/dev/null 2>&1 && _pkg_config=yes
+echo "$_pkg_config"
+
+if test "$_pkg_config" = yes && test -n "$_host" && test -z "$PKG_CONFIG_LIBDIR"; then
+ echo "WARNING: When cross-compiling PKG_CONFIG_LIBDIR must be set to the location of the .pc files for the target"
+fi
+
+#
# Check for Ogg
#
echocheck "Ogg"
@@ -4687,7 +4699,7 @@ define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE_FOR_DEBUGGER'
# Check for Unity if taskbar integration is enabled
#
echocheck "libunity"
-if test "$_unix" = no || test "$_taskbar" = no; then
+if test "$_unix" = no || test "$_taskbar" = no || test "$_pkg_config" = no; then
_libunity=no
else
if test "$_libunity" = auto ; then
@@ -4733,8 +4745,7 @@ find_freetype() {
# pkg-config.
# As of freetype-2.9.1 the freetype-config file
# no longer gets installed by default.
-
- if pkg-config --exists freetype2; then
+ if test "$_pkg_config" = "yes" && pkg-config --exists freetype2; then
FREETYPE2_LIBS=`pkg-config --libs freetype2`
FREETYPE2_CFLAGS=`pkg-config --cflags freetype2`
FREETYPE2_STATIC_LIBS=`pkg-config --static --libs freetype2`