diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-12-06 02:29:04 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-12-06 02:29:04 +0000 |
| commit | e0e7589169fb0246dd5c6accc64b66820f4549af (patch) | |
| tree | b0318b68f02c3cc374d327f703239ced102f06a8 /configure.in | |
| parent | 1daac8e16522f5394f0f55caf2ce47cedbe6a5c5 (diff) | |
| download | postgresql-e0e7589169fb0246dd5c6accc64b66820f4549af.tar.gz | |
Make Win32 build use our port/snprintf.c routines, instead of depending
on libintl which may or may not provide what we need. Make a few marginal
cleanups to ensure this works. Andrew Dunstan and Tom Lane.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/configure.in b/configure.in index 99ad9be36d..b78f4a1129 100644 --- a/configure.in +++ b/configure.in @@ -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 |
