configure.ac 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. dnl * Copyright 2012-2013 Luke Dashjr
  2. dnl * Copyright 2011-2013 Con Kolivas
  3. dnl * Copyright 2010-2011 Jeff Garzik
  4. dnl * Copyright 2012 Xiangfu
  5. dnl * Copyright 2011 Rusty Russell
  6. dnl * Copyright 2011 Mark Crichton
  7. dnl *
  8. dnl * This program is free software; you can redistribute it and/or modify it
  9. dnl * under the terms of the GNU General Public License as published by the Free
  10. dnl * Software Foundation; either version 3 of the License, or (at your option)
  11. dnl * any later version. See COPYING for more details.
  12. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  13. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  14. m4_define([v_maj], [3])
  15. m4_define([v_min], [2])
  16. m4_define([v_mic], [9])
  17. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  18. m4_define([v_ver], [v_maj.v_min.v_mic])
  19. m4_define([lt_rev], m4_eval(v_maj + v_min))
  20. m4_define([lt_cur], v_mic)
  21. m4_define([lt_age], v_min)
  22. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  23. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  24. AC_INIT([bfgminer], [v_ver], [luke-jr+bfgminer@utopios.org])
  25. AC_PREREQ([2.59c])
  26. AC_CANONICAL_SYSTEM
  27. AC_CONFIG_MACRO_DIR([m4])
  28. AC_CONFIG_SRCDIR([miner.c])
  29. AC_CONFIG_HEADERS([config.h])
  30. AM_INIT_AUTOMAKE([foreign])
  31. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  32. AC_USE_SYSTEM_EXTENSIONS
  33. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  34. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  35. m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
  36. m4_ifdef([v_rel], , [m4_define([v_rel], [])])
  37. AC_DEFINE_UNQUOTED(CGMINER_MAJOR_VERSION, [v_maj], [Major version])
  38. AC_DEFINE_UNQUOTED(CGMINER_MINOR_VERSION, [v_min], [Minor version])
  39. AC_DEFINE_UNQUOTED(CGMINER_MINOR_SUBVERSION, [v_mic], [Micro version])
  40. version_info="lt_rev:lt_cur:lt_age"
  41. release_info="v_rel"
  42. AC_SUBST(version_info)
  43. AC_SUBST(release_info)
  44. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  45. ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
  46. VMAJ=v_maj
  47. AC_SUBST(VMAJ)
  48. AC_CANONICAL_BUILD
  49. AC_CANONICAL_HOST
  50. dnl Make sure anyone changing configure.ac/Makefile.am has a clue
  51. AM_MAINTAINER_MODE([enable])
  52. dnl Checks for programs
  53. AC_PROG_CC_C99
  54. gl_EARLY
  55. AC_PROG_GCC_TRADITIONAL
  56. AM_PROG_CC_C_O
  57. AC_PROG_RANLIB
  58. AC_PROG_CPP
  59. gl_INIT
  60. AC_SYS_LARGEFILE
  61. dnl Checks for header files.
  62. AC_HEADER_STDC
  63. AC_CHECK_HEADERS(syslog.h)
  64. AC_CHECK_HEADERS([sys/epoll.h])
  65. AC_CHECK_HEADERS([sys/prctl.h])
  66. AC_CHECK_HEADERS([sys/file.h])
  67. AC_CHECK_FUNCS([sleep])
  68. AC_FUNC_ALLOCA
  69. have_cygwin=false
  70. have_win32=false
  71. have_macho=false
  72. DLOPEN_FLAGS="-ldl"
  73. WS2_LIBS=""
  74. MM_LIBS=""
  75. MATH_LIBS="-lm"
  76. RT_LIBS=""
  77. case $target in
  78. amd64-* | x86_64-*)
  79. have_x86_32=false
  80. have_x86_64=true
  81. bitness="64"
  82. ;;
  83. i386-* | i486-* | i586-* | i686-* | x86-*)
  84. have_x86_32=true
  85. have_x86_64=false
  86. bitness="32"
  87. ;;
  88. *)
  89. have_x86_32=false
  90. have_x86_64=false
  91. ;;
  92. esac
  93. case $target in
  94. *-*-mingw*)
  95. have_win32=true
  96. DLOPEN_FLAGS=""
  97. WS2_LIBS="-lws2_32"
  98. MM_LIBS="-lwinmm"
  99. AC_DEFINE([_WIN32_WINNT], [0x0501], "WinNT version for XP+ support")
  100. AC_DEFINE([FD_SETSIZE], [4096], [Maximum sockets before fd_set overflows])
  101. ;;
  102. *-*-cygwin*)
  103. have_cygwin=true
  104. ;;
  105. powerpc-*-darwin*)
  106. CFLAGS="$CFLAGS -faltivec"
  107. have_macho=true
  108. ;;
  109. *-*-darwin*)
  110. have_macho=true
  111. ;;
  112. esac
  113. m4_define([BFG_INCLUDE],
  114. if test "x$2" = "x"; then
  115. $1=''
  116. else
  117. $1="[#]include <$2>"
  118. fi
  119. )
  120. m4_define([BFG_PREPROC_IFELSE],
  121. BFG_INCLUDE([headerinclude], $2)
  122. AC_COMPILE_IFELSE([
  123. AC_LANG_PROGRAM([
  124. ${headerinclude}
  125. ], [
  126. #if !( $1 )
  127. #error "$1 false in preprocessor"
  128. #endif
  129. ])
  130. ],[$3],[$4])
  131. )
  132. AC_CHECK_DECL([HASH_ITER],[
  133. AC_CHECK_DECL([DL_FOREACH_SAFE],[
  134. true
  135. ],[
  136. AC_MSG_ERROR([Could not find DL_FOREACH_SAFE - install uthash-dev 1.9.2+])
  137. ],[
  138. #include <utlist.h>
  139. ])
  140. ],[
  141. AC_MSG_ERROR([Could not find HASH_ITER - please install uthash-dev 1.9.2+])
  142. ],[
  143. #include <uthash.h>
  144. ])
  145. cpumining="no"
  146. AC_ARG_ENABLE([cpumining],
  147. [AC_HELP_STRING([--enable-cpumining],[Build with CPU mining support (default disabled)])],
  148. [cpumining=$enableval]
  149. )
  150. if test "x$cpumining" = xyes; then
  151. AC_DEFINE_UNQUOTED([WANT_CPUMINE], [1], [Enable CPUMINING])
  152. fi
  153. AM_CONDITIONAL([HAS_CPUMINE], [test x$cpumining = xyes])
  154. opencl="yes"
  155. AC_ARG_ENABLE([opencl],
  156. [AC_HELP_STRING([--disable-opencl],[Build without support for OpenCL (default enabled)])],
  157. [opencl=$enableval]
  158. )
  159. if test "x$opencl" = xyes; then
  160. AC_DEFINE([HAVE_OPENCL], [1], [Defined to 1 if OpenCL support is wanted])
  161. else
  162. DLOPEN_FLAGS=""
  163. fi
  164. AM_CONDITIONAL([HAVE_OPENCL], [test x$opencl = xyes])
  165. m4_define([BFG_PTHREAD_FLAG_CHECK],
  166. AC_MSG_CHECKING([for $1])
  167. for cflag in ' -pthread' ''; do
  168. for lib in ' -lpthread' ' -lwinpthread' ''; do
  169. CFLAGS="${save_CFLAGS}${cflag}"
  170. LIBS="${save_LIBS}${lib}"
  171. AC_LINK_IFELSE([
  172. AC_LANG_PROGRAM([
  173. #include <pthread.h>
  174. ], [
  175. void *f = $1;
  176. ])
  177. ], [
  178. found_pthread=true
  179. PTHREAD_FLAGS="${cflag}"
  180. PTHREAD_LIBS="${lib}"
  181. if test "x${cflag}${lib}" = "x"; then
  182. AC_MSG_RESULT([yes])
  183. else
  184. AC_MSG_RESULT([with${cflag}${lib}])
  185. fi
  186. $2
  187. break 2
  188. ])
  189. done
  190. done
  191. if test "x${found_pthread}" = "xfalse"; then
  192. AC_MSG_RESULT([no])
  193. fi
  194. )
  195. save_CFLAGS="${CFLAGS}"
  196. save_LIBS="${LIBS}"
  197. found_pthread=false
  198. BFG_PTHREAD_FLAG_CHECK([pthread_cancel],[
  199. AC_DEFINE([HAVE_PTHREAD_CANCEL], [1], [Define if you have a native pthread_cancel])
  200. ])
  201. if test "x${found_pthread}" = "xfalse"; then
  202. BFG_PTHREAD_FLAG_CHECK([pthread_create])
  203. if test "x${found_pthread}" = "xfalse"; then
  204. AC_MSG_ERROR([Could not find pthread library - please install libpthread])
  205. fi
  206. fi
  207. # check for nanosleep here, since it is provided by winpthread
  208. AC_CHECK_FUNCS([nanosleep])
  209. CFLAGS="${save_CFLAGS}"
  210. LIBS="${save_LIBS}"
  211. PKG_CHECK_MODULES([JANSSON],[jansson],[
  212. true
  213. ],[
  214. AC_MSG_CHECKING([for jansson in system-default locations])
  215. LIBS="$LIBS -ljansson"
  216. AC_TRY_LINK([
  217. #include <jansson.h>
  218. ],[
  219. json_object();
  220. ],[
  221. AC_MSG_RESULT([found])
  222. JANSSON_LIBS=-ljansson
  223. ],[
  224. AC_MSG_RESULT([not found])
  225. AC_MSG_ERROR([Could not find jansson library])
  226. ])
  227. LIBS="${save_LIBS}"
  228. ])
  229. AC_SUBST(JANSSON_CFLAGS)
  230. AC_SUBST(JANSSON_LIBS)
  231. if test "x$opencl" = xyes; then
  232. adl="yes"
  233. AC_ARG_WITH([sensors],
  234. [AC_HELP_STRING([--without-sensors],[Build with libsensors monitoring (default enabled)])],
  235. [true],[with_sensors=auto])
  236. if test "x$opencl" != xyes; then
  237. with_sensors=no
  238. fi
  239. if test "x$with_sensors" != xno; then
  240. AC_MSG_CHECKING([for libsensors])
  241. save_LIBS="${LIBS}"
  242. LIBS="$LIBS -lsensors"
  243. AC_LINK_IFELSE([AC_LANG_PROGRAM([
  244. #include <stddef.h>
  245. #include <sensors/sensors.h>
  246. ],[
  247. const sensors_chip_name *cn;
  248. cn = sensors_get_detected_chips(NULL, NULL);
  249. ])],[
  250. with_sensors=yes
  251. sensors_LIBS="-lsensors"
  252. AC_DEFINE([HAVE_SENSORS], [1], [Defined if libsensors was found])
  253. AC_MSG_RESULT([yes])
  254. ],[
  255. with_sensors=no
  256. AC_MSG_RESULT([no])
  257. ])
  258. LIBS="$save_LIBS"
  259. fi
  260. AC_SUBST(sensors_LIBS)
  261. AC_ARG_ENABLE([adl],
  262. [AC_HELP_STRING([--disable-adl],[Build without ADL monitoring (default enabled)])],
  263. [adl=$enableval]
  264. )
  265. if test x$adl = xyes
  266. then
  267. AC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found])
  268. fi
  269. else
  270. adl="no"
  271. fi
  272. AC_ARG_ENABLE([bitforce],
  273. [AC_HELP_STRING([--disable-bitforce],[Compile support for BitForce (default enabled)])],
  274. [bitforce=$enableval],
  275. [bitforce=yes]
  276. )
  277. if test "x$bitforce" = xyes; then
  278. AC_DEFINE([USE_BITFORCE], [1], [Defined to 1 if BitForce support is wanted])
  279. fi
  280. AM_CONDITIONAL([HAS_BITFORCE], [test x$bitforce = xyes])
  281. AC_ARG_ENABLE([icarus],
  282. [AC_HELP_STRING([--disable-icarus],[Compile support for Icarus (default enabled)])],
  283. [icarus=$enableval],
  284. [icarus=yes]
  285. )
  286. if test "x$icarus" = xyes; then
  287. AC_DEFINE([USE_ICARUS], [1], [Defined to 1 if Icarus support is wanted])
  288. fi
  289. AM_CONDITIONAL([HAS_ICARUS], [test x$icarus = xyes])
  290. avalon="no"
  291. AC_ARG_ENABLE([avalon],
  292. [AC_HELP_STRING([--disable-avalon],[Compile support for Avalon (default enabled)])],
  293. [avalon=$enableval],
  294. [avalon=yes]
  295. )
  296. if test "x$avalon" = xyes; then
  297. AC_DEFINE([USE_AVALON], [1], [Defined to 1 if Avalon support is wanted])
  298. fi
  299. AM_CONDITIONAL([HAS_AVALON], [test x$avalon = xyes])
  300. httpsrv=auto
  301. AC_ARG_WITH([libmicrohttpd],
  302. [AC_HELP_STRING([--without-libmicrohttpd],[Compile support for libmicrohttpd getwork server (default enabled)])],
  303. [httpsrv=$withval]
  304. )
  305. if test "x$httpsrv" != "xno"; then
  306. PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.5],[
  307. AC_DEFINE([USE_LIBMICROHTTPD],[1],[Defined to 1 if libmicrohttpd support is wanted])
  308. httpsrv=yes
  309. ],[
  310. httpsrv=no
  311. if test "x$httpsrv" = "xyes"; then
  312. AC_MSG_ERROR([Unable to find libmicrohttpd 0.9.5+])
  313. else
  314. AC_MSG_WARN([libmicrohttpd 0.9.5+ not found; getwork proxy will be unavailable])
  315. fi
  316. ])
  317. fi
  318. AM_CONDITIONAL([USE_LIBMICROHTTPD], [test x$httpsrv = xyes])
  319. AC_ARG_ENABLE([modminer],
  320. [AC_HELP_STRING([--disable-modminer],[Compile support for ModMiner (default enabled)])],
  321. [modminer=$enableval],
  322. [modminer=yes]
  323. )
  324. if test "x$modminer" = xyes; then
  325. AC_DEFINE([USE_MODMINER], [1], [Defined to 1 if ModMiner support is wanted])
  326. fi
  327. AM_CONDITIONAL([HAS_MODMINER], [test x$modminer = xyes])
  328. PKG_PROG_PKG_CONFIG()
  329. libusb=no
  330. libusb_include_path=""
  331. PKG_CHECK_MODULES([LIBUSB], [libusb-1.0],[
  332. libusb=yes
  333. ],[
  334. for usb_lib in usb-1.0 usb; do
  335. AC_CHECK_LIB($usb_lib, libusb_init, [
  336. libusb=yes
  337. break
  338. ])
  339. done
  340. if test "x$libusb" = xyes; then
  341. AC_CHECK_DECL([libusb_init],[
  342. LIBUSB_LIBS="-l$usb_lib"
  343. ],[
  344. AC_MSG_CHECKING([whether libusb_init is declared in subdirectory])
  345. libusb_include_path=`echo '#include <libusb-1.0/libusb.h>' | ${CPP} -M - 2>/dev/null | sed -E -e 's/^[^:]+:[[:space:]]*(([^[:space:]]|\\\\[[:space:]])*)libusb\\.h([[:space:]].*|$)$/\\1/' -e 't my' -e d -e ': my' -e 's/\\\\?([\\\\[:space:]])/\\\\\\1/g'`
  346. if test "x$libusb_include_path" != "x"; then
  347. LIBUSB_LIBS="-l$usb_lib"
  348. LIBUSB_CFLAGS="-I$libusb_include_path"
  349. AC_MSG_RESULT([yes])
  350. else
  351. libusb=no
  352. AC_MSG_RESULT([no])
  353. fi
  354. ],[#include <libusb.h>])
  355. fi
  356. ])
  357. AC_ARG_ENABLE([x6500],
  358. [AC_HELP_STRING([--disable-x6500],[Compile support for X6500 (default if libusb)])],
  359. [x6500=$enableval],
  360. [x6500=auto]
  361. )
  362. if test "x$x6500$libusb" = xyesno; then
  363. AC_MSG_ERROR([Could not find libusb, required for X6500 support])
  364. elif test "x$x6500" = xauto; then
  365. x6500="$libusb"
  366. if test "x$libusb" = xno; then
  367. AC_MSG_WARN([Could not find libusb, required for X6500 support])
  368. x6500warn=yes
  369. fi
  370. fi
  371. if test "x$x6500" = xyes; then
  372. AC_DEFINE([USE_X6500], [1], [Defined to 1 if X6500 support is wanted])
  373. fi
  374. AM_CONDITIONAL([HAS_X6500], [test x$x6500 = xyes])
  375. AC_ARG_ENABLE([ztex],
  376. [AC_HELP_STRING([--disable-ztex],[Compile support for ZTEX (default if libusb)])],
  377. [ztex=$enableval],
  378. [ztex=auto]
  379. )
  380. if test "x$ztex$libusb" = xyesno; then
  381. AC_MSG_ERROR([Could not find libusb, required for ZTEX support])
  382. elif test "x$ztex" = xauto; then
  383. ztex="$libusb"
  384. if test "x$libusb" = xno; then
  385. AC_MSG_WARN([Could not find libusb, required for ZTEX support])
  386. ztexwarn=yes
  387. fi
  388. fi
  389. if test "x$ztex" = xyes; then
  390. AC_DEFINE([USE_ZTEX], [1], [Defined to 1 if ZTEX support is wanted])
  391. fi
  392. AM_CONDITIONAL([HAS_ZTEX], [test x$ztex = xyes])
  393. if test "x$x6500$ztex" = "xnono"; then
  394. libusb=no
  395. LIBUSB_LIBS=''
  396. LIBUSB_CFLAGS=''
  397. fi
  398. if test "x$libusb" = xyes; then
  399. AC_DEFINE([HAVE_LIBUSB], [1], [Define if you have libusb-1.0])
  400. save_CFLAGS="$CFLAGS"
  401. CFLAGS="$LIBUSB_CFLAGS $CFLAGS"
  402. AC_CHECK_DECLS([libusb_error_name],[true],[true],[#include <libusb.h>])
  403. CFLAGS="$save_CFLAGS"
  404. fi
  405. scrypt="no"
  406. AC_ARG_ENABLE([scrypt],
  407. [AC_HELP_STRING([--enable-scrypt],[Compile support for scrypt mining (default disabled)])],
  408. [scrypt=$enableval]
  409. )
  410. if test "x$scrypt" = xyes; then
  411. AC_DEFINE([USE_SCRYPT], [1], [Defined to 1 if scrypt support is wanted])
  412. fi
  413. need_fpgautils=no
  414. if test x$avalon$icarus$bitforce$modminer$x6500$ztex != xnononononono; then
  415. need_fpgautils=yes
  416. AC_DEFINE([HAVE_FPGAUTILS], [1], [Defined to 1 if fpgautils is being used])
  417. if $have_win32; then
  418. echo '#include <iospeeds.h>' >iospeeds_local.h
  419. else
  420. AC_MSG_CHECKING([what baud rates your system supports])
  421. echo '#include <termios.h>' | ${CPP} -dM - 2>/dev/null | sed 's/.*[ ]B\([0-9][0-9]*\)[ ].*/IOSPEED(\1)/' | grep IOSPEED >iospeeds_local.h
  422. if grep -q IOSPEED iospeeds_local.h; then
  423. AC_MSG_RESULT([done])
  424. else
  425. AC_MSG_RESULT([failed, using standard POSIX])
  426. echo '#include <iospeeds_posix.h>' >iospeeds_local.h
  427. fi
  428. fi
  429. fi
  430. curses="auto"
  431. AC_ARG_WITH([curses],
  432. [AC_HELP_STRING([--without-curses],[Compile support for curses TUI (default enabled)])],
  433. [curses=$withval]
  434. )
  435. if test "x$curses" = "xno"; then
  436. cursesmsg='User specified --without-curses. TUI support DISABLED'
  437. else
  438. orig_libs="$LIBS"
  439. if test "x${curses}" = "xyes"; then
  440. preferl=''
  441. else
  442. preferl="${curses} ${curses}6 ${curses}5"
  443. fi
  444. for wideornot in w u ''; do
  445. for ncursesver in '' 6 5; do
  446. preferl="${preferl} ncurses${wideornot}${ncursesver}"
  447. done
  448. preferl="${preferl} pdcurses${wideornot}"
  449. done
  450. if test "x$cross_compiling" != "xyes"; then
  451. AC_MSG_CHECKING([for best native curses library])
  452. orig_cflags="$CFLAGS"
  453. for curses_lib in ${preferl}; do
  454. if ! ${curses_lib}-config --cflags >/dev/null 2>/dev/null; then
  455. continue
  456. fi
  457. CFLAGS="$orig_cflags $(${curses_lib}-config --cflags)"
  458. LIBS="$orig_libs $(${curses_lib}-config --libs)"
  459. AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  460. #include <curses.h>
  461. ]], [[
  462. WINDOW *w = NULL;
  463. mvwprintw(w, 2, 2, "Testing %s", "o hai");
  464. ]])], [
  465. curses=yes
  466. cursesmsg="FOUND: ${curses_lib}"
  467. AC_MSG_RESULT([$curses_lib])
  468. NCURSES_LIBS=`${curses_lib}-config --libs`
  469. NCURSES_CPPFLAGS=`${curses_lib}-config --cflags`
  470. break
  471. ], [
  472. AC_MSG_WARN([${curses_lib} doesn't seem to be installed properly])
  473. ])
  474. done
  475. CFLAGS="$orig_cflags"
  476. if test "x$curses" != "xyes"; then
  477. AC_MSG_RESULT([none?])
  478. fi
  479. fi
  480. if test "x$curses" != "xyes"; then
  481. sym=addstr
  482. AC_SEARCH_LIBS(${sym}, ${preferl}, [
  483. curses=yes
  484. eval "curseslib=\"\${ac_cv_search_${sym}}\""
  485. barelib="${curseslib/-l/}"
  486. cursesmsg="FOUND: ${barelib}"
  487. if test "x${curseslib}" != "xnone required"; then
  488. NCURSES_LIBS="${curseslib}"
  489. fi
  490. # Need to check for headers in subdirectories, to ensure we get wide stuff
  491. AC_MSG_CHECKING([for curses header subdirectory])
  492. barelib="${barelib/6/}"
  493. barelib="${barelib/5/}"
  494. cursesincl=`echo '#include <'"${barelib}"'/curses.h>' | ${CPP} -M - 2>/dev/null | sed -E -e 's/^[^:]+:[[:space:]]*(([^[:space:]]|\\\\[[:space:]])*)curses\\.h([[:space:]].*|$)$/\\1/' -e 't my' -e d -e ': my' -e 's/\\\\?([\\\\[:space:]])/\\\\\\1/g'`
  495. if test "x$cursesincl" != "x"; then
  496. NCURSES_CPPFLAGS="-I${cursesincl}"
  497. AC_MSG_RESULT([$cursesincl])
  498. else
  499. AC_MSG_RESULT([none found])
  500. fi
  501. break
  502. ], [
  503. if test "x$curses" = "xyes"; then
  504. AC_MSG_ERROR([Could not find curses library - please install libncurses-dev or pdcurses-dev (or configure --without-curses)])
  505. else
  506. AC_MSG_WARN([Could not find curses library - if you want a TUI, install libncurses-dev or pdcurses-dev])
  507. curses=no
  508. cursesmsg='NOT FOUND. TUI support DISABLED'
  509. fi
  510. ])
  511. fi
  512. if test "x$curses" = "xyes"; then
  513. AC_DEFINE([HAVE_CURSES], [1], [Defined to 1 if curses TUI support is wanted])
  514. AC_MSG_CHECKING([whether curses library supports wide characters])
  515. LIBS="$orig_libs $NCURSES_CPPFLAGS $NCURSES_LIBS"
  516. AC_LINK_IFELSE([
  517. AC_LANG_PROGRAM([
  518. #define PDC_WIDE
  519. #include <curses.h>
  520. ],[
  521. addwstr(L"test");
  522. add_wch(WACS_VLINE);
  523. ])
  524. ],[
  525. AC_MSG_RESULT([yes])
  526. AC_DEFINE([USE_UNICODE],[1],[Defined to 1 if curses supports wide characters])
  527. ],[
  528. AC_MSG_RESULT([no])
  529. ])
  530. fi
  531. LIBS="$orig_libs"
  532. fi
  533. AC_ARG_WITH([system-libblkmaker], [AC_HELP_STRING([--with-system-libblkmaker], [Use system libblkmaker rather than bundled one (default disabled)])],[true],[with_system_libblkmaker=no])
  534. if test "x$with_system_libblkmaker" = "xyes"; then
  535. PKG_CHECK_MODULES([libblkmaker],[libblkmaker_jansson-0.1],[
  536. true
  537. ],[
  538. AC_MSG_ERROR([Could not find system libblkmaker])
  539. ])
  540. else
  541. save_LDFLAGS="$LDFLAGS"
  542. LDFLAGS="$LDFLAGS -Wl,-zorigin"
  543. origin_LDFLAGS=
  544. AC_MSG_CHECKING([whether the linker recognizes the -zorigin option])
  545. AC_TRY_LINK([],[],[
  546. AC_MSG_RESULT([yes])
  547. origin_LDFLAGS=',-zorigin'
  548. ],[
  549. AC_MSG_RESULT([no])
  550. ])
  551. LDFLAGS="$save_LDFLAGS"
  552. libblkmaker_CFLAGS='-Ilibblkmaker'
  553. libblkmaker_LDFLAGS='-Llibblkmaker/.libs -Wl,-rpath,\$$ORIGIN/libblkmaker/.libs'"$origin_LDFLAGS"
  554. libblkmaker_LIBS='-lblkmaker_jansson-0.1 -lblkmaker-0.1'
  555. AC_CONFIG_SUBDIRS([libblkmaker])
  556. fi
  557. AC_SUBST(libblkmaker_CFLAGS)
  558. AC_SUBST(libblkmaker_LDFLAGS)
  559. AC_SUBST(libblkmaker_LIBS)
  560. AM_CONDITIONAL([NEED_LIBBLKMAKER], [test x$with_system_libblkmaker != xyes])
  561. AM_CONDITIONAL([NEED_DYNCLOCK], [test x$icarus$modminer$x6500$ztex != xnonono])
  562. AM_CONDITIONAL([NEED_FPGAUTILS], [test x$need_fpgautils = xyes])
  563. AM_CONDITIONAL([HAS_SCRYPT], [test x$scrypt = xyes])
  564. AM_CONDITIONAL([HAVE_CURSES], [test x$curses = xyes])
  565. AM_CONDITIONAL([HAVE_SENSORS], [test x$with_sensors = xyes])
  566. AM_CONDITIONAL([HAVE_CYGWIN], [test x$have_cygwin = xtrue])
  567. AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
  568. AM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue])
  569. AM_CONDITIONAL([HAS_FPGA], [test x$bitforce$icarus$modminer$x6500$ztex != xnonononono])
  570. AM_CONDITIONAL([HAS_ASIC], [test x$avalon$bitforce$icarus$httpsrv != xnononono])
  571. dnl Find YASM
  572. has_yasm=false
  573. if test "x$have_x86_32$have_x86_64" != "xfalsefalse"; then
  574. AC_PATH_PROG([YASM],[yasm],[false])
  575. if test "x$YASM" != "xfalse" ; then
  576. AC_MSG_CHECKING([if yasm version is greater than 1.0.1])
  577. yasmver=`"$YASM" --version | head -1 | cut -d\ -f2`
  578. yamajor=`echo $yasmver | cut -d. -f1`
  579. yaminor=`echo $yasmver | cut -d. -f2`
  580. yamini=`echo $yasmver | cut -d. -f3`
  581. if test "$yamajor" -ge "1" ; then
  582. if test "$yamajor" -eq "1" ; then
  583. if test "$yaminor" -ge "0" ; then
  584. if test "$yaminor" -eq "0"; then
  585. if test "$yamini" -ge "1"; then
  586. has_yasm=true
  587. fi
  588. else
  589. has_yasm=true
  590. fi
  591. fi
  592. fi
  593. else
  594. has_yasm=false
  595. fi
  596. if test "x$has_yasm" = "xtrue" ; then
  597. AC_MSG_RESULT([yes])
  598. else
  599. AC_MSG_RESULT([no])
  600. fi
  601. fi
  602. if test "x$has_yasm" = "xfalse" ; then
  603. AC_MSG_NOTICE([yasm is required for the assembly algorithms. They will be skipped.])
  604. else
  605. AC_DEFINE([HAVE_YASM], [1], [Defined to 1 if yasm is being used])
  606. if test "x$have_win32$have_cygwin" != "xfalsefalse"; then
  607. if test "x$have_x86_64" = xtrue; then
  608. YASM_FMT="win64"
  609. else
  610. YASM_FMT="coff"
  611. fi
  612. elif test "x$have_macho" = "xtrue"; then
  613. YASM_FMT="macho$bitness"
  614. else
  615. YASM_FMT="elf$bitness"
  616. fi
  617. fi
  618. fi
  619. AM_CONDITIONAL([HAS_YASM], [test x$has_yasm = xtrue])
  620. have_sse2=no
  621. if test "x$cpumining$have_x86_32" = "xyestrue"; then
  622. AC_MSG_CHECKING([if SSE2 code compiles])
  623. save_CFLAGS="$CFLAGS"
  624. for flags in '' '-msse2'; do
  625. CFLAGS="$CFLAGS $flags"
  626. AC_TRY_LINK([
  627. #include <xmmintrin.h>
  628. ],[
  629. int *i = (int *)0xdeadbeef;
  630. __m128i a, b;
  631. a = _mm_set1_epi32(i[0]);
  632. b = _mm_set_epi32(i[0], i[1], i[2], i[3]);
  633. a = _mm_add_epi32(a, b);
  634. a = _mm_andnot_si128(a, b);
  635. a = _mm_or_si128(a, b);
  636. a = _mm_slli_epi32(a, i[4]);
  637. a = _mm_and_si128(a, b);
  638. a = _mm_xor_si128(a, b);
  639. ],[
  640. if test "x$flags" = "x"; then
  641. AC_MSG_RESULT([yes])
  642. else
  643. AC_MSG_RESULT([with $flags])
  644. fi
  645. SSE2_CFLAGS="$flags"
  646. have_sse2=yes
  647. break
  648. ],[
  649. true
  650. ])
  651. done
  652. CFLAGS="${save_CFLAGS}"
  653. if test "x$have_sse2" = "xyes"; then
  654. AC_DEFINE([HAVE_SSE2], [1], [Defined to 1 if yasm is being used])
  655. else
  656. AC_MSG_RESULT([no])
  657. fi
  658. fi
  659. AM_CONDITIONAL([HAVE_SSE2], [test "x$have_sse2" = "xyes"])
  660. if test "x$bitforce$modminer$icarus" != "xnonono"; then
  661. AC_ARG_WITH([libudev], [AC_HELP_STRING([--without-libudev], [Autodetect FPGAs using libudev (default enabled)])],
  662. [libudev=$withval],
  663. [libudev=auto]
  664. )
  665. if test "x$libudev" != "xno"; then
  666. AC_CHECK_HEADER([libudev.h],[
  667. libudev=yes
  668. UDEV_LIBS=-ludev
  669. AC_DEFINE([HAVE_LIBUDEV], [1], [Defined to 1 if libudev is wanted])
  670. ], [
  671. if test "x$libudev" = "xyes"; then
  672. AC_MSG_ERROR([libudev not found])
  673. fi
  674. libudev=no
  675. ])
  676. fi
  677. fi
  678. AM_CONDITIONAL([HAVE_LIBUDEV], [test x$libudev != xno])
  679. AC_SUBST(LIBUSB_LIBS)
  680. AC_SUBST(LIBUSB_CFLAGS)
  681. PKG_CHECK_MODULES([LIBCURL], [libcurl >= 7.18.2], ,[AC_MSG_ERROR([Missing required libcurl dev >= 7.18.2])])
  682. if echo "$LIBCURL_CFLAGS" | grep '@CPPFLAG_CURL_STATICLIB@' >/dev/null 2>&1; then
  683. AC_MSG_WARN([Your libcurl pkgconfig file is broken, applying workaround])
  684. LIBCURL_CFLAGS=`echo "$LIBCURL_CFLAGS" | sed 's/@CPPFLAG_CURL_STATICLIB@//'`
  685. fi
  686. AC_SUBST(LIBCURL_LIBS)
  687. AC_CHECK_FUNCS([setrlimit])
  688. dnl CCAN wants to know a lot of vars.
  689. # All the configuration checks. Regrettably, the __attribute__ checks will
  690. # give false positives on old GCCs, since they just cause warnings. But that's
  691. # fairly harmless.
  692. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((cold)) cleanup(void) { }])],
  693. AC_DEFINE([HAVE_ATTRIBUTE_COLD], [1],
  694. [Define if __attribute__((cold))]))
  695. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((const)) cleanup(void) { }])],
  696. AC_DEFINE([HAVE_ATTRIBUTE_CONST], [1],
  697. [Define if __attribute__((const))]))
  698. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((noreturn)) cleanup(void) { exit(1); }])],
  699. [
  700. AC_DEFINE([HAVE_ATTRIBUTE_NORETURN], [1],
  701. [Define if __attribute__((noreturn))])
  702. AC_DEFINE_UNQUOTED([NORETURN], [__attribute__((noreturn))], [Syntax of noreturn attribute])
  703. ], [
  704. AC_DEFINE_UNQUOTED([NORETURN], [])
  705. ]
  706. )
  707. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((format(__printf__, 1, 2))) cleanup(const char *fmt, ...) { }])],
  708. AC_DEFINE([HAVE_ATTRIBUTE_PRINTF], [1],
  709. [Define if __attribute__((format(__printf__)))]))
  710. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((unused)) cleanup(void) { }])],
  711. AC_DEFINE([HAVE_ATTRIBUTE_UNUSED], [1],
  712. [Define if __attribute__((unused))]))
  713. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((used)) cleanup(void) { }])],
  714. AC_DEFINE([HAVE_ATTRIBUTE_USED], [1],
  715. [Define if __attribute__((used))]))
  716. AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return __builtin_constant_p(1) ? 0 : 1; }])],
  717. AC_DEFINE([HAVE_BUILTIN_CONSTANT_P], [1],
  718. [Define if have __builtin_constant_p]))
  719. AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return __builtin_types_compatible_p(char *, int) ? 1 : 0; }])],
  720. AC_DEFINE([HAVE_BUILTIN_TYPES_COMPATIBLE_P], [1],
  721. [Define if have __builtin_types_compatible_p]))
  722. AC_COMPILE_IFELSE([AC_LANG_SOURCE([static int __attribute__((warn_unused_result)) func(int x) { return x; }])],
  723. AC_DEFINE([HAVE_WARN_UNUSED_RESULT], [1],
  724. [Define if __attribute__((warn_unused_result))]))
  725. AC_MSG_CHECKING([for roundl function])
  726. save_LIBS="${LIBS}"
  727. LIBS="$LIBS -lm"
  728. AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  729. #include <math.h>
  730. ]], [[
  731. return (roundl(*(long double *)0xdeadbeef) == 1.0);
  732. ]])], [
  733. AC_MSG_RESULT([yes])
  734. ], [
  735. AC_MSG_RESULT([no])
  736. AC_DEFINE([NEED_ROUNDL], [1], [Defined to 1 if C99 roundl is missing])
  737. ])
  738. LIBS="${save_LIBS}"
  739. # byteswap functions
  740. AH_TEMPLATE([HAVE_BYTESWAP_H], [Define to use byteswap macros from byteswap.h])
  741. AH_TEMPLATE([HAVE_ENDIAN_H], [Define to use byteswap macros from endian.h])
  742. AH_TEMPLATE([HAVE_SYS_ENDIAN_H], [Define to use byteswap macros from sys/endian.h])
  743. AH_TEMPLATE([HAVE_LIBKERN_OSBYTEORDER_H], [Define to use byteswap macros from libkern/OSByteOrder.h])
  744. BSWAP=''
  745. for sym in bswap_ __builtin_bswap __bswap_ __swap swap OSSwapInt; do
  746. AC_MSG_CHECKING([for ${sym}* functions])
  747. for headerfile in '' byteswap.h endian.h sys/endian.h libkern/OSByteOrder.h; do
  748. BFG_INCLUDE([headerinclude], [${headerfile}])
  749. AC_LINK_IFELSE([
  750. AC_LANG_PROGRAM([
  751. ${headerinclude}
  752. ], [
  753. (void) ${sym}16(0);
  754. (void) ${sym}32(0);
  755. (void) ${sym}64(0);
  756. ])
  757. ], [
  758. BSWAP="${sym}"
  759. if test "x${headerfile}" = "x"; then
  760. AC_MSG_RESULT([yes])
  761. else
  762. AC_MSG_RESULT([found in ${headerfile}])
  763. AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$headerfile]), 1)
  764. fi
  765. break 2
  766. ])
  767. done
  768. AC_MSG_RESULT([no])
  769. done
  770. if test "x$BSWAP" = "x"; then
  771. true # Substitutes are provided in miner.h
  772. elif test "x$BSWAP" = "xbswap_"; then
  773. AC_MSG_CHECKING([if bswap_16 is already a macro])
  774. BFG_PREPROC_IFELSE([defined(bswap_16)], $headerfile, [
  775. AC_MSG_RESULT([yes])
  776. BSWAP=""
  777. ],[
  778. AC_MSG_RESULT([no])
  779. ])
  780. fi
  781. if test "x$BSWAP" != "x"; then
  782. AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, [Define to 16-bit byteswap macro])
  783. AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, [Define to 16-bit byteswap macro])
  784. AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, [Define to 16-bit byteswap macro])
  785. fi
  786. # endian definition macros
  787. AC_MSG_CHECKING([for platform endian])
  788. found_endian=no
  789. for headerfile in '' endian.h sys/endian.h sys/param.h; do
  790. for pfx in '' '__'; do
  791. BFG_PREPROC_IFELSE([defined(${pfx}BYTE_ORDER) && defined(${pfx}BIG_ENDIAN) && defined(${pfx}LITTLE_ENDIAN) && (${pfx}BYTE_ORDER == ${pfx}BIG_ENDIAN || ${pfx}BYTE_ORDER == ${pfx}LITTLE_ENDIAN)], ${headerfile}, [
  792. if test "x$headerfile" = "x"; then
  793. headerfilec=''
  794. else
  795. headerfilec=" (${headerfile})"
  796. fi
  797. BFG_PREPROC_IFELSE([${pfx}BYTE_ORDER == ${pfx}BIG_ENDIAN], ${headerfile}, [
  798. AC_MSG_RESULT([big endian${headerfilec}])
  799. AC_DEFINE(WORDS_BIGENDIAN, 1, [Define if your platform is big endian])
  800. ], [
  801. AC_MSG_RESULT([little endian${headerfilec}])
  802. ])
  803. found_endian=yes
  804. break 2
  805. ],[true])
  806. done
  807. done
  808. if test "x$found_endian" = "xno"; then
  809. if $have_win32 || $have_cygwin; then
  810. AC_MSG_RESULT([assuming little endian (Windows)])
  811. else
  812. # AC_C_BIGENDIAN is reported to have problems, and invasive even if buried in a conditional, so don't use it
  813. AC_MSG_RESULT([unknown])
  814. AC_MSG_ERROR([Unable to identify platform endian])
  815. fi
  816. fi
  817. AC_MSG_CHECKING([if GNU format attribute compiles])
  818. AC_TRY_COMPILE([
  819. #define FORMAT_SYNTAX_CHECK(...) __attribute__(( format(__VA_ARGS__) ))
  820. int myfunc(char *fmt, ...) FORMAT_SYNTAX_CHECK(printf, 1, 2);
  821. int myfunc(char *fmt, ...) {
  822. return 42;
  823. }
  824. ], [
  825. myfunc("abc%d", 42);
  826. ], [
  827. AC_MSG_RESULT([yes])
  828. AC_DEFINE_UNQUOTED([FORMAT_SYNTAX_CHECK(...)], [__attribute__(( format(__VA_ARGS__) ))], [Syntax of format-checking attribute])
  829. ], [
  830. AC_MSG_RESULT([no])
  831. AC_DEFINE_UNQUOTED([FORMAT_SYNTAX_CHECK(...)], [])
  832. ])
  833. AC_MSG_CHECKING([for clock_gettime(CLOCK_MONOTONIC)])
  834. AC_TRY_COMPILE([
  835. #define _GNU_SOURCE
  836. #include <time.h>
  837. ],[
  838. struct timespec ts;
  839. clock_gettime(CLOCK_MONOTONIC, &ts);
  840. ],[
  841. AC_MSG_RESULT([yes])
  842. AC_DEFINE([HAVE_CLOCK_GETTIME_MONOTONIC], [1], [Defined to 1 if clock_gettime(CLOCK_MONOTONIC) is defined])
  843. save_LIBS="${LIBS}"
  844. AC_SEARCH_LIBS([clock_gettime],[rt posix4],[
  845. if test "x${ac_cv_search_clock_gettime}" != "xnone required"; then
  846. RT_LIBS="${ac_cv_search_clock_gettime}"
  847. fi
  848. ])
  849. LIBS="${save_LIBS}"
  850. AC_CHECK_FUNCS([clock_nanosleep])
  851. AC_MSG_CHECKING([for clock_gettime(CLOCK_MONOTONIC_RAW)])
  852. AC_TRY_COMPILE([
  853. #define _GNU_SOURCE
  854. #include <time.h>
  855. ],[
  856. struct timespec ts;
  857. clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
  858. ],[
  859. AC_MSG_RESULT([yes])
  860. AC_DEFINE([HAVE_CLOCK_GETTIME_MONOTONIC_RAW], [1], [Defined to 1 if clock_gettime(CLOCK_MONOTONIC_RAW) is defined])
  861. ],[
  862. AC_MSG_RESULT([no])
  863. ])
  864. ],[
  865. AC_MSG_RESULT([no])
  866. ])
  867. if test "x$prefix" = xNONE; then
  868. prefix=/usr/local
  869. fi
  870. AM_CONDITIONAL([NEED_BITSTREAM_FPGAMINER], [test x$modminer$x6500 != xnono])
  871. AC_DEFINE_UNQUOTED([PHATK_KERNNAME], ["phatk121016"], [Filename for phatk kernel])
  872. AC_DEFINE_UNQUOTED([POCLBM_KERNNAME], ["poclbm130302"], [Filename for poclbm kernel])
  873. AC_DEFINE_UNQUOTED([DIAKGCN_KERNNAME], ["diakgcn121016"], [Filename for diakgcn kernel])
  874. AC_DEFINE_UNQUOTED([DIABLO_KERNNAME], ["diablo130302"], [Filename for diablo kernel])
  875. AC_DEFINE_UNQUOTED([SCRYPT_KERNNAME], ["scrypt130511"], [Filename for scrypt kernel])
  876. AC_SUBST(PTHREAD_FLAGS)
  877. AC_SUBST(DLOPEN_FLAGS)
  878. AC_SUBST(PTHREAD_LIBS)
  879. AC_SUBST(NCURSES_CPPFLAGS)
  880. AC_SUBST(NCURSES_LIBS)
  881. AC_SUBST(PDCURSES_LIBS)
  882. AC_SUBST(WS2_LIBS)
  883. AC_SUBST(MM_LIBS)
  884. AC_SUBST(MATH_LIBS)
  885. AC_SUBST(RT_LIBS)
  886. AC_SUBST(UDEV_LIBS)
  887. AC_SUBST(SSE2_CFLAGS)
  888. AC_SUBST(YASM_FMT)
  889. AC_CONFIG_FILES([
  890. Makefile
  891. x86_64/Makefile
  892. x86_32/Makefile
  893. ccan/Makefile
  894. lib/Makefile
  895. ])
  896. AC_OUTPUT
  897. echo
  898. echo
  899. echo
  900. echo "------------------------------------------------------------------------"
  901. echo "$PACKAGE $VERSION"
  902. echo "------------------------------------------------------------------------"
  903. echo
  904. echo
  905. echo "Configuration Options Summary:"
  906. echo
  907. echo " curses.TUI...........: $cursesmsg"
  908. if test "x$scrypt" != xno; then
  909. echo " scrypt...............: Enabled"
  910. else
  911. echo " scrypt...............: Disabled"
  912. fi
  913. echo
  914. if test "x$opencl" = xyes; then
  915. echo " OpenCL...............: Enabled"
  916. else
  917. echo " OpenCL...............: Disabled"
  918. fi
  919. if test "x$with_sensors" = xyes; then
  920. echo " sensors.monitoring.: Enabled"
  921. elif test "x$opencl" = xyes; then
  922. echo " sensors.monitoring.: Disabled"
  923. else
  924. echo " sensors.monitoring.: n/a"
  925. fi
  926. if test "x$adl" = xyes; then
  927. echo " ADL.monitoring.....: Enabled"
  928. elif test "x$opencl" = xyes; then
  929. echo " ADL.monitoring.....: Disabled"
  930. else
  931. echo " ADL.monitoring.....: n/a"
  932. fi
  933. if test "x$avalon" = xyes; then
  934. echo " Avalon.ASICs.........: Enabled"
  935. else
  936. echo " Avalon.ASICs.........: Disabled"
  937. fi
  938. if test "x$bitforce" = xyes; then
  939. echo " BitForce.devices.....: Enabled"
  940. else
  941. echo " BitForce.devices.....: Disabled"
  942. fi
  943. if test "x$icarus" = xyes; then
  944. echo " Icarus.FPGAs.........: Enabled"
  945. else
  946. echo " Icarus.FPGAs.........: Disabled"
  947. fi
  948. if test "x$modminer" = xyes; then
  949. echo " ModMiner.FPGAs.......: Enabled"
  950. else
  951. echo " ModMiner.FPGAs.......: Disabled"
  952. fi
  953. if test "x$x6500" = xyes; then
  954. echo " X6500.FPGAs..........: Enabled"
  955. elif test "x$ztexwarn" = xyes; then
  956. echo " X6500.FPGAs..........: Disabled (libusb not found)"
  957. else
  958. echo " X6500.FPGAs..........: Disabled"
  959. fi
  960. if test "x$ztex" = xyes; then
  961. echo " ZTEX.FPGAs...........: Enabled"
  962. elif test "x$ztexwarn" = xyes; then
  963. echo " ZTEX.FPGAs...........: Disabled (libusb not found)"
  964. else
  965. echo " ZTEX.FPGAs...........: Disabled"
  966. fi
  967. if test "x$httpsrv" = "xyes"; then
  968. echo " getwork.proxy.server.: Enabled"
  969. else
  970. echo " getwork.proxy.server.: Disabled"
  971. fi
  972. if test "x$bitforce$modminer" != xnono; then
  973. echo " libudev.detection....: $libudev"
  974. fi
  975. echo
  976. if test "x$cpumining" = xyes; then
  977. echo " CPU Mining...........: Enabled"
  978. echo " ASM.(for CPU mining).: $has_yasm"
  979. else
  980. echo " CPU Mining...........: Disabled"
  981. fi
  982. echo
  983. echo "Compilation............: make (or gmake)"
  984. echo " CFLAGS...............: $CPPFLAGS $NCURSES_CPPFLAGS $PTHREAD_FLAGS $CFLAGS $LIBUSB_CFLAGS $JANSSON_CFLAGS $PTHREAD_FLAGS $libblkmaker_CFLAGS"
  985. echo " LDFLAGS..............: $LDFLAGS $PTHREAD_FLAGS $libblkmaker_LDFLAGS $PTHREAD_LIBS $LIBS $DLOPEN_FLAGS $LIBCURL_LIBS $JANSSON_LIBS $NCURSES_LIBS $PDCURSES_LIBS $WS2_LIBS $MATH_LIBS $UDEV_LIBS $LIBUSB_LIBS $RT_LIBS $sensors_LIBS $libblkmaker_LIBS"
  986. echo
  987. echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
  988. echo " prefix...............: $prefix"
  989. echo