Mercurial > audlegacy-plugins
changeset 2662:8e4abb83e560
Check for libneon >= 0.27 and conditionally compile with ne_set_connect_timeout().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 28 May 2008 21:17:51 +0300 |
parents | 1eb29b830013 |
children | 45aea2e3592a |
files | configure.ac src/neon/neon.c |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Wed May 28 20:56:05 2008 +0300 +++ b/configure.ac Wed May 28 21:17:51 2008 +0300 @@ -1328,6 +1328,7 @@ if test "x$have_neon" = "xyes"; then PKG_CHECK_MODULES(NEON, [neon >= 0.26], [TRANSPORT_PLUGINS="$TRANSPORT_PLUGINS neon" ], [have_neon="no"]) + PKG_CHECK_MODULES(NEON, [neon >= 0.27], [AC_DEFINE([HAVE_NEON_027], 1, [Define if you have libneon 0.27 or newer.])]) NEON_LIBS=`pkg-config --libs neon` NEON_CFLAGS=`pkg-config --cflags neon` else
--- a/src/neon/neon.c Wed May 28 20:56:05 2008 +0300 +++ b/src/neon/neon.c Wed May 28 21:17:51 2008 +0300 @@ -70,10 +70,6 @@ neon_aud_vfs_metadata_impl }; -/* bring ne_set_connect_timeout in as a weak reference, not using it - * unless we have it available (neon 0.27) --nenolod - */ -extern void ne_set_connect_timeout(ne_session *sess, int timeout) __attribute__ ((weak)); /* * ======== @@ -651,8 +647,9 @@ ne_set_session_flag(handle->session, NE_SESSFLAG_ICYPROTO, 1); ne_set_session_flag(handle->session, NE_SESSFLAG_PERSIST, 0); - if (ne_set_connect_timeout != NULL) - ne_set_connect_timeout(handle->session, 10); +#ifdef HAVE_NEON_027 + ne_set_connect_timeout(handle->session, 10); +#endif ne_set_read_timeout(handle->session, 10); ne_set_useragent(handle->session, "Audacious/" PACKAGE_VERSION );