pkgsrc/net/samba/patches/patch-au
sborrill 3e0764bd36 Rework detection of getifaddrs() code so that it precedes the AIX method as
AIX method was being chosen in preference (on NetBSD 5.0 at least). This
broke net and rpcclient, etc. as they failed to enumerate interfaces
correctly.
2009-03-03 17:50:49 +00:00

161 lines
5.2 KiB
Text

$NetBSD: patch-au,v 1.10 2009/03/03 17:50:49 sborrill Exp $
--- configure.in.orig 2008-08-25 22:09:21.000000000 +0100
+++ configure.in 2009-03-03 17:11:54.000000000 +0000
@@ -38,6 +38,7 @@
rootsbindir="\${SBINDIR}"
lockdir="\${VARDIR}/locks"
+statedir="\${VARDIR}/locks"
piddir="\${VARDIR}/locks"
test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
@@ -51,7 +52,8 @@
[ --with-fhs Use FHS-compliant paths (default=no)],
[ case "$withval" in
yes)
- lockdir="\${VARDIR}/lib/samba"
+ lockdir="\${VARDIR}/run/samba"
+ statedir="\${VARDIR}/lib/samba"
piddir="\${VARDIR}/run"
mandir="\${prefix}/share/man"
logfilebase="\${VARDIR}/log/samba"
@@ -111,6 +113,22 @@
esac])
#################################################
+# set state directory location
+AC_ARG_WITH(statedir,
+[ --with-statedir=DIR Where to put state files ($ac_default_prefix/var/locks)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-statedir called without argument - will use default])
+ ;;
+ * )
+ statedir="$withval"
+ ;;
+ esac])
+
+#################################################
# set pid directory location
AC_ARG_WITH(piddir,
[ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
@@ -257,6 +275,7 @@
AC_SUBST(configdir)
AC_SUBST(lockdir)
+AC_SUBST(statedir)
AC_SUBST(piddir)
AC_SUBST(logfilebase)
AC_SUBST(privatedir)
@@ -1242,7 +1261,7 @@
AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf)
AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
AC_CHECK_FUNCS(getpwent_r)
-AC_CHECK_FUNCS(getdents getdents64)
+AC_CHECK_FUNCS(getdents getdents64 getpwent_r)
AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink)
AC_CHECK_FUNCS(syslog vsyslog timegm)
AC_CHECK_FUNCS(setlocale nl_langinfo)
@@ -2821,6 +2840,20 @@
##################
# look for a method of finding the list of network interfaces
iface=no;
+AC_CACHE_CHECK([for iface ifaddrs],samba_cv_HAVE_IFACE_IFADDRS,[
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
+AC_TRY_RUN([
+#define HAVE_IFACE_IFADDRS 1
+#define AUTOCONF_TEST 1
+#include "${srcdir-.}/lib/interfaces.c"],
+ samba_cv_HAVE_IFACE_IFADDRS=yes,samba_cv_HAVE_IFACE_IFADDRS=no,samba_cv_HAVE_IFACE_IFADDRS=cross)])
+CPPFLAGS="$SAVE_CPPFLAGS"
+if test x"$samba_cv_HAVE_IFACE_IFADDRS" = x"yes"; then
+ iface=yes;AC_DEFINE(HAVE_IFACE_IFADDRS,1,[Whether iface ifaddrs is available])
+fi
+
+if test $iface = no; then
AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
@@ -2834,6 +2867,7 @@
if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
fi
+fi
if test $iface = no; then
AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[
@@ -3526,7 +3560,7 @@
AC_CHECK_LIB_EXT(k5crypto, KRB5_LIBS, krb5_encrypt_data)
# Heimdal checks.
- AC_CHECK_LIB_EXT(crypto, KRB5_LIBS, des_set_key)
+ AC_CHECK_LIB_EXT(crypto, KRB5_LIBS, EVP_des_cbc)
AC_CHECK_LIB_EXT(asn1, KRB5_LIBS, copy_Authenticator)
AC_CHECK_LIB_EXT(roken, KRB5_LIBS, roken_getaddrinfo_hostspec)
@@ -5771,31 +5805,39 @@
NSSSONAMEVERSIONSUFFIX=".2"
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
;;
- *freebsd[[5-9]]*)
- # FreeBSD winbind client is implemented as a wrapper around
- # the Linux version.
- NSSSONAMEVERSIONSUFFIX=".1"
- WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_freebsd.o \
- nsswitch/winbind_nss_linux.o"
- WINBIND_NSS="nsswitch/nss_winbind.$SHLIBEXT"
- WINBIND_WINS_NSS="nsswitch/nss_wins.$SHLIBEXT"
- ;;
-
- *netbsd*[[3-9]]*)
- # NetBSD winbind client is implemented as a wrapper
- # around the Linux version. It needs getpwent_r() to
- # indicate libc's use of the correct nsdispatch API.
- #
- if test x"$ac_cv_func_getpwent_r" = x"yes"; then
- WINBIND_NSS_EXTRA_OBJS="\
- nsswitch/winbind_nss_netbsd.o \
+ *freebsd*)
+ case "$UNAME_R" in
+ [[5-9]]*)
+ # FreeBSD winbind client is implemented as a wrapper
+ # around the Linux version.
+ NSSSONAMEVERSIONSUFFIX=".1"
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_freebsd.o \
nsswitch/winbind_nss_linux.o"
WINBIND_NSS="nsswitch/nss_winbind.$SHLIBEXT"
WINBIND_WINS_NSS="nsswitch/nss_wins.$SHLIBEXT"
- else
- HAVE_WINBIND=no
- winbind_no_reason=", getpwent_r is missing on $host_os so winbind is unsupported"
- fi
+ ;;
+ esac
+ ;;
+
+ *netbsd*)
+ case "$UNAME_R" in
+ [[3-9]]*)
+ # NetBSD winbind client is implemented as a wrapper
+ # around the Linux version. It needs getpwent_r() to
+ # indicate libc's use of the correct nsdispatch API.
+ #
+ if test x"$ac_cv_func_getpwent_r" = x"yes"; then
+ WINBIND_NSS_EXTRA_OBJS="\
+ nsswitch/winbind_nss_netbsd.o \
+ nsswitch/winbind_nss_linux.o"
+ WINBIND_NSS="nsswitch/nss_winbind.$SHLIBEXT"
+ WINBIND_WINS_NSS="nsswitch/nss_wins.$SHLIBEXT"
+ else
+ HAVE_WINBIND=no
+ winbind_no_reason=", getpwent_r is missing on $host_os so winbind is unsupported"
+ fi
+ ;;
+ esac
;;
*irix*)
# IRIX has differently named shared libraries