configure.ac 30 KB

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