diff options
author | Peter (Stig) Edwards <thatsafunnyname@gmail.com> | 2018-03-22 10:04:55 +0000 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2018-03-23 11:11:36 -0700 |
commit | 39151c870c5e598f039714bdb790bd46f614856e (patch) | |
tree | 7f418b0d15f9873a9b52065352deac1f47a750f1 /configure.ac | |
parent | fde4f46a2117318a1bd0431c47b4e9c7a3825733 (diff) | |
download | memcached-39151c870c5e598f039714bdb790bd46f614856e.tar.gz |
Fix SASL_CB_GETCONF(PATH) detection
For https://github.com/memcached/memcached/issues/365
On RHEL(5|6|7) the name of the defined constant in sasl.h is SASL_CB_GETCONFPATH and not SASL_CB_GETCONF.
This adds support for HAVE_SASL_CB_GETCONFPATH to be set to nonzero when the SASL implementation supports SASL_CB_GETCONFPATH. This will be used in sasl_defs.c when ./configure is run with "--enable-sasl".
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7d1ab31..19eb279 100644 --- a/configure.ac +++ b/configure.ac @@ -122,9 +122,33 @@ unsigned long val = SASL_CB_GETCONF; [Set to nonzero if your SASL implementation supports SASL_CB_GETCONF])]) ]) +dnl ********************************************************************** +dnl DETECT_SASL_CB_GETCONFPATH +dnl +dnl check if we can use SASL_CB_GETCONFPATH +dnl ********************************************************************** +AC_DEFUN([AC_C_DETECT_SASL_CB_GETCONFPATH], +[ + AC_CACHE_CHECK([for SASL_CB_GETCONFPATH], + [ac_cv_c_sasl_cb_getconfpath], + [AC_TRY_COMPILE( + [ +#include <sasl/sasl.h> + ], [ +unsigned long val = SASL_CB_GETCONFPATH; + ], + [ ac_cv_c_sasl_cb_getconfpath=yes ], + [ ac_cv_c_sasl_cb_getconfpath=no ]) + ]) + AS_IF([test "$ac_cv_c_sasl_cb_getconfpath" = "yes"], + [AC_DEFINE([HAVE_SASL_CB_GETCONFPATH], 1, + [Set to nonzero if your SASL implementation supports SASL_CB_GETCONFPATH])]) +]) + AC_CHECK_HEADERS([sasl/sasl.h]) if test "x$enable_sasl" = "xyes"; then AC_C_DETECT_SASL_CB_GETCONF + AC_C_DETECT_SASL_CB_GETCONFPATH AC_DEFINE([ENABLE_SASL],1,[Set to nonzero if you want to include SASL]) AC_SEARCH_LIBS([sasl_server_init], [sasl2 sasl], [], [ |