configure.ac 30 KB

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