source: roaraudio/plugins/configure.inc @ 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

File size: 1008 bytes
Line 
1#!/bin/sh
2
3# check for bash...
4
5if [ "$(echo -n)" = '-n' ]
6then
7 SHELL=$(which bash ksh sh 2> /dev/null | grep ^/ | head -n 1)
8 exec $SHELL $0 "$@"
9fi
10
11
12TF_C=test.c
13TF=./test
14
15check_cc() {
16 echo -n 'testing for C compiler... '
17 CC=$(which gcc cc 2> /dev/null | head -n 1)
18 if [ -x "$CC" ]
19 then
20  echo $CC
21 else
22  echo no.
23  on_error;
24 fi
25}
26
27check_pkg_config() {
28 echo -n "checking for pkg-config... "
29 if [ "$PKG_CONFIG" = '' ]
30 then
31  PKG_CONFIG=$(which pkg-config false 2> /dev/null | grep ^/ | head -n 1)
32  if $PKG_CONFIG --help > /dev/null 2> /dev/null
33  then
34   echo $PKG_CONFIG
35  else
36   PKG_CONFIG=''
37   echo no
38   on_error;
39  fi
40 else
41   echo $PKG_CONFIG '(forced)'
42 fi
43}
44
45check_libroar() {
46 echo -n 'testing for libroar... '
47 if $HAVE_ROAR
48 then
49  echo 'yes (forced)'
50 else
51  cat > $TF_C << EOF
52#include <roaraudio.h>
53int main (void) { return 0; }
54EOF
55
56  $CC -o $TF $TF_C -lroar 2> /dev/null
57  $TF 2> /dev/null
58
59  if [ "$?" = '0' ]
60  then
61   echo yes
62  else
63   echo no.
64   on_error
65  fi
66 fi
67}
68
69#ll
Note: See TracBrowser for help on using the repository browser.