Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Disable liblzma if --enable-liblzma=no |
| 2 | |
| 3 | Upstream-Status: Inappropriate [configuration] |
| 4 | |
| 5 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> |
| 6 | |
| 7 | --- a/configure.ac |
| 8 | +++ b/configure.ac |
| 9 | @@ -1029,10 +1029,20 @@ fi |
| 10 | |
| 11 | AC_SUBST([LIBGEOM]) |
| 12 | |
| 13 | -AC_CHECK_LIB([lzma], [lzma_code], |
| 14 | - [LIBLZMA="-llzma" |
| 15 | - AC_DEFINE([HAVE_LIBLZMA], [1], |
| 16 | - [Define to 1 if you have the LZMA library.])],) |
| 17 | +AC_ARG_ENABLE([liblzma], |
| 18 | + [AS_HELP_STRING([--enable-liblzma], |
| 19 | + [enable liblzma integration (default=guessed)])]) |
| 20 | +if test x"$enable_liblzma" = xno ; then |
| 21 | + liblzma_excuse="explicitly disabled" |
| 22 | +fi |
| 23 | + |
| 24 | +if test x"$liblzma_excuse" = x ; then |
| 25 | + AC_CHECK_LIB([lzma], [lzma_code], |
| 26 | + [LIBLZMA="-llzma" |
| 27 | + AC_DEFINE([HAVE_LIBLZMA], [1], |
| 28 | + [Define to 1 if you have the LZMA library.])],) |
| 29 | +fi |
| 30 | + |
| 31 | AC_SUBST([LIBLZMA]) |
| 32 | |
| 33 | AC_ARG_ENABLE([libzfs], |