Merge branch 'master' of ssh://git.privoxy.org:23/git/privoxy
[privoxy.git] / configure.in
index 7d5c89a..3ec78e0 100644 (file)
@@ -168,6 +168,18 @@ if test "x$with_asan" = "xyes"; then
     LDFLAGS="$LDFLAGS -fsanitize=address"
 fi
 
+AC_ARG_WITH(asan, [  --with-msan       Enable MemorySanitizer. Requires compiler support.])
+if test "x$with_msan" = "xyes"; then
+    CFLAGS="$CFLAGS -fsanitize=memory"
+    LDFLAGS="$LDFLAGS -fsanitize=memory"
+fi
+
+AC_ARG_WITH(usan, [  --with-usan       Enable UndefinedBehaviorSanitizer. Requires compiler support.])
+if test "x$with_usan" = "xyes"; then
+    CFLAGS="$CFLAGS -fsanitize=undefined"
+    LDFLAGS="$LDFLAGS -fsanitize=undefined"
+fi
+
 dnl =================================================================
 dnl Check for user and group validity
 dnl =================================================================
@@ -450,6 +462,7 @@ AC_ARG_ENABLE(pthread,
   if test $have_pthread = yes; then
      AC_MSG_WARN([pthreads seem to be available but you are using --disable-pthread.])
      AC_MSG_WARN([This is almost always a mistake and can render Privoxy unacceptable slow.])
+     AC_MSG_WARN([Also various Privoxy features only work when using threads and won't even compile without them.])
   fi
   have_pthread=no
 fi])