Blame configure.ac

rpm-build 4f3c61
dnl *******************************************
rpm-build 4f3c61
dnl *** Initialize automake and set version ***
rpm-build 4f3c61
dnl *******************************************
rpm-build 4f3c61
rpm-build 4f3c61
m4_define([soup_major_version], [2])
rpm-build 4f3c61
m4_define([soup_minor_version], [62])
rpm-build 4f3c61
m4_define([soup_micro_version], [3])
rpm-build 4f3c61
rpm-build 4f3c61
AC_PREREQ(2.63)
rpm-build 4f3c61
AC_INIT([libsoup],[soup_major_version.soup_minor_version.soup_micro_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup])
rpm-build 4f3c61
AC_CONFIG_SRCDIR([libsoup-2.4.pc.in])
rpm-build 4f3c61
AC_CONFIG_MACRO_DIR([m4])
rpm-build 4f3c61
AC_CONFIG_AUX_DIR([build-aux])
rpm-build 4f3c61
rpm-build 4f3c61
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz -Wno-portability])
rpm-build 4f3c61
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
rpm-build 4f3c61
rpm-build 4f3c61
AC_PROG_MAKE_SET
rpm-build 4f3c61
rpm-build 4f3c61
SOUP_MAJOR_VERSION=soup_major_version
rpm-build 4f3c61
SOUP_MINOR_VERSION=soup_minor_version
rpm-build 4f3c61
SOUP_MICRO_VERSION=soup_micro_version
rpm-build 4f3c61
AC_SUBST(SOUP_MAJOR_VERSION)
rpm-build 4f3c61
AC_SUBST(SOUP_MINOR_VERSION)
rpm-build 4f3c61
AC_SUBST(SOUP_MICRO_VERSION)
rpm-build 4f3c61
rpm-build 4f3c61
SOUP_API_VERSION=2.4
rpm-build 4f3c61
AC_SUBST(SOUP_API_VERSION)
rpm-build 4f3c61
rpm-build 4f3c61
# Increment on interface addition. Reset on removal.
rpm-build 4f3c61
SOUP_AGE=8
rpm-build 4f3c61
rpm-build 4f3c61
# Increment on interface add, remove, or change.
rpm-build 4f3c61
SOUP_CURRENT=9
rpm-build 4f3c61
rpm-build 4f3c61
# Increment on source change. Reset when CURRENT changes.
rpm-build 4f3c61
SOUP_REVISION=0
rpm-build 4f3c61
rpm-build 4f3c61
AC_SUBST(SOUP_CURRENT)
rpm-build 4f3c61
AC_SUBST(SOUP_REVISION)
rpm-build 4f3c61
AC_SUBST(SOUP_AGE)
rpm-build 4f3c61
rpm-build 4f3c61
dnl ***************************
rpm-build 4f3c61
dnl *** Set debugging flags ***
rpm-build 4f3c61
dnl ***************************
rpm-build 4f3c61
rpm-build 4f3c61
debug_default=minimum
rpm-build 4f3c61
rpm-build 4f3c61
# Declare --enable-* args and collect ac_help strings
rpm-build 4f3c61
AC_ARG_ENABLE(debug,
rpm-build 4f3c61
	      AS_HELP_STRING([--enable-debug=[no/minimum/yes]],
rpm-build 4f3c61
			     [turn on debugging (default=$debug_default)]),,
rpm-build 4f3c61
	      enable_debug=$debug_default)
rpm-build 4f3c61
rpm-build 4f3c61
# Set the debug flags
rpm-build 4f3c61
if test "x$enable_debug" = "xyes"; then
rpm-build 4f3c61
	test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
rpm-build 4f3c61
	SOUP_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
rpm-build 4f3c61
else
rpm-build 4f3c61
	if test "x$enable_debug" = "xno"; then
rpm-build 4f3c61
		SOUP_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
