-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
349 lines (320 loc) · 11.1 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
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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# Process this file with autoconf to produce a configure script.
AC_INIT(gsoap, 2.8)
AM_INIT_AUTOMAKE(gsoap, 2.8)
AC_CONFIG_SRCDIR([gsoap/stdsoap2.cpp])
AC_CANONICAL_HOST
# AC_CONFIG_HEADERS([config.h])
AM_CONFIG_HEADER(config.h)
# we use subdirs.
AC_PROG_MAKE_SET
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_CPP
AC_PROG_RANLIB
#AM_PROG_LIBTOOL
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_INSTALL
# AC_DECL_YYTEXT
SAMPLE_EXTRA_LIBS="-lm"
# Platform-specific Makefile setup
case "${host}" in
*-*-solaris*) platform=SUN_OS
SAMPLE_EXTRA_LIBS="-lxnet -lsocket -lnsl -lm"
WSDL2H_EXTRA_LIBS="-lssl -lcrypto -lz -lsocket -lxnet -lnsl -lrt"
;;
*-*-sysv5*) platform=UNIXWARE ;;
*-*-UnixWare*) platform=UNIXWARE ;;
*-*-unixware*) platform=UNIXWARE ;;
*-*-sco3.2v5*) platform=OPENSERVER
SAMPLE_EXTRA_LIBS="-lsocket -lm"
;;
*-*-linux*) platform=LINUX
# if test x$debug = xtrue; then
# CFLAGS="-g" #don't want the -O2 for debugging.
# else
# CFLAGS="-O2" #don't want the -g for release compile.
# fi
;;
*-*-cygwin*) platform=CYGWIN ;;
*-*-mingw*) platform=MINGW
SAMPLE_EXTRA_LIBS="-lws2_32 -lkernel32 -luser32 -lgdi32 -lm"
WSDL2H_EXTRA_LIBS="-lssl -lcrypto -lws2_32 -lkernel32 -luser32 -lgdi32 -lm"
;;
*-*-freebsd*) platform=FREEBSD ;;
*-*-openbsd*) platform=OPENBSD ;;
*-*-irix*) platform=IRIX ;;
*-*-aix*) platform=AIX
case "${host}" in
*-*-aix4.1*) osver=AIX41;;
*-*-aix4.2*) osver=AIX42;;
*-*-aix4.3*) osver=AIX43;;
*-*-aix4.*) osver=AIX43;;
*-*-aix5.2) osver=AIX52;;
*-*-aix5.3) osver=AIX53;;
*-*-aix6.1) osver=AIX61;;
esac
;;
*-sequent-*) platform=PTX ;;
*-*-hp*) platform=HP_UX ;
case "${host}" in
*-*-hpux11*) osver=HPUX11;;
*-*-hpux10*) osver=HPUX10;;
*) osver=HPUX11;;
esac
;;
*-*-mvs*) platform=OS390 ;;
*-*-os400*) platform=OS400 ;;
*-*-OS400*) platform=OS400 ;;
*-*-osf*) platform=TRU64 ;;
*-apple-*) platform=MACOSX
# Appease 10.7 Lion (OpenSSL deprecated)
CXXFLAGS="-Wno-deprecated-declarations"
CFLAGS="-Wno-deprecated-declarations"
;;
*-nto-qnx) platform=QNX
SAMPLE_EXTRA_LIBS="-lsocket -lm"
;;
*) platform=UNKNOWN ;;
esac
AC_SUBST(SAMPLE_EXTRA_LIBS)
AC_SUBST(platform)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h xlocale.h errno.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h strings.h stdint.h inttypes.h time.h sys/inttypes.h sys/socket.h sys/types.h sys/time.h sys/timeb.h unistd.h poll.h openssl/ssl.h gnutls/gnutls.h zlib.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,,
[
#include <sys/types.h>
#include <time.h>
])
# Checks for library functions.
AC_FUNC_MKTIME
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([random gettimeofday ftime localtime_r timegm gmtime gmtime_r memset select socket snprintf strchr strerror strerror_r strrchr strstr strtol strtoul strtoll strtoull strtold strtod strtof strtold_l strtod_l strtof_l sscanf sscanf_l sprintf_l wctomb mbtowc poll])
# Checks for isnan and isinf
AC_CHECK_FUNC(isnan, [has_isnan=1; AC_DEFINE(HAVE_ISNAN, 1, isnan)], has_isnan=0)
AC_CHECK_FUNC(isinf, [has_isinf=1; AC_DEFINE(HAVE_ISINF, 1, isinf)], has_isinf=0)
# check for macro isnan in math
if test $has_isnan = 0; then
AC_MSG_CHECKING(for macro isnan)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[{ int foo; foo = isnan(0); }]])],[has_isnan=1],[has_isnan=0 ])
if test $has_isnan = 1; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISNAN, 1, isnan)
else
AC_MSG_RESULT(no)
fi
fi
# check for macro isinf in math
if test $has_isinf = 0; then
AC_MSG_CHECKING(for macro isinf)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[{ int foo; foo = isinf(0); }]])],[has_isinf=1],[has_isinf=0 ])
if test $has_isinf = 1; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISINF, 1, isinf)
else
AC_MSG_RESULT(no)
fi
fi
# Function test depending on platform
# AIX Has incompatible gethostbyname_r
if test $platform != AIX -a $platform != TRU64; then
AC_CHECK_FUNCS([gethostbyname_r])
AC_FUNC_MALLOC
fi
# the debug build options adds symbols to compiler output (-g for g++)
AC_ARG_ENABLE(debug,
[ --enable-debug add debug symbols for debugging],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false])
AM_CONDITIONAL(DEBUG_COMPILE, test x$debug = xtrue)
if test x$debug = xtrue; then
SOAPCPP2_DEBUG="-DDEBUG" ##define DEBUG for debugging
else
SOAPCPP2_DEBUG=
fi
AC_SUBST(SOAPCPP2_DEBUG)
# set the default soapcpp2 import path
SOAPCPP2_IMPORTPATH="-DSOAPCPP_IMPORT_PATH=\"\\\"${datadir}/gsoap/import\\\"\""
#SOAPCPP2_IMPORTPATH="-DSOAPCPP2_IMPORT_PATH=\"\\\"`pwd`/gsoap/import\\\"\""
AC_SUBST(SOAPCPP2_IMPORTPATH)
# set the default wsdl2h import path
WSDL2H_IMPORTPATH="-DWSDL_IMPORT_PATH=\"\\\"${datadir}/gsoap/WS\\\"\""
#WSDL2H_IMPORTPATH="-DWSDL2H_IMPORT_PATH=\"\\\"`pwd`/gsoap/WS\\\"\""
AC_SUBST(WSDL2H_IMPORTPATH)
# the disable-namespaces option adds the -DWITH_NONAMESPACES to the
# library compilation thus disabling namespaces
AC_ARG_ENABLE(namespaces,
[AC_HELP_STRING([--disable-namespaces],
[compile library without namespaces])],
[with_namespaces="$enable_ns"],
[with_namespaces="yes"])
AC_MSG_CHECKING(for disable namespaces in library)
if test "x$with_namespaces" = "xyes"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
SOAPCPP2_NONAMESPACES="-DWITH_NONAMESPACES" ##define to remove nsmap link dependence
fi
AC_SUBST(SOAPCPP2_NONAMESPACES)
# the enable-ipv6 option adds the -DWITH_IPV6 to the
# library compilation thus enabling IPv6
AC_ARG_ENABLE(ipv6,
[AC_HELP_STRING([--enable-ipv6],
[compile library with IPv6 support])],
[with_ipv6="yes"],
[with_ipv6="$disable_ipv6"])
AC_MSG_CHECKING(for enable ipv6 in library)
if test "x$with_ipv6" = "xyes"; then
AC_MSG_RESULT(yes)
SOAPCPP2_IPV6="-DWITH_IPV6 -DWITH_NO_IPV6_V6ONLY" ##define to add IPv6 support
else
AC_MSG_RESULT(no)
fi
AC_SUBST(SOAPCPP2_IPV6)
# the OpenSSL installation prefix path
AC_ARG_WITH([openssl],
AS_HELP_STRING([--with-openssl=DIR],
[openssl installation prefix]),
[OPENSSL=$withval],)
# the disable-ssl option removes the dependence on OpenSSL
AC_ARG_ENABLE(ssl,
[AC_HELP_STRING([--disable-ssl],
[build without SSL/TLS])],
[with_openssl="$enable_openssl"],
[with_openssl="yes"])
# the enable-gnutls option enables GNUTLS in favor of OpenSSL
AC_ARG_ENABLE(gnutls,
[AC_HELP_STRING([--enable-gnutls],
[build with GNUTLS SSL/TLS])],
[with_gnutls="yes"],
[with_gnutls="$disable_gnutls"])
AC_MSG_CHECKING(for disable openssl in library)
if test "x$with_openssl" = "xyes"; then
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for enable gnutls in library)
if test "x$with_gnutls" = "xyes"; then
AC_MSG_RESULT(yes)
WSDL2H_EXTRA_FLAGS="-DWITH_GNUTLS -DWITH_GZIP"
WSDL2H_EXTRA_LIBS="-lgnutls -lgcrypt -lgpg-error -lz"
SAMPLE_SSL_LIBS="-lgnutls -lgcrypt -lgpg-error -lz"
WSDL2H_SOAP_CPP_LIB="libgsoapssl++.a"
else
AC_MSG_RESULT(no)
WSDL2H_EXTRA_FLAGS="-DWITH_OPENSSL -DWITH_GZIP"
# an ugly hack to get httpda and md5evp plugins to conditionally
# compile with wsdl2h when OPENSSL is available
WSDL2H_EXTRA_LIBS="../plugin/httpda.c ../plugin/md5evp.c -lssl -lcrypto -lz"
SAMPLE_SSL_LIBS="-lssl -lcrypto -lz"
WSDL2H_SOAP_CPP_LIB="libgsoapssl++.a"
fi
if test -n "$OPENSSL"; then
WSDL2H_EXTRA_FLAGS="-I${OPENSSL}/include ${WSDL2H_EXTRA_FLAGS}"
WSDL2H_EXTRA_LIBS="-L${OPENSSL}/lib ${WSDL2H_EXTRA_LIBS}"
SAMPLE_SSL_LIBS="-L${OPENSSL}/lib ${SAMPLE_SSL_LIBS}"
fi
else
AC_MSG_RESULT(yes)
WSDL2H_EXTRA_FLAGS=
WSDL2H_EXTRA_LIBS=
SAMPLE_SSL_LIBS=
WSDL2H_SOAP_CPP_LIB="libgsoap++.a"
fi
AC_SUBST(WSDL2H_EXTRA_FLAGS)
AC_SUBST(WSDL2H_EXTRA_LIBS)
AC_SUBST(SAMPLE_SSL_LIBS)
AC_SUBST(WSDL2H_SOAP_CPP_LIB)
# enable the compile of the samples
AC_ARG_ENABLE(samples,
[ --enable-samples enable compile for the gsoap samples],
[case "${enableval}" in
yes) samples=true ;;
no) samples=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-samples) ;;
esac],[samples=false])
AM_CONDITIONAL(ENABLE_SAMPLES, test x$samples = xtrue)
AC_SUBST(ENABLE_SAMPLES)
if test x$samples = xtrue; then
SAMPLE_DIRS=". samples"
else
SAMPLE_DIRS=
fi
AC_SUBST(SAMPLE_DIRS)
if test x$LEX = xflex; then
LEX_DEFINE=-DWITH_FLEX
LEX_FLAGS="-l"
else
AC_MSG_WARN(No 'flex' command detected on current path: trying existing scanner, but this may fail to build wsdl2h)
LEX_DEFINE=-DWITH_LEX
LEX_FLAGS=
fi
AC_SUBST(LEX_DEFINE)
AC_SUBST(LEX_FLAGS)
AC_SUBST(LEXLIB)
# check if we must define -DWITH_BISON
if test "$YACC" = "bison -y"; then
BISON_DEFINE=-DWITH_BISON
YACC_LIB=
else
BISON_DEFINE=-DWITH_YACC
YACC_LIB="-ly"
fi
AC_SUBST(BISON_DEFINE)
AC_SUBST(YACC_LIB)
AC_CONFIG_FILES([ Makefile \
gsoap.pc gsoap++.pc gsoapck.pc gsoapck++.pc gsoapssl.pc gsoapssl++.pc \
gsoap/Makefile \
gsoap/src/Makefile \
gsoap/wsdl/Makefile \
gsoap/samples/Makefile \
gsoap/samples/autotest/Makefile \
gsoap/samples/calc/Makefile \
gsoap/samples/calc++/Makefile \
gsoap/samples/chaining/Makefile \
gsoap/samples/chaining++/Makefile \
gsoap/samples/databinding/Makefile \
gsoap/samples/dime/Makefile \
gsoap/samples/dom/Makefile \
gsoap/samples/oneway/Makefile \
gsoap/samples/oneway++/Makefile \
gsoap/samples/factory/Makefile \
gsoap/samples/factorytest/Makefile \
gsoap/samples/gmt/Makefile \
gsoap/samples/googleapi/Makefile \
gsoap/samples/hello/Makefile \
gsoap/samples/httpcookies/Makefile \
gsoap/samples/lu/Makefile \
gsoap/samples/magic/Makefile \
gsoap/samples/mashup/Makefile \
gsoap/samples/mashup++/Makefile \
gsoap/samples/mtom/Makefile \
gsoap/samples/mtom-stream/Makefile \
gsoap/samples/polytest/Makefile \
gsoap/samples/primes/Makefile \
gsoap/samples/roll/Makefile \
gsoap/samples/router/Makefile \
gsoap/samples/rss/Makefile \
gsoap/samples/ssl/Makefile \
gsoap/samples/template/Makefile \
gsoap/samples/udp/Makefile \
gsoap/samples/varparam/Makefile \
gsoap/samples/wsa/Makefile \
gsoap/samples/wsrm/Makefile \
gsoap/samples/wsse/Makefile \
gsoap/samples/xml-rpc-json/Makefile
gsoap/samples/rest/Makefile
])
AC_OUTPUT