--- configure.ac.orig 2014-11-25 16:21:55.000000000 -0500 +++ configure.ac 2014-11-26 13:22:19.000000000 -0500 @@ -617,7 +617,9 @@ AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) +dnl jdh orig AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) +dnl jdh orig AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes]) @@ -734,6 +736,7 @@ DRI2=no XF86VIDMODE=no XSELINUX=no +dnl jdh orig XV=no ;; darwin*) @@ -805,6 +808,10 @@ LIBDRI="dri >= 7.8.0" LIBDRM="libdrm >= 2.3.0" LIBGL="gl >= 7.1.0" +dnl jdh added +LIBXV="xv >= 1.0" +dnl jdh added +LIBXVMC="xvmc >= 1.0" LIBXEXT="xext >= 1.0.99.4" LIBXFONT="xfont >= 1.4.2" LIBXI="xi >= 1.2.99.1" @@ -823,6 +830,9 @@ REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES" +dnl . +dnl UDEV +dnl . if test "x$CONFIG_UDEV" = xyes && { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then AC_MSG_ERROR([Hotplugging through both libudev and dbus/hal not allowed]) @@ -948,20 +958,71 @@ LIBS="$LIBS $CLOCK_LIBS" fi +dnl jdh added +# +# XV autoconf +# AM_CONDITIONAL(XV, [test "x$XV" = xyes]) -if test "x$XV" = xyes; then - AC_DEFINE(XV, 1, [Support Xv extension]) - AC_DEFINE(XvExtension, 1, [Build Xv extension]) - REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" - SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" -else - XVMC=no +if test "x$XV" = xyes ; then + AC_DEFINE(USE_XV, 1, [Choose to use XV]) + PKG_CHECK_EXISTS(xv, [XV="yes"], [XV="no"]) +fi +if test "x$XV" = xyes ; then + PKG_CHECK_MODULES([XV], [$LIBXV], [HAVE_XV="yes"], [HAVE_XV="no"]) + if test "x$HAVE_XV" = xyes ; then + AC_DEFINE(XV, 1, [Support Xv extension]) + AC_DEFINE(XvExtension, 1, [Build Xv extension]) + AC_DEFINE(HAVE_XV, 1, [Support Xv]) + REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO $LIBXV" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO $LIBXV" + REQUIRED_LIBS="$REQUIRED_LIBS $LIBXV" + fi +fi +if test "x$HAVE_XV" = xno ; then + unset XV HAVE_XV + unset XVMC HAVE_XVMC fi - +dnl bug: many pkg .h use #if(def) IDENT not HAVE_IDENT, "no" is bad, undef var +# +# XVMC autoconf +# AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes]) -if test "x$XVMC" = xyes; then - AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) +if test "x$XVMC" = xyes ; then + AC_DEFINE(USE_XVMC, 1, [Choose to use XVMC]) + PKG_CHECK_EXISTS(xvmc, [XV="yes"], [XV="no"]) +fi +if test "x$XVMC" = xyes ; then + PKG_CHECK_MODULES([XVMC], [$LIBXVMC], [HAVE_XVMC="yes"], [HAVE_XVMC="no"]) + if test "x$HAVE_XVMC" = xyes; then + AC_DEFINE(XVMC, 1, [Support XvMC extension]) + AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) + AC_DEFINE(HAVE_XVMC, 1, [Support XvMC]) + REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO $LIBXV $LIBXVMC" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO $LIBXV $LIBXVMC" + REQUIRED_LIBS="$REQUIRED_LIBS $LIBXV $LIBXVMC" + fi +fi +# note code varies how such is used and often activate on presence not value +if test "x$HAVE_XVMC" = xno; then + unset XVMC HAVE_XVMC fi +# +dnl bug: many pkg .h use #if(def) IDENT not HAVE_IDENT, "no" is wrong, undef + +dnl orig +dnl AM_CONDITIONAL(XV, [test "x$XV" = xyes]) +dnl if test "x$XV" = xyes; then +dnl AC_DEFINE(XV, 1, [Support Xv extension]) +dnl AC_DEFINE(XvExtension, 1, [Build Xv extension]) +dnl REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" +dnl SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" +dnl else +dnl XVMC=no +dnl fi +dnl AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes]) +dnl if test "x$XVMC" = xyes; then +dnl AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) +dnl fi AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes]) if test "x$XREGISTRY" = xyes; then @@ -1915,6 +1976,7 @@ AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes && false]) AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false]) AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) +dnl jdh orig AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) dnl Darwin / OS X DDX @@ -2067,6 +2129,7 @@ fi XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp" +dnl jdh orig if test "x$XV" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv" fi