~ubuntu-branches/ubuntu/raring/pidgin/raring

1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1
dnl Process this file with autoconf to produce a configure script.
2
AC_PREREQ([2.50])
3
4
# UPDATING VERSION NUMBERS FOR RELEASES
5
#
6
# purple_micro_version += 1
7
#
8
# If any functions have been added to libpurple, Pidgin, or Finch:
9
#   purple_micro_version = 0
10
#   purple_minor_version += 1
11
#   purple_lt_current += 1
12
#
13
# If backwards compatibility has been broken in libpurple, Pidgin, or Finch:
14
#   purple_micro_version = 0
15
#   purple_minor_version = 0
16
#   purple_major_version += 1;
17
#   purple_lt_current += 1
18
#
19
# purple_version_suffix should be similar to one of the following:
20
#   For beta releases:          [beta2]
21
#   For code under development: [devel]
22
#   For production releases:    []
23
#
24
#
25
# If any code has changed in libgnt:
26
#   gnt_micro_version += 1
27
#
28
# If any functions have been added to libgnt:
29
#   gnt_micro_version = 0
30
#   gnt_minor_version += 1
31
#   gnt_lt_current += 1
32
#
33
# If backwards compatibility has been broken in libgnt:
34
#   gnt_micro_version = 0
35
#   gnt_minor_version = 0
36
#   gnt_major_version += 1;
37
#   gnt_lt_current += 1
38
#
39
# gnt_version_suffix should be similar to one of the following:
40
#   For beta releases:          [beta2]
41
#   For code under development: [devel]
42
#   For production releases:    []
43
#
44
# Make sure to update finch/libgnt/configure.ac with libgnt version changes.
45
#
1.3.21 by Ari Pollak
Import upstream version 2.10.0
46
m4_define([purple_lt_current], [10])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
47
m4_define([purple_major_version], [2])
1.3.21 by Ari Pollak
Import upstream version 2.10.0
48
m4_define([purple_minor_version], [10])
84 by Ken VanDine
releasing version 1:2.10.3-0ubuntu1
49
m4_define([purple_micro_version], [3])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
50
m4_define([purple_version_suffix], [])
51
m4_define([purple_version],
52
          [purple_major_version.purple_minor_version.purple_micro_version])
53
m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
54
1.3.12 by Sebastien Bacher
Import upstream version 2.7.3
55
m4_define([gnt_lt_current], [8])
1.1.2 by Sebastien Bacher
Import upstream version 2.1.0
56
m4_define([gnt_major_version], [2])
1.3.12 by Sebastien Bacher
Import upstream version 2.7.3
57
m4_define([gnt_minor_version], [8])
1.3.20 by Ari Pollak
Import upstream version 2.9.0
58
m4_define([gnt_micro_version], [9])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
59
m4_define([gnt_version_suffix], [])
60
m4_define([gnt_version],
61
          [gnt_major_version.gnt_minor_version.gnt_micro_version])
62
m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
63
64
65
AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
66
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
67
if test `pwd | wc -w` -ne 1; then
68
	AC_MSG_ERROR([
69
You are attempting to build in a path that contains spaces.  This
70
will fail.  Relocate this source tree to a path that does not contain
71
spaces and run configure again.
72
])
73
fi
74
1.3.9 by Ari Pollak
Import upstream version 2.7.0
75
AC_CANONICAL_HOST
76
AC_CONFIG_HEADERS([config.h])
1.1.15 by Nick Ellery
Import upstream version 2.5.3
77
AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2])
1.3.12 by Sebastien Bacher
Import upstream version 2.7.3
78
dnl TODO: Always use AM_SILENT_RULES when we depend on automake >= 1.11
79
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
80
81
PURPLE_MAJOR_VERSION=purple_major_version
82
PURPLE_MINOR_VERSION=purple_minor_version
83
PURPLE_MICRO_VERSION=purple_micro_version
84
PURPLE_VERSION=[purple_display_version]
85
AC_SUBST(PURPLE_MAJOR_VERSION)
86
AC_SUBST(PURPLE_MINOR_VERSION)
87
AC_SUBST(PURPLE_MICRO_VERSION)
88
AC_SUBST(PURPLE_VERSION)
89
90
PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
91
AC_SUBST(PURPLE_LT_VERSION_INFO)
92
93
GNT_MAJOR_VERSION=gnt_major_version
94
GNT_MINOR_VERSION=gnt_minor_version
95
GNT_MICRO_VERSION=gnt_micro_version
96
GNT_VERSION=[gnt_display_version]
97
AC_SUBST(GNT_MAJOR_VERSION)
98
AC_SUBST(GNT_MINOR_VERSION)
99
AC_SUBST(GNT_MICRO_VERSION)
100
AC_SUBST(GNT_VERSION)
101
102
GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
103
AC_SUBST(GNT_LT_VERSION_INFO)
104
105
AC_PATH_PROG(sedpath, sed)
106
107
dnl Storing configure arguments
108
AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
109
110
dnl Checks for programs.
111
AC_PROG_CC
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
112
AM_PROG_CC_C_O
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
113
AC_DISABLE_STATIC
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
114
AC_PROG_LIBTOOL
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
115
LIBTOOL="$LIBTOOL --silent"
116
AC_PROG_INSTALL
117
PKG_PROG_PKG_CONFIG
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
118
AC_FUNC_ALLOCA
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
119
1.3.10 by Ari Pollak
Import upstream version 2.7.1
120
dnl Check for Sun compiler
121
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
122
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
123
dnl Checks for header files.
124
AC_HEADER_STDC
125
AC_HEADER_SYS_WAIT
126
AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
127
128
dnl Checks for typedefs, structures, and compiler characteristics.
129
AC_C_CONST
130
AC_STRUCT_TM
131
AC_CHECK_SIZEOF(time_t, ,[
132
#include <stdio.h>
133
#include <time.h>])
134
135
AC_C_BIGENDIAN
136
137
dnl Checks for library functions.
138
AC_TYPE_SIGNAL
139
AC_FUNC_STRFTIME
140
AC_CHECK_FUNCS(strdup strstr atexit setlocale)
141
dnl Checks for getopt in standard library
142
AC_CHECK_FUNCS(getopt_long,,
143
[
144
	AC_LIBOBJ(getopt)
145
	AC_LIBOBJ(getopt1)
146
])
147
148
dnl Check for inet_aton
149
AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
1.3.9 by Ari Pollak
Import upstream version 2.7.0
150
				         [AC_MSG_ERROR([inet_aton not found])])])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
151
AC_CHECK_LIB(resolv, __res_query)
152
AC_CHECK_LIB(nsl, gethostent)
153
AC_CHECK_FUNC(socket, ,
1.3.9 by Ari Pollak
Import upstream version 2.7.0
154
	[AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
155
dnl If all goes well, by this point the previous two checks will have
156
dnl pulled in -lsocket and -lnsl if we need them.
157
AC_CHECK_FUNC(getaddrinfo,
158
	[AC_DEFINE([HAVE_GETADDRINFO], [1],
159
		[Define to 1 if you have the getaddrinfo function.])],
160
	[AC_CHECK_LIB(socket, getaddrinfo,
161
		[AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
162
AC_CHECK_FUNCS(inet_ntop)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
163
AC_CHECK_FUNCS(getifaddrs)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
164
dnl Check for socklen_t (in Unix98)
165
AC_MSG_CHECKING(for socklen_t)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
166
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
167
	#include <sys/types.h>
168
	#include <sys/socket.h>
169
	socklen_t x;
1.3.9 by Ari Pollak
Import upstream version 2.7.0
170
]], [[]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
171
	AC_MSG_RESULT(yes)
172
], [
1.3.9 by Ari Pollak
Import upstream version 2.7.0
173
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
174
		#include <sys/types.h>
175
		#include <sys/socket.h>
176
		int accept(int, struct sockaddr *, size_t *);
1.3.9 by Ari Pollak
Import upstream version 2.7.0
177
	]], [[]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
178
		AC_MSG_RESULT(size_t)
179
		AC_DEFINE(socklen_t, size_t, [socklen_t size])
180
	], [
181
		AC_MSG_RESULT(int)
182
		AC_DEFINE(socklen_t, int, [socklen_t size])
183
	])
184
])
185
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
186
dnl Some systems do not have sa_len field for struct sockaddr.
187
AC_CHECK_MEMBER([struct sockaddr.sa_len],
188
	[AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
189
	[Define if struct sockaddr has an sa_len member])],[:],
190
	[#include <sys/socket.h>])
191
1.3.9 by Ari Pollak
Import upstream version 2.7.0
192
dnl Check for v6-only sockets
193
AC_CHECK_DECL([IPV6_V6ONLY],
194
	[AC_DEFINE([HAVE_IPV6_V6ONLY],[1],
195
	[Define if the IPV6_V6ONLY setsockopt option exists])],
196
	[], [#include <netinet/in.h>])
197
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
198
dnl to prevent the g_stat()/g_unlink() crash,
199
dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
200
AC_SYS_LARGEFILE
201
202
dnl FreeBSD doesn't have libdl, dlopen is provided by libc
203
AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
204
1.3.23 by Ari Pollak
Import upstream version 2.10.2
205
dnl Haiku does not use libm for the math functions, they are part
206
dnl of the C library
207
AC_SEARCH_LIBS([ceil], [m], [], [
208
  AC_MSG_ERROR([unable to find the floor() function])
209
])
210
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
211
AC_MSG_CHECKING(for fileno())
1.3.9 by Ari Pollak
Import upstream version 2.7.0
212
AC_RUN_IFELSE([AC_LANG_SOURCE([[
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
213
#include <stdio.h>
214
215
int main(int argc, char *argv[])
216
{
217
	int fd;
218
219
	fd = fileno(stdout);
220
221
	return !(fd > 0);
222
}
1.3.9 by Ari Pollak
Import upstream version 2.7.0
223
]])], [
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
224
	AC_MSG_RESULT(yes)
225
	AC_DEFINE([HAVE_FILENO], [1],
226
	          [Define to 1 if your stdio has int fileno(FILE *).])
227
], [
228
	AC_MSG_RESULT(no)
229
], [
230
	# Fallback for Cross Compiling...
231
	# This will enable the compatibility code.
232
	AC_MSG_RESULT(no)
233
])
234
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
235
AC_MSG_CHECKING(for the %z format string in strftime())
1.3.9 by Ari Pollak
Import upstream version 2.7.0
236
AC_RUN_IFELSE([AC_LANG_SOURCE([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
237
#ifdef HAVE_SYS_TIME_H
238
#include <sys/time.h>
239
#endif
240
#include <time.h>
241
#include <stdio.h>
242
243
int main()
244
{
245
	char buf[6];
246
	time_t t = time(NULL);
247
248
	if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
249
		return 1;
250
251
	fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
252
253
	return !((buf[0] == '-' || buf[0] == '+') &&
254
	         (buf[1] >= '0' && buf[1] <= '9') &&
255
	         (buf[2] >= '0' && buf[2] <= '9') &&
256
	         (buf[3] >= '0' && buf[3] <= '9') &&
257
	         (buf[4] >= '0' && buf[4] <= '9')
258
	        );
259
}
1.3.9 by Ari Pollak
Import upstream version 2.7.0
260
]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
261
	AC_MSG_RESULT(yes)
262
	AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
263
		[Define to 1 if you have a strftime() that supports the %z format string.])
264
], [
265
	AC_MSG_RESULT(no)
266
], [
267
	# Fallback for Cross Compiling...
268
	# This will enable the compatibility code.
269
	AC_MSG_RESULT(no)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
270
])
271
1.3.18 by Ari Pollak
Import upstream version 2.7.11
272
# before gettexting, in case iconv matters
273
case "$host_os" in
274
darwin*)
275
	AC_CHECK_LIB(resolv, res_query)
276
277
	AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
278
		AC_CHECK_HEADER(IOKit/IOKitLib.h, [
279
			AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
280
			LIBS="$LIBS -framework IOKit -framework CoreFoundation"
281
		], [])
282
	], [])
283
284
	AC_MSG_CHECKING([for fink])
285
	if test -d /sw; then
286
		AC_MSG_RESULT([found, adding /sw to search paths])
287
		CPPFLAGS="$CPPFLAGS -I/sw/include"
288
		LDFLAGS="$LDFLAGS -L/sw/lib"
289
	else
290
		AC_MSG_RESULT([not found])
291
	fi
292
	;;
293
*)
294
	;;
295
esac
296
1.3.9 by Ari Pollak
Import upstream version 2.7.0
297
dnl #######################################################################
298
dnl # Disable creation and installation of translation files
299
dnl #######################################################################
300
AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
301
302
if test x$enable_i18n = xyes; then
303
	AC_PROG_INTLTOOL
304
	GETTEXT_PACKAGE=pidgin
305
	AC_SUBST(GETTEXT_PACKAGE)
306
1.3.19 by Ari Pollak
Import upstream version 2.8.0
307
	ALL_LINGUAS="af am ar az be@latin bg bn bn_IN bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy id it ja ka km kn ko ku lo lt mai mhr mk mn mr ms_MY my_MM nb ne nl nn oc or pa pl pt_BR pt ps ro ru si sk sl sq sr sr@latin sv sw ta te th tr uk ur vi xh zh_CN zh_HK zh_TW"
1.3.9 by Ari Pollak
Import upstream version 2.7.0
308
	AM_GLIB_GNU_GETTEXT
309
310
	dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
