From 6957fcafe1af09deb0415c8bdb17de7b4f7cf3d0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 25 Feb 2004 11:25:53 +0000 Subject: [PATCH] added --with-curses option to specify the curses library. --- configure.in | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index e3dee62..24ace0f 100644 --- a/configure.in +++ b/configure.in @@ -37,12 +37,25 @@ AM_CONDITIONAL(ALSAMIXER, test x$alsamixer = xtrue) dnl Checks for header files. AC_HEADER_STDC if test x$alsamixer = xtrue; then - AC_CHECK_LIB(ncurses, initscr, - [ CURSESINC=''; CURSESLIB='-lncurses'; ], [ - AC_CHECK_LIB(curses, initscr, - [ CURSESINC=''; CURSESLIB='-lcurses'; ], - AC_MSG_ERROR(this packages requires a curses library)) - ]) + AC_ARG_WITH(curses, + [ --with-curses libname Specify the curses library to use (default=auto)], + curseslib="$withval", + curseslib="auto") + if test "$curseslib" = "ncursesw"; then + AC_CHECK_LIB(ncursesw, initscr, + [ CURSESINC=''; CURSESLIB='-lncursesw'; curseslib="ncursesw"]) + fi + if test "$curseslib" = "ncurses" -o "$curseslib" = "auto"; then + AC_CHECK_LIB(ncurses, initscr, + [ CURSESINC=''; CURSESLIB='-lncurses'; curseslib="ncurses"]) + fi + if test "$curseslib" = "curses" -o "$curseslib" = "auto"; then + AC_CHECK_LIB(curses, initscr, + [ CURSESINC=''; CURSESLIB='-lcurses'; curseslib="curses"]) + fi + if test -z "$CURSESINC"; then + AC_MSG_ERROR(this packages requires a curses library) + fi fi AC_SUBST(CURSESINC)