diff options
author | Martin Schwenke <martin@meltin.net> | 2013-05-28 14:16:02 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-05-28 14:24:16 +1000 |
commit | 4a1eed5043034814f33437fdb7a7b39fe1680057 (patch) | |
tree | 357e512d2c1841fd2aaca78ad1c78c4d920c2ea4 /ctdb/utils | |
parent | 982ea336db94ce6386a43df3de2f76c4b39c6249 (diff) | |
download | samba-4a1eed5043034814f33437fdb7a7b39fe1680057.tar.gz |
build: Separate autoconf macros for pmda
The pmda stuff is no longer built by default even if the headers are
available. To build, run "configure --enable-pmda".
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 194f7a0dec26d693a5f3e6734b1c82f61f8e4d19)
Diffstat (limited to 'ctdb/utils')
-rw-r--r-- | ctdb/utils/pmda/config.m4 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ctdb/utils/pmda/config.m4 b/ctdb/utils/pmda/config.m4 new file mode 100644 index 00000000000..6b3fbb0ea14 --- /dev/null +++ b/ctdb/utils/pmda/config.m4 @@ -0,0 +1,32 @@ +AC_ARG_ENABLE(pmda, +AS_HELP_STRING([--enable-pmda], [Turn on PCP pmda support (default=no)])) + +HAVE_PMDA=no + +if eval "test x$enable_pmda = xyes"; then + HAVE_PMDA=yes + + AC_CHECK_HEADERS(pcp/pmapi.h pcp/impl.h pcp/pmda.h, [], + [AC_MSG_ERROR([Missing PCP pmda headers])], + [[#ifdef HAVE_PCP_PMAPI_H + # include <pcp/pmapi.h> + #endif + #ifdef HAVE_PCP_IMPL_H + # include <pcp/impl.h> + #endif + #ifdef HAVE_PCP_PMDA_H + # include <pcp/pmda.h> + #endif + ]]) +fi + +if test x"$HAVE_PMDA" = x"yes"; then + CTDB_PMDA=bin/pmdactdb + CTDB_PMDA_INSTALL=install_pmda +else + CTDB_PMDA= + CTDB_PMDA_INSTALL= +fi + +AC_SUBST(CTDB_PMDA) +AC_SUBST(CTDB_PMDA_INSTALL) |