311
	dnl AM_GLIB_GNU_GETTEXT found it.
312
313
	if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
314
	then
315
		AC_MSG_ERROR([
316
317
The msgfmt command is required to build libpurple.  If it is installed
318
on your system, ensure that it is in your path.  If it is not, install
319
GNU gettext to continue.
320
321
If you have msgfmt installed, but for some reason this error message
322
is still displayed, you have encountered what appears to be a bug in
323
third-party configure macros.  Try setting the MSGFMT environment
324
variable to the absolute path to your msgfmt binary and trying
325
configure again, like this:
326
327
MSGFMT=/path/to/msgfmt ./configure ...
328
	])
329
	fi
330
fi #enable_i18n
331
1.3.10 by Ari Pollak
Import upstream version 2.7.1
332
AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
333
1.3.9 by Ari Pollak
Import upstream version 2.7.0
334
dnl #######################################################################
1.3.19 by Ari Pollak
Import upstream version 2.8.0
335
dnl # Check for GLib 2.16 (required)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
336
dnl #######################################################################
1.3.19 by Ari Pollak
Import upstream version 2.8.0
337
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
338
	AC_MSG_RESULT(no)
339
	AC_MSG_ERROR([
340
1.3.19 by Ari Pollak
Import upstream version 2.8.0
341
You must have GLib 2.16.0 or newer development headers installed to build.
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
342
343
If you have these installed already you may need to install pkg-config so
344
I can find them.
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
345
])])
346
AC_SUBST(GLIB_CFLAGS)
347
AC_SUBST(GLIB_LIBS)
348
1.3.3 by Ari Pollak
Import upstream version 2.6.1
349
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
350
AC_SUBST(GLIB_GENMARSHAL)
351
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
352
AC_ARG_WITH([extraversion],
353
			AC_HELP_STRING([--with-extraversion=STRING],
354
						   [extra version number to be displayed in Help->About and --help (for packagers)]),
355
						   EXTRA_VERSION=$withval)
356
357
if test x"$EXTRA_VERSION" != "x" ; then
358
	AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
359
else
360
	AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
361
fi
362
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
363
AC_ARG_ENABLE(missing-dependencies, [AC_HELP_STRING([--disable-missing-dependencies],
364
		[skip missing dependencies instead of aborting configure])],
365
	force_deps="$enableval", force_deps="yes")
366
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
367
AC_ARG_WITH(x, [],
368
	with_x="$withval", with_x="yes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
369
AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
370
		[compile without GTK+ user interface])],
371
	enable_gtkui="$enableval", enable_gtkui="yes")
372
AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
373
		[compile without console user interface])],
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
374
	[enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
375
376
dnl #######################################################################
1.3.9 by Ari Pollak
Import upstream version 2.7.0
377
dnl # Check for GTK+ 2.10 and other things used by the GTK UI
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
378
dnl #######################################################################
379
AC_ARG_ENABLE(screensaver,
380
	[AC_HELP_STRING([--disable-screensaver],
381
		[compile without X screensaver extension (used to detect idleness)])],
382
	enable_screensaver="$enableval", enable_screensaver="yes")
383
AC_ARG_ENABLE(sm,
384
	[AC_HELP_STRING([--disable-sm],
385
		[compile without X session management support])],
386
	enable_sm="$enableval", enable_sm="yes")
387
AC_ARG_ENABLE(startup-notification,
388
	[AC_HELP_STRING([--disable-startup-notification],
389
		[compile without startup notification support])],
390
	enable_startup_notification="$enableval", enable_startup_notification="yes")
391
AC_ARG_ENABLE(gtkspell,
392
	[AC_HELP_STRING([--disable-gtkspell],
393
		[compile without GtkSpell automatic spell checking])],
394
	enable_gtkspell="$enableval", enable_gtkspell="yes")
395
AC_ARG_ENABLE(gevolution,
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
396
	[AC_HELP_STRING([--enable-gevolution],
397
		[compile with the Evolution plugin])],
398
	enable_gevolution="$enableval", enable_gevolution="no")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
399
AC_ARG_ENABLE(cap,
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
400
	[AC_HELP_STRING([--enable-cap],
401
		[compile with Contact Availability Prediction plugin])],
402
	enable_cap="$enableval", enable_cap="no")
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
403
AC_ARG_ENABLE(gestures,
404
	[AC_HELP_STRING([--disable-gestures],
405
		[compile without the gestures plugin])],
406
	enable_gestures="$enableval", enable_gestures="yes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
407
408
AC_PATH_XTRA
409
# We can't assume that $x_libraries will be set, because autoconf does not
410
# set it in the case when the X libraries are in a standard place.
411
# Ditto for $x_includes
412
if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
413
    x_libpath_add=
414
else
415
    x_libpath_add="-L$x_libraries"
416
fi
417
if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
418
    x_incpath_add=
419
else
420
    x_incpath_add="-I$x_includes"
421
fi
422
423
if test "x$enable_gtkui" = "xyes" ; then
69 by Micah Gersten
* Merge from Debian unstable (LP: #757146), remaining changes:
424
	PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0 launchpad-integration], , [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
425
		AC_MSG_RESULT(no)
426
		AC_MSG_ERROR([
427
1.3.9 by Ari Pollak
Import upstream version 2.7.0
428
You must have GTK+ 2.10.0 or newer development headers installed to compile
1.3.3 by Ari Pollak
Import upstream version 2.6.1
429
Pidgin.  If you want to build only Finch then specify --disable-gtkui when
430
running configure.
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
431
])])
432
433
	AC_SUBST(GTK_CFLAGS)
434
	AC_SUBST(GTK_LIBS)
435
436
	dnl We only really need Pango >= 1.4 for decent RTL support
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
437
	PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
438
			AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
439
440
	dnl #######################################################################
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
441
	dnl # Check if we should compile with X support
442
	dnl #######################################################################
443
	if test "x$with_x" = "xyes" ; then
444
		PKG_CHECK_MODULES(X11, x11,
1.1.5 by Sebastien Bacher
Import upstream version 2.2.1
445
			[AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
446
			[AC_MSG_RESULT(no)
1.1.5 by Sebastien Bacher
Import upstream version 2.2.1
447
				if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
448
					X11_LIBS="$x_libpath_add"
449
					X11_CFLAGS="$x_incpath_add"
450
				else
1.3.8 by Ari Pollak
Import upstream version 2.6.6
451
					with_x="no"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
452
					if test "x$force_deps" = "xyes" ; then
453
						AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
454
X11 development headers not found.
455
Use --without-x if you do not need X11 support.
456
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
457
					fi
1.1.5 by Sebastien Bacher
Import upstream version 2.2.1
458
				fi
459
			])
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
460
		AC_SUBST(X11_LIBS)
461
		AC_SUBST(X11_CFLAGS)
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
462
	else
463
		enable_screensaver=no
464
		enable_sm=no
465
		enable_gestures=no
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
466
	fi
1.1.5 by Sebastien Bacher
Import upstream version 2.2.1
467
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
468
	dnl #######################################################################
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
469
	dnl # Check for XScreenSaver
470
	dnl #######################################################################
471
	if test "x$enable_screensaver" = "xyes" ; then
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
472
		if test "x$with_x" = "xyes" ; then
473
			old_LIBS="$LIBS"
474
			LIBS="$LIBS $GTK_LIBS $x_libpath_add"
475
			XSS_LIBS=""
476
			XSS_HEADERS=""
477
			AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
478
			AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
479
			if test "x$XSS_LIBS" != "x"; then
480
				oldCPPFLAGS="$CPPFLAGS"
481
				CPPFLAGS="$CPPFLAGS $x_incpath_add"
1.3.9 by Ari Pollak
Import upstream version 2.7.0
482
				AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
483
					#include <X11/Xlib.h>
484
					#include <X11/extensions/scrnsaver.h>
1.3.9 by Ari Pollak
Import upstream version 2.7.0
485
					]], [[]])], [], [enable_screensaver=no])
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
486
				CPPFLAGS="$oldCPPFLAGS"
487
			else
488
				enable_screensaver=no
489
			fi
490
			LIBS="$old_LIBS"
491
492
			if test "x$enable_screensaver" = "xyes" ; then
493
				AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
494
				AC_SUBST(XSS_LIBS)
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
495
			else
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
496
				if test "x$force_deps" = "xyes" ; then
497
					AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
498
XScreenSaver extension development headers not found.
499
Use --disable-screensaver if you do not need XScreenSaver extension support,
500
this is required for detecting idle time by mouse and keyboard usage.
501
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
502
				fi
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
503
			fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
504
		else
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
505
			AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
506
		fi
507
	fi
508
509
	dnl #######################################################################
510
	dnl # Check for X session management libs
511
	dnl #######################################################################
512
	if test "x$enable_sm" = "xyes"; then
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
513
		if test "x$with_x" = "xyes" ; then
514
			enable_sm=no
515
			AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
516
			if test "x$found_sm_lib" = "xtrue"; then
517
				oldCPPFLAGS="$CPPFLAGS"
518
				CPPFLAGS="$CPPFLAGS $x_incpath_add"
519
				AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
520
				CPPFLAGS="$oldCPPFLAGS"
521
			fi
522
523
			if test "x$enable_sm" = "xyes"; then
524
				AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
525
				AC_SUBST(SM_LIBS)
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
526
			else
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
527
				if test "x$force_deps" = "xyes" ; then
528
					AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
529
X session management development headers not found.
530
Use --disable-sm if you do not need session management support.
531
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
532
				fi
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
533
			fi
534
		else
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
535
			AC_MSG_ERROR([X support is required to build with X session management support])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
536
		fi
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
537
	fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
538
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
539
	dnl #######################################################################
540
	dnl # Check for X11 to allow the gestures plugin
541
	dnl #######################################################################
542
	if test "x$enable_gestures" = "xyes"; then
543
		if test "x$with_x" = "xno" ; then
544
			enable_gestures=no
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
545
		fi
546
	fi
547
548
	dnl #######################################################################
549
	dnl # Check for GtkSpell
550
	dnl #######################################################################
551
	if test "x$enable_gtkspell" = "xyes" ; then
552
		PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
553
			AC_MSG_RESULT(no)
1.3.8 by Ari Pollak
Import upstream version 2.6.6
554
			enable_gtkspell="no"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
555
			if test "x$force_deps" = "xyes" ; then
556
				AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
557
GtkSpell development headers not found.
558
Use --disable-gtkspell if you do not need it.
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
559
])
560
			fi])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
561
		if test "x$enable_gtkspell" = "xyes" ; then
562
			AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
563
			AC_SUBST(GTKSPELL_CFLAGS)
564
			AC_SUBST(GTKSPELL_LIBS)
565
		fi
566
	fi
567
568
	dnl #######################################################################
569
	dnl # Check for stuff needed by the Evolution integration plugin.
570
	dnl #######################################################################
571
	if test "x$enable_gevolution" = "xyes"; then
572
		evo_deps="libebook-1.2 libedata-book-1.2"
573
		PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
574
			enable_gevolution="no"
575
		])
576
		if test "x$enable_gevolution" = "xno"; then
577
			evo_deps="libebook-1.0 libedata-book-1.0"
578
			PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
579
				enable_gevolution="yes"
580
			])
581
		fi
582
		if test "x$enable_gevolution" = "xyes"; then
583
			AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
584
			AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
585
			AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
586
		else
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
587
			if test "x$force_deps" = "xyes" ; then
588
				AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
589
Evolution development headers not found.
590
Use --disable-gevolution if you do not need it.
591
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
592
			fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
593
		fi
594
	fi
595
596
	dnl #######################################################################
597
	dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
598
	dnl #######################################################################
599
	if test "x$enable_cap" = "xyes"; then
600
		PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
601
			AC_MSG_RESULT(no)
1.3.8 by Ari Pollak
Import upstream version 2.6.6
602
			enable_cap="no"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
603
			if test "x$force_deps" = "xyes" ; then
604
				AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
605
sqlite3 development headers not found.
606
Use --disable-cap if you do not need the Contact Availability Prediction plugin.
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
607
])
608
			fi])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
609
	fi
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
610
        
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
611
612
else # GTK
613
	enable_cap=no
614
	enable_gevolution=no
615
	enable_gtkspell=no
616
	enable_screensaver=no
617
	enable_sm=no
618
	enable_startup_notification=no
619
fi	# GTK
620
621
AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
622
AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
623
AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
624
AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
625
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
626
627
dnl #######################################################################
628
dnl # Check for ncurses and other things used by the console UI
629
dnl #######################################################################
630
GNT_LIBS=""
631
GNT_CFLAGS=""
632
AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
633
		[compile finch against the ncurses includes in DIR])],
634
		[ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
635
if test "x$enable_consoleui" = "xyes"; then
636
	AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
1.3.4 by Ari Pollak
Import upstream version 2.6.2
637
	AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
638
	    [enable_consoleui=no], [$GNT_LIBS])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
639
640
	if test "x$enable_consoleui" = "xyes"; then
641
		dnl # Some distros put the headers in ncursesw/, some don't
642
		found_ncurses_h=no
643
		for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
644
		do
645
			f="$location/ncurses.h"
1.3.12 by Sebastien Bacher
Import upstream version 2.7.3
646
			orig_CFLAGS="$CFLAGS"
647
			orig_CPPFLAGS="$CPPFLAGS"
648
			CFLAGS="$CFLAGS -I$location"
649
			CPPFLAGS="$CPPFLAGS -I$location"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
