Commit 505b18597bd222b974ad893ce514383c9a016169

Con Kolivas 2011-07-11T16:56:28

Merge https://github.com/ycros/cgminer into cgminer

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"