summaryrefslogtreecommitdiffstats
path: root/m4/want_lzma.m4
blob: 7f67dea700c002a79ac5f3ee5d549e3d157b127d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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])
      ])
    ])
  ])
])