Makefile.am 14.5 KB
Newer Older
D
Daniel P. Berrange 已提交
1 2
## Process this file with automake to produce Makefile.in

3
## Copyright (C) 2005-2014 Red Hat, Inc.
E
Eric Blake 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library.  If not, see
## <http://www.gnu.org/licenses/>.
18

19
INCLUDES = \
20
	-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
21
	-I$(top_srcdir) \
22 23
	-I$(top_builddir)/include -I$(top_srcdir)/include \
	-I$(top_builddir)/src -I$(top_srcdir)/src \
24 25 26 27
	-I$(top_srcdir)/src/util \
	-I$(top_srcdir)/src/conf \
	-I$(top_srcdir)/src/rpc \
	-I$(top_srcdir)/src/remote \
28
	-I$(top_srcdir)/src/access \
29 30
	$(GETTEXT_CPPFLAGS)

31 32
CLEANFILES =

E
Eric Blake 已提交
33 34 35 36
DAEMON_GENERATED =			\
		remote_dispatch.h	\
		lxc_dispatch.h		\
		qemu_dispatch.h		\
37
		$(NULL)
38 39 40 41 42 43

DAEMON_SOURCES =					\
		libvirtd.c libvirtd.h			\
		remote.c remote.h			\
		stream.c stream.h			\
		$(DAEMON_GENERATED)
44

45 46
LIBVIRTD_CONF_SOURCES = libvirtd-config.c libvirtd-config.h

47
DISTCLEANFILES =
48
EXTRA_DIST =						\
49
	remote_dispatch.h				\
50
	lxc_dispatch.h					\
51
	qemu_dispatch.h					\
52 53
	libvirtd.conf					\
	libvirtd.init.in				\
A
Alan Pevec 已提交
54
	libvirtd.upstart				\
C
Cole Robinson 已提交
55
	libvirtd.policy.in				\
56
	libvirt.rules					\
57
	libvirtd.sasl					\
58
	libvirtd.service.in				\
59
	libvirtd.socket.in				\
60
	libvirtd.sysconf				\
E
Eric Blake 已提交
61
	libvirtd.sysctl					\
62
	libvirtd.aug                                    \
63
	libvirtd.logrotate.in                           \
64 65
	libvirtd.qemu.logrotate.in                      \
	libvirtd.lxc.logrotate.in                       \
J
Jim Fehlig 已提交
66
	libvirtd.libxl.logrotate.in                     \
67
	libvirtd.uml.logrotate.in                       \
68
	test_libvirtd.aug.in                             \
69
	THREADS.txt					\
70
	libvirtd.pod.in					\
71
	libvirtd.8.in					\
72 73 74
	$(DAEMON_SOURCES)				\
	$(LIBVIRTD_CONF_SOURCES)			\
	$(NULL)
75

76
BUILT_SOURCES =
77

78
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
79
LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
80 81
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x

M
Michal Privoznik 已提交
82
remote_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
83
		$(REMOTE_PROTOCOL)
M
Michal Privoznik 已提交
84
	$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
E
Eric Blake 已提交
85 86
	  --mode=server remote REMOTE $(REMOTE_PROTOCOL) \
	  > $(srcdir)/remote_dispatch.h
87

M
Michal Privoznik 已提交
88
lxc_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
89
		$(LXC_PROTOCOL)
M
Michal Privoznik 已提交
90
	$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
E
Eric Blake 已提交
91 92
	  --mode=server lxc LXC $(LXC_PROTOCOL) \
	  > $(srcdir)/lxc_dispatch.h
93

M
Michal Privoznik 已提交
94
qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
95
		$(QEMU_PROTOCOL)
M
Michal Privoznik 已提交
96
	$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
E
Eric Blake 已提交
97 98
	  --mode=server qemu QEMU $(QEMU_PROTOCOL) \
	  > $(srcdir)/qemu_dispatch.h
99

100 101
if WITH_LIBVIRTD

102 103 104 105 106
# Build a convenience library, for reuse in tests/libvirtdconftest
noinst_LTLIBRARIES = libvirtd_conf.la
libvirtd_conf_la_SOURCES = $(LIBVIRTD_CONF_SOURCES)
libvirtd_conf_la_CFLAGS = \
	$(LIBXML_CFLAGS) \
E
Eric Blake 已提交
107
	$(XDR_CFLAGS) \
108 109 110 111 112 113 114 115 116 117 118
	$(WARN_CFLAGS) $(PIE_CFLAGS) \
	$(COVERAGE_CFLAGS) \
	$(NULL)
libvirtd_conf_la_LDFLAGS =				\
	$(RELRO_LDFLAGS)				\
	$(PIE_LDFLAGS)					\
	$(COVERAGE_LDFLAGS)				\
	$(NO_INDIRECT_LDFLAGS)				\
	$(NULL)
libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)

119
man8_MANS = libvirtd.8
120

121 122 123 124
sbin_PROGRAMS = libvirtd

confdir = $(sysconfdir)/libvirt/
conf_DATA = libvirtd.conf
125

126
augeasdir = $(datadir)/augeas/lenses
127
augeas_DATA = libvirtd.aug
128 129

augeastestsdir = $(datadir)/augeas/lenses/tests
130
augeastests_DATA = test_libvirtd.aug
131

132 133
CLEANFILES += test_libvirtd.aug

134
libvirtd.8: $(srcdir)/libvirtd.8.in
135
	$(AM_V_GEN)sed \
136 137
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
138
	    < $< > $@-t && \
139 140
	mv $@-t $@

141
libvirtd_SOURCES = $(DAEMON_SOURCES)
142

D
Daniel P. Berrange 已提交
143
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
144
libvirtd_CFLAGS = \
145
	$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
146
	$(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
D
Daniel P. Berrange 已提交
147
	$(WARN_CFLAGS) $(PIE_CFLAGS) \
148
	$(COVERAGE_CFLAGS) \
149
	-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
150

E
Eric Blake 已提交
151
libvirtd_LDFLAGS =					\
G
Guido Günther 已提交
152
	$(RELRO_LDFLAGS)				\
D
Daniel P. Berrange 已提交
153
	$(PIE_LDFLAGS)					\
G
Guido Günther 已提交
154
	$(COVERAGE_LDFLAGS)				\
155
	$(NO_INDIRECT_LDFLAGS)				\
G
Guido Günther 已提交
156
	$(NULL)
157

158
libvirtd_LDADD =					\
159 160 161
	$(LIBXML_LIBS)					\
	$(GNUTLS_LIBS)					\
	$(SASL_LIBS)					\
162
	$(DBUS_LIBS)					\
D
Doug Goldstein 已提交
163
	$(LIBNL_LIBS)
164

165
if WITH_DTRACE_PROBES
166
libvirtd_LDADD += ../src/libvirt_probes.lo
167
endif WITH_DTRACE_PROBES
168

169
libvirtd_LDADD += \
170
	libvirtd_conf.la \
171
	../src/libvirt-lxc.la \
172 173 174
	../src/libvirt-qemu.la \
	../src/libvirt_driver_remote.la \
	$(NULL)
C
Chris Lalancette 已提交
175

176
if ! WITH_DRIVER_MODULES
177
if WITH_QEMU
178
    libvirtd_LDADD += ../src/libvirt_driver_qemu.la
179
if WITH_DTRACE_PROBES
180
    libvirtd_LDADD += ../src/libvirt_qemu_probes.lo
181 182
endif WITH_DTRACE_PROBES
endif WITH_QEMU
183

184
if WITH_LXC
185
    libvirtd_LDADD += ../src/libvirt_driver_lxc.la
186
endif WITH_LXC
187

188 189
if WITH_XEN
    libvirtd_LDADD += ../src/libvirt_driver_xen.la
190
endif WITH_XEN
191

J
Jim Fehlig 已提交
192 193
if WITH_LIBXL
    libvirtd_LDADD += ../src/libvirt_driver_libxl.la
194
endif WITH_LIBXL
J
Jim Fehlig 已提交
195

196
if WITH_UML
197
    libvirtd_LDADD += ../src/libvirt_driver_uml.la
198
endif WITH_UML
199

J
Jiri Denemark 已提交
200 201
if WITH_VBOX
    libvirtd_LDADD += ../src/libvirt_driver_vbox.la
202
endif WITH_VBOX
J
Jiri Denemark 已提交
203

204
if WITH_STORAGE
205
    libvirtd_LDADD += ../src/libvirt_driver_storage.la
206
endif WITH_STORAGE
207

208
if WITH_NETWORK
209
    libvirtd_LDADD += ../src/libvirt_driver_network.la
210
endif WITH_NETWORK
211

212
if WITH_INTERFACE
213
    libvirtd_LDADD += ../src/libvirt_driver_interface.la
214
endif WITH_INTERFACE
215

216
if WITH_NODE_DEVICES
217
    libvirtd_LDADD += ../src/libvirt_driver_nodedev.la
218
endif WITH_NODE_DEVICES
219 220 221

if WITH_SECRETS
    libvirtd_LDADD += ../src/libvirt_driver_secret.la
222
endif WITH_SECRETS
223 224 225

if WITH_NWFILTER
    libvirtd_LDADD += ../src/libvirt_driver_nwfilter.la
226 227
endif WITH_NWFILTER
endif ! WITH_DRIVER_MODULES
228 229

libvirtd_LDADD += ../src/libvirt.la
D
Daniel P. Berrange 已提交
230

231 232
if WITH_POLKIT
if WITH_POLKIT0
233
policydir = $(datadir)/PolicyKit/policy
C
Cole Robinson 已提交
234
policyauth = auth_admin_keep_session
235
else ! WITH_POLKIT0
236
policydir = $(datadir)/polkit-1/actions
C
Cole Robinson 已提交
237
policyauth = auth_admin_keep
238 239
rulesdir = $(datadir)/polkit-1/rules.d
rulesfile = libvirt.rules
240 241
endif ! WITH_POLKIT0
endif WITH_POLKIT
242

C
Cole Robinson 已提交
243 244
libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
	$(AM_V_GEN) sed \
245
	    -e 's|[@]authaction[@]|$(policyauth)|g' \
C
Cole Robinson 已提交
246 247 248 249
	    < $< > $@-t && \
	mv $@-t $@
BUILT_SOURCES += libvirtd.policy

250 251
install-data-local: install-init-redhat install-init-systemd \
		install-init-upstart \
252 253
		install-data-sasl install-data-polkit \
		install-logrotate install-sysctl
254 255 256
	$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \
		   $(DESTDIR)$(localstatedir)/run/libvirt \
		   $(DESTDIR)$(localstatedir)/lib/libvirt
257

258 259
uninstall-local:: uninstall-init-redhat uninstall-init-systemd \
		uninstall-init-upstart \
260
		uninstall-data-sasl uninstall-data-polkit \
261
		uninstall-logrotate uninstall-sysctl
262
	rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
263
	rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
264
	rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
265

266
if WITH_POLKIT
267
install-data-polkit::
268
	$(MKDIR_P) $(DESTDIR)$(policydir)
C
Cole Robinson 已提交
269
	$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
270 271 272 273 274
if ! WITH_POLKIT0
	$(MKDIR_P) $(DESTDIR)$(rulesdir)
	$(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/50-libvirt.rules
endif ! WITH_POLKIT0

275
uninstall-data-polkit::
276
	rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
277
	rmdir $(DESTDIR)$(policydir) || :
278 279 280 281 282
if ! WITH_POLKIT0
	rm -f $(DESTDIR)$(rulesdir)/50-libvirt.rules
	rmdir $(DESTDIR)$(rulesdir) || :
endif ! WITH_POLKIT0

283
else ! WITH_POLKIT
284 285
install-data-polkit::
uninstall-data-polkit::
286
endif ! WITH_POLKIT
287

288 289
remote.c: $(DAEMON_GENERATED)
remote.h: $(DAEMON_GENERATED)
290

291
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
J
Jim Fehlig 已提交
292 293
		  libvirtd.libxl.logrotate libvirtd.uml.logrotate \
		  libvirtd.logrotate
294

295 296
BUILT_SOURCES += $(LOGROTATE_CONFS)

297
libvirtd.logrotate: libvirtd.logrotate.in
298
	$(AM_V_GEN)sed						\
299
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
300
	    < $< > $@-t && \
301 302
	mv $@-t $@

303
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
304
	$(AM_V_GEN)sed						\
305
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
306
	    < $< > $@-t && \
307 308 309
	mv $@-t $@

libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
310
	$(AM_V_GEN)sed						\
311
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
312 313
	    < $< > $@-t &&					\
	    mv $@-t $@
314

J
Jim Fehlig 已提交
315 316 317 318 319 320
libvirtd.libxl.logrotate: libvirtd.libxl.logrotate.in
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    < $< > $@-t &&					\
	    mv $@-t $@

321
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
322
	$(AM_V_GEN)sed						\
323
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
324 325
	    < $< > $@-t &&					\
	    mv $@-t $@
G
Guido Günther 已提交
326

327
install-logrotate: $(LOGROTATE_CONFS)
328 329 330 331
	$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt/qemu/ \
		   $(DESTDIR)$(localstatedir)/log/libvirt/lxc/ \
		   $(DESTDIR)$(localstatedir)/log/libvirt/uml/ \
		   $(DESTDIR)$(sysconfdir)/logrotate.d/
332 333 334 335 336 337
	$(INSTALL_DATA) libvirtd.logrotate \
		$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
	$(INSTALL_DATA) libvirtd.qemu.logrotate \
		$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
	$(INSTALL_DATA) libvirtd.lxc.logrotate \
		$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
J
Jim Fehlig 已提交
338 339
	$(INSTALL_DATA) libvirtd.libxl.logrotate \
		$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl
340 341
	$(INSTALL_DATA) libvirtd.uml.logrotate \
		$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
G
Guido Günther 已提交
342

343 344 345 346
uninstall-logrotate:
	rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
	      $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
	      $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
J
Jim Fehlig 已提交
347
	      $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl \
348 349 350 351 352 353
	      $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
	rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
	rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
	rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || :
	rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :

354
install-sysconfig:
355
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
356
	$(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
J
Jim Meyering 已提交
357
	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
358 359
uninstall-sysconfig:
	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
360
	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
361

362
if WITH_SYSCTL
363 364
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
365
install-sysctl:
366
	$(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
E
Eric Blake 已提交
367
	$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
368
	  $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf
369

370
uninstall-sysctl:
371
	rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf
372
	rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
373
else ! WITH_SYSCTL
374 375
install-sysctl:
uninstall-sysctl:
376
endif ! WITH_SYSCTL
377 378

if LIBVIRT_INIT_SCRIPT_RED_HAT
D
Daniel P. Berrange 已提交
379

380
BUILT_SOURCES += libvirtd.init
381

382
install-init-redhat: install-sysconfig libvirtd.init
383
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
384 385 386 387 388
	$(INSTALL_SCRIPT) libvirtd.init \
	  $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd

uninstall-init-redhat: uninstall-sysconfig
	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
389
	rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
390
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
391 392
install-init-redhat:
uninstall-init-redhat:
393
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
394 395 396 397 398


if LIBVIRT_INIT_SCRIPT_UPSTART

install-init-upstart: install-sysconfig
399
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
400 401 402 403 404
	$(INSTALL_SCRIPT) libvirtd.upstart \
	  $(DESTDIR)$(sysconfdir)/event.d/libvirtd

uninstall-init-upstart: uninstall-sysconfig
	rm -f $(DESTDIR)$(sysconfdir)/event.d/libvirtd
405
	rmdir $(DESTDIR)$(sysconfdir)/event.d || :
406
else ! LIBVIRT_INIT_SCRIPT_UPSTART
407 408
install-init-upstart:
uninstall-init-upstart:
409
endif ! LIBVIRT_INIT_SCRIPT_UPSTART
410 411 412 413


if LIBVIRT_INIT_SCRIPT_SYSTEMD

414
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
415
BUILT_SOURCES += libvirtd.service libvirtd.socket
416

417
install-init-systemd: install-sysconfig libvirtd.service libvirtd.socket
418
	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
419
	$(INSTALL_DATA) libvirtd.service \
420
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
421 422
	$(INSTALL_DATA) libvirtd.socket \
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.socket
423 424 425

uninstall-init-systemd: uninstall-sysconfig
	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
426
	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.socket
427
	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
428
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
429 430
install-init-systemd:
uninstall-init-systemd:
431
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
432

433
libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
434 435 436 437 438 439
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g'		\
	    < $< > $@-t &&					\
	    chmod a+x $@-t &&					\
440
	    mv $@-t $@
D
Daniel P. Berrange 已提交
441

442
libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
443 444 445 446 447
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g'		\
	    < $< > $@-t &&					\
448 449
	    mv $@-t $@

450 451 452 453 454 455
libvirtd.socket: libvirtd.socket.in $(top_builddir)/config.status
	$(AM_V_GEN)sed						\
	    -e 's|[@]runstatedir[@]|$(runstatedir)|g'		\
	    < $< > $@-t &&					\
	    mv $@-t $@

456

457 458
check-local: check-augeas

459 460 461 462
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl

test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@
463 464

check-augeas: test_libvirtd.aug
465
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
466
	  '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \
467
	fi
468

469

470 471
# This must be added last, since functions it provides/replaces
# are used by nearly every other library.
J
John Levon 已提交
472
libvirtd_LDADD += ../gnulib/lib/libgnu.la $(LIBSOCKET)
473

474
else ! WITH_LIBVIRTD
475 476
install-data-local: install-data-sasl
uninstall-local:: uninstall-data-sasl
477
endif ! WITH_LIBVIRTD
478

479 480 481
POD2MAN = pod2man -c "Virtualization Support" \
			-r "$(PACKAGE)-$(VERSION)" -s 8

482
$(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac
E
Eric Blake 已提交
483 484
	$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \
	    && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
485

486 487
# This is needed for clients too, so can't wrap in
# the WITH_LIBVIRTD conditional
488
if WITH_SASL
489
install-data-sasl:
490
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/
491 492
	$(INSTALL_DATA) $(srcdir)/libvirtd.sasl \
		$(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
493 494 495

uninstall-data-sasl:
	rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
D
Dave Allan 已提交
496
	rmdir $(DESTDIR)$(sysconfdir)/sasl2/ || :
497
else ! WITH_SASL
D
Daniel P. Berrange 已提交
498 499
install-data-sasl:
uninstall-data-sasl:
500
endif ! WITH_SASL
501 502


503
CLEANFILES += $(BUILT_SOURCES) $(man8_MANS)
504
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
505
MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in $(DAEMON_GENERATED)