disp_open: do not crash on error
[glsdk/omapdrmtest.git] / configure.ac
index 217126bb9cdb9cae02c3df6caab938685985b246..4432cb4fcddc3a560bca2766a5f62160343bff07 100644 (file)
@@ -38,14 +38,14 @@ PKG_CHECK_MODULES(DRM, libdrm libdrm_omap)
 kversion=`uname -r`
 AC_ARG_WITH([kernel-source],
             [AS_HELP_STRING([--with-kernel-source],
-              [specify pavth to linux kernel source])],
+              [specify path to linux kernel source])],
            [kernel_source="$with_kernel_source"],
            [kernel_source="/usr/src/linux-headers-$kversion"])
 
 if test -r "$kernel_source/include/linux/videodev2.h"; then
     headers_cflags="$headers_cflags -I$kernel_source/include"
 
-    AC_SUBST(CFLAGS, [$headers_cflags])
+    AC_SUBST(LIN_CFLAGS, [$headers_cflags])
     AC_MSG_NOTICE([$kversion provides videodev2.h])
 else
     AC_MSG_NOTICE([Could not find $kernel_source/include/linux/videodev2.h])
@@ -65,7 +65,8 @@ fi
 AM_CONDITIONAL(ENABLE_V4L2_DMABUF, [test "x$HAVE_V4L2_DMABUF" = xyes])
 
 # Check optional X11:
-PKG_CHECK_MODULES(X11, x11 dri2, [HAVE_X11=yes], [HAVE_X11=no])
+AC_ARG_ENABLE([x11], AS_HELP_STRING([--disable-x11], [disable x11/dri2video support]))
+AS_IF([test "x$enable_x11" != "xno"], [PKG_CHECK_MODULES(X11, x11 dri2, [HAVE_X11=yes])])
 if test "x$HAVE_X11" = "xyes"; then
        AC_DEFINE(HAVE_X11, 1, [Have X11 support])
 else