openbsd-ports/sysutils/xdelta/patches/patch-xdelta3_configure_ac
stsp f1a04f8b7f Enable LZMA as a secondary compression algorithm in sysutils/xdelta.
liblzma could already have been picked up as a hidden dependency.
Make this dependency explicit and enable the feature.

Get rid of a commented CONFIGURE_STYLE while here, by Kurt's request.

ok kmos@
2022-07-25 08:23:26 +00:00

20 lines
627 B
Plaintext

Index: xdelta3/configure.ac
--- xdelta3/configure.ac.orig
+++ xdelta3/configure.ac
@@ -22,7 +22,15 @@ AC_ARG_WITH(
[USE_LIBLZMA=$withval],
[USE_LIBLZMA=auto])
+AC_PATH_PROG(PKG_CONFIG, pkg-config)
+
if test "x$USE_LIBLZMA" != xno ; then
+ if test -n "$PKG_CONFIG"; then
+ LZMA_CFLAGS="`$PKG_CONFIG --cflags liblzma`"
+ CFLAGS="$CFLAGS $LZMA_CFLAGS"
+ LZMA_LDFLAGS="`$PKG_CONFIG --libs liblzma`"
+ LDFLAGS="$LDFLAGS $LZMA_LDFLAGS"
+ fi
AC_CHECK_HEADERS([lzma.h],,[
if test "x$with_liblzma" = xyes ; then
AC_MSG_FAILURE([liblzma includes were not found])