fix the check for EGL
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 13 Jan 2012 07:00:45 +0000 (15:00 +0800)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 28 Jun 2012 08:39:29 +0000 (10:39 +0200)
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>
[Gwenole: removed the non-existing check for the testcase]

configure.ac

index 4b50912..725c3cb 100644 (file)
@@ -197,12 +197,16 @@ 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"
     ])
 fi
+
 AC_SUBST(EGL_DEPS_CFLAGS)
 AC_SUBST(EGL_DEPS_LIBS)
 AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")