Skip to content

Commit

Permalink
configure: Properly handle case where libunwind.h is not available.
Browse files Browse the repository at this point in the history
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: e2ed6fb ("fatal-signal: Catch SIGSEGV and print backtrace.")
Suggested-by: Ben Pfaff <[email protected]>
Signed-off-by: Yi-Hung Wei <[email protected]>
Signed-off-by: William Tu <[email protected]>
  • Loading branch information
YiHungWei authored and williamtu committed Oct 17, 2019
1 parent 15394e0 commit 81a29c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion m4/openvswitch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 81a29c0

Please sign in to comment.