650
			AC_CHECK_HEADER($f,[
651
				AC_MSG_CHECKING([if $f supports wide characters])
1.3.9 by Ari Pollak
Import upstream version 2.7.0
652
				AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
653
					#define _XOPEN_SOURCE_EXTENDED
654
					#include <$f>
1.3.9 by Ari Pollak
Import upstream version 2.7.0
655
				]], [[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
656
					#ifndef get_wch
657
					# error get_wch not found!
658
					#endif
1.3.9 by Ari Pollak
Import upstream version 2.7.0
659
				]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
660
					dir=$location
661
					if test x"$dir" != x"." ; then
662
						GNT_CFLAGS="-I$dir/"
663
					else
664
						GNT_CFLAGS=""
665
					fi
666
667
					found_ncurses_h=yes
1.3.12 by Sebastien Bacher
Import upstream version 2.7.3
668
					CFLAGS="$orig_CFLAGS"
669
					CPPFLAGS="$orig_CPPFLAGS"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
670
					AC_MSG_RESULT([yes])
671
					break
672
				], [
1.3.12 by Sebastien Bacher
Import upstream version 2.7.3
673
					CFLAGS="$orig_CFLAGS"
674
					CPPFLAGS="$orig_CPPFLAGS"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
675
					AC_MSG_RESULT([no])
676
				])
677
			])
678
		done
679
680
		if test x"$found_ncurses_h" = x"no" ; then
681
			GNT_LIBS=""
682
			GNT_CFLAGS=""
683
			enable_consoleui=no
684
		fi
685
	else
686
		# ncursesw was not found. Look for plain old ncurses
687
		enable_consoleui=yes
688
		AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
1.3.4 by Ari Pollak
Import upstream version 2.6.2
689
		AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
690
		    [enable_consoleui=no], [$GNT_LIBS])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
691
		AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
692
		if test x"$ac_ncurses_includes" != "x"; then
693
			GNT_CFLAGS="-I$ac_ncurses_includes"
694
		else
695
			if test x"$NCURSES_HEADERS" != "x"; then
696
				GNT_CFLAGS="-I$NCURSES_HEADERS"
697
			fi
698
		fi
699
	fi
1.2.1 by Ari Pollak
Import upstream version 2.5.6
700
fi
701
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
702
if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
703
	AC_MSG_ERROR([
704
705
Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
706
707
])
708
fi
709
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
710
AC_SUBST(GNT_LIBS)
711
AC_SUBST(GNT_CFLAGS)
712
AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
713
714
#AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
715
716
dnl #######################################################################
717
dnl # Check for LibXML2 (required)
718
dnl #######################################################################
719
PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
720
	AC_MSG_RESULT(no)
721
	AC_MSG_ERROR([
722
You must have libxml2 >= 2.6.0 development headers installed to build.
723
])])
1.3.3 by Ari Pollak
Import upstream version 2.6.1
724
PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
725
	AC_MSG_WARN([
726
Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
727
])])
728
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
729
AC_SUBST(LIBXML_CFLAGS)
730
AC_SUBST(LIBXML_LIBS)
731
732
dnl #######################################################################
733
dnl # GConf schemas
734
dnl #######################################################################
735
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
736
AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
737
AM_GCONF_SOURCE_2
738
739
dnl #######################################################################
740
dnl # Check for GStreamer
741
dnl #######################################################################
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
742
dnl
743
dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of
744
dnl       gst_registry_fork_set_enabled.
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
745
AC_ARG_ENABLE(gstreamer,
746
	[AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
747
	enable_gst="$enableval", enable_gst="yes")
748
if test "x$enable_gst" != "xno"; then
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
749
	PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
750
		AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
751
		AC_SUBST(GSTREAMER_CFLAGS)
752
		AC_SUBST(GSTREAMER_LIBS)
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
753
		AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled,
754
			[ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
755
			  [Define if gst_registry_fork_set_enabled exists])],
756
			[], [$GSTREAMER_LIBS])
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
757
	], [
758
		AC_MSG_RESULT(no)
1.3.8 by Ari Pollak
Import upstream version 2.6.6
759
		enable_gst="no"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
760
		if test "x$force_deps" = "xyes" ; then
761
			AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
762
GStreamer development headers not found.
763
Use --disable-gstreamer if you do not need GStreamer (sound) support.
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
764
])
765
		fi])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
766
fi
767
768
dnl #######################################################################
1.3.3 by Ari Pollak
Import upstream version 2.6.1
769
dnl # Check for GStreamer Interfaces
770
dnl #######################################################################
771
if test "x$enable_gst" != "xno"; then
772
	AC_ARG_ENABLE(gstreamer-interfaces,
773
		[AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])],
774
			enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
775
	if test "x$enable_gstinterfaces" != "xno"; then
776
		PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
777
			AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support])
778
			AC_SUBST(GSTINTERFACES_CFLAGS)
779
			AC_SUBST(GSTINTERFACES_LIBS)
780
		], [
781
			enable_gstinterfaces="no"
782
		])
783
	fi
784
else
785
	enable_gstinterfaces="no"
786
fi
787
788
dnl #######################################################################
83 by Ken VanDine
* debian/patches/70_farstream_rename.patch
789
dnl # Check for Farstream
1.3.3 by Ari Pollak
Import upstream version 2.6.1
790
dnl #######################################################################
83 by Ken VanDine
* debian/patches/70_farstream_rename.patch
791
AC_ARG_ENABLE(farstream,
792
	[AC_HELP_STRING([--disable-farstream], [compile without farstream support])],
793
	enable_farstream="$enableval", enable_farstream="yes")
794
if test "x$enable_farstream" != "xno"; then
795
	PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1], [
796
		AC_DEFINE(USE_FARSTREAM, 1, [Use Farstream for voice and video])
797
		AC_SUBST(FARSTREAM_CFLAGS)
798
		AC_SUBST(FARSTREAM_LIBS)
1.3.3 by Ari Pollak
Import upstream version 2.6.1
799
	], [
83 by Ken VanDine
* debian/patches/70_farstream_rename.patch
800
		enable_farstream="no"
1.3.3 by Ari Pollak
Import upstream version 2.6.1
801
	])
802
fi
803
804
dnl #######################################################################
805
dnl # Check for Voice and Video support
806
dnl #######################################################################
807
AC_ARG_ENABLE(vv,
808
	[AC_HELP_STRING([--disable-vv], [compile without voice and video support])],
1.3.4 by Ari Pollak
Import upstream version 2.6.2
809
	enable_vv="$enableval", enable_vv="yes")
1.3.3 by Ari Pollak
Import upstream version 2.6.1
810
if test "x$enable_vv" != "xno"; then
83 by Ken VanDine
* debian/patches/70_farstream_rename.patch
811
	if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno"; then
1.3.3 by Ari Pollak
Import upstream version 2.6.1
812
		AC_DEFINE(USE_VV, 1, [Use voice and video])
813
	else
814
		enable_vv="no"
1.3.4 by Ari Pollak
Import upstream version 2.6.2
815
		if test "x$force_deps" = "xyes"; then
1.3.3 by Ari Pollak
Import upstream version 2.6.1
816
			AC_MSG_ERROR([
817
Dependencies for voice/video were not met.
83 by Ken VanDine
* debian/patches/70_farstream_rename.patch
818
Install the necessary gstreamer and farstream packages first.
1.3.3 by Ari Pollak
Import upstream version 2.6.1
819
Or use --disable-vv if you do not need voice/video support.
820
			])
821
		fi
822
	fi
823
fi
83 by Ken VanDine
* debian/patches/70_farstream_rename.patch
824
AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno")
1.3.3 by Ari Pollak
Import upstream version 2.6.1
825
1.3.8 by Ari Pollak
Import upstream version 2.6.6
826
dnl #######################################################################
827
dnl # Check for Internationalized Domain Name support
828
dnl #######################################################################
829
1.3.3 by Ari Pollak
Import upstream version 2.6.1
830
AC_ARG_ENABLE(idn,
831
	[AC_HELP_STRING([--disable-idn], [compile without IDN support])],
832
	[enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
833
if test "x$enable_idn" != "xno"; then
834
	PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
835
		AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
836
		AC_SUBST(IDN_CFLAGS)
837
		AC_SUBST(IDN_LIBS)
838
	], [
839
		AC_MSG_RESULT(no)
1.3.8 by Ari Pollak
Import upstream version 2.6.6
840
		enable_idn="no"
1.3.3 by Ari Pollak
Import upstream version 2.6.1
841
		if test "x$force_deps" = "xyes" ; then
842
			AC_MSG_ERROR([
843
GNU Libidn development headers not found.
844
Use --disable-idn if you do not need it.
845
])
846
		fi
847
	])
848
fi
849
850
dnl #######################################################################
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
851
dnl # Check for Meanwhile headers (for Sametime)
852
dnl #######################################################################
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
853
AC_ARG_ENABLE(meanwhile,
854
	[AC_HELP_STRING([--disable-meanwhile],
855
		[compile without meanwhile (required for Sametime support)])],
856
	enable_meanwhile="$enableval", enable_meanwhile="yes")
857
if test "x$enable_meanwhile" = "xyes"; then
858
	PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
859
		have_meanwhile="yes"
860
	], [
861
		have_meanwhile="no"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
862
		if test "x$force_deps" = "xyes" ; then
863
			AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
864
Meanwhile development headers not found.
865
Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
866
])
867
		fi])
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
868
fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
869
AC_SUBST(MEANWHILE_CFLAGS)
870
AC_SUBST(MEANWHILE_LIBS)
871
872
dnl #######################################################################
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
873
dnl # Check for Native Avahi headers (for Bonjour)
874
dnl #######################################################################
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
875
AC_ARG_ENABLE(avahi,
876
	[AC_HELP_STRING([--disable-avahi],
877
		[compile without avahi (required for Bonjour support)])],
878
	enable_avahi="$enableval", enable_avahi="yes")
1.3.4 by Ari Pollak
Import upstream version 2.6.2
879
880
if test "x$enable_avahi" = "xyes"; then
881
	AC_ARG_WITH(avahi-client-includes, [AC_HELP_STRING([--with-avahi-client-includes=DIR], [compile the Bonjour plugin against the Avahi Client includes in DIR])], [ac_avahi_client_includes="$withval"], [ac_avahi_client_includes="no"])
882
	AC_ARG_WITH(avahi-client-libs, [AC_HELP_STRING([--with-avahi-client-libs=DIR], [compile the Bonjour plugin against the Avahi Client libs in DIR])], [ac_avahi_client_libs="$withval"], [ac_avahi_client_libs="no"])
883
	AVAHI_CFLAGS=""
884
	AVAHI_LIBS=""
885
886
	dnl Attempt to autodetect Avahi
887
	PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
888
		avahiincludes="yes"
889
		avahilibs="yes"
890
	], [
891
		avahiincludes="no"
892
		avahilibs="no"
893
	])
894
895
	dnl Override AVAHI_CFLAGS if the user specified an include dir
896
	if test "$ac_avahi_client_includes" != "no"; then
897
		AVAHI_CFLAGS="-I$ac_avahi_client_includes"
898
	fi
899
	CPPFLAGS_save="$CPPFLAGS"
900
	CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
901
	AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
902
	CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
903
	AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
904
	CPPFLAGS="$CPPFLAGS_save"
905
906
	dnl Override AVAHI_LIBS if the user specified a libs dir
907
	if test "$ac_avahi_client_libs" != "no"; then
908
		AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
909
	fi
910
	AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
911
fi
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
912
1.3.8 by Ari Pollak
Import upstream version 2.6.6
913
if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
914
	enable_avahi="no"
915
	if test "x$force_deps" = "xyes"; then
916
		AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
