diff -Nurd -x'*~' libgda-4.0.8.orig/configure.in libgda-4.0.8/configure.in
--- libgda-4.0.8.orig/configure.in	2010-03-06 07:53:26.000000000 -0500
+++ libgda-4.0.8/configure.in	2010-04-11 16:48:01.000000000 -0400
@@ -176,12 +176,13 @@
     dnl Darwin based distributions (including Mac OS X)
     AC_MSG_RESULT([Mac OS X - carbon])
     platform_carbon=yes
+    NO_UNDEFINED='-no-undefined'
     SOPREFIX='lib'
     AM_BINRELOC
     LIBTOOL_EXPORT_OPTIONS=$EXPORT_SYM_REGEX
     LIBTOOL_PROV_EXPORT_OPTIONS=$EXPORT_PROV_SYM_REGEX
     AC_DEFINE(HAVE_CARBON)
-    LIBGDA_LIBS="$LIBGDA_LIBS -framework Carbon"
+    LIBGDA_LIBS="$LIBGDA_LIBS -Wl,-framework,Carbon"
     dnl SO_SUFFIX=dylib
   ;;
 *)
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda/Makefile.am libgda-4.0.8/libgda/Makefile.am
--- libgda-4.0.8.orig/libgda/Makefile.am	2010-03-06 07:53:26.000000000 -0500
+++ libgda-4.0.8/libgda/Makefile.am	2010-04-11 16:42:33.000000000 -0400
@@ -200,7 +200,7 @@
 	binreloc/libgda_binreloc-4.0.la \
 	sqlite/libgda-sqlite.la \
 	$(LIBGDA_LIBS) $(FAM_LIBS) \
-	$(GIO_LIBS) $(GNOMEVFS_LIBS) 
+	$(GIO_LIBS) $(GNOMEVFS_LIBS) $(INTLLIBS)
 
 if PLATFORM_WIN32
 libgda_4_0_la_LDFLAGS += -export-symbols $(srcdir)/libgda.def
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda/sqlite/Makefile.am libgda-4.0.8/libgda/sqlite/Makefile.am
--- libgda-4.0.8.orig/libgda/sqlite/Makefile.am	2010-02-06 08:16:08.000000000 -0500
+++ libgda-4.0.8/libgda/sqlite/Makefile.am	2010-04-12 01:43:19.000000000 -0400
@@ -16,9 +16,8 @@
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) \
-	$(SQLITE_CFLAGS) \
-	$(sqliteinc) 
+	$(sqliteinc) \
+	$(LIBGDA_CFLAGS)
 
 mkkeywordhash$(EXEEXT_FOR_BUILD): mkkeywordhash.c
 	$(CC_FOR_BUILD) -o mkkeywordhash$(EXEEXT_FOR_BUILD) $(GDA_DEBUG_FLAGS) $<
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda/sqlite/virtual/Makefile.am libgda-4.0.8/libgda/sqlite/virtual/Makefile.am
--- libgda-4.0.8.orig/libgda/sqlite/virtual/Makefile.am	2010-01-14 09:05:22.000000000 -0500
+++ libgda-4.0.8/libgda/sqlite/virtual/Makefile.am	2010-04-12 00:46:02.000000000 -0400
@@ -12,12 +12,11 @@
 AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
-	$(LIBGDA_CFLAGS) \
-	$(SQLITE_CFLAGS) \
 	-I$(top_srcdir)/libgda/sqlite \
         -I$(top_builddir)/libgda/sqlite \
 	-I$(top_srcdir)/libgda \
