]> git.meshlink.io Git - catta/blob - avahi-daemon/Makefile.am
fix build for non-dbus installations
[catta] / avahi-daemon / Makefile.am
1 # $Id$
2 #
3 # This file is part of avahi.
4
5 # avahi is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation; either version 2 of the
8 # License, or (at your option) any later version.
9 #
10 # avahi is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 # License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with avahi; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA.
19
20 AM_CFLAGS=-I$(top_srcdir)
21
22 # This cool debug trap works on i386/gcc only
23 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
24
25 if HAVE_LIBDAEMON
26 if HAVE_EXPAT
27
28 pkgsysconfdir=$(sysconfdir)/avahi
29 servicedir=$(pkgsysconfdir)/services
30 introspectiondir=$(pkgdatadir)/introspection
31
32 AM_CFLAGS+= \
33         -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
34         -DAVAHI_SOCKET=\"$(avahi_socket)\" \
35         -DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
36         -DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
37         -DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
38         -DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
39
40 sbin_PROGRAMS = \
41         avahi-daemon
42
43 if ENABLE_TESTS
44 noinst_PROGRAMS = \
45         ini-file-parser-test
46 endif
47
48 avahi_daemon_SOURCES = \
49         main.c main.h \
50         simple-protocol.c simple-protocol.h \
51         static-services.c static-services.h \
52         ini-file-parser.c ini-file-parser.h \
53         setproctitle.c setproctitle.h \
54         ../avahi-client/check-nss.c
55
56 avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
57 avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) -lexpat
58
59 ini_file_parser_test_SOURCES = \
60         ini-file-parser.c ini-file-parser.h \
61         ini-file-parser-test.c
62
63 ini_file_parser_test_CFLAGS = $(AM_CFLAGS)
64 ini_file_parser_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la 
65
66 pkgsysconf_DATA = \
67         avahi-daemon.conf
68
69 service_DATA = \
70         ssh.service
71
72 pkgdata_DATA = \
73         avahi-service.dtd
74
75 if ENABLE_CHROOT
76
77 avahi_daemon_SOURCES += \
78         chroot.c chroot.h \
79         caps.c caps.h
80
81 avahi_daemon_LDADD += -lcap
82
83 endif
84
85 if HAVE_DBUS
86
87 dbusservicedir=$(DBUS_SYS_DIR)
88
89 avahi_daemon_SOURCES += \
90         dbus-protocol.c dbus-protocol.h \
91         dbus-util.c dbus-util.h \
92         dbus-internal.h \
93         dbus-async-address-resolver.c \
94         dbus-async-host-name-resolver.c \
95         dbus-async-service-resolver.c \
96         dbus-domain-browser.c \
97         dbus-entry-group.c \
98         dbus-service-browser.c \
99         dbus-service-type-browser.c \
100         dbus-sync-address-resolver.c \
101         dbus-sync-host-name-resolver.c \
102         dbus-sync-service-resolver.c \
103         dbus-record-browser.c  \
104         ../avahi-common/dbus.c ../avahi-common/dbus.h \
105         ../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
106
107 avahi_daemon_LDADD += \
108         $(DBUS_LIBS)
109
110 if HAVE_DLOPEN
111 avahi_daemon_LDADD += -ldl
112 endif
113
114 avahi_daemon_CFLAGS += $(DBUS_CFLAGS)
115
116 dbusservice_DATA = avahi-dbus.conf
117
118 introspection_DATA = \
119         Server.introspect \
120         EntryGroup.introspect \
121         DomainBrowser.introspect \
122         ServiceTypeBrowser.introspect \
123         ServiceBrowser.introspect \
124         ServiceResolver.introspect \
125         AddressResolver.introspect \
126         HostNameResolver.introspect \
127         RecordBrowser.introspect
128
129 endif
130 endif
131 endif
132
133 EXTRA_DIST = \
134         avahi-service.dtd \
135         avahi-daemon.conf \
136         example.service \
137         avahi-dbus.conf \
138         Server.introspect \
139         EntryGroup.introspect \
140         DomainBrowser.introspect \
141         ServiceTypeBrowser.introspect \
142         ServiceBrowser.introspect \
143         ServiceResolver.introspect \
144         AddressResolver.introspect \
145         HostNameResolver.introspect \
146         RecordBrowser.introspect \
147         ssh.service \
148         example.service \
149         introspect.dtd \
150         introspect.xsl
151
152 xmllint:
153         xmllint --noout --valid example.service
154         for F in $(introspection_DATA) ; do \
155                 xmllint --noout --valid $$F ; \
156         done