> # Check libpam for pam_start()
> AC_CHECK_LIB(pam, pam_start,
check for pam_start() in libpam
> LIBS="-lpam $LIBDL $LIBS"
> # Why check again ?
These three lines are the "ACTION-IF-FOUND" part of AC_CHECK_LIB (note
the comma at the end): if pam_start() was found, define HAVE_PAM=1,
define LIBS="-lpam $LIBDL $LIBS", and also check for pam_setcred().
As HAVE_PAM is not made to depend on the outcome of the check for
pam_setcred(), your code will deal with the case that pam_setcred()
is not available, i.e.
/* Roll our own */
int pam_setcred(pam_handle_t *pamh, int flags)
This is the "ACTION-IF-NOT-FOUND" part of AC_CHECK_LIB(pam, pam_start ...)
The "OTHER-LIBRARIES" part, a space-separated list of libraries needed
to link -lpam.
> AC_SUBST(LIBDL) # Is this adding those flags to the LIBS line or something ?
> AM_CONDITIONAL(HAVE_PAM, test "$HAVE_PAM" = 1) # What these mean ?
> if test "$HAVE_PAM" = 1
> then # I get lost here...
> STATIC_LIST="$STATIC_LIST AUTHSTATIC(\"authpam\", auth_pam, auth_pam_pre)"
> LIBAUTH="$LIBAUTH libauth-authpam.a"
No idea about AUTSTATIC(). May be defined in acinclude.m4 (deprecated),
aclocal.m4, or even some other m4 config files (typically living in the
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!