Skip to content

Commit

Permalink
Better detection of sasl_callback_ft
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin authored and dormando committed Feb 2, 2012
1 parent c1c99c9 commit dece7f8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,33 @@ AH_BOTTOM([#ifdef HAVE_INTTYPES_H
#endif
])

dnl **********************************************************************
dnl Figure out if this system has the stupid sasl_callback_ft
dnl **********************************************************************

AC_DEFUN([AC_HAVE_SASL_CALLBACK_FT],
[AC_CACHE_CHECK(for sasl_callback_ft, ac_cv_has_sasl_callback_ft,
[
AC_TRY_COMPILE([
#ifdef HAVE_SASL_SASL_H
#include <sasl/sasl.h>
#include <sasl/saslplug.h>
#endif
],[
sasl_callback_ft a_callback;
],[
ac_cv_has_sasl_callback_ft=yes
],[
ac_cv_has_sasl_callback_ft=no
])
])
if test $ac_cv_has_sasl_callback_ft = yes; then
AC_DEFINE(HAVE_SASL_CALLBACK_FT, 1, [we have sasl_callback_ft])
fi
])

AC_HAVE_SASL_CALLBACK_FT

dnl **********************************************************************
dnl DETECT_UINT64_SUPPORT
dnl
Expand Down
2 changes: 1 addition & 1 deletion sasl_defs.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const char * const locations[] = {
};
#endif

#if SASL_VERSION_FULL < 0x20125
#ifndef HAVE_SASL_CALLBACK_FT
typedef int (*sasl_callback_ft)(void);
#endif

Expand Down

0 comments on commit dece7f8

Please sign in to comment.