]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/Makefile.am
AFP statistics via dbus IPC
[netatalk.git] / etc / afpd / Makefile.am
index 85b51dc86bdca8971ecb85ce94c66c1273c28e21..1612344a5132232ba3b06262d6e31c4762022f39 100644 (file)
@@ -1,6 +1,10 @@
 # Makefile.am for etc/afpd/
 
 pkgconfdir = @PKGCONFDIR@
+BUILT_SOURCES =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
 
 sbin_PROGRAMS = afpd
 noinst_PROGRAMS = hash fce
@@ -28,7 +32,6 @@ afpd_SOURCES = \
        file.c \
        filedir.c \
        fork.c \
-       gettok.c \
        hash.c \
        main.c \
        mangle.c \
@@ -50,7 +53,7 @@ afpd_LDADD =  \
 afpd_LDFLAGS = -export-dynamic
 
 afpd_CFLAGS = \
-       @ZEROCONF_CFLAGS@ @GSSAPI_CFLAGS@ @KRB5_CFLAGS@\
+       @ZEROCONF_CFLAGS@ @GSSAPI_CFLAGS@ @KRB5_CFLAGS@ @PTHREAD_CFLAGS@\
        -DAPPLCNAME \
        -DSERVERTEXT=\"$(SERVERTEXT)/\" \
        -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" \
@@ -62,11 +65,28 @@ if HAVE_ACLS
 afpd_SOURCES += acls.c
 endif
 
+if HAVE_DBUS_GLIB
+BUILT_SOURCES += afpstats_service_glue.h
+EXTRA_DIST += afpstats-service.xml
+DISTCLEANFILES += afpstats_service_glue.h
+
+afpstats_service_glue.h: afpstats-service.xml
+       $(LIBTOOL) --mode=execute \
+               dbus-binding-tool \
+                       --prefix=afpstats_obj \
+                       --mode=glib-server \
+                       --output=afpstats_service_glue.h \
+                       $(top_srcdir)/etc/afpd/afpstats-service.xml
+
+afpd_SOURCES += afpstats.c afpstats_obj.c
+afpd_CFLAGS  += $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) -DDBUS_COMPILATION
+afpd_LDFLAGS += $(DBUS_LIBS) $(DBUS_GLIB_LIBS) -ldbus-glib-1
+endif
 
 noinst_HEADERS = auth.h afp_config.h desktop.h directory.h fce_api_internal.h file.h \
         filedir.h fork.h icon.h mangle.h misc.h status.h switch.h \
         uam_auth.h uid.h unix.h volume.h hash.h acls.h acl_mappings.h extattrs.h \
-        dircache.h afp_zeroconf.h afp_avahi.h afp_mdns.h
+        dircache.h afp_zeroconf.h afp_avahi.h afp_mdns.h afpstats.h afpstats_obj.h
 
 hash_SOURCES = hash.c
 hash_CFLAGS = -DKAZLIB_TEST_MAIN -I$(top_srcdir)/include