diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2019-10-16 21:35:55 -0700 |
---|---|---|
committer | William Tu <u9012063@gmail.com> | 2019-10-17 08:43:19 -0700 |
commit | 81a29c0abd10e219979c165a4883489eb4cee24b (patch) | |
tree | 72c4bb844f3aead7c313c8c762810f208a9051ce /m4 | |
parent | 15394e0ff7ae58328d1619ec9c8507b4437ae81d (diff) | |
download | openvswitch-81a29c0abd10e219979c165a4883489eb4cee24b.tar.gz |
configure: Properly handle case where libunwind.h is not available.
It is possible that user install libunwind but not libunwind-devel,
and it will run into a compilation error. So we need to check the
existence of the library and the header file.
Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/openvswitch.m4 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 79e0be5a3..fe323a020 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -640,7 +640,9 @@ AC_DEFUN([OVS_CHECK_UNBOUND], dnl Checks for libunwind. AC_DEFUN([OVS_CHECK_UNWIND], - [AC_CHECK_LIB(unwind, unw_backtrace, [HAVE_UNWIND=yes], [HAVE_UNWIND=no]) + [AC_CHECK_LIB([unwind], [unw_backtrace], + [AC_CHECK_HEADERS([libunwind.h], [HAVE_UNWIND=yes], [HAVE_UNWIND=no])], + [HAVE_UNWIND=no]) if test "$HAVE_UNWIND" = yes; then AC_DEFINE([HAVE_UNWIND], [1], [Define to 1 if unwind is detected.]) LIBS="$LIBS -lunwind" |