Changeset 1742:4fbe8cb28680 in roaraudio


Ignore:
Timestamp:
05/17/09 22:47:42 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

moved a lot things to the common configure file

Location:
plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/ao/configure

    r1740 r1742  
    4545} 
    4646 
    47 echo -n 'testing for C compiler... ' 
    48 CC=$(which gcc cc 2> /dev/null | head -n 1) 
    49 if [ -x "$CC" ] 
    50 then 
    51  echo $CC 
    52 else 
    53  echo no. 
    54  on_error; 
    55 fi 
    56  
    57 echo -n "checking for pkg-config... " 
    58 if [ "$PKG_CONFIG" = '' ] 
    59 then 
    60  PKG_CONFIG=$(which pkg-config false 2> /dev/null | grep ^/ | head -n 1) 
    61  if $PKG_CONFIG --help > /dev/null 2> /dev/null 
    62  then 
    63   echo $PKG_CONFIG 
    64  else 
    65   PKG_CONFIG='' 
    66   echo no 
    67   on_error; 
    68  fi 
    69 else 
    70   echo $PKG_CONFIG '(forced)' 
    71 fi 
     47check_cc; 
     48check_pkg_config; 
    7249 
    7350echo -n 'testing for libao... ' 
     
    10380fi 
    10481 
    105 echo -n 'testing for libroar... ' 
    106 if $HAVE_ROAR 
    107 then 
    108  echo 'yes (forced)' 
    109 else 
    110  cat > tests.c << EOF 
    111 #include <roaraudio.h> 
    112 int main (void) { return 0; } 
    113 EOF 
     82check_libroar; 
    11483 
    115  $CC -o tests tests.c -lroar 2> /dev/null 
    116  ./tests 2> /dev/null 
    117  
    118  if [ "$?" = '0' ] 
    119  then 
    120   echo yes 
    121  else 
    122   echo no. 
    123   on_error 
    124  fi 
    125 fi 
    12684rm -f tests tests.c 
    12785 
  • plugins/audacious/configure

    r1740 r1742  
    4242} 
    4343 
    44 echo -n 'testing for C compiler... ' 
    45 CC=$(which gcc cc 2> /dev/null | head -n 1) 
    46 if [ -x "$CC" ] 
    47 then 
    48  echo $CC 
    49 else 
    50  echo no. 
    51  on_error; 
    52 fi 
    53  
    54 echo -n "checking for pkg-config... " 
    55 if [ "$PKG_CONFIG" = '' ] 
    56 then 
    57  PKG_CONFIG=$(which pkg-config false 2> /dev/null | grep ^/ | head -n 1) 
    58  if $PKG_CONFIG --help > /dev/null 2> /dev/null 
    59  then 
    60   echo $PKG_CONFIG 
    61  else 
    62   PKG_CONFIG='' 
    63   echo no 
    64   on_error; 
    65  fi 
    66 else 
    67   echo $PKG_CONFIG '(forced)' 
    68 fi 
     44check_cc; 
     45check_pkg_config; 
    6946 
    7047echo -n 'testing for gtk... ' 
     
    124101fi 
    125102 
    126 echo -n 'testing for libroar... ' 
    127 if $HAVE_ROAR 
    128 then 
    129  echo 'yes (forced)' 
    130 else 
    131  cat > tests.c << EOF 
    132 #include <roaraudio.h> 
    133 int main (void) { return 0; } 
    134 EOF 
     103check_libroar; 
    135104 
    136  $CC -o tests tests.c -lroar 2> /dev/null 
    137  ./tests 2> /dev/null 
    138  
    139  if [ "$?" = '0' ] 
    140  then 
    141   echo yes 
    142  else 
    143   echo no. 
    144   on_error 
    145  fi 
    146 fi 
    147105rm -f tests tests.c 
    148106 
  • plugins/configure.inc

    r1741 r1742  
    99fi 
    1010 
     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 
    1169#ll 
  • plugins/xmms/configure

    r1740 r1742  
    4242} 
    4343 
    44 echo -n 'testing for C compiler... ' 
    45 CC=$(which gcc cc 2> /dev/null | head -n 1) 
    46 if [ -x "$CC" ] 
    47 then 
    48  echo $CC 
    49 else 
    50  echo no. 
    51  on_error; 
    52 fi 
    53  
    54 echo -n "checking for pkg-config... " 
    55 if [ "$PKG_CONFIG" = '' ] 
    56 then 
    57  PKG_CONFIG=$(which pkg-config false 2> /dev/null | grep ^/ | head -n 1) 
    58  if $PKG_CONFIG --help > /dev/null 2> /dev/null 
    59  then 
    60   echo $PKG_CONFIG 
    61  else 
    62   PKG_CONFIG='' 
    63   echo no 
    64  fi 
    65 else 
    66   echo $PKG_CONFIG '(forced)' 
    67 fi 
     44check_cc; 
     45check_pkg_config; 
    6846 
    6947echo -n 'testing for gtk... ' 
     
    11593fi 
    11694 
    117 echo -n 'testing for libroar... ' 
    118 if $HAVE_ROAR 
    119 then 
    120  echo 'yes (forced)' 
    121 else 
    122  cat > tests.c << EOF 
    123 #include <roaraudio.h> 
    124 int main (void) { return 0; } 
    125 EOF 
     95check_libroar; 
    12696 
    127  $CC -o tests tests.c -lroar 2> /dev/null 
    128  ./tests 2> /dev/null 
    129  
    130  if [ "$?" = '0' ] 
    131  then 
    132   echo yes 
    133  else 
    134   echo no. 
    135   on_error 
    136  fi 
    137 fi 
    13897rm -f tests tests.c 
    13998 
Note: See TracChangeset for help on using the changeset viewer.