[empathy] Optionally check for gudev for camera monitoring



commit 20fe4d7b990d32e70fcdb9fd46cde2ed00c6d71d
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Tue May 10 11:33:29 2011 +0100

    Optionally check for gudev for camera monitoring

 configure.ac           |   26 ++++++++++++++++++++++++++
 libempathy/Makefile.am |    4 +++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e960bb0..29873ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -351,6 +351,31 @@ fi
 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
 
 # -----------------------------------------------------------
+# gudev
+# -----------------------------------------------------------
+AC_ARG_ENABLE(gudev,
+              AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
+                             [build with gudev support]), ,
+                             enable_gudev=auto)
+
+if test "x$enable_gudev" != "xno"; then
+
+   PKG_CHECK_MODULES(UDEV, [gudev-1.0],
+        have_gudev="yes", have_gudev="no")
+
+   if test "x$have_gudev" = "xyes"; then
+      AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
+   fi
+else
+   have_gudev=no
+fi
+
+if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
+   AC_MSG_ERROR([Could not find gudev dependencies.])
+fi
+AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
+
+# -----------------------------------------------------------
 # spellchecking checks: enchant and iso-codes
 # -----------------------------------------------------------
 AC_ARG_ENABLE(spell,
@@ -632,6 +657,7 @@ Configure summary:
 	Meego widgets...............:  ${have_meego}
 	Control center embedding....:  ${have_control_center_embedding}
 	Cheese webcam support ......:  ${have_cheese}
+	Camera monitoring...........:  ${have_gudev}
 
     Connectivity:
 	NetworkManager integration..:  ${have_nm}
diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am
index b20c49b..f701f74 100644
--- a/libempathy/Makefile.am
+++ b/libempathy/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS =                                           \
 	$(GEOCODE_CFLAGS)				\
 	$(NETWORK_MANAGER_CFLAGS)			\
 	$(CONNMAN_CFLAGS)				\
+	$(UDEV_CFLAGS)					\
 	$(WARN_CFLAGS)					\
 	$(DISABLE_DEPRECATED)
 
@@ -125,7 +126,8 @@ libempathy_la_LIBADD =		\
 	$(GEOCLUE_LIBS) \
 	$(GEOCODE_LIBS) \
 	$(NETWORK_MANAGER_LIBS) \
-	$(CONNMAN_LIBS)
+	$(CONNMAN_LIBS) \
+	$(UDEV_LIBS)
 
 check_c_sources = \
     $(libempathy_handwritten_source)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]