diff options
Diffstat (limited to 'm4/want_lzma.m4')
-rw-r--r-- | m4/want_lzma.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/want_lzma.m4 b/m4/want_lzma.m4 new file mode 100644 index 0000000..7f67dea --- /dev/null +++ b/m4/want_lzma.m4 @@ -0,0 +1,20 @@ +AC_DEFUN([DOVECOT_WANT_LZMA], [ + AS_IF([test "$want_lzma" != "no"], [ + AC_CHECK_HEADER(lzma.h, [ + AC_CHECK_LIB(lzma, lzma_stream_decoder, [ + have_lzma=yes + have_compress_lib=yes + AC_DEFINE(HAVE_LZMA,, [Define if you have lzma library]) + COMPRESS_LIBS="$COMPRESS_LIBS -llzma" + ], [ + AS_IF([test "$want_lzma" = "yes"], [ + AC_ERROR([Can't build with lzma support: liblzma not found]) + ]) + ]) + ], [ + AS_IF([test "$want_lzma" = "yes"], [ + AC_ERROR([Can't build with lzma support: lzma.h not found]) + ]) + ]) + ]) +]) |