~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl ===================================================================
 
2
dnl   Licensed to the Apache Software Foundation (ASF) under one
 
3
dnl   or more contributor license agreements.  See the NOTICE file
 
4
dnl   distributed with this work for additional information
 
5
dnl   regarding copyright ownership.  The ASF licenses this file
 
6
dnl   to you under the Apache License, Version 2.0 (the
 
7
dnl   "License"); you may not use this file except in compliance
 
8
dnl   with the License.  You may obtain a copy of the License at
 
9
dnl
 
10
dnl     http://www.apache.org/licenses/LICENSE-2.0
 
11
dnl
 
12
dnl   Unless required by applicable law or agreed to in writing,
 
13
dnl   software distributed under the License is distributed on an
 
14
dnl   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
15
dnl   KIND, either express or implied.  See the License for the
 
16
dnl   specific language governing permissions and limitations
 
17
dnl   under the License.
 
18
dnl ===================================================================
1
19
dnl
2
20
dnl  SVN_LIB_KWALLET
3
21
dnl
15
33
  AC_MSG_CHECKING([whether to look for KWallet])
16
34
  if test "$svn_lib_kwallet" != "no"; then
17
35
    AC_MSG_RESULT([yes])
18
 
    if test "$enable_shared" = "yes"; then
 
36
    if test "$svn_enable_shared" = "yes"; then
19
37
      if test "$APR_HAS_DSO" = "yes"; then
20
38
        if test "$USE_NLS" = "yes"; then
21
39
          if test -n "$PKG_CONFIG"; then
25
43
                AC_MSG_RESULT([yes])
26
44
                if test "$svn_lib_kwallet" != "yes"; then
27
45
                  AC_MSG_CHECKING([for kde4-config])
28
 
                  kde4_config="$svn_lib_kwallet/bin/kde4-config"
29
 
                  if test -f "$kde4_config" && test -x "$kde4_config"; then
30
 
                    HAVE_KDE4_CONFIG="yes"
 
46
                  KDE4_CONFIG="$svn_lib_kwallet/bin/kde4-config"
 
47
                  if test -f "$KDE4_CONFIG" && test -x "$KDE4_CONFIG"; then
31
48
                    AC_MSG_RESULT([yes])
32
49
                  else
 
50
                    KDE4_CONFIG=""
33
51
                    AC_MSG_RESULT([no])
34
52
                  fi
35
53
                else
36
 
                  AC_CHECK_PROG(HAVE_KDE4_CONFIG, kde4-config, yes)
37
 
                  kde4_config="kde4-config"
 
54
                  AC_PATH_PROG(KDE4_CONFIG, kde4-config)
38
55
                fi
39
 
                if test "$HAVE_KDE4_CONFIG" = "yes"; then
 
56
                if test -n "$KDE4_CONFIG"; then
40
57
                  AC_MSG_CHECKING([for KWallet])
41
58
                  old_CXXFLAGS="$CXXFLAGS"
42
59
                  old_LDFLAGS="$LDFLAGS"
43
60
                  old_LIBS="$LIBS"
44
61
                  for d in [`$PKG_CONFIG --cflags QtCore QtDBus QtGui`]; do
45
 
                    if test -n ["`echo "$d" | $GREP -- '^-D[^[:space:]]*'`"]; then
 
62
                    if test -n ["`echo "$d" | $EGREP -- '^-D[^[:space:]]*'`"]; then
46
63
                      CPPFLAGS="$CPPFLAGS $d"
47
64
                    fi
48
65
                  done
49
66
                  qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
50
 
                  kde_dir="`$kde4_config --prefix`"
 
67
                  kde_dir="`$KDE4_CONFIG --prefix`"
51
68
                  SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include"
52
69
                  qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`"
53
70
                  SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options"
54
71
                  CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES"
55
72
                  LIBS="$LIBS $SVN_KWALLET_LIBS"
56
73
                  qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`"
57
 
                  LDFLAGS="$old_LDFLAGS $qt_lib_dirs -L$kde_dir/lib`$kde4_config --libsuffix`"
 
74
                  kde_lib_suffix="`$KDE4_CONFIG --libsuffix`"
 
75
                  LDFLAGS="$old_LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS($qt_lib_dirs -L$kde_dir/lib$kde_lib_suffix)`"
58
76
                  AC_LANG(C++)
59
 
                  AC_LINK_IFELSE([
 
77
                  AC_LINK_IFELSE([AC_LANG_SOURCE([[
60
78
#include <kwallet.h>
61
79
int main()
62
 
{KWallet::Wallet::walletList();}], svn_lib_kwallet="yes", svn_lib_kwallet="no")
 
80
{KWallet::Wallet::walletList();}]])], svn_lib_kwallet="yes", svn_lib_kwallet="no")
63
81
                  AC_LANG(C)
64
82
                  if test "$svn_lib_kwallet" = "yes"; then
65
83
                    AC_MSG_RESULT([yes])