aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2019-02-21 14:00:33 +0100
committerSjors Provoost <sjors@sprovoost.nl>2019-06-06 11:50:16 +0200
commitc1c91bb78d7267f01ee3a3c156c218b46a92cd39 (patch)
tree1217178251378f6e4f5dcc099d4a31d9a9a902d9 /configure.ac
parent03858b23fe1d17e681eb18d24602b276020295a0 (diff)
downloadbitcoin-c1c91bb78d7267f01ee3a3c156c218b46a92cd39.tar.xz
[build] detect std::system or ::wsystem
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5e1a5e14a1..c67448c963 100644
--- a/configure.ac
+++ b/configure.ac
@@ -925,6 +925,29 @@ if test x$use_reduce_exports = xyes; then
[AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
fi
+AC_MSG_CHECKING([for std::system])
+AC_LINK_IFELSE(
+ [ AC_LANG_PROGRAM(
+ [[ #include <cstdlib> ]],
+ [[ int nErr = std::system(""); ]]
+ )],
+ [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STD__SYSTEM, 1, Define to 1 if you have the `std::system' function.)],
+ [ AC_MSG_RESULT(no) ]
+)
+
+AC_MSG_CHECKING([for ::_wsystem])
+AC_LINK_IFELSE(
+ [ AC_LANG_PROGRAM(
+ [[ ]],
+ [[ int nErr = ::_wsystem(""); ]]
+ )],
+ [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_WSYSTEM, 1, Define to 1 if you have the `::wsystem' function.)],
+ [ AC_MSG_RESULT(no) ]
+)
+
+# Define to 1 if std::system or ::wsystem (Windows) is available
+AC_DEFINE([HAVE_SYSTEM], [HAVE_STD__SYSTEM || HAVE_WSYSTEM], [HAVE_WSYSTEM])
+
LEVELDB_CPPFLAGS=
LIBLEVELDB=
LIBMEMENV=