mirror of https://github.com/citusdata/citus.git
Add CITUS_NAME and CITUS_EDITION
Unambiguous places to check whether we're running simply Citus or Citus Enterprise, or to check for 'community' or 'enterprise'.pull/1700/head
parent
8544878c4b
commit
f2c593b25c
|
@ -2342,6 +2342,26 @@ fi
|
|||
done
|
||||
|
||||
|
||||
# CITUS_NAME definition
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CITUS_NAME "$PACKAGE_NAME"
|
||||
_ACEOF
|
||||
|
||||
|
||||
case $PACKAGE_NAME in
|
||||
'Citus Enterprise') citus_edition=enterprise ;;
|
||||
Citus) citus_edition=community ;;
|
||||
*) as_fn_error $? "Unrecognized package name." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
# CITUS_EDITION definition
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CITUS_EDITION "$citus_edition"
|
||||
_ACEOF
|
||||
|
||||
|
||||
# CITUS_MAJORVERSION definition
|
||||
CITUS_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
|
||||
|
||||
|
|
12
configure.in
12
configure.in
|
@ -12,6 +12,18 @@ AC_COPYRIGHT([Copyright (c) 2012-2017, Citus Data, Inc.])
|
|||
AC_PROG_SED
|
||||
AC_PROG_AWK
|
||||
|
||||
# CITUS_NAME definition
|
||||
AC_DEFINE_UNQUOTED(CITUS_NAME, "$PACKAGE_NAME", [Citus full name as a string])
|
||||
|
||||
case $PACKAGE_NAME in
|
||||
'Citus Enterprise') citus_edition=enterprise ;;
|
||||
Citus) citus_edition=community ;;
|
||||
*) AC_MSG_ERROR([Unrecognized package name.]) ;;
|
||||
esac
|
||||
|
||||
# CITUS_EDITION definition
|
||||
AC_DEFINE_UNQUOTED(CITUS_EDITION, "$citus_edition", [Citus edition as a string])
|
||||
|
||||
# CITUS_MAJORVERSION definition
|
||||
[CITUS_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`]
|
||||
AC_DEFINE_UNQUOTED(CITUS_MAJORVERSION, "$CITUS_MAJORVERSION", [Citus major version as a string])
|
||||
|
|
|
@ -10,12 +10,18 @@
|
|||
*/
|
||||
|
||||
|
||||
/* Citus edition as a string */
|
||||
#undef CITUS_EDITION
|
||||
|
||||
/* Extension version expected by this Citus build */
|
||||
#undef CITUS_EXTENSIONVERSION
|
||||
|
||||
/* Citus major version as a string */
|
||||
#undef CITUS_MAJORVERSION
|
||||
|
||||
/* Citus full name as a string */
|
||||
#undef CITUS_NAME
|
||||
|
||||
/* Citus version as a string */
|
||||
#undef CITUS_VERSION
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
/* This file is created manually */
|
||||
|
||||
/* Citus full name as a string */
|
||||
#undef CITUS_NAME
|
||||
|
||||
/* Citus edition as a string */
|
||||
#undef CITUS_EDITION
|
||||
|
||||
/* Extension version expected by this Citus build */
|
||||
#undef CITUS_EXTENSIONVERSION
|
||||
|
||||
|
|
Loading…
Reference in New Issue