[libgda] Improved building of embedded version MDBTools



commit 190b4b5b6065d1cb1fd2ff7aa2f12db879bf8f67
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Feb 27 18:59:08 2011 +0100

    Improved building of embedded version MDBTools
    
    - fixed native WIN32 compilation flag
    - fixed forced usage of embedded version on other platforms

 configure.ac              |    1 +
 m4/mdbtools.m4            |    2 ++
 providers/mdb/Makefile.am |    8 +++++++-
 3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3f5ae10..4ae2f0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -578,6 +578,7 @@ dnl Test for MDB Tools (for MS Access files)
 if test "x$platform_win32" = "xyes"; then
     AM_ICONV
     AM_CONDITIONAL(MDB, true)
+    AM_CONDITIONAL(MDBEMBEDDED, true)
     AC_DEFINE(MDB_BIND_COLUMN_FOUR_ARGS,[1],[define if mdb_bind_column accepts four args])
     AC_DEFINE(MDB_WITH_WRITE_SUPPORT,[1],[define if mdb_open accepts MDB_WRITABLE])
     mdbtools_found="yes (embedded)"
diff --git a/m4/mdbtools.m4 b/m4/mdbtools.m4
index 0fcaf1a..5b4a5b5 100644
--- a/m4/mdbtools.m4
+++ b/m4/mdbtools.m4
@@ -215,6 +215,7 @@ int main() {
     fi
 
     AM_CONDITIONAL(MDB,[test "$mdbtools_found" != "no"])
+    AM_CONDITIONAL(MDBEMBEDDED, false)
     AC_SUBST(MDB_LIBS)
     AC_SUBST(MDB_CFLAGS)
 ])
@@ -233,6 +234,7 @@ AC_DEFUN([MDBTOOLS_CHECK],
     else
         AM_ICONV
         AM_CONDITIONAL(MDB, true)
+        AM_CONDITIONAL(MDBEMBEDDED, true)
         AC_DEFINE(MDB_BIND_COLUMN_FOUR_ARGS,[1],[define if mdb_bind_column accepts four args])
         AC_DEFINE(MDB_WITH_WRITE_SUPPORT,[1],[define if mdb_open accepts MDB_WRITABLE])
         mdbtools_found="yes (embedded)"
diff --git a/providers/mdb/Makefile.am b/providers/mdb/Makefile.am
index fd997cc..b5bcfdb 100644
--- a/providers/mdb/Makefile.am
+++ b/providers/mdb/Makefile.am
@@ -1,10 +1,16 @@
 providerdir=$(libdir)/libgda-$(GDA_ABI_MAJOR_VERSION).$(GDA_ABI_MINOR_VERSION)/providers
 provider_LTLIBRARIES = libgda-mdb.la
 
-if PLATFORM_WIN32
+if MDBEMBEDDED
 SUBDIRS = libmdb-src
 extra_mdb_cflags = -I$(srcdir)/libmdb-src/include
 extra_mdb_ldflags = libmdb-src/libmdb.la
+if CROSS_COMPILING
+else
+if PLATFORM_WIN32
+extra_mdb_ldflags = -liconv libmdb-src/libmdb.la
+endif
+endif
 else
 extra_mdb_cflags = $(MDB_CFLAGS)
 extra_mdb_ldflags = $(MDB_LIBS)



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