noinst_LTLIBRARIES = libpassword.la libauth.la
auth_moduledir = $(moduledir)/auth
# automake seems to force making this unconditional..
NOPLUGIN_LDFLAGS =
if GSSAPI_PLUGIN
GSSAPI_LIB = libmech_gssapi.la
endif
if LDAP_PLUGIN
LDAP_LIB = libauthdb_ldap.la
endif
auth_module_LTLIBRARIES = \
$(GSSAPI_LIB) \
$(LDAP_LIB) \
$(LUA_LIB) \
pkglibexecdir = $(libexecdir)/dovecot
pkglibexec_PROGRAMS = auth checkpassword-reply
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib-auth \
-I$(top_srcdir)/src/lib-test \
-I$(top_srcdir)/src/lib-dict \
-I$(top_srcdir)/src/lib-dns \
-I$(top_srcdir)/src/lib-http \
-I$(top_srcdir)/src/lib-sql \
-I$(top_srcdir)/src/lib-settings \
-I$(top_srcdir)/src/lib-old-stats \
-I$(top_srcdir)/src/lib-ntlm \
-I$(top_srcdir)/src/lib-otp \
-I$(top_srcdir)/src/lib-master \
-I$(top_srcdir)/src/lib-oauth2 \
-I$(top_srcdir)/src/lib-ssl-iostream \
-I$(top_srcdir)/src/lib-lua \
-DAUTH_MODULE_DIR=\""$(auth_moduledir)"\" \
-DPKG_LIBEXECDIR=\""$(pkglibexecdir)"\" \
-DPKG_RUNDIR=\""$(rundir)"\" \
$(LUA_CFLAGS) \
$(AUTH_CFLAGS)
auth_LDFLAGS = -export-dynamic
libpassword_la_SOURCES = \
libpassword_la_CFLAGS = $(AM_CPPFLAGS) $(LIBSODIUM_CFLAGS)
if HAVE_LUA
if AUTH_LUA_PLUGIN
LUA_LIB = libauthdb_lua.la
else !AUTH_LUA_PLUGIN
LIBDOVECOT_LUA = ../lib-lua/libdovecot-lua.la
endif !AUTH_LUA_PLUGIN
endif
auth_libs = \
$(LIBDOVECOT_LUA) \
$(LIBDOVECOT_SQL)
auth_CPPFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS)
auth_LDADD = $(auth_libs) $(LIBDOVECOT) $(AUTH_LIBS) $(BINARY_LDFLAGS)
auth_DEPENDENCIES = $(auth_libs) $(LIBDOVECOT_DEPS)
auth_SOURCES = main.c
libauth_la_DEPENDENCIES = $(LIBDOVECOT_DEPS)
libauth_la_SOURCES = \
auth.c \
db-sql.c \
mech.c \
passdb.c \
userdb.c \
$(ldap_sources) \
$(lua_sources)
headers = \
auth.h \
db-sql.h \
mech.h \
passdb.h \
userdb.h \
if GSSAPI_PLUGIN
libmech_gssapi_la_LDFLAGS = -module -avoid-version
libmech_gssapi_la_LIBADD = $(KRB5_LIBS)
libmech_gssapi_la_CPPFLAGS = $(AM_CPPFLAGS) $(KRB5_CFLAGS) -DPLUGIN_BUILD
libmech_gssapi_la_SOURCES = mech-gssapi.c
endif
if LDAP_PLUGIN
libauthdb_ldap_la_LDFLAGS = -module -avoid-version
libauthdb_ldap_la_LIBADD = $(LDAP_LIBS)
libauthdb_ldap_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_BUILD
libauthdb_ldap_la_SOURCES = $(ldap_sources)
endif
if AUTH_LUA_PLUGIN
libauthdb_lua_la_LDFLAGS = -module -avoid-version
libauthdb_lua_la_LIBADD = ../lib-lua/libdovecot-lua.la $(LUA_LIBS)
libauthdb_lua_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_BUILD
libauthdb_lua_la_SOURCES = $(lua_sources)
endif
libauthdb_imap_la_LDFLAGS = -module -avoid-version
libauthdb_imap_la_LIBADD = \
$(LIBDOVECOT)
libauthdb_imap_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/src/lib-imap \
-I$(top_srcdir)/src/lib-imap-client
libauthdb_imap_la_SOURCES = passdb-imap.c
pkginc_libdir=$(pkgincludedir)
pkginc_lib_HEADERS = $(headers)
checkpassword_reply_CPPFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS)
checkpassword_reply_LDADD = $(LIBDOVECOT) $(BINARY_LDFLAGS)
checkpassword_reply_DEPENDENCIES = $(LIBDOVECOT_DEPS)
checkpassword_reply_sources = \
stats_moduledir = $(moduledir)/old-stats
stats_module_LTLIBRARIES = libstats_auth.la
libstats_auth_la_LDFLAGS = -module -avoid-version
libstats_auth_la_LIBADD = $(LIBDOVECOT)
libstats_auth_la_DEPENDENCIES = $(LIBDOVECOT_DEPS)
libstats_auth_la_SOURCES = auth-stats.c
test_programs = \
test-libpassword \
test-auth-cache \
test-auth
noinst_PROGRAMS = $(test_programs)
test_libs = \
test_libpassword_SOURCES = test-libpassword.c
test_libpassword_LDADD = \
$(CRYPT_LIBS) \
$(LIBDOVECOT_SQL) \
$(LIBSODIUM_LIBS) \
$(test_libs) \
$(BINARY_LDFLAGS)
test_libpassword_DEPENDENCIES = libpassword.la
test_libpassword_CPPFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS)
test_auth_cache_SOURCES = auth-cache.c test-auth-cache.c
test_auth_cache_LDADD = $(test_libs)
test_auth_cache_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(test_libs)
# this is needed to force auth-cache.c recompilation
test_auth_cache_CPPFLAGS = $(AM_CPPFLAGS)
test_auth_SOURCES = \
test_auth_LDADD = $(test_libs) $(auth_libs) $(AUTH_LIBS)
test_auth_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(test_libs)
check-local:
for bin in $(test_programs); do \
if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
done