]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
build: Set OS_WINDOWS in `scripts/defines.sh` to aid with Windows detection in test...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 1 Jul 2025 11:57:59 +0000 (07:57 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 1 Jul 2025 11:57:59 +0000 (07:57 -0400)
This uses the result AC_CANONICAL_HOST and a pre-existing case statement checking for mingw32, cygwin, interix to determine if the build system is Windows based... We make the not unreasonable assumption that if the build system is Windows based, the tests will also be running on a Windows system.

configure.ac
tests/run.in
tests/scripts/defines.sh

index a506cb1e7fa760d148c33a7dff103dde096031b8..60c53bb01e7f0ce22787748be5857eaca6e87129 100644 (file)
@@ -703,10 +703,23 @@ OL_MSVC
 dnl ----------------------------------------------------------------
 dnl Checks for Windows NT
 case $host_os in
-  *mingw32* ) ac_cv_mingw32=yes ;;
-  *cygwin* ) ac_cv_cygwin=yes ;;
-  *interix* ) ac_cv_interix=yes ;;
+  *mingw32* )
+    ac_cv_mingw32=yes
+    OS_WINDOWS=yes
+    ;;
+  *cygwin* )
+    ac_cv_cygwin=yes
+    OS_WINDOWS=yes
+    ;;
+  *interix* )
+    ac_cv_interix=yes
+    OS_WINDOWS=yes
+    ;;
+  * )
+    OS_WINDOWS=no
+    ;;
 esac
+AC_SUBST([OS_WINDOWS])
 
 AC_CHECK_TOOL(RC, windres, )
 
index c30fc7c4fb6ae676d0bfe5f22a405e5417decebd..4bcc7af03ff32bf1fa9d549abcb3ca48628f2b9c 100644 (file)
@@ -46,6 +46,9 @@ AC_WITH_MODULES_ENABLED=@WITH_MODULES_ENABLED@
 AC_ACI_ENABLED=aci@WITH_ACI_ENABLED@
 AC_LIBS_DYNAMIC=lib@BUILD_LIBS_DYNAMIC@
 
+# environment
+AC_OS_WINDOWS=@OS_WINDOWS@
+
 export AC_lloadd \
        AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED AC_ACI_ENABLED \
        AC_LIBS_DYNAMIC AC_WITH_TLS AC_TLS_TYPE
index d69ac86835696058d041801fd6a1f68e32738ff5..5a97fe3472cf58291df6f168c92b2a54c683761f 100755 (executable)
@@ -78,6 +78,8 @@ SLEEP1=${SLEEP1-7}
 SLEEP2=${SLEEP2-15}
 TIMEOUT=${TIMEOUT-8}
 
+OS_WINDOWS=${AC_OS_WINDOWS-no}
+
 # dirs
 PROGDIR="$OBJDIR/tests/progs"
 DATADIR=${USER_DATADIR-./testdata}