7 # Invoke ./config.local, if it exists
9 AC_DEFUN([AMANDA_CONFIG_LOCAL],
11 if test -f config.local; then
12 echo "running local script ./config.local"
23 # If the build is in a Subversion working copy, and if an svn client
24 # is available, then update common-src/svn-info.h to reflect the current
25 # revision and branch.
27 # If these things are not available, then the file is not updated, and
28 # any previous contents are used. If the file does not exist, it is
31 AC_DEFUN([AMANDA_GET_SVN_INFO],
33 AC_REQUIRE([AMANDA_INIT_PROGS])
34 AC_REQUIRE([AMANDA_PROG_GREP])
36 AC_PATH_PROG(SVN, svn,, $LOCSYSPATH)
37 AC_MSG_CHECKING([Subversion revision information])
38 if test -d $srcdir/.svn && test -n "$SVN" && (cd $srcdir > /dev/null ; $SVN info . ) > conftemp.svn; then
39 rev=`$GREP Revision: conftemp.svn|cut -d: -f 2|cut -c2-`
40 url=`$GREP URL: conftemp.svn|cut -d: -f 2-|cut -c2-`
41 ( echo '#define BUILT_REV "'$rev'"'
42 echo '#define BUILT_BRANCH "'`basename "$url"`'"'
43 ) > common-src/svn-info.h
45 AC_MSG_RESULT([updated])
47 # Makefiles will be upset if the file doesn't exist, so double-check
48 if test -f common-src/svn-info.h; then
50 AC_MSG_RESULT([not changed])
52 echo '/* no information available */' > common-src/svn-info.h
53 AC_MSG_RESULT([not available])