mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin#22845: improve check for ::(w)system
This commit is contained in:
parent
5b86009d40
commit
54be58b494
10
configure.ac
10
configure.ac
@ -1272,13 +1272,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
[ AC_MSG_RESULT(no); HAVE_STRONG_GETAUXVAL=0 ]
|
||||
)
|
||||
|
||||
have_any_system=no
|
||||
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(yes); have_any_system=yes],
|
||||
[ AC_MSG_RESULT(no) ]
|
||||
)
|
||||
|
||||
@ -1288,12 +1289,13 @@ AC_LINK_IFELSE(
|
||||
[[ #include <stdlib.h> ]],
|
||||
[[ int nErr = ::_wsystem(NULL); ]]
|
||||
)],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_WSYSTEM, 1, Define to 1 if you have the `::wsystem' function.)],
|
||||
[ AC_MSG_RESULT(yes); have_any_system=yes],
|
||||
[ AC_MSG_RESULT(no) ]
|
||||
)
|
||||
|
||||
# Define to 1 if std::system or ::wsystem (Windows) is available
|
||||
AC_DEFINE([HAVE_SYSTEM], [HAVE_STD__SYSTEM || HAVE_WSYSTEM], [std::system or ::wsystem])
|
||||
if test "x$have_any_system" != "xno"; then
|
||||
AC_DEFINE(HAVE_SYSTEM, 1, Define to 1 if std::system or ::wsystem is available.)
|
||||
fi
|
||||
|
||||
dnl SUPPRESSED_CPPFLAGS=SUPPRESS_WARNINGS([$SOME_CPPFLAGS])
|
||||
dnl Replace -I with -isystem in $SOME_CPPFLAGS to suppress warnings from
|
||||
|
Loading…
Reference in New Issue
Block a user