]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - configure.ac
configure.ac: release 2.0.0.beta1
[mirror_lxcfs.git] / configure.ac
index 6216bf01731637710fc8270fe9d027cfcecbbe17..b611c393c069d9d239d96e7f64ad60eb63f92443 100644 (file)
@@ -1,10 +1,12 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.61)
-AC_INIT([lxcfs], [0.10], [lxc-devel@lists.linuxcontainers.org])
+AC_INIT([lxcfs], [2.0.0.beta1], [lxc-devel@lists.linuxcontainers.org])
 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
 AC_CONFIG_MACRO_DIR([m4])
 
+AM_INIT_AUTOMAKE([subdir-objects -Wno-portability])
+
 AC_GNU_SOURCE
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([
@@ -12,6 +14,7 @@ AC_CONFIG_FILES([
        share/Makefile
        share/00-lxcfs.conf
        share/lxc.mount.hook
+       share/lxc.reboot.hook
        tests/Makefile ])
 
 AM_INIT_AUTOMAKE
@@ -23,17 +26,58 @@ AC_PROG_CC_C99
 
 AC_CHECK_LIB(pthread, main)
 
-PKG_CHECK_MODULES([GLIB], [glib-2.0])
-PKG_CHECK_MODULES([GLIBDBUS], [dbus-glib-1])
-PKG_CHECK_MODULES(GIO, gio-2.0)
-PKG_CHECK_MODULES([CGMANAGER], [libcgmanager >= 0.0.0])
 PKG_CHECK_MODULES(FUSE, fuse)
 
 AC_PATH_PROG(HELP2MAN, help2man, false // No help2man //)
 AM_CONDITIONAL([HAVE_HELP2MAN], [test "x$HELP2MAN" != "xfalse // No help2man //" ])
 
+AC_ARG_WITH([runtime-path],
+       [AC_HELP_STRING(
+               [--with-runtime-path=dir],
+               [runtime directory (default: /run)]
+       )], [], [with_runtime_path=['/run']])
+
+AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path")
 AS_AC_EXPAND(LXCFSSHAREDIR, "$datarootdir/lxcfs")
 AS_AC_EXPAND(LXCCONFDIR, "$datarootdir/lxc/config/common.conf.d")
 AS_AC_EXPAND(LXCFSTARGETDIR, "$localstatedir/lib/lxcfs")
 
+AC_ARG_WITH(
+       [pamdir],
+       [AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored,
+                                               or "none" if PAM modules are not to be built])],
+       [pamdir="${withval}"],
+       [
+               if test "${prefix}" = "/usr"; then
+                       pamdir="/lib${libdir##*/lib}/security"
+               else
+                       pamdir="\$(libdir)/security"
+               fi
+       ]
+)
+
+AM_CONDITIONAL([HAVE_PAM], [test x"$pamdir" != "xnone"])
+if test "z$pamdir" != "znone"; then
+       AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
+       AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
+       AC_CHECK_LIB(
+               [pam],
+               [pam_authenticate],
+               [PAM_LIBS="-lpam"],
+               [AC_MSG_ERROR([*** libpam not found.])
+               ])
+
+       AC_SUBST(PAM_LIBS)
+       AC_SUBST([pamdir])
+fi
+
+# Rootfs path, where the container mount structure is assembled
+AC_ARG_WITH([rootfs-path],
+       [AC_HELP_STRING(
+               [--with-rootfs-path=dir],
+               [lxc rootfs mount point]
+       )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
+
+AS_AC_EXPAND(LIBDIR, "$libdir")
+
 AC_OUTPUT