[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r987956 - /subversion/trunk/build/ac-macros/serf.m4

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 23 Aug 2010 14:28:26 +0300

jerenkrantz_at_apache.org wrote on Sun, Aug 22, 2010 at 22:57:26 -0000:
> Author: jerenkrantz
> Date: Sun Aug 22 22:57:26 2010
> New Revision: 987956
>
> URL: http://svn.apache.org/viewvc?rev=987956&view=rev
> Log:
> Add a compile-time version check for serf so we can reject old versions.
>
> * build/ac-macros/serf.m4
> (SVN_LIB_SERF): Set minimum version to 0.3.1 and ensure we see at least that.
>
> Modified:
> subversion/trunk/build/ac-macros/serf.m4
>
> Modified: subversion/trunk/build/ac-macros/serf.m4
> URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/serf.m4?rev=987956&r1=987955&r2=987956&view=diff
> ==============================================================================
> --- subversion/trunk/build/ac-macros/serf.m4 (original)
> +++ subversion/trunk/build/ac-macros/serf.m4 Sun Aug 22 22:57:26 2010
> @@ -27,6 +27,10 @@ AC_DEFUN(SVN_LIB_SERF,
> [
> serf_found=no
>
> + serf_check_major=0
> + serf_check_minor=3
> + serf_check_patch=1
> +
> AC_ARG_WITH(serf,AS_HELP_STRING([--with-serf=PREFIX],
> [Serf WebDAV client library]),
> [
> @@ -40,7 +44,16 @@ AC_DEFUN(SVN_LIB_SERF,
> AC_CHECK_HEADERS(serf.h,[
> save_ldflags="$LDFLAGS"
> LDFLAGS="$LDFLAGS -L$serf_prefix/lib"
> - AC_CHECK_LIB(serf-0, serf_context_create,[serf_found="yes"], ,
> + AC_CHECK_LIB(serf-0, serf_context_create,[
> + AC_TRY_COMPILE([
> +#include <stdlib.h>
> +#include "serf.h"
> +],[
> +#if ! SERF_VERSION_AT_LEAST($serf_check_major, $serf_check_minor, $serf_check_patch)
> +#error Serf version too old: want $serf_check_major.$serf_check_minor.$serf_check_patch, got SERF_VERSION_STRING

Does this actually expand SERF_VERSION_STRING? A quick independent test
indicates it wouldn't...

> +#endif
> +], [serf_found=yes], [AC_MSG_WARN([Serf version too old: need $serf_check_major.$serf_check_minor.$serf_check_patch])
> + serf_found=no])], ,
> $SVN_APRUTIL_LIBS $SVN_APR_LIBS -lz)
> LDFLAGS="$save_ldflags"])
> CPPFLAGS="$save_cppflags"
>
>
Received on 2010-08-23 13:31:35 CEST

This is an archived mail posted to the Subversion Dev mailing list.