#!/bin/bash

package=subversion
#version=-1.8.1
# Got newer version of subversion from https://archive.apache.org/dist/subversion/
version=-1.10.2

progname=$0

source ../cascade-make/lib/cascade-lib.bash GEXTSVN ../.. $*

prefix=$GEXTSVN_INSTALLED

export CFLAGS="-I$prefix/include $CFLAGS"
export CXXFLAGS="-I$prefix/include $CXXFLAGS"
export CPPFLAGS="-I$prefix/include $CPPFLAGS"
# Need to link with -lutf8proc after the -L$prefix/lib in order
# to compile subversion 1.10.x (which now needs utf8proc library
# unlike subversion 1.8.1). See UTF8PROC.sh
export LDFLAGS="-L$prefix/lib -lutf8proc $LDFLAGS"

opt_run_untar $force_untar $auto_untar $package $version
opt_run_configure $force_config $auto_config $package $version $prefix \
  --with-sqlite=$prefix \
  --with-serf=$prefix

opt_run_make $compile   $package $version
opt_run_make $install   $package $version "install"
opt_run_make $clean     $package $version "clean"
opt_run_make $distclean $package $version "distclean"

opt_run_tarclean $tarclean $package $version




