#!/bin/sh

if [ -e /usr/lib/libncursesw.so ]; then
  echo "ncursesw found.";
  echo CURSESCFLAGS = -I/usr/include/ncursesw -DUSE_NCURSES_H > src/Makefile.config;
  echo CURSESLIBS = -lncursesw >> src/Makefile.config;
elif [ -e /usr/lib/libncurses.so ]; then
  echo "ncurses found.";
  echo CURSESCFLAGS = -DUSE_NCURSES_H > src/Makefile.config;
  echo CURSESLIBS = -lncurses >> src/Makefile.config;
else
  echo "ncurses not found; defaulting to curses.";
  echo CURSESCFLAGS = > src/Makefile.config;
  echo CURSESLIBS = -lcurses >> src/Makefile.config;
fi

