acinclude: 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.
This commit is contained in:
Stefan Seyfried
2013-05-04 11:34:24 +02:00
parent cae8a88e26
commit 17f5c32a19

View File

@@ -225,6 +225,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
@@ -235,7 +236,7 @@ AC_SUBST($1_LIBS)
AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG],[
_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
if test -z "$$1_CFLAGS" ; then
if test x"$$1_EXISTS" != xyes; then
AC_MSG_ERROR([could not find package $2]);
fi
])