source: roaraudio/plugins/xmms/configure @ 1106:b71671032077

Last change on this file since 1106:b71671032077 was 1056:24449841bc71, checked in by phi, 15 years ago

added coonfigure script :)

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