From 1fe4e0c239423644f1562d4aadc374495dce81c9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 12 May 2013 16:56:56 +0100 Subject: [PATCH] Add USE_INTERNAL_LIBS, a default for USE_INTERNAL_* Linux distributions that want to link dependencies externally will generally want to link (almost) every dependency externally; similarly, minimal-dependency builds that want to use the embedded copies of dependencies will generally want to do so for (almost) every dependency. Make it easier to choose one of those by setting USE_INTERNAL_LIBS=0 or USE_INTERNAL_LIBS=1, respectively. The default can still be overridden per-dependency; for instance, "make USE_INTERNAL_LIBS=0 USE_INTERNAL_OPUS=1" will use the system version of everything except Opus. --- Makefile | 16 ++++++++++------ README | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f7ae1159..b4d9be64 100644 --- a/Makefile +++ b/Makefile @@ -187,28 +187,32 @@ ifndef USE_FREETYPE USE_FREETYPE=0 endif +ifndef USE_INTERNAL_LIBS +USE_INTERNAL_LIBS=1 +endif + ifndef USE_INTERNAL_SPEEX -USE_INTERNAL_SPEEX=1 +USE_INTERNAL_SPEEX=$(USE_INTERNAL_LIBS) endif ifndef USE_INTERNAL_OGG -USE_INTERNAL_OGG=1 +USE_INTERNAL_OGG=$(USE_INTERNAL_LIBS) endif ifndef USE_INTERNAL_OPUS -USE_INTERNAL_OPUS=1 +USE_INTERNAL_OPUS=$(USE_INTERNAL_LIBS) endif ifndef USE_INTERNAL_ZLIB -USE_INTERNAL_ZLIB=1 +USE_INTERNAL_ZLIB=$(USE_INTERNAL_LIBS) endif ifndef USE_INTERNAL_JPEG -USE_INTERNAL_JPEG=1 +USE_INTERNAL_JPEG=$(USE_INTERNAL_LIBS) endif ifndef USE_LOCAL_HEADERS -USE_LOCAL_HEADERS=1 +USE_LOCAL_HEADERS=$(USE_INTERNAL_LIBS) endif ifndef USE_RENDERER_DLOPEN diff --git a/README b/README index 1f4cf49c..9f10163b 100644 --- a/README +++ b/README @@ -97,6 +97,10 @@ Makefile.local: USE_CODEC_OPUS - enable Ogg Opus support USE_MUMBLE - enable Mumble support USE_VOIP - enable built-in VoIP support + USE_INTERNAL_LIBS - build internal libraries instead of dynamically + linking against system libraries; this just sets + the default for USE_INTERNAL_SPEEX etc. + and USE_LOCAL_HEADERS USE_INTERNAL_SPEEX - build internal speex library instead of dynamically linking against system libspeex USE_FREETYPE - enable FreeType support for rendering fonts