mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-18 21:26:29 -05:00
build: Set OS_WINDOWS in scripts/defines.sh to aid with Windows detection in test cases
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.
This commit is contained in:
parent
fcf6cb40b7
commit
b6bed508f5
3 changed files with 21 additions and 3 deletions
19
configure.ac
19
configure.ac
|
|
@ -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, )
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue