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

Re: svn commit: r1693159 - /subversion/trunk/build/ac-macros/apache.m4

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 30 Jul 2015 16:12:57 +0000

philip_at_apache.org wrote on Tue, Jul 28, 2015 at 20:53:05 -0000:
> Author: philip
> Date: Tue Jul 28 20:53:04 2015
> New Revision: 1693159
>
> URL: http://svn.apache.org/r1693159
> Log:
> * build/ac-macros/apache.m4 (SVN_FIND_APACHE): Extract version with two
> simpler sed commands to support Solaris and OSX sed.
>
> Modified:
> subversion/trunk/build/ac-macros/apache.m4
>
> Modified: subversion/trunk/build/ac-macros/apache.m4
> URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/apache.m4?rev=1693159&r1=1693158&r2=1693159&view=diff
> ==============================================================================
> --- subversion/trunk/build/ac-macros/apache.m4 (original)
> +++ subversion/trunk/build/ac-macros/apache.m4 Tue Jul 28 20:53:04 2015
> @@ -97,9 +97,9 @@ fi
> # PR 55397: https://issues.apache.org/bugzilla/show_bug.cgi?id=55397
> if test -n "$APXS" && test "$APXS" != "no"; then
> AC_MSG_CHECKING([mod_dav version])
> - HTTPD_MAJOR=`$SED -ne '/^#define AP_SERVER_MAJORVERSION_NUMBER/{s/^.*NUMBER *//;p}' "$APXS_INCLUDE/ap_release.h"`
> - HTTPD_MINOR=`$SED -ne '/^#define AP_SERVER_MINORVERSION_NUMBER/{s/^.*NUMBER *//;p}' "$APXS_INCLUDE/ap_release.h"`
> - HTTPD_PATCH=`$SED -ne '/^#define AP_SERVER_PATCHLEVEL_NUMBER/{s/^.*NUMBER *//;p}' "$APXS_INCLUDE/ap_release.h"`
> + HTTPD_MAJOR=`$SED -ne '/^#define AP_SERVER_MAJORVERSION_NUMBER/p' "$APXS_INCLUDE/ap_release.h" | $SED -e 's/^.*NUMBER *//'`
> + HTTPD_MINOR=`$SED -ne '/^#define AP_SERVER_MINORVERSION_NUMBER/p' "$APXS_INCLUDE/ap_release.h" | $SED -e 's/^.*NUMBER *//'`
> + HTTPD_PATCH=`$SED -ne '/^#define AP_SERVER_PATCHLEVEL_NUMBER/p' "$APXS_INCLUDE/ap_release.h" | $SED -e 's/^.*NUMBER *//'`

If we want to avoid parsing the header file, I think we could use
AC_TRY_COMPILE() and check the values of the macros via preprocessor
#if/#error/#endif directives.
Received on 2015-07-30 18:13:12 CEST

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