X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=configure.ac;h=ad53d0afac1dbf2fcb84c034a2fb20d143dc990b;hb=5660d45eb8b96057b88a8553066ebe8055844c06;hp=741b288a41589e6aa97de8a7861b8c81e5b8ba88;hpb=6ce91ae201d0320664bb1d440973e57f6acee017;p=android-x86%2Fhardware-intel-common-libva.git diff --git a/configure.ac b/configure.ac index 741b288..ad53d0a 100644 --- a/configure.ac +++ b/configure.ac @@ -21,13 +21,13 @@ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # VA-API version -# - increment major for any ABI change (which shall not occur!) +# - increment major for any ABI change # - increment minor for any interface change (e.g. new/modified function) # - increment micro for any other change (new flag, new codec definition, etc.) # - 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], [40]) +m4_define([va_api_major_version], [1]) +m4_define([va_api_minor_version], [0]) m4_define([va_api_micro_version], [0]) m4_define([va_api_version], @@ -41,8 +41,8 @@ m4_define([va_api_version], # - increment micro for any library release # - 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], [4]) +m4_define([libva_minor_version], [m4_eval(va_api_minor_version)]) +m4_define([libva_micro_version], [1]) m4_define([libva_pre_version], [1]) m4_define([libva_version], @@ -136,23 +136,18 @@ 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"]) - -AC_ARG_ENABLE(egl, - [AC_HELP_STRING([--enable-egl], - [build with VA/EGL API support @<:@default=yes@:>@])], - [], [enable_egl="yes"]) + [build with VA/GLX API support @<:@default=auto@:>@])], + [], [enable_glx="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([va-messaging], [AC_HELP_STRING([--enable-va-messaging], @@ -172,6 +167,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 @@ -227,11 +223,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 @@ -240,7 +238,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" @@ -250,38 +253,30 @@ 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 fi AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes") -# Check for EGL -USE_EGL="no" -if test "$enable_egl" = "yes"; then - PKG_CHECK_MODULES([EGL], [egl], [USE_EGL="yes"], [:]) - saved_CPPFLAGS="$CPPFLAGS" - saved_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $EGL_CFLAGS" - LIBS="$LIBS $EGL_LIBS" - AC_CHECK_HEADERS([EGL/egl.h], [:], [USE_EGL="no"]) - AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL="no"]) - CPPFLAGS="$saved_CPPFLAGS" - LIBS="$saved_LIBS" - if test "$USE_EGL" = "yes"; then - AC_DEFINE([HAVE_VA_EGL], [1], [Defined to 1 if VA/EGL API is built]) - fi -fi -AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes") - # Check for Wayland 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` @@ -311,15 +306,12 @@ AC_OUTPUT([ doc/Makefile pkgconfig/Makefile pkgconfig/libva-drm.pc - pkgconfig/libva-egl.pc pkgconfig/libva-glx.pc - pkgconfig/libva-tpi.pc pkgconfig/libva-wayland.pc pkgconfig/libva-x11.pc pkgconfig/libva.pc va/Makefile va/drm/Makefile - va/egl/Makefile va/glx/Makefile va/va_version.h va/wayland/Makefile @@ -331,7 +323,6 @@ BACKENDS="" AS_IF([test x$USE_DRM = xyes], [BACKENDS="$BACKENDS drm"]) AS_IF([test x$USE_X11 = xyes], [BACKENDS="$BACKENDS x11"]) AS_IF([test x$USE_GLX = xyes], [BACKENDS="$BACKENDS glx"]) -AS_IF([test x$USE_EGL = xyes], [BACKENDS="$BACKENDS egl"]) AS_IF([test x$USE_WAYLAND = xyes], [BACKENDS="$BACKENDS wayland"]) echo