summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kexi/kexidb/drivers/configure.in.in69
-rw-r--r--kexi/kexidb/drivers/pqxx/Makefile.am2
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.cpp4
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.h4
-rw-r--r--kexi/migration/pqxx/Makefile.am2
-rw-r--r--lib/kotext/Makefile.am2
-rw-r--r--lib/kross/api/Makefile.am2
-rw-r--r--lib/kross/main/Makefile.am2
-rw-r--r--lib/kross/python/Makefile.am2
-rw-r--r--lib/kross/python/cxx/Makefile.am2
-rw-r--r--lib/kross/ruby/Makefile.am2
11 files changed, 89 insertions, 4 deletions
diff --git a/kexi/kexidb/drivers/configure.in.in b/kexi/kexidb/drivers/configure.in.in
index 1f3e70f3..c33c6fbc 100644
--- a/kexi/kexidb/drivers/configure.in.in
+++ b/kexi/kexidb/drivers/configure.in.in
@@ -241,4 +241,73 @@ if test "$compile_pgsql_plugin" = "yes"; then
fi
fi
+dnl ========================================
+dnl libpqxx build flags
+dnl ========================================
+if test "$compile_pgsql_plugin" = "yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ SAVED_CXXFLAGS="$CXXFLAGS"
+ for CXX_STD_TEST in "" 11 14 17; do
+ CXXFLAGS="$SAVED_CXXFLAGS"
+ if test "x$CXX_STD_TEST" = "x"; then
+ AC_MSG_CHECKING([PostgreSQL build with default C++ standard])
+ else
+ AC_MSG_CHECKING([PostgreSQL build with C++$CXX_STD_TEST])
+ CXXFLAGS=-std=c++$CXX_STD_TEST
+ fi
+ AC_TRY_COMPILE([
+ #include <$PQXX_INCDIR/pqxx/pqxx>
+ ],[ ],
+ pqxx_cxx_std=yes,
+ pqxx_cxx_std=no
+ )
+ if test "x$pqxx_cxx_std" = "xyes"; then
+ PQXX_CXXFLAGS=$CXXFLAGS
+ compile_pgsql_plugin="yes"
+ AC_SUBST(PQXX_CXXFLAGS)
+ AC_MSG_RESULT(yes)
+ break
+ else
+ compile_pgsql_plugin="no"
+ AC_MSG_RESULT(no)
+ fi
+ done
+ CXXFLAGS="$SAVED_CXXFLAGS"
+ AC_LANG_RESTORE
+fi
+
+dnl ========================================
+dnl libpqxx field class name
+dnl ========================================
+if test "$compile_pgsql_plugin" = "yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ SAVED_CXXFLAGS="$CXXFLAGS"
+
+ CXXFLAGS=$PQXX_CXXFLAGS
+ for PQXX_FIELD_CLASS in "pqxx::field" "pqxx::result::field"; do
+ AC_MSG_CHECKING([for PostgreSQL field class name - $PQXX_FIELD_CLASS])
+ AC_TRY_COMPILE([
+ #include <$PQXX_INCDIR/pqxx/pqxx>
+ ],[
+ sizeof($PQXX_FIELD_CLASS);
+ ],
+ pqxx_field_class=yes,
+ pqxx_field_class=no
+ )
+ if test "x$pqxx_field_class" = "xyes"; then
+ compile_pgsql_plugin="yes"
+ AC_DEFINE_UNQUOTED(PQXX_FIELD_CLASS, $PQXX_FIELD_CLASS, [ PQXX field class name ])
+ AC_MSG_RESULT(yes)
+ break
+ else
+ compile_pgsql_plugin="no"
+ AC_MSG_RESULT(no)
+ fi
+ done
+ CXXFLAGS="$SAVED_CXXFLAGS"
+ AC_LANG_RESTORE
+fi
+
AM_CONDITIONAL(compile_pgsql_plugin, test "$compile_pgsql_plugin" = "yes")
diff --git a/kexi/kexidb/drivers/pqxx/Makefile.am b/kexi/kexidb/drivers/pqxx/Makefile.am
index 6f5d73e2..fe0c5633 100644
--- a/kexi/kexidb/drivers/pqxx/Makefile.am
+++ b/kexi/kexidb/drivers/pqxx/Makefile.am
@@ -4,6 +4,8 @@ kde_module_LTLIBRARIES = kexidb_pqxxsqldriver.la
INCLUDES = -I$(srcdir)/../../.. $(all_includes) -I$(PG_INCDIR) -I$(PQXX_INCDIR)
+CXXFLAGS += $(PQXX_CXXFLAGS)
+
kexidb_pqxxsqldriver_la_METASOURCES = AUTO
kexidb_pqxxsqldriver_la_SOURCES = pqxxdriver.cpp pqxxcursor.cpp pqxxconnection.cpp \
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
index 746a383a..048d6685 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
@@ -34,7 +34,7 @@ using namespace KexiDB;
unsigned int pqxxSqlCursor_trans_num=0; //!< debug helper
-static TQByteArray pgsqlByteaToByteArray(const pqxx::result::field& r)
+static TQByteArray pgsqlByteaToByteArray(const PQXX_FIELD_CLASS& r)
{
return KexiDB::pgsqlByteaToByteArray(r.c_str(), r.size());
}
@@ -243,7 +243,7 @@ TQVariant pqxxSqlCursor::pValue(uint pos)const
}
else if (f->typeGroup() == Field::BLOBGroup)
{
-// pqxx::result::field r = (*m_res)[at()][pos];
+// PQXX_FIELD_CLASS r = (*m_res)[at()][pos];
// kdDebug() << r.name() << ", " << r.c_str() << ", " << r.type() << ", " << r.size() << endl;
return ::pgsqlByteaToByteArray((*m_res)[at()][pos]);
}
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.h b/kexi/kexidb/drivers/pqxx/pqxxcursor.h
index 0a0fb2d5..8304ea2d 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.h
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.h
@@ -20,6 +20,8 @@
#ifndef KEXIDB_CURSOR_PQXX_H
#define KEXIDB_CURSOR_PQXX_H
+#include "config.h"
+
#include <kexidb/cursor.h>
#include <kexidb/connection.h>
#include <kexidb/utils.h>
@@ -74,7 +76,7 @@ private:
friend class pqxxSqlConnection;
};
-inline TQVariant pgsqlCStrToVariant(const pqxx::result::field& r)
+inline TQVariant pgsqlCStrToVariant(const PQXX_FIELD_CLASS& r)
{
switch(r.type())
{
diff --git a/kexi/migration/pqxx/Makefile.am b/kexi/migration/pqxx/Makefile.am
index a3d78de5..87f6c247 100644
--- a/kexi/migration/pqxx/Makefile.am
+++ b/kexi/migration/pqxx/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/kexi/Makefile.global
+CXXFLAGS += $(PQXX_CXXFLAGS)
+
kde_module_LTLIBRARIES = keximigrate_pqxx.la
INCLUDES = -I$(srcdir)/../../.. -I$(top_srcdir)/kexi $(all_includes) -I$(PG_INCDIR) -I$(PQXX_INCDIR)
diff --git a/lib/kotext/Makefile.am b/lib/kotext/Makefile.am
index fc2a2734..ab221455 100644
--- a/lib/kotext/Makefile.am
+++ b/lib/kotext/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = kohyphen . tests
INCLUDES= $(KOFFICECORE_INCLUDES) $(KOFFICEUI_INCLUDES) $(KSTORE_INCLUDES) $(all_includes)
## Needed for kohyphen...
-KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+CXXFLAGS += $(USE_EXCEPTIONS)
lib_LTLIBRARIES = libkotext.la
libkotext_la_SOURCES = KoComplexText.cpp KoRichText.cpp \
diff --git a/lib/kross/api/Makefile.am b/lib/kross/api/Makefile.am
index 7cc93ba8..7f131342 100644
--- a/lib/kross/api/Makefile.am
+++ b/lib/kross/api/Makefile.am
@@ -1,6 +1,8 @@
include $(top_srcdir)/lib/kross/Makefile.global
apiincludedir=$(includedir)/kross/api
+CXXFLAGS += $(USE_EXCEPTIONS)
+
apiinclude_HEADERS = \
callable.h \
class.h \
diff --git a/lib/kross/main/Makefile.am b/lib/kross/main/Makefile.am
index 2acab100..7d779b82 100644
--- a/lib/kross/main/Makefile.am
+++ b/lib/kross/main/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/lib/kross/Makefile.global
+CXXFLAGS += $(USE_EXCEPTIONS)
+
lib_LTLIBRARIES = libkrossmain.la
libkrossmain_la_SOURCES = krossconfig.cpp mainmodule.cpp scriptcontainer.cpp manager.cpp \
diff --git a/lib/kross/python/Makefile.am b/lib/kross/python/Makefile.am
index 743b3e0c..0fc93556 100644
--- a/lib/kross/python/Makefile.am
+++ b/lib/kross/python/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/lib/kross/Makefile.global
+CXXFLAGS += $(USE_EXCEPTIONS)
+
kde_module_LTLIBRARIES = krosspython.la
krosspython_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) $(LIBPYTHON) $(PYTHONLIB) -module $(VER_INFO)
diff --git a/lib/kross/python/cxx/Makefile.am b/lib/kross/python/cxx/Makefile.am
index d1c72c87..4e1377c0 100644
--- a/lib/kross/python/cxx/Makefile.am
+++ b/lib/kross/python/cxx/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/lib/kross/Makefile.global
+CXXFLAGS += $(USE_EXCEPTIONS)
+
noinst_LTLIBRARIES = libkrosspythoncxx.la
libkrosspythoncxx_la_SOURCES = \
diff --git a/lib/kross/ruby/Makefile.am b/lib/kross/ruby/Makefile.am
index 256c662b..fadee61e 100644
--- a/lib/kross/ruby/Makefile.am
+++ b/lib/kross/ruby/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/lib/kross/Makefile.global
+CXXFLAGS += $(USE_EXCEPTIONS)
+
INCLUDES = -I$(top_srcdir)/lib/kross -I$(RUBY_INCLUDEDIR) $(RUBY_CFLAGS) $(all_includes)
METASOURCES = AUTO
kde_module_LTLIBRARIES = krossruby.la