]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - configure.ac
configure.ac: release 2.0.0.beta1
[mirror_lxcfs.git] / configure.ac
index d2ae44d0205ee8d5e7a5fdc6a32905bcebef71c8..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.15], [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([
@@ -40,4 +42,42 @@ 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