Fix build when hyperscan is missing
This commit is contained in:
parent
a8f402e909
commit
9fe8bccba0
2 changed files with 19 additions and 6 deletions
20
configure.ac
20
configure.ac
|
@ -324,13 +324,23 @@ AC_ARG_ENABLE(hyperscan,
|
||||||
AC_HELP_STRING([--disable-hyperscan],[Disable hyperscan support]),
|
AC_HELP_STRING([--disable-hyperscan],[Disable hyperscan support]),
|
||||||
[hyperscan=$enableval],[hyperscan=yes])
|
[hyperscan=$enableval],[hyperscan=yes])
|
||||||
|
|
||||||
if test "$hyperscan" = yes; then
|
AS_IF([test "$hyperscan" = yes], [
|
||||||
|
save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
PKG_CHECK_MODULES([HS], [libhs >= 4], [], [hyperscan=no])
|
||||||
|
CPPFLAGS="$CPPFLAGS $HS_CFLAGS"
|
||||||
|
LIBS="$LIBS $HS_LIBS"
|
||||||
|
AC_CHECK_HEADER([hs_common.h], [], [hyperscan=no])
|
||||||
|
AC_CHECK_FUNC([hs_scan], [], [hyperscan=no])
|
||||||
|
])
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libhs)"
|
AS_IF([test "$hyperscan" = no], [
|
||||||
LIBS="$LIBS $(pkg-config --libs libhs)"
|
CPPFLAGS="$save_CPPFLAGS"
|
||||||
AC_CHECK_HEADER(hs_common.h)
|
LIBS="$save_LIBS"
|
||||||
|
])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_HYPERSCAN], [test "$hyperscan" = "yes"])
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_WITH(zlib-path,
|
AC_ARG_WITH(zlib-path,
|
||||||
AC_HELP_STRING([--with-zlib-path=DIR],[Path to libz.so for ziplinks support.]),
|
AC_HELP_STRING([--with-zlib-path=DIR],[Path to libz.so for ziplinks support.]),
|
||||||
|
|
|
@ -52,7 +52,6 @@ extension_LTLIBRARIES = \
|
||||||
m_adminwall.la \
|
m_adminwall.la \
|
||||||
m_echotags.la \
|
m_echotags.la \
|
||||||
m_extendchans.la \
|
m_extendchans.la \
|
||||||
filter.la \
|
|
||||||
m_findforwards.la \
|
m_findforwards.la \
|
||||||
m_identify.la \
|
m_identify.la \
|
||||||
m_locops.la \
|
m_locops.la \
|
||||||
|
@ -78,3 +77,7 @@ extension_LTLIBRARIES = \
|
||||||
spy_trace_notice.la \
|
spy_trace_notice.la \
|
||||||
drain.la \
|
drain.la \
|
||||||
example_module.la
|
example_module.la
|
||||||
|
|
||||||
|
if HAVE_HYPERSCAN
|
||||||
|
extension_LTLIBRARIES += filter.la
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in a new issue