diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-11-17 03:18:49 -0600 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-11-17 21:15:33 +0100 |
commit | ab91d708e1d30c2ed253495a531cd82c77a42e58 (patch) | |
tree | 254e473ab4c72d037aaae43f5edfdd3c13bfb884 /configure.in | |
parent | d526c3f5ea404ef0923b16ce0aad662b03ba15ac (diff) |
make postgresql-sdbc connectivity optional
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/configure.in b/configure.in index d586b46d666e..e75548bf1f05 100644 --- a/configure.in +++ b/configure.in @@ -359,6 +359,11 @@ AC_ARG_ENABLE(ext-pdfimport, [Disable the PDF Import extension.]) ) +AC_ARG_ENABLE(ext-postgresql-sdbc, + AS_HELP_STRING([--enable-ext-postgresql-sdbc], + [Enable the build of the PostgreSQL sdbc extension.]) +) + AC_ARG_ENABLE(ext-presenter-console, AS_HELP_STRING([--disable-ext-presenter-console], [Disable the Presenter Console extension.]) @@ -5358,19 +5363,24 @@ fi dnl =================================================================== dnl Check for PostgreSQL stuff dnl =================================================================== -AC_PATH_PROG(PGCONFIG, pg_config) -if test -z "$PGCONFIG"; then - AC_MSG_ERROR([pg_config needed]) -fi -save_CFLAGS=$CFLAGS -save_LIBS=$LIBS -CFLAGS="-I`pg_config --includedir`" -AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], []) -AC_CHECK_LIB(pq, PQconnectdbParams, [], - [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], []) -CFLAGS=$save_CFLAGS -LIBS=$save_LIBS -SYSTEM_POSTGRESQL=YES # only option atm :-) + +if test "x$enable_ext_postgresql_sdbc" = "xyes"; then + AC_PATH_PROG(PGCONFIG, pg_config) + if test -z "$PGCONFIG"; then + AC_MSG_ERROR([pg_config needed]) + fi + save_CFLAGS=$CFLAGS + save_LIBS=$LIBS + CFLAGS="-I`pg_config --includedir`" + AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], []) + AC_CHECK_LIB(pq, PQconnectdbParams, [], + [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], []) + CFLAGS=$save_CFLAGS + LIBS=$save_LIBS + BUILD_POSTGRESQL_SDBC=YES + SYSTEM_POSTGRESQL=YES # only option atm :-) +fi +AC_SUBST(BUILD_POSTGRESQL_SDBC) AC_SUBST(SYSTEM_POSTGRESQL) dnl =================================================================== |