-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
230 lines (207 loc) · 5.91 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
dnl run autogen.sh to generate the configure script.
AC_PREREQ(2.59)
AC_INIT(savanc-src, 1.0)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([tar-ustar])
AC_PREFIX_DEFAULT(/usr/local/savanc)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl Checks for libraries.
AC_CHECK_LIB(dl, dlopen)
if test -d $srcdir/samples; then
AC_CONFIG_SUBDIRS(samples)
fi
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration"
#CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration"
fi
LDFLAGS="-lpthread"
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h string.h])
dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_C_CONST
dnl Checks for library functions.
dnl AC_FUNC_MALLOC
dnl AC_FUNC_REALLOC
#AC_CHECK_FUNCS([memmove])
abs_top_builddir=`pwd`
AC_SUBST(abs_top_builddir)
AC_MSG_CHECKING(path to use Axis2C . This is a compulsory to build Savan/C)
AC_ARG_WITH(axis2,
[ --with-axis2[=PATH] use axis2c.],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT($withval)
dnl Find axis2 include dir in the path
if test -d $withval; then
AXIS2INC="-I$withval"
dnl else find the axis2inc include dir in $(WSFC_HOME)/include
elif [ -d "$abs_top_builddir" ]; then
AXIS2INC="-I$abs_top_builddir/../axis2c/include"
else
AC_MSG_ERROR(could not find axis2inc. stop)
fi
;;
esac ],
AXIS2INC="-I$abs_top_builddir/../axis2c/include"
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(whether to build sqlite based subscription manager)
AC_ARG_ENABLE(sqlite, [ --enable-sqlite
build Sqlite based subscription manager (default=yes)],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
SAVAN_SUBS_MGR_SQLITE="sqlite"
SAVAN_SUBS_MGR="sqlite"
;;
esac ],
AC_MSG_RESULT(yes)
SAVAN_SUBS_MGR_SQLITE="sqlite"
SAVAN_SUBS_MGR="sqlite"
)
AC_MSG_CHECKING(whether to build service based subscription manager)
AC_ARG_ENABLE(service, [ --enable-service
build service based subscription manager (default=no)],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
SAVAN_SUBS_MGR_SERVICE=""
SAVAN_SUBS_MGR=""
;;
*)
AC_MSG_RESULT(yes)
SAVAN_SUBS_MGR_SERVICE="service"
SAVAN_SUBS_MGR="service"
;;
esac ],
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(To Use Registry based subscription manager. This is an optional module to build Savan C)
AC_ARG_WITH(registry,
[ --with-registry[=PATH] Find the REGISTRY header files in 'PATH'.
'PATH' should point to REGISTRY include files location.
If you omit the '=PATH' part completely, the configure script will search
'$(WSFC_HOME)/include/registry-0.1.0' for REGISTRY headers.],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
SAVAN_SUBS_MGR_REGISTRY=""
SAVAN_SUBS_MGR=""
;;
*)
AC_MSG_RESULT(yes)
SAVAN_SUBS_MGR_REGISTRY="registry"
SAVAN_SUBS_MGR="registry"
dnl Find registry include dir in the path
if test -d $withval; then
registryinc="-I$withval"
dnl else find the registry include dir in $(WSFC_HOME)/include
elif test -d '$(WSFC_HOME)/include'; then
registryinc="-I$(WSFC_HOME)/include/registry-0.1.0"
else
AC_MSG_ERROR(could not find registry. stop)
fi
;;
esac ],
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(To Use XPath based filter . This is an optional module to build Savan C)
AC_ARG_ENABLE(xpath, [ --enable-xpath
Enable XPath filtering support (default=yes)],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
SAVAN_FILTER=""
SAVAN_FILTER_LIB=""
;;
*)
AC_MSG_RESULT(yes)
SAVAN_FILTER="xpath"
SAVAN_FILTER_LIB=xpath/libsavan_filter_mod.la
dnl Find libxml2 include dir in the path
dnl Find the libxml2/libxslt include dir in /usr/include
if test -d '/usr/include'; then
xpathinc="-I/usr/include"
else
AC_MSG_ERROR(could not find libxml2/libxslt. Assume set in CFLAGS)
fi
PKG_CHECK_MODULES(XSLT, libxslt)
CFLAGS="$CFLAGS -DSAVAN_FILTERING $XSLT_CFLAGS"
LDFLAGS="$LDFLAGS -lxslt"
;;
esac ],
AC_MSG_RESULT(no)
)
#Default for savan publisher
SAVAN_PUBLISHER_XPATH="default"
SAVAN_PUBLISHER_LIB="default/libsavan_publisher.la"
AC_MSG_CHECKING(To Use Xml Schema.)
AXIOMINC="-I$abs_top_builddir/../axis2c/axiom/include"
UTILINC="-I$abs_top_builddir/../axis2c/util/include"
NEETHIINC="-I$abs_top_builddir/../axis2c/neethi/include"
CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
REGISTRYINC=$registryinc
XPATHINC=$xpathinc
AC_SUBST(REGISTRYINC)
AC_SUBST(XPATHINC)
AC_SUBST(AXIS2INC)
AC_SUBST(AXIOMINC)
AC_SUBST(UTILINC)
AC_SUBST(NEETHIINC)
AC_SUBST(XMLSCHEMAINC)
AC_SUBST(SAVAN_SUBS_MGR_REGISTRY)
AC_SUBST(SAVAN_SUBS_MGR_SERVICE)
AC_SUBST(SAVAN_SUBS_MGR_SQLITE)
AC_SUBST(SAVAN_SUBS_MGR)
AC_SUBST(SAVAN_FILTER)
AC_SUBST(SAVAN_FILTER_LIB)
AC_SUBST(SAVAN_PUBLISHER_ESB)
AC_SUBST(SAVAN_PUBLISHER_XPATH)
AC_SUBST(SAVAN_PUBLISHER_LIB)
export SAVAN_SUBS_MGR_REGISTRY
export SAVAN_SUBS_MGR_SERVICE
export SAVAN_SUBS_MGR_SQLITE
export SAVAN_SUBS_MGR
export SAVAN_FILTER
export SAVAN_FILTER_LIB
export SAVAN_PUBLISHER_ESB
export SAVAN_PUBLISHER_XPATH
export SAVAN_PUBLISHER_LIB
AC_CONFIG_FILES([Makefile \
src/Makefile \
src/client/Makefile\
src/core/Makefile\
src/handlers/Makefile \
src/msgreceivers/Makefile\
src/subscribers/Makefile\
src/subs_mgrs/Makefile\
src/subs_mgrs/common/Makefile\
src/subs_mgrs/sqlite/Makefile\
src/subs_mgrs/service/Makefile\
src/subs_mgrs/service/subs_mgr_svc/Makefile\
src/filters/Makefile\
src/filters/common/Makefile\
src/filters/xpath/Makefile\
src/publishers/Makefile\
src/publishers/common/Makefile\
src/publishers/default/Makefile\
src/data/Makefile\
src/util/Makefile
])
AC_OUTPUT