configure.ac 31 KB

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