1 # Process this file with autoconf to produce a configure script.
3 # Require autoconf 2.12
9 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
15 SOUP_VERSION=$SOUP_MAJOR_VERSION.$SOUP_MINOR_VERSION.$SOUP_MICRO_VERSION
20 LT_RELEASE=$SOUP_VERSION
21 LT_CURRENT=$SOUP_INTERFACE_AGE
22 LT_REVISION=$SOUP_BINARY_AGE
23 LT_AGE=`expr $SOUP_BINARY_AGE - $SOUP_INTERFACE_AGE`
25 AC_SUBST(SOUP_MAJOR_VERSION)
26 AC_SUBST(SOUP_MINOR_VERSION)
27 AC_SUBST(SOUP_MICRO_VERSION)
28 AC_SUBST(SOUP_VERSION)
34 # Specify a configuration file
35 AM_CONFIG_HEADER(config.h)
38 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
40 # Initialize maintainer mode
44 # ****************************************
47 # Figure out debugging default, prior to $ac_help setup
48 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
49 if test `expr $SOUP_MINOR_VERSION \% 2` = 1 ; then
56 # Declare --enable-* args and collect ac_help strings
57 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
60 AC_MSG_CHECKING(for --enable-debug)
61 if test "x$enable_debug" = "xyes"; then
62 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
63 SOUP_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
66 if test "x$enable_debug" = "xno"; then
67 SOUP_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
72 AC_SUBST(SOUP_DEBUG_FLAGS)
75 # ****************************************
82 # Use an many warnings as possible
84 if test "x$GCC" = "xyes"; then
86 *[\ \ ]-Wall[\ \ ]*) ;;
87 *) CFLAGS="$CFLAGS -Wall" ;;
90 if test "x$enable_ansi" = "xyes"; then
92 *[\ \ ]-ansi[\ \ ]*) ;;
93 *) CFLAGS="$CFLAGS -ansi" ;;
97 *[\ \ ]-pedantic[\ \ ]*) ;;
98 *) CFLAGS="$CFLAGS -pedantic" ;;
104 # Use reentrant functions
105 CFLAGS="$CFLAGS -D_REENTRANT"
114 # ****************************************
115 # Check for libraries
119 [LIBS="$LIBS $GLIB_LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS"],
120 AC_MSG_ERROR(Cannot find GLIB: Is glib-config in path?),
123 #GLIB_CFLAGS=`glib-config --cflags glib gmodule`
124 #GLIB_LIBS=`glib-config --libs glib gmodule`
126 #AC_SUBST(GLIB_CFLAGS)
132 [LIBS="$LIBS $GNET_LIBS" CFLAGS="$CFLAGS $GNET_CFLAGS"],
133 AC_MSG_ERROR(Cannot find GNET: Is gnet-config in path?))
135 #GNET_CFLAGS=`gnet-config --cflags gnet`
136 #GNET_LIBS=`gnet-config --libs gnet`
138 #AC_SUBST(GNET_CFLAGS)
143 AC_PATH_PROG(XML_CONFIG,xml-config,no)
144 if test x$XML_CONFIG = xno; then
145 AC_MSG_ERROR(Cannot find xml-config)
147 XML_LIBS=`xml-config --libs`
148 XML_CFLAGS=`xml-config --cflags`
150 LIBS="$LIBS $XML_LIBS"
151 CFLAGS="$CFLAGS $XML_CFLAGS"
158 # FIXME: Remove ubiquitous support, use $POPT_LIBS and $POPT_CFLAGS instead
159 AC_CHECK_LIB(popt, poptGetContext,, AC_MSG_ERROR([popt is required]))
162 # Need in.h and tcp.h for setting of TCP_NODELAY
163 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h)
168 [ --enable-ssl turn on Secure Sockets Layer support [default=yes]
169 ([=no] will override --with-ssl)],,enable_ssl=yes)
171 AC_ARG_WITH(nspr-includes,
172 [ --with-nspr-includes Specify location of Netscape Portable Runtime headers],[
173 CFLAGS="$CFLAGS -I$withval"
174 nspr_inc_prefix=$withval
177 AC_ARG_WITH(nspr-libs,
178 [ --with-nspr-libs Specify location of Netscape Portable Runtime libs],[
182 AC_ARG_WITH(nss-includes,
183 [ --with-nss-includes Specify location of NSS header files],[
184 CFLAGS="$CFLAGS -I$withval"
185 nss_inc_prefix=$withval
188 AC_ARG_WITH(nss-libs,
189 [ --with-nss-libs Specify location of NSS libs],[
194 AC_ARG_WITH(openssl-includes,
195 [ --with-openssl-includes Specify location of OpenSSL header files],[
196 CFLAGS="$CFLAGS -I$withval"
197 openssl_inc_prefix=$withval
200 AC_ARG_WITH(openssl-libs,
201 [ --with-openssl-libs Specify location of OpenSSL libs],[
202 openssl_prefix=$withval
205 if test "x$enable_ssl" = xyes; then
206 save_CPPFLAGS="$CPPFLAGS"
207 CPPFLAGS="$CPPFLAGS -I$openssl_inc_prefix -I$nspr_inc_prefix -I$nss_inc_prefix"
208 AC_CHECK_HEADERS(openssl/ssl.h)
209 AC_CHECK_HEADERS(openssl/err.h)
210 AC_CHECK_HEADERS(prtypes.h)
211 AC_CHECK_HEADERS(security/ssl.h)
212 AC_CHECK_HEADERS(security/pk11func.h)
213 CPPFLAGS="$save_CPPFLAGS"
216 # Set PACKAGE_SOURCE_DIR in config.h.
217 packagesrcdir=`cd $srcdir && pwd`
218 AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
220 # If gcc is the compiler, compile with lots of warnings
221 if test "x$GCC" = "xyes"; then
222 CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations "
234 src/soup-core/Makefile
235 src/soup-wsdl/Makefile
238 [chmod +x soup-config])