aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-09-05 16:30:45 +0200
committerThomas White <taw@physics.org>2013-09-05 16:30:45 +0200
commit76720a263a298d00652dcce0f12f5be60ec8bc9d (patch)
treee5f1ebfbd6ff4ef2611c2ae9cc2336f49230465a /libcrystfel
parentd836294be9879418c1b8290ca9cf6df3dc58eadc (diff)
configure: check for curses, and compile even if it's not available
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/Makefile.am2
-rw-r--r--libcrystfel/src/integration.c9
2 files changed, 10 insertions, 1 deletions
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 <gsl/gsl_vector.h>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_eigen.h>
+
+#ifdef HAVE_CURSES_COLOR
#include <ncurses.h>
+#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
}