From 11ab1a3a5264c2234bfe2915203c909a812356ca Mon Sep 17 00:00:00 2001 From: Andreas Obergrusberger Date: Sat, 5 Aug 2006 16:53:19 +0000 Subject: [PATCH] fixed building on systems with libncursesw but without like Arch Linux git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4563 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- ChangeLog | 1 + configure.ac | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c574c7e..81a7967 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ * updated translation template * german lyrics- and search-screen translation added * avuton has fixed a lot of warnings + * fixed a problem with compiling on Arch Linux 2006-09-4 Anderas Obergrusberger * tradiaz is temporary maintainer of a special branch of ncmpc now diff --git a/configure.ac b/configure.ac index e3e68ee..1baa12f 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,12 @@ if test "x$ncurses" = "xauto"; then [ncurses=ncurses]) fi +AC_CHECK_HEADER([ncursesw/ncurses.h], + [have_ncursesw_h=yes], + ,) + + + AC_CHECK_LIB([$ncurses], [initscr], @@ -89,12 +95,15 @@ AC_CHECK_LIB([$ncurses], [AC_MSG_ERROR($ncurses library is required)]) -if test "x$ncurses" = "xncursesw" ; then - AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [wide-char wget_ch()]) - AC_DEFINE(USE_NCURSESW, 1, [use wide-char ncurses library]) +if test "x$ncurses" != "xncursesw" ; then + if test "x$have_ncursesw_h" = "xyes" ; then + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [wide-char wget_ch()]) + AC_DEFINE(USE_NCURSESW, 1, [use wide-char ncurses library]) + fi fi + dnl Check for glib-2.4 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4], -- 2.30.2