From 2.10 onwards, all files are installed into versioned
directories. As everything stays compatible between revisions,
it is not technically necessary, to have revisions included in
the directories. Nevertheless, there are situations where this
is desirable. So make it available at configure time, disabled
by default.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
# so, if some currently architecture-independent executable is replaced by an
# architecture-dependent one (and hence has to go under $(versiondir)), add a link
# under $(versionedsharedir) but do not change the external links.
# so, if some currently architecture-independent executable is replaced by an
# architecture-dependent one (and hence has to go under $(versiondir)), add a link
# under $(versionedsharedir) but do not change the external links.
-versiondir = $(libdir)/ganeti/$(VERSION)
-versionedsharedir = $(prefix)/share/ganeti/$(VERSION)
+if USE_VERSION_FULL
+DIRVERSION=VERSION_FULL
+else
+DIRVERSION=$(VERSION_MAJOR).$(VERSION_MINOR)
+endif
+versiondir = $(libdir)/ganeti/$(DIRVERSION)
+versionedsharedir = $(prefix)/share/ganeti/$(DIRVERSION)
# Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix
# Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix
AC_SUBST([VERSION_SUFFIX], gnt_version_suffix)
AC_SUBST([VERSION_FULL], gnt_version_full)
AC_SUBST([VERSION_SUFFIX], gnt_version_suffix)
AC_SUBST([VERSION_FULL], gnt_version_full)
+# --enable-versionfull
+AC_ARG_ENABLE([versionfull],
+ [AS_HELP_STRING([--enable-versionfull],
+ m4_normalize([use the full version string rather
+ than major.minor for version directories]))],
+ [[if test "$enableval" != yes; then
+ USE_VERSION_FULL=yes
+ else
+ USER_VERSION_FULL=no
+ fi
+ ]],
+ [USE_VERSION_FULL=no
+ ])
+AC_SUBST(USE_VERSION_FULL, $USE_VERSION_FULL)
+AM_CONDITIONAL([USE_VERSION_FULL], [test "$USE_VERSION_FULL" = yes])
+
# --enable-symlinks
AC_ARG_ENABLE([symlinks],
[AS_HELP_STRING([--enable-symlinks],
# --enable-symlinks
AC_ARG_ENABLE([symlinks],
[AS_HELP_STRING([--enable-symlinks],