comparison configure @ 32218:b897901c0b0a

Simplify librtmp check using function_check().
author diego
date Sat, 18 Sep 2010 10:47:41 +0000
parents e9e3137f8b43
children 93b121dfe8e5
comparison
equal deleted inserted replaced
32217:e9e3137f8b43 32218:b897901c0b0a
7000 fi 7000 fi
7001 echores "$_live" 7001 echores "$_live"
7002 7002
7003 echocheck "RTMPDump Streaming Media library" 7003 echocheck "RTMPDump Streaming Media library"
7004 if test "$_librtmp" = auto && test "$networking" = yes ; then 7004 if test "$_librtmp" = auto && test "$networking" = yes ; then
7005 cat > $TMPC << EOF 7005 function_check librtmp/rtmp.h 'RTMP_Socket(NULL)' -lrtmp &&
7006 #include <librtmp/rtmp.h> 7006 _librtmp=yes && extra_ldflags="$extra_ldflags -lrtmp"
7007 int main(void) { RTMP r; RTMP_Socket(&r); return 0; }
7008 EOF
7009 cc_check -lrtmp && _librtmp=yes && extra_ldflags="$extra_ldflags -lrtmp"
7010 if test "$_librtmp" != yes && $_pkg_config --exists librtmp ; then 7007 if test "$_librtmp" != yes && $_pkg_config --exists librtmp ; then
7011 _inc_tmp=$($_pkg_config --cflags librtmp) 7008 _inc_tmp=$($_pkg_config --cflags librtmp)
7012 _ld_tmp=$($_pkg_config --libs librtmp) 7009 _ld_tmp=$($_pkg_config --libs librtmp)
7013 cc_check $_inc_tmp $_ld_tmp && _librtmp=yes && \ 7010 cc_check $_inc_tmp $_ld_tmp && _librtmp=yes && \
7014 extra_ldflags="$extra_ldflags $_ld_tmp" && \ 7011 extra_ldflags="$extra_ldflags $_ld_tmp" && \