[Groonga-commit] groonga/groonga at a8462b3 [master] Enable zlib and LZ4 if they are available by default

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 28 12:03:43 JST 2014


Kouhei Sutou	2014-10-28 12:03:43 +0900 (Tue, 28 Oct 2014)

  New Revision: a8462b3dd7f80213375aa3caff820ef056287460
  https://github.com/groonga/groonga/commit/a8462b3dd7f80213375aa3caff820ef056287460

  Message:
    Enable zlib and LZ4 if they are available by default
    
    zlib and LZ4 support are experimental but their features aren't used
    unless users use `COMPRESS_ZLIB` or `COMPRESS_LZ4` flag explicitly. So
    we enable them (if they are available) by default.

  Modified files:
    configure.ac

  Modified: configure.ac (+30 -13)
===================================================================
--- configure.ac    2014-10-26 23:33:37 +0900 (865654d)
+++ configure.ac    2014-10-28 12:03:43 +0900 (1277816)
@@ -867,28 +867,45 @@ fi
 # zlib
 AC_ARG_WITH(zlib,
   [AS_HELP_STRING([--with-zlib],
-    [use zlib for data compression. [default=no]])],
+    [Support data compression by zlib. [default=auto]])],
   [with_zlib="$withval"],
-  [with_zlib="no"])
+  [with_zlib="auto"])
 GRN_WITH_ZLIB=no
-if test "x$with_zlib" = "xyes"; then
-  AC_DEFINE(GRN_WITH_ZLIB, [1], [with zlib])
-  AC_SEARCH_LIBS(compress, z, [GRN_WITH_ZLIB=yes],
-                 [AC_MSG_ERROR("No libz found")])
-else
-  AC_SEARCH_LIBS(compress, z, [GRN_WITH_ZLIB=yes], [])
+if test "x$with_zlib" != "xno"; then
+  # TODO: Support custom zlib include and lib directory by --with-zlib.
+  AC_SEARCH_LIBS(compress, z,
+                 [
+                   GRN_WITH_ZLIB=yes
+                   AC_DEFINE(GRN_WITH_ZLIB, [1],
+                             [Support data compression by zlib.])
+                 ],
+                 [
+                   if test "x$with_zlib" != "xauto"; then
+                     AC_MSG_ERROR("No libz found")
+                   fi
+                 ])
 fi
 AC_SUBST(GRN_WITH_ZLIB)
 
 # LZ4
 AC_ARG_WITH(lz4,
   [AS_HELP_STRING([--with-lz4],
-    [use LZ4 for data compression. [default=no]])],
+    [Support data compression by LZ4. [default=auto]])],
   [with_lz4="$withval"],
-  [with_lz4="no"])
-if test "x$with_lz4" = "xyes"; then
-  AC_DEFINE(GRN_WITH_LZ4, [1], [with lz4])
-  AC_SEARCH_LIBS(LZ4_compress, lz4, [], [AC_MSG_ERROR("No liblz4 found")])
+  [with_lz4="auto"])
+if test "x$with_lz4" != "xno"; then
+  # TODO: Support custom zlib include and lib directory by --with-zlib.
+  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 libz found")
+                   fi
+                 ])
 fi
 
 # MeCab
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index