ldap-libs.patch revision 6094
6094N/ASource: in-house
6094N/AUp-stream Acceptability: Patch is fixing the names of "ldap" and "lber" libs
6094N/A which are "hard-wired" to "libldap.so" and "liblber.so" in upstream.
6094N/A Patch will be promoted to community.
4369N/A
6094N/A--- a/source3/wscript 2016-03-22 02:00:33.000000000 -0700
6094N/A+++ samba-4.4.0/source3/wscript 2016-03-23 12:43:02.236160369 -0700
6094N/A@@ -36,6 +36,16 @@
6094N/A "--with-shared-modules"),
6094N/A action="store", dest='shared_modules', default=None)
4369N/A
6094N/A+
4369N/A+ opt.add_option('--with-libldap',
4369N/A+ help=("Name of the libldap for -l<libname> format."),
4369N/A+ action="store", dest='libldap_name', default='ldap')
4369N/A+
4369N/A+ # mozldap has lber-calls part of the libldap so it should be also set on ldap60 to avoid link of lber from OpenLDAP
4369N/A+ opt.add_option('--with-liblber',
4369N/A+ help=("Name of the liblber for -l<libname> format."),
4369N/A+ action="store", dest='liblber_name', default='lber')
4369N/A+
6094N/A opt.SAMBA3_ADD_OPTION('winbind')
6094N/A opt.SAMBA3_ADD_OPTION('ads')
6094N/A opt.SAMBA3_ADD_OPTION('ldap')
6094N/A@@ -664,7 +673,7 @@
4369N/A if Options.options.with_ldap:
4369N/A conf.CHECK_HEADERS('ldap.h lber.h ldap_pvt.h')
4369N/A conf.CHECK_TYPE('ber_tag_t', 'unsigned int', headers='ldap.h lber.h')
4369N/A- conf.CHECK_FUNCS_IN('ber_scanf ber_sockbuf_add_io', 'lber')
4369N/A+ conf.CHECK_FUNCS_IN('ber_scanf ber_sockbuf_add_io', Options.options.liblber_name )
4369N/A conf.CHECK_VARIABLE('LDAP_OPT_SOCKBUF', headers='ldap.h')
4369N/A
4369N/A # if we LBER_OPT_LOG_PRINT_FN we can intercept ldap logging and print it out
6094N/A@@ -672,8 +681,8 @@
4369N/A conf.CHECK_VARIABLE('LBER_OPT_LOG_PRINT_FN',
4369N/A define='HAVE_LBER_LOG_PRINT_FN', headers='lber.h')
4369N/A
4369N/A- conf.CHECK_FUNCS_IN('ldap_init ldap_init_fd ldap_initialize ldap_set_rebind_proc', 'ldap')
4369N/A- conf.CHECK_FUNCS_IN('ldap_add_result_entry', 'ldap')
4369N/A+ conf.CHECK_FUNCS_IN('ldap_init ldap_init_fd ldap_initialize ldap_set_rebind_proc', Options.options.libldap_name )
4369N/A+ conf.CHECK_FUNCS_IN('ldap_add_result_entry', Options.options.libldap_name )
4369N/A
4369N/A # Check if ldap_set_rebind_proc() takes three arguments
4369N/A if conf.CHECK_CODE('ldap_set_rebind_proc(0, 0, 0)',
6094N/A@@ -694,6 +703,25 @@
4369N/A if conf.CONFIG_SET('HAVE_BER_SOCKBUF_ADD_IO') and \
4369N/A conf.CONFIG_SET('HAVE_LDAP_OPT_SOCKBUF'):
4369N/A conf.DEFINE('HAVE_LDAP_SASL_WRAPPING', '1')
6094N/A+ # fix the conf.TARGET_TYPE and conf.LIB_... items
6094N/A+ if 'ldap' != Options.options.libldap_name:
6094N/A+ conf.SET_TARGET_TYPE('ldap', 'SYSLIB')
6094N/A+ #conf.SET_TARGET_TYPE(Options.options.libldap_name, 'EMPTY')
6094N/A+ conf.define('HAVE_LIBLDAP', 1)
6094N/A+ conf.undefine('HAVE_LIB%s' % Options.options.libldap_name.upper().replace('-','_'))
6094N/A+ conf.define('LIB_LDAP', Options.options.libldap_name)
6094N/A+ conf.undefine('LIB_%s' % Options.options.libldap_name.upper().replace('-','_'))
6094N/A+ #conf.define('LIB_ldap', [ Options.options.libldap_name ] )
6094N/A+ #conf.undefine('LIB_%s' % Options.options.libldap_name.replace('-','_'))
6094N/A+ if 'lber' != Options.options.liblber_name:
6094N/A+ conf.SET_TARGET_TYPE('lber', 'SYSLIB')
6094N/A+ #conf.SET_TARGET_TYPE(Options.options.liblber_name, 'EMPTY')
6094N/A+ conf.define('HAVE_LIBLBER', 1)
6094N/A+ conf.undefine('HAVE_LIB%s' % Options.options.liblber_name.upper().replace('-','_'))
6094N/A+ conf.define('LIB_LBER', Options.options.liblber_name)
6094N/A+ conf.undefine('LIB_%s' % Options.options.liblber_name.upper().replace('-','_'))
6094N/A+ #conf.define('LIB_lber', [ Options.options.liblber_name ] )
6094N/A+ #conf.undefine('LIB_%s' % Options.options.liblber_name.replace('-','_'))
6094N/A else:
6094N/A conf.fatal("LDAP support not found. "
6094N/A "Try installing libldap2-dev or openldap-devel. "