# 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
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],