+configure
+config.h
+rlm_mschap.mk
smbencrypt
--- /dev/null
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Build with Apple Open Directory support */
+#undef HAVE_OPEN_DIRECTORY
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
--- /dev/null
+AC_INIT(rlm_mschap.c)
+AC_REVISION($Revision$)
+AC_DEFUN(modname,[rlm_mschap])
+
+if test x$with_[]modname != xno; then
+
+ AC_PROG_CC
+ AC_PROG_CPP
+
+ FR_SMART_CHECK_INCLUDE(membership.h)
+ if test "x$ac_cv_header_membership_h" = "xyes"; then
+ AC_DEFINE([HAVE_MEMBERSHIP_H],[1],[Build with Apple Open Directory support])
+ mschap_sources+="opendir.c"
+ mschap_ldflags+=" -framework DirectoryService"
+ fi
+ targetname=modname
+else
+ targetname=
+ echo \*\*\* module modname is disabled.
+fi
+
+if test x"$fail" != x""; then
+ if test x"${enable_strict_dependencies}" = x"yes"; then
+ AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
+ else
+ AC_MSG_WARN([silently not building ]modname[.])
+ AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
+ targetname=""
+ fi
+fi
+
+AC_SUBST(mschap_sources)
+AC_SUBST(mschap_ldflags)
+AC_SUBST(mschap_cflags)
+AC_SUBST(targetname)
+
+AC_CONFIG_HEADER(config.h)
+AC_OUTPUT(rlm_mschap.mk)
+
#include "smbdes.h"
#ifdef HAVE_OPENSSL_CRYPTO_H
-#include <openssl/rc4.h>
+# include <openssl/rc4.h>
#endif
-#ifdef __APPLE__
+#ifdef WITH_OPEN_DIRECTORY
extern int od_mschap_auth(REQUEST *request, VALUE_PAIR *challenge, VALUE_PAIR * usernamepair);
#endif
const char *auth_type;
int allow_retry;
char *retry_msg;
-#ifdef __APPLE__
+#ifdef WITH_OPEN_DIRECTORY
int open_directory;
#endif
} rlm_mschap_t;
offsetof(rlm_mschap_t, allow_retry), NULL, "yes" },
{ "retry_msg", PW_TYPE_STRING_PTR,
offsetof(rlm_mschap_t, retry_msg), NULL, NULL },
-#ifdef __APPLE__
+#ifdef WITH_OPEN_DIRECTORY
{ "use_open_directory", PW_TYPE_BOOLEAN,
offsetof(rlm_mschap_t,open_directory), NULL, "yes" },
#endif
return RLM_MODULE_REJECT;
}
-#ifdef __APPLE__
+#ifdef WITH_OPEN_DIRECTORY
/*
* No "known good" NT-Password attribute. Try to do
* OpenDirectory authentication.
+++ /dev/null
-TARGET := rlm_mschap.a
-SOURCES := rlm_mschap.c smbdes.c opendir.c mschap.c
--- /dev/null
+TARGETNAME := @targetname@
+
+ifneq "$(TARGETNAME)" ""
+TARGET := $(TARGETNAME).a
+endif
+
+SOURCES := $(TARGETNAME).c smbdes.c mschap.c @mschap_sources@
+
+SRC_CFLAGS := @mschap_cflags@
+TGT_LDLIBS := @mschap_ldflags@