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
10
dnl http://www.apache.org/licenses/LICENSE-2.0
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 ===================================================================
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])
33
51
AC_MSG_RESULT([no])
36
AC_CHECK_PROG(HAVE_KDE4_CONFIG, kde4-config, yes)
37
kde4_config="kde4-config"
54
AC_PATH_PROG(KDE4_CONFIG, kde4-config)
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"
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"
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)`"
77
AC_LINK_IFELSE([AC_LANG_SOURCE([[
60
78
#include <kwallet.h>
62
{KWallet::Wallet::walletList();}], svn_lib_kwallet="yes", svn_lib_kwallet="no")
80
{KWallet::Wallet::walletList();}]])], svn_lib_kwallet="yes", svn_lib_kwallet="no")
64
82
if test "$svn_lib_kwallet" = "yes"; then
65
83
AC_MSG_RESULT([yes])