1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

configure: Allow adding a custom string to PG_VERSION

This can be used to mark custom built binaries with an extra version
string such as a git describe identifier or distribution package release
version.

From: Oskari Saarenmaa <os@ohmu.fi>
This commit is contained in:
Peter Eisentraut
2013-12-12 21:53:21 -05:00
parent ccca6f56f5
commit 46328916ee
3 changed files with 56 additions and 8 deletions

43
configure vendored
View File

@ -804,6 +804,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_extra_version
with_template
with_includes
with_libraries
@ -1507,6 +1508,8 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-extra-version=STRING
append STRING to version
--with-template=NAME override operating system template
--with-includes=DIRS look for additional header files in DIRS
--with-libraries=DIRS look for additional libraries in DIRS
@ -2047,11 +2050,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
configure_args=$ac_configure_args
cat >>confdefs.h <<_ACEOF
#define PG_VERSION "$PACKAGE_VERSION"
_ACEOF
PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
@ -2060,6 +2058,39 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
# Check whether --with-extra-version was given.
if test "${with_extra_version+set}" = set; then
withval=$with_extra_version;
case $withval in
yes)
{ { $as_echo "$as_me:$LINENO: error: argument required for --with-extra-version option" >&5
$as_echo "$as_me: error: argument required for --with-extra-version option" >&2;}
{ (exit 1); exit 1; }; }
;;
no)
{ { $as_echo "$as_me:$LINENO: error: argument required for --with-extra-version option" >&5
$as_echo "$as_me: error: argument required for --with-extra-version option" >&2;}
{ (exit 1); exit 1; }; }
;;
*)
PG_VERSION="$PACKAGE_VERSION$withval"
;;
esac
else
PG_VERSION="$PACKAGE_VERSION"
fi
cat >>confdefs.h <<_ACEOF
#define PG_VERSION "$PG_VERSION"
_ACEOF
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
{ { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
@ -30284,7 +30315,7 @@ fi
cat >>confdefs.h <<_ACEOF
#define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
#define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
_ACEOF