Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F4512721
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Makefile.top.in b/Makefile.top.in
index 98b1b121..a6a7d3e2 100644
--- a/Makefile.top.in
+++ b/Makefile.top.in
@@ -1,15 +1,16 @@
CC=@CC@
+CXX=@CXX@
CFLAGS=@CFLAGS@
CFLAGS+=-fPIC -Wall -Wstrict-prototypes -Wshadow -Werror -D_GNU_SOURCE
LEX=@LEX@
YACC=@YACC@
prefix=@prefix@
exec_prefix=@exec_prefix@
sysconfdir=@sysconfdir@
sbindir=@sbindir@
libdir=@libdir@
PACKAGE_NAME=@PACKAGE_NAME@
diff --git a/configure.in b/configure.in
index cad90291..6e223141 100644
--- a/configure.in
+++ b/configure.in
@@ -1,117 +1,127 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(fence-virt, 0.1, lon@metamorphism.com)
AC_CONFIG_SRCDIR([server/main.c])
AC_CONFIG_HEADER([include/config.h])
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
AC_PROG_MAKE_SET
# Checks for libraries.
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])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h termios.h unistd.h openais/cpg.h corosync/cpg.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([gettimeofday memmove memset select socket strcasecmp strchr strdup strerror])
#
# Modular build for fence_virtd to split up dependencies
# (default)
#
AC_ARG_ENABLE(modules,
[AS_HELP_STRING([--disable-modules],
[Disable modular build])],
[ modules=$enableval ], [ modules=yes ])
AC_SUBST(modules)
### The following options only are used when $modules="yes" ###
# Null plugin: Disabled by default
AC_ARG_ENABLE(null-plugin,
[AS_HELP_STRING([--enable-null-plugin],
[Enable null (no-op) backend plugin])],
[ mod_null=$enableval ], [ mod_null=no ])
AC_SUBST(mod_null)
# libvirt plugin: Enabled by default
AC_ARG_ENABLE(libvirt-plugin,
[AS_HELP_STRING([--disable-libvirt-plugin],
[Disable local-mode libvirt backend plugin])],
[ mod_libvirt=$enableval ], [ mod_libvirt=yes ])
AC_SUBST(mod_libvirt)
# checkpoint plugin: Enabled by default
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],
[Disable multicast listener plugin])],
[ mod_multicast=$enableval ], [ mod_multicast=yes ])
AC_SUBST(mod_multicast)
# serial/libvirt plugin: Disabled by default
AC_ARG_ENABLE(serial-plugin,
[AS_HELP_STRING([--disable-serial-plugin],
[Enable serial listener plugin])],
[ mod_serial=$enableval ], [ mod_serial=no ])
AC_SUBST(mod_serial)
#
# Compatibility symlink: disabled by default
#
AC_ARG_ENABLE(xvm-compat,
[AS_HELP_STRING([--enable-xvm-compat],
[Enable serial listener plugin])],
[ xvm_compat=$enableval ], [ xvm_compat=no ])
AC_SUBST(xvm_compat)
AC_CONFIG_FILES([Makefile.top
Makefile
client/Makefile
common/Makefile
config/Makefile
server/Makefile])
AC_OUTPUT
diff --git a/server/Makefile.in b/server/Makefile.in
index b5004f28..69eb16df 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -1,130 +1,142 @@
###############################################################################
###############################################################################
##
## Copyright (C) 2009 Red Hat, Inc.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2.
##
###############################################################################
###############################################################################
include ../Makefile.top
#
# Modular information
#
with_modules=@modules@
TARGETS=fence_virtd
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`
LIBS+=-L../common -lfence_virt -Wl,-wrap,syslog,-wrap,closelog -lpthread
MODULE_PATH=${libdir}/${PACKAGE_NAME}
#
# Module sources
#
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
################################
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
#################
# Modular build #
#################
CFLAGS+=-D_MODULE -DMODULE_PATH=\"${MODULE_PATH}\"
MODULES=
ifneq ($(mod_libvirt),no)
MODULES+=libvirt.so
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
ifneq ($(mod_null),no)
MODULES+=null.so
endif
else
####################
# Monolithic build #
####################
ifneq ($(mod_libvirt),no)
fence_virtd_SOURCES+=${libvirt_so_SOURCES}
LIBS+=$(VIRT_LIBS)
endif
ifneq ($(mod_checkpoint),no)
fence_virtd_SOURCES+=${checkpoint_so_SOURCES}
LIBS+=$(AIS_LIBS) $(COROSYNC_LIBS)
endif
ifneq ($(mod_multicast),no)
fence_virtd_SOURCES+=${multicast_so_SOURCES}
LIBS+=$(AIS_LIBS) $(NSS_LIBS)
endif
ifneq ($(mod_null),no)
fence_virtd_SOURCES+=${null_so_SOURCES}
endif
endif
CFLAGS+=-DSYSCONFDIR=\"@sysconfdir@\"
all: ${TARGETS} ${MODULES}
fence_virtd: ${fence_virtd_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) $(MAIN_LIBS)
multicast.so: ${multicast_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
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
checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS) $(COROSYNC_LIBS)
%.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} ; \
fi
install -m755 ${TARGETS} ${DESTDIR}/${sbindir}
ifeq ($(with_modules),yes)
if [ ! -d ${DESTDIR}/${MODULE_PATH} ]; then \
install -d ${DESTDIR}/${MODULE_PATH} ; \
fi
install -m755 ${MODULES} ${DESTDIR}/${MODULE_PATH}
endif
clean:
rm -f ${TARGETS} ${MODULES} *.o *.d *~
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Jun 25, 6:34 AM (10 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1952457
Default Alt Text
(7 KB)
Attached To
Mode
rF Fence Agents
Attached
Detach File
Event Timeline
Log In to Comment