Initial version of the patches
[transmission-rpc-pam.git] / configure.ac.patch
1 Index: configure.ac
2 ===================================================================
3 --- configure.ac        (revision 13057)
4 +++ configure.ac        (working copy)
5 @@ -311,6 +311,27 @@
6  
7  dnl ----------------------------------------------------------------------------
8  dnl
9 +dnl  native RPC authentication
10 +
11 +AC_ARG_ENABLE([native-rpc-auth],
12 +              AS_HELP_STRING([--enable-native-rpc-auth],[enable native user authentication for RPC]),
13 +              [enable_native_rpc_auth=yes])
14 +
15 +if test "x$enable_native_rpc_auth" == "xyes"; then
16 +    AC_CHECK_LIB([pam],[],
17 +                       [AC_MSG_ERROR(PAM library not found!)])
18 +    AC_CHECK_HEADER([security/pam_appl.h],[],
19 +                    [AC_MSG_ERROR(security/pam_appl.h not found!)])
20 +    AC_DEFINE([HAVE_NATIVE_AUTH_ENABLED], 1)
21 +    LIBPAM_CFLAGS=""
22 +    LIBPAM_LIBS="-lpam"
23 +fi
24 +    AC_SUBST(LIBPAM_CFLAGS)
25 +    AC_SUBST(LIBPAM_LIBS)
26 +
27 +
28 +dnl ----------------------------------------------------------------------------
29 +dnl
30  dnl  detection for the GTK+ client
31  
32