-	$(sqliteinc) 
+	$(sqliteinc) \
+	$(LIBGDA_CFLAGS)
 
 virtual_headers = \
 	gda-vconnection-data-model.h \
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda-report/RML/gda-report-rml-document.c libgda-4.0.8/libgda-report/RML/gda-report-rml-document.c
--- libgda-4.0.8.orig/libgda-report/RML/gda-report-rml-document.c	2010-01-11 15:11:03.000000000 -0500
+++ libgda-4.0.8/libgda-report/RML/gda-report-rml-document.c	2010-04-11 15:53:00.000000000 -0400
@@ -198,7 +198,7 @@
 	if (!converter) {
 		converter = g_find_program_in_path ("trml2html.py");
 		if (!converter) {
-			converter = gda_gbr_get_file_path (GDA_BIN_DIR, "gda_trml2html", "trml2html.py", NULL);
+			converter = gda_gbr_get_file_path (GDA_LIBEXEC_DIR, "gda_trml2html", "trml2html.py", NULL);
 			if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) {
 				g_free (converter);
 				converter = NULL;
@@ -229,7 +229,7 @@
 	if (!converter) {
 		converter = g_find_program_in_path ("trml2pdf.py");
 		if (!converter) {
-			converter = gda_gbr_get_file_path (GDA_BIN_DIR, "gda_trml2pdf", "trml2pdf.py", NULL);
+			converter = gda_gbr_get_file_path (GDA_LIBEXEC_DIR, "gda_trml2pdf", "trml2pdf.py", NULL);
 			if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) {
 				g_free (converter);
 				converter = NULL;
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda-report/RML/trml2html/Makefile.am libgda-4.0.8/libgda-report/RML/trml2html/Makefile.am
--- libgda-4.0.8.orig/libgda-report/RML/trml2html/Makefile.am	2010-01-11 15:11:03.000000000 -0500
+++ libgda-4.0.8/libgda-report/RML/trml2html/Makefile.am	2010-04-11 15:53:00.000000000 -0400
@@ -1,6 +1,6 @@
 trml2html_SCRIPTS = trml2html.py
 trml2html_DATA = __init__.py utils.py
-trml2htmldir = $(bindir)/gda_trml2html
+trml2htmldir = $(libexecdir)/gda_trml2html
 
 EXTRA_DIST = \
 	$(trml2html_SCRIPTS) \
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda-report/RML/trml2pdf/Makefile.am libgda-4.0.8/libgda-report/RML/trml2pdf/Makefile.am
--- libgda-4.0.8.orig/libgda-report/RML/trml2pdf/Makefile.am	2010-01-11 15:11:03.000000000 -0500
+++ libgda-4.0.8/libgda-report/RML/trml2pdf/Makefile.am	2010-04-11 15:53:00.000000000 -0400
@@ -1,6 +1,6 @@
 trml2pdf_SCRIPTS = trml2pdf.py
 trml2pdf_DATA = __init__.py color.py utils.py
-trml2pdfdir = $(bindir)/gda_trml2pdf
+trml2pdfdir = $(libexecdir)/gda_trml2pdf
 
 EXTRA_DIST = \
 	$(trml2pdf_SCRIPTS) \
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda-report/engine/Makefile.am libgda-4.0.8/libgda-report/engine/Makefile.am
--- libgda-4.0.8.orig/libgda-report/engine/Makefile.am	2010-01-11 15:11:03.000000000 -0500
+++ libgda-4.0.8/libgda-report/engine/Makefile.am	2010-04-11 15:53:00.000000000 -0400
@@ -16,8 +16,8 @@
 	$(gda_report_headers)	\
 	gda-report-engine.c	
 
-libgda_report_engine_4_0_la_LIBADD = $(LIBGDA_LIBS) \
-	$(top_builddir)/libgda/libgda-4.0.la 
+libgda_report_engine_4_0_la_LIBADD = \
+	$(top_builddir)/libgda/libgda-4.0.la $(LIBGDA_LIBS)
 
 gdareportincludedir=$(includedir)/libgda-$(GDA_ABI_MAJOR_VERSION).$(GDA_ABI_MINOR_VERSION)/libgda-report
 gdareportinclude_HEADERS=$(gda_report_headers)
diff -Nurd -x'*~' libgda-4.0.8.orig/libgda-xslt/Makefile.am libgda-4.0.8/libgda-xslt/Makefile.am
--- libgda-4.0.8.orig/libgda-xslt/Makefile.am	2010-01-11 15:11:03.000000000 -0500
+++ libgda-4.0.8/libgda-xslt/Makefile.am	2010-04-11 15:53:00.000000000 -0400
@@ -20,8 +20,8 @@
 	sql_backend.c
 
 libgda_xslt_4_0_la_LDFLAGS = -version-info $(GDA_CURRENT):$(GDA_REVISION):$(GDA_AGE) $(NO_UNDEFINED)
-libgda_xslt_4_0_la_LIBADD = $(LIBGDA_LIBS) $(LIBXSLT_LIBS)\
-        $(top_builddir)/libgda/libgda-4.0.la
+libgda_xslt_4_0_la_LIBADD = \
+        $(top_builddir)/libgda/libgda-4.0.la $(LIBGDA_LIBS) $(LIBXSLT_LIBS)
 
 gdaxsltincludedir=$(includedir)/libgda-$(GDA_ABI_MAJOR_VERSION).$(GDA_ABI_MINOR_VERSION)/libgda-xslt
 gdaxsltinclude_HEADERS=$(gda_xslt_headers)
diff -Nurd -x'*~' libgda-4.0.8.orig/providers/bdb/Makefile.am libgda-4.0.8/providers/bdb/Makefile.am
--- libgda-4.0.8.orig/providers/bdb/Makefile.am	2010-01-11 15:11:02.000000000 -0500
+++ libgda-4.0.8/providers/bdb/Makefile.am	2010-04-11 15:53:00.000000000 -0400
@@ -24,9 +24,9 @@
 
 gda_bdb_test_SOURCES = gda-bdb-test.c
 gda_bdb_test_LDADD = \
+	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) \
-	$(BDB_LIBS) \
-	$(top_builddir)/libgda/libgda-4.0.la 
+	$(BDB_LIBS)
 
 xmldir   = $(datadir)/libgda-4.0
 xml_in_files = bdb_specs_dsn.xml.in
