From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from eddie.linux-mips.org ([78.24.191.182] helo=cvs.linux-mips.org) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1S5aFh-0001xr-CU for ptxdist@pengutronix.de; Thu, 08 Mar 2012 11:07:37 +0100 Received: (from localhost user: 'ladis' uid#521 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S1903258Ab2CHKHP (ORCPT ); Thu, 8 Mar 2012 11:07:15 +0100 Date: Thu, 8 Mar 2012 11:07:12 +0100 From: Ladislav Michl Message-ID: <20120308100712.GA5776@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline Subject: [ptxdist] [PATCH] configure.ac: Improve curses searching Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de This is a resend of an older patch: http://www.mail-archive.com/ptxdist@pengutronix.de/msg03400.html Cygwin-1.7 places curses headers into /usr/include/ncurses. Tested on Debian, MinGW with pdcurses and Cygwin. Signed-off-by: Ladislav Michl --- configure.ac | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac old mode 100644 new mode 100755 index 00c2521..ec50a44 --- a/configure.ac +++ b/configure.ac @@ -36,25 +36,16 @@ AC_SEARCH_LIBS(regcomp, [regex gnuregex],, CONF_LIBS=${LIBS} AC_SUBST(CONF_LIBS) -AC_SEARCH_LIBS(mvaddch, [ncurses curses pdcurses], [CURSES_LIB=$ac_lib], - [AC_MSG_ERROR([ncurses development library not found, please install libncurses-dev])]) +AC_SEARCH_LIBS(mvaddch, [curses ncurses pdcurses], [CURSES_LIB=$ac_lib], + [AC_MSG_ERROR([curses development library not found, please install libncurses-dev])]) MCONF_LIBS=${LIBS} AC_SUBST(MCONF_LIBS) -if test "$CURSES_LIB" = "ncurses" -then - AC_CHECK_HEADER( - [ncurses.h], - [CURSES_LOC=''], - AC_MSG_ERROR([Cannot find ncurses.h.]) - ) -else - AC_CHECK_HEADER( - [curses.h], - [CURSES_LOC=''], - AC_MSG_ERROR([Cannot find curses.h.]) - ) -fi +AC_CHECK_HEADERS( + [curses.h ncurses.h ncurses/curses.h ncurses/ncurses.h pdcurses.h pdcurses/curses.h pdcurses/pdcurses.h], + [CURSES_LOC="<$ac_header>";found_curses_headers=yes; break;]) +AS_IF([test "x$CURSES_LOC" = "x"], + [AC_MSG_ERROR([curses headers not found])]) AC_SUBST(CURSES_LOC) AC_ARG_WITH(ncurses, AS_HELP_STRING([--with-ncurses],[Include path to the ncurses headers]), -- ptxdist mailing list ptxdist@pengutronix.de