This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: master - build: convert to autoconf/automake/libtool
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Thu, 28 May 2009 12:58:38 +0000 (UTC)
- Subject: cluster: master - build: convert to autoconf/automake/libtool
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=8be9dd0985a6c528396503c899bfab306e3c044c
Commit: 8be9dd0985a6c528396503c899bfab306e3c044c
Parent: ff00108e7d1ac7d8f5e211081a2e9ddc4670371d
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Thu May 28 14:08:57 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu May 28 14:08:57 2009 +0200
build: convert to autoconf/automake/libtool
requires:
- autoconf 2.63b
- automake 1.11
- libtool 2.2.7a
- pkgconfig 0.23
- m4 1.4.13
NOTE: ccs perl bindings are temporary disabled
(google for automake vs perl MakeMaker)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
.gitignore | 39 +++-
Makefile | 65 ----
Makefile.am | 27 ++
autogen.sh | 153 ++++++++++
bindings/Makefile | 4 -
bindings/Makefile.am | 3 +
bindings/Makefile.old | 4 +
bindings/perl/Makefile | 4 -
bindings/perl/Makefile.am | 3 +
bindings/python/Makefile | 4 -
cman/Makefile | 4 -
cman/Makefile.am | 4 +
cman/cman_tool/Makefile | 33 --
cman/cman_tool/Makefile.am | 17 +
cman/cman_tool/join.c | 2 +
cman/cman_tool/main.c | 4 +-
cman/config/Makefile | 29 --
cman/config/Makefile.am | 14 +
cman/config/cman-preconfig.c | 2 +
cman/man/Makefile | 9 -
cman/man/Makefile.am | 8 +
cman/notifyd/Makefile | 37 ---
cman/notifyd/Makefile.am | 36 +++
cman/notifyd/cman_notify.in | 6 +-
cman/notifyd/main.c | 10 +-
cman/qdisk/Makefile | 53 ----
cman/qdisk/Makefile.am | 28 ++
cman/qdisk/bitmap.c | 2 +
cman/qdisk/daemon_init.c | 3 +
cman/qdisk/disk.c | 3 +
cman/qdisk/disk_util.c | 3 +
cman/qdisk/iostate.c | 2 +
cman/qdisk/main.c | 3 +
cman/qdisk/mkqdisk.c | 5 +-
cman/qdisk/proc.c | 3 +
cman/qdisk/scandisk.c | 2 +
cman/qdisk/score.c | 3 +
cman/services/Makefile | 4 -
cman/services/Makefile.am | 3 +
cman/services/cman/Makefile | 4 -
cman/services/cman/Makefile.am | 3 +
cman/services/cman/include/Makefile.am | 3 +
cman/services/cman/lib/Makefile | 19 --
cman/services/cman/lib/Makefile.am | 21 ++
cman/services/cman/lib/libcman.c | 2 +
cman/services/cman/lib/libcman.pc.in | 6 +-
cman/services/cman/services/Makefile | 26 --
cman/services/cman/services/Makefile.am | 14 +
cman/services/cman/services/cman.c | 2 +
cman/tests/Makefile | 23 --
cman/tests/Makefile.am | 13 +
cman/tests/client.c | 2 +
cman/tests/libtest.c | 2 +
cman/tests/qwait.c | 2 +
cman/tests/sysman.c | 2 +
cman/tests/sysmand.c | 2 +
cman/tests/user_service.c | 2 +
common/Makefile | 4 -
common/Makefile.am | 3 +
common/liblogthread/Makefile | 13 -
common/liblogthread/Makefile.am | 14 +
common/liblogthread/liblogthread.c | 2 +
common/liblogthread/liblogthread.pc.in | 6 +-
config/Makefile | 4 -
config/Makefile.am | 3 +
config/libs/Makefile | 4 -
config/libs/Makefile.am | 3 +
config/libs/libccsconfdb/Makefile | 24 --
config/libs/libccsconfdb/Makefile.am | 24 ++
config/libs/libccsconfdb/extras.c | 2 +
config/libs/libccsconfdb/fullxpath.c | 2 +
config/libs/libccsconfdb/libccs.c | 2 +
config/libs/libccsconfdb/libccs.pc.in | 6 +-
config/libs/libccsconfdb/xpathlite.c | 2 +
config/man/Makefile | 4 -
config/man/Makefile.am | 3 +
config/plugins/Makefile | 4 -
config/plugins/Makefile.am | 3 +
config/plugins/ldap/Makefile | 30 --
config/plugins/ldap/Makefile.am | 15 +
config/plugins/ldap/configldap.c | 2 +
config/plugins/xml/Makefile | 28 --
config/plugins/xml/Makefile.am | 14 +
config/plugins/xml/config.c | 2 +
config/tools/Makefile | 4 -
config/tools/Makefile.am | 3 +
config/tools/ccs_tool/Makefile | 39 ---
config/tools/ccs_tool/Makefile.am | 22 ++
config/tools/ccs_tool/ccs_tool.c | 6 +-
config/tools/ccs_tool/editconf.c | 2 +
config/tools/ldap/Makefile | 27 --
config/tools/ldap/Makefile.am | 9 +
config/tools/ldap/confdb2ldif.c | 2 +
config/tools/man/Makefile | 6 -
config/tools/man/Makefile.am | 4 +
config/tools/mkconf/Makefile | 29 --
config/tools/mkconf/Makefile.am | 14 +
config/tools/mkconf/mkconf.c | 2 +
configure | 502 -------------------------------
configure.ac | 294 ++++++++++++++++++
contrib/Makefile | 6 -
doc/Makefile | 26 --
doc/Makefile.am | 34 ++
doc/cluster.logrotate.in | 2 +-
group/Makefile | 4 -
group/Makefile.am | 3 +
group/man/Makefile | 4 -
group/man/Makefile.am | 3 +
group/tool/Makefile | 22 --
group/tool/Makefile.am | 5 +
group/tool/main.c | 4 +-
make/binding-passthrough.mk | 7 -
make/clean.mk | 7 -
make/cobj.mk | 6 -
make/defines.mk.input | 63 ----
make/install.mk | 70 -----
make/lcrso.mk | 23 ++
make/libs.mk | 61 ----
make/man.mk | 18 --
make/official_release_version | 1 -
make/passthrough.mk | 7 -
make/perl-binding-common.mk | 30 --
make/uninstall.mk | 40 ---
scripts/uninstall.pl | 71 -----
124 files changed, 983 insertions(+), 1508 deletions(-)
diff --git a/.gitignore b/.gitignore
index ee9cc71..29e19b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,42 @@
-make/defines.mk
-.configure.sh
*.d
*.o
*.a
*.so*
*.lcrso
-*.po
*.pc
+*.la
+*.lo
+make/config.h*
+make/stamp-h1
+Makefile.in
+Makefile
+.deps
+.libs
+aclocal.m4
+autoconf
+autoheader
+autom4te.cache
+automake
+compile
+config.*
+configure
+depcomp
+install-sh
+libtoolize
+ltmain.sh
+m4
+missing
+libtool
+cman/cman_tool/cman_tool
+cman/notifyd/cman_notify
+cman/notifyd/cmannotifyd
+cman/qdisk/mkqdisk
+cman/qdisk/qdiskd
+cman/tests/client
+cman/tests/sysman
+cman/tests/sysmand
+config/tools/ccs_tool/ccs_tool
+config/tools/ldap/confdb2ldif
+config/tools/mkconf/cman-mkconf
+doc/cluster
+group/tool/group_tool
diff --git a/Makefile b/Makefile
deleted file mode 100644
index f054ddd..0000000
--- a/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-include make/defines.mk
-
-REALSUBDIRS = common config/libs/libccsconfdb cman/services config cman group doc \
- bindings contrib
-
-SUBDIRS = $(filter-out \
- $(if ${without_common},common) \
- $(if ${without_config},config/libs/libccsconfdb) \
- $(if ${without_config},config) \
- $(if ${without_cman},cman/services) \
- $(if ${without_cman},cman) \
- $(if ${without_group},group) \
- $(if ${without_bindings},bindings) \
- , $(REALSUBDIRS))
-
-all: ${SUBDIRS}
-
-${SUBDIRS}:
- [ -n "${without_$@}" ] || ${MAKE} -C $@ all
-
-# Dependencies
-
-common:
-cman/services: config/libs/libccsconfdb
-config: cman/services
-cman: common config
-group: cman
-bindings: cman
-contrib:
-
-oldconfig:
- @if [ -f $(OBJDIR)/.configure.sh ]; then \
- sh $(OBJDIR)/.configure.sh; \
- else \
- echo "Unable to find old configuration data"; \
- fi
-
-install:
- set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
- install -d ${notifyddir}
- install -d ${logdir}
- install -d ${DESTDIR}/var/lib/cluster
- install -d ${DESTDIR}/var/run/cluster
-
-uninstall:
- set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
- rmdir ${notifyddir} || :;
- rmdir ${logdir} || :;
- rmdir ${DESTDIR}/var/lib/cluster || :;
- rmdir ${DESTDIR}/var/run/cluster || :;
-
-clean:
- set -e && for i in ${REALSUBDIRS}; do \
- contrib_code=1 \
- legacy_code=1 \
- ${MAKE} -C $$i $@;\
- done
-
-distclean: clean
- rm -f make/defines.mk
- rm -f .configure.sh
- rm -f *tar.gz
- rm -rf build
-
-.PHONY: ${REALSUBDIRS}
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..d8f8c73
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,27 @@
+EXTRA_DIST = autogen.sh make/lcrso.mk
+
+AUTOMAKE_OPTIONS = foreign
+
+MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure depcomp \
+ config.guess config.sub missing install-sh \
+ autoheader automake autoconf libtool libtoolize \
+ ltmain.sh compile make/config.h.in make/config.h.in~
+
+noinst_HEADERS = make/copyright.cf
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = common config cman group doc bindings
+
+install-exec-local:
+ $(INSTALL) -d $(DESTDIR)/$(LOGDIR)
+ $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARRUN)
+ $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARLIB)
+
+uninstall-local:
+ rmdir $(DESTDIR)/$(LOGDIR) || :;
+ rmdir $(DESTDIR)/$(CLUSTERVARRUN) || :;
+ rmdir $(DESTDIR)/$(CLUSTERVARLIB) || :;
+
+maintainer-clean-local:
+ rm -rf m4
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..647ec5e
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,153 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+testProgram()
+{
+ cmd=$1
+
+ if [ -z "$cmd" ]; then
+ return 1;
+ fi
+
+ arch=`uname -s`
+
+ # Make sure the which is in an if-block... on some platforms it throws exceptions
+ #
+ # The ERR trap is not executed if the failed command is part
+ # of an until or while loop, part of an if statement, part of a &&
+ # or || list.
+ if
+ which $cmd </dev/null >/dev/null 2>&1
+ then
+ :
+ else
+ return 1
+ fi
+
+ # The GNU standard is --version
+ if
+ $cmd --version </dev/null >/dev/null 2>&1
+ then
+ return 0
+ fi
+
+ # Maybe it suppports -V instead
+ if
+ $cmd -V </dev/null >/dev/null 2>&1
+ then
+ return 0
+ fi
+
+ # Nope, the program seems broken
+ return 1
+}
+
+arch=`uname -s`
+# Disable the errors on FreeBSD until a fix can be found.
+if [ ! "$arch" = "FreeBSD" ]; then
+set -e
+#
+# All errors are fatal from here on out...
+# The shell will complain and exit on any "uncaught" error code.
+#
+#
+# And the trap will ensure sure some kind of error message comes out.
+#
+trap 'echo ""; echo "$0 exiting due to error (sorry!)." >&2' 0
+fi
+
+RC=0
+
+gnu="ftp://ftp.gnu.org/pub/gnu"
+
+# Check for Autoconf
+for command in autoconf autoconf213 autoconf253 autoconf259
+do
+ if
+ testProgram $command == 1
+ then
+ autoconf=$command
+ autoheader=`echo "$autoconf" | sed -e 's/autoconf/autoheader/'`
+ autom4te=`echo "$autoconf" | sed -e 's/autoconf/autmo4te/'`
+ autoreconf=`echo "$autoconf" | sed -e 's/autoconf/autoreconf/'`
+ autoscan=`echo "$autoconf" | sed -e 's/autoconf/autoscan/'`
+ autoupdate=`echo "$autoconf" | sed -e 's/autoconf/autoupdate/'`
+ ifnames=`echo "$autoconf" | sed -e 's/autoconf/ifnames/'`
+ fi
+done
+
+# Check for automake
+for command in automake19 automake-1.9 automake
+do
+ if
+ testProgram $command
+ then
+ automake=$command
+ aclocal=`echo "$automake" | sed -e 's/automake/aclocal/'`
+
+ fi
+done
+
+# Check for libtool
+for command in libtoolize
+do
+ if
+ testProgram $command
+ then
+ libtoolize=$command
+ fi
+done
+
+if [ -z $autoconf ]; then
+ echo You must have autoconf installed to compile this package.
+ echo Download the appropriate package for your system,
+ echo or get the source tarball at: $gnu/autoconf/
+ exit 1
+
+elif [ -z $automake ]; then
+ echo You must have automake installed to compile this package.
+ echo Download the appropriate package for your system,
+ echo or get the source tarball at: $gnu/automake/
+ exit 1
+
+elif [ -z $libtoolize ]; then
+ echo You must have libtool installed to compile this package.
+ echo Download the appropriate package for your system,
+ echo or get the source tarball at: $gnu/libtool/
+ exit 1
+
+fi
+
+# Create local copies so that the incremental updates will work.
+rm -f ./autoconf ./automake ./autoheader ./libtoolize
+ln -s `which $autoconf` ./autoconf
+ln -s `which $automake` ./automake
+ln -s `which $autoheader` ./autoheader
+ln -s `which $libtoolize` ./libtoolize
+
+printf "$autoconf:\t"
+$autoconf --version | head -n 1
+
+printf "$automake:\t"
+$automake --version | head -n 1
+
+printf "$libtoolize:\t"
+$libtoolize --version | head -n 1
+
+echo $libtoolize --copy --install
+$libtoolize --copy --install
+
+echo $aclocal $ACLOCAL_FLAGS
+$aclocal $ACLOCAL_FLAGS
+
+echo $autoheader
+$autoheader
+
+echo $automake --add-missing --include-deps --copy
+$automake --add-missing --include-deps --copy
+
+echo $autoconf
+$autoconf
+
+echo Now run ./configure
+trap '' 0
diff --git a/bindings/Makefile b/bindings/Makefile
deleted file mode 100644
index 21085c2..0000000
--- a/bindings/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=perl python
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
new file mode 100644
index 0000000..4e80eeb
--- /dev/null
+++ b/bindings/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = perl
diff --git a/bindings/Makefile.old b/bindings/Makefile.old
new file mode 100644
index 0000000..21085c2
--- /dev/null
+++ b/bindings/Makefile.old
@@ -0,0 +1,4 @@
+include ../make/defines.mk
+include $(OBJDIR)/make/passthrough.mk
+
+SUBDIRS=perl python
diff --git a/bindings/perl/Makefile b/bindings/perl/Makefile
deleted file mode 100644
index cf3a25a..0000000
--- a/bindings/perl/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/binding-passthrough.mk
-
-SUBDIRS=ccs
diff --git a/bindings/perl/Makefile.am b/bindings/perl/Makefile.am
new file mode 100644
index 0000000..ced84b5
--- /dev/null
+++ b/bindings/perl/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = #ccs
diff --git a/bindings/python/Makefile b/bindings/python/Makefile
deleted file mode 100644
index 810b2d4..0000000
--- a/bindings/python/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=
diff --git a/cman/Makefile b/cman/Makefile
deleted file mode 100644
index 8a55b29..0000000
--- a/cman/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=cman_tool config services qdisk notifyd init.d man
diff --git a/cman/Makefile.am b/cman/Makefile.am
new file mode 100644
index 0000000..673ca3a
--- /dev/null
+++ b/cman/Makefile.am
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+# don't do init for now.
+SUBDIRS = services cman_tool config qdisk notifyd man tests # init.d
diff --git a/cman/cman_tool/Makefile b/cman/cman_tool/Makefile
deleted file mode 100644
index 057218a..0000000
--- a/cman/cman_tool/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-TARGET= cman_tool
-
-SBINDIRT=$(TARGET)
-
-all: depends ${TARGET}
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-OBJS= main.o \
- join.o
-
-CFLAGS += -DCOROSYNCBIN=\"${corosyncbin}\"
-CFLAGS += -I${cmanincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${cmanlibdir} -lcman
-LDFLAGS += -L${ccslibdir} -lccs
-LDFLAGS += -L${corosynclibdir} -lvotequorum
-LDFLAGS += -L${libdir}
-
-${TARGET}: ${OBJS}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-depends:
- $(MAKE) -C ../services/cman/lib all
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/cman/cman_tool/Makefile.am b/cman/cman_tool/Makefile.am
new file mode 100644
index 0000000..4972f1f
--- /dev/null
+++ b/cman/cman_tool/Makefile.am
@@ -0,0 +1,17 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+sbin_PROGRAMS = cman_tool
+
+noinst_HEADERS = cman_tool.h
+
+cman_tool_SOURCES = main.c join.c
+
+cman_tool_CPPFLAGS = -I$(top_srcdir)/cman/services/cman/lib/ \
+ -I$(top_srcdir)/config/libs/libccsconfdb/
+
+cman_tool_CFLAGS = $(votequorum_CFLAGS)
+
+cman_tool_LDFLAGS = $(votequorum_LIBS)
+
+cman_tool_LDADD = $(top_builddir)/cman/services/cman/lib/libcman.la \
+ $(top_builddir)/config/libs/libccsconfdb/libccs.la
diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c
index 9c6ec5c..85bd222 100644
--- a/cman/cman_tool/join.c
+++ b/cman/cman_tool/join.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <sys/wait.h>
#include <stdint.h>
#include <signal.h>
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index aef82ac..b300116 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <inttypes.h>
#include <unistd.h>
#include <signal.h>
@@ -780,7 +782,7 @@ static void decode_arguments(int argc, char *argv[], commandline_t *comline)
case 'V':
printf("cman_tool %s (built %s %s)\n",
- RELEASE_VERSION, __DATE__, __TIME__);
+ PACKAGE_VERSION, __DATE__, __TIME__);
printf("%s\n", REDHAT_COPYRIGHT);
exit(EXIT_SUCCESS);
break;
diff --git a/cman/config/Makefile b/cman/config/Makefile
deleted file mode 100644
index d4119bf..0000000
--- a/cman/config/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-TARGET= config_cmanpre.lcrso
-
-LCRSOT=$(TARGET)
-
-all: depends ${TARGET}
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -I${openaisincdir} -I${corosyncincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${libdir}
-
-OBJS= cman-preconfig.o
-
-${TARGET}: ${OBJS}
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
-
-depends:
- $(MAKE) -C ${cmanlibdir} all
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/cman/config/Makefile.am b/cman/config/Makefile.am
new file mode 100644
index 0000000..5bbec56
--- /dev/null
+++ b/cman/config/Makefile.am
@@ -0,0 +1,14 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CFLAGS = -fPIC \
+ $(cfg_CFLAGS)
+
+LCRSO = config_cmanpre.lcrso
+
+SOURCES = cman-preconfig.c
+
+EXTRA_DIST = $(SOURCES)
+
+noinst_HEADERS = cman.h nodelist.h
+
+include $(top_srcdir)/make/lcrso.mk
diff --git a/cman/config/cman-preconfig.c b/cman/config/cman-preconfig.c
index 2b98410..f3c700e 100644
--- a/cman/config/cman-preconfig.c
+++ b/cman/config/cman-preconfig.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/cman/man/Makefile b/cman/man/Makefile
deleted file mode 100644
index 54d7c9a..0000000
--- a/cman/man/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGET= cman.5 \
- qdisk.5 \
- cman_tool.8 \
- qdiskd.8 \
- mkqdisk.8 \
- cmannotifyd.8
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/man.mk
diff --git a/cman/man/Makefile.am b/cman/man/Makefile.am
new file mode 100644
index 0000000..a9e03ca
--- /dev/null
+++ b/cman/man/Makefile.am
@@ -0,0 +1,8 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+dist_man_MANS = cman.5 \
+ qdisk.5 \
+ cman_tool.8 \
+ qdiskd.8 \
+ mkqdisk.8 \
+ cmannotifyd.8
diff --git a/cman/notifyd/Makefile b/cman/notifyd/Makefile
deleted file mode 100644
index 9b9e26b..0000000
--- a/cman/notifyd/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-TARGET1= cmannotifyd
-TARGET2= cman_notify
-
-SBINDIRT=${TARGET1} ${TARGET2}
-
-all: depends ${TARGET1} ${TARGET2}
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -D_GNU_SOURCE -DSBINDIR=\"${sbindir}\"
-CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${cmanlibdir} -L${ccslibdir} -L${logtlibdir} -lcman -lccs -llogthread
-LDFLAGS += -L${libdir}
-
-OBJS1= main.o
-
-${TARGET1}: ${OBJS1}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-${TARGET2}: $(S)/${TARGET2}.in
- cat $(S)/${TARGET2}.in | sed \
- -e 's#@NOTIFYDDIR@#${notifyddir}#g' \
- -e 's#@LOGDIR@#${logdir}#g' \
- > ${TARGET2}
-
-depends:
- $(MAKE) -C ../services/cman/lib all
-
-clean: generalclean
-
--include $(OBJS1:.o=.d)
diff --git a/cman/notifyd/Makefile.am b/cman/notifyd/Makefile.am
new file mode 100644
index 0000000..edf66e6
--- /dev/null
+++ b/cman/notifyd/Makefile.am
@@ -0,0 +1,36 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+sbin_PROGRAMS = cmannotifyd
+
+notifyscript = cman_notify
+
+sbin_SCRIPTS = $(notifyscript)
+
+EXTRA_DIST = $(notifyscript).in
+
+cmannotifyd_SOURCES = main.c
+
+cmannotifyd_CPPFLAGS = -D_GNU_SOURCE \
+ -I$(top_srcdir)/common/liblogthread/ \
+ -I$(top_srcdir)/config/libs/libccsconfdb/ \
+ -I$(top_srcdir)/cman/services/cman/lib/
+
+cmannotifyd_LDADD = $(top_builddir)/common/liblogthread/liblogthread.la \
+ $(top_builddir)/config/libs/libccsconfdb/libccs.la \
+ $(top_builddir)/cman/services/cman/lib/libcman.la
+
+$(notifyscript): $(notifyscript).in
+ cat $^ | sed \
+ -e 's#_NOTIFYDDIR_#${NOTIFYDDIR}#g' \
+ -e 's#_LOGDIR_#${LOGDIR}#g' \
+ > $@
+ chmod a+x $@
+
+install-exec-local:
+ $(INSTALL) -d $(DESTDIR)/$(NOTIFYDDIR)
+
+uninstall-local:
+ rmdir $(DESTDIR)/$(NOTIFYDDIR) || :;
+
+clean-generic:
+ rm -f $(notifyscript)
diff --git a/cman/notifyd/cman_notify.in b/cman/notifyd/cman_notify.in
index 9e05bc0..447657b 100644
--- a/cman/notifyd/cman_notify.in
+++ b/cman/notifyd/cman_notify.in
@@ -5,18 +5,18 @@
# keep going when something fails
set +e
-if [ ! -d "@NOTIFYDDIR@" ]; then
+if [ ! -d "_NOTIFYDDIR_" ]; then
exit 0
fi
-LOGFILE="@LOGDIR@/cman_notify.log"
+LOGFILE="_LOGDIR_/cman_notify.log"
if [ "$CMAN_NOTIFICATION_DEBUG" = "1" ]; then
OUT="$LOGFILE"
fi
# Ignore *~ and *, scripts
-for i in $(LC_ALL=C; echo @NOTIFYDDIR@/*[^~,]); do
+for i in $(LC_ALL=C; echo _NOTIFYDDIR_/*[^~,]); do
[ -d $i ] && continue
# skip know scripts
[ "${i%.cfsaved}" != "${i}" ] && continue
diff --git a/cman/notifyd/main.c b/cman/notifyd/main.c
index d5c90c5..feaebb9 100644
--- a/cman/notifyd/main.c
+++ b/cman/notifyd/main.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -12,9 +14,9 @@
#include <sys/wait.h>
#include <sys/select.h>
-#include <libcman.h>
-#include <ccs.h>
-#include <liblogthread.h>
+#include "libcman.h"
+#include "ccs.h"
+#include "liblogthread.h"
#include "copyright.cf"
@@ -74,7 +76,7 @@ static void read_arguments(int argc, char **argv)
case 'V':
printf("cmannotifyd %s (built %s %s)\n%s\n",
- RELEASE_VERSION, __DATE__, __TIME__,
+ PACKAGE_VERSION, __DATE__, __TIME__,
REDHAT_COPYRIGHT);
exit(EXIT_SUCCESS);
break;
diff --git a/cman/qdisk/Makefile b/cman/qdisk/Makefile
deleted file mode 100644
index cc64057..0000000
--- a/cman/qdisk/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-TARGET1= qdiskd
-TARGET2= mkqdisk
-
-SBINDIRT=${TARGET1} ${TARGET2}
-
-all: depends ${TARGET1} ${TARGET2}
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -D_GNU_SOURCE
-CFLAGS += -Werror -Wstrict-prototypes -Wshadow
-CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir}
-CFLAGS += -I${zlibincdir}
-CFLAGS += -I$(S)
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${logtlibdir} -llogthread -lpthread
-LDFLAGS += -L${zliblibdir} -lz -lrt
-LDFLAGS += -L${libdir}
-
-EXTRA_LDFLAGS += -L${cmanlibdir} -L${ccslibdir} -lcman -lccs
-
-OBJS1= main.o \
- score.o \
- bitmap.o \
- daemon_init.o
-
-OBJS2= mkqdisk.o
-
-SHAREDOBJS= disk.o \
- disk_util.o \
- proc.o \
- scandisk.o \
- iostate.o
-
-${TARGET1}: ${SHAREDOBJS} ${OBJS1}
- $(CC) -o $@ $^ $(EXTRA_LDFLAGS) $(LDFLAGS)
-
-${TARGET2}: ${SHAREDOBJS} ${OBJS2}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-depends:
- $(MAKE) -C ../services/cman/lib all
-
-clean: generalclean
-
--include $(OBJS1:.o=.d)
--include $(OBJS2:.o=.d)
--include $(SHAREDOBJS:.o=.d)
diff --git a/cman/qdisk/Makefile.am b/cman/qdisk/Makefile.am
new file mode 100644
index 0000000..3ba8d98
--- /dev/null
+++ b/cman/qdisk/Makefile.am
@@ -0,0 +1,28 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = -D_GNU_SOURCE \
+ -I$(top_srcdir)/common/liblogthread/ \
+ -I$(top_srcdir)/config/libs/libccsconfdb/ \
+ -I$(top_srcdir)/cman/services/cman/lib/
+
+AM_LDFLAGS = -lpthread -lz -lrt
+
+sbin_PROGRAMS = qdiskd mkqdisk
+
+noinst_HEADERS = disk.h iostate.h platform.h scandisk.h score.h
+
+shared_SOURCES = disk.c disk_util.c proc.c scandisk.c iostate.c
+
+qdiskd_SOURCES = main.c score.c bitmap.c daemon_init.c \
+ $(shared_SOURCES)
+
+mkqdisk_SOURCES = mkqdisk.c \
+ $(shared_SOURCES)
+
+shared_LDADD = $(top_builddir)/common/liblogthread/liblogthread.la
+
+qdiskd_LDADD = $(top_builddir)/config/libs/libccsconfdb/libccs.la \
+ $(top_builddir)/cman/services/cman/lib/libcman.la \
+ $(shared_LDADD)
+
+mkqdisk_LDADD = $(shared_LDADD)
diff --git a/cman/qdisk/bitmap.c b/cman/qdisk/bitmap.c
index 094ad2f..121d381 100644
--- a/cman/qdisk/bitmap.c
+++ b/cman/qdisk/bitmap.c
@@ -1,6 +1,8 @@
/** @file
* Bitmap and membership mask handling routines.
*/
+#include "config.h"
+
#include <stdint.h>
int clear_bit(uint8_t *mask, uint32_t bitidx, uint32_t masklen);
diff --git a/cman/qdisk/daemon_init.c b/cman/qdisk/daemon_init.c
index d5926f9..46c2f7f 100644
--- a/cman/qdisk/daemon_init.c
+++ b/cman/qdisk/daemon_init.c
@@ -10,6 +10,9 @@
*
* Also need to add file locking for the pid file.
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/cman/qdisk/disk.c b/cman/qdisk/disk.c
index 680da2f..55aa556 100644
--- a/cman/qdisk/disk.c
+++ b/cman/qdisk/disk.c
@@ -11,6 +11,9 @@
* aligned. If it isn't a temporary aligned buffer is allocated, a data
* copy is performed along with the IO operation itself.
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
diff --git a/cman/qdisk/disk_util.c b/cman/qdisk/disk_util.c
index 6d6e93e..f6fbe2b 100644
--- a/cman/qdisk/disk_util.c
+++ b/cman/qdisk/disk_util.c
@@ -1,6 +1,9 @@
/**
@file Misc. Quorum daemon context utilities / high-level functions
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
diff --git a/cman/qdisk/iostate.c b/cman/qdisk/iostate.c
index f195c45..5ec98c6 100644
--- a/cman/qdisk/iostate.c
+++ b/cman/qdisk/iostate.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <pthread.h>
#include <iostate.h>
#include <unistd.h>
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index a6be5a8..7eb644d 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1,6 +1,9 @@
/**
@file Main loop / functions for disk-based quorum daemon.
*/
+
+#include "config.h"
+
#define SYSLOG_NAMES
#include <stdio.h>
#include <stdlib.h>
diff --git a/cman/qdisk/mkqdisk.c b/cman/qdisk/mkqdisk.c
index 338bd5c..41774a1 100644
--- a/cman/qdisk/mkqdisk.c
+++ b/cman/qdisk/mkqdisk.c
@@ -1,6 +1,9 @@
/**
@file Quorum disk utility
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <disk.h>
@@ -21,7 +24,7 @@ main(int argc, char **argv)
char *newdev = NULL, *newlabel = NULL;
int rv, verbose_level = 1;
- printf(PROGRAM_NAME " v" RELEASE_VERSION "\n\n");
+ printf(PROGRAM_NAME " v" PACKAGE_VERSION "\n\n");
/* XXX this is horrible but we need to prioritize options as long as
* we can't queue messages properly
diff --git a/cman/qdisk/proc.c b/cman/qdisk/proc.c
index 1b7471e..4ed7bb3 100644
--- a/cman/qdisk/proc.c
+++ b/cman/qdisk/proc.c
@@ -1,6 +1,9 @@
/**
@file Quorum disk /proc/partition scanning functions
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <disk.h>
diff --git a/cman/qdisk/scandisk.c b/cman/qdisk/scandisk.c
index 0b1688f..de55593 100644
--- a/cman/qdisk/scandisk.c
+++ b/cman/qdisk/scandisk.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
diff --git a/cman/qdisk/score.c b/cman/qdisk/score.c
index 81ff700..d0b4e4d 100644
--- a/cman/qdisk/score.c
+++ b/cman/qdisk/score.c
@@ -1,6 +1,9 @@
/**
@file Quorum daemon scoring functions + thread.
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/cman/services/Makefile b/cman/services/Makefile
deleted file mode 100644
index 2f30f36..0000000
--- a/cman/services/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=cman
diff --git a/cman/services/Makefile.am b/cman/services/Makefile.am
new file mode 100644
index 0000000..57fe042
--- /dev/null
+++ b/cman/services/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = cman
diff --git a/cman/services/cman/Makefile b/cman/services/cman/Makefile
deleted file mode 100644
index 263f013..0000000
--- a/cman/services/cman/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=services lib
diff --git a/cman/services/cman/Makefile.am b/cman/services/cman/Makefile.am
new file mode 100644
index 0000000..26df9bf
--- /dev/null
+++ b/cman/services/cman/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = services lib include
diff --git a/cman/services/cman/include/Makefile.am b/cman/services/cman/include/Makefile.am
new file mode 100644
index 0000000..5226209
--- /dev/null
+++ b/cman/services/cman/include/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_HEADERS = corosync/cman.h corosync/ipc_cman.h
diff --git a/cman/services/cman/lib/Makefile b/cman/services/cman/lib/Makefile
deleted file mode 100644
index 654f55c..0000000
--- a/cman/services/cman/lib/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-TARGET= libcman
-
-SOMAJOR=4
-SOMINOR=0
-
-include ../../../../make/defines.mk
-include $(OBJDIR)/make/libs.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -I${ccsincdir} -I${cmanincdir}
-CFLAGS += -I${incdir}
-CFLAGS += -I../include
-
-LDFLAGS += -L${corosynclibdir} -lcoroipcc -lcfg -lvotequorum
-LDFLAGS += -L${ccslibdir} -lccs
diff --git a/cman/services/cman/lib/Makefile.am b/cman/services/cman/lib/Makefile.am
new file mode 100644
index 0000000..0d7c74e
--- /dev/null
+++ b/cman/services/cman/lib/Makefile.am
@@ -0,0 +1,21 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+libversion = 4:0:0
+
+include_HEADERS = libcman.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+
+pkgconfig_DATA = libcman.pc
+
+lib_LTLIBRARIES = libcman.la
+
+libcman_la_CPPFLAGS = -I$(top_srcdir)/config/libs/libccsconfdb \
+ -I$(top_srcdir)/cman/services/cman/include
+
+libcman_la_CFLAGS = $(coroipcc_CFLAGS) $(cfg_CFLAGS) $(votequorum_CFLAGS)
+
+libcman_la_LDFLAGS = $(coroipcc_LIBS) $(cfg_LIBS) $(votequorum_LIBS) \
+ -version-info $(libversion)
+
+libcman_la_LIBADD = $(top_builddir)/config/libs/libccsconfdb/libccs.la
diff --git a/cman/services/cman/lib/libcman.c b/cman/services/cman/lib/libcman.c
index 6381018..1b94430 100644
--- a/cman/services/cman/lib/libcman.c
+++ b/cman/services/cman/lib/libcman.c
@@ -2,6 +2,8 @@
* Provides a cman API using the corosync executive
*/
+#include "config.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/cman/services/cman/lib/libcman.pc.in b/cman/services/cman/lib/libcman.pc.in
index 6084efd..7e9342c 100644
--- a/cman/services/cman/lib/libcman.pc.in
+++ b/cman/services/cman/lib/libcman.pc.in
@@ -1,7 +1,7 @@
-prefix=@PREFIX@
+prefix=@prefix@
exec_prefix=${prefix}
-libdir=@LIBDIR@
-includedir=@INCDIR@
+libdir=@libdir@
+includedir=${prefix}/include
Name: libcman
Version: @VERSION@
diff --git a/cman/services/cman/services/Makefile b/cman/services/cman/services/Makefile
deleted file mode 100644
index ad96c88..0000000
--- a/cman/services/cman/services/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-TARGET= service_cmanbits.lcrso
-
-LCRSOT=$(TARGET)
-
-all: ${TARGET}
-
-include ../../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -I${openaisincdir} -I${corosyncincdir}
-CFLAGS += -I${incdir}
-CFLAGS += -I ../include
-
-LDFLAGS += -L${libdir}
-
-${TARGET}: cman.o
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
-
-clean: generalclean
-
--include $(OBJS1:.o=.d)
--include $(OBJS2:.o=.d)
diff --git a/cman/services/cman/services/Makefile.am b/cman/services/cman/services/Makefile.am
new file mode 100644
index 0000000..6e4f611
--- /dev/null
+++ b/cman/services/cman/services/Makefile.am
@@ -0,0 +1,14 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = -I$(top_srcdir)/cman/services/cman/include
+
+AM_CFLAGS = -fPIC \
+ $(cfg_CFLAGS)
+
+LCRSO = service_cmanbits.lcrso
+
+SOURCES = cman.c
+
+EXTRA_DIST = $(SOURCES)
+
+include $(top_srcdir)/make/lcrso.mk
diff --git a/cman/services/cman/services/cman.c b/cman/services/cman/services/cman.c
index 7455dea..1456ba6 100644
--- a/cman/services/cman/services/cman.c
+++ b/cman/services/cman/services/cman.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#ifndef COROSYNC_BSD
#include <alloca.h>
#endif
diff --git a/cman/tests/Makefile b/cman/tests/Makefile
deleted file mode 100644
index eb800c1..0000000
--- a/cman/tests/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-TARGETS= client libtest sysman sysmand
-
-all: depends ${TARGETS}
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-
-CFLAGS += -I${cmanincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${cmanlibdir} -lcman
-LDFLAGS += -L${libdir}
-
-depends:
- $(MAKE) -C ../lib all
-
-%: %.o
- $(CC) -o $@ $^ $(LDFLAGS)
-
-install:
-
-clean: generalclean
diff --git a/cman/tests/Makefile.am b/cman/tests/Makefile.am
new file mode 100644
index 0000000..1f91f89
--- /dev/null
+++ b/cman/tests/Makefile.am
@@ -0,0 +1,13 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_PROGRAMS = client sysman sysmand #libtestc qwait user_service
+
+EXTRA_DIST = user_service.c
+
+AM_CPPFLAGS = -I$(top_srcdir)/cman/services/cman/lib
+
+libcman_LDADD = $(top_builddir)/cman/services/cman/lib/libcman.la
+
+client_LDADD = $(libcman_LDADD)
+sysman_LDADD = $(libcman_LDADD)
+sysmand_LDADD = $(libcman_LDADD)
diff --git a/cman/tests/client.c b/cman/tests/client.c
index ff74816..d3009a5 100644
--- a/cman/tests/client.c
+++ b/cman/tests/client.c
@@ -1,4 +1,6 @@
/* test client */
+#include "config.h"
+
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
diff --git a/cman/tests/libtest.c b/cman/tests/libtest.c
index 85c1ea8..c5bea25 100644
--- a/cman/tests/libtest.c
+++ b/cman/tests/libtest.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <netinet/in.h>
#include <inttypes.h>
#include "libcman.h"
diff --git a/cman/tests/qwait.c b/cman/tests/qwait.c
index 5d6a3f7..f0bcd67 100644
--- a/cman/tests/qwait.c
+++ b/cman/tests/qwait.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
diff --git a/cman/tests/sysman.c b/cman/tests/sysman.c
index 99ba562..028c030 100644
--- a/cman/tests/sysman.c
+++ b/cman/tests/sysman.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
/* "sysman" client */
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/cman/tests/sysmand.c b/cman/tests/sysmand.c
index 8391c06..293e0f7 100644
--- a/cman/tests/sysmand.c
+++ b/cman/tests/sysmand.c
@@ -11,6 +11,8 @@
Any command passed to it will be run as root!
*/
+#include "config.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
diff --git a/cman/tests/user_service.c b/cman/tests/user_service.c
index f47987b..097173d 100644
--- a/cman/tests/user_service.c
+++ b/cman/tests/user_service.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/common/Makefile b/common/Makefile
deleted file mode 100644
index 31fdfdb..0000000
--- a/common/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=liblogthread
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644
index 0000000..e73a7fb
--- /dev/null
+++ b/common/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = liblogthread
diff --git a/common/liblogthread/Makefile b/common/liblogthread/Makefile
deleted file mode 100644
index be072bf..0000000
--- a/common/liblogthread/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-TARGET= liblogthread
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/libs.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -I${incdir}
-
-LDFLAGS += -lpthread
diff --git a/common/liblogthread/Makefile.am b/common/liblogthread/Makefile.am
new file mode 100644
index 0000000..aad208e
--- /dev/null
+++ b/common/liblogthread/Makefile.am
@@ -0,0 +1,14 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+libversion = 3:0:0
+
+include_HEADERS = liblogthread.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+
+pkgconfig_DATA = liblogthread.pc
+
+lib_LTLIBRARIES = liblogthread.la
+
+liblogthread_la_LDFLAGS = -lpthread \
+ -version-info $(libversion)
diff --git a/common/liblogthread/liblogthread.c b/common/liblogthread/liblogthread.c
index ba96a2a..df7ffb0 100644
--- a/common/liblogthread/liblogthread.c
+++ b/common/liblogthread/liblogthread.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
diff --git a/common/liblogthread/liblogthread.pc.in b/common/liblogthread/liblogthread.pc.in
index 8ba8268..73f87f4 100644
--- a/common/liblogthread/liblogthread.pc.in
+++ b/common/liblogthread/liblogthread.pc.in
@@ -1,7 +1,7 @@
-prefix=@PREFIX@
+prefix=@prefix@
exec_prefix=${prefix}
-libdir=@LIBDIR@
-includedir=@INCDIR@
+libdir=@libdir@
+includedir=${prefix}/include
Name: liblogthread
Version: @VERSION@
diff --git a/config/Makefile b/config/Makefile
deleted file mode 100644
index 50468ed..0000000
--- a/config/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=libs plugins tools man
diff --git a/config/Makefile.am b/config/Makefile.am
new file mode 100644
index 0000000..4a0b992
--- /dev/null
+++ b/config/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = libs plugins tools man
diff --git a/config/libs/Makefile b/config/libs/Makefile
deleted file mode 100644
index 8fd2879..0000000
--- a/config/libs/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS = libccsconfdb
diff --git a/config/libs/Makefile.am b/config/libs/Makefile.am
new file mode 100644
index 0000000..f9dbec7
--- /dev/null
+++ b/config/libs/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = libccsconfdb
diff --git a/config/libs/libccsconfdb/Makefile b/config/libs/libccsconfdb/Makefile
deleted file mode 100644
index 2b233f3..0000000
--- a/config/libs/libccsconfdb/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-TARGET= libccs
-
-INCDIRT=ccs.h
-
-OBJS= $(TARGET).o \
- xpathlite.o \
- fullxpath.o \
- extras.o
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/libs.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-CFLAGS += -I${corosyncincdir} -I${logtincdir} `xml2-config --cflags`
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${corosynclibdir} -lconfdb
-LDFLAGS += `xml2-config --libs`
-LDFLAGS += -L${libdir}
diff --git a/config/libs/libccsconfdb/Makefile.am b/config/libs/libccsconfdb/Makefile.am
new file mode 100644
index 0000000..154c70c
--- /dev/null
+++ b/config/libs/libccsconfdb/Makefile.am
@@ -0,0 +1,24 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+libversion = 3:0:0
+
+include_HEADERS = ccs.h
+
+noinst_HEADERS = ccs_internal.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+
+pkgconfig_DATA = libccs.pc
+
+lib_LTLIBRARIES = libccs.la
+
+libccs_la_SOURCES = libccs.c xpathlite.c fullxpath.c extras.c
+
+libccs_la_CPPFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/common/liblogthread/
+
+libccs_la_CFLAGS = $(confdb_CFLAGS) \
+ $(xml_CFLAGS)
+
+libccs_la_LDFLAGS = $(xml_LIBS) $(confdb_LIBS) \
+ -version-info $(libversion)
diff --git a/config/libs/libccsconfdb/extras.c b/config/libs/libccsconfdb/extras.c
index b0cf55b..3bcdb6a 100644
--- a/config/libs/libccsconfdb/extras.c
+++ b/config/libs/libccsconfdb/extras.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <ctype.h>
#include <errno.h>
#include <string.h>
diff --git a/config/libs/libccsconfdb/fullxpath.c b/config/libs/libccsconfdb/fullxpath.c
index 994c8d8..9a84dc5 100644
--- a/config/libs/libccsconfdb/fullxpath.c
+++ b/config/libs/libccsconfdb/fullxpath.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <string.h>
#include <errno.h>
#include <limits.h>
diff --git a/config/libs/libccsconfdb/libccs.c b/config/libs/libccsconfdb/libccs.c
index 1d62b4b..4be6b94 100644
--- a/config/libs/libccsconfdb/libccs.c
+++ b/config/libs/libccsconfdb/libccs.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/config/libs/libccsconfdb/libccs.pc.in b/config/libs/libccsconfdb/libccs.pc.in
index eddc87f..a772ba6 100644
--- a/config/libs/libccsconfdb/libccs.pc.in
+++ b/config/libs/libccsconfdb/libccs.pc.in
@@ -1,7 +1,7 @@
-prefix=@PREFIX@
+prefix=@prefix@
exec_prefix=${prefix}
-libdir=@LIBDIR@
-includedir=@INCDIR@
+libdir=@libdir@
+includedir=${prefix}/include
Name: libccs
Version: @VERSION@
diff --git a/config/libs/libccsconfdb/xpathlite.c b/config/libs/libccsconfdb/xpathlite.c
index 0a21f85..848156f 100644
--- a/config/libs/libccsconfdb/xpathlite.c
+++ b/config/libs/libccsconfdb/xpathlite.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/config/man/Makefile b/config/man/Makefile
deleted file mode 100644
index bf289e0..0000000
--- a/config/man/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-TARGET= cluster.conf.5
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/man.mk
diff --git a/config/man/Makefile.am b/config/man/Makefile.am
new file mode 100644
index 0000000..4c13505
--- /dev/null
+++ b/config/man/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+dist_man_MANS = cluster.conf.5
diff --git a/config/plugins/Makefile b/config/plugins/Makefile
deleted file mode 100644
index d39b807..0000000
--- a/config/plugins/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS = xml ldap
diff --git a/config/plugins/Makefile.am b/config/plugins/Makefile.am
new file mode 100644
index 0000000..64cea14
--- /dev/null
+++ b/config/plugins/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = xml ldap
diff --git a/config/plugins/ldap/Makefile b/config/plugins/ldap/Makefile
deleted file mode 100644
index 33e907d..0000000
--- a/config/plugins/ldap/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-TARGET= config_ldap.lcrso
-
-LCRSOT=$(TARGET)
-
-DOCS = 99cluster.ldif \
- example.ldif
-
-all: ${TARGET}
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -I${ldapincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${ldaplibdir} -lldap
-LDFLAGS += -L${libdir}
-
-OBJS= configldap.o
-
-${TARGET}: ${OBJS}
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/config/plugins/ldap/Makefile.am b/config/plugins/ldap/Makefile.am
new file mode 100644
index 0000000..7b983bb
--- /dev/null
+++ b/config/plugins/ldap/Makefile.am
@@ -0,0 +1,15 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+dist_doc_DATA = 99cluster.ldif example.ldif
+
+AM_CFLAGS = -fPIC
+
+AM_LDFLAGS = -lldap
+
+LCRSO = config_ldap.lcrso
+
+SOURCES = configldap.c
+
+EXTRA_DIST = $(SOURCES)
+
+include $(top_srcdir)/make/lcrso.mk
diff --git a/config/plugins/ldap/configldap.c b/config/plugins/ldap/configldap.c
index 704763f..5e30308 100644
--- a/config/plugins/ldap/configldap.c
+++ b/config/plugins/ldap/configldap.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
diff --git a/config/plugins/xml/Makefile b/config/plugins/xml/Makefile
deleted file mode 100644
index b95d005..0000000
--- a/config/plugins/xml/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-TARGET= config_xml.lcrso
-
-LCRSOT=$(TARGET)
-
-all: ${TARGET}
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC -D_GNU_SOURCE
-CFLAGS += `xml2-config --cflags`
-CFLAGS += -I${cmanincdir}/../daemon
-CFLAGS += -I${incdir}
-
-LDFLAGS += `xml2-config --libs`
-LDFLAGS += -L${libdir}
-
-OBJS= config.o
-
-${TARGET}: ${OBJS}
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/config/plugins/xml/Makefile.am b/config/plugins/xml/Makefile.am
new file mode 100644
index 0000000..2052fe2
--- /dev/null
+++ b/config/plugins/xml/Makefile.am
@@ -0,0 +1,14 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CFLAGS = -fPIC \
+ $(xml_CFLAGS)
+
+AM_LDFLAGS = $(xml_LIBS)
+
+LCRSO = config_xml.lcrso
+
+SOURCES = config.c
+
+EXTRA_DIST = $(SOURCES)
+
+include $(top_srcdir)/make/lcrso.mk
diff --git a/config/plugins/xml/config.c b/config/plugins/xml/config.c
index dba9891..1ac62f1 100644
--- a/config/plugins/xml/config.c
+++ b/config/plugins/xml/config.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <string.h>
#include <syslog.h>
diff --git a/config/tools/Makefile b/config/tools/Makefile
deleted file mode 100644
index 8feab10..0000000
--- a/config/tools/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS=ccs_tool ldap mkconf man
diff --git a/config/tools/Makefile.am b/config/tools/Makefile.am
new file mode 100644
index 0000000..2cebdd3
--- /dev/null
+++ b/config/tools/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = ccs_tool ldap mkconf man
diff --git a/config/tools/ccs_tool/Makefile b/config/tools/ccs_tool/Makefile
deleted file mode 100644
index 3324537..0000000
--- a/config/tools/ccs_tool/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-TARGET1 = ccs_tool
-TARGET2 = ccs_test
-
-SBINDIRT = $(TARGET1)
-SBINSYMT = $(TARGET2)
-
-include ../../../make/defines.mk
-
-all: ${TARGET1} ${TARGET2}
-
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-OBJS = ccs_tool.o \
- editconf.o
-
-CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-CFLAGS += `xml2-config --cflags`
-CFLAGS += -I${ccsincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${ccslibdir} -lccs
-LDFLAGS += `xml2-config --libs`
-LDFLAGS += -L${libdir}
-
-${TARGET1}: ${OBJS} ${LDDEPS}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-${TARGET2}: ${TARGET1}
- ln -sf ${TARGET1} ${TARGET2}
-
-depends:
- $(MAKE) -C $(OBJDIR)/cman/lib all
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/config/tools/ccs_tool/Makefile.am b/config/tools/ccs_tool/Makefile.am
new file mode 100644
index 0000000..15db1e2
--- /dev/null
+++ b/config/tools/ccs_tool/Makefile.am
@@ -0,0 +1,22 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+sbin_PROGRAMS = ccs_tool
+
+noinst_HEADERS = editconf.h
+
+ccs_tool_SOURCES = ccs_tool.c editconf.c
+
+ccs_tool_CPPFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/config/libs/libccsconfdb
+
+ccs_tool_CFLAGS = $(xml_CFLAGS)
+
+ccs_tool_LDFLAGS = $(xml_LIBS)
+
+ccs_tool_LDADD = $(top_builddir)/config/libs/libccsconfdb/libccs.la
+
+install-exec-hook:
+ (cd $(DESTDIR)/$(sbindir) && $(LN_S) ccs_tool ccs_test)
+
+uninstall-hook:
+ (cd $(DESTDIR)/$(sbindir) && rm -f ccs_test)
diff --git a/config/tools/ccs_tool/ccs_tool.c b/config/tools/ccs_tool/ccs_tool.c
index 34805be..bdc42f6 100644
--- a/config/tools/ccs_tool/ccs_tool.c
+++ b/config/tools/ccs_tool/ccs_tool.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
@@ -43,7 +45,7 @@ static int test_main(int argc, char *argv[], int old_format){
exit(EXIT_SUCCESS);
}
if(!strcmp(argv[i], "-V")){
- printf("%s %s (built %s %s)\n", argv[0], RELEASE_VERSION, __DATE__, __TIME__);
+ printf("%s %s (built %s %s)\n", argv[0], PACKAGE_VERSION, __DATE__, __TIME__);
printf("%s\n", REDHAT_COPYRIGHT);
exit(EXIT_SUCCESS);
}
@@ -199,7 +201,7 @@ static int tool_main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
if (!strcmp(argv[optind], "-V")) {
- printf("%s %s (built %s %s)\n", argv[0], RELEASE_VERSION,
+ printf("%s %s (built %s %s)\n", argv[0], PACKAGE_VERSION,
__DATE__, __TIME__);
printf("%s\n", REDHAT_COPYRIGHT);
exit(EXIT_SUCCESS);
diff --git a/config/tools/ccs_tool/editconf.c b/config/tools/ccs_tool/editconf.c
index 8f808e9..444cee6 100644
--- a/config/tools/ccs_tool/editconf.c
+++ b/config/tools/ccs_tool/editconf.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/config/tools/ldap/Makefile b/config/tools/ldap/Makefile
deleted file mode 100644
index 5c6b2d6..0000000
--- a/config/tools/ldap/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-TARGET= confdb2ldif
-
-SBINDIRT=$(TARGET)
-
-all: ${TARGET}
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-OBJS= confdb2ldif.o
-
-CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-CFLAGS += -I${corosyncincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${corosynclibdir} -lconfdb
-LDFLAGS += -L${libdir}
-
-${TARGET}: ${OBJS}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/config/tools/ldap/Makefile.am b/config/tools/ldap/Makefile.am
new file mode 100644
index 0000000..1c5c4a8
--- /dev/null
+++ b/config/tools/ldap/Makefile.am
@@ -0,0 +1,9 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+sbin_PROGRAMS = confdb2ldif
+
+confdb2ldif_CPPFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+
+confdb2ldif_CFLAGS = $(confdb_CFLAGS)
+
+confdb2ldif_LDFLAGS = $(confdb_LIBS)
diff --git a/config/tools/ldap/confdb2ldif.c b/config/tools/ldap/confdb2ldif.c
index ee5cde1..d10dd7f 100644
--- a/config/tools/ldap/confdb2ldif.c
+++ b/config/tools/ldap/confdb2ldif.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/config/tools/man/Makefile b/config/tools/man/Makefile
deleted file mode 100644
index f2d6d92..0000000
--- a/config/tools/man/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-TARGET= ccs_tool.8 \
- confdb2ldif.8
-
-include ../../../make/defines.mk
-
-include $(OBJDIR)/make/man.mk
diff --git a/config/tools/man/Makefile.am b/config/tools/man/Makefile.am
new file mode 100644
index 0000000..4eb4002
--- /dev/null
+++ b/config/tools/man/Makefile.am
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+dist_man_MANS = ccs_tool.8 \
+ confdb2ldif.8
diff --git a/config/tools/mkconf/Makefile b/config/tools/mkconf/Makefile
deleted file mode 100644
index 07dba00..0000000
--- a/config/tools/mkconf/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-TARGET= cman-mkconf
-
-SBINDIRT=$(TARGET)
-
-all: ${TARGET}
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-OBJS= mkconf.o
-
-CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-CFLAGS += -I${corosyncincdir}
-CFLAGS += -I${ccsincdir}
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${corosynclibdir} -lconfdb -lquorum -lcfg
-LDFLAGS += -L${ccslibdir} -lccs
-LDFLAGS += -L${libdir}
-
-${TARGET}: ${OBJS}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/config/tools/mkconf/Makefile.am b/config/tools/mkconf/Makefile.am
new file mode 100644
index 0000000..a380bea
--- /dev/null
+++ b/config/tools/mkconf/Makefile.am
@@ -0,0 +1,14 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+sbin_PROGRAMS = cman-mkconf
+
+cman_mkconf_SOURCES = mkconf.c
+
+cman_mkconf_CPPFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/config/libs/libccsconfdb/
+
+cman_mkconf_CFLAGS = $(confdb_CFLAGS) $(quorum_CFLAGS) $(cfg_CFLAGS)
+
+cman_mkconf_LDFLAGS = $(confdb_LIBS) $(quorum_LIBS) $(cfg_LIBS)
+
+cman_mkconf_LDADD = $(top_builddir)/config/libs/libccsconfdb/libccs.la
diff --git a/config/tools/mkconf/mkconf.c b/config/tools/mkconf/mkconf.c
index f583242..6da7007 100644
--- a/config/tools/mkconf/mkconf.c
+++ b/config/tools/mkconf/mkconf.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <sys/types.h>
#include <stdio.h>
#include <stdint.h>
diff --git a/configure b/configure
deleted file mode 100755
index 6ac6ed2..0000000
--- a/configure
+++ /dev/null
@@ -1,502 +0,0 @@
-#!/usr/bin/perl -w
-
-use warnings;
-use Getopt::Long;
-use Cwd 'abs_path';
-use File::Basename;
-use File::Spec;
-
-print "\nConfiguring Makefiles for your system...\n";
-
-# Set a bunch of variables
-
-my @invoke = @ARGV;
-
-my $ret = 0;
-
-my %options = (
- help => \$help,
- cc => \$cc,
- debug => \$debug,
- cflags => \$cflags,
- extracflags => \$extracflags,
- ldflags => \$ldflags,
- extraldflags => \$extraldflags,
- objdir => \$objdir,
- incdir => \$incdir,
- libdir => \$libdir,
- ccsincdir => \$ccsincdir,
- ccslibdir => \$ccslibdir,
- cmanincdir => \$cmanincdir,
- cmanlibdir => \$cmanlibdir,
- logtincdir => \$logtincdir,
- logtlibdir => \$logtlibdir,
- corosyncincdir => \$corosyncincdir,
- corosynclibdir => \$corosynclibdir,
- openaisincdir => \$openaisincdir,
- openaislibdir => \$openaislibdir,
- corosyncbin => \$corosyncbin,
- zlibincdir => \$zlibincdir,
- zliblibdir => \$zliblibdir,
- ldapincdir => \$ldapincdir,
- ldaplibdir => \$ldaplibdir,
- libexecdir => \$libexecdir,
- mandir => \$mandir,
- prefix => \$prefix,
- sbindir => \$sbindir,
- initddir => \$initddir,
- sharedir => \$sharedir,
- docdir => \$docdir,
- logdir => \$logdir,
- logrotatedir => \$logrotatedir,
- syslogfacility => \$syslogfacility,
- sysloglevel => \$sysloglevel,
- confdir => \$confdir,
- conffile => \$conffile,
- enable_crack_of_the_day => \$enable_crack_of_the_day,
- enable_legacy_code => \$enable_legacy_code,
- enable_contrib => \$enable_contrib,
- somajor => \$somajor,
- sominor => \$sominor,
- release_version => \$release_version,
- without_common => \$without_common,
- without_config => \$without_config,
- without_cman => \$without_cman,
- without_group => \$without_group,
- without_bindings => \$without_bindings,
-);
-
-my $err = &GetOptions (\%options,
- 'help',
- 'cc=s',
- 'debug',
- 'cflags=s',
- 'extracflags=s',
- 'ldflags=s',
- 'extraldflags=s',
- 'objdir=s',
- 'incdir=s',
- 'libdir=s',
- 'ccsincdir=s',
- 'ccslibdir=s',
- 'cmanincdir=s',
- 'cmanlibdir=s',
- 'logtincdir=s',
- 'logtlibdir=s',
- 'corosyncincdir=s',
- 'corosynclibdir=s',
- 'openaisincdir=s',
- 'openaislibdir=s',
- 'corosyncbin=s',
- 'zlibincdir=s',
- 'zliblibdir=s',
- 'ldapincdir=s',
- 'ldaplibdir=s',
- 'libexecdir=s',
- 'mandir=s',
- 'prefix=s',
- 'sbindir=s',
- 'initddir=s',
- 'sharedir=s',
- 'docdir=s',
- 'logdir=s',
- 'logrotatedir=s',
- 'syslogfacility=s',
- 'sysloglevel=s',
- 'confdir=s',
- 'conffile=s',
- 'somajor=s',
- 'sominor=s',
- 'release_version=s',
- 'enable_crack_of_the_day',
- 'enable_legacy_code',
- 'enable_contrib',
- 'without_common',
- 'without_config',
- 'without_cman',
- 'without_group',
- 'without_bindings');
-
-if(!$err) {
- $ret = 1;
- print "*** ERROR: Invalid option detected ***\n";
-}
-
-# Check for the --help flag
-if ($help || !$err) {
- $_ = $0;
- s/.*\.\/(.*)/$1/;
- print "Usage: $_ [flags]\n";
- print "--help\t\tPrints this usage information\n\n";
- print "install flags:\n";
- print "--prefix=\tthe base directory to install into. (Default: /usr)\n";
- print "--sbindir=\tthe base directory for system binaries. (Default: {prefix}/sbin)\n";
- print "--initddir=\tthe base directory for init.d scripts. (Default: /etc/init.d)\n";
- print "--libdir=\tthe base directory for libraries. (Default: {prefix}/lib)\n";
- print "--libexecdir=\tthe base directory for executable components. (Default: {prefix}/libexec)\n";
- print "--sharedir=\tthe base directory for misc cluster files. (Default: {prefix}/share/cluster)\n";
- print "--docdir=\tthe base directory for misc cluster documentation files. (Default: {prefix}/share/doc/cluster)\n";
- print "--logdir=\tthe base directory for cluster logging files. (Default: /var/log/cluster/)\n";
- print "--logrotatedir=\tthe base directory for logrorate.d files. (Default: /etc/logrotate.d/)\n";
- print "--syslogfacility=\tset the default syslog facility. (Default: LOG_LOCAL4)\n";
- print "--sysloglevel=\tset the default syslog level. (Default: LOG_INFO)\n";
- print "--confdir=\tthe cluster config directory. (Default: /etc/cluster)\n";
- print "--conffile=\tthe cluster config file. (Default: cluster.conf)\n";
- print "--mandir=\tthe base directory for man pages. (Default: {prefix}/share/man)\n";
- print "\nbuild flags:\n";
- print "--cc=\t\tcompiler to use. (Default: gcc)\n";
- print "--debug\t\tEnable debugging build. Changes default CFLAGS to -Wall -O0 -DDEBUG -g.\n";
- print "--cflags=\toverride default CFLAGS settings. (Default: -Wall -O2 -g)\n";
- print "--extracflags=\tadd extra compiler options to default CFLAGS setting. (Default: none)\n";
- print "--ldflags=\toverride default LDFLAGS settings. (Default: none)\n";
- print "--extraldflags=\tadd extra linking options to default LDFLAGS settings. (Default: none)\n";
- print "--objdir=\tspecify directory where to store object files. (Defaults: current build dir)\n";
- print "--incdir=\tthe base directory for include files. (Default: {prefix}/include)\n";
- print "--ccsincdir=\tthe base directory for ccs include files. (Default: ./config/libs/libccsconfdb)\n";
- print "--ccslibdir=\tthe base directory for ccs libraries. (Default: ./config/libs/libccsconfdb)\n";
- print "--cmanincdir=\tthe base directory for cman include files. (Default: ./cman/services/cman/lib)\n";
- print "--cmanlibdir=\tthe base directory for cman libraries. (Default: ./cman/services/cman/lib)\n";
- print "--logtincdir=\tthe base directory for logthread include files. (Default: ./common/liblogthread)\n";
- print "--logtlibdir=\tthe base directory for logthread libraries. (Default: ./common/liblogthread)\n";
- print "--corosyncincdir=\tthe base directory for corosync include files. (Default: {incdir})\n";
- print "--corosynclibdir=\tthe base directory for corosync libraries. (Default: {libdir}/corosync)\n";
- print "--openaisincdir=\tthe base directory for openais include files. (Default: {incdir})\n";
- print "--openaislibdir=\tthe base directory for openais libraries. (Default: {libdir}/openais)\n";
- print "--corosyncbin=\tlocation of corosync executable file. (Default: /usr/sbin/corosync)\n";
- print "--zlibincdir=\tthe base directory for libz include files. (Default: {incdir})\n";
- print "--zliblibdir=\tthe base directory for libz libraries. (Default: {libdir})\n";
- print "--ldapincdir=\tthe base directory for ldap include files. (Default: {incdir})\n";
- print "--ldaplibdir=\tthe base directory for ldap libraries. (Default: {libdir})\n";
- print "--enable_crack_of_the_day\tEnable build of highly experimental features that rely on code that is not yet available for general use. (Default: no)\n";
- print "--enable_contrib\tEnable build of community contributed code/tools. (Default: no)\n";
- print "--enable_legacy_code\tEnable build of old/obsolete/unsupported code/tools. (Default: no)\n";
- print "--without_common\tDisable common building (Default: enabled)\n";
- print "--without_config\tDisable config building (Default: enabled)\n";
- print "--without_cman\tDisable cman building (Default: enabled)\n";
- print "--without_group\tDisable group building (Default: enabled)\n";
- print "--without_bindings\tDisable perl/python bindings building (Default: enabled)\n";
- exit $ret;
-}
-
-sub symlinks {
- my $dir = shift;
- my $pattern = shift;
- @args = "find $dir -type f -name $pattern";
- open (IFILE, "@args |");
- while (<IFILE>) {
- chomp;
- s|\./||g;
- s|.*make\/defines.mk||g;
- $dirname = dirname($_);
- $filename = basename($_);
- system("mkdir -p $objdir/$dirname");
- symlink("${cdir}/$_","$objdir/$dirname/$filename");
- }
- close IFILE;
- return 0;
-}
-
-$pwd = `pwd`;
-chomp($pwd);
-
-if (!$cc) {
- $cc="gcc";
-}
-if (!$cflags) {
- $cflags="-Wall -Wformat=2 -MMD";
- if (!$debug) {
- $cflags="${cflags} -O2";
- } else {
- $cflags="${cflags} -O0 -DDEBUG";
- }
- $cflags="${cflags} -g";
-}
-if ($extracflags) {
- $cflags="${cflags} ${extracflags}";
-}
-if (!$ldflags) {
- $ldflags="";
-}
-if ($extraldflags) {
- $ldflags="${ldflags} ${extraldflags}";
-}
-if (!$prefix) {
- $prefix="/usr";
-}
-
-print "\nChecking tree: ";
-if (!$objdir) {
- $objdir="${pwd}";
-}
-$objdir = abs_path( $objdir );
-$cdir = dirname ( abs_path( $0 ) );
-unless ("$cdir" eq "$objdir") {
- chdir "$cdir";
-}
-
-if (! -d "$objdir/make") {
- print "setting up $objdir\n";
- mkdir "$objdir";
- symlinks(".","Makefile");
- symlinks(".","*.mk");
- symlinks("bindings","*.bindings");
- symlinks("bindings","*.pl");
- symlinks("bindings","*.xs");
- symlinks("bindings","*.PL");
- symlinks("bindings","MANIFEST");
- symlinks("bindings","typemap");
-} else {
- print "nothing to do\n";
-}
-
-if (!$incdir) {
- $incdir="${prefix}/include";
-}
-if (!$libdir) {
- $libdir="${prefix}/lib";
-}
-if (!$ccsincdir) {
- $ccsincdir="${cdir}/config/libs/libccsconfdb";
-}
-if (!$ccslibdir) {
- $ccslibdir="${objdir}/config/libs/libccsconfdb";
-}
-if (!$cmanincdir) {
- $cmanincdir="${cdir}/cman/services/cman/lib";
-}
-if (!$cmanlibdir) {
- $cmanlibdir="${objdir}/cman/services/cman/lib";
-}
-if (!$logtincdir) {
- $logtincdir="${cdir}/common/liblogthread";
-}
-if (!$logtlibdir) {
- $logtlibdir="${objdir}/common/liblogthread";
-}
-if (!$corosyncincdir) {
- $corosyncincdir="${incdir}";
-}
-if (!$corosynclibdir) {
- $corosynclibdir="${libdir}/corosync";
-}
-if (!$openaisincdir) {
- $openaisincdir="${incdir}";
-}
-if (!$openaislibdir) {
- $openaislibdir="${libdir}/openais";
-}
-if (!$corosyncbin) {
- $corosyncbin="/usr/sbin/corosync";
-}
-if (!$zlibincdir) {
- $zlibincdir="${incdir}";
-}
-if (!$zliblibdir) {
- $zliblibdir="${libdir}";
-}
-if (!$ldapincdir) {
- $ldapincdir="${incdir}";
-}
-if (!$ldaplibdir) {
- $ldaplibdir="${libdir}";
-}
-if (!$libexecdir) {
- $libexecdir="${prefix}/libexec";
-}
-if (!$mandir) {
- $mandir="${prefix}/share/man";
-}
-if (!$sbindir) {
- $sbindir="${prefix}/sbin";
-}
-$relativesbin=File::Spec->abs2rel("/sbin", $sbindir);
-if (!$initddir) {
- $initddir="/etc/init.d";
-}
-if (!$sharedir) {
- $sharedir="${prefix}/share/cluster";
-}
-if (!$docdir) {
- $docdir="${prefix}/share/doc/cluster";
-}
-if (!$logdir) {
- $logdir="/var/log/cluster";
-}
-if (!$logrotatedir) {
- $logrotatedir="/etc/logrotate.d";
-}
-if (!$syslogfacility) {
- $syslogfacility="LOG_LOCAL4";
-}
-if (!$sysloglevel) {
- $sysloglevel="LOG_INFO";
-}
-if (!$confdir) {
- $confdir="/etc/cluster";
-}
-if (!$conffile) {
- $conffile="cluster.conf";
-}
-if (!$enable_crack_of_the_day) {
- $enable_crack_of_the_day="";
-} else {
- print "\n********************************************************************************************\n";
- print "WARNING: *you* have explicitly enabled all possible experimental features under development!\n";
- print " This code will have no mercy for your data and your machines. You have been warned!\n";
- print "\n********************************************************************************************\n";
- $cflags="${cflags} -DEXPERIMENTAL_BUILD";
-}
-if (!$enable_contrib) {
- $enable_contrib="";
-}
-if (!$enable_legacy_code) {
- $enable_legacy_code="";
-} else {
- print "\n********************************************************************************************\n";
- print "WARNING: *you* have explicitly enabled the build of old/obsoleted/unsupported code/tools\n";
- print " This code is provided *only* for backward compatibility\n";
- print "\n********************************************************************************************\n";
- $cflags="${cflags} -DLEGACY_CODE";
-}
-if (!$without_common) {
- $without_common="";
-}
-if (!$without_config) {
- $without_config="";
-}
-if (!$without_cman) {
- $without_cman="";
-}
-if (!$without_group) {
- $without_group="";
-}
-if (!$without_bindings) {
- $without_bindings="";
-}
-if (defined($somajor) && not length $somajor) {
- $somajor="";
-}
-if (defined($sominor) && not length $sominor) {
- $sominor="";
-}
-if (defined($release_version) && not length $release_version) {
- $release_version="";
-}
-
-open IFILE, "<make/defines.mk.input" or die "Can't redirect stdin";
-open OFILE, ">${objdir}/make/defines.mk" or die "Can't redirect stdout";
-
-print OFILE "# This file was generated by configure from defines.mk.input\n";
-
-while (<IFILE>) {
- chomp;
- $_ =~ s/\@SRCDIR\@/$cdir/;
- $_ =~ s/\@CC\@/$cc/;
- $_ =~ s/\@CFLAGS\@/$cflags/;
- $_ =~ s/\@LDFLAGS\@/$ldflags/;
- $_ =~ s/\@OBJDIR\@/$objdir/;
- $_ =~ s/\@INCDIR\@/$incdir/;
- $_ =~ s/\@LIBDIR\@/$libdir/;
- $_ =~ s/\@CCSINCDIR\@/$ccsincdir/;
- $_ =~ s/\@CCSLIBDIR\@/$ccslibdir/;
- $_ =~ s/\@CMANINCDIR\@/$cmanincdir/;
- $_ =~ s/\@CMANLIBDIR\@/$cmanlibdir/;
- $_ =~ s/\@LOGTINCDIR\@/$logtincdir/;
- $_ =~ s/\@LOGTLIBDIR\@/$logtlibdir/;
- $_ =~ s/\@COROSYNCINCDIR\@/$corosyncincdir/;
- $_ =~ s/\@COROSYNCLIBDIR\@/$corosynclibdir/;
- $_ =~ s/\@OPENAISINCDIR\@/$openaisincdir/;
- $_ =~ s/\@OPENAISLIBDIR\@/$openaislibdir/;
- $_ =~ s/\@COROSYNCBIN\@/$corosyncbin/;
- $_ =~ s/\@LDAPINCDIR\@/$ldapincdir/;
- $_ =~ s/\@LDAPLIBDIR\@/$ldaplibdir/;
- $_ =~ s/\@ZLIBINCDIR\@/$zlibincdir/;
- $_ =~ s/\@ZLIBLIBDIR\@/$zliblibdir/;
- $_ =~ s/\@LIBEXECDIR\@/$libexecdir/;
- $_ =~ s/\@MANDIR\@/$mandir/;
- $_ =~ s/\@SBINDIR\@/$sbindir/;
- $_ =~ s/\@RELATIVESBIN\@/$relativesbin/;
- $_ =~ s/\@PREFIX\@/$prefix/;
- $_ =~ s/\@INITDDIR\@/$initddir/;
- $_ =~ s/\@SHAREDIR\@/$sharedir/;
- $_ =~ s/\@DOCDIR\@/$docdir/;
- $_ =~ s/\@LOGDIR\@/$logdir/;
- $_ =~ s/\@LOGROTATEDIR\@/$logrotatedir/;
- $_ =~ s/\@SYSLOGFACILITY\@/$syslogfacility/;
- $_ =~ s/\@SYSLOGLEVEL\@/$sysloglevel/;
- $_ =~ s/\@CONFDIR\@/$confdir/;
- $_ =~ s/\@CONFFILE\@/$conffile/;
- $_ =~ s/\@ENABLE_CRACK_OF_THE_DAY\@/$enable_crack_of_the_day/;
- $_ =~ s/\@ENABLE_LEGACY_CODE\@/$enable_legacy_code/;
- $_ =~ s/\@ENABLE_CONTRIB\@/$enable_contrib/;
- $_ =~ s/\@DISABLE_COMMON\@/$without_common/;
- $_ =~ s/\@DISABLE_CONFIG\@/$without_config/;
- $_ =~ s/\@DISABLE_CMAN\@/$without_cman/;
- $_ =~ s/\@DISABLE_GROUP\@/$without_group/;
- $_ =~ s/\@DISABLE_BINDINGS\@/$without_bindings/;
-
- print OFILE "$_\n";
-}
-
-close IFILE;
-
-if ((not defined($somajor)) || (not defined($sominor)) || (not defined($release_version))) {
-
- my $current_soname;
- my $current_version;
- if ( -f 'make/official_release_version' ) {
- open OFFICIAL_VERSION, '<', "make/official_release_version";
- while (<OFFICIAL_VERSION>) {
- if ($_ =~ /SONAME/) {
- $current_soname = $_;
- }
- if ($_ =~ /VERSION/) {
- $current_version = $_;
- }
- }
- close OFFICIAL_VERSION;
- }
-
- if ((not defined($somajor)) || (not defined($sominor))) {
- if (not defined($current_soname)) {
- print "ERROR: SONAME not defined in make/official_release_version\n";
- exit 1;
- } else {
- $current_soname =~ s/.*"(.*)"\n/$1/;
- my @release_soname = split /\./, $current_soname;
- $somajor = $release_soname[0];
- $sominor = $release_soname[1];
- }
- }
-
- if (not defined($release_version)) {
- if (not defined($current_version)) {
- $release_version = `date +%s`;
- chomp $release_version;
- } else {
- $release_version = $current_version;
- $release_version =~ s/.*"(.*)"\n/$1/;
- }
- }
-}
-
-print OFILE "ifndef SOMAJOR\n";
-print OFILE "SOMAJOR = $somajor\n";
-print OFILE "endif\n";
-print OFILE "ifndef SOMINOR\n";
-print OFILE "SOMINOR = $sominor\n";
-print OFILE "endif\n";
-print OFILE "RELEASE_VERSION = $release_version\n";
-print OFILE "CFLAGS += -DRELEASE_VERSION=\\\"$release_version\\\"\n";
-
-close OFILE;
-
-open OFILE, ">${objdir}/.configure.sh.tmp" or die "Can't redirect stdout";
-print OFILE "#!/bin/bash\n";
-print OFILE "$0 @invoke \$@\n";
-print OFILE "exit \$?\n";
-close OFILE;
-
-system("mv ${objdir}/.configure.sh.tmp ${objdir}/.configure.sh");
-
-print "Completed Makefile configuration\n\n";
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..46b625c
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,294 @@
+
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.63b])
+AC_INIT([cluster], [master], [linux-cluster@redhat.com])
+AM_INIT_AUTOMAKE
+LT_PREREQ([2.2.7])
+LT_INIT
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([config/plugins/xml/config.c])
+AC_CONFIG_HEADERS([make/config.h])
+
+AC_CANONICAL_HOST
+
+AC_LANG([C])
+
+# Sanitize path
+
+if test "$prefix" = "NONE"; then
+ prefix="/usr"
+ if test "$localstatedir" = "\${prefix}/var"; then
+ localstatedir="/var"
+ fi
+ if test "$sysconfdir" = "\${prefix}/etc"; then
+ sysconfdir="/etc"
+ fi
+ if test "$libdir" = "\${exec_prefix}/lib"; then
+ if test -e /usr/lib64; then
+ libdir="/usr/lib64"
+ else
+ libdir="/usr/lib"
+ fi
+ fi
+fi
+
+case $exec_prefix in
+ NONE) exec_prefix=$prefix;;
+ prefix) exec_prefix=$prefix;;
+esac
+
+# Checks for programs.
+
+# check stolen from gnulib/m4/gnu-make.m4
+if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
+ AC_MSG_ERROR([you don't seem to have GNU make; it is required])
+fi
+
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LN_S
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+## local helper functions
+
+# this function checks if CC support options passed as
+# args. Global CFLAGS are ignored during this test.
+cc_supports_flag() {
+ local CFLAGS="$@"
+ AC_MSG_CHECKING([whether $CC supports "$@"])
+ AC_COMPILE_IFELSE([int main(){return 0;}] ,
+ [RC=0; AC_MSG_RESULT([yes])],
+ [RC=1; AC_MSG_RESULT([no])])
+ return $RC
+}
+
+# this function tests if a library has a certain function
+# by using AC_CHECK_LIB but restores the original LIBS global
+# envvar. This is required to avoid libtool to link everything
+# with everything.
+check_lib_no_libs() {
+ AC_CHECK_LIB([$1], [$2],,
+ [AC_MSG_ERROR([Unable to find $1 library])])
+ LIBS=$ac_check_lib_save_LIBS
+}
+
+# corosync libs
+PKG_CHECK_MODULES([corosync],[corosync])
+PKG_CHECK_MODULES([cfg],[libcfg])
+PKG_CHECK_MODULES([confdb],[libconfdb])
+PKG_CHECK_MODULES([coroipcc],[libcoroipcc])
+PKG_CHECK_MODULES([quorum],[libquorum])
+PKG_CHECK_MODULES([votequorum],[libvotequorum])
+
+# external libs
+PKG_CHECK_MODULES([xml],[libxml-2.0])
+
+# external libs (no pkgconfig)
+check_lib_no_libs pthread pthread_mutex_lock
+check_lib_no_libs ldap ldap_initialize
+check_lib_no_libs rt clock_gettime
+check_lib_no_libs z crc32
+
+# Checks for header files.
+AC_FUNC_ALLOCA
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_INLINE
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+AC_TYPE_UID_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINT8_T
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+AC_HEADER_MAJOR
+AC_FUNC_MALLOC
+AC_CHECK_FUNCS([alarm atexit clock_gettime dup2 ftruncate gethostname gettimeofday memmove memset select socket strcasecmp strchr strdup strerror strncasecmp strndup strstr strtol uname])
+
+# local options
+AC_ARG_ENABLE([debug],
+ [ --enable-debug enable debug build. ],
+ [ default="no" ])
+
+AC_ARG_WITH([lcrso-dir],
+ [ --with-lcrso-dir=DIR corosync lcrso files. ],
+ [ LCRSODIR="$withval" ],
+ [ LCRSODIR="$libexecdir/lcrso" ])
+
+AC_ARG_WITH([default-config-dir],
+ [ --default-config-dir=DIR cluster config directory. ],
+ [ DEFAULT_CONFIG_DIR="$withval" ],
+ [ DEFAULT_CONFIG_DIR="$sysconfdir/cluster" ])
+
+AC_ARG_WITH([default-config-file],
+ [ --default-config-file=FILE cluster config file. ],
+ [ DEFAULT_CONFIG_FILE="$withval" ],
+ [ DEFAULT_CONFIG_FILE="cluster.conf" ])
+
+AC_ARG_WITH([syslogfacility],
+ [ --syslogfacility=FACILITY cluster default syslog facility. ],
+ [ SYSLOGFACILITY="$withval" ],
+ [ SYSLOGFACILITY="LOG_LOCAL4" ])
+
+AC_ARG_WITH([sysloglevel],
+ [ --sysloglevel=LEVEL cluster default syslog level. ],
+ [ SYSLOGLEVEL="$withval" ],
+ [ SYSLOGLEVEL="LOG_INFO" ])
+
+## random vars
+
+NOTIFYDDIR=${DEFAULT_CONFIG_DIR}/cman-notify.d
+LOGDIR=${localstatedir}/log/cluster
+LOGROTATEDIR=${sysconfdir}/logrotate.d
+CLUSTERVARRUN=${localstatedir}/run/cluster
+CLUSTERVARLIB=${localstatedir}/lib/cluster
+
+## do subst
+
+AC_SUBST([LCRSODIR])
+AC_DEFINE_UNQUOTED([LCRSODIR], "$(eval echo ${LCRSODIR})", [LCRSO directory])
+
+AC_SUBST([DEFAULT_CONFIG_DIR])
+AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_DIR], "$(eval echo ${DEFAULT_CONFIG_DIR})",
+ [Default config directory])
+
+AC_SUBST([DEFAULT_CONFIG_FILE])
+AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], "$(eval echo ${DEFAULT_CONFIG_FILE})",
+ [Default config file])
+
+AC_SUBST([LOGDIR])
+AC_DEFINE_UNQUOTED([LOGDIR], "$(eval echo ${LOGDIR})",
+ [Default logging directory])
+
+AC_SUBST([NOTIFYDDIR])
+
+AC_SUBST([LOGROTATEDIR])
+
+AC_SUBST([CLUSTERVARRUN])
+
+AC_SUBST([CLUSTERVARLIB])
+
+AC_DEFINE_UNQUOTED([SBINDIR], "$(eval echo ${sbindir})",
+ [/sbin path])
+
+AC_DEFINE_UNQUOTED([COROSYNCBIN], "$(eval echo ${sbindir}/corosync)",
+ [corosync executable file])
+
+AC_DEFINE_UNQUOTED([SYSLOGFACILITY], $(eval echo ${SYSLOGFACILITY}),
+ [Default syslog facility])
+
+AC_DEFINE_UNQUOTED([SYSLOGLEVEL], $(eval echo ${SYSLOGLEVEL}),
+ [Default syslog level])
+
+## *FLAGS handling
+
+ENV_CFLAGS="$CFLAGS"
+ENV_CPPFLAGS="$CPPFLAGS"
+ENV_LDFLAGS="$LDFLAGS"
+
+# debug build stuff
+if test "x${enable_debug}" = xyes; then
+ AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code])
+ OPT_CFLAGS="-O0"
+else
+ OPT_CFLAGS="-O2"
+fi
+
+# gdb flags
+if test "x${GCC}" = xyes; then
+ GDB_FLAGS="-ggdb3"
+else
+ GDB_FLAGS="-g"
+fi
+
+# extra warnings
+EXTRA_WARNINGS=""
+
+WARNLIST="
+ all
+ shadow
+ missing-prototypes
+ missing-declarations
+ strict-prototypes
+ declaration-after-statement
+ pointer-arith
+ write-strings
+ cast-align
+ bad-function-cast
+ missing-format-attribute
+ format=2
+ format-security
+ format-nonliteral
+ no-long-long
+ unsigned-char
+ gnu89-inline
+ no-strict-aliasing
+ "
+
+for j in $WARNLIST; do
+ if cc_supports_flag -W$j; then
+ EXTRA_WARNINGS="$EXTRA_WARNINGS -W$j";
+ fi
+done
+
+CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS \
+ $EXTRA_WARNINGS $WERROR_CFLAGS"
+CPPFLAGS="-I\$(top_builddir)/make -I\$(top_srcdir)/make -I. $ENV_CPPFLAGS"
+LDFLAGS="$ENV_LDFLAGS"
+
+#
+# missing:
+# cman/init.d/Makefile
+# bindings/perl/ccs/Makefile
+
+AC_CONFIG_FILES([Makefile
+ common/Makefile
+ common/liblogthread/Makefile
+ common/liblogthread/liblogthread.pc
+ config/Makefile
+ config/libs/Makefile
+ config/libs/libccsconfdb/Makefile
+ config/libs/libccsconfdb/libccs.pc
+ config/plugins/Makefile
+ config/plugins/ldap/Makefile
+ config/plugins/xml/Makefile
+ config/tools/Makefile
+ config/tools/ccs_tool/Makefile
+ config/tools/ldap/Makefile
+ config/tools/mkconf/Makefile
+ config/tools/man/Makefile
+ config/man/Makefile
+ cman/Makefile
+ cman/services/Makefile
+ cman/services/cman/Makefile
+ cman/services/cman/include/Makefile
+ cman/services/cman/services/Makefile
+ cman/services/cman/lib/Makefile
+ cman/services/cman/lib/libcman.pc
+ cman/cman_tool/Makefile
+ cman/config/Makefile
+ cman/qdisk/Makefile
+ cman/notifyd/Makefile
+ cman/man/Makefile
+ cman/tests/Makefile
+ group/Makefile
+ group/man/Makefile
+ group/tool/Makefile
+ doc/Makefile
+ bindings/Makefile
+ bindings/perl/Makefile
+ ])
+
+AC_OUTPUT
diff --git a/contrib/Makefile b/contrib/Makefile
deleted file mode 100644
index 3f1d0e1..0000000
--- a/contrib/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-include ../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-ifdef contrib_code
-SUBDIRS=
-endif
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index 10a076c..0000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-DOCS = gfs2.txt \
- journaling.txt \
- min-gfs.txt \
- usage.txt \
- COPYING.applications \
- COPYING.libraries \
- COPYRIGHT \
- README.licence
-
-TARGET= cluster
-
-LOGRORATED = $(TARGET)
-
-all: $(TARGET)
-
-include ../make/defines.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-include $(OBJDIR)/make/clean.mk
-
-$(TARGET):
- cat $(S)/$(TARGET).logrotate.in | sed \
- -e 's#@LOGDIR@#${logdir}#g' \
- > $(TARGET)
-
-clean: generalclean
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..a9332de
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,34 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+dist_doc_DATA = gfs2.txt \
+ journaling.txt \
+ min-gfs.txt \
+ usage.txt \
+ COPYING.applications \
+ COPYING.libraries \
+ COPYRIGHT \
+ README.licence
+
+EXTRA_DIST = cman_notify_template.sh \
+ cluster.logrotate.in
+
+logrotate_TARGET = cluster
+
+$(logrotate_TARGET): $(logrotate_TARGET).logrotate.in
+ cat $(srcdir)/$^ | sed \
+ -e 's#_LOGDIR_#${LOGDIR}#g' \
+ > $@
+
+all-local: $(logrotate_TARGET)
+
+clean-local:
+ rm -f $(logrotate_TARGET)
+
+install-exec-local:
+ $(INSTALL) -d $(DESTDIR)/$(LOGROTATEDIR)
+ $(INSTALL) -m 644 cluster $(DESTDIR)/$(LOGROTATEDIR)
+
+uninstall-local:
+ cd $(DESTDIR)/$(LOGROTATEDIR) && \
+ rm -f $(logrotate_TARGET)
+ rmdir $(DESTDIR)/$(LOGROTATEDIR) || :;
diff --git a/doc/cluster.logrotate.in b/doc/cluster.logrotate.in
index df7d94c..44451a6 100644
--- a/doc/cluster.logrotate.in
+++ b/doc/cluster.logrotate.in
@@ -1,4 +1,4 @@
-@LOGDIR@/*log {
+_LOGDIR_/*log {
missingok
compress
notifempty
diff --git a/group/Makefile b/group/Makefile
deleted file mode 100644
index 792c2e5..0000000
--- a/group/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS = man tool
diff --git a/group/Makefile.am b/group/Makefile.am
new file mode 100644
index 0000000..9345392
--- /dev/null
+++ b/group/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = tool man
diff --git a/group/man/Makefile b/group/man/Makefile
deleted file mode 100644
index 2da3a11..0000000
--- a/group/man/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-TARGET= group_tool.8
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/man.mk
diff --git a/group/man/Makefile.am b/group/man/Makefile.am
new file mode 100644
index 0000000..fcc1510
--- /dev/null
+++ b/group/man/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+dist_man_MANS = group_tool.8
diff --git a/group/tool/Makefile b/group/tool/Makefile
deleted file mode 100644
index 196fa4a..0000000
--- a/group/tool/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-TARGET= group_tool
-
-SBINDIRT=$(TARGET)
-
-all: ${TARGET}
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-OBJS= main.o
-
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${libdir}
-
-${TARGET}: ${OBJS}
- $(CC) -o $@ $^ $(LDFLAGS)
-
-clean: generalclean
diff --git a/group/tool/Makefile.am b/group/tool/Makefile.am
new file mode 100644
index 0000000..5c36907
--- /dev/null
+++ b/group/tool/Makefile.am
@@ -0,0 +1,5 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+sbin_PROGRAMS = group_tool
+
+group_tool_SOURCES = main.c
diff --git a/group/tool/main.c b/group/tool/main.c
index 351e1b6..ee91f70 100644
--- a/group/tool/main.c
+++ b/group/tool/main.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <sys/types.h>
#include <sys/un.h>
#include <inttypes.h>
@@ -68,7 +70,7 @@ static void decode_arguments(int argc, char **argv)
case 'V':
printf("%s %s (built %s %s)\n",
- prog_name, RELEASE_VERSION, __DATE__, __TIME__);
+ prog_name, PACKAGE_VERSION, __DATE__, __TIME__);
printf("%s\n", REDHAT_COPYRIGHT);
exit(EXIT_SUCCESS);
break;
diff --git a/make/binding-passthrough.mk b/make/binding-passthrough.mk
deleted file mode 100644
index 5f3a1bb..0000000
--- a/make/binding-passthrough.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-all: ${SUBDIRS}
-
-%:
- set -e && \
- for i in ${SUBDIRS}; do \
- ${MAKE} -C $$i -f Makefile.bindings $@; \
- done
diff --git a/make/clean.mk b/make/clean.mk
deleted file mode 100644
index adc25ca..0000000
--- a/make/clean.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-generalclean:
- rm -rf *~* *.o *.a *.so *.so.* a.out *.po *.s *.d *.pyc
- rm -rf core core.* .depend cscope.* *.orig *.rej
- rm -rf linux .*.o.cmd .*.ko.cmd *.mod.c .tmp_versions
- rm -rf Module.symvers Module.markers .*.o.d modules.order
- rm -rf ${TARGET} ${TARGETS} ${TARGET}_test ${TARGET}.pc
- rm -rf ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4} ${TARGET5} ${TARGET6}
diff --git a/make/cobj.mk b/make/cobj.mk
deleted file mode 100644
index d2db208..0000000
--- a/make/cobj.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-%.o: $(S)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(REENT_CFLAGS) -c -o $@ $<
-
-# used by dlm/libdlm
-%_lt.o: $(S)/%.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
diff --git a/make/defines.mk.input b/make/defines.mk.input
deleted file mode 100644
index afc48b0..0000000
--- a/make/defines.mk.input
+++ /dev/null
@@ -1,63 +0,0 @@
-# Install Locations
-prefix ?= ${DESTDIR}@PREFIX@
-sbindir ?= ${DESTDIR}@SBINDIR@
-relativesbin ?= @RELATIVESBIN@
-initddir ?= ${DESTDIR}@INITDDIR@
-libdir ?= ${DESTDIR}@LIBDIR@
-libexecdir ?= ${DESTDIR}@LIBEXECDIR@
-sharedir ?= ${DESTDIR}@SHAREDIR@
-docdir ?= ${DESTDIR}@DOCDIR@
-logdir ?= ${DESTDIR}@LOGDIR@
-logrotatedir ?= ${DESTDIR}@LOGROTATEDIR@
-mandir ?= ${DESTDIR}@MANDIR@
-incdir ?= ${DESTDIR}@INCDIR@
-notifyddir ?= ${DESTDIR}@CONFDIR@/cman-notify.d
-pkgconfigdir ?= ${DESTDIR}@LIBDIR@/pkgconfig
-
-# Build information
-
-# C Compiler defaults
-CC = @CC@
-AR = ar
-RANLIB = ranlib
-
-CFLAGS += @CFLAGS@ -I@SRCDIR@/make
-CFLAGS += -DDEFAULT_CONFIG_DIR=\"@CONFDIR@\" -DDEFAULT_CONFIG_FILE=\"@CONFFILE@\"
-CFLAGS += -DLOGDIR=\"@LOGDIR@\" -DSYSLOGFACILITY=@SYSLOGFACILITY@ -DSYSLOGLEVEL=@SYSLOGLEVEL@
-LDFLAGS += @LDFLAGS@
-
-SRCDIR = @SRCDIR@
-OBJDIR = @OBJDIR@
-
-ccsincdir ?= @CCSINCDIR@
-ccslibdir ?= @CCSLIBDIR@
-cmanincdir ?= @CMANINCDIR@
-cmanlibdir ?= @CMANLIBDIR@
-logtincdir ?= @LOGTINCDIR@
-logtlibdir ?= @LOGTLIBDIR@
-corosyncincdir ?= @COROSYNCINCDIR@
-corosynclibdir ?= @COROSYNCLIBDIR@
-openaisincdir ?= @OPENAISINCDIR@
-openaislibdir ?= @OPENAISLIBDIR@
-corosyncbin ?= @COROSYNCBIN@
-ldapincdir ?= @LDAPINCDIR@
-ldaplibdir ?= @LDAPLIBDIR@
-zlibincdir ?= @ZLIBINCDIR@
-zliblibdir ?= @ZLIBLIBDIR@
-experimental_build ?= @ENABLE_CRACK_OF_THE_DAY@
-legacy_code ?= @ENABLE_LEGACY_CODE@
-contrib_code ?= @ENABLE_CONTRIB@
-without_common ?= @DISABLE_COMMON@
-without_config ?= @DISABLE_CONFIG@
-without_cman/lib ?= @DISABLE_CMAN@
-without_cman ?= @DISABLE_CMAN@
-without_group ?= @DISABLE_GROUP@
-without_bindings ?= @DISABLE_BINDINGS@
-
-THISDIR = $(shell echo $(CURDIR) | sed -e 's|$(OBJDIR)/||g')
-S=$(SRCDIR)/$(THISDIR)
-
-CONFDIR=@CONFDIR@
-CONFFILE=@CONFFILE@
-
-UNINSTALL = perl @SRCDIR@/scripts/uninstall.pl
diff --git a/make/install.mk b/make/install.mk
deleted file mode 100644
index 93d9406..0000000
--- a/make/install.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-install:
-ifdef LIBDIRT
- install -d ${libdir}
- install -m644 ${LIBDIRT} ${libdir}
-endif
-ifdef LIBSYMT
- cp -a ${LIBSYMT} ${libdir}
-endif
-ifdef INCDIRT
- install -d ${incdir}
- set -e; \
- for i in ${INCDIRT}; do \
- install -m644 $(S)/$$i ${incdir}; \
- done
-endif
-ifdef COROSYNCINCDIRT
- install -d ${DESTDIR}/${corosyncincdir}/corosync
- for i in ${COROSYNCINCDIRT}; do \
- install -m644 $(S)/$$i ${DESTDIR}/${corosyncincdir}/corosync; \
- done
-endif
-ifdef SBINDIRT
- install -d ${sbindir}
- install -m755 ${SBINDIRT} ${sbindir}
-endif
-ifdef SBINSYMT
- install -d ${sbindir}
- cp -a ${SBINSYMT} ${sbindir}
-endif
-ifdef LCRSOT
- install -d ${libexecdir}/lcrso
- install -m644 ${LCRSOT} ${libexecdir}/lcrso
-endif
-ifdef INITDT
- install -d ${initddir}
- set -e; \
- for i in ${INITDT}; do \
- if [ -f $$i ]; then \
- install -m755 $$i ${initddir}; \
- else \
- install -m755 $(S)/$$i ${initddir}; \
- fi; \
- done
-endif
-ifdef UDEVT
- install -d ${DESTDIR}/etc/udev/rules.d
- set -e; \
- for i in ${UDEVT}; do \
- install -m644 $(S)/$$i ${DESTDIR}/etc/udev/rules.d; \
- done
-endif
-ifdef DOCS
- install -d ${docdir}
- set -e; \
- for i in ${DOCS}; do \
- install -m644 $(S)/$$i ${docdir}; \
- done
-endif
-ifdef LOGRORATED
- install -d ${logrotatedir}
- install -m644 ${LOGRORATED} ${logrotatedir}
-endif
-ifdef NOTIFYD
- install -d ${notifyddir}
- install -m755 ${NOTIFYD} ${notifyddir}
-endif
-ifdef PKGCONF
- install -d ${pkgconfigdir}
- install -m644 ${PKGCONF} ${pkgconfigdir}
-endif
diff --git a/make/lcrso.mk b/make/lcrso.mk
new file mode 100644
index 0000000..a2ab978
--- /dev/null
+++ b/make/lcrso.mk
@@ -0,0 +1,23 @@
+LCRSO_OBJS = $(SOURCES:%.c=%.o)
+
+$(LCRSO): $(LCRSO_OBJS)
+ $(CC) $(AM_LDFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ $^ -o $@
+
+%.o: %.c
+ $(CC) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+ $(CFLAGS) $(CPPFLAGS) \
+ $(INCLUDES) \
+ -c -o $@ $<
+
+all-local: $(LCRSO_OBJS) $(LCRSO)
+
+install-exec-local:
+ $(INSTALL) -d $(DESTDIR)/$(LCRSODIR)
+ $(INSTALL) -m 755 $(LCRSO) $(DESTDIR)/$(LCRSODIR)
+
+uninstall-local:
+ cd $(DESTDIR)/$(LCRSODIR) && \
+ rm -f $(LCRSO)
+
+clean-local:
+ rm -f *.o *.a *.lcrso
diff --git a/make/libs.mk b/make/libs.mk
deleted file mode 100644
index 9863b1f..0000000
--- a/make/libs.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-# handle objects
-ifndef OBJS
- OBJS = $(TARGET).o
-endif
-
-# we always build the static version
-ifndef STATICLIB
- STATICLIB = $(TARGET).a
-endif
-
-# handle the shared version
-ifndef MAKESTATICLIB
- ifndef LIBDIRT
- LIBDIRT=$(TARGET).a \
- $(TARGET).so.$(SOMAJOR).$(SOMINOR)
- endif
- ifndef LIBSYMT
- LIBSYMT=$(TARGET).so \
- $(TARGET).so.$(SOMAJOR)
- endif
- ifndef COROSYNCINCDIRT
- ifndef INCDIRT
- INCDIRT=$(TARGET).h
- endif
- endif
- ifndef SHAREDLIB
- SHAREDLIB=$(TARGET).so.${SOMAJOR}.${SOMINOR}
- endif
- ifndef PKGCONF
- PKGCONF=$(TARGET).pc
- endif
-
-all: $(STATICLIB) $(SHAREDLIB) $(PKGCONF)
-
-$(SHAREDLIB): $(OBJS)
- $(CC) -shared -o $@ -Wl,-soname=$(TARGET).so.$(SOMAJOR) $^ $(LDFLAGS)
- ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so
- ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so.$(SOMAJOR)
-
-$(PKGCONF): $(S)/$(PKGCONF).in
- cat $(S)/$(PKGCONF).in | \
- sed \
- -e 's#@PREFIX@#${prefix}#g' \
- -e 's#@LIBDIR@#${libdir}#g' \
- -e 's#@INCDIR@#${incdir}#g' \
- -e 's#@VERSION@#${RELEASE_VERSION}#g' \
- > $@
-
-else
-
-all: $(STATICLIB)
-
-endif
-
-$(STATICLIB): $(OBJS)
- ${AR} cru $@ $^
- ${RANLIB} $@
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/make/man.mk b/make/man.mk
deleted file mode 100644
index 26f6401..0000000
--- a/make/man.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-all:
-
-install:
- set -e; \
- for i in ${TARGET}; do \
- p=`echo $$i | sed -e 's#.*\.##g'`; \
- install -d ${mandir}/man$$p; \
- install -m644 $(S)/$$i ${mandir}/man$$p; \
- done
-
-uninstall:
- set -e; \
- for i in ${TARGET}; do \
- p=`echo $$i | sed -e 's#.*\.##g'`; \
- ${UNINSTALL} $$i ${mandir}/man$$p; \
- done
-
-clean:
diff --git a/make/official_release_version b/make/official_release_version
deleted file mode 100644
index 211c0c2..0000000
--- a/make/official_release_version
+++ /dev/null
@@ -1 +0,0 @@
-SONAME "3.0"
diff --git a/make/passthrough.mk b/make/passthrough.mk
deleted file mode 100644
index 979a86c..0000000
--- a/make/passthrough.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-all: ${SUBDIRS}
-
-%:
- set -e && \
- for i in ${SUBDIRS}; do \
- ${MAKE} -C $$i $@; \
- done
diff --git a/make/perl-binding-common.mk b/make/perl-binding-common.mk
deleted file mode 100644
index d51520c..0000000
--- a/make/perl-binding-common.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-TARGET += Makefile \
- META.yml
-
-all: $(TARGET)
- ${MAKE} LD_RUN_PATH="";
-
-%.pm: $(S)/%.pm.in
- cat $< | \
- sed \
- -e 's/@VERSION@/${RELEASE_VERSION}/g' \
- > $@
-
-%.yml: $(S)/%.yml.in
- cat $< | \
- sed \
- -e 's/@VERSION@/${RELEASE_VERSION}/g' \
- > $@
-
-Makefile: META.yml $(PMTARGET)
- perl Makefile.PL INC='$(CFLAGS)' LIBS='$(LDFLAGS)' INSTALLDIRS=vendor
-
-install:
- ${MAKE} -f Makefile install
-
-uninstall:
- echo uninstall target not supported yet
-
-clean:
- -${MAKE} -f Makefile clean
- rm -f $(TARGET) Makefile.old
diff --git a/make/uninstall.mk b/make/uninstall.mk
deleted file mode 100644
index ad769b5..0000000
--- a/make/uninstall.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-uninstall:
-ifdef LIBDIRT
- ${UNINSTALL} ${LIBDIRT} ${libdir}
-endif
-ifdef LIBSYMT
- ${UNINSTALL} ${LIBSYMT} ${libdir}
-endif
-ifdef COROSYNCINCDIRT
- @echo WARNING: need to fix uninstall for corosync headers
-endif
-ifdef INCDIRT
- ${UNINSTALL} ${INCDIRT} ${incdir}
-endif
-ifdef SBINDIRT
- ${UNINSTALL} ${SBINDIRT} ${sbindir}
-endif
-ifdef SBINSYMT
- ${UNINSTALL} ${SBINSYMT} ${sbindir}
-endif
-ifdef LCRSOT
- ${UNINSTALL} ${LCRSOT} ${libexecdir}/lcrso
-endif
-ifdef INITDT
- ${UNINSTALL} ${INITDT} ${initddir}
-endif
-ifdef UDEVT
- ${UNINSTALL} ${UDEVT} ${DESTDIR}/etc/udev/rules.d
-endif
-ifdef DOCS
- ${UNINSTALL} ${DOCS} ${docdir}
-endif
-ifdef LOGRORATED
- ${UNINSTALL} ${LOGRORATED} ${logrotatedir}
-endif
-ifdef NOTIFYD
- ${UNINSTALL} ${NOTIFYD} ${notifyddir}
-endif
-ifdef PKGCONF
- ${UNINSTALL} ${PKGCONF} ${pkgconfigdir}
-endif
diff --git a/scripts/uninstall.pl b/scripts/uninstall.pl
deleted file mode 100644
index 4326e85..0000000
--- a/scripts/uninstall.pl
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/perl
-
-## Description: Basically the reverse of the install program, except it
-## only supports a list of files and a directory as arguments
-
-$| = 1;
-
-use Getopt::Std;
-
-# list all valid options here. User will get errors if invalid options are
-# specified on the command line
-getopts('hD');
-
-$args = 1;
-
-# We need at least two arguments to uninstall
-if(!defined($ARGV[1])) {
- $args = 0;
-}
-
-# if the user set the help flag or didn't provide enough args, print help
-# and die.
-if(defined($opt_h) || ($args == 0)) {
- $msg = "usage: $0 [OPTIONS] TARGET DIRECTORY\n";
- $msg = $msg . "\t-D\tRemove specified directory if empty\n";
- $msg = $msg . "\t-h\tDisplay this help message\n";
- die $msg;
-}
-
-# find out how many command line arguments we have
-$length = $#ARGV;
-# We need a special case if there is only one file specified
-if($length > 1) {
- @filelist = @ARGV;
- $#filelist = $length - 1;
-}
-else {
- @filelist = @ARGV[0];
-}
-
-# the last argument is the directory
-$dir = @ARGV[$length];
-
-# prepend the directory name to all files in the filelist
-$i = 0;
-print "Attempting to remove the following files from directory $dir/:\n";
-while($i < $length) {
- print "@filelist[$i] ";
- @filelist[$i] = "$dir/" . @filelist[$i];
- $i++;
-}
-print "\n";
-
-#print "Files:@filelist\n";
-#print "Directory: $dir\n";
-
-# delete the files in filelist
-$unlinked = unlink @filelist;
-if($unlinked < $length) {
- print "Error! Unable to remove all files in $dir:\n\tYou may have to manually delete some of them.\n"
-}
-# if user specifed they want the directory deleted, try to delete it. Print
-# error message if not able to delete directory, including error.
-if(defined($opt_D)) {
- $result = rmdir($dir);
- if($result == FALSE) {
- print "Error! Unable to remove directory $dir/:\n\t$!\n";
- }
-}
-
-