From: vincent@systemli.org
To: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] configure.ac: fix cross compilation
Date: Mon, 4 Jul 2022 11:29:19 +0200 [thread overview]
Message-ID: <20220704092919.1420469-1-vincent@systemli.org> (raw)
From: Nick Hainke <vincent@systemli.org>
AC_CHECK_LIB seems to not work correctly with OpenWrt. Add possibility
to disable lz4 and lzo2 manually.
Fixes errors in the form of:
Package f2fsck is missing dependencies for the following libraries:
liblz4.so.1
liblzo2.so.2
Signed-off-by: Nick Hainke <vincent@systemli.org>
---
configure.ac | 44 ++++++++++++++++++++++++++++++++++----------
1 file changed, 34 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index ea39461..dbe9ad3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,18 @@ AC_ARG_WITH([blkid],
[],
[with_blkid=check])
+AC_ARG_WITH([lzo2],
+ [AS_HELP_STRING([--without-lzo2],
+ [Ignore presence of liblzo2 and disable lzo2 support])],
+ [],
+ [with_lzo2=check])
+
+AC_ARG_WITH([lz4],
+ [AS_HELP_STRING([--without-lz4],
+ [Ignore presence of liblz4 and disable lz4 support])],
+ [],
+ [with_lz4=check])
+
# Checks for programs.
AC_PROG_CC
AM_PROG_AR
@@ -71,17 +83,29 @@ AS_IF([test "x$with_blkid" != xno],
fi
], -lblkid)])
-AC_CHECK_LIB([lzo2], [main],
- [AC_SUBST([liblzo2_LIBS], ["-llzo2"])
- AC_DEFINE([HAVE_LIBLZO2], [1],
- [Define if you have liblzo2])
- ], [], [])
+AS_IF([test "x$with_lzo2" != xno],
+ [AC_CHECK_LIB([lzo2], [main],
+ [AC_SUBST([liblzo2_LIBS], ["-llzo2"])
+ AC_DEFINE([HAVE_LIBLZO2], [1],
+ [Define if you have liblzo2])
+ ],
+ [if test "x$with_lzo2" != xcheck; then
+ AC_MSG_FAILURE(
+ [--with-lzo2 was given, but test for lzo2 failed])
+ fi
+ ], -llzo2)])
-AC_CHECK_LIB([lz4], [main],
- [AC_SUBST([liblz4_LIBS], ["-llz4"])
- AC_DEFINE([HAVE_LIBLZ4], [1],
- [Define if you have liblz4])
- ], [], [])
+AS_IF([test "x$with_lz4" != xno],
+ [AC_CHECK_LIB([lz4], [main],
+ [AC_SUBST([liblz4_LIBS], ["-llz4"])
+ AC_DEFINE([HAVE_LIBLZ4], [1],
+ [Define if you have liblz4])
+ ],
+ [if test "x$with_lz4" != xcheck; then
+ AC_MSG_FAILURE(
+ [--with-lz4 was given, but test for lz4 failed])
+ fi
+ ], -llz4)])
AS_IF([test "x$with_selinux" != xno],
[AC_CHECK_LIB([selinux], [getcon],
--
2.37.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
reply other threads:[~2022-07-04 9:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220704092919.1420469-1-vincent@systemli.org \
--to=vincent@systemli.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).