Changeset 5059:ceb1b45d179d in roaraudio for configure
Legend:
- Unmodified
- Added
- Removed
-
configure
r5056 r5059 144 144 145 145 _CARGS="$@"; 146 147 # other stuff we need to reset: 148 infotext='' 146 149 147 150 # some very basic string functions: … … 668 671 shift; 669 672 673 if [ "$infotext" = '' ] 674 then 675 _info='' 676 else 677 _info=" ($infotext)" 678 fi 679 670 680 LIBS='' 671 681 … … 720 730 if [ "$R" = '0' ] 721 731 then 722 echo 'yes'732 echo "yes$_info" 723 733 echo "LIB($name) WAS FOUND" >&5 724 734 else 725 echo 'no'735 echo "no$_info" 726 736 echo "LIB($name) NOT FOUND" >&5 727 737 fi … … 875 885 shift; 876 886 887 if [ "$infotext" = '' ] 888 then 889 _info='' 890 else 891 _info=" ($infotext)" 892 fi 893 877 894 LIBS='' 895 896 _funcname=`echo "$NAME" | to_escaped` 878 897 879 898 while [ "$1" != '--' ] … … 932 951 if [ "$R" = '0' ] 933 952 then 953 eval funcname_$_funcname=true 934 954 echo "#define $DEF" >&3 935 955 echo "FUNCTION($NAME) IS OK" >&5 956 echo "yes$_info" 957 else 958 eval funcname_$_funcname=false 959 echo "FUNCTION($NAME) IS NOT OK" >&5 960 echo "no$_info" 961 fi 962 963 } 964 965 test_const_defmake () { 966 DEF="$1" 967 NAME="$2" 968 shift; 969 shift; 970 echo -n "checking for constant $NAME... " 971 972 TYPE="$1" 973 CONST="$2" 974 shift; 975 shift; 976 977 LIBS='' 978 979 while [ "$1" != '--' ] 980 do 981 case "$1" in 982 'c'|'-lc') 983 :; # no need to do anything 984 ;; 985 '-'*) 986 LIBS="$LIBS $1" 987 ;; 988 *) 989 LIBS="-l$1" 990 ;; 991 esac 992 shift; 993 done 994 995 shift; # skip '--' 996 997 echo "TEST CONST: $NAME" >&5 998 999 { 1000 while [ "$1" != '' ] 1001 do 1002 _h="$1"; 1003 shift; 1004 _envname=`echo "$_h" | to_escaped` 1005 eval "_t=\$libname_$_envname" 1006 echo "LIB($name) DEPENDS ON $_h($_envname) with state '$_t'" >&5 1007 if [ "$_t" = 'false' ] 1008 then 1009 echo "// not including <$_h> as it was tested as not present" 1010 else 1011 echo "#include <$_h>" 1012 fi 1013 done 1014 1015 case "$TYPE" in 1016 ':int') 1017 _type='int' 1018 ;; 1019 ':float') 1020 _type='float' 1021 ;; 1022 ':ptr') 1023 _type='void *' 1024 ;; 1025 *) 1026 _type="$TYPE" 1027 ;; 1028 esac 1029 1030 echo 'int main (void) {' 1031 echo " $_type x;" 1032 echo " x = ($_type)$CONST;" 1033 echo ' return 0;' 1034 echo '}' 1035 1036 } > $TF_C 1037 1038 echo "--- BEGIN OF CODE BLOCK ---" >&5 1039 cat $TF_C >&5 1040 echo "--- END OF CODE BLOCK ---" >&5 1041 1042 echo "CONST($NAME) HAS COMPILER/LINKER OUTPUT:" >&5 1043 echo "--- BEGIN OF CHILD OUTPUT BLOCK ---" >&5 1044 $CCTF $LIBS >&5 2>&5; 1045 R=$? 1046 echo "--- END OF CHILD OUTPUT BLOCK ---" >&5 1047 1048 if [ "$R" = '0' ] 1049 then 1050 echo "#define $DEF" >&3 1051 echo "CONST($NAME) IS OK" >&5 936 1052 echo yes 937 1053 else 938 echo " FUNCTION($NAME) IS NOT OK" >&51054 echo "CONST($NAME) IS NOT OK" >&5 939 1055 echo no 940 1056 fi 941 942 1057 } 943 1058 … … 1391 1506 # #define subdir name -lxxx -- header 1392 1507 test_lib_defmake ROAR_HAVE_LIBM % 'MathLibrary' m -- math.h 1508 rt='' 1509 libname_rt=false 1393 1510 if test_lib 'realtime Library' rt -- sys/mman.h mqueue.h semaphore.h 1394 1511 then … … 1396 1513 echo '#define ROAR_HAVE_LIBRT' 1397 1514 echo '#define ROAR_NEED_LIBRT' 1515 libname_rt=true 1516 rt=rt 1398 1517 } >&3 1399 1518 fi … … 1587 1706 test_func_defmake ROAR_HAVE_AO_APPEND_GLOBAL_OPTION ao_append_global_option 'ao_append_global_option("","")' ao -- ao/ao.h 1588 1707 1708 test_func_defmake ROAR_HAVE_CLOCK_GETRES clock_getres 'struct timespec ts; clock_getres((clockid_t)0, &ts)' -- time.h 1709 test_func_defmake ROAR_HAVE_CLOCK_GETTIME clock_gettime 'struct timespec ts; clock_gettime((clockid_t)0, &ts)' -- time.h 1710 test_func_defmake ROAR_HAVE_CLOCK_SETTIME clock_settime 'struct timespec ts; clock_settime((clockid_t)0, &ts)' -- time.h 1711 1712 echo "STATE: funcname_clock_getres=$funcname_clock_getres" >&5 1713 echo "STATE: libname_rt=$libname_rt" >&5 1714 1715 if [ "$funcname_clock_getres" = 'false' ] 1716 then 1717 if $libname_rt 1718 then 1719 infotext='retested using realtime library' 1720 test_func_defmake ROAR_HAVERT_CLOCK_GETRES clock_getres 'struct timespec ts; clock_getres((clockid_t)0, &ts)' $rt -- time.h 1721 test_func_defmake ROAR_HAVERT_CLOCK_GETTIME clock_gettime 'struct timespec ts; clock_gettime((clockid_t)0, &ts)' $rt -- time.h 1722 test_func_defmake ROAR_HAVERT_CLOCK_SETTIME clock_settime 'struct timespec ts; clock_settime((clockid_t)0, &ts)' $rt -- time.h 1723 infotext='' 1724 if $funcname_clock_getres 1725 then 1726 echo "clock_rt=-l$rt" >&4 1727 fi 1728 fi 1729 fi 1730 1731 test_const_defmake ROAR_HAVE_CONST_CLOCK_REALTIME CLOCK_REALTIME clockid_t CLOCK_REALTIME -- time.h 1732 test_const_defmake ROAR_HAVE_CONST_CLOCK_MONOTONIC CLOCK_MONOTONIC clockid_t CLOCK_MONOTONIC -- time.h 1733 test_const_defmake ROAR_HAVE_CONST_CLOCK_PROCESS_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID clockid_t CLOCK_PROCESS_CPUTIME_ID -- time.h 1734 test_const_defmake ROAR_HAVE_CONST_CLOCK_THREAD_CPUTIME_ID CLOCK_THREAD_CPUTIME_ID clockid_t CLOCK_THREAD_CPUTIME_ID -- time.h 1735 1589 1736 1590 1737 echo -n 'checking for basic IO calls... '
Note: See TracChangeset
for help on using the changeset viewer.