Fix PAM for Arch

This commit is contained in:
Raymond Li 2020-08-05 00:57:41 -04:00
parent e3ffaba058
commit 03832398f8
No known key found for this signature in database
GPG Key ID: A014EA89B62BBB1B
2 changed files with 8 additions and 6 deletions

1
.gitignore vendored
View File

@ -32,3 +32,4 @@ Makefile.in
/missing
/stamp-h1
*.in~
pam/i3lock

View File

@ -77,6 +77,13 @@ AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_ru
AC_SEARCH_LIBS([shm_open], [rt])
# Use system-auth instead of login on Arch (TODO: Implement Gentoo as well)
if [[ -f /etc/arch-release ]]; then
echo "Using PAM for Arch"
sed -i "s/^#auth include system-auth/auth include system-auth/g" ../pam/i3lock
sed -i "s/^auth include login/#auth include login/g" ../pam/i3lock
fi
# Only disable PAM on OpenBSD where i3lock uses BSD Auth instead
case "$host" in
*-openbsd*)
@ -87,12 +94,6 @@ case "$host" in
;;
esac
# Use system-auth instead of login on Arch (TODO: Implement Gentoo as well)
if [[ -f /etc/arch-release ]]; then
sed -i "s/^#auth include system-auth/auth include system-auth/g" pam/i3lock
sed -i "s/^auth include login/#auth include login/g" pam/i3lock
fi
AC_SEARCH_LIBS([iconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])])
dnl Each prefix corresponds to a source tarball which users might have