Changeset 4723:e4a0ba316600 in roaraudio


Ignore:
Timestamp:
01/18/11 23:31:05 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to test_func_defmake to link additional libs. This was needed for testing getobjectbyname() because it requires linking libdnet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r4718 r4723  
    785785 CALL="$1" 
    786786 shift; 
     787 
     788 LIBS='' 
     789 
     790 while [ "$1" != '--' ] 
     791 do 
     792  case "$1" in 
     793   'c'|'-lc') 
     794    :; # no need to do anything 
     795   ;; 
     796   '-'*) 
     797    LIBS="$LIBS $1" 
     798   ;; 
     799   *) 
     800    LIBS="-l$1" 
     801   ;; 
     802  esac 
     803  shift; 
     804 done 
     805 
    787806 shift; # skip '--' 
    788807 
     
    792811  while [ "$1" != '' ] 
    793812  do 
    794    echo "#include <$1>" 
    795    shift; 
     813   _h="$1"; 
     814   shift; 
     815   _envname=`echo "$_h" | to_escaped` 
     816   eval "_t=\$libname_$_envname" 
     817   echo "LIB($name) DEPENDS ON $_h($_envname) with state '$_t'" >&5 
     818   if [ "$_t" = 'false' ] 
     819   then 
     820    echo "// not including <$_h> as it was tested as not present" 
     821   else 
     822    echo "#include <$_h>" 
     823   fi 
    796824  done 
    797825 
     
    809837 echo "FUNCTION($NAME) HAS COMPILER/LINKER OUTPUT:" >&5 
    810838 echo "--- BEGIN OF CHILD OUTPUT BLOCK ---" >&5 
    811  $CCTF >&5 2>&5; 
     839 $CCTF $LIBS >&5 2>&5; 
    812840 R=$? 
    813841 echo "--- END OF CHILD OUTPUT BLOCK ---" >&5 
     
    17621790fi 
    17631791 
    1764 test_func_defmake ROAR_HAVE_GETOBJECTBYNAME getobjectbyname 'getobjectbyname(NULL)' -- stdlib.h netdnet/dn.h netdnet/dnetdb.h 
     1792test_func_defmake ROAR_HAVE_GETOBJECTBYNAME getobjectbyname 'getobjectbyname(NULL)' dnet -- stdlib.h netdnet/dn.h netdnet/dnetdb.h 
    17651793test_func_defmake ROAR_HAVE_GETSERVBYNAME   getservbyname   'getservbyname((void*)0, (void*)0)' -- netdb.h 
    17661794 
Note: See TracChangeset for help on using the changeset viewer.