- void *handle, *fun;
-
- /* Get library */
- handle = dlopen( LDAP_LINK_LIB_NAME_1, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
-
- /* Test for symbols we need */
- fun = dlsym( handle, "ldap_init" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
- handle = dlopen( LDAP_LINK_LIB_NAME_2, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
- fun = dlsym( handle, "ber_init" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
- handle = dlopen( LDAP_LINK_LIB_NAME_3, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
- fun = dlsym( handle, "res_query" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
- handle = dlopen( LDAP_LINK_LIB_NAME_4, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
- fun = dlsym( handle, "pthread_create" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-