configure.ac 32 KB

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