]> git.proxmox.com Git - mirror_ovs.git/commitdiff
configure: Properly handle case where libunwind.h is not available.
authorYi-Hung Wei <yihung.wei@gmail.com>
Thu, 17 Oct 2019 04:35:55 +0000 (21:35 -0700)
committerWilliam Tu <u9012063@gmail.com>
Thu, 17 Oct 2019 15:43:19 +0000 (08:43 -0700)
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>
m4/openvswitch.m4

index 79e0be5a33ddd2dc3f8c48392d58710dd965b2a2..fe323a020b9dbe5863dfc92469a314739cd31efa 100644 (file)
@@ -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"