From 4ff5a8f5f0f27ba63ae7ba2f618688ac39acd2d6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 18 May 2013 00:36:31 +0100 Subject: [PATCH] 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 --- cl_video_libavw.c | 20 ++++++++++++++++++++ makefile | 4 ++++ makefile.inc | 1 + 3 files changed, 25 insertions(+) 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) \ -- 2.39.2