]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/Makefile.am
fix compilation if DBUS is disabled (closes: #15)
[catta] / avahi-daemon / Makefile.am
index 23f5a97052fc1d205f54da515dfb65decf08ac09..15cbb575cfe5366318b7508e82cd30f9d9d68d5c 100644 (file)
@@ -28,13 +28,13 @@ if HAVE_EXPAT
 pkgsysconfdir=$(sysconfdir)/avahi
 servicedir=$(pkgsysconfdir)/services
 introspectiondir=$(pkgdatadir)/introspection
-dbusservicedir=$(DBUS_SYS_DIR)
 
 AM_CFLAGS+= \
        -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
        -DAVAHI_SOCKET=\"$(avahi_socket)\" \
        -DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
        -DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
+       -DAVAHI_HOSTS_FILE=\"$(pkgsysconfdir)/hosts\" \
        -DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
        -DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
 
@@ -50,8 +50,10 @@ avahi_daemon_SOURCES = \
        main.c main.h \
        simple-protocol.c simple-protocol.h \
        static-services.c static-services.h \
+       static-hosts.c static-hosts.h \
        ini-file-parser.c ini-file-parser.h \
-       setproctitle.c setproctitle.h
+       setproctitle.c setproctitle.h \
+       ../avahi-client/check-nss.c
 
 avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
 avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) -lexpat
@@ -64,7 +66,8 @@ ini_file_parser_test_CFLAGS = $(AM_CFLAGS)
 ini_file_parser_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la 
 
 pkgsysconf_DATA = \
-       avahi-daemon.conf
+       avahi-daemon.conf \
+       hosts
 
 service_DATA = \
        ssh.service
@@ -82,8 +85,14 @@ avahi_daemon_LDADD += -lcap
 
 endif
 
+if HAVE_DLOPEN
+avahi_daemon_LDADD += -ldl
+endif
+
 if HAVE_DBUS
 
+dbusservicedir=$(DBUS_SYS_DIR)
+
 avahi_daemon_SOURCES += \
        dbus-protocol.c dbus-protocol.h \
        dbus-util.c dbus-util.h \
@@ -98,10 +107,11 @@ avahi_daemon_SOURCES += \
        dbus-sync-address-resolver.c \
        dbus-sync-host-name-resolver.c \
        dbus-sync-service-resolver.c \
-       dbus-record-browser.c
+       dbus-record-browser.c  \
+       ../avahi-common/dbus.c ../avahi-common/dbus.h \
+       ../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
 
 avahi_daemon_LDADD += \
-       ../avahi-common/libdbus-common.la \
        $(DBUS_LIBS)
 
 avahi_daemon_CFLAGS += $(DBUS_CFLAGS)
@@ -138,6 +148,7 @@ EXTRA_DIST = \
        HostNameResolver.introspect \
        RecordBrowser.introspect \
        ssh.service \
+       hosts \
        example.service \
        introspect.dtd \
        introspect.xsl
@@ -147,3 +158,6 @@ xmllint:
        for F in $(introspection_DATA) ; do \
                xmllint --noout --valid $$F ; \
        done
+
+install-data-local:
+       test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"