2
# Copyright (C) 2002 W. Michael Petullo <mike@flyn.org>
3
# Copyright © Jan Engelhardt, 2005 - 2010
5
# This file is part of pam_mount; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
AC_INIT([pam_mount], [2.8])
11
PACKAGE_RELDATE="2010-12-22"
13
AC_CONFIG_HEADERS([config.h])
14
AC_CONFIG_MACRO_DIR([m4])
16
AM_INIT_AUTOMAKE([-Wall no-dist foreign subdir-objects])
23
AC_ARG_WITH([slibdir], AS_HELP_STRING([--with-slibdir=PATH],
24
[Path to the super lib directory [[/lib]]]),
25
[slibdir="$withval"], [slibdir="/lib"])
27
AC_ARG_WITH([ssbindir], AS_HELP_STRING([--with-ssbindir=PATH],
28
[Path to the super sbin directory [[/sbin]]]),
29
[ssbindir="$withval"], [ssbindir="/sbin"])
31
AC_ARG_WITH([dtd], AS_HELP_STRING([--with-dtd],
32
[Install XML DTD file]),
33
[with_dtd=true], [with_dtd=false])
34
AC_ARG_WITH([selinux], AS_HELP_STRING([--with-selinux],
35
[Install selinux files]),
36
[with_selinux=true], [with_selinux=false])
37
AC_ARG_ENABLE([la], AS_HELP_STRING([--enable-la],
38
[Install .la file (used for distcheck)]),
39
[keep_la=true], [keep_la=false])
40
AM_CONDITIONAL([KEEP_LA], [test "x$keep_la" = "xtrue"])
41
AM_CONDITIONAL([SELINUX], [test "x$with_selinux" = "xtrue"])
42
AM_CONDITIONAL([WITH_DTD], [test "x$with_dtd" = "xtrue"])
46
regular_CFLAGS="-D_FILE_OFFSET_BITS=64 \
47
-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
48
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
50
AC_SUBST([regular_CFLAGS])
52
AC_CHECK_HEADERS([linux/fs.h linux/major.h dev/cgdvar.h dev/vndvar.h])
53
AC_CHECK_HEADERS([sys/mdioctl.h sys/mount.h sys/statvfs.h])
54
AC_CHECK_MEMBERS([struct loop_info64.lo_file_name], [], [],
55
[#include <linux/loop.h>])
56
AC_CHECK_FUNCS([getmntent getmntinfo getgrouplist getgroups setgroups])
57
AM_CONDITIONAL([HAVE_CGD], [test "x$ac_cv_header_dev_cgdvar_h" = "xyes"])
58
AM_CONDITIONAL([HAVE_MDIO], [test "x$ac_cv_header_sys_mdioctl_h" = "xyes"])
59
AM_CONDITIONAL([HAVE_VND], [test "x$ac_cv_header_dev_vndvar_h" = "xyes"])
61
PKG_CHECK_MODULES([libHX], [libHX >= 3.6])
62
PKG_CHECK_MODULES([libxml], [libxml-2.0 >= 2.6])
67
AS_HELP_STRING([--without-crypto], [Disable use of OpenSSL cryptography]),
72
with_cryptsetup="yes";
73
AC_ARG_WITH([cryptsetup],
74
AS_HELP_STRING([--without-cryptsetup], [Disable use of libcryptsetup]),
76
[with_cryptsetup="no"]
79
if test "x$with_crypto" = "xyes"; then
80
PKG_CHECK_MODULES([libcrypto], [libcrypto >= 0.9.8],
81
[AC_DEFINE_UNQUOTED([HAVE_LIBCRYPTO], [1],
82
[OpenSSL libcrypto available])])
84
AM_CONDITIONAL([HAVE_LIBCRYPTO], [test "x$with_crypto" = xyes])
86
if test "x$with_cryptsetup" = "xyes"; then
87
PKG_CHECK_MODULES([libcryptsetup], [libcryptsetup >= 1.1.2],
88
[AC_DEFINE_UNQUOTED([HAVE_LIBCRYPTSETUP], [1],
89
[libcryptsetup available])])
91
AM_CONDITIONAL([HAVE_LIBCRYPTSETUP], [test "x$with_cryptsetup" = xyes])
93
AC_CHECK_HEADERS([security/pam_modules.h], [have_pamheader="yes"])
94
# Mac OS X 10.3 puts PAM headers in /usr/include/pam.
95
AC_CHECK_HEADERS([pam/pam_modules.h], [have_pamheader="yes"])
96
if test x"$have_pamheader" != x"yes"; then
97
AC_MSG_ERROR([You are missing PAM headers])
101
(*-*-linux*|*-*-openbsd*)
102
PAM_MODDIR='${slibdir}/security'
104
(*-*-solaris*|*-*-netbsd*)
105
PAM_MODDIR='${libdir}/security';
108
PAM_MODDIR='${libdir}/pam';
111
PAM_MODDIR='${libdir}';
114
AC_SUBST([PAM_MODDIR])
116
AC_SUBST([PACKAGE_RELDATE])
117
AC_CONFIG_FILES([Makefile config/Makefile doc/Makefile src/Makefile])