1 --- samba-3.0.25/source/configure.in Mon Apr 9 10:31:00 2007 |
|
2 +++ samba-3.0.25-fix/source/configure.in Wed Apr 11 02:48:55 2007 |
|
3 @@ -3299,6 +3299,20 @@ |
|
4 with_ldap_support=yes |
|
5 AC_MSG_CHECKING(whether LDAP support is used) |
|
6 AC_MSG_RESULT(yes) |
|
7 + |
|
8 + ################################ |
|
9 + # Check if the Netscape LDAP SDK |
|
10 + AC_CACHE_CHECK([for LDAP_OPT_SIZELIMIT macro],samba_cv_HAVE_LDAP_NSC,[ |
|
11 + AC_TRY_COMPILE([ |
|
12 +#include <stdio.h> |
|
13 +#include <ldap.h>], |
|
14 + [printf("%s\n", LDAP_OPT_SIZELIMIT);], |
|
15 + samba_cv_HAVE_LDAP_NSC=yes,samba_cv_HAVE_LDAP_NSC=no)]) |
|
16 + if test x"$samba_cv_HAVE_LDAP_NSC" = x"yes"; then |
|
17 + AC_DEFINE(HAVE_HAVE_LDAP_NSC,1, |
|
18 + [Whether the LDAP API is Netscape SDK]) |
|
19 + fi |
|
20 + |
|
21 else |
|
22 if test x"$with_ldap_support" = x"yes"; then |
|
23 AC_MSG_ERROR(libldap is needed for LDAP support) |
|
24 @@ -3361,15 +3375,25 @@ |
|
25 fi |
|
26 ;; |
|
27 *) |
|
28 - AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS) |
|
29 + # Omit the ldap_initialize() test if there is a Netscape SDK |
|
30 + # (Mozilla Directory server 5) |
|
31 + if test x"$samba_cv_HAVE_LDAP_NSC" = x"no"; then |
|
32 |
|
33 - if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then |
|
34 - if test x"$with_ads_support" = x"yes"; then |
|
35 - AC_MSG_ERROR(Active Directory support requires ldap_initialize) |
|
36 - elif test x"$with_ads_support" = x"auto"; then |
|
37 - AC_MSG_WARN(Disabling Active Directory support (requires ldap_initialize)) |
|
38 - with_ads_support=no |
|
39 + AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS) |
|
40 + |
|
41 + if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then |
|
42 + if test x"$with_ads_support" = x"yes"; then |
|
43 + AC_MSG_ERROR(Active Directory support requires ldap_initialize) |
|
44 + elif test x"$with_ads_support" = x"auto"; then |
|
45 + AC_MSG_WARN(Disabling Active Directory support (requires ldap_in |
|
46 +itialize)) |
|
47 + with_ads_support=no |
|
48 + fi |
|
49 + |
|
50 fi |
|
51 + else |
|
52 + AC_MSG_RESULT(Active Directory support on Netscape LDAP SDK - limited fu |
|
53 +nctionality?) |
|
54 fi |
|
55 ;; |
|
56 esac |
|
57 @@ -3425,6 +3449,19 @@ |
|
58 ################################################# |
|
59 # check for krb5-config from recent MIT and Heimdal kerberos 5 |
|
60 AC_PATH_PROG(KRB5CONFIG, krb5-config) |
|
61 + |
|
62 + ################################################# |
|
63 + # check if MIT krb5 API is present |
|
64 + AC_MSG_CHECKING(for type of kerberos) |
|
65 + if $KRB5CONFIG --version | grep -s MIT > /dev/null ; then |
|
66 + FOUND_KRB5_MIT=yes |
|
67 + AC_MSG_RESULT(yes) |
|
68 + AC_DEFINE(HAVE_KRB5_MIT,1,[Whether the krb5 API is MIT]) |
|
69 + else |
|
70 + FOUND_KRB5_MIT=no |
|
71 + AC_MSG_RESULT(no) |
|
72 + fi |
|
73 + |
|
74 AC_MSG_CHECKING(for working krb5-config) |
|
75 if test -x "$KRB5CONFIG"; then |
|
76 ac_save_CFLAGS=$CFLAGS |
|
77 @@ -3431,10 +3468,17 @@ |
|
78 CFLAGS="";export CFLAGS |
|
79 ac_save_LDFLAGS=$LDFLAGS |
|
80 LDFLAGS="";export LDFLAGS |
|
81 - KRB5_LIBS="`$KRB5CONFIG --libs gssapi`" |
|
82 - KRB5_LDFLAGS="`$KRB5CONFIG --libs gssapi | sed s/-lgss.*//`" |
|
83 - KRB5_CFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" |
|
84 - KRB5_CPPFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" |
|
85 + if test x"$FOUND_KRB5_MIT" = x"yes"; then |
|
86 + KRB5_LIBS="`$KRB5CONFIG --libs | sed s/-lkrb5//`" |
|
87 + KRB5_LDFLAGS="-lkrb5 -lgss" |
|
88 + KRB5_CFLAGS="" |
|
89 + KRB5_CPPFLAGS="`$KRB5CONFIG --cflags`" |
|
90 + else |
|
91 + KRB5_LIBS="`$KRB5CONFIG --libs gssapi`" |
|
92 + KRB5_LDFLAGS="`$KRB5CONFIG --libs gssapi | sed s/-lgss.*//`" |
|
93 + KRB5_CFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" |
|
94 + KRB5_CPPFLAGS="`$KRB5CONFIG --cflags | sed s/@INCLUDE_des@//`" |
|
95 + fi |
|
96 CFLAGS=$ac_save_CFLAGS;export CFLAGS |
|
97 LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS |
|
98 FOUND_KRB5=yes |
|