]> git.proxmox.com Git - mirror_lxc.git/blobdiff - configure.ac
doc: Update Korean lxc-snapshot(1) for newname option
[mirror_lxc.git] / configure.ac
index 6ee9aaa041fd8c6887c32697ed30a02fdeb109bb..5e9538e4706be321007f2da821406ce79652e455 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 m4_define([lxc_version_major], 1)
-m4_define([lxc_version_minor], 0)
+m4_define([lxc_version_minor], 1)
 m4_define([lxc_version_micro], 0)
 m4_define([lxc_version_beta], [])
 
@@ -59,20 +59,25 @@ if test "z$with_distro" = "z"; then
        with_distro="unknown"
 fi
 case $with_distro in
-       ubuntu)
-               distroconf=default.conf.ubuntu
+       ubuntu|raspbian)
+               distroconf=default.conf.lxcbr
+               distrosysconf="$sysconfdir/default"
                ;;
-       redhat|centos|fedora|oracle|oracleserver)
-               distroconf=default.conf.libvirt
+       redhat|centos|fedora|oracle|oracleserver|suse|opensuse*)
+               distroconf=default.conf.lxcbr
+               distrosysconf="$sysconfdir/sysconfig"
                ;;
        *)
                distroconf=default.conf.unknown
+               distrosysconf="$sysconfdir/default"
                ;;
 esac
 AC_MSG_RESULT([$with_distro])
-AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"])
+AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" -o x"$with_distro" = "xraspbian"])
 AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"])
 
+AC_CONFIG_LINKS([config/etc/default.conf:config/etc/${distroconf}])
+
 # Check for init system type
 AC_MSG_CHECKING([for init system type])
 AC_ARG_WITH([init-script],
@@ -82,17 +87,17 @@ AC_ARG_WITH([init-script],
 case "$with_init_script" in
        distro)
                case $with_distro in
-                       fedora)
+                       fedora|opensuse*)
                                init_script=systemd
                                ;;
                        redhat|centos|oracle|oracleserver)
                                init_script=sysvinit
                                ;;
-                       debian)
+                       debian|raspbian)
                                init_script=upstart,systemd
                                ;;
                        ubuntu)
-                               init_script=upstart
+                               init_script=upstart,systemd
                                ;;
                        *)
                                echo -n "Linux distribution init system unknown."
@@ -122,6 +127,18 @@ AM_CONDITIONAL([INIT_SCRIPT_SYSTEMD], [echo "$init_script" |grep -q "systemd"])
 AM_CONDITIONAL([INIT_SCRIPT_UPSTART], [echo "$init_script" |grep -q "upstart"])
 AC_MSG_RESULT($init_script)
 
