$ git clone http://tcclient.ion.nu/tc_client.git
commit ea3c26e889f7cc5252c26ee9446c7c8fb9051752
Author: Alicia <...>
Date:   Wed Feb 24 19:47:26 2016 +0100

    configure: check for multiple versions of ncurses.

diff --git a/ChangeLog b/ChangeLog
index ee320ec..2e2233d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ tc_client-gtk: added option to change font size in the chat.
 tc_client-gtk: initialize audio samples of new cams to 0 (experimental audio support)
 tc_client-gtk: windows compat: do /mbs handling on a duplicated buffer to avoid cutting off the displayed message.
 modbot: use youtube-dl's 'ytsearch:' instead of '--default-search auto', fixes issues with search terms that include slashes.
+configure: check for multiple versions of ncurses.
 0.37:
 Reimplemented announcement of moderators.
 Reimplemented announcement of people cammed up when joining.
diff --git a/configure b/configure
index 1846612..783231a 100755
--- a/configure
+++ b/configure
@@ -121,12 +121,18 @@ fi
 fi
 
 printf 'Checking for ncurses... '
-libs="`ncursesw5-config --libs 2> /dev/null || ncurses5-config --libs 2> /dev/null`"
-if [ "x$libs" != "x" ]; then
-  echo "CURSES_LIBS=${libs}" >> config.mk
-  echo "CURSES_CFLAGS=`ncursesw5-config --cflags 2> /dev/null || ncurses5-config --cflags 2> /dev/null`" >> config.mk
-  echo yes
-else
+notfound=true
+for version in 7 6 5 4; do
+  libs="`ncursesw${version}-config --libs 2> /dev/null || ncurses${version}-config --libs 2> /dev/null`"
+  if [ "x$libs" != "x" ]; then
+    echo "CURSES_LIBS=${libs}" >> config.mk
+    echo "CURSES_CFLAGS=`ncursesw${version}-config --cflags 2> /dev/null || ncurses${version}-config --cflags 2> /dev/null`" >> config.mk
+    echo yes
+    notfound=false
+    break
+  fi
+done
+if "$notfound"; then
   echo no
 fi