rpm-build 4f3c61
	fi
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
AC_SUBST(SOUP_DEBUG_FLAGS)
rpm-build 4f3c61
rpm-build 4f3c61
dnl ***************************
rpm-build 4f3c61
dnl *** Checks for programs ***
rpm-build 4f3c61
dnl ***************************
rpm-build 4f3c61
rpm-build 4f3c61
AC_PROG_CC
rpm-build 4f3c61
AC_PROG_INSTALL
rpm-build 4f3c61
rpm-build 4f3c61
# Initialize libtool
rpm-build 4f3c61
LT_INIT([win32-dll])
rpm-build 4f3c61
rpm-build 4f3c61
dnl ***********************
rpm-build 4f3c61
dnl *** Checks for glib ***
rpm-build 4f3c61
dnl ***********************
rpm-build 4f3c61
rpm-build 4f3c61
GLIB_REQUIRED=2.38.0
rpm-build 4f3c61
AM_PATH_GLIB_2_0($GLIB_REQUIRED,,,gobject gio)
rpm-build 4f3c61
if test "$GLIB_LIBS" = ""; then
rpm-build 4f3c61
   AC_MSG_ERROR(GLIB $GLIB_REQUIRED or later is required to build libsoup)
rpm-build 4f3c61
fi
rpm-build 4f3c61
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38"
rpm-build 4f3c61
rpm-build 4f3c61
GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
rpm-build 4f3c61
AC_SUBST(GLIB_MAKEFILE)
rpm-build 4f3c61
rpm-build 4f3c61
GLIB_TESTS
rpm-build 4f3c61
rpm-build 4f3c61
PKG_CHECK_MODULES(XML, libxml-2.0)
rpm-build 4f3c61
AC_SUBST(XML_CFLAGS)
rpm-build 4f3c61
AC_SUBST(XML_LIBS)
rpm-build 4f3c61
rpm-build 4f3c61
PKG_CHECK_MODULES(SQLITE, sqlite3)
rpm-build 4f3c61
AC_SUBST(SQLITE_CFLAGS)
rpm-build 4f3c61
AC_SUBST(SQLITE_LIBS)
rpm-build 4f3c61
rpm-build 4f3c61
dnl ***********************
rpm-build 4f3c61
dnl *** Check for Win32 ***
rpm-build 4f3c61
dnl ***********************
rpm-build 4f3c61
rpm-build 4f3c61
AC_MSG_CHECKING([for Win32])
rpm-build 4f3c61
case "$host" in
rpm-build 4f3c61
  *-*-mingw*)
rpm-build 4f3c61
    os_win32=yes
rpm-build 4f3c61
    os_linux=yes
rpm-build 4f3c61
    CFLAGS="$CFLAGS -D_REENTRANT"
rpm-build 4f3c61
    ;;
rpm-build 4f3c61
  *-*-linux*)
rpm-build 4f3c61
    os_win32=no
rpm-build 4f3c61
    os_linux=yes
rpm-build 4f3c61
    ;;
rpm-build 4f3c61
  *)
rpm-build 4f3c61
    os_win32=no
rpm-build 4f3c61
    os_linux=no
rpm-build 4f3c61
    ;;
rpm-build 4f3c61
esac
rpm-build 4f3c61
AC_MSG_RESULT([$os_win32])
rpm-build 4f3c61
AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
rpm-build 4f3c61
AM_CONDITIONAL(OS_LINUX, [test $os_linux = yes])
rpm-build 4f3c61
rpm-build 4f3c61
dnl ************************
rpm-build 4f3c61
dnl *** gettext/intltool ***
rpm-build 4f3c61
dnl ************************
rpm-build 4f3c61
IT_PROG_INTLTOOL([0.35.0])
rpm-build 4f3c61
GETTEXT_PACKAGE=libsoup
rpm-build 4f3c61
AC_SUBST([GETTEXT_PACKAGE])
rpm-build 4f3c61
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
rpm-build 4f3c61
rpm-build 4f3c61
dnl *******************
rpm-build 4f3c61
dnl *** Misc checks ***
rpm-build 4f3c61
dnl *******************
rpm-build 4f3c61
AC_CHECK_FUNCS(gmtime_r)
rpm-build 4f3c61
rpm-build 4f3c61
dnl *********************
rpm-build 4f3c61
dnl *** GNOME support ***
rpm-build 4f3c61
dnl *********************
rpm-build 4f3c61
AC_MSG_CHECKING(whether to build libsoup-gnome)
rpm-build 4f3c61
AC_ARG_WITH(gnome,
rpm-build 4f3c61
	    AS_HELP_STRING([--without-gnome], [Do not build libsoup-gnome]),
rpm-build 4f3c61
	    :, [if test $os_win32 = yes; then with_gnome=no; else with_gnome=yes; fi])
