Makefile.am
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:13k
- # $Id: Makefile.am,v 1.40 2000/07/04 00:08:56 mrsam Exp $
- #
- # Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- # distribution information.
- EXTRA_PROGRAMS=authcram authpam authpwd authshadow authuserdb authvchkpw
- authldap authmysql authdaemon authdaemond authdaemontest authmksock
- #
- # AUTHMODULES should be listed in the best authentication order
- #
- AUTHMODULES=@AUTHMODULES@
- noinst_PROGRAMS= $(AUTHMODULES) authinfo authtest @authdaemondprog@
- noinst_SCRIPTS=libauth.dep
- noinst_DATA=authldaprc authmysqlrc
- if HAVE_MD5
- checkpasswordmd5c=checkpasswordmd5.c
- else
- checkpasswordmd5c=
- endif
- if HAVE_PAM
- authpamc=authpam.c preauthpam.c authwait.h authpwd.c
- authpamlibsdep=authpam.libsdep
- else
- authpamc=
- authpamlibsdep=
- endif
- if HAVE_PWD
- authpwdc=authpwd.c preauthpwd.c
- authpwdlibsdep=authpwd.libsdep
- else
- authpwdc=
- authpwdlibsdep=
- endif
- if HAVE_SHADOW
- authshadowc=authshadow.c preauthshadow.c
- authshadowlibsdep=authshadow.libsdep
- else
- authshadowc=
- authshadowlibsdep=
- endif
- if HAVE_AUTHUSERDB
- authuserdbc=authuserdb.c preauthuserdb.c preauthuserdbcommon.c
- authuserdblibsdep=authuserdb.libsdep
- else
- authuserdbc=
- authuserdblibsdep=
- endif
- if HAVE_AUTHMYSQL
- authmysqlc=authmysql.c preauthmysql.c authmysqllib.c authmysql.h
- authmysqllibsdep=authmysql.libsdep
- install-authmysqlrc:
- $(mkinstalldirs) $(DESTDIR)`dirname @authmysqlrc@`
- $(INSTALL_DATA) -m $(rcperms) $(srcdir)/authmysqlrc
- $(DESTDIR)@authmysqlrc@
- uninstall-authmysqlrc:
- rm -f $(DESTDIR)@authmysqlrc@
- else
- authmysqlc=
- authmysqllibsdep=
- install-authmysqlrc:
- @:
- uninstall-authmysqlrc:
- @:
- endif
- if HAVE_AUTHCRAM
- authcramc=authcram.c preauthcram.c preauthuserdbcommon.c
- authcramlibsdep=authcram.libsdep
- authsaslcramc=authsaslcram.c
- else
- authcramc=
- authcramlibsdep=
- authsaslcramc=
- endif
- if HAVE_VCHKPW
- authvchkpwc=authvchkpw.c authvchkpwlib.c preauthvchkpw.c
- authvchkpwlibsdep=authvchkpw.libsdep
- else
- authvchkpwc=
- authvchkpwlibsdep=
- endif
- if HAVE_LDAP
- authldapc=authldap.c preauthldap.c authldaplib.c authldap.h
- authldaplibsdep=authldap.libsdep
- install-authldaprc:
- $(mkinstalldirs) $(DESTDIR)`dirname @authldaprc@`
- $(INSTALL_DATA) -m $(rcperms) $(srcdir)/authldaprc
- $(DESTDIR)@authldaprc@
- uninstall-authldaprc:
- rm -f $(DESTDIR)@authldaprc@
- else
- authldapc=
- authldaplibsdep=
- install-authldaprc:
- @:
- uninstall-authldaprc:
- @:
- endif
- if HAVE_AUTHDAEMON
- authdaemonc=authdaemon.c authdaemonlib.c preauthdaemon.c
- authdaemonlibsdep=authdaemon.libsdep
- install-authdaemonrc:
- $(mkinstalldirs) $(DESTDIR)`dirname @authdaemonrc@`
- $(INSTALL_DATA) -m $(rcperms) authdaemonrc $(DESTDIR)@authdaemonrc@
- uninstall-authdaemonrc:
- rm -f $(DESTDIR)@authdaemonrc@
- else
- authdaemonc=
- authdaemonlibsdep=
- install-authdaemonrc:
- @:
- uninstall-authdaemonrc:
- @:
- endif
- rcperms=`test -d ../courier && echo "660" && exit 0; echo 600`
- user=`test -d ../courier && . ../courier/uidgid && echo $$mailuser && exit 0; echo root`
- group=`test -d ../courier && . ../courier/uidgid && echo $$mailgroup && exit 0; echo root`
- authldaprc.h:
- echo "#define AUTHLDAPRC "@authldaprc@"" >authldaprc.h
- authmysqlrc.h:
- echo "#define AUTHMYSQLRC "@authmysqlrc@"" >authmysqlrc.h
- authdaemonrc.h:
- echo "#define AUTHDAEMONRC "@authdaemonrc@"" >authdaemonrc.h
- echo "#define AUTHDAEMONVAR "@authdaemonvar@"" >>authdaemonrc.h
- echo "#define AUTHDAEMONPID AUTHDAEMONVAR "/pid"" >>authdaemonrc.h
- echo "#define AUTHDAEMONSOCK AUTHDAEMONVAR "/socket"" >>authdaemonrc.h
- echo "#define AUTHDAEMONLOCK AUTHDAEMONVAR "/lock"" >>authdaemonrc.h
- vpopmail_config.h:
- echo '#include "@vpopmail_home@/include/config.h"' >vpopmail_config.h
- EXTRA_DIST=authwait.h authpam.c preauthpam.c authpwd.c preauthpwd.c
- authshadow.c preauthshadow.c
- authdaemon.c authdaemonlib.c preauthdaemon.c
- authuserdb.c preauthuserdb.c preauthuserdbcommon.c
- authmysql.c preauthmysql.c authmysqllib.c authmysql.h
- authcram.c preauthcram.c
- authvchkpw.c authvchkpwlib.c preauthvchkpw.c
- authldap.c preauthldap.c authldaplib.c authldap.h
- checkpasswordmd5.c libauth.sh libauth2.sh
- authsaslcram.c
- authldaprc authmysqlrc README.ldap README.authmysql.html
- ##
- ## NOTE - we want to insert authpamc, authpwdc, et al, into libauth.a
- ## HOWEVER, due to Makefile conditional, the resulting Makefile.in was
- ## almost a megabyte long!!!!
- ##
- ## So... Here's plan B:
- ##
- ## Put each authentication code in its own library.
- ##
- ## First, let's define our temporary libraries. Don't forget to change
- ## configure.in to initialize @AUTHLIB@!
- EXTRA_LIBRARIES=libauth-authpam.a
- libauth-authpwd.a
- libauth-authshadow.a
- libauth-authuserdb.a
- libauth-authcram.a
- libauth-authvchkpw.a
- libauth-authldap.a
- libauth-authdaemon.a
- libauth-authmysql.a
- libauth_authpam_a_SOURCES=$(authpamc)
- libauth_authpwd_a_SOURCES=$(authpwdc)
- libauth_authshadow_a_SOURCES=$(authshadowc)
- libauth_authuserdb_a_SOURCES=$(authuserdbc)
- libauth_authcram_a_SOURCES=$(authcramc)
- libauth_authvchkpw_a_SOURCES=$(authvchkpwc)
- libauth_authldap_a_SOURCES=$(authldapc)
- libauth_authmysql_a_SOURCES=$(authmysqlc)
- libauth_authdaemon_a_SOURCES=$(authdaemonc)
- #
- # Then, let's make sure that they're built together with libauth.a
- # and libauthmod.a
- #
- noinst_LIBRARIES=libauth.a libauthmod.a @LIBAUTH@
- libauth_a_SOURCES=auth.h authexit.c chain.c changeuidgid.c checkpassword.c
- authstaticlist.c authstaticlist.h authstaticlistsearch.c
- copyargv.c success.c
- $(checkpasswordmd5c)
- $(authmysqlc)
- authsasl.c authsasl.h authsaslcram.c authsasllogin.c
- authsaslfrombase64.c authsasltobase64.c $(authsaslcramc)
- cramlib.c cramlib.h
- # Now, let's add an additional dependency to libauth.a:
- libauth_a_DEPENDENCIES=libauth-modules
- #
- # What we're going to do is to extract the contents of @LIBAUTH@
- # into a temporary directory, and initialize the contents of this file
- # with the directory's contents!
- libauth_a_LIBADD=`cat libauth-modules`
- #
- # Now, here's how we're going to create this sucker
- #
- libauth-modules: @LIBAUTH@
- rm -rf libauth-modules.dir
- mkdir libauth-modules.dir
- cd libauth-modules.dir ; for f in @LIBAUTH@ ; do
- test ! -f ../$$f || ar x ../$$f ; done
- ls libauth-modules.dir/* >libauth-modules
- libauthmod_a_SOURCES=authmod.c authmod.h authmodclient.c authmodfail.c
- authmoduser.c authmoduser2.c authmoduser3.c
- libauth.dep: libauth1.dep
- cp libauth1.dep libauth.dep
- . ./authdaemonrc ;
- test "$$authdaemonvar" = "" || cp /dev/null libauth.dep
- libauth1.dep: $(authpamlibsdep) $(authpwdlibsdep) $(authshadowlibsdep)
- $(authuserdblibsdep) $(authvchkpwlibsdep) $(authcramlibsdep)
- $(authldaplibsdep) $(authmysqllibsdep) $(authdaemonlibsdep)
- cat $(authpamlibsdep) $(authpwdlibsdep) $(authshadowlibsdep)
- $(authvchkpwlibsdep) $(authuserdblibsdep) $(authcramlibsdep)
- $(authldaplibsdep) $(authmysqllibsdep) $(authdaemonlibsdep)
- /dev/null
- | tr ' ' ' 12' | sh $(srcdir)/libauth.sh | sh $(srcdir)/libauth2.sh
- | sh $(srcdir)/libauth.sh >libauth1.dep
- authpam_SOURCES=mod.h modauthpam.c
- authpam_DEPENDENCIES=libauthmod.a libauth.a
- authpam_LDADD=libauthmod.a libauth.a -lpam @SHADOWLIBS@ @AUTHPAMCRYPT@ @LIBDL@
- authpam.libsdep: authpam
- echo -lpam @SHADOWLIBS@ @AUTHPAMCRYPT@ @LIBDL@ >authpam.libsdep
- authpwd_SOURCES=mod.h modauthpwd.c
- authpwd_DEPENDENCIES=libauthmod.a libauth.a @MD5LIB@
- authpwd_LDADD=libauthmod.a libauth.a @MD5LIB@ $(CRYPTLIBS)
- authpwd.libsdep: authpwd
- echo @MD5LIB@ $(CRYPTLIBS) >authpwd.libsdep
- authshadow_SOURCES=mod.h modauthshadow.c
- authshadow_DEPENDENCIES=libauthmod.a libauth.a @MD5LIB@
- authshadow_LDADD=libauthmod.a libauth.a @MD5LIB@ @SHADOWLIBS@ $(CRYPTLIBS)
- authshadow.libsdep: authshadow
- echo @MD5LIB@ @SHADOWLIBS@ $(CRYPTLIBS) >authshadow.libsdep
- authuserdb_SOURCES=mod.h modauthuserdb.c
- authuserdb_DEPENDENCIES=libauthmod.a libauth.a ../userdb/libuserdb.a
- authuserdb_LDADD=libauthmod.a libauth.a ../userdb/libuserdb.a @dblibrary@ @LIBGDBM@ @LIBDB@ @MD5LIB@ $(CRYPTLIBS)
- authuserdb.libsdep: authuserdb
- echo ../userdb/libuserdb.a @dblibrary@ @LIBGDBM@ @LIBDB@ @MD5LIB@ $(CRYPTLIBS) >authuserdb.libsdep
- authmysql_SOURCES=mod.h modauthmysql.c
- authmysql_DEPENDENCIES=libauthmod.a libauth.a
- authmysql_LDADD=libauthmod.a libauth.a @HMACLIB@ @MD5LIB@ @SHA1LIB@ $(CRYPTLIBS) $(MYSQLLIB)
- @NETLIBS@
- authmysql.libsdep: authmysql
- echo @HMACLIB@ @MD5LIB@ @SHA1LIB@ $(CRYPTLIBS) $(MYSQLLIB) @NETLIBS@ > authmysql.libsdep
- authvchkpw_SOURCES=mod.h modauthvchkpw.c
- authvchkpw_DEPENDENCIES=libauthmod.a libauth.a @MD5LIB@
- authvchkpw_LDADD=libauthmod.a libauth.a @MD5LIB@ -lvpopmail @LIBM@ $(CRYPTLIBS)
- authvchkpw.libsdep: authvchkpw
- echo @MD5LIB@ @LIBM@ -L@vpopmail_home@/lib -lvpopmail $(CRYPTLIBS) >authvchkpw.libsdep
- authcram_SOURCES=mod.h modauthcram.c
- authcram_DEPENDENCIES=libauthmod.a libauth.a @HMACLIB@ ../userdb/libuserdb.a
- @dblibrary@ @MD5LIB@ @SHA1LIB@
- authcram_LDADD=libauthmod.a libauth.a @HMACLIB@ ../userdb/libuserdb.a
- @dblibrary@ @MD5LIB@ @SHA1LIB@ @LIBGDBM@ @LIBDB@
- authcram.libsdep: authcram
- echo @HMACLIB@ ../userdb/libuserdb.a @dblibrary@ @MD5LIB@
- @SHA1LIB@ @LIBGDBM@ @LIBDB@ >authcram.libsdep
- authldap_SOURCES=mod.h modauthldap.c
- authldap_DEPENDENCIES=libauthmod.a libauth.a @MD5LIB@
- authldap_LDADD=libauthmod.a libauth.a @HMACLIB@ @MD5LIB@ @SHA1LIB@
- @LDAPLIBS@ $(CRYPTLIBS) @NETLIBS@
- authldap.libsdep: authldap
- echo @HMACLIB@ @MD5LIB@ @SHA1LIB@ @LDAPLIBS@ $(CRYPTLIBS) @NETLIBS@
- >authldap.libsdep
- authdaemon_SOURCES=mod.h modauthdaemon.c
- authdaemon_DEPENDENCIES=libauthmod.a libauth.a ../numlib/libnumlib.a
- authdaemon_LDADD=libauthmod.a libauth.a ../numlib/libnumlib.a @NETLIBS@
- authdaemon.libsdep: authdaemon
- echo ../numlib/libnumlib.a @NETLIBS@ >authdaemon.libsdep
- authinfo_SOURCES=authinfo.c
- authinfo_DEPENDENCIES=libauth.a libauth.dep
- ../rfc2045/librfc2045.a ../random128/librandom128.a
- authinfo_LDADD=libauth.a ../rfc2045/librfc2045.a
- ../random128/librandom128.a `cat libauth1.dep`
- authtest_SOURCES=authtest.c
- authtest_DEPENDENCIES=libauth.a libauth1.dep
- ../rfc2045/librfc2045.a ../random128/librandom128.a
- authtest_LDADD=libauth.a
- ../rfc2045/librfc2045.a ../random128/librandom128.a `cat libauth1.dep`
- authdaemond_SOURCES=authdaemond.c
- authdaemond_DEPENDENCIES=libauth.a libauth1.dep
- ../rfc2045/librfc2045.a ../random128/librandom128.a
- ../liblock/liblock.a ../numlib/libnumlib.a
- authdaemond_LDADD=libauth.a ../rfc2045/librfc2045.a
- ../random128/librandom128.a
- ../liblock/liblock.a ../numlib/libnumlib.a `cat libauth1.dep`
- authdaemontest_SOURCES=authdaemontest.c
- authdaemontest_DEPENDENCIES=libauth.a libauthmod.a ../numlib/libnumlib.a
- authdaemontest_LDADD=libauth.a libauthmod.a ../numlib/libnumlib.a @NETLIBS@
- authmksock_SOURCES=authmksock.c
- authmksock_LDADD=@NETLIBS@
- man8=authlib.8
- manlinks=authpwd.8 authshadow.8 authuserdb.8 authpam.8 authvchkpw.8 authcram.8
- authldap.8 authmysql.8 authdaemon.8 authdaemond.8
- man8dir=$(mandir)/man8
- man_MANS=@manFILES@
- man_LINKS=@manLINKS@
- BUILT_SOURCES=$(man8) authldaprc.h authmysqlrc.h authdaemonrc.h
- vpopmail_config.h
- noinst_DATA=$(BUILT_SOURCES)
- # automake still a bit stupid...
- install-data-local: install-authldaprc install-authdaemonrc install-authmysqlrc
- test "$(man_LINKS)" = "" && exit 0;
- $(mkinstalldirs) $(DESTDIR)$(man8dir) ;
- for f in $(man_MANS) "" ; do
- test "$$f" = "" && continue ;
- $(INSTALL_DATA) $$f $(DESTDIR)$(man8dir) ; done ;
- cd $(DESTDIR)$(man8dir) || exit 1 ;
- for f in $(man_LINKS) "" ; do
- test "$$f" = "" && continue ;
- rm -f $$f; $(LN_S) authlib.8 $$f ;
- test -w /etc && chown bin $$f && chgrp bin $$f ;
- done ; exit 0
- uninstall-local: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc
- cd $(DESTDIR)$(man8dir) 2>/dev/null || exit 0 ;
- test "$(man_LINKS)" = "" && exit 0;
- rm -f $(man_LINKS) $(man_MANS)
- for f in `cat modulelist` ; do
- test "$$f" = "authldap" || continue ;
- rm -f $(DESTDIR)@authldaprc@;
- done
- for f in `cat modulelist` ; do
- test "$$f" = "authmysqlrc" || continue ;
- rm -f $(DESTDIR)@authmysqlrc@;
- done
- SUFFIXES=.html .8
- .html.8:
- @chmod +x ./html2man.pl
- ./html2man.pl <$< >$*.8
- install-perms:
- @$(MAKE) -$(MAKEFLAGS) install-perms-recursive
- @$(MAKE) -$(MAKEFLAGS) install-perms-local
- install-perms-recursive:
- @>permissions.dat
- @SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do ( cd $$f && $(MAKE) $(AM_MAKEFLAGS) install-perms ) ; cat /dev/null >>$$f/permissions.dat ; cat $$f/permissions.dat >>permissions.dat ; done
- install-perms-local:
- @test "$(man_MANS)" = "" && exit 0 ;
- for f in $(man_MANS) $(man_LINKS) ; do
- echo $(man8dir)/$$f 644 bin bin man >>permissions.dat ; done
- @for f in `cat modulelist` ; do
- test "$$f" = "authldap" || continue ;
- echo $(sysconfdir)/authldaprc $(rcperms) $(user) $(group) config >>permissions.dat;
- done
- @for f in `cat modulelist` ; do
- test "$$f" = "authmysql" || continue ;
- echo $(sysconfdir)/authmysqlrc $(rcperms) $(user) $(group) config >>permissions.dat;
- done
- CLEANFILES=libauth.dep libauth1.dep *.libsdep @LIBAUTH@
- authvchkpw.o: authvchkpw.c vpopmail_config.h
- authmysqllib.o: authmysqllib.c authmysqlrc.h
- preauthvchkpw.o: preauthvchkpw.c vpopmail_config.h
- authldaplib.o: authldaplib.c authldaprc.h
- authdaemond.o: authdaemonrc.h authdaemond.c
- authdaemonlib.o: authdaemonrc.h authdaemonlib.c