File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ option(DISABLE_WERROR "Avoid treating compiler warnings as fatal
97
97
option (ENABLE_RDRAND "Enable RDRAND Hardware RNG Hash Seed." OFF )
98
98
option (ENABLE_THREADING "Enable partial threading support." OFF )
99
99
option (OVERRIDE_GET_RANDOM_SEED "Override json_c_get_random_seed() with custom code." OFF )
100
+ option (DISABLE_EXTRA_LIBS "Avoid linking against extra libraries, such as libbsd." OFF )
100
101
101
102
102
103
if (UNIX OR MINGW OR CYGWIN )
@@ -171,7 +172,7 @@ check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
171
172
check_symbol_exists(vprintf "stdio.h" HAVE_VPRINTF)
172
173
173
174
check_symbol_exists(arc4random "stdlib.h" HAVE_ARC4RANDOM)
174
- if (NOT HAVE_ARC4RANDOM)
175
+ if (NOT HAVE_ARC4RANDOM AND DISABLE_EXTRA_LIBS STREQUAL "OFF" )
175
176
check_include_file(bsd/stdlib.h HAVE_BSD_STDLIB_H)
176
177
if (HAVE_BSD_STDLIB_H)
177
178
list (APPEND CMAKE_REQUIRED_LIBRARIES "-lbsd" )
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ $0 [<configure_options>] [-- [<cmake options>]]
30
30
--enable-static build static libraries [default=yes]
31
31
--disable-Bsymbolic Avoid linking with -Bsymbolic-function
32
32
--disable-werror Avoid treating compiler warnings as fatal errors
33
+ --disable-extra-libs Avoid linking against extra libraries, such as libbsd
33
34
34
35
EOF
35
36
exit
@@ -73,6 +74,9 @@ while [ $# -gt 0 ] ; do
73
74
--disable-werror)
74
75
FLAGS+=(-DDISABLE_WERROR=ON)
75
76
;;
77
+ --disable-extra-libs)
78
+ FLAGS+=(-DDISABLE_EXTRA_LIBS=ON)
79
+ ;;
76
80
--)
77
81
shift
78
82
break
You can’t perform that action at this time.
0 commit comments