aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2014-08-08 22:20:48 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2014-08-08 22:20:48 +0000
commitf831fabcad550115c2e83260cdf0894773692502 (patch)
tree561ce7a4309a36383a35ac0ac6bc504079a2ac99 /src
parentb67016043fe41bfe3832384a1fb7503ef2220364 (diff)
downloadgnunet-f831fabcad550115c2e83260cdf0894773692502.tar.gz
gnunet-f831fabcad550115c2e83260cdf0894773692502.zip
Include libpq-fe.h instead of postgres/libpq-fe.h.
Also add a macro for checking libpq from Autoconf macro archives.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/datacache/Makefile.am10
-rw-r--r--src/datacache/plugin_datacache_postgres.c1
-rw-r--r--src/datastore/Makefile.am6
-rw-r--r--src/datastore/plugin_datastore_postgres.c1
-rw-r--r--src/include/gnunet_postgres_lib.h2
-rw-r--r--src/namecache/Makefile.am2
-rw-r--r--src/namestore/Makefile.am2
-rw-r--r--src/postgres/Makefile.am2
9 files changed, 13 insertions, 15 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 902c3290b..18f8aeef2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,7 @@ if HAVE_MYSQL
42 MYSQL_DIR = mysql 42 MYSQL_DIR = mysql
43endif 43endif
44 44
45if HAVE_POSTGRES 45if HAVE_POSTGRESQL
46 POSTGRES_DIR = postgres 46 POSTGRES_DIR = postgres
47endif 47endif
48 48
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am
index 7a89da852..941072396 100644
--- a/src/datacache/Makefile.am
+++ b/src/datacache/Makefile.am
@@ -19,7 +19,7 @@ endif
19if HAVE_SQLITE 19if HAVE_SQLITE
20 SQLITE_PLUGIN = libgnunet_plugin_datacache_sqlite.la 20 SQLITE_PLUGIN = libgnunet_plugin_datacache_sqlite.la
21endif 21endif
22if HAVE_POSTGRES 22if HAVE_POSTGRESQL
23 POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la 23 POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la
24endif 24endif
25 25
@@ -68,11 +68,11 @@ libgnunet_plugin_datacache_postgres_la_LIBADD = \
68 $(top_builddir)/src/postgres/libgnunetpostgres.la \ 68 $(top_builddir)/src/postgres/libgnunetpostgres.la \
69 $(top_builddir)/src/statistics/libgnunetstatistics.la \ 69 $(top_builddir)/src/statistics/libgnunetstatistics.la \
70 $(top_builddir)/src/util/libgnunetutil.la \ 70 $(top_builddir)/src/util/libgnunetutil.la \
71 $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq 71 $(GN_PLUGIN_LDFLAGS) -lpq
72libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \ 72libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \
73 $(POSTGRES_CPPFLAGS) $(AM_CPPFLAGS) 73 $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
74libgnunet_plugin_datacache_postgres_la_LDFLAGS = \ 74libgnunet_plugin_datacache_postgres_la_LDFLAGS = \
75 $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq 75 $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
76 76
77libgnunet_plugin_datacache_template_la_SOURCES = \ 77libgnunet_plugin_datacache_template_la_SOURCES = \
78 plugin_datacache_template.c 78 plugin_datacache_template.c
@@ -104,7 +104,7 @@ HEAP_TESTS = \
104 test_datacache_quota_heap \ 104 test_datacache_quota_heap \
105 $(HEAP_BENCHMARKS) 105 $(HEAP_BENCHMARKS)
106 106
107if HAVE_POSTGRES 107if HAVE_POSTGRESQL
108if HAVE_BENCHMARKS 108if HAVE_BENCHMARKS
109 POSTGRES_BENCHMARKS = \ 109 POSTGRES_BENCHMARKS = \
110 perf_datacache_postgres 110 perf_datacache_postgres
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 150a9d5dc..9e6774142 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -27,7 +27,6 @@
27#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
28#include "gnunet_postgres_lib.h" 28#include "gnunet_postgres_lib.h"
29#include "gnunet_datacache_plugin.h" 29#include "gnunet_datacache_plugin.h"
30#include <postgresql/libpq-fe.h>
31 30
32#define LOG(kind,...) GNUNET_log_from (kind, "datacache-postgres", __VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "datacache-postgres", __VA_ARGS__)
33 32
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am
index 7044cb46a..dc06790ae 100644
--- a/src/datastore/Makefile.am
+++ b/src/datastore/Makefile.am
@@ -85,7 +85,7 @@ endif
85 $(SQLITE_BENCHMARKS) 85 $(SQLITE_BENCHMARKS)
86endif 86endif
87endif 87endif
88if HAVE_POSTGRES 88if HAVE_POSTGRESQL
89 POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la 89 POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
90if HAVE_TESTING 90if HAVE_TESTING
91if HAVE_BENCHMARKS 91if HAVE_BENCHMARKS
@@ -146,9 +146,9 @@ libgnunet_plugin_datastore_postgres_la_LIBADD = \
146 $(top_builddir)/src/postgres/libgnunetpostgres.la \ 146 $(top_builddir)/src/postgres/libgnunetpostgres.la \
147 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq 147 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq
148libgnunet_plugin_datastore_postgres_la_LDFLAGS = \ 148libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
149 $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq 149 $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
150libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \ 150libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
151 $(POSTGRES_CPPFLAGS) $(AM_CPPFLAGS) 151 $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
152 152
153 153
154libgnunet_plugin_datastore_template_la_SOURCES = \ 154libgnunet_plugin_datastore_template_la_SOURCES = \
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 54e5df375..e9495d35e 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -27,7 +27,6 @@
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_datastore_plugin.h" 28#include "gnunet_datastore_plugin.h"
29#include "gnunet_postgres_lib.h" 29#include "gnunet_postgres_lib.h"
30#include <postgresql/libpq-fe.h>
31 30
32 31
33/** 32/**
diff --git a/src/include/gnunet_postgres_lib.h b/src/include/gnunet_postgres_lib.h
index e2fc6b0e5..498d9857c 100644
--- a/src/include/gnunet_postgres_lib.h
+++ b/src/include/gnunet_postgres_lib.h
@@ -26,7 +26,7 @@
26#define GNUNET_POSTGRES_LIB_H 26#define GNUNET_POSTGRES_LIB_H
27 27
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29#include <postgresql/libpq-fe.h> 29#include <libpq-fe.h>
30 30
31#ifdef __cplusplus 31#ifdef __cplusplus
32extern "C" 32extern "C"
diff --git a/src/namecache/Makefile.am b/src/namecache/Makefile.am
index 921274593..eee9885d0 100644
--- a/src/namecache/Makefile.am
+++ b/src/namecache/Makefile.am
@@ -26,7 +26,7 @@ SQLITE_TESTS = test_plugin_namecache_sqlite
26endif 26endif
27endif 27endif
28 28
29if HAVE_POSTGRES 29if HAVE_POSTGRESQL
30POSTGRES_PLUGIN = libgnunet_plugin_namecache_postgres.la 30POSTGRES_PLUGIN = libgnunet_plugin_namecache_postgres.la
31if HAVE_TESTING 31if HAVE_TESTING
32POSTGRES_TESTS = test_plugin_namecache_postgres 32POSTGRES_TESTS = test_plugin_namecache_postgres
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index 17bd534c7..90e95f41c 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -26,7 +26,7 @@ SQLITE_TESTS = test_plugin_namestore_sqlite
26endif 26endif
27endif 27endif
28 28
29if HAVE_POSTGRES 29if HAVE_POSTGRESQL
30# postgres doesn't even build yet; thus: experimental! 30# postgres doesn't even build yet; thus: experimental!
31POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la 31POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
32if HAVE_TESTING 32if HAVE_TESTING
diff --git a/src/postgres/Makefile.am b/src/postgres/Makefile.am
index a9a7cdfae..d005866b2 100644
--- a/src/postgres/Makefile.am
+++ b/src/postgres/Makefile.am
@@ -8,7 +8,7 @@ if USE_COVERAGE
8 AM_CFLAGS = --coverage 8 AM_CFLAGS = --coverage
9endif 9endif
10 10
11if HAVE_POSTGRES 11if HAVE_POSTGRESQL
12lib_LTLIBRARIES = libgnunetpostgres.la 12lib_LTLIBRARIES = libgnunetpostgres.la
13endif 13endif
14 14