aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-11-21 00:41:43 +0100
committerHarald Welte <laforge@gnumonks.org>2015-11-21 00:50:19 +0100
commita10ef29b47123a60755b59befca9b2d45f3e29fa (patch)
treefcdbf5df653855eedec1a3aaeb3465121b0dcc58 /include
parentb32a19467ffde540b059bf166a378decf07701b8 (diff)
use system-wide libtalloc with --enable-system-talloc
This introduces a new configure flag by which the libosmocore-internal talloc code is not compiled, but rather a system-wide libtalloc is used. When we started openbsc/libosmocore in 2008, libtalloc was not widely present on systems yet. This has changed meanwhile, and we should simply use the system-wide library
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am15
-rw-r--r--include/osmocom/core/talloc-internal.h (renamed from include/osmocom/core/talloc.h)0
2 files changed, 14 insertions, 1 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 20735800..b8739e02 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -35,6 +35,7 @@ nobase_include_HEADERS = \
osmocom/core/socket.h \
osmocom/core/statistics.h \
osmocom/core/strrb.h \
+ osmocom/core/talloc.h \
osmocom/core/timer.h \
osmocom/core/utils.h \
osmocom/core/write_queue.h \
@@ -97,7 +98,7 @@ nobase_include_HEADERS += osmocom/core/plugin.h
endif
if ENABLE_TALLOC
-nobase_include_HEADERS += osmocom/core/talloc.h
+nobase_include_HEADERS += osmocom/core/talloc-internal.h
endif
if ENABLE_MSGFILE
@@ -133,3 +134,15 @@ osmocom/core/bit%gen.h: osmocom/core/bitXXgen.h.tpl
osmocom/core/crc%gen.h: osmocom/core/crcXXgen.h.tpl
$(AM_V_GEN)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)sed -e's/XX/$*/g' $< > $@
+
+# regenerate talloc.h with config.status every time config.status changes
+osmocom/core/talloc.h: stamp-talloc
+ :
+
+stamp-talloc: $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=osmocom/core/talloc.h \
+ $(SHELL) ./config.status
+ echo timestamp > $@
+
+DISTCLEANFILES = stamp-talloc
diff --git a/include/osmocom/core/talloc.h b/include/osmocom/core/talloc-internal.h
index dde102b2..dde102b2 100644
--- a/include/osmocom/core/talloc.h
+++ b/include/osmocom/core/talloc-internal.h