Commit 78832f5 for zlib

commit 78832f5fe380c5fcfd720012ecc45230640d7906
Author: Mark Adler <git@madler.net>
Date:   Sat Jan 10 11:32:51 2026 -0800

    Add --undefined option to ./configure for UBSan checker.

diff --git a/configure b/configure
index 872c50a..3770b03 100755
--- a/configure
+++ b/configure
@@ -92,6 +92,7 @@ warn=0
 debug=0
 address=0
 memory=0
+undefined=0
 insecure=0
 unknown=0
 old_cc="$CC"
@@ -147,6 +148,7 @@ case "$1" in
     --sanitize) address=1; shift ;;
     --address) address=1; shift ;;
     --memory) memory=1; shift ;;
+    --undefined) undefined=1; shift ;;
     --insecure) insecure=1; shift ;;
     *) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;;
     esac
@@ -258,6 +260,9 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
   if test $memory -eq 1; then
     CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer"
   fi
+  if test $undefined -eq 1; then
+    CFLAGS="${CFLAGS} -g -fsanitize=undefined -fno-omit-frame-pointer"
+  fi
   if test $insecure -eq 1; then
     CFLAGS="${CFLAGS} -DZLIB_INSECURE"
   fi