917
avahi development headers not found.
918
Use --disable-avahi if you do not need avahi (Bonjour) support.
919
])
1.3.8 by Ari Pollak
Import upstream version 2.6.6
920
	fi
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
921
fi
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
922
AC_SUBST(AVAHI_CFLAGS)
923
AC_SUBST(AVAHI_LIBS)
924
925
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
926
dnl #######################################################################
927
dnl # Check for SILC client includes and libraries
928
dnl #######################################################################
929
AC_ARG_WITH(silc-includes, [AC_HELP_STRING([--with-silc-includes=DIR], [compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"])
930
AC_ARG_WITH(silc-libs, [AC_HELP_STRING([--with-silc-libs=DIR], [compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"])
931
SILC_CFLAGS=""
932
SILC_LIBS=""
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
933
have_silc="no"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
934
if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
935
	silc_manual_check="yes"
936
else
937
	silc_manual_check="no"
938
fi
939
if test "x$silc_manual_check" = "xno"; then
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
940
	PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
941
		have_silc="yes"
942
		silcincludes="yes"
943
		silcclient="yes"
944
	], [
945
		have_silc="no"
946
	])
947
	if test "x$have_silc" = "xno"; then
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
948
		PKG_CHECK_MODULES(SILC, silcclient, [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
949
			have_silc="yes"
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
950
			silc10includes="yes"
951
			silc10client="yes"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
952
		], [
953
			have_silc="no"
954
		])
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
955
		dnl If silcclient.pc wasn't found, check for just silc.pc
956
		if test "x$have_silc" = "xno"; then
957
			PKG_CHECK_MODULES(SILC, silc, [
958
				have_silc="yes"
959
				silc10includes="yes"
960
				silc10client="yes"
961
			], [
962
				have_silc="no"
963
			])
964
		fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
965
	fi
966
else
967
	if test "$ac_silc_includes" != "no"; then
968
		SILC_CFLAGS="-I$ac_silc_includes"
969
	fi
970
	CPPFLAGS_save="$CPPFLAGS"
971
	CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
972
	AC_CHECK_HEADER(silc.h, [silcincludes=yes])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
973
	CPPFLAGS="$CPPFLAGS_save"
974
975
	if test "$ac_silc_libs" != "no"; then
976
		SILC_LIBS="-L$ac_silc_libs"
977
	fi
978
	SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
979
	AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
980
981
	if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
982
		have_silc="yes"
983
	else
984
		CPPFLAGS_save="$CPPFLAGS"
985
		CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
986
		AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
987
		CPPFLAGS="$CPPFLAGS_save"
988
989
		SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
990
		AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
991
		if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
992
			have_silc="yes"
993
		fi
994
	fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
995
fi
996
AC_SUBST(SILC_LIBS)
997
AC_SUBST(SILC_CFLAGS)
998
dnl SILC Toolkit >= 1.0.1 has a new MIME API
999
if test "x$silcclient" = "xyes"; then
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1000
	AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1001
elif test "x$silc10client" = "xyes"; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1002
	CPPFLAGS_save="$CPPFLAGS"
1003
	CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
1004
		AC_MSG_CHECKING(for silcmime.h)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1005
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1006
#include <silcincludes.h>
1007
#include <silcmime.h>
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1008
		]], [[]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1009
		AC_MSG_RESULT(yes)
1010
		AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1011
		], [
1012
		AC_MSG_RESULT(no)
1013
		])
1014
	CPPFLAGS="$CPPFLAGS_save"
1015
fi
1016
1017
dnl #######################################################################
1018
dnl # Check for Gadu-Gadu client includes and libraries
1019
dnl #######################################################################
1020
AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
1021
AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
1022
GADU_CFLAGS=""
1023
GADU_LIBS=""
1024
if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
1025
	gadu_manual_check="yes"
1026
else
1027
	gadu_manual_check="no"
1028
fi
1029
if test "x$gadu_manual_check" = "xno"; then
1.3.19 by Ari Pollak
Import upstream version 2.8.0
1030
	PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.0], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1031
		gadu_includes="yes"
1032
		gadu_libs="yes"
1033
	], [
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1034
		gadu_includes="no"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1035
	])
1036
else
1037
	if test "$ac_gadu_includes" != "no"; then
1038
		GADU_CFLAGS="-I$ac_gadu_includes"
1039
	fi
1040
	CPPFLAGS_save="$CPPFLAGS"
1041
	CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1042
	AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
1043
	CPPFLAGS="$CPPFLAGS_save"
1044
1045
	if test "$ac_gadu_libs" != "no"; then
1046
		GADU_LIBS="-L$ac_gadu_libs"
1047
	fi
1048
	GADU_LIBS="$GADU_LIBS -lgadu"
1049
	AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
1050
fi
1051
GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
1052
1053
if test "x$gadu_libs" = "xyes"; then
1054
	AC_MSG_CHECKING(for libgadu GPL compatibility)
1055
	CPPFLAGS_save="$CPPFLAGS"
1056
	CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1057
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
1058
#if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1059
#error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1060
#endif
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1061
	]])], [
1062
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1063
#if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1.3.19 by Ari Pollak
Import upstream version 2.8.0
1064
#error "Your libgadu version is too old. libpurple requires 1.11.0 or higher."
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1065
#endif
1066
		]])], [
1067
			AC_MSG_RESULT(yes)
1068
			AC_DEFINE([HAVE_LIBGADU], [1],
1069
				[Define to 1 if you have libgadu.])
1070
		], [
1071
			AC_MSG_RESULT(no)
1072
			echo
1073
			echo
1074
			echo "Your supplied copy of libgadu is too old."
1.3.19 by Ari Pollak
Import upstream version 2.8.0
1075
			echo "Install version 1.11.0 or newer."
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1076
			echo "Then rerun this ./configure"
1077
			echo
1078
			echo "Falling back to using our own copy of libgadu"
1079
			echo
1080
			GADU_LIBS=""
1081
			GADU_CFLAGS=""
1082
			gadu_libs=no
1083
		])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1084
	], [
1085
		AC_MSG_RESULT(no)
1086
		echo
1087
		echo
1088
		echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
1089
		echo "To compile against system libgadu, please recompile libgadu using:"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1090
		echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
1091
		echo "Then rerun this ./configure"
1092
		echo
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
1093
		echo "Falling back to using our own copy of libgadu"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1094
		echo
1095
		GADU_LIBS=""
1096
		GADU_CFLAGS=""
1097
		gadu_libs=no
1098
	])
1099
	CPPFLAGS="$CPPFLAGS_save"
1100
fi
1101
1102
AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1103
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1104
if test "x$gadu_libs" = "x"; then
1105
	gadu_libs=no
