Commits

Peter Eisentraut  committed 7c1ff35

Upgrade to Autoconf version 2.53. Replaced many custom macro
calls with new or now-built-in versions. Make sure that all
calls to AC_DEFINE have a third argument, for possible use of
autoheader in the future.

  • Participants
  • Parent commits eb1ee9e

Comments (0)

Files changed (20)

File GNUmakefile.in

 #
 # PostgreSQL top level makefile
 #
-# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.23 2001/11/21 23:19:25 momjian Exp $
+# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.24 2002/03/29 17:32:48 petere Exp $
 #
 
 subdir =
 	$(MAKE) -C doc $@
 	$(MAKE) -C contrib $@
 	$(MAKE) -C src $@
+# Garbage from autoconf:
+	@rm -rf autom4te.cache/
 
 # Important: distclean `src' last, otherwise Makefile.global
 # will be gone too soon.
 	-$(MAKE) -C contrib $@
 	-$(MAKE) -C src $@
 	-rm -f config.cache config.log config.status GNUmakefile
+# Garbage from autoconf:
+	@rm -rf autom4te.cache/
 
 check: all
 
 	$(MAKE) -C src/test $@
 
 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
-	CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
+	./config.status $@
 
 
 ##########################################################################
-dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.13 2001/08/26 22:28:03 petere Exp $
-builtin([include], [config/ac_func_accept_argtypes.m4])
-builtin([include], [config/c-compiler.m4])
-builtin([include], [config/c-library.m4])
-builtin([include], [config/cxx.m4])
-builtin([include], [config/docbook.m4])
-builtin([include], [config/general.m4])
-builtin([include], [config/java.m4])
-builtin([include], [config/libtool.m4])
-builtin([include], [config/perl.m4])
-builtin([include], [config/programs.m4])
-builtin([include], [config/python.m4])
-builtin([include], [config/tcl.m4])
+dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.14 2002/03/29 17:32:48 petere Exp $
+m4_include([config/ac_func_accept_argtypes.m4])
+m4_include([config/c-compiler.m4])
+m4_include([config/c-library.m4])
+m4_include([config/cxx.m4])
+m4_include([config/docbook.m4])
+m4_include([config/general.m4])
+m4_include([config/java.m4])
+m4_include([config/libtool.m4])
+m4_include([config/perl.m4])
+m4_include([config/programs.m4])
+m4_include([config/python.m4])
+m4_include([config/tcl.m4])

File config/ac_func_accept_argtypes.m4

-# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.3 2000/11/09 18:18:42 petere Exp $
+# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.4 2002/03/29 17:32:53 petere Exp $
 # This comes from the official Autoconf macro archive at
 # <http://research.cys.de/autoconf-archive/>
 # (I removed the $ before the Id CVS keyword below.)
 # which is *not* 'socklen_t *').  If we detect that, then we assume
 # 'int' as the result, because that ought to work best.
 
-AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
+AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
 [AC_MSG_CHECKING([types of arguments for accept()])
  AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
  [AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
   ])dnl AC_CACHE_VAL
  ])dnl AC_CACHE_VAL
  AC_MSG_RESULT([$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *])
- AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1,$ac_cv_func_accept_arg1)
- AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2,$ac_cv_func_accept_arg2)
- AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3,$ac_cv_func_accept_arg3)
+ AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1, $ac_cv_func_accept_arg1,
+                    [Define to the type of arg 1 of 'accept'])
+ AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2, $ac_cv_func_accept_arg2,
+                    [Define to the type of arg 2 of 'accept'])
+ AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3, $ac_cv_func_accept_arg3,
+                    [Define to the type of arg 3 of 'accept'])
 ])

File config/c-compiler.m4

 # Macros to detect C compiler features
-# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.4 2001/12/02 11:38:40 petere Exp $
+# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.5 2002/03/29 17:32:53 petere Exp $
 
 
 # PGAC_C_SIGNED
 
 
 
