IF(HIREDIS_LIBRARY_DIRS)
LINK_DIRECTORIES("${HIREDIS_LIBRARY_DIRS}")
ENDIF(HIREDIS_LIBRARY_DIRS)
+IF(HIREDIS_FOUND)
+ SET(WITH_SYSTEM_HIREDIS 1)
+ENDIF(HIREDIS_FOUND)
# Try to link with gmime24
IF(NOT GMIME2_FOUND OR FORCE_GMIME24)
#cmakedefine WITH_GPERF_TOOLS 1
+#cmakedefine WITH_SYSTEM_HIREDIS 1
+
#cmakedefine HAVE_ASM_PAUSE 1
#cmakedefine BUILD_STATIC 1
#include "lua_common.h"
#include "dns.h"
+
+#ifndef WITH_SYSTEM_HIREDIS
#include "hiredis.h"
#include "async.h"
#include "adapters/libevent.h"
+#else
+#include <hiredis/hiredis.h>
+#include <hiredis/async.h>
+#include <hiredis/adapters/libevent.h>
+#endif
+
/**
* Redis access API for lua from task object