|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
dnl Process this file with autoconf to produce a configure script. |
|
|
|
|
dnl $PostgreSQL: pgsql/configure.in,v 1.433 2005/12/04 03:52:24 momjian Exp $ |
|
|
|
|
dnl $PostgreSQL: pgsql/configure.in,v 1.434 2005/12/06 02:29:03 tgl Exp $ |
|
|
|
|
dnl |
|
|
|
|
dnl Developers, please strive to achieve this order: |
|
|
|
|
dnl |
|
|
|
@ -857,9 +857,14 @@ fi |
|
|
|
|
# also decide to use snprintf.c if snprintf() is present but does not |
|
|
|
|
# have all the features we need --- see below. |
|
|
|
|
|
|
|
|
|
pgac_need_repl_snprintf=no |
|
|
|
|
AC_CHECK_FUNCS(snprintf, [], pgac_need_repl_snprintf=yes) |
|
|
|
|
AC_CHECK_FUNCS(vsnprintf, [], pgac_need_repl_snprintf=yes) |
|
|
|
|
if test "$PORTNAME" = "win32"; then |
|
|
|
|
# Win32 gets this built unconditionally |
|
|
|
|
pgac_need_repl_snprintf=yes |
|
|
|
|
else |
|
|
|
|
pgac_need_repl_snprintf=no |
|
|
|
|
AC_CHECK_FUNCS(snprintf, [], pgac_need_repl_snprintf=yes) |
|
|
|
|
AC_CHECK_FUNCS(vsnprintf, [], pgac_need_repl_snprintf=yes) |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not, |
|
|
|
@ -1052,14 +1057,8 @@ AC_MSG_ERROR([[ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Force use of our snprintf if system's doesn't do arg control |
|
|
|
|
# This feature is used by NLS |
|
|
|
|
if test "$enable_nls" = yes && |
|
|
|
|
test $pgac_need_repl_snprintf = no && |
|
|
|
|
# On Win32, libintl replaces snprintf() with its own version that |
|
|
|
|
# understands arg control, so we don't need our own. In fact, it |
|
|
|
|
# also uses macros that conflict with ours, so we _can't_ use |
|
|
|
|
# our own. |
|
|
|
|
test "$PORTNAME" != "win32"; then |
|
|
|
|
# This feature is needed by NLS |
|
|
|
|
if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then |
|
|
|
|
PGAC_FUNC_PRINTF_ARG_CONTROL |
|
|
|
|
if test $pgac_cv_printf_arg_control != yes ; then |
|
|
|
|
pgac_need_repl_snprintf=yes |
|
|
|
@ -1134,7 +1133,7 @@ AC_DEFINE_UNQUOTED(UINT64_FORMAT, $UINT64_FORMAT, |
|
|
|
|
|
|
|
|
|
# Now we have checked all the reasons to replace snprintf |
|
|
|
|
if test $pgac_need_repl_snprintf = yes; then |
|
|
|
|
AC_DEFINE(USE_SNPRINTF, 1, [Use replacement snprintf() functions.]) |
|
|
|
|
AC_DEFINE(USE_REPL_SNPRINTF, 1, [Use replacement snprintf() functions.]) |
|
|
|
|
AC_LIBOBJ(snprintf) |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|