mirror of https://gerrit.osmocom.org/libosmocore
backtrace: Speculative fix for FreeBSD10.0 and execinfo.h
FreeBSD 10.0 ships an execinfo.h but one needs to link to an additional library for the backtrace functions. Check if there is a backtrace symbol in libexecinfo and if so link to that library.
This commit is contained in:
parent
0c50b17a26
commit
c2c042dfd7
|
@ -36,6 +36,9 @@ AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h)
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
|
AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
|
||||||
AC_SUBST(LIBRARY_DL)
|
AC_SUBST(LIBRARY_DL)
|
||||||
|
# for src/backtrace.c
|
||||||
|
AC_CHECK_LIB(execinfo, backtrace, BACKTRACE_LIB=-lexecinfo, BACKTRACE_LIB=)
|
||||||
|
AC_SUBST(BACKTRACE_LIB)
|
||||||
|
|
||||||
AC_PATH_PROG(DOXYGEN,doxygen,false)
|
AC_PATH_PROG(DOXYGEN,doxygen,false)
|
||||||
AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
|
AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
|
||||||
|
|
|
@ -6,6 +6,7 @@ AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/incl
|
||||||
|
|
||||||
lib_LTLIBRARIES = libosmocore.la
|
lib_LTLIBRARIES = libosmocore.la
|
||||||
|
|
||||||
|
libosmocore_la_LIBADD = $(BACKTRACE_LIB)
|
||||||
libosmocore_la_SOURCES = timer.c select.c signal.c msgb.c bits.c \
|
libosmocore_la_SOURCES = timer.c select.c signal.c msgb.c bits.c \
|
||||||
bitvec.c statistics.c \
|
bitvec.c statistics.c \
|
||||||
write_queue.c utils.c socket.c \
|
write_queue.c utils.c socket.c \
|
||||||
|
@ -26,7 +27,7 @@ endif
|
||||||
if ENABLE_TALLOC
|
if ENABLE_TALLOC
|
||||||
libosmocore_la_SOURCES += talloc.c
|
libosmocore_la_SOURCES += talloc.c
|
||||||
else
|
else
|
||||||
libosmocore_la_LIBADD = -ltalloc
|
libosmocore_la_LIBADD += -ltalloc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_MSGFILE
|
if ENABLE_MSGFILE
|
||||||
|
|
Loading…
Reference in New Issue