conference: notification of conference locked/unlocked
[siplcs.git] / configure.ac
blobdf5e1053b68538d785d4243c635f066db1fcdbac
1 # version of this package
2 m4_define(pidgin_sipe_version,  1.5.0)
4 # lower and upper-bound versions of Pidgin
5 m4_define(pidgin_version_max,           2.0.0)
7 AC_INIT([pidgin-sipe], [1.5.0])
9 AC_PREREQ([2.50])
10 AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar])
12 AC_DISABLE_STATIC
14 AC_PROG_CC
15 IT_PROG_INTLTOOL([0.35.0])
16 AC_PROG_LIBTOOL
17 AC_PROG_INSTALL
19 AC_HEADER_STDC
20 AC_CHECK_HEADER([zlib.h], 
21                 [], 
22                 [AC_MSG_ERROR([You must have zlib.h and zlib installed])])
26 GAIM_MIN=pidgin_version_min
27 GAIM_MAX=pidgin_version_max
28 AC_SUBST(PIDGIN_MIN)
29 AC_SUBST(PIDGIN_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
33 # pkgconfig path
34 PREFIX=$ac_default_prefix
35 if test "$prefix" != "NONE"; then
36    PREFIX=$prefix
39 PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$PREFIX/lib/pkgconfig"
40 export PKG_CONFIG_PATH
42 # debug mode
43 AC_ARG_ENABLE(debug,
44         [AS_HELP_STRING([--enable-debug],
45                         [compile with debugging support [default=no]])],
46         ,
47         enable_debug="no")
49 if test "$enable_debug" = yes; then
50    AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
53 DEBUG_CFLAGS="${DEBUG_CFLAGS}"
54 AC_SUBST(DEBUG_CFLAGS)
56 # quality check mode
57 # For people who are interested in finding bugs and not hiding them
58 AC_ARG_ENABLE(quality-check,
59         [AS_HELP_STRING([--enable-quality-check],
60                         [compile with compiler checks enabled [default=yes]])],
61         ,
62         enable_quality_check="yes")
64 if test "$enable_quality_check" = yes; then
65         QUALITY_CFLAGS="${QUALITY_CFLAGS} -Werror -Wall -Wextra -Wno-unused-parameter"
66 else
67         QUALITY_CFLAGS="${QUALITY_CFLAGS}"
69 AC_SUBST(QUALITY_CFLAGS)
71 AC_ARG_WITH(krb5, [AC_HELP_STRING([--with-krb5=PREFIX], [compile sipe plugin with Kerberos 5 support])], kerberos="$withval", kerberos="no")
73 dnl #######################################################################
74 dnl # Check for Kerberos
75 dnl #######################################################################
76 AC_SUBST(KRB5_CFLAGS)
77 AC_SUBST(KRB5_LDFLAGS)
78 AC_SUBST(KRB5_LIBS)
80 if test "$kerberos" != "no" ; then
81         if test "$kerberos" != "yes" ; then
82                 KRB5_CFLAGS="-I${kerberos}/include"
83                 KRB5_LDFLAGS="-L${kerberos}/lib"
84         fi
85         orig_LDFLAGS="$LDFLAGS"
86         LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
87         AC_CHECK_LIB(krb5, krb5_rd_req,
88                         [KRB5_LIBS="-lkrb5"],
89                         [AC_CHECK_LIB(krb5, krb5_rd_req,
90                                 [KRB5_LIBS="-lkrb5"],
91                                 [AC_ERROR(Kerberos 5 libraries not found)],
92                                 )],
93                         -lkrb5)
94         AC_CHECK_LIB(gssapi_krb5, gss_krb5_export_lucid_sec_context,
95                         [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
96                         [AC_CHECK_LIB(gssapi, gss_krb5_export_lucid_sec_context,
97                                 [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
98                                 [AC_ERROR(GSSAPI libraries not found)],
99                                 )],
100                         -lgssapi_krb5)
101         AC_DEFINE(USE_KERBEROS, 1, [Define if kerberos should be used in sipe.])
103 AM_CONDITIONAL(SIP_SEC_KRB5, test "$kerberos" != "no")
105 # Check for Purple
106 PKG_CHECK_MODULES(PURPLE,
107 [purple >= pidgin_version_max],
109         AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
112 AC_SUBST(PURPLE_CFLAGS)
113 AC_SUBST(PURPLE_LIBS)
115 dnl Check for com_err
116 PKG_CHECK_MODULES(COM_ERR, [com_err],,)
118 dnl Check for inet_aton
119 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
120                                          [AC_ERROR(inet_aton not found)])])
122 SIPE_LIBA=`$PKG_CONFIG sipe --variable=libarchive`
123 AC_SUBST(SIPE_LIBA)
125 AC_ARG_ENABLE(static-sipe,
126         [AS_HELP_STRING([--enable-static-sipe],
127                         [statically linked plugin [default=no]])],
128         ,
129         sipe_static="no")
131 AM_CONDITIONAL(SIPE_STATIC, test $sipe_static = yes)
133 AC_MSG_CHECKING([locale_CPPFLAGS])
134 LOCALE_CPPFLAGS='-DLOCALEDIR=\"$(prefix)/$(DATADIRNAME)/locale\"'
135 AC_SUBST([LOCALE_CPPFLAGS])
136 AC_MSG_RESULT([$LOCALE_CPPFLAGS])
138 dnl i18n
139 GETTEXT_PACKAGE=$PACKAGE
140 AC_SUBST(GETTEXT_PACKAGE)
141 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
142 AM_GLIB_GNU_GETTEXT
144 dnl codeset
145 AM_LANGINFO_CODESET
147 dnl substitutions and generated files
148 AC_CONFIG_FILES(
149         [src/config.h]
150         [Makefile 
151         pixmaps/Makefile 
152         m4macros/Makefile
153         po/Makefile.in
154         pixmaps/16/Makefile 
155         pixmaps/22/Makefile 
156         pixmaps/48/Makefile 
157         src/Makefile]
160 AC_OUTPUT()
163 echo
164 echo -n "Simple SIPE linking mode : "
165 if test "$sipe_static" = "yes" ; then
166    echo "static"
167    echo "Simple SIPE library...      : $SIPE_LIBA"
168 else
169    echo "dynamic"
172 if test "$kerberos" != "no" ; then
173   echo
174   echo "Compiling with kerberos 5 support"
175   echo "KRB5_LDFLAGS   : $KRB5_LDFLAGS"
176   echo "KRB5_CFLAGS    : $KRB5_CFLAGS"
177   echo "KRB5_LIBS      : $KRB5_LIBS"
180 if test "$enable_debug" != "no"; then
181   echo
182   echo "Compiling with debugging enabled"
183   echo "DEBUG_CFLAGS   : $DEBUG_CFLAGS"
186 if test -n "${QUALITY_CFLAGS}"; then
187   echo
188   echo "Compiling with compiler checks enabled"
189   echo "QUALITY_CFLAGS : $QUALITY_CFLAGS"
192 echo
193 echo configure complete, now run \`make\`
194 echo
196 # The End.