You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdenetwork/kopete/protocols/configure.in.in

244 lines
6.6 KiB

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
if test "x$with_external_libgadu" != xno; then
ac_save_LIBS="$LIBS"
ac_save_CFLAGS="$CFLAGS"
LIBS="$LIBGG_LIBS -lgadu $LIBPTHREAD"
CFLAGS="$CFLAGS $LIBGG_INCLUDES"
AC_MSG_CHECKING([libgadu version 1.5(rcX) with pthread support])
AC_TRY_RUN(
[
#include <libgadu.h>
#include <stdio.h>
#include <string.h>
int main()
{
#if defined __GG_LIBGADU_HAVE_PTHREAD && defined GG_LOGIN60
int maj, min, date;
sscanf( gg_libgadu_version(), "%u.%u.%u", &maj,&min,&date );
if ( maj != 1 ) {
return 1;
}
if ( ( min == 4 || min == 5 ) && date < 20040520 ) {
return 1;
}
if ( min == 5 || min == 6 ){
return 0;
}
#endif
return 1;
}
], [
LIBGG_LIBS="$LIBGG_LIBS -lgadu $LIBPTHREAD"
AC_MSG_RESULT([yes])
COMPILE_GADU=true
use_libgadu_copy=
], [
AC_MSG_RESULT([no])
])
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
if test "x$with_external_libgadu" != xcheck && test -z "$COMPILE_GADU"; then
AC_MSG_ERROR([--with-external-libgadu was given, but test for libgadu failed])
fi
fi
if test -z "$COMPILE_GADU"; then
AC_MSG_CHECKING([if supplied libgadu-copy can be used])
if test "$kde_use_threading" = "yes"; then
AC_MSG_RESULT([yes])
use_libgadu_copy=yes
COMPILE_GADU=true
else
AC_MSG_RESULT([no (no pthread), support for Gadu-Gadu will be disabled])
use_libgadu_copy=
COMPILE_GADU=
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")
if test "$use_libgadu_copy" = "yes"; then
AM_CONFIG_HEADER(kopete/protocols/gadu/libgadu/libgadu-config.h)
if test "$ac_cv_c_bigendian" = "yes"; then
AC_DEFINE_UNQUOTED([__GG_LIBGADU_BIGENDIAN], 1, [Define if big endian])
fi
KDE_CHECK_LONG_LONG()
if test "$kde_cv_c_long_long" = "yes"; then
AC_DEFINE_UNQUOTED([__GG_LIBGADU_HAVE_LONG_LONG], 1, [long long support])
fi
KDE_CHECK_SSL()
if test "$have_ssl" = "yes"; then
AC_DEFINE_UNQUOTED([__GG_LIBGADU_HAVE_OPENSSL], 1, [Define if SSL support is available])
fi
AC_MSG_CHECKING([for C99-compatible vsnprintf()])
AC_TRY_RUN(
[
#include <stdio.h>
int main()
{
char tmp;
return (snprintf(&tmp, sizeof(tmp), "test") != 4);
}
],[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([__GG_LIBGADU_HAVE_C99_VSNPRINTF], 1, [C99 vsnprintf() available])
], [
AC_MSG_RESULT([no])
])
AC_CHECK_FUNCS([va_copy],
[AC_DEFINE_UNQUOTED([__GG_LIBGADU_HAVE_VA_COPY], 1, [va_copy])],[])
AC_CHECK_FUNCS([_va_copy],
[AC_DEFINE_UNQUOTED([__GG_LIBGADU_HAVE__VA_COPY], 1, [__va_copy])],[])
fi
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 MSN webcam and 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
if test "x$have_glib" != "xyes"; then
compile_msn_webcam=no
msn_webcam_val=0
else
compile_msn_webcam=yes
msn_webcam_val=1
fi
AC_MSG_CHECKING([if MSN webcam support should be enabled])
AC_MSG_RESULT($compile_msn_webcam)
AC_DEFINE_UNQUOTED(MSN_WEBCAM, $msn_webcam_val, [Define if MSN webcam support can be enabled])
AM_CONDITIONAL(include_msn_webcam, test "x$compile_msn_webcam" = "xyes")
# 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