Changeset 3936:312e36b26dcd in roaraudio
Legend:
- Unmodified
- Added
- Removed
-
configure
r3908 r3936 761 761 } 762 762 763 test_pa_type () { 764 DEF="$1" 765 NAME="$2" 766 TYPE="$3" 767 V0="$4" 768 V1="$5" 769 TEST="$6" 770 shift; shift; shift; shift; shift; shift; 771 HEADER="$*" 772 RS='%s' 773 774 case "$TYPE" in 775 'type') 776 MSG="checking for type of $NAME()... " 777 ;; 778 'args:'*) 779 MSG="checking for argument types of $NAME()... " 780 RS=`echo "$TYPE" | cut -d: -f2` 781 ;; 782 esac; 783 784 echo -n "$MSG" 785 echo '#include <pulse/pulseaudio.h>' > $TF_C 786 for _h in $HEADERS 787 do 788 echo "#include <$_h>" >> $TF_C 789 done 790 echo '#include <string.h>' >> $TF_C 791 echo 'int main (void) { return 0; }' >> $TF_C 792 echo "$TEST" >> $TF_C 793 794 if $CCTF 2> /dev/null; 795 then 796 R="$V0" 797 else 798 R="$V1" 799 fi 800 801 echo "#define $DEF $R" >&3 802 printf "$RS\n" "$R" 803 } 804 763 805 exec 3> config.h 4> Makefile.conf 5> config.log 764 806 … … 1492 1534 test_func_defmake ROAR_HAVE_GETSERVBYNAME getservbyname 'getservbyname((void*)0, (void*)0)' -- netdb.h 1493 1535 1494 echo -n 'checking for type of pa_path_get_filename()... ' 1495 echo '#include <pulse/pulseaudio.h>' > $TF_C 1496 echo '#include <pulse/simple.h>' >> $TF_C 1497 echo '#include <string.h>' >> $TF_C 1498 echo 'int main (void) { return 0; } const char *pa_path_get_filename(const char *p) { return NULL; }' >> $TF_C 1499 1500 if $CCTF 2> /dev/null; 1501 then 1502 echo '#define ROAR_HAVE_TYPE_PA_PATH_GET_FILENAME const char *' >&3 1503 echo 'const char *' 1504 else 1505 echo '#define ROAR_HAVE_TYPE_PA_PATH_GET_FILENAME char *' >&3 1506 echo 'char *' 1507 fi 1508 1509 echo -n 'checking for type of pa_utf8_valid()... ' 1510 echo '#include <pulse/pulseaudio.h>' > $TF_C 1511 echo '#include <string.h>' >> $TF_C 1512 echo 'int main (void) { return 0; } const char *pa_utf8_valid(const char *str) { return NULL; }' >> $TF_C 1513 1514 if $CCTF 2> /dev/null; 1515 then 1516 echo '#define ROAR_HAVE_TYPE_PA_UTF8_VALID const char *' >&3 1517 echo 'const char *' 1518 else 1519 echo '#define ROAR_HAVE_TYPE_PA_UTF8_VALID char *' >&3 1520 echo 'char *' 1521 fi 1536 1537 # --- PulseAudio tests --- 1538 test_pa_type ROAR_HAVE_TYPE_PA_PATH_GET_FILENAME pa_path_get_filename type 'const char *' 'char *' 'const char *pa_path_get_filename(const char *p) { return NULL; }' pulse/simple.h 1539 1540 test_pa_type ROAR_HAVE_TYPE_PA_UTF8_VALID pa_utf8_valid type 'const char *' 'char *' 'const char *pa_utf8_valid(const char *str) { return NULL; }' 1541 # --- End of PulseAudio tests --- 1542 1522 1543 1523 1544 echo -n 'checking for safe 32 bit integer overflow... '
Note: See TracChangeset
for help on using the changeset viewer.