From 79184569fcae4456070133d8659ecd02d8414ff7 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 27 Apr 2013 22:02:02 +0200 Subject: [PATCH] acinclude: better fix for pkg-config 0.28 behaviour Old pkg-config always retured a non-empty string for --cflags. It always contained at least one bogus space. New pkg-config does not do that. Do not rely on --cflags being non-empty. --- acinclude.m4 | 3 ++- configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index b5e2bae2f..c40fd2a4a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -268,6 +268,7 @@ if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) $1_CFLAGS=$($PKG_CONFIG --cflags "$2") $1_LIBS=$($PKG_CONFIG --libs "$2") + $1_EXISTS=yes else AC_MSG_RESULT(no) fi @@ -278,7 +279,7 @@ AC_SUBST($1_LIBS) AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG],[ _TUXBOX_APPS_LIB_PKGCONFIG($1,$2) -if test -z "$$1_CFLAGS" && test -z "$$1_LIBS"; then +if test x"$$1_EXISTS" != xyes; then AC_MSG_ERROR([could not find package $2]); fi ]) diff --git a/configure.ac b/configure.ac index 057e98ba0..9f538a33b 100644 --- a/configure.ac +++ b/configure.ac @@ -46,11 +46,11 @@ TUXBOX_APPS_LIB_CONFIG(CURL,curl-config) TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config) # TUXBOX_APPS_LIB_PKGCONFIG(OPENSSL,openssl) TUXBOX_APPS_LIB_PKGCONFIG_CHECK(ID3TAG,libid3tag) -if test -z "$ID3TAG_CFLAGS" ; then +if test x"$ID3TAG_EXISTS" != xyes; then TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag) fi TUXBOX_APPS_LIB_PKGCONFIG_CHECK(MAD,libmad) -if test -z "$MAD_CFLAGS" ; then +if test x"$MAD_EXISTS" != xyes; then TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad) fi TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)