Upgrade to Autoconf 2.61:

- Change configure.in to use Autoconf 2.61 and update generated files.
- Update build system and documentation to support now directory variables
  offered by Autoconf 2.61.
- Replace usages of PGAC_CHECK_ALIGNOF by AC_CHECK_ALIGNOF, now available
  in Autoconf 2.61.
- Drop our patched version of AC_C_INLINE, as Autoconf now has the change.
This commit is contained in:
Peter Eisentraut 2008-02-17 16:36:43 +00:00
parent 8b63aa1ffc
commit b120382353
8 changed files with 9098 additions and 9884 deletions

View File

@ -1,5 +1,5 @@
# Macros to detect C compiler features
# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.14 2004/12/16 17:48:25 momjian Exp $
# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.15 2008/02/17 16:36:42 petere Exp $
# PGAC_C_SIGNED
@ -70,32 +70,6 @@ undefine([Ac_cachevar])dnl
# PGAC_CHECK_ALIGNOF(TYPE, [INCLUDES = DEFAULT-INCLUDES])
# -----------------------------------------------------
# Find the alignment requirement of the given type. Define the result
# as ALIGNOF_TYPE. This macro works even when cross compiling.
# (Modelled after AC_CHECK_SIZEOF.)
AC_DEFUN([PGAC_CHECK_ALIGNOF],
[AS_LITERAL_IF([$1], [],
[AC_FATAL([$0: requires literal arguments])])dnl
AC_CHECK_TYPE([$1], [], [], [$2])
AC_CACHE_CHECK([alignment of $1], [AS_TR_SH([pgac_cv_alignof_$1])],
[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
_AC_COMPUTE_INT([((char*) & pgac_struct.field) - ((char*) & pgac_struct)],
[AS_TR_SH([pgac_cv_alignof_$1])],
[AC_INCLUDES_DEFAULT([$2])
struct { char filler; $1 field; } pgac_struct;],
[AC_MSG_ERROR([cannot compute alignment of $1, 77])])
else
AS_TR_SH([pgac_cv_alignof_$1])=0
fi])dnl
AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1),
[$AS_TR_SH([pgac_cv_alignof_$1])],
[The alignment requirement of a `$1'.])
])# PGAC_CHECK_ALIGNOF
# PGAC_C_FUNCNAME_SUPPORT
# -----------------------
# Check if the C compiler understands __func__ (C99) or __FUNCTION__ (gcc).
@ -121,6 +95,8 @@ AC_DEFINE(HAVE_FUNCNAME__FUNCTION, 1,
fi
fi])# PGAC_C_FUNCNAME_SUPPORT
# PGAC_PROG_CC_CFLAGS_OPT
# -----------------------
# Given a string, check if the compiler supports the string as a
@ -134,42 +110,3 @@ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[CFLAGS="$pgac_save_CFLAGS"
AC_MSG_RESULT(no)])
])# PGAC_PROG_CC_CFLAGS_OPT
# The below backpatches the following Autoconf change:
#
# 2002-03-28 Kevin Ryde <user42@zip.com.au>
#
# * lib/autoconf/c.m4 (AC_C_INLINE): Test with a typedef return value,
# to avoid versions of HP C which don't allow that.
#
# When we upgrade to Autoconf >= 2.53a then we can drop this and rely
# on the standard macro.
# AC_C_INLINE
# -----------
# Do nothing if the compiler accepts the inline keyword.
# Otherwise define inline to __inline__ or __inline if one of those work,
# otherwise define inline to be empty.
AC_DEFUN([AC_C_INLINE],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[#ifndef __cplusplus
typedef int foo_t;
static $ac_kw foo_t static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif
])],
[ac_cv_c_inline=$ac_kw; break])
done
])
case $ac_cv_c_inline in
inline | yes) ;;
no) AC_DEFINE(inline,,
[Define as `__inline' if that's what the C compiler calls it,
or to nothing if it is not supported.]) ;;
*) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) ;;
esac
])# AC_C_INLINE

View File

@ -1,4 +1,4 @@
# $PostgreSQL: pgsql/config/programs.m4,v 1.21 2007/07/19 17:15:30 tgl Exp $
# $PostgreSQL: pgsql/config/programs.m4,v 1.22 2008/02/17 16:36:42 petere Exp $
# PGAC_PATH_YACC
@ -201,10 +201,6 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
AC_CHECK_PROGS(MSGMERGE, msgmerge)
dnl FIXME: We should probably check for version >=0.10.36.
AC_CHECK_PROGS(XGETTEXT, xgettext)
# Note: share/locale is always the default, independent of $datadir
localedir='${prefix}/share/locale'
AC_SUBST(localedir)
])# PGAC_CHECK_GETTEXT

