ZTS: Fix send_partial_dataset.ksh
[zfs.git] / config / user-pam.m4
blob9db35808c340f5a9f8eaa21e600b514e9916bc61
1 AC_DEFUN([ZFS_AC_CONFIG_USER_PAM], [
2         AC_ARG_ENABLE([pam],
3                 AS_HELP_STRING([--enable-pam],
4                 [install pam_zfs_key module [[default: check]]]),
5                 [enable_pam=$enableval],
6                 [enable_pam=check])
8         AC_ARG_WITH(pammoduledir,
9                 AS_HELP_STRING([--with-pammoduledir=DIR],
10                 [install pam module in dir [[$libdir/security]]]),
11                 [pammoduledir="$withval"],[pammoduledir=$libdir/security])
13         AC_ARG_WITH(pamconfigsdir,
14                 AS_HELP_STRING([--with-pamconfigsdir=DIR],
15                 [install pam-config files in dir [DATADIR/pam-configs]]),
16                 [pamconfigsdir="$withval"],
17                 [pamconfigsdir='${datadir}/pam-configs'])
19         AS_IF([test "x$enable_pam" != "xno"], [
20                 AC_CHECK_HEADERS([security/pam_modules.h], [
21                         enable_pam=yes
22                 ], [
23                         AS_IF([test "x$enable_pam" = "xyes"], [
24                                 AC_MSG_FAILURE([
25         *** security/pam_modules.h missing, libpam0g-dev package required
26                                 ])
27                         ],[
28                                 enable_pam=no
29                         ])
30                 ])
31         ])
32         AS_IF([test "x$enable_pam" = "xyes"], [
33                 DEFINE_PAM='--with pam'
34         ])
35         AC_SUBST(DEFINE_PAM)
36         AC_SUBST(pammoduledir)
37         AC_SUBST(pamconfigsdir)