Doesn't seem like a good idea to be doing AC_CHECK_SIZEOF(void *) so much

earlier than all the other sizeof checks, and it certainly fails to follow
the order suggested at the file head.  Rearrange.
This commit is contained in:
Tom Lane 2009-01-06 15:38:44 +00:00
parent 7ffe657225
commit 075ac80d72
3 changed files with 866 additions and 859 deletions

1680
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.580 2009/01/06 03:05:23 momjian Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.581 2009/01/06 15:38:44 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@ -490,18 +490,6 @@ fi
AC_PROG_CPP
AC_SUBST(GCC)
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
else
cc_string=$CC
fi
AC_CHECK_SIZEOF([void *])
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
["PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
#
# Set up TAS assembly code if needed; the template file has now had its
@ -857,12 +845,6 @@ program to use during the build.])
fi
fi
# Supply a numeric version string for use by 3rd party add-ons
# awk -F is a regex on some platforms, and not on others, so make "." a tab
[PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
tr '.' ' ' |
$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"]
AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
##
## Libraries
@ -1534,7 +1516,8 @@ fi
# Need a #define for the size of Datum (unsigned long)
AC_CHECK_SIZEOF([unsigned long])
# And one for the size of size_t (enables tweaks for > 32bit address space)
# And check size of void *, size_t (enables tweaks for > 32bit address space)
AC_CHECK_SIZEOF([void *])
AC_CHECK_SIZEOF([size_t])
# Decide whether float4 is passed by value: user-selectable, enabled by default
@ -1784,6 +1767,25 @@ AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS])
AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
else
cc_string=$CC
fi
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
["PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
# Supply a numeric version string for use by 3rd party add-ons
# awk -F is a regex on some platforms, and not on others, so make "." a tab
[PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
tr '.' ' ' |
$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"]
AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
# prepare build tree if outside source tree
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
# Note 2: /bin/pwd might be better than shell's built-in at getting

View File

@ -684,6 +684,9 @@
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS