103 lines
3.4 KiB
Diff
103 lines
3.4 KiB
Diff
diff -Naurp pcp-6.0.0.orig/configure pcp-6.0.0/configure
|
|
--- pcp-6.0.0.orig/configure 2022-08-25 10:52:14.000000000 +1000
|
|
+++ pcp-6.0.0/configure 2022-09-27 13:05:59.960815679 +1000
|
|
@@ -1099,6 +1099,7 @@ with_pmdabpf_bpftool
|
|
with_pmdabpf_btf
|
|
with_pmdabpftrace
|
|
with_pmdajson
|
|
+with_pmdamongodb
|
|
with_pmdanutcracker
|
|
with_pmdasnmp
|
|
with_selinux
|
|
@@ -1849,6 +1850,7 @@ Optional Packages:
|
|
vendored kernel type information)
|
|
--with-pmdabpftrace enable bpftrace pmda (default is on)
|
|
--with-pmdajson enable JSON pmda (default is on)
|
|
+ --with-pmdamongodb enable MongoDB pmda (default is on)
|
|
--with-pmdanutcracker enable nutcracker pmda (default is on)
|
|
--with-pmdasnmp enable SNMP pmda (default is on)
|
|
--with-selinux enable building of selinux package (default is on)
|
|
@@ -3679,6 +3681,16 @@ fi
|
|
|
|
|
|
|
|
+# Check whether --with-pmdamongodb was given.
|
|
+if test ${with_pmdamongodb+y}
|
|
+then :
|
|
+ withval=$with_pmdamongodb; do_pmdamongodb=$withval; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --with-pmdamongodb=$withval"
|
|
+else $as_nop
|
|
+ do_pmdamongodb=check
|
|
+fi
|
|
+
|
|
+
|
|
+
|
|
# Check whether --with-pmdanutcracker was given.
|
|
if test ${with_pmdanutcracker+y}
|
|
then :
|
|
@@ -9533,12 +9545,21 @@ printf "%s\n" "no" >&6; }; fi
|
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the mongodb PMDA should be included" >&5
|
|
printf %s "checking if the mongodb PMDA should be included... " >&6; }
|
|
pmda_mongodb=false
|
|
-if test "$have_python" = true
|
|
-then
|
|
- if $pcp_python_prog -c "import pymongo" >/dev/null 2>&1
|
|
+if test "x$do_pmdamongodb" = "xyes"
|
|
+then :
|
|
+ pmda_mongodb=true
|
|
+fi
|
|
+if test "x$do_pmdamongodb" = "xcheck"
|
|
+then :
|
|
+
|
|
+ if test "$have_python" = true
|
|
then
|
|
- pmda_mongodb=true
|
|
+ if $pcp_python_prog -c "import pymongo" >/dev/null 2>&1
|
|
+ then
|
|
+ pmda_mongodb=true
|
|
+ fi
|
|
fi
|
|
+
|
|
fi
|
|
PMDA_MONGODB=$pmda_mongodb
|
|
|
|
diff -Naurp pcp-6.0.0.orig/configure.ac pcp-6.0.0/configure.ac
|
|
--- pcp-6.0.0.orig/configure.ac 2022-08-25 10:52:14.000000000 +1000
|
|
+++ pcp-6.0.0/configure.ac 2022-09-27 13:05:59.961815662 +1000
|
|
@@ -195,6 +195,12 @@ AC_ARG_WITH([pmdajson],
|
|
[do_pmdajson=$withval; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --with-pmdajson=$withval"],
|
|
[do_pmdajson=check])
|
|
|
|
+AC_ARG_WITH([pmdamongodb],
|
|
+ [AC_HELP_STRING([--with-pmdamongodb],
|
|
+ [enable MongoDB pmda (default is on)])],
|
|
+ [do_pmdamongodb=$withval; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --with-pmdamongodb=$withval"],
|
|
+ [do_pmdamongodb=check])
|
|
+
|
|
AC_ARG_WITH([pmdanutcracker],
|
|
[AC_HELP_STRING([--with-pmdanutcracker],
|
|
[enable nutcracker pmda (default is on)])],
|
|
@@ -1375,14 +1381,17 @@ if $pmda_mysql; then AC_MSG_RESULT(yes);
|
|
|
|
AC_MSG_CHECKING([if the mongodb PMDA should be included])
|
|
pmda_mongodb=false
|
|
-if test "$have_python" = true
|
|
-then
|
|
- dnl rpm build for mongodb PMDA needs python pymongo module
|
|
- if $pcp_python_prog -c "import pymongo" >/dev/null 2>&1
|
|
+AS_IF([test "x$do_pmdamongodb" = "xyes"], [pmda_mongodb=true])
|
|
+AS_IF([test "x$do_pmdamongodb" = "xcheck"], [
|
|
+ if test "$have_python" = true
|
|
then
|
|
- pmda_mongodb=true
|
|
+ dnl rpm build for mongodb PMDA needs python pymongo module
|
|
+ if $pcp_python_prog -c "import pymongo" >/dev/null 2>&1
|
|
+ then
|
|
+ pmda_mongodb=true
|
|
+ fi
|
|
fi
|
|
-fi
|
|
+])
|
|
AC_SUBST(PMDA_MONGODB, $pmda_mongodb)
|
|
if $pmda_mongodb; then AC_MSG_RESULT(yes); else AC_MSG_RESULT(no); fi
|
|
|