1 # version of this package
2 m4_define(pidgin_sipe_version, 1.6.0)
4 # lower and upper-bound versions of Pidgin
5 m4_define(pidgin_version_max, 2.0.0)
7 AC_INIT([pidgin-sipe], [1.6.0])
10 AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar])
15 IT_PROG_INTLTOOL([0.35.0])
21 GAIM_MIN=pidgin_version_min
22 GAIM_MAX=pidgin_version_max
26 # tell pkgconfig to look in the same prefix we're installing this to,
27 # as that's likely where gaim will be found if it's not in the default
29 PREFIX=$ac_default_prefix
30 if test "$prefix" != "NONE"; then
34 PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$PREFIX/lib/pkgconfig"
35 export PKG_CONFIG_PATH
39 [AS_HELP_STRING([--enable-debug],
40 [compile with debugging support [default=no]])],
44 if test "$enable_debug" = yes; then
45 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
48 DEBUG_CFLAGS="${DEBUG_CFLAGS}"
49 AC_SUBST(DEBUG_CFLAGS)
52 # For people who are interested in finding bugs and not hiding them
53 AC_ARG_ENABLE(quality-check,
54 [AS_HELP_STRING([--enable-quality-check],
55 [compile with compiler checks enabled [default=yes]])],
57 enable_quality_check="yes")
59 if test "$enable_quality_check" = yes; then
60 QUALITY_CFLAGS="${QUALITY_CFLAGS} -Werror -Wall -Wextra"
62 QUALITY_CFLAGS="${QUALITY_CFLAGS}"
64 AC_SUBST(QUALITY_CFLAGS)
66 AC_ARG_WITH(krb5, [AC_HELP_STRING([--with-krb5=PREFIX], [compile sipe plugin with Kerberos 5 support])], kerberos="$withval", kerberos="no")
68 dnl #######################################################################
69 dnl # Check for Kerberos
70 dnl #######################################################################
72 AC_SUBST(KRB5_LDFLAGS)
75 if test "$kerberos" != "no" ; then
76 if test "$kerberos" != "yes" ; then
77 KRB5_CFLAGS="-I${kerberos}/include"
78 KRB5_LDFLAGS="-L${kerberos}/lib"
80 orig_LDFLAGS="$LDFLAGS"
81 LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
82 AC_CHECK_LIB(krb5, krb5_rd_req,
84 [AC_CHECK_LIB(krb5, krb5_rd_req,
86 [AC_ERROR(Kerberos 5 libraries not found)],
89 AC_CHECK_LIB(gssapi_krb5, gss_krb5_export_lucid_sec_context,
90 [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
91 [AC_CHECK_LIB(gssapi, gss_krb5_export_lucid_sec_context,
92 [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
93 [AC_ERROR(GSSAPI libraries not found)],
96 AC_DEFINE(USE_KERBEROS, 1, [Define if kerberos should be used in sipe.])
98 AM_CONDITIONAL(SIP_SEC_KRB5, test "$kerberos" != "no")
101 PKG_CHECK_MODULES(PURPLE,
102 [purple >= pidgin_version_max],
104 AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
107 AC_SUBST(PURPLE_CFLAGS)
108 AC_SUBST(PURPLE_LIBS)
110 dnl Check for com_err
111 PKG_CHECK_MODULES(COM_ERR, [com_err],,)
113 dnl Check for inet_aton
114 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
115 [AC_ERROR(inet_aton not found)])])
117 SIPE_LIBA=`$PKG_CONFIG sipe --variable=libarchive`
120 AC_ARG_ENABLE(static-sipe,
121 [AS_HELP_STRING([--enable-static-sipe],
122 [statically linked plugin [default=no]])],
126 AM_CONDITIONAL(SIPE_STATIC, test $sipe_static = yes)
128 AC_MSG_CHECKING([locale_CPPFLAGS])
129 LOCALE_CPPFLAGS='-DLOCALEDIR=\"$(prefix)/$(DATADIRNAME)/locale\"'
130 AC_SUBST([LOCALE_CPPFLAGS])
131 AC_MSG_RESULT([$LOCALE_CPPFLAGS])
134 GETTEXT_PACKAGE=$PACKAGE
135 AC_SUBST(GETTEXT_PACKAGE)
136 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
142 dnl substitutions and generated files
159 echo -n "Simple SIPE linking mode : "
160 if test "$sipe_static" = "yes" ; then
162 echo "Simple SIPE library... : $SIPE_LIBA"
167 if test "$kerberos" != "no" ; then
169 echo "Compiling with kerberos 5 support"
170 echo "KRB5_LDFLAGS : $KRB5_LDFLAGS"
171 echo "KRB5_CFLAGS : $KRB5_CFLAGS"
172 echo "KRB5_LIBS : $KRB5_LIBS"
175 if test "$enable_debug" != "no"; then
177 echo "Compiling with debugging enabled"
178 echo "DEBUG_CFLAGS : $DEBUG_CFLAGS"
181 if test -n "${QUALITY_CFLAGS}"; then
183 echo "Compiling with compiler checks enabled"
184 echo "QUALITY_CFLAGS : $QUALITY_CFLAGS"
188 echo configure complete, now run \`make\`