Export docs from wiki to repo
[ganeti-local] / configure.ac
index 32b9c15..988c2a5 100644 (file)
@@ -1,8 +1,8 @@
 # Configure script for Ganeti
 m4_define([gnt_version_major], [2])
-m4_define([gnt_version_minor], [9])
+m4_define([gnt_version_minor], [10])
 m4_define([gnt_version_revision], [0])
-m4_define([gnt_version_suffix], [~alpha1])
+m4_define([gnt_version_suffix], [~rc1])
 m4_define([gnt_version_full],
           m4_format([%d.%d.%d%s],
                     gnt_version_major, gnt_version_minor,
@@ -20,6 +20,42 @@ AC_SUBST([VERSION_REVISION], gnt_version_revision)
 AC_SUBST([VERSION_SUFFIX], gnt_version_suffix)
 AC_SUBST([VERSION_FULL], gnt_version_full)
 
+AC_SUBST([BINDIR], $bindir)
+AC_SUBST([SBINDIR], $sbindir)
+AC_SUBST([MANDIR], $mandir)
+
+# --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],
@@ -59,37 +95,34 @@ AC_ARG_WITH([xen-config-dir],
 AC_SUBST(XEN_CONFIG_DIR, $xen_config_dir)
 
 # --with-os-search-path=...
-# do a bit of black sed magic to for quoting of the strings in the list
 AC_ARG_WITH([os-search-path],
   [AS_HELP_STRING([--with-os-search-path=LIST],
     [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="$withval"],
+  [os_search_path="/srv/ganeti/os"])
 AC_SUBST(OS_SEARCH_PATH, $os_search_path)
 
 # --with-extstorage-search-path=...
-# same black sed magic for quoting of the strings in the list
 AC_ARG_WITH([extstorage-search-path],
   [AS_HELP_STRING([--with-extstorage-search-path=LIST],
     [comma separated list of directories to]
     [ 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="$withval"],
+  [es_search_path="/srv/ganeti/extstorage"])
 AC_SUBST(ES_SEARCH_PATH, $es_search_path)
 
 # --with-iallocator-search-path=...
-# do a bit of black sed magic to for quoting of the strings in the list
 AC_ARG_WITH([iallocator-search-path],
   [AS_HELP_STRING([--with-iallocator-search-path=LIST],
     [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="$withval"],
+  [iallocator_search_path="$libdir/$PACKAGE_NAME/iallocators"])
 AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path)
 
 # --with-xen-bootloader=...
@@ -128,24 +161,6 @@ AC_ARG_WITH([kvm-kernel],
   [kvm_kernel="/boot/vmlinuz-3-kvmU"])
 AC_SUBST(KVM_KERNEL, $kvm_kernel)
 
-# --with-shared-file-storage-dir=...
-AC_ARG_WITH([shared-file-storage-dir],
-  [AS_HELP_STRING([--with-shared-file-storage-dir=PATH],
-    [directory to store files for shared file-based backend]
-    [ (default is /srv/ganeti/shared-file-storage)]
-  )],
-  [[shared_file_storage_dir="$withval";
-    if test "$withval" != no; then
-      enable_shared_file_storage=True
-    else
-      enable_shared_file_storage=False
-    fi
-  ]],
-  [[shared_file_storage_dir="/srv/ganeti/shared-file-storage";
-    enable_shared_file_storage=True]])
-AC_SUBST(SHARED_FILE_STORAGE_DIR, $shared_file_storage_dir)
-AC_SUBST(ENABLE_SHARED_FILE_STORAGE, $enable_shared_file_storage)
-
 # --with-kvm-path=...
 AC_ARG_WITH([kvm-path],
   [AS_HELP_STRING([--with-kvm-path=PATH],
@@ -212,16 +227,19 @@ AC_ARG_WITH([user-prefix],
   [user_masterd="${withval}masterd";
    user_rapi="${withval}rapi";
    user_confd="${withval}confd";
+   user_luxid="${withval}luxid";
    user_noded="$user_default";
    user_mond="$user_default"],
   [user_masterd="$user_default";
    user_rapi="$user_default";
    user_confd="$user_default";
+   user_luxid="$user_default";
    user_noded="$user_default";
    user_mond="$user_default"])
 AC_SUBST(MASTERD_USER, $user_masterd)
 AC_SUBST(RAPI_USER, $user_rapi)
 AC_SUBST(CONFD_USER, $user_confd)
+AC_SUBST(LUXID_USER, $user_luxid)
 AC_SUBST(NODED_USER, $user_noded)
 AC_SUBST(MOND_USER, $user_mond)
 
@@ -235,6 +253,7 @@ AC_ARG_WITH([group-prefix],
   [group_rapi="${withval}rapi";
    group_admin="${withval}admin";
    group_confd="${withval}confd";
+   group_luxid="${withval}luxid";
    group_masterd="${withval}masterd";
    group_noded="$group_default";
    group_daemons="${withval}daemons";
@@ -242,6 +261,7 @@ AC_ARG_WITH([group-prefix],
   [group_rapi="$group_default";
    group_admin="$group_default";
    group_confd="$group_default";
+   group_luxid="$group_default";
    group_masterd="$group_default";
    group_noded="$group_default";
    group_daemons="$group_default";
@@ -249,6 +269,7 @@ AC_ARG_WITH([group-prefix],
 AC_SUBST(RAPI_GROUP, $group_rapi)
 AC_SUBST(ADMIN_GROUP, $group_admin)
 AC_SUBST(CONFD_GROUP, $group_confd)
+AC_SUBST(LUXID_GROUP, $group_luxid)
 AC_SUBST(MASTERD_GROUP, $group_masterd)
 AC_SUBST(NODED_GROUP, $group_noded)
 AC_SUBST(DAEMONS_GROUP, $group_daemons)
@@ -258,6 +279,7 @@ AC_SUBST(MOND_GROUP, $group_mond)
 AC_MSG_NOTICE([Running ganeti-masterd as $group_masterd:$group_masterd])
 AC_MSG_NOTICE([Running ganeti-rapi as $user_rapi:$group_rapi])
 AC_MSG_NOTICE([Running ganeti-confd as $user_confd:$group_confd])
+AC_MSG_NOTICE([Running ganeti-luxid as $user_luxid:$group_luxid])
 AC_MSG_NOTICE([Group for daemons is $group_daemons])
 AC_MSG_NOTICE([Group for clients is $group_admin])
 
@@ -307,6 +329,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
@@ -334,6 +357,14 @@ AC_SUBST(DISK_SEPARATOR, $disk_separator)
 AC_PROG_INSTALL
 AC_PROG_LN_S
 
+# check if ln is the GNU version of ln (and hence supports -T)
+if ln --version 2> /dev/null | head -1 | grep -q GNU
+then
+  AC_SUBST(HAS_GNU_LN, True)
+else
+  AC_SUBST(HAS_GNU_LN, False)
+fi
+
 # Check for the ip command
 AC_ARG_VAR(IP_PATH, [ip path])
 AC_PATH_PROG(IP_PATH, [ip], [])
@@ -370,6 +401,7 @@ else
     AC_MSG_ERROR([Sphinx 1.0 or higher is required])
   fi
 fi
+AM_CONDITIONAL([HAS_SPHINX], [test -n "$SPHINX"])
 
 AC_ARG_ENABLE([manpages-in-doc],
   [AS_HELP_STRING([--enable-manpages-in-doc],
@@ -496,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
@@ -504,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"])
@@ -586,8 +618,12 @@ AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
 #        of the checks.
 AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1])
 AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1])
-AC_GHC_PKG_CHECK([process], [],
-                 [MONITORING_PKG="$MONITORING_PKG process"])
+AC_GHC_PKG_CHECK([process], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([snap-server], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([regex-pcre], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([Crypto], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([text], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([hinotify], [], [HS_NODEV=1])
 if test -n "$HS_NODEV"; then
    AC_MSG_WARN(m4_normalize([Required development modules were not found,
                              you won't be able to run Haskell unittests]))
@@ -764,10 +800,10 @@ if test -n "$PY_NODEV"; then
   AC_MSG_WARN(m4_normalize([Required development modules ($PY_NODEV) were not
                             found, you won't be able to run Python unittests]))
 else
-   AC_MSG_NOTICE([Python development modules found, unittests enabled])
+  AC_MSG_NOTICE([Python development modules found, unittests enabled])
 fi
 AC_SUBST(PY_NODEV)
-AM_CONDITIONAL([PY_NODEV], [test -n $PY_NODEV])
+AM_CONDITIONAL([PY_UNIT], [test -n $PY_NODEV])
 
 AC_CONFIG_FILES([ Makefile ])