# Process this file with autoconf to produce a configure script. # Require autoconf 2.12 AC_PREREQ(2.12) # Initialize autoconf AC_INIT(configure.in) AC_DIVERT_PUSH(AC_DIVERSION_NOTICE) SOUP_MAJOR_VERSION=0 SOUP_MINOR_VERSION=1 SOUP_MICRO_VERSION=6 SOUP_INTERFACE_AGE=0 SOUP_BINARY_AGE=0 SOUP_VERSION=$SOUP_MAJOR_VERSION.$SOUP_MINOR_VERSION.$SOUP_MICRO_VERSION VERSION=$SOUP_VERSION PACKAGE=soup AC_DIVERT_POP() LT_RELEASE=$SOUP_VERSION LT_CURRENT=$SOUP_INTERFACE_AGE LT_REVISION=$SOUP_BINARY_AGE LT_AGE=`expr $SOUP_BINARY_AGE - $SOUP_INTERFACE_AGE` AC_SUBST(SOUP_MAJOR_VERSION) AC_SUBST(SOUP_MINOR_VERSION) AC_SUBST(SOUP_MICRO_VERSION) AC_SUBST(SOUP_VERSION) AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) # Specify a configuration file AM_CONFIG_HEADER(config.h) # Initialize automake AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) # Initialize maintainer mode AM_MAINTAINER_MODE # **************************************** # Set debugging flags # Figure out debugging default, prior to $ac_help setup AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl if test `expr $SOUP_MINOR_VERSION \% 2` = 1 ; then debug_default=yes else debug_default=minimum fi AC_DIVERT_POP() # Declare --enable-* args and collect ac_help strings AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default) # Set the debug flags AC_MSG_CHECKING(for --enable-debug) if test "x$enable_debug" = "xyes"; then test "$cflags_set" = set || CFLAGS="$CFLAGS -g" SOUP_DEBUG_FLAGS="-DG_ENABLE_DEBUG" AC_MSG_RESULT(yes) else if test "x$enable_debug" = "xno"; then SOUP_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" AC_MSG_RESULT(no) fi fi AC_SUBST(SOUP_DEBUG_FLAGS) # **************************************** # Check for programs AC_PROG_CC AM_PROG_CC_STDC AC_PROG_INSTALL # Use an many warnings as possible changequote(,) if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; esac fi fi changequote([,]) # Use reentrant functions CFLAGS="$CFLAGS -D_REENTRANT" # Set STDC_HEADERS AC_HEADER_STDC # Initialize libtool AM_PROG_LIBTOOL # **************************************** # Check for libraries # Need GLIB AM_PATH_GLIB(1.2.0, [LIBS="$LIBS $GLIB_LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS"], AC_MSG_ERROR(Cannot find GLIB: Is glib-config in path?)) GLIB_CFLAGS=`glib-config --cflags glib` GLIB_LIBS=`glib-config --libs glib` AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) # Need GNET AM_PATH_GNET(1.0.0, [LIBS="$LIBS $GNET_LIBS" CFLAGS="$CFLAGS $GNET_CFLAGS"], AC_MSG_ERROR(Cannot find GNET: Is gnet-config in path?)) GNET_CFLAGS=`gnet-config --cflags gnet` GNET_LIBS=`gnet-config --libs gnet` AC_SUBST(GNET_CFLAGS) AC_SUBST(GNET_LIBS) # Need in.h and tcp.h for setting of TCP_NODELAY AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h) # Check for OpenSSL AC_CHECK_HEADERS(openssl/ssl.h) # Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") # If gcc is the compiler, compile with lots of warnings if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations " fi # doc/Makefile # gnome-soup.spec AC_OUTPUT([ Makefile src/Makefile tests/Makefile ])