1106
fi
1107
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1108
AC_SUBST(GADU_LIBS)
1109
AC_SUBST(GADU_CFLAGS)
1110
1111
AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1112
AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1113
DYNAMIC_PRPLS=all
1114
AC_ARG_WITH(static-prpls, [AC_HELP_STRING([--with-static-prpls], [Link to certain protocols statically])], [STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`], [STATIC_PRPLS=""])
1115
if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1116
	DYNAMIC_PRPLS=""
1117
fi
1118
1119
if test "x$STATIC_PRPLS" = "xall" ; then
1.3.19 by Ari Pollak
Import upstream version 2.8.0
1120
	STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1121
fi
1122
if test "x$have_meanwhile" != "xyes" ; then
1123
	STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1124
fi
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
1125
if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1126
	STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1127
fi
1128
if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1129
	STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1130
fi
1131
if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1132
	STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1133
fi
1134
AC_SUBST(STATIC_PRPLS)
1135
STATIC_LINK_LIBS=
1136
extern_init=
1137
load_proto=
1138
for i in $STATIC_PRPLS ; do
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1139
	dnl Ugly special case for "libsilcpurple.la":
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1140
	dnl ... and Ugly special case for multi-protocol oscar and yahoo
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1141
	if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1142
		STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.la"
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1143
		extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
1144
		extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
1145
		load_proto="$load_proto purple_init_aim_plugin();"
1146
		load_proto="$load_proto purple_init_icq_plugin();"
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1147
	elif test "x$i" = "xyahoo"; then
1148
		STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/yahoo/libymsg.la"
1149
		extern_init="$extern_init extern gboolean purple_init_yahoo_plugin();"
1150
		extern_init="$extern_init extern gboolean purple_init_yahoojp_plugin();"
1151
		load_proto="$load_proto purple_init_yahoo_plugin();"
1152
		load_proto="$load_proto purple_init_yahoojp_plugin();"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1153
	else
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1154
		if test "x$i" = "xsilc"; then
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1155
			STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1156
		elif test "x$i" = "xsilc10"; then
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1157
			STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1158
		else
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1159
			STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1160
		fi
1161
		extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1162
		load_proto="$load_proto purple_init_${i}_plugin();"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1163
	fi
1164
	case $i in
1165
		bonjour)	static_bonjour=yes ;;
1166
		gg)			static_gg=yes ;;
1167
		irc)		static_irc=yes ;;
1168
		jabber)		static_jabber=yes ;;
1169
		msn)		static_msn=yes ;;
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
1170
		myspace)	static_myspace=yes ;;
1.3.6 by Ari Pollak
Import upstream version 2.6.4
1171
		mxit)		static_mxit=yes ;;
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1172
		novell)		static_novell=yes ;;
1173
		oscar)		static_oscar=yes ;;
1174
		aim)		static_oscar=yes ;;
1175
		icq)		static_oscar=yes ;;
1176
		sametime)	static_sametime=yes ;;
1177
		silc)		static_silc=yes ;;
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1178
		silc10)		static_silc=yes ;;
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1179
		simple)		static_simple=yes ;;
1180
		yahoo)		static_yahoo=yes ;;
1181
		zephyr)		static_zephyr=yes ;;
1182
		*)			echo "Invalid static protocol $i!!" ; exit ;;
1183
	esac
1184
done
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
1185
AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1186
AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1187
AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1188
AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1189
AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
1190
AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1.3.6 by Ari Pollak
Import upstream version 2.6.4
1191
AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1192
AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1193
AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1194
AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1195
AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1196
AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1197
AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
1198
AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1199
AC_SUBST(STATIC_LINK_LIBS)
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1200
AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto },
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1201
	[Loads static protocol plugin module initialization functions.])
1202
1203
AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1204
if test "x$DYNAMIC_PRPLS" = "xall" ; then
1.3.19 by Ari Pollak
Import upstream version 2.8.0
1205
	DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1206
fi
1207
if test "x$have_meanwhile" != "xyes"; then
1208
	DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1209
fi
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
1210
if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1211
	DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1212
fi
1213
if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1214
	DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1215
fi
1216
if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1217
	DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1218
fi
1219
AC_SUBST(DYNAMIC_PRPLS)
1220
for i in $DYNAMIC_PRPLS ; do
1221
	case $i in
1222
		bonjour)	dynamic_bonjour=yes ;;
1223
		gg)			dynamic_gg=yes ;;
1224
		irc)		dynamic_irc=yes ;;
1225
		jabber)		dynamic_jabber=yes ;;
1226
		msn)		dynamic_msn=yes ;;
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
1227
		myspace)	dynamic_myspace=yes ;;
1.3.6 by Ari Pollak
Import upstream version 2.6.4
1228
		mxit)		dynamic_mxit=yes ;;
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1229
		novell)		dynamic_novell=yes ;;
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1230
		null)		dynamic_null=yes ;;
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1231
		oscar)		dynamic_oscar=yes ;;
1232
		aim)		dynamic_oscar=yes ;;
1233
		icq)		dynamic_oscar=yes ;;
1234
		sametime)	dynamic_sametime=yes ;;
1235
		silc)		dynamic_silc=yes ;;
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1236
		silc10)		dynamic_silc=yes ;;
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1237
		simple)		dynamic_simple=yes ;;
1238
		yahoo)		dynamic_yahoo=yes ;;
1239
		zephyr)		dynamic_zephyr=yes ;;
1240
		*)			echo "Invalid dynamic protocol $i!!" ; exit ;;
1241
	esac
1242
done
1243
1244
AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1245
AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1246
AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1247
AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1248
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
1249
AC_CHECK_HEADERS(sys/utsname.h)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1250
AC_CHECK_FUNC(uname)
1251
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1252
AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1.2.1 by Ari Pollak
Import upstream version 2.5.6
1253
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1254
DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1255
if test "x$GCC" = "xyes"; then
1256
	dnl We enable -Wall later.
1257
	dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1258
	dnl This leads to warnings we don't want.
1259
	CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1260
1261
	dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1262
	dnl
1263
	dnl Future Possibilities
1264
	dnl
1265
	dnl Consider adding -Wbad-function-cast.
1266
	dnl	This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1267
	dnl		We'd need an intermediate variable.
1268
	dnl
1269
	dnl Consider adding -Wfloat-equal.
1270
	dnl	This leads to warnings with Perl.
1271
	dnl		Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
1272
	dnl		On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
1273
	dnl
1274
	dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
1275
	dnl	This is likely non-trivial.
1276
	dnl
1277
	for newflag in \
1278
			"-Waggregate-return" \
1279
			"-Wcast-align" \
1280
			"-Wdeclaration-after-statement" \
1281
			"-Wendif-labels" \
1282
			"-Werror-implicit-function-declaration" \
1283
			"-Wextra -Wno-sign-compare -Wno-unused-parameter" \
1.1.15 by Nick Ellery
Import upstream version 2.5.3
1284
			"-Wformat-security" \
1285
				"-Werror=format-security" \
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1286
			"-Winit-self" \
1287
			"-Wmissing-declarations" \
1288
			"-Wmissing-noreturn" \
1289
			"-Wmissing-prototypes" \
1290
			"-Wpointer-arith" \
1291
			"-Wundef" \
1292
	; do
1293
		orig_CFLAGS="$CFLAGS"
1294
		CFLAGS="$CFLAGS $newflag"
1295
		AC_MSG_CHECKING(for $newflag option to gcc)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1296
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1297
			int main() {return 0;}
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1298
		]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1299
			AC_MSG_RESULT(yes)
1300
			CFLAGS="$orig_CFLAGS"
1301
			DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1302
		], [
1303
			AC_MSG_RESULT(no)
1304
			CFLAGS="$orig_CFLAGS"
1305
		])
1306
	done
1307
1308
	if test "x$enable_fortify" = "xyes"; then
1309
		AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1310
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1311
			int main() {
1312
			#if !(__GNUC_PREREQ (4, 1) \
1313
				|| (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1314
				|| (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1315
					&& __GNUC_MINOR__ == 4 \
1316
					&& (__GNUC_PATCHLEVEL__ > 2 \
1317
						|| (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1318
			#error No FORTIFY_SOURCE support
1319
			#endif
1320
				return 0;
1321
			}
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1322
		]])], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1323
			AC_MSG_RESULT(yes)
1324
			DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1325
		], [
1326
			AC_MSG_RESULT(no)
1327
		])
1328
	fi
1329
1330
	DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1331
	CFLAGS="-g $CFLAGS"
1332
fi
1.3.10 by Ari Pollak
Import upstream version 2.7.1
1333
1334
if test "x$SUNCC" = "xyes"; then
1335
        CFLAGS="$CFLAGS -features=extensions" 
1336
fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1337
AC_SUBST(CFLAGS)
1338
1339
AC_PATH_PROG(pidginpath, pidgin)
1340
1341
dnl #######################################################################
1342
dnl # Check for D-Bus libraries
1343
dnl #######################################################################
1344
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1345
AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--disable-dbus], [disable D-Bus support])], , enable_dbus=yes)
1346
AC_ARG_ENABLE(nm, [AC_HELP_STRING([--disable-nm], [disable NetworkManager support (requires D-Bus)])], enable_nm=$enableval, enable_nm=yes)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1347
1348
if test "x$enable_dbus" = "xyes" ; then
1349
	AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1350
fi
1351
1352
if test "x$enable_dbus" = "xyes" ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1353
	PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1354
		AC_SUBST(DBUS_CFLAGS)
1355
		AC_SUBST(DBUS_LIBS)
1356
		enable_dbus=yes
1357
	], [
1.1.14 by Sebastien Bacher
Import upstream version 2.5.2
1358
	enable_dbus=no
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1359
	if test "x$force_deps" = "xyes" ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1360
		AC_MSG_ERROR([
1361
D-Bus development headers not found.
1362
Use --disable-dbus if you do not need D-Bus support.
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1363
])
1364
	fi])
1.1.14 by Sebastien Bacher
Import upstream version 2.5.2
1365
fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1366
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1367
dnl Check for NetworkManager.h; if we don't have it, oh well
1.1.14 by Sebastien Bacher
Import upstream version 2.5.2
1368
if test "x$enable_dbus" = "xyes" ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1369
	if test "x$enable_nm" = "xyes" ; then
1.1.14 by Sebastien Bacher
Import upstream version 2.5.2
1370
		PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1371
			AC_SUBST(NETWORKMANAGER_CFLAGS)
1372
			AC_SUBST(NETWORKMANAGER_LIBS)
1373
			AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
1374
		], [
1.1.14 by Sebastien Bacher
Import upstream version 2.5.2
1375
			enable_nm=no
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1376
			if test "x$force_deps" = "xyes" ; then
1377
				AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1378
NetworkManager development headers not found.
1379
Use --disable-nm if you do not need NetworkManager support.
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1380
])
1381
			fi])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1382
	fi
1383
else
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1384
	enable_nm=no
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1385
fi
1386
1387
dnl #######################################################################
1388
dnl # Check for Python
1389
dnl #######################################################################
1390
1391
dnl Python scripts are used to auto-generate about 3000 lines of C
1392
dnl and XML code that wraps (part of) the existing API so that
1393
dnl it is now accessible through D-Bus.
1394
1395
dnl Python is only required if --enable-dbus is used, and only for
1396
dnl the build process to generate the code, not for running pidgin.
1397
dnl This autogenerated code is system-independent, so in principle we
1398
dnl can generate all of it before shipping.  But I thought adding
1399
dnl auto-generated stuff to the repository is inelegant.
1400
dnl Alternatively, these python scripts could be rewritten
1401
dnl in C (brrrr ...).
1402
1403
AC_ARG_WITH([python],
1404
			AC_HELP_STRING([--with-python=PATH],
1405
						   [which python interpreter to use for dbus code generation]),
1406
			PYTHON=$withval)
1407
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1408
if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1409
	if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1410
		AC_PATH_PROG([PYTHON], [python], [no])
1411
	fi
1412
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
1413
	if test x"$PYTHON" = x"no" ; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1414
		AC_MSG_WARN([python interpreter not found in your path])
1415
		enable_dbus=no
1416
	fi
1417
1418
	if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1419
		AC_MSG_WARN([python version >= 2.4 required])
1420
		enable_dbus=no
1421
	fi
1422
fi
1423
1424
dnl ###########################################################################
1425
dnl # Find the D-Bus services dir.
1426
dnl #
1427
dnl # This is a 3 step process that
1428
dnl #
1429
dnl # 1. checks if --with-dbus-services was set, if so use that.
1430
dnl # 2. checks if --prefix was given, if so use that.
1431
dnl # 3. fallbacks to installing into what should be the correct system
1432
dnl #    directories.
1433
dnl #
1434
dnl # This is still prone to error if one of the legacy directories exist
1435
dnl # although a newer dbus is installed.  But I have tried to order the
1436
dnl # directory searching to keep this situation at a minimum.
1437
dnl ###########################################################################
1438
AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1439
1440
DBUS_SERVICES_DIR=""
1441
1442
if test x"$enable_dbus" = "xyes" ; then
1443
	AC_MSG_CHECKING([location of the D-Bus services directory])
1444
	if ! test -z "$with_dbus_services" ; then
1445
		if ! test -d "$with_dbus_services" ; then
1446
			AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1447
		fi
1448
1449
		DBUS_SERVICES_DIR="$with_dbus_services"
1450
	else
1451
		if test x"$prefix" = x"NONE" ; then
1452
			dnl # no prefix given, so we look for the correct dbus system paths.
1453
			dnl # if a prefix is given, we use it.
1454
1.1.2 by Sebastien Bacher
Import upstream version 2.1.0
1455
			serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1456
			DBUS_SERVICES_DIR=""
1457
1458
			for d in $serviceprefixes ; do
1459
				dir="$d/dbus-1/services"
1460
				if test -d $dir ; then
1461
					DBUS_SERVICES_DIR="$dir"
1462
					break
1463
				fi
1464
			done
1465
1466
			if test -z $DBUS_SERVICES_DIR ; then
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1467
				AC_MSG_ERROR([D-Bus services directory was not found!  Please use --with-dbus-services and specify its location.])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1468
			fi
1469
		else
1470
			DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1471
		fi
1472
	fi
1473
	AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1474
	AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1475
fi
1476
AC_SUBST(DBUS_SERVICES_DIR)
1477
1478
if test "x$enable_dbus" = "xyes" ; then
1479
	echo "Building with D-Bus support"
1480
else
1481
	echo "Building without D-Bus support"
1482
fi
1483
1484
AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1485
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1486
dnl Check for Python headers (currently useful only for libgnt)
1487
dnl (Thanks to XChat)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1488
if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1489
	AC_MSG_CHECKING(for Python compile flags)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1490
	PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1491
	PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1492
	changequote(<<, >>)dnl
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1493
	PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1494
	PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1495
	changequote([, ])dnl
1496
	if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1497
		AC_MSG_RESULT()
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1498
		AC_CHECK_LIB(pthread, pthread_create, )
1499
		AC_CHECK_LIB(util, openpty, )
1500
		AC_CHECK_LIB(db, dbopen, )
1.3.7 by Ari Pollak
Import upstream version 2.6.5
1501
		PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1502
		PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1503
		AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1504
		dnl Because the above AC_CHECK_LIB get in the way...
1505
		AC_MSG_CHECKING(for Python compile flags)
1.1.8 by Pedro Fragoso
Import upstream version 2.4.0
1506
		AC_MSG_RESULT(ok)
1507
	else
1508
		AC_MSG_RESULT([Can't find Python.h])
1509
		PY_LIBS=""
1510
		PY_CFLAGS=""
1511
	fi
1512
fi
1513
AC_SUBST(PY_CFLAGS)
1514
AC_SUBST(PY_LIBS)
1515
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1516
dnl #######################################################################
1517
dnl # Check for Mono support
1518
dnl #######################################################################
1519
AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1520
if test x"$enable_mono" = x"yes" ; then
1521
	PKG_CHECK_MODULES(MONO, mono, [
1522
		AC_SUBST(MONO_CFLAGS)
1523
		AC_SUBST(MONO_LIBS)
1524
		enable_mono=yes
1525
	], [
1526
		AC_MSG_RESULT(no)
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1527
		AC_MSG_ERROR([
1528
Mono development headers not found.
1529
Use --disable-mono if you do not need Mono support.
1530
])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1531
	])
1532
	if test x"$enable_mono" = x"yes"; then
1533
		oldLIBS="$LIBS"
1534
		LIBS="$LIBS $MONO_LIBS"
1535
		AC_MSG_CHECKING(for libmono)
1536
		AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1537
		LIBS="$oldLIBS"
1538
1539
		oldCPPFLAGS="$CPPFLAGS"
1540
		CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1541
		AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1542
		AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1543
		CPPFLAGS="$oldCPPFLAGS"
1544
1545
		AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1546
	fi
1547
else
1548
	MONO_CFLAGS=
1549
	MONO_LIBS=
1550
	enable_mono=no
1551
fi
1552
1553
AC_SUBST(MONO_CFLAGS)
1554
AC_SUBST(MONO_LIBS)
1555
AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1556
1557
dnl #######################################################################
1558
dnl # Check for Perl support
1559
dnl #######################################################################
1560
AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1561
1562
if test "$enable_plugins" = no ; then
1563
	enable_perl=no
1564
fi
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1565
looked_for_perl="no"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1566
if test "$enable_perl" = yes ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1567
	looked_for_perl="yes"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1568
	AC_PATH_PROG(perlpath, perl)
1569
	AC_MSG_CHECKING(for Perl compile flags)
1570
	PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1571
	if test "_$PERL_CFLAGS" = _ ; then
1572
		AC_MSG_RESULT([not found, building without perl.])
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
1573
		enable_perl=no
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1574
	else
1575
		PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1576
		PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1577
		PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1578
		if test "$system" = "Linux"; then
1579
			PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1580
			PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1581
		fi
1582
		PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1583
		AC_MSG_RESULT(ok)
1584
1585
		oldLIBS="$LIBS"
1586
		LIBS="$LIBS $PERL_LIBS"
1587
		AC_MSG_CHECKING(for libperl)
1588
		AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1589
		LIBS="$oldLIBS"
1590
1591
		oldCPPFLAGS="$CPPFLAGS"
1592
		CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1593
		AC_CHECK_HEADERS(EXTERN.h)
1594
		AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1595
		[#if HAVE_EXTERN_H
1596
		 # include <EXTERN.h>
1597
		 #endif])
1598
		CPPFLAGS="$oldCPPFLAGS"
1599
	fi
1600
fi
1601
1602
if test "$enable_perl" = yes ; then
1603
	AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1604
1605
	if test "x$have_makemaker" = "xno"; then
1606
		enable_perl=no
1607
		PERL_CFLAGS=
1608
		PERL_LIBS=
1609
		AM_CONDITIONAL(USE_PERL, false)
1610
		AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1611
	else
1612
		AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1613
		AC_SUBST(PERL_CFLAGS)
1614
		AC_SUBST(PERL_LIBS)
1615
		AM_CONDITIONAL(USE_PERL, true)
1616
1617
		dnl This is almost definitely wrong, but in case there's
1618
		dnl something I'm missing, I'll leave it in.
1619
		AC_CHECK_FUNCS(Perl_eval_pv)
1620
1621
		AC_MSG_CHECKING(for old perl)
1622
		PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1623
1624
		if test "x$PERL_OLD" = "xyes"; then
1625
			AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1626
			AC_MSG_RESULT(yes)
1627
		else
1628
			AC_MSG_RESULT(no)
1629
		fi
1630
1631
		AC_MSG_CHECKING(for DynaLoader.a)
1632
		DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1633
1634
		dnl Don't check libperl.a if dynaloader.a wasn't found.
1635
		if test -n "$DYNALOADER_A"; then
1636
			AC_MSG_RESULT(yes)
1637
1638
			dnl Find either libperl.a or libperl.so
1639
			AC_MSG_CHECKING(for libperl.a or libperl.so)
1640
			LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'`
1641
			if test -z "$LIBPERL_A"; then
1642
				AC_MSG_RESULT(no)
1643
				DYNALOADER_A=
1644
			else
1645
				AC_MSG_RESULT(yes)
1646
1647
				if test "$LIBPERL_A" = "-lperl"; then
1648
					LIBPERL_A=
1649
				fi
1650
			fi
1651
1652
			PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1653
1654
			if test -n "$LIBPERL_A"; then
1655
				PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1656
			fi
1657
1658
			AC_SUBST(DYNALOADER_A)
1659
			AC_SUBST(LIBPERL_A)
1660
		else
1661
			AC_MSG_RESULT(no)
1662
		fi
1663
	fi
1664
else
1665
	PERL_CFLAGS=
1666
	PERL_LIBS=
1667
	AM_CONDITIONAL(USE_PERL, false)
1668
fi
1669
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1670
if test "x$looked_for_perl" = "xyes" -a "x$enable_perl" = "xno" -a "x$force_deps" = "xyes"; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1671
	AC_MSG_ERROR([
1672
Perl development headers not found.
1673
Use --disable-perl if you do not need Perl scripting support.
1674
])
1675
fi
1676
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1677
dnl #######################################################################
1678
dnl # SSL support
1679
dnl #
1680
dnl # Thanks go to Evolution for the checks.
1681
dnl #######################################################################
1682
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1683
AC_ARG_WITH(system-ssl-certs, [AC_HELP_STRING([--with-system-ssl-certs=<dir>], [directory containing system-wide SSL CA certificates])], [ssl_certificates_dir=$withval])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1684
1685
SSL_CERTIFICATES_DIR=""
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1686
if ! test -z "$ssl_certificates_dir" ; then
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1687
	if test "x$ssl_certificates_dir" = "xyes" ; then
1688
		AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1689
	fi
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1690
	if ! test -d "$ssl_certificates_dir" ; then
1691
		AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1692
	fi
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1693
	SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1694
fi
1695
AC_SUBST(SSL_CERTIFICATES_DIR)
1696
AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1697
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1698
dnl These two are inverses of each other <-- stolen from evolution!
1699
1700
AC_ARG_ENABLE(gnutls,
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1701
	[  --enable-gnutls=[yes,no]  attempt to use GnuTLS for SSL support [default=yes]],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1702
	[enable_gnutls="$enableval"],
1703
	[enable_gnutls="yes"])
1704
1705
AC_ARG_ENABLE(nss,
1706
	[  --enable-nss=[yes,no,static]    attempt to use Mozilla libnss for SSL support [default=yes]],
1707
	[enable_nss="$enableval"],
1708
	[enable_nss="yes"])
1709
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1710
msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1711
looked_for_gnutls="no"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1712
dnl #
1713
dnl # Check for GnuTLS if it's specified.
1714
dnl #
1715
if test "x$enable_gnutls" != "xno"; then
1716
	enable_gnutls="no"
1717
	prefix=`eval echo $prefix`
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1718
	looked_for_gnutls="yes"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1719
1720
	AC_ARG_WITH(gnutls-includes,
1721
		[  --with-gnutls-includes=PREFIX   location of GnuTLS includes.],
1722
		[ with_gnutls_includes="$withval" ],
1723
		[ with_gnutls_includes="$prefix/include" ])
1724
1725
	have_gnutls_includes="no"
1726
1727
	if test "x$with_gnutls_includes" != "xno"; then
1728
		CPPFLAGS_save="$CPPFLAGS"
1729
1730
		AC_MSG_CHECKING(for GnuTLS includes)
1731
		AC_MSG_RESULT("")
1732
1733
		CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1734
		AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1735
		CPPFLAGS="$CPPFLAGS_save"
1736
1737
		if test "x$gnutls_includes" != "xno" -a \
1738
		        "x$gnutls_includes" != "x"; then
1739
			have_gnutls_includes="yes"
1740
1741
			if test "x$with_gnutls_includes" != "xNONE/include"; then
1742
				GNUTLS_CFLAGS="-I$with_gnutls_includes"
1743
			fi
1744
		else
1745
			GNUTLS_CFLAGS=""
1746
		fi
1747
	else
1748
		AC_MSG_CHECKING(for GnuTLS includes)
1749
		AC_MSG_RESULT(no)
1750
	fi
1751
1752
	AC_ARG_WITH(gnutls-libs,
1753
		[AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1754
		[ with_gnutls_libs="$withval" ])
1755
1756
	if test "x$with_gnutls_libs"     != "xno" -a \
1757
	        "x$have_gnutls_includes" != "xno"; then
1758
1759
		LIBS_save="$LIBS"
1760
1761
		case $with_gnutls_libs in
1762
			""|-L*) ;;
1763
			*) with_gnutls_libs="-L$with_gnutls_libs" ;;
1764
		esac
1765
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1766
		AC_CACHE_CHECK([for GnuTLS libraries], ac_cv_gnutls_libs,
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1767
		[
1768
			LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1769
			AC_TRY_LINK_FUNC(gnutls_init, ac_cv_gnutls_libs="yes", ac_cv_gnutls_libs="no")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1770
			LIBS="$LIBS_save"
1771
		])
1772
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1773
		if test "x$ac_cv_gnutls_libs" != "xno"; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1774
			AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1775
			AC_DEFINE(HAVE_SSL)
1776
			msg_gnutls="GnuTLS"
1777
			GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1778
1779
			enable_gnutls="yes"
1780
		else
1781
			GNUTLS_CFLAGS=""
1782
			GNUTLS_LIBS=""
1783
		fi
1784
	else
1785
		AC_MSG_CHECKING(for GnuTLS libraries)
1786
		AC_MSG_RESULT(no)
1787
	fi
1788
else
1789
	GNUTLS_CFLAGS=""
1790
	GNUTLS_LIBS=""
1791
fi
1792
1793
AC_SUBST(GNUTLS_CFLAGS)
1794
AC_SUBST(GNUTLS_LIBS)
1795
1.1.17 by Didier Roche
Import upstream version 2.5.5
1796
if test "x$enable_gnutls" = "xyes"; then
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1797
	AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1.1.17 by Didier Roche
Import upstream version 2.5.5
1798
	LIBS_save="$LIBS"
1799
	LIBS="$LIBS $GNUTLS_LIBS"
1800
	CPPFLAGS_save="$CPPFLAGS"
1801
	CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1.3.3 by Ari Pollak
Import upstream version 2.6.1
1802
	AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1.3.9 by Ari Pollak
Import upstream version 2.7.0
1803
                                        [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1.1.17 by Didier Roche
Import upstream version 2.5.5
1804
	               [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1805
                                  [Define if your gnutls has gnutls_priority_set_direct and friends])
1806
	                AC_MSG_RESULT(yes)],
1807
	               [AC_MSG_RESULT(no)])
