[nanny] Conditional support fo hachoir_regexp



commit 60002d8429539a6b6506aa5dc9714c1732dfb135
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Fri Mar 5 21:32:06 2010 +0100

    Conditional support fo hachoir_regexp

 configure.ac           |    5 +++--
 daemon/src/Makefile.am |    8 ++++++--
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9b63ac4..ab4a858 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,15 +122,16 @@ 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
 
+AM_CONDITIONAL(HAS_HACHOIR_REGEX, $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC)
+
 dnl check for python-gtop
 dnl -----------------------------------------
 AC_MSG_CHECKING(for python-gtop)
diff --git a/daemon/src/Makefile.am b/daemon/src/Makefile.am
index a3bbb17..3ccf2de 100644
--- a/daemon/src/Makefile.am
+++ b/daemon/src/Makefile.am
@@ -11,8 +11,12 @@ corelib_PYTHON =	 __init__.py 			\
 			LinuxFiltering.py		\
 			LinuxWebContentFiltering.py 	\
 			LinuxUsersManager.py		\
-			LinuxSessionFiltering.py    	\
-			DansGuardianImporter.py
+			LinuxSessionFiltering.py
+
+if HAS_HACHOIR_REGEX
+dgimporterdir = $(pythondir)/nanny/daemon
+dgimporter_PYTHON = DansGuardianImporter.py
+endif
 
 
 INCLUDES =      -I$(top_srcdir)                 \



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