Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

configure.ac 45KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314
  1. dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
  2. AC_PREREQ([2.60])
  3. define(_CLIENT_VERSION_MAJOR, 0)
  4. define(_CLIENT_VERSION_MINOR, 15)
  5. define(_CLIENT_VERSION_REVISION, 1)
  6. define(_CLIENT_VERSION_BUILD, 0)
  7. define(_CLIENT_VERSION_IS_RELEASE, true)
  8. define(_COPYRIGHT_YEAR, 2017)
  9. define(_COPYRIGHT_HOLDERS,[The %s developers])
  10. define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Starwels]])
  11. AC_INIT([Starwels],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[starwels],[https://github.com/starwels/])
  12. AC_CONFIG_SRCDIR([src/validation.cpp])
  13. AC_CONFIG_HEADERS([src/config/starwels-config.h])
  14. AC_CONFIG_AUX_DIR([build-aux])
  15. AC_CONFIG_MACRO_DIR([build-aux/m4])
  16. STARWELS_DAEMON_NAME=starwelsd
  17. STARWELS_GUI_NAME=starwels-qt
  18. STARWELS_CLI_NAME=starwels-cli
  19. STARWELS_TX_NAME=starwels-tx
  20. dnl Unless the user specified ARFLAGS, force it to be cr
  21. AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])
  22. if test "x${ARFLAGS+set}" != "xset"; then
  23. ARFLAGS="cr"
  24. fi
  25. AC_CANONICAL_HOST
  26. AH_TOP([#ifndef STARWELS_CONFIG_H])
  27. AH_TOP([#define STARWELS_CONFIG_H])
  28. AH_BOTTOM([#endif //STARWELS_CONFIG_H])
  29. dnl faketime breaks configure and is only needed for make. Disable it here.
  30. unset FAKETIME
  31. dnl Automake init set-up and checks
  32. AM_INIT_AUTOMAKE([no-define subdir-objects foreign])
  33. dnl faketime messes with timestamps and causes configure to be re-run.
  34. dnl --disable-maintainer-mode can be used to bypass this.
  35. AM_MAINTAINER_MODE([enable])
  36. dnl make the compilation flags quiet unless V=1 is used
  37. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  38. dnl Compiler checks (here before libtool).
  39. if test "x${CXXFLAGS+set}" = "xset"; then
  40. CXXFLAGS_overridden=yes
  41. else
  42. CXXFLAGS_overridden=no
  43. fi
  44. AC_PROG_CXX
  45. dnl By default, libtool for mingw refuses to link static libs into a dll for
  46. dnl fear of mixing pic/non-pic objects, and import/export complications. Since
  47. dnl we have those under control, re-enable that functionality.
  48. case $host in
  49. *mingw*)
  50. lt_cv_deplibs_check_method="pass_all"
  51. ;;
  52. esac
  53. dnl Require C++11 compiler (no GNU extensions)
  54. AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault])
  55. dnl Check if -latomic is required for <std::atomic>
  56. CHECK_ATOMIC
  57. dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
  58. dnl that we get the same -std flags for both.
  59. m4_ifdef([AC_PROG_OBJCXX],[
  60. if test "x${OBJCXX+set}" = "x"; then
  61. OBJCXX="${CXX}"
  62. fi
  63. AC_PROG_OBJCXX
  64. ])
  65. dnl Libtool init checks.
  66. LT_INIT([pic-only])
  67. dnl Check/return PATH for base programs.
  68. AC_PATH_TOOL(AR, ar)
  69. AC_PATH_TOOL(RANLIB, ranlib)
  70. AC_PATH_TOOL(STRIP, strip)
  71. AC_PATH_TOOL(GCOV, gcov)
  72. AC_PATH_PROG(LCOV, lcov)
  73. dnl Python 3.x is supported from 3.4 on (see https://github.com/bitcoin/bitcoin/issues/7893)
  74. AC_PATH_PROGS([PYTHON], [python3.6 python3.5 python3.4 python3 python2.7 python2 python])
  75. AC_PATH_PROG(GENHTML, genhtml)
  76. AC_PATH_PROG([GIT], [git])
  77. AC_PATH_PROG(CCACHE,ccache)
  78. AC_PATH_PROG(XGETTEXT,xgettext)
  79. AC_PATH_PROG(HEXDUMP,hexdump)
  80. AC_PATH_TOOL(READELF, readelf)
  81. AC_PATH_TOOL(CPPFILT, c++filt)
  82. AC_PATH_TOOL(OBJCOPY, objcopy)
  83. AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files)
  84. # Enable wallet
  85. AC_ARG_ENABLE([wallet],
  86. [AS_HELP_STRING([--disable-wallet],
  87. [disable wallet (enabled by default)])],
  88. [enable_wallet=$enableval],
  89. [enable_wallet=yes])
  90. AC_ARG_WITH([miniupnpc],
  91. [AS_HELP_STRING([--with-miniupnpc],
  92. [enable UPNP (default is yes if libminiupnpc is found)])],
  93. [use_upnp=$withval],
  94. [use_upnp=auto])
  95. AC_ARG_ENABLE([upnp-default],
  96. [AS_HELP_STRING([--enable-upnp-default],
  97. [if UPNP is enabled, turn it on at startup (default is no)])],
  98. [use_upnp_default=$enableval],
  99. [use_upnp_default=no])
  100. AC_ARG_ENABLE(tests,
  101. AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
  102. [use_tests=$enableval],
  103. [use_tests=yes])
  104. AC_ARG_ENABLE(gui-tests,
  105. AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
  106. [use_gui_tests=$enableval],
  107. [use_gui_tests=$use_tests])
  108. AC_ARG_ENABLE(bench,
  109. AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
  110. [use_bench=$enableval],
  111. [use_bench=yes])
  112. AC_ARG_ENABLE([extended-functional-tests],
  113. AS_HELP_STRING([--enable-extended-functional-tests],[enable expensive functional tests when using lcov (default no)]),
  114. [use_extended_functional_tests=$enableval],
  115. [use_extended_functional_tests=no])
  116. AC_ARG_WITH([qrencode],
  117. [AS_HELP_STRING([--with-qrencode],
  118. [enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
  119. [use_qr=$withval],
  120. [use_qr=auto])
  121. AC_ARG_ENABLE([hardening],
  122. [AS_HELP_STRING([--disable-hardening],
  123. [do not attempt to harden the resulting executables (default is to harden)])],
  124. [use_hardening=$enableval],
  125. [use_hardening=yes])
  126. AC_ARG_ENABLE([reduce-exports],
  127. [AS_HELP_STRING([--enable-reduce-exports],
  128. [attempt to reduce exported symbols in the resulting executables (default is no)])],
  129. [use_reduce_exports=$enableval],
  130. [use_reduce_exports=no])
  131. AC_ARG_ENABLE([ccache],
  132. [AS_HELP_STRING([--disable-ccache],
  133. [do not use ccache for building (default is to use if found)])],
  134. [use_ccache=$enableval],
  135. [use_ccache=auto])
  136. AC_ARG_ENABLE([lcov],
  137. [AS_HELP_STRING([--enable-lcov],
  138. [enable lcov testing (default is no)])],
  139. [use_lcov=yes],
  140. [use_lcov=no])
  141. AC_ARG_ENABLE([lcov-branch-coverage],
  142. [AS_HELP_STRING([--enable-lcov-branch-coverage],
  143. [enable lcov testing branch coverage (default is no)])],
  144. [use_lcov_branch=yes],
  145. [use_lcov_branch=no])
  146. AC_ARG_ENABLE([glibc-back-compat],
  147. [AS_HELP_STRING([--enable-glibc-back-compat],
  148. [enable backwards compatibility with glibc])],
  149. [use_glibc_compat=$enableval],
  150. [use_glibc_compat=no])
  151. AC_ARG_ENABLE([experimental-asm],
  152. [AS_HELP_STRING([--enable-experimental-asm],
  153. [Enable experimental assembly routines (default is no)])],
  154. [experimental_asm=$enableval],
  155. [experimental_asm=no])
  156. if test "x$experimental_asm" = xyes; then
  157. AC_DEFINE(EXPERIMENTAL_ASM, 1, [Define this symbol to build in experimental assembly routines])
  158. fi
  159. AC_ARG_WITH([system-univalue],
  160. [AS_HELP_STRING([--with-system-univalue],
  161. [Build with system UniValue (default is no)])],
  162. [system_univalue=$withval],
  163. [system_univalue=no]
  164. )
  165. AC_ARG_ENABLE([zmq],
  166. [AS_HELP_STRING([--disable-zmq],
  167. [disable ZMQ notifications])],
  168. [use_zmq=$enableval],
  169. [use_zmq=yes])
  170. AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
  171. AC_ARG_ENABLE(man,
  172. [AS_HELP_STRING([--disable-man],
  173. [do not install man pages (default is to install)])],,
  174. enable_man=yes)
  175. AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
  176. # Enable debug
  177. AC_ARG_ENABLE([debug],
  178. [AS_HELP_STRING([--enable-debug],
  179. [use debug compiler flags and macros (default is no)])],
  180. [enable_debug=$enableval],
  181. [enable_debug=no])
  182. # Turn warnings into errors
  183. AC_ARG_ENABLE([werror],
  184. [AS_HELP_STRING([--enable-werror],
  185. [Treat certain compiler warnings as errors (default is no)])],
  186. [enable_werror=$enableval],
  187. [enable_werror=no])
  188. AC_LANG_PUSH([C++])
  189. AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])
  190. if test "x$enable_debug" = xyes; then
  191. CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
  192. if test "x$GCC" = xyes; then
  193. CFLAGS="$CFLAGS -g3 -O0"
  194. fi
  195. if test "x$GXX" = xyes; then
  196. CXXFLAGS="$CXXFLAGS -g3 -O0"
  197. fi
  198. fi
  199. ERROR_CXXFLAGS=
  200. if test "x$enable_werror" = "xyes"; then
  201. if test "x$CXXFLAG_WERROR" = "x"; then
  202. AC_MSG_ERROR("enable-werror set but -Werror is not usable")
  203. fi
  204. AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
  205. fi
  206. if test "x$CXXFLAGS_overridden" = "xno"; then
  207. AX_CHECK_COMPILE_FLAG([-Wall],[CXXFLAGS="$CXXFLAGS -Wall"],,[[$CXXFLAG_WERROR]])
  208. AX_CHECK_COMPILE_FLAG([-Wextra],[CXXFLAGS="$CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]])
  209. AX_CHECK_COMPILE_FLAG([-Wformat],[CXXFLAGS="$CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]])
  210. AX_CHECK_COMPILE_FLAG([-Wvla],[CXXFLAGS="$CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
  211. AX_CHECK_COMPILE_FLAG([-Wformat-security],[CXXFLAGS="$CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
  212. ## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
  213. ## unknown options if any other warning is produced. Test the -Wfoo case, and
  214. ## set the -Wno-foo case if it works.
  215. AX_CHECK_COMPILE_FLAG([-Wunused-parameter],[CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"],,[[$CXXFLAG_WERROR]])
  216. AX_CHECK_COMPILE_FLAG([-Wself-assign],[CXXFLAGS="$CXXFLAGS -Wno-self-assign"],,[[$CXXFLAG_WERROR]])
  217. AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
  218. AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]])
  219. AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]])
  220. fi
  221. # Check for optional instruction set support. Enabling these does _not_ imply that all code will
  222. # be compiled with them, rather that specific objects/libs may use them after checking for runtime
  223. # compatibility.
  224. AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]])
  225. TEMP_CXXFLAGS="$CXXFLAGS"
  226. CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS"
  227. AC_MSG_CHECKING(for assembler crc32 support)
  228. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  229. #include <stdint.h>
  230. #if defined(_MSC_VER)
  231. #include <intrin.h>
  232. #elif defined(__GNUC__) && defined(__SSE4_2__)
  233. #include <nmmintrin.h>
  234. #endif
  235. ]],[[
  236. uint64_t l = 0;
  237. l = _mm_crc32_u8(l, 0);
  238. l = _mm_crc32_u32(l, 0);
  239. l = _mm_crc32_u64(l, 0);
  240. return l;
  241. ]])],
  242. [ AC_MSG_RESULT(yes); enable_hwcrc32=yes],
  243. [ AC_MSG_RESULT(no)]
  244. )
  245. CXXFLAGS="$TEMP_CXXFLAGS"
  246. CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
  247. AC_ARG_WITH([utils],
  248. [AS_HELP_STRING([--with-utils],
  249. [build starwels-cli starwels-tx (default=yes)])],
  250. [build_starwels_utils=$withval],
  251. [build_starwels_utils=yes])
  252. AC_ARG_WITH([libs],
  253. [AS_HELP_STRING([--with-libs],
  254. [build libraries (default=yes)])],
  255. [build_starwels_libs=$withval],
  256. [build_starwels_libs=yes])
  257. AC_ARG_WITH([daemon],
  258. [AS_HELP_STRING([--with-daemon],
  259. [build starwelsd daemon (default=yes)])],
  260. [build_starwelsd=$withval],
  261. [build_starwelsd=yes])
  262. use_pkgconfig=yes
  263. case $host in
  264. *mingw*)
  265. #pkgconfig does more harm than good with MinGW
  266. use_pkgconfig=no
  267. TARGET_OS=windows
  268. AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(lib missing))
  269. AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(lib missing))
  270. AC_CHECK_LIB([user32], [main],, AC_MSG_ERROR(lib missing))
  271. AC_CHECK_LIB([gdi32], [main],, AC_MSG_ERROR(lib missing))
  272. AC_CHECK_LIB([comdlg32], [main],, AC_MSG_ERROR(lib missing))
  273. AC_CHECK_LIB([winspool], [main],, AC_MSG_ERROR(lib missing))
  274. AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(lib missing))
  275. AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(lib missing))
  276. AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(lib missing))
  277. AC_CHECK_LIB([ole32], [main],, AC_MSG_ERROR(lib missing))
  278. AC_CHECK_LIB([oleaut32], [main],, AC_MSG_ERROR(lib missing))
  279. AC_CHECK_LIB([uuid], [main],, AC_MSG_ERROR(lib missing))
  280. AC_CHECK_LIB([rpcrt4], [main],, AC_MSG_ERROR(lib missing))
  281. AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(lib missing))
  282. AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(lib missing))
  283. AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(lib missing))
  284. AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(lib missing))
  285. AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing))
  286. AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(lib missing))
  287. # -static is interpreted by libtool, where it has a different meaning.
  288. # In libtool-speak, it's -all-static.
  289. AX_CHECK_LINK_FLAG([[-static]],[LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"])
  290. AC_PATH_PROG([MAKENSIS], [makensis], none)
  291. if test x$MAKENSIS = xnone; then
  292. AC_MSG_WARN("makensis not found. Cannot create installer.")
  293. fi
  294. AC_PATH_TOOL(WINDRES, windres, none)
  295. if test x$WINDRES = xnone; then
  296. AC_MSG_ERROR("windres not found")
  297. fi
  298. CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
  299. LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
  300. if test "x$CXXFLAGS_overridden" = "xno"; then
  301. CXXFLAGS="$CXXFLAGS -w"
  302. fi
  303. case $host in
  304. i?86-*) WINDOWS_BITS=32 ;;
  305. x86_64-*) WINDOWS_BITS=64 ;;
  306. *) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;;
  307. esac
  308. AC_SUBST(WINDOWS_BITS)
  309. dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
  310. dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override
  311. dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are
  312. dnl also overridden to prevent their insertion later.
  313. dnl This should only affect dll's.
  314. archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
  315. postdeps_CXX=
  316. ;;
  317. *darwin*)
  318. TARGET_OS=darwin
  319. LEVELDB_TARGET_FLAGS="-DOS_MACOSX"
  320. if test x$cross_compiling != xyes; then
  321. BUILD_OS=darwin
  322. AC_CHECK_PROG([PORT],port, port)
  323. if test x$PORT = xport; then
  324. dnl add default macports paths
  325. CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
  326. LIBS="$LIBS -L/opt/local/lib"
  327. if test -d /opt/local/include/db48; then
  328. CPPFLAGS="$CPPFLAGS -I/opt/local/include/db48"
  329. LIBS="$LIBS -L/opt/local/lib/db48"
  330. fi
  331. fi
  332. AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
  333. AC_CHECK_PROG([BREW],brew, brew)
  334. if test x$BREW = xbrew; then
  335. dnl These Homebrew packages may be keg-only, meaning that they won't be found
  336. dnl in expected paths because they may conflict with system files. Ask
  337. dnl Homebrew where each one is located, then adjust paths accordingly.
  338. dnl It's safe to add these paths even if the functionality is disabled by
  339. dnl the user (--without-wallet or --without-gui for example).
  340. openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
  341. bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
  342. qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
  343. if test x$openssl_prefix != x; then
  344. PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
  345. export PKG_CONFIG_PATH
  346. fi
  347. if test x$bdb_prefix != x; then
  348. CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
  349. LIBS="$LIBS -L$bdb_prefix/lib"
  350. fi
  351. if test x$qt5_prefix != x; then
  352. PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
  353. export PKG_CONFIG_PATH
  354. fi
  355. fi
  356. else
  357. case $build_os in
  358. *darwin*)
  359. BUILD_OS=darwin
  360. ;;
  361. *)
  362. AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
  363. AC_PATH_TOOL([OTOOL], [otool], otool)
  364. AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
  365. AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
  366. AC_PATH_PROGS([IMAGEMAGICK_CONVERT], [convert],convert)
  367. AC_PATH_PROGS([TIFFCP], [tiffcp],tiffcp)
  368. dnl libtool will try to strip the static lib, which is a problem for
  369. dnl cross-builds because strip attempts to call a hard-coded ld,
  370. dnl which may not exist in the path. Stripping the .a is not
  371. dnl necessary, so just disable it.
  372. old_striplib=
  373. ;;
  374. esac
  375. fi
  376. AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"])
  377. CPPFLAGS="$CPPFLAGS -DMAC_OSX"
  378. OBJCXXFLAGS="$CXXFLAGS"
  379. ;;
  380. *linux*)
  381. TARGET_OS=linux
  382. LEVELDB_TARGET_FLAGS="-DOS_LINUX"
  383. ;;
  384. *freebsd*)
  385. LEVELDB_TARGET_FLAGS="-DOS_FREEBSD"
  386. ;;
  387. *openbsd*)
  388. LEVELDB_TARGET_FLAGS="-DOS_OPENBSD"
  389. ;;
  390. *)
  391. OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
  392. AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])
  393. LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}"
  394. ;;
  395. esac
  396. if test x$use_pkgconfig = xyes; then
  397. m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)])
  398. m4_ifdef([PKG_PROG_PKG_CONFIG], [
  399. PKG_PROG_PKG_CONFIG
  400. if test x"$PKG_CONFIG" = "x"; then
  401. AC_MSG_ERROR(pkg-config not found.)
  402. fi
  403. ])
  404. fi
  405. if test x$use_extended_functional_tests != xno; then
  406. AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended)
  407. fi
  408. if test x$use_lcov = xyes; then
  409. if test x$LCOV = x; then
  410. AC_MSG_ERROR("lcov testing requested but lcov not found")
  411. fi
  412. if test x$GCOV = x; then
  413. AC_MSG_ERROR("lcov testing requested but gcov not found")
  414. fi
  415. if test x$PYTHON = x; then
  416. AC_MSG_ERROR("lcov testing requested but python not found")
  417. fi
  418. if test x$GENHTML = x; then
  419. AC_MSG_ERROR("lcov testing requested but genhtml not found")
  420. fi
  421. LCOV="$LCOV --gcov-tool=$GCOV"
  422. AX_CHECK_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"],
  423. [AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
  424. AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
  425. [AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
  426. AC_DEFINE(USE_COVERAGE, 1, [Define this symbol if coverage is enabled])
  427. CXXFLAGS="$CXXFLAGS -Og"
  428. fi
  429. if test x$use_lcov_branch != xno; then
  430. AC_SUBST(LCOV_OPTS, "$LCOV_OPTS --rc lcov_branch_coverage=1")
  431. fi
  432. dnl Check for endianness
  433. AC_C_BIGENDIAN
  434. dnl Check for pthread compile/link requirements
  435. AX_PTHREAD
  436. # The following macro will add the necessary defines to starwels-config.h, but
  437. # they also need to be passed down to any subprojects. Pull the results out of
  438. # the cache and add them to CPPFLAGS.
  439. AC_SYS_LARGEFILE
  440. # detect POSIX or GNU variant of strerror_r
  441. AC_FUNC_STRERROR_R
  442. if test x$ac_cv_sys_file_offset_bits != x &&
  443. test x$ac_cv_sys_file_offset_bits != xno &&
  444. test x$ac_cv_sys_file_offset_bits != xunknown; then
  445. CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
  446. fi
  447. if test x$ac_cv_sys_large_files != x &&
  448. test x$ac_cv_sys_large_files != xno &&
  449. test x$ac_cv_sys_large_files != xunknown; then
  450. CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
  451. fi
  452. AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
  453. AX_GCC_FUNC_ATTRIBUTE([visibility])
  454. AX_GCC_FUNC_ATTRIBUTE([dllexport])
  455. AX_GCC_FUNC_ATTRIBUTE([dllimport])
  456. if test x$use_glibc_compat != xno; then
  457. #glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link
  458. #in anyway for back-compat.
  459. AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(lib missing))
  460. #__fdelt_chk's params and return type have changed from long unsigned int to long int.
  461. # See which one is present here.
  462. AC_MSG_CHECKING(__fdelt_chk type)
  463. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE
  464. #undef _FORTIFY_SOURCE
  465. #endif
  466. #define _FORTIFY_SOURCE 2
  467. #include <sys/select.h>
  468. extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])],
  469. [ fdelt_type="long unsigned int"],
  470. [ fdelt_type="long int"])
  471. AC_MSG_RESULT($fdelt_type)
  472. AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
  473. else
  474. AC_SEARCH_LIBS([clock_gettime],[rt])
  475. fi
  476. if test x$TARGET_OS != xwindows; then
  477. # All windows code is PIC, forcing it on just adds useless compile warnings
  478. AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"])
  479. fi
  480. if test x$use_hardening != xno; then
  481. AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
  482. AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
  483. AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
  484. AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
  485. HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE"
  486. ])
  487. HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
  488. ])
  489. AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"])
  490. AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"])
  491. AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"])
  492. AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
  493. AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
  494. if test x$TARGET_OS != xwindows; then
  495. AX_CHECK_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"])
  496. AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
  497. fi
  498. case $host in
  499. *mingw*)
  500. AC_CHECK_LIB([ssp], [main],, AC_MSG_ERROR(lib missing))
  501. ;;
  502. esac
  503. fi
  504. dnl this flag screws up non-darwin gcc even when the check fails. special-case it.
  505. if test x$TARGET_OS = xdarwin; then
  506. AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
  507. fi
  508. AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
  509. AC_CHECK_DECLS([strnlen])
  510. # Check for daemon(3), unrelated to --with-daemon (although used by it)
  511. AC_CHECK_DECLS([daemon])
  512. AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
  513. [#if HAVE_ENDIAN_H
  514. #include <endian.h>
  515. #elif HAVE_SYS_ENDIAN_H
  516. #include <sys/endian.h>
  517. #endif])
  518. AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
  519. [#if HAVE_BYTESWAP_H
  520. #include <byteswap.h>
  521. #endif])
  522. AC_CHECK_DECLS([__builtin_clz, __builtin_clzl, __builtin_clzll])
  523. dnl Check for MSG_NOSIGNAL
  524. AC_MSG_CHECKING(for MSG_NOSIGNAL)
  525. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
  526. [[ int f = MSG_NOSIGNAL; ]])],
  527. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ],
  528. [ AC_MSG_RESULT(no)]
  529. )
  530. dnl Check for MSG_DONTWAIT
  531. AC_MSG_CHECKING(for MSG_DONTWAIT)
  532. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
  533. [[ int f = MSG_DONTWAIT; ]])],
  534. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_DONTWAIT, 1,[Define this symbol if you have MSG_DONTWAIT]) ],
  535. [ AC_MSG_RESULT(no)]
  536. )
  537. dnl Check for malloc_info (for memory statistics information in getmemoryinfo)
  538. AC_MSG_CHECKING(for getmemoryinfo)
  539. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
  540. [[ int f = malloc_info(0, NULL); ]])],
  541. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MALLOC_INFO, 1,[Define this symbol if you have malloc_info]) ],
  542. [ AC_MSG_RESULT(no)]
  543. )
  544. dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas)
  545. AC_MSG_CHECKING(for mallopt M_ARENA_MAX)
  546. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
  547. [[ mallopt(M_ARENA_MAX, 1); ]])],
  548. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MALLOPT_ARENA_MAX, 1,[Define this symbol if you have mallopt with M_ARENA_MAX]) ],
  549. [ AC_MSG_RESULT(no)]
  550. )
  551. AC_MSG_CHECKING([for visibility attribute])
  552. AC_LINK_IFELSE([AC_LANG_SOURCE([
  553. int foo_def( void ) __attribute__((visibility("default")));
  554. int main(){}
  555. ])],
  556. [
  557. AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.])
  558. AC_MSG_RESULT(yes)
  559. ],
  560. [
  561. AC_MSG_RESULT(no)
  562. if test x$use_reduce_exports = xyes; then
  563. AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-exports.])
  564. fi
  565. ]
  566. )
  567. # Check for different ways of gathering OS randomness
  568. AC_MSG_CHECKING(for Linux getrandom syscall)
  569. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
  570. #include <sys/syscall.h>
  571. #include <linux/random.h>]],
  572. [[ syscall(SYS_getrandom, nullptr, 32, 0); ]])],
  573. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_GETRANDOM, 1,[Define this symbol if the Linux getrandom system call is available]) ],
  574. [ AC_MSG_RESULT(no)]
  575. )
  576. AC_MSG_CHECKING(for getentropy)
  577. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
  578. [[ getentropy(nullptr, 32) ]])],
  579. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_GETENTROPY, 1,[Define this symbol if the BSD getentropy system call is available]) ],
  580. [ AC_MSG_RESULT(no)]
  581. )
  582. AC_MSG_CHECKING(for getentropy via random.h)
  583. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
  584. #include <sys/random.h>]],
  585. [[ getentropy(nullptr, 32) ]])],
  586. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_GETENTROPY_RAND, 1,[Define this symbol if the BSD getentropy system call is available with sys/random.h]) ],
  587. [ AC_MSG_RESULT(no)]
  588. )
  589. AC_MSG_CHECKING(for sysctl KERN_ARND)
  590. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
  591. #include <sys/sysctl.h>]],
  592. [[ static const int name[2] = {CTL_KERN, KERN_ARND};
  593. sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])],
  594. [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL_ARND, 1,[Define this symbol if the BSD sysctl(KERN_ARND) is available]) ],
  595. [ AC_MSG_RESULT(no)]
  596. )
  597. # Check for reduced exports
  598. if test x$use_reduce_exports = xyes; then
  599. AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
  600. [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
  601. fi
  602. LEVELDB_CPPFLAGS=
  603. LIBLEVELDB=
  604. LIBMEMENV=
  605. AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
  606. AC_SUBST(LEVELDB_CPPFLAGS)
  607. AC_SUBST(LIBLEVELDB)
  608. AC_SUBST(LIBMEMENV)
  609. if test x$enable_wallet != xno; then
  610. dnl Check for libdb_cxx only if wallet enabled
  611. STARWELS_FIND_BDB48
  612. fi
  613. dnl Check for libminiupnpc (optional)
  614. if test x$use_upnp != xno; then
  615. AC_CHECK_HEADERS(
  616. [miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
  617. [AC_CHECK_LIB([miniupnpc], [main],[MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])],
  618. [have_miniupnpc=no]
  619. )
  620. fi
  621. STARWELS_QT_INIT
  622. dnl sets $starwels_enable_qt, $starwels_enable_qt_test, $starwels_enable_qt_dbus
  623. STARWELS_QT_CONFIGURE([$use_pkgconfig], [qt5])
  624. if test x$build_starwels_utils$build_starwelsd$starwels_enable_qt$use_tests$use_bench = xnonononono; then
  625. use_boost=no
  626. else
  627. use_boost=yes
  628. fi
  629. if test x$use_boost = xyes; then
  630. dnl Minimum required Boost version
  631. define(MINIMUM_REQUIRED_BOOST, 1.47.0)
  632. dnl Check for boost libs
  633. AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
  634. AX_BOOST_SYSTEM
  635. AX_BOOST_FILESYSTEM
  636. AX_BOOST_PROGRAM_OPTIONS
  637. AX_BOOST_THREAD
  638. AX_BOOST_CHRONO
  639. dnl Boost 1.56 through 1.62 allow using std::atomic instead of its own atomic
  640. dnl counter implementations. In 1.63 and later the std::atomic approach is default.
  641. m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro
  642. BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
  643. if test x$use_reduce_exports = xyes; then
  644. AC_MSG_CHECKING([for working boost reduced exports])
  645. TEMP_CPPFLAGS="$CPPFLAGS"
  646. CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
  647. AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
  648. @%:@include <boost/version.hpp>
  649. ]], [[
  650. #if BOOST_VERSION >= 104900
  651. // Everything is okay
  652. #else
  653. # error Boost version is too old
  654. #endif
  655. ]])],[
  656. AC_MSG_RESULT(yes)
  657. ],[
  658. AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.])
  659. ])
  660. CPPFLAGS="$TEMP_CPPFLAGS"
  661. fi
  662. fi
  663. if test x$use_reduce_exports = xyes; then
  664. CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
  665. AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"])
  666. fi
  667. if test x$use_tests = xyes; then
  668. if test x$HEXDUMP = x; then
  669. AC_MSG_ERROR(hexdump is required for tests)
  670. fi
  671. if test x$use_boost = xyes; then
  672. AX_BOOST_UNIT_TEST_FRAMEWORK
  673. dnl Determine if -DBOOST_TEST_DYN_LINK is needed
  674. AC_MSG_CHECKING([for dynamic linked boost test])
  675. TEMP_LIBS="$LIBS"
  676. LIBS="$LIBS $BOOST_LDFLAGS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
  677. TEMP_CPPFLAGS="$CPPFLAGS"
  678. CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
  679. AC_LINK_IFELSE([AC_LANG_SOURCE([
  680. #define BOOST_TEST_DYN_LINK
  681. #define BOOST_TEST_MAIN
  682. #include <boost/test/unit_test.hpp>
  683. ])],
  684. [AC_MSG_RESULT(yes)]
  685. [TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"],
  686. [AC_MSG_RESULT(no)])
  687. LIBS="$TEMP_LIBS"
  688. CPPFLAGS="$TEMP_CPPFLAGS"
  689. fi
  690. fi
  691. if test x$use_boost = xyes; then
  692. BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB"
  693. dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
  694. dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
  695. dnl the abi. This was fixed in 1.57.
  696. dnl When building against that installed version using c++11, the headers pick up
  697. dnl on the native c++11 scoped enum support and enable it, however it will fail to
  698. dnl link. This can be worked around by disabling c++11 scoped enums if linking will
  699. dnl fail.
  700. dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
  701. TEMP_LIBS="$LIBS"
  702. LIBS="$BOOST_LIBS $LIBS"
  703. TEMP_CPPFLAGS="$CPPFLAGS"
  704. CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
  705. AC_MSG_CHECKING([for mismatched boost c++11 scoped enums])
  706. AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  707. #include "boost/config.hpp"
  708. #include "boost/version.hpp"
  709. #if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
  710. #define BOOST_NO_SCOPED_ENUMS
  711. #define BOOST_NO_CXX11_SCOPED_ENUMS
  712. #define CHECK
  713. #endif
  714. #include "boost/filesystem.hpp"
  715. ]],[[
  716. #if defined(CHECK)
  717. boost::filesystem::copy_file("foo", "bar");
  718. #else
  719. choke;
  720. #endif
  721. ]])],
  722. [AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)])
  723. LIBS="$TEMP_LIBS"
  724. CPPFLAGS="$TEMP_CPPFLAGS"
  725. dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
  726. dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
  727. dnl a working version is available, else fall back to sleep. sleep was removed
  728. dnl after 1.56.
  729. dnl If neither is available, abort.
  730. TEMP_LIBS="$LIBS"
  731. LIBS="$BOOST_LIBS $LIBS"
  732. TEMP_CPPFLAGS="$CPPFLAGS"
  733. CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
  734. AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  735. #include <boost/thread/thread.hpp>
  736. #include <boost/version.hpp>
  737. ]],[[
  738. #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
  739. boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
  740. #else
  741. choke me
  742. #endif
  743. ]])],
  744. [boost_sleep=yes;
  745. AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
  746. [boost_sleep=no])
  747. LIBS="$TEMP_LIBS"
  748. CPPFLAGS="$TEMP_CPPFLAGS"
  749. if test x$boost_sleep != xyes; then
  750. TEMP_LIBS="$LIBS"
  751. LIBS="$BOOST_LIBS $LIBS"
  752. TEMP_CPPFLAGS="$CPPFLAGS"
  753. CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
  754. AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  755. #include <boost/version.hpp>
  756. #include <boost/thread.hpp>
  757. #include <boost/date_time/posix_time/posix_time_types.hpp>
  758. ]],[[
  759. #if BOOST_VERSION <= 105600
  760. boost::this_thread::sleep(boost::posix_time::milliseconds(0));
  761. #else
  762. choke me
  763. #endif
  764. ]])],
  765. [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
  766. [boost_sleep=no])
  767. LIBS="$TEMP_LIBS"
  768. CPPFLAGS="$TEMP_CPPFLAGS"
  769. fi
  770. if test x$boost_sleep != xyes; then
  771. AC_MSG_ERROR(No working boost sleep implementation found.)
  772. fi
  773. fi
  774. if test x$use_pkgconfig = xyes; then
  775. : dnl
  776. m4_ifdef(
  777. [PKG_CHECK_MODULES],
  778. [
  779. PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)])
  780. PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
  781. STARWELS_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [STARWELS_QT_FAIL(libprotobuf not found)])])
  782. if test x$use_qr != xno; then
  783. STARWELS_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
  784. fi
  785. if test x$build_starwels_utils$build_starwelsd$starwels_enable_qt$use_tests != xnononono; then
  786. PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
  787. if test x$TARGET_OS != xwindows; then
  788. PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
  789. fi
  790. fi
  791. if test "x$use_zmq" = "xyes"; then
  792. PKG_CHECK_MODULES([ZMQ],[libzmq >= 4],
  793. [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
  794. [AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
  795. AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
  796. use_zmq=no])
  797. else
  798. AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
  799. fi
  800. ]
  801. )
  802. else
  803. AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing))
  804. AC_CHECK_LIB([crypto], [main],CRYPTO_LIBS=-lcrypto, AC_MSG_ERROR(libcrypto missing))
  805. AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
  806. AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
  807. if test x$build_starwels_utils$build_starwelsd$starwels_enable_qt$use_tests != xnononono; then
  808. AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
  809. AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
  810. if test x$TARGET_OS != xwindows; then
  811. AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing))
  812. fi
  813. fi
  814. if test "x$use_zmq" = "xyes"; then
  815. AC_CHECK_HEADER([zmq.h],
  816. [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
  817. [AC_MSG_WARN([zmq.h not found, disabling zmq support])
  818. use_zmq=no
  819. AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
  820. AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq,
  821. [AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support])
  822. use_zmq=no
  823. AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
  824. else
  825. AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
  826. fi
  827. if test "x$use_zmq" = "xyes"; then
  828. dnl Assume libzmq was built for static linking
  829. case $host in
  830. *mingw*)
  831. ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC"
  832. ;;
  833. esac
  834. fi
  835. STARWELS_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], STARWELS_QT_FAIL(libprotobuf not found)))
  836. if test x$use_qr != xno; then
  837. STARWELS_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])
  838. STARWELS_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
  839. fi
  840. fi
  841. save_CXXFLAGS="${CXXFLAGS}"
  842. CXXFLAGS="${CXXFLAGS} ${CRYPTO_CFLAGS} ${SSL_CFLAGS}"
  843. AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
  844. #include <openssl/x509_vfy.h>
  845. ])
  846. CXXFLAGS="${save_CXXFLAGS}"
  847. dnl univalue check
  848. need_bundled_univalue=yes
  849. if test x$build_starwels_utils$build_starwelsd$starwels_enable_qt$use_tests$use_bench = xnonononono; then
  850. need_bundled_univalue=no
  851. else
  852. if test x$system_univalue != xno ; then
  853. found_univalue=no
  854. if test x$use_pkgconfig = xyes; then
  855. : #NOP
  856. m4_ifdef(
  857. [PKG_CHECK_MODULES],
  858. [
  859. PKG_CHECK_MODULES([UNIVALUE],[libunivalue],[found_univalue=yes],[true])
  860. ]
  861. )
  862. else
  863. AC_CHECK_HEADER([univalue.h],[
  864. AC_CHECK_LIB([univalue], [main],[
  865. UNIVALUE_LIBS=-lunivalue
  866. found_univalue=yes
  867. ],[true])
  868. ],[true])
  869. fi
  870. if test x$found_univalue = xyes ; then
  871. system_univalue=yes
  872. need_bundled_univalue=no
  873. elif test x$system_univalue = xyes ; then
  874. AC_MSG_ERROR([univalue not found])
  875. else
  876. system_univalue=no
  877. fi
  878. fi
  879. if test x$need_bundled_univalue = xyes ; then
  880. UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include'
  881. UNIVALUE_LIBS='univalue/libunivalue.la'
  882. fi
  883. fi
  884. AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes])
  885. AC_SUBST(UNIVALUE_CFLAGS)
  886. AC_SUBST(UNIVALUE_LIBS)
  887. STARWELS_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
  888. AC_MSG_CHECKING([whether to build starwelsd])
  889. AM_CONDITIONAL([BUILD_STARWELSD], [test x$build_starwelsd = xyes])
  890. AC_MSG_RESULT($build_starwelsd)
  891. AC_MSG_CHECKING([whether to build utils (starwels-cli starwels-tx)])
  892. AM_CONDITIONAL([BUILD_STARWELS_UTILS], [test x$build_starwels_utils = xyes])
  893. AC_MSG_RESULT($build_starwels_utils)
  894. AC_MSG_CHECKING([whether to build libraries])
  895. AM_CONDITIONAL([BUILD_STARWELS_LIBS], [test x$build_starwels_libs = xyes])
  896. if test x$build_starwels_libs = xyes; then
  897. AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built])
  898. AC_CONFIG_FILES([libstarwelsconsensus.pc:libstarwelsconsensus.pc.in])
  899. fi
  900. AC_MSG_RESULT($build_starwels_libs)
  901. AC_LANG_POP
  902. if test "x$use_ccache" != "xno"; then
  903. AC_MSG_CHECKING(if ccache should be used)
  904. if test x$CCACHE = x; then
  905. if test "x$use_ccache" = "xyes"; then
  906. AC_MSG_ERROR([ccache not found.]);
  907. else
  908. use_ccache=no
  909. fi
  910. else
  911. use_ccache=yes
  912. CC="$ac_cv_path_CCACHE $CC"
  913. CXX="$ac_cv_path_CCACHE $CXX"
  914. fi
  915. AC_MSG_RESULT($use_ccache)
  916. fi
  917. if test "x$use_ccache" = "xyes"; then
  918. AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"])
  919. fi
  920. dnl enable wallet
  921. AC_MSG_CHECKING([if wallet should be enabled])
  922. if test x$enable_wallet != xno; then
  923. AC_MSG_RESULT(yes)
  924. AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions])
  925. else
  926. AC_MSG_RESULT(no)
  927. fi
  928. dnl enable upnp support
  929. AC_MSG_CHECKING([whether to build with support for UPnP])
  930. if test x$have_miniupnpc = xno; then
  931. if test x$use_upnp = xyes; then
  932. AC_MSG_ERROR("UPnP requested but cannot be built. use --without-miniupnpc")
  933. fi
  934. AC_MSG_RESULT(no)
  935. else
  936. if test x$use_upnp != xno; then
  937. AC_MSG_RESULT(yes)
  938. AC_MSG_CHECKING([whether to build with UPnP enabled by default])
  939. use_upnp=yes
  940. upnp_setting=0
  941. if test x$use_upnp_default != xno; then
  942. use_upnp_default=yes
  943. upnp_setting=1
  944. fi
  945. AC_MSG_RESULT($use_upnp_default)
  946. AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state])
  947. if test x$TARGET_OS = xwindows; then
  948. MINIUPNPC_CPPFLAGS="-DSTATICLIB -DMINIUPNP_STATICLIB"
  949. fi
  950. else
  951. AC_MSG_RESULT(no)
  952. fi
  953. fi
  954. dnl these are only used when qt is enabled
  955. BUILD_TEST_QT=""
  956. if test x$starwels_enable_qt != xno; then
  957. dnl enable dbus support
  958. AC_MSG_CHECKING([whether to build GUI with support for D-Bus])
  959. if test x$starwels_enable_qt_dbus != xno; then
  960. AC_DEFINE([USE_DBUS],[1],[Define if dbus support should be compiled in])
  961. fi
  962. AC_MSG_RESULT($starwels_enable_qt_dbus)
  963. dnl enable qr support
  964. AC_MSG_CHECKING([whether to build GUI with support for QR codes])
  965. if test x$have_qrencode = xno; then
  966. if test x$use_qr = xyes; then
  967. AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode")
  968. fi
  969. AC_MSG_RESULT(no)
  970. else
  971. if test x$use_qr != xno; then
  972. AC_MSG_RESULT(yes)
  973. AC_DEFINE([USE_QRCODE],[1],[Define if QR support should be compiled in])
  974. use_qr=yes
  975. else
  976. AC_MSG_RESULT(no)
  977. fi
  978. fi
  979. if test x$XGETTEXT = x; then
  980. AC_MSG_WARN("xgettext is required to update qt translations")
  981. fi
  982. AC_MSG_CHECKING([whether to build test_starwels-qt])
  983. if test x$use_gui_tests$starwels_enable_qt_test = xyesyes; then
  984. AC_MSG_RESULT([yes])
  985. BUILD_TEST_QT="yes"
  986. else
  987. AC_MSG_RESULT([no])
  988. fi
  989. fi
  990. AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
  991. AC_MSG_CHECKING([whether to build test_starwels])
  992. if test x$use_tests = xyes; then
  993. AC_MSG_RESULT([yes])
  994. BUILD_TEST="yes"
  995. else
  996. AC_MSG_RESULT([no])
  997. BUILD_TEST=""
  998. fi
  999. AC_MSG_CHECKING([whether to reduce exports])
  1000. if test x$use_reduce_exports = xyes; then
  1001. AC_MSG_RESULT([yes])
  1002. else
  1003. AC_MSG_RESULT([no])
  1004. fi
  1005. if test x$build_starwels_utils$build_starwels_libs$build_starwelsd$starwels_enable_qt$use_bench$use_tests = xnononononono; then
  1006. AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
  1007. fi
  1008. AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
  1009. AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
  1010. AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
  1011. AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
  1012. AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
  1013. AM_CONDITIONAL([ENABLE_QT],[test x$starwels_enable_qt = xyes])
  1014. AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
  1015. AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
  1016. AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
  1017. AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
  1018. AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
  1019. AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
  1020. AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
  1021. AM_CONDITIONAL([EXPERIMENTAL_ASM],[test x$experimental_asm = xyes])
  1022. AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
  1023. AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
  1024. AC_DEFINE(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION, [Build revision])
  1025. AC_DEFINE(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD, [Version Build])
  1026. AC_DEFINE(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE, [Version is release])
  1027. AC_DEFINE(COPYRIGHT_YEAR, _COPYRIGHT_YEAR, [Copyright year])
  1028. AC_DEFINE(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS", [Copyright holder(s) before %s replacement])
  1029. AC_DEFINE(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION", [Replacement for %s in copyright holders string])
  1030. define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])])
  1031. AC_DEFINE(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL", [Copyright holder(s)])
  1032. AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR)
  1033. AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR)
  1034. AC_SUBST(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION)
  1035. AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD)
  1036. AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
  1037. AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
  1038. AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS")
  1039. AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION")
  1040. AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL")
  1041. AC_SUBST(STARWELS_DAEMON_NAME)
  1042. AC_SUBST(STARWELS_GUI_NAME)
  1043. AC_SUBST(STARWELS_CLI_NAME)
  1044. AC_SUBST(STARWELS_TX_NAME)
  1045. AC_SUBST(RELDFLAGS)
  1046. AC_SUBST(ERROR_CXXFLAGS)
  1047. AC_SUBST(HARDENED_CXXFLAGS)
  1048. AC_SUBST(HARDENED_CPPFLAGS)
  1049. AC_SUBST(HARDENED_LDFLAGS)
  1050. AC_SUBST(PIC_FLAGS)
  1051. AC_SUBST(PIE_FLAGS)
  1052. AC_SUBST(SSE42_CXXFLAGS)
  1053. AC_SUBST(LIBTOOL_APP_LDFLAGS)
  1054. AC_SUBST(USE_UPNP)
  1055. AC_SUBST(USE_QRCODE)
  1056. AC_SUBST(BOOST_LIBS)
  1057. AC_SUBST(TESTDEFS)
  1058. AC_SUBST(LEVELDB_TARGET_FLAGS)
  1059. AC_SUBST(MINIUPNPC_CPPFLAGS)
  1060. AC_SUBST(MINIUPNPC_LIBS)
  1061. AC_SUBST(CRYPTO_LIBS)
  1062. AC_SUBST(SSL_LIBS)
  1063. AC_SUBST(EVENT_LIBS)
  1064. AC_SUBST(EVENT_PTHREADS_LIBS)
  1065. AC_SUBST(ZMQ_LIBS)
  1066. AC_SUBST(PROTOBUF_LIBS)
  1067. AC_SUBST(QR_LIBS)
  1068. AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
  1069. AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
  1070. AC_CONFIG_FILES([doc/Doxyfile])
  1071. AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
  1072. AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
  1073. AC_CONFIG_LINKS([test/util/starwels-util-test.py:test/util/starwels-util-test.py])
  1074. dnl boost's m4 checks do something really nasty: they export these vars. As a
  1075. dnl result, they leak into secp256k1's configure and crazy things happen.
  1076. dnl Until this is fixed upstream and we've synced, we'll just un-export them.
  1077. CPPFLAGS_TEMP="$CPPFLAGS"
  1078. unset CPPFLAGS
  1079. CPPFLAGS="$CPPFLAGS_TEMP"
  1080. LDFLAGS_TEMP="$LDFLAGS"
  1081. unset LDFLAGS
  1082. LDFLAGS="$LDFLAGS_TEMP"
  1083. LIBS_TEMP="$LIBS"
  1084. unset LIBS
  1085. LIBS="$LIBS_TEMP"
  1086. PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"
  1087. unset PKG_CONFIG_PATH
  1088. PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP"
  1089. PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
  1090. unset PKG_CONFIG_LIBDIR
  1091. PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
  1092. if test x$need_bundled_univalue = xyes; then
  1093. AC_CONFIG_SUBDIRS([src/univalue])
  1094. fi
  1095. ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-module-recovery --disable-jni"
  1096. AC_CONFIG_SUBDIRS([src/secp256k1])
  1097. AC_OUTPUT
  1098. dnl Taken from https://wiki.debian.org/RpathIssue
  1099. case $host in
  1100. *-*-linux-gnu)
  1101. AC_MSG_RESULT([Fixing libtool for -rpath problems.])
  1102. sed < libtool > libtool-2 \
  1103. 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
  1104. mv libtool-2 libtool
  1105. chmod 755 libtool
  1106. ;;
  1107. esac
  1108. dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows
  1109. case ${OS} in
  1110. *Windows*)
  1111. sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/config.ini > test/config-2.ini
  1112. mv test/config-2.ini test/config.ini
  1113. ;;
  1114. esac
  1115. echo
  1116. echo "Options used to compile and link:"
  1117. echo " with wallet = $enable_wallet"
  1118. echo " with gui / qt = $starwels_enable_qt"
  1119. if test x$starwels_enable_qt != xno; then
  1120. echo " qt version = $starwels_qt_got_major_vers"
  1121. echo " with qr = $use_qr"
  1122. fi
  1123. echo " with zmq = $use_zmq"
  1124. echo " with test = $use_tests"
  1125. echo " with bench = $use_bench"
  1126. echo " with upnp = $use_upnp"
  1127. echo " debug enabled = $enable_debug"
  1128. echo " werror = $enable_werror"
  1129. echo
  1130. echo " target os = $TARGET_OS"
  1131. echo " build os = $BUILD_OS"
  1132. echo
  1133. echo " CC = $CC"
  1134. echo " CFLAGS = $CFLAGS"
  1135. echo " CPPFLAGS = $CPPFLAGS"
  1136. echo " CXX = $CXX"
  1137. echo " CXXFLAGS = $CXXFLAGS"
  1138. echo " LDFLAGS = $LDFLAGS"
  1139. echo " ARFLAGS = $ARFLAGS"
  1140. echo