Source
103
103
found_ldap="no"
104
104
AC_MSG_RESULT(no)
105
105
fi
106
106
fi
107
107
108
108
if test "x$found_ldap" != "xno"; then
109
109
110
110
AC_MSG_RESULT(yes)
111
111
LDAP_CPPFLAGS="-I$LDAP_INCDIR"
112
112
LDAP_LDFLAGS="-L$LDAP_LIBDIR"
113
+
114
+
ldap_ver=$(strings `find $LDAP_LIBDIR -name libldap.so` | grep OpenLDAP | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | tr -d '.')
115
+
if test -n "$ldap_ver" && test "$ldap_ver" -ge 261; then
116
+
AC_DEFINE(HAVE_LDAP_SOURCEIP, 1, [Define to 1 if SourceIP is supported.])
117
+
fi
118
+
113
119
LDAP_LIBS="-lldap -llber $LDAP_LIBS"
114
120
115
121
if test "x$enable_static" = "xyes"; then
116
122
LDAP_LIBS="$LDAP_LIBS -lgnutls -lpthread -lsasl2"
117
123
elif test "x$enable_static_libs" = "xyes"; then
118
124
AC_MSG_CHECKING([compatibility of static LDAP libs])
119
125
test "x$static_linking_support" = "xno" -a -z "$_ldap_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
120
126
121
127
if test "x$static_linking_support" = "xno"; then
122
128
LDAP_LIBS=`echo "$LDAP_LIBS"|sed "s|-lldap|$_ldap_dir_lib/libldap.a|g"|sed "s|-llber|$_ldap_dir_lib/liblber.a|g"`