Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec
[jra/samba/.git] / lib / util / fault.m4
1 AC_CHECK_HEADERS(execinfo.h)
2 AC_SEARCH_LIBS_EXT(backtrace, [execinfo], EXECINFO_LIBS)
3 AC_CHECK_FUNC_EXT(backtrace, $EXECINFO_LIBS)
4
5
6 if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x"yes";then
7         SMB_ENABLE(EXECINFO, YES)
8         EXECINFO_CFLAGS="$CFLAGS"
9         EXECINFO_CPPFLAGS="$CPPFLAGS"
10         EXECINFO_LDFLAGS="$LDFLAGS"
11         LIB_REMOVE_USR_LIB(EXECINFO_LDFLAGS)
12         CFLAGS_REMOVE_USR_INCLUDE(EXECINFO_CFLAGS)
13         CFLAGS_REMOVE_USR_INCLUDE(EXECINFO_CPPFLAGS)
14 else
15         SMB_ENABLE(EXECINFO,NO)
16 fi
17
18 SMB_EXT_LIB(EXECINFO, [${EXECINFO_LIBS}], [${EXECINFO_CFLAGS}], [${EXECINFO_CPPFLAGS}], [${EXECINFO_LDFLAGS}])