acceptance-tests/ifolder/gus/configure.in

118 строки
2.1 KiB
Plaintext

AC_PREREQ(2.57)
AC_INIT(test/ServiceTests.cs)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(gus, 1.0.0.1)
AM_MAINTAINER_MODE
#
# directories
#
TEST_DIR='$(top_srcdir)/test'
WEB_DIR='$(top_srcdir)/src'
EXTERNAL_DIR='$(top_srcdir)/external'
AC_SUBST(TEST_DIR)
AC_SUBST(WEB_DIR)
AC_SUBST(EXTERNAL_DIR)
#
# miscellanous
#
EMPTY=
SPACE='$(EMPTY) $(EMPTY)'
AC_SUBST(EMPTY)
AC_SUBST(SPACE)
#
# host
#
case $host in
*-*-linux*)
OS_NAME='linux'
;;
*-*-mingw*|*-*-cygwin*)
OS_NAME='windows'
;;
*)
AC_MSG_ERROR([unsupported host: $host])
;;
esac
AM_CONDITIONAL(LINUX, test "$OS_NAME" = "linux")
AM_CONDITIONAL(WINDOWS, test "$OS_NAME" = "windows")
#
# compiler
#
AC_PATH_PROG(MCS, mcs, no)
AC_PATH_PROG(CSC, csc, no)
if test "$CSC" = "no" -a "$MCS" = "no"; then
AC_MSG_ERROR(["no c-sharp compiler found"])
fi
AM_CONDITIONAL(MONO, test ! "$MCS" = "no")
AM_CONDITIONAL(DOTNET, test ! "$CSC" = "no")
if test "$CSC" = "no" ; then
# Mono
CSC=$MCS
MONO="mono"
NUNIT_DIR="$EXTERNAL_DIR/nunit/mono"
NUNIT="$MONO $NUNIT_DIR/nunit-console.exe"
NUNIT_REF="-r:nunit.framework.dll -lib:$NUNIT_DIR"
NUNIT_FLAGS='/nologo /labels'
XSP_DIR=""
else
# DotNet
MONO=""
NUNIT_DIR="$EXTERNAL_DIR/nunit/dotnet"
NUNIT="$NUNIT_DIR/nunit-console.exe"
NUNIT_REF="/r:nunit.framework.dll /lib:$NUNIT_DIR"
NUNIT_FLAGS='/nologo /labels'
XSP_DIR="$EXTERNAL_DIR/xsp/dotnet"
fi
AC_SUBST(MONO)
AC_SUBST(NUNIT_DIR)
AC_SUBST(NUNIT)
AC_SUBST(NUNIT_REF)
AC_SUBST(NUNIT_FLAGS)
AC_SUBST(XSP_DIR)
CSCFLAGS="/d:DOTNET /warn:4 /d:TRACE /nologo"
#
# debug
#
AC_ARG_ENABLE(debug, [
--without-debug configure the makefiles to build without debug],
[case "${enableval}" in
yes) enable_debug=false ;;
no) enable_debug=true ;;
*) AC_MSG_ERROR(bad value ${enableval} for --without-debug) ;;
esac],[enable_debug=true])
AM_CONDITIONAL(DEBUG, test ! "$enable_debug" = "false")
if test ! "$enable_debug" = "false"
then
CSCFLAGS="$CSCFLAGS /debug+ /d:DEBUG"
else
CSCFLAGS="$CSCFLAGS /optimize+"
fi
AC_SUBST(CSC)
AC_SUBST(CSCFLAGS)
#
# output
#
AC_OUTPUT([
Makefile
web/Makefile
test/Makefile
])