# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT(evolution, 2.23.6, http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution)
AC_CONFIG_SRCDIR(README)
# Some requirements have versioned package names
# XXX In the spirit of getting rid of versioned
# files, can we please drop these suffixes?
EDS_PACKAGE=1.2
GTKHTML_PACKAGE=3.14
# Required Packages
m4_define([glib_minimum_version], [2.16.0])
m4_define([gtk_minimum_version], [2.12.0])
m4_define([eds_minimum_version], [2.23.5])
m4_define([gnome_icon_theme_minimum_version], [2.19.91])
m4_define([libbonobo_minimum_version], [2.20.3])
m4_define([libbonoboui_minimum_version], [2.4.2])
m4_define([libgtkhtml_minimum_version], [3.23.5])
m4_define([gconf_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libglade_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libgnomecanvas_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libgnomeui_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libxml_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([shared_mime_info_minimum_version], [0.22])
# Optional Packages
#
# FIXME Minimum versions for dbus-glib-1 and libnm_glib ?
#
m4_define([dbus_minimum_version], [1.0.0])
m4_define([hal_minimum_version], [0.5.4])
m4_define([libnotify_minimum_version], [0.3.0])
m4_define([gnome_pilot_minimum_version], [2.0.15])
# GNOME Documentation
GNOME_DOC_INIT
# Gross hack to enable 'make dist' on automake 1.9+tar 1.14.
# The extra brackets are to foil regex-based scans.
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED(VERSION_COMMENT, "", [Define if you want a comment appended to the version number])
dnl Put the ACLOCAL flags in the Makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
dnl *************************************************************************************************
dnl Base Version
dnl
dnl This is for api/versioning tracking for things like bonobo .server files
dnl
dnl This should always be the major/minor of the stable version or stable version to be
dnl *************************************************************************************************
BASE_VERSION=2.24
AC_SUBST(BASE_VERSION)
AC_DEFINE_UNQUOTED(BASE_VERSION, "$BASE_VERSION", [Base version (Major.Minor)])
dnl *************************************************************************************************
dnl Upgrade Revision
dnl
dnl This is for triggering migration calls between varying versions.
dnl
dnl This should be reset to 0 whenever BASE_VERSION changes
dnl *************************************************************************************************
UPGRADE_REVISION=0
AC_SUBST(UPGRADE_REVISION)
AC_DEFINE_UNQUOTED(UPGRADE_REVISION, "$UPGRADE_REVISION", [The number of times we've upgraded since the BASE_VERSION release])
dnl *************************************************************************************************
dnl Development mode
dnl
dnl The controls whether things like the development warning in shell/main.c are displayed.
dnl
dnl This should be set to 0 for stable releases and 1 for unstable releases
dnl *************************************************************************************************
AC_DEFINE(DEVELOPMENT, 1, [If we are in development mode or not])
AC_SUBST(DEVELOPMENT)
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_C_INLINE
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_AWK
AC_PATH_PROG([PERL], [perl])
AC_SUBST(PERL)
case $YACC in
*yacc*)
AC_MSG_ERROR(You need bison to build Evolution)
;;
esac
AC_STDC_HEADERS
AC_ARG_PROGRAM
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl Test whether jw is installed
AC_PATH_PROG(JW,jw,no)
if test x$JW = xno; then
HAVE_JW="no"
else
HAVE_JW="yes"
fi
AM_CONDITIONAL(HAVE_JW, [test x$HAVE_JW = xyes])
AC_SUBST(HAVE_JW)
dnl I18N stuff
AC_PROG_INTLTOOL([0.35.5])
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=evolution-$BASE_VERSION
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
localedir='$(prefix)/$(DATADIRNAME)/locale'
AC_SUBST(localedir)
dnl Initialize libtool
AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
DOLT
PKG_PROG_PKG_CONFIG
dnl Win32
AC_MSG_CHECKING([for Win32])
case "$host" in
*-mingw*)
os_win32=yes
NO_UNDEFINED='-no-undefined'
SOEXT='.dll'
SA_JUNK_PLUGIN=''
BF_JUNK_PLUGIN=''
DL_LIB=''
SOFTOKN3_LIB=''
HAL_REQUIREMENT=''
;;
*) os_win32=no
NO_UNDEFINED=''
SOEXT='.so'
SA_JUNK_PLUGIN=sa-junk-plugin
BF_JUNK_PLUGIN=bogo-junk-plugin
DL_LIB='-ldl'
SOFTOKN3_LIB='-lsoftokn3'
HAL_REQUIREMENT='hal'
;;
esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
AC_SUBST(NO_UNDEFINED)
AC_SUBST(SOEXT)
# Check for base dependencies early.
PKG_CHECK_MODULES(GNOME_PLATFORM,
[glib-2.0 >= glib_minimum_version
gtk+-2.0 >= gtk_minimum_version
gconf-2.0 >= gconf_minimum_version
libbonobo-2.0 >= libbonobo_minimum_version
libbonoboui-2.0 >= libbonoboui_minimum_version
libglade-2.0 >= libglade_minimum_version
libgnomecanvas-2.0 >= libgnomecanvas_minimum_version
libgnomeui-2.0 >= libgnomeui_minimum_version
libxml-2.0 >= libxml_minimum_version
shared-mime-info >= shared_mime_info_minimum_version])
AC_SUBST(GNOME_PLATFORM_CFLAGS)
AC_SUBST(GNOME_PLATFORM_LIBS)
PKG_CHECK_MODULES(EVOLUTION_DATA_SERVER,
[libebook-$EDS_PACKAGE >= eds_minimum_version
libecal-$EDS_PACKAGE >= eds_minimum_version
libedataserver-$EDS_PACKAGE >= eds_minimum_version
libedataserverui-$EDS_PACKAGE >= eds_minimum_version
libegroupwise-$EDS_PACKAGE >= eds_minimum_version
libebackend-$EDS_PACKAGE >= eds_minimum_version])
dnl ******************
dnl User documentation
dnl ******************
AC_MSG_CHECKING([whether to build user documentation])
AC_ARG_WITH([help],
[AC_HELP_STRING([--with-help],
[Build user documentation [default=yes]])],
with_help="$withval", with_help="yes")
AM_CONDITIONAL(WITH_HELP, test "x$with_help" != "xno")
AC_MSG_RESULT($with_help)
dnl ******************************
dnl iconv checking
dnl ******************************
have_iconv=no
AC_ARG_WITH([libiconv],
AC_HELP_STRING([--with-libiconv=PATH],
[Prefix where libiconv is installed]))
case $withval in
/*)
ICONV_CFLAGS="-I$withval/include"
ICONV_LIBS="-L$withval/lib"
;;
esac
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ICONV_CFLAGS"
LIBS="$LIBS $ICONV_LIBS -liconv"
AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv,
AC_TRY_RUN([
#include <iconv.h>
#include <stdlib.h>
int main (int argc, char **argv)
{
iconv_t cd;
cd = iconv_open ("UTF-8", "ISO-8859-1");
exit (0);
}
], [ac_cv_libiconv=yes], [ac_cv_libiconv=no], [ac_cv_libiconv=no]))
if test $ac_cv_libiconv = yes; then
ICONV_LIBS="$ICONV_LIBS -liconv"
if test $os_win32 = yes; then
# Don't pointlessly auto-export the global symbols
# from a potentially static libiconv.a
ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
fi
have_iconv=yes
else
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
fi
if test $have_iconv = yes; then
if test $ac_cv_libiconv = no; then
AC_CHECK_FUNCS(gnu_get_libc_version)
fi
AC_CACHE_CHECK([if iconv() handles UTF-8], ac_cv_libiconv_utf8, AC_TRY_RUN([
#include <iconv.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_GNU_GET_LIBC_VERSION
#include <gnu/libc-version.h>
#endif
int main (int argc, char **argv)
{
const char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
const char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
char *transbuf = malloc (10), *trans = transbuf;
iconv_t cd;
size_t jp_len = strlen (jp), utf8_len = 10;
size_t utf8_real_len = strlen (utf8);
#ifdef HAVE_GNU_GET_LIBC_VERSION
/* glibc 2.1.2's iconv is broken in hard to test ways. */
if (!strcmp (gnu_get_libc_version (), "2.1.2"))
exit (1);
#endif
cd = iconv_open ("UTF-8", "ISO-2022-JP");
if (cd == (iconv_t) -1)
exit (1);
if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0
)
exit (1);
if (memcmp (utf8, transbuf, utf8_real_len) != 0)
exit (1);
exit (0);
}], ac_cv_libiconv_utf8=yes, [ac_cv_libiconv_utf8=no; have_iconv=no], [ac_cv
_libiconv_utf8=no; have_iconv=no]))
fi
if test "$have_iconv" = no; then
AC_MSG_ERROR([You need to install a working iconv implementation, su
ch as ftp://ftp.gnu.org/pub/gnu/libiconv])
fi
AC_SUBST(ICONV_CFLAGS)
AC_SUBST(ICONV_LIBS)
CFLAGS="$CFLAGS -I$srcdir"
AC_MSG_CHECKING(preferred charset formats for system iconv)
AC_TRY_RUN([
#define CONFIGURE_IN
#include "iconv-detect.c"
],[
AC_MSG_RESULT(found)
],[
AC_MSG_RESULT(not found)
AC_WARN([
*** The iconv-detect program was unable to determine the
*** preferred charset formats recognized by your system
*** iconv library. It is suggested that you install a
*** working iconv library such as the one found at
*** ftp://ftp.gnu.org/pub/gnu/libiconv
])
])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
dnl alloca()
AC_CHECK_HEADERS(alloca.h)
dnl check for socklen_t (in Unix98)
AC_MSG_CHECKING(for socklen_t)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
socklen_t x;
],[],[AC_MSG_RESULT(yes)],[
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
int accept (int, struct sockaddr *, size_t *);
],[],[
AC_MSG_RESULT(size_t)
AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [
AC_MSG_RESULT(int)
AC_DEFINE(socklen_t,int)])])
dnl
dnl Purify support
dnl
EVO_PURIFY_SUPPORT
dnl **************
|