1 # ****************************************
2 # Initialize automake and set version
4 AC_INIT(src/soup-core/soup.h)
10 AC_SUBST(SOUP_CURRENT)
11 AC_SUBST(SOUP_REVISION)
14 AM_CONFIG_HEADER(config.h)
15 AM_INIT_AUTOMAKE(soup, $SOUP_CURRENT.$SOUP_REVISION.$SOUP_AGE)
19 # ****************************************
22 # Figure out debugging default, prior to $ac_help setup
23 if test `expr $SOUP_REVISION \% 2` = 1 ; then
29 # Declare --enable-* args and collect ac_help strings
31 [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,
32 enable_debug=$debug_default)
35 AC_MSG_CHECKING(for --enable-debug)
36 if test "x$enable_debug" = "xyes"; then
37 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
38 SOUP_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
41 if test "x$enable_debug" = "xno"; then
42 SOUP_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
47 AC_SUBST(SOUP_DEBUG_FLAGS)
50 # ****************************************
64 # ****************************************
69 AC_MSG_ERROR([Cannot find GLIB: Is glib-config in path?]))
71 GLIB_CFLAGS=`glib-config --cflags glib`
72 GLIB_LIBS=`glib-config --libs glib`
80 AC_MSG_ERROR([Cannot find GNET: Is gnet-config in path?]))
82 GNET_CFLAGS=`gnet-config --cflags gnet`
83 GNET_LIBS=`gnet-config --libs gnet`
90 AC_PATH_PROG(XML_CONFIG,xml-config,no)
91 if test x$XML_CONFIG = xno; then
92 AC_MSG_ERROR([Cannot find LIBXML: Is xml-config in path?])
94 XML_CFLAGS=`xml-config --cflags`
95 XML_LIBS=`xml-config --libs`
102 save_CPPFLAGS=$CPPFLAGS
107 AC_CHECK_LIB(popt, poptGetContext,, AC_MSG_ERROR([popt is required]))
108 AC_CHECK_HEADERS(popt.h,, AC_MSG_ERROR([popt.h is required]))
110 POPT_CFLAGS=$CPPFLAGS
113 AC_SUBST(POPT_CFLAGS)
116 CPPFLAGS=$save_CPPFLAGS
120 # Need in.h and tcp.h for setting of TCP_NODELAY
121 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h)
125 [ --enable-ssl Turn on Secure Sockets Layer support [default=yes]],,
128 AC_ARG_WITH(nspr-includes,
129 [ --with-nspr-includes Specify location of Netscape Portable Runtime headers],
130 [nspr_inc_prefix=-I$withval])
132 AC_ARG_WITH(nspr-libs,
133 [ --with-nspr-libs Specify location of Netscape Portable Runtime libs],[nspr_prefix=-L$withval])
135 AC_ARG_WITH(nss-includes,
136 [ --with-nss-includes Specify location of NSS header files],
137 [nss_inc_prefix=-I$withval])
139 AC_ARG_WITH(nss-libs,
140 [ --with-nss-libs Specify location of NSS libs],
141 [nss_prefix=-L$withval])
144 AC_ARG_WITH(openssl-includes,
145 [ --with-openssl-includes Specify location of OpenSSL header files],
146 [openssl_inc_prefix=-I$withval])
148 AC_ARG_WITH(openssl-libs,
149 [ --with-openssl-libs Specify location of OpenSSL libs],
150 [openssl_prefix=-L$withval])
155 if test "x$enable_ssl" = xyes; then
156 save_CPPFLAGS=$CPPFLAGS
157 CPPFLAGS="$openssl_inc_prefix"
158 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h,
159 [OPENSSL_CFLAGS="$CPPFLAGS"
160 OPENSSL_LIBS="$openssl_prefix -lssl -lcrypto"
161 enable_openssl="yes"],
166 AC_SUBST(OPENSSL_CFLAGS)
167 AC_SUBST(OPENSSL_LIBS)
168 CPPFLAGS=$save_CPPFLAGS
170 save_CPPFLAGS=$CPPFLAGS
171 CPPFLAGS="$nspr_inc_prefix $nss_inc_prefix"
172 AC_CHECK_HEADERS(prthread.h security/ssl.h security/pk11func.h,
173 [NSS_CFLAGS="$CPPFLAGS"
174 NSS_LIBS="$nspr_prefix -lnspr4 $nss_prefix -lnss3"
182 CPPFLAGS=$save_CPPFLAGS
186 AC_ARG_ENABLE(more-warnings,
187 [ --enable-more-warnings Maximum compiler warnings],
188 set_more_warnings="$enableval",set_more_warnings=yes)
190 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
192 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes \
193 -Wnested-externs -Wpointer-arith -Werror"
196 # Use reentrant functions
197 CFLAGS="$CFLAGS -D_REENTRANT"
209 src/soup-core/Makefile
210 src/soup-wsdl/Makefile
213 [chmod +x soup-config soupConf.sh])
219 Source code location: ${srcdir}
221 Build flags: ${CFLAGS} ${SOUP_DEBUG_FLAGS}
223 OpenSSL support: ${enable_openssl}
224 Mozilla NSS support: ${enable_nss}