[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1 of 3] imported patch add_ncurses_autoconf



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1329928648 -3600
# Node ID 6e86cecd06046b53373b3cbe756d6a9981ff73d3
# Parent  caf03354472676522f7407a80ad5bec3963a90a9
imported patch add_ncurses_autoconf

diff -r caf033544726 -r 6e86cecd0604 tools/configure
--- a/tools/configure   Wed Feb 22 17:37:28 2012 +0100
+++ b/tools/configure   Wed Feb 22 17:37:28 2012 +0100
@@ -3907,6 +3907,8 @@ case $host_os in *\ *) host_os=`echo "$h
 # PKG_CHECK_MODULES
 
 
+
+
 # Enable/disable options
 # Check whether --enable-xsm was given.
 if test "${enable_xsm+set}" = set; then :
@@ -6380,6 +6382,118 @@ if test "$libuuid" != "y"; then :
 fi
 
 
+ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" 
"$ac_includes_default"
+if test "x$ac_cv_header_curses_h" = x""yes; then :
+  cursesh="y"
+else
+  cursesh="n"
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" 
"$ac_includes_default"
+if test "x$ac_cv_header_ncurses_h" = x""yes; then :
+  ncursesh="y"
+else
+  ncursesh="n"
+fi
+
+
+if test "$cursesh" = "n" && test "$ncursesh" = "n"; then :
+
+    as_fn_error $? "Unable to find a suitable curses header" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clear in -lcurses" >&5
+$as_echo_n "checking for clear in -lcurses... " >&6; }
+if test "${ac_cv_lib_curses_clear+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurses  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clear ();
+int
+main ()
+{
+return clear ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_curses_clear=yes
+else
+  ac_cv_lib_curses_clear=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_clear" >&5
+$as_echo "$ac_cv_lib_curses_clear" >&6; }
+if test "x$ac_cv_lib_curses_clear" = x""yes; then :
+  curses="y"
+else
+  curses="n"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clear in -lncurses" >&5
+$as_echo_n "checking for clear in -lncurses... " >&6; }
+if test "${ac_cv_lib_ncurses_clear+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lncurses  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clear ();
+int
+main ()
+{
+return clear ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ncurses_clear=yes
+else
+  ac_cv_lib_ncurses_clear=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_clear" >&5
+$as_echo "$ac_cv_lib_ncurses_clear" >&6; }
+if test "x$ac_cv_lib_ncurses_clear" = x""yes; then :
+  ncurses="y"
+else
+  ncurses="n"
+fi
+
+if test "$curses" = "n" && test "$ncurses" = "n"; then :
+
+    as_fn_error $? "Unable to find a suitable curses library" "$LINENO" 5
+
+fi
+
+
 
 
 
diff -r caf033544726 -r 6e86cecd0604 tools/configure.ac
--- a/tools/configure.ac        Wed Feb 22 17:37:28 2012 +0100
+++ b/tools/configure.ac        Wed Feb 22 17:37:28 2012 +0100
@@ -33,6 +33,7 @@ m4_include([m4/default_lib.m4])
 m4_include([m4/set_cflags_ldflags.m4])
 m4_include([m4/uuid.m4])
 m4_include([m4/pkg.m4])
+m4_include([m4/curses.m4])
 
 # Enable/disable options
 AX_ARG_ENABLE_AND_EXPORT([xsm],
@@ -102,6 +103,7 @@ AS_IF([test "x$pythontools" = "xy"], [
 ])
 AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext])
 AX_CHECK_UUID
+AX_CHECK_CURSES
 PKG_CHECK_MODULES(glib, glib-2.0)
 
 # Check library path

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.