httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject [PATCH] Re: apr-related ABI issues for apreq2 packagers
Date Tue, 01 Feb 2005 08:19:20 GMT
Joe Schaefer <joe+gmane@sunstarsys.com> writes:

> Max Kellermann <max@duempel.org> writes:

[...]

>> But we shouldn't just make a "recommendation" of this case,
>> we should hard code our decision (whatever of the two it may be)
>> in our build scripts. Everything else endangers binary
>> compatibility between different distributions.
>
> That's the core issue: should *we* tinker with our major number 
> based on apr's ABI, or should we always leave it "2"?   IMO
> we should always leave ours at "2", no matter which apr version
> a user links us against.

Here's a patch which splits the difference by bumping our generated
so's major number based on the apr major version.  This should cover 
the ABI issues, so installing libapreq2 into a system-wide directory 
won't cause a conflict when different apr ABIs are present.

I'd like to commit this patch to trunk, but first am looking 
for feedback on the general concept.

-  echo ${ltmaj}:${patch}:${minor}
+elif test "$1" = "minor"; then
+  echo ${minor}
+elif test "$1" = "patch"; then
+  echo ${patch}
 else
   echo "ERROR: unknown version CMD ($1)"
   exit 1
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 125283)
+++ acinclude.m4	(working copy)
@@ -53,7 +53,7 @@
                 APACHE2_INCLUDES=-I`$APACHE2_APXS -q INCLUDEDIR`
 
                 APR_MAJOR_VERSION=`$APACHE2_APXS -q APR_VERSION 2>/dev/null | cut -d.
-f 1`
-                if test ${APR_MAJOR_VERSION:=0} -eq 0; then
+                if test ${APR_MAJOR_VERSION:="0"} -eq 0; then
                     apr_config=apr-config
                     apu_config=apu-config 
                 else
@@ -168,10 +168,20 @@
         get_version="$abs_srcdir/build/get-version.sh"
         version_hdr="$abs_srcdir/src/apreq_version.h"
 
-        APREQ_LIBTOOL_VERSION=`$get_version libtool $version_hdr APREQ`
+        # set version data
+
         APREQ_MAJOR_VERSION=`$get_version major $version_hdr APREQ`
-        APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ`
+        APREQ_MINOR_VERSION=`$get_version minor $version_hdr APREQ`
+        APREQ_PATCH_VERSION=`$get_version patch $version_hdr APREQ`
+        APREQ_DOTTED_VERSION=`$get_version all  $version_hdr APREQ`
 
+        # XXX: APR_MAJOR_VERSION doesn't yet work for static builds
+        APREQ_LIBTOOL_CURRENT=`expr $APREQ_MAJOR_VERSION + $APREQ_MINOR_VERSION + $APR_MAJOR_VERSION`
+        APREQ_LIBTOOL_REVISION=$APREQ_PATCH_VERSION
+        APREQ_LIBTOOL_AGE=$APREQ_MINOR_VERSION
+
+        APREQ_LIBTOOL_VERSION="$APREQ_LIBTOOL_CURRENT:$APREQ_LIBTOOL_REVISION:$APREQ_LIBTOOL_AGE"
+
         APREQ_LIBNAME="apreq$APREQ_MAJOR_VERSION"
         APREQ_INCLUDES=""
         APREQ_LDFLAGS=""


-- 
Joe Schaefer


Mime
View raw message