aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDennis Kaarsemaker <dennis@kaarsemaker.net>2016-02-23 19:52:32 +0100
committerDennis Kaarsemaker <dennis@kaarsemaker.net>2016-03-25 19:07:53 +0100
commita6005da78ae1563ae4577179d1e54fff74cfe21a (patch)
tree5429777b8c47b3a33f0213952c8b6de932974e89 /configure
parent8e6ecfe23ff985e57675bd00b94860edb62de9ad (diff)
Linux pam authentication backend
This backend authenticates users against pam.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure b/configure
index 8089d1a2..4c08b034 100755
--- a/configure
+++ b/configure
@@ -51,6 +51,8 @@ skype=0
events=glib
ssl=auto
+pam=0
+
pie=1
arch=$(uname -s)
@@ -133,6 +135,8 @@ Option Description Default
--purple=0/1 Disable/enable libpurple support $purple
(automatically disables other protocol modules)
+--pam=0/1 Disable/enable PAM authentication $pam
+
--doc=0/1 Disable/enable help.txt generation $doc
--debug=0/1 Disable/enable debugging $debug
--strip=0/1 Disable/enable binary stripping $strip
@@ -630,6 +634,17 @@ echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
authobjs=
authlibs=
+if [ "$pam" = 0 ]; then
+ echo '#undef WITH_PAM' >> config.h
+else
+ if ! echo '#include <security/pam_appl.h>' | $CC -E - >/dev/null 2>/dev/null; then
+ echo 'Cannot find libpam development libraries, aborting. (Install libpam0g-dev?)'
+ exit 1
+ fi
+ echo '#define WITH_PAM' >> config.h
+ authobjs=$authobjs'auth_pam.o '
+ authlibs=$authlibs'-lpam '
+fi
echo AUTH_OBJS=$authobjs >> Makefile.settings
echo EFLAGS+=$authlibs >> Makefile.settings