1 # version of this package
2 m4_define(pidgin_sipe_version, 1.4.1)
4 # lower and upper-bound versions of Pidgin
5 m4_define(pidgin_version_max, 2.0.0)
7 AC_INIT([pidgin-sipe], [1.4.1])
10 AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar])
15 IT_PROG_INTLTOOL([0.35.0])
20 AC_CHECK_HEADER([zlib.h],
22 [AC_MSG_ERROR([You must have zlib.h and zlib installed])])
26 GAIM_MIN=pidgin_version_min
27 GAIM_MAX=pidgin_version_max
31 # tell pkgconfig to look in the same prefix we're installing this to,
32 # as that's likely where gaim will be found if it's not in the default
34 PREFIX=$ac_default_prefix
35 if test "$prefix" != "NONE"; then
39 PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$PREFIX/lib/pkgconfig"
40 export PKG_CONFIG_PATH
44 [ --enable-debug compile with debugging support],,
47 if test "$enable_debug" = yes; then
48 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
51 AC_ARG_WITH(krb5, [AC_HELP_STRING([--with-krb5=PREFIX], [compile sipe plugin with Kerberos 5 support])], kerberos="$withval", kerberos="no")
53 dnl #######################################################################
54 dnl # Check for Kerberos
55 dnl #######################################################################
57 AC_SUBST(KRB5_LDFLAGS)
60 if test "$kerberos" != "no" ; then
61 if test "$kerberos" != "yes" ; then
62 KRB5_CFLAGS="-I${kerberos}/include"
63 KRB5_LDFLAGS="-L${kerberos}/lib"
64 AC_DEFINE(USE_KERBEROS, 1, [Define if kerberos should be used in sipe.])
66 orig_LDFLAGS="$LDFLAGS"
67 LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
68 AC_CHECK_LIB(krb5, krb5_rd_req,
70 [AC_CHECK_LIB(krb5, krb5_rd_req,
72 [AC_ERROR(Kerberos 5 libraries not found)],
75 AC_CHECK_LIB(gssapi_krb5, gss_krb5_export_lucid_sec_context,
76 [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
77 [AC_CHECK_LIB(gssapi, gss_krb5_export_lucid_sec_context,
78 [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
79 [AC_ERROR(GSSAPI libraries not found)],
86 PKG_CHECK_MODULES(PURPLE,
87 [purple >= pidgin_version_max],
89 AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
92 AC_SUBST(PURPLE_CFLAGS)
96 PKG_CHECK_MODULES(COM_ERR, [com_err],,)
98 dnl Check for inet_aton
99 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
100 [AC_ERROR(inet_aton not found)])])
102 SIPE_LIBA=`$PKG_CONFIG sipe --variable=libarchive`
105 AC_ARG_ENABLE(static-sipe,
106 [ --enable-static-sipe statically link in Simple Exchange],
107 sipe_static="yes", sipe_static="no")
109 AM_CONDITIONAL(SIPE_STATIC, test $sipe_static = yes)
111 AC_MSG_CHECKING([locale_CPPFLAGS])
112 LOCALE_CPPFLAGS='-DLOCALEDIR=\"$(prefix)/$(DATADIRNAME)/locale\"'
113 AC_SUBST([LOCALE_CPPFLAGS])
114 AC_MSG_RESULT([$LOCALE_CPPFLAGS])
117 GETTEXT_PACKAGE=$PACKAGE
118 AC_SUBST(GETTEXT_PACKAGE)
119 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
125 dnl substitutions and generated files
142 echo -n "Simple SIPE linking mode... : "
143 if test "$sipe_static" = "yes" ; then
145 echo "Simple SIPE library... : $SIPE_LIBA"
150 if test "$kerberos" = "yes" ; then
152 echo "Compiled with kerberos 5 support"
153 echo "LDFLAGS :$KRB5_LDFLAGS"
154 echo "CFLAGS :$KRB5_CFLAGS"
155 echo "LIBS :$KRB5_LIBS"
159 echo configure complete, now run \`make\`