diff -r e64e49502c79 -r ab886d3a38ae configure.ac --- a/configure.ac Thu Jun 16 04:37:03 2011 +0000 +++ b/configure.ac Sat Aug 06 03:45:56 2011 +0000 @@ -43,19 +43,19 @@ # # Make sure to update finch/libgnt/configure.ac with libgnt version changes. # -m4_define([purple_lt_current], [6]) +m4_define([purple_lt_current], [9]) m4_define([purple_major_version], [2]) -m4_define([purple_minor_version], [6]) -m4_define([purple_micro_version], [6]) +m4_define([purple_minor_version], [9]) +m4_define([purple_micro_version], [1]) m4_define([purple_version_suffix], [devel]) m4_define([purple_version], [purple_major_version.purple_minor_version.purple_micro_version]) m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix])) -m4_define([gnt_lt_current], [6]) +m4_define([gnt_lt_current], [8]) m4_define([gnt_major_version], [2]) -m4_define([gnt_minor_version], [6]) -m4_define([gnt_micro_version], [6]) +m4_define([gnt_minor_version], [8]) +m4_define([gnt_micro_version], [9]) m4_define([gnt_version_suffix], [devel]) m4_define([gnt_version], [gnt_major_version.gnt_minor_version.gnt_micro_version]) @@ -72,9 +72,11 @@ ]) fi -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) +AC_CANONICAL_HOST +AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2]) +dnl TODO: Always use AM_SILENT_RULES when we depend on automake >= 1.11 +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) PURPLE_MAJOR_VERSION=purple_major_version PURPLE_MINOR_VERSION=purple_minor_version @@ -112,64 +114,11 @@ AC_PROG_LIBTOOL LIBTOOL="$LIBTOOL --silent" AC_PROG_INSTALL -AC_PROG_INTLTOOL PKG_PROG_PKG_CONFIG AC_FUNC_ALLOCA -GETTEXT_PACKAGE=pidgin -AC_SUBST(GETTEXT_PACKAGE) - -# before gettexting, in case iconv matters -case "$host_os" in -darwin*) - AC_CHECK_LIB(resolv, res_query) - - AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [ - AC_CHECK_HEADER(IOKit/IOKitLib.h, [ - AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit]) - LIBS="$LIBS -framework IOKit -framework CoreFoundation" - ], []) - ], []) - - AC_MSG_CHECKING([for fink]) - if test -d /sw; then - AC_MSG_RESULT([found, adding /sw to search paths]) - CPPFLAGS="$CPPFLAGS -I/sw/include" - LDFLAGS="$LDFLAGS -L/sw/lib" - else - AC_MSG_RESULT([not found]) - fi - ;; -*) - ;; -esac - -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" -AM_GLIB_GNU_GETTEXT - -dnl If we don't have msgfmt, then po/ is going to fail -- ensure that -dnl AM_GLIB_GNU_GETTEXT found it. - -if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x -then - AC_ERROR([ - -The msgfmt command is required to build libpurple. If it is installed -on your system, ensure that it is in your path. If it is not, install -GNU gettext to continue. - -If you have msgfmt installed, but for some reason this error message -is still displayed, you have encountered what appears to be a bug in -third-party configure macros. Try setting the MSGFMT environment -variable to the absolute path to your msgfmt binary and trying -configure again, like this: - -MSGFMT=/path/to/msgfmt ./configure ... -]) -fi - -dnl we don't use autobreak on cygwin!! -dnl AC_CYGWIN +dnl Check for Sun compiler +AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) dnl Checks for header files. AC_HEADER_STDC @@ -198,11 +147,11 @@ dnl Check for inet_aton AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , - [AC_ERROR(inet_aton not found)])]) + [AC_MSG_ERROR([inet_aton not found])])]) AC_CHECK_LIB(resolv, __res_query) AC_CHECK_LIB(nsl, gethostent) AC_CHECK_FUNC(socket, , - [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])]) + [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])]) dnl If all goes well, by this point the previous two checks will have dnl pulled in -lsocket and -lnsl if we need them. AC_CHECK_FUNC(getaddrinfo, @@ -211,21 +160,21 @@ [AC_CHECK_LIB(socket, getaddrinfo, [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) AC_CHECK_FUNCS(inet_ntop) +AC_CHECK_FUNCS(getifaddrs) dnl Check for socklen_t (in Unix98) AC_MSG_CHECKING(for socklen_t) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include socklen_t x; -], [], -[ +]], [[]])], [ AC_MSG_RESULT(yes) ], [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include int accept(int, struct sockaddr *, size_t *); - ], [], [ + ]], [[]])], [ AC_MSG_RESULT(size_t) AC_DEFINE(socklen_t, size_t, [socklen_t size]) ], [ @@ -240,6 +189,12 @@ [Define if struct sockaddr has an sa_len member])],[:], [#include ]) +dnl Check for v6-only sockets +AC_CHECK_DECL([IPV6_V6ONLY], + [AC_DEFINE([HAVE_IPV6_V6ONLY],[1], + [Define if the IPV6_V6ONLY setsockopt option exists])], + [], [#include ]) + dnl to prevent the g_stat()/g_unlink() crash, dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac AC_SYS_LARGEFILE @@ -248,7 +203,7 @@ AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) AC_MSG_CHECKING(for fileno()) -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include int main(int argc, char *argv[]) @@ -259,7 +214,7 @@ return !(fd > 0); } -], [ +]])], [ AC_MSG_RESULT(yes) AC_DEFINE([HAVE_FILENO], [1], [Define to 1 if your stdio has int fileno(FILE *).]) @@ -272,7 +227,7 @@ ]) AC_MSG_CHECKING(for the %z format string in strftime()) -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_SYS_TIME_H #include #endif @@ -296,7 +251,7 @@ (buf[4] >= '0' && buf[4] <= '9') ); } -], [ +]])], [ AC_MSG_RESULT(yes) AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1], [Define to 1 if you have a strftime() that supports the %z format string.]) @@ -306,17 +261,78 @@ # Fallback for Cross Compiling... # This will enable the compatibility code. AC_MSG_RESULT(no) -] -) +]) + +# before gettexting, in case iconv matters +case "$host_os" in +darwin*) + AC_CHECK_LIB(resolv, res_query) + + AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [ + AC_CHECK_HEADER(IOKit/IOKitLib.h, [ + AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit]) + LIBS="$LIBS -framework IOKit -framework CoreFoundation" + ], []) + ], []) + + AC_MSG_CHECKING([for fink]) + if test -d /sw; then + AC_MSG_RESULT([found, adding /sw to search paths]) + CPPFLAGS="$CPPFLAGS -I/sw/include" + LDFLAGS="$LDFLAGS -L/sw/lib" + else + AC_MSG_RESULT([not found]) + fi + ;; +*) + ;; +esac dnl ####################################################################### -dnl # Check for GLib 2.0 (required) +dnl # Disable creation and installation of translation files dnl ####################################################################### -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.4.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [ +AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes) + +if test x$enable_i18n = xyes; then + AC_PROG_INTLTOOL + GETTEXT_PACKAGE=pidgin + AC_SUBST(GETTEXT_PACKAGE) + + 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" + AM_GLIB_GNU_GETTEXT + + dnl If we don't have msgfmt, then po/ is going to fail -- ensure that + dnl AM_GLIB_GNU_GETTEXT found it. + + if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x + then + AC_MSG_ERROR([ + +The msgfmt command is required to build libpurple. If it is installed +on your system, ensure that it is in your path. If it is not, install +GNU gettext to continue. + +If you have msgfmt installed, but for some reason this error message +is still displayed, you have encountered what appears to be a bug in +third-party configure macros. Try setting the MSGFMT environment +variable to the absolute path to your msgfmt binary and trying +configure again, like this: + +MSGFMT=/path/to/msgfmt ./configure ... + ]) + fi +fi #enable_i18n + +AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes") + +dnl ####################################################################### +dnl # Check for GLib 2.16 (required) +dnl ####################################################################### +PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [ AC_MSG_RESULT(no) AC_MSG_ERROR([ -You must have GLib 2.4.0 or newer development headers installed to build. +You must have GLib 2.16.0 or newer development headers installed to build. If you have these installed already you may need to install pkg-config so I can find them. @@ -352,7 +368,7 @@ [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no]) dnl ####################################################################### -dnl # Check for GTK+ 2.0 and other things used by the GTK UI +dnl # Check for GTK+ 2.10 and other things used by the GTK UI dnl ####################################################################### AC_ARG_ENABLE(screensaver, [AC_HELP_STRING([--disable-screensaver], @@ -399,11 +415,11 @@ fi if test "x$enable_gtkui" = "xyes" ; then - PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], , [ + PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [ AC_MSG_RESULT(no) AC_MSG_ERROR([ -You must have GTK+ 2.4.0 or newer development headers installed to compile +You must have GTK+ 2.10.0 or newer development headers installed to compile Pidgin. If you want to build only Finch then specify --disable-gtkui when running configure. ])]) @@ -426,6 +442,7 @@ X11_LIBS="$x_libpath_add" X11_CFLAGS="$x_incpath_add" else + with_x="no" if test "x$force_deps" = "xyes" ; then AC_MSG_ERROR([ X11 development headers not found. @@ -456,10 +473,10 @@ if test "x$XSS_LIBS" != "x"; then oldCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include - ], [], [], [enable_screensaver=no]) + ]], [[]])], [], [enable_screensaver=no]) CPPFLAGS="$oldCPPFLAGS" else enable_screensaver=no @@ -523,31 +540,12 @@ fi dnl ####################################################################### - dnl # Check for startup notification - dnl ####################################################################### - if test "x$enable_startup_notification" = "xyes"; then - PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [ - AC_MSG_RESULT(no) - if test "x$force_deps" = "xyes" ; then - AC_MSG_ERROR([ -Startup notification development headers not found. -Use --disable-startup-notification if you do not need it. -]) - fi]) - - if test "x$enable_startup_notification" = "xyes"; then - AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.]) - AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) - AC_SUBST(STARTUP_NOTIFICATION_LIBS) - fi - fi - - dnl ####################################################################### dnl # Check for GtkSpell dnl ####################################################################### if test "x$enable_gtkspell" = "xyes" ; then PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [ AC_MSG_RESULT(no) + enable_gtkspell="no" if test "x$force_deps" = "xyes" ; then AC_MSG_ERROR([ GtkSpell development headers not found. @@ -567,15 +565,12 @@ if test "x$enable_gevolution" = "xyes"; then evo_deps="libebook-1.2 libedata-book-1.2" PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [ - AC_MSG_RESULT(yes) enable_gevolution="no" ]) if test "x$enable_gevolution" = "xno"; then evo_deps="libebook-1.0 libedata-book-1.0" PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ enable_gevolution="yes" - ], [ - AC_MSG_RESULT(yes) ]) fi if test "x$enable_gevolution" = "xyes"; then @@ -598,6 +593,7 @@ if test "x$enable_cap" = "xyes"; then PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[ AC_MSG_RESULT(no) + enable_cap="no" if test "x$force_deps" = "xyes" ; then AC_MSG_ERROR([ sqlite3 development headers not found. @@ -641,16 +637,20 @@ for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include do f="$location/ncurses.h" + orig_CFLAGS="$CFLAGS" + orig_CPPFLAGS="$CPPFLAGS" + CFLAGS="$CFLAGS -I$location" + CPPFLAGS="$CPPFLAGS -I$location" AC_CHECK_HEADER($f,[ AC_MSG_CHECKING([if $f supports wide characters]) - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #define _XOPEN_SOURCE_EXTENDED #include <$f> - ], [ + ]], [[ #ifndef get_wch # error get_wch not found! #endif - ], [ + ]])], [ dir=$location if test x"$dir" != x"." ; then GNT_CFLAGS="-I$dir/" @@ -659,9 +659,13 @@ fi found_ncurses_h=yes + CFLAGS="$orig_CFLAGS" + CPPFLAGS="$orig_CPPFLAGS" AC_MSG_RESULT([yes]) break ], [ + CFLAGS="$orig_CFLAGS" + CPPFLAGS="$orig_CPPFLAGS" AC_MSG_RESULT([no]) ]) ]) @@ -748,6 +752,7 @@ [], [$GSTREAMER_LIBS]) ], [ AC_MSG_RESULT(no) + enable_gst="no" if test "x$force_deps" = "xyes" ; then AC_MSG_ERROR([ GStreamer development headers not found. @@ -828,6 +833,7 @@ AC_SUBST(IDN_LIBS) ], [ AC_MSG_RESULT(no) + enable_idn="no" if test "x$force_deps" = "xyes" ; then AC_MSG_ERROR([ GNU Libidn development headers not found. @@ -900,11 +906,14 @@ AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS) fi -if test "x$enable_avahi" = "xyes" -a "x$force_deps" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then - AC_MSG_ERROR([ +if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then + enable_avahi="no" + if test "x$force_deps" = "xyes"; then + AC_MSG_ERROR([ avahi development headers not found. Use --disable-avahi if you do not need avahi (Bonjour) support. ]) + fi fi AC_SUBST(AVAHI_CFLAGS) AC_SUBST(AVAHI_LIBS) @@ -989,10 +998,10 @@ CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SILC_CFLAGS" AC_MSG_CHECKING(for silcmime.h) - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include - ], [], [ + ]], [[]])], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h]) ], [ @@ -1014,7 +1023,7 @@ gadu_manual_check="no" fi if test "x$gadu_manual_check" = "xno"; then - PKG_CHECK_MODULES(GADU, libgadu, [ + PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.0], [ gadu_includes="yes" gadu_libs="yes" ], [ @@ -1041,14 +1050,33 @@ AC_MSG_CHECKING(for libgadu GPL compatibility) CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $GADU_CFLAGS" - AC_TRY_COMPILE([#include ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL) #error "libgadu is not compatible with the GPL when compiled with OpenSSL support." #endif - ], [ - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_LIBGADU], [1], - [Define to 1 if you have libgadu.]) + ]])], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ +#if GG_DEFAULT_PROTOCOL_VERSION < 0x2e +#error "Your libgadu version is too old. libpurple requires 1.11.0 or higher." +#endif + ]])], [ + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_LIBGADU], [1], + [Define to 1 if you have libgadu.]) + ], [ + AC_MSG_RESULT(no) + echo + echo + echo "Your supplied copy of libgadu is too old." + echo "Install version 1.11.0 or newer." + echo "Then rerun this ./configure" + echo + echo "Falling back to using our own copy of libgadu" + echo + GADU_LIBS="" + GADU_CFLAGS="" + gadu_libs=no + ]) ], [ AC_MSG_RESULT(no) echo @@ -1069,12 +1097,13 @@ AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes") +if test "x$gadu_libs" = "x"; then + gadu_libs=no +fi + AC_SUBST(GADU_LIBS) AC_SUBST(GADU_CFLAGS) -# change the next line to not make MSNP15 the default (s/disable/enable/; s/yes/no/;) -AC_ARG_ENABLE(msnp15,[AC_HELP_STRING([--disable-msnp15], [Disable the newer MSNP15 protocol])],enable_msnp15=$enableval,enable_msnp15=yes) - AC_ARG_ENABLE(distrib,,,enable_distrib=no) AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") DYNAMIC_PRPLS=all @@ -1084,7 +1113,7 @@ fi if test "x$STATIC_PRPLS" = "xall" ; then - STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr" + STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr" fi if test "x$have_meanwhile" != "xyes" ; then STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'` @@ -1092,9 +1121,6 @@ if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'` fi -if test "x$enable_msnp15" != "xyes" ; then - STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/msn/msnp9/'` -fi if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'` fi @@ -1125,8 +1151,6 @@ STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la" elif test "x$i" = "xsilc10"; then STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la" - elif test "x$i" = "xmsnp9"; then - STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libmsn.la" else STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la" fi @@ -1139,14 +1163,12 @@ irc) static_irc=yes ;; jabber) static_jabber=yes ;; msn) static_msn=yes ;; - msnp9) static_msn=yes ;; myspace) static_myspace=yes ;; mxit) static_mxit=yes ;; novell) static_novell=yes ;; oscar) static_oscar=yes ;; aim) static_oscar=yes ;; icq) static_oscar=yes ;; - qq) static_qq=yes ;; sametime) static_sametime=yes ;; silc) static_silc=yes ;; silc10) static_silc=yes ;; @@ -1165,7 +1187,6 @@ AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes") AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes") AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") -AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes") AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes") AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes") AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes") @@ -1177,7 +1198,7 @@ AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`]) if test "x$DYNAMIC_PRPLS" = "xall" ; then - DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr" + DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr" fi if test "x$have_meanwhile" != "xyes"; then DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` @@ -1185,9 +1206,6 @@ if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` fi -if test "x$enable_msnp15" != "xyes" ; then - DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/msn/msnp9/'` -fi if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'` fi @@ -1202,7 +1220,6 @@ irc) dynamic_irc=yes ;; jabber) dynamic_jabber=yes ;; msn) dynamic_msn=yes ;; - msnp9) dynamic_msn=yes ;; myspace) dynamic_myspace=yes ;; mxit) dynamic_mxit=yes ;; novell) dynamic_novell=yes ;; @@ -1210,7 +1227,6 @@ oscar) dynamic_oscar=yes ;; aim) dynamic_oscar=yes ;; icq) dynamic_oscar=yes ;; - qq) dynamic_qq=yes ;; sametime) dynamic_sametime=yes ;; silc) dynamic_silc=yes ;; silc10) dynamic_silc=yes ;; @@ -1273,9 +1289,9 @@ orig_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $newflag" AC_MSG_CHECKING(for $newflag option to gcc) - AC_TRY_COMPILE([], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ int main() {return 0;} - ], [ + ]])], [ AC_MSG_RESULT(yes) CFLAGS="$orig_CFLAGS" DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag" @@ -1287,7 +1303,7 @@ if test "x$enable_fortify" = "xyes"; then AC_MSG_CHECKING(for FORTIFY_SOURCE support) - AC_TRY_COMPILE([#include ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ int main() { #if !(__GNUC_PREREQ (4, 1) \ || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \ @@ -1299,7 +1315,7 @@ #endif return 0; } - ], [ + ]])], [ AC_MSG_RESULT(yes) DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2" ], [ @@ -1310,6 +1326,10 @@ DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS" CFLAGS="-g $CFLAGS" fi + +if test "x$SUNCC" = "xyes"; then + CFLAGS="$CFLAGS -features=extensions" +fi AC_SUBST(CFLAGS) AC_PATH_PROG(pidginpath, pidgin) @@ -1381,7 +1401,7 @@ [which python interpreter to use for dbus code generation]), PYTHON=$withval) -if test "x$enable_dbus" = "xyes" ; then +if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then AC_PATH_PROG([PYTHON], [python], [no]) fi @@ -1390,9 +1410,7 @@ AC_MSG_WARN([python interpreter not found in your path]) enable_dbus=no fi -fi -if test "x$enable_dbus" = "xyes" ; then if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then AC_MSG_WARN([python version >= 2.4 required]) enable_dbus=no @@ -1442,7 +1460,7 @@ done if test -z $DBUS_SERVICES_DIR ; then - AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify it's location.]) + AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify its location.]) fi else DBUS_SERVICES_DIR="$datadir/dbus-1/services" @@ -1463,22 +1481,24 @@ dnl Check for Python headers (currently useful only for libgnt) dnl (Thanks to XChat) -AC_PATH_PROG(pythonpath, python) -if test "_$pythonpath" != _ ; then +if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then AC_MSG_CHECKING(for Python compile flags) - PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'` - PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'` + PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'` + PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'` changequote(<<, >>)dnl - PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'` - PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'` + PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'` + PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'` changequote([, ])dnl if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then + AC_MSG_RESULT() AC_CHECK_LIB(pthread, pthread_create, ) AC_CHECK_LIB(util, openpty, ) AC_CHECK_LIB(db, dbopen, ) PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION" PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.]) + dnl Because the above AC_CHECK_LIB get in the way... + AC_MSG_CHECKING(for Python compile flags) AC_MSG_RESULT(ok) else AC_MSG_RESULT([Can't find Python.h]) @@ -1660,6 +1680,9 @@ SSL_CERTIFICATES_DIR="" if ! test -z "$ssl_certificates_dir" ; then + if test "x$ssl_certificates_dir" = "xyes" ; then + AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs]) + fi if ! test -d "$ssl_certificates_dir" ; then AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.]) fi @@ -1767,13 +1790,13 @@ AC_SUBST(GNUTLS_LIBS) if test "x$enable_gnutls" = "xyes"; then - AC_MSG_CHECKING(for gnutls_priority_set_direct) + AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set) LIBS_save="$LIBS" LIBS="$LIBS $GNUTLS_LIBS" CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);]])], + [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])], [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1, [Define if your gnutls has gnutls_priority_set_direct and friends]) AC_MSG_RESULT(yes)], @@ -2136,6 +2159,7 @@ if test -f $dir/tclConfig.sh; then TCLCONFIG=$dir/tclConfig.sh AC_MSG_RESULT([yes ($TCLCONFIG)]) + break fi done if test "$TCLCONFIG" = "no"; then @@ -2161,8 +2185,8 @@ CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" oldLIBS=$LIBS LIBS="$LIBS $TCL_LIB_SPEC" - AC_TRY_LINK([#include ], - [Tcl_Interp *interp=NULL; Tcl_Init(interp)], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])], [AC_MSG_RESULT([yes]);enable_tcl=yes], [AC_MSG_RESULT([no]);enable_tcl=no]) CPPFLAGS="$oldCPPFLAGS" @@ -2198,6 +2222,7 @@ TKCONFIG=no TKCONFIGDIRS="/usr/lib \ /usr/lib64 \ + /usr/lib/tk8.5 \ /usr/lib/tk8.4 \ /usr/lib/tk8.3 \ /usr/lib/tk8.2 \ @@ -2206,6 +2231,7 @@ if test -f $dir/tkConfig.sh; then TKCONFIG=$dir/tkConfig.sh AC_MSG_RESULT([yes ($TKCONFIG)]) + break fi done if test "$TKCONFIG" = "no"; then @@ -2225,8 +2251,8 @@ CPPFLAGS="$CPPFLAGS $TCL_CFLAGS" oldLIBS=$LIBS LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" - AC_TRY_LINK([#include ], - [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])], [AC_MSG_RESULT([yes]);enable_tk=yes], [AC_MSG_RESULT([no]);enable_tk=no]) CPPFLAGS="$oldCPPFLAGS" @@ -2278,7 +2304,7 @@ SASL_LIBS=-"lsasl2" ], [ AM_CONDITIONAL(USE_CYRUS_SASL, false) - AC_ERROR(Cyrus SASL library not found) + AC_MSG_ERROR([Cyrus SASL library not found]) ]) else AM_CONDITIONAL(USE_CYRUS_SASL, false) @@ -2311,7 +2337,7 @@ [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], [AC_CHECK_LIB(krb, krb_rd_req, [KRB4_LIBS="-lkrb -ldes"], - [AC_ERROR(Kerberos 4 libraries not found)], + [AC_MSG_ERROR([Kerberos 4 libraries not found])], -ldes)], -ldes425 -lkrb5 -lk5crypto -lcom_err) orig_LIBS="$LIBS" @@ -2345,7 +2371,7 @@ LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS" AC_CHECK_LIB(zephyr, ZInitialize, [ZEPHYR_LIBS="-lzephyr"], - [AC_ERROR(Zephyr libraries not found)], + [AC_MSG_ERROR([Zephyr libraries not found])], -lzephyr) orig_LIBS="$LIBS" LIBS="$orig_LIBS" @@ -2354,7 +2380,7 @@ AC_MSG_CHECKING(for me pot o' gold) AC_MSG_RESULT(no) -AC_CHECK_FUNCS(gethostid lrand48) +AC_CHECK_FUNCS(gethostid lrand48 timegm) AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf) AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h) AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h) @@ -2376,18 +2402,18 @@ AC_VAR_TIMEZONE_EXTERNALS AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include - ], [ + ]], [[ struct tm tm; tm.tm_gmtoff = 1; - ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) + ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no])) if test $ac_cv_struct_tm_gmtoff = yes; then AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm]) fi AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[ - AC_TRY_RUN([#include + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include void f (int i, ...) { va_list args1, args2; @@ -2400,7 +2426,7 @@ int main() { f (0, 42); return 0; - }], + }]])], [ac_cv_va_val_copy=yes], [ac_cv_va_val_copy=no], [ac_cv_va_val_copy=yes]) @@ -2426,11 +2452,11 @@ AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes") dnl ####################################################################### -dnl # Disable installation of translation files +dnl # Tweak status tray icon installation directory dnl ####################################################################### -AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes) +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) -AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes") +AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes") dnl ####################################################################### dnl # Check for Doxygen and dot (part of GraphViz) @@ -2498,7 +2524,7 @@ AM_CONDITIONAL(PURPLE_AVAILABLE, true) -AC_OUTPUT([Makefile +AC_CONFIG_FILES([Makefile Doxyfile doc/Makefile doc/pidgin.1 @@ -2508,6 +2534,8 @@ pidgin/Makefile pidgin/pidgin.pc pidgin/pidgin-uninstalled.pc + pidgin/pidgin-2.pc + pidgin/pidgin-2-uninstalled.pc pidgin/pixmaps/Makefile pidgin/pixmaps/emotes/default/24/Makefile pidgin/pixmaps/emotes/none/Makefile @@ -2522,10 +2550,13 @@ pidgin/plugins/perl/Makefile pidgin/plugins/perl/common/Makefile.PL pidgin/plugins/ticker/Makefile + libpurple/ciphers/Makefile libpurple/example/Makefile libpurple/gconf/Makefile libpurple/purple.pc libpurple/purple-uninstalled.pc + libpurple/purple-2.pc + libpurple/purple-2-uninstalled.pc libpurple/plugins/Makefile libpurple/plugins/mono/Makefile libpurple/plugins/mono/api/Makefile @@ -2541,13 +2572,11 @@ libpurple/protocols/irc/Makefile libpurple/protocols/jabber/Makefile libpurple/protocols/msn/Makefile - libpurple/protocols/msnp9/Makefile libpurple/protocols/myspace/Makefile libpurple/protocols/mxit/Makefile libpurple/protocols/novell/Makefile libpurple/protocols/null/Makefile libpurple/protocols/oscar/Makefile - libpurple/protocols/qq/Makefile libpurple/protocols/sametime/Makefile libpurple/protocols/silc/Makefile libpurple/protocols/silc10/Makefile @@ -2568,6 +2597,7 @@ po/Makefile.in pidgin.spec ]) +AC_OUTPUT echo echo $PACKAGE $VERSION @@ -2596,7 +2626,9 @@ echo Build with Cyrus SASL support. : $enable_cyrus_sasl echo Use kerberos 4 with zephyr.... : $kerberos echo Use external libzephyr........ : $zephyr +echo Use external libgadu.......... : $gadu_libs echo Install pixmaps............... : $enable_pixmaps +echo Old tray icon compatibility... : $enable_traycompat echo Install translations.......... : $enable_i18n echo Has you....................... : yes echo @@ -2620,7 +2652,13 @@ if test "x$enable_pixmaps" = "xno" ; then echo echo Warning: You have disabled the installation of pixmap data, but Pidgin - echo still requires installed pixmaps. Be sure you know what you\'re doing. + echo still requires installed pixmaps. Be sure you know what you are doing. +fi +if test "x$enable_i18n" = "xno" ; then + echo + echo Warning: You have disabled the building and installation of translation + echo data. This will prevent building pidgin.desktop and the GConf schemas. + echo Be sure you know what you are doing. fi echo echo configure complete, now type \'make\'