]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Try linking readline without ncurses first
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 15 May 2013 09:50:58 +0000 (11:50 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 15 May 2013 09:50:58 +0000 (11:50 +0200)
configure

index 7a4443a7bcfa3822708daf99c22543cf9421c56b..9966e86bae10ff72eee66fa02e1f038e5d714501 100755 (executable)
--- a/configure
+++ b/configure
@@ -482,6 +482,18 @@ if [ $feat_readline = "1" ]; then
 
   if [ "x$READLINE_LINK" = "x" ] && [ $try_readline = "1" ]; then
     if test_code readline 'stdio.h readline/readline.h readline/history.h' \
+      "$readline_inc" "$readline_lib $ncurses_lib -lreadline" \
+      'add_history(readline("prompt"));'
+    then
+      add_def FEAT_READLINE
+      READLINE_COMPILE="$readline_inc"
+      READLINE_LINK="$readline_lib $ncurses_lib -lreadline"
+    fi
+  fi
+
+  if [ "x$READLINE_LINK" = "x" ] && [ $try_readline = "1" ]; then
+    if test_code 'readline with -lncurses' \
+      'stdio.h readline/readline.h readline/history.h' \
       "$readline_inc" "$readline_lib $ncurses_lib -lreadline -lncurses" \
       'add_history(readline("prompt"));'
     then