configure.ac

branch
cpw.masca.webkit
changeset 32503
ab886d3a38ae
parent 32498
943ecd58841b
parent 31939
233a6752b653
child 32507
5d345f996c80
equal deleted inserted replaced
32502:e64e49502c79 32503:ab886d3a38ae
41 # For code under development: [devel] 41 # For code under development: [devel]
42 # For production releases: [] 42 # For production releases: []
43 # 43 #
44 # Make sure to update finch/libgnt/configure.ac with libgnt version changes. 44 # Make sure to update finch/libgnt/configure.ac with libgnt version changes.
45 # 45 #
46 m4_define([purple_lt_current], [6]) 46 m4_define([purple_lt_current], [9])
47 m4_define([purple_major_version], [2]) 47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [6]) 48 m4_define([purple_minor_version], [9])
49 m4_define([purple_micro_version], [6]) 49 m4_define([purple_micro_version], [1])
50 m4_define([purple_version_suffix], [devel]) 50 m4_define([purple_version_suffix], [devel])
51 m4_define([purple_version], 51 m4_define([purple_version],
52 [purple_major_version.purple_minor_version.purple_micro_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])) 53 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
54 54
55 m4_define([gnt_lt_current], [6]) 55 m4_define([gnt_lt_current], [8])
56 m4_define([gnt_major_version], [2]) 56 m4_define([gnt_major_version], [2])
57 m4_define([gnt_minor_version], [6]) 57 m4_define([gnt_minor_version], [8])
58 m4_define([gnt_micro_version], [6]) 58 m4_define([gnt_micro_version], [9])
59 m4_define([gnt_version_suffix], [devel]) 59 m4_define([gnt_version_suffix], [devel])
60 m4_define([gnt_version], 60 m4_define([gnt_version],
61 [gnt_major_version.gnt_minor_version.gnt_micro_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])) 62 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
63 63
70 will fail. Relocate this source tree to a path that does not contain 70 will fail. Relocate this source tree to a path that does not contain
71 spaces and run configure again. 71 spaces and run configure again.
72 ]) 72 ])
73 fi 73 fi
74 74
75 AC_CANONICAL_SYSTEM 75 AC_CANONICAL_HOST
76 AM_CONFIG_HEADER(config.h) 76 AC_CONFIG_HEADERS([config.h])
77 AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2]) 77 AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2])
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])])
78 80
79 PURPLE_MAJOR_VERSION=purple_major_version 81 PURPLE_MAJOR_VERSION=purple_major_version
80 PURPLE_MINOR_VERSION=purple_minor_version 82 PURPLE_MINOR_VERSION=purple_minor_version
81 PURPLE_MICRO_VERSION=purple_micro_version 83 PURPLE_MICRO_VERSION=purple_micro_version
82 PURPLE_VERSION=[purple_display_version] 84 PURPLE_VERSION=[purple_display_version]
110 AM_PROG_CC_C_O 112 AM_PROG_CC_C_O
111 AC_DISABLE_STATIC 113 AC_DISABLE_STATIC
112 AC_PROG_LIBTOOL 114 AC_PROG_LIBTOOL
113 LIBTOOL="$LIBTOOL --silent" 115 LIBTOOL="$LIBTOOL --silent"
114 AC_PROG_INSTALL 116 AC_PROG_INSTALL
115 AC_PROG_INTLTOOL
116 PKG_PROG_PKG_CONFIG 117 PKG_PROG_PKG_CONFIG
117 AC_FUNC_ALLOCA 118 AC_FUNC_ALLOCA
118 GETTEXT_PACKAGE=pidgin 119
119 AC_SUBST(GETTEXT_PACKAGE) 120 dnl Check for Sun compiler
120 121 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
121
122 # before gettexting, in case iconv matters
123 case "$host_os" in
124 darwin*)
125 AC_CHECK_LIB(resolv, res_query)
126
127 AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
128 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
129 AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
130 LIBS="$LIBS -framework IOKit -framework CoreFoundation"
131 ], [])
132 ], [])
133
134 AC_MSG_CHECKING([for fink])
135 if test -d /sw; then
136 AC_MSG_RESULT([found, adding /sw to search paths])
137 CPPFLAGS="$CPPFLAGS -I/sw/include"
138 LDFLAGS="$LDFLAGS -L/sw/lib"
139 else
140 AC_MSG_RESULT([not found])
141 fi
142 ;;
143 *)
144 ;;
145 esac
146
147 ALL_LINGUAS="af am ar az be@latin bg bn 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 mk mn ms_MY my_MM nb ne nl nn oc 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"
148 AM_GLIB_GNU_GETTEXT
149
150 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
151 dnl AM_GLIB_GNU_GETTEXT found it.
152
153 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
154 then
155 AC_ERROR([
156
157 The msgfmt command is required to build libpurple. If it is installed
158 on your system, ensure that it is in your path. If it is not, install
159 GNU gettext to continue.
160
161 If you have msgfmt installed, but for some reason this error message
162 is still displayed, you have encountered what appears to be a bug in
163 third-party configure macros. Try setting the MSGFMT environment
164 variable to the absolute path to your msgfmt binary and trying
165 configure again, like this:
166
167 MSGFMT=/path/to/msgfmt ./configure ...
168 ])
169 fi
170
171 dnl we don't use autobreak on cygwin!!
172 dnl AC_CYGWIN
173 122
174 dnl Checks for header files. 123 dnl Checks for header files.
175 AC_HEADER_STDC 124 AC_HEADER_STDC
176 AC_HEADER_SYS_WAIT 125 AC_HEADER_SYS_WAIT
177 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h) 126 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
196 AC_LIBOBJ(getopt1) 145 AC_LIBOBJ(getopt1)
197 ]) 146 ])
198 147
199 dnl Check for inet_aton 148 dnl Check for inet_aton
200 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , 149 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
201 [AC_ERROR(inet_aton not found)])]) 150 [AC_MSG_ERROR([inet_aton not found])])])
202 AC_CHECK_LIB(resolv, __res_query) 151 AC_CHECK_LIB(resolv, __res_query)
203 AC_CHECK_LIB(nsl, gethostent) 152 AC_CHECK_LIB(nsl, gethostent)
204 AC_CHECK_FUNC(socket, , 153 AC_CHECK_FUNC(socket, ,
205 [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])]) 154 [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])])
206 dnl If all goes well, by this point the previous two checks will have 155 dnl If all goes well, by this point the previous two checks will have
207 dnl pulled in -lsocket and -lnsl if we need them. 156 dnl pulled in -lsocket and -lnsl if we need them.
208 AC_CHECK_FUNC(getaddrinfo, 157 AC_CHECK_FUNC(getaddrinfo,
209 [AC_DEFINE([HAVE_GETADDRINFO], [1], 158 [AC_DEFINE([HAVE_GETADDRINFO], [1],
210 [Define to 1 if you have the getaddrinfo function.])], 159 [Define to 1 if you have the getaddrinfo function.])],
211 [AC_CHECK_LIB(socket, getaddrinfo, 160 [AC_CHECK_LIB(socket, getaddrinfo,
212 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) 161 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
213 AC_CHECK_FUNCS(inet_ntop) 162 AC_CHECK_FUNCS(inet_ntop)
163 AC_CHECK_FUNCS(getifaddrs)
214 dnl Check for socklen_t (in Unix98) 164 dnl Check for socklen_t (in Unix98)
215 AC_MSG_CHECKING(for socklen_t) 165 AC_MSG_CHECKING(for socklen_t)
216 AC_TRY_COMPILE([ 166 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
217 #include <sys/types.h> 167 #include <sys/types.h>
218 #include <sys/socket.h> 168 #include <sys/socket.h>
219 socklen_t x; 169 socklen_t x;
220 ], [], 170 ]], [[]])], [
221 [
222 AC_MSG_RESULT(yes) 171 AC_MSG_RESULT(yes)
223 ], [ 172 ], [
224 AC_TRY_COMPILE([ 173 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
225 #include <sys/types.h> 174 #include <sys/types.h>
226 #include <sys/socket.h> 175 #include <sys/socket.h>
227 int accept(int, struct sockaddr *, size_t *); 176 int accept(int, struct sockaddr *, size_t *);
228 ], [], [ 177 ]], [[]])], [
229 AC_MSG_RESULT(size_t) 178 AC_MSG_RESULT(size_t)
230 AC_DEFINE(socklen_t, size_t, [socklen_t size]) 179 AC_DEFINE(socklen_t, size_t, [socklen_t size])
231 ], [ 180 ], [
232 AC_MSG_RESULT(int) 181 AC_MSG_RESULT(int)
233 AC_DEFINE(socklen_t, int, [socklen_t size]) 182 AC_DEFINE(socklen_t, int, [socklen_t size])
238 AC_CHECK_MEMBER([struct sockaddr.sa_len], 187 AC_CHECK_MEMBER([struct sockaddr.sa_len],
239 [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1], 188 [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
240 [Define if struct sockaddr has an sa_len member])],[:], 189 [Define if struct sockaddr has an sa_len member])],[:],
241 [#include <sys/socket.h>]) 190 [#include <sys/socket.h>])
242 191
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
243 dnl to prevent the g_stat()/g_unlink() crash, 198 dnl to prevent the g_stat()/g_unlink() crash,
244 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac 199 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
245 AC_SYS_LARGEFILE 200 AC_SYS_LARGEFILE
246 201
247 dnl FreeBSD doesn't have libdl, dlopen is provided by libc 202 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
248 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) 203 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
249 204
250 AC_MSG_CHECKING(for fileno()) 205 AC_MSG_CHECKING(for fileno())
251 AC_TRY_RUN([ 206 AC_RUN_IFELSE([AC_LANG_SOURCE([[
252 #include <stdio.h> 207 #include <stdio.h>
253 208
254 int main(int argc, char *argv[]) 209 int main(int argc, char *argv[])
255 { 210 {
256 int fd; 211 int fd;
257 212
258 fd = fileno(stdout); 213 fd = fileno(stdout);
259 214
260 return !(fd > 0); 215 return !(fd > 0);
261 } 216 }
262 ], [ 217 ]])], [
263 AC_MSG_RESULT(yes) 218 AC_MSG_RESULT(yes)
264 AC_DEFINE([HAVE_FILENO], [1], 219 AC_DEFINE([HAVE_FILENO], [1],
265 [Define to 1 if your stdio has int fileno(FILE *).]) 220 [Define to 1 if your stdio has int fileno(FILE *).])
266 ], [ 221 ], [
267 AC_MSG_RESULT(no) 222 AC_MSG_RESULT(no)
270 # This will enable the compatibility code. 225 # This will enable the compatibility code.
271 AC_MSG_RESULT(no) 226 AC_MSG_RESULT(no)
272 ]) 227 ])
273 228
274 AC_MSG_CHECKING(for the %z format string in strftime()) 229 AC_MSG_CHECKING(for the %z format string in strftime())
275 AC_TRY_RUN([ 230 AC_RUN_IFELSE([AC_LANG_SOURCE([[
276 #ifdef HAVE_SYS_TIME_H 231 #ifdef HAVE_SYS_TIME_H
277 #include <sys/time.h> 232 #include <sys/time.h>
278 #endif 233 #endif
279 #include <time.h> 234 #include <time.h>
280 #include <stdio.h> 235 #include <stdio.h>
294 (buf[2] >= '0' && buf[2] <= '9') && 249 (buf[2] >= '0' && buf[2] <= '9') &&
295 (buf[3] >= '0' && buf[3] <= '9') && 250 (buf[3] >= '0' && buf[3] <= '9') &&
296 (buf[4] >= '0' && buf[4] <= '9') 251 (buf[4] >= '0' && buf[4] <= '9')
297 ); 252 );
298 } 253 }
299 ], [ 254 ]])], [
300 AC_MSG_RESULT(yes) 255 AC_MSG_RESULT(yes)
301 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1], 256 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
302 [Define to 1 if you have a strftime() that supports the %z format string.]) 257 [Define to 1 if you have a strftime() that supports the %z format string.])
303 ], [ 258 ], [
304 AC_MSG_RESULT(no) 259 AC_MSG_RESULT(no)
305 ], [ 260 ], [
306 # Fallback for Cross Compiling... 261 # Fallback for Cross Compiling...
307 # This will enable the compatibility code. 262 # This will enable the compatibility code.
308 AC_MSG_RESULT(no) 263 AC_MSG_RESULT(no)
309 ] 264 ])
310 ) 265
311 266 # before gettexting, in case iconv matters
312 dnl ####################################################################### 267 case "$host_os" in
313 dnl # Check for GLib 2.0 (required) 268 darwin*)
314 dnl ####################################################################### 269 AC_CHECK_LIB(resolv, res_query)
315 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.4.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [ 270
271 AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
272 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
273 AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
274 LIBS="$LIBS -framework IOKit -framework CoreFoundation"
275 ], [])
276 ], [])
277
278 AC_MSG_CHECKING([for fink])
279 if test -d /sw; then
280 AC_MSG_RESULT([found, adding /sw to search paths])
281 CPPFLAGS="$CPPFLAGS -I/sw/include"
282 LDFLAGS="$LDFLAGS -L/sw/lib"
283 else
284 AC_MSG_RESULT([not found])
285 fi
286 ;;
287 *)
288 ;;
289 esac
290
291 dnl #######################################################################
292 dnl # Disable creation and installation of translation files
293 dnl #######################################################################
294 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
295
296 if test x$enable_i18n = xyes; then
297 AC_PROG_INTLTOOL
298 GETTEXT_PACKAGE=pidgin
299 AC_SUBST(GETTEXT_PACKAGE)
300
301 ALL_LINGUAS="af am ar az be@latin bg bn bn_IN bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy id it ja ka km kn ko ku lo lt mai mhr mk mn mr ms_MY my_MM nb ne nl nn oc or pa pl pt_BR pt ps ro ru si sk sl sq sr sr@latin sv sw ta te th tr uk ur vi xh zh_CN zh_HK zh_TW"
302 AM_GLIB_GNU_GETTEXT
303
304 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
305 dnl AM_GLIB_GNU_GETTEXT found it.
306
307 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
308 then
309 AC_MSG_ERROR([
310
311 The msgfmt command is required to build libpurple. If it is installed
312 on your system, ensure that it is in your path. If it is not, install
313 GNU gettext to continue.
314
315 If you have msgfmt installed, but for some reason this error message
316 is still displayed, you have encountered what appears to be a bug in
317 third-party configure macros. Try setting the MSGFMT environment
318 variable to the absolute path to your msgfmt binary and trying
319 configure again, like this:
320
321 MSGFMT=/path/to/msgfmt ./configure ...
322 ])
323 fi
324 fi #enable_i18n
325
326 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
327
328 dnl #######################################################################
329 dnl # Check for GLib 2.16 (required)
330 dnl #######################################################################
331 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
316 AC_MSG_RESULT(no) 332 AC_MSG_RESULT(no)
317 AC_MSG_ERROR([ 333 AC_MSG_ERROR([
318 334
319 You must have GLib 2.4.0 or newer development headers installed to build. 335 You must have GLib 2.16.0 or newer development headers installed to build.
320 336
321 If you have these installed already you may need to install pkg-config so 337 If you have these installed already you may need to install pkg-config so
322 I can find them. 338 I can find them.
323 ])]) 339 ])])
324 AC_SUBST(GLIB_CFLAGS) 340 AC_SUBST(GLIB_CFLAGS)
350 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui], 366 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
351 [compile without console user interface])], 367 [compile without console user interface])],
352 [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no]) 368 [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
353 369
354 dnl ####################################################################### 370 dnl #######################################################################
355 dnl # Check for GTK+ 2.0 and other things used by the GTK UI 371 dnl # Check for GTK+ 2.10 and other things used by the GTK UI
356 dnl ####################################################################### 372 dnl #######################################################################
357 AC_ARG_ENABLE(screensaver, 373 AC_ARG_ENABLE(screensaver,
358 [AC_HELP_STRING([--disable-screensaver], 374 [AC_HELP_STRING([--disable-screensaver],
359 [compile without X screensaver extension (used to detect idleness)])], 375 [compile without X screensaver extension (used to detect idleness)])],
360 enable_screensaver="$enableval", enable_screensaver="yes") 376 enable_screensaver="$enableval", enable_screensaver="yes")
397 else 413 else
398 x_incpath_add="-I$x_includes" 414 x_incpath_add="-I$x_includes"
399 fi 415 fi
400 416
401 if test "x$enable_gtkui" = "xyes" ; then 417 if test "x$enable_gtkui" = "xyes" ; then
402 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], , [ 418 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
403 AC_MSG_RESULT(no) 419 AC_MSG_RESULT(no)
404 AC_MSG_ERROR([ 420 AC_MSG_ERROR([
405 421
406 You must have GTK+ 2.4.0 or newer development headers installed to compile 422 You must have GTK+ 2.10.0 or newer development headers installed to compile
407 Pidgin. If you want to build only Finch then specify --disable-gtkui when 423 Pidgin. If you want to build only Finch then specify --disable-gtkui when
408 running configure. 424 running configure.
409 ])]) 425 ])])
410 426
411 AC_SUBST(GTK_CFLAGS) 427 AC_SUBST(GTK_CFLAGS)
424 [AC_MSG_RESULT(no) 440 [AC_MSG_RESULT(no)
425 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then 441 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
426 X11_LIBS="$x_libpath_add" 442 X11_LIBS="$x_libpath_add"
427 X11_CFLAGS="$x_incpath_add" 443 X11_CFLAGS="$x_incpath_add"
428 else 444 else
445 with_x="no"
429 if test "x$force_deps" = "xyes" ; then 446 if test "x$force_deps" = "xyes" ; then
430 AC_MSG_ERROR([ 447 AC_MSG_ERROR([
431 X11 development headers not found. 448 X11 development headers not found.
432 Use --without-x if you do not need X11 support. 449 Use --without-x if you do not need X11 support.
433 ]) 450 ])
454 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) 471 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
455 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) 472 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
456 if test "x$XSS_LIBS" != "x"; then 473 if test "x$XSS_LIBS" != "x"; then
457 oldCPPFLAGS="$CPPFLAGS" 474 oldCPPFLAGS="$CPPFLAGS"
458 CPPFLAGS="$CPPFLAGS $x_incpath_add" 475 CPPFLAGS="$CPPFLAGS $x_incpath_add"
459 AC_TRY_COMPILE([ 476 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
460 #include <X11/Xlib.h> 477 #include <X11/Xlib.h>
461 #include <X11/extensions/scrnsaver.h> 478 #include <X11/extensions/scrnsaver.h>
462 ], [], [], [enable_screensaver=no]) 479 ]], [[]])], [], [enable_screensaver=no])
463 CPPFLAGS="$oldCPPFLAGS" 480 CPPFLAGS="$oldCPPFLAGS"
464 else 481 else
465 enable_screensaver=no 482 enable_screensaver=no
466 fi 483 fi
467 LIBS="$old_LIBS" 484 LIBS="$old_LIBS"
521 enable_gestures=no 538 enable_gestures=no
522 fi 539 fi
523 fi 540 fi
524 541
525 dnl ####################################################################### 542 dnl #######################################################################
526 dnl # Check for startup notification
527 dnl #######################################################################
528 if test "x$enable_startup_notification" = "xyes"; then
529 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [
530 AC_MSG_RESULT(no)
531 if test "x$force_deps" = "xyes" ; then
532 AC_MSG_ERROR([
533 Startup notification development headers not found.
534 Use --disable-startup-notification if you do not need it.
535 ])
536 fi])
537
538 if test "x$enable_startup_notification" = "xyes"; then
539 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
540 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
541 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
542 fi
543 fi
544
545 dnl #######################################################################
546 dnl # Check for GtkSpell 543 dnl # Check for GtkSpell
547 dnl ####################################################################### 544 dnl #######################################################################
548 if test "x$enable_gtkspell" = "xyes" ; then 545 if test "x$enable_gtkspell" = "xyes" ; then
549 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [ 546 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
550 AC_MSG_RESULT(no) 547 AC_MSG_RESULT(no)
548 enable_gtkspell="no"
551 if test "x$force_deps" = "xyes" ; then 549 if test "x$force_deps" = "xyes" ; then
552 AC_MSG_ERROR([ 550 AC_MSG_ERROR([
553 GtkSpell development headers not found. 551 GtkSpell development headers not found.
554 Use --disable-gtkspell if you do not need it. 552 Use --disable-gtkspell if you do not need it.
555 ]) 553 ])
565 dnl # Check for stuff needed by the Evolution integration plugin. 563 dnl # Check for stuff needed by the Evolution integration plugin.
566 dnl ####################################################################### 564 dnl #######################################################################
567 if test "x$enable_gevolution" = "xyes"; then 565 if test "x$enable_gevolution" = "xyes"; then
568 evo_deps="libebook-1.2 libedata-book-1.2" 566 evo_deps="libebook-1.2 libedata-book-1.2"
569 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [ 567 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
570 AC_MSG_RESULT(yes)
571 enable_gevolution="no" 568 enable_gevolution="no"
572 ]) 569 ])
573 if test "x$enable_gevolution" = "xno"; then 570 if test "x$enable_gevolution" = "xno"; then
574 evo_deps="libebook-1.0 libedata-book-1.0" 571 evo_deps="libebook-1.0 libedata-book-1.0"
575 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ 572 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
576 enable_gevolution="yes" 573 enable_gevolution="yes"
577 ], [
578 AC_MSG_RESULT(yes)
579 ]) 574 ])
580 fi 575 fi
581 if test "x$enable_gevolution" = "xyes"; then 576 if test "x$enable_gevolution" = "xyes"; then
582 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) 577 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
583 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) 578 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
596 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin) 591 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
597 dnl ####################################################################### 592 dnl #######################################################################
598 if test "x$enable_cap" = "xyes"; then 593 if test "x$enable_cap" = "xyes"; then
599 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[ 594 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
600 AC_MSG_RESULT(no) 595 AC_MSG_RESULT(no)
596 enable_cap="no"
601 if test "x$force_deps" = "xyes" ; then 597 if test "x$force_deps" = "xyes" ; then
602 AC_MSG_ERROR([ 598 AC_MSG_ERROR([
603 sqlite3 development headers not found. 599 sqlite3 development headers not found.
604 Use --disable-cap if you do not need the Contact Availability Prediction plugin. 600 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
605 ]) 601 ])
639 dnl # Some distros put the headers in ncursesw/, some don't 635 dnl # Some distros put the headers in ncursesw/, some don't
640 found_ncurses_h=no 636 found_ncurses_h=no
641 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include 637 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
642 do 638 do
643 f="$location/ncurses.h" 639 f="$location/ncurses.h"
640 orig_CFLAGS="$CFLAGS"
641 orig_CPPFLAGS="$CPPFLAGS"
642 CFLAGS="$CFLAGS -I$location"
643 CPPFLAGS="$CPPFLAGS -I$location"
644 AC_CHECK_HEADER($f,[ 644 AC_CHECK_HEADER($f,[
645 AC_MSG_CHECKING([if $f supports wide characters]) 645 AC_MSG_CHECKING([if $f supports wide characters])
646 AC_TRY_COMPILE([ 646 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
647 #define _XOPEN_SOURCE_EXTENDED 647 #define _XOPEN_SOURCE_EXTENDED
648 #include <$f> 648 #include <$f>
649 ], [ 649 ]], [[
650 #ifndef get_wch 650 #ifndef get_wch
651 # error get_wch not found! 651 # error get_wch not found!
652 #endif 652 #endif
653 ], [ 653 ]])], [
654 dir=$location 654 dir=$location
655 if test x"$dir" != x"." ; then 655 if test x"$dir" != x"." ; then
656 GNT_CFLAGS="-I$dir/" 656 GNT_CFLAGS="-I$dir/"
657 else 657 else
658 GNT_CFLAGS="" 658 GNT_CFLAGS=""
659 fi 659 fi
660 660
661 found_ncurses_h=yes 661 found_ncurses_h=yes
662 CFLAGS="$orig_CFLAGS"
663 CPPFLAGS="$orig_CPPFLAGS"
662 AC_MSG_RESULT([yes]) 664 AC_MSG_RESULT([yes])
663 break 665 break
664 ], [ 666 ], [
667 CFLAGS="$orig_CFLAGS"
668 CPPFLAGS="$orig_CPPFLAGS"
665 AC_MSG_RESULT([no]) 669 AC_MSG_RESULT([no])
666 ]) 670 ])
667 ]) 671 ])
668 done 672 done
669 673
746 [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [], 750 [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
747 [Define if gst_registry_fork_set_enabled exists])], 751 [Define if gst_registry_fork_set_enabled exists])],
748 [], [$GSTREAMER_LIBS]) 752 [], [$GSTREAMER_LIBS])
749 ], [ 753 ], [
750 AC_MSG_RESULT(no) 754 AC_MSG_RESULT(no)
755 enable_gst="no"
751 if test "x$force_deps" = "xyes" ; then 756 if test "x$force_deps" = "xyes" ; then
752 AC_MSG_ERROR([ 757 AC_MSG_ERROR([
753 GStreamer development headers not found. 758 GStreamer development headers not found.
754 Use --disable-gstreamer if you do not need GStreamer (sound) support. 759 Use --disable-gstreamer if you do not need GStreamer (sound) support.
755 ]) 760 ])
826 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN]) 831 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
827 AC_SUBST(IDN_CFLAGS) 832 AC_SUBST(IDN_CFLAGS)
828 AC_SUBST(IDN_LIBS) 833 AC_SUBST(IDN_LIBS)
829 ], [ 834 ], [
830 AC_MSG_RESULT(no) 835 AC_MSG_RESULT(no)
836 enable_idn="no"
831 if test "x$force_deps" = "xyes" ; then 837 if test "x$force_deps" = "xyes" ; then
832 AC_MSG_ERROR([ 838 AC_MSG_ERROR([
833 GNU Libidn development headers not found. 839 GNU Libidn development headers not found.
834 Use --disable-idn if you do not need it. 840 Use --disable-idn if you do not need it.
835 ]) 841 ])
898 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib " 904 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
899 fi 905 fi
900 AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS) 906 AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
901 fi 907 fi
902 908
903 if test "x$enable_avahi" = "xyes" -a "x$force_deps" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then 909 if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
904 AC_MSG_ERROR([ 910 enable_avahi="no"
911 if test "x$force_deps" = "xyes"; then
912 AC_MSG_ERROR([
905 avahi development headers not found. 913 avahi development headers not found.
906 Use --disable-avahi if you do not need avahi (Bonjour) support. 914 Use --disable-avahi if you do not need avahi (Bonjour) support.
907 ]) 915 ])
916 fi
908 fi 917 fi
909 AC_SUBST(AVAHI_CFLAGS) 918 AC_SUBST(AVAHI_CFLAGS)
910 AC_SUBST(AVAHI_LIBS) 919 AC_SUBST(AVAHI_LIBS)
911 920
912 921
987 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h]) 996 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
988 elif test "x$silc10client" = "xyes"; then 997 elif test "x$silc10client" = "xyes"; then
989 CPPFLAGS_save="$CPPFLAGS" 998 CPPFLAGS_save="$CPPFLAGS"
990 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS" 999 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
991 AC_MSG_CHECKING(for silcmime.h) 1000 AC_MSG_CHECKING(for silcmime.h)
992 AC_TRY_COMPILE([ 1001 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
993 #include <silcincludes.h> 1002 #include <silcincludes.h>
994 #include <silcmime.h> 1003 #include <silcmime.h>
995 ], [], [ 1004 ]], [[]])], [
996 AC_MSG_RESULT(yes) 1005 AC_MSG_RESULT(yes)
997 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h]) 1006 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
998 ], [ 1007 ], [
999 AC_MSG_RESULT(no) 1008 AC_MSG_RESULT(no)
1000 ]) 1009 ])
1012 gadu_manual_check="yes" 1021 gadu_manual_check="yes"
1013 else 1022 else
1014 gadu_manual_check="no" 1023 gadu_manual_check="no"
1015 fi 1024 fi
1016 if test "x$gadu_manual_check" = "xno"; then 1025 if test "x$gadu_manual_check" = "xno"; then
1017 PKG_CHECK_MODULES(GADU, libgadu, [ 1026 PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.0], [
1018 gadu_includes="yes" 1027 gadu_includes="yes"
1019 gadu_libs="yes" 1028 gadu_libs="yes"
1020 ], [ 1029 ], [
1021 gadu_includes="no" 1030 gadu_includes="no"
1022 ]) 1031 ])
1039 1048
1040 if test "x$gadu_libs" = "xyes"; then 1049 if test "x$gadu_libs" = "xyes"; then
1041 AC_MSG_CHECKING(for libgadu GPL compatibility) 1050 AC_MSG_CHECKING(for libgadu GPL compatibility)
1042 CPPFLAGS_save="$CPPFLAGS" 1051 CPPFLAGS_save="$CPPFLAGS"
1043 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS" 1052 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1044 AC_TRY_COMPILE([#include <libgadu.h>], [ 1053 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1045 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL) 1054 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1046 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support." 1055 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1047 #endif 1056 #endif
1048 ], [ 1057 ]])], [
1049 AC_MSG_RESULT(yes) 1058 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1050 AC_DEFINE([HAVE_LIBGADU], [1], 1059 #if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1051 [Define to 1 if you have libgadu.]) 1060 #error "Your libgadu version is too old. libpurple requires 1.11.0 or higher."
1061 #endif
1062 ]])], [
1063 AC_MSG_RESULT(yes)
1064 AC_DEFINE([HAVE_LIBGADU], [1],
1065 [Define to 1 if you have libgadu.])
1066 ], [
1067 AC_MSG_RESULT(no)
1068 echo
1069 echo
1070 echo "Your supplied copy of libgadu is too old."
1071 echo "Install version 1.11.0 or newer."
1072 echo "Then rerun this ./configure"
1073 echo
1074 echo "Falling back to using our own copy of libgadu"
1075 echo
1076 GADU_LIBS=""
1077 GADU_CFLAGS=""
1078 gadu_libs=no
1079 ])
1052 ], [ 1080 ], [
1053 AC_MSG_RESULT(no) 1081 AC_MSG_RESULT(no)
1054 echo 1082 echo
1055 echo 1083 echo
1056 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support." 1084 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1067 CPPFLAGS="$CPPFLAGS_save" 1095 CPPFLAGS="$CPPFLAGS_save"
1068 fi 1096 fi
1069 1097
1070 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes") 1098 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1071 1099
1100 if test "x$gadu_libs" = "x"; then
1101 gadu_libs=no
1102 fi
1103
1072 AC_SUBST(GADU_LIBS) 1104 AC_SUBST(GADU_LIBS)
1073 AC_SUBST(GADU_CFLAGS) 1105 AC_SUBST(GADU_CFLAGS)
1074
1075 # change the next line to not make MSNP15 the default (s/disable/enable/; s/yes/no/;)
1076 AC_ARG_ENABLE(msnp15,[AC_HELP_STRING([--disable-msnp15], [Disable the newer MSNP15 protocol])],enable_msnp15=$enableval,enable_msnp15=yes)
1077 1106
1078 AC_ARG_ENABLE(distrib,,,enable_distrib=no) 1107 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1079 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") 1108 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1080 DYNAMIC_PRPLS=all 1109 DYNAMIC_PRPLS=all
1081 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=""]) 1110 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=""])
1082 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then 1111 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1083 DYNAMIC_PRPLS="" 1112 DYNAMIC_PRPLS=""
1084 fi 1113 fi
1085 1114
1086 if test "x$STATIC_PRPLS" = "xall" ; then 1115 if test "x$STATIC_PRPLS" = "xall" ; then
1087 STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr" 1116 STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1088 fi 1117 fi
1089 if test "x$have_meanwhile" != "xyes" ; then 1118 if test "x$have_meanwhile" != "xyes" ; then
1090 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'` 1119 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1091 fi 1120 fi
1092 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then 1121 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1093 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'` 1122 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1094 fi
1095 if test "x$enable_msnp15" != "xyes" ; then
1096 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/msn/msnp9/'`
1097 fi 1123 fi
1098 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 1124 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1099 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'` 1125 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1100 fi 1126 fi
1101 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then 1127 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1123 else 1149 else
1124 if test "x$i" = "xsilc"; then 1150 if test "x$i" = "xsilc"; then
1125 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la" 1151 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1126 elif test "x$i" = "xsilc10"; then 1152 elif test "x$i" = "xsilc10"; then
1127 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la" 1153 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1128 elif test "x$i" = "xmsnp9"; then
1129 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libmsn.la"
1130 else 1154 else
1131 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la" 1155 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1132 fi 1156 fi
1133 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();" 1157 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1134 load_proto="$load_proto purple_init_${i}_plugin();" 1158 load_proto="$load_proto purple_init_${i}_plugin();"
1137 bonjour) static_bonjour=yes ;; 1161 bonjour) static_bonjour=yes ;;
1138 gg) static_gg=yes ;; 1162 gg) static_gg=yes ;;
1139 irc) static_irc=yes ;; 1163 irc) static_irc=yes ;;
1140 jabber) static_jabber=yes ;; 1164 jabber) static_jabber=yes ;;
1141 msn) static_msn=yes ;; 1165 msn) static_msn=yes ;;
1142 msnp9) static_msn=yes ;;
1143 myspace) static_myspace=yes ;; 1166 myspace) static_myspace=yes ;;
1144 mxit) static_mxit=yes ;; 1167 mxit) static_mxit=yes ;;
1145 novell) static_novell=yes ;; 1168 novell) static_novell=yes ;;
1146 oscar) static_oscar=yes ;; 1169 oscar) static_oscar=yes ;;
1147 aim) static_oscar=yes ;; 1170 aim) static_oscar=yes ;;
1148 icq) static_oscar=yes ;; 1171 icq) static_oscar=yes ;;
1149 qq) static_qq=yes ;;
1150 sametime) static_sametime=yes ;; 1172 sametime) static_sametime=yes ;;
1151 silc) static_silc=yes ;; 1173 silc) static_silc=yes ;;
1152 silc10) static_silc=yes ;; 1174 silc10) static_silc=yes ;;
1153 simple) static_simple=yes ;; 1175 simple) static_simple=yes ;;
1154 yahoo) static_yahoo=yes ;; 1176 yahoo) static_yahoo=yes ;;
1163 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") 1185 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1164 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes") 1186 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1165 AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes") 1187 AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes")
1166 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes") 1188 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1167 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") 1189 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1168 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
1169 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes") 1190 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1170 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes") 1191 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1171 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes") 1192 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1172 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes") 1193 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
1173 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes") 1194 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1175 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto }, 1196 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto },
1176 [Loads static protocol plugin module initialization functions.]) 1197 [Loads static protocol plugin module initialization functions.])
1177 1198
1178 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`]) 1199 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1179 if test "x$DYNAMIC_PRPLS" = "xall" ; then 1200 if test "x$DYNAMIC_PRPLS" = "xall" ; then
1180 DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr" 1201 DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1181 fi 1202 fi
1182 if test "x$have_meanwhile" != "xyes"; then 1203 if test "x$have_meanwhile" != "xyes"; then
1183 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` 1204 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1184 fi 1205 fi
1185 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then 1206 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1186 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` 1207 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1187 fi
1188 if test "x$enable_msnp15" != "xyes" ; then
1189 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/msn/msnp9/'`
1190 fi 1208 fi
1191 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 1209 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1192 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'` 1210 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1193 fi 1211 fi
1194 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then 1212 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1200 bonjour) dynamic_bonjour=yes ;; 1218 bonjour) dynamic_bonjour=yes ;;
1201 gg) dynamic_gg=yes ;; 1219 gg) dynamic_gg=yes ;;
1202 irc) dynamic_irc=yes ;; 1220 irc) dynamic_irc=yes ;;
1203 jabber) dynamic_jabber=yes ;; 1221 jabber) dynamic_jabber=yes ;;
1204 msn) dynamic_msn=yes ;; 1222 msn) dynamic_msn=yes ;;
1205 msnp9) dynamic_msn=yes ;;
1206 myspace) dynamic_myspace=yes ;; 1223 myspace) dynamic_myspace=yes ;;
1207 mxit) dynamic_mxit=yes ;; 1224 mxit) dynamic_mxit=yes ;;
1208 novell) dynamic_novell=yes ;; 1225 novell) dynamic_novell=yes ;;
1209 null) dynamic_null=yes ;; 1226 null) dynamic_null=yes ;;
1210 oscar) dynamic_oscar=yes ;; 1227 oscar) dynamic_oscar=yes ;;
1211 aim) dynamic_oscar=yes ;; 1228 aim) dynamic_oscar=yes ;;
1212 icq) dynamic_oscar=yes ;; 1229 icq) dynamic_oscar=yes ;;
1213 qq) dynamic_qq=yes ;;
1214 sametime) dynamic_sametime=yes ;; 1230 sametime) dynamic_sametime=yes ;;
1215 silc) dynamic_silc=yes ;; 1231 silc) dynamic_silc=yes ;;
1216 silc10) dynamic_silc=yes ;; 1232 silc10) dynamic_silc=yes ;;
1217 simple) dynamic_simple=yes ;; 1233 simple) dynamic_simple=yes ;;
1218 yahoo) dynamic_yahoo=yes ;; 1234 yahoo) dynamic_yahoo=yes ;;
1271 "-Wundef" \ 1287 "-Wundef" \
1272 ; do 1288 ; do
1273 orig_CFLAGS="$CFLAGS" 1289 orig_CFLAGS="$CFLAGS"
1274 CFLAGS="$CFLAGS $newflag" 1290 CFLAGS="$CFLAGS $newflag"
1275 AC_MSG_CHECKING(for $newflag option to gcc) 1291 AC_MSG_CHECKING(for $newflag option to gcc)
1276 AC_TRY_COMPILE([], [ 1292 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1277 int main() {return 0;} 1293 int main() {return 0;}
1278 ], [ 1294 ]])], [
1279 AC_MSG_RESULT(yes) 1295 AC_MSG_RESULT(yes)
1280 CFLAGS="$orig_CFLAGS" 1296 CFLAGS="$orig_CFLAGS"
1281 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag" 1297 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1282 ], [ 1298 ], [
1283 AC_MSG_RESULT(no) 1299 AC_MSG_RESULT(no)
1285 ]) 1301 ])
1286 done 1302 done
1287 1303
1288 if test "x$enable_fortify" = "xyes"; then 1304 if test "x$enable_fortify" = "xyes"; then
1289 AC_MSG_CHECKING(for FORTIFY_SOURCE support) 1305 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1290 AC_TRY_COMPILE([#include <features.h>], [ 1306 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1291 int main() { 1307 int main() {
1292 #if !(__GNUC_PREREQ (4, 1) \ 1308 #if !(__GNUC_PREREQ (4, 1) \
1293 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \ 1309 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1294 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \ 1310 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1295 && __GNUC_MINOR__ == 4 \ 1311 && __GNUC_MINOR__ == 4 \
1297 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8)))) 1313 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1298 #error No FORTIFY_SOURCE support 1314 #error No FORTIFY_SOURCE support
1299 #endif 1315 #endif
1300 return 0; 1316 return 0;
1301 } 1317 }
1302 ], [ 1318 ]])], [
1303 AC_MSG_RESULT(yes) 1319 AC_MSG_RESULT(yes)
1304 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2" 1320 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1305 ], [ 1321 ], [
1306 AC_MSG_RESULT(no) 1322 AC_MSG_RESULT(no)
1307 ]) 1323 ])
1308 fi 1324 fi
1309 1325
1310 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS" 1326 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1311 CFLAGS="-g $CFLAGS" 1327 CFLAGS="-g $CFLAGS"
1328 fi
1329
1330 if test "x$SUNCC" = "xyes"; then
1331 CFLAGS="$CFLAGS -features=extensions"
1312 fi 1332 fi
1313 AC_SUBST(CFLAGS) 1333 AC_SUBST(CFLAGS)
1314 1334
1315 AC_PATH_PROG(pidginpath, pidgin) 1335 AC_PATH_PROG(pidginpath, pidgin)
1316 1336
1379 AC_ARG_WITH([python], 1399 AC_ARG_WITH([python],
1380 AC_HELP_STRING([--with-python=PATH], 1400 AC_HELP_STRING([--with-python=PATH],
1381 [which python interpreter to use for dbus code generation]), 1401 [which python interpreter to use for dbus code generation]),
1382 PYTHON=$withval) 1402 PYTHON=$withval)
1383 1403
1384 if test "x$enable_dbus" = "xyes" ; then 1404 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1385 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then 1405 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1386 AC_PATH_PROG([PYTHON], [python], [no]) 1406 AC_PATH_PROG([PYTHON], [python], [no])
1387 fi 1407 fi
1388 1408
1389 if test x"$PYTHON" = x"no" ; then 1409 if test x"$PYTHON" = x"no" ; then
1390 AC_MSG_WARN([python interpreter not found in your path]) 1410 AC_MSG_WARN([python interpreter not found in your path])
1391 enable_dbus=no 1411 enable_dbus=no
1392 fi 1412 fi
1393 fi 1413
1394
1395 if test "x$enable_dbus" = "xyes" ; then
1396 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then 1414 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1397 AC_MSG_WARN([python version >= 2.4 required]) 1415 AC_MSG_WARN([python version >= 2.4 required])
1398 enable_dbus=no 1416 enable_dbus=no
1399 fi 1417 fi
1400 fi 1418 fi
1440 break 1458 break
1441 fi 1459 fi
1442 done 1460 done
1443 1461
1444 if test -z $DBUS_SERVICES_DIR ; then 1462 if test -z $DBUS_SERVICES_DIR ; then
1445 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify it's location.]) 1463 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify its location.])
1446 fi 1464 fi
1447 else 1465 else
1448 DBUS_SERVICES_DIR="$datadir/dbus-1/services" 1466 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1449 fi 1467 fi
1450 fi 1468 fi
1461 1479
1462 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") 1480 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1463 1481
1464 dnl Check for Python headers (currently useful only for libgnt) 1482 dnl Check for Python headers (currently useful only for libgnt)
1465 dnl (Thanks to XChat) 1483 dnl (Thanks to XChat)
1466 AC_PATH_PROG(pythonpath, python) 1484 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1467 if test "_$pythonpath" != _ ; then
1468 AC_MSG_CHECKING(for Python compile flags) 1485 AC_MSG_CHECKING(for Python compile flags)
1469 PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'` 1486 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1470 PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'` 1487 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1471 changequote(<<, >>)dnl 1488 changequote(<<, >>)dnl
1472 PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'` 1489 PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1473 PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'` 1490 PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1474 changequote([, ])dnl 1491 changequote([, ])dnl
1475 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then 1492 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1493 AC_MSG_RESULT()
1476 AC_CHECK_LIB(pthread, pthread_create, ) 1494 AC_CHECK_LIB(pthread, pthread_create, )
1477 AC_CHECK_LIB(util, openpty, ) 1495 AC_CHECK_LIB(util, openpty, )
1478 AC_CHECK_LIB(db, dbopen, ) 1496 AC_CHECK_LIB(db, dbopen, )
1479 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION" 1497 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1480 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" 1498 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1481 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.]) 1499 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1500 dnl Because the above AC_CHECK_LIB get in the way...
1501 AC_MSG_CHECKING(for Python compile flags)
1482 AC_MSG_RESULT(ok) 1502 AC_MSG_RESULT(ok)
1483 else 1503 else
1484 AC_MSG_RESULT([Can't find Python.h]) 1504 AC_MSG_RESULT([Can't find Python.h])
1485 PY_LIBS="" 1505 PY_LIBS=""
1486 PY_CFLAGS="" 1506 PY_CFLAGS=""
1658 1678
1659 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]) 1679 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])
1660 1680
1661 SSL_CERTIFICATES_DIR="" 1681 SSL_CERTIFICATES_DIR=""
1662 if ! test -z "$ssl_certificates_dir" ; then 1682 if ! test -z "$ssl_certificates_dir" ; then
1683 if test "x$ssl_certificates_dir" = "xyes" ; then
1684 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1685 fi
1663 if ! test -d "$ssl_certificates_dir" ; then 1686 if ! test -d "$ssl_certificates_dir" ; then
1664 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.]) 1687 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1665 fi 1688 fi
1666 SSL_CERTIFICATES_DIR="$ssl_certificates_dir" 1689 SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1667 fi 1690 fi
1765 1788
1766 AC_SUBST(GNUTLS_CFLAGS) 1789 AC_SUBST(GNUTLS_CFLAGS)
1767 AC_SUBST(GNUTLS_LIBS) 1790 AC_SUBST(GNUTLS_LIBS)
1768 1791
1769 if test "x$enable_gnutls" = "xyes"; then 1792 if test "x$enable_gnutls" = "xyes"; then
1770 AC_MSG_CHECKING(for gnutls_priority_set_direct) 1793 AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1771 LIBS_save="$LIBS" 1794 LIBS_save="$LIBS"
1772 LIBS="$LIBS $GNUTLS_LIBS" 1795 LIBS="$LIBS $GNUTLS_LIBS"
1773 CPPFLAGS_save="$CPPFLAGS" 1796 CPPFLAGS_save="$CPPFLAGS"
1774 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS" 1797 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1775 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]], 1798 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1776 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);]])], 1799 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1777 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1, 1800 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1778 [Define if your gnutls has gnutls_priority_set_direct and friends]) 1801 [Define if your gnutls has gnutls_priority_set_direct and friends])
1779 AC_MSG_RESULT(yes)], 1802 AC_MSG_RESULT(yes)],
1780 [AC_MSG_RESULT(no)]) 1803 [AC_MSG_RESULT(no)])
1781 CPPFLAGS="$CPPFLAGS_save" 1804 CPPFLAGS="$CPPFLAGS_save"
2134 /usr/local/lib" 2157 /usr/local/lib"
2135 for dir in $with_tclconfig $TCLCONFIGDIRS; do 2158 for dir in $with_tclconfig $TCLCONFIGDIRS; do
2136 if test -f $dir/tclConfig.sh; then 2159 if test -f $dir/tclConfig.sh; then
2137 TCLCONFIG=$dir/tclConfig.sh 2160 TCLCONFIG=$dir/tclConfig.sh
2138 AC_MSG_RESULT([yes ($TCLCONFIG)]) 2161 AC_MSG_RESULT([yes ($TCLCONFIG)])
2162 break
2139 fi 2163 fi
2140 done 2164 done
2141 if test "$TCLCONFIG" = "no"; then 2165 if test "$TCLCONFIG" = "no"; then
2142 AC_MSG_RESULT([no]) 2166 AC_MSG_RESULT([no])
2143 enable_tcl=no 2167 enable_tcl=no
2159 AC_MSG_CHECKING([for Tcl linkability]) 2183 AC_MSG_CHECKING([for Tcl linkability])
2160 oldCPPFLAGS=$CPPFLAGS 2184 oldCPPFLAGS=$CPPFLAGS
2161 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" 2185 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2162 oldLIBS=$LIBS 2186 oldLIBS=$LIBS
2163 LIBS="$LIBS $TCL_LIB_SPEC" 2187 LIBS="$LIBS $TCL_LIB_SPEC"
2164 AC_TRY_LINK([#include <tcl.h>], 2188 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2165 [Tcl_Interp *interp=NULL; Tcl_Init(interp)], 2189 [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
2166 [AC_MSG_RESULT([yes]);enable_tcl=yes], 2190 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2167 [AC_MSG_RESULT([no]);enable_tcl=no]) 2191 [AC_MSG_RESULT([no]);enable_tcl=no])
2168 CPPFLAGS="$oldCPPFLAGS" 2192 CPPFLAGS="$oldCPPFLAGS"
2169 LIBS="$oldLIBS" 2193 LIBS="$oldLIBS"
2170 fi 2194 fi
2196 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then 2220 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2197 AC_MSG_CHECKING([for tkConfig.sh]) 2221 AC_MSG_CHECKING([for tkConfig.sh])
2198 TKCONFIG=no 2222 TKCONFIG=no
2199 TKCONFIGDIRS="/usr/lib \ 2223 TKCONFIGDIRS="/usr/lib \
2200 /usr/lib64 \ 2224 /usr/lib64 \
2225 /usr/lib/tk8.5 \
2201 /usr/lib/tk8.4 \ 2226 /usr/lib/tk8.4 \
2202 /usr/lib/tk8.3 \ 2227 /usr/lib/tk8.3 \
2203 /usr/lib/tk8.2 \ 2228 /usr/lib/tk8.2 \
2204 /usr/local/lib" 2229 /usr/local/lib"
2205 for dir in $with_tkconfig $TKCONFIGDIRS; do 2230 for dir in $with_tkconfig $TKCONFIGDIRS; do
2206 if test -f $dir/tkConfig.sh; then 2231 if test -f $dir/tkConfig.sh; then
2207 TKCONFIG=$dir/tkConfig.sh 2232 TKCONFIG=$dir/tkConfig.sh
2208 AC_MSG_RESULT([yes ($TKCONFIG)]) 2233 AC_MSG_RESULT([yes ($TKCONFIG)])
2234 break
2209 fi 2235 fi
2210 done 2236 done
2211 if test "$TKCONFIG" = "no"; then 2237 if test "$TKCONFIG" = "no"; then
2212 AC_MSG_RESULT([no]) 2238 AC_MSG_RESULT([no])
2213 enable_tk=no 2239 enable_tk=no
2223 AC_MSG_CHECKING([for Tk linkability]) 2249 AC_MSG_CHECKING([for Tk linkability])
2224 oldCPPFLAGS=$CPPFLAGS 2250 oldCPPFLAGS=$CPPFLAGS
2225 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS" 2251 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2226 oldLIBS=$LIBS 2252 oldLIBS=$LIBS
2227 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" 2253 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2228 AC_TRY_LINK([#include <tk.h>], 2254 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2229 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);], 2255 [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
2230 [AC_MSG_RESULT([yes]);enable_tk=yes], 2256 [AC_MSG_RESULT([yes]);enable_tk=yes],
2231 [AC_MSG_RESULT([no]);enable_tk=no]) 2257 [AC_MSG_RESULT([no]);enable_tk=no])
2232 CPPFLAGS="$oldCPPFLAGS" 2258 CPPFLAGS="$oldCPPFLAGS"
2233 LIBS="$oldLIBS" 2259 LIBS="$oldLIBS"
2234 fi 2260 fi
2276 AM_CONDITIONAL(USE_CYRUS_SASL, true) 2302 AM_CONDITIONAL(USE_CYRUS_SASL, true)
2277 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present]) 2303 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2278 SASL_LIBS=-"lsasl2" 2304 SASL_LIBS=-"lsasl2"
2279 ], [ 2305 ], [
2280 AM_CONDITIONAL(USE_CYRUS_SASL, false) 2306 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2281 AC_ERROR(Cyrus SASL library not found) 2307 AC_MSG_ERROR([Cyrus SASL library not found])
2282 ]) 2308 ])
2283 else 2309 else
2284 AM_CONDITIONAL(USE_CYRUS_SASL, false) 2310 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2285 fi 2311 fi
2286 2312
2309 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS" 2335 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2310 AC_CHECK_LIB(krb4, krb_rd_req, 2336 AC_CHECK_LIB(krb4, krb_rd_req,
2311 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], 2337 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2312 [AC_CHECK_LIB(krb, krb_rd_req, 2338 [AC_CHECK_LIB(krb, krb_rd_req,
2313 [KRB4_LIBS="-lkrb -ldes"], 2339 [KRB4_LIBS="-lkrb -ldes"],
2314 [AC_ERROR(Kerberos 4 libraries not found)], 2340 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
2315 -ldes)], 2341 -ldes)],
2316 -ldes425 -lkrb5 -lk5crypto -lcom_err) 2342 -ldes425 -lkrb5 -lk5crypto -lcom_err)
2317 orig_LIBS="$LIBS" 2343 orig_LIBS="$LIBS"
2318 LIBS="$LIBS $KRB4_LIBS" 2344 LIBS="$LIBS $KRB4_LIBS"
2319 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm) 2345 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2343 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") 2369 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2344 orig_LDFLAGS="$LDFLAGS" 2370 orig_LDFLAGS="$LDFLAGS"
2345 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS" 2371 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2346 AC_CHECK_LIB(zephyr, ZInitialize, 2372 AC_CHECK_LIB(zephyr, ZInitialize,
2347 [ZEPHYR_LIBS="-lzephyr"], 2373 [ZEPHYR_LIBS="-lzephyr"],
2348 [AC_ERROR(Zephyr libraries not found)], 2374 [AC_MSG_ERROR([Zephyr libraries not found])],
2349 -lzephyr) 2375 -lzephyr)
2350 orig_LIBS="$LIBS" 2376 orig_LIBS="$LIBS"
2351 LIBS="$orig_LIBS" 2377 LIBS="$orig_LIBS"
2352 LDFLAGS="$orig_LDFLAGS" 2378 LDFLAGS="$orig_LDFLAGS"
2353 fi 2379 fi
2354 2380
2355 AC_MSG_CHECKING(for me pot o' gold) 2381 AC_MSG_CHECKING(for me pot o' gold)
2356 AC_MSG_RESULT(no) 2382 AC_MSG_RESULT(no)
2357 AC_CHECK_FUNCS(gethostid lrand48) 2383 AC_CHECK_FUNCS(gethostid lrand48 timegm)
2358 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf) 2384 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2359 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h) 2385 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2360 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h) 2386 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2361 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) 2387 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2362 AC_CHECK_HEADERS(termios.h) 2388 AC_CHECK_HEADERS(termios.h)
2374 2400
2375 AC_CHECK_HEADERS(sys/socket.h) 2401 AC_CHECK_HEADERS(sys/socket.h)
2376 AC_VAR_TIMEZONE_EXTERNALS 2402 AC_VAR_TIMEZONE_EXTERNALS
2377 2403
2378 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, 2404 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2379 AC_TRY_COMPILE([ 2405 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2380 #include <time.h> 2406 #include <time.h>
2381 ], [ 2407 ]], [[
2382 struct tm tm; 2408 struct tm tm;
2383 tm.tm_gmtoff = 1; 2409 tm.tm_gmtoff = 1;
2384 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) 2410 ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
2385 if test $ac_cv_struct_tm_gmtoff = yes; then 2411 if test $ac_cv_struct_tm_gmtoff = yes; then
2386 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm]) 2412 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2387 fi 2413 fi
2388 2414
2389 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[ 2415 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2390 AC_TRY_RUN([#include <stdarg.h> 2416 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2391 #include <stdlib.h> 2417 #include <stdlib.h>
2392 void f (int i, ...) { 2418 void f (int i, ...) {
2393 va_list args1, args2; 2419 va_list args1, args2;
2394 va_start (args1, i); 2420 va_start (args1, i);
2395 args2 = args1; 2421 args2 = args1;
2398 va_end (args1); va_end (args2); 2424 va_end (args1); va_end (args2);
2399 } 2425 }
2400 int main() { 2426 int main() {
2401 f (0, 42); 2427 f (0, 42);
2402 return 0; 2428 return 0;
2403 }], 2429 }]])],
2404 [ac_cv_va_val_copy=yes], 2430 [ac_cv_va_val_copy=yes],
2405 [ac_cv_va_val_copy=no], 2431 [ac_cv_va_val_copy=no],
2406 [ac_cv_va_val_copy=yes]) 2432 [ac_cv_va_val_copy=yes])
2407 ]) 2433 ])
2408 2434
2424 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) 2450 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)
2425 2451
2426 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes") 2452 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2427 2453
2428 dnl ####################################################################### 2454 dnl #######################################################################
2429 dnl # Disable installation of translation files 2455 dnl # Tweak status tray icon installation directory
2430 dnl ####################################################################### 2456 dnl #######################################################################
2431 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes) 2457 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)
2432 2458
2433 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes") 2459 AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes")
2434 2460
2435 dnl ####################################################################### 2461 dnl #######################################################################
2436 dnl # Check for Doxygen and dot (part of GraphViz) 2462 dnl # Check for Doxygen and dot (part of GraphViz)
2437 dnl ####################################################################### 2463 dnl #######################################################################
2438 AC_ARG_ENABLE(doxygen, 2464 AC_ARG_ENABLE(doxygen,
2496 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) 2522 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2497 fi 2523 fi
2498 2524
2499 AM_CONDITIONAL(PURPLE_AVAILABLE, true) 2525 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2500 2526
2501 AC_OUTPUT([Makefile 2527 AC_CONFIG_FILES([Makefile
2502 Doxyfile 2528 Doxyfile
2503 doc/Makefile 2529 doc/Makefile
2504 doc/pidgin.1 2530 doc/pidgin.1
2505 doc/finch.1 2531 doc/finch.1
2506 m4macros/Makefile 2532 m4macros/Makefile
2507 pidgin.apspec 2533 pidgin.apspec
2508 pidgin/Makefile 2534 pidgin/Makefile
2509 pidgin/pidgin.pc 2535 pidgin/pidgin.pc
2510 pidgin/pidgin-uninstalled.pc 2536 pidgin/pidgin-uninstalled.pc
2537 pidgin/pidgin-2.pc
2538 pidgin/pidgin-2-uninstalled.pc
2511 pidgin/pixmaps/Makefile 2539 pidgin/pixmaps/Makefile
2512 pidgin/pixmaps/emotes/default/24/Makefile 2540 pidgin/pixmaps/emotes/default/24/Makefile
2513 pidgin/pixmaps/emotes/none/Makefile 2541 pidgin/pixmaps/emotes/none/Makefile
2514 pidgin/pixmaps/emotes/small/16/Makefile 2542 pidgin/pixmaps/emotes/small/16/Makefile
2515 pidgin/plugins/Makefile 2543 pidgin/plugins/Makefile
2520 pidgin/plugins/gevolution/Makefile 2548 pidgin/plugins/gevolution/Makefile
2521 pidgin/plugins/musicmessaging/Makefile 2549 pidgin/plugins/musicmessaging/Makefile
2522 pidgin/plugins/perl/Makefile 2550 pidgin/plugins/perl/Makefile
2523 pidgin/plugins/perl/common/Makefile.PL 2551 pidgin/plugins/perl/common/Makefile.PL
2524 pidgin/plugins/ticker/Makefile 2552 pidgin/plugins/ticker/Makefile
2553 libpurple/ciphers/Makefile
2525 libpurple/example/Makefile 2554 libpurple/example/Makefile
2526 libpurple/gconf/Makefile 2555 libpurple/gconf/Makefile
2527 libpurple/purple.pc 2556 libpurple/purple.pc
2528 libpurple/purple-uninstalled.pc 2557 libpurple/purple-uninstalled.pc
2558 libpurple/purple-2.pc
2559 libpurple/purple-2-uninstalled.pc
2529 libpurple/plugins/Makefile 2560 libpurple/plugins/Makefile
2530 libpurple/plugins/mono/Makefile 2561 libpurple/plugins/mono/Makefile
2531 libpurple/plugins/mono/api/Makefile 2562 libpurple/plugins/mono/api/Makefile
2532 libpurple/plugins/mono/loader/Makefile 2563 libpurple/plugins/mono/loader/Makefile
2533 libpurple/plugins/perl/Makefile 2564 libpurple/plugins/perl/Makefile
2539 libpurple/protocols/bonjour/Makefile 2570 libpurple/protocols/bonjour/Makefile
2540 libpurple/protocols/gg/Makefile 2571 libpurple/protocols/gg/Makefile
2541 libpurple/protocols/irc/Makefile 2572 libpurple/protocols/irc/Makefile
2542 libpurple/protocols/jabber/Makefile 2573 libpurple/protocols/jabber/Makefile
2543 libpurple/protocols/msn/Makefile 2574 libpurple/protocols/msn/Makefile
2544 libpurple/protocols/msnp9/Makefile
2545 libpurple/protocols/myspace/Makefile 2575 libpurple/protocols/myspace/Makefile
2546 libpurple/protocols/mxit/Makefile 2576 libpurple/protocols/mxit/Makefile
2547 libpurple/protocols/novell/Makefile 2577 libpurple/protocols/novell/Makefile
2548 libpurple/protocols/null/Makefile 2578 libpurple/protocols/null/Makefile
2549 libpurple/protocols/oscar/Makefile 2579 libpurple/protocols/oscar/Makefile
2550 libpurple/protocols/qq/Makefile
2551 libpurple/protocols/sametime/Makefile 2580 libpurple/protocols/sametime/Makefile
2552 libpurple/protocols/silc/Makefile 2581 libpurple/protocols/silc/Makefile
2553 libpurple/protocols/silc10/Makefile 2582 libpurple/protocols/silc10/Makefile
2554 libpurple/protocols/simple/Makefile 2583 libpurple/protocols/simple/Makefile
2555 libpurple/protocols/yahoo/Makefile 2584 libpurple/protocols/yahoo/Makefile
2566 finch/libgnt/wms/Makefile 2595 finch/libgnt/wms/Makefile
2567 finch/plugins/Makefile 2596 finch/plugins/Makefile
2568 po/Makefile.in 2597 po/Makefile.in
2569 pidgin.spec 2598 pidgin.spec
2570 ]) 2599 ])
2600 AC_OUTPUT
2571 2601
2572 echo 2602 echo
2573 echo $PACKAGE $VERSION 2603 echo $PACKAGE $VERSION
2574 2604
2575 echo 2605 echo
2594 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR 2624 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2595 fi 2625 fi
2596 echo Build with Cyrus SASL support. : $enable_cyrus_sasl 2626 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2597 echo Use kerberos 4 with zephyr.... : $kerberos 2627 echo Use kerberos 4 with zephyr.... : $kerberos
2598 echo Use external libzephyr........ : $zephyr 2628 echo Use external libzephyr........ : $zephyr
2629 echo Use external libgadu.......... : $gadu_libs
2599 echo Install pixmaps............... : $enable_pixmaps 2630 echo Install pixmaps............... : $enable_pixmaps
2631 echo Old tray icon compatibility... : $enable_traycompat
2600 echo Install translations.......... : $enable_i18n 2632 echo Install translations.......... : $enable_i18n
2601 echo Has you....................... : yes 2633 echo Has you....................... : yes
2602 echo 2634 echo
2603 echo Use XScreenSaver Extension.... : $enable_screensaver 2635 echo Use XScreenSaver Extension.... : $enable_screensaver
2604 echo Use X Session Management...... : $enable_sm 2636 echo Use X Session Management...... : $enable_sm
2618 echo Warning: You have an old copy of Pidgin at $pidginpath. 2650 echo Warning: You have an old copy of Pidgin at $pidginpath.
2619 fi 2651 fi
2620 if test "x$enable_pixmaps" = "xno" ; then 2652 if test "x$enable_pixmaps" = "xno" ; then
2621 echo 2653 echo
2622 echo Warning: You have disabled the installation of pixmap data, but Pidgin 2654 echo Warning: You have disabled the installation of pixmap data, but Pidgin
2623 echo still requires installed pixmaps. Be sure you know what you\'re doing. 2655 echo still requires installed pixmaps. Be sure you know what you are doing.
2656 fi
2657 if test "x$enable_i18n" = "xno" ; then
2658 echo
2659 echo Warning: You have disabled the building and installation of translation
2660 echo data. This will prevent building pidgin.desktop and the GConf schemas.
2661 echo Be sure you know what you are doing.
2624 fi 2662 fi
2625 echo 2663 echo
2626 echo configure complete, now type \'make\' 2664 echo configure complete, now type \'make\'
2627 echo 2665 echo
2628 2666

mercurial