Skip to content

Commit 71919fc

Browse files
U. Artie Eoffxhaihao
authored andcommitted
configure: libva-xyz should be same version as detected libva
This will help prevent erroneous linking to mixed versions of libva-xyz window system libraries that may not be binary compatible. For example, 1. User installs libva-dev from distro packages that provides all libva-xyz.pc/.so window system libraries. 2. Then, user compiles and installs libva from source with 1 or more [auto] disabled libva-xyz window system libraries. 3. Finally, user compiles libva-utils from source, but configure finds a mix of distro installed and user compiled libva-xyz window system libraries and encounters linker error when not binary compatible with user installed libva.so. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
1 parent 4cd4308 commit 71919fc

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

configure.ac

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ if test "X$CC-cc" != "X"; then
142142
fi
143143
AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes")
144144

145-
# Check for DRM (mandatory)
146-
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm libdrm])
147-
148145
# Check for libva (for dynamic linking)
149146
LIBVA_API_MIN_VERSION=libva_api_min_version
150147
PKG_CHECK_MODULES([LIBVA], [libva >= $LIBVA_API_MIN_VERSION])
@@ -155,7 +152,8 @@ VA_MAJOR_VERSION=`echo "$LIBVA_API_VERSION" | cut -d'.' -f1`
155152
VA_MINOR_VERSION=`echo "$LIBVA_API_VERSION" | cut -d'.' -f2`
156153
VA_MICRO_VERSION=`echo "$LIBVA_API_VERSION" | cut -d'.' -f3`
157154

158-
155+
# Check for DRM (mandatory)
156+
PKG_CHECK_MODULES([LIBVA_DRM], [libdrm libva-drm = $LIBVA_API_VERSION])
159157

160158
USE_DRM="no"
161159
if test "$enable_drm" = "yes"; then
@@ -167,7 +165,7 @@ AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes")
167165
# Check for X11
168166
USE_X11="no"
169167
if test "x$enable_x11" != "xno"; then
170-
PKG_CHECK_MODULES([X11], [x11 libva-x11],
168+
PKG_CHECK_MODULES([X11], [x11 libva-x11 = $LIBVA_API_VERSION],
171169
[USE_X11="yes"], [:])
172170

173171
if test "x$USE_X11" = "xno" -a "x$enable_x11" = "xyes"; then
@@ -186,7 +184,7 @@ AC_SUBST(WAYLAND_API_VERSION)
186184

187185
USE_WAYLAND="no"
188186
if test "x$enable_wayland" != "xno"; then
189-
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version libva-wayland],
187+
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version libva-wayland = $LIBVA_API_VERSION],
190188
[USE_WAYLAND="yes"], [:])
191189

192190
if test "x$USE_WAYLAND" = "xno" -a "x$enable_wayland" = "xyes"; then

0 commit comments

Comments
 (0)