diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 88 |
1 files changed, 71 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 3584d347..d4c52456 100644 --- a/configure.ac +++ b/configure.ac @@ -384,24 +384,77 @@ return 0; ]) dnl Check for X11 +dnl *** X11 *** +translit(dnm, m, l) AM_CONDITIONAL(USE_X, true) +GST_CHECK_FEATURE(X, [X libraries and plugins], + [ximagesrc], [ + AC_PATH_XTRA + ac_cflags_save="$CFLAGS" + ac_cppflags_save="$CPPFLAGS" + CFLAGS="$CFLAGS $X_CFLAGS" + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + + dnl now try to find the HEADER + AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") + + if test "x$HAVE_X" = "xno" + then + AC_MSG_NOTICE([cannot find X11 development files]) + else + dnl this is much more than we want + X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS" + dnl AC_PATH_XTRA only defines the path needed to find the X libs, + dnl it does not add the libs; therefore we add them here + X_LIBS="$X_LIBS -lX11" + AC_SUBST(X_CFLAGS) + AC_SUBST(X_LIBS) + + 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) + + 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 + AC_SUBST(HAVE_X) + CFLAGS="$ac_cflags_save" + CPPFLAGS="$ac_cppflags_save" +]) -dnl now try to find the HEADER -AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") - -AC_PATH_XTRA - -if test "x$HAVE_X" = "xno" -then - AC_MSG_NOTICE([cannot find X11 development files]) -else - dnl this is much more than we want - X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS" - dnl AC_PATH_XTRA only defines the path needed to find the X libs, - dnl it does not add the libs; therefore we add them here - X_LIBS="$X_LIBS -lX11" - AC_SUBST(X_CFLAGS) - AC_SUBST(X_LIBS) -fi +dnl check for X Shm +translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true) +GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], [ximagesrc w/ xshm], [ + 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 *** BZ2 *** translit(bz2, m, l) AM_CONDITIONAL(USE_BZ2, true) @@ -661,6 +714,7 @@ gst/qtdemux/Makefile gst/tta/Makefile sys/Makefile sys/glsink/Makefile +sys/ximagesrc/Makefile examples/Makefile examples/directfb/Makefile ext/Makefile |