Merge branch 'master' of git://git.samba.org/samba
[Samba/ita.git] / lib / util / fault.m4
blobc22976998ed55b3a893c8c40ed3c34d786cfcea9
1 AC_CHECK_HEADERS(execinfo.h)
2 AC_SEARCH_LIBS_EXT(backtrace, [execinfo], EXECINFO_LIBS)
3 AC_CHECK_FUNC_EXT(backtrace, $EXECINFO_LIBS)
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)
18 SMB_EXT_LIB(EXECINFO, [${EXECINFO_LIBS}], [${EXECINFO_CFLAGS}], [${EXECINFO_CPPFLAGS}], [${EXECINFO_LDFLAGS}])