5 # Determine how to lookup dependencies of executable for OS
18 which libst-config > /dev/null 2>&1
23 # determine if we need libsndfile
24 $LDD $(which sox) | grep libsndfile > /dev/null
25 [ $? -eq 0 ] && libsndfile="-lsndfile"
27 # determine if we need libsamplerate
28 $LDD $(which sox) | grep libsamplerate > /dev/null
29 [ $? -eq 0 ] && libsamplerate="-lsamplerate"
31 echo "CFLAGS += $(libst-config --cflags) -I../../" > config.mak
32 echo "LDFLAGS += -lst $(libst-config --libs) $libsndfile $libsamplerate" >> config.mak
37 echo "CFLAGS += $(pkg-config --cflags sox)" > config.mak
38 echo "LDFLAGS += $(pkg-config --libs sox)" > config.mak
40 sox --version 2> /dev/null | grep 'v14.' > /dev/null
42 if [ $disable_sox -eq 0 ]
48 [ -d /usr/lib/lib64 ] && export LIBDIR=lib64 || export LIBDIR=lib
57 soxdir=$(dirname $sox)
59 soxdir=$(dirname $soxdir)
61 # determine if we need libsamplerate
62 $LDD "$sox" | grep libsamplerate > /dev/null
63 [ $? -eq 0 ] && libsamplerate="-lsamplerate"
65 # determine if we need libsfx
66 $LDD $(which sox) | grep libsfx > /dev/null
67 [ $? -eq 0 ] && libsfx="-lsfx"
69 echo "CFLAGS += -DSOX14 -I$soxdir/include" > config.mak
70 echo "LDFLAGS += -L$soxdir/$LIBDIR -lsox $libsfx $libsamplerate" >> config.mak
75 if [ "$disable_sox" != "0" ]
77 echo "- sox not found: disabling"