Issue #13415: Test in configure if unsetenv() has a return value or not.
diff --git a/configure.in b/configure.in
index 9d7bfa6..454e468 100644
--- a/configure.in
+++ b/configure.in
@@ -2831,6 +2831,15 @@
   [AC_MSG_RESULT(no)
 ])
 
+AC_MSG_CHECKING(for broken unsetenv)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+]], [[int res = unsetenv("DUMMY")]])],
+  [AC_MSG_RESULT(no)],
+  [AC_DEFINE(HAVE_BROKEN_UNSETENV, 1, Define if `unsetenv` does not return an int.)
+   AC_MSG_RESULT(yes)
+])
+
 dnl check for true
 AC_CHECK_PROGS(TRUE, true, /bin/true)