Trying to install ruby-ldap on solaris x86 I keep recieving an error
that I'm not sure how to resolve. Does anyone know what could be wrong
or have any suggestions as to what I might try?

# ruby extconf.rb --with-openldap2
--with-ldap-dir=/usr
checking for ldap.h... yes
checking for lber.h... yes
checking for ldap_ssl.h... no
checking for openssl/ssl.h... no
checking for ssl.h... no
checking for openssl/crypto.h... no
checking for crypto.h... no
checking for main() in -lcrypto... no
checking for main() in -lssl... no
checking for main() in -lnsl... yes
checking for main() in -lpthread... yes
checking for main() in -lresolv... yes
checking for main() in -llber... no
checking for main() in -lldap_r... no
checking for main() in -lldap... yes
checking for ldap_init()... yes
checking for ldap_set_option()... yes
checking for ldap_get_option()... yes
checking for ldap_start_tls_s()... no
checking for ldap_memfree()... yes
checking for ldap_perror()... yes
checking for ldap_sort_entries()... yes
checking for ldapssl_init()... yes
checking for ldap_sslinit()... no
checking for ldap_sasl_bind_s()... yes
checking for ldap_compare_s()... yes
checking for ldap_add_ext_s()... yes
checking for ldap_compare_ext_s()... yes
checking for ldap_delete_ext_s()... yes
checking for ldap_modify_ext_s()... yes
checking for ldap_search_ext_s()... yes
checking for ldap_unbind_ext_s()... no
checking for ldap_sasl_interactive_bind_s()... yes
CFLAGS = -g -O2 -DUSE_OPENLDAP2 -DUSE_OPENLDAP -I/usr/include
-D_REENTRANT
LDFLAGS =  -L/usr/lib
creating Makefile

-bash-3.00$ make
gcc -fPIC -g -O2 -DUSE_OPENLDAP2 -DUSE_OPENLDAP -I/usr/include
-D_REENTRANT  -I. -I/usr/local/lib/ruby/1.8/i386-solaris2.10
-I/usr/local/lib/ruby/1.8/i386-solaris2.10 -I. -DHAVE_LDAP_H
-DHAVE_LBER_H -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION
-DHAVE_LDAP_GET_OPTION -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR
-DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAPSSL_INIT -DHAVE_LDAP_SASL_BIND_S
-DHAVE_LDAP_COMPARE_S -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S
-DHAVE_LDAP_DELETE_EXT_S -DHAVE_LDAP_MODIFY_EXT_S
-DHAVE_LDAP_SEARCH_EXT_S -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S  -c
saslconn.c
saslconn.c: In function `rb_ldap_conn_sasl_bind':
saslconn.c:54: error: `LDAP_SASL_AUTOMATIC' undeclared (first use in
this function)
saslconn.c:54: error: (Each undeclared identifier is reported only once
saslconn.c:54: error: for each function it appears in.)
saslconn.c:83: error: `LDAP_SASL_QUIET' undeclared (first use in this
function)
make: *** [saslconn.o] Error 1