summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2013-07-16 07:48:30 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-07-16 07:48:30 (GMT)
commit4d1f5fc9ea196282a8c0ed81bf7ec43bb41e1396 (patch) (side-by-side diff)
treee7da3bf959dd2c12614357cf34a34c1cf6d99f60
parent7111da4edcbff6f8a27af53bb340e31ea3c25867 (diff)
downloadvmod-dbrw-4d1f5fc9ea196282a8c0ed81bf7ec43bb41e1396.tar.gz
vmod-dbrw-4d1f5fc9ea196282a8c0ed81bf7ec43bb41e1396.tar.bz2
Fix PostgreSQL detection in configure.ac
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 09d56fa..8a3bc59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,12 +133,17 @@ GR_ENABLE(pgsql, [
AC_CHECK_HEADER([libpq-fe.h], [break])
CPPFLAGS="$save_CPPFLAGS"
done
- AC_DEFINE(USE_SQL_PGSQL,1,
+ if test $ac_cv_header_libpq_fe_h != yes; then
+ test "$build_pgsql" = yes &&
+ AC_MSG_ERROR([PostgreSQL support cannot be built because PostgreSQL headers are not present])
+ else
+ AC_DEFINE(USE_SQL_PGSQL,1,
[Define this if you are going to use PostgreSQL])
- AC_DEFINE(HAVE_LIBPQ,1,
+ AC_DEFINE(HAVE_LIBPQ,1,
[Define this if you have libpq])
- PGSQLLIBS="$pm_cv_lib_pq"
- build_pgsql=yes ],
+ PGSQLLIBS="$pm_cv_lib_pq"
+ build_pgsql=yes
+ fi],
[ test "$build_pgsql" = yes && AC_MSG_ERROR([PostgreSQL support cannot be built because PostgreSQL libraries are not present])
build_pgsql=no ],
[/usr/pgsql/lib /usr/local/pgsql/lib])], $build_pgsql)

Return to:

Send suggestions and report system problems to the System administrator.