[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ncurses/curses detection

From: Dan McMahill
Subject: ncurses/curses detection
Date: Tue, 12 May 2009 07:35:11 -0400
User-agent: Thunderbird (Windows/20090302)

Anyone know of a decent autoconf macro for detecting the right header and library for curses/ncurses?

Here is the issue I have seen. Many systems ship curses.h and libcurses. Sometimes this may actually be ncurses, sometimes not. Then I sometimes on those same systems I see ncurses.h and libncurses installed as a 3rd party library to support some programs which may require ncurses and not the system curses implementation.

It is not immediately obvious to me what the correct set of checks should be to

a) generally pair up the right header file with the right library

b) make it semi-convenient for the user to pick which curses implementation he/she wants if there is a system curses as well as an add-on ncurses available.

I could to AC_CHECK_LIB([curses],[main]) and then only do AC_CHECK_LIB([ncurses],,[main]) if the -lcurses test fails. Then AC_CHECk_HEADERS([curses.h ncurses.h]) and use cpp to try curses.h first and then ncurses.h but this doesn't really provide user control.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]