summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2012-01-13 15:00:45 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-01-13 16:22:02 +0800
commit6bca8e5ee2f4511802cc2e66827a28fc2a6e54a6 (patch)
treef69b1f97ebef03a219dabcca2e42c49bd6f24f8c
parentf908ee08ef94a6b204103c19bda7edf2a6a24379 (diff)
fix the check for EGL
It is possible that EGL/egl.h doesn't exist however EGL library is available. We don't want to build EGL related stuff in this case Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 8917b6a..ac91628 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,7 +197,10 @@ USE_EGL="no"
EGL_DEPS_CFLAGS=""
EGL_DEPS_LIBS=""
if test "$enable_egl" = "yes"; then
- AC_CHECK_HEADERS([EGL/egl.h])
+ AC_CHECK_HEADERS([EGL/egl.h], [USE_EGL="yes"])
+fi
+
+if test "x$USE_EGL" = "xyes"; then
AC_CHECK_LIB(EGL, eglGetDisplay, [
USE_EGL="yes"
EGL_DEPS_LIBS="-lEGL"
@@ -205,10 +208,11 @@ if test "$enable_egl" = "yes"; then
PKG_CHECK_MODULES([GLESv1_CM], [glesv1_cm], [libglesv1_cm=yes], [libglesv1_cm=no])
fi
+
AC_SUBST(EGL_DEPS_CFLAGS)
AC_SUBST(EGL_DEPS_LIBS)
AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
-AM_CONDITIONAL(BUILD_EGL_TEST, [test "x$USE_EGL" = "xyes" && test "x$libglesv1_cm" = "xyes"])
+AM_CONDITIONAL(BUILD_EGL_TEST, [test "x$libglesv1_cm" = "xyes"])
# We only need the headers, we don't link against the DRM libraries
LIBVA_CFLAGS="$DRM_CFLAGS"