configure.ac 31 KB

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