From: Simon McVittie Date: Fri, 17 May 2013 23:36:31 +0000 (+0100) Subject: Add support for disabling libavw X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ff5a8f5f0f27ba63ae7ba2f618688ac39acd2d6;p=xonotic%2Fdarkplaces.git Add support for disabling libavw As with all the other dlopen()'d libraries, if we're going to use them, we should link them properly so dpkg-shlibdeps can pick up the right versioned dependencies. Xonotic 0.7.0 doesn't seem to ship this one so we can probably just omit it. Origin: vendor, Debian Forwarded: no --- diff --git a/cl_video_libavw.c b/cl_video_libavw.c index 7924127a..6ccdb548 100644 --- a/cl_video_libavw.c +++ b/cl_video_libavw.c @@ -24,6 +24,25 @@ // LordHavoc: for some reason this is being #include'd rather than treated as its own file... // LordHavoc: adapted to not require stdint.h as this is not available on MSVC++, using unsigned char instead of uint8_t and fs_offset_t instead of int64_t. +#ifdef DISABLE_AVW + +static qboolean LibAvW_OpenLibrary(void) +{ + return false; +} + +static void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring) +{ + return NULL; +} + + +static void LibAvW_CloseLibrary(void) +{ +} + +#else /* !DISABLE_AVW */ + // scaler type #define LIBAVW_SCALER_BILINEAR 0 #define LIBAVW_SCALER_BICUBIC 1 @@ -384,3 +403,4 @@ static void LibAvW_CloseLibrary(void) Sys_UnloadLibrary(&libavw_dll); } +#endif /* !DISABLE_AVW */ diff --git a/makefile b/makefile index 341e8262..01e379fd 100644 --- a/makefile +++ b/makefile @@ -319,6 +319,10 @@ else CFLAGS_FS= endif +ifdef DISABLE_AVW +CFLAGS_AVW=-DDISABLE_AVW +endif + ifdef LINK_TO_CURL CFLAGS_CURL=-DLINK_TO_CURL `pkg-config --cflags libcurl` LIB_CURL=`pkg-config --libs libcurl` diff --git a/makefile.inc b/makefile.inc index e233ff58..fcfe1ebd 100644 --- a/makefile.inc +++ b/makefile.inc @@ -194,6 +194,7 @@ CFLAGS_COMMON=\ $(CFLAGS_PRELOAD) \ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ + $(CFLAGS_AVW) \ $(CFLAGS_CURL) \ $(CFLAGS_FREETYPE2) \ $(CFLAGS_LIBJPEG) \