]> git.proxmox.com Git - mirror_lxcfs.git/blob - configure.ac
configure.ac: release 2.0.0.beta1
[mirror_lxcfs.git] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ(2.61)
4 AC_INIT([lxcfs], [2.0.0.beta1], [lxc-devel@lists.linuxcontainers.org])
5 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
6 AC_CONFIG_MACRO_DIR([m4])
7
8 AM_INIT_AUTOMAKE([subdir-objects -Wno-portability])
9
10 AC_GNU_SOURCE
11 AC_CONFIG_HEADERS([config.h])
12 AC_CONFIG_FILES([
13 Makefile
14 share/Makefile
15 share/00-lxcfs.conf
16 share/lxc.mount.hook
17 share/lxc.reboot.hook
18 tests/Makefile ])
19
20 AM_INIT_AUTOMAKE
21
22 LT_INIT
23 AC_PROG_CC
24
25 AC_PROG_CC_C99
26
27 AC_CHECK_LIB(pthread, main)
28
29 PKG_CHECK_MODULES(FUSE, fuse)
30
31 AC_PATH_PROG(HELP2MAN, help2man, false // No help2man //)
32 AM_CONDITIONAL([HAVE_HELP2MAN], [test "x$HELP2MAN" != "xfalse // No help2man //" ])
33
34 AC_ARG_WITH([runtime-path],
35 [AC_HELP_STRING(
36 [--with-runtime-path=dir],
37 [runtime directory (default: /run)]
38 )], [], [with_runtime_path=['/run']])
39
40 AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path")
41 AS_AC_EXPAND(LXCFSSHAREDIR, "$datarootdir/lxcfs")
42 AS_AC_EXPAND(LXCCONFDIR, "$datarootdir/lxc/config/common.conf.d")
43 AS_AC_EXPAND(LXCFSTARGETDIR, "$localstatedir/lib/lxcfs")
44
45 AC_ARG_WITH(
46 [pamdir],
47 [AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored,
48 or "none" if PAM modules are not to be built])],
49 [pamdir="${withval}"],
50 [
51 if test "${prefix}" = "/usr"; then
52 pamdir="/lib${libdir##*/lib}/security"
53 else
54 pamdir="\$(libdir)/security"
55 fi
56 ]
57 )
58
59 AM_CONDITIONAL([HAVE_PAM], [test x"$pamdir" != "xnone"])
60 if test "z$pamdir" != "znone"; then
61 AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
62 AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
63 AC_CHECK_LIB(
64 [pam],
65 [pam_authenticate],
66 [PAM_LIBS="-lpam"],
67 [AC_MSG_ERROR([*** libpam not found.])
68 ])
69
70 AC_SUBST(PAM_LIBS)
71 AC_SUBST([pamdir])
72 fi
73
74 # Rootfs path, where the container mount structure is assembled
75 AC_ARG_WITH([rootfs-path],
76 [AC_HELP_STRING(
77 [--with-rootfs-path=dir],
78 [lxc rootfs mount point]
79 )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
80
81 AS_AC_EXPAND(LIBDIR, "$libdir")
82
83 AC_OUTPUT