mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
configure: use pkg-config to detect x11 and simplify checks
AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE. https://bugzilla.gnome.org/show_bug.cgi?id=731047
This commit is contained in:
parent
6ea83d97c5
commit
09b1ba9491
1 changed files with 18 additions and 46 deletions
64
configure.ac
64
configure.ac
|
@ -554,55 +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], [
|
||||
AG_GST_CHECK_X
|
||||
|
||||
if test "x$HAVE_X" = "xyes"
|
||||
then
|
||||
PKG_CHECK_MODULES(X, x11, [
|
||||
dnl check for Xfixes
|
||||
PKG_CHECK_MODULES(XFIXES, xfixes, HAVE_XFIXES="yes", HAVE_XFIXES="no")
|
||||
if test "x$HAVE_XFIXES" = "xyes"
|
||||
then
|
||||
XFIXES_CFLAGS="-DHAVE_XFIXES $XFIXES_CFLAGS"
|
||||
fi
|
||||
AC_SUBST(XFIXES_LIBS)
|
||||
AC_SUBST(XFIXES_CFLAGS)
|
||||
PKG_CHECK_MODULES(XFIXES, xfixes, [
|
||||
AC_DEFINE(HAVE_XFIXES, 1, [Defined if Xfixes is available])
|
||||
])
|
||||
|
||||
dnl check for Xdamage
|
||||
PKG_CHECK_MODULES(XDAMAGE, xdamage, HAVE_XDAMAGE="yes", HAVE_XDAMAGE="no")
|
||||
if test "x$HAVE_XDAMAGE" = "xyes"
|
||||
then
|
||||
XDAMAGE_CFLAGS="-DHAVE_XDAMAGE $XDAMAGE_CFLAGS"
|
||||
fi
|
||||
AC_SUBST(XDAMAGE_LIBS)
|
||||
AC_SUBST(XDAMAGE_CFLAGS)
|
||||
fi
|
||||
])
|
||||
PKG_CHECK_MODULES(XDAMAGE, xdamage, [
|
||||
AC_DEFINE(HAVE_XDAMAGE, 1, [Defined if Xdamage is available])
|
||||
])
|
||||
|
||||
dnl FIXME: this should be rolled into the test above, it's just an additional
|
||||
dnl feature of the ximagesrc plug-in
|
||||
dnl This is the same as in gst-plugins-base
|
||||
dnl check for X Shm
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true)
|
||||
AG_GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [
|
||||
if test x$HAVE_X = xyes; then
|
||||
AC_CHECK_LIB(Xext, XShmAttach,
|
||||
HAVE_XSHM="yes", HAVE_XSHM="no",
|
||||
$X_LIBS)
|
||||
if test "x$HAVE_XSHM" = "xyes"; then
|
||||
XSHM_LIBS="-lXext"
|
||||
else
|
||||
dnl On AIX, it is in XextSam instead, but we still need -lXext
|
||||
AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
HAVE_XSHM="yes", HAVE_XSHM="no",
|
||||
$X_LIBS)
|
||||
if test "x$HAVE_XSHM" = "xyes"; then
|
||||
XSHM_LIBS="-lXext -lXextSam"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
], ,[
|
||||
AC_SUBST(HAVE_XSHM)
|
||||
AC_SUBST(XSHM_LIBS)
|
||||
dnl check for X Shm
|
||||
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 ])
|
||||
])
|
||||
AC_SUBST(XSHM_LIBS)
|
||||
AC_SUBST(XSHM_CFLAGS)
|
||||
])
|
||||
])
|
||||
|
||||
dnl *** ext plug-ins ***
|
||||
|
@ -940,7 +913,6 @@ AM_CONDITIONAL(USE_VPX, false)
|
|||
AM_CONDITIONAL(USE_WAVEFORM, false)
|
||||
AM_CONDITIONAL(USE_WAVPACK, false)
|
||||
AM_CONDITIONAL(USE_X, false)
|
||||
AM_CONDITIONAL(USE_XSHM, false)
|
||||
AM_CONDITIONAL(USE_ZLIB, false)
|
||||
|
||||
fi dnl of EXT plugins
|
||||
|
|
Loading…
Reference in a new issue