From 76720a263a298d00652dcce0f12f5be60ec8bc9d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 5 Sep 2013 16:30:45 +0200 Subject: configure: check for curses, and compile even if it's not available --- libcrystfel/Makefile.am | 2 +- libcrystfel/src/integration.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'libcrystfel') diff --git a/libcrystfel/Makefile.am b/libcrystfel/Makefile.am index 2b2d1437..2812fa52 100644 --- a/libcrystfel/Makefile.am +++ b/libcrystfel/Makefile.am @@ -1,5 +1,5 @@ lib_LTLIBRARIES = libcrystfel.la -libcrystfel_la_LIBADD = ../lib/libgnu.la @LIBCRYSTFEL_LIBS@ -lncurses +libcrystfel_la_LIBADD = ../lib/libgnu.la @LIBCRYSTFEL_LIBS@ libcrystfel_la_LDFLAGS = -version-info 2:0:0 libcrystfel_la_SOURCES = src/reflist.c src/utils.c src/cell.c src/detector.c \ diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 2816784f..2d90d5e4 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -37,7 +37,10 @@ #include #include #include + +#ifdef HAVE_CURSES_COLOR #include +#endif #include "reflist.h" #include "cell.h" @@ -252,6 +255,7 @@ static float boxi(struct intcontext *ic, struct peak_box *bx, int p, int q) } +#ifdef HAVE_CURSES_COLOR static void colour_on(enum boxmask_val b) { switch ( b ) { @@ -296,10 +300,12 @@ static void colour_off(enum boxmask_val b) } } +#endif static void show_peak_box(struct intcontext *ic, struct peak_box *bx) { +#ifdef HAVE_CURSES_COLOR int q; initscr(); @@ -347,11 +353,13 @@ static void show_peak_box(struct intcontext *ic, struct peak_box *bx) refresh(); getch(); endwin(); +#endif } static void show_reference_profile(struct intcontext *ic, int i) { +#ifdef HAVE_CURSES_COLOR int q; initscr(); @@ -381,6 +389,7 @@ static void show_reference_profile(struct intcontext *ic, int i) refresh(); getch(); endwin(); +#endif } -- cgit v1.2.3