python: Rework callbacks.
[gpgme.git] / configure.ac
index 36f4f94..4269540 100644 (file)
@@ -334,10 +334,20 @@ if test "$found" = "1"; then
             # This is not highlighted becase it's not really important.
             then AC_MSG_WARN([Doxygen not found - Qt binding doc will not be built.])
         fi
+        AC_CHECK_PROGS([GRAPHVIZ], [dot])
+        if test -z "$GRAPHVIZ";
+            then AC_MSG_WARN([Graphviz not found - Qt binding doc will not have diagrams.])
+        fi
     fi
 fi
 AM_CONDITIONAL([HAVE_DOXYGEN],
                [test -n "$DOXYGEN"])
+if test -n "$GRAPHVIZ"; then
+    HAVE_DOT="YES"
+else
+    HAVE_DOT="NO"
+fi
+AC_SUBST(HAVE_DOT)
 
 # Python bindings.
 LIST_MEMBER("python", $enabled_languages)
@@ -345,17 +355,26 @@ if test "$found" = "1"; then
     AX_PKG_SWIG
     if test -z "$SWIG"; then
         if test "$explicit_languages" = "1"; then
-            die=yes
-            AC_MSG_NOTICE([[
+            AC_MSG_ERROR([[
 ***
 *** You need SWIG to build the Python bindings.
 ***]])
         else
-            enabled_languages=$(echo $enabled_languages | sed 's/qt//')
+            enabled_languages=$(echo $enabled_languages | sed 's/python//')
         fi
     else
-        AM_PATH_PYTHON([3.2])
+        AM_PATH_PYTHON([3.3])
         AX_SWIG_PYTHON
+       if test -z "$PYTHON_VERSION"; then
+           if test "$explicit_languages" = "1"; then
+              AC_MSG_ERROR([[
+***
+*** Please install the python development packages.
+***]])
+           else
+                enabled_languages=$(echo $enabled_languages | sed 's/python//')
+            fi
+       fi
     fi
 fi
 
@@ -756,7 +775,10 @@ AC_CONFIG_FILES(lang/qt/tests/Makefile)
 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
 AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])])
 AC_CONFIG_FILES(lang/qt/doc/Makefile)
-AC_CONFIG_FILES([lang/python/Makefile lang/python/tests/Makefile])
+AC_CONFIG_FILES([lang/python/Makefile
+                lang/python/setup.py
+                lang/python/pyme/version.py
+                lang/python/tests/Makefile])
 AC_OUTPUT
 
 echo "