Alien-SVN

 view release on metacpan or  search on metacpan

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

CPPFLAGS="$old_CPPFLAGS"


dnl D-Bus (required for support for KWallet) -------------------

if test -n "$PKG_CONFIG"; then
  AC_MSG_CHECKING([for D-Bus .pc file])
  if $PKG_CONFIG --exists dbus-1; then
    AC_MSG_RESULT([yes])
    old_CPPFLAGS="$CPPFLAGS"
    old_LIBS="$LIBS"
    DBUS_CPPFLAGS="`$PKG_CONFIG --cflags dbus-1`"
    AC_MSG_CHECKING([D-Bus version])
    DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1`"
    AC_MSG_RESULT([$DBUS_VERSION])
    # D-Bus 0.* requires DBUS_API_SUBJECT_TO_CHANGE
    if test -n ["`echo "$DBUS_VERSION" | $EGREP '^0\.[[:digit:]]+'`"]; then
      DBUS_CPPFLAGS="$DBUS_CPPFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
    fi
    DBUS_LIBS="`$PKG_CONFIG --libs dbus-1`"
    CPPFLAGS="$CPPFLAGS $DBUS_CPPFLAGS"
    LIBS="$LIBS $DBUS_LIBS"
    AC_MSG_CHECKING([for D-Bus])
    AC_LINK_IFELSE([AC_LANG_SOURCE([[
#include <dbus/dbus.h>
int main()
{dbus_bus_get(DBUS_BUS_SESSION, NULL);}]])], HAVE_DBUS="yes", HAVE_DBUS="no")
    if test "$HAVE_DBUS" = "yes"; then
      AC_MSG_RESULT([yes])
    else
      AC_MSG_RESULT([no])
    fi
    CPPFLAGS="$old_CPPFLAGS"
    LIBS="$old_LIBS"
  else
    AC_MSG_RESULT([no])
  fi
fi

dnl GPG Agent -------------------

AC_ARG_WITH(gpg_agent,
AS_HELP_STRING([--without-gpg-agent], 
               [Disable support for GPG-Agent]),
               [], [with_gpg_agent=yes])
AC_MSG_CHECKING([whether to support GPG-Agent])
if test "$with_gpg_agent" = "yes"; then
  AC_MSG_RESULT([yes])
  AC_DEFINE([SVN_HAVE_GPG_AGENT], [1], 
            [Is GPG Agent support enabled?])
else
  AC_MSG_RESULT([no])
fi

AC_SUBST(SVN_HAVE_GPG_AGENT)

dnl GNOME Keyring -------------------

AC_ARG_WITH(gnome_keyring,
  AS_HELP_STRING([--with-gnome-keyring], 
                 [Enable use of GNOME Keyring for auth credentials (enabled by default if found)]),
                 [with_gnome_keyring="$withval"],
                 [with_gnome_keyring=auto])

found_gnome_keyring=no
AC_MSG_CHECKING([whether to look for GNOME Keyring])
if test "$with_gnome_keyring" != "no"; then
  AC_MSG_RESULT([yes])
  if test "$svn_enable_shared" = "yes"; then
    if test "$APR_HAS_DSO" = "yes"; then
      if test -n "$PKG_CONFIG"; then
        AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
        if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
          AC_MSG_RESULT([yes])
          old_CPPFLAGS="$CPPFLAGS"
          SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
          CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
          AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
          AC_MSG_CHECKING([for GNOME Keyring])
          if test "$found_gnome_keyring" = "yes"; then
            AC_MSG_RESULT([yes])
            AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], 
                      [Is GNOME Keyring support enabled?])
            CPPFLAGS="$old_CPPFLAGS"
            SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
          else
            AC_MSG_RESULT([no])
            if test "$with_gnome_keyring" = "yes"; then
              AC_MSG_ERROR([cannot find GNOME Keyring])
            fi
          fi
        else
          AC_MSG_RESULT([no])
          if test "$with_gnome_keyring" = "yes"; then
            AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
          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



( run in 0.588 second using v1.01-cache-2.11-cpan-f6376fbd888 )