diff mbox

[4/5] build: default to system-provided talloc

Message ID 1412413825-24016-5-git-send-email-jengelh@inai.de
State Superseded
Headers show

Commit Message

Jan Engelhardt Oct. 4, 2014, 9:10 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 +-
 libosmocore.pc.in   |  2 +-
 src/Makefile.am     |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
diff mbox

Patch

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/libosmocore.pc.in b/libosmocore.pc.in
index 25832f6..2ec6a74 100644
--- a/libosmocore.pc.in
+++ b/libosmocore.pc.in
@@ -8,4 +8,4 @@  Description: C Utility Library
 Version: @VERSION@
 Libs: -L${libdir} -losmocore
 Cflags: -I${includedir}/
-@ENABLE_TALLOC_FALSE@Requires: talloc
+@INTERNAL_TALLOC_FALSE@Requires: talloc
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)