[evolution-mapi] Bug 593076 : Fixes for build system.



commit ce202824f6b305874c1b2992c53dff7665260bf1
Author: H.Habighorst <tearofadragon googlemail com>
Date:   Mon Sep 7 12:34:16 2009 +0530

    Bug 593076 : Fixes for build system.
    
    Removes old cruft and rewrites the initialization.
    
    Removes the manual include of SAMBA in
    src/account-setup-eplugin/Makefile.am - as mapi depends on SAMBA and it has an
    pkg-config file, use these cflags and fail if libmapi isn't found.
    
    Removes the AUTOMAKE_OPTIONS = 1.6 string from Makefile.am - version
    checking should be done via AutoConf or autogen.sh.

 Makefile.am                           |    2 -
 autogen.sh                            |    5 ++-
 configure.ac                          |   77 +++++++++++++++++---------------
 src/account-setup-eplugin/Makefile.am |    2 +-
 4 files changed, 46 insertions(+), 40 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7254462..0860a46 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,3 @@
-AUTOMAKE_OPTIONS = 1.6
-
 SUBDIRS = src po
 DIST_SUBDIRS= src po
 
diff --git a/autogen.sh b/autogen.sh
index a8ab1c0..d3e2104 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,7 +5,10 @@ srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 
 PKG_NAME="evolution-mapi"
