+if test "$ol_enable_slapi" != no ; then
+ dnl This check is donel also if --enable-modules is used;
+ dnl it is duplicated here, 'cause it'd be cached anyway
+ AC_CHECK_HEADERS(ltdl.h)
+
+ if test $ac_cv_header_ltdl_h != yes ; then
+ AC_MSG_ERROR([could not locate <ltdl.h>])
+ fi
+ AC_CHECK_LIB(ltdl, lt_dlinit, [
+ SLAPI_LIBS=-lltdl
+ LIBSLAPI=./libslapi.a
+ LIBSLAPITOOLS=../libslapi.a
+ AC_DEFINE(HAVE_LIBLTDL,1,[define if you have libtool -ltdl])
+ ],[AC_MSG_ERROR([could not locate libtool -lltdl])])
+
+ AC_DEFINE(LDAP_SLAPI,1, [define this to add SLAPI code])
+fi
+