]> jfr.im git - solanum.git/blobdiff - configure.ac
callerid: actually the guard should be for source_p
[solanum.git] / configure.ac
index d8c9e82d6ad30d3a4c4aad5331b6cb28d7b0f74b..e03c71575ab8fd5ab7adc4e5f913daf5040749bb 100644 (file)
@@ -324,13 +324,23 @@ AC_ARG_ENABLE(hyperscan,
 AC_HELP_STRING([--disable-hyperscan],[Disable hyperscan support]),
 [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)"
-LIBS="$LIBS $(pkg-config --libs libhs)"
-AC_CHECK_HEADER(hs_common.h)
+AS_IF([test "$hyperscan" = no], [
+       CPPFLAGS="$save_CPPFLAGS"
+       LIBS="$save_LIBS"
+])
+
+AM_CONDITIONAL([HAVE_HYPERSCAN], [test "$hyperscan" = "yes"])
 
-fi
 
 AC_ARG_WITH(zlib-path,
 AC_HELP_STRING([--with-zlib-path=DIR],[Path to libz.so for ziplinks support.]),
@@ -607,6 +617,14 @@ AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (def
 AC_DEFINE_UNQUOTED(TOPICLEN, ${TOPICLEN}, [Maximum topic length (<=390)])
 AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length])
 
+
+AC_ARG_WITH(asan,
+AC_HELP_STRING([--with-asan],[Build with Address Sanitizer]),
+[
+    CFLAGS="$CFLAGS -fsanitize=address"
+    LDFLAGS="$LDFLAGS -fsanitize=address"
+])
+
 # rpath, for finding librb.so at run time
 hold_ldflags=$LDFLAGS
 AC_MSG_CHECKING(for the ld -rpath flag)