source: roaraudio/plugins/audacious/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: 2.0 KB
Line 
1#!/bin/sh
2
3. ../configure.inc
4
5HAVE_ROAR=false
6
7while [ "$1" != '' ]
8do
9 case "$1" in
10  --inst-dir)
11   INSTALL_DIR="$2"
12   shift;
13  ;;
14  --pkg-config)
15   PKG_CONFIG="$2"
16   shift;
17  ;;
18  --force-have-roar)
19   HAVE_ROAR=true
20  ;;
21  --help|-h)
22    cat << EOF
23Usage: ./configure [OPTIONS]...
24
25Options:
26  --help               - Show this help
27  --inst-dir DIR       - Install dir
28  --force-have-roar    - Force to assume libroar is ok
29  --pkg-config PKGCONF - Set filename for pkg-config
30EOF
31    exit 0
32   ;;
33  *)
34    echo 'Unknown option. Try ./configure --help'
35    exit 2
36 esac
37 shift;
38done
39
40on_error () {
41 exit 1;
42}
43
44check_cc;
45check_pkg_config;
46
47echo -n 'testing for gtk... '
48
49if [ "$PKG_CONFIG" != '' ]
50then
51 GTK_LIBS=`$PKG_CONFIG  gtk+-2.0 --libs 2> /dev/null`
52 GTK_CFLAFS=`$PKG_CONFIG --cflags gtk+-2.0 2> /dev/null`
53else
54 GTK_LIBS=`gtk-config gtk+-2.0 --libs 2> /dev/null`
55 GTK_CFLAFS=`gtk-config gtk+-2.0 --cflags 2> /dev/null`
56fi
57
58if [ "$GTK_LIBS" = '' -a "$GTK_CFLAFS" = '' ]
59then
60 echo no.
61 on_error;
62else
63 echo yes
64fi
65
66echo -n 'testing for audacious version... '
67if $PKG_CONFIG --atleast-version=1.5.1 audacious 2> /dev/null
68then
69 echo '>= 1.5.1'
70else
71 echo 'too old'
72 on_error;
73fi
74
75echo -n 'testing for audacious... '
76XMMS_LIBS=`$PKG_CONFIG audacious  --libs 2> /dev/null`
77XMMS_CFLAGS=`$PKG_CONFIG audacious  --cflags 2> /dev/null`
78
79if [ "$XMMS_LIBS" = '' -a "$XMMS_CFLAGS" = '' ]
80then
81 echo no.
82 on_error;
83else
84 echo yes
85fi
86
87echo -n 'testing for audacious plugin dir... '
88if [ "$INSTALL_DIR" = '' ]
89then
90 INSTALL_DIR="`$PKG_CONFIG --variable=output_plugin_dir audacious 2> /dev/null`"
91
92 if [ "$INSTALL_DIR" = '' ]
93 then
94  echo not found.
95  on_error;
96 else
97  echo "$INSTALL_DIR"
98 fi
99else
100  echo "$INSTALL_DIR"
101fi
102
103check_libroar;
104
105rm -f tests tests.c
106
107echo creating Makefile.conf...
108{
109 echo "CC=$CC"
110 echo
111 echo "GTK_LIBS=$GTK_LIBS"
112 echo "GTK_CFLAFS=$GTK_CFLAFS"
113 echo
114 echo "XMMS_LIBS=$XMMS_LIBS"
115 echo "XMMS_CFLAGS=$XMMS_CFLAGS"
116 echo
117 echo "INSTALL_DIR=$INSTALL_DIR"
118} > Makefile.conf
119
120#ll
Note: See TracBrowser for help on using the repository browser.