*** pgsql/configure.in 2005/11/05 04:01:41 1.431 --- pgsql/configure.in 2006/01/17 23:52:49 1.431.2.7 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. ! dnl $PostgreSQL: pgsql/configure.in,v 1.430 2005/10/30 05:05:53 pgsql Exp $ dnl dnl Developers, please strive to achieve this order: dnl --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. ! dnl $PostgreSQL: pgsql/configure.in,v 1.431.2.6 2006/01/12 19:23:41 tgl Exp $ dnl dnl Developers, please strive to achieve this order: dnl *************** dnl Read the Autoconf manual for details *** 17,23 **** dnl m4_pattern_forbid(^PGAC_)dnl to catch undefined macros ! AC_INIT([PostgreSQL], [8.1.0], [pgsql-bugs@postgresql.org]) AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 1996-2005, PostgreSQL Global Development Group]) --- 17,23 ---- dnl m4_pattern_forbid(^PGAC_)dnl to catch undefined macros ! AC_INIT([PostgreSQL], [8.1.2], [pgsql-bugs@postgresql.org]) AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 1996-2005, PostgreSQL Global Development Group]) *************** if test "$with_krb5" = yes; then *** 810,815 **** --- 810,818 ---- [#include ]) fi + # This is probably only present on Darwin, but may as well check always + AC_CHECK_DECLS(F_FULLFSYNC, [], [], [#include ]) + ## ## Functions, global variables ## *************** fi *** 850,858 **** # 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) # Check whether declares snprintf() and vsnprintf(); if not, --- 853,890 ---- # also decide to use snprintf.c if snprintf() is present but does not # have all the features we need --- see below. ! if test "$PORTNAME" = "win32"; then ! # Win32 gets snprintf.c built unconditionally. ! # ! # To properly translate all NLS languages strings, we must support the ! # *printf() %$ format, which allows *printf() arguments to be selected ! # by position in the translated string. ! # ! # libintl versions < 0.13 use the native *printf() functions, and Win32 ! # *printf() doesn't understand %$, so we must use our /port versions, ! # which do understand %$. libintl versions >= 0.13 include their own ! # *printf versions on Win32. The libintl 0.13 release note text is: ! # ! # C format strings with positions, as they arise when a translator ! # needs to reorder a sentence, are now supported on all platforms. ! # On those few platforms (NetBSD and Woe32) for which the native ! # printf()/fprintf()/... functions don't support such format ! # strings, replacements are provided through . ! # ! # We could use libintl >= 0.13's *printf() if we were sure that we had ! # a litint >= 0.13 at runtime, but seeing that there is no clean way ! # to guarantee that, it is best to just use our own, so we are sure to ! # get %$ support. In include/port.h we disable the *printf() macros ! # that might have been defined by libintl. ! # ! # We do this unconditionally whether NLS is used or not so we are sure ! # that all Win32 libraries and binaries behave the same. ! 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 declares snprintf() and vsnprintf(); if not, *************** AC_CHECK_FUNCS(vsnprintf, [], pgac_need_ *** 863,874 **** AC_CHECK_DECLS([snprintf, vsnprintf]) ! # do this one the hard way in case isinf() is a macro AC_CACHE_CHECK([for isinf], ac_cv_func_isinf, ! [AC_TRY_LINK( ! [#include ], ! [double x = 0.0; int res = isinf(x);], [ac_cv_func_isinf=yes], [ac_cv_func_isinf=no])]) --- 895,907 ---- AC_CHECK_DECLS([snprintf, vsnprintf]) ! dnl Cannot use AC_CHECK_FUNC because isinf may be a macro AC_CACHE_CHECK([for isinf], ac_cv_func_isinf, ! [AC_TRY_LINK([ ! #include ! double glob_double; ], ! [return isinf(glob_double) ? 0 : 1;], [ac_cv_func_isinf=yes], [ac_cv_func_isinf=no])]) *************** fi *** 931,938 **** dnl Cannot use AC_CHECK_FUNC because finite may be a macro AC_MSG_CHECKING(for finite) ! AC_TRY_LINK([#include ], ! [int dummy=finite(1.0);], [AC_DEFINE(HAVE_FINITE, 1, [Define to 1 if you have finite().]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) --- 964,974 ---- dnl Cannot use AC_CHECK_FUNC because finite may be a macro AC_MSG_CHECKING(for finite) ! AC_TRY_LINK([ ! #include ! double glob_double; ! ], ! [return finite(glob_double) ? 0 : 1;], [AC_DEFINE(HAVE_FINITE, 1, [Define to 1 if you have finite().]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) *************** AC_MSG_ERROR([[ *** 1043,1058 **** *** for the exact reason.]])], [AC_MSG_RESULT([cross-compiling])]) # 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 PGAC_FUNC_PRINTF_ARG_CONTROL if test $pgac_cv_printf_arg_control != yes ; then pgac_need_repl_snprintf=yes --- 1079,1091 ---- *** for the exact reason.]])], [AC_MSG_RESULT([cross-compiling])]) + # -------------------- + # Run tests below here + # -------------------- # Force use of our snprintf if system's doesn't do arg control ! # See comment above at snprintf test for details. ! 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 *************** AC_DEFINE_UNQUOTED(UINT64_FORMAT, $UINT6 *** 1127,1133 **** # 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_LIBOBJ(snprintf) fi --- 1160,1166 ---- # Now we have checked all the reasons to replace snprintf if test $pgac_need_repl_snprintf = yes; then ! AC_DEFINE(USE_REPL_SNPRINTF, 1, [Use replacement snprintf() functions.]) AC_LIBOBJ(snprintf) fi