diff options
Diffstat (limited to 'm4/want_lz4.m4')
-rw-r--r-- | m4/want_lz4.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/want_lz4.m4 b/m4/want_lz4.m4 new file mode 100644 index 0000000..9234030 --- /dev/null +++ b/m4/want_lz4.m4 @@ -0,0 +1,24 @@ +AC_DEFUN([DOVECOT_WANT_LZ4], [ + AS_IF([test "$want_lz4" != "no"], [ + AC_CHECK_HEADER(lz4.h, [ + AC_CHECK_LIB(lz4, LZ4_compress, [ + have_lz4=yes + have_compress_lib=yes + AC_DEFINE(HAVE_LZ4,, [Define if you have lz4 library]) + COMPRESS_LIBS="$COMPRESS_LIBS -llz4" + ], [ + AS_IF([test "$want_lz4" = "yes"], [ + AC_ERROR([Can't build with lz4 support: liblz4 not found]) + ]) + ]) + AC_CHECK_LIB(lz4, LZ4_compress_default, [ + AC_DEFINE(HAVE_LZ4_COMPRESS_DEFAULT,, + [Define if you have LZ4_compress_default]) + ]) + ], [ + AS_IF([test "$want_lz4" = "yes"], [ + AC_ERROR([Can't build with lz4 support: lz4.h not found]) + ]) + ]) + ]) +]) |