current-working
Rev | Line | |
---|
[0] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | INSTALL_DIR=/usr/lib/ao/plugins-2/ |
---|
| 4 | |
---|
| 5 | while [ "$1" != '' ] |
---|
| 6 | do |
---|
| 7 | case "$1" in |
---|
| 8 | --inst-dir) |
---|
| 9 | INSTALL_DIR="$2" |
---|
| 10 | shift; |
---|
| 11 | ;; |
---|
| 12 | --help|-h) |
---|
| 13 | cat << EOF |
---|
| 14 | Usage: ./configure [OPTIONS]... |
---|
| 15 | |
---|
| 16 | Options: |
---|
| 17 | --help - Show this help |
---|
| 18 | --inst-dir DIR - Install dir |
---|
| 19 | EOF |
---|
| 20 | ;; |
---|
| 21 | *) |
---|
| 22 | echo 'Unknown option. Try ./configure --help' |
---|
| 23 | exit 2 |
---|
| 24 | esac |
---|
| 25 | shift; |
---|
| 26 | done |
---|
| 27 | |
---|
| 28 | echo -n 'testing for C compiler... ' |
---|
| 29 | CC=$(which gcc cc 2> /dev/null | head -n 1) |
---|
| 30 | if [ -x "$CC" ] |
---|
| 31 | then |
---|
| 32 | echo $CC |
---|
| 33 | else |
---|
| 34 | echo no. |
---|
| 35 | exit 1; |
---|
| 36 | fi |
---|
| 37 | |
---|
| 38 | echo -n 'testing for libao... ' |
---|
| 39 | cat > tests.c << EOF |
---|
| 40 | #include <ao/ao.h> |
---|
| 41 | #include <ao/plugin.h> |
---|
| 42 | int main (void) { return 0; } |
---|
| 43 | EOF |
---|
| 44 | |
---|
| 45 | $CC -lao -o tests tests.c 2> /dev/null |
---|
| 46 | ./tests 2> /dev/null |
---|
| 47 | |
---|
| 48 | if [ "$?" = '0' ] |
---|
| 49 | then |
---|
| 50 | echo yes |
---|
| 51 | else |
---|
| 52 | echo no. |
---|
| 53 | exit 1 |
---|
| 54 | fi |
---|
| 55 | rm -f tests tests.c |
---|
| 56 | |
---|
| 57 | echo -n 'testing for libroar... ' |
---|
| 58 | cat > tests.c << EOF |
---|
| 59 | #include <roaraudio.h> |
---|
| 60 | int main (void) { return 0; } |
---|
| 61 | EOF |
---|
| 62 | |
---|
| 63 | $CC -lroar -o tests tests.c 2> /dev/null |
---|
| 64 | ./tests 2> /dev/null |
---|
| 65 | |
---|
| 66 | if [ "$?" = '0' ] |
---|
| 67 | then |
---|
| 68 | echo yes |
---|
| 69 | else |
---|
| 70 | echo no. |
---|
| 71 | exit 1 |
---|
| 72 | fi |
---|
| 73 | rm -f tests tests.c |
---|
| 74 | |
---|
| 75 | echo creating Makefile... |
---|
| 76 | echo "CC=$CC" > Makefile |
---|
| 77 | echo "INSTALL_DIR=$INSTALL_DIR" >> Makefile |
---|
| 78 | cat Makefile.pre >> Makefile |
---|
| 79 | |
---|
| 80 | #ll |
---|
Note: See
TracBrowser
for help on using the repository browser.