Changeset 725:a072974497c7 in roaraudio


Ignore:
Timestamp:
09/02/08 17:44:05 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use pkg-config if we have one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r714 r725  
    1919SYSNAME='unknown' 
    2020SHARED='-shared' 
     21PKG_CONFIG=false 
    2122 
    2223echo -n "checking for C compiler... " 
     
    2829fi 
    2930echo $CC 
     31 
     32echo -n "checking for pkg-config... " 
     33PKG_CONFIG=$(which pkg-config false 2> /dev/null | head -n 1) 
     34if $PKG_CONFIG --help > /dev/null 2> /dev/null 
     35then 
     36 echo $PKG_CONFIG 
     37else 
     38 echo no 
     39fi 
    3040 
    3141#Makefile.conf not yet open, write it later 
     
    8797 shift; 
    8898 
     99 LIBS=$(echo "$LIBS" | sed 's/-l-l/-l/g') 
     100 
    89101 while [ "$1" != '' ] 
    90102 do 
     
    114126 shift 
    115127 shift 
     128 name="$1" 
    116129 lib="$2" 
     130 shift 
    117131 
    118132 [ "$subdir" = '%' ] && subdir='' 
     
    132146 fi 
    133147 
    134  if test_lib $@ 
     148 LIBS=$($PKG_CONFIG --silence-errors --libs $lib) 
     149 if [ "$?" != '0' ] 
     150 then 
     151  LIBS="-l$lib" 
     152 fi 
     153 
     154 if test_lib "$name" $LIBS "$@" 
    135155 then 
    136156  echo "#define $def"            >&3 
    137157  [ "$subdir" != '' ] && \ 
    138158   echo "subdir_$subdir=$subdir" >&4 
    139   echo "lib_$lib=-l$lib" >&4 
     159  echo "lib_$lib=$LIBS" >&4 
    140160 else 
    141161  [ "$subdir" != '' ] && \ 
     
    207227test_lib_defmake ROAR_HAVE_LIBARTSC      libroararts  libartsc      artsc      -- kde/artsc/artsc.h 
    208228test_lib_defmake ROAR_HAVE_LIBDNET       %            libdnet       dnet       -- sys/socket.h netdnet/dn.h netdnet/dnetdb.h 
    209 test_lib_defmake ROAR_HAVE_IPX           %            IPX                      -- netipx/ipx.h 
     229test_lib_defmake ROAR_HAVE_IPX           %            IPX           c          -- netipx/ipx.h 
    210230 
    211231# add a better test here 
Note: See TracChangeset for help on using the changeset viewer.