1808
	CPPFLAGS="$CPPFLAGS_save"
1809
        LIBS="$LIBS_save"
1810
fi
1811
1.3.6 by Ari Pollak
Import upstream version 2.6.4
1812
if test "x$enable_gnutls" = "xyes"; then
1813
	AC_MSG_CHECKING(for GNUTLS_CERT_INSECURE_ALGORITHM)
1814
	LIBS_save="$LIBS"
1815
	LIBS="$LIBS $GNUTLS_LIBS"
1816
	CPPFLAGS_save="$CPPFLAGS"
1817
	CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1818
	AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1819
                                        [[unsigned int verify = GNUTLS_CERT_INSECURE_ALGORITHM;]])],
1820
	               [AC_DEFINE([HAVE_GNUTLS_CERT_INSECURE_ALGORITHM], 1,
1821
                                  [Define if your gnutls has the GNUTLS_CERT_INSECURE_ALGORITHM flag])
1822
	                AC_MSG_RESULT(yes)],
1823
	               [AC_MSG_RESULT(no)])
1824
	CPPFLAGS="$CPPFLAGS_save"
1825
        LIBS="$LIBS_save"
1826
fi
1827
1828
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1829
AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1830
1831
1832
dnl #
1833
dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1834
dnl #
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1835
looked_for_nss="no"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1836
if test "x$enable_nss" != "xno"; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
1837
	looked_for_nss="yes"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1838
