]> git.proxmox.com Git - mirror_lxc.git/blobdiff - configure.ac
lxc-user-nic: specify config and db files in autoconf
[mirror_lxc.git] / configure.ac
index 7dc82cfbcb8db10be6758e5298d3ac93b312feaa..cdf529041d7457cf8f4ad74d46a4e9c999fdd576 100644 (file)
@@ -39,19 +39,22 @@ if test "z$with_distro" = "z"; then
 fi
 case $with_distro in
        ubuntu)
-               defaultconf=default.conf.ubuntu
+               distroconf=default.conf.ubuntu
                ;;
        redhat|fedora|oracle|oracleserver)
-               defaultconf=default.conf.libvirt
+               distroconf=default.conf.libvirt
                ;;
        *)
                echo -n "Linux distribution network config unknown, defaulting to lxc.network.type = empty"
-               defaultconf=default.conf.unknown
+               distroconf=default.conf.unknown
                ;;
 esac
 AC_MSG_RESULT([$with_distro])
 AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"])
 
+AC_CHECK_PROG([NEWUIDMAP], [newuidmap], [newuidmap])
+AM_CONDITIONAL([HAVE_NEWUIDMAP], [test -n "$NEWUIDMAP"])
+
 # Allow disabling rpath
 AC_ARG_ENABLE([rpath],
        [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])],
@@ -60,14 +63,15 @@ AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
 
 # Documentation (manpages)
 AC_ARG_ENABLE([doc],
-       [AC_HELP_STRING([--enable-doc], [make mans (require docbook2x-man installed) [default=auto]])],
+       [AC_HELP_STRING([--enable-doc], [make mans (requires docbook2man or docbook2x-man to be installed) [default=auto]])],
        [], [enable_doc=auto])
 
 if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
        db2xman=""
+       dbparsers="docbook2x-man db2x_docbook2man docbook2man"
 
        AC_MSG_CHECKING(for docbook2x-man)
-       for name in docbook2x-man db2x_docbook2man; do
+       for name in ${dbparsers}; do
                if "$name" --help >/dev/null 2>&1; then
                        db2xman="$name"
                        break;
@@ -87,6 +91,13 @@ if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
 fi
 AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$db2xman" != "x"])
 
+if test "x$db2xman" = "xdocbook2man"; then
+       docdtd="\"-//Davenport//DTD DocBook V3.0//EN\""
+else
+       docdtd="\"-//OASIS//DTD DocBook XML\" \"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""
+fi
+AC_SUBST(docdtd)
+
 # Apparmor
 AC_ARG_ENABLE([apparmor],
        [AC_HELP_STRING([--enable-apparmor], [enable apparmor])],
@@ -97,6 +108,8 @@ if test "$enable_apparmor" = "check" ; then
 fi
 AM_CONDITIONAL([ENABLE_APPARMOR], [test "x$enable_apparmor" = "xyes"])
 
+AC_CHECK_LIB([gnutls], [gnutls_hash_fast])
+
 AM_COND_IF([ENABLE_APPARMOR],
        [AC_CHECK_HEADER([sys/apparmor.h],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])])
        AC_CHECK_LIB([apparmor], [aa_change_profile],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])])
@@ -176,6 +189,18 @@ AC_ARG_WITH([global-conf],
                [global lxc configuration file]
        )], [], [with_global_conf=['${sysconfdir}/lxc/lxc.conf']])
 
+AC_ARG_WITH([usernic-conf],
+       [AC_HELP_STRING(
+               [--with-usernic-conf],
+               [user network interface configuration file]
+       )], [], [with_usernic_conf=['${sysconfdir}/lxc/lxc-usernet']])
+
+AC_ARG_WITH([usernic-db],
+       [AC_HELP_STRING(
+               [--with-usernic-db],
+               [lxc user nic database]
+       )], [], [with_usernic_db=['/run/lxc/nics']])
+
 # Rootfs path, where the container mount structure is assembled
 AC_ARG_WITH([rootfs-path],
        [AC_HELP_STRING(
@@ -210,13 +235,16 @@ AS_AC_EXPAND(BINDIR, "$bindir")
 AS_AC_EXPAND(LIBEXECDIR, "$libexecdir")
 AS_AC_EXPAND(INCLUDEDIR, "$includedir")
 AS_AC_EXPAND(SYSCONFDIR, "$sysconfdir")
+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_DEFAULT_CONF, "$defaultconf")
+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(LXCROOTFSMOUNT, "$with_rootfs_path")
 AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates")
 AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks")
@@ -326,7 +354,6 @@ AC_CONFIG_FILES([
        doc/lxc-netstat.sgml
        doc/lxc-ps.sgml
        doc/lxc-restart.sgml
-       doc/lxc-shutdown.sgml
        doc/lxc-start-ephemeral.sgml
        doc/lxc-start.sgml
        doc/lxc-stop.sgml
@@ -355,6 +382,7 @@ AC_CONFIG_FILES([
        hooks/Makefile
 
        templates/Makefile
+       templates/lxc-cirros
        templates/lxc-debian
        templates/lxc-ubuntu
        templates/lxc-ubuntu-cloud
@@ -373,11 +401,7 @@ AC_CONFIG_FILES([
        src/lxc/lxc-netstat
        src/lxc/lxc-checkconfig
        src/lxc/lxc-version
-       src/lxc/lxc-create
-       src/lxc/lxc-clone
-       src/lxc/lxc-shutdown
        src/lxc/lxc-start-ephemeral
-       src/lxc/lxc-destroy
        src/lxc/legacy/lxc-ls
        src/lxc/lxc.functions