configure.ac 31 KB

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