OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../xen-tools/xen-tools_tinfo.patch
  5. # Copyright (C) 2015 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- a/m4/curses.m4
  17. +++ b/m4/curses.m4
  18. @@ -4,13 +4,14 @@
  19. ], [curses="n"])
  20. AC_CHECK_HEADER([ncurses.h], [
  21. AC_CHECK_LIB([ncurses], [clear], [ncurses="y"], [ncurses="n"])
  22. + AC_SEARCH_LIBS([curs_set], tinfo ncurses, [CURSES_LIBS="$CURSES_LIBS $ac_res"])
  23. ], [ncurses="n"])
  24. AS_IF([test "$curses" = "n" && test "$ncurses" = "n"], [
  25. AC_MSG_ERROR([Unable to find a suitable curses library])
  26. ])
  27. # Prefer ncurses over curses if both are present
  28. AS_IF([test "$ncurses" = "y"], [
  29. - CURSES_LIBS="-lncurses"
  30. + CURSES_LIBS="$CURSES_LIBS -lncurses"
  31. AC_DEFINE([INCLUDE_CURSES_H], [<ncurses.h>], [Define curses header to use])
  32. ], [
  33. CURSES_LIBS="-lcurses"
  34. --- a/tools/configure
  35. +++ a/tools/configure
  36. @@ -7136,6 +7136,62 @@
  37. ncurses="n"
  38. fi
  39. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing curs_set" >&5
  40. +$as_echo_n "checking for library containing curs_set... " >&6; }
  41. +if ${ac_cv_search_curs_set+:} false; then :
  42. + $as_echo_n "(cached) " >&6
  43. +else
  44. + ac_func_search_save_LIBS=$LIBS
  45. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  46. +/* end confdefs.h. */
  47. +
  48. +/* Override any GCC internal prototype to avoid an error.
  49. + Use char because int might match the return type of a GCC
  50. + builtin and then its argument prototype would still apply. */
  51. +#ifdef __cplusplus
  52. +extern "C"
  53. +#endif
  54. +char curs_set ();
  55. +int
  56. +main ()
  57. +{
  58. +return curs_set ();
  59. + ;
  60. + return 0;
  61. +}
  62. +_ACEOF
  63. +for ac_lib in '' tinfo ncurses; do
  64. + if test -z "$ac_lib"; then
  65. + ac_res="none required"
  66. + else
  67. + ac_res=-l$ac_lib
  68. + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
  69. + fi
  70. + if ac_fn_c_try_link "$LINENO"; then :
  71. + ac_cv_search_curs_set=$ac_res
  72. +fi
  73. +rm -f core conftest.err conftest.$ac_objext \
  74. + conftest$ac_exeext
  75. + if ${ac_cv_search_curs_set+:} false; then :
  76. + break
  77. +fi
  78. +done
  79. +if ${ac_cv_search_curs_set+:} false; then :
  80. +
  81. +else
  82. + ac_cv_search_curs_set=no
  83. +fi
  84. +rm conftest.$ac_ext
  85. +LIBS=$ac_func_search_save_LIBS
  86. +fi
  87. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_curs_set" >&5
  88. +$as_echo "$ac_cv_search_curs_set" >&6; }
  89. +ac_res=$ac_cv_search_curs_set
  90. +if test "$ac_res" != no; then :
  91. + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  92. + CURSES_LIBS="$CURSES_LIBS $ac_res"
  93. +fi
  94. +
  95. else
  96. ncurses="n"
  97. @@ -7150,7 +7206,7 @@
  98. # Prefer ncurses over curses if both are present
  99. if test "$ncurses" = "y"; then :
  100. - CURSES_LIBS="-lncurses"
  101. + CURSES_LIBS="$CURSES_LIBS -lncurses"
  102. $as_echo "#define INCLUDE_CURSES_H <ncurses.h>" >>confdefs.h