From: | Oskari Saarenmaa <os(at)ohmu(dot)fi> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | [PATCH] configure: allow adding a custom string to PG_VERSION |
Date: | 2013-11-05 16:29:06 |
Message-ID: | 20131105162906.GC26836@saarenmaa.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This can be used to tag custom built packages with an extra version string
such as the git describe id or distribution package release version.
Based on pgsql-hackers discussion:
http://www.postgresql.org/message-id/20131105102226.GA26836@saarenmaa.fi
Signed-off-by: Oskari Saarenmaa <os(at)ohmu(dot)fi>
---
configure.in | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index a4baeaf..5459c71 100644
--- a/configure.in
+++ b/configure.in
@@ -29,11 +29,15 @@ AC_CONFIG_AUX_DIR(config)
AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_SUBST(configure_args, [$ac_configure_args])
-AC_DEFINE_UNQUOTED(PG_VERSION, "$PACKAGE_VERSION", [PostgreSQL version as a string])
[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])
+# Allow adding a custom string to PG_VERSION
+PGAC_ARG_REQ(with, extra-version, [NAME], [extra version information],
+[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=
@@ -1920,7 +1924,7 @@ else
fi
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
- ["PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
+ ["PostgreSQL $PG_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
--
1.8.4.2
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-11-05 16:52:49 | Disallow pullup of a subquery with a subquery in its targetlist? |
Previous Message | Robert Haas | 2013-11-05 16:24:32 | Re: Row-security writer-side checks proposal |