aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-24 03:36:01 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-24 03:36:01 +0000
commita9697cb0f74cb1f50e4497bb70bf49357f0c425d (patch)
treebf26d3bf33b276ee1626c2a888e0d32e0d0c3d46 /configure.ac
parentfcca2ea91a02e58717221a94f46085fa2405d7c2 (diff)
Merged revisions 288636 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines Solaris compatibility fixes ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@288637 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0d18a4ac5..67ffe1ded 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1532,6 +1532,19 @@ if test "${PG_CONFIG}" != No; then
AC_CHECK_LIB([pq], [PQescapeStringConn], AC_DEFINE_UNQUOTED([HAVE_PGSQL], 1,
[Define to indicate the PostgreSQL library]), [], -L${PGSQL_libdir} -lz)
+ AC_MSG_CHECKING(for pg_encoding_to_char within Postgres headers)
+ old_CFLAGS=${CFLAGS}
+ CFLAGS="${CFLAGS} -I${PGSQL_includedir} -Werror"
+ old_LDFLAGS=${LDFLAGS}
+ LDFLAGS="${LDFLAGS} -L${PGSQL_libdir} -lpq -lz"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <libpq-fe.h>],
+ [const char *foo = pg_encoding_to_char(1)])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED([HAVE_PGSQL_pg_encoding_to_char], 1, [Define to indicate presence of the pg_encoding_to_char API.])],
+ [AC_MSG_RESULT(no)])
+ CFLAGS=${old_CFLAGS}
+ LDFLAGS=${old_LDFLAGS}
+
if test "${ac_cv_lib_pq_PQescapeStringConn}" = "yes"; then
PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz"
PGSQL_INCLUDE="-I${PGSQL_includedir}"