]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
added -lmodplug if libmodplug.a is detected, and a corresponding #define
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 13 Dec 2007 16:33:57 +0000 (16:33 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 13 Dec 2007 16:33:57 +0000 (16:33 +0000)
to tell the code about this linkage, openSUSE 10.3 does not include
libmodplug.so so this is sadly necessary

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7794 d7cf8633-e32d-0410-b094-e92efae38249

makefile
makefile.inc

index 45b2d97f666b7f08004d331141799d3bde69430f..4423d411dc2a0cbc39c8615fb5b2dcfddd42d732 100644 (file)
--- a/makefile
+++ b/makefile
@@ -199,12 +199,18 @@ endif
 ifeq ($(DP_SOUND_API), OSS)
        OBJ_SOUND=$(OBJ_SND_OSS)
        LIB_SOUND=$(LIB_SND_OSS)
+       ifneq ($(shell [ -e /usr/lib64/libmodplug.a ] || [ -e /usr/lib/libmodplug.a ]), false)
+               LIB_SOUND+=-lmodplug -lstdc++
+       endif
 endif
 
 # ALSA: Advanced Linux Sound Architecture
 ifeq ($(DP_SOUND_API), ALSA)
        OBJ_SOUND=$(OBJ_SND_ALSA)
        LIB_SOUND=$(LIB_SND_ALSA)
+       ifneq ($(shell [ -e /usr/lib64/libmodplug.a ] || [ -e /usr/lib/libmodplug.a ]), false)
+               LIB_SOUND+=-lmodplug -lstdc++
+       endif
 endif
 
 # COREAUDIO: Core Audio
index 1d7ee8b97e94e24814a43bcacfe426638a993548..1ba224baf7543579ee55e8d4327259f1914db986 100644 (file)
@@ -396,6 +396,9 @@ bin-release :
                LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)"
        $(STRIP) $(EXE)
 
+snd_modplug.o: snd_modplug.c
+       if [ -e /usr/lib64/libmodplug.a ] || [ -e /usr/lib/libmodplug.a ] ; then $(DO_CC) -DSND_MODPLUG_STATIC ; else $(DO_CC) ; fi
+
 vid_glx.o: vid_glx.c
        $(DO_CC) -I/usr/X11R6/include