Add utility function to recognize upgrade ranges
[ganeti-local] / configure.ac
index 1ecfc8d..d5db1d7 100644 (file)
@@ -20,6 +20,38 @@ AC_SUBST([VERSION_REVISION], gnt_version_revision)
 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" != no; 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],
+                  m4_normalize([also install version-dependent symlinks under
+                  $sysconfdir (default: enabled)]))],
+  [[if test "$enableval" != no; then
+      INSTALL_SYMLINKS=yes
+    else
+      INSTALL_SYMLINKS=no
+    fi
+  ]],
+  [INSTALL_SYMLINKS=yes
+  ])
+AC_SUBST(INSTALL_SYMLINKS, $INSTALL_SYMLINKS)
+AM_CONDITIONAL([INSTALL_SYMLINKS], [test "$INSTALL_SYMLINKS" = yes])
+
 # --with-ssh-initscript=...
 AC_ARG_WITH([ssh-initscript],
   [AS_HELP_STRING([--with-ssh-initscript=SCRIPT],
@@ -65,8 +97,8 @@ AC_ARG_WITH([os-search-path],
     [comma separated list of directories to]
     [ search for OS images (default is /srv/ganeti/os)]
   )],
-  [os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
-  [os_search_path="'/srv/ganeti/os'"])
+  [os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/\1/g"`],
+  [os_search_path="/srv/ganeti/os"])
 AC_SUBST(OS_SEARCH_PATH, $os_search_path)
 
 # --with-extstorage-search-path=...
@@ -77,8 +109,8 @@ AC_ARG_WITH([extstorage-search-path],
     [ search for External Storage Providers]
     [ (default is /srv/ganeti/extstorage)]
   )],
-  [es_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
-  [es_search_path="'/srv/ganeti/extstorage'"])
+  [es_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/\1/g"`],
+  [es_search_path="/srv/ganeti/extstorage"])
 AC_SUBST(ES_SEARCH_PATH, $es_search_path)
 
 # --with-iallocator-search-path=...
@@ -88,8 +120,8 @@ AC_ARG_WITH([iallocator-search-path],
     [comma separated list of directories to]
     [ search for instance allocators (default is $libdir/ganeti/iallocators)]
   )],
-  [iallocator_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
-  [iallocator_search_path="'$libdir/$PACKAGE_NAME/iallocators'"])
+  [iallocator_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/\1/g"`],
+  [iallocator_search_path="$libdir/$PACKAGE_NAME/iallocators"])
 AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path)
 
 # --with-xen-bootloader=...
@@ -305,6 +337,7 @@ then
 fi
 AC_SUBST(SYSLOG_USAGE, $SYSLOG)
 
+# --enable-restricted-commands[=no/yes]
 AC_ARG_ENABLE([restricted-commands],
   [AS_HELP_STRING([--enable-restricted-commands],
                   m4_normalize([enable restricted commands in the node daemon
@@ -495,6 +528,7 @@ AC_GHC_PKG_REQUIRE(network)
 AC_GHC_PKG_REQUIRE(mtl)
 AC_GHC_PKG_REQUIRE(bytestring)
 AC_GHC_PKG_REQUIRE(utf8-string)
+AC_GHC_PKG_REQUIRE(hslogger)
 
 # extra modules for confd functionality
 HS_REGEX_PCRE=-DNO_REGEX_PCRE
@@ -503,7 +537,6 @@ if test "$enable_confd" != no; then
   CONFD_PKG=
   AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
                    [CONFD_PKG="$CONFD_PKG regex-pcre"])
-  AC_GHC_PKG_CHECK([hslogger], [], [CONFD_PKG="$CONFD_PKG hslogger"])
   AC_GHC_PKG_CHECK([Crypto], [], [CONFD_PKG="$CONFD_PKG Crypto"])
   AC_GHC_PKG_CHECK([text], [], [CONFD_PKG="$CONFD_PKG text"])
   AC_GHC_PKG_CHECK([hinotify], [], [CONFD_PKG="$CONFD_PKG hinotify"])