File configure-restore-readline-test-fallback.patch of Package iwd
From: Michal Kubecek <mkubecek@suse.cz>
Date: Mon, 24 Jul 2023 13:44:16 +0200
Subject: configure: restore readline test fallback
Patch-mainline: Never, Leap 15 build hack
References: none
Restore the fallback to "-lreadline" in case pkgconfig check for readline
library fails because readline library is available but lacking the
pkgconfig files.
Fixes: 8f0420c533ae ("build: Allow building with libedit instead readline")
---
configure | 4 ++--
configure.ac | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/configure
+++ b/configure
@@ -13977,11 +13977,11 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$READLINE_PKG_ERRORS" >&5
- as_fn_error $? "Readline library is required" "$LINENO" 5
+ READLINE_LIBS=-lreadline
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- as_fn_error $? "Readline library is required" "$LINENO" 5
+ READLINE_LIBS=-lreadline
else
READLINE_CFLAGS=$pkg_cv_READLINE_CFLAGS
READLINE_LIBS=$pkg_cv_READLINE_LIBS
--- a/configure.ac
+++ b/configure.ac
@@ -188,7 +188,7 @@ if (test "${enable_client}" != "no"); then
AC_SUBST(LIBEDIT_LIBS)
else
PKG_CHECK_MODULES(READLINE, readline, dummy=yes,
- AC_MSG_ERROR(Readline library is required))
+ READLINE_LIBS=-lreadline)
AC_SUBST(READLINE_CFLAGS)
AC_SUBST(READLINE_LIBS)
fi