diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2008-02-17 16:36:43 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2008-02-17 16:36:43 +0000 |
commit | b120382353a938a342d3149031f40f42dc6e2720 (patch) | |
tree | 847d1d175c3878eedc47fe64e1990433dfbddea6 /config | |
parent | 8b63aa1ffcae5aae9dd5a6d00a7b509308bef6f4 (diff) | |
download | postgresql-b120382353a938a342d3149031f40f42dc6e2720.tar.gz |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/c-compiler.m4 | 69 | ||||
-rw-r--r-- | config/programs.m4 | 6 |
2 files changed, 4 insertions, 71 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 index e4b3d3513a..466180757b 100644 --- a/config/c-compiler.m4 +++ b/config/c-compiler.m4 @@ -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 diff --git a/config/programs.m4 b/config/programs.m4 index 9434113fb0..41bda91ccf 100644 --- a/config/programs.m4 +++ b/config/programs.m4 @@ -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 |