Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 526526
Collapse All | Expand All

(-)file_not_specified_in_diff (-4 / +61 lines)
Line  Link Here
0
-- a/m4/curses.m4
0
++ b/m4/curses.m4
Lines 4-16 Link Here
4
], [curses="n"])
4
], [curses="n"])
5
AC_CHECK_HEADER([ncurses.h], [
5
AC_CHECK_HEADER([ncurses.h], [
6
    AC_CHECK_LIB([ncurses], [clear], [ncurses="y"], [ncurses="n"])
6
    AC_CHECK_LIB([ncurses], [clear], [ncurses="y"], [ncurses="n"])
7
    AC_SEARCH_LIBS([curs_set], tinfo ncurses, [CURSES_LIBS="$CURSES_LIBS $ac_res"])
7
], [ncurses="n"])
8
], [ncurses="n"])
8
AS_IF([test "$curses" = "n" && test "$ncurses" = "n"], [
9
AS_IF([test "$curses" = "n" && test "$ncurses" = "n"], [
9
    AC_MSG_ERROR([Unable to find a suitable curses library])
10
    AC_MSG_ERROR([Unable to find a suitable curses library])
10
])
11
])
11
# Prefer ncurses over curses if both are present
12
# Prefer ncurses over curses if both are present
12
AS_IF([test "$ncurses" = "y"], [
13
AS_IF([test "$ncurses" = "y"], [
13
    CURSES_LIBS="-lncurses"
14
    CURSES_LIBS="$CURSES_LIBS -lncurses"
14
    AC_DEFINE([INCLUDE_CURSES_H], [<ncurses.h>], [Define curses header to use])
15
    AC_DEFINE([INCLUDE_CURSES_H], [<ncurses.h>], [Define curses header to use])
15
], [
16
], [
16
    CURSES_LIBS="-lcurses"
17
    CURSES_LIBS="-lcurses"
17
-- a/tools/configure
18
++ a/tools/configure
Lines 7136-7141 Link Here
7136
  ncurses="n"
7136
  ncurses="n"
7137
fi
7137
fi
7138
7138
7139
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing curs_set" >&5
7140
$as_echo_n "checking for library containing curs_set... " >&6; }
7141
if ${ac_cv_search_curs_set+:} false; then :
7142
  $as_echo_n "(cached) " >&6
7143
else
7144
  ac_func_search_save_LIBS=$LIBS
7145
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7146
/* end confdefs.h.  */
7147
7148
/* Override any GCC internal prototype to avoid an error.
7149
   Use char because int might match the return type of a GCC
7150
   builtin and then its argument prototype would still apply.  */
7151
#ifdef __cplusplus
7152
extern "C"
7153
#endif
7154
char curs_set ();
7155
int
7156
main ()
7157
{
7158
return curs_set ();
7159
  ;
7160
  return 0;
7161
}
7162
_ACEOF
7163
for ac_lib in '' tinfo ncurses; do
7164
  if test -z "$ac_lib"; then
7165
    ac_res="none required"
7166
  else
7167
    ac_res=-l$ac_lib
7168
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7169
  fi
7170
  if ac_fn_c_try_link "$LINENO"; then :
7171
  ac_cv_search_curs_set=$ac_res
7172
fi
7173
rm -f core conftest.err conftest.$ac_objext \
7174
    conftest$ac_exeext
7175
  if ${ac_cv_search_curs_set+:} false; then :
7176
  break
7177
fi
7178
done
7179
if ${ac_cv_search_curs_set+:} false; then :
7180
7181
else
7182
  ac_cv_search_curs_set=no
7183
fi
7184
rm conftest.$ac_ext
7185
LIBS=$ac_func_search_save_LIBS
7186
fi
7187
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_curs_set" >&5
7188
$as_echo "$ac_cv_search_curs_set" >&6; }
7189
ac_res=$ac_cv_search_curs_set
7190
if test "$ac_res" != no; then :
7191
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7192
  CURSES_LIBS="$CURSES_LIBS $ac_res"
7193
fi
7194
7139
7195
7140
else
7196
else
7141
  ncurses="n"
7197
  ncurses="n"
Lines 7150-7156 Link Here
7150
# Prefer ncurses over curses if both are present
7206
# Prefer ncurses over curses if both are present
7151
if test "$ncurses" = "y"; then :
7207
if test "$ncurses" = "y"; then :
7152
7208
7153
    CURSES_LIBS="-lncurses"
7209
    CURSES_LIBS="$CURSES_LIBS -lncurses"
7154
7210
7155
$as_echo "#define INCLUDE_CURSES_H <ncurses.h>" >>confdefs.h
7211
$as_echo "#define INCLUDE_CURSES_H <ncurses.h>" >>confdefs.h
7156
7212

Return to bug 526526