configure: allow for --disable-suricata-update

This is to prevent suricata-update from being installed if it
would otherwise be installed based on in being bundled, and
its dependencies being available.

Warn the user that Suricata-Update will not be installed if it
is bundled, but python-yaml is missing (this will also cover
the case where Python is missing).

Add "Install suricata-update" to the build summary. For consistency,
relable "Suricatasc install" as "Install suricatasc".
pull/3563/head
Jason Ish 8 years ago committed by Victor Julien
parent db36708756
commit 345ec58df4

@ -1436,23 +1436,46 @@
AC_CHECK_HEADER(net/netmap_user.h,,[AC_ERROR(net/netmap_user.h not found ...)],) AC_CHECK_HEADER(net/netmap_user.h,,[AC_ERROR(net/netmap_user.h not found ...)],)
]) ])
# suricata-update # Suricata-Update.
have_suricata_update="no" AC_ARG_ENABLE([suricata-update], AS_HELP_STRING([--disable-suricata-update],
ruledirprefix="$sysconfdir" [Disable suricata-update]), [enable_suricata_update=$enableval],
suricata_update_rule_files="suricata-update-rule-files" [enable_suricata_update="yes"])
AC_CHECK_FILE([$srcdir/suricata-update/setup.py], [
SURICATA_UPDATE_DIR="suricata-update" # Assume suircata-update will not be installed.
AC_SUBST(SURICATA_UPDATE_DIR) have_suricata_update="no"
AC_OUTPUT(suricata-update/Makefile) ruledirprefix="$sysconfdir"
have_suricata_update="yes" no_suricata_update_comment="#"
ruledirprefix="$localstatedir/lib" has_suricata_update_comment=""
no_suricata_update_comment="" suricata_update_rule_files="suricata-update-rule-files"
has_suricata_update_comment="#"
], [ if test "$enable_suricata_update" = "yes"; then
no_suricata_update_comment="#" AC_CHECK_FILE([$srcdir/suricata-update/setup.py], [
has_suricata_update_comment="" have_suricata_update="yes"], [])
]) fi
AM_CONDITIONAL([HAVE_SURICATA_UPDATE], [test "x$have_suricata_update" != "xno"]) AM_CONDITIONAL([HAVE_SURICATA_UPDATE],
[test "x$have_suricata_update" != "xno"])
install_suricata_update="no"
if test "$have_suricata_update" = "yes"; then
if test "$have_python_yaml" != "yes"; then
echo ""
echo " Warning: suricata-update will not be installed as the"
echo " depedency python-yaml is not installed."
echo ""
echo " Debian/Ubuntu: apt install python-yaml"
echo " Fedora: dnf install python-yaml"
echo " CentOS/RHEL: yum install python-yaml"
echo ""
else
install_suricata_update="yes"
SURICATA_UPDATE_DIR="suricata-update"
AC_SUBST(SURICATA_UPDATE_DIR)
AC_OUTPUT(suricata-update/Makefile)
ruledirprefix="$localstatedir/lib"
no_suricata_update_comment=""
has_suricata_update_comment="#"
fi
fi
# libhtp # libhtp
AC_ARG_ENABLE(non-bundled-htp, AC_ARG_ENABLE(non-bundled-htp,
@ -2449,7 +2472,8 @@ SURICATA_BUILD_CONF="Suricata Configuration:
Rust compiler: ${rust_compiler_version} Rust compiler: ${rust_compiler_version}
Rust cargo: ${rust_cargo_version} Rust cargo: ${rust_cargo_version}
Suricatasc install: ${enable_python} Install suricatasc: ${enable_python}
Install suricata-update: ${install_suricata_update}
Profiling enabled: ${enable_profiling} Profiling enabled: ${enable_profiling}
Profiling locks enabled: ${enable_profiling_locks} Profiling locks enabled: ${enable_profiling_locks}

Loading…
Cancel
Save