diff --git a/configure.ac b/configure.ac
index c6710041cb5c631f50041f73f1e2f662b1dc7109..4d7ccaece38ca902af25d737637652931599779d 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_MSG_RESULT([$have_struct_ucred])
fi
AC_MSG_RESULT([$have_struct_ucred])
fi
+dnl Only check this after potentially defining _GNU_SOURCE.
+AC_FUNC_STRERROR_R
+
dnl Testing.
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],
[unit_tests="yes"], [unit_tests="no"])
dnl Testing.
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],
[unit_tests="yes"], [unit_tests="no"])
if test "x$with_libyajl" = "xyes" || test "x$with_libyajl" = "xauto"; then
PKG_CHECK_MODULES([YAJL], [yajl], [have_libyajl="yes"], [have_libyajl="no"])
fi
if test "x$with_libyajl" = "xyes" || test "x$with_libyajl" = "xauto"; then
PKG_CHECK_MODULES([YAJL], [yajl], [have_libyajl="yes"], [have_libyajl="no"])
fi
-if test "x$with_libyajl" = "xyes"; then
+if test "x$have_libyajl" = "xyes"; then
AC_DEFINE([HAVE_LIBYAJL], 1, [Define to 1 if you have the 'yajl' library.])
fi
AC_DEFINE([HAVE_LIBYAJL], 1, [Define to 1 if you have the 'yajl' library.])
fi