aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-24 03:39:29 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-24 03:39:29 +0000
commit870b7e572dab611717acf7d2b0150cbb549c1b78 (patch)
treed92db233d0dd6f17d20abe74ac8e80eddfcb6339 /configure.ac
parentcfb6e8df353ffd5f438c28c63152924aead62e89 (diff)
Merged revisions 288637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines 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.8@288638 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 75a5ed0ab..2c70af742 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1694,6 +1694,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}"