diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-07-16 10:48:30 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-07-16 10:48:30 +0300 |
commit | 4d1f5fc9ea196282a8c0ed81bf7ec43bb41e1396 (patch) | |
tree | e7da3bf959dd2c12614357cf34a34c1cf6d99f60 /configure.ac | |
parent | 7111da4edcbff6f8a27af53bb340e31ea3c25867 (diff) | |
download | vmod-dbrw-4d1f5fc9ea196282a8c0ed81bf7ec43bb41e1396.tar.gz vmod-dbrw-4d1f5fc9ea196282a8c0ed81bf7ec43bb41e1396.tar.bz2 |
Fix PostgreSQL detection in configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
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) |