[3/3] build: default to system-provided talloc
diff mbox

Message ID 1412333824-18594-4-git-send-email-jengelh@inai.de
State Superseded
Headers show

Commit Message

Jan Engelhardt Oct. 3, 2014, 10:57 a.m. UTC
Rename the option --enable-talloc to --enable-internal-talloc, and
then make disable-internal-talloc the default when nothing else is
specified.
---
 configure.ac        | 12 ++++++------
 include/Makefile.am |  2 +-
 src/Makefile.am     |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

Patch
diff mbox

diff --git a/configure.ac b/configure.ac
index f0d1206..f12675a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,14 +82,14 @@  CHECK_TM_INCLUDES_TM_GMTOFF
 dnl Generate the output
 AC_CONFIG_HEADER(config.h)
 
-AC_ARG_ENABLE(talloc,
+AC_ARG_ENABLE([internal-talloc],
 	[AS_HELP_STRING(
-		[--disable-talloc],
+		[--enable-internal-talloc],
 		[Disable using bundled talloc memory allocator]
 	)],
-	[enable_talloc=$enableval], [enable_talloc="yes"])
-AM_CONDITIONAL(ENABLE_TALLOC, [test x"$enable_talloc" = x"yes"])
-AS_IF([test x"$enable_talloc" = xno],
+	[internal_talloc=$enableval], [internal_talloc="no"])
+AM_CONDITIONAL([INTERNAL_TALLOC], [test x"$internal_talloc" = x"yes"])
+AS_IF([test x"$internal_talloc" = xno],
 	[
 		PKG_CHECK_MODULES([TALLOC], [talloc])
 		OSMOCORE_INTERNAL_TALLOC=0
@@ -186,7 +186,7 @@  then
 	AM_CONDITIONAL(ENABLE_MSGFILE, false)
 	AM_CONDITIONAL(ENABLE_SERIAL, false)
 	AM_CONDITIONAL(ENABLE_VTY, false)
-	AM_CONDITIONAL(ENABLE_TALLOC, false)
+	AM_CONDITIONAL([INTERNAL_TALLOC], [true])
 	AM_CONDITIONAL(ENABLE_UTILITIES, false)
 	AM_CONDITIONAL(ENABLE_GB, false)
 	AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
diff --git a/include/Makefile.am b/include/Makefile.am
index 4d59a72..d8af474 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -90,7 +90,7 @@  nobase_include_HEADERS += osmocom/core/plugin.h
 endif
 
 nobase_nodist_include_HEADERS = osmocom/core/talloc.h
-if ENABLE_TALLOC
+if INTERNAL_TALLOC
 nobase_include_HEADERS += osmocom/core/talloc_int.h
 endif
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 3924330..4a6ba5c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@  else
 libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
 endif
 
-if ENABLE_TALLOC
+if INTERNAL_TALLOC
 libosmocore_la_SOURCES += talloc.c
 else
 libosmocore_la_LIBADD += $(TALLOC_LIBS)