2005-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[xsp.git] / configure.in
blob25c5892864057f46fbfcda10252b6af425c434ca
1 AC_PREREQ(2.57)
2 AC_INIT(src/server.cs)
3 AC_CANONICAL_SYSTEM
4 AM_INIT_AUTOMAKE(xsp, 1.1.0)
5 AM_MAINTAINER_MODE
7 AC_PROG_INSTALL
9 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
10 if test "x$PKG_CONFIG" = "xno"; then
11         AC_MSG_ERROR([You need to install pkg-config])
14 AC_PATH_PROG(CSC, csc, no)
15 AC_PATH_PROG(MCS, mcs, no)
16 AC_PATH_PROG(GMCS, gmcs, no)
17 AC_PATH_PROG(RUNTIME, mono, no)
18 CS="C#"
19 if test "x$CSC" = "xno" -a "x$MCS" = "xno"  ; then
20         dnl AC_MSG_ERROR([You need to install a C# compiler])
21         AC_MSG_ERROR([No $CS compiler found])
24 if test "x$MCS" = "xno" ; then
25         MCS=$CSC
28 if test "x$GMCS" != "xno" ; then
29         AC_MSG_CHECKING([whether gmcs is actually able to compile...])
31         tmpin=`mktemp -t in.XXXXXX`
32         tmpout=`mktemp -t out.XXXXXX`
34         echo "class Foo { public static void Main() {} }" > $tmpin
36         if [ gmcs -r:System.Web.dll -out:$tmpout $tmpin > /dev/null 2>&1 ]
37         then
38                 AC_MSG_RESULT(yes)
39         else
40                 GMCS=no
41                 AC_MSG_RESULT(no)
42         fi
44         rm -f $tmpin $tmpout
47 case "$host" in
48         *-*-mingw*|*-*-cygwin*)
49         platform_win32=yes      
50         ;;
51 esac
53 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
54 AM_CONDITIONAL(NET_2_0, test ! x$GMCS = xno)
55 AM_CONDITIONAL(XSP_ONLY, test ! x$CSC = xno)
57 echo "$CS compiler: $MCS"
58 test x$GMCS = xno || echo "$CS 2.0 compiler: $GMCS"
60 AC_SUBST(MCS)
61 AC_SUBST(GMCS)
62 AC_SUBST(RUNTIME)
63 AC_OUTPUT([
64         Makefile
65         man/xsp.1
66         man/dbsessmgr.1
67         man/asp-state.1
68         man/Makefile
69         scripts/Makefile
70         src/Makefile
71         src/AssemblyInfo.cs
72         src/AssemblyInfoModMono.cs
73         src/Mono.WebServer/AssemblyInfo.cs
74         src/Mono.WebServer/AssemblyInfo2.cs
75         src/Mono.WebServer/Makefile
76         src/Mono.WebServer/xsp.pc
77         src/Mono.WebServer/xsp-2.pc
78         test/Makefile
79         test/1.1/Makefile
80         test/1.1/authtest/Makefile
81         test/1.1/asp.net/Makefile
82         test/1.1/webcontrols/Makefile
83         test/1.1/html/Makefile
84         test/1.1/webservice/Makefile
85         test/1.1/databind/Makefile
86         test/1.1/handlers/Makefile
87         test/1.1/customcontrol/Makefile
88         test/2.0/Makefile
89         test/2.0/menu/Makefile
90         test/2.0/treeview/Makefile
91         test/2.0/masterpages/Makefile
92         tools/Makefile
93         tools/asp_state/Makefile
94         tools/asp_state/AssemblyInfo.cs
95         tools/dbsessmgr/Makefile
96         tools/dbsessmgr/AssemblyInfo.cs