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

Re: [PATCH] for bug #911 (ac-helper/apr.m4) (2nd version)

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2002-10-22 18:45:57 CEST

This is second version of the patch. With this version, you can change
wanted apr version range more easier. Also error message will
automatically respect those settings.

There is also one extra unneeded apr_version="`$apr_config --version`" at
the beginning of the first patch.

BR, Jani

Index: ac-helpers/apr.m4
===================================================================
--- ac-helpers/apr.m4 (revision 3433)
+++ ac-helpers/apr.m4 (working copy)
@@ -7,6 +7,9 @@

 AC_DEFUN(SVN_LIB_APR,
 [
+ apr_min_want_ver_patch=1
+ apr_max_want_ver_patch=2
+
   AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration])

   APR_FIND_APR("$srcdir/apr", "./apr")
@@ -23,6 +26,30 @@

   dnl Get build information from APR

+ apr_version="`$apr_config --version`"
+
+ apr_ver_major=`echo $apr_version|sed --silent 's/\([[0-9]][[0-9]]*\)\..*/\1/p'`
+ apr_ver_minor=`echo $apr_version|sed --silent 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\..*/\1/p'`
+ apr_ver_patch=`echo $apr_version|sed --silent 's/[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)/\1/p'`
+
+ apr_ver_status="bad"
+ if test -z "$apr_ver_major"; then
+ :
+ elif test "$apr_ver_major" -eq 0; then
+ if test -z "$apr_ver_minor"; then
+ :
+ elif test "$apr_ver_minor" -eq 9; then
+ if test -z "$apr_ver_patch"; then
+ :
+ elif test "$apr_ver_patch" -ge $apr_min_want_ver_patch -a "$apr_ver_patch" -le $apr_max_want_ver_patch; then
+ apr_ver_status="good"
+ fi
+ fi
+ fi
+ if test $apr_ver_status != "good"; then
+ AC_MSG_ERROR([Need apr-version between 0.9.$apr_min_want_ver_patch and 0.9.$apr_max_want_ver_patch, you have $apr_version])
+ fi
+
   CPPFLAGS="$CPPFLAGS `$apr_config --cppflags`"
   if test $? -ne 0; then
     AC_MSG_ERROR([apr-config --cppflags failed])

--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 22 18:46:48 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.