1839
	AC_ARG_WITH(nspr-includes,
1840
		[AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1841
		[with_nspr_includes="$withval"])
1842
1843
	AC_ARG_WITH(nspr-libs,
1844
		[AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1845
		[with_nspr_libs="$withval"])
1846
1847
	AC_ARG_WITH(nss-includes,
1848
		[AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1849
		[with_nss_includes="$withval"])
1850
1851
	AC_ARG_WITH(nss-libs,
1852
		[AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1853
		[with_nss_libs="$withval"])
1854
1855
1856
	if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1857
	   test -n "$with_nss_includes"  || test -n "$with_nss_libs"  ||
1858
	   test "x$enable_nss" = "xstatic"; then
1859
1860
		nss_manual_check="yes"
1861
	else
1862
		nss_manual_check="no"
1863
	fi
1864
1865
	enable_nss="no"
1866
1867
	if test "x$nss_manual_check" = "xno"; then
1868
		if `$PKG_CONFIG --exists mozilla-nss`; then
1869
			PKG_CHECK_MODULES(NSS, mozilla-nss, [
1870
				have_nss="yes"
1871
			], [
1872
				AC_MSG_RESULT(no)
1873
				have_nss="no"
1874
			])
1875
			mozilla_nspr="mozilla-nspr"
1876
			mozilla_nss="mozilla-nss"
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
1877
		elif `$PKG_CONFIG --exists nss`; then
1878
			PKG_CHECK_MODULES(NSS, nss, [
1879
				have_nss="yes"
1880
			], [
1881
				AC_MSG_RESULT(no)
1882
				have_nss="no"
1883
			])
1884
			mozilla_nspr="nspr"
1885
			mozilla_nss="nss"
1886
		elif `$PKG_CONFIG --exists microb-engine-nss`; then
1887
			PKG_CHECK_MODULES(NSS, microb-engine-nss, [
1888
				have_nss="yes"
1889
			], [
1890
				AC_MSG_RESULT(no)
1891
				have_nss="no"
1892
			])
1893
			mozilla_nspr="mozilla-nspr"
1894
			mozilla_nss="microb-engine-nss"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1895
		fi
1896
1897
		if test "x$have_nss" = "xyes"; then
1898
1899
			AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1900
			AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1901
1902
			msg_nss="Mozilla NSS"
1903
			enable_nss="yes"
1904
		else
1905
			nss_manual_check="yes"
1906
		fi
1907
	fi
1908
1909
	if test "x$nss_manual_check" = "xyes"; then
1910
		mozilla_nss=""
1911
		have_nspr_includes="no"
1912
1913
		if test "x$with_nspr_includes" != "xno"; then
1914
			CPPFLAGS_save=$CPPFLAGS
1915
1916
			AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1917
			AC_MSG_RESULT("")
1918
1919
			CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1920
			AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1921
			CPPFLAGS=$CPPFLAGS_save
1922
1923
			if test "x$moz_nspr_includes" != "xno" -a \
1924
			        "x$moz_nspr_includes" != "x"; then
1925
1926
				have_nspr_includes="yes"
1927
				NSPR_CFLAGS="-I$with_nspr_includes"
1928
			fi
1929
		else
1930
			AC_MSG_CHECKING(for Mozilla nspr4 includes)
1931
			AC_MSG_RESULT(no)
1932
1933
			enable_nss="no"
1934
		fi
1935
1936
		have_nspr_libs="no"
1937
1938
		if test "x$with_nspr_libs"     != "xno" -a \
1939
		        "x$have_nspr_includes" != "xno"; then
1940
1941
			CFLAGS_save=$CFLAGS
1942
			LDFLAGS_save=$LDFLAGS
1943
1944
			if test "$enable_nss" = "static"; then
1945
				if test -z "$with_nspr_libs"; then
1946
					AC_MSG_ERROR(
1947
						[Static linkage requested, but path to nspr libraries not set.]
1948
						[Please specify the path to libnspr4.a]
1949
						[Example: --with-nspr-libs=/usr/lib])
1950
1951
					enable_nss="no"
1952
				else
1953
					nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1954
				fi
1955
			else
1956
				nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1957
			fi
1958
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1959
			AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1960
			[
1961
				LIBS_save=$LIBS
1962
				CFLAGS="$CFLAGS $NSPR_CFLAGS"
1963
1964
				LIBS="$nsprlibs"
1965
1966
				if test "x$with_nspr_libs" != "x"; then
1967
					LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1968
				else
1969
					LDFLAGS="$LDFLAGS"
1970
				fi
1971
1972
				AC_TRY_LINK_FUNC(PR_Init,
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1973
					[ac_cv_moz_nspr_libs="yes"],
1974
					[ac_cv_moz_nspr_libs="no"])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1975
1976
				CFLAGS=$CFLAGS_save
1977
				LDFLAGS=$LDFLAGS_save
1978
				LIBS=$LIBS_save
1979
			])
1980
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
1981
			if test "x$ac_cv_moz_nspr_libs" != "xno"; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
1982
				have_nspr_libs="yes"
1983
				NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1984
			else
1985
				NSPR_CFLAGS=""
1986
				enable_nss="no"
1987
			fi
1988
		else
1989
			AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1990
			AC_MSG_RESULT(no)
1991
		fi
1992
1993
		have_nss_includes="no"
1994
1995
		if test "x$with_nss_includes" != "xno" -a \
1996
				"x$have_nspr_libs"    != "xno"; then
1997
1998
			CPPFLAGS_save=$CPPFLAGS
1999
2000
			AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
2001
			AC_MSG_RESULT("")
2002
2003
			if test "x$with_nspr_includes" != "x"; then
2004
				CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
2005
			else
2006
				CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
2007
			fi
2008
2009
			AC_CHECK_HEADERS(nss.h ssl.h smime.h,
2010
				[moz_nss_includes="yes"],
2011
				[moz_nss_includes="no"])
2012
2013
			CPPFLAGS=$CPPFLAGS_save
2014
2015
			if test "x$moz_nss_includes" = "xyes"; then
2016
				have_nss_includes="yes"
2017
				NSS_CFLAGS="-I$with_nss_includes"
2018
			else
2019
				NSPR_CFLAGS=""
2020
				NSPR_LIBS=""
2021
				enable_nss="no"
2022
			fi
2023
		else
2024
			AC_MSG_CHECKING(for Mozilla nss3 includes)
2025
			AC_MSG_RESULT(no)
2026
			enable_nss="no"
2027
		fi
2028
2029
		if test "x$with_nss_libs"     != "xno" -a \
2030
				"x$have_nss_includes" != "xno"; then
2031
2032
			LDFLAGS_save=$LDFLAGS
2033
2034
			if test "$enable_nss" = "static"; then
2035
				if test -z "$with_nss_libs"; then
2036
					AC_MSG_ERROR(
2037
						[Static linkage requested, but path to nss libraries not set.]
2038
						[Please specify the path to libnss3.a]
2039
						[Example: --with-nspr-libs=/usr/lib/mozilla])
2040
					enable_nss="no"
2041
				else
2042
					nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
2043
2044
					case "$host" in
2045
						*solaris*)
2046
							nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
2047
							;;
2048
					esac
2049
				fi
2050
			else
2051
				nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2052
			fi
2053
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2054
			AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2055
			[
2056
				LIBS_save=$LIBS
2057
				LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2058
				LIBS="$nsslibs $nsprlibs"
2059
2060
				AC_TRY_LINK_FUNC(NSS_Init,
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2061
					[ac_cv_moz_nss_libs="yes"],
2062
					[ac_cv_moz_nss_libs="no"])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2063
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2064
				if test "x$ac_cv_moz_nss_libs" = "xno"; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2065
					nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2066
					LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2067
					LIBS="$LIBS $nsslibs"
2068
					AC_TRY_LINK_FUNC(NSS_Init,
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2069
						[ac_cv_moz_nss_libs="yes"],
2070
						[ac_cv_moz_nss_libs="no"])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2071
				fi
2072
2073
				LDFLAGS=$LDFLAGS_save
2074
				LIBS=$LIBS_save
2075
			])
2076
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2077
			if test "x$ac_cv_moz_nss_libs" != "xno"; then
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2078
				AC_DEFINE(HAVE_NSS)
2079
				AC_DEFINE(HAVE_SSL)
2080
2081
				NSS_LIBS="-L$with_nss_libs $nsslibs"
2082
2083
				if test "$enable_nss" = "static"; then
2084
					msg_nss="Mozilla NSS (static)"
2085
				else
2086
					msg_nss="Mozilla NSS"
2087
				fi
2088
2089
				enable_nss="yes"
2090
			else
2091
				NSS_CFLAGS=""
2092
				NSPR_CFLAGS=""
2093
				NSPR_LIBS=""
2094
				enable_nss="no"
2095
			fi
2096
		else
2097
			AC_MSG_CHECKING(for Mozilla nss libraries)
2098
			AC_MSG_RESULT(no)
2099
		fi
2100
2101
		NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
2102
		NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
2103
	fi
2104
2105
	AC_SUBST(NSS_CFLAGS)
2106
	AC_SUBST(NSS_LIBS)
2107
fi
2108
2109
AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
2110
2111
if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
2112
	msg_ssl="$msg_nss and $msg_gnutls"
2113
elif test "x$msg_nss" != "x"; then
2114
	msg_ssl=$msg_nss
2115
elif test "x$msg_gnutls" != "x"; then
2116
	msg_ssl=$msg_gnutls
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2117
elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2118
	AC_MSG_ERROR([
2119
Neither GnuTLS or NSS SSL development headers found.
2120
Use --disable-nss --disable-gnutls if you do not need SSL support.
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2121
MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2122
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2123
elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2124
	AC_MSG_ERROR([
2125
GnuTLS SSL development headers not found.
2126
Use --disable-gnutls if you do not need SSL support.
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2127
MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2128
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2129
elif test "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2130
	AC_MSG_ERROR([
2131
NSS SSL development headers not found.
2132
Use --disable-nss if you do not need SSL support.
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2133
MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2134
])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2135
fi
2136
2137
dnl #######################################################################
2138
dnl # Check for Tcl
2139
dnl #######################################################################
2140
AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
2141
	[compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
2142
AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
2143
	[directory containing tclConfig.sh])])
2144
2145
if test "$enable_plugins" = no; then
2146
	enable_tcl=no
2147
fi
2148
2149
if test "$enable_tcl" = yes; then
2150
	AC_MSG_CHECKING([for tclConfig.sh])
2151
	TCLCONFIG=no
2152
	TCLCONFIGDIRS="/usr/lib \
2153
			/usr/lib64 \
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2154
			/usr/lib/tcl8.5 \
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2155
			/usr/lib/tcl8.4 \
2156
			/usr/lib/tcl8.3 \
2157
			/usr/lib/tcl8.2 \
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2158
			/usr/lib64/tcl8.5 \
2159
			/usr/lib64/tcl8.4 \
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2160
			/System/Library/Tcl/8.3 \
2161
			/usr/local/lib"
2162
	for dir in $with_tclconfig $TCLCONFIGDIRS; do
2163
		if test -f $dir/tclConfig.sh; then
2164
			TCLCONFIG=$dir/tclConfig.sh
2165
			AC_MSG_RESULT([yes ($TCLCONFIG)])
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2166
			break
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2167
		fi
2168
	done
2169
	if test "$TCLCONFIG" = "no"; then
2170
		AC_MSG_RESULT([no])
2171
		enable_tcl=no
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2172
		if test "x$force_deps" = "xyes" ; then
2173
			AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2174
Tcl development headers not found.
2175
Use --disable-tcl if you do not need Tcl scripting support.
2176
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2177
		fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2178
	else
2179
		. $TCLCONFIG
2180
		AC_MSG_CHECKING([Tcl version compatability])
2181
		if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
2182
			AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
2183
			enable_tcl=no
2184
		else
2185
			AC_MSG_RESULT([ok, $TCL_VERSION])
2186
			eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
2187
			AC_MSG_CHECKING([for Tcl linkability])
2188
			oldCPPFLAGS=$CPPFLAGS
2189
			CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2190
			oldLIBS=$LIBS
2191
			LIBS="$LIBS $TCL_LIB_SPEC"
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2192
			AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2193
				[[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2194
				[AC_MSG_RESULT([yes]);enable_tcl=yes],
2195
				[AC_MSG_RESULT([no]);enable_tcl=no])
2196
			CPPFLAGS="$oldCPPFLAGS"
2197
			LIBS="$oldLIBS"
2198
		fi
2199
	fi
2200
fi
2201
2202
if test "$enable_tcl" = yes; then
2203
	AM_CONDITIONAL(USE_TCL, true)
2204
	TCL_LIBS=$TCL_LIB_SPEC
2205
	AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
2206
	AC_SUBST(TCL_LIBS)
2207
	TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2208
	if test "x$GCC" = "xyes"; then
2209
		TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
2210
	fi
2211
	AC_SUBST(TCL_CFLAGS)
2212
else
2213
	AM_CONDITIONAL(USE_TCL, false)
2214
fi
2215
2216
dnl #######################################################################
2217
dnl # Check for Tk
2218
dnl #######################################################################
2219
AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
2220
	[compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
2221
AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
2222
	[directory containing tkConfig.sh])])
2223
2224
if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2225
	AC_MSG_CHECKING([for tkConfig.sh])
2226
	TKCONFIG=no
2227
	TKCONFIGDIRS="/usr/lib \
2228
			/usr/lib64 \
1.3.13 by Ari Pollak
Import upstream version 2.7.4
2229
			/usr/lib/tk8.5 \
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2230
			/usr/lib/tk8.4 \
2231
			/usr/lib/tk8.3 \
2232
			/usr/lib/tk8.2 \
2233
			/usr/local/lib"
2234
	for dir in $with_tkconfig $TKCONFIGDIRS; do
2235
		if test -f $dir/tkConfig.sh; then
2236
			TKCONFIG=$dir/tkConfig.sh
2237
			AC_MSG_RESULT([yes ($TKCONFIG)])
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2238
			break
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2239
		fi
2240
	done
2241
	if test "$TKCONFIG" = "no"; then
2242
		AC_MSG_RESULT([no])
2243
		enable_tk=no
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2244
		if test "x$force_deps" = "xyes" ; then
2245
			AC_MSG_ERROR([
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2246
Tk development headers not found.
2247
Use --disable-tk if you do not need Tk scripting support.
2248
])
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2249
		fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2250
	else
2251
		. $TKCONFIG
2252
		eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
2253
		AC_MSG_CHECKING([for Tk linkability])
2254
		oldCPPFLAGS=$CPPFLAGS
2255
		CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2256
		oldLIBS=$LIBS
2257
		LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2258
		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2259
				[[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2260
				[AC_MSG_RESULT([yes]);enable_tk=yes],
2261
				[AC_MSG_RESULT([no]);enable_tk=no])
2262
		CPPFLAGS="$oldCPPFLAGS"
2263
		LIBS="$oldLIBS"
2264
	fi
2265
else
2266
	enable_tk=no
2267
fi
2268
2269
if test "$enable_tk" = yes; then
2270
	AM_CONDITIONAL(USE_TK, true)
2271
	AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
2272
	TK_LIBS=$TK_LIB_SPEC
2273
	AC_SUBST(TK_LIBS)
2274
else
2275
	AM_CONDITIONAL(USE_TK, false)
2276
fi
2277
2278
if test "$ac_cv_cygwin" = yes ; then
2279
	LDADD="$LDADD -static"
2280
	AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2281
fi
2282
2283
AC_SUBST(DEBUG_CFLAGS)
2284
AC_SUBST(LDADD)
2285
AC_SUBST(LIBS)
2286
2287
if test "x$enable_plugins" = "xyes" ; then
2288
	AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
2289
	AM_CONDITIONAL(PLUGINS, true)
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2290
	PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2291
else
2292
	AM_CONDITIONAL(PLUGINS, false)
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2293
	PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2294
fi
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2295
AC_SUBST(PLUGINS_DEFINE)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2296
2297
dnl #######################################################################
2298
dnl # Check for Cyrus-SASL (for Jabber)
2299
dnl #######################################################################
2300
dnl AC_CHECK_SIZEOF(short)
2301
AC_CHECK_FUNCS(snprintf connect)
2302
AC_SUBST(SASL_LIBS)
2303
AC_ARG_ENABLE(cyrus-sasl, AC_HELP_STRING([--enable-cyrus-sasl], [enable Cyrus SASL support for jabberd]), enable_cyrus_sasl=$enableval, enable_cyrus_sasl=no)
2304
if test "x$enable_cyrus_sasl" = "xyes" ; then
2305
	AC_CHECK_LIB(sasl2, sasl_client_init, [
1.3.8 by Ari Pollak
Import upstream version 2.6.6
2306
			AM_CONDITIONAL(USE_CYRUS_SASL, true)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2307
			AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2308
			SASL_LIBS=-"lsasl2"
2309
		], [
1.3.8 by Ari Pollak
Import upstream version 2.6.6
2310
			AM_CONDITIONAL(USE_CYRUS_SASL, false)
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2311
			AC_MSG_ERROR([Cyrus SASL library not found])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2312
		])
1.3.8 by Ari Pollak
Import upstream version 2.6.6
2313
else
2314
	AM_CONDITIONAL(USE_CYRUS_SASL, false)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2315
fi
2316
2317
dnl #######################################################################
2318
dnl # Check for Kerberos (for Zephyr)
2319
dnl #######################################################################
2320
AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
2321
AC_SUBST(KRB4_CFLAGS)
2322
AC_SUBST(KRB4_LDFLAGS)
2323
AC_SUBST(KRB4_LIBS)
2324
if test "$kerberos" != "no" ; then
2325
	if test "$kerberos" != "yes" ; then
2326
		KRB4_CFLAGS="-I${kerberos}/include"
2327
		if test -d "$kerberos/include/kerberosIV" ; then
2328
			KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
2329
		fi
2330
		KRB4_LDFLAGS="-L${kerberos}/lib"
2331
	elif test -d /usr/local/include/kerberosIV ; then
2332
		KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
2333
	elif test -d /usr/include/kerberosIV ; then
2334
		KRB4_CFLAGS="-I/usr/include/kerberosIV"
2335
	fi
2336
	AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
2337
2338
	orig_LDFLAGS="$LDFLAGS"
2339
	LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2340
	AC_CHECK_LIB(krb4, krb_rd_req,
2341
			[KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2342
			[AC_CHECK_LIB(krb, krb_rd_req,
2343
				[KRB4_LIBS="-lkrb -ldes"],
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2344
				[AC_MSG_ERROR([Kerberos 4 libraries not found])],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2345
				-ldes)],
2346
			-ldes425 -lkrb5 -lk5crypto -lcom_err)
2347
	orig_LIBS="$LIBS"
2348
	LIBS="$LIBS $KRB4_LIBS"
2349
	AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2350
	AC_CHECK_FUNCS(krb_get_err_text krb_log)
2351
	LIBS="$orig_LIBS"
2352
	LDFLAGS="$orig_LDFLAGS"
2353
fi
2354
2355
dnl #######################################################################
2356
dnl # Check for external libzephyr
2357
dnl #######################################################################
2358
AC_SUBST(ZEPHYR_CFLAGS)
2359
AC_SUBST(ZEPHYR_LDFLAGS)
2360
AC_SUBST(ZEPHYR_LIBS)
2361
if test "$zephyr" != "no" ; then
2362
	if test "$zephyr" != "yes" ; then
2363
		ZEPHYR_CFLAGS="-I${zephyr}/include"
2364
		ZEPHYR_LDFLAGS="-L${zephyr}/lib"
2365
	elif test -d /usr/athena/include/zephyr ; then
2366
		ZEPHYR_CFLAGS="-I/usr/athena/include"
2367
	elif test -d /usr/include/zephyr ; then
2368
		ZEPHYR_CFLAGS="-I/usr/include"
2369
	elif test -d /usr/local/include/zephyr ; then
2370
		ZEPHYR_CFLAGS="-I/usr/local/include"
2371
	fi
2372
	AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
2373
	AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2374
	orig_LDFLAGS="$LDFLAGS"
2375
	LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2376
	AC_CHECK_LIB(zephyr, ZInitialize,
2377
		[ZEPHYR_LIBS="-lzephyr"],
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2378
		[AC_MSG_ERROR([Zephyr libraries not found])],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2379
		-lzephyr)
2380
	orig_LIBS="$LIBS"
2381
	LIBS="$orig_LIBS"
2382
	LDFLAGS="$orig_LDFLAGS"
2383
fi
2384
2385
AC_MSG_CHECKING(for me pot o' gold)
2386
AC_MSG_RESULT(no)
1.3.18 by Ari Pollak
Import upstream version 2.7.11
2387
AC_CHECK_FUNCS(gethostid lrand48 timegm)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2388
AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2389
AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2390
AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2391
AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2392
AC_CHECK_HEADERS(termios.h)
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2393
2394
# sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2395
# sys/sysctl.h on FreeBSD requires sys/types.h
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2396
AC_CHECK_HEADERS(sys/param.h)
2397
AC_CHECK_HEADERS(sys/sysctl.h, [], [],
2398
	[[
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2399
		#include <sys/types.h>
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2400
		#ifdef HAVE_PARAM_H
2401
		# include <sys/param.h>
2402
		#endif
2403
	]])
2404
2405
AC_CHECK_HEADERS(sys/socket.h)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2406
AC_VAR_TIMEZONE_EXTERNALS
2407
2408
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2409
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2410
                #include <time.h>
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2411
        ]], [[
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2412
                struct tm tm;
2413
                tm.tm_gmtoff = 1;
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2414
        ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2415
if test $ac_cv_struct_tm_gmtoff = yes; then
2416
        AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2417
fi
2418
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2419
AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2420
	AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2421
#include <stdlib.h>
2422
	void f (int i, ...) {
2423
	va_list args1, args2;
2424
	va_start (args1, i);
2425
	args2 = args1;
2426
	if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2427
	  exit (1);
2428
	va_end (args1); va_end (args2);
2429
	}
2430
	int main() {
2431
	  f (0, 42);
2432
	  return 0;
2433
	}]])],
2434
	[ac_cv_va_val_copy=yes],
2435
	[ac_cv_va_val_copy=no],
2436
	[ac_cv_va_val_copy=yes])
