Debian Codegraph @

tools/faust2appls/faustpath

raw symbols SCIP
1 #!/bin/bash -e
2
3 #####################################################################
4 # #
5 # Search where Faust is installed and defines #
6 # $FAUSTLIB and $FAUSTINC so that we can use #
7 # -L$FAUSTLIB and -I$FAUSTINC where needed. #
8 # (c) Grame, 2013 #
9 # #
10 #####################################################################
11
12 #-------------------------------------------------------------------------------
13 # Search where Faust is installed. Store '.../share/faust/' in $FAUSTLIB
14 # and '.../include/(faust)' in $FAUSTINC
15 #
16 # USAGE :
17 # add line << . faustpath >> to your script
18 # and use -L$FAUSTLIB and -I$FAUSTINC where needed
19
20 FAUSTLDDIR=$(faust -libdir);
21 FAUSTLIB=$(faust -dspdir);
22 FAUSTINC=$(faust -includedir);
23 [ -n "$FAUSTARCH" ] || FAUSTARCH=$(faust -archdir);
24
25 [ -n "$MAXSDK" ] || MAXSDK=/usr/local/include/c74support/
26 CSOUND_MACSDK=/Library/Frameworks/CsoundLib64.framework
27 # try and guess a good place for Pd header files. Taking the first entry in /Applications/Pd- and taking the folder containing m_pd.h
28 [ -n "$PUREDATA_MACSDK" ] || PUREDATA_MACSDK=$(ls -d /Applications/Pd-* 2> /dev/null | head -n1 | xargs -I REPL find REPL -name m_pd.h -exec dirname {} \; | head -n1)
29 [ -n "$PUREDATA_LINUXSDK" ] || PUREDATA_LINUXSDK=$(find /usr/include/pd /usr/include/libpd/ /usr/include/pdextended /usr/local/include/pd /usr/local/include/libpd -name m_pd.h -exec dirname {} \; 2>/dev/null| head -n1)
30 VSTSDK=""
31 [ -n "$SUPERCOLLIDER_HEADERS" ] || SUPERCOLLIDER_HEADERS=/usr/local/include/SuperCollider/
32
33 FPATH="$FAUST_INSTALL /usr/local /usr /opt /opt/local"; # <- where to search
34 if [ -z "$FAUSTLIB" ] || [ -z "$FAUSTINC" ]; then
35 for f in $FPATH; do
36 if [ -e "${f}/share/faust" ]; then FAUSTLIB=${f}/share/faust; fi
37 if [ -e "${f}/include/faust" ]; then FAUSTINC=${f}/include/; fi
38 done
39 fi
40
41 for f in $FPATH; do
42 if [ -e "${f}/lib/libmicrohttpd.a" ]; then HTTPLIB=${f}/share/faust; fi
43 done
44
45 if [ -e /etc/faust/faustpath ]; then
46 . /etc/faust/faustpath
47 fi
48 if [ -e "${HOME}/.faust/faustpath" ]; then
49 . "${HOME}/.faust/faustpath"
50 fi
51
52 if [ -z "$FAUSTLIB" ] || [ -z "$FAUSTINC" ]; then
53 echo "ERROR : $0 cannot find Faust directories (normally /usr/local/include/faust and /usr/local/share/faust)";
54 exit 1;
55 fi