18748
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.547 2008/02/13 03:40:38 tgl Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.548 2008/02/17 16:36:42 petere Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@ -19,7 +19,7 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
AC_INIT([PostgreSQL], [8.4devel], [pgsql-bugs@postgresql.org])
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.59], [], [m4_fatal([Autoconf version 2.59 is required.
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.61], [], [m4_fatal([Autoconf version 2.61 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
recommended. You can remove the check from 'configure.in' but it is then
your responsibility whether the result works or not.])])
@ -111,18 +111,6 @@ tas_file=dummy.s
## Command line options
##
#
# Installation directory for documentation
#
PGAC_ARG(with, docdir, [ --with-docdir=DIR install the documentation in DIR [[PREFIX/doc]]
--without-docdir do not install the documentation],
[AC_MSG_ERROR([option --with-docdir requires an argument])],
[docdir=],
[docdir=$withval],
[docdir='${prefix}/doc'])
AC_SUBST(docdir)
#
# Add non-standard directories to the include path
#
@ -1367,24 +1355,24 @@ AC_CHECK_SIZEOF([size_t])
# Determine memory alignment requirements for the basic C data types.
PGAC_CHECK_ALIGNOF(short)
PGAC_CHECK_ALIGNOF(int)
PGAC_CHECK_ALIGNOF(long)
AC_CHECK_ALIGNOF(short)
AC_CHECK_ALIGNOF(int)
AC_CHECK_ALIGNOF(long)
if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
PGAC_CHECK_ALIGNOF(long long int)
AC_CHECK_ALIGNOF(long long int)
fi
PGAC_CHECK_ALIGNOF(double)
AC_CHECK_ALIGNOF(double)
# Compute maximum alignment of any basic type.
# We assume long's alignment is at least as strong as char, short, or int;
# but we must check long long (if it exists) and double.
MAX_ALIGNOF=$pgac_cv_alignof_long
if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
MAX_ALIGNOF=$pgac_cv_alignof_double
MAX_ALIGNOF=$ac_cv_alignof_long
if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
MAX_ALIGNOF=$ac_cv_alignof_double
fi
if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
fi
AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any C data type.])

View File

