diff options
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) |