source: roaraudio/plugins/ao/configure @ 1720:b5bacf3d00cc

Last change on this file since 1720:b5bacf3d00cc was 1720:b5bacf3d00cc, checked in by phi, 15 years ago

corredted filename

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