aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2006-03-28 08:55:24 +0000
committerKalle Wallin <kaw@linux.se>2006-03-28 08:55:24 +0000
commit4ee5802aa8a6edc3f339ee283782fcc4e486c933 (patch)
treef7983bae69d5d3c8f1efdb8bf23c7a01dcb1df6a /configure.ac
parente36572093917e163e608195b559017e7bbe09347 (diff)
downloadmpd-4ee5802aa8a6edc3f339ee283782fcc4e486c933.tar.gz
mpd-4ee5802aa8a6edc3f339ee283782fcc4e486c933.tar.xz
mpd-4ee5802aa8a6edc3f339ee283782fcc4e486c933.zip
Fallback to ncurses if ncursesw is missing
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3961 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9cda77546..0e6957f82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,7 @@ AC_CHECK_FUNC([gethostbyname],
dnl ncurses
-ncurses=ncursesw
+ncurses=auto
AC_ARG_WITH([ncurses],
AC_HELP_STRING([--with-ncurses], [compile/link with ncurses library] ),
[ncurses=ncurses])
@@ -75,10 +75,19 @@ AC_ARG_WITH(ncursesw,
AC_HELP_STRING([--with-ncursesw], [compile/link with wide-char ncurses library @<:@default@:>@]),
[ncurses=ncursesw])
+if test "x$ncurses" = "xauto"; then
+ AC_CHECK_LIB([ncursesw],
+ [initscr],
+ [ncurses=ncursesw],
+ [ncurses=ncurses])
+fi
+
+
AC_CHECK_LIB([$ncurses],
[initscr],
- [LIBS="$LIBS -l$ncurses"],
- [AC_MSG_ERROR($ncurses library is required)])
+ [LIBS="$LIBS -l$ncurses"],
+ [AC_MSG_ERROR($ncurses library is required)])
+
if test "x$ncurses" = "xncursesw" ; then
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [wide-char wget_ch()])