From db36708756b28dda0806855cddfe5b0872553c6b Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Sat, 24 Nov 2018 12:06:46 -0600 Subject: [PATCH] configure: check for python-yaml Don't install suricata-update if python-yaml does not exist. --- configure.ac | 13 +++++++++++++ suricata-update/Makefile.am | 2 ++ 2 files changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index d193413dda..c4e6803c83 100644 --- a/configure.ac +++ b/configure.ac @@ -104,6 +104,19 @@ 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") diff --git a/suricata-update/Makefile.am b/suricata-update/Makefile.am index 5f6914bbe9..896cfad564 100644 --- a/suricata-update/Makefile.am +++ b/suricata-update/Makefile.am @@ -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 -- 2.47.2