diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 56bdfd9ac5..dd832477d9 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.555 2008/03/30 04:08:14 neilc Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.556 2008/04/21 00:26:44 tgl Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -1368,6 +1368,39 @@ AC_CHECK_SIZEOF([unsigned long]) # And one for the size of size_t (enables tweaks for > 32bit address space) AC_CHECK_SIZEOF([size_t]) +# Decide whether float4 is passed by value: user-selectable, enabled by default +AC_MSG_CHECKING([whether to build with float4 passed by value]) +PGAC_ARG_BOOL(enable, float4-byval, yes, [ --disable-float4-byval disable float4 passed by value], + [AC_DEFINE([USE_FLOAT4_BYVAL], 1, + [Define to 1 if you want float4 values to be passed by value. (--enable-float4-byval)]) + float4passbyval=true], + [float4passbyval=false]) +AC_MSG_RESULT([$enable_float4_byval]) +AC_DEFINE_UNQUOTED([FLOAT4PASSBYVAL], [$float4passbyval], [float4 values are passed by value if 'true', by reference if 'false']) + +# Decide whether float8 is passed by value. +# Note: this setting also controls int8 and related types such as timestamp. +# If sizeof(Datum) >= 8, this is user-selectable, enabled by default. +# If not, trying to select it is an error. +AC_MSG_CHECKING([whether to build with float8 passed by value]) +if test $ac_cv_sizeof_unsigned_long -ge 8 ; then + PGAC_ARG_BOOL(enable, float8-byval, yes, [ --disable-float8-byval disable float8 passed by value]) +else + PGAC_ARG_BOOL(enable, float8-byval, no, [ --disable-float8-byval disable float8 passed by value]) + if test "$enable_float8_byval" = yes ; then + AC_MSG_ERROR([--enable-float8-byval is not supported on 32-bit platforms.]) + fi +fi +if test "$enable_float8_byval" = yes ; then + AC_DEFINE([USE_FLOAT8_BYVAL], 1, + [Define to 1 if you want float8, int8, etc values to be passed by value. (--enable-float8-byval)]) + float8passbyval=true +else + float8passbyval=false +fi +AC_MSG_RESULT([$enable_float8_byval]) +AC_DEFINE_UNQUOTED([FLOAT8PASSBYVAL], [$float8passbyval], [float8, int8, and related values are passed by value if 'true', by reference if 'false']) + # Determine memory alignment requirements for the basic C data types. AC_CHECK_ALIGNOF(short) |