From: Simon McVittie Date: Tue, 5 Jul 2011 21:16:28 +0000 (+0100) Subject: Add support for LINK_TO_LIBVORBIS (using pkg-config) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=278779b79e1655aec051c3edcf39caa04ce98102;p=xonotic%2Fdarkplaces.git Add support for LINK_TO_LIBVORBIS (using pkg-config) In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- diff --git a/makefile b/makefile index 1510b727..9afb12e7 100644 --- a/makefile +++ b/makefile @@ -307,6 +307,11 @@ CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG LIB_JPEG=-ljpeg endif +ifdef LINK_TO_LIBVORBIS +CFLAGS_LIBVORBIS=-DLINK_TO_LIBVORBIS `pkg-config --cflags vorbisfile` +LIB_LIBVORBIS=`pkg-config --libs vorbisfile` +endif + ifdef LINK_TO_ZLIB CFLAGS_ZLIB=-DLINK_TO_ZLIB LIB_ZLIB=-lz diff --git a/makefile.inc b/makefile.inc index bd018bb2..78448f72 100644 --- a/makefile.inc +++ b/makefile.inc @@ -193,6 +193,7 @@ CFLAGS_COMMON=\ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ $(CFLAGS_LIBJPEG) \ + $(CFLAGS_LIBVORBIS) \ $(CFLAGS_ZLIB) \ $(CFLAGS_D3D) \ -D_FILE_OFFSET_BITS=64 \ @@ -236,6 +237,7 @@ LDFLAGS_UNIXCOMMON=\ $(LIB_GMP) \ $(LIB_CRYPTO_RIJNDAEL) LDFLAGS_UNIXCL=\ + $(LIB_LIBVORBIS) \ -L$(UNIX_X11LIBPATH) \ -lX11 \ -lXpm \ @@ -274,6 +276,7 @@ CFLAGS_UNIX_PRELOAD=-DPREFER_PRELOAD LDFLAGS_UNIXSDL=\ $(SDLCONFIG_LIBS) \ + $(LIB_LIBVORBIS) \ $(LIB_SND_MODPLUG) EXE_UNIXCL=darkplaces-glx