]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
configure: check for python-yaml
authorJason Ish <ish@unx.ca>
Sat, 24 Nov 2018 18:06:46 +0000 (12:06 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 3 Dec 2018 13:21:09 +0000 (14:21 +0100)
Don't install suricata-update if python-yaml does not
exist.

configure.ac
suricata-update/Makefile.am

index d193413dda0b5d39dd1042117b212aeb7506c81a..c4e6803c83a8f8888df6effc7452902ea0306036 100644 (file)
     fi
     AM_CONDITIONAL([HAVE_PYTHON], [test "x$enable_python" = "xyes"])
 
+    # Check for python-yaml.
+    have_python_yaml="no"
+    if test "x$enable_python" = "xyes"; then
+        AC_MSG_CHECKING([for python-yaml])
+       if $HAVE_PYTHON -c "import yaml" 2>/dev/null; then
+          have_python_yaml="yes"
+          AC_MSG_RESULT([yes])
+       else
+          AC_MSG_RESULT([no])
+       fi
+    fi
+    AM_CONDITIONAL([HAVE_PYTHON_YAML], [test "x$have_python_yaml" = "xyes"])
+
     AC_PATH_PROG(HAVE_WGET, wget, "no")
     if test "$HAVE_WGET" = "no"; then
         AC_PATH_PROG(HAVE_CURL, curl, "no")
index 5f6914bbe939d80e2f1ba1dd9724e8c44697f258..896cfad564b555cb8c1dee7c5ccfe4d71743afd7 100644 (file)
@@ -1,4 +1,5 @@
 if HAVE_PYTHON
+if HAVE_PYTHON_YAML
 
 install-exec-local:
        cd $(srcdir) && \
@@ -20,3 +21,4 @@ clean-local:
 distclean-local:
 
 endif
+endif