-REQUIRED_AUTOMAKE_VERSION=1.6
+REQUIRED_AUTOCONF_VERSION=2.58
+REQUIRED_AUTOMAKE_VERSION=1.9
+REQUIRED_LIBTOOL_VERSION=1.5
+REQUIRED_INTLTOOL_VERSION=0.35.5
 
 (test -f $srcdir/configure.ac \
   && test -f $srcdir/ChangeLog \
diff --git a/configure.ac b/configure.ac
index 5169b39..c2dcabd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,56 +1,54 @@
-# Simple configuration script for openchange evolution plugin
-# Written by Julien Kerihuel <j kerihuel openchange org>
-# Modified for GNOME Evolution MAPI Provider by Johnny Jacob <jjohnny novell com>
+dnl Simple configuration script for openchange evolution plugin
+dnl Written by Julien Kerihuel <j kerihuel openchange org>
+dnl Modified for GNOME Evolution MAPI Provider by Johnny Jacob <jjohnny novell com>
 
-AC_PREREQ(2.57)
-AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])
-AC_INIT(evolution-mapi, 0.27.92, http://bugzilla.gnome.org/browse.cgi?product=evolution-mapi)
+AC_PREREQ(2.58)
+AC_INIT([evolution-mapi], [0.27.92], [http://bugzilla.gnome.org/browse.cgi?product=evolution-mapi])
+AM_INIT_AUTOMAKE([gnu 1.9])
 AC_CONFIG_SRCDIR(README)
+AC_CONFIG_HEADERS(config.h)
 
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+dnl ****************************
+dnl Evolution-MAPI API version
+dnl ****************************
+m4_define([EVO_MAPI_API_VERSION_MACRO], [1.0])
+EVO_MAPI_API_VERSION=EVO_MAPI_API_VERSION_MACRO
+AC_SUBST(EVO_MAPI_API_VERSION)
 
-# Some requirements have versioned package names
-# XXX In the spirit of getting rid of versioned
-#     files, can we please drop these suffixes?
+dnl Some requirements have versioned package names
+dnl XXX In the spirit of getting rid of versioned
+dnl     files, can we please drop these suffixes?
 EDS_PACKAGE=1.2
 
-# Required Packages
+dnl *******************
+dnl Required Packages
+dnl *******************
 m4_define([eds_minimum_version], [2.27.2])
 m4_define([evo_minimum_version], [2.27.2])
 m4_define([libmapi_minimum_version], [0.8])
 
-AC_CONFIG_HEADER(config.h)
-
-# Automake 1.11 - Silent Build Rules
+dnl ***********************************
+dnl Automake 1.11 - Silent Build Rules
+dnl ***********************************
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 dnl ****************************
-dnl Evolution-MAPI API version
-dnl ****************************
-m4_define([EVO_MAPI_API_VERSION_MACRO], [1.0])
-EVO_MAPI_API_VERSION=EVO_MAPI_API_VERSION_MACRO
-AC_SUBST(EVO_MAPI_API_VERSION)
-
-dnl ****************************
 dnl Initialize maintainer mode
 dnl ****************************
 AM_MAINTAINER_MODE
 
-AC_ISC_POSIX
 AC_PROG_CC
 AC_PROG_CPP
 AC_C_INLINE
-AC_STDC_HEADERS
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 
-AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])
-
-# Compiler Warning Flags
-
+dnl ***********************
+dnl Compiler Warning Flags
+dnl ***********************
 AS_COMPILER_FLAGS(WARNING_FLAGS,
-»·······"-DG_DISABLE_DEPRECATED
+	"-DG_DISABLE_DEPRECATED
 	-DPANGO_DISABLE_DEPRECATED
 	-DGDK_DISABLE_DEPRECATED
 	-DGDK_PIXBUF_DISABLE_DEPRECATED
@@ -68,11 +66,11 @@ AS_COMPILER_FLAGS(WARNING_FLAGS,
 	-Wredundant-decls -Wundef -Wwrite-strings")
 AC_SUBST(WARNING_FLAGS)
 
-# Other useful compiler warnings for test builds only.
-# These may produce warnings we have no control over.
-#
-#»······-Wmissing-format-attribute
-#»······-Wshadow
+dnl Other useful compiler warnings for test builds only.
+dnl These may produce warnings we have no control over.
+dnl
+dnl	-Wmissing-format-attribute
+dnl	-Wshadow
 
 CFLAGS="$CFLAGS $WARNING_FLAGS"
 
@@ -115,9 +113,15 @@ dnl ****************************
 PKG_CHECK_MODULES(EVOLUTION_PLUGIN, evolution-plugin >= evo_minimum_version)
 
 dnl ****************************
-dnl Check for LibMAPI 
+dnl Check for LibMAPI
 dnl ****************************
-PKG_CHECK_MODULES(LIBMAPI, libmapi >= libmapi_minimum_version)
+
+dnl libmapi requires SAMBA, it has got samba's cflags in it's own CFLAGS!
+PKG_CHECK_MODULES(LIBMAPI, 
+	libmapi >= libmapi_minimum_version,,
+	[AC_MSG_ERROR([libmapi wasn't found! Please install at least libmapi-libmapi_minimum_version!])])
+AC_SUBST(LIBMAPI_CFLAGS)
+AC_SUBST(LIBMAPI_LIBS)
 
 dnl ****************************
 dnl Expose version information
@@ -169,7 +173,7 @@ GTK_DOC_CHECK(1.9)
 dnl **************************
 dnl Makefiles, generated .pc's
 dnl **************************
-AC_OUTPUT([
+AC_CONFIG_FILES([
 Makefile 
 src/Makefile
 src/account-setup-eplugin/Makefile
@@ -180,3 +184,4 @@ src/libexchangemapi/Makefile
 src/libexchangemapi/libexchangemapi-]EVO_MAPI_API_VERSION_MACRO[.pc:src/libexchangemapi/libexchangemapi.pc.in
 po/Makefile.in
 ])
+AC_OUTPUT
diff --git a/src/account-setup-eplugin/Makefile.am b/src/account-setup-eplugin/Makefile.am
index 084a336..f094e1e 100644
--- a/src/account-setup-eplugin/Makefile.am
+++ b/src/account-setup-eplugin/Makefile.am
@@ -29,7 +29,7 @@ liborg_gnome_exchange_mapi_la_LIBADD = 			\
 	$(LIBMAPI_LIBS)
 
 liborg_gnome_exchange_mapi_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-liborg_gnome_exchange_mapi_la_CFLAGS = -I/usr/local/samba/include/
+liborg_gnome_exchange_mapi_la_CFLAGS = $(LIBMAPI_CFLAGS)
 
 EXTRA_DIST = 						\
 	org-gnome-exchange-mapi.eplug.xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]