diff -Naur a/configure b/configure
--- a/configure	2016-11-16 05:11:30.000000000 -0800
+++ b/configure	2021-04-17 14:18:59.000000000 +0000
@@ -55428,7 +55428,7 @@
 	fi
         readline_ld_flags="-L$readline_prefix/lib"
         if test -z "$readline_lib_flags"; then
-            readline_lib_flags="-lreadline"
+            readline_lib_flags="-lreadline -lncurses"
         fi
         run_readline_test="yes"
     elif test "$readline_requested" = "yes"; then
