From patchwork Sat Oct 4 09:10:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Engelhardt X-Patchwork-Id: 396507 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0F2A1140129 for ; Sat, 4 Oct 2014 19:16:15 +1000 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1XaLRW-0007vC-3g; Sat, 04 Oct 2014 11:15:59 +0200 Received: from ares08.inai.de ([2a01:4f8:141:6ffe::1]) by ganesha.gnumonks.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XaLMB-0007lY-E4 for openbsc@lists.osmocom.org; Sat, 04 Oct 2014 11:10:40 +0200 Received: by ares08.inai.de (Postfix, from userid 25121) id 34358100EF36F; Sat, 4 Oct 2014 11:10:27 +0200 (CEST) From: Jan Engelhardt To: holger@freyther.de Subject: [PATCH 4/5] build: default to system-provided talloc Date: Sat, 4 Oct 2014 11:10:24 +0200 Message-Id: <1412413825-24016-5-git-send-email-jengelh@inai.de> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1412413825-24016-1-git-send-email-jengelh@inai.de> References: <1412413825-24016-1-git-send-email-jengelh@inai.de> X-Spam-Score: -0.0 (/) Cc: openbsc@lists.osmocom.org X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org 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 --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)