-# PGAC_C_VOLATILE
-# ---------------
-# Check if the C compiler understands `volatile'. Note that if it doesn't
-# then this will potentially break the program semantics.
-AC_DEFUN([PGAC_C_VOLATILE],
-[AC_CACHE_CHECK(for volatile, pgac_cv_c_volatile,
-[AC_TRY_COMPILE([],
-[extern volatile int i;],
-[pgac_cv_c_volatile=yes],
-[pgac_cv_c_volatile=no])])
-if test x"$pgac_cv_c_volatile" = xno ; then
-  AC_DEFINE(volatile,, [Define empty if the C compiler does not understand `volatile'])
-fi])# PGAC_C_VOLATILE
-
-
-
 # PGAC_TYPE_64BIT_INT(TYPE)
 # -------------------------
 # Check if TYPE is a working 64 bit integer type. Set HAVE_TYPE_64 to
 
 
 
-# PGAC_CHECK_ALIGNOF(TYPE)
-# ------------------------
+# PGAC_CHECK_ALIGNOF(TYPE, [INCLUDES = DEFAULT-INCLUDES])
+# -----------------------------------------------------
 # Find the alignment requirement of the given type. Define the result
-# as ALIGNOF_TYPE. If cross-compiling, sizeof(type) is used as a
-# default assumption.
-#
-# This is modeled on the standard autoconf macro AC_CHECK_SIZEOF.
-# That macro never got any points for style.
+# as ALIGNOF_TYPE.  This macro works even when cross compiling.
+# (Modelled after AC_CHECK_SIZEOF.)
+
 AC_DEFUN([PGAC_CHECK_ALIGNOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(alignof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(pgac_cv_alignof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(alignment of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[AC_TRY_RUN([#include <stdio.h>
-struct { char filler; $1 field; } mystruct;
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
-  exit(0);
-}], AC_CV_NAME=`cat conftestval`,
-AC_CV_NAME='sizeof($1)',
-AC_CV_NAME='sizeof($1)')])dnl
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The alignment requirement of a `]$1['])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
+[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_CHECK_TYPE(TYPE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [INCLUDES])
-# ---------------------------------------------------------------------------
-
-AC_DEFUN([PGAC_CHECK_TYPE],
-[changequote(<<,>>)dnl
-dnl The name to #define
-define(<<AC_TYPE_NAME>>, translit(have_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(pgac_cv_have_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_CACHE_CHECK([for $1], AC_CV_NAME,
-[AC_TRY_COMPILE([$4],
-[if (($1 *) 0)
-  return 0;
-if (sizeof ($1))
-  return 0;],
-AC_CV_NAME[=yes],
-AC_CV_NAME[=no])])
-if test "$AC_CV_NAME" = yes; then
-  AC_DEFINE(AC_TYPE_NAME, 1, [Define to 1 if you have `]$1['])
-  ifelse($2,,,[$2
-])[]dnl
-ifelse($3,,,[else
-  $3
-])[]dnl
-fi
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])# PGAC_CHECK_TYPE

File config/c-library.m4

 # Macros that test various C library quirks
-# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.11 2002/02/23 04:17:45 petere Exp $
+# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.12 2002/03/29 17:32:53 petere Exp $
 
 
 # PGAC_VAR_INT_TIMEZONE
 
 
 # PGAC_FUNC_MEMCMP
-# -----------
+# ----------------
 # Check if memcmp() properly handles negative bytes and returns +/-.
 # SunOS does not.
 # AC_FUNC_MEMCMP
-AC_DEFUN(PGAC_FUNC_MEMCMP,
+AC_DEFUN([PGAC_FUNC_MEMCMP],
 [AC_CACHE_CHECK(for 8-bit clean memcmp, pgac_cv_func_memcmp_clean,
 [AC_TRY_RUN([
 main()
 # If it doesn't then one could define it as
 # union semun { int val; struct semid_ds *buf; unsigned short *array; }
 AC_DEFUN([PGAC_UNION_SEMUN],
-[AC_CACHE_CHECK(for union semun, pgac_cv_union_semun,
-[AC_TRY_COMPILE([#include <sys/types.h>
+[AC_CHECK_TYPE([union semun], [], [],
+[#include <sys/types.h>
 #include <sys/ipc.h>
-#include <sys/sem.h>],
-  [union semun semun;],
-  [pgac_cv_union_semun=yes],
-  [pgac_cv_union_semun=no])])
-if test x"$pgac_cv_union_semun" = xyes ; then
-  AC_DEFINE(HAVE_UNION_SEMUN, 1, [Set to 1 if you have `union semun'])
-fi])# PGAC_UNION_SEMUN
+#include <sys/sem.h>])])# PGAC_UNION_SEMUN
 
 
 # PGAC_STRUCT_SOCKADDR_UN
 # it is missing then one could define it as { short int sun_family;
 # char sun_path[108]; }. (Requires test for <sys/un.h>!)
 AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN],
-[AC_CACHE_CHECK([for struct sockaddr_un], pgac_cv_struct_sockaddr_un,
-[AC_TRY_COMPILE([#include <sys/types.h>
+[AC_CHECK_TYPES([struct sockaddr_un], [], [],
+[#include <sys/types.h>
 #ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
-#endif],
-                [struct sockaddr_un un;],
-                [pgac_cv_struct_sockaddr_un=yes],
-                [pgac_cv_struct_sockaddr_un=no])])
-if test x"$pgac_cv_struct_sockaddr_un" = xyes; then
-  AC_DEFINE(HAVE_STRUCT_SOCKADDR_UN, 1, [Set to 1 if you have `struct sockaddr_un'])
-fi])# PGAC_STRUCT_SOCKADDR_UN
+#endif
+])])# PGAC_STRUCT_SOCKADDR_UN
 
 
 # PGAC_FUNC_POSIX_SIGNALS
 fi
 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
 AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
-
-
-# PGAC_STRUCT_CMSGCRED
-# --------------------
-# Check if `struct cmsgcred' exists. Define HAVE_STRUCT_CMSGCRED if so.
-AC_DEFUN([PGAC_STRUCT_CMSGCRED],
-[AC_CACHE_CHECK(for struct cmsgcred, pgac_cv_struct_cmsgcred,
-[AC_TRY_COMPILE([#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ucred.h>],
-  [struct cmsgcred sockcred;],
-  [pgac_cv_struct_cmsgcred=yes],
-  [pgac_cv_struct_cmsgcred=no])])
-if test x"$pgac_cv_struct_cmsgcred" = xyes ; then
-  AC_DEFINE(HAVE_STRUCT_CMSGCRED, 1, [Set to 1 if you have `struct cmsgcred'])
-fi])# PGAC_STRUCT_CMSGCRED
-
-
-# PGAC_STRUCT_FCRED
-# -----------------
-# Check if `struct fcred' exists. Define HAVE_STRUCT_FCRED if so.
-AC_DEFUN([PGAC_STRUCT_FCRED],
-[AC_CACHE_CHECK(for struct fcred, pgac_cv_struct_fcred,
-[AC_TRY_COMPILE([#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ucred.h>],
-  [struct fcred sockcred;],
-  [pgac_cv_struct_fcred=yes],
-  [pgac_cv_struct_fcred=no])])
-if test x"$pgac_cv_struct_fcred" = xyes ; then
-  AC_DEFINE(HAVE_STRUCT_FCRED, 1, [Set to 1 if you have `struct fcred'])
-fi])# PGAC_STRUCT_FCRED
-
-
-# PGAC_STRUCT_SOCKCRED
-# --------------------
-# Check if `struct sockcred' exists. Define HAVE_STRUCT_SOCKCRED if so.
-AC_DEFUN([PGAC_STRUCT_SOCKCRED],
-[AC_CACHE_CHECK(for struct sockcred, pgac_cv_struct_sockcred,
-[AC_TRY_COMPILE([#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ucred.h>],
-  [struct sockcred sockcred;],
-  [pgac_cv_struct_sockcred=yes],
-  [pgac_cv_struct_sockcred=no])])
-if test x"$pgac_cv_struct_sockcred" = xyes ; then
-  AC_DEFINE(HAVE_STRUCT_SOCKCRED, 1, [Set to 1 if you have `struct sockcred'])
-fi])# PGAC_STRUCT_SOCKCRED
-
-
-# PGAC_HEADER_STRING
-# ------------------
-# Tests whether <string.h> and <strings.h> can both be included
-# (without generating warnings).  This is mostly useful if you need
-# str[n]casecmp(), since this is not in the "standard" <string.h>
-# on some systems.
-AC_DEFUN([PGAC_HEADER_STRING],
-[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
-                [pgac_cv_header_strings_both],
-[AC_TRY_CPP(
-[#include <string.h>
-#include <strings.h>
-],
-[AC_TRY_COMPILE(
-[#include <string.h>
-#include <strings.h>
-],
-[int n = strcasecmp("a", "b");],
-[pgac_cv_header_strings_both=yes],
-[pgac_cv_header_strings_both=no])],
-[pgac_cv_header_strings_both=no])])
-if test x"$pgac_cv_header_strings_both" = x"yes"; then
-  AC_DEFINE([STRING_H_WITH_STRINGS_H], 1,
-            [Define if string.h and strings.h may both be included])
-fi])
-
-
-# PGAC_CHECK_MEMBER(AGGREGATE.MEMBER,
-#                   [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                   [INCLUDES])
-# -----------------------------------------------------------
-
-AC_DEFUN([PGAC_CHECK_MEMBER],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<pgac_define_name>>, translit(HAVE_$1, [a-z .*], [A-Z__P]))dnl
-dnl The cache variable name.
-define(<<pgac_cache_name>>, translit(pgac_cv_member_$1, [ .*], [__p]))dnl
-changequote([, ])dnl
-AC_CACHE_CHECK([for $1], [pgac_cache_name],
-[AC_TRY_COMPILE([$4],
-[static ]patsubst([$1], [\..*])[ pgac_var;
-if (pgac_var.]patsubst([$1], [^[^.]*\.])[)
-return 0;],
-[pgac_cache_name=yes],
-[pgac_cache_name=no])])
-
-if test x"[$]pgac_cache_name" = x"yes"; then
-  AC_DEFINE_UNQUOTED(pgac_define_name)
-  $2
-else
-  ifelse([$3], [], :, [$3])
-fi
-undefine([pgac_define_name])[]dnl
-undefine([pgac_cache_name])[]dnl
-])

File config/cxx.m4

 # Macros to detect certain C++ features
-# $Header: /cvsroot/pgsql/config/Attic/cxx.m4,v 1.1 2000/06/11 11:39:46 petere Exp $
+# $Header: /cvsroot/pgsql/config/Attic/cxx.m4,v 1.2 2002/03/29 17:32:53 petere Exp $
 
 
 # PGAC_CLASS_STRING
 # class string exists.  If not, check to make sure that <string.h>
 # defines class `string'.
 AC_DEFUN([PGAC_CLASS_STRING],
-[AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+[AC_LANG_PUSH(C++)
 AC_CHECK_HEADER(string,
-  [AC_DEFINE(HAVE_CXX_STRING_HEADER)])
-
-if test x"$ac_cv_header_string" != xyes ; then
-  AC_CACHE_CHECK([for class string in <string.h>],
-    [pgac_cv_class_string_in_string_h],
-    [AC_TRY_COMPILE([#include <stdio.h>
+                [AC_DEFINE(HAVE_CXX_STRING_HEADER, 1,
+                           [Define to 1 if you have the C++ <string> header])]
+                [AC_CACHE_CHECK([for class string in <string.h>],
+                                [pgac_cv_class_string_in_string_h],
+[AC_TRY_COMPILE([#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 ],
-      [string foo = "test"],
-      [pgac_cv_class_string_in_string_h=yes],
-      [pgac_cv_class_string_in_string_h=no])])
+                [string foo = "test"],
+                [pgac_cv_class_string_in_string_h=yes],
+                [pgac_cv_class_string_in_string_h=no])])
 
   if test x"$pgac_cv_class_string_in_string_h" != xyes ; then
-    AC_MSG_ERROR([neither <string> nor <string.h> seem to define the C++ class \`string\'])
+    AC_MSG_ERROR([neither <string> nor <string.h> seem to define the C++ class 'string'])
   fi
-fi
-AC_LANG_RESTORE])# PGAC_CLASS_STRING
+])
+AC_LANG_POP(C++)])# PGAC_CLASS_STRING
 
 
 # PGAC_CXX_NAMESPACE_STD
 AC_CACHE_CHECK([for namespace std in C++],
 pgac_cv_cxx_namespace_std,
 [
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
 AC_TRY_COMPILE(
 [#include <stdio.h>
 #include <stdlib.h>
 ], [],
 [pgac_cv_cxx_namespace_std=yes],
 [pgac_cv_cxx_namespace_std=no])
-AC_LANG_RESTORE])
+AC_LANG_POP(C++)])
 
 if test $pgac_cv_cxx_namespace_std = yes ; then
-    AC_DEFINE(HAVE_NAMESPACE_STD, 1, [Define to 1 if the C++ compiler understands `using namespace std'])
+    AC_DEFINE(HAVE_NAMESPACE_STD, 1, [Define to 1 if the C++ compiler understands 'using namespace std'])
 fi])# PGAC_CXX_NAMESPACE_STD

File config/docbook.m4

-# $Header: /cvsroot/pgsql/config/docbook.m4,v 1.1 2000/11/05 21:04:06 petere Exp $
+# $Header: /cvsroot/pgsql/config/docbook.m4,v 1.2 2002/03/29 17:32:53 petere Exp $
 
 # PGAC_PROG_JADE
 # --------------
 </book>
 EOF
 
-${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
+${NSGMLS-false} -s conftest.sgml 1>&AS_MESSAGE_LOG_FD 2>&1
 if test $? -eq 0; then
   pgac_cv_check_docbook=yes
 else

File config/general.m4

-# $Header: /cvsroot/pgsql/config/general.m4,v 1.1 2000/09/21 20:17:42 petere Exp $
+# $Header: /cvsroot/pgsql/config/general.m4,v 1.2 2002/03/29 17:32:53 petere Exp $
 
 # This file defines new macros to process configure command line
 # arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE.
 # in the option evaluation code.
 
 
-# print an error message and exit (while running `autoconf')
-define([pgac_error],
-       [errprint(__file__:__line__[: error: $1
-])
-        m4exit(10)])
-
-
 # Convert type and name to shell variable name (e.g., "enable_long_strings")
-define([pgac_arg_to_variable],
-       [$1[]_[]patsubst($2, -, _)])
+m4_define([pgac_arg_to_variable],
+          [$1[]_[]patsubst($2, -, _)])
 
 
 # PGAC_ARG(TYPE, NAME, HELP-STRING,
 # and argument (or "yes", which is the same); similar for ACTION-IF-NO.
 
 AC_DEFUN([PGAC_ARG],
-[dnl Check arguments
-ifelse([$1], enable, ,
-        [$1], with, ,
-        [pgac_error([first argument of $0 must be `enable' or `with', not `$1'])])[]dnl
-define([pgac_variable], [pgac_arg_to_variable([$1], [$2])])[]dnl
-dnl Register help string, only if there is one
-ifelse([$3], [], [],
-[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
-ac_help="$ac_help
-[$3]"
-AC_DIVERT_POP()])dnl
-[#] Check whether --$1-$2 was given
-if test x"[$]{pgac_variable+set}" = xset; then
-  case [$]pgac_variable in
+[
+m4_case([$1],
+
+enable, [
+AC_ARG_ENABLE([$2], [$3], [
+  case [$]enableval in
     yes)
-      ifelse([$4], [], :, [$4])
+      m4_default([$4], :)
       ;;
     no)
-      ifelse([$5], [], :, [$5])
+      m4_default([$5], :)
       ;;
-dnl Action if called with argument
-ifelse([$6], [], [],
-[    *)
-dnl Set up $withval or $enableval
-      $1[]val=[$]pgac_variable
+    *)
       $6
       ;;
-])[]dnl
-  esac [#] [$]pgac_variable
-dnl Action if omitted
-ifelse([$7], [], [],
-[else
-  $7
-])[]dnl
-fi[]dnl
-undefine([pgac_variable])dnl
+  esac
+],
+[$7])[]dnl AC_ARG_ENABLE
+],
+
+with, [
+AC_ARG_WITH([$2], [$3], [
+  case [$]withval in
+    yes)
+      m4_default([$4], :)
+      ;;
+    no)
+      m4_default([$5], :)
+      ;;
+    *)
+      $6
+      ;;
+  esac
+],
+[$7])[]dnl AC_ARG_WITH
+],
+
+[m4_fatal([first argument of $0 must be 'enable' or 'with', not '$1'])]
+)
 ])# PGAC_ARG
 
 
 # execute.)
 
 AC_DEFUN([PGAC_ARG_BOOL],
-[PGAC_ARG([$1], [$2], [$4], [$5], [$6],
+[PGAC_ARG([$1], [$2], [$4], [$5], [$6], 
           [AC_MSG_ERROR([no argument expected for --$1-$2 option])],
-          [ifelse([$3], yes, [pgac_arg_to_variable([$1], [$2])=yes
+          [m4_case([$3],
+                   yes, [pgac_arg_to_variable([$1], [$2])=yes
 $5],
-                  [$3], no,  [pgac_arg_to_variable([$1], [$2])=no
+                   no,  [pgac_arg_to_variable([$1], [$2])=no
 $6],
-                  [pgac_error([third argument of $0 must be `yes' or `no', not `$3'])])])[]dnl
+                   [m4_fatal([third argument of $0 must be 'yes' or 'no', not '$3'])])])[]dnl
 ])# PGAC_ARG_BOOL
 
 
 $5],
           [pgac_arg_to_variable([$1], [$2])=no])
 dnl Add this code only if there's a ACTION-ENABLED or ACTION-DISABLED.
-ifelse([$6[]$7], [], [],
+m4_ifval([$6[]$7],
 [
 if test "[$]pgac_arg_to_variable([$1], [$2])" = yes; then
-  ifelse([$6], [], :, [$6])
-ifelse([$7], [], [],
+  m4_default([$6], :)
+m4_ifval([$7],
 [else
   $7
 ])[]dnl

File config/java.m4

 #
 # Autoconf macros for configuring the build of Java JDBC Tools
 #
-# $Header: /cvsroot/pgsql/config/Attic/java.m4,v 1.3 2001/07/04 21:22:55 petere Exp $
+# $Header: /cvsroot/pgsql/config/Attic/java.m4,v 1.4 2002/03/29 17:32:54 petere Exp $
 #
 
 
     if test $? = 0 && test -f ./conftest.class ; then
       pgac_cv_prog_ant_works=yes
     else
-      echo "configure: failed java program was:" >&AC_FD_CC
-      cat conftest.java >&AC_FD_CC
-      echo "configure: failed build file was:" >&AC_FD_CC
-      cat conftest.xml >&AC_FD_CC
+      echo "configure: failed java program was:" >&AS_MESSAGE_LOG_FD
+      cat conftest.java >&AS_MESSAGE_LOG_FD
+      echo "configure: failed build file was:" >&AS_MESSAGE_LOG_FD
+      cat conftest.xml >&AS_MESSAGE_LOG_FD
       pgac_cv_prog_ant_works=no
     fi
 

File config/libtool.m4

 # ... bunch of stuff removed here ...
 
 # AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
+AC_DEFUN([AC_PROG_LD],
 [AC_ARG_WITH(gnu-ld,
 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 dnl ###not for PostgreSQL### AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
+if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   AC_MSG_CHECKING([for ld used by GCC])
   case $host in
 AC_PROG_LD_GNU
 ])
 
-AC_DEFUN(AC_PROG_LD_GNU,
+AC_DEFUN([AC_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then

File config/programs.m4

-# $Header: /cvsroot/pgsql/config/programs.m4,v 1.7 2001/08/28 14:59:11 petere Exp $
+# $Header: /cvsroot/pgsql/config/programs.m4,v 1.8 2002/03/29 17:32:54 petere Exp $
 
 
 # PGAC_PATH_FLEX
 ])[]dnl AC_CACHE_VAL
 
 if test "$pgac_cv_check_readline" != no ; then
-  AC_DEFINE(HAVE_LIBREADLINE)
+  AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have a function readline library])
   LIBS="$pgac_cv_check_readline $LIBS"
   AC_MSG_RESULT([yes ($pgac_cv_check_readline)])
 else

File config/python.m4

 #
 # Autoconf macros for configuring the build of Python extension modules
 #
-# $Header: /cvsroot/pgsql/config/python.m4,v 1.3 2001/07/10 16:33:01 petere Exp $
+# $Header: /cvsroot/pgsql/config/python.m4,v 1.4 2002/03/29 17:32:54 petere Exp $
 #
 
 # PGAC_PATH_PYTHON
 # ----------------
-# Look for Python and set the output variable `PYTHON'
-# to `python' if found, empty otherwise.
+# Look for Python and set the output variable 'PYTHON'
+# to 'python' if found, empty otherwise.
 AC_DEFUN([PGAC_PATH_PYTHON],
 [AC_PATH_PROG(PYTHON, python)
 if test x"$PYTHON" = x""; then

File config/tcl.m4

-# $Header: /cvsroot/pgsql/config/tcl.m4,v 1.2 2000/09/30 10:45:17 petere Exp $
+# $Header: /cvsroot/pgsql/config/tcl.m4,v 1.3 2002/03/29 17:32:54 petere Exp $
 
 # Autoconf macros to check for Tcl related things
 
 
 if test -z "$TCL_CONFIG_SH"; then
     AC_MSG_RESULT(no)
-    AC_MSG_ERROR([file \`tclConfig.sh' is required for Tcl])
+    AC_MSG_ERROR([file 'tclConfig.sh' is required for Tcl])
 else
     AC_MSG_RESULT([$TCL_CONFIG_SH])
 fi
 
 if test -z "$TK_CONFIG_SH"; then
     AC_MSG_RESULT(no)
-    AC_MSG_ERROR([file \`tkConfig.sh' is required for Tk])
+    AC_MSG_ERROR([file 'tkConfig.sh' is required for Tk])
 else
     AC_MSG_RESULT([$TK_CONFIG_SH])
 fi