AC_PROG_LN_S
AM_PATH_ALSA(1.0.16)
+CURSESINC=""
+CURSESLIB=""
+CURSES_CFLAGS=""
AC_ARG_ENABLE(alsamixer,
[ --disable-alsamixer Disable alsamixer compilation],
[case "${enableval}" in
curseslib="$withval",
curseslib="auto")
if test "$curseslib" = "ncursesw"; then
- AC_CHECK_LIB(ncursesw, initscr,
+ AC_CHECK_PROG([ncursesw5_config], [ncursesw5-config], [yes])
+ if test "$ncursesw5_config" = "yes"; then
+ CURSESINC="<ncurses.h>"
+ CURSESLIB=`ncursesw5-config --libs`
+ CURSES_CFLAGS=`ncursesw5-config --cflags`
+ curseslib="ncursesw"
+ else
+ AC_CHECK_LIB(ncursesw, initscr,
[ CURSESINC='<ncurses.h>'; CURSESLIB='-lncursesw'; curseslib="ncursesw"])
+ fi
fi
if test "$curseslib" = "ncurses" -o "$curseslib" = "auto"; then
- AC_CHECK_LIB(ncurses, initscr,
+ AC_CHECK_PROG([ncurses5_config], [ncurses5-config], [yes])
+ if test "$ncurses5_config" = "yes"; then
+ CURSESINC="<ncurses.h>"
+ CURSESLIB=`ncurses5-config --libs`
+ CURSES_CFLAGS=`ncurses5-config --cflags`
+ curseslib="ncurses"
+ else
+ AC_CHECK_LIB(ncurses, initscr,
[ CURSESINC='<ncurses.h>'; CURSESLIB='-lncurses'; curseslib="ncurses"])
+ fi
fi
if test "$curseslib" = "curses" -o "$curseslib" = "auto"; then
AC_CHECK_LIB(curses, initscr,
AC_SUBST(CURSESINC)
AC_SUBST(CURSESLIB)
+AC_SUBST(CURSES_CFLAGS)
test "x$prefix" = xNONE && prefix=$ac_default_prefix