Merge https://github.com/ycros/cgminer into cgminer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/Makefile.am b/Makefile.am
index 5fd9ebd..eaf17fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ cgminer_SOURCES = elist.h miner.h compat.h \
sha256_cryptopp.c sha256_sse2_amd64.c
cgminer_LDFLAGS = $(PTHREAD_FLAGS)
-cgminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ lib/libgnu.a ccan/libccan.a
+cgminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ lib/libgnu.a ccan/libccan.a
cgminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ -I$(top_builddir)/lib -I$(top_srcdir)/lib
if HAVE_x86_64
diff --git a/configure.ac b/configure.ac
index 9616ccb..be637a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,7 @@ LIBS=$SAVED_LIBS
AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true)
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread)
AC_CHECK_LIB(ncurses, addstr, NCURSES_LIBS=-lncurses)
+AC_CHECK_LIB(pdcurses, addstr, PDCURSES_LIBS=-lpdcurses)
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
@@ -150,6 +151,7 @@ AC_SUBST(JANSSON_LIBS)
AC_SUBST(PTHREAD_FLAGS)
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(NCURSES_LIBS)
+AC_SUBST(PDCURSES_LIBS)
AC_CONFIG_FILES([
Makefile
diff --git a/main.c b/main.c
index 3833326..66dc6eb 100644
--- a/main.c
+++ b/main.c
@@ -11,6 +11,8 @@
#include "config.h"
+#include <curses.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -28,7 +30,6 @@
#include <ccan/opt/opt.h>
#include <jansson.h>
#include <curl/curl.h>
-#include <curses.h>
#include "compat.h"
#include "miner.h"
#include "findnonce.h"