File: gen_das_config_h.sh

package info (click to toggle)
jack-capture 0.9.71-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 552 kB
  • ctags: 971
  • sloc: ansic: 6,311; cpp: 1,583; makefile: 123; sh: 114
file content (59 lines) | stat: -rw-r--r-- 1,790 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


echo "#include <sndfile.h>" >temp$$.c
echo "main(){return SF_FORMAT_OGG;}" >>temp$$.c
echo >>temp$$.c
if gcc temp$$.c 2>/dev/null; then
    echo "#define HAVE_OGG 1"
else
    echo "#define HAVE_OGG 0"
fi


echo "#include <lame/lame.h>" >temp$$.c
echo "main(){return 0;}" >>temp$$.c
echo >>temp$$.c
if gcc temp$$.c -lmp3lame 2>/dev/null; then
    echo "#define HAVE_LAME 1"
    echo "//COMPILEFLAGS -lmp3lame"
else
    echo "#define HAVE_LAME 0"
fi


echo "#include <lo/lo.h>" >temp$$.c
echo "main(){return 0;}" >>temp$$.c
echo >>temp$$.c
if pkg-config --cflags --libs liblo >/dev/null 2>/dev/null && gcc temp$$.c `pkg-config --cflags --libs liblo` 2>/dev/null ; then
    echo "#define HAVE_LIBLO 1"
    echo "//COMPILEFLAGS " `pkg-config --cflags --libs liblo`
else
    echo "#define HAVE_LIBLO 0"
fi


echo "#include <jack/jack.h>" >temp$$.c
echo "main(){return (int)jack_port_get_latency_range;}" >>temp$$.c
echo >>temp$$.c
if gcc temp$$.c -ljack 2>/dev/null ; then
    echo "#define NEW_JACK_LATENCY_API 1"
else
    echo "#define NEW_JACK_LATENCY_API 0"
fi


rm temp$$.c