~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to build/ac-macros/svn-macros.m4

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
])
47
47
 
48
48
 
49
 
# SVN_EXTERNAL_PROJECT_SETUP()
50
 
# Internal helper for SVN_EXTERNAL_PROJECT.
51
 
AC_DEFUN([SVN_EXTERNAL_PROJECT_SETUP], [
52
 
  do_subdir_config="yes"
53
 
  AC_ARG_ENABLE([subdir-config],
54
 
    AS_HELP_STRING([--disable-subdir-config],
55
 
                   [do not reconfigure packages in subdirectories]),
56
 
    [if test "$enableval" = "no"; then do_subdir_config="no"; fi])
57
 
  AC_SUBST([SVN_EXTERNAL_PROJECT_SUBDIRS], [""])
58
 
])
59
 
 
60
 
# SVN_EXTERNAL_PROJECT(SUBDIR [, ADDITIONAL-CONFIGURE-ARGS])
61
 
# Setup SUBDIR as an external project. This means:
62
 
# - Execute the configure script immediately at the point of macro invocation.
63
 
# - Add SUBDIR to the substitution variable SVN_EXTERNAL_PROJECT_SUBDIRS,
64
 
#   for the Makefile.in to arrange to execute make in the subdir.
65
 
#
66
 
# Derived from APR_SUBDIR_CONFIG
67
 
AC_DEFUN([SVN_EXTERNAL_PROJECT], [
68
 
  AC_REQUIRE([SVN_EXTERNAL_PROJECT_SETUP])
69
 
  SVN_EXTERNAL_PROJECT_SUBDIRS="$SVN_EXTERNAL_PROJECT_SUBDIRS $1"
70
 
  if test "$do_subdir_config" = "yes" ; then
71
 
    # save our work to this point; this allows the sub-package to use it
72
 
    AC_CACHE_SAVE
73
 
 
74
 
    AC_MSG_NOTICE([configuring package in $1 now])
75
 
    ac_popdir=`pwd`
76
 
    ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
77
 
    apr_config_subdirs="$1"
78
 
    test -d $1 || $MKDIR $1
79
 
    cd $1
80
 
 
81
 
    # A "../" for each directory in /$config_subdirs.
82
 
    ac_dots=[`echo $apr_config_subdirs| $SED -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`]
83
 
 
84
 
    # Make the cache file name correct relative to the subdirectory.
85
 
    case "$cache_file" in
86
 
    /*) ac_sub_cache_file=$cache_file ;;
87
 
    *) # Relative path.
88
 
      ac_sub_cache_file="$ac_dots$cache_file" ;;
89
 
    esac
90
 
 
91
 
    # The eval makes quoting arguments work.
92
 
    if eval $SHELL $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
93
 
    then :
94
 
      echo "$1 configured properly"
95
 
    else
96
 
      echo "configure failed for $1"
97
 
      exit 1
98
 
    fi
99
 
    cd $ac_popdir
100
 
 
101
 
    # grab any updates from the sub-package
102
 
    AC_CACHE_LOAD
103
 
  else
104
 
    AC_MSG_WARN([not running configure in $1])
105
 
  fi
106
 
])
107
 
 
108
49
dnl
109
50
dnl SVN_CONFIG_SCRIPT(path)
110
51
dnl
141
82
$1="${svn_cur}"
142
83
])
143
84
 
144
 
dnl SVN_MAYBE_ADD_TO_CFLAGS(option)
145
 
dnl
146
 
dnl Attempt to compile a trivial C program to test if the option passed
147
 
dnl is valid. If it is, then add it to CFLAGS. with the passed in option
148
 
dnl and see if it was successfully compiled.
149
 
dnl
150
 
dnl This macro is usually used for stricter syntax checking flags.
151
 
dnl Therefore we include certain headers which may in turn include system
152
 
dnl headers, as system headers on some platforms may fail strictness checks
153
 
dnl we wish to use on other platforms.
154
 
 
155
 
AC_DEFUN(SVN_MAYBE_ADD_TO_CFLAGS,
 
85
dnl SVN_STRIP_FLAG(FLAG_VAR_NAME, FLAG)
 
86
dnl
 
87
dnl Remove FLAG from the variable FLAG_VAR_NAME, if it exists.  This macro
 
88
dnl is primarily used for removing unwanted compiler flags, but is really
 
89
dnl just a general wrapper around `sed'.
 
90
AC_DEFUN(SVN_STRIP_FLAG,
156
91
[
157
 
  option="$1"
158
 
  svn_maybe_add_to_cflags_saved_flags="$CFLAGS"
159
 
  CFLAGS="$CFLAGS $option"
160
 
  AC_MSG_CHECKING([if $CC accepts $option])
161
 
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
162
 
    [[#include <apr_portable.h>]],
163
 
    [[]])],
164
 
    [svn_maybe_add_to_cflags_ok="yes"],
165
 
    [svn_maybe_add_to_cflags_ok="no"]
166
 
  )
167
 
  if test "$svn_maybe_add_to_cflags_ok" = "yes"; then
168
 
    AC_MSG_RESULT([yes, will use it])
169
 
  else
170
 
    AC_MSG_RESULT([no])
171
 
    CFLAGS="$svn_maybe_add_to_cflags_saved_flags"
172
 
  fi
 
92
  $1=`echo "$$1" | $SED -e 's/$2//'`
173
93
])
174
94
 
175
95
dnl SVN_REMOVE_STANDARD_LIB_DIRS(OPTIONS)
202
122
    printf "%s" "${output_flags# }"
203
123
  fi
204
124
])
 
125
 
 
126
AC_DEFUN([SVN_CHECK_FOR_ATOMIC_BUILTINS],
 
127
[
 
128
  AC_CACHE_CHECK([whether the compiler provides atomic builtins], [svn_cv_atomic_builtins],
 
129
  [AC_TRY_RUN([
 
130
  int main()
 
131
  {
 
132
      unsigned long long val = 1010, tmp, *mem = &val;
 
133
 
 
134
      if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020)
 
135
          return 1;
 
136
 
 
137
      tmp = val;
 
138
 
 
139
      if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010)
 
140
          return 1;
 
141
 
 
142
      if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0)
 
143
          return 1;
 
144
 
 
145
      tmp = 3030;
 
146
 
 
147
      if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp)
 
148
          return 1;
 
149
 
 
150
      if (__sync_lock_test_and_set(&val, 4040) != 3030)
 
151
          return 1;
 
152
 
 
153
      mem = &tmp;
 
154
 
 
155
      if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp)
 
156
          return 1;
 
157
 
 
158
      __sync_synchronize();
 
159
 
 
160
      if (mem != &val)
 
161
          return 1;
 
162
 
 
163
      return 0;
 
164
  }], [svn_cv_atomic_builtins=yes], [svn_cv_atomic_builtins=no], [svn_cv_atomic_builtins=no])])
 
165
])