From: Jason Ish Date: Thu, 23 Apr 2020 22:48:23 +0000 (-0600) Subject: configure: check for plugin support X-Git-Tag: suricata-6.0.0-beta1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff81212d8b47fb298caa3acb785118cc745c9e8f;p=thirdparty%2Fsuricata.git configure: check for plugin support Currently plugin support requires the dlfcn.h header file and compiler support for -rdynamic. --- diff --git a/configure.ac b/configure.ac index 4fc1b559fc..62564b9dbf 100644 --- a/configure.ac +++ b/configure.ac @@ -412,6 +412,29 @@ AC_SUBST(SECLDFLAGS) ]) + #check for plugin support + AC_CHECK_HEADERS([dlfcn.h]) + AC_MSG_CHECKING([for plugin support]) + TMPLDFLAGS="${LDFLAGS}" + LDFLAGS="${LDFLAGS} -rdynamic" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + [ + AC_MSG_RESULT(yes) + has_rdynamic=yes + ], + [ + AC_MSG_RESULT(no) + has_rdynamic=no + ]) + + if test "x$has_rdynamic" = "xyes"; then + plugin_support=yes + AC_DEFINE([HAVE_PLUGINS], [1], [Plugin support]) + else + plugin_support=no + LDFLAGS="${TMPLDFLAGS}" + fi + #enable profile generation AC_ARG_ENABLE(gccprofile, AS_HELP_STRING([--enable-gccprofile], [Enable gcc profile info i.e -pg flag is set]),[enable_gccprofile=$enableval],[enable_gccprofile=no]) @@ -2779,6 +2802,8 @@ SURICATA_BUILD_CONF="Suricata Configuration: Profiling enabled: ${enable_profiling} Profiling locks enabled: ${enable_profiling_locks} + Plugin support (experimental): ${plugin_support} + Development settings: Coccinelle / spatch: ${enable_coccinelle} Unit tests enabled: ${enable_unittests}