summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/configure.in.in
blob: 398ebfd0cc1305637e31367b75904744715c2c71 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
LIBGG_INCLUDES=""
LIBGG_LIBS=""
ac_libgadu_includes=""
ac_libgadu_libs=""

AC_ARG_WITH(external-libgadu,
  [AC_HELP_STRING(--with-external-libgadu,
    [use external libgadu library @<:@default=check@:>@])],
  [], with_external_libgadu=check)

AC_ARG_WITH(libgadu-includes,
	AC_HELP_STRING([--with-libgadu-includes=DIR], [where the libgadu includes are.]),
	[  ac_libgadu_includes="$withval" ])

if test "$ac_libgadu_includes" != "" ; then
LIBGG_INCLUDES="-I$ac_libgadu_includes"
fi

AC_ARG_WITH(libgadu-libs,
	AC_HELP_STRING([--with-libgadu-libs=DIR], [where the libgadu libraries are.]),
	[  ac_libgadu_libs="$withval" ])

if test "$ac_libgadu_libs" != "" ; then
	LIBGG_LIBS="-L$ac_libgadu_libs"
fi

dnl This may need a test still for compatibility
COMPILE_GADU=true
use_libgadu_copy=
if test "$with_external_libgadu" != "no" ; then
  # Check and setup for libgadu
  KDE_PKG_CHECK_MODULES(LIBGG, libgadu, [have_libgg=yes], [have_libgg=no])
  if test "x$have_libgg" = "xno"; then
    COMPILE_GADU=
    AC_MSG_RESULT([not found])
  else
    AC_MSG_RESULT([found])
  fi
fi

AC_SUBST(LIBGG_INCLUDES)
AC_SUBST(LIBGG_LIBS)
AC_SUBST(COMPILE_GADU)
AM_CONDITIONAL(include_gadu, test -n "$COMPILE_GADU")
AM_CONDITIONAL(include_libggcopy, test -n "$use_libgadu_copy")

KDE_PKG_CHECK_MODULES(IDN, libidn, have_libidn=yes, have_libidn=no)
if test x$have_libidn = xno; then
	AC_MSG_WARN([Libidn not found, Kopete Jabber plugin will not be compiled])
else
	AC_DEFINE(LIBIDN, 1, [Define to 1 if you want IDN support.])
fi
AC_SUBST(IDN_CFLAGS)
AC_SUBST(IDN_LIBS)

AC_MSG_CHECKING([if Libidn can be used])
AC_MSG_RESULT($have_libidn)

AM_CONDITIONAL(include_jabber, test "$have_libidn" = "yes")

# Sametime support

# lower and upper-bound versions of Meanwhile library
m4_define(libmeanwhile_version_min, 1.0.1)
m4_define(libmeanwhile_version_max, 1.1.0)

# Let the user disable the plugin
AC_ARG_ENABLE(meanwhile,
      AC_HELP_STRING([--disable-meanwhile],
      [disable the Kopete Meanwhile plugin (Lotus Sametime support) @<:@default=enabled@:>@]),
      )

if test "x$enable_meanwhile" != "xno"; then
    # Check and setup for libmeanwhile
    KDE_PKG_CHECK_MODULES(MEANWHILE,
        [meanwhile >= libmeanwhile_version_min meanwhile < libmeanwhile_version_max],
        [have_libmeanwhile=yes], [have_libmeanwhile=no])

    if test "x$have_libmeanwhile" = "xno"; then
        enable_meanwhile=no
        AC_MSG_RESULT([not found])
    else
        AC_MSG_RESULT([found])
    fi
fi

AC_SUBST(MEANWHILE_CFLAGS)
AC_SUBST(MEANWHILE_LIBS)

AC_MSG_CHECKING([if Meanwhile plugin should be compiled])
if test "x$enable_meanwhile" != "xno"; then
    AC_MSG_RESULT([yes])
else
    AC_MSG_RESULT([no])
fi

# Set the flag to compile meanwhile
AM_CONDITIONAL(include_meanwhile, [test "x$enable_meanwhile" != "xno"])

# testbed protocol
dnl define the configure option that disables testbed protocol
AC_ARG_ENABLE(testbed, [  --disable-testbed     disable kopete testbed protocol compilation ],  with_testbed=$enableval, with_testbed=yes)
AM_CONDITIONAL(include_testbed, test "$with_testbed" = "yes")

PKG_CHECK_MODULES(GLIB, glib-2.0 gmodule-2.0, have_glib=yes, have_glib=no)
if test x$have_glib = xno; then
	AC_MSG_WARN([GLib 2.0 is required for Jabber Jingle. You can get it from http://www.gtk.org/])
else
	AC_SUBST(GLIB_CFLAGS)
	AC_SUBST(GLIB_LIBS)
	AC_DEFINE(HAVE_GLIB, 1, [Glib is required for oRTP code and libmimic code])
fi

# Check for sms protocol
AC_ARG_ENABLE(smsgsm,
      AC_HELP_STRING([--disable-smsgsm], [disable the GSM SMS protocol]),
      [compile_smsgsm=$enableval],
      [compile_smsgsm=yes]
      )

AC_LANG_PUSH(C++)
ac_save_LIBS="$LIBS"
LIBS="-lgsmme $LIBS"
AC_TRY_LINK([#include <gsmlib/gsm_util.h>],[(void)gsmlib::latin1ToGsm("text");], 
	[have_smsgsm_lib=yes],
	[have_smsgsm_lib=no])
LIBS=$ac_save_LIBS

AC_CHECK_HEADER(gsmlib/gsm_util.h, 
	[have_smsgsm_inc=yes],
	[have_smsgsm_inc=no])

if test "x$have_smsgsm_lib" != "xyes" || test "x$have_smsgsm_inc" != "xyes"; then
    compile_smsgsm=no
fi
AC_LANG_POP(C++)

# Let the user know
AC_MSG_CHECKING([if SMSGSM Plugin should be compiled])
AC_MSG_RESULT($compile_smsgsm)

# Here we go
AM_CONDITIONAL(include_smsgsm, [test "x$compile_smsgsm" = "xyes"])

if test "x$compile_smsgsm" = "xyes"; then
	AC_DEFINE(INCLUDE_SMSGSM, 1, [Define to compile with GSM SMS support])
fi