Alien-SVN

 view release on metacpan or  search on metacpan

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

dnl     distributed with this work for additional information
dnl     regarding copyright ownership.  The ASF licenses this file
dnl     to you under the Apache License, Version 2.0 (the
dnl     "License"); you may not use this file except in compliance
dnl     with the License.  You may obtain a copy of the License at
dnl    
dnl       http://www.apache.org/licenses/LICENSE-2.0
dnl    
dnl     Unless required by applicable law or agreed to in writing,
dnl     software distributed under the License is distributed on an
dnl     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
dnl     KIND, either express or implied.  See the License for the
dnl     specific language governing permissions and limitations
dnl     under the License.

dnl configure.ac: Autoconfiscation for Subversion
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)

dnl Get the version of Subversion, using m4's esyscmd() command to do this
dnl at m4-time, since AC_INIT() requires it then.
AC_INIT([subversion],
     [esyscmd(python build/getversion.py SVN subversion/include/svn_version.h)],
     [http://subversion.apache.org/])

AC_CONFIG_SRCDIR(subversion/include/svn_types.h)
AC_CONFIG_AUX_DIR([build])

AC_MSG_NOTICE([Configuring Subversion ]AC_PACKAGE_VERSION)

AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"])
AC_SUBST([abs_builddir], ["`pwd`"])
if test "$abs_srcdir" = "$abs_builddir"; then
  canonicalized_srcdir=""
else
  canonicalized_srcdir="$srcdir/"
fi
AC_SUBST([canonicalized_srcdir])

SWIG_LDFLAGS="$LDFLAGS"
AC_SUBST([SWIG_LDFLAGS])

# Generate config.nice early (before the arguments are munged)
SVN_CONFIG_NICE(config.nice)

# ==== Check for programs ====================================================

# Look for a C compiler (before anything can set CFLAGS)
CMAINTAINERFLAGS="$CUSERFLAGS"
CUSERFLAGS="$CFLAGS"
AC_PROG_CC
SVN_CC_MODE_SETUP

# Look for a C++ compiler (before anything can set CXXFLAGS)
CXXMAINTAINERFLAGS="$CXXUSERFLAGS"
CXXUSERFLAGS="$CXXFLAGS"
AC_PROG_CXX
SVN_CXX_MODE_SETUP

# Look for a C pre-processor
AC_PROG_CPP

# Look for a good sed
# AC_PROG_SED was introduced in Autoconf 2.59b
m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [SED="${SED:-sed}"])

# Grab target_cpu, so we can use it in the Solaris pkginfo file
AC_CANONICAL_TARGET

# Look for an extended grep
AC_PROG_EGREP

AC_PROG_LN_S

AC_PROG_INSTALL
# If $INSTALL is relative path to our fallback install-sh, then convert
# to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool
# may try to use it from a changed working directory.
if test "$INSTALL" = "build/install-sh -c"; then
  INSTALL="$abs_srcdir/$INSTALL"
fi

if test -z "$MKDIR"; then
  MKDIR="$INSTALL -d"
fi
AC_SUBST([MKDIR])

# ==== Libraries, for which we may have source to build ======================

dnl verify apr version and set apr flags
dnl These regular expressions should not contain "\(" and "\)".
dnl The specific reason we require APR 0.9.7 is:
dnl   It contains fixes to its file writing routines
dnl   now generating errors instead of silently ignoring
dnl   them.  Only .7 and later can guarantee repository
dnl   integrity with FSFS.

APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]

SVN_LIB_APR($APR_VER_REGEXES)

if test `expr $apr_version : 2` -ne 0; then
  dnl Bump the library so-version to 2 if using APR-2
  dnl (Debian uses so-version 1 for APR-1-with-largefile)
  svn_lib_ver=2
  dnl APR-2 provides APRUTIL
  apu_config=$apr_config
  AC_SUBST(SVN_APRUTIL_INCLUDES)
  AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
  AC_SUBST(SVN_APRUTIL_LIBS)
