Initial import
[samba] / debian / patches / non-linux-ports.patch
1 Index: samba-3.0.21c/source/configure.in
2 ===================================================================
3 --- samba-3.0.21c.orig/source/configure.in      2006-02-25 11:58:15.771410155 +0100
4 +++ samba-3.0.21c/source/configure.in   2006-02-25 11:58:20.524451106 +0100
5 @@ -639,6 +639,15 @@
6        fi
7      ;;
8  
9 +# Systems with LFS support.
10 +#
11 +    gnu* | k*bsd*-gnu)
12 +       CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
13 +       AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
14 +       AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
15 +       AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
16 +       ;;
17 +
18  # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
19  #
20      *linux*)
21 @@ -1198,7 +1207,7 @@
22  # 
23  #
24  case "$host_os" in
25 -    *linux*)
26 +    linux*-gnu* | gnu* | k*bsd*-gnu)
27         # glibc <= 2.3.2 has a broken getgrouplist
28         AC_TRY_RUN([
29  #include <unistd.h>
30 @@ -1405,7 +1414,10 @@
31  
32    # and these are for particular systems
33    case "$host_os" in
34 -               *linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
35 +               linux*-gnu* | gnu* | k*bsd*-gnu)
36 +                       case "$host_os" in linux*)
37 +                               AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;;
38 +                       esac
39                         BLDSHARED="true"
40                         if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
41                                 LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" 
42 @@ -4654,7 +4666,7 @@
43         AC_MSG_RESULT(yes);
44  
45         case "$host_os" in
46 -       *linux*)
47 +       linux*-gnu* | gnu* | k*bsd*-gnu)
48                 AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
49                 AC_TRY_LINK([#include <sys/sendfile.h>],
50  [\
51 @@ -4917,10 +4929,10 @@
52  WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS
53  
54  case "$host_os" in
55 -       *linux*)
56 +       linux*-gnu* | gnu* | k*bsd*-gnu)
57                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
58                 ;;
59 -       *freebsd[[5-9]]*)
60 +       freebsd5*|*freebsd[[6-9]]*)
61                 # FreeBSD winbind client is implemented as a wrapper around
62                 # the Linux version.
63                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_freebsd.o \