LIB_LIBVORBIS=`pkg-config --libs vorbisfile`
endif
+ifdef LINK_TO_MODPLUG
+CFLAGS_SND_MODPLUG=-DLINK_TO_MODPLUG `pkg-config --cflags libmodplug`
+LIB_SND_MODPLUG=`pkg-config --libs libmodplug`
+endif
+
ifdef LINK_TO_ZLIB
CFLAGS_ZLIB=-DLINK_TO_ZLIB
LIB_ZLIB=-lz
CFLAGS_CRYPTO_RIJNDAEL=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ -I$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)/../include\ -DCRYPTO_RIJNDAEL_STATIC`
# Additional stuff for libmodplug
-LIB_SND_MODPLUG=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a\ -lstdc++`
-CFLAGS_SND_MODPLUG=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ -I$(DP_MODPLUG_STATIC_LIBDIR)/../include\ -DSND_MODPLUG_STATIC`
+LIB_SND_MODPLUG?=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a\ -lstdc++`
+CFLAGS_SND_MODPLUG?=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ -I$(DP_MODPLUG_STATIC_LIBDIR)/../include\ -DSND_MODPLUG_STATIC`
# No sound
OBJ_SND_NULL=snd_null.o
#include "snd_main.h"
#include "snd_modplug.h"
-#ifdef SND_MODPLUG_STATIC
+#if defined(SND_MODPLUG_STATIC) || defined(LINK_TO_MODPLUG)
#include <libmodplug/modplug.h>
qboolean ModPlug_OpenLibrary (void)
return;
}
-#ifndef SND_MODPLUG_STATIC
+#if !(defined(SND_MODPLUG_STATIC) || defined(LINK_TO_MODPLUG))
if(qModPlug_SetMasterVolume)
#endif
qModPlug_SetMasterVolume(per_ch->mf, 512); // max volume, DP scales down!
return false;
}
-#ifndef SND_MODPLUG_STATIC
+#if !(defined(SND_MODPLUG_STATIC) || defined(LINK_TO_MODPLUG))
if(qModPlug_SetMasterVolume)
#endif
qModPlug_SetMasterVolume(mf, 512); // max volume, DP scales down!