Hi gents, Just a small suggestion
On 2 April 2015 at 22:29, Chris Wilson <[email protected]> wrote: > On Thu, Apr 02, 2015 at 04:30:24PM +0200, Gwenole Beauchesne wrote: ... >> diff --git a/configure.ac b/configure.ac >> index d71a3cc..3c19cd2 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -76,6 +76,25 @@ LIBDRM_VERSION=libdrm_version >> PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION]) >> AC_SUBST(LIBDRM_VERSION) >> >> +AC_CACHE_CHECK([whether libdrm supports userptr allocations], >> + [ac_cv_libdrm_has_userptr], >> + [saved_CPPFLAGS="$CPPFLAGS" >> + saved_CFLAGS="$CFLAGS" >> + CPPFLAGS="$CPPFLAGS $DRM_CFLAGS" >> + LIBS="$LIBS $DRM_LIBS -ldrm_intel" >> + AC_TRY_LINK( >> + [#include <intel_bufmgr.h>], >> + [drm_intel_bo_alloc_userptr(NULL, NULL, NULL, 0, 0, 0, 0)], >> + [ac_cv_libdrm_has_userptr="yes"], >> + [ac_cv_libdrm_has_userptr="no"]) >> + CPPFLAGS="$saved_CPPFLAGS" >> + LIBS="$saved_LIBS"] >> +) >> +if test "$ac_cv_libdrm_has_userptr" = "yes"; then >> + AC_DEFINE([HAVE_DRM_INTEL_USERPTR], [1], >> + [Defined to 1 if libdrm supports userptr allocations]) >> +fi > > Did you consider > > if pkg-config --exists 'libdrm_intel >= 2.4.57'; then > AC_DEFINE([HAVE_DRM_INTEL_USERPTR], [1], > [Defined to 1 if libdrm supports userptr allocations]) > fi > Normally hard coding pkg-config is considered a bad idea. Please try PKG_CHECK_EXISTS - it would work like a charm when cross-compiling. Cheers Emil _______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
