configure.ac: fix AC_ARG_WITH
PATCH 1/1 configure.ac: fix AC_ARG_WITH
From: Nick Hainke <[email protected]>
In the new version the configuration no longer respects the --without/--with blkid/selinux parameters. Add the tests for "with_blkid" and "with_selinux" back to configure.ac as described in the manual.
Fixes c48335416a09 ("configure.ac: Enable cross-compilation")
Signed-off-by Nick Hainke <[email protected]>
--- configure.ac | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)
configure.ac +22 -10
@@ -55,11 +55,17 @@ AC_PATH_PROG([LDCONFIG], [ldconfig], [$PATH:/sbin]) # Checks for libraries. -AC_CHECK_LIB([blkid], [blkid_probe_all], - [AC_SUBST([libblkid_LIBS], ["-lblkid"]) - AC_DEFINE([HAVE_LIBBLKID], [1], - [Define if you have libblkid]) - ], [], []) +AS_IF([test "x$with_blkid" != xno], + [AC_CHECK_LIB([blkid], [blkid_probe_all], + [AC_SUBST([libblkid_LIBS], ["-lblkid"]) + AC_DEFINE([HAVE_LIBBLKID], [1], + [Define if you have libblkid]) + ], + [if test "x$with_blkid" != xcheck; then + AC_MSG_FAILURE( + [--with-blkid was given, but test for blkid failed]) + fi + ], -lblkid)]) AC_CHECK_LIB([lzo2], [main], [AC_SUBST([liblzo2_LIBS], ["-llzo2"])
@@ -73,11 +79,17 @@ AC_CHECK_LIB([lz4], [main], [Define if you have liblz4]) ], [], []) -AC_CHECK_LIB([selinux], [getcon], - [AC_SUBST([libselinux_LIBS], ["-lselinux"]) - AC_DEFINE([HAVE_LIBSELINUX], [1], - [Define if you have libselinux]) - ], [], []) +AS_IF([test "x$with_selinux" != xno], + [AC_CHECK_LIB([selinux], [getcon], + [AC_SUBST([libselinux_LIBS], ["-lselinux"]) + AC_DEFINE([HAVE_LIBSELINUX], [1], + [Define if you have libselinux]) + ], + [if test "x$with_selinux" != xcheck; then + AC_MSG_FAILURE( + [--with-selinux was given, but test for selinux failed]) + fi + ], -lselinux)]) AC_CHECK_LIB([uuid], [uuid_clear], [AC_SUBST([libuuid_LIBS], ["-luuid"])
Signature · 8 lines
2.36.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel