aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-26 13:43:09 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-26 13:43:19 +0200
commit62bf68287df9470ca6fb9134831cd137c06e0c22 (patch)
tree044e080b2f864a551efe7814339c7e815efb07b5
parent0759e1e79accb055a4d175729b631d42486b08dc (diff)
downloadgnunet-62bf68287df9470ca6fb9134831cd137c06e0c22.tar.gz
gnunet-62bf68287df9470ca6fb9134831cd137c06e0c22.zip
fix postgres version check on Debian
-rw-r--r--configure.ac31
-rw-r--r--m4/ax_lib_postgresql.m44
-rw-r--r--src/util/dnsstub.c2
3 files changed, 33 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 3d68ee9b0..fd1642839 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,13 +208,42 @@ AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false)
208 208
209if test x"$VAR_IPTABLES_BINARY" != x"false" 209if test x"$VAR_IPTABLES_BINARY" != x"false"
210then 210then
211 if test -x "/sbin/iptables"
212 then
213 VAR_IPTABLES_BINARY="/sbin/iptables"
214 elif test -x "/usr/sbin/iptables"
215 then
216 VAR_IPTABLES_BINARY="/usr/sbin/iptables"
217 fi
218fi
219
220if test x"$VAR_IPTABLES_BINARY" != x"false"
221then
211AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables]) 222AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables])
212else 223else
213AC_MSG_WARN([warning: 'iptables' not found.]) 224AC_MSG_WARN([warning: 'iptables' not found.])
214fi 225fi
215 226
227AC_PATH_TARGET_TOOL(VAR_IFCONFIG_BINARY, ifconfig, false)
228
216AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) 229AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false)
230if test x"$VAR_IFCONFIG_BINARY" != x"false"
231then
232 if test -x "/sbin/ifconfig"
233 then
234 VAR_IFCONFIG_BINARY="/sbin/ifconfig"
235 elif test -x "/usr/sbin/ifconfig"
236 then
237 VAR_IFCONFIG_BINARY="/usr/sbin/ifconfig"
238 fi
239fi
240if test x"$VAR_IFCONFIG_BINARY" != x"false"
241then
242AC_DEFINE_UNQUOTED([IFCONFIG], "$VAR_IFCONFIG_BINARY", [Path to ifconfig])
243else
217AC_MSG_WARN([warning: 'ifconfig' not found.]) 244AC_MSG_WARN([warning: 'ifconfig' not found.])
245fi
246
218 247
219# miniupnpc / upnpc binary is a soft runtime requirement 248# miniupnpc / upnpc binary is a soft runtime requirement
220AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) 249AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false)
@@ -930,7 +959,7 @@ postgres=false
930# even running the check for postgres breaks emscripten ... 959# even running the check for postgres breaks emscripten ...
931if test "$taler_only" != yes; then 960if test "$taler_only" != yes; then
932 AX_LIB_POSTGRESQL([9.5]) 961 AX_LIB_POSTGRESQL([9.5])
933 if test "$found_postgresql" = "yes"; then 962 if test "x$found_postgresql" = "xyes"; then
934 CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" 963 CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
935 AC_CHECK_HEADERS([libpq-fe.h], 964 AC_CHECK_HEADERS([libpq-fe.h],
936 postgres=true) 965 postgres=true)
diff --git a/m4/ax_lib_postgresql.m4 b/m4/ax_lib_postgresql.m4
index d547383e4..11b6991f0 100644
--- a/m4/ax_lib_postgresql.m4
+++ b/m4/ax_lib_postgresql.m4
@@ -91,7 +91,7 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
91 POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`" 91 POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`"
92 POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir`" 92 POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir`"
93 93
94 POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'` 94 POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##' | awk '{print $1}'`
95 95
96 AC_DEFINE([HAVE_POSTGRESQL], [1], 96 AC_DEFINE([HAVE_POSTGRESQL], [1],
97 [Define to 1 if PostgreSQL libraries are available]) 97 [Define to 1 if PostgreSQL libraries are available])
@@ -113,7 +113,7 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
113 113
114 if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then 114 if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then
115 115
116 AC_MSG_CHECKING([if PostgreSQL version is >= $postgresql_version_req]) 116 AC_MSG_CHECKING([if PostgreSQL version $POSTGRESQL_VERSION is >= $postgresql_version_req])
117 117
118 dnl Decompose required version string of PostgreSQL 118 dnl Decompose required version string of PostgreSQL
119 dnl and calculate its number representation 119 dnl and calculate its number representation
diff --git a/src/util/dnsstub.c b/src/util/dnsstub.c
index 8b5b20f3c..5b84e6e63 100644
--- a/src/util/dnsstub.c
+++ b/src/util/dnsstub.c
@@ -354,7 +354,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
354 "Received DNS response from server we never asked (ignored)"); 354 "Received DNS response from server we never asked (ignored)");
355 return GNUNET_NO; 355 return GNUNET_NO;
356 } 356 }
357 if (sizeof (struct GNUNET_TUN_DnsHeader) > r) 357 if (sizeof (struct GNUNET_TUN_DnsHeader) > (size_t) r)
358 { 358 {
359 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 359 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
360 _("Received DNS response that is too small (%u bytes)"), 360 _("Received DNS response that is too small (%u bytes)"),