configure.ac 31 KB

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