rpm-build 4f3c61
AC_MSG_RESULT($with_gnome)
rpm-build 4f3c61
rpm-build 4f3c61
AM_CONDITIONAL(BUILD_LIBSOUP_GNOME, test $with_gnome != no)
rpm-build 4f3c61
rpm-build 4f3c61
if test $with_gnome != no; then
rpm-build 4f3c61
	AC_DEFINE(HAVE_GNOME, 1, [Defined if GNOME support is enabled])
rpm-build 4f3c61
fi
rpm-build 4f3c61
AC_SUBST(HAVE_GNOME)
rpm-build 4f3c61
rpm-build 4f3c61
rpm-build 4f3c61
dnl ***************
rpm-build 4f3c61
dnl *** gtk-doc ***
rpm-build 4f3c61
dnl ***************
rpm-build 4f3c61
# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have
rpm-build 4f3c61
# it on it's own line.
rpm-build 4f3c61
m4_ifdef([GTK_DOC_CHECK], [
rpm-build 4f3c61
GTK_DOC_CHECK([1.20], [--flavour no-tmpl])
rpm-build 4f3c61
],[])
rpm-build 4f3c61
rpm-build 4f3c61
dnl *****************************
rpm-build 4f3c61
dnl *** gobject-introspection ***
rpm-build 4f3c61
dnl *****************************
rpm-build 4f3c61
GOBJECT_INTROSPECTION_CHECK([0.9.5])
rpm-build 4f3c61
rpm-build 4f3c61
if test "$found_introspection" != "yes" -a "$enable_vala" = ""; then
rpm-build 4f3c61
	enable_vala=no
rpm-build 4f3c61
fi
rpm-build 4f3c61
VAPIGEN_CHECK()
rpm-build 4f3c61
rpm-build 4f3c61
AC_MSG_CHECKING([for glib-networking (glib TLS implementation)])
rpm-build 4f3c61
save_CFLAGS="$CFLAGS"
rpm-build 4f3c61
save_LIBS="$LIBS"
rpm-build 4f3c61
CFLAGS="$CFLAGS $GLIB_CFLAGS"
rpm-build 4f3c61
LIBS="$LIBS $GLIB_LIBS"
rpm-build 4f3c61
AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <gio/gio.h>],
rpm-build 4f3c61
			       [return !g_tls_backend_supports_tls (g_tls_backend_get_default ());])],
rpm-build 4f3c61
	      [have_glib_networking=yes],
rpm-build 4f3c61
	      [have_glib_networking=no],
rpm-build 4f3c61
	      [have_glib_networking="unknown (cross-compiling)"])
