[ocrfeeder/introspection] build: Update configure.ac to check GI modules



commit 873837bbf3a60ab0d1dbfbebb10247ca99339c22
Author: Joaquim Rocha <me joaquimrocha com>
Date:   Sun Jul 13 19:03:53 2014 +0200

    build: Update configure.ac to check GI modules

 configure.ac |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bb95aa7..5ea6b62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,14 +16,29 @@ dnl == check for python ==
 AM_PATH_PYTHON(2.5)
 
 dnl == Python dependencies ==
-AX_PYTHON_MODULE([gtk],[needed])
-AX_PYTHON_MODULE([pygtk],[needed])
-AX_PYTHON_MODULE([gtkspell],[needed])
-AX_PYTHON_MODULE([goocanvas],[needed])
 AX_PYTHON_MODULE([enchant],[needed])
 AX_PYTHON_MODULE([sane],[needed])
 AX_PYTHON_MODULE([reportlab],[needed])
 
+dnl == Introspection Dependencies ==
+
+PYTHON_GI_MODULES="Gtk GooCanvas"
+
+for i in $PYTHON_GI_MODULES;
+do
+AC_MSG_CHECKING(gobject introspection module $i)
+$PYTHON -c "from gi.repository import $i" 2>/dev/null;
+
+if test $? -eq 0;
+then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR(failed to find required GObject Introspection module $i)
+       exit 1
+fi
+done
+
 dnl == i18n ==
 GETTEXT_PACKAGE=ocrfeeder
 AC_SUBST(GETTEXT_PACKAGE)


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