SHA256
1
0
forked from pool/gsoap
gsoap/gsconfig.patch

243 lines
8.1 KiB
Diff

---
Makefile.am | 7 ++++++-
configure.ac | 36 +++++++++++++++++++++---------------
gsoap/stdsoap2.h | 40 +++++++++++++++++-----------------------
3 files changed, 44 insertions(+), 39 deletions(-)
Index: gsoap-2.8.78/Makefile.am
===================================================================
--- gsoap-2.8.78.orig/Makefile.am
+++ gsoap-2.8.78/Makefile.am
@@ -3,7 +3,7 @@
SUBDIRS = . gsoap
CLEANFILES = *~
VERYVERYCLEANFILES = *~ configure Makefile.in compile config.guess config.sub config.log autoscan.log \
-depcomp install-sh missing mkinstalldirs stamp-h.in config.h.in \
+depcomp install-sh missing mkinstalldirs stamp-h.in config.h.in gsoap_config.h \
aclocal.m4 *.cache Makefile
## not a GNU package. You can remove this line, if
@@ -52,3 +52,8 @@ backup:
cd $$BACKUPDIR && \
ls -l $$CURRENTDIR.tgz
+BUILT_SOURCES = gsoap_config.h
+nodist_include_HEADERS = gsoap_config.h
+
+gsoap_config.h: config.h
+ grep GSOAP_WITH_ $^ >$@
Index: gsoap-2.8.78/configure.ac
===================================================================
--- gsoap-2.8.78.orig/configure.ac
+++ gsoap-2.8.78/configure.ac
@@ -92,6 +92,13 @@ esac
AC_SUBST(SAMPLE_EXTRA_LIBS)
AC_SUBST(platform)
+AH_TEMPLATE([GSOAP_WITH_GNUTLS], [gsoap API uses gnutls])
+AH_TEMPLATE([GSOAP_WITH_GZIP], [gsoap API uses gzip/zlib])
+AH_TEMPLATE([GSOAP_WITH_IPV6], [gsoap API uses IPv6])
+AH_TEMPLATE([GSOAP_WITH_NO_IPV6_V6ONLY], [gsoap API uses IPv6/v6only])
+AH_TEMPLATE([GSOAP_WITH_OPENSSL], [gsoap API uses openssl])
+AH_TEMPLATE([GSOAP_WITH_XLOCALE], [gsoap API uses xlocale.h])
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h locale.h xlocale.h errno.h fcntl.h ctype.h limits.h float.h math.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])
@@ -191,21 +198,11 @@ else
fi
AC_SUBST(SOAPCPP2_NONAMESPACES)
-# the enable-xlocale option adds the -DWITH_INCLUDE_XLOCALE_H to the
-# library compilation thus forcing the inclusion of xlocale.h
-AC_ARG_ENABLE(xlocale,
- [AC_HELP_STRING([--enable-xlocale],
- [compile library with forced inclusion of xlocale.h])],
- [with_xlocale="$enable_xlocale"],
- [with_xlocale="no"])
-
-AC_MSG_CHECKING(for enable xlocale usage in library)
-if test "x$with_xlocale" = "xyes"; then
- AC_MSG_RESULT(yes)
- SOAPCPP2_INCLUDE_XLOCALE="-DWITH_INCLUDE_XLOCALE_H"
-else
- AC_MSG_RESULT(no)
-fi
+AS_IF([test "x$ac_cv_header_xlocale_h" = xyes], [
+ AC_DEFINE([GSOAP_WITH_XLOCALE], [1])
+ dnl Could get rid of this, since it's defined through gsoap_config.h.
+ SOAPCPP2_INCLUDE_XLOCALE="-DWITH_INCLUDE_XLOCALE_H"
+])
AC_SUBST(SOAPCPP2_INCLUDE_XLOCALE)
# the disable-c-locale option adds the -DWITH_NO_C_LOCALE to the
@@ -236,6 +233,10 @@ AC_ARG_ENABLE(ipv6,
AC_MSG_CHECKING(for enable ipv6 in library)
if test "x$with_ipv6" = "xyes"; then
AC_MSG_RESULT(yes)
+ AC_DEFINE([GSOAP_WITH_IPV6], [1])
+ AC_DEFINE([GSOAP_WITH_NO_IPV6_V6ONLY], [1])
+ dnl You could just get rid of SOAPCPP2_IPV6 entirely because it's all
+ dnl available through gsoap_config.h now.
SOAPCPP2_IPV6="-DWITH_IPV6" ##define to add IPv6 support
else
AC_MSG_RESULT(no)
@@ -291,6 +292,9 @@ if test "x$with_openssl" = "xyes"; then
AC_MSG_CHECKING(for enable gnutls in library)
if test "x$with_gnutls" = "xyes"; then
AC_MSG_RESULT(yes)
+ AC_DEFINE([GSOAP_WITH_GNUTLS], [1])
+ AC_DEFINE([GSOAP_WITH_GZIP], [1])
+ dnl Could get rid of WSDL2H_EXTRA_FLAGS, since GSOAP_WITH_* is already set by gsoap_config.h
WSDL2H_EXTRA_FLAGS="-DWITH_GNUTLS -DWITH_GZIP"
WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} -lgnutls -lgcrypt -lgpg-error -lz"
SAMPLE_INCLUDES=
@@ -298,6 +302,8 @@ if test "x$with_openssl" = "xyes"; then
WSDL2H_SOAP_CPP_LIB="libgsoapssl++.a"
else
AC_MSG_RESULT(no)
+ AC_DEFINE([GSOAP_WITH_OPENSSL], [1])
+ AC_DEFINE([GSOAP_WITH_GZIP], [1])
WSDL2H_EXTRA_FLAGS="-DWITH_OPENSSL -DWITH_GZIP"
# compile with wsdl2h when OPENSSL is available
WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} -lssl -lcrypto -lz"
Index: gsoap-2.8.78/gsoap/stdsoap2.h
===================================================================
--- gsoap-2.8.78.orig/gsoap/stdsoap2.h
+++ gsoap-2.8.78/gsoap/stdsoap2.h
@@ -54,6 +54,7 @@ A commercial use license is available fr
#define GSOAP_VERSION 20878
+#include "gsoap_config.h"
#ifdef WITH_SOAPDEFS_H
# include "soapdefs.h" /* include user-defined stuff in soapdefs.h */
#endif
@@ -704,13 +705,6 @@ extern intmax_t __strtoull(const char*,
# endif
#endif
-/* force inclusion of xlocale.h when WITH_INCLUDE_XLOCALE_H is defined by the user for systems that require xlocale.h */
-#ifdef WITH_INCLUDE_XLOCALE_H
-# ifndef HAVE_XLOCALE_H
-# define HAVE_XLOCALE_H
-# endif
-#endif
-
#ifdef WITH_C_LOCALE
# include <locale.h>
# if defined(WIN32) && !defined(CYGWIN)
@@ -718,7 +712,7 @@ extern intmax_t __strtoull(const char*,
# define SOAP_LOCALE(soap) ((soap)->c_locale ? (soap)->c_locale : ((soap)->c_locale = _create_locale(LC_ALL, "C")))
# define SOAP_FREELOCALE(soap) (void)((soap)->c_locale && (_free_locale((soap)->c_locale), ((soap)->c_locale = NULL)))
# else
-# if defined(HAVE_XLOCALE_H)
+# if defined(GSOAP_WITH_XLOCALE)
# include <xlocale.h>
# endif
# define SOAP_LOCALE_T locale_t
@@ -875,9 +869,9 @@ extern intmax_t __strtoull(const char*,
# undef WITH_SELF_PIPE
#endif
-#if defined(WITH_IPV6_V6ONLY)
-# ifndef WITH_IPV6
-# define WITH_IPV6
+#if defined(GSOAP_WITH_IPV6_V6ONLY)
+# ifndef GSOAP_WITH_IPV6
+# define GSOAP_WITH_IPV6
# endif
#endif
@@ -898,7 +892,7 @@ extern intmax_t __strtoull(const char*,
// # define _WSPIAPI_COUNTOF // DEV NOTE: enble to fix problems with VC6
// # include <wspiapi.h>
# include <ws2spi.h> // DEV NOTE: replaces older wspiapi.h above
-# ifdef WITH_IPV6
+# ifdef GSOAP_WITH_IPV6
# define SOAP_GAI_STRERROR gai_strerrorA
# endif
#else
@@ -922,12 +916,12 @@ extern intmax_t __strtoull(const char*,
# include <fcgi_stdio.h>
#endif
-#ifdef WITH_OPENSSL
+#ifdef GSOAP_WITH_OPENSSL
# ifdef __VMS
# pragma names save
# pragma names uppercase
# endif
-# undef WITH_GNUTLS
+# undef GSOAP_WITH_GNUTLS
# define OPENSSL_NO_KRB5
# include <openssl/bio.h>
# include <openssl/err.h>
@@ -944,7 +938,7 @@ extern intmax_t __strtoull(const char*,
# endif
#endif
-#ifdef WITH_GNUTLS
+#ifdef GSOAP_WITH_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/x509.h>
# if GNUTLS_VERSION_NUMBER < 0x020b00
@@ -962,9 +956,9 @@ extern intmax_t __strtoull(const char*,
# include <gskssl.h>
#endif
-#ifdef WITH_GZIP
-# ifndef WITH_ZLIB
-# define WITH_ZLIB
+#ifdef GSOAP_WITH_GZIP
+# ifndef GSOAP_WITH_ZLIB
+# define GSOAP_WITH_ZLIB
# endif
#endif
@@ -974,7 +968,7 @@ extern intmax_t __strtoull(const char*,
# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */
#endif
-#ifdef WITH_ZLIB
+#ifdef GSOAP_WITH_ZLIB
# include <zlib.h>
#endif
@@ -2938,7 +2932,7 @@ struct SOAP_CMAC soap
} peer; /* set by soap_connect/soap_accept and by UDP recv */
size_t peerlen;
#endif
-#if defined(WITH_OPENSSL) /* OpenSSL */
+#if defined(GSOAP_WITH_OPENSSL) /* OpenSSL */
int (*fsslauth)(struct soap*);
int (*fsslverify)(int, X509_STORE_CTX*);
BIO *bio;
@@ -2947,7 +2941,7 @@ struct SOAP_CMAC soap
SSL_SESSION *session;
const char *dhfile;
const char *randfile;
-#elif defined(WITH_GNUTLS) /* GNUTLS */
+#elif defined(GSOAP_WITH_GNUTLS) /* GNUTLS */
int (*fsslauth)(struct soap*);
void *fsslverify;
gnutls_certificate_credentials_t xcred; /* cert pointer */
@@ -2989,7 +2983,7 @@ struct SOAP_CMAC soap
#else
void *c_locale;
#endif
-#ifdef WITH_ZLIB
+#ifdef GSOAP_WITH_ZLIB
z_stream *d_stream; /* decompression stream */
uLong z_crc; /* internal gzip crc */
#else
@@ -3135,7 +3129,7 @@ soap_wchar soap_get1(struct soap*);
SOAP_FMAC1 ULONG64 SOAP_FMAC2 soap_strtoull(const char*, char**, int);
#endif
-#if defined(WITH_OPENSSL)
+#if defined(GSOAP_WITH_OPENSSL)
# define soap_random soap_rand()
SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void);
#elif defined(UNDER_CE)