forked from xplicit/HyperFastCgi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
154 lines (126 loc) · 3.81 KB
/
configure.ac
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
dnl Warning: This is an automatically generated file, do not edit!
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.54])
AC_INIT([HyperFastCgi], [0.4])
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([build/m4])
AM_INIT_AUTOMAKE([silent-rules foreign])
AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])
AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/shamrock -I build/m4/shave \${ACLOCAL_FLAGS}"])
dnl pkg-config
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
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR
# Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC([gcc])
AC_PROG_MKDIR_P
AM_PROG_LIBTOOL
LT_INIT
# Checks for required packages
PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.20])
PKG_CHECK_MODULES([LIBEVENT],[libevent >= 2.0])
PKG_CHECK_MODULES([LIBEVENT_PTHREADS],[libevent_pthreads >= 2.0])
# Mono
SHAMROCK_CHECK_MONO2_MODULE(2.10.0)
SHAMROCK_FIND_MONO_2_0_COMPILER
SHAMROCK_FIND_MONO_4_0_COMPILER
SHAMROCK_FIND_MONO_RUNTIME
SHAMROCK_FIND_PROGRAM_OR_BAIL(GACUTIL, gacutil)
SHAMROCK_FIND_PROGRAM_OR_BAIL(SN, sn)
SAVED_DMCS="$DMCS"
SAVED_GMCS="$GMCS"
if test "x$RUNTIME" = "x" ; then
RUNTIME="$MONO"
fi
CS="C#"
if test "x$GMCS" = "xno" -a "x$DMCS" = "xno" ; then
AC_MSG_ERROR([No $CS compiler found. gmcs or dmcs must be installed.])
fi
GACUTIL_FLAGS='-root $(DESTDIR)$(prefix)/lib'
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
;;
esac
#AM_CONDITIONAL(UNITTESTS, test x${UNIT_TESTS} = xyes)
#AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AM_CONDITIONAL(NET_2_0, test ! x$GMCS = xno)
AM_CONDITIONAL(NET_4_0, test ! x$DMCS = xno)
AC_SUBST(GMCS)
AC_SUBST(DMCS)
AC_SUBST(RUNTIME)
AC_SUBST(GACUTIL)
AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(SN)
AC_ARG_ENABLE(debug_x86,
AC_HELP_STRING([--enable-debug_x86],
[Use 'DEBUG_X86' Configuration [default=NO]]),
enable_debug_x86=yes, enable_debug_x86=no)
AM_CONDITIONAL(ENABLE_DEBUG_X86, test x$enable_debug_x86 = xyes)
if test "x$enable_debug_x86" = "xyes" ; then
CONFIG_REQUESTED="yes"
fi
AC_ARG_ENABLE(release_x86,
AC_HELP_STRING([--enable-release_x86],
[Use 'RELEASE_X86' Configuration [default=YES]]),
enable_release_x86=yes, enable_release_x86=no)
AM_CONDITIONAL(ENABLE_RELEASE_X86, test x$enable_release_x86 = xyes)
if test "x$enable_release_x86" = "xyes" ; then
CONFIG_REQUESTED="yes"
fi
if test -z "$CONFIG_REQUESTED" ; then
AM_CONDITIONAL(ENABLE_RELEASE_X86, true)
enable_release_x86=yes
fi
dnl package checks, common for all configs
#AM_COND_IF([NET_4_0],[PKG_CHECK_MODULES([XSP_4],[xsp-4])])
#AM_COND_IF([NET_2_0],[PKG_CHECK_MODULES([XSP_2],[xsp-2])])
AC_CONFIG_FILES([Makefile
build/Makefile
build/m4/Makefile
build/m4/shave/shave
build/m4/shave/shave-libtool
src/Makefile
src/HyperFastCgi/Makefile
src/HyperFastCgi/scripts/Makefile
src/libnative/Makefile
samples/Makefile
])
AM_COND_IF([NET_4_0],[AC_CONFIG_FILES([src/HyperFastCgi/scripts/hyperfastcgi4])])
AM_COND_IF([NET_2_0],[AC_CONFIG_FILES([src/HyperFastCgi/scripts/hyperfastcgi2])])
#SHAVE_INIT([build/m4/shave], [enable])
AC_OUTPUT
TARGET_FRAMEWORKS=""
if test "x$SAVED_GMCS" = "xno"; then
GMCS_STRING="not found"
else
GMCS_STRING="$SAVED_GMCS"
TARGET_FRAMEWORKS=".NET 2.0"
fi
if test "x$SAVED_DMCS" = "xno"; then
DMCS_STRING="not found"
else
DMCS_STRING="$SAVED_DMCS"
if test -n "$TARGET_FRAMEWORKS"; then
TARGET_FRAMEWORKS="$TARGET_FRAMEWORKS, .NET 4.0"
else
TARGET_FRAMEWORKS=".NET 4.0"
fi
fi
cat <<EOF
${PACKAGE}-${VERSION}
Build Environment
Install prefix: ${prefix}
Datadir: ${expanded_datadir}
Libdir: ${expanded_libdir}
Build documentation: ${enable_docs}
Mono 2.0 compiler: ${GMCS_STRING}
Mono 4.0 compiler: ${DMCS_STRING}
Target frameworks: ${TARGET_FRAMEWORKS}
EOF