Browse Source

[master]Merge branch 'trac2939'

to add check for python sqlite3 module
Jeremy C. Reed 11 years ago
parent
commit
4e7c1fb353
2 changed files with 19 additions and 0 deletions
  1. 2 0
      configure.ac
  2. 17 0
      m4macros/ax_python_sqlite3.m4

+ 2 - 0
configure.ac

@@ -1093,6 +1093,8 @@ fi
 AX_SQLITE3_FOR_BIND10
 if test "x$have_sqlite" = "xyes" ; then
   enable_features="$enable_features SQLite3"
+
+  AX_PYTHON_SQLITE3
 fi
 
 #

+ 17 - 0
m4macros/ax_python_sqlite3.m4

@@ -0,0 +1,17 @@
+dnl @synopsis AX_PYTHON_SQLITE3
+dnl
+dnl Test for the Python sqlite3 module used by BIND10's datasource
+dnl
+
+AC_DEFUN([AX_PYTHON_SQLITE3], [
+
+# Check for the python sqlite3 module
+AC_MSG_CHECKING(for python sqlite3 module)
+if "$PYTHON" -c 'import sqlite3' 2>/dev/null ; then
+    AC_MSG_RESULT(ok)
+else
+    AC_MSG_RESULT(missing)
+    AC_MSG_ERROR([Missing sqlite3 python module.])
+fi
+
+])dnl AX_PYTHON_SQLITE3