--- ./lib/Makefile.am.orig Sat Mar 10 05:56:41 2001 +++ ./lib/Makefile.am Thu Mar 28 12:40:16 2002 @@ -53,5 +53,5 @@ EXTRA_libsasl_la_SOURCES = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c db_testw32.c libsasl_la_LDFLAGS = -version-info $(sasl_version) libsasl_la_DEPENDENCIES = $(SASL_DB_BACKEND) @LTLIBOBJS@ -libsasl_la_LIBADD = @LTLIBOBJS@ $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS) $(LIB_SOCKET) +libsasl_la_LIBADD = @LTLIBOBJS@ $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS) ${LIB_LDAP} ${LIB_MYSQL} # PLAIN_LIBS are linked in for sasl_checkpass --- ./lib/Makefile.in.orig Sat Mar 24 01:48:13 2001 +++ ./lib/Makefile.in Thu Mar 28 12:57:25 2002 @@ -156,7 +158,7 @@ EXTRA_libsasl_la_SOURCES = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c db_testw32.c libsasl_la_LDFLAGS = -version-info $(sasl_version) libsasl_la_DEPENDENCIES = $(SASL_DB_BACKEND) @LTLIBOBJS@ -libsasl_la_LIBADD = @LTLIBOBJS@ $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS) $(LIB_SOCKET) +libsasl_la_LIBADD = @LTLIBOBJS@ $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS) ${LIB_LDAP} ${LIB_MYSQL} # PLAIN_LIBS are linked in for sasl_checkpass @MACOSX_TRUE@framedir = /Library/Frameworks/SASL.framework --- ./config.h.in.orig Wed Mar 14 04:49:33 2001 +++ ./config.h.in Thu Mar 28 12:40:23 2002 @@ -86,6 +86,12 @@ /* do we have PAM for plaintext password checking? */ #undef HAVE_PAM +/* do we have MySQL for plaintext password checking? */ +#undef HAVE_MYSQL + +/* do we have LDAP for plaintext password checking? */ +#undef HAVE_LDAP + /* what flavor of GSSAPI are we using? */ #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE --- ./configure.in.orig Sat Mar 24 01:47:27 2001 +++ ./configure.in Thu Mar 28 12:40:23 2002 @@ -322,6 +322,94 @@ fi AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no) + +############################################################################ +# Simon Loader tries to do auto conf +dnl MySQL +AC_ARG_WITH(mysql, [ --with-mysql=PATH enable authentication from MySQL database [no] ], + with_mysql=$withval, + with_mysql=no) + +# fine location of library +# prsumesing if one given then correct +if test "${with_mysql}" = "yes"; then + for mysqlloc in lib/mysql lib + do + if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then + with_mysql="${prefix}" + break + elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then + with_mysql="/usr/local" + break + elif test -f /usr/${mysqlloc}/libmysqlclient.a; then + with_mysql="/usr" + break + fi + done +fi + +case "$with_mysql" in + no) true;; + *) + if test -d ${with_mysql}/include/mysql; then + CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include/mysql" + LDFLAGS="$LDFLAGS -L${with_mysql}/lib/mysql" + else + CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include" + LDFLAGS="$LDFLAGS -L${with_mysql}/lib" + fi + AC_CHECK_LIB(mysqlclient, mysql_select_db,[ + LIB_MYSQL="-lmysqlclient" + AC_DEFINE(HAVE_MYSQL)], + [AC_ERROR([MYSQL libarary mysqlclient not found])]);; + +esac +AC_SUBST(LIB_MYSQL) + +dnl LDAP +AC_ARG_WITH(ldap, [ --with-ldap=PATH enable authentication from LDAP [no] ], + with_ldap=$withval, + with_ldap=no) + +if test "$with_ldap" = "yes"; then + for ldaploc in lib/ldap lib + do + if test -f ${prefix}/${ldaploc}/libldap.a; then + with_ldap="${prefix}" + break + elif test -f /usr/local/${ldaploc}/libldap.a; then + with_ldap="/usr/local" + break + elif test -f /usr/${ldaploc}/libldap.a; then + with_ldap="/usr" + break + fi + done +fi + +case "$with_ldap" in + no) true;; + *) + if test -d ${with_ldap}/include/ldap; then + CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include/ldap" + LDFLAGS="$LDFLAGS -L${with_ldap}/lib/ldap" + else + CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include" + LDFLAGS="$LDFLAGS -L${with_ldap}/lib" + fi + AC_CHECK_LIB(ldap, ldap_open,[ + LIB_LDAP="-lldap -llber" + AC_DEFINE(HAVE_LDAP)], + [AC_ERROR([LDAP libarary ldap and lber not found])], + [-llber]);; +esac +AC_SUBST(LIB_LDAP) + + +# end of addition +####################################################################### + + dnl CRAM-MD5 AC_ARG_ENABLE(cram, [ --enable-cram enable CRAM-MD5 authentication [yes] ], cram=$enableval, --- ./acconfig.h.orig Sat Feb 17 05:06:28 2001 +++ ./acconfig.h Thu Mar 28 12:40:22 2002 @@ -83,6 +83,12 @@ /* do we have PAM for plaintext password checking? */ #undef HAVE_PAM +/* do we have MySQL for plaintext password checking? */ +#undef HAVE_MYSQL + +/* do we have LDAP for plaintext password checking? */ +#undef HAVE_LDAP + /* what flavor of GSSAPI are we using? */ #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE