summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index 88dca391..bd6d7a58 100755
--- a/configure
+++ b/configure
@@ -1210,6 +1210,27 @@ else
printf "done\n"
fi
+printf "Checking for undefined behavior sanitizer (\"ubsan\") being in effect ... "
+
+cat > conftest.c <<!
+#include <stdio.h>
+
+int main(void)
+{
+ return 0;
+}
+!
+if conftest ; then
+ if strings conftest | grep -q -i ubsan ; then
+ printf "yes\n"
+ printf "#define HAVE_UBSAN 1\n" >> config.h
+ else
+ printf "no\n"
+ fi
+else
+ printf "failed\n"
+fi
+
#
# Detect Apple environment. We need _DARWIN_C_SOURCE.
#