Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/configure.ac  view on Meta::CPAN

fi
SVN_LT_SOVERSION="-version-info $svn_lib_ver"
AC_SUBST(SVN_LT_SOVERSION)
AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
                   [Subversion library major verson])

dnl Search for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config)

dnl Search for serf
SVN_LIB_SERF(1,2,1)

if test "$svn_lib_serf" = "yes"; then
  AC_DEFINE([SVN_HAVE_SERF], 1,
            [Defined if support for Serf is enabled])
fi

dnl Search for apr_memcache (only affects fs_fs)
SVN_LIB_APR_MEMCACHE

if test "$svn_lib_apr_memcache" = "yes"; then
  AC_DEFINE(SVN_HAVE_MEMCACHE, 1,
            [Defined if apr_memcache (standalone or in apr-util) is present])
fi


dnl Find Apache with a recent-enough magic module number
SVN_FIND_APACHE(20020903)

dnl Search for SQLite.  If you change SQLITE_URL from a .zip to
dnl something else also update build/ac-macros/sqlite.m4 to reflect
dnl the correct command to unpack the downloaded file.
SQLITE_MINIMUM_VER="3.7.12"
SQLITE_RECOMMENDED_VER="3.7.15.1"
SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"

SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},
               ${SQLITE_URL})

AC_ARG_ENABLE(sqlite-compatibility-version,
  AS_HELP_STRING([--enable-sqlite-compatibility-version=X.Y.Z],
                 [Allow binary to run against SQLite as old as ARG]),
  [sqlite_compat_ver=$enableval],[sqlite_compat_ver=no])

if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then
  SVN_SQLITE_VERNUM_PARSE([$sqlite_compat_ver],
                          [sqlite_compat_ver_num])
  CFLAGS="-DSVN_SQLITE_MIN_VERSION='\"$sqlite_compat_ver\"' $CFLAGS"
  CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS"
fi

SVN_CHECK_FOR_ATOMIC_BUILTINS

if test "$svn_cv_atomic_builtins" = "yes"; then
    AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
fi

dnl Set up a number of directories ---------------------

dnl Create SVN_BINDIR for proper substitution
if test "${bindir}" = '${exec_prefix}/bin'; then
        if test "${exec_prefix}" = "NONE"; then
                if test "${prefix}" = "NONE"; then
                        SVN_BINDIR="${ac_default_prefix}/bin"
                else
                        SVN_BINDIR="${prefix}/bin"
                fi
        else
                SVN_BINDIR="${exec_prefix}/bin"
        fi
else
        SVN_BINDIR="${bindir}"
fi

dnl fully evaluate this value. when we substitute it into our tool scripts,
dnl they will not have things such as ${bindir} available
SVN_BINDIR="`eval echo ${SVN_BINDIR}`"
AC_SUBST(SVN_BINDIR)

dnl provide ${bindir} in svn_private_config.h for use in compiled code
AC_DEFINE_UNQUOTED(SVN_BINDIR, "${SVN_BINDIR}",
        [Defined to be the path to the installed binaries])

dnl This purposely does *not* allow for multiple parallel installs.
dnl However, it is compatible with most gettext usages.
localedir='${datadir}/locale'
AC_SUBST(localedir)

dnl For SVN_LOCALE_DIR, we have to expand it to something.  See SVN_BINDIR.
if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then
  exp_localedir='${ac_default_prefix}/share/locale'
else
  exp_localedir=$localedir
fi
SVN_EXPAND_VAR(svn_localedir, "${exp_localedir}")
AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${svn_localedir}",
                   [Defined to be the path to the installed locale dirs])

dnl Check for libtool -- we'll definitely need it for all our shared libs!
AC_MSG_NOTICE([configuring libtool now])
ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
AC_ARG_ENABLE(experimental-libtool,
  AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]),
  [experimental_libtool=$enableval],[experimental_libtool=no])

if test "$experimental_libtool" = "yes"; then
  echo "using APR's libtool"
  sh_libtool="`$apr_config --apr-libtool`"
  LIBTOOL="$sh_libtool"
  SVN_LIBTOOL="$sh_libtool"
else
  sh_libtool="$abs_builddir/libtool"
  SVN_LIBTOOL="\$(SHELL) $sh_libtool"
