diff options
| author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-12-02 15:11:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-02 15:11:21 +0100 |
| commit | df1e9e975f69c8f7965bab91684870fe509739c6 (patch) | |
| tree | 526b0c77c524b2219d5a48fd78b8302f055a4a5b /m4/np_mysqlclient.m4 | |
| parent | 6246b8f1830e8a375bc656deafd28aab715b4fd9 (diff) | |
| parent | 1a3a715702a5b6709fed2a1eb53ec644c9968057 (diff) | |
| download | monitoring-plugins-df1e9e975f69c8f7965bab91684870fe509739c6.tar.gz | |
Merge branch 'master' into mailq-add-config-dir
Diffstat (limited to 'm4/np_mysqlclient.m4')
| -rw-r--r-- | m4/np_mysqlclient.m4 | 28 |
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], | |||
| 53 | _savedcppflags="$CPPFLAGS" | 53 | _savedcppflags="$CPPFLAGS" |
| 54 | CPPFLAGS="$CPPFLAGS $np_mysql_include" | 54 | CPPFLAGS="$CPPFLAGS $np_mysql_include" |
| 55 | 55 | ||
| 56 | dnl Putting $np_mysql_libs as other libraries ensures that all mysql dependencies are linked in | 56 | np_check_lib_mysqlclient |
| 57 | dnl Although -lmysqlclient is duplicated, it is not a problem | 57 | |
| 58 | AC_CHECK_LIB([mysqlclient], [mysql_init], [ | ||
| 59 | with_mysql=$np_mysql_config | ||
| 60 | AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mysqlclient is found and can compile]) | ||
| 61 | ], [with_mysql=no], [$np_mysql_libs]) | ||
| 62 | CPPFLAGS=$_savedcppflags | 58 | CPPFLAGS=$_savedcppflags |
| 63 | 59 | ||
| 64 | fi | 60 | fi |
| 65 | fi | 61 | fi |
| 66 | ]) | 62 | ]) |
| 67 | 63 | ||
| 64 | dnl Test mysql_init using mysqlclient | ||
| 65 | AC_DEFUN([np_check_lib_mysqlclient], | ||
| 66 | [ | ||
| 67 | dnl Putting $np_mysql_libs as other libraries ensures that all mysql dependencies are linked in | ||
| 68 | dnl Although -lmysqlclient is duplicated, it is not a problem | ||
| 69 | AC_CHECK_LIB([mysqlclient], [mysql_init], [ | ||
| 70 | with_mysql=$np_mysql_config | ||
| 71 | AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mysqlclient is found and can compile]) | ||
| 72 | ], [np_check_lib_mariadbclient], [$np_mysql_libs]) | ||
| 73 | ]) | ||
| 74 | |||
| 75 | dnl Test mysql_init using mariadbclient | ||
| 76 | AC_DEFUN([np_check_lib_mariadbclient], | ||
| 77 | [ | ||
| 78 | AC_CHECK_LIB([mariadbclient], [mysql_init], [ | ||
| 79 | with_mysql=$np_mysql_config | ||
| 80 | AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mariadbclient is found and can compile]) | ||
| 81 | ], [with_mysql=no], [$np_mysql_libs]) | ||
| 82 | ]) | ||
| 83 | |||
| 68 | dnl Will take $1, find last occurrance of -LDIR and add DIR to LD_RUN_PATH | 84 | dnl Will take $1, find last occurrance of -LDIR and add DIR to LD_RUN_PATH |
| 69 | AC_DEFUN([np_add_to_runpath], | 85 | AC_DEFUN([np_add_to_runpath], |
| 70 | [ | 86 | [ |
