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
38 echo "CFLAGS += $(pkg-config --cflags sox) -I$(pkg-config --variable=prefix sox)" > config.mak
39 echo "LDFLAGS += $(pkg-config --libs sox)" >> config.mak
40 [ "$(pkg-config --modversion sox)" > "13" ] && echo "CFLAGS += -DSOX14" >> config.mak
42 sox --version 2> /dev/null | grep 'v14.' > /dev/null
44 if [ $disable_sox -eq 0 ]
50 [ -d /usr/lib/lib64 ] && export LIBDIR=lib64 || export LIBDIR=lib
59 soxdir=$(dirname $sox)
61 soxdir=$(dirname $soxdir)
63 # determine if we need libsamplerate
64 $LDD "$sox" | grep libsamplerate > /dev/null
65 [ $? -eq 0 ] && libsamplerate="-lsamplerate"
67 # determine if we need libsfx
68 $LDD $(which sox) | grep libsfx > /dev/null
69 [ $? -eq 0 ] && libsfx="-lsfx"
71 echo "CFLAGS += -DSOX14 -I$soxdir/include" > config.mak
72 echo "LDFLAGS += -L$soxdir/$LIBDIR -lsox $libsfx $libsamplerate" >> config.mak
77 if [ "$disable_sox" != "0" ]
79 echo "- sox not found: disabling"