@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/doc/Makefile,v 1.29 2007/02/09 15:55:57 petere Exp $
# $PostgreSQL: pgsql/doc/Makefile,v 1.30 2008/02/17 16:36:42 petere Exp $
#
#----------------------------------------------------------------------------
@ -26,10 +26,8 @@ include $(top_builddir)/src/Makefile.global
.NOTPARALLEL:
ifneq ($(wildcard $(srcdir)/postgres.tar.gz),)
ifneq (,$(docdir))
found_html = yes
endif
endif
ifneq ($(wildcard $(srcdir)/man.tar.gz),)
# SCO OpenServer's man system is sufficiently different to not bother.
@ -72,7 +70,7 @@ endif # found_man
install: all installdirs
ifdef found_html
gzip -d -c $(srcdir)/postgres.tar.gz | ( cd $(DESTDIR)$(docdir)/html && $(TAR) xf - )
gzip -d -c $(srcdir)/postgres.tar.gz | ( cd $(DESTDIR)$(htmldir)/html && $(TAR) xf - )
endif
ifdef found_man
for file in man1/*.1 man$(sqlmansectnum)/*.$(sqlmansect) ; do \
@ -83,7 +81,7 @@ endif
installdirs:
ifdef found_html
$(mkinstalldirs) '$(DESTDIR)$(docdir)'/html
$(mkinstalldirs) '$(DESTDIR)$(htmldir)'/html
endif
ifdef found_man
$(mkinstalldirs) $(addprefix '$(DESTDIR)$(mandir)'/man, 1 $(sqlmansectnum))
@ -92,7 +90,7 @@ endif
uninstall:
ifdef found_html
-rm -f $(addprefix $(DESTDIR)$(docdir)/html/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
-rm -f $(addprefix $(DESTDIR)$(htmldir)/html/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
endif
ifdef found_man
-rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c $(srcdir)/man.tar.gz | tar tf - | sed -e 's,man$(sqlmansect_dummy)/,man$(sqlmansectnum)/,' -e 's/.$(sqlmansect_dummy)$$/.$(sqlmansect)/'))

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.301 2008/02/16 21:51:04 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.302 2008/02/17 16:36:43 petere Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@ -589,23 +589,11 @@ su - postgres
</listitem>
</varlistentry>
<varlistentry>
<term><option>--datadir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Sets the directory for read-only data files used by the
installed programs. The default is
<filename><replaceable>PREFIX</>/share</>. Note that this has
nothing to do with where your database files will be placed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--sysconfdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The directory for various configuration files,
Sets the directory for various configuration files,
<filename><replaceable>PREFIX</>/etc</> by default.
</para>
</listitem>
@ -615,7 +603,7 @@ su - postgres
<term><option>--libdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The location to install libraries and dynamically loadable
Sets the location to install libraries and dynamically loadable
modules. The default is
<filename><replaceable>EXEC-PREFIX</>/lib</>.
</para>
@ -626,12 +614,47 @@ su - postgres
<term><option>--includedir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The directory for installing C and C++ header files. The
Sets the directory for installing C and C++ header files. The
default is <filename><replaceable>PREFIX</>/include</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--datarootdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Sets the root directory for various types of read-only data
files. This only sets the default for some of the following
options. The default is
<filename><replaceable>PREFIX</>/share</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--datadir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Sets the directory for read-only data files used by the
installed programs. The default is
<filename><replaceable>DATAROOTDIR</></>. Note that this has
nothing to do with where your database files will be placed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--localedir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Sets the directory for installing locale data, in particular
message translation catalog files. The default is
<filename><replaceable>DATAROOTDIR</>/locale</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--mandir=<replaceable>DIRECTORY</></option></term>
<listitem>
@ -639,23 +662,31 @@ su - postgres
The man pages that come with <productname>PostgreSQL</> will be installed under
this directory, in their respective
<filename>man<replaceable>x</></> subdirectories.
The default is <filename><replaceable>PREFIX</>/man</>.
The default is <filename><replaceable>DATAROOTDIR</>/man</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--with-docdir=<replaceable>DIRECTORY</></option></term>
<term><option>--without-docdir</option></term>
<term><option>--docdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Documentation files, except <quote>man</> pages, will be
installed into this directory. The default is
<filename><replaceable>PREFIX</>/doc</>. If the option
<option>--without-docdir</option> is specified, the
documentation will not be installed by <command>make
install</command>. This is intended for packaging scripts
that have special methods for installing documentation.
Sets the root directory for installing documentation files,
except <quote>man</> pages. This only sets the default for
the following options. The default value for this option is
<filename><replaceable>DATAROOTDIR</>/doc/postgresql</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--htmldir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The HTML-formatted documentation for
<productname>PostgreSQL</productname> will be installed under
this directory. The default is
<filename><replaceable>DATAROOTDIR</></>.
</para>
</listitem>
</varlistentry>

View File

@ -1,5 +1,5 @@
# -*-makefile-*-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.240 2007/11/13 00:13:19 tgl Exp $
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.241 2008/02/17 16:36:43 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@ -62,11 +62,12 @@ configure_args = @configure_args@
ifndef PGXS
# Note that prefix and exec_prefix aren't defined in a PGXS build;
# Note that prefix, exec_prefix, and datarootdir aren't defined in a PGXS build;
# makefiles may only use the derived variables such as bindir.
prefix := @prefix@
exec_prefix := @exec_prefix@
datarootdir := @datarootdir@
bindir := @bindir@
@ -105,14 +106,13 @@ endif
mandir := @mandir@
docdir := @docdir@
# docdir can be an empty string to signify --without-docdir
ifneq (,$(docdir))
ifeq "$(findstring pgsql, $(docdir))" ""
ifeq "$(findstring postgres, $(docdir))" ""
override docdir := $(docdir)/postgresql
endif
endif
endif
htmldir := @htmldir@
localedir := @localedir@

View File

@ -12,19 +12,19 @@
/* Define to the return type of 'accept' */
#undef ACCEPT_TYPE_RETURN
/* The alignment requirement of a `double'. */
/* The normal alignment of `double', in bytes. */
#undef ALIGNOF_DOUBLE
/* The alignment requirement of a `int'. */
/* The normal alignment of `int', in bytes. */
#undef ALIGNOF_INT
/* The alignment requirement of a `long'. */
/* The normal alignment of `long', in bytes. */
#undef ALIGNOF_LONG
/* The alignment requirement of a `long long int'. */
/* The normal alignment of `long long int', in bytes. */
#undef ALIGNOF_LONG_LONG_INT
/* The alignment requirement of a `short'. */
/* The normal alignment of `short', in bytes. */
#undef ALIGNOF_SHORT
/* Define to the default TCP port number on which the server listens and to
@ -637,10 +637,10 @@
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* The size of a `size_t', as computed by sizeof. */
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of a `unsigned long', as computed by sizeof. */
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* Define to 1 if you have the ANSI C header files. */
@ -719,9 +719,11 @@
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to empty if the C compiler does not understand signed types. */
#undef signed