2437
])
2438
2439
if test "x$ac_cv_va_val_copy" = "xno"; then
2440
	AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2441
fi
2442
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2443
dnl #######################################################################
2444
dnl # Check for check
2445
dnl #######################################################################
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2446
PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([no, testing is disabled])])
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2447
AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
2448
AC_SUBST(CHECK_CFLAGS)
2449
AC_SUBST(CHECK_LIBS)
2450
2451
dnl #######################################################################
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2452
dnl # Disable pixmap installation
2453
dnl #######################################################################
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2454
AC_ARG_ENABLE(pixmaps-install, AC_HELP_STRING([--disable-pixmaps-install], [disable installation of pixmap files - Pidgin still needs them!]), enable_pixmaps="$enableval", enable_pixmaps=yes)
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2455
2456
AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2457
2458
dnl #######################################################################
1.3.10 by Ari Pollak
Import upstream version 2.7.1
2459
dnl # Tweak status tray icon installation directory
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2460
dnl #######################################################################
1.3.10 by Ari Pollak
Import upstream version 2.7.1
2461
AC_ARG_ENABLE(trayicon-compat, AC_HELP_STRING([--enable-trayicon-compat], [install tray icons in location compatible with older releases of hicolor-icon-theme]), enable_traycompat="$enableval", enable_traycompat=no)
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2462
1.3.10 by Ari Pollak
Import upstream version 2.7.1
2463
AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes")
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2464
2465
dnl #######################################################################
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2466
dnl # Check for Doxygen and dot (part of GraphViz)
2467
dnl #######################################################################
2468
AC_ARG_ENABLE(doxygen,
2469
	[AC_HELP_STRING([--disable-doxygen],
1.1.16 by Didier Roche
Import upstream version 2.5.4
2470
		[disable documentation with doxygen])],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2471
	enable_doxygen="$enableval", enable_doxygen="yes")
2472
AC_ARG_ENABLE(dot,
1.1.16 by Didier Roche
Import upstream version 2.5.4
2473
	[AC_HELP_STRING([--disable-dot],
2474
		[disable graphs in doxygen via 'dot'])],
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2475
	enable_dot="$enableval", enable_dot="yes")
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2476
AC_ARG_ENABLE(devhelp,
1.1.16 by Didier Roche
Import upstream version 2.5.4
2477
	[AC_HELP_STRING([--disable-devhelp],
2478
		[disable building index for devhelp documentation browser])],
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2479
	enable_devhelp="$enableval", enable_devhelp="yes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2480
2481
if test "x$enable_doxygen" = xyes; then
2482
	AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
2483
	if test $DOXYGEN = false; then
2484
		AC_MSG_WARN([*** Doxygen not found, docs will not be available])
2485
		enable_doxygen="no"
2486
	else
2487
		AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
2488
2489
		if test "x$enable_dot" = "xyes"; then
2490
			AC_CHECK_PROG(DOT, dot, true, false)
2491
2492
			if test $DOT = false; then
2493
				enable_dot="no";
2494
				AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
2495
			else
2496
				AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
2497
			fi
2498
		fi
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2499
2500
		if test "x$enable_devhelp" = "xyes"; then
2501
			AC_CHECK_PROG(XSLTPROC, xsltproc, true, false)
2502
2503
			if test $XSLTPROC = false; then
2504
				enable_devhelp="no";
2505
				AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created])
2506
			else
2507
				AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index])
2508
			fi
2509
		fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2510
	fi
2511
else
2512
	enable_dot="no"
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2513
	enable_devhelp="no"
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2514
fi
2515
2516
AC_SUBST(enable_doxygen)
2517
AC_SUBST(enable_dot)
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2518
AC_SUBST(enable_devhelp)
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2519
AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2520
AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes")
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2521
2522
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
2523
	[compile with debugging support])], , enable_debug=no)
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
2524
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2525
if test "x$enable_debug" = "xyes" ; then
2526
	AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2527
fi
2528
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
2529
AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2530
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2531
AC_CONFIG_FILES([Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2532
		   Doxyfile
2533
		   doc/Makefile
2534
		   doc/pidgin.1
2535
		   doc/finch.1
2536
		   m4macros/Makefile
2537
		   pidgin.apspec
2538
		   pidgin/Makefile
2539
		   pidgin/pidgin.pc
2540
		   pidgin/pidgin-uninstalled.pc
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2541
		   pidgin/pidgin-2.pc
2542
		   pidgin/pidgin-2-uninstalled.pc
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2543
		   pidgin/pixmaps/Makefile
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
2544
		   pidgin/pixmaps/emotes/default/24/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2545
		   pidgin/pixmaps/emotes/none/Makefile
1.1.15 by Nick Ellery
Import upstream version 2.5.3
2546
		   pidgin/pixmaps/emotes/small/16/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2547
		   pidgin/plugins/Makefile
2548
		   pidgin/plugins/cap/Makefile
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2549
		   pidgin/plugins/disco/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2550
		   pidgin/plugins/gestures/Makefile
2551
		   pidgin/plugins/gevolution/Makefile
2552
		   pidgin/plugins/musicmessaging/Makefile
2553
		   pidgin/plugins/perl/Makefile
2554
		   pidgin/plugins/perl/common/Makefile.PL
2555
		   pidgin/plugins/ticker/Makefile
1.3.18 by Ari Pollak
Import upstream version 2.7.11
2556
		   libpurple/ciphers/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2557
		   libpurple/example/Makefile
2558
		   libpurple/gconf/Makefile
2559
		   libpurple/purple.pc
2560
		   libpurple/purple-uninstalled.pc
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2561
		   libpurple/purple-2.pc
2562
		   libpurple/purple-2-uninstalled.pc
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2563
		   libpurple/plugins/Makefile
2564
		   libpurple/plugins/mono/Makefile
2565
		   libpurple/plugins/mono/api/Makefile
2566
		   libpurple/plugins/mono/loader/Makefile
2567
		   libpurple/plugins/perl/Makefile
2568
		   libpurple/plugins/perl/common/Makefile.PL
2569
		   libpurple/plugins/ssl/Makefile
2570
		   libpurple/plugins/tcl/Makefile
2571
		   libpurple/Makefile
2572
		   libpurple/protocols/Makefile
2573
		   libpurple/protocols/bonjour/Makefile
2574
		   libpurple/protocols/gg/Makefile
2575
		   libpurple/protocols/irc/Makefile
2576
		   libpurple/protocols/jabber/Makefile
2577
		   libpurple/protocols/msn/Makefile
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
2578
		   libpurple/protocols/myspace/Makefile
1.3.6 by Ari Pollak
Import upstream version 2.6.4
2579
		   libpurple/protocols/mxit/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2580
		   libpurple/protocols/novell/Makefile
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
2581
		   libpurple/protocols/null/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2582
		   libpurple/protocols/oscar/Makefile
2583
		   libpurple/protocols/sametime/Makefile
2584
		   libpurple/protocols/silc/Makefile
1.1.1 by Sebastien Bacher
Import upstream version 2.0.2
2585
		   libpurple/protocols/silc10/Makefile
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2586
		   libpurple/protocols/simple/Makefile
2587
		   libpurple/protocols/yahoo/Makefile
2588
		   libpurple/protocols/zephyr/Makefile
2589
		   libpurple/tests/Makefile
1.1.7 by Pedro Fragoso
Import upstream version 2.3.1
2590
		   libpurple/purple.h
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2591
		   libpurple/version.h
1.1.3 by Sebastien Bacher
Import upstream version 2.1.1
2592
		   share/sounds/Makefile
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
2593
		   share/ca-certs/Makefile
1.1.6 by Loic Minier
Import upstream version 2.2.2
2594
		   finch/finch.pc
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2595
		   finch/Makefile
2596
		   finch/libgnt/Makefile
2597
		   finch/libgnt/gnt.pc
2598
		   finch/libgnt/wms/Makefile
2599
		   finch/plugins/Makefile
2600
		   po/Makefile.in
2601
		   pidgin.spec
2602
		  ])
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2603
AC_OUTPUT
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2604
2605
echo
2606
echo $PACKAGE $VERSION
2607
2608
echo
2609
echo Build GTK+ 2.x UI............. : $enable_gtkui
2610
echo Build console UI.............. : $enable_consoleui
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
2611
echo Build for X11................. : $with_x
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2612
echo
1.1.4 by Sebastien Bacher
Import upstream version 2.2.0
2613
echo Enable Gestures............... : $enable_gestures
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2614
echo Protocols to build dynamically : $DYNAMIC_PRPLS
2615
echo Protocols to link statically.. : $STATIC_PRPLS
2616
echo
2617
echo Build with GStreamer support.. : $enable_gst
2618
echo Build with D-Bus support...... : $enable_dbus
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2619
echo Build with voice and video.... : $enable_vv
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2620
if test "x$enable_dbus" = "xyes" ; then
2621
	eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2622
fi
1.3.3 by Ari Pollak
Import upstream version 2.6.1
2623
echo Build with GNU Libidn......... : $enable_idn
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2624
echo Build with NetworkManager..... : $enable_nm
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2625
echo SSL Library/Libraries......... : $msg_ssl
1.1.12 by Sebastien Bacher
Import upstream version 2.5.0
2626
if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2627
	eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2628
fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2629
echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2630
echo Use kerberos 4 with zephyr.... : $kerberos
2631
echo Use external libzephyr........ : $zephyr
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2632
echo Use external libgadu.......... : $gadu_libs
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2633
echo Install pixmaps............... : $enable_pixmaps
1.3.10 by Ari Pollak
Import upstream version 2.7.1
2634
echo Old tray icon compatibility... : $enable_traycompat
1.1.9 by Pedro Fragoso
Import upstream version 2.4.1
2635
echo Install translations.......... : $enable_i18n
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2636
echo Has you....................... : yes
2637
echo
2638
echo Use XScreenSaver Extension.... : $enable_screensaver
2639
echo Use X Session Management...... : $enable_sm
2640
echo Use startup notification...... : $enable_startup_notification
2641
echo Build with GtkSpell support... : $enable_gtkspell
2642
echo
2643
echo Build with plugin support..... : $enable_plugins
2644
echo Build with Mono support....... : $enable_mono
2645
echo Build with Perl support....... : $enable_perl
2646
echo Build with Tcl support........ : $enable_tcl
2647
echo Build with Tk support......... : $enable_tk
2648
echo
2649
echo Print debugging messages...... : $enable_debug
2650
echo
2651
eval eval echo Pidgin will be installed in $bindir.
2652
if test "x$pidginpath" != "x" ; then
2653
	echo Warning: You have an old copy of Pidgin at $pidginpath.
2654
fi
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2655
if test "x$enable_pixmaps" = "xno" ; then
2656
	echo
2657
	echo Warning: You have disabled the installation of pixmap data, but Pidgin
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2658
	echo still requires installed pixmaps.  Be sure you know what you are doing.
2659
fi
2660
if test "x$enable_i18n" = "xno" ; then
2661
	echo
1.3.10 by Ari Pollak
Import upstream version 2.7.1
2662
	echo Warning: You have disabled the building and installation of translation
1.3.9 by Ari Pollak
Import upstream version 2.7.0
2663
	echo data.  This will prevent building pidgin.desktop and the GConf schemas.
2664
	echo Be sure you know what you are doing.
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2665
fi
1 by Ari Pollak
Import upstream version 2.0.0+dfsg.1
2666
echo
2667
echo configure complete, now type \'make\'
2668
echo
1.1.10 by Pedro Fragoso
Import upstream version 2.4.2
2669