On Wed, Dec 11, 2002 at 08:47:18AM +0100, Branko ??ibej wrote:
> Hm. Two questions:
> -- What's wrong with build/getversion.py, apart from it not being a
> shell script?
> -- Given that the version number doesn't change all that often, why is
> this code used in configure? Wouldn't autogen be an appropriate place?
How about the following patch?
Matt
* Makefile.in
(local-extraclean): Remove configure.in.
* autogen.sh: Ensure build/getversion.py is executable, and generate
configure.in with the version embedded therein.
* build/get-version.sh: Remove.
* build/getversion.py: Add #! line and convert line endings.
* configure.in: Rename to...
* configure.in.in: ...this and remove version determination.
Index: Makefile.in
===================================================================
--- Makefile.in (revision 4087)
+++ Makefile.in (working copy)
@@ -143,7 +143,7 @@
rm -f build-outputs.mk svn_private_config.h.in configure \
ac-helpers/config.guess ac-helpers/config.sub \
ac-helpers/libtool.m4 ac-helpers/ltconfig \
- ac-helpers/ltmain.sh
+ ac-helpers/ltmain.sh configure.in
# clean everything, including test output.
local-clean: fast-clean check-clean swig-clean
Index: autogen.sh
===================================================================
--- autogen.sh (revision 4087)
+++ autogen.sh (working copy)
@@ -6,6 +6,7 @@
for execfile in gen-make.py \
dist.sh \
build/buildcheck.sh \
+ build/getversion.py \
build/PrintPath \
ac-helpers/get-neon-ver.sh \
ac-helpers/check-diff.sh \
@@ -13,6 +14,9 @@
chmod +x $execfile
done
+# Produce configure.in
+SUBVERSION_VERSION=`build/getversion.py | sed -n 's/Subversion //p'`
+sed s/@SUBVERSION_VERSION@/$SUBVERSION_VERSION/ configure.in.in >configure.in
# Run tests to ensure that our build requirements are met
NEON_CHECK_CONTROL=""
Index: build/get-version.sh
===================================================================
--- build/get-version.sh (working copy)
+++ build/get-version.sh (working copy)
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# USAGE: get-version.sh path/to/svn_version.h
-#
-# This script will print Subversion's version number on stdout. For example:
-#
-# $ ./build/get-version.sh ./subversion/include/svn_version.h
-# 0.15.0
-# $
-#
-
-if test $# = 0; then
- echo "ERROR: pathname for svn_version.h was not provided."
- echo ""
- echo "USAGE: $0 path/to/svn_version.h"
- exit 1
-fi
-if test $# != 1; then
- echo "ERROR: too many arguments were provided."
- echo ""
- echo "USAGE: $0 path/to/svn_version.h"
- exit 1
-fi
-
-hdr="$1"
-if test ! -r "$hdr"; then
- echo "ERROR: '$hdr' does not exist, or is not readable."
- exit 1
-fi
-
-MAJOR_VERSION="`sed -n -e '/SVN_VER_MAJOR/s/[^0-9]*//gp' $hdr`"
-MINOR_VERSION="`sed -n -e '/SVN_VER_MINOR/s/[^0-9]*//gp' $hdr`"
-MICRO_VERSION="`sed -n -e '/SVN_VER_MICRO/s/[^0-9]*//gp' $hdr`"
-
-# Determine how to tell echo not to print the trailing \n. This is
-# similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't
-# generate this file via autoconf (in fact, get-version.sh is used
-# to *create* ./configure), so we just do something similar inline.
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ;;
- *) ECHO_N= ECHO_C='\c' ;;
-esac
-
-echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C"
Index: build/getversion.py
===================================================================
--- build/getversion.py (revision 4087)
+++ build/getversion.py (working copy)
@@ -1,53 +1,53 @@
-#
-# getversion.py - Parse version numbers from C header files.
-#
-
-
-import re
-
-__all__ = ['Parser', 'Result']
-
-class Result:
- pass
-
-class Parser:
- def __init__(self):
- self.patterns = {}
-
- def search(self, define_name, value_name):
- 'Add the name of a define to the list of search pattenrs.'
- self.patterns[define_name] = value_name
-
- def parse(self, file):
- 'Parse the file, extracting defines into a Result object.'
- stream = open(file, 'rt')
- result = Result()
- regex = re.compile(r'^\s*#\s*define\s+(\w+)\s+(\d+)')
- for line in stream.readlines():
- match = regex.match(line)
- if match:
- try:
- name = self.patterns[match.group(1)]
- except:
- continue
- setattr(result, name, int(match.group(2)))
- stream.close()
- return result
-
-
-if __name__ == '__main__':
- # Example: Get the version number from svn_version.h
- p = Parser()
- p.search('SVN_VER_MAJOR', 'major')
- p.search('SVN_VER_MINOR', 'minor')
- p.search('SVN_VER_MICRO', 'patch')
- p.search('SVN_VER_LIBRARY', 'libver')
-
- import os, sys
- r = p.parse(os.path.join(os.path.dirname(sys.argv[0]),
- '../subversion/include/svn_version.h'))
- print "Subversion %d.%d.%d" % (r.major, r.minor, r.patch)
- print "Library version %d" % r.libver
-
-
-### End of file.
+#!/usr/bin/env python
+#
+# getversion.py - Parse version numbers from C header files.
+#
+
+import re
+
+__all__ = ['Parser', 'Result']
+
+class Result:
+ pass
+
+class Parser:
+ def __init__(self):
+ self.patterns = {}
+
+ def search(self, define_name, value_name):
+ 'Add the name of a define to the list of search pattenrs.'
+ self.patterns[define_name] = value_name
+
+ def parse(self, file):
+ 'Parse the file, extracting defines into a Result object.'
+ stream = open(file, 'rt')
+ result = Result()
+ regex = re.compile(r'^\s*#\s*define\s+(\w+)\s+(\d+)')
+ for line in stream.readlines():
+ match = regex.match(line)
+ if match:
+ try:
+ name = self.patterns[match.group(1)]
+ except:
+ continue
+ setattr(result, name, int(match.group(2)))
+ stream.close()
+ return result
+
+
+if __name__ == '__main__':
+ # Example: Get the version number from svn_version.h
+ p = Parser()
+ p.search('SVN_VER_MAJOR', 'major')
+ p.search('SVN_VER_MINOR', 'minor')
+ p.search('SVN_VER_MICRO', 'patch')
+ p.search('SVN_VER_LIBRARY', 'libver')
+
+ import os, sys
+ r = p.parse(os.path.join(os.path.dirname(sys.argv[0]),
+ '../subversion/include/svn_version.h'))
+ print "Subversion %d.%d.%d" % (r.major, r.minor, r.patch)
+ print "Library version %d" % r.libver
+
+
+### End of file.
Index: configure.in
===================================================================
--- configure.in (working copy)
+++ configure.in (working copy)
@@ -1,471 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl Autoconfiscation for Subversion
-
-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 Get the version number of Subversion, using m4's esyscmd() command to run
-dnl the command at m4-generation time. This allows us to create an m4
-dnl symbol holding the correct version number. AC_INIT() requires the
-dnl version number at m4-time, rather than when ./configure is run, so
-dnl all this must happen as part of m4, not as part of the shell code
-dnl contained in ./configure.
-dnl
-dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an apprpriate
-dnl test. I believe this test will work, but I don't have a place with non-
-dnl GNU M4 to test it right now.
-define([subversion_version],
- ifdef([__gnu__],
- [esyscmd(build/get-version.sh subversion/include/svn_version.h)],
- [0.x]))
-AC_INIT(subversion, subversion_version, [http://subversion.tigris.org])
-undefine([subversion_version])
-
-dnl AC_CONFIG_SRCDIR is *required*; sanity-checks that our src dir exists.
-AC_CONFIG_SRCDIR(subversion/include/svn_types.h)
-AC_CONFIG_AUX_DIR(ac-helpers)
-
-abs_srcdir="`cd $srcdir && pwd`"
-abs_builddir="`pwd`"
-
-dnl ### should we ever bother with the system install?
-dnl use abs_srcdir. sometimes during installation, libtool will relink the
-dnl library. when it does this, it does a "cd", so a relative use of
-dnl install-sh will not work.
-INSTALL="$abs_srcdir/ac-helpers/install-sh -c"
-AC_SUBST(INSTALL)
-
-MKDIR="$INSTALL -d"
-AC_SUBST(MKDIR)
-
-dnl Grab our own macros
-sinclude(ac-helpers/berkeley-db.m4)
-sinclude(ac-helpers/svn-apache.m4)
-sinclude(ac-helpers/svn-macros.m4)
-sinclude(ac-helpers/neon.m4)
-sinclude(ac-helpers/find_apr.m4)
-sinclude(ac-helpers/apr.m4)
-sinclude(ac-helpers/find_apu.m4)
-sinclude(ac-helpers/aprutil.m4)
-sinclude(ac-helpers/java.m4)
-sinclude(ac-helpers/swig.m4)
-
-dnl Grab the libtool macros
-sinclude(ac-helpers/libtool.m4)
-
-dnl Generate config.nice early (before the args are munged)
-SVN_CONFIG_NICE(config.nice)
-
-dnl AC_CONFIG_HEADER causes `autoheader' to produce svn_private_config.h.in for us.
-dnl (We can add custom defines by creating ./acconfig.h if we wish.)
-AC_CONFIG_HEADER(svn_private_config.h)
-
-dnl Todo: we're English-only now, but GNU Gettext eventually?
-dnl Set of available languages.
-dnl ALL_LINGUAS="de fr es ko nl no pl pt sl sv"
-dnl I volunteer for this ^^ translation :-) -xbc
-
-dnl Sub-package configuration ---------------------
-
-dnl Possibly reconfigure packages in subdirectories
-AC_ARG_ENABLE(subdir-config,
- AC_HELP_STRING([--disable-subdir-config],
- [do not reconfigure packages in subdirectories]),
- [
- if test "$enableval" = "yes" ; then
- do_subdir_config="yes"
- fi
- ],
- [
- do_subdir_config=yes
- ])
-
-dnl the extra bits to include into our build process
-SVN_EXTRA_INCLUDES='-I$(top_srcdir)/subversion/include -I$(top_builddir)'
-SVN_EXTRA_LIBS=
-
-SVN_SUBDIRS=
-
-AC_SUBST(SVN_EXTRA_INCLUDES)
-AC_SUBST(SVN_EXTRA_LIBS)
-AC_SUBST(SVN_SUBDIRS)
-
-dnl Configure APR, and local Berkeley DB if any --------------------------
-
-dnl verify apr version and set apr flags
-changequote(<<, >>)
-APR_VER_REGEX="0\.9\.[2-9]"
-APU_VER_REGEX="0\.9\.[2-9]"
-changequote([, ])
-
-SVN_LIB_APR($APR_VER_REGEX)
-SVN_LIB_APRUTIL($APU_VER_REGEX)
-
-if test -d $abs_srcdir/db ; then
- # Note: We have to configure and build a db subdirectory even if
- # some other berkeley db is configured via --with-berkeley-db
- ### why do we "have to" ?? -gjs
- SVN_SUBDIR_CONFIG(db/dist)
- SVN_SUBDIRS="$SVN_SUBDIRS db/dist"
-fi
-
-dnl Set include dir and module library lists for Makefiles -----------------
-
-dnl Expat
-APU_HAVE_OLD_EXPAT="`$apu_config --old-expat`"
-if test "$APU_HAVE_OLD_EXPAT" = "yes"; then
- AC_DEFINE(SVN_HAVE_OLD_EXPAT, 1, [Defined if Expat 1.0 or 1.1 was found])
-fi
-
-dnl Check for programs ---------------------
-
-dnl Look for a C compiler
-AC_PROG_CC
-
-dnl See if 'ln -s' works
-AC_PROG_LN_S
-
-dnl Check for libtool -- we'll definitely need it for all our shared libs!
-echo "configuring libtool now"
-AC_PROG_LIBTOOL
-
-dnl Before configuring libtool check for --enable-all-static option
-AC_ARG_ENABLE(all-static,
- AC_HELP_STRING([--enable-all-static],
- [Build completely static (standalone) binaries.]),
- [
- if test "$enableval" = "yes" ; then
- LT_LDFLAGS="-all-static $LT_LDFLAGS"
- fi
-])
-
-AC_SUBST(LT_LDFLAGS)
-
-
-
-NEON_WANTED_REGEX="`sed -n '/NEON_WANTED_REGEX=/s/.*=//p' $srcdir/build/buildcheck.sh`"
-dnl You can skip the neon version check only if you know what you are doing
-AC_ARG_ENABLE(neon-version-check,
- AC_HELP_STRING([--disable-neon-version-check],
- [do not check the Neon version]),
- [
- if test "$enableval" = "no" ; then
- NEON_WANTED_REGEX="*"
- fi
- ],
- [])
-NEON_LATEST_WORKING_VER="`sed -n '/NEON_LATEST_WORKING_VER=/s/.*=//p' $srcdir/build/buildcheck.sh`"
-eval "`grep '^ *NEON_URL=' $srcdir/build/buildcheck.sh`"
-SVN_LIB_NEON($NEON_WANTED_REGEX, $NEON_LATEST_WORKING_VER, $NEON_URL)
-
-dnl find Apache with a recent-enough magic module number.
-SVN_FIND_APACHE(20020903)
-
-dnl Check for libraries --------------------
-
-dnl AC_CHECK_LIB() calls go here, if we ever need any
-
-# Build the filesystem library (and repository administration tool)
-# only if we have an appropriate version of Berkeley DB.
-SVN_FS_WANT_DB_MAJOR=4
-SVN_FS_WANT_DB_MINOR=0
-SVN_FS_WANT_DB_PATCH=14
-# Look for libdb4.so first:
-SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
- $SVN_FS_WANT_DB_PATCH, [db4 db])
-
-
-# Only add *_APACHE_RULE if we also have db, since mod_dav_svn depends on it.
-INSTALL_STATIC_RULES="install-bin install-docs"
-INSTALL_RULES="install-base-lib install-lib install-include install-static"
-BUILD_RULES="base-lib lib bin test"
-if test "$svn_lib_berkeley_db" = "yes"; then
- BUILD_RULES="base-lib fs-lib lib bin fs-bin $BUILD_APACHE_RULE test fs-test"
- INSTALL_STATIC_RULES="install-bin install-fs-bin install-docs"
- INSTALL_RULES="install-base-lib install-fs-lib install-lib install-include install-static $INSTALL_APACHE_RULE"
- FS_TEST_DEPS="\$(FS_TEST_DEPS)"
- FS_TEST_PROGRAMS="\$(FS_TEST_PROGRAMS)"
-fi
-
-AC_SUBST(BUILD_RULES)
-AC_SUBST(INSTALL_STATIC_RULES)
-AC_SUBST(INSTALL_RULES)
-AC_SUBST(FS_TEST_DEPS)
-AC_SUBST(FS_TEST_PROGRAMS)
-AC_SUBST(SVN_DB_INCLUDES)
-AC_SUBST(SVN_DB_LIBS)
-
-AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR,
- [The desired major version for the Berkeley DB])
-AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR,
- [The desired minor version for the Berkeley DB])
-AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH,
- [The desired patch version for the Berkeley DB])
-
-dnl Check for header files ----------------
-
-dnl Standard C headers
-AC_HEADER_STDC
-
-dnl Check for typedefs, structures, and compiler characteristics ----------
-
-dnl if compiler doesn't understand `const', then define it empty
-AC_C_CONST
-
-dnl if non-existent, define size_t to be `unsigned'
-AC_TYPE_SIZE_T
-
-
-dnl Check for library functions ----------
-
-dnl libsvn_string uses memcmp()
-AC_FUNC_MEMCMP
-
-dnl svn_error's default warning handler uses vfprintf()
-AC_FUNC_VPRINTF
-
-
-dnl Process some configuration options ----------
-
-AC_ARG_ENABLE(debug,
-AC_HELP_STRING([--enable-debug],
- [Turn on debugging and compile time warnings]),
-[
- if test "$enableval" = "yes" ; then
- enable_debugging="yes"
- else
- enable_debugging="no"
- fi
-])
-
-MOD_ACTIVATION="-a"
-AC_ARG_ENABLE(mod-activation,
-AC_HELP_STRING([--disable-mod-activation],
- [Do not enable mod_dav_svn in httpd.conf]),
-[
- if test "$enableval" = "no" ; then
- MOD_ACTIVATION=""
- AC_MSG_NOTICE([Disabling apache module activation])
- else
- AC_MSG_NOTICE([Enabling apache module activation])
- fi
-])
-AC_SUBST(MOD_ACTIVATION)
-
-
-AC_ARG_ENABLE(maintainer-mode,
-AC_HELP_STRING([--enable-maintainer-mode],
- [Turn on debugging and very strict compile-time warnings]),
-[
- if test "$enableval" = "yes" ; then
- if test "$enable_debugging" = "no" ; then
- AC_MSG_ERROR(Can't have --disable-debug and --enable-maintainer-mode)
- fi
- enable_debugging=yes
- if test "$GCC" = "yes"; then
- dnl SVN_DEBUG enables specific features for developer builds
- dnl AP_DEBUG enables specific (Apache) features for developer builds
- CFLAGS="$CFLAGS -Wpointer-arith -Wwrite-strings -Wshadow -DSVN_DEBUG -DAP_DEBUG";
- fi
- fi
-])
-
-
-if test "$enable_debugging" = "yes" ; then
- dnl At the moment, we don't want optimization, because we're
- dnl debugging.
- dnl ### actually, debugging should be fine with the default -O2
- changequote(,)
- CFLAGS="`echo $CFLAGS' ' | sed -e 's/-O[^ ]* //g'`"
- changequote([,])
-else
- if test "$enable_debugging" = "no" ; then
- changequote(,)
- CFLAGS="`echo $CFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"
- changequote([,])
- fi
-fi
-
-dnl Find a diff that supports the "-u" flag
-AC_MSG_CHECKING([for diff])
-SVN_CLIENT_DIFF="`${abs_srcdir}/ac-helpers/check-diff.sh ${abs_srcdir}/ac-helpers`"
-if test "$SVN_CLIENT_DIFF" = ""; then
- AC_MSG_ERROR([not found
-
-Cannot find a diff in your PATH that supports the -u flag.
-We recommend GNU diff (version 2.7 or later).
-You can get it from ftp://ftp.gnu.org/pub/gnu/diffutils.
- ])
- fi
-AC_MSG_RESULT([$SVN_CLIENT_DIFF])
-AC_DEFINE_UNQUOTED(SVN_CLIENT_DIFF, "$SVN_CLIENT_DIFF",
- [Define to be the full path to diff])
-
-dnl Find a (non-broken) version of GNU diff3
-AC_MSG_CHECKING([for non-broken GNU diff3])
-SVN_CLIENT_DIFF3="`$SHELL ${abs_srcdir}/ac-helpers/gnu-diff3.sh ${abs_srcdir}/ac-helpers`"
-if test "$SVN_CLIENT_DIFF3" = ""; then
- AC_MSG_ERROR([not found
-
-Cannot find an unbroken GNU diff3 program in your PATH.
-Please make sure you have GNU diff (version 2.7 or later) installed.
-You can get it from ftp://ftp.gnu.org/pub/gnu/diffutils.
-
-(Note that FreeBSD uses a modified version of GNU diff that is unable
-to handle certain types of text files. Since diff3 uses GNU diff to do
-the actual diffing, this effectively breaks diff3 as well. If you are
-using FreeBSD, please install the /usr/ports/textproc/diffutils port.)
-])
-fi
-AC_MSG_RESULT([$SVN_CLIENT_DIFF3])
-AC_DEFINE_UNQUOTED(SVN_CLIENT_DIFF3, "$SVN_CLIENT_DIFF3",
- [Define to be the full path to your GNU diff3 program])
-
-dnl Determine whether diff3 supports the --diff-program arg.
-AC_MSG_CHECKING([whether diff3 supports --diff-program arg])
-$SVN_CLIENT_DIFF3 --diff-program=$SVN_CLIENT_DIFF ${0} ${0} ${0} > /dev/null 2>&1
-if test "$?" = "0"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(SVN_DIFF3_HAS_DIFF_PROGRAM_ARG, 1,
- [Defined if diff3 supports the --diff-program argument])
-else
- AC_MSG_RESULT([no])
-fi
-
-dnl Since this is used only on Unix-y systems, define the path separator as '/'
-AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
- [Defined to be the path separator used on your local filesystem])
-
-dnl Find a python 2.X binary, test cases will not run with Python 1.X
-AC_PATH_PROG(PYTHON2, python2, none)
-if test "$PYTHON2" = "none"; then
- AC_PATH_PROG(PYTHON, python, none)
-else
- PYTHON=$PYTHON2
-fi
-if test "$PYTHON" != "none"; then
- echo "checking for Python 2.0 or newer"
- ${PYTHON} ${abs_srcdir}/build/pycheck.py
-fi
-
-SVN_CHECK_JDK
-
-SVN_CHECK_SWIG
-
-dnl try to find the "makeinfo" program
-AC_PATH_PROG(MAKEINFO, makeinfo, [echo cannot run makeinfo])
-if test "$MAKEINFO" = "echo cannot run makeinfo"; then
- dnl we won't install/make any info pages then
- INSTALL_INFO=""
-else
- INSTALL_INFO='install-info'
-fi
-AC_SUBST(INSTALL_INFO)
-
-dnl decide whether we want to link against the RA libraries
-AC_ARG_ENABLE(dso,
-AC_HELP_STRING([--enable-dso], [Turn on DSO loading of RA libraries]),
-[
- if test "$enableval" = "yes"; then
- enable_dso=yes
- if test "$enable_shared" = "no"; then
- AC_MSG_ERROR([--enable-dso conflicts with --disable-shared])
- fi
- fi
-])
-
-if test "$enable_shared" = "no" -o "$enable_dso" != "yes"; then
- AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_DAV, 1,
- [Defined if libsvn_client should link against libsvn_ra_dav])
- svn_ra_lib_deps="\$(RA_DAV_DEPS)"
- svn_ra_lib_link="\$(RA_DAV_LINK)"
-
- AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
- [Defined if libsvn_client should link against libsvn_ra_svn])
- svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
- svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
-
- 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="\$(RA_LOCAL_DEPS) $svn_ra_lib_deps"
- ### We can't just append to SVN_RA_LIB_LINK because of the following
- ### scenario: user has neon and db3 in /usr/local, and db4 in
- ### /usr/local/BerkeleyDB.4.0. If libsvn_ra_dav.la comes before
- ### libsvn_fs.la then libtool ends up linking libsvn_fs to the db3 in
- ### /usr/local/lib
- svn_ra_lib_link="\$(RA_LOCAL_LINK) $svn_ra_lib_link"
- fi
- SVN_RA_LIB_DEPS=$svn_ra_lib_deps
- SVN_RA_LIB_LINK=$svn_ra_lib_link
-fi
-
-AC_SUBST(SVN_RA_LIB_DEPS)
-AC_SUBST(SVN_RA_LIB_LINK)
-
-
-dnl Pass some config data ----------------------------
-
-AC_SUBST(abs_builddir)
-AC_SUBST(abs_srcdir)
-
-dnl
-dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles
-dnl
-case "$host" in
-*bsdi*)
- # Check whether they've installed GNU make
- if make --version > /dev/null 2>&1; then
- INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
- else
- # BSDi make
- INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\""
- fi
- ;;
-*)
- INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
- ;;
-esac
-AC_SUBST(INCLUDE_OUTPUTS)
-
-dnl Final step: create the Makefile ----------------------------
-
-AC_CONFIG_FILES([Makefile svn-config])
-AC_CONFIG_COMMANDS([default], [chmod +x svn-config])
-AC_OUTPUT
-
-
-dnl Create all of the build directories
-
-if test "$abs_srcdir" != "$abs_builddir"; then
- make mkdir-init
-fi
-
-
-dnl Print warning messages about what we did and didn't configure at the
-dnl end, where people will actually see them.
-case "$svn_lib_berkeley_db" in
- "no" )
- db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH"
- AC_MSG_WARN([we have configured for a client-only build
-
-
-The Subversion filesystem library, part of the server, requires
-Berkeley DB version $db_version or newer, which you don't seem to have
-installed. We have created makefiles which will build the Subversion
-client code only, and skip the server. You can find latest version of
-Berkeley DB at http://www.sleepycat.com/. You can find the latest
-version of Berkeley DB here: http://www.sleepycat.com/download.html
-
-As an option, you may build Berkeley DB directly within the Subversion
-source tree. Download and extract the Berkeley distribution, then
-rename db-$db_version/ to db/ in the top level of the Subversion
-source tree.
-])
-;;
-esac
-
Index: configure.in.in
===================================================================
--- configure.in.in (working copy)
+++ configure.in.in (working copy)
@@ -0,0 +1,456 @@
+dnl Process this file with autoconf to produce a configure script.
+
+dnl Autoconfiscation for Subversion
+
+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)
+
+AC_INIT(subversion, @SUBVERSION_VERSION@, [http://subversion.tigris.org])
+
+dnl AC_CONFIG_SRCDIR is *required*; sanity-checks that our src dir exists.
+AC_CONFIG_SRCDIR(subversion/include/svn_types.h)
+AC_CONFIG_AUX_DIR(ac-helpers)
+
+abs_srcdir="`cd $srcdir && pwd`"
+abs_builddir="`pwd`"
+
+dnl ### should we ever bother with the system install?
+dnl use abs_srcdir. sometimes during installation, libtool will relink the
+dnl library. when it does this, it does a "cd", so a relative use of
+dnl install-sh will not work.
+INSTALL="$abs_srcdir/ac-helpers/install-sh -c"
+AC_SUBST(INSTALL)
+
+MKDIR="$INSTALL -d"
+AC_SUBST(MKDIR)
+
+dnl Grab our own macros
+sinclude(ac-helpers/berkeley-db.m4)
+sinclude(ac-helpers/svn-apache.m4)
+sinclude(ac-helpers/svn-macros.m4)
+sinclude(ac-helpers/neon.m4)
+sinclude(ac-helpers/find_apr.m4)
+sinclude(ac-helpers/apr.m4)
+sinclude(ac-helpers/find_apu.m4)
+sinclude(ac-helpers/aprutil.m4)
+sinclude(ac-helpers/java.m4)
+sinclude(ac-helpers/swig.m4)
+
+dnl Grab the libtool macros
+sinclude(ac-helpers/libtool.m4)
+
+dnl Generate config.nice early (before the args are munged)
+SVN_CONFIG_NICE(config.nice)
+
+dnl AC_CONFIG_HEADER causes `autoheader' to produce svn_private_config.h.in for us.
+dnl (We can add custom defines by creating ./acconfig.h if we wish.)
+AC_CONFIG_HEADER(svn_private_config.h)
+
+dnl Todo: we're English-only now, but GNU Gettext eventually?
+dnl Set of available languages.
+dnl ALL_LINGUAS="de fr es ko nl no pl pt sl sv"
+dnl I volunteer for this ^^ translation :-) -xbc
+
+dnl Sub-package configuration ---------------------
+
+dnl Possibly reconfigure packages in subdirectories
+AC_ARG_ENABLE(subdir-config,
+ AC_HELP_STRING([--disable-subdir-config],
+ [do not reconfigure packages in subdirectories]),
+ [
+ if test "$enableval" = "yes" ; then
+ do_subdir_config="yes"
+ fi
+ ],
+ [
+ do_subdir_config=yes
+ ])
+
+dnl the extra bits to include into our build process
+SVN_EXTRA_INCLUDES='-I$(top_srcdir)/subversion/include -I$(top_builddir)'
+SVN_EXTRA_LIBS=
+
+SVN_SUBDIRS=
+
+AC_SUBST(SVN_EXTRA_INCLUDES)
+AC_SUBST(SVN_EXTRA_LIBS)
+AC_SUBST(SVN_SUBDIRS)
+
+dnl Configure APR, and local Berkeley DB if any --------------------------
+
+dnl verify apr version and set apr flags
+changequote(<<, >>)
+APR_VER_REGEX="0\.9\.[2-9]"
+APU_VER_REGEX="0\.9\.[2-9]"
+changequote([, ])
+
+SVN_LIB_APR($APR_VER_REGEX)
+SVN_LIB_APRUTIL($APU_VER_REGEX)
+
+if test -d $abs_srcdir/db ; then
+ # Note: We have to configure and build a db subdirectory even if
+ # some other berkeley db is configured via --with-berkeley-db
+ ### why do we "have to" ?? -gjs
+ SVN_SUBDIR_CONFIG(db/dist)
+ SVN_SUBDIRS="$SVN_SUBDIRS db/dist"
+fi
+
+dnl Set include dir and module library lists for Makefiles -----------------
+
+dnl Expat
+APU_HAVE_OLD_EXPAT="`$apu_config --old-expat`"
+if test "$APU_HAVE_OLD_EXPAT" = "yes"; then
+ AC_DEFINE(SVN_HAVE_OLD_EXPAT, 1, [Defined if Expat 1.0 or 1.1 was found])
+fi
+
+dnl Check for programs ---------------------
+
+dnl Look for a C compiler
+AC_PROG_CC
+
+dnl See if 'ln -s' works
+AC_PROG_LN_S
+
+dnl Check for libtool -- we'll definitely need it for all our shared libs!
+echo "configuring libtool now"
+AC_PROG_LIBTOOL
+
+dnl Before configuring libtool check for --enable-all-static option
+AC_ARG_ENABLE(all-static,
+ AC_HELP_STRING([--enable-all-static],
+ [Build completely static (standalone) binaries.]),
+ [
+ if test "$enableval" = "yes" ; then
+ LT_LDFLAGS="-all-static $LT_LDFLAGS"
+ fi
+])
+
+AC_SUBST(LT_LDFLAGS)
+
+
+
+NEON_WANTED_REGEX="`sed -n '/NEON_WANTED_REGEX=/s/.*=//p' $srcdir/build/buildcheck.sh`"
+dnl You can skip the neon version check only if you know what you are doing
+AC_ARG_ENABLE(neon-version-check,
+ AC_HELP_STRING([--disable-neon-version-check],
+ [do not check the Neon version]),
+ [
+ if test "$enableval" = "no" ; then
+ NEON_WANTED_REGEX="*"
+ fi
+ ],
+ [])
+NEON_LATEST_WORKING_VER="`sed -n '/NEON_LATEST_WORKING_VER=/s/.*=//p' $srcdir/build/buildcheck.sh`"
+eval "`grep '^ *NEON_URL=' $srcdir/build/buildcheck.sh`"
+SVN_LIB_NEON($NEON_WANTED_REGEX, $NEON_LATEST_WORKING_VER, $NEON_URL)
+
+dnl find Apache with a recent-enough magic module number.
+SVN_FIND_APACHE(20020903)
+
+dnl Check for libraries --------------------
+
+dnl AC_CHECK_LIB() calls go here, if we ever need any
+
+# Build the filesystem library (and repository administration tool)
+# only if we have an appropriate version of Berkeley DB.
+SVN_FS_WANT_DB_MAJOR=4
+SVN_FS_WANT_DB_MINOR=0
+SVN_FS_WANT_DB_PATCH=14
+# Look for libdb4.so first:
+SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
+ $SVN_FS_WANT_DB_PATCH, [db4 db])
+
+
+# Only add *_APACHE_RULE if we also have db, since mod_dav_svn depends on it.
+INSTALL_STATIC_RULES="install-bin install-docs"
+INSTALL_RULES="install-base-lib install-lib install-include install-static"
+BUILD_RULES="base-lib lib bin test"
+if test "$svn_lib_berkeley_db" = "yes"; then
+ BUILD_RULES="base-lib fs-lib lib bin fs-bin $BUILD_APACHE_RULE test fs-test"
+ INSTALL_STATIC_RULES="install-bin install-fs-bin install-docs"
+ INSTALL_RULES="install-base-lib install-fs-lib install-lib install-include install-static $INSTALL_APACHE_RULE"
+ FS_TEST_DEPS="\$(FS_TEST_DEPS)"
+ FS_TEST_PROGRAMS="\$(FS_TEST_PROGRAMS)"
+fi
+
+AC_SUBST(BUILD_RULES)
+AC_SUBST(INSTALL_STATIC_RULES)
+AC_SUBST(INSTALL_RULES)
+AC_SUBST(FS_TEST_DEPS)
+AC_SUBST(FS_TEST_PROGRAMS)
+AC_SUBST(SVN_DB_INCLUDES)
+AC_SUBST(SVN_DB_LIBS)
+
+AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR,
+ [The desired major version for the Berkeley DB])
+AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR,
+ [The desired minor version for the Berkeley DB])
+AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH,
+ [The desired patch version for the Berkeley DB])
+
+dnl Check for header files ----------------
+
+dnl Standard C headers
+AC_HEADER_STDC
+
+dnl Check for typedefs, structures, and compiler characteristics ----------
+
+dnl if compiler doesn't understand `const', then define it empty
+AC_C_CONST
+
+dnl if non-existent, define size_t to be `unsigned'
+AC_TYPE_SIZE_T
+
+
+dnl Check for library functions ----------
+
+dnl libsvn_string uses memcmp()
+AC_FUNC_MEMCMP
+
+dnl svn_error's default warning handler uses vfprintf()
+AC_FUNC_VPRINTF
+
+
+dnl Process some configuration options ----------
+
+AC_ARG_ENABLE(debug,
+AC_HELP_STRING([--enable-debug],
+ [Turn on debugging and compile time warnings]),
+[
+ if test "$enableval" = "yes" ; then
+ enable_debugging="yes"
+ else
+ enable_debugging="no"
+ fi
+])
+
+MOD_ACTIVATION="-a"
+AC_ARG_ENABLE(mod-activation,
+AC_HELP_STRING([--disable-mod-activation],
+ [Do not enable mod_dav_svn in httpd.conf]),
+[
+ if test "$enableval" = "no" ; then
+ MOD_ACTIVATION=""
+ AC_MSG_NOTICE([Disabling apache module activation])
+ else
+ AC_MSG_NOTICE([Enabling apache module activation])
+ fi
+])
+AC_SUBST(MOD_ACTIVATION)
+
+
+AC_ARG_ENABLE(maintainer-mode,
+AC_HELP_STRING([--enable-maintainer-mode],
+ [Turn on debugging and very strict compile-time warnings]),
+[
+ if test "$enableval" = "yes" ; then
+ if test "$enable_debugging" = "no" ; then
+ AC_MSG_ERROR(Can't have --disable-debug and --enable-maintainer-mode)
+ fi
+ enable_debugging=yes
+ if test "$GCC" = "yes"; then
+ dnl SVN_DEBUG enables specific features for developer builds
+ dnl AP_DEBUG enables specific (Apache) features for developer builds
+ CFLAGS="$CFLAGS -Wpointer-arith -Wwrite-strings -Wshadow -DSVN_DEBUG -DAP_DEBUG";
+ fi
+ fi
+])
+
+
+if test "$enable_debugging" = "yes" ; then
+ dnl At the moment, we don't want optimization, because we're
+ dnl debugging.
+ dnl ### actually, debugging should be fine with the default -O2
+ changequote(,)
+ CFLAGS="`echo $CFLAGS' ' | sed -e 's/-O[^ ]* //g'`"
+ changequote([,])
+else
+ if test "$enable_debugging" = "no" ; then
+ changequote(,)
+ CFLAGS="`echo $CFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"
+ changequote([,])
+ fi
+fi
+
+dnl Find a diff that supports the "-u" flag
+AC_MSG_CHECKING([for diff])
+SVN_CLIENT_DIFF="`${abs_srcdir}/ac-helpers/check-diff.sh ${abs_srcdir}/ac-helpers`"
+if test "$SVN_CLIENT_DIFF" = ""; then
+ AC_MSG_ERROR([not found
+
+Cannot find a diff in your PATH that supports the -u flag.
+We recommend GNU diff (version 2.7 or later).
+You can get it from ftp://ftp.gnu.org/pub/gnu/diffutils.
+ ])
+ fi
+AC_MSG_RESULT([$SVN_CLIENT_DIFF])
+AC_DEFINE_UNQUOTED(SVN_CLIENT_DIFF, "$SVN_CLIENT_DIFF",
+ [Define to be the full path to diff])
+
+dnl Find a (non-broken) version of GNU diff3
+AC_MSG_CHECKING([for non-broken GNU diff3])
+SVN_CLIENT_DIFF3="`$SHELL ${abs_srcdir}/ac-helpers/gnu-diff3.sh ${abs_srcdir}/ac-helpers`"
+if test "$SVN_CLIENT_DIFF3" = ""; then
+ AC_MSG_ERROR([not found
+
+Cannot find an unbroken GNU diff3 program in your PATH.
+Please make sure you have GNU diff (version 2.7 or later) installed.
+You can get it from ftp://ftp.gnu.org/pub/gnu/diffutils.
+
+(Note that FreeBSD uses a modified version of GNU diff that is unable
+to handle certain types of text files. Since diff3 uses GNU diff to do
+the actual diffing, this effectively breaks diff3 as well. If you are
+using FreeBSD, please install the /usr/ports/textproc/diffutils port.)
+])
+fi
+AC_MSG_RESULT([$SVN_CLIENT_DIFF3])
+AC_DEFINE_UNQUOTED(SVN_CLIENT_DIFF3, "$SVN_CLIENT_DIFF3",
+ [Define to be the full path to your GNU diff3 program])
+
+dnl Determine whether diff3 supports the --diff-program arg.
+AC_MSG_CHECKING([whether diff3 supports --diff-program arg])
+$SVN_CLIENT_DIFF3 --diff-program=$SVN_CLIENT_DIFF ${0} ${0} ${0} > /dev/null 2>&1
+if test "$?" = "0"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(SVN_DIFF3_HAS_DIFF_PROGRAM_ARG, 1,
+ [Defined if diff3 supports the --diff-program argument])
+else
+ AC_MSG_RESULT([no])
+fi
+
+dnl Since this is used only on Unix-y systems, define the path separator as '/'
+AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
+ [Defined to be the path separator used on your local filesystem])
+
+dnl Find a python 2.X binary, test cases will not run with Python 1.X
+AC_PATH_PROG(PYTHON2, python2, none)
+if test "$PYTHON2" = "none"; then
+ AC_PATH_PROG(PYTHON, python, none)
+else
+ PYTHON=$PYTHON2
+fi
+if test "$PYTHON" != "none"; then
+ echo "checking for Python 2.0 or newer"
+ ${PYTHON} ${abs_srcdir}/build/pycheck.py
+fi
+
+SVN_CHECK_JDK
+
+SVN_CHECK_SWIG
+
+dnl try to find the "makeinfo" program
+AC_PATH_PROG(MAKEINFO, makeinfo, [echo cannot run makeinfo])
+if test "$MAKEINFO" = "echo cannot run makeinfo"; then
+ dnl we won't install/make any info pages then
+ INSTALL_INFO=""
+else
+ INSTALL_INFO='install-info'
+fi
+AC_SUBST(INSTALL_INFO)
+
+dnl decide whether we want to link against the RA libraries
+AC_ARG_ENABLE(dso,
+AC_HELP_STRING([--enable-dso], [Turn on DSO loading of RA libraries]),
+[
+ if test "$enableval" = "yes"; then
+ enable_dso=yes
+ if test "$enable_shared" = "no"; then
+ AC_MSG_ERROR([--enable-dso conflicts with --disable-shared])
+ fi
+ fi
+])
+
+if test "$enable_shared" = "no" -o "$enable_dso" != "yes"; then
+ AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_DAV, 1,
+ [Defined if libsvn_client should link against libsvn_ra_dav])
+ svn_ra_lib_deps="\$(RA_DAV_DEPS)"
+ svn_ra_lib_link="\$(RA_DAV_LINK)"
+
+ AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
+ [Defined if libsvn_client should link against libsvn_ra_svn])
+ svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
+ svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
+
+ 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="\$(RA_LOCAL_DEPS) $svn_ra_lib_deps"
+ ### We can't just append to SVN_RA_LIB_LINK because of the following
+ ### scenario: user has neon and db3 in /usr/local, and db4 in
+ ### /usr/local/BerkeleyDB.4.0. If libsvn_ra_dav.la comes before
+ ### libsvn_fs.la then libtool ends up linking libsvn_fs to the db3 in
+ ### /usr/local/lib
+ svn_ra_lib_link="\$(RA_LOCAL_LINK) $svn_ra_lib_link"
+ fi
+ SVN_RA_LIB_DEPS=$svn_ra_lib_deps
+ SVN_RA_LIB_LINK=$svn_ra_lib_link
+fi
+
+AC_SUBST(SVN_RA_LIB_DEPS)
+AC_SUBST(SVN_RA_LIB_LINK)
+
+
+dnl Pass some config data ----------------------------
+
+AC_SUBST(abs_builddir)
+AC_SUBST(abs_srcdir)
+
+dnl
+dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles
+dnl
+case "$host" in
+*bsdi*)
+ # Check whether they've installed GNU make
+ if make --version > /dev/null 2>&1; then
+ INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
+ else
+ # BSDi make
+ INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\""
+ fi
+ ;;
+*)
+ INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
+ ;;
+esac
+AC_SUBST(INCLUDE_OUTPUTS)
+
+dnl Final step: create the Makefile ----------------------------
+
+AC_CONFIG_FILES([Makefile svn-config])
+AC_CONFIG_COMMANDS([default], [chmod +x svn-config])
+AC_OUTPUT
+
+
+dnl Create all of the build directories
+
+if test "$abs_srcdir" != "$abs_builddir"; then
+ make mkdir-init
+fi
+
+
+dnl Print warning messages about what we did and didn't configure at the
+dnl end, where people will actually see them.
+case "$svn_lib_berkeley_db" in
+ "no" )
+ db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH"
+ AC_MSG_WARN([we have configured for a client-only build
+
+
+The Subversion filesystem library, part of the server, requires
+Berkeley DB version $db_version or newer, which you don't seem to have
+installed. We have created makefiles which will build the Subversion
+client code only, and skip the server. You can find latest version of
+Berkeley DB at http://www.sleepycat.com/. You can find the latest
+version of Berkeley DB here: http://www.sleepycat.com/download.html
+
+As an option, you may build Berkeley DB directly within the Subversion
+source tree. Download and extract the Berkeley distribution, then
+rename db-$db_version/ to db/ in the top level of the Subversion
+source tree.
+])
+;;
+esac
+
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 11 18:04:08 2002