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.
This commit is contained in:
Stefan Seyfried
2013-04-27 22:02:02 +02:00
parent e9181efdad
commit 4d4dad4536

View File

@@ -317,6 +317,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
@@ -327,7 +328,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
])