• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Revisionb9a72b9d8ca14e159a67c368d966ed6276f49bc9 (tree)
Zeit2017-06-20 14:42:51
AutorXiang, Haihao <haihao.xiang@inte...>
CommiterXiang, Haihao

Log Message

configure fails if requirement can't be met for user's explicit request

Notify user an error if user provides --enable-x11/--enable-glx/--enable-egl/--enable-wayland
however the requirement can't be met. drm has been checked mandatorily
in the script

v2: Remove XEXT_CFLAGS/XFIXES_CFLAGS from va/x11/Makefile.am and use
$X11_PKG_ERRORS in the error message if the requirement is met for VA/X11

This fixes https://github.com/01org/libva/issues/68

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>

Ändern Zusammenfassung

Diff

--- a/configure.ac
+++ b/configure.ac
@@ -136,23 +136,23 @@ AC_ARG_ENABLE(drm,
136136
137137 AC_ARG_ENABLE(x11,
138138 [AC_HELP_STRING([--enable-x11],
139- [build with VA/X11 API support @<:@default=yes@:>@])],
140- [], [enable_x11="yes"])
139+ [build with VA/X11 API support @<:@default=auto@:>@])],
140+ [], [enable_x11="auto"])
141141
142142 AC_ARG_ENABLE(glx,
143143 [AC_HELP_STRING([--enable-glx],
144- [build with VA/GLX API support @<:@default=yes@:>@])],
145- [], [enable_glx="yes"])
144+ [build with VA/GLX API support @<:@default=auto@:>@])],
145+ [], [enable_glx="auto"])
146146
147147 AC_ARG_ENABLE(egl,
148148 [AC_HELP_STRING([--enable-egl],
149- [build with VA/EGL API support @<:@default=yes@:>@])],
150- [], [enable_egl="yes"])
149+ [build with VA/EGL API support @<:@default=auto@:>@])],
150+ [], [enable_egl="auto"])
151151
152152 AC_ARG_ENABLE([wayland],
153153 [AC_HELP_STRING([--enable-wayland],
154- [build with VA/Wayland API support @<:@default=yes@:>@])],
155- [], [enable_wayland="yes"])
154+ [build with VA/Wayland API support @<:@default=auto@:>@])],
155+ [], [enable_wayland="auto"])
156156
157157 AC_ARG_ENABLE([va-messaging],
158158 [AC_HELP_STRING([--enable-va-messaging],
@@ -228,11 +228,13 @@ AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes")
228228
229229 # Check for X11
230230 USE_X11="no"
231-if test "$enable_x11" = "yes"; then
232- USE_X11="yes"
233- PKG_CHECK_MODULES([X11], [x11], [:], [USE_X11="no"])
234- PKG_CHECK_MODULES([XEXT], [xext], [:], [USE_X11="no"])
235- PKG_CHECK_MODULES([XFIXES], [xfixes], [:], [USE_X11="no"])
231+if test "x$enable_x11" != "xno"; then
232+ PKG_CHECK_MODULES([X11], [x11 xext xfixes], [USE_X11="yes"], [:])
233+
234+ if test "x$USE_X11" = "xno" -a "x$enable_x11" = "xyes"; then
235+ AC_MSG_ERROR([VA/X11 explicitly enabled, however $X11_PKG_ERRORS])
236+ fi
237+
236238 if test "$USE_X11" = "yes"; then
237239 AC_DEFINE([HAVE_VA_X11], [1], [Defined to 1 if VA/X11 API is built])
238240 fi
@@ -241,7 +243,12 @@ AM_CONDITIONAL(USE_X11, test "$USE_X11" = "yes")
241243
242244 # Check for GLX
243245 USE_GLX="no"
244-if test "$USE_X11:$enable_glx" = "yes:yes"; then
246+
247+if test "$USE_X11:$enable_glx" = "no:yes"; then
248+ AC_MSG_ERROR([VA/GLX explicitly enabled, but VA/X11 isn't built])
249+fi
250+
251+if test "$USE_X11:$enable_glx" != "yes:no"; then
245252 PKG_CHECK_MODULES([GLX], [gl x11], [USE_GLX="yes"], [:])
246253 saved_CPPFLAGS="$CPPFLAGS"
247254 saved_LIBS="$LIBS"
@@ -251,6 +258,11 @@ if test "$USE_X11:$enable_glx" = "yes:yes"; then
251258 AC_CHECK_LIB([GL], [glXCreateContext], [:] [USE_GLX="no"])
252259 CPPFLAGS="$saved_CPPFLAGS"
253260 LIBS="$saved_LIBS"
261+
262+ if test "x$USE_GLX" = "xno" -a "x$enable_glx" = "xyes"; then
263+ AC_MSG_ERROR([VA/GLX explicitly enabled, but libGL couldn't be found])
264+ fi
265+
254266 if test "$USE_GLX" = "yes"; then
255267 AC_DEFINE([HAVE_VA_GLX], [1], [Defined to 1 if VA/GLX API is built])
256268 fi
@@ -259,7 +271,7 @@ AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
259271
260272 # Check for EGL
261273 USE_EGL="no"
262-if test "$enable_egl" = "yes"; then
274+if test "x$enable_egl" != "xno"; then
263275 PKG_CHECK_MODULES([EGL], [egl], [USE_EGL="yes"], [:])
264276 saved_CPPFLAGS="$CPPFLAGS"
265277 saved_LIBS="$LIBS"
@@ -269,6 +281,11 @@ if test "$enable_egl" = "yes"; then
269281 AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL="no"])
270282 CPPFLAGS="$saved_CPPFLAGS"
271283 LIBS="$saved_LIBS"
284+
285+ if test "x$USE_EGL" = "xno" -a "x$enable_egl" = "xyes"; then
286+ AC_MSG_ERROR([VA/EGL explicitly enabled, but libEGL couldn't be found])
287+ fi
288+
272289 if test "$USE_EGL" = "yes"; then
273290 AC_DEFINE([HAVE_VA_EGL], [1], [Defined to 1 if VA/EGL API is built])
274291 fi
@@ -280,9 +297,14 @@ WAYLAND_API_VERSION=wayland_api_version
280297 AC_SUBST(WAYLAND_API_VERSION)
281298
282299 USE_WAYLAND="no"
283-if test "$enable_wayland" = "yes"; then
300+if test "x$enable_wayland" != "xno"; then
284301 PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version],
285302 [USE_WAYLAND="yes"], [:])
303+
304+ if test "x$USE_WAYLAND" = "xno" -a "x$enable_wayland" = "xyes"; then
305+ AC_MSG_ERROR([wayland explicitly enabled, however $WAYLAND_PKG_ERRORS])
306+ fi
307+
286308 if test "$USE_WAYLAND" = "yes"; then
287309
288310 WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
--- a/va/x11/Makefile.am
+++ b/va/x11/Makefile.am
@@ -25,8 +25,6 @@ AM_CPPFLAGS = \
2525 -I$(top_srcdir) \
2626 -I$(top_srcdir)/va \
2727 $(X11_CFLAGS) \
28- $(XEXT_CFLAGS) \
29- $(XFIXES_CFLAGS) \
3028 $(DRM_CFLAGS) \
3129 $(NULL)
3230