projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configure: cope with hiredis without pkg-config
[yaz-moved-to-github.git]
/
configure.ac
diff --git
a/configure.ac
b/configure.ac
index
049b3ca
..
0a63754
100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-97,6
+97,7
@@
hiredis=default
AC_SUBST([HIREDIS_LIBS])
AC_ARG_WITH([redis], [ --with-redis hiredis library], [hiredis=$withval])
if test "$hiredis" != "no" -a "$pkgconfigpath" != "NONE"; then
AC_SUBST([HIREDIS_LIBS])
AC_ARG_WITH([redis], [ --with-redis hiredis library], [hiredis=$withval])
if test "$hiredis" != "no" -a "$pkgconfigpath" != "NONE"; then
+ AC_CHECK_LIB([hiredis],[redisCommandArgv],[HIREDIS_LIBS=-lhiredis])
AC_MSG_CHECKING([for redis])
if $pkgconfigpath --cflags hiredis >/dev/null 2>&1 ; then
if $pkgconfigpath --atleast-version 0.10 hiredis; then
AC_MSG_CHECKING([for redis])
if $pkgconfigpath --cflags hiredis >/dev/null 2>&1 ; then
if $pkgconfigpath --atleast-version 0.10 hiredis; then
@@
-111,9
+112,14
@@
if test "$hiredis" != "no" -a "$pkgconfigpath" != "NONE"; then
fi
fi
else
fi
fi
else
- AC_MSG_RESULT([no])
- if test "$hiredis" != "default"; then
- AC_MSG_ERROR([hiredis libraries missing])
+ if test "$ac_cv_lib_hiredis_redisCommandArgv" = "yes"; then
+ AC_DEFINE([HAVE_HIREDIS],[1])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ if test "$hiredis" != "default"; then
+ AC_MSG_ERROR([hiredis libraries missing])
+ fi
fi
fi
fi
fi
fi
fi