diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-02-17 01:11:32 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-02-17 01:11:32 +0000 |
commit | a3478071030af6001660be7bb9df99f9fa3f31db (patch) | |
tree | 5c95ebb73f1ae1aff7f702088547f256388d91a0 /configure.ac | |
parent | 7c869e6f981310aba7932c06edd10acb8b6ffe14 (diff) |
Merged revisions 55052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r55052 | russell | 2007-02-16 18:40:34 -0600 (Fri, 16 Feb 2007) | 3 lines
If the pg_config application is found, but there is probably executing it,
then consider postgres unavailable. (issue #8637)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index e6478ec15..d0ddea526 100644 --- a/configure.ac +++ b/configure.ac @@ -693,14 +693,30 @@ fi if test "${PG_CONFIG}" != No; then PGSQL_libdir=`${PG_CONFIG} --libdir` PGSQL_includedir=`${PG_CONFIG} --includedir` - - AC_CHECK_LIB([pq], [PQexec], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1, - [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz) - - if test "${ac_cv_lib_pq_PQexec}" = "yes"; then - PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz" - PGSQL_INCLUDE="-I${PGSQL_includedir}" - PBX_PGSQL=1 + if test "x$?" != "x0" ; then + if test -n "${PGSQL_MANDATORY}" ; then + AC_MSG_NOTICE([***]) + AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.]) + AC_MSG_NOTICE([*** Either correct the installation, or run configure]) + AC_MSG_NOTICE([*** including --without-postgres]) + exit 1 + fi + else + AC_CHECK_LIB([pq], [PQexec], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1, + [Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz) + + if test "${ac_cv_lib_pq_PQexec}" = "yes"; then + PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz" + PGSQL_INCLUDE="-I${PGSQL_includedir}" + PBX_PGSQL=1 + elif test -n "${PGSQL_MANDATORY}"; + then + AC_MSG_NOTICE([***]) + AC_MSG_NOTICE([*** The PostgreSQL installation on this system appears to be broken.]) + AC_MSG_NOTICE([*** Either correct the installation, or run configure]) + AC_MSG_NOTICE([*** including --without-postgres]) + exit 1 + fi fi fi |