(I'm posting this to both the APR and Subversion dev lists because it's relevant to both.)
Summary reaction to Mo DeJong's recent autoconf work on both APR and Subversion: "+1". Longer reaction: If it's possible, for a time, to make APR work with both autoconf 2.13 and 2.50, that would really help a lot of developers. Although some have pointed out (wisely, I think) that trying to maintain backward compatibility with old versions of autoconf is a losing battle in the long run, and that at a certain point a project just has to commit to using the latest version, 2.50 is still new enough that many people have not switched to it, for various reasons. Therefore, to switch a project exclusively to 2.50 would be problematic right now, and probably for the next couple of months. That's why we've been holding off on switching Subversion to use autoconf 2.50; we don't want to deal with the headache of forced autoconf upgrades right now. If Mo can make APR work with both, even if only for a while, I think we should go for it. (I'm presuming the same can be done with Subversion; Mo, would you be willing to take that on?). Then, after a couple of months or so, we can stop worrying about 2.13 support. A general principle here might be: we should work with the latest version of a tool plus (at least for a while) the second-to-latest version, except when there are gross incompatibilities. That way, we're maintaining a "constant" complexity -- we don't have to support *all* past versions -- yet at the same time, we're not forcing everyone to upgrade in real-time just to keep working. I'm not familiar enough with the technical issues here to evaluate Mo's patch; however, assuming it does what it's intended to do, let's apply it, and then do the same to Subversion. Thoughts?, -Karl Mo DeJong <[EMAIL PROTECTED]> writes: > Since my last patch re upgrading autoconf and libtool was not received > with open arms, I decided to take the decidedly less fun route and > get things working with both autoconf 2.13 and 2.50 as well as > libtool 1.3 and 1.4. Here is a patch that implements that change. > > The first step is to remove the shmem/unix/mm/aclocal.m4 > and add the attached shmem/unix/mm/apr_mm.m4 file: > > rm shmem/unix/mm/aclocal.m4 > cvs rm shmem/unix/mm/aclocal.m4 > cvs add shmem/unix/mm/apr_mm.m4 > > Then, the following patch should be applied: > > Index: buildconf > =================================================================== > RCS file: /home/cvspublic/apr/buildconf,v > retrieving revision 1.17 > diff -u -r1.17 buildconf > --- buildconf 2001/05/01 02:06:09 1.17 > +++ buildconf 2001/07/08 21:50:11 > @@ -74,7 +74,7 @@ > # > echo "Copying libtool helper files ..." > > -$libtoolize --copy --automake > +$libtoolize --copy --force --automake > > ltpath=`dirname $libtoolize` > ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4 > @@ -101,6 +101,6 @@ > ### do some work to toss config.cache? > autoconf > > -(cd shmem/unix/mm && autoconf) > +(cd shmem/unix/mm && aclocal && autoconf) > > exit 0 > Index: shmem/unix/mm/Makefile.in > =================================================================== > RCS file: /home/cvspublic/apr/shmem/unix/mm/Makefile.in,v > retrieving revision 1.4 > diff -u -r1.4 Makefile.in > --- shmem/unix/mm/Makefile.in 2000/05/03 17:15:48 1.4 > +++ shmem/unix/mm/Makefile.in 2001/07/08 21:50:12 > @@ -51,6 +51,10 @@ > includedir = @includedir@ > mandir = @mandir@ > > +# This is a nasty hack that is needed because libtool > +# 1.4 uses top_builddir which is undefined here. > +top_builddir = . > + > SHELL = /bin/sh > CC = @CC@ > CFLAGS = @CFLAGS@ > Index: shmem/unix/mm/configure.in > =================================================================== > RCS file: /home/cvspublic/apr/shmem/unix/mm/configure.in,v > retrieving revision 1.9 > diff -u -r1.9 configure.in > --- shmem/unix/mm/configure.in 2001/02/18 15:52:12 1.9 > +++ shmem/unix/mm/configure.in 2001/07/08 21:50:12 > @@ -2,6 +2,8 @@ > dnl ## Autoconf specification for MM library > dnl ## > > +builtin(include,apr_mm.m4) > + > dnl # > dnl # standard Autoconf prolog > dnl # > > cheers > Mo DeJong > Red Hat Inc## > ==================================================================== > ## Copyright (c) 1999-2000 Ralf S. Engelschall. All rights reserved. > ## > ## Redistribution and use in source and binary forms, with or without > ## modification, are permitted provided that the following conditions > ## are met: > ## > ## 1. Redistributions of source code must retain the above copyright > ## notice, this list of conditions and the following disclaimer. > ## > ## 2. Redistributions in binary form must reproduce the above copyright > ## notice, this list of conditions and the following disclaimer in > ## the documentation and/or other materials provided with the > ## distribution. > ## > ## 3. All advertising materials mentioning features or use of this > ## software must display the following acknowledgment: > ## "This product includes software developed by > ## Ralf S. Engelschall <[EMAIL PROTECTED]>." > ## > ## 4. Redistributions of any form whatsoever must retain the following > ## acknowledgment: > ## "This product includes software developed by > ## Ralf S. Engelschall <[EMAIL PROTECTED]>." > ## > ## THIS SOFTWARE IS PROVIDED BY RALF S. ENGELSCHALL ``AS IS'' AND ANY > ## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > ## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RALF S. ENGELSCHALL OR > ## ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > ## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; > ## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > ## STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED > ## OF THE POSSIBILITY OF SUCH DAMAGE. > ## ==================================================================== > divert(-1) > > define(AC_CHECK_DEBUGGING,[dnl > AC_MSG_CHECKING(for compilation debug mode) > AC_ARG_ENABLE(debug,dnl > [ --enable-debug build for debugging (default=no)], > [dnl > if test ".$ac_cv_prog_gcc" = ".yes"; then > case "$CFLAGS" in > *-O2* ) ;; > * ) CFLAGS="$CFLAGS -O2" ;; > esac > case "$CFLAGS" in > *-g* ) ;; > * ) CFLAGS="$CFLAGS -g" ;; > esac > CFLAGS="$CFLAGS -ggdb3" > CFLAGS="$CFLAGS -Wall -Wshadow -Wpointer-arith -Wcast-align" > CFLAGS="$CFLAGS -Wmissing-prototypes -Wmissing-declarations > -Wnested-externs -Winline" > else > case "$CFLAGS" in > *-g* ) ;; > * ) CFLAGS="$CFLAGS -g" ;; > esac > fi > msg="enabled" > AC_DEFINE(MM_DEBUG) > ],[ > case "$CFLAGS" in > *-g* ) CFLAGS=`echo "$CFLAGS" |\ > sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e > 's/^-g$//'` ;; > esac > msg=disabled > ]) > AC_MSG_RESULT([$msg]) > ]) > > define(AC_CONFIGURE_PART,[dnl > AC_MSG_RESULT() > AC_MSG_RESULT(${T_MD}$1:${T_ME}) > ])dnl > > define(AC_CHECK_DEFINE,[dnl > AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1, > AC_EGREP_CPP([YES_IS_DEFINED], [ > #include <$2> > #ifdef $1 > YES_IS_DEFINED > #endif > ], ac_cv_define_$1=yes, ac_cv_define_$1=no) > ) > if test "$ac_cv_define_$1" = "yes" ; then > AC_DEFINE(HAVE_$1) > fi > ])dnl > AC_DEFINE(HAVE_$1) > > define(AC_IFALLYES,[dnl > ac_rc=yes > for ac_spec in $1; do > ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'` > ac_item=`echo "$ac_spec" | sed -e 's/^.*://'` > case $ac_type in > header ) > ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'` > ac_var="ac_cv_header_$ac_item" > ;; > file ) > ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'` > ac_var="ac_cv_file_$ac_item" > ;; > func ) ac_var="ac_cv_func_$ac_item" ;; > define ) ac_var="ac_cv_define_$ac_item" ;; > custom ) ac_var="$ac_item" ;; > esac > eval "ac_val=\$$ac_var" > if test ".$ac_val" != .yes; then > ac_rc=no > break > fi > done > if test ".$ac_rc" = .yes; then > : > $2 > else > : > $3 > fi > ])dnl > > define(AC_BEGIN_DECISION,[dnl > ac_decision_item='$1' > ac_decision_msg='FAILED' > ac_decision='' > ])dnl > define(AC_DECIDE,[dnl > ac_decision='$1' > ac_decision_msg='$2' > ac_decision_$1=yes > ac_decision_$1_msg='$2' > ])dnl > define(AC_DECISION_OVERRIDE,[dnl > ac_decision='' > for ac_item in $1; do > eval "ac_decision_this=\$ac_decision_${ac_item}" > if test ".$ac_decision_this" = .yes; then > ac_decision=$ac_item > eval "ac_decision_msg=\$ac_decision_${ac_item}_msg" > fi > done > ])dnl > define(AC_DECISION_FORCE,[dnl > ac_decision="$1" > eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\"" > ])dnl > define(AC_END_DECISION,[dnl > if test ".$ac_decision" = .; then > echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2 > exit 1 > else > if test ".$ac_decision_msg" = .; then > ac_decision_msg="$ac_decision" > fi > AC_MSG_RESULT([decision on $ac_decision_item... $ac_decision_msg]) > fi > ])dnl > > AC_DEFUN(AC_TEST_FILE, > [AC_REQUIRE([AC_PROG_CC]) > ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` > AC_MSG_CHECKING([for $1]) > AC_CACHE_VAL(ac_cv_file_$ac_safe, [ > if test -r $1; then > eval "ac_cv_file_$ac_safe=yes" > else > eval "ac_cv_file_$ac_safe=no" > fi > ])dnl > if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then > AC_MSG_RESULT(yes) > ifelse([$2], , :, [$2]) > else > AC_MSG_RESULT(no) > ifelse([$3], , , [$3]) > fi > ]) > > define(AC_CHECK_MAXSEGSIZE,[dnl > AC_MSG_CHECKING(for shared memory maximum segment size) > AC_CACHE_VAL(ac_cv_maxsegsize, > [ > OCFLAGS="$CFLAGS" > case "$1" in > MM_SHMT_MM* ) CFLAGS="-DTEST_MMAP $CFLAGS" ;; > MM_SHMT_IPCSHM ) CFLAGS="-DTEST_SHMGET $CFLAGS" ;; > MM_SHMT_BEOS ) CFLAGS="-DTEST_AREAS $CFLAGS" ;; > esac > AC_TRY_RUN( > changequote(<<, >>)dnl > << > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> > #include <fcntl.h> > #include <sys/file.h> > #include <sys/types.h> > #include <sys/stat.h> > #ifdef TEST_MMAP > #include <sys/mman.h> > #endif > #ifdef TEST_SHMGET > #ifdef MM_OS_SUNOS > #define KERNEL 1 > #endif > #ifdef MM_OS_BS2000 > #define _KMEMUSER > #endif > #include <sys/ipc.h> > #include <sys/shm.h> > #ifdef MM_OS_SUNOS > #undef KERNEL > #endif > #ifdef MM_OS_BS2000 > #undef _KMEMUSER > #endif > #if !defined(SHM_R) > #define SHM_R 0400 > #endif > #if !defined(SHM_W) > #define SHM_W 0200 > #endif > #endif > #if !defined(MAP_FAILED) > #define MAP_FAILED ((void *)-1) > #endif > #ifdef MM_OS_BEOS > #include <kernel/OS.h> > #endif > > > int testit(int size) > { > int fd; > void *segment; > #ifdef TEST_MMAP > char file[] = "./ac_test.tmp"; > unlink(file); > if ((fd = open(file, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) == -1) > return 0; > if (ftruncate(fd, size) == -1) > return 0; > if ((segment = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE, > MAP_SHARED, fd, 0)) == MAP_FAILED) { > close(fd); > return 0; > } > munmap((caddr_t)segment, size); > close(fd); > unlink(file); > #endif > #ifdef TEST_SHMGET > if ((fd = shmget(IPC_PRIVATE, size, SHM_R|SHM_W|IPC_CREAT)) == -1) > return 0; > if ((segment = (void *)shmat(fd, NULL, 0)) == ((void *)-1)) { > shmctl(fd, IPC_RMID, NULL); > return 0; > } > shmdt(segment); > shmctl(fd, IPC_RMID, NULL); > #endif > #ifdef TEST_BEOS > area_id id; > id = create_area("mm_test", (void*)&segment, B_ANY_ADDRESS, size, > B_LAZY_LOCK, B_READ_AREA|B_WRITE_AREA); > if (id < 0) > return 0; > delete_area(id); > #endif > return 1; > } > > #define ABS(n) ((n) >= 0 ? (n) : (-(n))) > > int main(int argc, char *argv[]) > { > int t, m, b; > int d; > int rc; > FILE *f; > > /* > * Find maximum possible allocation size by performing a > * binary search starting with a search space between 0 and > * 64MB of memory. > */ > t = 1024*1024*64 /* = 67108864 */; > if (testit(t)) > m = t; > else { > m = 1024*1024*32; > b = 0; > for (;;) { > /* fprintf(stderr, "t=%d, m=%d, b=%d\n", t, m, b); */ > rc = testit(m); > if (rc) { > d = ((t-m)/2); > b = m; > } > else { > d = -((m-b)/2); > t = m; > } > if (ABS(d) < 1024*1) { > if (!rc) > m = b; > break; > } > if (m < 1024*8) > break; > m += d; > } > if (m < 1024*8) > m = 0; > } > if ((f = fopen("conftestval", "w")) == NULL) > exit(1); > fprintf(f, "%d\n", m); > fclose(f); > exit(0); > } > >> > changequote([, ])dnl > ,[ac_cv_maxsegsize="`cat conftestval`" > ], > ac_cv_maxsegsize=0 > , > ac_cv_maxsegsize=0 > ) > CFLAGS="$OCFLAGS" > ]) > msg="$ac_cv_maxsegsize" > if test $msg -eq 67108864; then > msg="64MB (soft limit)" > elif test $msg -gt 1048576; then > msg="`expr $msg / 1024`" > msg="`expr $msg / 1024`" > msg="${msg}MB" > elif test $msg -gt 1024; then > msg="`expr $msg / 1024`" > msg="${msg}KB" > else > ac_cv_maxsegsize=0 > msg=unknown > fi > MM_SHM_MAXSEGSIZE=$ac_cv_maxsegsize > test ".$msg" = .unknown && AC_MSG_ERROR([Unable to determine maximum shared > memory segment size]) > AC_MSG_RESULT([$msg]) > AC_DEFINE_UNQUOTED(MM_SHM_MAXSEGSIZE, $MM_SHM_MAXSEGSIZE) > ]) > > divert