Skip to content

Commit 64b1fd4

Browse files
committed
cmake: Check system headers
1 parent 7b87a48 commit 64b1fd4

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

cmake/bitcoin-config.h.in

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@
3030
/* Copyright year */
3131
#define COPYRIGHT_YEAR @COPYRIGHT_YEAR@
3232

33+
/* Define to 1 if you have the <byteswap.h> header file. */
34+
#cmakedefine HAVE_BYTESWAP_H 1
35+
36+
/* Define to 1 if you have the <endian.h> header file. */
37+
#cmakedefine HAVE_ENDIAN_H 1
38+
39+
/* Define to 1 if you have the <sys/endian.h> header file. */
40+
#cmakedefine HAVE_SYS_ENDIAN_H 1
41+
42+
/* Define to 1 if you have the <sys/prctl.h> header file. */
43+
#cmakedefine HAVE_SYS_PRCTL_H 1
44+
45+
/* Define to 1 if you have the <sys/resources.h> header file. */
46+
#cmakedefine HAVE_SYS_RESOURCES_H 1
47+
48+
/* Define to 1 if you have the <sys/vmmeter.h> header file. */
49+
#cmakedefine HAVE_SYS_VMMETER_H 1
50+
51+
/* Define to 1 if you have the <vm/vm_param.h> header file. */
52+
#cmakedefine HAVE_VM_VM_PARAM_H 1
53+
3354
/* Define to the address where bug reports for this package should be sent. */
3455
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
3556

cmake/introspection.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5+
include(CheckIncludeFileCXX)
56
include(TestBigEndian)
67

78
test_big_endian(WORDS_BIGENDIAN)
9+
10+
# The following HAVE_{HEADER}_H variables go to the bitcoin-config.h header.
11+
check_include_file_cxx(byteswap.h HAVE_BYTESWAP_H)
12+
check_include_file_cxx(endian.h HAVE_ENDIAN_H)
13+
check_include_file_cxx(sys/endian.h HAVE_SYS_ENDIAN_H)
14+
check_include_file_cxx(sys/prctl.h HAVE_SYS_PRCTL_H)
15+
check_include_file_cxx(sys/resources.h HAVE_SYS_RESOURCES_H)
16+
check_include_file_cxx(sys/vmmeter.h HAVE_SYS_VMMETER_H)
17+
check_include_file_cxx(vm/vm_param.h HAVE_VM_VM_PARAM_H)

0 commit comments

Comments
 (0)