diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 122 |
1 files changed, 48 insertions, 74 deletions
diff --git a/configure.ac b/configure.ac index 47daa7dd..96bb378a 100644 --- a/configure.ac +++ b/configure.ac @@ -2,24 +2,36 @@ dnl ******************************************* dnl *** Initialize automake and set version *** dnl ******************************************* +m4_define([soup_major_version], [2]) +m4_define([soup_minor_version], [46]) +m4_define([soup_micro_version], [0]) + AC_PREREQ(2.63) -AC_INIT([libsoup],[2.39.4.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup]) +AC_INIT([libsoup],[soup_major_version.soup_minor_version.soup_micro_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup]) AC_CONFIG_SRCDIR([libsoup-2.4.pc.in]) AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz -Wno-portability]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],) AC_PROG_MAKE_SET +SOUP_MAJOR_VERSION=soup_major_version +SOUP_MINOR_VERSION=soup_minor_version +SOUP_MICRO_VERSION=soup_micro_version +AC_SUBST(SOUP_MAJOR_VERSION) +AC_SUBST(SOUP_MINOR_VERSION) +AC_SUBST(SOUP_MICRO_VERSION) + SOUP_API_VERSION=2.4 AC_SUBST(SOUP_API_VERSION) # Increment on interface addition. Reset on removal. -SOUP_AGE=5 +SOUP_AGE=7 # Increment on interface add, remove, or change. -SOUP_CURRENT=6 +SOUP_CURRENT=8 # Increment on source change. Reset when CURRENT changes. SOUP_REVISION=0 @@ -52,12 +64,6 @@ fi AC_SUBST(SOUP_DEBUG_FLAGS) -# Set the maintainer flags -#if test -d .git; then -# SOUP_MAINTAINER_FLAGS="-DG_DISABLE_DEPRECATED" -#fi -AC_SUBST(SOUP_MAINTAINER_FLAGS) - dnl *************************** dnl *** Checks for programs *** dnl *************************** @@ -72,20 +78,26 @@ dnl *********************** dnl *** Checks for glib *** dnl *********************** -GLIB_REQUIRED=2.33.1 +GLIB_REQUIRED=2.38.0 AM_PATH_GLIB_2_0($GLIB_REQUIRED,,,gobject gio) if test "$GLIB_LIBS" = ""; then AC_MSG_ERROR(GLIB $GLIB_REQUIRED or later is required to build libsoup) fi -GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_34" +GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38" GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib' AC_SUBST(GLIB_MAKEFILE) +GLIB_TESTS + PKG_CHECK_MODULES(XML, libxml-2.0) AC_SUBST(XML_CFLAGS) AC_SUBST(XML_LIBS) +PKG_CHECK_MODULES(SQLITE, sqlite3) +AC_SUBST(SQLITE_CFLAGS) +AC_SUBST(SQLITE_LIBS) + dnl *********************** dnl *** Check for Win32 *** dnl *********************** @@ -110,14 +122,11 @@ IT_PROG_INTLTOOL([0.35.0]) GETTEXT_PACKAGE=libsoup AC_SUBST([GETTEXT_PACKAGE]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name]) -AM_GLIB_GNU_GETTEXT dnl ******************* dnl *** Misc checks *** dnl ******************* AC_CHECK_FUNCS(gmtime_r) -AC_CHECK_FUNCS(mmap) -AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket)) dnl ********************* dnl *** GNOME support *** @@ -128,32 +137,12 @@ AC_ARG_WITH(gnome, :, [if test $os_win32 = yes; then with_gnome=no; else with_gnome=yes; fi]) AC_MSG_RESULT($with_gnome) -if test $with_gnome != no -a $os_win32 != yes; then - PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1, :, - AC_MSG_ERROR( -[Could not find gnome-keyring devel files. -Configure with --without-gnome if you wish to build only libsoup -without GNOME-specific features.])) -fi -AC_SUBST(GNOME_KEYRING_CFLAGS) -AC_SUBST(GNOME_KEYRING_LIBS) - AM_CONDITIONAL(BUILD_LIBSOUP_GNOME, test $with_gnome != no) if test $with_gnome != no; then AC_DEFINE(HAVE_GNOME, 1, [Defined if GNOME support is enabled]) - - PKG_CHECK_MODULES(SQLITE, sqlite3, :, [AC_MSG_ERROR(dnl -[Could not find sqlite3 devel files: - -$SQLITE_PKG_ERRORS - -Pass "--without-gnome" to configure if you want to build libsoup -without GNOME support.])]) fi AC_SUBST(HAVE_GNOME) -AC_SUBST(SQLITE_CFLAGS) -AC_SUBST(SQLITE_LIBS) dnl *************** @@ -172,7 +161,7 @@ save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <gio/gio.h>], - [g_type_init (); return !g_tls_backend_supports_tls (g_tls_backend_get_default ());])], + [return !g_tls_backend_supports_tls (g_tls_backend_get_default ());])], [have_glib_networking=yes], [have_glib_networking=no], [have_glib_networking="unknown (cross-compiling)"]) @@ -195,11 +184,6 @@ dnl ****************************** dnl *** Stuff for regression tests dnl ****************************** AC_MSG_NOTICE([checking for programs needed for regression tests]) -MISSING_REGRESSION_TEST_PACKAGES="" - -if test "$have_glib_networking" = "no"; then - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES glib-networking" -fi AC_ARG_WITH(apache-httpd, AS_HELP_STRING([--with-apache-httpd], [Path to apache httpd (for tests)]), @@ -211,6 +195,11 @@ if test "$APACHE_HTTPD" != "no"; then case $apache_version in 2.2.*) AC_MSG_RESULT([$apache_version (ok)]) + apache_version=2.2 + ;; + 2.4.*) + AC_MSG_RESULT([$apache_version (ok)]) + apache_version=2.4 ;; *) AC_MSG_RESULT([$apache_version (ignoring)]) @@ -227,7 +216,7 @@ if test "$APACHE_HTTPD" != "no"; then AS_HELP_STRING([--with-apache-module-dir], [Apache modules dirs (for tests)]), apache_module_dirs="$withval", [apache_prefix=`dirname \`dirname $APACHE_HTTPD\`` - mpm=`$APACHE_HTTPD -V | sed -ne 's/^Server MPM: */-/p' | tr 'A-Z' 'a-z'` + mpm=`$APACHE_HTTPD -V -C "ServerName localhost" | sed -ne 's/^Server MPM: */-/p' | tr 'A-Z' 'a-z'` # This only works with bash, but should fail harmlessly in sh apache_module_dirs=`echo $apache_prefix/lib{64,}/{apache,apache2,http,http2,httpd}{$mpm,}{/modules,}`]) for dir in $apache_module_dirs; do @@ -256,19 +245,18 @@ fi if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR" -a -n "$APACHE_SSL_MODULE_DIR"; then AC_DEFINE(HAVE_APACHE, 1, [Whether or not apache can be used for tests]) - have_apache=1 - if test -z "$APACHE_PHP_MODULE_DIR"; then - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES mod_php5" + if test $apache_version = 2.2; then + AC_DEFINE(HAVE_APACHE_2_2, 1, [Apache is 2.2.x]) + else + AC_DEFINE(HAVE_APACHE_2_4, 1, [Apache is 2.4.x]) fi + have_apache=1 else have_apache=0 - if test "$APACHE_HTTPD" = "no" -o -z "$APACHE_MODULE_DIR"; then - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES apache" - else - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES mod_ssl" - fi fi -AM_CONDITIONAL(HAVE_APACHE, test $have_apache = 1) +AM_CONDITIONAL(HAVE_APACHE, test "$have_apache" = 1) +AM_CONDITIONAL(HAVE_APACHE_2_2, test "$apache_version" = 2.2) +AM_CONDITIONAL(HAVE_APACHE_2_4, test "$apache_version" = 2.4) if test "$have_apache" = 1; then AC_CHECK_PROGS(PHP, php php5) @@ -279,36 +267,27 @@ if test "$have_apache" = 1; then IF_HAVE_PHP="" else have_php=no - IF_HAVE_PHP="#" - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES php5" + IF_HAVE_PHP="\#" fi AC_MSG_RESULT($have_php) + AC_SUBST(IF_HAVE_PHP) if test "$have_php" = yes; then - AC_MSG_CHECKING([for xmlrpc-epi-php]) + AC_MSG_CHECKING([for php-xmlrpc]) if $PHP --rf xmlrpc_server_create | grep -q "does not exist"; then - have_xmlrpc_epi_php=no - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES php-xmlrpc" + have_php_xmlrpc=no else - have_xmlrpc_epi_php=yes + have_php_xmlrpc=yes + AC_DEFINE(HAVE_PHP_XMLRPC, 1, [Have php-xmlrpc]) fi - AC_MSG_RESULT($have_xmlrpc_epi_php) + AC_MSG_RESULT($have_php_xmlrpc) fi fi -AC_SUBST(IF_HAVE_PHP) -AM_CONDITIONAL(HAVE_XMLRPC_EPI_PHP, test "$have_xmlrpc_epi_php" = yes) - AC_PATH_PROG(CURL, curl, no) if test "$CURL" != no; then AC_DEFINE(HAVE_CURL, 1, [Whether or not curl can be used for tests]) -else - MISSING_REGRESSION_TEST_PACKAGES="$MISSING_REGRESSION_TEST_PACKAGES curl" fi -AM_CONDITIONAL(HAVE_CURL, test "$CURL" != no) - -AC_SUBST(MISSING_REGRESSION_TEST_PACKAGES) -AM_CONDITIONAL(MISSING_REGRESSION_TEST_PACKAGES, test -n "$MISSING_REGRESSION_TEST_PACKAGES") dnl ********************************************************** dnl *** path of NTLM single-sign-on helper ntlm_auth @@ -341,6 +320,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wall -Wstrict-prototypes -Werror=missing-prototypes \ -Werror=implicit-function-declaration \ -Werror=pointer-arith -Werror=init-self -Werror=format=2 \ + -Wno-format-zero-length \ -Werror=missing-include-dirs -Werror=aggregate-return \ -Werror=declaration-after-statement" fi @@ -359,15 +339,9 @@ AC_CONFIG_FILES([ po/Makefile.in po/Makefile tests/Makefile - tests/httpd.conf + examples/Makefile docs/Makefile docs/reference/Makefile + libsoup/soup-version.h ]) AC_OUTPUT - -if test -n "$MISSING_REGRESSION_TEST_PACKAGES"; then - echo "" - echo Some regression tests will not be run due to missing packages: - echo $MISSING_REGRESSION_TEST_PACKAGES - echo "" -fi |