diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-12-14 17:36:57 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-12-16 17:51:15 +0100 |
commit | 6388033e107a74a6e962eabf4ec06065d12d28db (patch) | |
tree | a6ff6d3cd63c573e5914bdc35e127d2bd76fc9d7 /configure.ac | |
parent | b45eaf2fe16fb0e94333ab848962892b48648a28 (diff) |
configure: support libunwind of LLVM
The libunwind headers of LLVM are located in the subdirectory
/usr/include/libunwind. Search that subdirectory when the default
header test fails. Also extend the include path due to the transitive
include of `<__libunwind_config.h>`.
Closes: #894
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 6618ce19..bcbc0a28 100644 --- a/configure.ac +++ b/configure.ac @@ -419,13 +419,23 @@ case "$enable_unwind" in AC_CHECK_LIB([lzma], [lzma_index_buffer_decode]) fi AC_CHECK_LIB([unwind], [backtrace], [], [enable_unwind=no]) - AC_CHECK_HEADERS([libunwind.h], [], [enable_unwind=no]) + AC_CHECK_HEADERS([libunwind.h], [], [ + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -I/usr/include/libunwind" + AC_CHECK_HEADERS([libunwind/libunwind.h], [], [ + enable_unwind=no + CFLAGS="$old_CFLAGS" + ]) + ]) ;; no) ;; yes) AC_CHECK_LIB([unwind], [backtrace], [], [AC_MSG_ERROR([can not find required library libunwind])]) - AC_CHECK_HEADERS([libunwind.h], [], [AC_MSG_ERROR([can not find require header file libunwind.h])]) + AC_CHECK_HEADERS([libunwind.h], [], [ + CFLAGS="$CFLAGS -I/usr/include/libunwind" + AC_CHECK_HEADERS([libunwind/libunwind.h], [], [AC_MSG_ERROR([can not find required header file libunwind.h])]) + ]) ;; *) AC_MSG_ERROR([bad value '$enable_unwind' for --enable-unwind]) |