comparison configure.ac @ 32612:c317ae5dcb6e

propagate from branch 'im.pidgin.pidgin' (head 52f4817b6a7b2db5cad41758c4911c0f20f77eb2) to branch 'im.pidgin.cpw.qulogic.gtk3' (head 09d4e9b50dd8919f186c2221e24b5f388bec7a88)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 05 Jun 2010 21:22:26 +0000
parents 2b17eaf88391
children a14c2e81fcf0
comparison
equal deleted inserted replaced
32611:7e6ab5abf620 32612:c317ae5dcb6e
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], [7]) 46 m4_define([purple_lt_current], [7])
47 m4_define([purple_major_version], [2]) 47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [7]) 48 m4_define([purple_minor_version], [7])
49 m4_define([purple_micro_version], [0]) 49 m4_define([purple_micro_version], [2])
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], [7]) 55 m4_define([gnt_lt_current], [7])
56 m4_define([gnt_major_version], [2]) 56 m4_define([gnt_major_version], [2])
57 m4_define([gnt_minor_version], [7]) 57 m4_define([gnt_minor_version], [7])
58 m4_define([gnt_micro_version], [0]) 58 m4_define([gnt_micro_version], [2])
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 78
79 PURPLE_MAJOR_VERSION=purple_major_version 79 PURPLE_MAJOR_VERSION=purple_major_version
80 PURPLE_MINOR_VERSION=purple_minor_version 80 PURPLE_MINOR_VERSION=purple_minor_version
81 PURPLE_MICRO_VERSION=purple_micro_version 81 PURPLE_MICRO_VERSION=purple_micro_version
110 AM_PROG_CC_C_O 110 AM_PROG_CC_C_O
111 AC_DISABLE_STATIC 111 AC_DISABLE_STATIC
112 AC_PROG_LIBTOOL 112 AC_PROG_LIBTOOL
113 LIBTOOL="$LIBTOOL --silent" 113 LIBTOOL="$LIBTOOL --silent"
114 AC_PROG_INSTALL 114 AC_PROG_INSTALL
115 AC_PROG_INTLTOOL
116 PKG_PROG_PKG_CONFIG 115 PKG_PROG_PKG_CONFIG
117 AC_FUNC_ALLOCA 116 AC_FUNC_ALLOCA
118 GETTEXT_PACKAGE=pidgin 117
119 AC_SUBST(GETTEXT_PACKAGE) 118 dnl Check for Sun compiler
120 119 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 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"
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 120
174 dnl Checks for header files. 121 dnl Checks for header files.
175 AC_HEADER_STDC 122 AC_HEADER_STDC
176 AC_HEADER_SYS_WAIT 123 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) 124 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) 143 AC_LIBOBJ(getopt1)
197 ]) 144 ])
198 145
199 dnl Check for inet_aton 146 dnl Check for inet_aton
200 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , 147 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
201 [AC_ERROR(inet_aton not found)])]) 148 [AC_MSG_ERROR([inet_aton not found])])])
202 AC_CHECK_LIB(resolv, __res_query) 149 AC_CHECK_LIB(resolv, __res_query)
203 AC_CHECK_LIB(nsl, gethostent) 150 AC_CHECK_LIB(nsl, gethostent)
204 AC_CHECK_FUNC(socket, , 151 AC_CHECK_FUNC(socket, ,
205 [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])]) 152 [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 153 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. 154 dnl pulled in -lsocket and -lnsl if we need them.
208 AC_CHECK_FUNC(getaddrinfo, 155 AC_CHECK_FUNC(getaddrinfo,
209 [AC_DEFINE([HAVE_GETADDRINFO], [1], 156 [AC_DEFINE([HAVE_GETADDRINFO], [1],
210 [Define to 1 if you have the getaddrinfo function.])], 157 [Define to 1 if you have the getaddrinfo function.])],
212 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) 159 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
213 AC_CHECK_FUNCS(inet_ntop) 160 AC_CHECK_FUNCS(inet_ntop)
214 AC_CHECK_FUNCS(getifaddrs) 161 AC_CHECK_FUNCS(getifaddrs)
215 dnl Check for socklen_t (in Unix98) 162 dnl Check for socklen_t (in Unix98)
216 AC_MSG_CHECKING(for socklen_t) 163 AC_MSG_CHECKING(for socklen_t)
217 AC_TRY_COMPILE([ 164 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
218 #include <sys/types.h> 165 #include <sys/types.h>
219 #include <sys/socket.h> 166 #include <sys/socket.h>
220 socklen_t x; 167 socklen_t x;
221 ], [], 168 ]], [[]])], [
222 [
223 AC_MSG_RESULT(yes) 169 AC_MSG_RESULT(yes)
224 ], [ 170 ], [
225 AC_TRY_COMPILE([ 171 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
226 #include <sys/types.h> 172 #include <sys/types.h>
227 #include <sys/socket.h> 173 #include <sys/socket.h>
228 int accept(int, struct sockaddr *, size_t *); 174 int accept(int, struct sockaddr *, size_t *);
229 ], [], [ 175 ]], [[]])], [
230 AC_MSG_RESULT(size_t) 176 AC_MSG_RESULT(size_t)
231 AC_DEFINE(socklen_t, size_t, [socklen_t size]) 177 AC_DEFINE(socklen_t, size_t, [socklen_t size])
232 ], [ 178 ], [
233 AC_MSG_RESULT(int) 179 AC_MSG_RESULT(int)
234 AC_DEFINE(socklen_t, int, [socklen_t size]) 180 AC_DEFINE(socklen_t, int, [socklen_t size])
239 AC_CHECK_MEMBER([struct sockaddr.sa_len], 185 AC_CHECK_MEMBER([struct sockaddr.sa_len],
240 [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1], 186 [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
241 [Define if struct sockaddr has an sa_len member])],[:], 187 [Define if struct sockaddr has an sa_len member])],[:],
242 [#include <sys/socket.h>]) 188 [#include <sys/socket.h>])
243 189
190 dnl Check for v6-only sockets
191 AC_CHECK_DECL([IPV6_V6ONLY],
192 [AC_DEFINE([HAVE_IPV6_V6ONLY],[1],
193 [Define if the IPV6_V6ONLY setsockopt option exists])],
194 [], [#include <netinet/in.h>])
195
244 dnl to prevent the g_stat()/g_unlink() crash, 196 dnl to prevent the g_stat()/g_unlink() crash,
245 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac 197 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
246 AC_SYS_LARGEFILE 198 AC_SYS_LARGEFILE
247 199
248 dnl FreeBSD doesn't have libdl, dlopen is provided by libc 200 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
249 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) 201 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
250 202
251 AC_MSG_CHECKING(for fileno()) 203 AC_MSG_CHECKING(for fileno())
252 AC_TRY_RUN([ 204 AC_RUN_IFELSE([AC_LANG_SOURCE([[
253 #include <stdio.h> 205 #include <stdio.h>
254 206
255 int main(int argc, char *argv[]) 207 int main(int argc, char *argv[])
256 { 208 {
257 int fd; 209 int fd;
258 210
259 fd = fileno(stdout); 211 fd = fileno(stdout);
260 212
261 return !(fd > 0); 213 return !(fd > 0);
262 } 214 }
263 ], [ 215 ]])], [
264 AC_MSG_RESULT(yes) 216 AC_MSG_RESULT(yes)
265 AC_DEFINE([HAVE_FILENO], [1], 217 AC_DEFINE([HAVE_FILENO], [1],
266 [Define to 1 if your stdio has int fileno(FILE *).]) 218 [Define to 1 if your stdio has int fileno(FILE *).])
267 ], [ 219 ], [
268 AC_MSG_RESULT(no) 220 AC_MSG_RESULT(no)
271 # This will enable the compatibility code. 223 # This will enable the compatibility code.
272 AC_MSG_RESULT(no) 224 AC_MSG_RESULT(no)
273 ]) 225 ])
274 226
275 AC_MSG_CHECKING(for the %z format string in strftime()) 227 AC_MSG_CHECKING(for the %z format string in strftime())
276 AC_TRY_RUN([ 228 AC_RUN_IFELSE([AC_LANG_SOURCE([[
277 #ifdef HAVE_SYS_TIME_H 229 #ifdef HAVE_SYS_TIME_H
278 #include <sys/time.h> 230 #include <sys/time.h>
279 #endif 231 #endif
280 #include <time.h> 232 #include <time.h>
281 #include <stdio.h> 233 #include <stdio.h>
295 (buf[2] >= '0' && buf[2] <= '9') && 247 (buf[2] >= '0' && buf[2] <= '9') &&
296 (buf[3] >= '0' && buf[3] <= '9') && 248 (buf[3] >= '0' && buf[3] <= '9') &&
297 (buf[4] >= '0' && buf[4] <= '9') 249 (buf[4] >= '0' && buf[4] <= '9')
298 ); 250 );
299 } 251 }
300 ], [ 252 ]])], [
301 AC_MSG_RESULT(yes) 253 AC_MSG_RESULT(yes)
302 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1], 254 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
303 [Define to 1 if you have a strftime() that supports the %z format string.]) 255 [Define to 1 if you have a strftime() that supports the %z format string.])
304 ], [ 256 ], [
305 AC_MSG_RESULT(no) 257 AC_MSG_RESULT(no)
306 ], [ 258 ], [
307 # Fallback for Cross Compiling... 259 # Fallback for Cross Compiling...
308 # This will enable the compatibility code. 260 # This will enable the compatibility code.
309 AC_MSG_RESULT(no) 261 AC_MSG_RESULT(no)
310 ] 262 ])
311 ) 263
264 dnl #######################################################################
265 dnl # Disable creation and installation of translation files
266 dnl #######################################################################
267 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
268
269 if test x$enable_i18n = xyes; then
270 AC_PROG_INTLTOOL
271 GETTEXT_PACKAGE=pidgin
272 AC_SUBST(GETTEXT_PACKAGE)
273
274
275 # before gettexting, in case iconv matters
276 case "$host_os" in
277 darwin*)
278 AC_CHECK_LIB(resolv, res_query)
279
280 AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
281 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
282 AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
283 LIBS="$LIBS -framework IOKit -framework CoreFoundation"
284 ], [])
285 ], [])
286
287 AC_MSG_CHECKING([for fink])
288 if test -d /sw; then
289 AC_MSG_RESULT([found, adding /sw to search paths])
290 CPPFLAGS="$CPPFLAGS -I/sw/include"
291 LDFLAGS="$LDFLAGS -L/sw/lib"
292 else
293 AC_MSG_RESULT([not found])
294 fi
295 ;;
296 *)
297 ;;
298 esac
299
300 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 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"
301 AM_GLIB_GNU_GETTEXT
302
303 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
304 dnl AM_GLIB_GNU_GETTEXT found it.
305
306 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
307 then
308 AC_MSG_ERROR([
309
310 The msgfmt command is required to build libpurple. If it is installed
311 on your system, ensure that it is in your path. If it is not, install
312 GNU gettext to continue.
313
314 If you have msgfmt installed, but for some reason this error message
315 is still displayed, you have encountered what appears to be a bug in
316 third-party configure macros. Try setting the MSGFMT environment
317 variable to the absolute path to your msgfmt binary and trying
318 configure again, like this:
319
320 MSGFMT=/path/to/msgfmt ./configure ...
321 ])
322 fi
323 fi #enable_i18n
324
325 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
312 326
313 dnl ####################################################################### 327 dnl #######################################################################
314 dnl # Check for GLib 2.12 (required) 328 dnl # Check for GLib 2.12 (required)
315 dnl ####################################################################### 329 dnl #######################################################################
316 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [ 330 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
456 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) 470 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
457 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) 471 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
458 if test "x$XSS_LIBS" != "x"; then 472 if test "x$XSS_LIBS" != "x"; then
459 oldCPPFLAGS="$CPPFLAGS" 473 oldCPPFLAGS="$CPPFLAGS"
460 CPPFLAGS="$CPPFLAGS $x_incpath_add" 474 CPPFLAGS="$CPPFLAGS $x_incpath_add"
461 AC_TRY_COMPILE([ 475 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
462 #include <X11/Xlib.h> 476 #include <X11/Xlib.h>
463 #include <X11/extensions/scrnsaver.h> 477 #include <X11/extensions/scrnsaver.h>
464 ], [], [], [enable_screensaver=no]) 478 ]], [[]])], [], [enable_screensaver=no])
465 CPPFLAGS="$oldCPPFLAGS" 479 CPPFLAGS="$oldCPPFLAGS"
466 else 480 else
467 enable_screensaver=no 481 enable_screensaver=no
468 fi 482 fi
469 LIBS="$old_LIBS" 483 LIBS="$old_LIBS"
646 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include 660 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
647 do 661 do
648 f="$location/ncurses.h" 662 f="$location/ncurses.h"
649 AC_CHECK_HEADER($f,[ 663 AC_CHECK_HEADER($f,[
650 AC_MSG_CHECKING([if $f supports wide characters]) 664 AC_MSG_CHECKING([if $f supports wide characters])
651 AC_TRY_COMPILE([ 665 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
652 #define _XOPEN_SOURCE_EXTENDED 666 #define _XOPEN_SOURCE_EXTENDED
653 #include <$f> 667 #include <$f>
654 ], [ 668 ]], [[
655 #ifndef get_wch 669 #ifndef get_wch
656 # error get_wch not found! 670 # error get_wch not found!
657 #endif 671 #endif
658 ], [ 672 ]])], [
659 dir=$location 673 dir=$location
660 if test x"$dir" != x"." ; then 674 if test x"$dir" != x"." ; then
661 GNT_CFLAGS="-I$dir/" 675 GNT_CFLAGS="-I$dir/"
662 else 676 else
663 GNT_CFLAGS="" 677 GNT_CFLAGS=""
995 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h]) 1009 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
996 elif test "x$silc10client" = "xyes"; then 1010 elif test "x$silc10client" = "xyes"; then
997 CPPFLAGS_save="$CPPFLAGS" 1011 CPPFLAGS_save="$CPPFLAGS"
998 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS" 1012 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
999 AC_MSG_CHECKING(for silcmime.h) 1013 AC_MSG_CHECKING(for silcmime.h)
1000 AC_TRY_COMPILE([ 1014 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1001 #include <silcincludes.h> 1015 #include <silcincludes.h>
1002 #include <silcmime.h> 1016 #include <silcmime.h>
1003 ], [], [ 1017 ]], [[]])], [
1004 AC_MSG_RESULT(yes) 1018 AC_MSG_RESULT(yes)
1005 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h]) 1019 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1006 ], [ 1020 ], [
1007 AC_MSG_RESULT(no) 1021 AC_MSG_RESULT(no)
1008 ]) 1022 ])
1020 gadu_manual_check="yes" 1034 gadu_manual_check="yes"
1021 else 1035 else
1022 gadu_manual_check="no" 1036 gadu_manual_check="no"
1023 fi 1037 fi
1024 if test "x$gadu_manual_check" = "xno"; then 1038 if test "x$gadu_manual_check" = "xno"; then
1025 PKG_CHECK_MODULES(GADU, libgadu, [ 1039 PKG_CHECK_MODULES(GADU, [libgadu >= 1.9.0-rc2], [
1026 gadu_includes="yes" 1040 gadu_includes="yes"
1027 gadu_libs="yes" 1041 gadu_libs="yes"
1028 ], [ 1042 ], [
1029 gadu_includes="no" 1043 gadu_includes="no"
1030 ]) 1044 ])
1047 1061
1048 if test "x$gadu_libs" = "xyes"; then 1062 if test "x$gadu_libs" = "xyes"; then
1049 AC_MSG_CHECKING(for libgadu GPL compatibility) 1063 AC_MSG_CHECKING(for libgadu GPL compatibility)
1050 CPPFLAGS_save="$CPPFLAGS" 1064 CPPFLAGS_save="$CPPFLAGS"
1051 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS" 1065 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1052 AC_TRY_COMPILE([#include <libgadu.h>], [ 1066 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1053 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL) 1067 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1054 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support." 1068 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1055 #endif 1069 #endif
1056 ], [ 1070 ]])], [
1057 AC_MSG_RESULT(yes) 1071 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1058 AC_DEFINE([HAVE_LIBGADU], [1], 1072 #if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1059 [Define to 1 if you have libgadu.]) 1073 #error "Your libgadu version is too old. libpurple requires 1.9.0-rc2 or higher."
1074 #endif
1075 ]])], [
1076 AC_MSG_RESULT(yes)
1077 AC_DEFINE([HAVE_LIBGADU], [1],
1078 [Define to 1 if you have libgadu.])
1079 ], [
1080 AC_MSG_RESULT(no)
1081 echo
1082 echo
1083 echo "Your supplied copy of libgadu is too old."
1084 echo "Install version 1.9.0-rc2 or newer."
1085 echo "Then rerun this ./configure"
1086 echo
1087 echo "Falling back to using our own copy of libgadu"
1088 echo
1089 GADU_LIBS=""
1090 GADU_CFLAGS=""
1091 gadu_libs=no
1092 ])
1060 ], [ 1093 ], [
1061 AC_MSG_RESULT(no) 1094 AC_MSG_RESULT(no)
1062 echo 1095 echo
1063 echo 1096 echo
1064 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support." 1097 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1075 CPPFLAGS="$CPPFLAGS_save" 1108 CPPFLAGS="$CPPFLAGS_save"
1076 fi 1109 fi
1077 1110
1078 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes") 1111 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1079 1112
1113 if test "x$gadu_libs" = "x"; then
1114 gadu_libs=no
1115 fi
1116
1080 AC_SUBST(GADU_LIBS) 1117 AC_SUBST(GADU_LIBS)
1081 AC_SUBST(GADU_CFLAGS) 1118 AC_SUBST(GADU_CFLAGS)
1082
1083 # change the next line to not make MSNP15 the default (s/disable/enable/; s/yes/no/;)
1084 AC_ARG_ENABLE(msnp15,[AC_HELP_STRING([--disable-msnp15], [Disable the newer MSNP15 protocol])],enable_msnp15=$enableval,enable_msnp15=yes)
1085 1119
1086 AC_ARG_ENABLE(distrib,,,enable_distrib=no) 1120 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1087 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") 1121 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1088 DYNAMIC_PRPLS=all 1122 DYNAMIC_PRPLS=all
1089 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=""]) 1123 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=""])
1097 if test "x$have_meanwhile" != "xyes" ; then 1131 if test "x$have_meanwhile" != "xyes" ; then
1098 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'` 1132 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1099 fi 1133 fi
1100 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then 1134 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1101 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'` 1135 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1102 fi
1103 if test "x$enable_msnp15" != "xyes" ; then
1104 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/msn/msnp9/'`
1105 fi 1136 fi
1106 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 1137 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1107 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'` 1138 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1108 fi 1139 fi
1109 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then 1140 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1131 else 1162 else
1132 if test "x$i" = "xsilc"; then 1163 if test "x$i" = "xsilc"; then
1133 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la" 1164 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1134 elif test "x$i" = "xsilc10"; then 1165 elif test "x$i" = "xsilc10"; then
1135 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la" 1166 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1136 elif test "x$i" = "xmsnp9"; then
1137 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libmsn.la"
1138 else 1167 else
1139 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la" 1168 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1140 fi 1169 fi
1141 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();" 1170 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1142 load_proto="$load_proto purple_init_${i}_plugin();" 1171 load_proto="$load_proto purple_init_${i}_plugin();"
1145 bonjour) static_bonjour=yes ;; 1174 bonjour) static_bonjour=yes ;;
1146 gg) static_gg=yes ;; 1175 gg) static_gg=yes ;;
1147 irc) static_irc=yes ;; 1176 irc) static_irc=yes ;;
1148 jabber) static_jabber=yes ;; 1177 jabber) static_jabber=yes ;;
1149 msn) static_msn=yes ;; 1178 msn) static_msn=yes ;;
1150 msnp9) static_msn=yes ;;
1151 myspace) static_myspace=yes ;; 1179 myspace) static_myspace=yes ;;
1152 mxit) static_mxit=yes ;; 1180 mxit) static_mxit=yes ;;
1153 novell) static_novell=yes ;; 1181 novell) static_novell=yes ;;
1154 oscar) static_oscar=yes ;; 1182 oscar) static_oscar=yes ;;
1155 aim) static_oscar=yes ;; 1183 aim) static_oscar=yes ;;
1191 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` 1219 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1192 fi 1220 fi
1193 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then 1221 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1194 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` 1222 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1195 fi 1223 fi
1196 if test "x$enable_msnp15" != "xyes" ; then
1197 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/msn/msnp9/'`
1198 fi
1199 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 1224 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1200 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'` 1225 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1201 fi 1226 fi
1202 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then 1227 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1203 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'` 1228 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
1208 bonjour) dynamic_bonjour=yes ;; 1233 bonjour) dynamic_bonjour=yes ;;
1209 gg) dynamic_gg=yes ;; 1234 gg) dynamic_gg=yes ;;
1210 irc) dynamic_irc=yes ;; 1235 irc) dynamic_irc=yes ;;
1211 jabber) dynamic_jabber=yes ;; 1236 jabber) dynamic_jabber=yes ;;
1212 msn) dynamic_msn=yes ;; 1237 msn) dynamic_msn=yes ;;
1213 msnp9) dynamic_msn=yes ;;
1214 myspace) dynamic_myspace=yes ;; 1238 myspace) dynamic_myspace=yes ;;
1215 mxit) dynamic_mxit=yes ;; 1239 mxit) dynamic_mxit=yes ;;
1216 novell) dynamic_novell=yes ;; 1240 novell) dynamic_novell=yes ;;
1217 null) dynamic_null=yes ;; 1241 null) dynamic_null=yes ;;
1218 oscar) dynamic_oscar=yes ;; 1242 oscar) dynamic_oscar=yes ;;
1279 "-Wundef" \ 1303 "-Wundef" \
1280 ; do 1304 ; do
1281 orig_CFLAGS="$CFLAGS" 1305 orig_CFLAGS="$CFLAGS"
1282 CFLAGS="$CFLAGS $newflag" 1306 CFLAGS="$CFLAGS $newflag"
1283 AC_MSG_CHECKING(for $newflag option to gcc) 1307 AC_MSG_CHECKING(for $newflag option to gcc)
1284 AC_TRY_COMPILE([], [ 1308 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1285 int main() {return 0;} 1309 int main() {return 0;}
1286 ], [ 1310 ]])], [
1287 AC_MSG_RESULT(yes) 1311 AC_MSG_RESULT(yes)
1288 CFLAGS="$orig_CFLAGS" 1312 CFLAGS="$orig_CFLAGS"
1289 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag" 1313 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1290 ], [ 1314 ], [
1291 AC_MSG_RESULT(no) 1315 AC_MSG_RESULT(no)
1293 ]) 1317 ])
1294 done 1318 done
1295 1319
1296 if test "x$enable_fortify" = "xyes"; then 1320 if test "x$enable_fortify" = "xyes"; then
1297 AC_MSG_CHECKING(for FORTIFY_SOURCE support) 1321 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1298 AC_TRY_COMPILE([#include <features.h>], [ 1322 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1299 int main() { 1323 int main() {
1300 #if !(__GNUC_PREREQ (4, 1) \ 1324 #if !(__GNUC_PREREQ (4, 1) \
1301 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \ 1325 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1302 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \ 1326 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1303 && __GNUC_MINOR__ == 4 \ 1327 && __GNUC_MINOR__ == 4 \
1305 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8)))) 1329 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1306 #error No FORTIFY_SOURCE support 1330 #error No FORTIFY_SOURCE support
1307 #endif 1331 #endif
1308 return 0; 1332 return 0;
1309 } 1333 }
1310 ], [ 1334 ]])], [
1311 AC_MSG_RESULT(yes) 1335 AC_MSG_RESULT(yes)
1312 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2" 1336 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1313 ], [ 1337 ], [
1314 AC_MSG_RESULT(no) 1338 AC_MSG_RESULT(no)
1315 ]) 1339 ])
1316 fi 1340 fi
1317 1341
1318 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS" 1342 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1319 CFLAGS="-g $CFLAGS" 1343 CFLAGS="-g $CFLAGS"
1344 fi
1345
1346 if test "x$SUNCC" = "xyes"; then
1347 CFLAGS="$CFLAGS -features=extensions"
1320 fi 1348 fi
1321 AC_SUBST(CFLAGS) 1349 AC_SUBST(CFLAGS)
1322 1350
1323 AC_PATH_PROG(pidginpath, pidgin) 1351 AC_PATH_PROG(pidginpath, pidgin)
1324 1352
1387 AC_ARG_WITH([python], 1415 AC_ARG_WITH([python],
1388 AC_HELP_STRING([--with-python=PATH], 1416 AC_HELP_STRING([--with-python=PATH],
1389 [which python interpreter to use for dbus code generation]), 1417 [which python interpreter to use for dbus code generation]),
1390 PYTHON=$withval) 1418 PYTHON=$withval)
1391 1419
1392 if test "x$enable_dbus" = "xyes" ; then 1420 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1393 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then 1421 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1394 AC_PATH_PROG([PYTHON], [python], [no]) 1422 AC_PATH_PROG([PYTHON], [python], [no])
1395 fi 1423 fi
1396 1424
1397 if test x"$PYTHON" = x"no" ; then 1425 if test x"$PYTHON" = x"no" ; then
1398 AC_MSG_WARN([python interpreter not found in your path]) 1426 AC_MSG_WARN([python interpreter not found in your path])
1399 enable_dbus=no 1427 enable_dbus=no
1400 fi 1428 fi
1401 fi 1429
1402
1403 if test "x$enable_dbus" = "xyes" ; then
1404 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then 1430 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1405 AC_MSG_WARN([python version >= 2.4 required]) 1431 AC_MSG_WARN([python version >= 2.4 required])
1406 enable_dbus=no 1432 enable_dbus=no
1407 fi 1433 fi
1408 fi 1434 fi
1448 break 1474 break
1449 fi 1475 fi
1450 done 1476 done
1451 1477
1452 if test -z $DBUS_SERVICES_DIR ; then 1478 if test -z $DBUS_SERVICES_DIR ; then
1453 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify it's location.]) 1479 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify its location.])
1454 fi 1480 fi
1455 else 1481 else
1456 DBUS_SERVICES_DIR="$datadir/dbus-1/services" 1482 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1457 fi 1483 fi
1458 fi 1484 fi
1469 1495
1470 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") 1496 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1471 1497
1472 dnl Check for Python headers (currently useful only for libgnt) 1498 dnl Check for Python headers (currently useful only for libgnt)
1473 dnl (Thanks to XChat) 1499 dnl (Thanks to XChat)
1474 AC_PATH_PROG(pythonpath, python) 1500 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1475 if test "_$pythonpath" != _ ; then
1476 AC_MSG_CHECKING(for Python compile flags) 1501 AC_MSG_CHECKING(for Python compile flags)
1477 PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'` 1502 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1478 PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'` 1503 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1479 changequote(<<, >>)dnl 1504 changequote(<<, >>)dnl
1480 PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'` 1505 PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1481 PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'` 1506 PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1482 changequote([, ])dnl 1507 changequote([, ])dnl
1483 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then 1508 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1509 AC_MSG_RESULT()
1484 AC_CHECK_LIB(pthread, pthread_create, ) 1510 AC_CHECK_LIB(pthread, pthread_create, )
1485 AC_CHECK_LIB(util, openpty, ) 1511 AC_CHECK_LIB(util, openpty, )
1486 AC_CHECK_LIB(db, dbopen, ) 1512 AC_CHECK_LIB(db, dbopen, )
1487 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION" 1513 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1488 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" 1514 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1489 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.]) 1515 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1516 dnl Because the above AC_CHECK_LIB get in the way...
1517 AC_MSG_CHECKING(for Python compile flags)
1490 AC_MSG_RESULT(ok) 1518 AC_MSG_RESULT(ok)
1491 else 1519 else
1492 AC_MSG_RESULT([Can't find Python.h]) 1520 AC_MSG_RESULT([Can't find Python.h])
1493 PY_LIBS="" 1521 PY_LIBS=""
1494 PY_CFLAGS="" 1522 PY_CFLAGS=""
1666 1694
1667 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]) 1695 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])
1668 1696
1669 SSL_CERTIFICATES_DIR="" 1697 SSL_CERTIFICATES_DIR=""
1670 if ! test -z "$ssl_certificates_dir" ; then 1698 if ! test -z "$ssl_certificates_dir" ; then
1699 if test "x$ssl_certificates_dir" = "xyes" ; then
1700 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1701 fi
1671 if ! test -d "$ssl_certificates_dir" ; then 1702 if ! test -d "$ssl_certificates_dir" ; then
1672 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.]) 1703 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1673 fi 1704 fi
1674 SSL_CERTIFICATES_DIR="$ssl_certificates_dir" 1705 SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1675 fi 1706 fi
1773 1804
1774 AC_SUBST(GNUTLS_CFLAGS) 1805 AC_SUBST(GNUTLS_CFLAGS)
1775 AC_SUBST(GNUTLS_LIBS) 1806 AC_SUBST(GNUTLS_LIBS)
1776 1807
1777 if test "x$enable_gnutls" = "xyes"; then 1808 if test "x$enable_gnutls" = "xyes"; then
1778 AC_MSG_CHECKING(for gnutls_priority_set_direct) 1809 AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1779 LIBS_save="$LIBS" 1810 LIBS_save="$LIBS"
1780 LIBS="$LIBS $GNUTLS_LIBS" 1811 LIBS="$LIBS $GNUTLS_LIBS"
1781 CPPFLAGS_save="$CPPFLAGS" 1812 CPPFLAGS_save="$CPPFLAGS"
1782 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS" 1813 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1783 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]], 1814 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1784 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);]])], 1815 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1785 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1, 1816 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1786 [Define if your gnutls has gnutls_priority_set_direct and friends]) 1817 [Define if your gnutls has gnutls_priority_set_direct and friends])
1787 AC_MSG_RESULT(yes)], 1818 AC_MSG_RESULT(yes)],
1788 [AC_MSG_RESULT(no)]) 1819 [AC_MSG_RESULT(no)])
1789 CPPFLAGS="$CPPFLAGS_save" 1820 CPPFLAGS="$CPPFLAGS_save"
2142 /usr/local/lib" 2173 /usr/local/lib"
2143 for dir in $with_tclconfig $TCLCONFIGDIRS; do 2174 for dir in $with_tclconfig $TCLCONFIGDIRS; do
2144 if test -f $dir/tclConfig.sh; then 2175 if test -f $dir/tclConfig.sh; then
2145 TCLCONFIG=$dir/tclConfig.sh 2176 TCLCONFIG=$dir/tclConfig.sh
2146 AC_MSG_RESULT([yes ($TCLCONFIG)]) 2177 AC_MSG_RESULT([yes ($TCLCONFIG)])
2178 break
2147 fi 2179 fi
2148 done 2180 done
2149 if test "$TCLCONFIG" = "no"; then 2181 if test "$TCLCONFIG" = "no"; then
2150 AC_MSG_RESULT([no]) 2182 AC_MSG_RESULT([no])
2151 enable_tcl=no 2183 enable_tcl=no
2167 AC_MSG_CHECKING([for Tcl linkability]) 2199 AC_MSG_CHECKING([for Tcl linkability])
2168 oldCPPFLAGS=$CPPFLAGS 2200 oldCPPFLAGS=$CPPFLAGS
2169 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" 2201 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2170 oldLIBS=$LIBS 2202 oldLIBS=$LIBS
2171 LIBS="$LIBS $TCL_LIB_SPEC" 2203 LIBS="$LIBS $TCL_LIB_SPEC"
2172 AC_TRY_LINK([#include <tcl.h>], 2204 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2173 [Tcl_Interp *interp=NULL; Tcl_Init(interp)], 2205 [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
2174 [AC_MSG_RESULT([yes]);enable_tcl=yes], 2206 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2175 [AC_MSG_RESULT([no]);enable_tcl=no]) 2207 [AC_MSG_RESULT([no]);enable_tcl=no])
2176 CPPFLAGS="$oldCPPFLAGS" 2208 CPPFLAGS="$oldCPPFLAGS"
2177 LIBS="$oldLIBS" 2209 LIBS="$oldLIBS"
2178 fi 2210 fi
2212 /usr/local/lib" 2244 /usr/local/lib"
2213 for dir in $with_tkconfig $TKCONFIGDIRS; do 2245 for dir in $with_tkconfig $TKCONFIGDIRS; do
2214 if test -f $dir/tkConfig.sh; then 2246 if test -f $dir/tkConfig.sh; then
2215 TKCONFIG=$dir/tkConfig.sh 2247 TKCONFIG=$dir/tkConfig.sh
2216 AC_MSG_RESULT([yes ($TKCONFIG)]) 2248 AC_MSG_RESULT([yes ($TKCONFIG)])
2249 break
2217 fi 2250 fi
2218 done 2251 done
2219 if test "$TKCONFIG" = "no"; then 2252 if test "$TKCONFIG" = "no"; then
2220 AC_MSG_RESULT([no]) 2253 AC_MSG_RESULT([no])
2221 enable_tk=no 2254 enable_tk=no
2231 AC_MSG_CHECKING([for Tk linkability]) 2264 AC_MSG_CHECKING([for Tk linkability])
2232 oldCPPFLAGS=$CPPFLAGS 2265 oldCPPFLAGS=$CPPFLAGS
2233 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS" 2266 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2234 oldLIBS=$LIBS 2267 oldLIBS=$LIBS
2235 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" 2268 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2236 AC_TRY_LINK([#include <tk.h>], 2269 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2237 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);], 2270 [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
2238 [AC_MSG_RESULT([yes]);enable_tk=yes], 2271 [AC_MSG_RESULT([yes]);enable_tk=yes],
2239 [AC_MSG_RESULT([no]);enable_tk=no]) 2272 [AC_MSG_RESULT([no]);enable_tk=no])
2240 CPPFLAGS="$oldCPPFLAGS" 2273 CPPFLAGS="$oldCPPFLAGS"
2241 LIBS="$oldLIBS" 2274 LIBS="$oldLIBS"
2242 fi 2275 fi
2284 AM_CONDITIONAL(USE_CYRUS_SASL, true) 2317 AM_CONDITIONAL(USE_CYRUS_SASL, true)
2285 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present]) 2318 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2286 SASL_LIBS=-"lsasl2" 2319 SASL_LIBS=-"lsasl2"
2287 ], [ 2320 ], [
2288 AM_CONDITIONAL(USE_CYRUS_SASL, false) 2321 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2289 AC_ERROR(Cyrus SASL library not found) 2322 AC_MSG_ERROR([Cyrus SASL library not found])
2290 ]) 2323 ])
2291 else 2324 else
2292 AM_CONDITIONAL(USE_CYRUS_SASL, false) 2325 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2293 fi 2326 fi
2294 2327
2317 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS" 2350 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2318 AC_CHECK_LIB(krb4, krb_rd_req, 2351 AC_CHECK_LIB(krb4, krb_rd_req,
2319 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], 2352 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2320 [AC_CHECK_LIB(krb, krb_rd_req, 2353 [AC_CHECK_LIB(krb, krb_rd_req,
2321 [KRB4_LIBS="-lkrb -ldes"], 2354 [KRB4_LIBS="-lkrb -ldes"],
2322 [AC_ERROR(Kerberos 4 libraries not found)], 2355 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
2323 -ldes)], 2356 -ldes)],
2324 -ldes425 -lkrb5 -lk5crypto -lcom_err) 2357 -ldes425 -lkrb5 -lk5crypto -lcom_err)
2325 orig_LIBS="$LIBS" 2358 orig_LIBS="$LIBS"
2326 LIBS="$LIBS $KRB4_LIBS" 2359 LIBS="$LIBS $KRB4_LIBS"
2327 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm) 2360 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2351 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") 2384 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2352 orig_LDFLAGS="$LDFLAGS" 2385 orig_LDFLAGS="$LDFLAGS"
2353 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS" 2386 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2354 AC_CHECK_LIB(zephyr, ZInitialize, 2387 AC_CHECK_LIB(zephyr, ZInitialize,
2355 [ZEPHYR_LIBS="-lzephyr"], 2388 [ZEPHYR_LIBS="-lzephyr"],
2356 [AC_ERROR(Zephyr libraries not found)], 2389 [AC_MSG_ERROR([Zephyr libraries not found])],
2357 -lzephyr) 2390 -lzephyr)
2358 orig_LIBS="$LIBS" 2391 orig_LIBS="$LIBS"
2359 LIBS="$orig_LIBS" 2392 LIBS="$orig_LIBS"
2360 LDFLAGS="$orig_LDFLAGS" 2393 LDFLAGS="$orig_LDFLAGS"
2361 fi 2394 fi
2382 2415
2383 AC_CHECK_HEADERS(sys/socket.h) 2416 AC_CHECK_HEADERS(sys/socket.h)
2384 AC_VAR_TIMEZONE_EXTERNALS 2417 AC_VAR_TIMEZONE_EXTERNALS
2385 2418
2386 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, 2419 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2387 AC_TRY_COMPILE([ 2420 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2388 #include <time.h> 2421 #include <time.h>
2389 ], [ 2422 ]], [[
2390 struct tm tm; 2423 struct tm tm;
2391 tm.tm_gmtoff = 1; 2424 tm.tm_gmtoff = 1;
2392 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) 2425 ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
2393 if test $ac_cv_struct_tm_gmtoff = yes; then 2426 if test $ac_cv_struct_tm_gmtoff = yes; then
2394 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm]) 2427 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2428 fi
2429
2430 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2431 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2432 #include <stdlib.h>
2433 void f (int i, ...) {
2434 va_list args1, args2;
2435 va_start (args1, i);
2436 args2 = args1;
2437 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2438 exit (1);
2439 va_end (args1); va_end (args2);
2440 }
2441 int main() {
2442 f (0, 42);
2443 return 0;
2444 }]])],
2445 [ac_cv_va_val_copy=yes],
2446 [ac_cv_va_val_copy=no],
2447 [ac_cv_va_val_copy=yes])
2448 ])
2449
2450 if test "x$ac_cv_va_val_copy" = "xno"; then
2451 AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2395 fi 2452 fi
2396 2453
2397 dnl ####################################################################### 2454 dnl #######################################################################
2398 dnl # Check for check 2455 dnl # Check for check
2399 dnl ####################################################################### 2456 dnl #######################################################################
2408 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) 2465 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)
2409 2466
2410 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes") 2467 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2411 2468
2412 dnl ####################################################################### 2469 dnl #######################################################################
2413 dnl # Disable installation of translation files 2470 dnl # Tweak status tray icon installation directory
2414 dnl ####################################################################### 2471 dnl #######################################################################
2415 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes) 2472 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)
2416 2473
2417 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes") 2474 AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes")
2418 2475
2419 dnl ####################################################################### 2476 dnl #######################################################################
2420 dnl # Check for Doxygen and dot (part of GraphViz) 2477 dnl # Check for Doxygen and dot (part of GraphViz)
2421 dnl ####################################################################### 2478 dnl #######################################################################
2422 AC_ARG_ENABLE(doxygen, 2479 AC_ARG_ENABLE(doxygen,
2480 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) 2537 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2481 fi 2538 fi
2482 2539
2483 AM_CONDITIONAL(PURPLE_AVAILABLE, true) 2540 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2484 2541
2485 AC_OUTPUT([Makefile 2542 AC_CONFIG_FILES([Makefile
2486 Doxyfile 2543 Doxyfile
2487 doc/Makefile 2544 doc/Makefile
2488 doc/pidgin.1 2545 doc/pidgin.1
2489 doc/finch.1 2546 doc/finch.1
2490 m4macros/Makefile 2547 m4macros/Makefile
2526 libpurple/protocols/bonjour/Makefile 2583 libpurple/protocols/bonjour/Makefile
2527 libpurple/protocols/gg/Makefile 2584 libpurple/protocols/gg/Makefile
2528 libpurple/protocols/irc/Makefile 2585 libpurple/protocols/irc/Makefile
2529 libpurple/protocols/jabber/Makefile 2586 libpurple/protocols/jabber/Makefile
2530 libpurple/protocols/msn/Makefile 2587 libpurple/protocols/msn/Makefile
2531 libpurple/protocols/msnp9/Makefile
2532 libpurple/protocols/myspace/Makefile 2588 libpurple/protocols/myspace/Makefile
2533 libpurple/protocols/mxit/Makefile 2589 libpurple/protocols/mxit/Makefile
2534 libpurple/protocols/novell/Makefile 2590 libpurple/protocols/novell/Makefile
2535 libpurple/protocols/null/Makefile 2591 libpurple/protocols/null/Makefile
2536 libpurple/protocols/oscar/Makefile 2592 libpurple/protocols/oscar/Makefile
2553 finch/libgnt/wms/Makefile 2609 finch/libgnt/wms/Makefile
2554 finch/plugins/Makefile 2610 finch/plugins/Makefile
2555 po/Makefile.in 2611 po/Makefile.in
2556 pidgin.spec 2612 pidgin.spec
2557 ]) 2613 ])
2614 AC_OUTPUT
2558 2615
2559 echo 2616 echo
2560 echo $PACKAGE $VERSION 2617 echo $PACKAGE $VERSION
2561 2618
2562 echo 2619 echo
2581 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR 2638 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2582 fi 2639 fi
2583 echo Build with Cyrus SASL support. : $enable_cyrus_sasl 2640 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2584 echo Use kerberos 4 with zephyr.... : $kerberos 2641 echo Use kerberos 4 with zephyr.... : $kerberos
2585 echo Use external libzephyr........ : $zephyr 2642 echo Use external libzephyr........ : $zephyr
2643 echo Use external libgadu.......... : $gadu_libs
2586 echo Install pixmaps............... : $enable_pixmaps 2644 echo Install pixmaps............... : $enable_pixmaps
2645 echo Old tray icon compatibility... : $enable_traycompat
2587 echo Install translations.......... : $enable_i18n 2646 echo Install translations.......... : $enable_i18n
2588 echo Has you....................... : yes 2647 echo Has you....................... : yes
2589 echo 2648 echo
2590 echo Use XScreenSaver Extension.... : $enable_screensaver 2649 echo Use XScreenSaver Extension.... : $enable_screensaver
2591 echo Use X Session Management...... : $enable_sm 2650 echo Use X Session Management...... : $enable_sm
2605 echo Warning: You have an old copy of Pidgin at $pidginpath. 2664 echo Warning: You have an old copy of Pidgin at $pidginpath.
2606 fi 2665 fi
2607 if test "x$enable_pixmaps" = "xno" ; then 2666 if test "x$enable_pixmaps" = "xno" ; then
2608 echo 2667 echo
2609 echo Warning: You have disabled the installation of pixmap data, but Pidgin 2668 echo Warning: You have disabled the installation of pixmap data, but Pidgin
2610 echo still requires installed pixmaps. Be sure you know what you\'re doing. 2669 echo still requires installed pixmaps. Be sure you know what you are doing.
2670 fi
2671 if test "x$enable_i18n" = "xno" ; then
2672 echo
2673 echo Warning: You have disabled the building and installation of translation
2674 echo data. This will prevent building pidgin.desktop and the GConf schemas.
2675 echo Be sure you know what you are doing.
2611 fi 2676 fi
2612 echo 2677 echo
2613 echo configure complete, now type \'make\' 2678 echo configure complete, now type \'make\'
2614 echo 2679 echo
2615 2680