]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
added use-default-colors...
authorRogier Wolff <R.E.Wolff@BitWizard.nl>
Mon, 29 Dec 2014 08:22:46 +0000 (09:22 +0100)
committerRogier Wolff <R.E.Wolff@BitWizard.nl>
Mon, 29 Dec 2014 08:22:46 +0000 (09:22 +0100)
configure.ac
curses.c

index d5d1b0e7be25993cc06a51b3f99022bc9c4d6a8e..7199781cc734752c3392dcb95cc8f3ac106341d9 100644 (file)
@@ -34,6 +34,9 @@ AC_CHECK_FUNC(initscr, ,
        AC_DEFINE(NO_CURSES, 1, Define if you don't have the curses libraries available.)
        CURSES_OBJ=))))
 
+AC_CHECK_LIB(ncurses, use_default_colors, 
+  AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors() command.]))
+
 AC_CHECK_FUNCS(attron fcntl)
 
 AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
index 3904cb16b689ec999f45a6ce506750514696e633..02b79376c680fbbd30f0a4ce673741f2e08ea76c 100644 (file)
--- a/curses.c
+++ b/curses.c
@@ -701,6 +701,9 @@ void mtr_curses_open(void)
   raw();
   noecho(); 
   start_color();
+#ifdef HAVE_USE_DEFAULT_COLORS
+  use_default_colors();
+#endif
   int i;
   for (i = 0; i < 8; i++)
       init_pair(i+1, i, 0);