source: roaraudio/plugins/ao/configure @ 1742:4fbe8cb28680

Last change on this file since 1742:4fbe8cb28680 was 1742:4fbe8cb28680, checked in by phi, 15 years ago

moved a lot things to the common configure file

  • Property exe set to *
File size: 1.4 KB
RevLine 
[0]1#!/bin/sh
2
[1740]3. ../configure.inc
4
[0]5INSTALL_DIR=/usr/lib/ao/plugins-2/
6
[1050]7HAVE_ROAR=false
8
[0]9while [ "$1" != '' ]
10do
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
25Usage: ./configure [OPTIONS]...
26
27Options:
[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]32EOF
[1703]33    exit 0
[0]34   ;;
35  *)
36    echo 'Unknown option. Try ./configure --help'
37    exit 2
38 esac
39 shift;
40done
41
[1048]42on_error () {
[1719]43 rm -f Makefile.conf
[1048]44 exit 1;
45}
46
[1742]47check_cc;
48check_pkg_config;
[1729]49
[0]50echo -n 'testing for libao... '
51cat > tests.c << EOF
52#include <ao/ao.h>
53#include <ao/plugin.h>
54int main (void) { return 0; }
55EOF
56
[1729]57if [ "$PKG_CONFIG" = '' ]
58then
59 AO_LIBS=''
60 AO_CFLAGS=''
61else
62 AO_LIBS=`pkg-config --libs ao`
63 AO_CFLAGS=`pkg-config --cflags ao`
64fi
65if [ "$AO_LIBS" = '' -a "$AO_CFLAGS" = '' ]
66then
67 AO_LIBS='-lao'
68 AO_CFLAGS=''
69fi
70
71$CC $AO_LIBS $AO_CFLAGS -o tests tests.c 2> /dev/null
[0]72./tests 2> /dev/null
73
74if [ "$?" = '0' ]
75then
76 echo yes
77else
78 echo no.
[1048]79 on_error
[0]80fi
81
[1742]82check_libroar;
[0]83
84rm -f tests tests.c
85
[1719]86echo 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.