[Xorg-driver-geode] [PATCH 2/3] Add conditional build for ztv
Gaetan Nadon
memsize at videotron.ca
Wed Nov 16 11:58:54 PST 2011
Detect the presence of Video4Linux V2 and do not build if missing.
The geode driver is no longer Linux only.
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
configure.ac | 4 ++++
ztv/Makefile.am | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index b93aa35..3c28bb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,10 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
fi
+# Check for Video4Linux Version 2 (V4L2)
+AC_CHECK_HEADERS([linux/videodev2.h],[v4l2=yes])
+AM_CONDITIONAL(BUILD_ZTV, [test "x$v4l2" = xyes])
+
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])
AC_SUBST([AMD_CFLAGS])
diff --git a/ztv/Makefile.am b/ztv/Makefile.am
index 08902fc..9ce94d4 100644
--- a/ztv/Makefile.am
+++ b/ztv/Makefile.am
@@ -1,4 +1,6 @@
+if BUILD_ZTV
+
AM_CFLAGS = \
$(XORG_CFLAGS) \
$(AMD_CFLAGS) \
@@ -13,3 +15,5 @@ ztv_drv_la_LDFLAGS = -module -avoid-version
ztv_drv_ladir = $(moduledir)/drivers
ztv_drv_la_SOURCES = z4l.c
+
+endif BUILD_ZTV
--
1.7.4.1
More information about the Xorg-driver-geode
mailing list