mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] configure.ac: Improve curses searching
Date: Thu, 8 Mar 2012 11:07:12 +0100	[thread overview]
Message-ID: <20120308100712.GA5776@localhost.localdomain> (raw)

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 <ladis@linux-mips.org>
---
 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='<ncurses.h>'],
-		AC_MSG_ERROR([Cannot find ncurses.h.])
-	)
-else
-	AC_CHECK_HEADER(
-		[curses.h],
-		[CURSES_LOC='<curses.h>'],
-		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

             reply	other threads:[~2012-03-08 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 10:07 Ladislav Michl [this message]
2012-03-12  8:59 ` Michael Olbrich
2012-03-14 12:10   ` Ladislav Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120308100712.GA5776@localhost.localdomain \
    --to=ladis@linux-mips.org \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox