~ubuntu-branches/ubuntu/quantal/pidgin/quantal

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