On Sat, 22 Sep 2001 14:22:28 -0700
Greg Stein <gstein@lyra.org> wrote:
> Here is an updated patch for switching to autoconf 2.52/libtool 1.4.
Recently there were a number of patches related to this autoconf/libtool
upgrade flying around. I thought I would take this opportunity to
merge the changes I had suggested with the ones Greg had made
and repost a patch that is fully functional. This patch will work
with both static and shared builds and it will reconfigure neon
so that any valid command line option passed to toplevel configure
will be correctly passed to neon. There should not be any more
issues that would hamper this upgrade, so please give this
patch a test.
cheers
Mo DeJong
2001-09-27 Mo DeJong <supermo@bayarea.net>
Upgrade subversion to libtool 1.4 and autoconf 2.50.
* ac-helpers/berkeley-db.m4: Link to the db .la file
instead of passing -L -l flags to libtool.
* autogen.sh: Run local buildcheck.sh script instead of
depending on the apr provided one. We now require a minimum
or autoconf 2.50 and libtool 1.4 so the apr provided script
is no longer sufficient.
Run libtoolize without the --automake flag since we
no longer use automake. Remove generated libtool files
before running libtoolize to avoid libtool error when
regenerated with libtool 1.4 after being generated with 1.3.
Patch neon and rerun aclocal. autoheader, libtoolize, and
autoconf to support regenerating configure scripts with
autoconf 2.50 and libtool 1.4.
* gen-make.py: Avoid linking in libtool .libs directories,
instead link to the .la files directly. This .libs hack
was needed since libtool 1.3 did not support dependencies
correctly. Do a cd before installing .la files to work
around a bug in libtool 1.4.2 which can cause a relink
of a .la file to fail.
* build.conf: Avoid linking in libtool .libs directories,
link to the .la file instead.
* configure.in: Avoid linking in libtool .libs directories,
link to the .la file instead. Require autoconf 2.50 or newer.
* buildcheck.sh: Adapt apr/build/buildcheck.sh script
to require autoconf 2.50 and libtool 1.4 or newer.
Index: ./ac-helpers/berkeley-db.m4
===================================================================
--- ./ac-helpers/SVN/text-base/berkeley-db.m4 Thu Sep 27 16:26:10 2001
+++ ./ac-helpers/berkeley-db.m4 Thu Sep 27 16:27:21 2001
@@ -97,13 +97,7 @@
dbdir=`cd db/dist ; pwd`
SVN_DB_INCLUDES="-I$dbdir"
svn_lib_berkeley_db=yes
- if test "$enable_shared" = "yes"; then
- # Once we upgrade to libtool 1.4 we should change this to
- # "$dbdir/libdb-3.3.la"
- SVN_DB_LIBS="-L$dbdir/.libs -ldb-3.3"
- else
- SVN_DB_LIBS="-L$dbdir -ldb"
- fi
+ SVN_DB_LIBS="$dbdir/libdb-3.3.la"
elif test "$status" = "skip"; then
svn_lib_berkeley_db=no
else
@@ -167,7 +161,8 @@
SVN_LIB_BERKELEY_DB_TRY($1, $2, $3)
eval "$cache_id=$svn_have_berkeley_db"
])
- AC_MSG_RESULT(`eval echo '$'$cache_id`)
+ result="`eval echo '$'$cache_id`"
+ AC_MSG_RESULT($result)
# If we found it, no need to search any more.
if test "`eval echo '$'$cache_id`" = "yes"; then
@@ -197,11 +192,13 @@
header="`echo $found | sed -e 's/:.*$//'`"
lib="`echo $found | sed -e 's/^.*://'`"
SVN_DB_INCLUDES="-I$header"
+dnl ### should look for a .la file
SVN_DB_LIBS="-L$lib -ldb"
svn_lib_berkeley_db=yes
;;
* )
SVN_DB_INCLUDES="-I$found/include"
+dnl ### should look for a .la file
SVN_DB_LIBS="-L$found/lib -ldb"
svn_lib_berkeley_db=yes
;;
Index: ./autogen.sh
===================================================================
--- ./SVN/text-base/autogen.sh Thu Sep 27 13:10:13 2001
+++ ./autogen.sh Thu Sep 27 15:59:05 2001
@@ -5,6 +5,7 @@
# Ensure some permissions for executables used by this script
for execfile in gen-make.py \
dist.sh \
+ buildcheck.sh \
ac-helpers/get-neon-ver.sh \
ac-helpers/gnu-diff.sh \
ac-helpers/gnu-patch.sh \
@@ -65,10 +66,8 @@
fi
-# Run a quick test to ensure APR is kosher.
-(cd apr && build/buildcheck.sh) || exit 1
-
-
+# Run a quick test to ensure that our autoconf and libtool verison are ok
+./buildcheck.sh || exit 1
#
@@ -85,7 +84,11 @@
exit 1
fi
-$libtoolize --copy --automake
+# Remove libtool generated files to avoid warning about
+# overwriting and to avoid leaving old libtool 1.3 files
+# lying around after upgrading to libtool 1.4.
+(cd ac-helpers ; rm -f ltconfig ltmain.sh libtool.m4)
+$libtoolize --copy
ltpath=`dirname $libtoolize`
ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
@@ -95,7 +98,6 @@
exit 1
fi
-rm -f ac-helpers/libtool.m4
cp $ltfile ac-helpers/libtool.m4
# This is just temporary until people's workspaces are cleared -- remove
@@ -158,6 +160,30 @@
echo "Creating config files for APR..."
(cd apr; ./buildconf) # this is apr's equivalent of autogen.sh
fi
+
+# Regenerate configuration files for neon, note that we need to
+# do a little hack here to apply a neon patch so that autoheader
+# will work properly. This should be removed once we upgrade
+# to a version of neon newer than 1.15.3
+(cd neon
+ echo "regenerating build scripts in neon"
+ rm -f aclocal.m4 config.h.in ltconfig ltmain.sh
+ if test ! -f configure.in.patch ; then
+ echo "patching configure.in"
+ cat > configure.in.patch <<EOF
+--- configure.in Mon Sep 24 02:46:57 2001
++++ configure.in Mon Sep 24 02:47:32 2001
+@@ -7 +7 @@
+-AC_DEFINE([_GNU_SOURCE])
++AC_DEFINE([_GNU_SOURCE], 1, [Unconditionally define _GNU_SOURCE])
+EOF
+ patch -p 0 < configure.in.patch
+ fi
+ aclocal -I macros
+ autoheader
+ libtoolize --copy >/dev/null 2>&1
+ autoconf
+)
# If we have a config.cache file, toss it if the configure script has
# changed, or if we just built it for the first time.
Index: ./gen-make.py
===================================================================
--- ./SVN/text-base/gen-make.py Thu Sep 27 13:10:13 2001
+++ ./gen-make.py Thu Sep 27 16:16:34 2001
@@ -108,19 +108,9 @@
target_ob.deps.append(tlib)
deps.append(tlib.output)
- dep_path = tlib.path
- if bldtype == 'lib':
- # we need to hack around a libtool problem: it cannot record a
- # dependency of one shared lib on another shared lib.
- ### fix this by upgrading to the new libtool 1.4 release...
- # strip "lib" from the front so we have -lsvn_foo
- if lib[:3] == 'lib':
- lib = lib[3:]
- libs.append('-L%s -l%s'
- % (retreat + os.path.join(dep_path, '.libs'), lib))
- else:
- # linking executables can refer to .la files
- libs.append(retreat + os.path.join(dep_path, lib + '.la'))
+ # link in the library by simply referring to the .la file
+ ### hmm. use join() for retreat + ... ?
+ libs.append(retreat + os.path.join(tlib.path, lib + '.la'))
else:
# something we don't know, so just include it directly
libs.append(lib)
@@ -190,6 +180,8 @@
s_files, s_errors = _collect_paths(parser.get('static-apache', 'paths'))
errors = errors or s_errors
+ # Construct a .libs directory within the Apache area and populate it
+ # with the appropriate files. Also drop the .la file in the target dir.
ofile.write('\ninstall-mods-static: %s\n'
'\t$(MKDIR) %s\n'
% (string.join(la_tweaked + s_files),
@@ -197,12 +189,16 @@
for file in la_tweaked:
dirname, fname = os.path.split(file)
base = os.path.splitext(fname)[0]
+ # cd to dirname before install to work around libtool 1.4.2 bug.
ofile.write('\t$(INSTALL_MOD_STATIC) %s %s\n'
- '\t$(INSTALL_MOD_STATIC) %s %s\n'
+ '\tcd %s ; $(INSTALL_MOD_STATIC) %s %s\n'
% (os.path.join(dirname, '.libs', base + '.a'),
os.path.join('$(APACHE_TARGET)', '.libs', base + '.a'),
- file,
+ dirname,
+ (base + '.la'),
os.path.join('$(APACHE_TARGET)', base + '.la')))
+
+ # copy the other files to the target dir
for file in s_files:
ofile.write('\t$(INSTALL_MOD_STATIC) %s %s\n'
% (file, os.path.join('$(APACHE_TARGET)',
@@ -215,10 +211,13 @@
'\t$(MKDIR) $(%sdir)\n'
% (area, string.join(files), area_var))
for file in files:
- ofile.write('\t$(INSTALL_%s) %s %s\n'
- % (string.upper(area_var), file,
- os.path.join('$(%sdir)' % area_var,
- os.path.basename(file))))
+ # cd to dirname before install to work around libtool 1.4.2 bug.
+ dirname, fname = os.path.split(file)
+ ofile.write('\tcd %s ; $(INSTALL_%s) %s %s\n'
+ % (dirname,
+ string.upper(area_var),
+ fname,
+ os.path.join('$(%sdir)' % area_var, fname)))
ofile.write('\n')
includes, i_errors = _collect_paths(parser.get('includes', 'paths'))
Index: ./build.conf
===================================================================
--- ./SVN/text-base/build.conf Thu Sep 27 13:10:12 2001
+++ ./build.conf Thu Sep 27 15:56:28 2001
@@ -103,7 +103,7 @@
type = lib
path = subversion/libsvn_ra_dav
### hack to deal with libtool's busted intra-library dependencies
-libs = -L$(abs_builddir)/neon/src/.libs -lneon
+libs = $(abs_builddir)/neon/src/libneon.la
# Accessing repositories via direct libsvn_fs
[libsvn_ra_local]
Index: ./configure.in
===================================================================
--- ./SVN/text-base/configure.in Thu Sep 27 13:10:11 2001
+++ ./configure.in Thu Sep 27 16:03:07 2001
@@ -4,6 +4,10 @@
dnl General Setup -----------------------
+dnl Ensure that subversion is configured with autoconf 2.50 or newer.
+dnl Don't even think about removing this check!
+AC_PREREQ(2.50)
+
dnl First line is *required*; sanity-checks that the our src dir exists.
AC_INIT(subversion/include/svn_types.h)
AC_CONFIG_AUX_DIR(ac-helpers)
@@ -279,14 +283,20 @@
AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_DAV, 1,
[Defined if libsvn_client should link against libsvn_ra_dav])
SVN_RA_LIB_DEPS="subversion/libsvn_ra_dav/libsvn_ra_dav.la"
- SVN_RA_LIB_LINK="-L\$(abs_builddir)/subversion/libsvn_ra_dav/.libs -lsvn_ra_dav \
- -L\$(abs_builddir)/neon/src/.libs -lneon $NEON_LIBS"
+ SVN_RA_LIB_LINK="\$(abs_builddir)/subversion/libsvn_ra_dav.la \
+ \$(abs_builddir)/neon/src/libneon.la $NEON_LIBS"
if test "$svn_lib_berkeley_db" = "yes"; then
AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL, 1,
[Defined if libsvn_client should link against libsvn_ra_local])
- SVN_RA_LIB_DEPS="$SVN_RA_LIB_DEPS subversion/libsvn_ra_local/libsvn_ra_local.la subversion/libsvn_repos/libsvn_repos.la subversion/libsvn_fs/libsvn_fs.la"
- SVN_RA_LIB_LINK="$SVN_RA_LIB_LINK -L\$(abs_builddir)/subversion/libsvn_ra_local/.libs -lsvn_ra_local -L\$(abs_builddir)/subversion/libsvn_repos/.libs -lsvn_repos -L\$(abs_builddir)/subversion/libsvn_fs/.libs -lsvn_fs \$(SVN_DB_LIBS)"
+ SVN_RA_LIB_DEPS="$SVN_RA_LIB_DEPS \
+ subversion/libsvn_ra_local/libsvn_ra_local.la \
+ subversion/libsvn_repos/libsvn_repos.la \
+ subversion/libsvn_fs/libsvn_fs.la"
+ SVN_RA_LIB_LINK="$SVN_RA_LIB_LINK \
+ \$(abs_builddir)/subversion/libsvn_ra_local.la \
+ \$(abs_builddir)/subversion/libsvn_repos.la \
+ \$(abs_builddir)/subversion/libsvn_fs.la \$(SVN_DB_LIBS)"
fi
fi
Index: ./buildcheck.sh
===================================================================
--- ./SVN/text-base/buildcheck.sh Thu Sep 27 16:59:35 2001
+++ ./buildcheck.sh Thu Sep 27 15:30:41 2001
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+echo "buildcheck: checking installation..."
+
+# autoconf 2.50 or newer
+ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
+if test -z "$ac_version"; then
+echo "buildcheck: autoconf not found."
+echo " You need autoconf version 2.50 or newer installed"
+echo " to build Apache from CVS."
+exit 1
+fi
+IFS=.; set $ac_version; IFS=' '
+if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
+echo "buildcheck: autoconf version $ac_version found."
+echo " You need autoconf version 2.50 or newer installed."
+exit 1
+else
+echo "buildcheck: autoconf version $ac_version (ok)"
+fi
+
+# libtool 1.4 or newer
+libtool=`apr/build/PrintPath glibtool libtool`
+lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
+if test -z "$lt_pversion"; then
+echo "buildcheck: libtool not found."
+echo " You need libtool version 1.4 or newer installed"
+exit 1
+fi
+lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
+IFS=.; set $lt_version; IFS=' '
+lt_status="good"
+if test "$1" = "1"; then
+ if test "$2" -lt "4"; then
+ lt_status="bad"
+ fi
+fi
+if test $lt_status = "good"; then
+ echo "buildcheck: libtool version $lt_pversion (ok)"
+else
+ echo "buildcheck: libtool version $lt_pversion found."
+ echo " You need libtool version 1.4 or newer installed"
+ exit 1
+fi
+
+exit 0
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 2006