Skip to content

Commit

Permalink
Build: Define HAVE_MICROLZMA when it is configured.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaT75 committed Feb 23, 2024
1 parent eea7821 commit adaacaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,10 @@ if(MICROLZMA_DECODER)
target_sources(liblzma PRIVATE src/liblzma/common/microlzma_decoder.c)
endif()

if (MICROLZMA_ENCODER OR MICROLZMA_DECODER)
add_compile_definitions(HAVE_MICROLZMA)
endif()


#############################
# lzip (.lz) format support #
Expand Down
9 changes: 7 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,13 @@ AC_ARG_ENABLE([microlzma], AS_HELP_STRING([--disable-microlzma],
for example, erofs-utils.]),
[], [enable_microlzma=yes])
case $enable_microlzma in
yes | no)
AC_MSG_RESULT([$enable_microlzma])
yes)
AC_DEFINE([HAVE_MICROLZMA], [1],
[Define to 1 if MicroLZMA support is enabled.])
AC_MSG_RESULT([yes])
;;
no)
AC_MSG_RESULT([no])
;;
*)
AC_MSG_RESULT([])
Expand Down

0 comments on commit adaacaf

Please sign in to comment.