summaryrefslogtreecommitdiffstats
path: root/configure.in.in
blob: 022726b91e0c7ca22705b921af57ee3141b52e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#MIN_CONFIG(3.0.0)

AM_INIT_AUTOMAKE(basket, '1.0.3.1')
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

KDE_CHECK_LARGEFILE

dnl -----------------------------------------------------------------
dnl AC_LIB_GPGME([ACTION-IF-TRUE], [ACTION-IF-FALSE])
dnl -----------------------------------------------------------------

OPTION="  --with-encryption=yes/no   compile with encryption support (gpgme)"

AC_DEFUN([AC_ENCRYPTION], [
  AH_TEMPLATE([HAVE_LIBGPGME], [Define if libgpgme is available])

  AC_ARG_WITH(encryption, [$OPTION], [
    if test "$withval" = "no"; then
      ac_gpg=
      $2
    elif test "$withval" = "yes"; then
      ac_gpg=yes
    else
      ac_gpg=yes
    fi
  ],[ac_gpg=yes])

  if test "$ac_gpg" != ""; then
    AM_PATH_GPGME(1.0.0, ac_libgpgme=yes, ac_libgpgme=no)
    AM_PATH_GPG_ERROR(1.0, ac_libgpgerror=yes, ac_libgpgerror=no)

    if test "$ac_libgpgme" != "no" -a "$ac_libgpgerror" != "no"; then
      AC_DEFINE([HAVE_LIBGPGME])
      ac_have_gpgme="yes"
      $1
    else
      :
      $2
    fi
  fi
  AM_CONDITIONAL(HAVE_LIBGPGME, test "$ac_have_gpgme" = "yes")
])

AC_ENCRYPTION([], [basket_warning_gpgme=yes])

KDE_CHECK_HEADER(kontact/core.h, [KONTACT_SUBDIR="yes"], [KONTACT_SUBDIR="no"])

if test "$KONTACT_SUBDIR" = "no"; then
	basket_warning_kontact=yes
	DO_NOT_COMPILE="$DO_NOT_COMPILE kontact_plugin"
fi