-
-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