Merged grc developer branch r10679:10938
[debian/gnuradio] / config / grc_grc.m4
index f02923f1695adc69e68173367ef78da429a1ec1d..d8bc02a24df476b81a0cc4c4e60229b51faf899e 100644 (file)
@@ -22,24 +22,17 @@ AC_DEFUN([GRC_GRC],[
 
     GRC_CHECK_DEPENDENCY(grc, gr-wxgui)
 
-    AC_CHECK_PROG(XDG_UTILS,xdg-mime,freedesktop,)
+    AC_CHECK_PROG(XDG_UTILS, xdg-mime, true, false)
+    AM_CONDITIONAL(XDG_UTILS, $XDG_UTILS)
 
     dnl ########################################
-    dnl # test python dependencies
+    dnl # test python modules and versions
     dnl ########################################
     if test $passed = yes; then
-        if ! ${PYTHON} -c 'import Cheetah'; then
-            AC_MSG_RESULT([grc requires the Python Cheetah templates installed, not found.])
-            passed=no
-        fi
-        if ! ${PYTHON} -c 'import pygtk'; then
-            AC_MSG_RESULT([grc requires Python GTK wrappers installed, not found.])
-            passed=no
-        fi
-        if ! ${PYTHON} -c 'import lxml'; then
-            AC_MSG_RESULT([grc requires libxml2 and libxslt wrappers (lxml), not found.])
-            passed=no
-        fi
+        PYTHON_CHECK_MODULE([sys],[Python >= 2.5],[],[passed=no],[sys.version.split()[[0]] >= "2.5"])
+        PYTHON_CHECK_MODULE([Cheetah],[Python Cheetah templates >= 2.0.0],[],[passed=no],[Cheetah.Version >= "2.0.0"])
+        PYTHON_CHECK_MODULE([lxml.etree],[Python lxml wrappers >= 2.0.0],[],[passed=no],[lxml.etree.LXML_VERSION >= (2, 0, 0, 0)])
+        PYTHON_CHECK_MODULE([gtk],[Python gtk wrappers >= 2.10.0],[],[passed=no],[gtk.pygtk_version >= (2, 10, 0)])
     fi
 
     dnl ########################################
@@ -67,10 +60,6 @@ AC_DEFUN([GRC_GRC],[
         grc/src/utils/Makefile \
         grc/src/gui/Makefile \
         grc/examples/Makefile \
-        grc/examples/xmlrpc/Makefile \
-        grc/examples/usrp/Makefile \
-        grc/examples/audio/Makefile \
-        grc/examples/simple/Makefile \
         grc/Makefile \
         grc/data/Makefile \
         grc/data/platforms/Makefile \