source: roaraudio/plugins/ao/configure @ 0:2a41d2f42394

Last change on this file since 0:2a41d2f42394 was 0:2a41d2f42394, checked in by phi, 16 years ago

Initial revision

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