diff options
author | Remi Collet <remi@remirepo.net> | 2020-06-26 08:37:49 +0300 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-06-26 08:37:49 +0300 |
commit | a88186c293acbb6620398a321ec676a50741d52c (patch) | |
tree | e175f1016b71b39331d0ead1d4756d240c3c6edf /config.m4 | |
parent | f74207b092c62d6b4218cdb071ce35d9734c5cff (diff) |
use pkg-config for liblz4
Diffstat (limited to 'config.m4')
-rw-r--r-- | config.m4 | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -214,7 +214,18 @@ if test "$PHP_REDIS" != "no"; then if test "$PHP_REDIS_LZ4" != "no"; then AC_DEFINE(HAVE_REDIS_LZ4, 1, [ ]) - if test "$PHP_LIBLZ4" != "no"; then + + if test "$PHP_LIBLZ4" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists liblz4; then + AC_MSG_CHECKING(for liblz4 using pkg-config) + + LIBLZ4_VER=`$PKG_CONFIG liblz4 --modversion` + LIBLZ4_INC=`$PKG_CONFIG liblz4 --cflags` + LIBLZ4_LIB=`$PKG_CONFIG liblz4 --libs` + AC_MSG_RESULT(found version $LIBLZ4_VER) + PHP_EVAL_LIBLINE($LIBLZ4_LIB, REDIS_SHARED_LIBADD) + PHP_EVAL_INCLINE($LIBLZ4_INC) + + elif test "$PHP_LIBLZ4" != "no"; then AC_MSG_CHECKING(for liblz4 files in default path) for i in $PHP_LIBLZ4 /usr/local /usr; do if test -r $i/include/lz4.h; then |