configure.ac 29 KB

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