Set translation domain so translations actually used, improve the wording
[siplcs.git] / configure.ac
blob7e9c9eef5904b6a01f4c0c8e5c7118df04b9793a
1 # version of this package
2 m4_define(pidgin_sipe_version,  1.3.0)
4 # lower and upper-bound versions of Pidgin
5 m4_define(pidgin_version_max,           2.0.0)
7 AC_INIT([pidgin-sipe], [1.3.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
21 GAIM_MIN=pidgin_version_min
22 GAIM_MAX=pidgin_version_max
23 AC_SUBST(PIDGIN_MIN)
24 AC_SUBST(PIDGIN_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
28 # pkgconfig path
29 PREFIX=$ac_default_prefix
30 if test "$prefix" != "NONE"; then
31    PREFIX=$prefix
34 PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$PREFIX/lib/pkgconfig"
35 export PKG_CONFIG_PATH
37 # debug mode
38 AC_ARG_ENABLE(debug,
39         [  --enable-debug         compile with debugging support],,
40         enable_debug=no)
42 if test "$enable_debug" = yes; then
43    AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
46 AC_ARG_WITH(krb5, [AC_HELP_STRING([--with-krb5=PREFIX], [compile sipe plugin with Kerberos 5 support])], kerberos="$withval", kerberos="no")
48 dnl #######################################################################
49 dnl # Check for Kerberos
50 dnl #######################################################################
51 AC_SUBST(KRB5_CFLAGS)
52 AC_SUBST(KRB5_LDFLAGS)
53 AC_SUBST(KRB5_LIBS)
55 if test "$kerberos" != "no" ; then
56         if test "$kerberos" != "yes" ; then
57                 KRB5_CFLAGS="-I${kerberos}/include"
58                 KRB5_LDFLAGS="-L${kerberos}/lib"
59                 AC_DEFINE(USE_KERBEROS, 1, [Define if kerberos should be used in sipe.])
60         fi
61         orig_LDFLAGS="$LDFLAGS"
62         LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
63         AC_CHECK_LIB(krb5, krb5_rd_req,
64                         [KRB5_LIBS="-lkrb5"],
65                         [AC_CHECK_LIB(krb5, krb5_rd_req,
66                                 [KRB5_LIBS="-lkrb5"],
67                                 [AC_ERROR(Kerberos 5 libraries not found)],
68                                 )],
69                         -lkrb5)
70         AC_CHECK_LIB(gssapi_krb5, gss_krb5_export_lucid_sec_context,
71                         [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
72                         [AC_CHECK_LIB(gssapi, gss_krb5_export_lucid_sec_context,
73                                 [KRB5_LIBS="$KRB5_LIBS -lgssapi_krb5"],
74                                 [AC_ERROR(GSSAPI libraries not found)],
75                                 )],
76                         -lgssapi_krb5)
80 # Check for Pidgin
81 PKG_CHECK_MODULES(libpurple,
82 [pidgin >= pidgin_version_max],
84         AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
87 PIDGIN_CFLAGS=`$PKG_CONFIG --cflags purple`
88 PIDGIN_LIBS=`$PKG_CONFIG --libs purple`
90 AC_SUBST(PIDGIN_CFLAGS)
91 AC_SUBST(PIDGIN_LIBS)
93 dnl Check for inet_aton
94 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
95                                          [AC_ERROR(inet_aton not found)])])
97 SIPE_LIBA=`$PKG_CONFIG sipe --variable=libarchive`
98 AC_SUBST(SIPE_LIBA)
100 AC_ARG_ENABLE(static-sipe,
101         [  --enable-static-sipe  statically link in Simple Exchange],
102                 sipe_static="yes", sipe_static="no")
104 AM_CONDITIONAL(SIPE_STATIC, test $sipe_static = yes)
106 AC_MSG_CHECKING([locale_CPPFLAGS])
107 LOCALE_CPPFLAGS='-DLOCALEDIR=\"$(prefix)/$(DATADIRNAME)/locale\"'
108 AC_SUBST([LOCALE_CPPFLAGS])
109 AC_MSG_RESULT([$LOCALE_CPPFLAGS])
111 dnl i18n
112 GETTEXT_PACKAGE=$PACKAGE
113 AC_SUBST(GETTEXT_PACKAGE)
114 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
115 AM_GLIB_GNU_GETTEXT
117 dnl substitutions and generated files
118 AC_CONFIG_FILES(
119         [src/config.h]
120         [Makefile 
121         pixmaps/Makefile 
122         m4macros/Makefile
123         po/Makefile.in
124         pixmaps/16/Makefile 
125         pixmaps/22/Makefile 
126         pixmaps/48/Makefile 
127         src/Makefile]
130 AC_OUTPUT()
133 echo
134 echo -n "Simple SIPE linking mode... : "
135 if test "$sipe_static" = "yes" ; then
136    echo "static"
137    echo "Simple SIPE library...      : $SIPE_LIBA"
138 else
139    echo "dynamic"
142 if test "$kerberos" = "yes" ; then
143 echo
144 echo "Compiled with kerberos 5 support"
145 echo "LDFLAGS :$KRB5_LDFLAGS"
146 echo "CFLAGS  :$KRB5_CFLAGS"
147 echo "LIBS    :$KRB5_LIBS"
148 echo
150 echo
151 echo configure complete, now run \`make\`
152 echo
154 # The End.