summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-09-24 03:41:02 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-09-24 03:41:02 +0000
commitf8180257e040e68b36ea87959598b55e46c15919 (patch)
tree307f62f875675a52717fd0ad060a0a0bca34f4ea /configure.ac
parentcfe811bb358ecc9e07ba42a0508453862592e5cc (diff)
Merged revisions 288638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r288638 | tilghman | 2010-09-23 22:39:29 -0500 (Thu, 23 Sep 2010) | 16 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@288639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 b1183031e..98fd5155a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1697,6 +1697,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}"