1AC_ARG_ENABLE(curses,
2[  --disable-curses        disable curses support]
3)
4if test "x$enable_curses" != "xno"; then
5	AC_CHECK_HEADERS(curses.h)
6	AC_CHECK_LIB(ncurses, initscr,
7		CURSES_LIBS=-lncurses,
8		AC_CHECK_LIB(pdcurses, initscr,
9			CURSES_LIBS=-lpdcurses,
10			AC_CHECK_LIB(curses, initscr,
11				CURSES_LIBS=-lcurses,
12				CURSES_LIBS=
13			)
14		)
15	)
16else
17	CURSES_LIBS=
18fi
19AC_SUBST(CURSES_LIBS)
20