You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by ep...@google.com on 2008/06/17 18:50:36 UTC

Re: svn commit: r31717 - in trunk: . build/ac-macros

arfrever@tigris.org writes:

> Author: arfrever
> Date: Thu Jun 12 14:43:54 2008
> New Revision: 31717
> 
> Log:
> Fix Issue #2671.
> Make `configure` prefer APR 1.* instead of APR 0.* if both are present.
> 
> * configure.ac: Move the check for Apache after the check for APR.
> 
> * build/ac-macros/apr.m4
>   (SVN_LIB_APR): Prefer APR 1.* instead of APR 0.* if both are present.
> 
> * build/ac-macros/aprutil.m4
>   (SVN_LIB_APRUTIL): Prefer APR-Util 1.* instead of APR-Util 0.* if both
>    are present.
> 
> * build/ac-macros/apache.m4
>   (SVN_FIND_APACHE): Check if Apache version is compatible with APR version.

This is broken.

> +++ trunk/build/ac-macros/apache.m4	Thu Jun 12 14:43:54 2008	(r31717
> )
> @@ -71,6 +71,29 @@ else
>      AC_MSG_RESULT(no)
>  fi
>  
> +if test -n "$APXS" && test "$APXS" != "no"; then
> +  AC_MSG_CHECKING([whether Apache version is compatible with APR version])
> +  apr_major_version="${apr_version%%.*}"
> +  case "$apr_major_version" in
> +    0)
> +      apache_minor_version_wanted_regex="0"
> +      ;;
> +    1)
> +      apache_minor_version_wanted_regex=["[1-4]"]
> +      ;;
> +    *)
> +      AC_MSG_ERROR([unknown APR version])
> +      ;;
> +  esac
> +  AC_EGREP_CPP([apache_minor_version="$apache_minor_version_wanted_regex"],

First problem: you got the quoting wrong.  AC_EGREP_CPP quotes
this argument for you, so what you've done is place the regexp
outside the quotes, letting the shell mangle it:

  $EGREP "apache_minor_version="$apache_minor_version_wanted_regex"" >/dev/null 2>&1; then

Luckily, that seems to have caused no problem.  However, the cpp
output for me is:

apache_minor_version= 2

Notice the space.  I don't know why I have a space and you
don't; it seems

  #define AP_SERVER_MINORVERSION_NUMBER 2

is how it's defined in ap_release.h, so maybe this is a
difference in cpp behavior across versions.

I'm not sure if just adding / */ to the front of the pattern is
the right solution or not.  I made the following change:

-  AC_EGREP_CPP([apache_minor_version="$apache_minor_version_wanted_regex"],
+  AC_EGREP_CPP([apache_minor_version= *$apache_minor_version_wanted_regex],

resulting in the following line:

  $EGREP "apache_minor_version= *$apache_minor_version_wanted_regex" >/dev/null 2>&1; then

In the future, please make sure to sanity-check the generated
output from autoconf changes.  autoconf is a difficult beast to
control correctly.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r31717 - in trunk: . build/ac-macros

Posted by ep...@google.com.
Arfrever?

epg writes:

> arfrever@tigris.org writes:
> 
> > Author: arfrever
> > Date: Thu Jun 12 14:43:54 2008
> > New Revision: 31717
> > 
> > Log:
> > Fix Issue #2671.
> > Make `configure` prefer APR 1.* instead of APR 0.* if both are present.
> > 
> > * configure.ac: Move the check for Apache after the check for APR.
> > 
> > * build/ac-macros/apr.m4
> >   (SVN_LIB_APR): Prefer APR 1.* instead of APR 0.* if both are present.
> > 
> > * build/ac-macros/aprutil.m4
> >   (SVN_LIB_APRUTIL): Prefer APR-Util 1.* instead of APR-Util 0.* if both
> >    are present.
> > 
> > * build/ac-macros/apache.m4
> >   (SVN_FIND_APACHE): Check if Apache version is compatible with APR version.
> 
> This is broken.
> 
> > +++ trunk/build/ac-macros/apache.m4	Thu Jun 12 14:43:54 2008	(r31717
> > )
> > @@ -71,6 +71,29 @@ else
> >      AC_MSG_RESULT(no)
> >  fi
> >  
> > +if test -n "$APXS" && test "$APXS" != "no"; then
> > +  AC_MSG_CHECKING([whether Apache version is compatible with APR version])
> > +  apr_major_version="${apr_version%%.*}"
> > +  case "$apr_major_version" in
> > +    0)
> > +      apache_minor_version_wanted_regex="0"
> > +      ;;
> > +    1)
> > +      apache_minor_version_wanted_regex=["[1-4]"]
> > +      ;;
> > +    *)
> > +      AC_MSG_ERROR([unknown APR version])
> > +      ;;
> > +  esac
> > +  AC_EGREP_CPP([apache_minor_version="$apache_minor_version_wanted_regex"],
> 
> First problem: you got the quoting wrong.  AC_EGREP_CPP quotes
> this argument for you, so what you've done is place the regexp
> outside the quotes, letting the shell mangle it:
> 
>   $EGREP "apache_minor_version="$apache_minor_version_wanted_regex"" >/dev/null 2>&1; then
> 
> Luckily, that seems to have caused no problem.  However, the cpp
> output for me is:
> 
> apache_minor_version= 2
> 
> Notice the space.  I don't know why I have a space and you
> don't; it seems
> 
>   #define AP_SERVER_MINORVERSION_NUMBER 2
> 
> is how it's defined in ap_release.h, so maybe this is a
> difference in cpp behavior across versions.
> 
> I'm not sure if just adding / */ to the front of the pattern is
> the right solution or not.  I made the following change:
> 
> -  AC_EGREP_CPP([apache_minor_version="$apache_minor_version_wanted_regex"],
> +  AC_EGREP_CPP([apache_minor_version= *$apache_minor_version_wanted_regex],
> 
> resulting in the following line:
> 
>   $EGREP "apache_minor_version= *$apache_minor_version_wanted_regex" >/dev/null 2>&1; then
> 
> In the future, please make sure to sanity-check the generated
> output from autoconf changes.  autoconf is a difficult beast to
> control correctly.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org