diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/configure b/configure index 45dbeb4d198..d6d3f26d03d 100755 --- a/configure +++ b/configure @@ -2805,6 +2805,8 @@ _ACEOF PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'` +PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'` +test -n "$PG_MINORVERSION" || PG_MINORVERSION=0 cat >>confdefs.h <<_ACEOF @@ -2812,6 +2814,16 @@ cat >>confdefs.h <<_ACEOF _ACEOF +cat >>confdefs.h <<_ACEOF +#define PG_MAJORVERSION_NUM $PG_MAJORVERSION +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PG_MINORVERSION_NUM $PG_MINORVERSION +_ACEOF + + @@ -18875,8 +18887,7 @@ _ACEOF # Supply a numeric version string for use by 3rd party add-ons # awk -F is a regex on some platforms, and not on others, so make "." a tab -PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' | -tr '.' ' ' | +PG_VERSION_NUM="`echo "$PG_MAJORVERSION $PG_MINORVERSION" | $AWK '{printf "%d%04d", $1, $2}'`" cat >>confdefs.h <<_ACEOF |