diff -Naur a/configure b/configure
--- a/configure	2016-11-16 05:11:30.000000000 -0800
+++ b/configure	2016-11-19 11:21:25.384243165 -0800
@@ -48854,7 +48854,7 @@
 	    readline_include_dir="$readline_include_dir/readline"
 	fi
         readline_ld_flags="-L$readline_prefix/lib"
-        readline_lib_flags="-lreadline"
+        readline_lib_flags="-lreadline -lncurses"
         run_readline_test="yes"
     elif test "$readline_requested" = "yes"; then
         if test -n "$readline_include_dir" -a -n "$readline_lib_flags"; then
