diff modules/postgresql/configure.ac @ 5895:b2709239b1f6

Update Postgresql module for 2015 and MacPorts reality.
author Stephen J. Turnbull <stephen@xemacs.org>
date Mon, 04 May 2015 14:32:22 +0900
parents 56b64a055043
children
line wrap: on
line diff
--- a/modules/postgresql/configure.ac	Mon Apr 20 15:09:11 2015 -0600
+++ b/modules/postgresql/configure.ac	Mon May 04 14:32:22 2015 +0900
@@ -32,10 +32,14 @@
 dnl (such as the default /usr/local/pgsql when building from source),
 dnl then specify CPPFLAGS and LDFLAGS when configuring.
 dnl
-dnl Look for these standard header file locations, known to be used on Linux
-for header_dir in "" "pgsql/" "postgresql/"; do
-  AC_CHECK_HEADER([${header_dir}libpq-fe.h],
-                  [libpq_fe_h_file=${header_dir}libpq-fe.h; break])
+dnl Look in standard header file locations.
+dnl These are known to be used on Linux or MacPorts.
+dnl Assume that the most recent version available is the most likely to be
+dnl found in an unversioned directory.
+libpq_fe_h_file=""
+  for header_dir in $pg_header_dir "" "pgsql" "postgresql" "postgresql94" "postgresql-9.4" "postgresql/9.4" "postgresql84" "postgresql-8.4" "postgresql/8.4"; do
+  AC_CHECK_HEADER(${header_dir}/libpq-fe.h,
+                  libpq_fe_h_file=${header_dir}/libpq-fe.h; break)
 done
 
 test -z "$libpq_fe_h_file" &&