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