Kouhei Sutou
null+****@clear*****
Mon Dec 15 14:43:01 JST 2014
Kouhei Sutou 2014-12-15 14:43:01 +0900 (Mon, 15 Dec 2014) New Revision: b296837c7701adc53073ef7ec9821328491b266e https://github.com/groonga/groonga/commit/b296837c7701adc53073ef7ec9821328491b266e Message: Use pkg-config to detect LZ4 Modified files: configure.ac lib/Makefile.am Modified: configure.ac (+15 -12) =================================================================== --- configure.ac 2014-12-15 14:35:20 +0900 (e64b85b) +++ configure.ac 2014-12-15 14:43:01 +0900 (b58e8ea) @@ -896,18 +896,21 @@ AC_ARG_WITH(lz4, [with_lz4="$withval"], [with_lz4="auto"]) if test "x$with_lz4" != "xno"; then - # TODO: Support custom LZ4 include and lib directory by --with-lz4. - AC_SEARCH_LIBS(LZ4_compress, lz4, - [ - GRN_WITH_LZ4=yes - AC_DEFINE(GRN_WITH_LZ4, [1], - [Support data compression by LZ4.]) - ], - [ - if test "x$with_lz4" != "xauto"; then - AC_MSG_ERROR("No liblz4 found") - fi - ]) + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([LIBLZ4], + [liblz4], + [GRN_WITH_LZ4=yes], + [GRN_WITH_LZ4=no]) + ], + [GRN_WITH_LZ4=no]) + if test "$GRN_WITH_LZ4" = "yes"; then + AC_DEFINE(GRN_WITH_LZ4, [1], + [Support data compression by LZ4.]) + else + if test "x$with_lz4" != "xauto"; then + AC_MSG_ERROR("No liblz4 found") + fi + fi fi # MeCab Modified: lib/Makefile.am (+4 -2) =================================================================== --- lib/Makefile.am 2014-12-15 14:35:20 +0900 (e52a41e) +++ lib/Makefile.am 2014-12-15 14:43:01 +0900 (2ca65ea) @@ -11,7 +11,8 @@ AM_CFLAGS = \ $(GRN_CFLAGS) \ $(MESSAGE_PACK_CFLAGS) \ $(MRUBY_CFLAGS) \ - $(ONIGMO_CFLAGS) + $(ONIGMO_CFLAGS) \ + $(LIBLZ4_CFLAGS) DEFAULT_INCLUDES = \ -I$(top_builddir) \ @@ -31,7 +32,8 @@ libgroonga_la_LIBADD = \ mrb/libgrnmrb.la \ $(MESSAGE_PACK_LIBS) \ $(MRUBY_LIBS) \ - $(ONIGMO_LIBS) + $(ONIGMO_LIBS) \ + $(LIBLZ4_LIBS) if WITH_LEMON BUILT_SOURCES = \ -------------- next part -------------- HTML����������������������������... Download