diff options
| author | Bruce Momjian <bruce@momjian.us> | 2006-02-28 16:41:21 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2006-02-28 16:41:21 +0000 |
| commit | 03024ca5a1437712bfa554470711f44577dcc3d2 (patch) | |
| tree | 3d617265b8d1ddb21ef28422405c6bd24d52d966 /configure.in | |
| parent | d2c555ee538f34be7aff744b994df4d2369a9140 (diff) | |
| download | postgresql-03024ca5a1437712bfa554470711f44577dcc3d2.tar.gz | |
Add PG_VERSION_NUM for use by 3rd party applications wanting to test the
backend version in C using > and < comparisons.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in index b41a5c8678..6350b1af6f 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.450 2006/02/21 06:06:50 tgl Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.451 2006/02/28 16:41:21 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -26,7 +26,7 @@ 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]) +AC_DEFINE_UNQUOTED(PG_VERSION, "$PACKAGE_VERSION", [PostgreSQL version as a string]) AC_CANONICAL_HOST @@ -585,6 +585,10 @@ if test "$with_python" = yes; then PGAC_CHECK_PYTHON_EMBED_SETUP fi +# Supply a numeric version string for use by 3rd party add-ons +PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' | +$AWK -F'\.' '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`" +AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number]) ## ## Libraries |
