[HACKERS] Move Deprecated configure.in to configure.ac

2014-11-19 Thread Aaron W. Swenson
configure.in was deprecated some years ago. We have a bug at Gentoo [1] to
move it to configure.ac.

I've done so in my git-clone of the postgresql repo, and ran autoupdate
to move away from the deprecated functions as well.

I generated the configure script again, but that didn't change.

make  make check all succeeded without intervention.

[1] https://bugs.gentoo.org/show_bug.cgi?id=529680

-- 
Mr. Aaron W. Swenson
Gentoo Linux Developer
PostgreSQL Herd Bull
Email : titanof...@gentoo.org
GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
GnuPG ID : D1BBFDA0
From 60a76e24def32e7206e6d76999e6dca3575656da Mon Sep 17 00:00:00 2001
From: Aaron W. Swenson aaron.w.swen...@gmail.com
Date: Wed, 19 Nov 2014 11:44:53 -0500
Subject: [PATCH] Move Deprecated configure.in to configure.ac

configure.in was deprecated some years ago. Moved to configure.ac and
autoupdate run to move away from deprecated functions.
---
 configure.ac | 2010 +
 configure.in | 2036 --
 2 files changed, 2010 insertions(+), 2036 deletions(-)
 create mode 100644 configure.ac
 delete mode 100644 configure.in

diff --git a/configure.ac b/configure.ac
new file mode 100644
index 000..68ecc0e
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,2010 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl configure.in
+dnl
+dnl Developers, please strive to achieve this order:
+dnl
+dnl 0. Initialization and options processing
+dnl 1. Programs
+dnl 2. Libraries
+dnl 3. Header files
+dnl 4. Types
+dnl 5. Structures
+dnl 6. Compiler characteristics
+dnl 7. Functions, global variables
+dnl 8. System services
+dnl
+dnl Read the Autoconf manual for details.
+dnl
+m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
+
+AC_INIT([PostgreSQL],[9.5devel],[pgsql-b...@postgresql.org])
+
+m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 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.])])
+AC_COPYRIGHT([Copyright (c) 1996-2014, PostgreSQL Global Development Group])
+AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+AC_CONFIG_AUX_DIR(config)
+AC_PREFIX_DEFAULT(/usr/local/pgsql)
+AC_SUBST(configure_args, [$ac_configure_args])
+
+[PG_MAJORVERSION=`expr $PACKAGE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\)'`]
+AC_SUBST(PG_MAJORVERSION)
+AC_DEFINE_UNQUOTED(PG_MAJORVERSION, $PG_MAJORVERSION, [PostgreSQL major version as a string])
+
+PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
+ [PG_VERSION=$PACKAGE_VERSION$withval],
+ [PG_VERSION=$PACKAGE_VERSION])
+AC_DEFINE_UNQUOTED(PG_VERSION, $PG_VERSION, [PostgreSQL version as a string])
+
+AC_CANONICAL_HOST
+
+template=
+AC_MSG_CHECKING([which template to use])
+
+PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
+[
+  case $withval in
+list)   echo; ls $srcdir/src/template; exit;;
+*)  if test -f $srcdir/src/template/$with_template ; then
+  template=$withval
+else
+  AC_MSG_ERROR(['$withval' is not a valid template name. Use 'list' for a list.])
+fi;;
+  esac
+],
+[
+# --with-template not given
+
+case $host_os in
+ aix*) template=aix ;;
+  cygwin*) template=cygwin ;;
+  darwin*) template=darwin ;;
+dragonfly*) template=netbsd ;;
+ freebsd*) template=freebsd ;;
+hpux*) template=hpux ;;
+ linux*|gnu*|k*bsd*-gnu)
+   template=linux ;;
+   mingw*) template=win32 ;;
+  netbsd*) template=netbsd ;;
+ openbsd*) template=openbsd ;;
+ sco*) template=sco ;;
+ solaris*) template=solaris ;;
+   sysv5*) template=unixware ;;
+esac
+
+  if test x$template = x ; then
+AC_MSG_ERROR([[
+***
+PostgreSQL has apparently not been ported to your platform yet.
+To try a manual configuration, look into the src/template directory
+for a similar platform and use the '--with-template=' option.
+
+Please also contact pgsql-b...@postgresql.org to see about
+rectifying this.  Include the above 'checking host system type...'
+line.
+***
+]])
+  fi
+
+])
+
+AC_MSG_RESULT([$template])
+
+PORTNAME=$template
+AC_SUBST(PORTNAME)
+
+# Initialize default assumption that we do not need separate assembly code
+# for TAS (test-and-set).  This can be overridden by the template file
+# when it's executed.
+need_tas=no
+tas_file=dummy.s
+
+
+
+##
+## Command line options
+##
+
+#
+# Add non-standard directories to the include path
+#
+PGAC_ARG_REQ(with, includes, [DIRS], [look for additional header files in DIRS])
+
+
+#
+# Add non-standard directories to the library search path
+#
+PGAC_ARG_REQ(with, libraries, [DIRS], [look for additional libraries in 

Re: [HACKERS] Move Deprecated configure.in to configure.ac

2014-11-19 Thread Tom Lane
Aaron W. Swenson titanof...@gentoo.org writes:
 configure.in was deprecated some years ago. We have a bug at Gentoo [1] to
 move it to configure.ac.

I see no advantage to this.  It'll mess up our git history to do so,
not to mention complicate back-patching.  If we were planning to adopt
additional tools from the autoconf suite then we might have to change
the file suffix, but I have heard no suggestions that we might want to
do that.  In particular, we really do not care what automake thinks.

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers