From 9abf70b4a66171904cf8040c0808ee788ccd47f9 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Fri, 23 Jan 2009 21:09:21 +0000 Subject: ability to link against ncursesw if ncurses is not found --- src/calendar.h | 17 +++++++++++++++-- src/keys.h | 14 +++++++++++++- src/vars.h | 15 ++++++++++++++- 3 files changed, 42 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/calendar.h b/src/calendar.h index 30762fc..2bd81aa 100755 --- a/src/calendar.h +++ b/src/calendar.h @@ -1,8 +1,8 @@ -/* $calcurse: calendar.h,v 1.12 2008/08/10 09:24:46 culot Exp $ */ +/* $calcurse: calendar.h,v 1.13 2009/01/23 21:09:21 culot Exp $ */ /* * Calcurse - text-based organizer - * Copyright (c) 2004-2008 Frederic Culot + * Copyright (c) 2004-2009 Frederic Culot * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,20 @@ #ifndef CALCURSE_CALENDAR_H #define CALCURSE_CALENDAR_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#ifdef HAVE_NCURSES_H #include +#elif defined HAVE_NCURSES_NCURSES_H +#include +#elif defined HAVE_NCURSESW_NCURSES_H +#include +#else +#error "Missing ncurses header. Aborting..." +#endif + #include #include diff --git a/src/keys.h b/src/keys.h index 7d108c8..35d394f 100755 --- a/src/keys.h +++ b/src/keys.h @@ -1,4 +1,4 @@ -/* $calcurse: keys.h,v 1.9 2009/01/03 21:32:11 culot Exp $ */ +/* $calcurse: keys.h,v 1.10 2009/01/23 21:09:21 culot Exp $ */ /* * Calcurse - text-based organizer @@ -27,7 +27,19 @@ #ifndef CALCURSE_KEYS_H #define CALCURSE_KEYS_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#ifdef HAVE_NCURSES_H #include +#elif defined HAVE_NCURSES_NCURSES_H +#include +#elif defined HAVE_NCURSESW_NCURSES_H +#include +#else +#error "Missing ncurses header. Aborting..." +#endif #define CTRLVAL 0x1F #define CTRL(x) ((x) & CTRLVAL) diff --git a/src/vars.h b/src/vars.h index 28ce6cf..a47c611 100755 --- a/src/vars.h +++ b/src/vars.h @@ -1,4 +1,4 @@ -/* $calcurse: vars.h,v 1.30 2009/01/05 20:12:08 culot Exp $ */ +/* $calcurse: vars.h,v 1.31 2009/01/23 21:09:21 culot Exp $ */ /* * Calcurse - text-based organizer @@ -27,7 +27,20 @@ #ifndef CALCURSE_VARS_H #define CALCURSE_VARS_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#ifdef HAVE_NCURSES_H #include +#elif defined HAVE_NCURSES_NCURSES_H +#include +#elif defined HAVE_NCURSESW_NCURSES_H +#include +#else +#error "Missing ncurses header. Aborting..." +#endif + #include #include -- cgit v1.2.3-54-g00ecf