Add support for SOCKETDIR

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1856 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Fabio M. Di Nitto 2009-03-17 10:46:19 +00:00
parent 38a7a8f973
commit 2feb8f959c
10 changed files with 18 additions and 6 deletions

View File

@ -142,6 +142,11 @@ AC_ARG_WITH([lcrso-dir],
[ LCRSODIR="$withval" ],
[ LCRSODIR="$libexecdir/lcrso" ])
AC_ARG_WITH([socket-dir],
[ --with-socket-dir=DIR : corosync socket dir. ],
[ SOCKETDIR="$withval" ],
[ SOCKETDIR="$localstatedir/run" ])
# OS detection
# THIS SECTION MUST DIE!
@ -282,6 +287,7 @@ LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
# substitute what we need:
AC_SUBST([LCRSODIR])
AC_SUBST([SOCKETDIR])
AC_SUBST([SOMAJOR])
AC_SUBST([SOMINOR])
@ -311,6 +317,7 @@ AC_MSG_RESULT([ Arch-independent files = ${datadir}])
AC_MSG_RESULT([ State information = ${localstatedir}])
AC_MSG_RESULT([ System configuration = ${sysconfdir}])
AC_MSG_RESULT([ LCRSO = ${LCRSODIR}])
AC_MSG_RESULT([ SOCKETDIR = ${SOCKETDIR}])
AC_MSG_RESULT([ Features =${PKG_FEATURES}])
AC_MSG_RESULT([])
AC_MSG_RESULT([$PACKAGE build info:])

View File

@ -32,7 +32,8 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -fPIC
AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLCRSODIR=\"${LCRSODIR}\" -DLOCALSTATEDIR=\"${localstatedir}\"
AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLOCALSTATEDIR=\"${localstatedir}\" \
-DLCRSODIR=\"${LCRSODIR}\" -DSOCKETDIR=\"${SOCKETDIR}\"
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LCR_SRC = objdb.c vsf_ykd.c coroparse.c quorum.c vsf_quorum.c

View File

@ -689,7 +689,7 @@ static int conn_info_create (int fd)
#if defined(COROSYNC_LINUX)
const char *socketname = "libais.socket";
#else
const char *socketname = LOCALSTATEDIR "/run/libais.socket";
const char *socketname = SOCKETDIR "/libais.socket";
#endif
static int poll_handler_accept (

View File

@ -31,7 +31,8 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -fPIC
AM_CPPFLAGS = -DLCRSODIR=\"${LCRSODIR}\" -DLOCALSTATEDIR=\"${localstatedir}\"
AM_CPPFLAGS = -DLCRSODIR=\"${LCRSODIR}\" -DLOCALSTATEDIR=\"${localstatedir}\" \
-DSOCKETDIR=\"${SOCKETDIR}\"
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LCRSO = libtest_a.lcrso libtest_b.lcrso

View File

@ -59,7 +59,7 @@
#ifdef COROSYNC_LINUX
static const char *socketname = "lcr.socket";
#else
static const char *socketname = LOCALSTATEDIR "/run/lcr.socket";
static const char *socketname = SOCKETDIR "/lcr.socket";
#endif
static int uic_connect (int *fd);

View File

@ -61,7 +61,7 @@
#ifdef COROSYNC_LINUX
static char *socketname = "lcr.socket";
#else
static char *socketname = LOCALSTATEDIR "/run/lcr.socket";
static char *socketname = SOCKETDIR "/lcr.socket";
#endif
static void uis_lcr_bind (int *server_fd)

View File

@ -33,6 +33,7 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -fPIC
AM_CPPFLAGS = -DLOCALSTATEDIR=\"${localstatedir}\" -DSOCKETDIR=\"${SOCKETDIR}\"
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
lib_LIBRARIES = libcpg.a libconfdb.a libevs.a libcfg.a libquorum.a libvotequorum.a libpload.a libcoroipc.a

View File

@ -93,7 +93,7 @@ static const char *socketname = "libais.socket";
#else
#define AIS_SUN_LEN(a) SUN_LEN(a)
static const char *socketname = LOCALSTATEDIR "/run/libais.socket";
static const char *socketname = SOCKETDIR "/libais.socket";
#endif
#ifdef SO_NOSIGPIPE

View File

@ -51,6 +51,7 @@ corosync.pc:
-e 's#@LIBDIR@#$(libdir)#g' \
-e 's#@LIBVERSION@#$(VERSION)#g' \
-e 's#@COROLCRSODIR@#$(LCRSODIR)#g' \
-e 's#@COROSOCKETDIR@#$(SOCKETDIR)#g' \
> $@
all-local: $(pkgconf_LIBS) corosync.pc

View File

@ -3,6 +3,7 @@ exec_prefix=${prefix}
libdir=@LIBDIR@
includedir=${prefix}/include
lcrsodir=@COROLCRSODIR@
socketdir=@COROSOCKETDIR@
Name: corosync
Version: @LIBVERSION@