From: Martin Schwenke Date: Tue, 1 Oct 2019 03:52:38 +0000 (+1000) Subject: util: Add detection of libunwind X-Git-Tag: samba-4.12.0rc1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=558bd7c83d08523a9e88414195d9703df38e9af2;p=thirdparty%2Fsamba.git util: Add detection of libunwind The current detection doesn't seem to work, so libunwind doesn't seem to be used. Signed-off-by: Martin Schwenke Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Tue Jan 21 08:12:17 UTC 2020 on sn-devel-184 --- diff --git a/lib/util/wscript_build b/lib/util/wscript_build index 3a80b93b2c7..a827eea3ed9 100644 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -82,7 +82,7 @@ bld.SAMBA_SUBSYSTEM('samba-util-core', become_daemon.c mkdir_p.c''', deps='''time-basic samba-debug socket-blocking talloc tevent execinfo pthread strv tini''', - public_deps='systemd systemd-daemon sys_rw', + public_deps='systemd systemd-daemon sys_rw LIBUNWIND', local_include=False) bld.SAMBA_LIBRARY('iov_buf', diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure index 93853511575..4f57184f515 100644 --- a/lib/util/wscript_configure +++ b/lib/util/wscript_configure @@ -8,7 +8,16 @@ if Options.options.disable_fault_handling: # backtrace could be in libexecinfo or in libc conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h') -conf.CHECK_HEADERS('execinfo.h libunwind.h') +conf.CHECK_HEADERS('execinfo.h') + +conf.SET_TARGET_TYPE('LIBUNWIND', 'EMPTY') +if conf.check_cfg(package='libunwind-generic', + args='--cflags --libs', + msg='Checking for libunwind', + uselib_store='LIBUNWIND', + mandatory=False): + if conf.CHECK_HEADERS('libunwind.h'): + conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB') conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')