+# systemd unit dir
+AC_ARG_WITH([systemdsystemunitdir],
+            AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+            [],
+            [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+if test -z "$with_systemdsystemunitdir"; then
+  with_systemdsystemunitdir=/lib/systemd/system
+fi
+if test "x$with_systemdsystemunitdir" != "xno"; then
+  AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
+fi
+
 # Allow disabling rpath
 AC_ARG_ENABLE([rpath],
        [AC_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
@@ -267,6 +284,17 @@ else
        AC_MSG_RESULT([no])
 fi
 
+AC_MSG_CHECKING(for cgmanager_list_controllers)
+save_LIBS=$LIBS
+AC_SEARCH_LIBS([cgmanager_list_controllers_sync], [cgmanager], [have_list_controllers=yes], [have_list_controllers=no], [-lnih -lnih-dbus -ldbus-1])
+LIBS=$save_LIBS
+if test "x$have_list_controllers" = "xyes"; then
+       AC_DEFINE([HAVE_CGMANAGER_LIST_CONTROLLERS], 1, [Have cgmanager_list_controllers])
+       AC_MSG_RESULT([yes])
+else
+       AC_MSG_RESULT([no])
+fi
+
 # Check for static libcap, make sure the function checked for differs from the
 # the one checked below so the cache doesn't give a wrong answer
 OLD_CFLAGS="$CFLAGS"
@@ -501,12 +529,12 @@ AS_AC_EXPAND(LXC_DEFAULT_CONFIG, "$sysconfdir/lxc/default.conf")
 AS_AC_EXPAND(DATADIR, "$datadir")
 AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
 AS_AC_EXPAND(DOCDIR, "$docdir")
-AS_AC_EXPAND(LXC_DISTRO_CONF, "$distroconf")
 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
 AS_AC_EXPAND(LXCPATH, "$with_config_path")
 AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf")
 AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf")
 AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db")
+AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf")
 AS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path")
 AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates")
 AS_AC_EXPAND(LXCTEMPLATECONFIG, "$datadir/lxc/config")
@@ -516,6 +544,9 @@ AS_AC_EXPAND(LOGPATH, "$with_log_path")
 AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path")
 AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"])
 
+# We need the install path so criu knows where to reference the hook scripts.
+AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."])
+
 # Check for some standard kernel headers
 AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
                                [],
@@ -550,6 +581,7 @@ AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat])
 # Check for some functions
 AC_CHECK_LIB(pthread, main)
 AC_CHECK_FUNCS(pthread_atfork)
+AC_CHECK_FUNCS(statvfs)
 AC_CHECK_LIB(util, openpty)
 AC_CHECK_FUNCS([openpty hasmntopt setmntent endmntent utmpxname])
 AC_CHECK_FUNCS([getline],
@@ -584,18 +616,30 @@ AC_CONFIG_FILES([
 
        config/Makefile
        config/apparmor/Makefile
+       config/selinux/Makefile
        config/bash/Makefile
        config/bash/lxc
        config/init/Makefile
-       config/init/sysvinit/Makefile
-       config/init/sysvinit/lxc
+       config/init/common/Makefile
+       config/init/common/lxc-containers
+       config/init/common/lxc-net
        config/init/systemd/Makefile
        config/init/systemd/lxc.service
+       config/init/systemd/lxc@.service
+       config/init/systemd/lxc-net.service
+       config/init/sysvinit/Makefile
+       config/init/sysvinit/lxc-containers
+       config/init/sysvinit/lxc-net
+       config/init/upstart/lxc-net.conf
        config/init/upstart/Makefile
        config/etc/Makefile
        config/templates/Makefile
+       config/templates/archlinux.common.conf
+       config/templates/archlinux.userns.conf
        config/templates/centos.common.conf
        config/templates/centos.userns.conf
+       config/templates/common.conf
+       config/templates/common.conf.d/Makefile
        config/templates/debian.common.conf
        config/templates/debian.userns.conf
        config/templates/fedora.common.conf
@@ -615,7 +659,11 @@ AC_CONFIG_FILES([
        config/templates/ubuntu.common.conf
        config/templates/ubuntu.lucid.conf
        config/templates/ubuntu.userns.conf
+       config/templates/openwrt.common.conf
+       config/templates/userns.conf
        config/yum/Makefile
+       config/sysconfig/Makefile
+       config/sysconfig/lxc
 
        doc/Makefile
        doc/api/Makefile
@@ -624,6 +672,7 @@ AC_CONFIG_FILES([
        doc/lxc-autostart.sgml
        doc/lxc-cgroup.sgml
        doc/lxc-checkconfig.sgml
+       doc/lxc-checkpoint.sgml
        doc/lxc-clone.sgml
        doc/lxc-config.sgml
        doc/lxc-console.sgml
@@ -671,6 +720,7 @@ AC_CONFIG_FILES([
        doc/ja/lxc-autostart.sgml
        doc/ja/lxc-cgroup.sgml
        doc/ja/lxc-checkconfig.sgml
+       doc/ja/lxc-checkpoint.sgml
        doc/ja/lxc-clone.sgml
        doc/ja/lxc-config.sgml
        doc/ja/lxc-console.sgml
@@ -701,6 +751,43 @@ AC_CONFIG_FILES([
        doc/ja/common_options.sgml
        doc/ja/see_also.sgml
 
+       doc/ko/Makefile
+       doc/ko/legacy/lxc-ls.sgml
+       doc/ko/lxc-attach.sgml
+       doc/ko/lxc-autostart.sgml
+       doc/ko/lxc-cgroup.sgml
+       doc/ko/lxc-checkconfig.sgml
+       doc/ko/lxc-checkpoint.sgml
+       doc/ko/lxc-clone.sgml
+       doc/ko/lxc-config.sgml
+       doc/ko/lxc-console.sgml
+       doc/ko/lxc-create.sgml
+       doc/ko/lxc-destroy.sgml
+       doc/ko/lxc-device.sgml
+       doc/ko/lxc-execute.sgml
+       doc/ko/lxc-freeze.sgml
+       doc/ko/lxc-info.sgml
+       doc/ko/lxc-ls.sgml
+       doc/ko/lxc-monitor.sgml
+       doc/ko/lxc-snapshot.sgml
+       doc/ko/lxc-start-ephemeral.sgml
+       doc/ko/lxc-start.sgml
+       doc/ko/lxc-stop.sgml
+       doc/ko/lxc-top.sgml
+       doc/ko/lxc-unfreeze.sgml
+       doc/ko/lxc-unshare.sgml
+       doc/ko/lxc-user-nic.sgml
+       doc/ko/lxc-usernsexec.sgml
+       doc/ko/lxc-wait.sgml
+
+       doc/ko/lxc.conf.sgml
+       doc/ko/lxc.container.conf.sgml
+       doc/ko/lxc.system.conf.sgml
+       doc/ko/lxc-usernet.sgml
+       doc/ko/lxc.sgml
+       doc/ko/common_options.sgml
+       doc/ko/see_also.sgml
+
        hooks/Makefile
 
        templates/Makefile
@@ -731,6 +818,7 @@ AC_CONFIG_FILES([
        src/lxc/lxc.functions
        src/lxc/version.h
        src/python-lxc/Makefile
+       src/python-lxc/setup.py
 
        src/lua-lxc/Makefile