configure.ac 31 KB

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