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