aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2019-09-07 11:27:19 +0200
committerGravatar Andreas Baumann <mail@andreasbaumann.cc> 2019-09-07 11:27:19 +0200
commitea7f1fbb5c4c1097737f2f1f802e3f34fc14b3d0 (patch)
treef65f4da4bfdfb8e30dbb1a3ee28ef767e2073424
parent4d666514f2290a5dffd60ba0c0e071e5e5626baa (diff)
parent5f4182f5da5ae6151eb960a0458571a88017df89 (diff)
downloadmonitoring-plugins-ea7f1fbb5c4c1097737f2f1f802e3f34fc14b3d0.tar.gz
Merge branch 'master' into feature_check_curl
-rw-r--r--m4/np_mysqlclient.m428
1 files changed, 22 insertions, 6 deletions
diff --git a/m4/np_mysqlclient.m4 b/m4/np_mysqlclient.m4
index c2a4d2a7..5099a02b 100644
--- a/m4/np_mysqlclient.m4
+++ b/m4/np_mysqlclient.m4
@@ -53,18 +53,34 @@ AC_DEFUN([np_mysqlclient],
_savedcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $np_mysql_include"
- dnl Putting $np_mysql_libs as other libraries ensures that all mysql dependencies are linked in
- dnl Although -lmysqlclient is duplicated, it is not a problem
- AC_CHECK_LIB([mysqlclient], [mysql_init], [
- with_mysql=$np_mysql_config
- AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mysqlclient is found and can compile])
- ], [with_mysql=no], [$np_mysql_libs])
+ np_check_lib_mysqlclient
+
CPPFLAGS=$_savedcppflags
fi
fi
])
+dnl Test mysql_init using mysqlclient
+AC_DEFUN([np_check_lib_mysqlclient],
+[
+ dnl Putting $np_mysql_libs as other libraries ensures that all mysql dependencies are linked in
+ dnl Although -lmysqlclient is duplicated, it is not a problem
+ AC_CHECK_LIB([mysqlclient], [mysql_init], [
+ with_mysql=$np_mysql_config
+ AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mysqlclient is found and can compile])
+ ], [np_check_lib_mariadbclient], [$np_mysql_libs])
+])
+
+dnl Test mysql_init using mariadbclient
+AC_DEFUN([np_check_lib_mariadbclient],
+[
+ AC_CHECK_LIB([mariadbclient], [mysql_init], [
+ with_mysql=$np_mysql_config
+ AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mariadbclient is found and can compile])
+ ], [with_mysql=no], [$np_mysql_libs])
+])
+
dnl Will take $1, find last occurrance of -LDIR and add DIR to LD_RUN_PATH
AC_DEFUN([np_add_to_runpath],
[