configure: fix x11 checks to be non-fatal again

Must pass an action-if-not-found argument to
PKG_CHECK_MODULES or it will error out when
it can't find the module requested. Also fix
AC_CHECK_LIB usage, extra libs argument was
in the wrong place.
This commit is contained in:
Tim-Philipp Müller 2014-08-11 09:26:17 +01:00
parent 9dd48c503c
commit eefa8c366e

View file

@ -554,28 +554,28 @@ dnl Check for X11
translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
AG_GST_CHECK_FEATURE(X, [X libraries and plugins],
[ximagesrc], [
PKG_CHECK_MODULES(X, x11, [
PKG_CHECK_MODULES([X], [x11], [
dnl check for Xfixes
PKG_CHECK_MODULES(XFIXES, xfixes, [
PKG_CHECK_MODULES([XFIXES], [ xfixes ], [
AC_DEFINE(HAVE_XFIXES, 1, [Defined if Xfixes is available])
])
], [ HAVE_XFIXES="no" ])
dnl check for Xdamage
PKG_CHECK_MODULES(XDAMAGE, xdamage, [
PKG_CHECK_MODULES([XDAMAGE], [ xdamage ], [
AC_DEFINE(HAVE_XDAMAGE, 1, [Defined if Xdamage is available])
])
], [ HAVE_XDAMAGE="no" ])
dnl check for X Shm
PKG_CHECK_MODULES(XEXT, xext, [
AC_CHECK_LIB(Xext, XShmAttach, [
PKG_CHECK_MODULES([XEXT], [ xext ], [
AC_CHECK_LIB([Xext], [ XShmAttach ], [
AC_DEFINE(HAVE_XSHM, 1, [Defined if XShm is available])
XSHM_LIBS="$XEXT_LIBS"
XSHM_CFLAGS="$XEXT_CFLAGS"
], [ $X_LIBS ])
], [ HAVE_XEXT="no" ] , [ $X_LIBS ])
])
AC_SUBST(XSHM_LIBS)
AC_SUBST(XSHM_CFLAGS)
])
], [ HAVE_X="no" ])
])
dnl *** ext plug-ins ***