X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fsox%2Fconfigure;h=9df730af6e8e259d65cef0820bc18cba7d7a68cd;hb=e89b21b07607ae485f56b32f3e67f83f528f2ae6;hp=f3b2c364fa0e1c865fefa3626ab10880404afcb8;hpb=5bf7729917f01e7ee1e4fcfc182f2ea75e3efb1a;p=melted diff --git a/src/modules/sox/configure b/src/modules/sox/configure index f3b2c36..9df730a 100755 --- a/src/modules/sox/configure +++ b/src/modules/sox/configure @@ -8,34 +8,36 @@ then Darwin) LDD="otool -L" ;; - Linux) + Linux|FreeBSD) LDD="ldd" ;; *) ;; esac - which libst-config > /dev/null 2>&1 + pkg-config sox if [ $? -eq 0 ] then disable_sox=0 - - # determine if we need libsndfile - $LDD $(which sox) | grep libsndfile > /dev/null - [ $? -eq 0 ] && libsndfile="-lsndfile" - - # determine if we need libsamplerate - $LDD $(which sox) | grep libsamplerate > /dev/null - [ $? -eq 0 ] && libsamplerate="-lsamplerate" - - echo "CFLAGS += $(libst-config --cflags) -I../../" > config.mak - echo "LDFLAGS += -lst $(libst-config --libs) $libsndfile $libsamplerate" >> config.mak + echo "CFLAGS += $(pkg-config --cflags sox) -I$(pkg-config --variable=prefix sox)" > config.mak + echo "LDFLAGS += $(pkg-config --libs sox)" >> config.mak + [ $(pkg-config --modversion sox | cut -d. -f1) -gt 13 ] && echo "CFLAGS += -DSOX14" >> config.mak else - pkg-config sox + which libst-config > /dev/null 2>&1 if [ $? -eq 0 ] then - echo "CFLAGS += $(pkg-config --cflags sox)" > config.mak - echo "LDFLAGS += $(pkg-config --libs sox)" > config.mak + disable_sox=0 + + # determine if we need libsndfile + $LDD $(which sox) | grep libsndfile > /dev/null + [ $? -eq 0 ] && libsndfile="-lsndfile" + + # determine if we need libsamplerate + $LDD $(which sox) | grep libsamplerate > /dev/null + [ $? -eq 0 ] && libsamplerate="-lsamplerate" + + echo "CFLAGS += $(libst-config --cflags) -I../.." > config.mak + echo "LDFLAGS += -lst $(libst-config --libs) $libsndfile $libsamplerate" >> config.mak else sox --version 2> /dev/null | grep 'v14.' > /dev/null disable_sox=$?