X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=configure.ac;h=bd74df857f2c9904668dd0379895c2827a3cf0cc;hb=b9a72b9d8ca14e159a67c368d966ed6276f49bc9;hp=557618ac72ea364ce597bbe4c810774b8f368329;hpb=4763db1c2133d4e6b92355938ecb6f23a7767b6b;p=android-x86%2Fhardware-intel-common-libva.git diff --git a/configure.ac b/configure.ac index 557618a..bd74df8 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ # - reset micro version to zero when minor version is incremented # - reset minor version to zero when major version is incremented m4_define([va_api_major_version], [0]) -m4_define([va_api_minor_version], [38]) +m4_define([va_api_minor_version], [40]) m4_define([va_api_micro_version], [0]) m4_define([va_api_version], @@ -42,7 +42,7 @@ m4_define([va_api_version], # - reset micro version to zero when VA-API major or minor version is changed m4_define([libva_major_version], [m4_eval(va_api_major_version + 1)]) m4_define([libva_minor_version], [m4_eval(va_api_minor_version - 32)]) -m4_define([libva_micro_version], [0]) +m4_define([libva_micro_version], [4]) m4_define([libva_pre_version], [1]) m4_define([libva_version], @@ -78,10 +78,16 @@ m4_define([libva_lt_age], m4_define([libdrm_version], [2.4]) # Wayland minimum version number -m4_define([wayland_api_version], [1.0.0]) +# 1.11.0 for wl_proxy_create_wrapper +m4_define([wayland_api_version], [1.11.0]) AC_PREREQ(2.57) -AC_INIT([libva], [libva_version], [waldo.bastian@intel.com], libva) +AC_INIT([libva], + [libva_version], + [https://github.com/01org/libva/issues/new], + [libva], + [https://github.com/01org/libva]) + AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([dist-bzip2]) @@ -130,29 +136,28 @@ AC_ARG_ENABLE(drm, AC_ARG_ENABLE(x11, [AC_HELP_STRING([--enable-x11], - [build with VA/X11 API support @<:@default=yes@:>@])], - [], [enable_x11="yes"]) + [build with VA/X11 API support @<:@default=auto@:>@])], + [], [enable_x11="auto"]) AC_ARG_ENABLE(glx, [AC_HELP_STRING([--enable-glx], - [build with VA/GLX API support @<:@default=yes@:>@])], - [], [enable_glx="yes"]) + [build with VA/GLX API support @<:@default=auto@:>@])], + [], [enable_glx="auto"]) AC_ARG_ENABLE(egl, [AC_HELP_STRING([--enable-egl], - [build with VA/EGL API support @<:@default=yes@:>@])], - [], [enable_egl="yes"]) + [build with VA/EGL API support @<:@default=auto@:>@])], + [], [enable_egl="auto"]) AC_ARG_ENABLE([wayland], [AC_HELP_STRING([--enable-wayland], - [build with VA/Wayland API support @<:@default=yes@:>@])], - [], [enable_wayland="yes"]) + [build with VA/Wayland API support @<:@default=auto@:>@])], + [], [enable_wayland="auto"]) -AC_ARG_ENABLE(dummy-driver, - [AC_HELP_STRING([--enable-dummy-driver], - [build dummy video driver @<:@default=yes@:>@])], - [], [enable_dummy_driver="yes"]) -AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes) +AC_ARG_ENABLE([va-messaging], + [AC_HELP_STRING([--enable-va-messaging], + [build with va info and error messaging @<:@default=yes@:>@])], + [], [enable_va_messaging="yes"]) AC_ARG_WITH(drivers-path, [AC_HELP_STRING([--with-drivers-path=[[path]]], @@ -167,6 +172,7 @@ AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_CXX AM_PROG_CC_C_O +AC_PROG_SED PKG_PROG_PKG_CONFIG AC_HEADER_STDC @@ -181,6 +187,11 @@ if test "$enable_docs" = "yes"; then fi AM_CONDITIONAL(ENABLE_DOCS, test "$enable_docs" = "yes") +# Check for va messaging +if test "$enable_va_messaging" = "yes"; then + AC_DEFINE([ENABLE_VA_MESSAGING], [1], [Defined to 1 if va messaging is needed]) +fi + # Check for __attribute__((visibility())) AC_CACHE_CHECK([whether __attribute__((visibility())) is supported], ac_cv_have_gnuc_visibility_attribute, @@ -217,11 +228,13 @@ AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes") # Check for X11 USE_X11="no" -if test "$enable_x11" = "yes"; then - USE_X11="yes" - PKG_CHECK_MODULES([X11], [x11], [:], [USE_X11="no"]) - PKG_CHECK_MODULES([XEXT], [xext], [:], [USE_X11="no"]) - PKG_CHECK_MODULES([XFIXES], [xfixes], [:], [USE_X11="no"]) +if test "x$enable_x11" != "xno"; then + PKG_CHECK_MODULES([X11], [x11 xext xfixes], [USE_X11="yes"], [:]) + + if test "x$USE_X11" = "xno" -a "x$enable_x11" = "xyes"; then + AC_MSG_ERROR([VA/X11 explicitly enabled, however $X11_PKG_ERRORS]) + fi + if test "$USE_X11" = "yes"; then AC_DEFINE([HAVE_VA_X11], [1], [Defined to 1 if VA/X11 API is built]) fi @@ -230,7 +243,12 @@ AM_CONDITIONAL(USE_X11, test "$USE_X11" = "yes") # Check for GLX USE_GLX="no" -if test "$USE_X11:$enable_glx" = "yes:yes"; then + +if test "$USE_X11:$enable_glx" = "no:yes"; then + AC_MSG_ERROR([VA/GLX explicitly enabled, but VA/X11 isn't built]) +fi + +if test "$USE_X11:$enable_glx" != "yes:no"; then PKG_CHECK_MODULES([GLX], [gl x11], [USE_GLX="yes"], [:]) saved_CPPFLAGS="$CPPFLAGS" saved_LIBS="$LIBS" @@ -240,6 +258,11 @@ if test "$USE_X11:$enable_glx" = "yes:yes"; then AC_CHECK_LIB([GL], [glXCreateContext], [:] [USE_GLX="no"]) CPPFLAGS="$saved_CPPFLAGS" LIBS="$saved_LIBS" + + if test "x$USE_GLX" = "xno" -a "x$enable_glx" = "xyes"; then + AC_MSG_ERROR([VA/GLX explicitly enabled, but libGL couldn't be found]) + fi + if test "$USE_GLX" = "yes"; then AC_DEFINE([HAVE_VA_GLX], [1], [Defined to 1 if VA/GLX API is built]) fi @@ -248,7 +271,7 @@ AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes") # Check for EGL USE_EGL="no" -if test "$enable_egl" = "yes"; then +if test "x$enable_egl" != "xno"; then PKG_CHECK_MODULES([EGL], [egl], [USE_EGL="yes"], [:]) saved_CPPFLAGS="$CPPFLAGS" saved_LIBS="$LIBS" @@ -258,6 +281,11 @@ if test "$enable_egl" = "yes"; then AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL="no"]) CPPFLAGS="$saved_CPPFLAGS" LIBS="$saved_LIBS" + + if test "x$USE_EGL" = "xno" -a "x$enable_egl" = "xyes"; then + AC_MSG_ERROR([VA/EGL explicitly enabled, but libEGL couldn't be found]) + fi + if test "$USE_EGL" = "yes"; then AC_DEFINE([HAVE_VA_EGL], [1], [Defined to 1 if VA/EGL API is built]) fi @@ -269,19 +297,29 @@ WAYLAND_API_VERSION=wayland_api_version AC_SUBST(WAYLAND_API_VERSION) USE_WAYLAND="no" -if test "$enable_wayland" = "yes"; then +if test "x$enable_wayland" != "xno"; then PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version], [USE_WAYLAND="yes"], [:]) + + if test "x$USE_WAYLAND" = "xno" -a "x$enable_wayland" = "xyes"; then + AC_MSG_ERROR([wayland explicitly enabled, however $WAYLAND_PKG_ERRORS]) + fi + if test "$USE_WAYLAND" = "yes"; then + + WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client` + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],, + [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH]) + if test "x$WAYLAND_SCANNER" = "x"; then + AC_MSG_ERROR([wayland-scanner not found: Install it or use --disable-wayland]) + fi + AC_DEFINE([HAVE_VA_WAYLAND], [1], [Defined to 1 if VA/Wayland API is built]) fi fi -AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes") -m4_ifdef([WAYLAND_SCANNER_RULES], - [WAYLAND_SCANNER_RULES(['$(top_builddir)/va/wayland/protocol'])], - [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)]) +AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes") pkgconfigdir=${libdir}/pkgconfig AC_SUBST(pkgconfigdir) @@ -291,30 +329,9 @@ if test "$USE_DRM:$USE_X11:$USE_WAYLAND" = "no:no:no"; then AC_MSG_ERROR([Please select at least one backend (DRM, X11, Wayland)]) fi -# Define __vaDriverInit*() function name for dummy backend -VA_DRIVER_INIT_FUNC="__vaDriverInit_${VA_API_MAJOR_VERSION}_${VA_API_MINOR_VERSION}" -AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC], - [Defined to the versioned __vaDriverInit function name]) - AC_OUTPUT([ Makefile - debian.upstream/Makefile - debian.upstream/changelog - debian.upstream/control - debian.upstream/libva$LIBVA_MAJOR_VERSION.install:\ -debian.upstream/libva.install.in - debian.upstream/libva-drm$LIBVA_MAJOR_VERSION.install:\ -debian.upstream/libva-drm.install.in - debian.upstream/libva-egl$LIBVA_MAJOR_VERSION.install:\ -debian.upstream/libva-egl.install.in - debian.upstream/libva-glx$LIBVA_MAJOR_VERSION.install:\ -debian.upstream/libva-glx.install.in - debian.upstream/libva-wayland$LIBVA_MAJOR_VERSION.install:\ -debian.upstream/libva-wayland.install.in - debian.upstream/libva-x11-$LIBVA_MAJOR_VERSION.install:\ -debian.upstream/libva-x11.install.in doc/Makefile - dummy_drv_video/Makefile pkgconfig/Makefile pkgconfig/libva-drm.pc pkgconfig/libva-egl.pc @@ -323,20 +340,12 @@ debian.upstream/libva-x11.install.in pkgconfig/libva-wayland.pc pkgconfig/libva-x11.pc pkgconfig/libva.pc - test/Makefile - test/basic/Makefile - test/common/Makefile - test/decode/Makefile - test/encode/Makefile - test/putsurface/Makefile - test/vainfo/Makefile va/Makefile va/drm/Makefile va/egl/Makefile va/glx/Makefile va/va_version.h va/wayland/Makefile - va/wayland/protocol/Makefile va/x11/Makefile ]) @@ -354,6 +363,6 @@ echo echo Installation prefix .............. : $prefix echo Default driver path .............. : $LIBVA_DRIVERS_PATH echo Extra window systems ............. : $BACKENDS -echo Build dummy driver ............... : $enable_dummy_driver echo Build documentation .............. : $enable_docs +echo Build with messaging ............. : $enable_va_messaging echo