-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
300 lines (264 loc) · 6.36 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
dnl run autogen.sh to generate the configure script.
AC_PREREQ(2.59)
AC_INIT(wso2-wsf-php-src, 2.1.0)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([tar-ustar])
AC_PREFIX_DEFAULT(/usr/local/wsf_c)
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
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
dnl Checks for libraries.
AC_CHECK_LIB(dl, dlopen)
AC_CHECK_LIB(z, inflate)
AC_CONFIG_SUBDIRS(src)
axis2_prefix="/usr/local/axis2"
export axis2_prefix
if test -d $srcdir/wsf_c; then
AC_CONFIG_SUBDIRS(wsf_c)
fi
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration "
fi
LDFLAGS="$LDFLAGS -lpthread"
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h string.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([net/if.h], [], [],
[#include <stdio.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
AC_CHECK_HEADERS([linux/if.h],[],[],
[
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
AC_CHECK_HEADERS([net/if_types.h])
AC_CHECK_HEADERS([net/if_dl.h])
dnl This is a check to see if we are running MacOS X
dnl It may be better to do a Darwin check
AC_CHECK_HEADERS([sys/appleapiopts.h])
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_MSG_CHECKING(whether to build rampart )
AC_ARG_ENABLE(rampart, [ --enable-rampart build ramprt. default=yes],
[ case "${enableval}" in
no)
AC_MSG_RESULT(yes)
RAMPART_DIR=""
;;
*)
AC_MSG_RESULT(yes)
RAMPART_DIR="rampart"
if test -d $srcdir/rampart; then
AC_CONFIG_SUBDIRS(rampart)
fi
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING(whether to build libxml2 xml parser library)
AC_ARG_ENABLE(libxml2, [ --enable-libxml2 build libxml2 xml parser library wrapper. default=no],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
WRAPPER_DIR=""
;;
*)
AC_MSG_RESULT(yes)
WRAPPER_DIR="libxml2"
PKG_CHECK_MODULES(PARSER, libxml-2.0)
CFLAGS="$CFLAGS $PARSER_LIBS"
;;
esac ],
AC_MSG_RESULT(no)
WRAPPER_DIR="libxml2"
)
GUTHTHILA_LIBS=""
AC_MSG_CHECKING(whether to build guththila xml parser library)
AC_ARG_ENABLE(guththila, [ --enable-guththila build guththila xml parser library wrapper. default=yes],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
WRAPPER_DIR="guththila"
if test -d $srcdir/guththila; then
AC_CONFIG_SUBDIRS(guththila)
fi
GUTHTHILA_LIBS="/guththila/src/"
GUTHTHILA_DIR="guththila"
;;
esac ],
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(whether to use apache2 as server transport)
AC_ARG_WITH(apache2,
[ --with-apache2[=PATH] use apache2 as server transport.],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
APACHE2BUILD=""
;;
*)
AC_MSG_RESULT(yes)
dnl Find apache2 include dir in the path pointed by APACHE2_HOME env variable
if test -d $withval; then
apache2inc="-I$withval/include"
dnl else find the apache2 include dir in /usr/local/apache2
elif test -d '/usr/include/apache2'; then
apache2inc="-I/usr/include/apache2"
else
AC_MSG_ERROR(could not find apache2. stop)
fi
APACHE2BUILD="apache2"
;;
esac ],
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(whether to use apr. Note that if you build with apache2 you might need to do this.)
AC_ARG_WITH(apr,
[ --with-apr[=PATH] use apr.],
[ case "$withval" in
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
dnl Find apr include dir in the path
if test -d $withval; then
aprinc="-I$withval/include"
dnl else find the apache2 include dir in /usr/local/apache2
elif test -d '/usr/include/apr-0'; then
aprinc="-I/usr/include/apr-0"
else
AC_MSG_ERROR(could not find apr. stop)
fi
;;
esac ],
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(whether to build tests)
AC_ARG_ENABLE(tests, [ --enable-tests build tests. default=no],
[ case "${enableval}" in
yes)
AC_MSG_RESULT(yes)
TESTDIR="test"
;;
*)
AC_MSG_RESULT(no)
TESTDIR=""
;;
esac ],
AC_MSG_RESULT(no)
TESTDIR=""
)
#AC_CHECK_LIB(cutest, CuTestInit, [], [TESTDIR=""])
AC_MSG_CHECKING(whether to enable trace)
AC_ARG_ENABLE(trace, [ --enable-trace enable trace. default=no],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
CFLAGS="$CFLAGS"
;;
*)
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -DAXIS2_TRACE"
;;
esac ],
AC_MSG_RESULT(no)
CFLAGS="$CFLAGS"
)
AC_MSG_CHECKING(whether to enable multi threading)
AC_ARG_ENABLE(multi-thread, [ --enable-multi-thread enable multi thread. default=yes],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
CFLAGS="$CFLAGS"
;;
*)
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -DAXIS2_SVR_MULTI_THREADED"
;;
esac ],[
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -DAXIS2_SVR_MULTI_THREADED"]
)
AC_MSG_CHECKING(whether to use openssl)
AC_ARG_ENABLE(openssl, [ --enable-openssl enable ssl. default=yes],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
CFLAGS="$CFLAGS"
ssl_enabled=false
;;
*)
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -DAXIS2_SSL_ENABLED"
ssl_enabled=true
;;
esac ],
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -DAXIS2_SSL_ENABLED"
ssl_enabled=true
)
AC_MSG_CHECKING(whether to build dynamic invocation client library)
AC_ARG_ENABLE(diclient, [ --enable-diclient build diclient library wrapper. default=no],
[ case "${enableval}" in
no)
AC_MSG_RESULT(no)
DICLIENT_DIR=""
;;
*)
AC_MSG_RESULT(yes)
DICLIENT_DIR="diclient"
;;
esac ],
AC_MSG_RESULT(yes)
DICLIENT_DIR="diclient"
)
APACHE2INC=$apache2inc
APRINC=$aprinc
AC_MSG_RESULT($EXTENSION_DIR)
AC_SUBST(EXTENSION_DIR)
AC_SUBST(PARSER_LIBS)
AC_SUBST(APACHE2INC)
AC_SUBST(APRINC)
AC_SUBST(DICLIENT_DIR)
AC_SUBST(TESTDIR)
AC_SUBST(SAMPLES)
AC_SUBST(APACHE2BUILD)
AC_SUBST(PARSER_DIR)
AC_SUBST(WRAPPER_DIR)
AC_SUBST(GUTHTHILA_DIR)
AC_SUBST(RAMPART_DIR)
AC_SUBST(GUTHTHILA_LIBS)
AM_CONDITIONAL(AXIS2_SSL_ENABLED, test x$ssl_enabled = xtrue)
#export PARSER_DIR
export WRAPPER_DIR
export prefix
AC_CONFIG_COMMANDS([wsf], [cd src])
AC_CONFIG_COMMANDS([php], [phpize])
AC_CONFIG_FILES([Makefile
])
AC_OUTPUT