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.
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, )
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
SLEEP2=${SLEEP2-15}
TIMEOUT=${TIMEOUT-8}
+OS_WINDOWS=${AC_OS_WINDOWS-no}
+
# dirs
PROGDIR="$OBJDIR/tests/progs"
DATADIR=${USER_DATADIR-./testdata}