OpenLDAP provides an LDAP client library https://www.openldap.org/