[nanny] Add hachoir-regex and glib depends



commit b9b9955209972eff4275016c3db8fb87582d3ed5
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Fri Jan 29 00:47:34 2010 +0100

    Add hachoir-regex and glib depends

 configure.ac |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c25c345..0d5b7ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,15 @@ PKG_CHECK_MODULES(PYDBUS, dbus-python >= 0.80)
 AC_SUBST(PYDBUS_CFLAGS)
 AC_SUBST(PYDBUS_LIBS)
 
+dnl check for glib
+dnl -----------------------------
+GLIB_REQUIRED=2.12.0
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
+
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
 dnl check for python headers
 dnl ------------------------------
 AC_MSG_CHECKING(for shared library Python stuff)
@@ -97,6 +106,28 @@ else
   AC_MSG_ERROR([You need to have python-imaging installed])
 fi
 
+dnl check for python-hachoir-regex
+dnl -----------------------------------------
+AC_MSG_CHECKING(for python-hachoir-regex)
+prog="
+import sys
+try:
+  from hachoir_regex import parse, createRange, createString
+except RuntimeError:
+  sys.exit(0)
+except ImportError:
+  sys.exit(1)
+sys.exit(0)
+"
+   
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+then
+  AC_MSG_RESULT(found)
+else
+  AC_MSG_RESULT(not found)
+  AC_MSG_ERROR([You need to have python-hachoir-regex installed])
+fi
+
 
 dnl checking operative system
 dnl --------------------------------------------



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