source:
roaraudio/plugins/ao/configure
@
2939:b2ee86242554
Last change on this file since 2939:b2ee86242554 was 1742:4fbe8cb28680, checked in by phi, 15 years ago | |
---|---|
|
|
File size: 1.4 KB |
Rev | Line | |
---|---|---|
[0] | 1 | #!/bin/sh |
2 | ||
[1740] | 3 | . ../configure.inc |
4 | ||
[0] | 5 | INSTALL_DIR=/usr/lib/ao/plugins-2/ |
6 | ||
[1050] | 7 | HAVE_ROAR=false |
8 | ||
[0] | 9 | while [ "$1" != '' ] |
10 | do | |
11 | case "$1" in | |
[1598] | 12 | --install-dir|--inst-dir) |
[0] | 13 | INSTALL_DIR="$2" |
14 | shift; | |
15 | ;; | |
[1729] | 16 | --pkg-config) |
17 | PKG_CONFIG="$2" | |
18 | shift; | |
19 | ;; | |
[1050] | 20 | --force-have-roar) |
21 | HAVE_ROAR=true | |
22 | ;; | |
[0] | 23 | --help|-h) |
24 | cat << EOF | |
25 | Usage: ./configure [OPTIONS]... | |
26 | ||
27 | Options: | |
[1729] | 28 | --help - Show this help |
29 | --inst-dir DIR - Install dir | |
30 | --force-have-roar - Force to assume libroar is ok | |
31 | --pkg-config PKGCONF - Set filename for pkg-config | |
[0] | 32 | EOF |
[1703] | 33 | exit 0 |
[0] | 34 | ;; |
35 | *) | |
36 | echo 'Unknown option. Try ./configure --help' | |
37 | exit 2 | |
38 | esac | |
39 | shift; | |
40 | done | |
41 | ||
[1048] | 42 | on_error () { |
[1719] | 43 | rm -f Makefile.conf |
[1048] | 44 | exit 1; |
45 | } | |
46 | ||
[1742] | 47 | check_cc; |
48 | check_pkg_config; | |
[1729] | 49 | |
[0] | 50 | echo -n 'testing for libao... ' |
51 | cat > tests.c << EOF | |
52 | #include <ao/ao.h> | |
53 | #include <ao/plugin.h> | |
54 | int main (void) { return 0; } | |
55 | EOF | |
56 | ||
[1729] | 57 | if [ "$PKG_CONFIG" = '' ] |
58 | then | |
59 | AO_LIBS='' | |
60 | AO_CFLAGS='' | |
61 | else | |
62 | AO_LIBS=`pkg-config --libs ao` | |
63 | AO_CFLAGS=`pkg-config --cflags ao` | |
64 | fi | |
65 | if [ "$AO_LIBS" = '' -a "$AO_CFLAGS" = '' ] | |
66 | then | |
67 | AO_LIBS='-lao' | |
68 | AO_CFLAGS='' | |
69 | fi | |
70 | ||
71 | $CC $AO_LIBS $AO_CFLAGS -o tests tests.c 2> /dev/null | |
[0] | 72 | ./tests 2> /dev/null |
73 | ||
74 | if [ "$?" = '0' ] | |
75 | then | |
76 | echo yes | |
77 | else | |
78 | echo no. | |
[1048] | 79 | on_error |
[0] | 80 | fi |
81 | ||
[1742] | 82 | check_libroar; |
[0] | 83 | |
84 | rm -f tests tests.c | |
85 | ||
[1719] | 86 | echo creating Makefile.conf... |
87 | { | |
88 | echo "CC=$CC" | |
89 | echo "INSTALL_DIR=$INSTALL_DIR" | |
[1729] | 90 | echo |
91 | echo "AO_CFLAGS=$AO_CFLAGS" | |
92 | echo "AO_LIBS=$AO_LIBS" | |
[1720] | 93 | } > Makefile.conf |
[0] | 94 | |
95 | #ll |
Note: See TracBrowser
for help on using the repository browser.