aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-17 00:40:34 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-17 00:40:34 +0000
commit51fa205e0ad24641cfb0e7c3e12803c932266724 (patch)
treed0c366c868c0bec9062fa4a43261202d7cea59dd /configure.ac
parent2a06c64dfb46da96f3906b8a68cae0b8a331a4ee (diff)
If the pg_config application is found, but there is probably executing it,
then consider postgres unavailable. (issue #8637) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@55052 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 25 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 5dabca9d3..0c51fb046 100644
--- a/configure.ac
+++ b/configure.ac
@@ -736,21 +736,31 @@ 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
- 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
+
+ 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
elif test -n "${PGSQL_MANDATORY}";
then