changeset 11553:35e9e4b6ab34 octave-forge

Fix configuration of postgresql include directories.
author i7tiol
date Sun, 17 Mar 2013 19:08:04 +0000
parents 144c8ac7476a
children 6ccfb662f8ae
files main/database/src/Makefile.in main/database/src/configure.ac main/database/src/converters.cc main/database/src/converters.h main/database/src/pq_connection.h main/database/src/pq_lo.cc
diffstat 6 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/main/database/src/Makefile.in	Sun Mar 17 18:52:56 2013 +0000
+++ b/main/database/src/Makefile.in	Sun Mar 17 19:08:04 2013 +0000
@@ -7,7 +7,7 @@
 
 # be on the safe side with respect to include files
 %.o: %.cc converters.h pq_connection.h command.h
-	@MKOCTFILE@ -c $<
+	@MKOCTFILE@ -I`@PG_CONFIG@ --includedir` -c $<
 
 .PHONY: clean
 clean: ; rm -f *.o *.oct
--- a/main/database/src/configure.ac	Sun Mar 17 18:52:56 2013 +0000
+++ b/main/database/src/configure.ac	Sun Mar 17 19:08:04 2013 +0000
@@ -9,15 +9,11 @@
 AC_PROG_CXX
 AC_CHECK_PROG(OCTAVE, octave, octave)
 AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile)
+AC_CHECK_PROG(PG_CONFIG, pg_config, pg_config)
 
 # Checks for libraries.
 AC_CHECK_LIB([pq], [PQconnectdb])
 
-# Checks for header files.
-AC_CHECK_HEADER([postgresql/libpq-fe.h], ,[exit 1])
-AC_CHECK_HEADER([postgresql/pg_config_manual.h], ,[exit 1])
-AC_CHECK_HEADER([postgresql/libpq/libpq-fs.h], ,[exit 1])
-
 # Checks for typedefs, structures, and compiler characteristics.
 
 # Checks for library functions.
--- a/main/database/src/converters.cc	Sun Mar 17 18:52:56 2013 +0000
+++ b/main/database/src/converters.cc	Sun Mar 17 19:08:04 2013 +0000
@@ -21,10 +21,10 @@
 #include <octave/ov-float.h>
 #include <octave/ov-uint8.h>
 
-#include <postgresql/libpq-fe.h>
+#include <libpq-fe.h>
 // FIXME: needed for NAMEDATALEN, but defining a lot of stuff which
 // might conflict with names here
-#include <postgresql/pg_config_manual.h>
+#include <pg_config_manual.h>
 
 #include "converters.h"
 
--- a/main/database/src/converters.h	Sun Mar 17 18:52:56 2013 +0000
+++ b/main/database/src/converters.h	Sun Mar 17 19:08:04 2013 +0000
@@ -29,7 +29,7 @@
 #include <vector>
 #include <string>
 
-#include <postgresql/libpq-fe.h>
+#include <libpq-fe.h>
 
 #define OCT_PQ_NUM_CONVERTERS 13
 
--- a/main/database/src/pq_connection.h	Sun Mar 17 18:52:56 2013 +0000
+++ b/main/database/src/pq_connection.h	Sun Mar 17 19:08:04 2013 +0000
@@ -23,7 +23,7 @@
 
 #include <octave/oct.h>
 
-#include <postgresql/libpq-fe.h>
+#include <libpq-fe.h>
 
 #include "converters.h"
 
--- a/main/database/src/pq_lo.cc	Sun Mar 17 18:52:56 2013 +0000
+++ b/main/database/src/pq_lo.cc	Sun Mar 17 19:08:04 2013 +0000
@@ -24,7 +24,7 @@
 #include <stdio.h>
 
 #include "command.h"
-#include <postgresql/libpq/libpq-fs.h>
+#include <libpq/libpq-fs.h>
 
 // PKG_ADD: autoload ("pq_lo_import", "pq_interface.oct");
 // PKG_ADD: autoload ("pq_lo_export", "pq_interface.oct");