5 # Determine how to lookup dependencies of executable for OS
22 echo "CFLAGS += $(pkg-config --cflags sox) -I$(pkg-config --variable=prefix sox)" > config.mak
23 echo "LDFLAGS += $(pkg-config --libs sox)" >> config.mak
24 [ $(pkg-config --modversion sox | cut -d. -f1) -gt 13 ] && echo "CFLAGS += -DSOX14" >> config.mak
26 which libst-config > /dev/null 2>&1
31 # determine if we need libsndfile
32 $LDD $(which sox) | grep libsndfile > /dev/null
33 [ $? -eq 0 ] && libsndfile="-lsndfile"
35 # determine if we need libsamplerate
36 $LDD $(which sox) | grep libsamplerate > /dev/null
37 [ $? -eq 0 ] && libsamplerate="-lsamplerate"
39 echo "CFLAGS += $(libst-config --cflags) -I../.." > config.mak
40 echo "LDFLAGS += -lst $(libst-config --libs) $libsndfile $libsamplerate" >> 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"