@@ -243,27 +243,27 @@ AC_ARG_ENABLE(man,
243
243
enable_man=yes )
244
244
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
245
245
246
- # Enable debug
246
+ dnl Enable debug
247
247
AC_ARG_ENABLE ( [ debug] ,
248
248
[ AS_HELP_STRING ( [ --enable-debug] ,
249
249
[ use compiler flags and macros suited for debugging (default is no)] ) ] ,
250
250
[ enable_debug=$enableval] ,
251
251
[ enable_debug=no] )
252
252
253
- # Enable different -fsanitize options
253
+ dnl Enable different -fsanitize options
254
254
AC_ARG_WITH ( [ sanitizers] ,
255
255
[ AS_HELP_STRING ( [ --with-sanitizers] ,
256
256
[ comma separated list of extra sanitizers to build with (default is none enabled)] ) ] ,
257
257
[ use_sanitizers=$withval] )
258
258
259
- # Enable gprof profiling
259
+ dnl Enable gprof profiling
260
260
AC_ARG_ENABLE ( [ gprof] ,
261
261
[ AS_HELP_STRING ( [ --enable-gprof] ,
262
262
[ use gprof profiling compiler flags (default is no)] ) ] ,
263
263
[ enable_gprof=$enableval] ,
264
264
[ enable_gprof=no] )
265
265
266
- # Turn warnings into errors
266
+ dnl Turn warnings into errors
267
267
AC_ARG_ENABLE ( [ werror] ,
268
268
[ AS_HELP_STRING ( [ --enable-werror] ,
269
269
[ Treat certain compiler warnings as errors (default is no)] ) ] ,
@@ -274,15 +274,15 @@ AC_LANG_PUSH([C++])
274
274
AX_CHECK_COMPILE_FLAG ( [ -Werror] ,[ CXXFLAG_WERROR="-Werror"] ,[ CXXFLAG_WERROR=""] )
275
275
276
276
if test "x$enable_debug" = xyes; then
277
- # Clear default -g -O2 flags
277
+ dnl Clear default -g -O2 flags
278
278
if test "x$CXXFLAGS_overridden" = xno; then
279
279
CXXFLAGS=""
280
280
fi
281
281
282
- # Disable all optimizations
282
+ dnl Disable all optimizations
283
283
AX_CHECK_COMPILE_FLAG ( [ -O0] , [ [ DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"] ] ,,[ [ $CXXFLAG_WERROR] ] )
284
284
285
- # Prefer -g3, fall back to -g if that is unavailable.
285
+ dnl Prefer -g3, fall back to -g if that is unavailable.
286
286
AX_CHECK_COMPILE_FLAG (
287
287
[ -g3] ,
288
288
[ [ DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"] ] ,
@@ -295,19 +295,19 @@ if test "x$enable_debug" = xyes; then
295
295
fi
296
296
297
297
if test x$use_sanitizers != x; then
298
- # First check if the compiler accepts flags. If an incompatible pair like
299
- # -fsanitize=address,thread is used here, this check will fail. This will also
300
- # fail if a bad argument is passed, e.g. -fsanitize=undfeined
298
+ dnl First check if the compiler accepts flags. If an incompatible pair like
299
+ dnl -fsanitize=address,thread is used here, this check will fail. This will also
300
+ dnl fail if a bad argument is passed, e.g. -fsanitize=undfeined
301
301
AX_CHECK_COMPILE_FLAG (
302
302
[ [ -fsanitize=$use_sanitizers] ] ,
303
303
[ [ SANITIZER_CXXFLAGS=-fsanitize=$use_sanitizers] ] ,
304
304
[ AC_MSG_ERROR ( [ compiler did not accept requested flags] ) ] )
305
305
306
- # Some compilers (e.g. GCC) require additional libraries like libasan,
307
- # libtsan, libubsan, etc. Make sure linking still works with the sanitize
308
- # flag. This is a separate check so we can give a better error message when
309
- # the sanitize flags are supported by the compiler but the actual sanitizer
310
- # libs are missing.
306
+ dnl Some compilers (e.g. GCC) require additional libraries like libasan,
307
+ dnl libtsan, libubsan, etc. Make sure linking still works with the sanitize
308
+ dnl flag. This is a separate check so we can give a better error message when
309
+ dnl the sanitize flags are supported by the compiler but the actual sanitizer
310
+ dnl libs are missing.
311
311
AX_CHECK_LINK_FLAG (
312
312
[ [ -fsanitize=$use_sanitizers] ] ,
313
313
[ [ SANITIZER_LDFLAGS=-fsanitize=$use_sanitizers] ] ,
@@ -344,9 +344,9 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
344
344
AX_CHECK_COMPILE_FLAG ( [ -Wredundant-decls] ,[ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"] ,,[ [ $CXXFLAG_WERROR] ] )
345
345
AX_CHECK_COMPILE_FLAG ( [ -Wunused-variable] ,[ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-variable"] ,,[ [ $CXXFLAG_WERROR] ] )
346
346
347
- # # Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
348
- # # unknown options if any other warning is produced. Test the -Wfoo case, and
349
- # # set the -Wno-foo case if it works.
347
+ dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
348
+ dnl unknown options if any other warning is produced. Test the -Wfoo case, and
349
+ dnl set the -Wno-foo case if it works.
350
350
AX_CHECK_COMPILE_FLAG ( [ -Wunused-parameter] ,[ NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-parameter"] ,,[ [ $CXXFLAG_WERROR] ] )
351
351
AX_CHECK_COMPILE_FLAG ( [ -Wself-assign] ,[ NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-self-assign"] ,,[ [ $CXXFLAG_WERROR] ] )
352
352
AX_CHECK_COMPILE_FLAG ( [ -Wunused-local-typedef] ,[ NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-local-typedef"] ,,[ [ $CXXFLAG_WERROR] ] )
@@ -361,9 +361,9 @@ enable_shani=no
361
361
362
362
if test "x$use_asm" = "xyes"; then
363
363
364
- # Check for optional instruction set support. Enabling these does _not_ imply that all code will
365
- # be compiled with them, rather that specific objects/libs may use them after checking for runtime
366
- # compatibility.
364
+ dnl Check for optional instruction set support. Enabling these does _not_ imply that all code will
365
+ dnl be compiled with them, rather that specific objects/libs may use them after checking for runtime
366
+ dnl compatibility.
367
367
AX_CHECK_COMPILE_FLAG ( [ -msse4.2] ,[ [ SSE42_CXXFLAGS="-msse4.2"] ] ,,[ [ $CXXFLAG_WERROR] ] )
368
368
AX_CHECK_COMPILE_FLAG ( [ -msse4.1] ,[ [ SSE41_CXXFLAGS="-msse4.1"] ] ,,[ [ $CXXFLAG_WERROR] ] )
369
369
AX_CHECK_COMPILE_FLAG ( [ -mavx -mavx2] ,[ [ AVX2_CXXFLAGS="-mavx -mavx2"] ] ,,[ [ $CXXFLAG_WERROR] ] )
@@ -506,8 +506,8 @@ case $host in
506
506
AC_CHECK_LIB ( [ iphlpapi] , [ main] ,, AC_MSG_ERROR ( libiphlpapi missing ) )
507
507
AC_CHECK_LIB ( [ crypt32] , [ main] ,, AC_MSG_ERROR ( libcrypt32 missing ) )
508
508
509
- # -static is interpreted by libtool, where it has a different meaning.
510
- # In libtool-speak, it's -all-static.
509
+ dnl -static is interpreted by libtool, where it has a different meaning.
510
+ dnl In libtool-speak, it's -all-static.
511
511
AX_CHECK_LINK_FLAG ( [ [ -static] ] ,[ LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"] )
512
512
513
513
AC_PATH_PROG ( [ MAKENSIS] , [ makensis] , none )
@@ -555,8 +555,8 @@ case $host in
555
555
dnl It's safe to add these paths even if the functionality is disabled by
556
556
dnl the user (--without-wallet or --without-gui for example).
557
557
558
- bdb_prefix=`$ BREW --prefix berkeley-db4 2>/dev/null`
559
- qt5_prefix=`$ BREW --prefix qt5 2>/dev/null`
558
+ bdb_prefix=$($ BREW --prefix berkeley-db4 2>/dev/null)
559
+ qt5_prefix=$($ BREW --prefix qt5 2>/dev/null)
560
560
if test x$bdb_prefix != x; then
561
561
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
562
562
LIBS="$LIBS -L$bdb_prefix/lib"
@@ -673,11 +673,11 @@ AC_C_BIGENDIAN
673
673
dnl Check for pthread compile/link requirements
674
674
AX_PTHREAD
675
675
676
- # The following macro will add the necessary defines to bitcoin-config.h, but
677
- # they also need to be passed down to any subprojects. Pull the results out of
678
- # the cache and add them to CPPFLAGS.
676
+ dnl The following macro will add the necessary defines to bitcoin-config.h, but
677
+ dnl they also need to be passed down to any subprojects. Pull the results out of
678
+ dnl the cache and add them to CPPFLAGS.
679
679
AC_SYS_LARGEFILE
680
- # detect POSIX or GNU variant of strerror_r
680
+ dnl detect POSIX or GNU variant of strerror_r
681
681
AC_FUNC_STRERROR_R
682
682
683
683
if test x$ac_cv_sys_file_offset_bits != x &&
@@ -700,12 +700,12 @@ AX_GCC_FUNC_ATTRIBUTE([dllimport])
700
700
701
701
if test x$use_glibc_compat != xno; then
702
702
703
- # glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link
704
- # in anyway for back-compat.
703
+ dnl glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link
704
+ dnl in anyway for back-compat.
705
705
AC_CHECK_LIB ( [ rt] ,[ clock_gettime] ,, AC_MSG_ERROR ( librt missing ) )
706
706
707
- # __fdelt_chk's params and return type have changed from long unsigned int to long int.
708
- # See which one is present here.
707
+ dnl __fdelt_chk's params and return type have changed from long unsigned int to long int.
708
+ dnl See which one is present here.
709
709
AC_MSG_CHECKING ( __fdelt_chk type )
710
710
AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #ifdef _FORTIFY_SOURCE
711
711
#undef _FORTIFY_SOURCE
@@ -741,22 +741,22 @@ if test "x$enable_gprof" = xyes; then
741
741
fi
742
742
743
743
if test x$TARGET_OS != xwindows; then
744
- # All windows code is PIC, forcing it on just adds useless compile warnings
744
+ dnl All windows code is PIC, forcing it on just adds useless compile warnings
745
745
AX_CHECK_COMPILE_FLAG ( [ -fPIC] ,[ PIC_FLAGS="-fPIC"] )
746
746
fi
747
747
748
- # All versions of gcc that we commonly use for building are subject to bug
749
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set
750
- # -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
748
+ dnl All versions of gcc that we commonly use for building are subject to bug
749
+ dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set
750
+ dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
751
751
AX_CHECK_COMPILE_FLAG ( [ -fstack-reuse=none] ,[ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-reuse=none"] )
752
752
if test x$use_hardening != xno; then
753
753
use_hardening=yes
754
754
AX_CHECK_COMPILE_FLAG ( [ -Wstack-protector] ,[ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"] )
755
755
AX_CHECK_COMPILE_FLAG ( [ -fstack-protector-all] ,[ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"] )
756
756
757
- # When enable_debug is yes, all optimizations are disabled.
758
- # However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning.
759
- # Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes.
757
+ dnl When enable_debug is yes, all optimizations are disabled.
758
+ dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning.
759
+ dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes.
760
760
if test x$enable_debug != xyes; then
761
761
AX_CHECK_PREPROC_FLAG ( [ -D_FORTIFY_SOURCE=2] ,[
762
762
AX_CHECK_PREPROC_FLAG ( [ -U_FORTIFY_SOURCE] ,[
788
788
789
789
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 sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h] )
790
790
791
- # FD_ZERO may be dependent on a declaration of memcpy, e.g. in SmartOS
792
- # check that it fails to build without memcpy, then that it builds with
791
+ dnl FD_ZERO may be dependent on a declaration of memcpy, e.g. in SmartOS
792
+ dnl check that it fails to build without memcpy, then that it builds with
793
793
AC_MSG_CHECKING ( FD_ZERO memcpy dependence )
794
794
AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
795
795
#include <cstddef>
@@ -827,7 +827,7 @@ AC_CHECK_DECLS([getifaddrs, freeifaddrs],,,
827
827
)
828
828
AC_CHECK_DECLS ( [ strnlen] )
829
829
830
- # Check for daemon(3), unrelated to --with-daemon (although used by it)
830
+ dnl Check for daemon(3), unrelated to --with-daemon (although used by it)
831
831
AC_CHECK_DECLS ( [ daemon] )
832
832
833
833
AC_CHECK_DECLS ( [ le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64] ,,,
@@ -893,19 +893,19 @@ if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && te
893
893
[
894
894
case $host in
895
895
*mingw*)
896
- # mingw32's implementation of thread_local has also been shown to behave
897
- # erroneously under concurrent usage; see:
898
- # https://gist.github.com/jamesob/fe9a872051a88b2025b1aa37bfa98605
896
+ dnl mingw32's implementation of thread_local has also been shown to behave
897
+ dnl erroneously under concurrent usage; see:
898
+ dnl https://gist.github.com/jamesob/fe9a872051a88b2025b1aa37bfa98605
899
899
AC_MSG_RESULT ( no )
900
900
;;
901
901
*darwin*)
902
- # TODO enable thread_local on later versions of Darwin where it is
903
- # supported (per https://stackoverflow.com/a/29929949)
902
+ dnl TODO enable thread_local on later versions of Darwin where it is
903
+ dnl supported (per https://stackoverflow.com/a/29929949)
904
904
AC_MSG_RESULT ( no )
905
905
;;
906
906
*freebsd*)
907
- # FreeBSD's implementation of thread_local is also buggy (per
908
- # https://groups.google.com/d/msg/bsdmailinglist/22ncTZAbDp4/Dii_pII5AwAJ)
907
+ dnl FreeBSD's implementation of thread_local is also buggy (per
908
+ dnl https://groups.google.com/d/msg/bsdmailinglist/22ncTZAbDp4/Dii_pII5AwAJ)
909
909
AC_MSG_RESULT ( no )
910
910
;;
911
911
*)
@@ -921,7 +921,7 @@ if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && te
921
921
LDFLAGS="$TEMP_LDFLAGS"
922
922
fi
923
923
924
- # Check for different ways of gathering OS randomness
924
+ dnl Check for different ways of gathering OS randomness
925
925
AC_MSG_CHECKING ( for Linux getrandom syscall )
926
926
AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <unistd.h>
927
927
#include <sys/syscall.h>
@@ -975,7 +975,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>
975
975
[ AC_MSG_RESULT ( no ) ]
976
976
)
977
977
978
- # Check for reduced exports
978
+ dnl Check for reduced exports
979
979
if test x$use_reduce_exports = xyes; then
980
980
AX_CHECK_COMPILE_FLAG ( [ -fvisibility=hidden] ,[ RE_CXXFLAGS="-fvisibility=hidden"] ,
981
981
[ AC_MSG_ERROR ( [ Cannot set default symbol visibility. Use --disable-reduce-exports.] ) ] )
@@ -987,7 +987,7 @@ AC_LINK_IFELSE(
987
987
[ [ #include <cstdlib> ] ] ,
988
988
[ [ int nErr = std::system(""); ] ]
989
989
) ] ,
990
- [ AC_MSG_RESULT ( yes ) ; AC_DEFINE ( HAVE_STD__SYSTEM , 1 , Define to 1 if you have the ` std::system' function .) ] ,
990
+ [ AC_MSG_RESULT ( yes ) ; AC_DEFINE ( HAVE_STD__SYSTEM , 1 , Define to 1 if std::system is available .) ] ,
991
991
[ AC_MSG_RESULT ( no ) ]
992
992
)
993
993
@@ -997,11 +997,10 @@ AC_LINK_IFELSE(
997
997
[ [ ] ] ,
998
998
[ [ int nErr = ::_wsystem(""); ] ]
999
999
) ] ,
1000
- [ AC_MSG_RESULT ( yes ) ; AC_DEFINE ( HAVE_WSYSTEM , 1 , Define to 1 if you have the ` ::wsystem' function .) ] ,
1000
+ [ AC_MSG_RESULT ( yes ) ; AC_DEFINE ( HAVE_WSYSTEM , 1 , Define to 1 if ::wsystem is available .) ] ,
1001
1001
[ AC_MSG_RESULT ( no ) ]
1002
1002
)
1003
1003
1004
- # Define to 1 if std::system or ::wsystem (Windows) is available
1005
1004
AC_DEFINE ( [ HAVE_SYSTEM] , [ HAVE_STD__SYSTEM || HAVE_WSYSTEM] , [ std::system or ::wsystem] )
1006
1005
1007
1006
LEVELDB_CPPFLAGS=
0 commit comments