106
106
AC_MSG_CHECKING([whether to build the NSS module])
107
107
AC_ARG_ENABLE(nss,
108
108
AS_HELP_STRING([--disable-nss],
109
[build the NSS module [[default=yes]]]),,
109
[build the NSS module [[default=enabled]]]),,
110
110
[enable_nss="yes"])
111
111
AC_MSG_RESULT($enable_nss)
112
112
AM_CONDITIONAL([ENABLE_NSS], [test "x$enable_nss" = "xyes"])
115
115
AC_MSG_CHECKING([whether to build the PAM module])
116
116
AC_ARG_ENABLE(pam,
117
117
AS_HELP_STRING([--disable-pam],
118
[build the PAM module [[default=yes]]]),,
118
[build the PAM module [[default=enabled]]]),,
119
119
[enable_pam="yes"])
120
120
AC_MSG_RESULT($enable_pam)
121
121
AM_CONDITIONAL([ENABLE_PAM], [test "x$enable_pam" = "xyes"])
124
124
AC_MSG_CHECKING([whether to build the nslcd server])
125
125
AC_ARG_ENABLE(nslcd,
126
126
AS_HELP_STRING([--disable-nslcd],
127
[build the nslcd server [[default=yes]]]),,
127
[build the nslcd server [[default=enabled]]]),,
128
128
[enable_nslcd="yes"])
129
129
AC_MSG_RESULT($enable_nslcd)
130
130
AM_CONDITIONAL([ENABLE_NSLCD], [test "x$enable_nslcd" = "xyes"])
151
151
AC_MSG_CHECKING([whether to check configfile options])
152
152
AC_ARG_ENABLE(configfile_checking,
153
153
AS_HELP_STRING([--disable-configfile-checking],
154
[check configfile options [[default=yes]]]),
154
[check configfile options [[default=enabled]]]),
155
155
[configfile_checking=$enableval],
156
156
[configfile_checking="yes"])
157
157
AC_MSG_RESULT($configfile_checking)
304
314
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
305
315
LIBS="$PTHREAD_LIBS $LIBS"
307
# check which LDAP flavour to use (unsupported)
308
AC_ARG_WITH(ldap-lib,
309
AS_HELP_STRING([--with-ldap-lib=TYPE],
310
[select ldap library (auto|netscape5|netscape4|netscape3|umich|openldap) @<:@auto@:>@]))
311
if test -z "$with_ldap_lib"
316
317
# checks for availability of system libraries for nslcd
317
318
AC_SEARCH_LIBS(gethostbyname,nsl socket)
318
319
AC_SEARCH_LIBS(socket,socket)
348
349
#include <sys/un.h>
349
350
#include <sys/types.h>])
352
# search for an LDAP library (only OpenLDAP is tested)
353
AC_ARG_WITH(ldap-lib,
354
AS_HELP_STRING([--with-ldap-lib=TYPE],
355
[select ldap library (auto|netscape5|netscape4|netscape3|umich|openldap) @<:@auto@:>@]))
356
if test -z "$with_ldap_lib"
360
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = umich -o $with_ldap_lib = openldap \)
362
AC_SEARCH_LIBS(ldap_search_ext,[ldap_r ldap],found_ldap_lib=yes,,)
364
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape5 \)
366
AC_CHECK_LIB(ldap50, main, LIBS="-lldap50 -lssldap50 -lssl3 -lnss3 -lnspr4 -lprldap50 -lplc4 -lplds4 $LIBS" found_ldap_lib=yes,, -lpthread)
368
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape4 \)
370
AC_CHECK_LIB(ldapssl41, main, LIBS="-lldapssl41 -lplc3 -lplds3 -lnspr3 $LIBS" found_ldap_lib=yes,, -lpthread)
371
if test -z "$found_ldap_lib"
373
AC_CHECK_LIB(ldapssl40, main, LIBS="-lldapssl40 $LIBS" found_ldap_lib=yes,, -lpthread)
375
if test -z "$found_ldap_lib"
377
AC_CHECK_LIB(ldap41, main, LIBS="-lldap41 $LIBS" found_ldap_lib=yes,,)
379
if test -z "$found_ldap_lib"
381
AC_CHECK_LIB(ldap40, main, LIBS="-lldap40 $LIBS" found_ldap_lib=yes,,)
384
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape3 \)
386
AC_CHECK_LIB(ldapssl30, main, LIBS="-lldapssl30 $LIBS" found_ldap_lib=yes,, -lpthread)
388
AC_CHECK_FUNCS(ldap_search_ext,,AC_MSG_ERROR([could not locate a valid LDAP library]))
390
# see if we need a BER library
391
AC_SEARCH_LIBS(ber_bvfree,lber)
393
# check for extra SASL libraries
351
394
if test "$enable_sasl" = "yes"
353
396
AC_CHECK_TYPE(sasl_interact_t,
357
400
#elif defined(HAVE_SASL_H)
358
401
#include <sasl.h>
362
if test "$enable_kerberos" = "yes"
364
AC_CHECK_LIB(gssapi, gss_krb5_ccache_name,[LIBS="-lgssapi $LIBS" found_gssapi_lib=yes],,$LIBS)
365
if test -z "$found_gssapi_lib"
367
AC_CHECK_LIB(gssapi_krb5, gss_krb5_ccache_name,[LIBS="-lgssapi_krb5 $LIBS"],,$LIBS)
371
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = umich -o $with_ldap_lib = openldap \)
373
AC_SEARCH_LIBS(ldap_search_ext,[ldap_r ldap],found_ldap_lib=yes,,)
375
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape5 \)
377
AC_CHECK_LIB(ldap50, main, LIBS="-lldap50 -lssldap50 -lssl3 -lnss3 -lnspr4 -lprldap50 -lplc4 -lplds4 $LIBS" found_ldap_lib=yes need_pthread=yes,, -lpthread)
379
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape4 \)
381
AC_CHECK_LIB(ldapssl41, main, LIBS="-lldapssl41 -lplc3 -lplds3 -lnspr3 $LIBS" found_ldap_lib=yes need_pthread=yes,, -lpthread)
382
if test -z "$found_ldap_lib"
384
AC_CHECK_LIB(ldapssl40, main, LIBS="-lldapssl40 $LIBS" found_ldap_lib=yes need_pthread=yes,, -lpthread)
386
if test -z "$found_ldap_lib"
388
AC_CHECK_LIB(ldap41, main, LIBS="-lldap41 $LIBS" found_ldap_lib=yes need_pthread=no,,)
390
if test -z "$found_ldap_lib"
392
AC_CHECK_LIB(ldap40, main, LIBS="-lldap40 $LIBS" found_ldap_lib=yes need_pthread=no,,)
395
if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape3 \)
397
AC_CHECK_LIB(ldapssl30, main, LIBS="-lldapssl30 $LIBS" found_ldap_lib=yes need_pthread=yes,, -lpthread)
399
if test -z "$found_ldap_lib"
401
AC_MSG_ERROR(could not locate a valid LDAP library)
403
if test "$need_pthread" = "yes"
405
AC_CHECK_LIB(pthread, main)
407
AC_CHECK_LIB(gssldap, ldap_gss_bind,[LIBS="-lgssldap $LIBS"],,$LIBS)
409
if test "$enable_sasl" = "yes"
411
AC_CHECK_LIB(sasl2, sasl_client_init)
412
AC_CHECK_FUNCS(sasl_auxprop_request)
413
AC_CHECK_FUNCS(ldap_sasl_interactive_bind_s)
415
if test "$enable_kerberos" = "yes"
403
AC_SEARCH_LIBS(sasl_client_init,sasl2)
404
AC_CHECK_FUNCS(sasl_auxprop_request ldap_sasl_interactive_bind_s)
407
# check for extra Kerberos libraries
408
if test "$enable_kerberos" = "yes"
410
AC_SEARCH_LIBS(gss_krb5_ccache_name,gssapi gssapi_krb5)
411
AC_SEARCH_LIBS(ldap_gss_bind,gssldap)
417
412
AC_CHECK_FUNCS(gss_krb5_ccache_name)
421
416
AC_CHECK_FUNCS(ldap_parse_result ldap_memfree ldap_controls_free ldap_control_free)
422
417
AC_CHECK_FUNCS(ldap_explode_dn ldap_explode_rdn ldap_set_option ldap_get_option)
423
418
AC_CHECK_FUNCS(ldap_abandon ldap_simple_bind_s ldap_unbind ldap_set_rebind_proc)
424
AC_CHECK_FUNCS(ldap_initialize ldap_search_ext ber_memfree)
419
AC_CHECK_FUNCS(ldap_initialize ldap_search_ext)
425
420
AC_CHECK_FUNCS(ldap_create_control ldap_extended_operation_s)
426
421
AC_CHECK_FUNCS(ldap_domain2hostlist ldap_domain2dn)
427
422
AC_CHECK_FUNCS(ldap_get_values ldap_value_free ldap_get_dn)
428
423
AC_CHECK_FUNCS(ldap_err2string ldap_msgfree ldap_result)
424
AC_CHECK_FUNCS(ber_bvfree ber_free ber_set_option)
430
426
# replace ldap_create_page_control() and ldap_parse_page_control()
431
427
AC_CHECK_FUNCS(ldap_create_page_control ldap_parse_page_control,,[AC_LIBOBJ(pagectrl)])