fi
AC_SUBST(SVN_LIBTOOL)

dnl Determine the libtool version
changequote(, )dnl
lt_pversion=`$LIBTOOL --version 2>/dev/null|$SED -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
lt_version=`echo $lt_pversion|$SED -e 's/\([a-z]*\)$/.\1/'`
lt_major_version=`echo $lt_version | cut -d'.' -f 1`
changequote([, ])dnl

dnl set the default parameters
svn_enable_static=yes
svn_enable_shared=yes

dnl check for --enable-static option
AC_ARG_ENABLE(static,
  AS_HELP_STRING([--enable-static],
                 [Build static libraries]),
  [svn_enable_static="$enableval"], [svn_enable_static="yes"])

dnl check for --enable-shared option
AC_ARG_ENABLE(shared,
  AS_HELP_STRING([--enable-shared],
                 [Build shared libraries]),
  [svn_enable_shared="$enableval"], [svn_enable_shared="yes"])

if test "$svn_enable_static" = "yes" && test "$svn_enable_shared" = "yes" ; then

src/subversion/configure.ac  view on Meta::CPAN

          else
            with_gnome_keyring=no
          fi
        fi
      else
        if test "$with_gnome_keyring" = "yes"; then
          AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
        else
          with_gnome_keyring=no
        fi
      fi
    else
      if test "$with_gnome_keyring" = "yes"; then
        AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
      else
        with_gnome_keyring=no
      fi
    fi
  else
    if test "$with_gnome_keyring" = "yes"; then
      AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
    else
      with_gnome_keyring=no
    fi
  fi
else
  AC_MSG_RESULT([no])
fi
AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
AC_SUBST(SVN_GNOME_KEYRING_LIBS)


dnl Ev2 experimental features ----------------------
dnl Note: The Ev2 implementations will be built unconditionally, but by
dnl providing this flag, users can choose to use the currently-shimmed Ev2
dnl editor implementations for various operations.  This will probably
dnl negatively impact performance, but is useful for testing.
AC_ARG_ENABLE(ev2-impl,
  AS_HELP_STRING([--enable-ev2-impl],
                 [Use Ev2 implementations, where available [EXPERIMENTAL]]),
  [enable_ev2_impl=$enableval],[enable_ev2_impl=no])
if test "$enable_ev2_impl" = "yes"; then
  AC_DEFINE(ENABLE_EV2_IMPL, 1,
            [Define to 1 if Ev2 implementations should be used.])
fi


dnl I18n -------------------

AC_ARG_ENABLE(nls,
  AS_HELP_STRING([--disable-nls],[Disable gettext functionality]),
  [enable_nls=$enableval],[enable_nls=yes])

USE_NLS="no"
if test "$enable_nls" = "yes"; then
  dnl First, check to see if there is a working msgfmt.
  AC_PATH_PROG(MSGFMT, msgfmt, none)
  AC_PATH_PROG(MSGMERGE, msgmerge, none)
  AC_PATH_PROG(XGETTEXT, xgettext, none)
  if test "$MSGFMT" != "none"; then
    AC_SEARCH_LIBS(bindtextdomain, [intl], [],
                   [
                    enable_nls="no"
                   ])
    if test "$enable_nls" = "no"; then
      # Destroy the cached result so we can test again
      unset ac_cv_search_bindtextdomain
      # On some systems, libintl needs libiconv to link properly,
      # so try again with -liconv.
      AC_SEARCH_LIBS(bindtextdomain, [intl],
                     [
                      enable_nls="yes"
                      # This is here so that -liconv ends up in LIBS
                      # if it worked with -liconv.
                      AC_CHECK_LIB(iconv, libiconv_open)
                     ], 
                     [
                      AC_MSG_WARN([bindtextdomain() not found.  Disabling NLS.])
                      enable_nls="no"
                     ], -liconv)
    fi
    if test "$enable_nls" = "yes"; then
      AC_DEFINE(ENABLE_NLS, 1,
                [Define to 1 if translation of program messages to the user's
                 native language is requested.])
      USE_NLS="yes"
    fi
  fi
fi

AH_BOTTOM([
/* Indicate to translators that string X should be translated.  Do not look
   up the translation at run time; just expand to X.  This macro is suitable
   for use where a constant string is required at compile time. */
#define N_(x) x
/* Indicate to translators that we have decided the string X should not be
   translated.  Expand to X. */
#define U_(x) x
#ifdef ENABLE_NLS
#include <locale.h>
#include <libintl.h>
/* Indicate to translators that string X should be translated.  At run time,
   look up and return the translation of X. */
#define _(x) dgettext(PACKAGE_NAME, x)
/* Indicate to translators that strings X1 and X2 are singular and plural
   forms of the same message, and should be translated.  At run time, return
   an appropriate translation depending on the number N. */
#define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n)
#else
#define _(x) (x)
#define Q_(x1, x2, n) (((n) == 1) ? x1 : x2)
#define gettext(x) (x)
#define dgettext(domain, x) (x)
#endif
])

dnl Used to simulate makefile conditionals.
GETTEXT_CODESET=\#
NO_GETTEXT_CODESET=\#
if test $USE_NLS = "yes"; then
   AC_CHECK_FUNCS(bind_textdomain_codeset,
                  [ GETTEXT_CODESET="" ],
                  [ NO_GETTEXT_CODESET="" ])
fi
AC_SUBST(GETTEXT_CODESET)
AC_SUBST(NO_GETTEXT_CODESET)

# Check if we are using GNU gettext.
GNU_GETTEXT=no
MSGFMTFLAGS=''
if test $USE_NLS = "yes"; then
   AC_MSG_CHECKING(if we are using GNU gettext)
   if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then
      GNU_GETTEXT=yes
      MSGFMTFLAGS='-c'
   fi
   AC_MSG_RESULT($GNU_GETTEXT)
fi
AC_SUBST(MSGFMTFLAGS)

dnl libmagic -------------------

libmagic_found=no

AC_ARG_WITH(libmagic,AS_HELP_STRING([--with-libmagic=PREFIX],
                                [libmagic filetype detection library]),
[
  if test "$withval" = "yes" ; then
    AC_CHECK_HEADER(magic.h, [
      AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
    ])
    libmagic_prefix="the default locations"
  elif test "$withval" != "no"; then
    libmagic_prefix=$withval
    save_cppflags="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include"
    AC_CHECK_HEADERS(magic.h,[
      save_ldflags="$LDFLAGS"
      LDFLAGS="-L$libmagic_prefix/lib $LDFLAGS"
      AC_CHECK_LIB(magic, magic_open, [libmagic_found="yes"])
      LDFLAGS="$save_ldflags"
    ])
    CPPFLAGS="$save_cppflags"
  fi
  if test "$withval" != "no" && test "$libmagic_found" = "no"; then
    AC_MSG_ERROR([[--with-libmagic requested, but libmagic not found at $libmagic_prefix]])
  fi
],
[
  AC_CHECK_HEADER(magic.h, [
    AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
  ])
])

if test "$libmagic_found" != "no"; then
  AC_DEFINE([SVN_HAVE_LIBMAGIC], [1], [Defined if libmagic support is enabled])
  SVN_MAGIC_LIBS="-lmagic"
fi

if test "$libmagic_found" = "yes"; then
  SVN_MAGIC_INCLUDES="-I$libmagic_prefix/include"

src/subversion/configure.ac  view on Meta::CPAN

    else
      AC_MSG_NOTICE([Disabling apache module activation])
    fi
])
AC_SUBST(MOD_ACTIVATION)



AC_ARG_ENABLE(gcov,
AC_HELP_STRING([--enable-gcov],
               [Turn on gcov coverage testing (GCC only).]),
[
    if test "$enableval" = "yes" ; then
      dnl Probably other compilers support something similar;
      dnl feel free to extend this to include them.
      if test "$GCC" = "yes"; then
        if test "$svn_enable_shared" = "yes" ; then
          AC_MSG_ERROR([Can't have --enable-gcov without --disable-shared (we
                        recommend also using --enable-all-static).])
        fi
        if test ! "$enable_all_static" = "yes" ; then
          AC_MSG_WARN(We recommend --enable-all-static with --enable-gcov.)
        fi
        AC_MSG_NOTICE([Enabling gcov coverage testing.])
        CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
        CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
      else
        AC_MSG_ERROR([We only support --enable-gcov with GCC right now.])
      fi
    fi
])

AC_ARG_ENABLE(gprof,
AS_HELP_STRING([--enable-gprof],
               [Produce gprof profiling data in 'gmon.out' (GCC only).]),
[
    if test "$enableval" = "yes" ; then
      dnl Probably other compilers support -pg or something similar;
      dnl feel free to extend this to include them.
      if test "$GCC" = "yes"; then
        if test "$svn_enable_shared" = "yes" ; then
          AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we
                        recommend also using --enable-all-static).])
        fi
        if test ! "$enable_all_static" = "yes" ; then
          AC_MSG_WARN(We recommend --enable-all-static with --enable-gprof.)
        fi
        AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).])
        CFLAGS="$CFLAGS -pg"
        CXXFLAGS="$CXXFLAGS -pg"
        LT_LDFLAGS="$LT_LDFLAGS -pg"
      else
        AC_MSG_ERROR([We only support --enable-gprof with GCC right now.])
      fi
    fi
])


# Scripting and Bindings languages

# Python: Used for testsuite, and bindings


PYTHON="`$abs_srcdir/build/find_python.sh`"
if test -z "$PYTHON"; then
  AC_MSG_WARN([Python 2.5 or later is required to run the testsuite])
  AC_MSG_WARN([or to use the Subversion Python bindings])
  AC_MSG_WARN([])
  AC_MSG_WARN([If you have a suitable Python installed, but not on the])
  AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path])
  AC_MSG_WARN([to the Python executable, and re-run configure])
fi
AC_PATH_PROGS(PYTHON, "$PYTHON", none)

# The minimum version for the JVM runtime for our Java bytecode.
JAVA_OLDEST_WORKING_VER='1.5'
# SVN_CHECK_JDK sets $JAVA_CLASSPATH
SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)

AC_PATH_PROG(PERL, perl, none)

if test -n "$RUBY"; then
  AC_PATH_PROG(RUBY, "$RUBY", none)
else
  AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby18 ruby1.9 ruby1 ruby1.9.3 ruby193, none)
fi
if test "$RUBY" != "none"; then
  AC_MSG_CHECKING([rb_hash_foreach])
  if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' >/dev/null; then
    AC_MSG_RESULT([yes])
    if test -n "$RDOC"; then
      AC_PATH_PROG(RDOC, "$RDOC", none)
    else
      AC_PATH_PROGS(RDOC, rdoc rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 rdoc193, none)
    fi
    AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
    svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`"
    ])
    RUBY_MAJOR="$svn_cv_ruby_major"

    AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[
    svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`"
    ])
    RUBY_MINOR="$svn_cv_ruby_minor"

    AC_CACHE_CHECK([for Ruby teeny version], [svn_cv_ruby_teeny],[
    svn_cv_ruby_teeny="`$RUBY -rrbconfig -e 'major, minor, teeny = RUBY_VERSION.split("."); print teeny;'`"
    ])
    RUBY_TEENY="$svn_cv_ruby_teeny"
    
    AC_SUBST(RUBY_MAJOR)
    AC_SUBST(RUBY_MINOR)
    AC_SUBST(RUBY_TEENY)
    if test \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" -a "$RUBY_TEENY" -lt "3" \); then
      # Disallow Ruby between 1.8.7 and 1.9.3
      RUBY="none"
      AC_MSG_WARN([The detected Ruby is between 1.9 and 1.9.3])
      AC_MSG_WARN([Only 1.8.x and 1.9.3 releases are supported at this time])
    fi
  else
    AC_MSG_RESULT([no])
    RUBY="none"
    AC_MSG_WARN([The detected Ruby is too old for Subversion to use])
    AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the])
    AC_MSG_WARN([Subversion Ruby bindings])
    AC_MSG_WARN([Upgrade to the official 1.8.2 release, or later])
  fi
fi

SVN_CHECK_SWIG

SVN_CHECK_CTYPESGEN

dnl decide whether we want to link against the RA/FS libraries
AC_ARG_ENABLE(runtime-module-search,
AS_HELP_STRING([--enable-runtime-module-search],
               [Turn on dynamic loading of RA/FS libraries including
                third-party FS libraries]),
[
    if test "$enableval" = "yes"; then
      use_dso=yes
      if test "$svn_enable_shared" = "no"; then
        AC_MSG_ERROR([--enable-runtime-module-search conflicts with --disable-shared])
      fi
      AC_DEFINE(SVN_USE_DSO, 1,
                [Defined if svn should try to load DSOs])
    fi
])

if test "$svn_enable_shared" = "no" || test "$use_dso" != "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_install_deps="install-ramod-lib"
  svn_ra_lib_link="\$(RA_LOCAL_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_serf" = "yes"; then
    AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SERF, 1,
          [Defined if libsvn_client should link against libsvn_ra_serf])
    svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)"
    svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib"
    svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)"
  fi

  SVN_RA_LIB_DEPS=$svn_ra_lib_deps
  SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps
  SVN_RA_LIB_LINK=$svn_ra_lib_link

  AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_FS, 1,
      [Defined if libsvn_fs should link against libsvn_fs_fs])
  svn_fs_lib_deps="\$(FS_FS_DEPS)"
  svn_fs_lib_install_deps="install-fsmod-lib"
  svn_fs_lib_link="\$(FS_FS_LINK)"

  if test "$svn_lib_berkeley_db" = "yes"; then
  AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
      [Defined if libsvn_fs should link against libsvn_fs_base])
    svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)"
    svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib"
    svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)"
  fi

  SVN_FS_LIB_DEPS=$svn_fs_lib_deps
  SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps
  SVN_FS_LIB_LINK=$svn_fs_lib_link
fi

AC_SUBST(SVN_RA_LIB_DEPS)
AC_SUBST(SVN_RA_LIB_INSTALL_DEPS)
AC_SUBST(SVN_RA_LIB_LINK)
AC_SUBST(SVN_FS_LIB_DEPS)
AC_SUBST(SVN_FS_LIB_INSTALL_DEPS)
AC_SUBST(SVN_FS_LIB_LINK)

# ==== JavaHL ================================================================

dnl Possibly compile JavaHL
do_javahl_build=no
AC_ARG_ENABLE(javahl,
  AS_HELP_STRING([--enable-javahl],
             [Enable compilation of Java high-level bindings (requires C++)]),
  [ if test "$enableval" = "yes" ; then
        do_javahl_build="yes"
    fi
  ])

JAVAHL_OBJDIR=""
INSTALL_EXTRA_JAVAHL_LIB=""
FIX_JAVAHL_LIB=""
JAVAHL_TESTS_TARGET=""
JAVAHL_COMPAT_TESTS_TARGET=""
LT_CXX_LIBADD=""
if test "$do_javahl_build" = "yes"; then
  dnl Check for suitable JDK
  if test "$JDK_SUITABLE" = "no"; then
    AC_MSG_ERROR([Cannot compile JavaHL without a suitable JDK. 
                  Please specify a suitable JDK using the --with-jdk option.])
  fi
  
  dnl The temporary directory where libtool compiles libsvnjavahl.
  JAVAHL_OBJDIR='$(libsvnjavahl_PATH)/.libs'
  
  os_arch=`uname`
  if test "$os_arch" = "Darwin"; then
    dnl On Darwin, JNI libs must be installed as .jnilib
    INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib'
    FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib"
  fi
  # This segment (and the rest of r10800) is very likely unnecessary
  # with libtool 1.5, which automatically adds libstdc++ as a
  # dependency to the C++ libraries it builds.  So at some future time
  # when autogen.sh requires libtool 1.5 or higher, we can get rid of
  # it.
  AC_MSG_CHECKING([for additional flags to link C++ libraries])
  if test "x$ac_compiler_gnu" = "xyes"; then
    LT_CXX_LIBADD="-lstdc++"
    AC_MSG_RESULT([$LT_CXX_LIBADD])
  else
    AC_MSG_RESULT([none needed])
  fi
fi
AC_SUBST(INSTALL_EXTRA_JAVAHL_LIB)
AC_SUBST(JAVAHL_OBJDIR)
AC_SUBST(FIX_JAVAHL_LIB)
AC_SUBST(LT_CXX_LIBADD)

AC_ARG_WITH(junit,
AS_HELP_STRING([--with-junit=PATH],
               [Specify a path to the junit JAR file.]),
[
    if test "$withval" != "no"; then
      if test -n "$JAVA_CLASSPATH"; then
        JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH"
      else
        JAVA_CLASSPATH="$withval"
      fi
      JAVAHL_TESTS_TARGET="javahl-tests"
      JAVAHL_COMPAT_TESTS_TARGET="javahl-compat-tests"
    fi
])
AC_SUBST(JAVA_CLASSPATH)
AC_SUBST(JAVAHL_TESTS_TARGET)
AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)

# ==== Miscellaneous bits ====================================================

# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
### I think we get this flag from APR, so the fix probably belongs there
if test "$CC" = "clang"; then
  SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ])
fi

# Need to strip '-no-cpp-precomp' from CPPFLAGS for SWIG as well.
SWIG_CPPFLAGS="$CPPFLAGS"
SVN_STRIP_FLAG(SWIG_CPPFLAGS, [-no-cpp-precomp ])
AC_SUBST([SWIG_CPPFLAGS])

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])

AC_DEFINE_UNQUOTED(SVN_NULL_DEVICE_NAME, "/dev/null",
        [Defined to be the null device for the system])

DEFAULT_FS_TYPE="fsfs"
AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE",
                   [The fs type to use by default])

DEFAULT_HTTP_LIBRARY="serf"
AC_DEFINE_UNQUOTED(DEFAULT_HTTP_LIBRARY, "$DEFAULT_HTTP_LIBRARY",
                   [The http library to use by default])

# BSD/OS (BSDi) needs to use a different include syntax in Makefile
INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
case "$host" in
  *bsdi*)
    # Check whether they've installed GNU make
    if ! make --version > /dev/null 2>&1; then 
      # BSDi make
      INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\""
    fi
    ;;
esac
AC_SUBST(INCLUDE_OUTPUTS)

# ==== Detection complete - output and run config.status =====================

AC_CONFIG_HEADERS(subversion/svn_private_config.h.tmp:subversion/svn_private_config.h.in)
AC_CONFIG_COMMANDS([svn_private_config.h.tmp],
                   [svn_cf=subversion/svn_private_config.h;
                    $SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" $svn_cf.tmp > $svn_cf.tmp.new
                    cmp -s $svn_cf.tmp.new $svn_cf || mv -f $svn_cf.tmp.new $svn_cf
                    rm -f $svn_cf.tmp.new $svn_cf.tmp],
                   [SED="$SED"
                    SVN_DB_HEADER="$SVN_DB_HEADER"])
AC_CONFIG_FILES([Makefile])

SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)
if test -e packages/solaris/pkginfo.in; then
  SVN_CONFIG_SCRIPT(packages/solaris/pkginfo)
fi
AC_SUBST(SVN_CONFIG_SCRIPT_FILES)

# Ensure that SWIG is checked after reconfiguration.
rm -f .swig_checked

dnl Provide ${host} for use in compiled code (for svn --version)
AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}",
                   [Defined to the config.guess name of the build system])

dnl Provide ${target} for use in compiled code (for user-agent string)
AC_DEFINE_UNQUOTED([SVN_BUILD_TARGET], "${target}",
                   [Defined to the config.guess name of the build target])

AC_OUTPUT

# ==== Print final messages to user ==========================================

dnl Configure is long - users tend to miss warnings printed during it.
dnl Hence, print a warnings about what we did and didn't configure at the 
dnl end, where people will actually see them.

if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then
  AC_MSG_WARN([We have configured without BDB filesystem support


Berkeley DB 6 was found, but not used.  Please re-run configure (see
./config.nice) with the '--enable-bdb6' flag to use it,
or explicitly specify '--disable-bdb6' or '--without-berkeley-db'
to silence this warning.

Please note that some versions of Berkeley DB 6+ are under the GNU Affero
General Public License, version 3:
https://oss.oracle.com/pipermail/bdb/2013-June/000056.html

The AGPL-3.0 licence may impose special requirements for making available
source code of server-side software.  The text of the licence is:
https://www.gnu.org/licenses/agpl-3.0.html
http://opensource.org/licenses/AGPL-3.0

The Berkeley DB backend to Subversion is deprecated; see
http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated

The Subversion developers have not tested Subversion with Berkeley DB 6 for
technical problems or bugs.
])
fi



( run in 1.731 second using v1.01-cache-2.11-cpan-2398b32b56e )