This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
/
configure.in
164 lines (143 loc) · 3.83 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
AC_PREREQ(2.57)
AC_INIT(src/Mono.WebServer.XSP/main.cs)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(xsp, 2.4.3)
AM_MAINTAINER_MODE
AC_PROG_INSTALL
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
#
# --enable-tracing
#
AC_MSG_CHECKING([if tracing is requested])
AC_ARG_ENABLE([tracing],
AC_HELP_STRING([--enable-tracing],[enable producing XSP tracing messages]),
[enable_tracing=$enableval],
[enable_tracing=no])
if test "x$enable_tracing" != "xno" ; then
AC_MSG_RESULT([yes])
WEBTRACING="-define:WEBTRACE -define:TRACE"
else
AC_MSG_RESULT([no])
WEBTRACING=""
fi
AC_ARG_WITH([runtime],
AC_HELP_STRING([--with-runtime],[use the specified runtime when xsp is installed]),
[RUNTIME=$withval])
AC_PATH_PROG(CSC, csc, no)
AC_PATH_PROG(MCS, mcs, no)
AC_PATH_PROG(GMCS, gmcs, no)
if test "x$RUNTIME" = "x" ; then
if test -x "${prefix}/bin/mono" ; then
AC_MSG_CHECKING([for runtime in the installation prefix])
RUNTIME="${prefix}/bin/mono"
AC_MSG_RESULT([$RUNTIME])
else
AC_PATH_PROG(RUNTIME, mono, no)
fi
fi
AC_PATH_PROG(GACUTIL, gacutil, no)
AC_PATH_PROG(SN, sn, no)
CS="C#"
if test "x$CSC" = "xno" -a "x$MCS" = "xno" ; then
dnl AC_MSG_ERROR([You need to install a C# compiler])
AC_MSG_ERROR([No $CS compiler found])
fi
if test "x$MCS" = "xno" ; then
MCS=$CSC
fi
if test "x$GMCS" != "xno" ; then
AC_MSG_CHECKING([whether gmcs is actually able to compile...])
echo "class Foo { public static void Main() {} }" > test.cs
if [ gmcs -r:System.Web.dll -out:test.exe test.cs > /dev/null 2>&1 ]
then
AC_MSG_RESULT(yes)
else
GMCS=no
AC_MSG_RESULT(no)
fi
rm -f test.cs test.exe
fi
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
;;
esac
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AM_CONDITIONAL(NET_2_0, test ! x$GMCS = xno)
AM_CONDITIONAL(XSP_ONLY, test x$platform_win32 = xyes)
GACUTIL_FLAGS='-root $(DESTDIR)$(prefix)/lib'
# Put the version in the new required format (for svn revisions)
export VERSION
[XSP_VERSION=$($AWK 'BEGIN {
split (ENVIRON["VERSION"] ".0.0.0", vsplit, ".")
if(length(vsplit [1]) > 4) {
split (substr(ENVIRON["VERSION"], 0, 4) "." substr(ENVIRON["VERSION"], 5) ".0.0", vsplit, ".")
}
print vsplit [1] "." vsplit [2] "." vsplit [3] "." vsplit [4]
}')]
AC_SUBST(WEBTRACING)
AC_SUBST(MCS)
AC_SUBST(GMCS)
AC_SUBST(RUNTIME)
AC_SUBST(GACUTIL)
AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(SN)
AC_SUBST(VERSION)
AC_SUBST(XSP_VERSION)
AC_OUTPUT([
Makefile
man/xsp.1
man/dbsessmgr.1
man/asp-state.1
man/mono-asp-apps.1
man/Makefile
packaging/Makefile
packaging/opensuse/Makefile
scripts/Makefile
src/Makefile
src/Mono.WebServer/AssemblyInfo.cs
src/Mono.WebServer/AssemblyInfo2.cs
src/Mono.WebServer/Makefile
src/Mono.WebServer/xsp.pc
src/Mono.WebServer/xsp-2.pc
src/Mono.WebServer.Apache/Makefile
src/Mono.WebServer.Apache/AssemblyInfo.cs
src/Mono.WebServer.FastCgi/Makefile
src/Mono.WebServer.FastCgi/AssemblyInfo.cs
src/Mono.WebServer.XSP/Makefile
src/Mono.WebServer.XSP/AssemblyInfo.cs
test/Makefile
test/controls/Makefile
test/App_Code/Makefile
test/1.1/Makefile
test/1.1/authtest/Makefile
test/1.1/asp.net/Makefile
test/1.1/webcontrols/Makefile
test/1.1/html/Makefile
test/1.1/webservice/Makefile
test/1.1/databind/Makefile
test/1.1/handlers/Makefile
test/1.1/customcontrol/Makefile
test/2.0/Makefile
test/2.0/menu/Makefile
test/2.0/gridview/Makefile
test/2.0/treeview/Makefile
test/2.0/masterpages/Makefile
tools/Makefile
tools/asp_state/Makefile
tools/asp_state/AssemblyInfo.cs
tools/dbsessmgr/Makefile
tools/dbsessmgr/AssemblyInfo.cs
tools/mono-asp-apps/Makefile
unittests/Makefile
unittests/Tests.XSP.Security/Makefile
unittests/webroot/Makefile
docs/Makefile
])
echo
echo "Runtime: $RUNTIME"
echo "$CS compiler: $MCS"
test x$GMCS = xno || echo "$CS 2.0 compiler: $GMCS"