summaryrefslogtreecommitdiffstats
path: root/src/modules/rlm_pam/configure.ac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:11:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:11:00 +0000
commitaf754e596a8dbb05ed8580c342e7fe02e08b28e0 (patch)
treeb2f334c2b55ede42081aa6710a72da784547d8ea /src/modules/rlm_pam/configure.ac
parentInitial commit. (diff)
downloadfreeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.tar.xz
freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.zip
Adding upstream version 3.2.3+dfsg.upstream/3.2.3+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/modules/rlm_pam/configure.ac')
-rw-r--r--src/modules/rlm_pam/configure.ac50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/modules/rlm_pam/configure.ac b/src/modules/rlm_pam/configure.ac
new file mode 100644
index 0000000..9f69845
--- /dev/null
+++ b/src/modules/rlm_pam/configure.ac
@@ -0,0 +1,50 @@
+AC_PREREQ([2.69])
+AC_INIT
+AC_CONFIG_SRCDIR([rlm_pam.c])
+AC_REVISION($Revision$)
+FR_INIT_MODULE([rlm_pam], [support for PAM authentication])
+
+FR_MODULE_START_TESTS
+
+AC_PROG_CC
+AC_PROG_CPP
+
+AC_CHECK_LIB(dl, dlopen,
+ [ mod_ldflags="-ldl" ]
+)
+
+AC_CHECK_LIB(pam, pam_start,
+ [ mod_ldflags="-lpam $mod_ldflags" ],
+ [ FR_MODULE_FAIL([libpam]) ],
+ [ $mod_ldflags ]
+)
+
+dnl #
+dnl # Yes, these DO have to be on separate lines,
+dnl # otherwise autoheader won't pick them up.
+dnl #
+AC_CHECK_HEADERS( \
+ security/pam_appl.h \
+ pam/pam_appl.h \
+ )
+
+AC_CHECK_HEADERS(security/pam_modules.h pam/pam_modules.h, [], [],
+[
+ #ifdef HAVE_SECURITY_PAM_APPL_H
+ # include <security/pam_appl.h>
+ #endif
+ #ifdef HAVE_PAM_PAM_APPL_H
+ # include <pam/pam_appl.h>
+ #endif
+]
+)
+mod_cflags="-I."
+
+FR_MODULE_END_TESTS
+
+AC_SUBST(mod_ldflags)
+AC_SUBST(mod_cflags)
+
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_FILES([all.mk])
+AC_OUTPUT