diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2020-10-27 22:31:21 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-28 16:32:16 -0600 |
commit | 1cf969dfcba797a02d74540965677b92d3884cfa (patch) | |
tree | c84b1a7083b0d9f746714c661e3c506bf27f218d /configure | |
parent | a1ab3bd0ad5841fd9a548defc744625019ebbcf3 (diff) | |
download | liburing-1cf969dfcba797a02d74540965677b92d3884cfa.tar.gz |
examples: disable ucontext-cp if ucontext.h is not available
The header file `ucontext.h` is not available on musl based distros. The
example `ucontext-cp` is not built if `configure` fails to locate the
header.
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -287,6 +287,24 @@ if compile_prog_cxx "" "" "C++"; then fi print_config "C++" "$has_cxx" +########################################## +# check for ucontext support +has_ucontext="no" +cat > $TMPC << EOF +#include <ucontext.h> +int main(int argc, char **argv) +{ + ucontext_t ctx; + getcontext(&ctx); + return 0; +} +EOF +if compile_prog "" "" "has_ucontext"; then + has_ucontext="yes" +fi +print_config "has_ucontext" "$has_ucontext" + + ############################################################################# if test "$__kernel_rwf_t" = "yes"; then @@ -304,6 +322,9 @@ fi if test "$has_cxx" = "yes"; then output_sym "CONFIG_HAVE_CXX" fi +if test "$has_ucontext" = "yes"; then + output_sym "CONFIG_HAVE_UCONTEXT" +fi echo "CC=$cc" >> $config_host_mak print_config "CC" "$cc" |