* Fix PLIST when "ldap" is enabled in PKG_OPTIONS.
[pkgsrc.git] / security / sudo / patches / patch-af
1 $NetBSD: patch-af,v 1.25 2010/09/10 17:11:27 spz Exp $
2
3 * Add "--with-nbsdops" option, NetBSD standard options.
4 * Link with util(3) in the case of DragonFly, too.
5 * When specified "--with-kerb5" option, test existence of several functions
6   even if there is krb5-config.  krb5-config dosen't give all definitions for
7   functions (HAVE_KRB5_*).
8 * Remove setting sysconfdir to "/etc".
9
10 --- configure.in.orig   2010-09-06 12:03:33.000000000 +0000
11 +++ configure.in
12 @@ -322,6 +322,18 @@ AC_ARG_WITH(csops, [AS_HELP_STRING([--wi
13                 ;;
14  esac])
15  
16 +AC_ARG_WITH(nbsdops, [AS_HELP_STRING([--with-nbsdops], [add NetBSD standard options])],
17 +[case $with_nbsdops in
18 +    yes)       echo 'Adding NetBSD standard options'
19 +               CHECKSIA=false
20 +               with_ignore_dot=yes
21 +               with_env_editor=yes
22 +               with_tty_tickets=yes
23 +               ;;
24 +    no)                ;;
25 +    *)         echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
26 +               ;;
27 +esac])
28  AC_ARG_WITH(passwd, [AS_HELP_STRING([--without-passwd], [don't use passwd/shadow file for authentication])],
29  [case $with_passwd in
30      yes|no)    AC_MSG_CHECKING(whether to use shadow/passwd file authentication)
31 @@ -1865,7 +1877,7 @@ SUDO_MAILDIR
32  if test ${with_logincap-'no'} != "no"; then
33      AC_CHECK_HEADERS(login_cap.h, [LOGINCAP_USAGE='[[-c class|-]] '; LCMAN=1
34         case "$OS" in
35 -           freebsd|netbsd)     SUDO_LIBS="${SUDO_LIBS} -lutil"
36 +           dragonfly*|freebsd*|netbsd*)        SUDO_LIBS="${SUDO_LIBS} -lutil"
37             ;;
38         esac
39      ])
40 @@ -2370,6 +2382,8 @@ if test ${with_kerb5-'no'} != "no" -a -z
41             AC_CHECK_LIB(krb5support, main, [SUDO_LIBS="${SUDO_LIBS} -lkrb5support"])
42      ])
43      AUTH_OBJS="$AUTH_OBJS kerb5.o"
44 +fi
45 +if test ${with_kerb5-'no'} != "no"; then
46      _LIBS="$LIBS"
47      LIBS="${LIBS} ${SUDO_LIBS}"
48      AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context)
49 @@ -2798,7 +2812,6 @@ test "$libexecdir" = '${exec_prefix}/lib
50  test "$includedir" = '${prefix}/include' && includedir='$(prefix)/include'
51  test "$datarootdir" = '${prefix}/share' && datarootdir='$(prefix)/share'
52  test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
53 -test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
54  
55  dnl
56  dnl Substitute into the Makefile and man pages