mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 01:30:42 +01:00
Update autoconf check for hiredis library: fall back to AC_SEARCH_LIBS and AC_COMPILE_IFELSE if PKG_CHECK_MODULES fails
This commit is contained in:
parent
a450d88d9f
commit
78cf31cecc
24
configure.ac
24
configure.ac
@ -1622,7 +1622,29 @@ AC_ARG_ENABLE(omhiredis,
|
||||
)
|
||||
#
|
||||
if test "x$enable_omhiredis" = "xyes"; then
|
||||
PKG_CHECK_MODULES(HIREDIS, hiredis >= 0.10.1)
|
||||
PKG_CHECK_MODULES(HIREDIS, hiredis >= 0.10.1, [],
|
||||
[AC_SEARCH_LIBS(redisConnectWithTimeout, hiredis,
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[ #include <hiredis/hiredis.h> ]],
|
||||
[[ #define major 0
|
||||
#define minor 10
|
||||
#define patch 1
|
||||
#if (( HIREDIS_MAJOR > major ) || \
|
||||
(( HIREDIS_MAJOR == major ) && ( HIREDIS_MINOR > minor )) || \
|
||||
(( HIREDIS_MAJOR == major ) && ( HIREDIS_MINOR == minor ) && ( HIREDIS_PATCH >= patch ))) \
|
||||
/* OK */
|
||||
#else
|
||||
# error Hiredis version must be >= major.minor.path
|
||||
#endif
|
||||
]]
|
||||
)],
|
||||
[],
|
||||
[AC_MSG_ERROR([hiredis version must be >= 0.10.1])]
|
||||
)],
|
||||
[AC_MSG_ERROR([hiredis not found])]
|
||||
)]
|
||||
)
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_OMHIREDIS, test x$enable_omhiredis = xyes)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user