@@ -2587,6 +2587,16 @@ AC_ARG_ENABLE(redis_tests,
25872587)
25882588AM_CONDITIONAL(ENABLE_REDIS_TESTS, test x$enable_redis_tests = xyes)
25892589
2590+ AC_ARG_ENABLE ( redis_ssl ,
2591+ [ AS_HELP_STRING ( [ --enable-redis-ssl] ,[ Enable redis ssl support @<:@ default=no@:>@ ] ) ] ,
2592+ [ case "${enableval}" in
2593+ yes) enable_redis_ssl="yes" ;;
2594+ no) enable_redis_ssl="no" ;;
2595+ *) AC_MSG_ERROR ( bad value ${enableval} for -- enable-redis-ssl ) ;;
2596+ esac] ,
2597+ [ enable_redis_ssl=no]
2598+ )
2599+
25902600if test "x$enable_omhiredis" = "xyes" -o "x$enable_imhiredis" = "xyes" ; then
25912601 PKG_CHECK_MODULES(HIREDIS, hiredis >= 0.10.1, [ ] ,
25922602 [ AC_SEARCH_LIBS ( redisConnectWithTimeout , hiredis ,
@@ -2611,35 +2621,38 @@ if test "x$enable_omhiredis" = "xyes" -o "x$enable_imhiredis" = "xyes" ; then
26112621 [ AC_MSG_ERROR ( [ hiredis not found] ) ]
26122622 ) ]
26132623 )
2614- PKG_CHECK_MODULES(HIREDIS_SSL, hiredis_ssl >= 0.10.1,
2615- # hiredis_ssl found
2616- [
2617- AC_DEFINE ( HIREDIS_SSL , 1 , [ TLS support enabled in hiredis] )
2618- ] ,
2619- [ AC_SEARCH_LIBS ( redisCreateSSLContext , hiredis_ssl ,
2620- [ AC_COMPILE_IFELSE (
2621- [ AC_LANG_PROGRAM (
2622- [ [ #include <hiredis/hiredis.h>
2623- #include <hiredis/hiredis_ssl.h>
2624- ] ] ,
2625- [ [ #define major 0
2626- #define minor 10
2627- #define patch 1
2628- #if (( HIREDIS_MAJOR > major ) || \
2629- (( HIREDIS_MAJOR == major ) && ( HIREDIS_MINOR > minor )) || \
2630- (( HIREDIS_MAJOR == major ) && ( HIREDIS_MINOR == minor ) && ( HIREDIS_PATCH >= patch ))) \
2631- /* OK */
2632- #else
2633- # error Hiredis_ssl version must be >= major.minor.path
2634- #endif
2635- ] ]
2636- ) ] ,
2637- [ ] ,
2638- [ AC_MSG_ERROR ( [ hiredis_ssl version must be >= 0.10.1] ) ]
2639- ) ] ,
2640- [ AC_MSG_WARN ( [ hiredis_ssl not found, no TLS support in hiredis] ) ]
2641- ) ]
2642- )
2624+ if test "x$enable_redis_ssl" = "xyes"; then
2625+ PKG_CHECK_MODULES(HIREDIS_SSL, hiredis_ssl >= 0.10.1,
2626+ # hiredis_ssl found
2627+ [
2628+ AC_DEFINE ( HIREDIS_SSL , 1 , [ TLS support enabled in hiredis] )
2629+ ] ,
2630+ [ AC_SEARCH_LIBS ( redisCreateSSLContext , hiredis_ssl ,
2631+ [ AC_COMPILE_IFELSE (
2632+ [ AC_LANG_PROGRAM (
2633+ [ [ #include <hiredis/hiredis.h>
2634+ #include <hiredis/hiredis_ssl.h>
2635+ ] ] ,
2636+ [ [ #define major 0
2637+ #define minor 10
2638+ #define patch 1
2639+ #if (( HIREDIS_MAJOR > major ) || \
2640+ (( HIREDIS_MAJOR == major ) && ( HIREDIS_MINOR > minor )) || \
2641+ (( HIREDIS_MAJOR == major ) && ( HIREDIS_MINOR == minor ) && ( HIREDIS_PATCH >= patch ))) \
2642+ /* OK */
2643+ #else
2644+ # error Hiredis_ssl version must be >= major.minor.path
2645+ #endif
2646+ ] ]
2647+ ) ] ,
2648+ [ ] ,
2649+ [ AC_MSG_ERROR ( [ hiredis_ssl version must be >= 0.10.1] ) ]
2650+ ) ] ,
2651+ [ AC_MSG_WARN ( [ hiredis_ssl not found, no TLS support in hiredis] ) ]
2652+ ) ]
2653+ )
2654+ fi
2655+
26432656fi
26442657
26452658if test "x$enable_imhiredis" = "xyes" ; then
@@ -2958,6 +2971,7 @@ echo " kafka static linking enabled: $enable_kafka_static"
29582971echo " qpid proton static linking enabled: $enable_qpidproton_static"
29592972echo " atomic operations enabled: $enable_atomic_operations"
29602973echo " libcap-ng support enabled: $enable_libcapng"
2974+ echo " redis ssl support enabled: $enable_redis_ssl"
29612975
29622976echo
29632977echo "---{ input plugins }---"
0 commit comments