Patchwork [09/20] Add curses to new feature convencion

login
register
mail settings
Submitter Juan Quintela
Date Aug. 12, 2009, 4:20 p.m.
Message ID <e7beff89148a69a38d0fcd0cb68ac414868d377b.1250093910.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31210/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 12, 2009, 4:20 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

Patch

diff --git a/configure b/configure
index cd2f1e1..1efe412 100755
--- a/configure
+++ b/configure
@@ -180,6 +180,7 @@  esac
 # --enable-foo that exits if feature is not found

 brlapi=""
+curses=""
 vde=""
 vnc_tls=""
 vnc_sasl=""
@@ -209,7 +210,6 @@  bsd_user="no"
 guest_base=""
 build_docs="yes"
 uname_release=""
-curses="yes"
 curl="yes"
 pthread="yes"
 aio="yes"
@@ -519,6 +519,8 @@  for opt do
   ;;
   --disable-curses) curses="no"
   ;;
+  --enable-curses) curses="yes"
+  ;;
   --disable-curl) curl="no"
   ;;
   --disable-nptl) nptl="no"
@@ -648,6 +650,7 @@  echo "  --enable-vnc-tls         enable TLS encryption for VNC server"
 echo "  --disable-vnc-sasl       disable SASL encryption for VNC server"
 echo "  --enable-vnc-sasl        enable SASL encryption for VNC server"
 echo "  --disable-curses         disable curses output"
+echo "  --enable-curses          enable curses output"
 echo "  --disable-curl           disable curl connectivity"
 echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
@@ -1130,8 +1133,8 @@  fi
 # curses probe
 curses_list="-lncurses -lcurses"

-if test "$curses" = "yes" ; then
-  curses=no
+if test "$curses" != "no" ; then
+  curses_found=no
   cat > $TMPC << EOF
 #include <curses.h>
 #ifdef __OpenBSD__
@@ -1141,11 +1144,19 @@  int main(void) { resize_term(0, 0); return curses_version(); }
 EOF
   for curses_lib in $curses_list; do
     if compile_prog "" "$curses_lib" ; then
-      curses=yes
+      curses_found=yes
       libs_softmmu="$curses_lib $libs_softmmu"
       break
     fi
   done
+  if test "$curses_found" = "yes" ; then
+    curses=yes
+  else
+    if test "$curses" = "yes" ; then
+      feature_not_found "curses"
+    fi
+    curses=no
+  fi
 fi

 ##########################################