rpm-build 4f3c61
CFLAGS="$save_CFLAGS"
rpm-build 4f3c61
LIBS="$save_LIBS"
rpm-build 4f3c61
AC_MSG_RESULT($have_glib_networking)
rpm-build 4f3c61
rpm-build 4f3c61
AC_ARG_ENABLE(tls-check,
rpm-build 4f3c61
	      AS_HELP_STRING([--disable-tls-check], [Don't error out if glib-networking is unavailable]))
rpm-build 4f3c61
if test "$enable_tls_check" != "no" -a "$have_glib_networking" = "no"; then
rpm-build 4f3c61
	AC_MSG_ERROR([libsoup requires glib-networking for TLS support.
rpm-build 4f3c61
rpm-build 4f3c61
If you are building a package, you can pass --disable-tls-check to
rpm-build 4f3c61
allow building libsoup anyway (since glib-networking is not actually
rpm-build 4f3c61
required at compile time), but you should be sure to add a runtime
rpm-build 4f3c61
dependency on it.])
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
dnl ******************************
rpm-build 4f3c61
dnl *** Stuff for regression tests
rpm-build 4f3c61
dnl ******************************
rpm-build 4f3c61
AC_MSG_NOTICE([checking for programs needed for regression tests])
rpm-build 4f3c61
rpm-build 4f3c61
AC_ARG_WITH(apache-httpd,
rpm-build 4f3c61
	    AS_HELP_STRING([--with-apache-httpd], [Path to apache httpd (for tests)]),
rpm-build 4f3c61
	    APACHE_HTTPD="$withval",
rpm-build 4f3c61
	    [AC_PATH_PROGS(APACHE_HTTPD, httpd2 httpd apache2 apache, no, ${PATH}:/usr/sbin)])
rpm-build 4f3c61
if test "$APACHE_HTTPD" != "no"; then
rpm-build 4f3c61
    AC_MSG_CHECKING([Apache version])
rpm-build 4f3c61
    apache_version=`$APACHE_HTTPD -v 2>/dev/null | sed -ne 's/Server version: Apache\///p'`
rpm-build 4f3c61
    case $apache_version in
rpm-build 4f3c61
    2.4.*)
rpm-build 4f3c61
	AC_MSG_RESULT([$apache_version (ok)])
rpm-build 4f3c61
	;;
rpm-build 4f3c61
    *)
rpm-build 4f3c61
	AC_MSG_RESULT([$apache_version (ignoring)])
rpm-build 4f3c61
	APACHE_HTTPD="no"
rpm-build 4f3c61
	;;
rpm-build 4f3c61
    esac
rpm-build 4f3c61
fi
rpm-build 4f3c61
AC_SUBST(APACHE_HTTPD)
rpm-build 4f3c61
AC_DEFINE_UNQUOTED(APACHE_HTTPD, "$APACHE_HTTPD", [Apache httpd])
rpm-build 4f3c61
rpm-build 4f3c61
if test "$APACHE_HTTPD" != "no"; then
rpm-build 4f3c61
    AC_MSG_CHECKING([for Apache module directory])
rpm-build 4f3c61
    AC_ARG_WITH(apache-module-dir,
rpm-build 4f3c61
		AS_HELP_STRING([--with-apache-module-dir], [Apache modules dirs (for tests)]),
rpm-build 4f3c61
		apache_module_dirs="$withval",
rpm-build 4f3c61
		[apache_prefix=`dirname \`dirname $APACHE_HTTPD\``
rpm-build 4f3c61
		mpm=`$APACHE_HTTPD -V -C "ServerName localhost" | sed -ne 's/^Server MPM: */-/p' | tr 'A-Z' 'a-z'`
rpm-build 4f3c61
		# This only works with bash, but should fail harmlessly in sh
rpm-build 4f3c61
		apache_module_dirs=`echo $apache_prefix/lib{64,}/{apache,apache2,http,http2,httpd}{$mpm,}{/modules,}`])
rpm-build 4f3c61
    for dir in $apache_module_dirs; do
rpm-build 4f3c61
        if test -f $dir/mod_auth_digest.so; then
rpm-build 4f3c61
	    APACHE_MODULE_DIR="$dir"
rpm-build 4f3c61
        fi
rpm-build 4f3c61
        if test -f $dir/mod_ssl.so; then
rpm-build 4f3c61
	    APACHE_SSL_MODULE_DIR="$dir"
rpm-build 4f3c61
	    IF_HAVE_APACHE_SSL=""
rpm-build 4f3c61
        fi
rpm-build 4f3c61
        if test -f $dir/libphp7.so; then
rpm-build 4f3c61
	    APACHE_PHP_MODULE_DIR="$dir"
rpm-build 4f3c61
        fi
rpm-build 4f3c61
    done
rpm-build 4f3c61
    AC_MSG_RESULT($APACHE_MODULE_DIR)
rpm-build 4f3c61
    AC_SUBST(APACHE_MODULE_DIR)
rpm-build 4f3c61
    AC_SUBST(APACHE_SSL_MODULE_DIR)
rpm-build 4f3c61
    AC_SUBST(APACHE_PHP_MODULE_DIR)
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR" -a -n "$APACHE_SSL_MODULE_DIR"; then
rpm-build 4f3c61
    AC_DEFINE(HAVE_APACHE, 1, [Whether or not apache can be used for tests])
rpm-build 4f3c61
    have_apache=1
rpm-build 4f3c61
else
rpm-build 4f3c61
    have_apache=0
rpm-build 4f3c61
fi
rpm-build 4f3c61
AM_CONDITIONAL(HAVE_APACHE, test "$have_apache" = 1)
rpm-build 4f3c61
rpm-build 4f3c61
if test "$have_apache" = 1; then
rpm-build 4f3c61
    AC_CHECK_PROGS(PHP, php)
rpm-build 4f3c61
rpm-build 4f3c61
    AC_MSG_CHECKING([for Apache PHP module])
rpm-build 4f3c61
    if test -d "$APACHE_PHP_MODULE_DIR"; then
rpm-build 4f3c61
	have_php="yes"
rpm-build 4f3c61
	IF_HAVE_PHP=""
rpm-build 4f3c61
    else
rpm-build 4f3c61
	have_php="no"
rpm-build 4f3c61
	IF_HAVE_PHP="#"
rpm-build 4f3c61
    fi
rpm-build 4f3c61
    AC_MSG_RESULT($have_php)
rpm-build 4f3c61
    AC_SUBST(IF_HAVE_PHP)
rpm-build 4f3c61
rpm-build 4f3c61
    if test "$have_php" = yes; then
rpm-build 4f3c61
	AC_MSG_CHECKING([for php-xmlrpc])
rpm-build 4f3c61
	if $PHP --rf xmlrpc_server_create | grep -q "does not exist"; then
rpm-build 4f3c61
	    have_php_xmlrpc=no
rpm-build 4f3c61
	else
rpm-build 4f3c61
	    have_php_xmlrpc=yes
rpm-build 4f3c61
	    AC_DEFINE(HAVE_PHP_XMLRPC, 1, [Have php-xmlrpc])
rpm-build 4f3c61
	fi
rpm-build 4f3c61
	AC_MSG_RESULT($have_php_xmlrpc)
rpm-build 4f3c61
    fi
rpm-build 4f3c61
rpm-build 4f3c61
    if test -f "$APACHE_MODULE_DIR/mod_unixd.so"; then
rpm-build 4f3c61
	IF_HAVE_MOD_UNIXD=""
rpm-build 4f3c61
    else
rpm-build 4f3c61
	IF_HAVE_MOD_UNIXD="#"
rpm-build 4f3c61
    fi
rpm-build 4f3c61
    AC_SUBST(IF_HAVE_MOD_UNIXD)
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
AC_PATH_PROG(CURL, curl, no)
rpm-build 4f3c61
if test "$CURL" != no; then
rpm-build 4f3c61
    AC_DEFINE(HAVE_CURL, 1, [Whether or not curl can be used for tests])
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
dnl **********************************************************
rpm-build 4f3c61
dnl *** path of NTLM single-sign-on helper ntlm_auth
rpm-build 4f3c61
dnl **********************************************************
rpm-build 4f3c61
AC_ARG_WITH(ntlm-auth,
rpm-build 4f3c61
	    AC_HELP_STRING([--with-ntlm-auth=PATH],[Where to look for ntlm_auth, path points to ntlm_auth installation (default: /usr/bin/ntlm_auth)]),
rpm-build 4f3c61
	    ntlm_auth="$withval",
rpm-build 4f3c61
	    [if test $os_win32 = yes; then ntlm_auth="no"; else ntlm_auth="/usr/bin/ntlm_auth"; fi])
rpm-build 4f3c61
if test "$ntlm_auth" != "no"; then
rpm-build 4f3c61
    AC_DEFINE(USE_NTLM_AUTH, 1, [Whether or not use Samba's 'winbind' daemon helper 'ntlm_auth' for NTLM single-sign-on])
rpm-build 4f3c61
    if test "$ntlm_auth" = "yes"; then
rpm-build 4f3c61
	dnl --with-ntlm-auth (without path) used, use default path
rpm-build 4f3c61
	ntlm_auth="/usr/bin/ntlm_auth"
rpm-build 4f3c61
    fi
rpm-build 4f3c61
fi
rpm-build 4f3c61
AC_SUBST(ntlm_auth)
rpm-build 4f3c61
AC_DEFINE_UNQUOTED(NTLM_AUTH, "$ntlm_auth", [Samba's 'winbind' daemon helper 'ntlm_auth' which can be used for NTLM single-sign-on])
rpm-build 4f3c61
rpm-build 4f3c61
AX_CODE_COVERAGE
rpm-build 4f3c61
rpm-build 4f3c61
dnl **********************
rpm-build 4f3c61
dnl *** GSSAPI support ***
rpm-build 4f3c61
dnl **********************
rpm-build 4f3c61
AC_ARG_WITH(gssapi,
rpm-build 4f3c61
	    AS_HELP_STRING([--with-gssapi],
rpm-build 4f3c61
	    [Build with GSSAPI support [default=auto]]))
rpm-build 4f3c61
rpm-build 4f3c61
if test "$with_gssapi" != "no"; then
rpm-build 4f3c61
    AC_ARG_WITH(krb5-config,
rpm-build 4f3c61
		AS_HELP_STRING([--with-krb5-config=PATH],[Where to look for krb5-config, path points to krb5-config installation (default: /usr/kerberos/bin/)]),
rpm-build 4f3c61
		KRB5_CONFIG="$withval",
rpm-build 4f3c61
		[AC_PATH_PROGS(KRB5_CONFIG, krb5-config, no, ${PATH}:/usr/kerberos/bin)])
rpm-build 4f3c61
rpm-build 4f3c61
    if test "$KRB5_CONFIG" != "no"; then
rpm-build 4f3c61
	KRB5_LIBS="`${KRB5_CONFIG} --libs gssapi`"
rpm-build 4f3c61
	KRB5_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
rpm-build 4f3c61
	AC_SUBST(KRB5_CFLAGS)
rpm-build 4f3c61
	AC_SUBST(KRB5_LIBS)
rpm-build 4f3c61
	if test "$KRB5_CONFIG" != none; then
rpm-build 4f3c61
	    AC_DEFINE(LIBSOUP_HAVE_GSSAPI, 1, [Whether or not GSSAPI libs are available])
rpm-build 4f3c61
	fi
rpm-build 4f3c61
    else
rpm-build 4f3c61
	if test "$with_gssapi" = "yes"; then
rpm-build 4f3c61
	    AC_MSG_ERROR([GSSAPI support requested but failed to found krb5-config. Try to set KRB5_CONFIG.])
rpm-build 4f3c61
	fi
rpm-build 4f3c61
    fi
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
dnl ****************************************************
rpm-build 4f3c61
dnl *** Warnings to show if using GCC                ***
rpm-build 4f3c61
dnl *** (do this last so -Werror won't mess up tests ***
rpm-build 4f3c61
dnl ****************************************************
rpm-build 4f3c61
rpm-build 4f3c61
AC_ARG_ENABLE(more-warnings,
rpm-build 4f3c61
	      AS_HELP_STRING([--disable-more-warnings], [Inhibit compiler warnings]),
rpm-build 4f3c61
	      set_more_warnings=no)
rpm-build 4f3c61
rpm-build 4f3c61
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
rpm-build 4f3c61
	CFLAGS="$CFLAGS \
rpm-build 4f3c61
		-Wall -Wstrict-prototypes -Werror=missing-prototypes \
rpm-build 4f3c61
		-Werror=implicit-function-declaration \
rpm-build 4f3c61
		-Werror=pointer-arith -Werror=init-self -Werror=format=2 \
rpm-build 4f3c61
		-Wno-format-zero-length \
rpm-build 4f3c61
		-Werror=missing-include-dirs -Werror=aggregate-return \
rpm-build 4f3c61
		-Werror=declaration-after-statement"
rpm-build 4f3c61
fi
rpm-build 4f3c61
rpm-build 4f3c61
##################################################
rpm-build 4f3c61
# Visibility handling
rpm-build 4f3c61
##################################################
rpm-build 4f3c61
rpm-build 4f3c61
SOUP_HIDDEN_VISIBILITY_CFLAGS=""
rpm-build 4f3c61
case "$host" in
rpm-build 4f3c61
    *-*-mingw*)
rpm-build 4f3c61
        dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
rpm-build 4f3c61
        AC_DEFINE([_SOUP_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
rpm-build 4f3c61
                  [defines how to decorate public symbols while building])
rpm-build 4f3c61
        SOUP_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
rpm-build 4f3c61
        ;;
rpm-build 4f3c61
    *)
rpm-build 4f3c61
        dnl on other compilers, check if we can do -fvisibility=hidden
rpm-build 4f3c61
        SAVED_CFLAGS="${CFLAGS}"
rpm-build 4f3c61
        CFLAGS="-fvisibility=hidden"
rpm-build 4f3c61
        AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
rpm-build 4f3c61
        AC_TRY_COMPILE([], [return 0],
rpm-build 4f3c61
                       AC_MSG_RESULT(yes)
rpm-build 4f3c61
                       enable_fvisibility_hidden=yes,
rpm-build 4f3c61
                       AC_MSG_RESULT(no)
rpm-build 4f3c61
                       enable_fvisibility_hidden=no)
rpm-build 4f3c61
        CFLAGS="${SAVED_CFLAGS}"
rpm-build 4f3c61
rpm-build 4f3c61
        AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
rpm-build 4f3c61
            AC_DEFINE([_SOUP_EXTERN], [__attribute__((visibility("default"))) extern],
rpm-build 4f3c61
                      [defines how to decorate public symbols while building])
rpm-build 4f3c61
            SOUP_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
rpm-build 4f3c61
        ])
rpm-build 4f3c61
        ;;
rpm-build 4f3c61
esac
rpm-build 4f3c61
AC_SUBST(SOUP_HIDDEN_VISIBILITY_CFLAGS)
rpm-build 4f3c61
rpm-build 4f3c61
dnl ****************************************************
rpm-build 4f3c61
dnl *** Check whether MSVC toolset is explicitly set ***
rpm-build 4f3c61
dnl ****************************************************
rpm-build 4f3c61
AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
rpm-build 4f3c61
AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
rpm-build 4f3c61
rpm-build 4f3c61
rpm-build 4f3c61
dnl *************************
rpm-build 4f3c61
dnl *** Output Everything ***
rpm-build 4f3c61
dnl *************************
rpm-build 4f3c61
rpm-build 4f3c61
AC_CONFIG_HEADERS([config.h])
rpm-build 4f3c61
AC_CONFIG_FILES([
rpm-build 4f3c61
	libsoup-2.4.pc
rpm-build 4f3c61
	libsoup-gnome-2.4.pc
rpm-build 4f3c61
	Makefile
rpm-build 4f3c61
	libsoup-zip
rpm-build 4f3c61
	libsoup/Makefile
rpm-build 4f3c61
	po/Makefile.in
rpm-build 4f3c61
	po/Makefile
rpm-build 4f3c61
	tests/Makefile
rpm-build 4f3c61
	tests/httpd.conf
rpm-build 4f3c61
	examples/Makefile
rpm-build 4f3c61
	docs/Makefile
rpm-build 4f3c61
	docs/reference/Makefile
rpm-build 4f3c61
	libsoup/soup-version.h
rpm-build 4f3c61
	config.h.win32
rpm-build 4f3c61
	win32/Makefile
rpm-build 4f3c61
	win32/vs9/Makefile
rpm-build 4f3c61
	win32/vs9/soup-version-paths.vsprops
rpm-build 4f3c61
	win32/vs10/Makefile
rpm-build 4f3c61
	win32/vs10/soup-version-paths.props
rpm-build 4f3c61
	win32/vs11/Makefile
rpm-build 4f3c61
	win32/vs12/Makefile
rpm-build 4f3c61
	win32/vs14/Makefile
rpm-build 4f3c61
	win32/vs15/Makefile
rpm-build 4f3c61
	])
rpm-build 4f3c61
AC_OUTPUT