Add libvirt-qpid build target
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
parent
1b5e472d59
commit
9d59ad84a5
@ -1,4 +1,5 @@
|
||||
CC=@CC@
|
||||
CXX=@CXX@
|
||||
|
||||
CFLAGS=@CFLAGS@
|
||||
CFLAGS+=-fPIC -Wall -Wstrict-prototypes -Wshadow -Werror -D_GNU_SOURCE
|
||||
|
12
configure.in
12
configure.in
@ -11,6 +11,7 @@ AC_CANONICAL_SYSTEM
|
||||
# Checks for programs.
|
||||
AC_PROG_YACC
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_LEX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
@ -21,6 +22,7 @@ AC_CHECK_LIB([SaCkpt], [saCkptCheckpointOpen])
|
||||
AC_CHECK_LIB([cpg], [cpg_finalize])
|
||||
AC_CHECK_LIB([nss3], [NSS_NoDB_Init])
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
AC_CHECK_LIB([qpidclient], [pthread_create])
|
||||
AC_CHECK_LIB([virt], [virConnectOpen])
|
||||
AC_CHECK_LIB([xml2], [main])
|
||||
|
||||
@ -80,10 +82,18 @@ AC_SUBST(mod_libvirt)
|
||||
AC_ARG_ENABLE(checkpoint-plugin,
|
||||
[AS_HELP_STRING([--disable-checkpoint-plugin],
|
||||
[Disable cluster checkpoint backend plugin])],
|
||||
[ --enable-checkpoint-plugin Do not include cluster checkpoint plugin.],
|
||||
[ --disable-checkpoint-plugin Do not include cluster checkpoint plugin.],
|
||||
[ mod_checkpoint=$enableval ], [ mod_checkpoint=yes ])
|
||||
AC_SUBST(mod_checkpoint)
|
||||
|
||||
# libvirt-qpid plugin: Enabled by default
|
||||
AC_ARG_ENABLE(libvirt-qpid-plugin,
|
||||
[AS_HELP_STRING([--disable-libvirt-qpid-plugin],
|
||||
[Disable libvirt-qpid backend plugin])],
|
||||
[ --disable-libvirt-qpid-plugin Do not include libvirt-qpid plugin.],
|
||||
[ mod_libvirt_qpid=$enableval ], [ mod_libvirt_qpid=yes ])
|
||||
AC_SUBST(mod_libvirt_qpid)
|
||||
|
||||
# multicast plugin: Enabled by default
|
||||
AC_ARG_ENABLE(multicast-plugin,
|
||||
[AS_HELP_STRING([--disable-multicast-plugin],
|
||||
|
@ -23,6 +23,7 @@ MAIN_LIBS=-L../config -lsimpleconfig -ldl
|
||||
AIS_LIBS=-L@libdir@/openais -lSaCkpt
|
||||
COROSYNC_LIBS=-L@libdir@/corosync -lcpg
|
||||
VIRT_LIBS=-lvirt
|
||||
VIRT_QPID=-lqpidclient
|
||||
NSS_LIBS=-lnss3
|
||||
|
||||
INCLUDES=-I../include `nss-config --cflags` `nspr-config --cflags`
|
||||
@ -37,6 +38,7 @@ MODULE_PATH=${libdir}/${PACKAGE_NAME}
|
||||
fence_virtd_SOURCES = main.c plugin.c
|
||||
libvirt_so_SOURCES = libvirt.c
|
||||
null_so_SOURCES = null.c
|
||||
libvirt_qpid_so_SOURCES = libvirt-qpid.cpp
|
||||
multicast_so_SOURCES = mcast.c history.c
|
||||
checkpoint_so_SOURCES = virt.c vm_states.c history.c checkpoint.c cpg.c
|
||||
|
||||
@ -47,6 +49,7 @@ ifeq ($(with_modules),yes)
|
||||
mod_null=@mod_null@
|
||||
mod_libvirt=@mod_libvirt@
|
||||
mod_checkpoint=@mod_checkpoint@
|
||||
mod_libvirt_qpid=@mod_libvirt_qpid@
|
||||
mod_multicast=@mod_multicast@
|
||||
mod_serial=@mod_serial@ # XXX Not done yet
|
||||
|
||||
@ -61,6 +64,9 @@ endif
|
||||
ifneq ($(mod_checkpoint),no)
|
||||
MODULES+=checkpoint.so
|
||||
endif
|
||||
ifneq ($(mod_libvirt_qpid),no)
|
||||
MODULES+=libvirt-qpid.so
|
||||
endif
|
||||
ifneq ($(mod_multicast),no)
|
||||
MODULES+=multicast.so
|
||||
endif
|
||||
@ -105,6 +111,9 @@ multicast.so: ${multicast_so_SOURCES:.c=.o}
|
||||
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
|
||||
$(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS)
|
||||
|
||||
libvirt-qpid.so: ${libvirt_qpid_so_SOURCES:.cpp=.opp}
|
||||
$(CC) -o $@ $^ $(LIBS) -shared $(QPID_LIBS)
|
||||
|
||||
null.so: ${null_so_SOURCES:.c=.o}
|
||||
$(CC) -o $@ $^ $(LIBS) -shared
|
||||
|
||||
@ -114,6 +123,9 @@ checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
||||
|
||||
%.opp: %.cpp
|
||||
$(CPP) $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
||||
|
||||
install: all
|
||||
if [ ! -d ${DESTDIR}/${sbindir} ]; then \
|
||||
install -d ${DESTDIR}/${sbindir} ; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user