else
  svn_lib_ver=0
  APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
  SVN_LIB_APRUTIL($APU_VER_REGEXES)
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])

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

  BUILD_RULES="$BUILD_RULES kwallet-lib"
  INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`"
  INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
fi

if test "$found_gnome_keyring" = "yes"; then
  BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
  INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
  INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
fi

if test "$USE_NLS" = "yes"; then
  BUILD_RULES="$BUILD_RULES locale"
  INSTALL_RULES="$INSTALL_RULES install-locale"
fi

AC_SUBST(BUILD_RULES)
AC_SUBST(INSTALL_STATIC_RULES)
AC_SUBST(INSTALL_RULES)
AC_SUBST(BDB_TEST_DEPS)
AC_SUBST(BDB_TEST_PROGRAMS)

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

AC_FUNC_MEMCMP

dnl svn_error's default warning handler uses vfprintf()
AC_FUNC_VPRINTF

dnl check for functions needed in special file handling
AC_CHECK_FUNCS(symlink readlink)

dnl check for uname
AC_CHECK_HEADERS(sys/utsname.h, [AC_CHECK_FUNCS(uname)], [])

dnl check for termios
AC_CHECK_HEADER(termios.h,[
  AC_CHECK_FUNCS(tcgetattr tcsetattr,[
    AC_DEFINE(HAVE_TERMIOS_H,1,[Defined if we have a usable termios library.])
  ])
])

dnl Process some configuration options ----------

AC_ARG_WITH(openssl,
AS_HELP_STRING([--with-openssl],
               [This option does NOT affect the Subversion build process in any
                way. It tells an integrated Serf HTTP client library build
                process where to locate the OpenSSL library when (and only when)
                building Serf as an integrated part of the Subversion build
                process. When linking to a previously installed version of Serf
                instead, you do not need to use this option.]),
[])

AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
               [Turn on debugging]),
[
    if test "$enableval" = "yes" ; then
      enable_debugging="yes"
    else
      enable_debugging="no"
    fi
],
[
    # Neither --enable-debug nor --disable-debug was passed.
    enable_debugging="maybe"
])

AC_ARG_ENABLE(optimize,
AS_HELP_STRING([--enable-optimize],
               [Turn on optimizations]),
[
    if test "$enableval" = "yes" ; then
      enable_optimization="yes"
    else
      enable_optimization="no"
    fi
],
[
    # Neither --enable-optimize nor --disable-optimize was passed.
    enable_optimization="maybe"
])

dnl Use -Wl,--no-undefined during linking of some libraries
AC_ARG_ENABLE(disallowing-of-undefined-references,
  [AS_HELP_STRING([--enable-disallowing-of-undefined-references],
                  [Use -Wl,--no-undefined flag during linking of some libraries to disallow undefined references])])
if test "$enable_disallowing_of_undefined_references" != "yes" && test "`uname`" != "Linux"; then
  enable_disallowing_of_undefined_references="no"
fi
if test "$enable_disallowing_of_undefined_references" != "no"; then
  AC_MSG_CHECKING([for -Wl,--no-undefined])
  old_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS -Wl,--no-undefined"
  AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){;}]])], [svn_wl_no_undefined="yes"], [svn_wl_no_undefined="no"])
  LDFLAGS="$old_LDFLAGS"
  if test "$svn_wl_no_undefined" = "yes"; then
    AC_MSG_RESULT([yes])
    for library_dir in "$abs_srcdir/subversion/libsvn_"*; do
      eval "`basename $library_dir`_LDFLAGS=-Wl,--no-undefined"
    done
  else
    AC_MSG_RESULT([no])
    if test "$enable_disallowing_of_undefined_references" = "yes"; then
      AC_MSG_ERROR([--enable-disallowing-of-undefined-references explicitly requested, but -Wl,--no-undefined not supported])
    fi
  fi
fi
AC_SUBST([libsvn_auth_gnome_keyring_LDFLAGS])
AC_SUBST([libsvn_auth_kwallet_LDFLAGS])



( run in 0.444 second using v1.01-cache-2.11-cpan-0bd6704ced7 )