You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rl...@us...> - 2006-09-06 00:46:07
|
Revision: 17172 http://svn.sourceforge.net/gaim/?rev=17172&view=rev Author: rlaager Date: 2006-09-05 17:46:00 -0700 (Tue, 05 Sep 2006) Log Message: ----------- SF Patch #1547447 from Anders Kaseorg Fixes SF Bug #1547383 "This patch fixes bug 1547383 (Zephyr does not correctly escape @ character), and also makes both zephyr_to_html and html_to_zephyr much more correct and robust" For the record, I have no way of testing this, so I'm following the patches-to-Zephyr-that-compile-are-good approach. Modified Paths: -------------- trunk/COPYRIGHT trunk/libgaim/protocols/zephyr/zephyr.c Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-09-06 00:36:04 UTC (rev 17171) +++ trunk/COPYRIGHT 2006-09-06 00:46:00 UTC (rev 17172) @@ -145,6 +145,7 @@ Hans Petter Jansson Henry Jen Benjamin Kahn +Anders Kaseorg Praveen Karadakal John Kelm Akuke Kok Modified: trunk/libgaim/protocols/zephyr/zephyr.c =================================================================== --- trunk/libgaim/protocols/zephyr/zephyr.c 2006-09-06 00:36:04 UTC (rev 17171) +++ trunk/libgaim/protocols/zephyr/zephyr.c 2006-09-06 00:46:00 UTC (rev 17172) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * gaim * @@ -117,10 +117,19 @@ /* true for everything but @color, since inside the parens of that one is * the color. */ gboolean has_closer; + /* @i, @b, etc. */ + const char *env; + /* }=1, ]=2, )=4, >=8 */ + int closer_mask; + /* }, ], ), > */ + char *closer; /* </i>, </font>, </b>, etc. */ - char *closing; + const char *closing; /* text including the opening html thingie. */ GString *text; + /* href for links */ + gboolean is_href; + GString *href; struct _zframe *enclosing; }; @@ -351,11 +360,6 @@ } } -/* utility macros that are useful for zephyr_to_html */ - -#define IS_OPENER(c) ((c == '{') || (c == '[') || (c == '(') || (c == '<')) -#define IS_CLOSER(c) ((c == '}') || (c == ']') || (c == ')') || (c == '>')) - /* This parses HTML formatting (put out by one of the gtkimhtml widgets And converts it to zephyr formatting. It currently deals properly with <b>, <br>, <i>, <font face=...>, <font color=...>, @@ -364,146 +368,239 @@ <font size = "1 or 2" -> @small 3 or 4 @medium() 5,6, or 7 @large() - <a href is dealt with by ignoring the description and outputting the link + <a href is dealt with by outputting "description <link>" or just "description" as appropriate */ static char *html_to_zephyr(const char *message) { - int len, cnt, retcount; + zframe *frames, *new_f; char *ret; - len = strlen(message); - if (!len) + if (*message == '\0') return g_strdup(""); - ret = g_new0(char, len * 3); + frames = g_new(zframe, 1); + frames->text = g_string_new(""); + frames->href = NULL; + frames->is_href = FALSE; + frames->enclosing = NULL; + frames->closing = NULL; + frames->env = ""; + frames->has_closer = FALSE; + frames->closer_mask = 15; - bzero(ret, len * 3); - retcount = 0; - cnt = 0; gaim_debug_info("zephyr","html received %s\n",message); - while (cnt <= len) { - if (message[cnt] == '<') { - if (!g_ascii_strncasecmp(message + cnt + 1, "i>", 2)) { - strncpy(ret + retcount, "@i(", 3); - cnt += 3; - retcount += 3; - } else if (!g_ascii_strncasecmp(message + cnt + 1, "b>", 2)) { - strncpy(ret + retcount, "@b(", 3); - cnt += 3; - retcount += 3; - } else if (!g_ascii_strncasecmp(message + cnt + 1, "br>", 3)) { - strncpy(ret + retcount, "\n", 1); - cnt += 4; - retcount += 1; - } else if (!g_ascii_strncasecmp(message + cnt + 1, "a href=\"mailto:", 15)) { - cnt += 16; - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "\">", 2) != 0) { - ret[retcount] = message[cnt]; - retcount++; - cnt++; + while (*message) { + if (frames->closing && !g_ascii_strncasecmp(message, frames->closing, strlen(frames->closing))) { + zframe *popped; + message += strlen(frames->closing); + popped = frames; + frames = frames->enclosing; + if (popped->is_href) { + frames->href = popped->text; + } else { + g_string_append(frames->text, popped->env); + if (popped->has_closer) { + g_string_append_c(frames->text, + (popped->closer_mask & 1) ? '{' : + (popped->closer_mask & 2) ? '[' : + (popped->closer_mask & 4) ? '(' : + '<'); } - if (message[cnt] != '\0') - cnt += 2; - /* ignore descriptive string */ - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "</a>", 4) != 0) { - cnt++; + g_string_append(frames->text, popped->text->str); + if (popped->href) + { + int text_len = strlen(popped->text->str), href_len = strlen(popped->href->str); + if (!((text_len == href_len && !strncmp(popped->href->str, popped->text->str, text_len)) || + (7 + text_len == href_len && !strncmp(popped->href->str, "http://", 7) && + !strncmp(popped->href->str + 7, popped->text->str, text_len)) || + (7 + text_len == href_len && !strncmp(popped->href->str, "mailto:", 7) && + !strncmp(popped->href->str + 7, popped->text->str, text_len)))) { + g_string_append(frames->text, " <"); + g_string_append(frames->text, popped->href->str); + if (popped->closer_mask & ~8) { + g_string_append_c(frames->text, '>'); + popped->closer_mask &= ~8; + } else { + g_string_append(frames->text, "@{>}"); + } + } + g_string_free(popped->href, TRUE); } - if (message[cnt] != '\0') - cnt += 4; - } else if (!g_ascii_strncasecmp(message + cnt + 1, "a href=\"", 8)) { - cnt += 9; - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "\">", 2) != 0) { - ret[retcount] = message[cnt]; - retcount++; - cnt++; + if (popped->has_closer) { + g_string_append_c(frames->text, + (popped->closer_mask & 1) ? '}' : + (popped->closer_mask & 2) ? ']' : + (popped->closer_mask & 4) ? ')' : + '>'); } - if (message[cnt] != '\0') - cnt += 2; - /* ignore descriptive string */ - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "</a>", 4) != 0) { - cnt++; - } - if (message[cnt] != '\0') - cnt += 4; - } else if (!g_ascii_strncasecmp(message + cnt + 1, "font", 4)) { - cnt += 5; - while ((message[cnt] != '\0') && (message[cnt] != ' ')) - cnt++; - if ((message[cnt] != '\0') && !g_ascii_strncasecmp(message + cnt, "color=\"", 7)) { - cnt += 7; - strncpy(ret + retcount, "@color(", 7); - retcount += 7; - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "\">", 2) != 0) { - ret[retcount] = message[cnt]; - retcount++; - cnt++; + if (!popped->has_closer) + frames->closer_mask = popped->closer_mask; + g_string_free(popped->text, TRUE); + } + g_free(popped); + } else if (*message == '<') { + if (!g_ascii_strncasecmp(message + 1, "i>", 2)) { + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = FALSE; + new_f->closing = "</i>"; + new_f->env = "@i"; + new_f->has_closer = TRUE; + new_f->closer_mask = 15; + frames = new_f; + message += 3; + } else if (!g_ascii_strncasecmp(message + 1, "b>", 2)) { + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = FALSE; + new_f->closing = "</b>"; + new_f->env = "@b"; + new_f->has_closer = TRUE; + new_f->closer_mask = 15; + frames = new_f; + message += 3; + } else if (!g_ascii_strncasecmp(message + 1, "br>", 3)) { + g_string_append_c(frames->text, '\n'); + message += 4; + } else if (!g_ascii_strncasecmp(message + 1, "a href=\"", 8)) { + message += 9; + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = FALSE; + new_f->closing = "</a>"; + new_f->env = ""; + new_f->has_closer = FALSE; + new_f->closer_mask = frames->closer_mask; + frames = new_f; + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = TRUE; + new_f->closing = "\">"; + new_f->has_closer = FALSE; + new_f->closer_mask = frames->closer_mask; + frames = new_f; + } else if (!g_ascii_strncasecmp(message + 1, "font", 4)) { + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = FALSE; + new_f->closing = "</font>"; + new_f->has_closer = TRUE; + new_f->closer_mask = 15; + message += 5; + while (*message == ' ') + message++; + if (!g_ascii_strncasecmp(message, "color=\"", 7)) { + message += 7; + new_f->env = "@"; + frames = new_f; + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->env = "@color"; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = FALSE; + new_f->closing = "\">"; + new_f->has_closer = TRUE; + new_f->closer_mask = 15; + } else if (!g_ascii_strncasecmp(message, "face=\"", 6)) { + message += 6; + new_f->env = "@"; + frames = new_f; + new_f = g_new(zframe, 1); + new_f->enclosing = frames; + new_f->env = "@font"; + new_f->text = g_string_new(""); + new_f->href = NULL; + new_f->is_href = FALSE; + new_f->closing = "\">"; + new_f->has_closer = TRUE; + new_f->closer_mask = 15; + } else if (!g_ascii_strncasecmp(message, "size=\"", 6)) { + message += 6; + if ((*message == '1') || (*message == '2')) { + new_f->env = "@small"; + } else if ((*message == '3') + || (*message == '4')) { + new_f->env = "@medium"; + } else if ((*message == '5') + || (*message == '6') + || (*message == '7')) { + new_f->env = "@large"; + } else { + new_f->env = ""; + new_f->has_closer = FALSE; + new_f->closer_mask = frames->closer_mask; } - ret[retcount] = ')'; - retcount++; - if (message[cnt] != '\0') - cnt += 2; - } else if (!g_ascii_strncasecmp(message + cnt, "face=\"", 6)) { - cnt += 6; - strncpy(ret + retcount, "@font(", 6); - retcount += 6; - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "\">", 2) != 0) { - ret[retcount] = message[cnt]; - retcount++; - cnt++; - } - ret[retcount] = ')'; - retcount++; - if (message[cnt] != '\0') - cnt += 2; - } else if (!g_ascii_strncasecmp(message + cnt, "size=\"", 6)) { - cnt += 6; - if ((message[cnt] == '1') || (message[cnt] == '2')) { - strncpy(ret + retcount, "@small(", 7); - retcount += 7; - } else if ((message[cnt] == '3') - || (message[cnt] == '4')) { - strncpy(ret + retcount, "@medium(", 8); - retcount += 8; - } else if ((message[cnt] == '5') - || (message[cnt] == '6') - || (message[cnt] == '7')) { - strncpy(ret + retcount, "@large(", 7); - retcount += 7; - } - cnt += 3; + message += 3; } else { /* Drop all unrecognized/misparsed font tags */ - while ((message[cnt] != '\0') && g_ascii_strncasecmp(message + cnt, "\">", 2) != 0) { - cnt++; + new_f->env = ""; + new_f->has_closer = FALSE; + new_f->closer_mask = frames->closer_mask; + while (g_ascii_strncasecmp(message, "\">", 2) != 0) { + message++; } - if (message[cnt] != '\0') - cnt += 2; + if (*message != '\0') + message += 2; } - } else if (!g_ascii_strncasecmp(message + cnt + 1, "/i>", 3) - || !g_ascii_strncasecmp(message + cnt + 1, "/b>", 3)) { - cnt += 4; - ret[retcount] = ')'; - retcount++; - } else if (!g_ascii_strncasecmp(message + cnt + 1, "/font>", 6)) { - cnt += 7; - strncpy(ret + retcount, "@font(fixed)", 12); - retcount += 12; + frames = new_f; } else { /* Catch all for all unrecognized/misparsed <foo> tage */ - while ((message[cnt] != '\0') && (message[cnt] != '>')) { - ret[retcount] = message[cnt]; - retcount++; - cnt++; - } + g_string_append_c(frames->text, *message++); } + } else if (*message == '@') { + g_string_append(frames->text, "@@"); + message++; + } else if (*message == '}') { + if (frames->closer_mask & ~1) { + frames->closer_mask &= ~1; + g_string_append_c(frames->text, *message++); + } else { + g_string_append(frames->text, "@[}]"); + message++; + } + } else if (*message == ']') { + if (frames->closer_mask & ~2) { + frames->closer_mask &= ~2; + g_string_append_c(frames->text, *message++); + } else { + g_string_append(frames->text, "@{]}"); + message++; + } + } else if (*message == ')') { + if (frames->closer_mask & ~4) { + frames->closer_mask &= ~4; + g_string_append_c(frames->text, *message++); + } else { + g_string_append(frames->text, "@{)}"); + message++; + } + } else if (!g_ascii_strncasecmp(message, ">", 4)) { + if (frames->closer_mask & ~8) { + frames->closer_mask &= ~8; + g_string_append_c(frames->text, *message++); + } else { + g_string_append(frames->text, "@{>}"); + message += 4; + } } else { - /* Duh */ - ret[retcount] = message[cnt]; - retcount++; - cnt++; + g_string_append_c(frames->text, *message++); } } + ret = frames->text->str; + g_string_free(frames->text, FALSE); + g_free(frames); gaim_debug_info("zephyr","zephyr outputted %s\n",ret); return ret; } @@ -511,9 +608,8 @@ /* this parses zephyr formatting and converts it to html. For example, if * you pass in "@{@color(blue)@i(hello)}" you should get out * "<font color=blue><i>hello</i></font>". */ -static char *zephyr_to_html(char *message) +static char *zephyr_to_html(const char *message) { - int len, cnt; zframe *frames, *curr; char *ret; @@ -522,126 +618,83 @@ frames->enclosing = NULL; frames->closing = ""; frames->has_closer = FALSE; + frames->closer = NULL; - len = strlen(message); - cnt = 0; - while (cnt <= len) { - if (message[cnt] == '@') { - zframe *new_f; - char *buf; + while (*message) { + if (*message == '@' && message[1] == '@') { + g_string_append(frames->text, "@"); + message += 2; + } else if (*message == '@') { int end; - - for (end = 1; (cnt + end) <= len && !IS_OPENER(message[cnt + end]) - && !IS_CLOSER(message[cnt + end]); end++); - buf = g_new0(char, end); - - if (end) { - g_snprintf(buf, end, "%s", message + cnt + 1); - } - if (!g_ascii_strcasecmp(buf, "italic") || !g_ascii_strcasecmp(buf, "i")) { + for (end = 1; message[end] && (isalnum(message[end]) || message[end] == '_'); end++); + if (message[end] && + (message[end] == '{' || message[end] == '[' || message[end] == '(' || + !g_ascii_strncasecmp(message + end, "<", 4))) { + zframe *new_f; + char *buf; + buf = g_new0(char, end); + g_snprintf(buf, end, "%s", message + 1); + message += end; new_f = g_new(zframe, 1); new_f->enclosing = frames; - new_f->text = g_string_new("<i>"); - new_f->closing = "</i>"; new_f->has_closer = TRUE; - frames = new_f; - cnt += end + 1; /* cnt points to char after opener */ - } else if (!g_ascii_strcasecmp(buf, "small")) { - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new("<font size=\"1\">"); - new_f->closing = "</font>"; - frames = new_f; - cnt += end + 1; - } else if (!g_ascii_strcasecmp(buf, "medium")) { - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new("<font size=\"3\">"); - new_f->closing = "</font>"; - frames = new_f; - cnt += end + 1; - } else if (!g_ascii_strcasecmp(buf, "large")) { - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new("<font size=\"7\">"); - new_f->closing = "</font>"; - frames = new_f; - cnt += end + 1; - } else if (!g_ascii_strcasecmp(buf, "bold") - || !g_ascii_strcasecmp(buf, "b")) { - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new("<b>"); - new_f->closing = "</b>"; - new_f->has_closer = TRUE; - frames = new_f; - cnt += end + 1; - } else if (!g_ascii_strcasecmp(buf, "font")) { - cnt += end + 1; - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new("<font face="); - for (; (cnt <= len) && !IS_CLOSER(message[cnt]); cnt++) { - g_string_append_c(new_f->text, message[cnt]); - } - cnt++; /* point to char after closer */ - g_string_append_c(new_f->text, '>'); - new_f->closing = "</font>"; - new_f->has_closer = FALSE; - frames = new_f; - } else if (!g_ascii_strcasecmp(buf, "color")) { - cnt += end + 1; - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new("<font color="); - for (; (cnt <= len) && !IS_CLOSER(message[cnt]); cnt++) { - g_string_append_c(new_f->text, message[cnt]); - } - cnt++; /* point to char after closer */ - g_string_append_c(new_f->text, '>'); - new_f->closing = "</font>"; - new_f->has_closer = FALSE; - frames = new_f; - } else if (!g_ascii_strcasecmp(buf, "")) { - new_f = g_new(zframe, 1); - new_f->enclosing = frames; - new_f->text = g_string_new(""); - new_f->closing = ""; - new_f->has_closer = TRUE; - frames = new_f; - cnt += end + 1; /* cnt points to char after opener */ - } else { - if ((cnt + end) > len) { - g_string_append_c(frames->text, '@'); - cnt++; - } else if (IS_CLOSER(message[cnt + end])) { - /* We have @chars..closer . This is - merely a sequence of chars that isn't a formatting tag - */ - int tmp = cnt; - - while (tmp <= cnt + end) { - g_string_append_c(frames->text, message[tmp]); - tmp++; - } - cnt += end + 1; + new_f->closer = (*message == '{' ? "}" : + *message == '[' ? "]" : + *message == '(' ? ")" : + ">"); + message += (*message == '&' ? 4 : 1); + if (!g_ascii_strcasecmp(buf, "italic") || !g_ascii_strcasecmp(buf, "i")) { + new_f->text = g_string_new("<i>"); + new_f->closing = "</i>"; + } else if (!g_ascii_strcasecmp(buf, "small")) { + new_f->text = g_string_new("<font size=\"1\">"); + new_f->closing = "</font>"; + } else if (!g_ascii_strcasecmp(buf, "medium")) { + new_f->text = g_string_new("<font size=\"3\">"); + new_f->closing = "</font>"; + } else if (!g_ascii_strcasecmp(buf, "large")) { + new_f->text = g_string_new("<font size=\"7\">"); + new_f->closing = "</font>"; + } else if (!g_ascii_strcasecmp(buf, "bold") + || !g_ascii_strcasecmp(buf, "b")) { + new_f->text = g_string_new("<b>"); + new_f->closing = "</b>"; + } else if (!g_ascii_strcasecmp(buf, "font")) { + zframe *extra_f; + extra_f = g_new(zframe, 1); + extra_f->enclosing = frames; + new_f->enclosing = extra_f; + extra_f->text = g_string_new(""); + extra_f->has_closer = FALSE; + extra_f->closer = frames->closer; + extra_f->closing = "</font>"; + new_f->text = g_string_new("<font face=\""); + new_f->closing = "\">"; + } else if (!g_ascii_strcasecmp(buf, "color")) { + zframe *extra_f; + extra_f = g_new(zframe, 1); + extra_f->enclosing = frames; + new_f->enclosing = extra_f; + extra_f->text = g_string_new(""); + extra_f->has_closer = FALSE; + extra_f->closer = frames->closer; + extra_f->closing = "</font>"; + new_f->text = g_string_new("<font color=\""); + new_f->closing = "\">"; } else { - /* unrecognized thingie. act like it's not there, but we - * still need to take care of the corresponding closer, - * make a frame that does nothing. */ - new_f = g_new(zframe, 1); - new_f->enclosing = frames; new_f->text = g_string_new(""); new_f->closing = ""; - new_f->has_closer = TRUE; - frames = new_f; - cnt += end + 1; /* cnt points to char after opener */ } + frames = new_f; + } else { + /* Not a formatting tag, add the character as normal. */ + g_string_append_c(frames->text, *message++); } - } else if (IS_CLOSER(message[cnt])) { + } else if (frames->closer && !g_ascii_strncasecmp(message, frames->closer, strlen(frames->closer))) { zframe *popped; gboolean last_had_closer; + message += strlen(frames->closer); if (frames && frames->enclosing) { do { popped = frames; @@ -653,14 +706,13 @@ g_free(popped); } while (frames && frames->enclosing && !last_had_closer); } else { - g_string_append_c(frames->text, message[cnt]); + g_string_append_c(frames->text, *message); } - cnt++; - } else if (message[cnt] == '\n') { + } else if (*message == '\n') { g_string_append(frames->text, "<br>"); - cnt++; + message++; } else { - g_string_append_c(frames->text, message[cnt++]); + g_string_append_c(frames->text, *message++); } } /* go through all the stuff that they didn't close */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-09-06 00:36:08
|
Revision: 17171 http://svn.sourceforge.net/gaim/?rev=17171&view=rev Author: rlaager Date: 2006-09-05 17:36:04 -0700 (Tue, 05 Sep 2006) Log Message: ----------- SF Patch #1551607 from Alex Badea: "I'm not entirely sure what causes it in general, but on my system it's triggered (only sometimes) by the History plugin on a Yahoo account." The almost identical SF Patch #1549604 from Valdis Kletnieks says: "Unchecked dereference of 'oldfont' in gtkimhtml.c causes a crash when starting up, as 'oldfont' isn't set." Modified Paths: -------------- trunk/gtk/gtkimhtml.c Modified: trunk/gtk/gtkimhtml.c =================================================================== --- trunk/gtk/gtkimhtml.c 2006-09-06 00:04:45 UTC (rev 17170) +++ trunk/gtk/gtkimhtml.c 2006-09-06 00:36:04 UTC (rev 17171) @@ -2902,7 +2902,7 @@ else font->bold = 0; } - if((font->bold && !oldfont->bold) || (oldfont->bold && !font->bold)) + if ((font->bold && oldfont && !oldfont->bold) || (oldfont && oldfont->bold && !font->bold) || (font->bold && !oldfont)) { gtk_imhtml_toggle_bold(imhtml); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-09-06 00:04:49
|
Revision: 17170 http://svn.sourceforge.net/gaim/?rev=17170&view=rev Author: seanegan Date: 2006-09-05 17:04:45 -0700 (Tue, 05 Sep 2006) Log Message: ----------- Get rid of old fields Modified Paths: -------------- trunk/gtk/gtkblist.c trunk/gtk/gtkblist.h Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-09-05 16:13:57 UTC (rev 17169) +++ trunk/gtk/gtkblist.c 2006-09-06 00:04:45 UTC (rev 17170) @@ -3525,28 +3525,6 @@ return ((struct _gaim_gtk_blist_node *)node->ui_data)->contact_expanded; } -void gaim_gtk_blist_update_columns() -{ - if(!gtkblist) - return; - - if (gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) { - gtk_tree_view_column_set_visible(gtkblist->buddy_icon_column, TRUE); - gtk_tree_view_column_set_visible(gtkblist->idle_column, FALSE); - } else { - gtk_tree_view_column_set_visible(gtkblist->idle_column, - gaim_prefs_get_bool("/gaim/gtk/blist/show_idle_time")); - gtk_tree_view_column_set_visible(gtkblist->buddy_icon_column, FALSE); - } -} - -static void -show_buddy_icons_pref_cb(const char *name, GaimPrefType type, - gconstpointer val, gpointer data) -{ - gaim_gtk_blist_update_columns(); -} - enum { DRAG_BUDDY, DRAG_ROW, @@ -3953,6 +3931,7 @@ gtk_widget_show(gtkblist->treeview); gtk_widget_set_name(gtkblist->treeview, "gaim_gtkblist_treeview"); +/* gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(gtkblist->treeview), TRUE); */ /* Set up selection stuff */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview)); @@ -4057,7 +4036,6 @@ gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sw, TRUE, TRUE, 0); gtk_container_add(GTK_CONTAINER(sw), gtkblist->treeview); - gaim_gtk_blist_update_columns(); /* Create an empty vbox used for showing connection errors */ gtkblist->error_buttons = gtk_vbox_new(FALSE, 0); @@ -4120,12 +4098,6 @@ gaim_prefs_connect_callback(handle, "/gaim/gtk/blist/sort_type", _prefs_change_sort_method, NULL); - /* things that affect what columns are displayed */ - gaim_prefs_connect_callback(handle, "/gaim/gtk/blist/show_buddy_icons", - show_buddy_icons_pref_cb, NULL); - gaim_prefs_connect_callback(handle, "/gaim/gtk/blist/show_idle_time", - show_buddy_icons_pref_cb, NULL); - /* menus */ gaim_prefs_connect_callback(handle, "/gaim/gtk/sound/mute", gaim_gtk_blist_mute_pref_cb, NULL); @@ -4720,8 +4692,6 @@ gtkblist->drag_timeout = 0; gtkblist->window = gtkblist->vbox = gtkblist->treeview = NULL; gtkblist->treemodel = NULL; - gtkblist->idle_column = NULL; - gtkblist->buddy_icon_column = NULL; g_object_unref(G_OBJECT(gtkblist->ift)); g_free(gtkblist); accountmenu = NULL; Modified: trunk/gtk/gtkblist.h =================================================================== --- trunk/gtk/gtkblist.h 2006-09-05 16:13:57 UTC (rev 17169) +++ trunk/gtk/gtkblist.h 2006-09-06 00:04:45 UTC (rev 17170) @@ -66,10 +66,7 @@ GtkWidget *treeview; /**< It's a treeview... d'uh. */ GtkTreeStore *treemodel; /**< This is the treemodel. */ - GtkTreeViewColumn *idle_column, - *warning_column, - *buddy_icon_column, - *text_column; + GtkTreeViewColumn *text_column; /**< Column */ GtkCellRenderer *text_rend; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-05 16:14:03
|
Revision: 17169 http://svn.sourceforge.net/gaim/?rev=17169&view=rev Author: datallah Date: 2006-09-05 09:13:57 -0700 (Tue, 05 Sep 2006) Log Message: ----------- Remove VERSION file from svn, it was only needed there for wingaim and was causing problems elsewhere when it was not overwritten. Parse the version number from the configure.ac file for the wingaim build instead. Modified Paths: -------------- trunk/Makefile.am trunk/libgaim/win32/global.mak Removed Paths: ------------- trunk/VERSION Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore - ABOUT-NLS aclocal.m4 autom4te.cache compile confdefs.h config.cache config.guess config.h config.h.in config.h.in~ config.log config.status config.sub configure configure.2.1x depcomp Doxyfile gaim.apspec gaim.desktop gaim.pc gaim.service gaim.spec install-sh intl intltool-extract intltool-extract.in intltool-merge intltool-merge.in intltool-update intltool-update.in libtool ltconfig ltmain.sh Makefile Makefile.in missing mkinstalldirs stamp-h stamp-h1 stamp-h.in *.swp .temp-gettextize win32-install-dir gaim-*.exe + ABOUT-NLS aclocal.m4 autom4te.cache compile confdefs.h config.cache config.guess config.h config.h.in config.h.in~ config.log config.status config.sub configure configure.2.1x depcomp Doxyfile gaim.apspec gaim.desktop gaim.pc gaim.service gaim.spec install-sh intl intltool-extract intltool-extract.in intltool-merge intltool-merge.in intltool-update intltool-update.in libtool ltconfig ltmain.sh Makefile Makefile.in missing mkinstalldirs stamp-h stamp-h1 stamp-h.in *.swp .temp-gettextize win32-install-dir gaim-*.exe VERSION Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2006-09-05 15:40:24 UTC (rev 17168) +++ trunk/Makefile.am 2006-09-05 16:13:57 UTC (rev 17169) @@ -16,7 +16,6 @@ config.h.mingw \ Makefile.mingw \ README.mingw \ - VERSION \ VERSION.in \ gtk/plugins/win32/transparency/Makefile.mingw \ gtk/plugins/win32/transparency/win2ktrans.c \ Deleted: trunk/VERSION =================================================================== --- trunk/VERSION 2006-09-05 15:40:24 UTC (rev 17168) +++ trunk/VERSION 2006-09-05 16:13:57 UTC (rev 17169) @@ -1 +0,0 @@ -2.0.0dev Modified: trunk/libgaim/win32/global.mak =================================================================== --- trunk/libgaim/win32/global.mak 2006-09-05 15:40:24 UTC (rev 17168) +++ trunk/libgaim/win32/global.mak 2006-09-05 16:13:57 UTC (rev 17169) @@ -50,7 +50,17 @@ GAIM_PORTABLE_EXE := $(GAIM_GTK_TOP)/gaim-portable.exe GCCWARNINGS := -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -GAIM_VERSION := $(shell cat $(GAIM_TOP)/VERSION) + +# parse the version number from the configure.ac file if it is newer +#AC_INIT([gaim], [2.0.0dev], [gai...@li...]) +GAIM_VERSION := $(shell \ + if [ ! $(GAIM_TOP)/VERSION -nt $(GAIM_TOP)/configure.ac ]; then \ + awk 'BEGIN {FS="\\] *, *\\["} /^AC_INIT\(.+\)/ {printf("%s",$$2); exit}' \ + $(GAIM_TOP)/configure.ac > $(GAIM_TOP)/VERSION; \ + fi; \ + cat $(GAIM_TOP)/VERSION \ +) + DEFINES += -DVERSION=\"$(GAIM_VERSION)\" \ -DHAVE_CONFIG_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-05 15:40:30
|
Revision: 17168 http://svn.sourceforge.net/gaim/?rev=17168&view=rev Author: datallah Date: 2006-09-05 08:40:24 -0700 (Tue, 05 Sep 2006) Log Message: ----------- Use NSIS' built-in language registry key stuff. This fixes the installer forgetting which language you've selected. Fill the installer file versioning information - Unfortunately, there doesn't appear to be a way to manipulate the value to use for the ProductVersion inside the NSIS script, so the Makefile needs to massage the data. Modified Paths: -------------- trunk/Makefile.mingw trunk/gaim-installer.nsi Modified: trunk/Makefile.mingw =================================================================== --- trunk/Makefile.mingw 2006-09-05 13:55:50 UTC (rev 17167) +++ trunk/Makefile.mingw 2006-09-05 15:40:24 UTC (rev 17168) @@ -8,6 +8,30 @@ GAIM_TOP := . include $(GAIM_TOP)/libgaim/win32/global.mak +# Generate a X.X.X.X version for the installer file versioning header +# The last digit will be 99 for a final release, 0 for dev or unknown, or the beta number +GAIM_PRODUCT_VERSION = $(shell \ +awk 'BEGIN {FS="."} { \ + if (int($$3) == $$3) { \ + $$4 = "99"; \ + } else { \ + $$5 = $$3; \ + sub(int($$3), "", $$5); \ + if ($$5 == "dev") { \ + $$4 = "0"; \ + } else { \ + if (sub("beta", "", $$5) > 0) { \ + $$4 = $$5; \ + } else { \ + $$4 = "0"; \ + } \ + } \ + } \ + printf("%s.%s.%s.%s", $$1, $$2, int($$3), $$4); \ + exit; \ +}' VERSION) + + all: $(GAIM_CONFIG_H) $(MAKE) -C $(GAIM_LIB_TOP) -f $(GAIM_WIN32_MAKEFILE) $(MAKE) -C $(GAIM_GTK_TOP) -f $(GAIM_WIN32_MAKEFILE) @@ -19,13 +43,13 @@ $(MAKE) -C $(GAIM_PO_TOP) -f $(GAIM_WIN32_MAKEFILE) install installer: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DWITH_GTK gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DWITH_GTK gaim-installer.nsi installer_nogtk: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" gaim-installer.nsi installer_debug: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DDEBUG gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DDEBUG gaim-installer.nsi installers: installer installer_nogtk Modified: trunk/gaim-installer.nsi =================================================================== --- trunk/gaim-installer.nsi 2006-09-05 13:55:50 UTC (rev 17167) +++ trunk/gaim-installer.nsi 2006-09-05 15:40:24 UTC (rev 17168) @@ -59,7 +59,6 @@ !define HKLM_APP_PATHS_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" !define GAIM_STARTUP_RUN_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" !define GAIM_UNINST_EXE "gaim-uninst.exe" -!define GAIM_REG_LANG "Installer Language" !define GTK_VERSION "2.6.10" !define GTK_REG_KEY "SOFTWARE\GTK\2.0" @@ -75,6 +74,23 @@ !define DOWNLOADER_URL "http://gaim.sourceforge.net/win32/download_redir.php" ;-------------------------------- +;Version resource +VIProductVersion "${GAIM_PRODUCT_VERSION}" +VIAddVersionKey "ProductName" "Gaim" +VIAddVersionKey "FileVersion" "${GAIM_VERSION}" +VIAddVersionKey "ProductVersion" "${GAIM_VERSION}" +VIAddVersionKey "LegalCopyright" "" +!ifdef WITH_GTK +VIAddVersionKey "FileDescription" "Gaim Installer (w/ GTK+ Installer)" +!else +!ifdef DEBUG +VIAddVersionKey "FileDescription" "Gaim Installer (Debug Version)" +!else +VIAddVersionKey "FileDescription" "Gaim Installer (w/o GTK+ Installer)" +!endif +!endif + +;-------------------------------- ;Modern UI Configuration !define MUI_ICON ".\gtk\pixmaps\gaim-install.ico" @@ -87,6 +103,10 @@ !define MUI_LICENSEPAGE_BUTTON $(GAIM_LICENSE_BUTTON) !define MUI_LICENSEPAGE_TEXT_BOTTOM $(GAIM_LICENSE_BOTTOM_TEXT) + !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" + !define MUI_LANGDLL_REGISTRY_KEY ${GAIM_REG_KEY} + !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" + !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_ABORTWARNING @@ -459,9 +479,6 @@ StrCmp $R0 "NONE" done SetOverwrite off - ; Write out installer language - WriteRegStr HKCU "${GAIM_REG_KEY}" "${GAIM_REG_LANG}" "$LANGUAGE" - ; write out uninstaller SetOverwrite on WriteUninstaller "$INSTDIR\${GAIM_UNINST_EXE}" @@ -1184,8 +1201,8 @@ Call un.RunCheck StrCpy $name "Gaim ${GAIM_VERSION}" - ; Get stored language prefrence - ReadRegStr $LANGUAGE HKCU ${GAIM_REG_KEY} "${GAIM_REG_LANG}" + ; Get stored language preference + !insertmacro MUI_UNGETLANGUAGE FunctionEnd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-09-05 13:55:54
|
Revision: 17167 http://svn.sourceforge.net/gaim/?rev=17167&view=rev Author: eblanton Date: 2006-09-05 06:55:50 -0700 (Tue, 05 Sep 2006) Log Message: ----------- Breaking from case statements to prevent fall-through which causes an extra va_arg to be extracted is kind of important. I think I'll do that here. (Thanks to Josh Blanton) Modified Paths: -------------- trunk/libgaim/plugins/tcl/tcl_signals.c Modified: trunk/libgaim/plugins/tcl/tcl_signals.c =================================================================== --- trunk/libgaim/plugins/tcl/tcl_signals.c 2006-09-05 08:21:51 UTC (rev 17166) +++ trunk/libgaim/plugins/tcl/tcl_signals.c 2006-09-05 13:55:50 UTC (rev 17167) @@ -224,6 +224,7 @@ } else { arg = Tcl_NewIntObj(va_arg(args, int)); } + break; case GAIM_TYPE_INT64: case GAIM_TYPE_UINT64: /* Tcl < 8.4 doesn't have wide ints, so we have ugly This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-05 08:21:54
|
Revision: 17166 http://svn.sourceforge.net/gaim/?rev=17166&view=rev Author: thekingant Date: 2006-09-05 01:21:51 -0700 (Tue, 05 Sep 2006) Log Message: ----------- "make dist" is closer to working now. gtk/plugins/perl/Makefile.am still needs some work, but I'm tired Modified Paths: -------------- trunk/Makefile.am trunk/gtk/Makefile.am trunk/gtk/plugins/Makefile.am trunk/gtk/plugins/perl/Makefile.am trunk/libgaim/Makefile.am Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2006-09-05 06:10:38 UTC (rev 17165) +++ trunk/Makefile.am 2006-09-05 08:21:51 UTC (rev 17166) @@ -18,12 +18,12 @@ README.mingw \ VERSION \ VERSION.in \ - plugins/win32/transparency/Makefile.mingw \ - plugins/win32/transparency/win2ktrans.c \ - plugins/win32/winprefs/gtkappbar.c \ - plugins/win32/winprefs/gtkappbar.h \ - plugins/win32/winprefs/Makefile.mingw \ - plugins/win32/winprefs/winprefs.c \ + gtk/plugins/win32/transparency/Makefile.mingw \ + gtk/plugins/win32/transparency/win2ktrans.c \ + gtk/plugins/win32/winprefs/gtkappbar.c \ + gtk/plugins/win32/winprefs/gtkappbar.h \ + gtk/plugins/win32/winprefs/Makefile.mingw \ + gtk/plugins/win32/winprefs/winprefs.c \ po/Makefile.mingw gaimincludedir=$(includedir)/gaim Modified: trunk/gtk/Makefile.am =================================================================== --- trunk/gtk/Makefile.am 2006-09-05 06:10:38 UTC (rev 17165) +++ trunk/gtk/Makefile.am 2006-09-05 08:21:51 UTC (rev 17166) @@ -5,21 +5,16 @@ getopt.h \ getopt1.c \ Makefile.mingw \ - win_gaim.c \ win32/IdleTracker/Makefile.mingw \ win32/IdleTracker/idletrack.c \ win32/IdleTracker/idletrack.h \ win32/gaimrc.rc \ - win32/global.mak \ - win32/libc_interface.c \ - win32/libc_interface.h \ - win32/libc_internal.h \ + win32/gtkwin32dep.c \ + win32/gtkwin32dep.h \ win32/resource.h \ win32/untar.c \ win32/untar.h \ - win32/wgaimerror.h \ - win32/win32dep.c \ - win32/win32dep.h \ + win32/win_gaim.c \ win32/wspell.c \ win32/wspell.h \ win32/nsis/gaim-header.bmp \ Modified: trunk/gtk/plugins/Makefile.am =================================================================== --- trunk/gtk/plugins/Makefile.am 2006-09-05 06:10:38 UTC (rev 17165) +++ trunk/gtk/plugins/Makefile.am 2006-09-05 08:21:51 UTC (rev 17166) @@ -64,8 +64,6 @@ endif # PLUGINS EXTRA_DIST = \ - ChangeLog HOWTO \ - ChangeLog.API \ Makefile.mingw \ contact_priority.c \ gaiminc.c \ Modified: trunk/gtk/plugins/perl/Makefile.am =================================================================== --- trunk/gtk/plugins/perl/Makefile.am 2006-09-05 06:10:38 UTC (rev 17165) +++ trunk/gtk/plugins/perl/Makefile.am 2006-09-05 08:21:51 UTC (rev 17166) @@ -28,12 +28,12 @@ common/GtkThemes.xs \ common/GtkUtils.xs \ common/gtkmodule.h \ + common/Makefile.PL.in \ common/typemap EXTRA_DIST = \ Makefile.mingw \ common/Makefile.mingw \ - common/Makefile.Pl.in \ $(common_sources) all-local: common/Makefile Modified: trunk/libgaim/Makefile.am =================================================================== --- trunk/libgaim/Makefile.am 2006-09-05 06:10:38 UTC (rev 17165) +++ trunk/libgaim/Makefile.am 2006-09-05 08:21:51 UTC (rev 17166) @@ -6,58 +6,13 @@ gaim-send \ gaim-send-async \ Makefile.mingw \ - win_gaim.c \ - win32/IdleTracker/Makefile.mingw \ - win32/IdleTracker/idletrack.c \ - win32/IdleTracker/idletrack.h \ - win32/gaimrc.rc \ win32/global.mak \ win32/libc_interface.c \ win32/libc_interface.h \ win32/libc_internal.h \ - win32/resource.h \ - win32/untar.c \ - win32/untar.h \ win32/wgaimerror.h \ win32/win32dep.c \ - win32/win32dep.h \ - win32/wspell.c \ - win32/wspell.h \ - win32/nsis/gaim-header.bmp \ - win32/nsis/gaim-intro.bmp \ - win32/nsis/gaim-plugin.nsh \ - win32/nsis/langmacros.nsh \ - win32/nsis/translations/albanian.nsh \ - win32/nsis/translations/bulgarian.nsh \ - win32/nsis/translations/catalan.nsh \ - win32/nsis/translations/czech.nsh \ - win32/nsis/translations/danish.nsh \ - win32/nsis/translations/dutch.nsh \ - win32/nsis/translations/english.nsh \ - win32/nsis/translations/finnish.nsh \ - win32/nsis/translations/french.nsh \ - win32/nsis/translations/german.nsh \ - win32/nsis/translations/hebrew.nsh \ - win32/nsis/translations/hungarian.nsh \ - win32/nsis/translations/italian.nsh \ - win32/nsis/translations/japanese.nsh \ - win32/nsis/translations/korean.nsh \ - win32/nsis/translations/kurdish.nsh \ - win32/nsis/translations/lithuanian.nsh \ - win32/nsis/translations/norwegian.nsh \ - win32/nsis/translations/polish.nsh \ - win32/nsis/translations/portuguese.nsh \ - win32/nsis/translations/portuguese-br.nsh \ - win32/nsis/translations/romanian.nsh \ - win32/nsis/translations/russian.nsh \ - win32/nsis/translations/serbian-latin.nsh \ - win32/nsis/translations/simp-chinese.nsh \ - win32/nsis/translations/slovak.nsh \ - win32/nsis/translations/slovenian.nsh \ - win32/nsis/translations/spanish.nsh \ - win32/nsis/translations/swedish.nsh \ - win32/nsis/translations/trad-chinese.nsh \ - win32/nsis/translations/vietnamese.nsh + win32/win32dep.h SUBDIRS = plugins protocols This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-05 06:10:41
|
Revision: 17165 http://svn.sourceforge.net/gaim/?rev=17165&view=rev Author: thekingant Date: 2006-09-04 23:10:38 -0700 (Mon, 04 Sep 2006) Log Message: ----------- Some proxy love. This is much less crash-happy. I'm having problems getting HTTP proxies to work for me, but my squid might be misconfigured. And I haven't tested socks4 or 5 yet. Modified Paths: -------------- trunk/libgaim/proxy.c Modified: trunk/libgaim/proxy.c =================================================================== --- trunk/libgaim/proxy.c 2006-09-05 03:14:46 UTC (rev 17164) +++ trunk/libgaim/proxy.c 2006-09-05 06:10:38 UTC (rev 17165) @@ -42,7 +42,7 @@ struct _GaimProxyConnectData { GaimProxyConnectFunction connect_cb; gpointer data; - char *host; + gchar *host; int port; int fd; guint inpa; @@ -274,15 +274,51 @@ * Proxy API **************************************************************************/ -/* - * This is used when the connection attempt to one particular IP - * address fails. We close the socket, remove the watcher and get - * rid of input and output buffers. Normally try_connect() will - * be called immediately after this. +/** + * Whoever calls this needs to have called + * gaim_proxy_connect_data_disconnect() beforehand. */ static void -gaim_proxy_connect_data_disconnect(GaimProxyConnectData *connect_data) +gaim_proxy_connect_data_destroy(GaimProxyConnectData *connect_data) { + connect_datas = g_slist_remove(connect_datas, connect_data); + + if (connect_data->query_data != NULL) + gaim_dnsquery_destroy(connect_data->query_data); + + while (connect_data->hosts != NULL) + { + /* Discard the length... */ + connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); + /* Free the address... */ + g_free(connect_data->hosts->data); + connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); + } + + g_free(connect_data->host); + g_free(connect_data); +} + +/** + * Free all information dealing with a connection attempt and + * reset the connect_data to prepare for it to try to connect + * to another IP address. + * + * If an error message is passed in, then we know the connection + * attempt failed. If the connection attempt failed and + * connect_data->hosts is not empty then we try the next IP address. + * If the connection attempt failed and we have no more hosts + * try try then we call the callback with the given error message, + * then destroy the connect_data. + * + * @param error_message An error message explaining why the connection + * failed. This will be passed to the callback function + * specified in the call to gaim_proxy_connect(). If the + * connection was successful then pass in null. + */ +static void +gaim_proxy_connect_data_disconnect(GaimProxyConnectData *connect_data, const gchar *error_message) +{ if (connect_data->inpa > 0) { gaim_input_remove(connect_data->inpa); @@ -300,29 +336,38 @@ g_free(connect_data->read_buffer); connect_data->read_buffer = NULL; + + if (error_message != NULL) + { + gaim_debug_info("proxy", "Connection attempt failed: %s\n", + error_message); + if (connect_data->hosts != NULL) + try_connect(connect_data); + else + { + /* Everything failed! Tell the originator of the request. */ + connect_data->connect_cb(connect_data->data, -1, error_message); + gaim_proxy_connect_data_destroy(connect_data); + } + } } +/** + * This calls gaim_proxy_connect_data_disconnect(), but it lets you + * specify the error_message using a printf()-like syntax. + */ static void -gaim_proxy_connect_data_destroy(GaimProxyConnectData *connect_data) +gaim_proxy_connect_data_disconnect_formatted(GaimProxyConnectData *connect_data, const char *format, ...) { - gaim_proxy_connect_data_disconnect(connect_data); + va_list args; + gchar *tmp; - connect_datas = g_slist_remove(connect_datas, connect_data); + va_start(args, format); + tmp = g_strdup_vprintf(format, args); + va_end(args); - if (connect_data->query_data != NULL) - gaim_dnsquery_destroy(connect_data->query_data); - - while (connect_data->hosts != NULL) - { - /* Discard the length... */ - connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); - /* Free the address... */ - g_free(connect_data->hosts->data); - connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); - } - - g_free(connect_data->host); - g_free(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, tmp); + g_free(tmp); } static void @@ -337,45 +382,20 @@ */ connect_data->fd = -1; + gaim_proxy_connect_data_disconnect(connect_data, NULL); gaim_proxy_connect_data_destroy(connect_data); } -/** - * @param error An error message explaining why the connection - * failed. This will be passed to the callback function - * specified in the call to gaim_proxy_connect(). - */ -/* - * TODO: Make sure all callers of this function pass a really really - * good error_message. - */ static void -gaim_proxy_connect_data_error(GaimProxyConnectData *connect_data, const char *format, ...) +socket_ready_cb(gpointer data, gint source, GaimInputCondition cond) { - gchar *error_message; - va_list args; - - va_start(args, format); - error_message = g_strdup_vprintf(format, args); - va_end(args); - - connect_data->connect_cb(connect_data->data, -1, error_message); - g_free(error_message); - - gaim_proxy_connect_data_destroy(connect_data); -} - -static void -no_one_calls(gpointer data, gint source, GaimInputCondition cond) -{ GaimProxyConnectData *connect_data = data; socklen_t len; - int error=0, ret; + int error = 0; + int ret; gaim_debug_info("proxy", "Connected.\n"); - len = sizeof(error); - /* * getsockopt after a non-blocking connect returns -1 if something is * really messed up (bad descriptor, usually). Otherwise, it returns 0 and @@ -387,39 +407,33 @@ * be overly optimistic sometimes. select is just a hint that you might be * able to do something.) */ + len = sizeof(error); ret = getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len); + if (ret == 0 && error == EINPROGRESS) - return; /* we'll be called again later */ - if (ret < 0 || error != 0) { - if (ret!=0) + /* No worries - we'll be called again later */ + /* TODO: Does this ever happen? */ + return; + + if (ret != 0 || error != 0) { + if (ret != 0) error = errno; - - gaim_debug_error("proxy", - "getsockopt SO_ERROR check: %s\n", strerror(error)); - - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, strerror(error)); return; } - gaim_input_remove(connect_data->inpa); - connect_data->inpa = 0; - gaim_proxy_connect_data_connected(connect_data); } static gboolean clean_connect(gpointer data) { - GaimProxyConnectData *connect_data; + gaim_proxy_connect_data_connected(data); - connect_data = data; - gaim_proxy_connect_data_connected(connect_data); - return FALSE; } -static int +static void proxy_connect_none(GaimProxyConnectData *connect_data, struct sockaddr *addr, socklen_t addrlen) { gaim_debug_info("proxy", "Connecting to %s:%d with no proxy\n", @@ -428,27 +442,27 @@ connect_data->fd = socket(addr->sa_family, SOCK_STREAM, 0); if (connect_data->fd < 0) { - gaim_debug_error("proxy", - "Unable to create socket: %s\n", strerror(errno)); - return -1; + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Unable to create socket:\n%s"), strerror(errno)); + return; } + fcntl(connect_data->fd, F_SETFL, O_NONBLOCK); #ifndef _WIN32 fcntl(connect_data->fd, F_SETFD, FD_CLOEXEC); #endif - if (connect(connect_data->fd, (struct sockaddr *)addr, addrlen) != 0) + if (connect(connect_data->fd, addr, addrlen) != 0) { - if ((errno == EINPROGRESS) || (errno == EINTR)) { + if ((errno == EINPROGRESS) || (errno == EINTR)) + { gaim_debug_info("proxy", "Connection in progress\n"); - connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_WRITE, no_one_calls, connect_data); + connect_data->inpa = gaim_input_add(connect_data->fd, + GAIM_INPUT_WRITE, socket_ready_cb, connect_data); } - else { - gaim_debug_error("proxy", - "Connect failed: %s\n", strerror(errno)); - close(connect_data->fd); - connect_data->fd = -1; - return -1; + else + { + gaim_proxy_connect_data_disconnect(connect_data, strerror(errno)); } } else @@ -458,14 +472,18 @@ */ socklen_t len; int error = ETIMEDOUT; + int ret; + gaim_debug_info("proxy", "Connected immediately.\n"); + len = sizeof(error); - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) != 0) + ret = getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len); + if ((ret != 0) || (error != 0)) { - gaim_debug_error("proxy", "getsockopt failed.\n"); - close(connect_data->fd); - connect_data->fd = -1; - return -1; + if (ret != 0) + error = errno; + gaim_proxy_connect_data_disconnect(connect_data, strerror(error)); + return; } /* @@ -474,42 +492,57 @@ */ gaim_timeout_add(10, clean_connect, connect_data); } - - return connect_data->fd; } +/** + * This is a utility function used by the HTTP, SOCKS4 and SOCKS5 + * connect functions. It writes data from a buffer to a socket. + * When all the data is written it sets up a watcher to read a + * response and call a specified function. + */ static void proxy_do_write(gpointer data, gint source, GaimInputCondition cond) { - GaimProxyConnectData *connect_data = data; - const guchar *request = connect_data->write_buffer + connect_data->written_len; - gsize request_len = connect_data->write_buf_len - connect_data->written_len; + GaimProxyConnectData *connect_data; + const guchar *request; + gsize request_len; + int ret; - int ret = write(connect_data->fd, request, request_len); + connect_data = data; + request = connect_data->write_buffer + connect_data->written_len; + request_len = connect_data->write_buf_len - connect_data->written_len; - if(ret < 0 && errno == EAGAIN) + ret = write(connect_data->fd, request, request_len); + if (ret <= 0) + { + if (errno == EAGAIN) + /* No worries */ + return; + + /* Error! */ + gaim_proxy_connect_data_disconnect(connect_data, strerror(errno)); return; - else if(ret < 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); - return; - } else if (ret < request_len) { + } + if (ret < request_len) { connect_data->written_len += ret; return; } - gaim_input_remove(connect_data->inpa); + /* We're done writing data! Wait for a response. */ g_free(connect_data->write_buffer); connect_data->write_buffer = NULL; - - /* register the response handler for the response */ - connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_READ, connect_data->read_cb, connect_data); + gaim_input_remove(connect_data->inpa); + connect_data->inpa = gaim_input_add(connect_data->fd, + GAIM_INPUT_READ, connect_data->read_cb, connect_data); } #define HTTP_GOODSTRING "HTTP/1.0 200" #define HTTP_GOODSTRING2 "HTTP/1.1 200" -/* read the response to the CONNECT request, if we are requesting a non-port-80 tunnel */ +/** + * We're using an HTTP proxy for a non-port 80 tunnel. Read the + * response to the CONNECT request. + */ static void http_canread(gpointer data, gint source, GaimInputCondition cond) { @@ -519,7 +552,8 @@ guchar *p; gsize max_read; - if(connect_data->read_buffer == NULL) { + if (connect_data->read_buffer == NULL) + { connect_data->read_buf_len = 8192; connect_data->read_buffer = g_malloc(connect_data->read_buf_len); connect_data->read_len = 0; @@ -529,17 +563,32 @@ max_read = connect_data->read_buf_len - connect_data->read_len - 1; len = read(connect_data->fd, p, max_read); - if(len < 0 && errno == EAGAIN) + + if (len == 0) + { + gaim_proxy_connect_data_disconnect(connect_data, + _("Server closed the connection.")); return; - else if(len <= 0) { - gaim_proxy_connect_data_error(connect_data, _("Lost connection with server for an unknown reason.")); + } + + if (len < 0) + { + if (errno == EAGAIN) + /* No worries */ + return; + + /* Error! */ + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Lost connection with server:\n%s"), strerror(errno)); return; - } else { - connect_data->read_len += len; } + + connect_data->read_len += len; p[len] = '\0'; - if((p = (guchar *)g_strstr_len((const gchar *)connect_data->read_buffer, connect_data->read_len, "\r\n\r\n"))) { + p = (guchar *)g_strstr_len((const gchar *)connect_data->read_buffer, + connect_data->read_len, "\r\n\r\n"); + if (p != NULL) { *p = '\0'; headers_len = (p - connect_data->read_buffer) + 4; } else if(len == max_read) @@ -586,7 +635,7 @@ len -= connect_data->read_len - headers_len; /* I'm assuming that we're doing this to prevent the server from complaining / breaking since we don't read the whole page */ - while(len--) { + while (len--) { /* TODO: deal with EAGAIN (and other errors) better */ if (read(connect_data->fd, &tmpc, 1) < 0 && errno != EAGAIN) break; @@ -595,7 +644,7 @@ if (error) { - gaim_proxy_connect_data_error(connect_data, + gaim_proxy_connect_data_disconnect_formatted(connect_data, _("Unable to parse response from HTTP proxy: %s\n"), connect_data->read_buffer); return; @@ -606,10 +655,14 @@ "Proxy server replied with:\n%s\n", connect_data->read_buffer); - - if(status == 407 /* Proxy Auth */) { + if (status == 407 /* Proxy Auth */) + { gchar *ntlm; - if((ntlm = g_strrstr((const gchar *)connect_data->read_buffer, "Proxy-Authenticate: NTLM "))) { /* Check for Type-2 */ + ntlm = g_strrstr((const gchar *)connect_data->read_buffer, + "Proxy-Authenticate: NTLM "); + if (ntlm != NULL) + { + /* Check for Type-2 */ gchar *tmp = ntlm; guint8 *nonce; gchar *domain = (gchar*)gaim_proxy_info_get_username(connect_data->gpi); @@ -619,7 +672,7 @@ username = strchr(domain, '\\'); if (username == NULL) { - gaim_proxy_connect_data_error(connect_data, + gaim_proxy_connect_data_disconnect_formatted(connect_data, _("HTTP proxy connection error %d"), status); return; } @@ -644,19 +697,17 @@ connect_data->port, response); g_free(response); - gaim_input_remove(connect_data->inpa); g_free(connect_data->read_buffer); connect_data->read_buffer = NULL; connect_data->write_buffer = (guchar *)request; connect_data->write_buf_len = strlen(request); connect_data->written_len = 0; - connect_data->read_cb = http_canread; + gaim_input_remove(connect_data->inpa); connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_WRITE, proxy_do_write, connect_data); - proxy_do_write(connect_data, connect_data->fd, cond); return; } else if((ntlm = g_strrstr((const char *)connect_data->read_buffer, "Proxy-Authenticate: NTLM"))) { /* Empty message */ @@ -667,7 +718,7 @@ username = strchr(domain, '\\'); if (username == NULL) { - gaim_proxy_connect_data_error(connect_data, + gaim_proxy_connect_data_disconnect_formatted(connect_data, _("HTTP proxy connection error %d"), status); return; } @@ -705,17 +756,19 @@ proxy_do_write(connect_data, connect_data->fd, cond); return; } else { - gaim_proxy_connect_data_error(connect_data, + gaim_proxy_connect_data_disconnect_formatted(connect_data, _("HTTP proxy connection error %d"), status); return; } } - if(status == 403 /* Forbidden */ ) { - gaim_proxy_connect_data_error(connect_data, - _("Access denied: HTTP proxy server forbids port %d tunnelling."), + if (status == 403) + { + /* Forbidden */ + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Access denied: HTTP proxy server forbids port %d tunneling."), connect_data->port); } else { - gaim_proxy_connect_data_error(connect_data, + gaim_proxy_connect_data_disconnect_formatted(connect_data, _("HTTP proxy connection error %d"), status); } } else { @@ -729,19 +782,19 @@ } } - - static void http_canwrite(gpointer data, gint source, GaimInputCondition cond) { - char request[8192]; - int request_len = 0; - GaimProxyConnectData *connect_data = data; + GString *request; + GaimProxyConnectData *connect_data; socklen_t len; int error = ETIMEDOUT; + int ret; - gaim_debug_info("http proxy", "Connected.\n"); + gaim_debug_info("proxy", "Connected.\n"); + connect_data = data; + if (connect_data->inpa > 0) { gaim_input_remove(connect_data->inpa); @@ -749,66 +802,72 @@ } len = sizeof(error); - - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + ret = getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len); + if ((ret != 0) || (error != 0)) + { + if (ret != 0) + error = errno; + gaim_proxy_connect_data_disconnect(connect_data, strerror(error)); return; } - gaim_debug_info("proxy", "using CONNECT tunnelling for %s:%d\n", + gaim_debug_info("proxy", "Using CONNECT tunneling for %s:%d\n", connect_data->host, connect_data->port); - request_len = g_snprintf(request, sizeof(request), - "CONNECT %s:%d HTTP/1.1\r\nHost: %s:%d\r\n", - connect_data->host, connect_data->port, connect_data->host, connect_data->port); - if (gaim_proxy_info_get_username(connect_data->gpi) != NULL) { + request = g_string_sized_new(4096); + g_string_append_printf(request, + "CONNECT %s:%d HTTP/1.1\r\nHost: %s:%d\r\n", + connect_data->host, connect_data->port, + connect_data->host, connect_data->port); + + if (gaim_proxy_info_get_username(connect_data->gpi) != NULL) + { char *t1, *t2; + t1 = g_strdup_printf("%s:%s", gaim_proxy_info_get_username(connect_data->gpi), gaim_proxy_info_get_password(connect_data->gpi) ? gaim_proxy_info_get_password(connect_data->gpi) : ""); t2 = gaim_base64_encode((const guchar *)t1, strlen(t1)); g_free(t1); - g_return_if_fail(request_len < sizeof(request)); - request_len += g_snprintf(request + request_len, - sizeof(request) - request_len, + g_string_append_printf(request, "Proxy-Authorization: Basic %s\r\n" "Proxy-Authorization: NTLM %s\r\n" - "Proxy-Connection: Keep-Alive\r\n", t2, - gaim_ntlm_gen_type1( - (gchar*)gaim_proxy_info_get_host(connect_data->gpi),"")); + "Proxy-Connection: Keep-Alive\r\n", + t2, gaim_ntlm_gen_type1( + gaim_proxy_info_get_host(connect_data->gpi), "")); g_free(t2); } - g_return_if_fail(request_len < sizeof(request)); - strcpy(request + request_len, "\r\n"); - request_len += 2; - connect_data->write_buffer = g_memdup(request, request_len); - connect_data->write_buf_len = request_len; + g_string_append(request, "\r\n"); + + connect_data->write_buf_len = request->len; + connect_data->write_buffer = (guchar *)g_string_free(request, FALSE); connect_data->written_len = 0; - connect_data->read_cb = http_canread; - connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_WRITE, proxy_do_write, - connect_data); - + connect_data->inpa = gaim_input_add(connect_data->fd, + GAIM_INPUT_WRITE, proxy_do_write, connect_data); proxy_do_write(connect_data, connect_data->fd, cond); } -static int +static void proxy_connect_http(GaimProxyConnectData *connect_data, struct sockaddr *addr, socklen_t addrlen) { - gaim_debug_info("http proxy", + gaim_debug_info("proxy", "Connecting to %s:%d via %s:%d using HTTP\n", - (connect_data->host ? connect_data->host : "(null)"), connect_data->port, + connect_data->host, connect_data->port, (gaim_proxy_info_get_host(connect_data->gpi) ? gaim_proxy_info_get_host(connect_data->gpi) : "(null)"), gaim_proxy_info_get_port(connect_data->gpi)); connect_data->fd = socket(addr->sa_family, SOCK_STREAM, 0); if (connect_data->fd < 0) - return -1; + { + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Unable to create socket:\n%s"), strerror(errno)); + return; + } fcntl(connect_data->fd, F_SETFL, O_NONBLOCK); #ifndef _WIN32 @@ -818,42 +877,40 @@ if (connect(connect_data->fd, addr, addrlen) != 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { - gaim_debug_info("http proxy", "Connection in progress\n"); + gaim_debug_info("proxy", "Connection in progress\n"); - if (connect_data->port != 80) { + if (connect_data->port != 80) + { /* we need to do CONNECT first */ - connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_WRITE, - http_canwrite, connect_data); - } else { + connect_data->inpa = gaim_input_add(connect_data->fd, + GAIM_INPUT_WRITE, http_canwrite, connect_data); + } + else + { + /* + * TODO: Uh, is this a good idea? For something like + * oscar, for example, we end up sending binary + * oscar protocol data to the proxy server, which + * has no idea what we're talking about, since + * the proxy server is expecting an HTTP request. + */ gaim_debug_info("proxy", "HTTP proxy connection established\n"); gaim_proxy_connect_data_connected(connect_data); } - } else { - close(connect_data->fd); - connect_data->fd = -1; - return -1; } + else + { + gaim_proxy_connect_data_disconnect(connect_data, strerror(errno)); + } } - else { - socklen_t len; - int error = ETIMEDOUT; + else + { + gaim_debug_info("proxy", "Connected immediately.\n"); - gaim_debug_info("http proxy", "Connected immediately.\n"); - - len = sizeof(error); - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) != 0) - { - close(connect_data->fd); - connect_data->fd = -1; - return -1; - } http_canwrite(connect_data, connect_data->fd, GAIM_INPUT_WRITE); } - - return connect_data->fd; } - static void s4_canread(gpointer data, gint source, GaimInputCondition cond) { @@ -884,8 +941,7 @@ } } - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, strerror(errno)); } static void @@ -896,6 +952,7 @@ GaimProxyConnectData *connect_data = data; socklen_t len; int error = ETIMEDOUT; + int ret; gaim_debug_info("socks4 proxy", "Connected.\n"); @@ -906,10 +963,12 @@ } len = sizeof(error); - - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + ret = getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len); + if ((ret != 0) || (error != 0)) + { + if (ret != 0) + error = errno; + gaim_proxy_connect_data_disconnect(connect_data, strerror(error)); return; } @@ -921,11 +980,11 @@ * with an option, or some detection mechanism - in the * meantime, stick with plain old SOCKS4. */ - /* TODO: This needs to be non-blocking! */ + /* TODO: Use gaim_dnsquery_a() */ hp = gethostbyname(connect_data->host); if (hp == NULL) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Error resolving %s"), connect_data->host); return; } @@ -949,10 +1008,10 @@ proxy_do_write(connect_data, connect_data->fd, cond); } -static int +static void proxy_connect_socks4(GaimProxyConnectData *connect_data, struct sockaddr *addr, socklen_t addrlen) { - gaim_debug_info("socks4 proxy", + gaim_debug_info("proxy", "Connecting to %s:%d via %s:%d using SOCKS4\n", connect_data->host, connect_data->port, gaim_proxy_info_get_host(connect_data->gpi), @@ -960,7 +1019,11 @@ connect_data->fd = socket(addr->sa_family, SOCK_STREAM, 0); if (connect_data->fd < 0) - return -1; + { + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Unable to create socket:\n%s"), strerror(errno)); + return; + } fcntl(connect_data->fd, F_SETFL, O_NONBLOCK); #ifndef _WIN32 @@ -969,34 +1032,23 @@ if (connect(connect_data->fd, addr, addrlen) != 0) { - if ((errno == EINPROGRESS) || (errno == EINTR)) { - gaim_debug_info("socks4 proxy", "Connection in progress.\n"); - connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_WRITE, s4_canwrite, connect_data); + if ((errno == EINPROGRESS) || (errno == EINTR)) + { + gaim_debug_info("proxy", "Connection in progress.\n"); + connect_data->inpa = gaim_input_add(connect_data->fd, + GAIM_INPUT_WRITE, s4_canwrite, connect_data); } - else { - close(connect_data->fd); - connect_data->fd = -1; - return -1; - } - } else { - socklen_t len; - int error = ETIMEDOUT; - - gaim_debug_info("socks4 proxy", "Connected immediately.\n"); - - len = sizeof(error); - - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) != 0) + else { - close(connect_data->fd); - connect_data->fd = -1; - return -1; + gaim_proxy_connect_data_disconnect(connect_data, strerror(errno)); } + } + else + { + gaim_debug_info("proxy", "Connected immediately.\n"); s4_canwrite(connect_data, connect_data->fd, GAIM_INPUT_WRITE); } - - return connect_data->fd; } static void @@ -1018,26 +1070,41 @@ gaim_debug_info("socks5 proxy", "Able to read again.\n"); len = read(connect_data->fd, dest, (connect_data->read_buf_len - connect_data->read_len)); - if(len < 0 && errno == EAGAIN) + + if (len == 0) + { + gaim_proxy_connect_data_disconnect(connect_data, + _("Server closed the connection.")); return; - else if(len <= 0) { - gaim_debug_warning("socks5 proxy", "or not...\n"); - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + } + + if (len < 0) + { + if (errno == EAGAIN) + /* No worries */ + return; + + /* Error! */ + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Lost connection with server:\n%s"), strerror(errno)); return; } + connect_data->read_len += len; if(connect_data->read_len < 4) return; if ((buf[0] != 0x05) || (buf[1] != 0x00)) { - if ((buf[0] == 0x05) && (buf[1] < 0x09)) + if ((buf[0] == 0x05) && (buf[1] < 0x09)) { gaim_debug_error("socks5 proxy", socks5errors[buf[1]]); - else + gaim_proxy_connect_data_disconnect(connect_data, + socks5errors[buf[1]]); + } else { gaim_debug_error("socks5 proxy", "Bad data.\n"); - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, + _("Received invalid data on connection with server.")); + } return; } @@ -1114,15 +1181,27 @@ len = read(connect_data->fd, connect_data->read_buffer + connect_data->read_len, connect_data->read_buf_len - connect_data->read_len); - if(len < 0 && errno == EAGAIN) + + if (len == 0) + { + gaim_proxy_connect_data_disconnect(connect_data, + _("Server closed the connection.")); return; - else if(len <= 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + } + + if (len < 0) + { + if (errno == EAGAIN) + /* No worries */ + return; + + /* Error! */ + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Lost connection with server:\n%s"), strerror(errno)); return; } + connect_data->read_len += len; - if (connect_data->read_len < 2) return; @@ -1130,8 +1209,8 @@ connect_data->inpa = 0; if ((connect_data->read_buffer[0] != 0x01) || (connect_data->read_buffer[1] != 0x00)) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, + _("Received invalid data on connection with server.")); return; } @@ -1203,23 +1282,34 @@ len = read(connect_data->fd, connect_data->read_buffer + connect_data->read_len, connect_data->read_buf_len - connect_data->read_len); - if(len < 0 && errno == EAGAIN) + if (len == 0) + { + gaim_proxy_connect_data_disconnect(connect_data, + _("Server closed the connection.")); return; - else if(len <= 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + } + + if (len < 0) + { + if (errno == EAGAIN) + /* No worries */ + return; + + /* Error! */ + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Lost connection with server:\n%s"), strerror(errno)); return; } + connect_data->read_len += len; - if (connect_data->read_len < 2) return; cmdbuf = connect_data->read_buffer; if (*cmdbuf != 0x01) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, + _("Received invalid data on connection with server.")); return; } cmdbuf++; @@ -1249,8 +1339,8 @@ gaim_debug_warning("proxy", "socks5 CHAP authentication " "failed. Disconnecting..."); - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, + _("Authentication failed")); return; } break; @@ -1290,8 +1380,8 @@ "as supporting. This is a violation " "of the socks5 CHAP specification. " "Disconnecting..."); - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, + _("Received invalid data on connection with server.")); return; } break; @@ -1319,15 +1409,27 @@ len = read(connect_data->fd, connect_data->read_buffer + connect_data->read_len, connect_data->read_buf_len - connect_data->read_len); - if(len < 0 && errno == EAGAIN) + + if (len == 0) + { + gaim_proxy_connect_data_disconnect(connect_data, + _("Server closed the connection.")); return; - else if(len <= 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + } + + if (len < 0) + { + if (errno == EAGAIN) + /* No worries */ + return; + + /* Error! */ + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Lost connection with server:\n%s"), strerror(errno)); return; } + connect_data->read_len += len; - if (connect_data->read_len < 2) return; @@ -1335,8 +1437,8 @@ connect_data->inpa = 0; if ((connect_data->read_buffer[0] != 0x05) || (connect_data->read_buffer[1] == 0xff)) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + gaim_proxy_connect_data_disconnect(connect_data, + _("Received invalid data on connection with server.")); return; } @@ -1418,6 +1520,7 @@ GaimProxyConnectData *connect_data = data; socklen_t len; int error = ETIMEDOUT; + int ret; gaim_debug_info("socks5 proxy", "Connected.\n"); @@ -1428,9 +1531,12 @@ } len = sizeof(error); - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { - gaim_proxy_connect_data_disconnect(connect_data); - try_connect(connect_data); + ret = getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len); + if ((ret != 0) || (error != 0)) + { + if (ret != 0) + error = errno; + gaim_proxy_connect_data_disconnect(connect_data, strerror(error)); return; } @@ -1460,10 +1566,10 @@ proxy_do_write(connect_data, connect_data->fd, GAIM_INPUT_WRITE); } -static int +static void proxy_connect_socks5(GaimProxyConnectData *connect_data, struct sockaddr *addr, socklen_t addrlen) { - gaim_debug_info("socks5 proxy", + gaim_debug_info("proxy", "Connecting to %s:%d via %s:%d using SOCKS5\n", connect_data->host, connect_data->port, gaim_proxy_info_get_host(connect_data->gpi), @@ -1471,7 +1577,11 @@ connect_data->fd = socket(addr->sa_family, SOCK_STREAM, 0); if (connect_data->fd < 0) - return -1; + { + gaim_proxy_connect_data_disconnect_formatted(connect_data, + _("Unable to create socket:\n%s"), strerror(errno)); + return; + } fcntl(connect_data->fd, F_SETFL, O_NONBLOCK); #ifndef _WIN32 @@ -1480,95 +1590,70 @@ if (connect(connect_data->fd, addr, addrlen) != 0) { - if ((errno == EINPROGRESS) || (errno == EINTR)) { + if ((errno == EINPROGRESS) || (errno == EINTR)) + { gaim_debug_info("socks5 proxy", "Connection in progress\n"); - connect_data->inpa = gaim_input_add(connect_data->fd, GAIM_INPUT_WRITE, s5_canwrite, connect_data); + connect_data->inpa = gaim_input_add(connect_data->fd, + GAIM_INPUT_WRITE, s5_canwrite, connect_data); } - else { - close(connect_data->fd); - connect_data->fd = -1; - return -1; + else + { + gaim_proxy_connect_data_disconnect(connect_data, strerror(errno)); } } - else { - socklen_t len; - int error = ETIMEDOUT; + else + { + gaim_debug_info("proxy", "Connected immediately.\n"); - gaim_debug_info("socks5 proxy", "Connected immediately.\n"); - - len = sizeof(error); - - if (getsockopt(connect_data->fd, SOL_SOCKET, SO_ERROR, &error, &len) != 0) - { - close(connect_data->fd); - connect_data->fd = -1; - return -1; - } - s5_canwrite(connect_data, connect_data->fd, GAIM_INPUT_WRITE); } - - return connect_data->fd; } /** - * This function iterates through a list of IP addresses and attempts + * This function attempts to connect to the next IP address in the list + * of IP addresses returned to us by gaim_dnsquery_a() and attemps * to connect to each one. This is called after the hostname is - * resolved, and if a connection attempt fails. + * resolved, and each time a connection attempt fails (assuming there + * is another IP address to try). */ static void try_connect(GaimProxyConnectData *connect_data) { size_t addrlen; struct sockaddr *addr; - int ret = -1; - if (connect_data->hosts == NULL) - { - gaim_proxy_connect_data_error(connect_data, _("Could not resolve host name")); - return; - } + addrlen = GPOINTER_TO_INT(connect_data->hosts->data); + connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); + addr = connect_data->hosts->data; + connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); - while (connect_data->hosts) - { - addrlen = GPOINTER_TO_INT(connect_data->hosts->data); - connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); - addr = connect_data->hosts->data; - connect_data->hosts = g_slist_remove(connect_data->hosts, connect_data->hosts->data); + gaim_debug_info("proxy", "Attempting connection to %s\n", "TODO"); - switch (gaim_proxy_info_get_type(connect_data->gpi)) { - case GAIM_PROXY_NONE: - ret = proxy_connect_none(connect_data, addr, addrlen); - break; + switch (gaim_proxy_info_get_type(connect_data->gpi)) { + case GAIM_PROXY_NONE: + proxy_connect_none(connect_data, addr, addrlen); + break; - case GAIM_PROXY_HTTP: - ret = proxy_connect_http(connect_data, addr, addrlen); - break; + case GAIM_PROXY_HTTP: + proxy_connect_http(connect_data, addr, addrlen); + break; - case GAIM_PROXY_SOCKS4: - ret = proxy_connect_socks4(connect_data, addr, addrlen); - break; + case GAIM_PROXY_SOCKS4: + proxy_connect_socks4(connect_data, addr, addrlen); + break; - case GAIM_PROXY_SOCKS5: - ret = proxy_connect_socks5(connect_data, addr, addrlen); - break; + case GAIM_PROXY_SOCKS5: + proxy_connect_socks5(connect_data, addr, addrlen); + break; - case GAIM_PROXY_USE_ENVVAR: - ret = proxy_connect_http(connect_data, addr, addrlen); - break; + case GAIM_PROXY_USE_ENVVAR: + proxy_connect_http(connect_data, addr, addrlen); + break; - default: - break; - } - - g_free(addr); - - if (ret >= 0) + default: break; } - if (ret < 0) { - gaim_proxy_connect_data_error(connect_data, _("Unable to establish a connection")); - } + g_free(addr); } static void @@ -1582,10 +1667,16 @@ if (error_message != NULL) { - gaim_proxy_connect_data_error(connect_data, error_message); + gaim_proxy_connect_data_disconnect(connect_data, error_message); return; } + if (hosts == NULL) + { + gaim_proxy_connect_data_disconnect(connect_data, _("Could not resolve host name")); + return; + } + connect_data->hosts = hosts; try_connect(connect_data); @@ -1756,6 +1847,7 @@ void gaim_proxy_connect_cancel(GaimProxyConnectData *connect_data) { + gaim_proxy_connect_data_disconnect(connect_data, NULL); gaim_proxy_connect_data_destroy(connect_data); } @@ -1835,5 +1927,8 @@ gaim_proxy_uninit(void) { while (connect_datas != NULL) + { + gaim_proxy_connect_data_disconnect(connect_datas->data, NULL); gaim_proxy_connect_data_destroy(connect_datas->data); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-05 03:14:52
|
Revision: 17164 http://svn.sourceforge.net/gaim/?rev=17164&view=rev Author: datallah Date: 2006-09-04 20:14:46 -0700 (Mon, 04 Sep 2006) Log Message: ----------- Fix the installer to be more robust in its version checking. John D. Ramsdell noticed this. Modified Paths: -------------- trunk/gaim-installer.nsi trunk/gtk/win32/nsis/gaim-plugin.nsh Modified: trunk/gaim-installer.nsi =================================================================== --- trunk/gaim-installer.nsi 2006-09-05 02:09:17 UTC (rev 17163) +++ trunk/gaim-installer.nsi 2006-09-05 03:14:46 UTC (rev 17164) @@ -39,12 +39,15 @@ !include "MUI.nsh" !include "Sections.nsh" -!include "FileFunc.nsh" +!include "FileFunc.nsh" !insertmacro GetParameters !insertmacro GetOptions !insertmacro GetParent +!include "WordFunc.nsh" +!insertmacro VersionCompare + ;-------------------------------- ;Defines @@ -998,62 +1001,15 @@ Call VerifyDir Pop $0 StrCmp $0 "0" 0 dir_good - Abort + Pop $0 + Abort dir_good: Pop $0 FunctionEnd -; CheckGtkVersion -; inputs: Push 2 GTK+ version strings to check. The major value needs to -; be equal and the minor value needs to be greater or equal. ; ; Usage: -; Push "2.1.0" ; Reference version -; Push "2.2.1" ; Version to check -; Call CheckGtkVersion -; Pop $R0 -; $R0 will now equal "1", because 2.2 is greater than 2.1 -; -Function CheckGtkVersion - ; Version we want to check - Exch $R0 - Exch - ; Reference version - Exch $R1 - Push $R2 - Push $R3 - - ; Check that the string to check is at least 5 chars long (i.e. x.x.x) - StrLen $R2 $R0 - IntCmp $R2 5 0 bad_version - - ; Major version check - StrCpy $R2 $R0 1 - StrCpy $R3 $R1 1 - IntCmp $R2 $R3 check_minor bad_version bad_version - - check_minor: - StrCpy $R2 $R0 1 2 - StrCpy $R3 $R1 1 2 - IntCmp $R2 $R3 good_version bad_version good_version - - bad_version: - StrCpy $R0 "0" - Goto done - - good_version: - StrCpy $R0 "1" - - done: - Pop $R3 - Pop $R2 - Pop $R1 - Exch $R0 -FunctionEnd - -; -; Usage: ; Call DoWeNeedGtk ; First Pop: ; 0 - We have the correct version @@ -1077,77 +1033,68 @@ ; - If no rights ; - Check HKLM Push $0 + Push $1 Push $2 - Push $3 - Push $4 - Push $5 Call CheckUserInstallRights - Pop $3 - StrCmp $3 "HKLM" check_hklm - StrCmp $3 "HKCU" check_hkcu check_hklm + Pop $1 + StrCmp $1 "HKLM" check_hklm + StrCmp $1 "HKCU" check_hkcu check_hklm check_hkcu: ReadRegStr $0 HKCU ${GTK_REG_KEY} "Version" - StrCpy $5 "HKCU" + StrCpy $2 "HKCU" StrCmp $0 "" check_hklm have_gtk check_hklm: ReadRegStr $0 HKLM ${GTK_REG_KEY} "Version" - StrCpy $5 "HKLM" + StrCpy $2 "HKLM" StrCmp $0 "" no_gtk have_gtk have_gtk: ; GTK+ is already installed.. check version. - Push ${GTK_VERSION} ; Minimum GTK+ version needed - Push $0 - Call CheckGtkVersion - Pop $2 - StrCmp $2 "1" good_version bad_version + ${VersionCompare} ${GTK_VERSION} $0 $0 + IntCmp $0 1 bad_version good_version good_version + bad_version: ; Bad version. If hklm ver and we have hkcu or no rights.. return no gtk - StrCmp $3 "NONE" no_gtk ; if no rights.. can't upgrade - StrCmp $3 "HKCU" 0 upgrade_gtk ; if HKLM can upgrade.. - StrCmp $5 "HKLM" no_gtk upgrade_gtk ; have hkcu rights.. if found hklm ver can't upgrade.. + StrCmp $1 "NONE" no_gtk ; if no rights.. can't upgrade + StrCmp $1 "HKCU" 0 upgrade_gtk ; if HKLM can upgrade.. + StrCmp $2 "HKLM" no_gtk upgrade_gtk ; have hkcu rights.. if found hklm ver can't upgrade.. upgrade_gtk: - StrCpy $2 "1" - Push $5 Push $2 + Push "1" Goto done good_version: - StrCmp $5 "HKLM" have_hklm_gtk have_hkcu_gtk + StrCmp $2 "HKLM" have_hklm_gtk have_hkcu_gtk have_hkcu_gtk: ; Have HKCU version - ReadRegStr $4 HKCU ${GTK_REG_KEY} "Path" + ReadRegStr $0 HKCU ${GTK_REG_KEY} "Path" Goto good_version_cont have_hklm_gtk: - ReadRegStr $4 HKLM ${GTK_REG_KEY} "Path" + ReadRegStr $0 HKLM ${GTK_REG_KEY} "Path" Goto good_version_cont good_version_cont: - StrCpy $2 "0" - Push $4 ; The path to existing GTK+ - Push $2 + Push $0 ; The path to existing GTK+ + Push "0" Goto done no_gtk: - StrCpy $2 "2" - Push $3 ; our rights - Push $2 + Push $1 ; our rights + Push "2" Goto done done: ; The top two items on the stack are what we want to return - Exch 5 + Exch 3 Pop $0 - Exch 5 + Exch 3 Pop $2 - Pop $5 - Pop $4 - Pop $3 + Pop $1 FunctionEnd @@ -1156,7 +1103,7 @@ Push $R0 System::Call 'kernel32::OpenMutex(i 2031617, b 0, t "gaim_is_running") i .R0' IntCmp $R0 0 done - MessageBox MB_OK|MB_ICONEXCLAMATION $(GAIM_IS_RUNNING) /SD IDOK + MessageBox MB_OK|MB_ICONEXCLAMATION $(GAIM_IS_RUNNING) /SD IDOK Abort done: Pop $R0 @@ -1346,11 +1293,15 @@ ; Don't show dir selector.. Upgrades are done to existing path.. have_gtk: upgrade_gtk: + Pop $R1 + Pop $R0 Abort no_gtk: StrCmp $R1 "NONE" 0 no_gtk_cont ; Got no install rights.. + Pop $R1 + Pop $R0 Abort no_gtk_cont: ; Suggest path.. @@ -1377,6 +1328,7 @@ Pop $R0 StrCmp $R0 "0" 0 done MessageBox MB_OK $(GTK_BAD_INSTALL_PATH) /SD IDOK + Pop $R0 Abort done: Pop $R0 Modified: trunk/gtk/win32/nsis/gaim-plugin.nsh =================================================================== --- trunk/gtk/win32/nsis/gaim-plugin.nsh 2006-09-05 02:09:17 UTC (rev 17163) +++ trunk/gtk/win32/nsis/gaim-plugin.nsh 2006-09-05 03:14:46 UTC (rev 17164) @@ -3,7 +3,7 @@ ;; Copyright 2005, Daniel Atallah <dan...@ya...> ;; ;; Include in plugin installer scripts using: -;; !addincludedir "${PATH_TO_GAIM_SRC}\src\win32\nsis" +;; !addincludedir "${PATH_TO_GAIM_SRC}\gtkgaim\win32\nsis" ;; !include "gaim-plugin.nsh" ;; @@ -41,7 +41,7 @@ ; Push the Plugin's Gaim Version onto the Stack before calling ; After calling, the top of the Stack will contain the result of the check: ; GAIM_VERSION_OK - If the installed gaim version is compatible w/ the version specified -; GAIM_VERSION_INCOMPATIBLE - If the installed gaim version isn't compatible w/ the ersion specified +; GAIM_VERSION_INCOMPATIBLE - If the installed gaim version isn't compatible w/ the version specified ; GAIM_VERSION_UNDEFINED - If the installed gaim version can't be determined Function CheckGaimVersion ; Save the Variable values that we will use in the stack @@ -121,7 +121,7 @@ ; Save the Variable values that we will use in the stack Push $1 - Exch + Exch Pop $1 ;The version component which we want to extract (0, 1, 2) Exch Push $0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-05 02:09:24
|
Revision: 17163 http://svn.sourceforge.net/gaim/?rev=17163&view=rev Author: datallah Date: 2006-09-04 19:09:17 -0700 (Mon, 04 Sep 2006) Log Message: ----------- Make Gaim::Gtk actually work in wingaim. Modified Paths: -------------- trunk/gtk/plugins/perl/common/Makefile.mingw trunk/libgaim/plugins/perl/scripts/request.pl Modified: trunk/gtk/plugins/perl/common/Makefile.mingw =================================================================== --- trunk/gtk/plugins/perl/common/Makefile.mingw 2006-09-04 23:26:50 UTC (rev 17162) +++ trunk/gtk/plugins/perl/common/Makefile.mingw 2006-09-05 02:09:17 UTC (rev 17163) @@ -89,10 +89,10 @@ $(MAKE) -C $(GAIM_LIB_PERL_TOP)/common -f $(GAIM_WIN32_MAKEFILE) install install: all $(GAIM_INSTALL_PERLMOD_DIR)/Gaim.pm - rm -f $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/$(TARGET).dll $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/$(TARGET).pm + rm -f $(GAIM_INSTALL_PERLMOD_DIR)/$(TARGET).dll $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/$(TARGET).pm mkdir -p $(GAIM_INSTALL_PERLMOD_DIR)/Gaim cp $(TARGET).pm $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/ - cp $(TARGET).dll $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/ + cp $(TARGET).dll $(GAIM_INSTALL_PERLMOD_DIR) $(C_FILES): $(GAIM_CONFIG_H) Modified: trunk/libgaim/plugins/perl/scripts/request.pl =================================================================== --- trunk/libgaim/plugins/perl/scripts/request.pl 2006-09-04 23:26:50 UTC (rev 17162) +++ trunk/libgaim/plugins/perl/scripts/request.pl 2006-09-05 02:09:17 UTC (rev 17163) @@ -5,7 +5,7 @@ # All the information Gaim gets about our nifty plugin %PLUGIN_INFO = ( perl_api_version => 2, - name => " Perl: $MODULE_NAME", + name => "Perl: $MODULE_NAME", version => "0.1", summary => "Test plugin for the Perl interpreter.", description => "Implements a set of test proccedures to ensure all functions that work in the C API still work in the Perl plugin interface. As XSUBs are added, this *should* be updated to test the changes. Furthermore, this will function as the tutorial perl plugin.", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-04 23:26:56
|
Revision: 17162 http://svn.sourceforge.net/gaim/?rev=17162&view=rev Author: datallah Date: 2006-09-04 16:26:50 -0700 (Mon, 04 Sep 2006) Log Message: ----------- It turns out gaim_gtk_blist_update_toolbar() has been gone for almost 2 years and gaim_gtkconv_update_tabs has been gone for over 3. Modified Paths: -------------- trunk/gtk/gtkblist.h trunk/gtk/gtkconv.h trunk/gtk/plugins/perl/common/GtkBlist.xs trunk/gtk/plugins/perl/common/GtkConv.xs Modified: trunk/gtk/gtkblist.h =================================================================== --- trunk/gtk/gtkblist.h 2006-09-04 23:00:13 UTC (rev 17161) +++ trunk/gtk/gtkblist.h 2006-09-04 23:26:50 UTC (rev 17162) @@ -163,12 +163,6 @@ */ void gaim_gtk_blist_refresh(GaimBuddyList *list); -/** - * Tells the buddy list to update its toolbar based on the preferences - * - */ -void gaim_gtk_blist_update_toolbar(void); - void gaim_gtk_blist_update_columns(void); void gaim_gtk_blist_update_refresh_timeout(void); Modified: trunk/gtk/gtkconv.h =================================================================== --- trunk/gtk/gtkconv.h 2006-09-04 23:00:13 UTC (rev 17161) +++ trunk/gtk/gtkconv.h 2006-09-04 23:26:50 UTC (rev 17162) @@ -179,12 +179,6 @@ void gaim_gtkconv_switch_active_conversation(GaimConversation *conv); /** - * Updates the tab positions on all conversation windows to reflect any - * changed preferences. - */ -void gaim_gtkconv_update_tabs(void); - -/** * Updates conversation buttons by protocol. * * @param conv The conversation. Modified: trunk/gtk/plugins/perl/common/GtkBlist.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkBlist.xs 2006-09-04 23:00:13 UTC (rev 17161) +++ trunk/gtk/plugins/perl/common/GtkBlist.xs 2006-09-04 23:26:50 UTC (rev 17162) @@ -51,13 +51,7 @@ gaim_gtk_blist_refresh(list) Gaim::BuddyList list -#if 0 void -gaim_gtk_blist_update_toolbar() - -#endif - -void gaim_gtk_blist_update_columns() void Modified: trunk/gtk/plugins/perl/common/GtkConv.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkConv.xs 2006-09-04 23:00:13 UTC (rev 17161) +++ trunk/gtk/plugins/perl/common/GtkConv.xs 2006-09-04 23:26:50 UTC (rev 17162) @@ -50,13 +50,7 @@ gaim_gtkconv_switch_active_conversation(conv) Gaim::Conversation conv -#if 0 void -gaim_gtkconv_update_tabs() - -#endif - -void gaim_gtkconv_update_buttons_by_protocol(conv) Gaim::Conversation conv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-04 23:00:34
|
Revision: 17161 http://svn.sourceforge.net/gaim/?rev=17161&view=rev Author: datallah Date: 2006-09-04 16:00:13 -0700 (Mon, 04 Sep 2006) Log Message: ----------- Make the Perl GTK+ stuff work in wingaim. Modified Paths: -------------- trunk/gtk/Makefile.mingw trunk/gtk/plugins/Makefile.mingw trunk/gtk/plugins/perl/common/Gtk.xs trunk/gtk/plugins/perl/common/GtkBlist.xs trunk/gtk/plugins/perl/common/GtkConv.xs trunk/libgaim/plugins/perl/Makefile.mingw trunk/libgaim/plugins/perl/common/Makefile.mingw trunk/libgaim/plugins/perl/scripts/request.pl trunk/libgaim/win32/global.mak trunk/libgaim/win32/rules.mak trunk/libgaim/win32/targets.mak Added Paths: ----------- trunk/gtk/plugins/perl/Makefile.mingw trunk/gtk/plugins/perl/common/Makefile.mingw Modified: trunk/gtk/Makefile.mingw =================================================================== --- trunk/gtk/Makefile.mingw 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/gtk/Makefile.mingw 2006-09-04 23:00:13 UTC (rev 17161) @@ -113,11 +113,11 @@ -lws2_32 \ -lwinmm \ -lz \ - -liberty \ - -lidletrack + -liberty GTKGAIM_LIBS = \ $(LIBGAIM_LIBS) \ + -lidletrack \ -lgtk-win32-2.0 \ -latk-1.0 \ -lpango-1.0 \ @@ -145,7 +145,7 @@ $(GTKGAIM_OBJECTS): $(GAIM_CONFIG_H) $(GTKGAIM_TARGET).dll $(GTKGAIM_TARGET).dll.a: $(GAIM_LIBGAIM_DLL).a $(GAIM_IDLETRACK_DLL).a $(GTKGAIM_OBJECTS) - $(CC) -shared $(LIBGAIM_OBJECTS) $(GTKGAIM_OBJECTS) $(LIB_PATHS) $(GTKGAIM_LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(GTKGAIM_TARGET).dll.a -o $(GTKGAIM_TARGET).dll + $(CC) -shared $(GTKGAIM_OBJECTS) $(LIB_PATHS) $(GTKGAIM_LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(GTKGAIM_TARGET).dll.a -o $(GTKGAIM_TARGET).dll $(EXE_TARGET).exe: $(GAIM_CONFIG_H) $(GAIM_GTKGAIM_DLL).a $(GAIM_IDLETRACK_DLL).a $(EXE_OBJECTS) $(CC) $(LDFLAGS) $(EXE_OBJECTS) $(LIB_PATHS) $(EXE_LIBS) -o $(EXE_TARGET).exe Modified: trunk/gtk/plugins/Makefile.mingw =================================================================== --- trunk/gtk/plugins/Makefile.mingw 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/gtk/plugins/Makefile.mingw 2006-09-04 23:00:13 UTC (rev 17161) @@ -7,10 +7,11 @@ GAIM_TOP := ../.. include $(GAIM_TOP)/libgaim/win32/global.mak -DOCKLET_PLUGIN := $(GAIM_GTK_PLUGINS_TOP)/docklet -TICKER_PLUGIN := $(GAIM_GTK_PLUGINS_TOP)/ticker -TRANSPARENCY_PLUGIN := $(GAIM_GTK_PLUGINS_TOP)/win32/transparency -WINPREFS_PLUGIN := $(GAIM_GTK_PLUGINS_TOP)/win32/winprefs +DOCKLET_PLUGIN := ./docklet +GTKPERL_PLUGIN := ./perl +TICKER_PLUGIN := ./ticker +TRANSPARENCY_PLUGIN := ./win32/transparency +WINPREFS_PLUGIN := ./win32/winprefs .SUFFIXES: .SUFFIXES: .c .dll @@ -58,16 +59,18 @@ all: plugins $(MAKE) -C $(DOCKLET_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) + $(MAKE) -C $(GTKPERL_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) $(MAKE) -C $(TICKER_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) $(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) $(MAKE) -C $(WINPREFS_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) install: $(GAIM_INSTALL_PLUGINS_DIR) $(MAKE) -C $(DOCKLET_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) install + $(MAKE) -C $(GTKPERL_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) install $(MAKE) -C $(TICKER_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) install $(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) install $(MAKE) -C $(WINPREFS_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) install - cp $(GAIM_GTK_PLUGINS_TOP)/*.dll $(GAIM_INSTALL_PLUGINS_DIR) + cp *.dll $(GAIM_INSTALL_PLUGINS_DIR) .c.dll: $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@.o -c $< @@ -88,9 +91,10 @@ ## CLEAN RULES ## clean: - rm -rf $(GAIM_GTK_PLUGINS_TOP)/*.o - rm -rf $(GAIM_GTK_PLUGINS_TOP)/*.dll + rm -f *.o + rm -f *.dll $(MAKE) -C $(DOCKLET_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) clean + $(MAKE) -C $(GTKPERL_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) clean $(MAKE) -C $(TICKER_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) clean $(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) clean $(MAKE) -C $(WINPREFS_PLUGIN) -f $(GAIM_WIN32_MAKEFILE) clean Added: trunk/gtk/plugins/perl/Makefile.mingw =================================================================== --- trunk/gtk/plugins/perl/Makefile.mingw (rev 0) +++ trunk/gtk/plugins/perl/Makefile.mingw 2006-09-04 23:00:13 UTC (rev 17161) @@ -0,0 +1,25 @@ +# +# Makefile.mingw +# +# Description: Makefile for perl plugin loader plugin. +# + +GAIM_TOP := ../../.. +include $(GAIM_TOP)/libgaim/win32/global.mak + +## +## TARGET DEFINITIONS +## +.PHONY: all clean + +all: + $(MAKE) -C ./common -f $(GAIM_WIN32_MAKEFILE) + +install: all $(GAIM_INSTALL_PLUGINS_DIR) + $(MAKE) -C ./common -f $(GAIM_WIN32_MAKEFILE) install + +## +## CLEAN RULES +## +clean: + $(MAKE) -C ./common -f $(GAIM_WIN32_MAKEFILE) clean Property changes on: trunk/gtk/plugins/perl/Makefile.mingw ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/gtk/plugins/perl/common/Gtk.xs =================================================================== --- trunk/gtk/plugins/perl/common/Gtk.xs 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/gtk/plugins/perl/common/Gtk.xs 2006-09-04 23:00:13 UTC (rev 17161) @@ -38,7 +38,9 @@ GAIM_PERL_BOOT_PROTO(Gtk__Privacy); GAIM_PERL_BOOT_PROTO(Gtk__Roomlist); GAIM_PERL_BOOT_PROTO(Gtk__Status); +#ifndef _WIN32 GAIM_PERL_BOOT_PROTO(Gtk__Session); +#endif GAIM_PERL_BOOT_PROTO(Gtk__Sound); GAIM_PERL_BOOT_PROTO(Gtk__StatusBox); GAIM_PERL_BOOT_PROTO(Gtk__Themes); @@ -68,7 +70,9 @@ GAIM_PERL_BOOT(Gtk__Privacy); GAIM_PERL_BOOT(Gtk__Roomlist); GAIM_PERL_BOOT(Gtk__Status); +#ifndef _WIN32 GAIM_PERL_BOOT(Gtk__Session); +#endif GAIM_PERL_BOOT(Gtk__Sound); GAIM_PERL_BOOT(Gtk__StatusBox); GAIM_PERL_BOOT(Gtk__Themes); Modified: trunk/gtk/plugins/perl/common/GtkBlist.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkBlist.xs 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/gtk/plugins/perl/common/GtkBlist.xs 2006-09-04 23:00:13 UTC (rev 17161) @@ -51,9 +51,12 @@ gaim_gtk_blist_refresh(list) Gaim::BuddyList list +#if 0 void gaim_gtk_blist_update_toolbar() +#endif + void gaim_gtk_blist_update_columns() Modified: trunk/gtk/plugins/perl/common/GtkConv.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkConv.xs 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/gtk/plugins/perl/common/GtkConv.xs 2006-09-04 23:00:13 UTC (rev 17161) @@ -50,9 +50,12 @@ gaim_gtkconv_switch_active_conversation(conv) Gaim::Conversation conv +#if 0 void gaim_gtkconv_update_tabs() +#endif + void gaim_gtkconv_update_buttons_by_protocol(conv) Gaim::Conversation conv Added: trunk/gtk/plugins/perl/common/Makefile.mingw =================================================================== --- trunk/gtk/plugins/perl/common/Makefile.mingw (rev 0) +++ trunk/gtk/plugins/perl/common/Makefile.mingw 2006-09-04 23:00:13 UTC (rev 17161) @@ -0,0 +1,108 @@ +# +# Makefile.mingw +# +# Description: Makefile for Gaim perl module. +# + +GAIM_TOP := ../../../.. +include $(GAIM_TOP)/libgaim/win32/global.mak + +TARGET = Gtk +EXTUTILS := C:/perl/lib/ExtUtils + +CFLAGS += -Wno-comment + +## +## INCLUDE PATHS +## +INCLUDE_PATHS = -I. \ + -I$(GAIM_TOP) \ + -I$(GAIM_LIB_TOP) \ + -I$(GAIM_GTK_TOP) \ + -I$(GTK_TOP)/include \ + -I$(GTK_TOP)/include/atk-1.0 \ + -I$(GTK_TOP)/include/glib-2.0 \ + -I$(GTK_TOP)/include/gtk-2.0 \ + -I$(GTK_TOP)/include/pango-1.0 \ + -I$(GTK_TOP)/lib/glib-2.0/include \ + -I$(GTK_TOP)/lib/gtk-2.0/include \ + -I$(PERL_LIB_TOP)/CORE + +LIB_PATHS = -L$(PERL_LIB_TOP) \ + -L$(GAIM_LIB_TOP) \ + -L$(GAIM_GTK_TOP) \ + -L$(GAIM_LIB_PERL_TOP) \ + -L$(GTK_TOP)/lib + +## +## SOURCES, OBJECTS +## +XS_FILES = \ + Gtk.xs \ + GtkAccount.xs \ + GtkBlist.xs \ + GtkConn.xs \ + GtkConv.xs \ + GtkConvWin.xs \ + GtkDebug.xs \ + GtkDialogs.xs \ + GtkFt.xs \ + GtkIMHtml.xs \ + GtkIMHtmlToolbar.xs \ + GtkLog.xs \ + GtkMenuTray.xs \ + GtkPlugin.xs \ + GtkPluginPref.xs \ + GtkPounce.xs \ + GtkPrefs.xs \ + GtkPrivacy.xs \ + GtkRoomlist.xs \ + GtkSavedStatuses.xs \ + GtkSound.xs \ + GtkStatusBox.xs \ + GtkThemes.xs \ + GtkUtils.xs + + +C_FILES = $(XS_FILES:%.xs=%.c) +OBJECTS = $(C_FILES:%.c=%.o) + +## +## LIBRARIES +## +LIBS = -lperl58 \ + -lperl \ + -lgaim \ + -lgtkgaim \ + -lglib-2.0 + +include $(GAIM_COMMON_RULES) + +## +## TARGETS +## +.PHONY: all clean + +all: $(TARGET).dll + +$(GAIM_INSTALL_PERLMOD_DIR)/Gaim.pm: + $(MAKE) -C $(GAIM_LIB_PERL_TOP)/common -f $(GAIM_WIN32_MAKEFILE) install + +install: all $(GAIM_INSTALL_PERLMOD_DIR)/Gaim.pm + rm -f $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/$(TARGET).dll $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/$(TARGET).pm + mkdir -p $(GAIM_INSTALL_PERLMOD_DIR)/Gaim + cp $(TARGET).pm $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/ + cp $(TARGET).dll $(GAIM_INSTALL_PERLMOD_DIR)/Gaim/ + +$(C_FILES): $(GAIM_CONFIG_H) + +$(TARGET).dll: $(GAIM_GTKGAIM_DLL).a $(GAIM_LIBGAIM_PERL_DLL).a $(OBJECTS) + $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) -o $(TARGET).dll + +## +## CLEAN +## +clean: + rm -f *.o $(TARGET).dll + +include $(GAIM_COMMON_TARGETS) Property changes on: trunk/gtk/plugins/perl/common/Makefile.mingw ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/libgaim/plugins/perl/Makefile.mingw =================================================================== --- trunk/libgaim/plugins/perl/Makefile.mingw 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/libgaim/plugins/perl/Makefile.mingw 2006-09-04 23:00:13 UTC (rev 17161) @@ -68,8 +68,8 @@ ## ## BUILD DLL ## -$(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) - $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--export-all-symbols -o $(TARGET).dll +$(TARGET).dll $(TARGET).dll.a: $(GAIM_LIBGAIM_DLL).a $(OBJECTS) + $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--export-all-symbols -Wl,--out-implib,$(TARGET).dll.a -o $(TARGET).dll ## ## CLEAN RULES Modified: trunk/libgaim/plugins/perl/common/Makefile.mingw =================================================================== --- trunk/libgaim/plugins/perl/common/Makefile.mingw 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/libgaim/plugins/perl/common/Makefile.mingw 2006-09-04 23:00:13 UTC (rev 17161) @@ -98,12 +98,12 @@ $(C_FILES): $(GAIM_CONFIG_H) -$(AUTOSPLIT): Gaim.pm +$(AUTOSPLIT): mkdir -p ./lib/auto cp Gaim.pm ./lib $(PERL) -MAutoSplit -e 'autosplit("lib/Gaim.pm")' -$(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(FALLBACKS) $(OBJECTS) +$(TARGET).dll: $(GAIM_LIBGAIM_DLL).a $(GAIM_LIBGAIM_PERL_DLL).a $(FALLBACKS) $(OBJECTS) $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) -o $(TARGET).dll ## Modified: trunk/libgaim/plugins/perl/scripts/request.pl =================================================================== --- trunk/libgaim/plugins/perl/scripts/request.pl 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/libgaim/plugins/perl/scripts/request.pl 2006-09-04 23:00:13 UTC (rev 17161) @@ -17,17 +17,6 @@ plugin_action_sub => "plugin_action_names" ); - - # These names must already exist - my $GROUP = "UIUC Buddies"; - my $USERNAME = "johnhkelm2"; - - # We will create these on load then destroy them on unload - my $TEST_GROUP = "perlTestGroup"; - my $TEST_NAME = "perlTestName"; - my $TEST_ALIAS = "perlTestAlias"; - my $PROTOCOL_ID = "prpl-oscar"; - %plugin_actions = ( "Plugin Action Test Label" => \&plugin_action_test, ); Modified: trunk/libgaim/win32/global.mak =================================================================== --- trunk/libgaim/win32/global.mak 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/libgaim/win32/global.mak 2006-09-04 23:00:13 UTC (rev 17161) @@ -31,6 +31,7 @@ # Important (enough) locations in our source code GAIM_LIB_TOP := $(GAIM_TOP)/libgaim GAIM_LIB_PLUGINS_TOP := $(GAIM_LIB_TOP)/plugins +GAIM_LIB_PERL_TOP := $(GAIM_LIB_PLUGINS_TOP)/perl GAIM_GTK_TOP := $(GAIM_TOP)/gtk GAIM_GTK_IDLETRACK_TOP := $(GAIM_GTK_TOP)/win32/IdleTracker GAIM_GTK_PIXMAPS_TOP := $(GAIM_GTK_TOP)/pixmaps @@ -43,6 +44,7 @@ GAIM_CONFIG_H := $(GAIM_TOP)/config.h GAIM_IDLETRACK_DLL := $(GAIM_GTK_IDLETRACK_TOP)/idletrack.dll GAIM_LIBGAIM_DLL := $(GAIM_LIB_TOP)/libgaim.dll +GAIM_LIBGAIM_PERL_DLL := $(GAIM_LIB_PERL_TOP)/perl.dll GAIM_GTKGAIM_DLL := $(GAIM_GTK_TOP)/gtkgaim.dll GAIM_EXE := $(GAIM_GTK_TOP)/gaim.exe GAIM_PORTABLE_EXE := $(GAIM_GTK_TOP)/gaim-portable.exe Modified: trunk/libgaim/win32/rules.mak =================================================================== --- trunk/libgaim/win32/rules.mak 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/libgaim/win32/rules.mak 2006-09-04 23:00:13 UTC (rev 17161) @@ -4,7 +4,7 @@ $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< %.c: %.xs - $(PERL) $(EXTUTILS)/xsubpp -typemap $(EXTUTILS)/typemap -typemap typemap $< > $@ + $(PERL) $(EXTUTILS)/xsubpp -typemap $(EXTUTILS)/typemap -typemap $(GAIM_LIB_PERL_TOP)/common/typemap $< > $@ %.o: %.rc $(WINDRES) -i $< -o $@ Modified: trunk/libgaim/win32/targets.mak =================================================================== --- trunk/libgaim/win32/targets.mak 2006-09-04 21:58:49 UTC (rev 17160) +++ trunk/libgaim/win32/targets.mak 2006-09-04 23:00:13 UTC (rev 17161) @@ -11,6 +11,9 @@ $(GAIM_LIBGAIM_DLL) $(GAIM_LIBGAIM_DLL).a: $(MAKE) -C $(GAIM_LIB_TOP) -f $(GAIM_WIN32_MAKEFILE) libgaim.dll +$(GAIM_LIBGAIM_PERL_DLL) $(GAIM_LIBGAIM_PERL_DLL).a: + $(MAKE) -C $(GAIM_LIB_PERL_TOP) -f $(GAIM_WIN32_MAKEFILE) perl.dll + $(GAIM_GTKGAIM_DLL) $(GAIM_GTKGAIM_DLL).a: $(MAKE) -C $(GAIM_GTK_TOP) -f $(GAIM_WIN32_MAKEFILE) gtkgaim.dll This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2006-09-04 21:58:57
|
Revision: 17160 http://svn.sourceforge.net/gaim/?rev=17160&view=rev Author: evands Date: 2006-09-04 14:58:49 -0700 (Mon, 04 Sep 2006) Log Message: ----------- This patch was mentioned by Mark on gaim-devel; Tim replied, "That sounds good. As long as they're both #define's I can easily change." which they are :) Yahoo! Japan appears to not support - or at least not support in its current iteration -- the new Yahoo protocol version (0x000f), disconnecting us immediately if we send it. When connecting to Yahoo Japan, we now send the old version, (0x000c). Modified Paths: -------------- trunk/libgaim/protocols/yahoo/yahoo_filexfer.c trunk/libgaim/protocols/yahoo/yahoo_packet.c trunk/libgaim/protocols/yahoo/yahoo_packet.h trunk/libgaim/protocols/yahoo/yahoo_picture.c Modified: trunk/libgaim/protocols/yahoo/yahoo_filexfer.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_filexfer.c 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_filexfer.c 2006-09-04 21:58:49 UTC (rev 17160) @@ -212,7 +212,7 @@ content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); - pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, &pkt_buf); + pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, yd->jp, &pkt_buf); yahoo_packet_free(pkt); host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST); Modified: trunk/libgaim/protocols/yahoo/yahoo_packet.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_packet.c 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_packet.c 2006-09-04 21:58:49 UTC (rev 17160) @@ -294,7 +294,7 @@ size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, - guchar **buf) + gboolean jp, guchar **buf) { size_t pktlen = yahoo_packet_length(pkt); size_t len = YAHOO_PACKET_HDRLEN + pktlen; @@ -307,6 +307,8 @@ if (wm) pos += yahoo_put16(data + pos, YAHOO_WEBMESSENGER_PROTO_VER); + else if (jp) + pos += yahoo_put16(data + pos, YAHOO_PROTO_VER_JAPAN); else pos += yahoo_put16(data + pos, YAHOO_PROTO_VER); pos += yahoo_put16(data + pos, 0x0000); @@ -331,7 +333,7 @@ if (yd->fd < 0) return -1; - len = yahoo_packet_build(pkt, 0, yd->wm, &data); + len = yahoo_packet_build(pkt, 0, yd->wm, yd->jp, &data); yahoo_packet_dump(data, len); if (yd->txhandler == -1) Modified: trunk/libgaim/protocols/yahoo/yahoo_packet.h =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_packet.h 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_packet.h 2006-09-04 21:58:49 UTC (rev 17160) @@ -117,6 +117,7 @@ #define YAHOO_WEBMESSENGER_PROTO_VER 0x0065 #define YAHOO_PROTO_VER 0x000f +#define YAHOO_PROTO_VER_JAPAN 0x000c #define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4) @@ -127,7 +128,7 @@ void yahoo_packet_hash_int(struct yahoo_packet *pkt, int key, int value); int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd); int yahoo_packet_send_and_free(struct yahoo_packet *pkt, struct yahoo_data *yd); -size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, +size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, gboolean jp, guchar **buf); void yahoo_packet_read(struct yahoo_packet *pkt, const guchar *data, int len); void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data); Modified: trunk/libgaim/protocols/yahoo/yahoo_picture.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_picture.c 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_picture.c 2006-09-04 21:58:49 UTC (rev 17160) @@ -481,7 +481,7 @@ /* There's no magic here, we just need to prepend in reverse order */ g_string_prepend(d->str, "29\xc0\x80"); - pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, &pkt_buf); + pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, yd->jp, &pkt_buf); yahoo_packet_free(pkt); g_string_prepend_len(d->str, (char *)pkt_buf, pkt_buf_len); g_free(pkt_buf); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 08:19:23
|
Revision: 17159 http://svn.sourceforge.net/gaim/?rev=17159&view=rev Author: thekingant Date: 2006-09-04 01:19:17 -0700 (Mon, 04 Sep 2006) Log Message: ----------- A few more changes. Use --disable-gtkui or --disable-consoleui instead of whatever they were before Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-04 08:09:36 UTC (rev 17158) +++ trunk/configure.ac 2006-09-04 08:19:17 UTC (rev 17159) @@ -172,13 +172,16 @@ AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui], + [compile without GTK+ user interface])], + enable_gtkui="$enableval", enable_gtkui="yes") +AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui], + [compile without console user interface])], + enable_consoleui=$enableval, enable_consoleui=yes) + dnl ####################################################################### dnl # Check for GTK+ 2.0 and other things used by the GTK UI dnl ####################################################################### -AC_ARG_ENABLE(gtkgaim, - [AC_HELP_STRING([--disable-gtkgaim], - [compile without GtkGaim client])], - enable_gtkui="$enableval", enable_gtkui="yes") AC_ARG_ENABLE(screensaver, [AC_HELP_STRING([--disable-screensaver], [compile without X screensaver extension (used to detect idleness)])], @@ -211,7 +214,7 @@ You must have the GTK+ 2.0 development headers installed to compile Gaim's GTK+ interface. If you only want to build the console interface then -specify --disable-gtkgaim when running configure. +specify --disable-gtkui when running configure. ])]) AC_SUBST(GTK_CFLAGS) @@ -344,15 +347,11 @@ dnl ####################################################################### dnl # Check for ncurses and other things used by the console UI dnl ####################################################################### -AC_ARG_ENABLE(consolegaim, - [AC_HELP_STRING([--disable-consolegaim], [compile without console client])], - enable_console=$enableval, enable_console=yes) - GNT_LIBS="" GNT_CFLAGS="" -if test "x$enable_console" = "xyes"; then - AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_console=no]) - AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_console=no]) +if test "x$enable_consoleui" = "xyes"; then + AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no]) + AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no]) LIBS_save="$LIBS" LIBS="$LIBS $GNT_LIBS" @@ -392,7 +391,7 @@ if test x"$found_ncurses_h" = x"no" ; then GNT_LIBS="" GNT_CFLAGS="" - enable_console=no + enable_consoleui=no AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) @@ -406,7 +405,7 @@ AC_SUBST(GNT_LIBS) AC_SUBST(GNT_CFLAGS) -AM_CONDITIONAL(ENABLE_GNT, test "x$enable_console" = "xyes") +AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes") AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) @@ -763,18 +762,6 @@ AC_CHECK_HEADER(sys/utsname.h) AC_CHECK_FUNC(uname) -AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], - [compile with debugging support])], , enable_debug=no) -if test "x$enable_debug" = "xyes" ; then - AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) -fi - -AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], - [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) -if test "x$enable_fatal_asserts" = "xyes" ; then - AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).]) -fi - AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes) if test "x$GCC" = "xyes"; then @@ -1823,6 +1810,18 @@ AC_SUBST(enable_dot) AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes") +AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], + [compile with debugging support])], , enable_debug=no) +if test "x$enable_debug" = "xyes" ; then + AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) +fi + +AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], + [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) +if test "x$enable_fatal_asserts" = "xyes" ; then + AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).]) +fi + AC_CONFIG_COMMANDS_PRE([ if test -e VERSION; then cp -p VERSION VERSION.ac-save @@ -1898,7 +1897,7 @@ echo echo Build GTK+ 2.x UI............. : $enable_gtkui -echo Build console UI.............. : $enable_console +echo Build console UI.............. : $enable_consoleui echo echo Protocols to build dynamically : $DYNAMIC_PRPLS echo Protocols to link statically.. : $STATIC_PRPLS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 08:09:38
|
Revision: 17158 http://svn.sourceforge.net/gaim/?rev=17158&view=rev Author: thekingant Date: 2006-09-04 01:09:36 -0700 (Mon, 04 Sep 2006) Log Message: ----------- A little more cleanup Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-04 07:22:51 UTC (rev 17157) +++ trunk/configure.ac 2006-09-04 08:09:36 UTC (rev 17158) @@ -178,7 +178,7 @@ AC_ARG_ENABLE(gtkgaim, [AC_HELP_STRING([--disable-gtkgaim], [compile without GtkGaim client])], - enable_gtk="$enableval", enable_gtk="yes") + enable_gtkui="$enableval", enable_gtkui="yes") AC_ARG_ENABLE(screensaver, [AC_HELP_STRING([--disable-screensaver], [compile without X screensaver extension (used to detect idleness)])], @@ -204,7 +204,7 @@ [compile without Contact Availability Prediction plugin])], enable_cap="no", enable_cap="yes") -if test "x$enable_gtk" = "xyes" ; then +if test "x$enable_gtkui" = "xyes" ; then PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0], , [ AC_MSG_RESULT(no) AC_MSG_ERROR([ @@ -325,10 +325,8 @@ dnl ####################################################################### if test "x$enable_cap" = "xyes"; then AC_CHECK_HEADERS(dbi/dbi.h, , enable_cap="no") - if test "x$enable_cap" = "xyes"; then - AC_CHECK_LIB(dbi, dbi_result_field_is_null, CAP_LIBS="-ldbi", enable_cap="no") - AC_SUBST(CAP_LIBS) - fi + AC_CHECK_LIB(dbi, dbi_result_field_is_null, CAP_LIBS="-ldbi", enable_cap="no") + AC_SUBST(CAP_LIBS) fi else # GTK @@ -339,17 +337,79 @@ enable_gevolution=no fi # GTK -AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtk" = "xyes") +AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes") AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes") AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes") dnl ####################################################################### -dnl # Check for ncurses? +dnl # Check for ncurses and other things used by the console UI dnl ####################################################################### -AC_ARG_ENABLE(gntgaim, - [AC_HELP_STRING([--disable-gntgaim], [compile without GntGaim console client])], - enable_gnt=$enableval, enable_gnt=yes) +AC_ARG_ENABLE(consolegaim, + [AC_HELP_STRING([--disable-consolegaim], [compile without console client])], + enable_console=$enableval, enable_console=yes) +GNT_LIBS="" +GNT_CFLAGS="" +if test "x$enable_console" = "xyes"; then + AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_console=no]) + AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_console=no]) + + LIBS_save="$LIBS" + LIBS="$LIBS $GNT_LIBS" + + dnl # Some distros put the headers in ncursesw/, some don't + found_ncurses_h=no + for f in /usr/include/ncursesw/ncurses.h /usr/include/ncurses.h + do + AC_CHECK_HEADER($f,[ + AC_MSG_CHECKING([if $f supports wide characters]) + AC_TRY_COMPILE([ + #define _XOPEN_SOURCE_EXTENDED + #include <$f> + ], [ + #ifndef get_wch + # error get_wch not found! + #endif + ], [ + dir=`dirname $f` + if test x"$dir" != x"." ; then + GNT_CFLAGS="-I$dir/" + else + GNT_CFLAGS="" + fi + + found_ncurses_h=yes + AC_MSG_RESULT([yes]) + break + ], [ + AC_MSG_RESULT([no]) + ]) + ]) + done + + LIBS="$LIBS_save" + + if test x"$found_ncurses_h" = x"no" ; then + GNT_LIBS="" + GNT_CFLAGS="" + enable_console=no + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + fi + + PKG_CHECK_MODULES(X11, x11, + [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) + AC_SUBST(X11_LIBS) + AC_SUBST(X11_CFLAGS) +fi + +AC_SUBST(GNT_LIBS) +AC_SUBST(GNT_CFLAGS) +AM_CONDITIONAL(ENABLE_GNT, test "x$enable_console" = "xyes") + +AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) + dnl ####################################################################### dnl # Check for LibXML2 (required) dnl ####################################################################### @@ -574,7 +634,6 @@ AC_ARG_ENABLE(distrib,,,enable_distrib=no) AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") -AC_ARG_ENABLE(prpls, [AC_HELP_STRING([--disable-prpls], [don't build dynamic protocol plugins])], , enable_prpls=yes) DYNAMIC_PRPLS=all 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=""]) if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then @@ -697,20 +756,6 @@ AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes") AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes) -AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes) -AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl], [compile without Tcl scripting])], , enable_tcl=yes) -AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR], [directory containing tclConfig.sh])]) -AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], [compile without Tcl support for Tk])], , enable_tk=yes) -AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], [directory containing tkConfig.sh])]) -AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) -AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) -dnl We know Gaim won't compile with deprecated APIs disabled. -dnl We have no desire to support two different versions of the -dnl same code when it's not necessary, so we're sticking with -dnl the deprecated APIs in many cases. -dnl This option is being left in case things change. -dnl AC_ARG_ENABLE(deprecated, [AC_HELP_STRING([--disable-deprecated], [compile without deprecated API usage])], , enable_deprecated=yes) -AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes) AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no") AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no") AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") @@ -718,17 +763,19 @@ AC_CHECK_HEADER(sys/utsname.h) AC_CHECK_FUNC(uname) +AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], + [compile with debugging support])], , enable_debug=no) if test "x$enable_debug" = "xyes" ; then AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) fi +AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], + [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) if test "x$enable_fatal_asserts" = "xyes" ; then AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).]) fi -if test "x$enable_deprecated" = "xno"; then - DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" -fi +AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes) if test "x$GCC" = "xyes"; then dnl We enable -Wall later. @@ -824,11 +871,6 @@ x_incpath_add="-I$x_includes" fi -PKG_CHECK_MODULES(X11, x11, - [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) -AC_SUBST(X11_LIBS) -AC_SUBST(X11_CFLAGS) - dnl ####################################################################### dnl # Check for DBUS libraries dnl ####################################################################### @@ -952,66 +994,6 @@ AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") dnl ####################################################################### -dnl # GNT Gaim -dnl ####################################################################### -GNT_LIBS="" -GNT_CFLAGS="" -if test "x$enable_gnt" = "xyes"; then - AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no]) - AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no]) - - LIBS_save="$LIBS" - LIBS="$LIBS $GNT_LIBS" - - dnl # Some distros put the headers in ncursesw/, some don't - found_ncurses_h=no - for f in /usr/include/ncurses.h /usr/include/ncursesw/ncurses.h - do - AC_CHECK_HEADER($f,[ - AC_MSG_CHECKING([if $f supports wide characters]) - AC_TRY_COMPILE([ - #define _XOPEN_SOURCE_EXTENDED - #include <$f> - ], [ - #ifndef get_wch - # error get_wch not found! - #endif - ], [ - dir=`dirname $f` - if test x"$dir" != x"." ; then - GNT_CFLAGS="-I$dir/" - else - GNT_CFLAGS="" - fi - - found_ncurses_h=yes - AC_MSG_RESULT([yes]) - break - ], [ - AC_MSG_RESULT([no]) - ]) - ]) - done - - LIBS="$LIBS_save" - - if test x"$found_ncurses_h" = x"no" ; then - GNT_LIBS="" - GNT_CFLAGS="" - enable_gnt=no - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - fi -fi - -AC_SUBST(GNT_LIBS) -AC_SUBST(GNT_CFLAGS) -AM_CONDITIONAL(ENABLE_GNT, test "x$enable_gnt" = "xyes") - -AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) - -dnl ####################################################################### dnl # Check for Mono support dnl ####################################################################### AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no) @@ -1054,6 +1036,8 @@ dnl ####################################################################### dnl # Check for Perl support dnl ####################################################################### +AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes) + if test "$enable_plugins" = no ; then enable_perl=no fi @@ -1568,6 +1552,11 @@ dnl ####################################################################### dnl # Check for Tcl dnl ####################################################################### +AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl], + [compile without Tcl scripting])], enable_tcl="no", enable_tcl="yes") +AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR], + [directory containing tclConfig.sh])]) + if test "$enable_plugins" = no; then enable_tcl=no fi @@ -1632,6 +1621,11 @@ dnl ####################################################################### dnl # Check for Tk dnl ####################################################################### +AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], + [compile without Tcl support for Tk])], enable_tk="no", enable_tk="yes") +AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], + [directory containing tkConfig.sh])]) + if test "$enable_tcl" = yes -a "$enable_tk" = yes; then AC_MSG_CHECKING([for tkConfig.sh]) TKCONFIG=no @@ -1689,20 +1683,11 @@ if test "x$enable_plugins" = "xyes" ; then AC_DEFINE(GAIM_PLUGINS, 1, [Define if plugins are enabled.]) - AM_CONDITIONAL(PLUGINS, test "x$enable_plugins" = "xyes") + AM_CONDITIONAL(PLUGINS, true) else AM_CONDITIONAL(PLUGINS, false) - enable_plugins=no - enable_prpls=no fi -if test "x$enable_prpls" = "xyes" ; then - AM_CONDITIONAL(PRPLS, test "x$enable_plugins" = "xyes") -else - AM_CONDITIONAL(PRPLS, false) - enable_prpls=no -fi - dnl ####################################################################### dnl # Check for Cyrus-SASL (for Jabber) dnl ####################################################################### @@ -1802,42 +1787,41 @@ dnl ####################################################################### dnl # Check for Doxygen and dot (part of GraphViz) dnl ####################################################################### -AC_ARG_ENABLE(doxygen, [AC_HELP_STRING([--enable-doxygen], [enable documentation with doxygen])],,enable_doxygen=yes) -AC_ARG_ENABLE(dot, [AC_HELP_STRING([--enable-dot], [enable graphs in doxygen via 'dot'])],,enable_dot=yes) +AC_ARG_ENABLE(doxygen, + [AC_HELP_STRING([--disable-doxygen], + [enable documentation with doxygen])], + enable_doxygen="no", enable_doxygen="yes") +AC_ARG_ENABLE(dot, + [AC_HELP_STRING([--enable-dot], + [enable graphs in doxygen via 'dot'])], + enable_dot="no", enable_dot="yes") if test "x$enable_doxygen" = xyes; then AC_CHECK_PROG(DOXYGEN, doxygen, true, false) if test $DOXYGEN = false; then - AC_MSG_WARN([*** doxygen not found, docs will not be available]) - enable_doxygen=no + AC_MSG_WARN([*** Doxygen not found, docs will not be available]) + enable_doxygen="no" else AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen]) - if test "x$enable_dot" = xyes; then + if test "x$enable_dot" = "xyes"; then AC_CHECK_PROG(DOT, dot, true, false) if test $DOT = false; then enable_dot="no"; - AC_MSG_WARN([*** dot not found, graphs will not be available]) + AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs]) else AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot]) fi - else - AC_MSG_WARN([*** dot not found, graphs will not be available]) fi fi else enable_dot="no" fi -if test "x$enable_doxygen" = xyes; then - AM_CONDITIONAL(HAVE_DOXYGEN, true) -else - AM_CONDITIONAL(HAVE_DOXYGEN, false) -fi - AC_SUBST(enable_doxygen) AC_SUBST(enable_dot) +AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes") AC_CONFIG_COMMANDS_PRE([ if test -e VERSION; then @@ -1913,35 +1897,34 @@ echo $PACKAGE $VERSION echo -echo Build Protocol Plugins........ : $enable_prpls -echo Protocols to link statically.. : $STATIC_PRPLS +echo Build GTK+ 2.x UI............. : $enable_gtkui +echo Build console UI.............. : $enable_console +echo echo Protocols to build dynamically : $DYNAMIC_PRPLS +echo Protocols to link statically.. : $STATIC_PRPLS echo -echo Build with GTK+ 2.x UI........ : $enable_gtk -echo Build with GNT Console UI..... : $enable_gnt -echo SSL Library/Libraries......... : $msg_ssl -echo echo Build with GStreamer support.. : $enable_gst -echo Build with Plugin support..... : $enable_plugins -echo Build with Mono support....... : $enable_mono -echo Build with Perl support....... : $enable_perl -echo Build with Tcl support........ : $enable_tcl -echo Build with Tk support......... : $enable_tk -echo Build with GtkSpell support... : $enable_gtkspell echo Build with DBUS support....... : $enable_dbus if test "x$enable_dbus" = "xyes" ; then -eval eval echo DBUS servies directory........ : $DBUS_SERVICES_DIR + eval eval echo DBUS servies directory........ : $DBUS_SERVICES_DIR fi +echo SSL Library/Libraries......... : $msg_ssl echo Build with Cyrus SASL support. : $enable_cyrus_sasl -echo Has you....................... : yes -echo echo Use kerberos 4 with zephyr.... : $kerberos echo Use external libzephyr........ : $zephyr +echo Has you....................... : yes echo echo Use XScreenSaver Extension.... : $enable_screensaver echo Use X Session Management...... : $enable_sm echo Use startup notification...... : $enable_startup_notification +echo Build with GtkSpell support... : $enable_gtkspell echo +echo Build with plugin support..... : $enable_plugins +echo Build with Mono support....... : $enable_mono +echo Build with Perl support....... : $enable_perl +echo Build with Tcl support........ : $enable_tcl +echo Build with Tk support......... : $enable_tk +echo echo Print debugging messages...... : $enable_debug echo Assertions are fatal.......... : $enable_fatal_asserts echo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 07:22:52
|
Revision: 17157 http://svn.sourceforge.net/gaim/?rev=17157&view=rev Author: thekingant Date: 2006-09-04 00:22:51 -0700 (Mon, 04 Sep 2006) Log Message: ----------- Add the Contact Availability Predicition plugin to the ChangeLog Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-09-04 07:16:09 UTC (rev 17156) +++ trunk/ChangeLog 2006-09-04 07:22:51 UTC (rev 17157) @@ -122,6 +122,10 @@ * The system tray icon is now transparent (Dan Winship) * New Log Reader plugin that can read and display logs from Adium, MSN Messenger, and Trillian in the log viewer + * New Contact Availability plugin that attempts to predict the + times when people in your buddylist will most likely respond + to you, based on times in the past when they have responded + (Geoffrey Foster, Google Summer of Code) MSN Features: * Custom smiley receiving support (Irving Cordova & Francesco Fracassi) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 07:16:15
|
Revision: 17156 http://svn.sourceforge.net/gaim/?rev=17156&view=rev Author: thekingant Date: 2006-09-04 00:16:09 -0700 (Mon, 04 Sep 2006) Log Message: ----------- More cleanup. Contact Availability Prediction plugin is compiled by default now (as long as libdbi is installed). And it's not compiled if not doing gtk Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-04 05:48:45 UTC (rev 17155) +++ trunk/configure.ac 2006-09-04 07:16:09 UTC (rev 17156) @@ -161,13 +161,202 @@ ) dnl ####################################################################### -dnl # Check for LibXML2 (required) +dnl # Check for GLib 2.0 (required) dnl ####################################################################### -PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , - [ +PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +You must have the GLib 2.0 development headers installed to build Gaim. +])]) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +dnl ####################################################################### +dnl # Check for GTK+ 2.0 and other things used by the GTK UI +dnl ####################################################################### +AC_ARG_ENABLE(gtkgaim, + [AC_HELP_STRING([--disable-gtkgaim], + [compile without GtkGaim client])], + enable_gtk="$enableval", enable_gtk="yes") +AC_ARG_ENABLE(screensaver, + [AC_HELP_STRING([--disable-screensaver], + [compile without X screensaver extension (used to detect idleness)])], + enable_screensaver="no", enable_screensaver="yes") +AC_ARG_ENABLE(sm, + [AC_HELP_STRING([--disable-sm], + [compile without X session management support])], + enable_sm="no", enable_sm="yes") +AC_ARG_ENABLE(startup-notification, + [AC_HELP_STRING([--disable-startup-notification], + [compile without startup notification support])], + enable_startup_notification="no", enable_startup_notification="yes") +AC_ARG_ENABLE(gtkspell, + [AC_HELP_STRING([--disable-gtkspell], + [compile without GtkSpell automatic spell checking])], + enable_gtkspell="no", enable_gtkspell="yes") +AC_ARG_ENABLE(gevolution, + [AC_HELP_STRING([--disable-gevolution], + [compile without the Gaim Evolution plugin])], + enable_gevolution="no", enable_gevolution="yes") +AC_ARG_ENABLE(cap, + [AC_HELP_STRING([--disable-cap], + [compile without Contact Availability Prediction plugin])], + enable_cap="no", enable_cap="yes") + +if test "x$enable_gtk" = "xyes" ; then + PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0], , [ AC_MSG_RESULT(no) AC_MSG_ERROR([ +You must have the GTK+ 2.0 development headers installed to compile Gaim's +GTK+ interface. If you only want to build the console interface then +specify --disable-gtkgaim when running configure. +])]) + + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + + dnl ####################################################################### + dnl # Check for XScreenSaver + dnl ####################################################################### + if test "x$enable_screensaver" = "xyes" ; then + old_LIBS="$LIBS" + LIBS="$LIBS $GTK_LIBS $x_libpath_add" + XSS_LIBS="" + XSS_HEADERS="" + AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) + AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) + if test "x$XSS_LIBS" != "x"; then + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $x_incpath_add" + AC_TRY_COMPILE([ + #include <X11/Xlib.h> + #include <X11/extensions/scrnsaver.h> + ], [], [], [enable_screensaver=no]) + CPPFLAGS="$oldCPPFLAGS" + else + enable_screensaver=no + fi + LIBS="$old_LIBS" + + if test "x$enable_screensaver" = "xyes" ; then + AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.]) + AC_SUBST(XSS_LIBS) + fi + fi + + dnl ####################################################################### + dnl # Check for X session management libs + dnl ####################################################################### + if test "x$enable_sm" = "xyes"; then + enable_sm=no + AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) + if test "x$found_sm_lib" = "xtrue"; then + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $x_incpath_add" + AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) + CPPFLAGS="$oldCPPFLAGS" + fi + + if test "x$enable_sm" = "xyes"; then + AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) + AC_SUBST(SM_LIBS) + fi + 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) + enable_startup_notification=no + ]) + + 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$enable_gtkspell" = "xyes" ; then + AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell]) + AC_SUBST(GTKSPELL_CFLAGS) + AC_SUBST(GTKSPELL_LIBS) + fi + fi + + dnl ####################################################################### + dnl # Check for stuff needed by the Evolution integration plugin. + dnl ####################################################################### + 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 + AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) + AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) + AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) + fi + fi + + dnl ####################################################################### + dnl # Check for libdbi (for the Contact Availability Prediction plugin) + dnl ####################################################################### + if test "x$enable_cap" = "xyes"; then + AC_CHECK_HEADERS(dbi/dbi.h, , enable_cap="no") + if test "x$enable_cap" = "xyes"; then + AC_CHECK_LIB(dbi, dbi_result_field_is_null, CAP_LIBS="-ldbi", enable_cap="no") + AC_SUBST(CAP_LIBS) + fi + fi + +else # GTK + enable_screensaver=no + enable_sm=no + enable_startup_notification=no + enable_gtkspell=no + enable_gevolution=no +fi # GTK + +AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtk" = "xyes") +AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes") +AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes") + +dnl ####################################################################### +dnl # Check for ncurses? +dnl ####################################################################### +AC_ARG_ENABLE(gntgaim, + [AC_HELP_STRING([--disable-gntgaim], [compile without GntGaim console client])], + enable_gnt=$enableval, enable_gnt=yes) + +dnl ####################################################################### +dnl # Check for LibXML2 (required) +dnl ####################################################################### +PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + You must have the libxml2 development headers installed to build Gaim. ])]) AC_SUBST(LIBXML_CFLAGS) @@ -180,24 +369,24 @@ [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], enable_gst="no", enable_gst="yes") PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , [ - AC_MSG_RESULT(no) - enable_gst="no" - ]) + AC_MSG_RESULT(no) + enable_gst="no" +]) if test "x$enable_gst" != "xno"; then + AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds]) AC_SUBST(GSTREAMER_CFLAGS) AC_SUBST(GSTREAMER_LIBS) - AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds]) fi dnl ####################################################################### dnl # Check for Meanwhile headers (for Sametime) dnl ####################################################################### PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [ - have_meanwhile="yes" - ], [ - AC_MSG_RESULT(no) - have_meanwhile="no" - ]) + have_meanwhile="yes" +], [ + AC_MSG_RESULT(no) + have_meanwhile="no" +]) AC_SUBST(MEANWHILE_CFLAGS) AC_SUBST(MEANWHILE_LIBS) @@ -211,6 +400,17 @@ dnl Attempt to autodetect avahi-compat-howl PKG_CHECK_MODULES(HOWL, avahi-compat-howl, [ + howlincludes="yes" + howllibs="yes" +], [ + AC_MSG_RESULT(no) + howlincludes="no" + howllibs="no" +]) + +dnl Attempt to autodetect Howl +if test "x$howlincludes" = "xno"; then + PKG_CHECK_MODULES(HOWL, howl, [ howlincludes="yes" howllibs="yes" ], [ @@ -218,17 +418,6 @@ howlincludes="no" howllibs="no" ]) - -dnl Attempt to autodetect Howl -if test "x$howlincludes" = "xno"; then - PKG_CHECK_MODULES(HOWL, howl, [ - howlincludes="yes" - howllibs="yes" - ], [ - AC_MSG_RESULT(no) - howlincludes="no" - howllibs="no" - ]) fi dnl Override HOWL_CFLAGS if the user specified an include dir @@ -514,10 +703,6 @@ AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], [compile without Tcl support for Tk])], , enable_tk=yes) AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], [directory containing tkConfig.sh])]) AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) -AC_ARG_ENABLE(gtkgaim, [AC_HELP_STRING([--disable-gtkgaim], [compile without GtkGaim client])], - enable_gtk=$enableval, enable_gtk=yes) -AC_ARG_ENABLE(gntgaim, [AC_HELP_STRING([--disable-gntgaim], [compile without GntGaim console client])], - enable_gnt=$enableval, enable_gnt=yes) AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) dnl We know Gaim won't compile with deprecated APIs disabled. dnl We have no desire to support two different versions of the @@ -526,8 +711,6 @@ dnl This option is being left in case things change. dnl AC_ARG_ENABLE(deprecated, [AC_HELP_STRING([--disable-deprecated], [compile without deprecated API usage])], , enable_deprecated=yes) AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes) -AC_ARG_ENABLE(screensaver, [AC_HELP_STRING([--disable-screensaver], [compile without X screensaver extension])], , enable_xss=yes) -AC_ARG_ENABLE(sm, [AC_HELP_STRING([--disable-sm], [compile without X session management support])], , enable_sm=yes) AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no") AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no") AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") @@ -624,32 +807,8 @@ fi AC_SUBST(CFLAGS) -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0], , - [ - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -You must have the GLib 2.0 development headers installed to build Gaim. -])]) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - AC_PATH_PROG(gaimpath, gaim) -if test "x$enable_gtk" = "xyes" ; then - PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0],, - [ - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -You must have the GTK+ 2.0 development headers installed to compile Gaim's -GTK+ interface. If you only want to build the console interface then -specify --disable-gtkgaim when calling configure. -])]) -AC_SUBST(GTK_CFLAGS) -AC_SUBST(GTK_LIBS) -fi - AC_PATH_XTRA # We can't assume that $x_libraries will be set, because autoconf does not # set it in the case when the X libraries are in a standard place. @@ -681,13 +840,11 @@ fi if test "x$enable_dbus" = "xyes" ; then - PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35], - [ + PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35], [ AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) enable_dbus=yes - ], - [ + ], [ AC_MSG_RESULT(no) enable_dbus=no ]) @@ -855,167 +1012,6 @@ AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) dnl ####################################################################### -dnl # Look for startup-notification, evolution integration, X-libraries, -dnl # XScreenSaver, X session management, GtkSpell only if GTK+ was found -dnl ####################################################################### - -if test "x$enable_gtk" = "xyes"; then - - dnl ####################################################################### - dnl # Check for startup notification - dnl ####################################################################### - AC_ARG_ENABLE(startup-notification, [AC_HELP_STRING([--disable-startup-notification], [compile without startup notification support])], , enable_startup_notification=yes) - - if test "x$enable_startup_notification" = "xyes"; then - PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5, - [ - AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.]) - enable_startup_notification=yes - ], [ - AC_MSG_RESULT(no) - enable_startup_notification=no - ]) - - AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) - AC_SUBST(STARTUP_NOTIFICATION_LIBS) - fi - - dnl ####################################################################### - dnl # Check for stuff needed by the evolution integration plugin. - dnl ####################################################################### - build_gevo=no - AC_ARG_ENABLE(gevolution, [AC_HELP_STRING([--disable-gevolution], [compile without the Gaim-Evolution plugin])], , enable_gevolution=yes) - - if test "x$enable_gevolution" = "xyes"; then - evo_deps="libebook-1.2 libedata-book-1.2" - PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ - AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) - build_gevo=yes - ], [ - AC_MSG_RESULT(yes) - build_gevo=no - ]) - if test "x$build_gevo" = "xno"; then - evo_deps="libebook-1.0 libedata-book-1.0" - PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ - AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) - build_gevo=yes - ], [ - AC_MSG_RESULT(yes) - build_gevo=no - ]) - fi - - AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) - AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) - fi - - dnl ####################################################################### - dnl # Check for XScreenSaver - dnl ####################################################################### - if test "x$enable_xss" = "xyes" ; then - old_LIBS="$LIBS" - LIBS="$LIBS $GTK_LIBS $x_libpath_add" - XSS_LIBS="no" - XSS_HEADERS="no" - AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) - AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) - if test \! "$XSS_LIBS" = "no"; then - oldCPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_TRY_COMPILE([ - #include <X11/Xlib.h> - #include <X11/extensions/scrnsaver.h> - ],[],[ - AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])],[enable_xss=no] - ) - CPPFLAGS="$oldCPPFLAGS" - else - XSS_LIBS="" - enable_xss=no - fi - LIBS="$old_LIBS" - else - XSS_LIBS="" - enable_xss=no - fi - AC_SUBST(XSS_LIBS) - - dnl ####################################################################### - dnl # Check for X session management libs - dnl ####################################################################### - if test "x$enable_sm" = "xyes"; then - enable_sm=no - AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) - if test "$found_sm_lib" = "true"; then - oldCPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) - CPPFLAGS="$oldCPPFLAGS" - fi - else - SM_LIBS="" - enable_sm=no - fi - AC_SUBST(SM_LIBS) - if test "$enable_sm" = "yes"; then - AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) - fi - - AC_DEFUN([GC_TM_GMTOFF], - [AC_REQUIRE([AC_STRUCT_TM])dnl - AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, - [AC_TRY_COMPILE([#include <sys/types.h> - #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], - 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, [tm_gmtoff is available.]) - fi - ]) - - dnl ####################################################################### - dnl # Check for GtkSpell - dnl ####################################################################### - AC_ARG_ENABLE(gtkspell, [AC_HELP_STRING([--disable-gtkspell], [compile without GtkSpell automatic spell checking])], , enable_gtkspell=yes) - if test "$enable_gtkspell" = yes ; then - PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, [], [ - AC_MSG_RESULT(no) - enable_gtkspell=no - ]) - if test "$enable_gtkspell" = "yes" ; then - AC_SUBST(GTKSPELL_CFLAGS) - AC_SUBST(GTKSPELL_LIBS) - AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?]) - fi - fi -else # GTK - enable_gevolution=no - enable_sm=no - enable_xss=no - enable_startup_notification=no - enable_gtkspell=no -fi # GTK - -AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtk" = "xyes") - -AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$build_gevo" = "xyes") - -GC_TM_GMTOFF - -dnl ####################################################################### -dnl # Check for libdbi (Contact Availability Prediction plugin) -dnl ####################################################################### -AC_ARG_ENABLE(cap, [AC_HELP_STRING([--enable-cap], [compile with Contact Availability Prediction Plugin])], , enable_cap=no) -if test "x$enable_cap" = "xyes"; then - AC_CHECK_HEADERS(dbi/dbi.h, [], enable_cap=no) -fi -if test "x$enable_cap" = "xyes"; then - AC_CHECK_LIB(dbi, dbi_result_field_is_null, [CAP_LIBS="-ldbi"], [enable_cap=no]) -fi -AC_SUBST(CAP_LIBS) -AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes") - -dnl ####################################################################### dnl # Check for Mono support dnl ####################################################################### AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no) @@ -1107,10 +1103,10 @@ AM_CONDITIONAL(USE_PERL, false) AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker) else + AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl]) AC_SUBST(PERL_CFLAGS) AC_SUBST(PERL_LIBS) AM_CONDITIONAL(USE_PERL, true) - AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl]) dnl This is almost definitely wrong, but in case there's dnl something I'm missing, I'll leave it in. @@ -1622,8 +1618,8 @@ if test "$enable_tcl" = yes; then AM_CONDITIONAL(USE_TCL, true) TCL_LIBS=$TCL_LIB_SPEC - AC_SUBST(TCL_LIBS) AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit]) + AC_SUBST(TCL_LIBS) TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" if test "x$GCC" = "xyes"; then TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing" @@ -1942,7 +1938,7 @@ echo Use kerberos 4 with zephyr.... : $kerberos echo Use external libzephyr........ : $zephyr echo -echo Use XScreenSaver Extension.... : $enable_xss +echo Use XScreenSaver Extension.... : $enable_screensaver echo Use X Session Management...... : $enable_sm echo Use startup notification...... : $enable_startup_notification echo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 05:48:50
|
Revision: 17155 http://svn.sourceforge.net/gaim/?rev=17155&view=rev Author: thekingant Date: 2006-09-03 22:48:45 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Minor cleanup and whitespace. And make some error messages a bit more concise. Modified Paths: -------------- trunk/autogen.sh trunk/configure.ac Modified: trunk/autogen.sh =================================================================== --- trunk/autogen.sh 2006-09-04 04:38:03 UTC (rev 17154) +++ trunk/autogen.sh 2006-09-04 05:48:45 UTC (rev 17155) @@ -2,35 +2,35 @@ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { echo; - echo "You must have glib-gettextize installed to compile Gaim"; + echo "You must have glib-gettextize installed to compile Gaim."; echo; exit; } (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo; - echo "You must have intltool installed to compile Gaim"; + echo "You must have intltool installed to compile Gaim."; echo; exit; } (libtoolize --version) < /dev/null > /dev/null 2>&1 || { echo; - echo "You must have libtool installed to compile Gaim"; + echo "You must have libtool installed to compile Gaim."; echo; exit; } (automake --version) < /dev/null > /dev/null 2>&1 || { echo; - echo "You must have automake installed to compile Gaim"; + echo "You must have automake installed to compile Gaim."; echo; exit; } (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo; - echo "You must have autoconf installed to compile Gaim"; + echo "You must have autoconf installed to compile Gaim."; echo; exit; } Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-04 04:38:03 UTC (rev 17154) +++ trunk/configure.ac 2006-09-04 05:48:45 UTC (rev 17155) @@ -83,13 +83,14 @@ 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_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, [AC_DEFINE([HAVE_GETADDRINFO], [1], - [Define to 1 if you have the getaddrinfo function.])], - [AC_CHECK_LIB(socket, getaddrinfo, - [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) +AC_CHECK_FUNC(getaddrinfo, + [AC_DEFINE([HAVE_GETADDRINFO], [1], + [Define to 1 if you have the getaddrinfo function.])], + [AC_CHECK_LIB(socket, getaddrinfo, + [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) dnl Check for socklen_t (in Unix98) AC_MSG_CHECKING(for socklen_t) @@ -146,16 +147,13 @@ (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.]) -], -[ + [Define to 1 if you have a strftime() that supports the %z format string.]) +], [ AC_MSG_RESULT(no) -], -[ +], [ # Fallback for Cross Compiling... # This will enable the compatibility code. AC_MSG_RESULT(no) @@ -163,41 +161,38 @@ ) dnl ####################################################################### -dnl # GStreamer +dnl # Check for LibXML2 (required) dnl ####################################################################### -enable_gst=yes -PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , - [ - AC_MSG_RESULT(no) - enable_gst=no - ]) -AC_SUBST(GSTREAMER_CFLAGS) -AC_SUBST(GSTREAMER_LIBS) -AC_ARG_ENABLE(gstreamer, [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], enable_gst=no) -if test "x$enable_gst" = "xyes"; then - AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for making sounds]) -fi - -dnl ################# -dnl # LibXML2 -dnl ################# -enable_libxml2=yes PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [ + AC_MSG_RESULT(no) AC_MSG_ERROR([ -*** libxml2 is required to build Gaim; please make sure you have the -*** libxml2 development headers installed.]) - ]) + +You must have the libxml2 development headers installed to build Gaim. +])]) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) +dnl ####################################################################### +dnl # Check for GStreamer +dnl ####################################################################### +AC_ARG_ENABLE(gstreamer, + [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], + enable_gst="no", enable_gst="yes") +PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , [ + AC_MSG_RESULT(no) + enable_gst="no" + ]) +if test "x$enable_gst" != "xno"; then + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) + AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds]) +fi - dnl ####################################################################### dnl # Check for Meanwhile headers (for Sametime) dnl ####################################################################### -PKG_CHECK_MODULES(MEANWHILE, - [meanwhile >= 1.0.0 meanwhile < 2.0.0], [ +PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [ have_meanwhile="yes" ], [ AC_MSG_RESULT(no) @@ -206,8 +201,6 @@ AC_SUBST(MEANWHILE_CFLAGS) AC_SUBST(MEANWHILE_LIBS) - - dnl ####################################################################### dnl # Check for Howl headers (for Bonjour) dnl ####################################################################### @@ -256,8 +249,6 @@ AC_SUBST(HOWL_CFLAGS) AC_SUBST(HOWL_LIBS) - - dnl ####################################################################### dnl # Check for SILC client includes and libraries dnl ####################################################################### @@ -324,7 +315,6 @@ CPPFLAGS="$CPPFLAGS_save" fi - dnl ####################################################################### dnl # Check for Gadu-Gadu client includes and libraries dnl ####################################################################### @@ -371,7 +361,7 @@ ], [ AC_MSG_RESULT(yes) AC_DEFINE([HAVE_LIBGADU], [1], - [Define to 1 if you have libgadu.]) + [Define to 1 if you have libgadu.]) ], [ AC_MSG_RESULT(no) echo @@ -471,7 +461,7 @@ DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr" fi if test "x$have_meanwhile" != "xyes"; then - DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` + DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` fi if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` @@ -517,15 +507,12 @@ AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes") AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes") -AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no) -AC_ARG_ENABLE(cap, [AC_HELP_STRING([--enable-cap], [compile with Contact Availability Prediction Plugin])], , enable_cap=no) AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes) AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes) AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl], [compile without Tcl scripting])], , enable_tcl=yes) AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR], [directory containing tclConfig.sh])]) AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], [compile without Tcl support for Tk])], , enable_tk=yes) AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], [directory containing tkConfig.sh])]) -AC_ARG_ENABLE(gtkspell, [AC_HELP_STRING([--disable-gtkspell], [compile without GtkSpell automatic spell checking])], , enable_gtkspell=yes) AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) AC_ARG_ENABLE(gtkgaim, [AC_HELP_STRING([--disable-gtkgaim], [compile without GtkGaim client])], enable_gtk=$enableval, enable_gtk=yes) @@ -637,29 +624,28 @@ fi AC_SUBST(CFLAGS) -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0],, - [ - AC_MSG_ERROR([ -*** GLib 2.0 is required to build Gaim; please make sure you have the GLib -*** development headers installed. The latest version of GLib is -*** always available at http://www.gtk.org/.]) - ]) +PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0], , + [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +You must have the GLib 2.0 development headers installed to build Gaim. +])]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_PATH_PROG(gaimpath, gaim) if test "x$enable_gtk" = "xyes" ; then - PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0],, - [ - AC_MSG_ERROR([ -*** GTK+ 2.0 is required to build Gaim. please make sure you have the GTK+ -*** development headers installed. The latest version of GTK+ is -*** always available at http://www.gtk.org/. -*** -*** If you wish to build just gntgaim or libgaim, -*** configure with --disable-gtkgaim]) - ]) + PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0],, + [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +You must have the GTK+ 2.0 development headers installed to compile Gaim's +GTK+ interface. If you only want to build the console interface then +specify --disable-gtkgaim when calling configure. +])]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) fi @@ -679,7 +665,7 @@ x_incpath_add="-I$x_includes" fi -PKG_CHECK_MODULES(X11, x11, +PKG_CHECK_MODULES(X11, x11, [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) AC_SUBST(X11_LIBS) AC_SUBST(X11_CFLAGS) @@ -691,7 +677,7 @@ AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--enable-dbus], [enable DBUS support])], , enable_dbus=yes) if test "x$enable_dbus" = "xyes" ; then - AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no) + AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no) fi if test "x$enable_dbus" = "xyes" ; then @@ -707,19 +693,21 @@ ]) fi -dnl Why do we need python? +dnl ####################################################################### +dnl # Check for Python +dnl ####################################################################### -dnl Python scripts are used to auto-generate about 3000 lines of C -dnl and XML code that wraps (part of) the existing Gaim API so that -dnl it is now accessible through DBUS. +dnl Python scripts are used to auto-generate about 3000 lines of C +dnl and XML code that wraps (part of) the existing Gaim API so that +dnl it is now accessible through DBUS. -dnl Python is only required if --enable-dbus is used, and only for -dnl the build process to generate the code, not for running gaim. -dnl This autogenerated code is system-independent, so in principle we -dnl can generate all of it before shipping. But I thought adding -dnl auto-generated stuff to the repository is inelegant. -dnl Alternatively, these python scripts could be rewritten -dnl in C (brrrr ...). +dnl Python is only required if --enable-dbus is used, and only for +dnl the build process to generate the code, not for running gaim. +dnl This autogenerated code is system-independent, so in principle we +dnl can generate all of it before shipping. But I thought adding +dnl auto-generated stuff to the repository is inelegant. +dnl Alternatively, these python scripts could be rewritten +dnl in C (brrrr ...). AC_ARG_WITH([python], AC_HELP_STRING([--with-python=PATH], @@ -794,14 +782,14 @@ fi fi AC_MSG_RESULT([$DBUS_SERVICES_DIR]) - AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.]) + AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.]) fi AC_SUBST(DBUS_SERVICES_DIR) if test "x$enable_dbus" = "xyes" ; then - echo "Building with DBUS support" + echo "Building with DBUS support" else - echo "Building without DBUS support" + echo "Building without DBUS support" fi AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") @@ -873,43 +861,33 @@ if test "x$enable_gtk" = "xyes"; then -dnl ####################################################################### -dnl # Check for startup notification -dnl ####################################################################### -AC_ARG_ENABLE(startup-notification, [AC_HELP_STRING([--disable-startup-notification], [compile without startup notification support])], , enable_startup_notification=yes) + dnl ####################################################################### + dnl # Check for startup notification + dnl ####################################################################### + AC_ARG_ENABLE(startup-notification, [AC_HELP_STRING([--disable-startup-notification], [compile without startup notification support])], , enable_startup_notification=yes) -if test "x$enable_startup_notification" = "xyes"; then - PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5, - [ - AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.]) - enable_startup_notification=yes - ], - [ - AC_MSG_RESULT(no) - enable_startup_notification=no - ]) + if test "x$enable_startup_notification" = "xyes"; then + PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5, + [ + AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.]) + enable_startup_notification=yes + ], [ + AC_MSG_RESULT(no) + enable_startup_notification=no + ]) - AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) - AC_SUBST(STARTUP_NOTIFICATION_LIBS) -fi + AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) + AC_SUBST(STARTUP_NOTIFICATION_LIBS) + fi -dnl ####################################################################### -dnl # Check for stuff needed by the evolution integration plugin. -dnl ####################################################################### -build_gevo=no -AC_ARG_ENABLE(gevolution, [AC_HELP_STRING([--disable-gevolution], [compile without the Gaim-Evolution plugin])], , enable_gevolution=yes) + dnl ####################################################################### + dnl # Check for stuff needed by the evolution integration plugin. + dnl ####################################################################### + build_gevo=no + AC_ARG_ENABLE(gevolution, [AC_HELP_STRING([--disable-gevolution], [compile without the Gaim-Evolution plugin])], , enable_gevolution=yes) -if test "x$enable_gevolution" = "xyes"; then - evo_deps="libebook-1.2 libedata-book-1.2" - PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ - AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) - build_gevo=yes - ], [ - AC_MSG_RESULT(yes) - build_gevo=no - ]) - if test "x$build_gevo" = "xno"; then - evo_deps="libebook-1.0 libedata-book-1.0" + if test "x$enable_gevolution" = "xyes"; then + evo_deps="libebook-1.2 libedata-book-1.2" PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) build_gevo=yes @@ -917,88 +895,99 @@ AC_MSG_RESULT(yes) build_gevo=no ]) + if test "x$build_gevo" = "xno"; then + evo_deps="libebook-1.0 libedata-book-1.0" + PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ + AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) + build_gevo=yes + ], [ + AC_MSG_RESULT(yes) + build_gevo=no + ]) + fi + + AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) + AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) fi - AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) - AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) -fi + dnl ####################################################################### + dnl # Check for XScreenSaver + dnl ####################################################################### + if test "x$enable_xss" = "xyes" ; then + old_LIBS="$LIBS" + LIBS="$LIBS $GTK_LIBS $x_libpath_add" + XSS_LIBS="no" + XSS_HEADERS="no" + AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) + AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) + if test \! "$XSS_LIBS" = "no"; then + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $x_incpath_add" + AC_TRY_COMPILE([ + #include <X11/Xlib.h> + #include <X11/extensions/scrnsaver.h> + ],[],[ + AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])],[enable_xss=no] + ) + CPPFLAGS="$oldCPPFLAGS" + else + XSS_LIBS="" + enable_xss=no + fi + LIBS="$old_LIBS" + else + XSS_LIBS="" + enable_xss=no + fi + AC_SUBST(XSS_LIBS) -dnl ####################################################################### -dnl # Check for XScreenSaver -dnl ####################################################################### -if test "x$enable_xss" = "xyes" ; then - old_LIBS="$LIBS" - LIBS="$LIBS $GTK_LIBS $x_libpath_add" - XSS_LIBS="no" - XSS_HEADERS="no" - AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) - AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) - if test \! "$XSS_LIBS" = "no"; then - oldCPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_TRY_COMPILE([ -#include <X11/Xlib.h> -#include <X11/extensions/scrnsaver.h> - ],[],[ - AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])],[enable_xss=no] - ) - CPPFLAGS="$oldCPPFLAGS" + dnl ####################################################################### + dnl # Check for X session management libs + dnl ####################################################################### + if test "x$enable_sm" = "xyes"; then + enable_sm=no + AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) + if test "$found_sm_lib" = "true"; then + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $x_incpath_add" + AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) + CPPFLAGS="$oldCPPFLAGS" + fi else - XSS_LIBS="" - enable_xss=no + SM_LIBS="" + enable_sm=no fi - LIBS="$old_LIBS" -else - XSS_LIBS="" - enable_xss=no -fi -AC_SUBST(XSS_LIBS) + AC_SUBST(SM_LIBS) + if test "$enable_sm" = "yes"; then + AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) + fi - -dnl ####################################################################### -dnl # Check for X session management libs -dnl ####################################################################### -if test "x$enable_sm" = "xyes"; then - enable_sm=no - AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) - if test "$found_sm_lib" = "true"; then - oldCPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) - CPPFLAGS="$oldCPPFLAGS" + AC_DEFUN([GC_TM_GMTOFF], + [AC_REQUIRE([AC_STRUCT_TM])dnl + AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, + [AC_TRY_COMPILE([#include <sys/types.h> + #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], + 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, [tm_gmtoff is available.]) fi -else - SM_LIBS="" - enable_sm=no -fi -AC_SUBST(SM_LIBS) -if test "$enable_sm" = "yes"; then - AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) -fi + ]) -AC_DEFUN([GC_TM_GMTOFF], -[AC_REQUIRE([AC_STRUCT_TM])dnl -AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, -[AC_TRY_COMPILE([#include <sys/types.h> -#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], - 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, [tm_gmtoff is available.]) -fi -]) - -dnl Thanks, Evan. -if test "$enable_gtkspell" = yes ; then - PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, [], [ - AC_MSG_RESULT(no) - enable_gtkspell=no - ]) - if test "$enable_gtkspell" = "yes" ; then - AC_SUBST(GTKSPELL_CFLAGS) - AC_SUBST(GTKSPELL_LIBS) - AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?]) + dnl ####################################################################### + dnl # Check for GtkSpell + dnl ####################################################################### + AC_ARG_ENABLE(gtkspell, [AC_HELP_STRING([--disable-gtkspell], [compile without GtkSpell automatic spell checking])], , enable_gtkspell=yes) + if test "$enable_gtkspell" = yes ; then + PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, [], [ + AC_MSG_RESULT(no) + enable_gtkspell=no + ]) + if test "$enable_gtkspell" = "yes" ; then + AC_SUBST(GTKSPELL_CFLAGS) + AC_SUBST(GTKSPELL_LIBS) + AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?]) + fi fi -fi else # GTK enable_gevolution=no enable_sm=no @@ -1014,8 +1003,9 @@ GC_TM_GMTOFF dnl ####################################################################### -dnl # Contact Availability Prediction (CAP) +dnl # Check for libdbi (Contact Availability Prediction plugin) dnl ####################################################################### +AC_ARG_ENABLE(cap, [AC_HELP_STRING([--enable-cap], [compile with Contact Availability Prediction Plugin])], , enable_cap=no) if test "x$enable_cap" = "xyes"; then AC_CHECK_HEADERS(dbi/dbi.h, [], enable_cap=no) fi @@ -1028,7 +1018,7 @@ dnl ####################################################################### dnl # Check for Mono support dnl ####################################################################### - +AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no) if test x"$enable_mono" = x"yes" ; then AC_MSG_CHECKING(for Mono compile flags) MONO_CFLAGS=`pkg-config --cflags mono 2> /dev/null` @@ -1142,8 +1132,8 @@ fi AC_ARG_WITH(perl-lib, - [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]], [specify where to install the - Perl libraries for gaim. Default is site.])], + [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]], + [specify where to install the Perl libraries for gaim. Default is site.])], [ if test "x$withval" = xsite; then PERL_MM_PARAMS="" @@ -1579,21 +1569,23 @@ msg_ssl=$msg_gnutls fi -dnl Check for Tcl +dnl ####################################################################### +dnl # Check for Tcl +dnl ####################################################################### if test "$enable_plugins" = no; then enable_tcl=no fi if test "$enable_tcl" = yes; then AC_MSG_CHECKING([for tclConfig.sh]) - TCLCONFIG=no + TCLCONFIG=no TCLCONFIGDIRS="/usr/lib \ - /usr/lib64 \ - /usr/lib/tcl8.4 \ - /usr/lib/tcl8.3 \ - /usr/lib/tcl8.2 \ - /System/Library/Tcl/8.3 \ - /usr/local/lib" + /usr/lib64 \ + /usr/lib/tcl8.4 \ + /usr/lib/tcl8.3 \ + /usr/lib/tcl8.2 \ + /System/Library/Tcl/8.3 \ + /usr/local/lib" for dir in $with_tclconfig $TCLCONFIGDIRS; do if test -f $dir/tclConfig.sh; then TCLCONFIG=$dir/tclConfig.sh @@ -1618,9 +1610,9 @@ oldLIBS=$LIBS LIBS="$LIBS $TCL_LIB_SPEC" AC_TRY_LINK([#include <tcl.h>], - [Tcl_Interp *interp=NULL; Tcl_Init(interp)], - [AC_MSG_RESULT([yes]);enable_tcl=yes], - [AC_MSG_RESULT([no]);enable_tcl=no]) + [Tcl_Interp *interp=NULL; Tcl_Init(interp)], + [AC_MSG_RESULT([yes]);enable_tcl=yes], + [AC_MSG_RESULT([no]);enable_tcl=no]) CPPFLAGS="$oldCPPFLAGS" LIBS="$oldLIBS" fi @@ -1641,16 +1633,18 @@ AM_CONDITIONAL(USE_TCL, false) fi -dnl Check for Tk +dnl ####################################################################### +dnl # Check for Tk +dnl ####################################################################### if test "$enable_tcl" = yes -a "$enable_tk" = yes; then AC_MSG_CHECKING([for tkConfig.sh]) TKCONFIG=no TKCONFIGDIRS="/usr/lib \ - /usr/lib64 \ - /usr/lib/tk8.4 \ - /usr/lib/tk8.3 \ - /usr/lib/tk8.2 \ - /usr/local/lib" + /usr/lib64 \ + /usr/lib/tk8.4 \ + /usr/lib/tk8.3 \ + /usr/lib/tk8.2 \ + /usr/local/lib" for dir in $with_tkconfig $TKCONFIGDIRS; do if test -f $dir/tkConfig.sh; then TKCONFIG=$dir/tkConfig.sh @@ -1669,9 +1663,9 @@ oldLIBS=$LIBS LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" AC_TRY_LINK([#include <tk.h>], - [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);], - [AC_MSG_RESULT([yes]);enable_tk=yes], - [AC_MSG_RESULT([no]);enable_tk=no]) + [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" LIBS="$oldLIBS" fi @@ -1713,16 +1707,25 @@ enable_prpls=no fi -dnl checks for jabber +dnl ####################################################################### +dnl # Check for Cyrus-SASL (for Jabber) +dnl ####################################################################### dnl AC_CHECK_SIZEOF(short) AC_CHECK_FUNCS(snprintf connect) AC_SUBST(SASL_LIBS) AC_ARG_ENABLE(cyrus-sasl, AC_HELP_STRING([--enable-cyrus-sasl], [enable Cyrus SASL support for jabberd]), enable_cyrus_sasl=$enableval, enable_cyrus_sasl=no) -if test "x-$enable_cyrus_sasl" = "x-yes" ; then - AC_CHECK_LIB(sasl2, sasl_client_init, [AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present]) SASL_LIBS=-"lsasl2"], [AC_ERROR(Cyrus SASL library not found)]) +if test "x$enable_cyrus_sasl" = "xyes" ; then + AC_CHECK_LIB(sasl2, sasl_client_init, [ + AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present]) + SASL_LIBS=-"lsasl2" + ], [ + AC_ERROR(Cyrus SASL library not found) + ]) fi -dnl checks for zephyr +dnl ####################################################################### +dnl # Check for Kerberos (for Zephyr) +dnl ####################################################################### AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.]) AC_SUBST(KRB4_CFLAGS) AC_SUBST(KRB4_LDFLAGS) @@ -1758,13 +1761,15 @@ LDFLAGS="$orig_LDFLAGS" fi -dnl checks for an external libzephyr +dnl ####################################################################### +dnl # Check for external libzephyr +dnl ####################################################################### AC_SUBST(ZEPHYR_CFLAGS) AC_SUBST(ZEPHYR_LDFLAGS) AC_SUBST(ZEPHYR_LIBS) if test "$zephyr" != "no" ; then - if test "$zephyr" != "yes" ; then - ZEPHYR_CFLAGS="-I${zephyr}/include" + if test "$zephyr" != "yes" ; then + ZEPHYR_CFLAGS="-I${zephyr}/include" ZEPHYR_LDFLAGS="-L${zephyr}/lib" elif test -d /usr/athena/include/zephyr ; then ZEPHYR_CFLAGS="-I/usr/athena/include" @@ -1778,9 +1783,9 @@ orig_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS" AC_CHECK_LIB(zephyr, ZInitialize, - [ZEPHYR_LIBS="-lzephyr"], - [AC_ERROR(Zephyr libraries not found)], - -lzephyr) + [ZEPHYR_LIBS="-lzephyr"], + [AC_ERROR(Zephyr libraries not found)], + -lzephyr) orig_LIBS="$LIBS" LIBS="$orig_LIBS" LDFLAGS="$orig_LDFLAGS" @@ -1799,7 +1804,7 @@ AC_VAR_TIMEZONE_EXTERNALS dnl ####################################################################### -dnl # Doxygen Stuff +dnl # Check for Doxygen and dot (part of GraphViz) dnl ####################################################################### AC_ARG_ENABLE(doxygen, [AC_HELP_STRING([--enable-doxygen], [enable documentation with doxygen])],,enable_doxygen=yes) AC_ARG_ENABLE(dot, [AC_HELP_STRING([--enable-dot], [enable graphs in doxygen via 'dot'])],,enable_dot=yes) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 04:38:06
|
Revision: 17154 http://svn.sourceforge.net/gaim/?rev=17154&view=rev Author: thekingant Date: 2006-09-03 21:38:03 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Use AC_HELP_STRING in almost all places Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-04 04:11:51 UTC (rev 17153) +++ trunk/configure.ac 2006-09-04 04:38:03 UTC (rev 17154) @@ -173,7 +173,7 @@ ]) AC_SUBST(GSTREAMER_CFLAGS) AC_SUBST(GSTREAMER_LIBS) -AC_ARG_ENABLE(gstreamer,[ --disable-gstreamer compile without GStreamer audio support],enable_gst=no) +AC_ARG_ENABLE(gstreamer, [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], enable_gst=no) if test "x$enable_gst" = "xyes"; then AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for making sounds]) fi @@ -522,27 +522,27 @@ AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes) AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes) AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl], [compile without Tcl scripting])], , enable_tcl=yes) -AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tclConfig.sh]) -AC_ARG_ENABLE(tk, [ --disable-tk compile without Tcl support for Tk],,enable_tk=yes) -AC_ARG_WITH(tkconfig, [ --with-tkconfig=DIR directory containing tkConfig.sh]) -AC_ARG_ENABLE(gtkspell, [ --disable-gtkspell compile without GtkSpell automatic spell checking],,enable_gtkspell=yes) -AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no) +AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR], [directory containing tclConfig.sh])]) +AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], [compile without Tcl support for Tk])], , enable_tk=yes) +AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], [directory containing tkConfig.sh])]) +AC_ARG_ENABLE(gtkspell, [AC_HELP_STRING([--disable-gtkspell], [compile without GtkSpell automatic spell checking])], , enable_gtkspell=yes) +AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) AC_ARG_ENABLE(gtkgaim, [AC_HELP_STRING([--disable-gtkgaim], [compile without GtkGaim client])], enable_gtk=$enableval, enable_gtk=yes) AC_ARG_ENABLE(gntgaim, [AC_HELP_STRING([--disable-gntgaim], [compile without GntGaim console client])], enable_gnt=$enableval, enable_gnt=yes) -AC_ARG_ENABLE(fatal-asserts, [ --enable-fatal-asserts make assertions fatal (useful for debugging)],,enable_fatal_asserts=no) +AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) dnl We know Gaim won't compile with deprecated APIs disabled. dnl We have no desire to support two different versions of the dnl same code when it's not necessary, so we're sticking with dnl the deprecated APIs in many cases. dnl This option is being left in case things change. -dnl AC_ARG_ENABLE(deprecated, [ --disable-deprecated compile without deprecated API usage],,enable_deprecated=yes) -AC_ARG_ENABLE(fortify, [ --disable-fortify compile without FORTIFY_SOURCE support],,enable_fortify=yes) -AC_ARG_ENABLE(screensaver, [ --disable-screensaver compile without X screensaver extension],,enable_xss=yes) -AC_ARG_ENABLE(sm, [ --disable-sm compile without X session management support],,enable_sm=yes) -AC_ARG_WITH(krb4, [ --with-krb4=PREFIX compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no") -AC_ARG_WITH(zephyr, [ --with-zephyr=PREFIX compile Zephyr plugin against external libzephyr],zephyr="$withval",zephyr="no") +dnl AC_ARG_ENABLE(deprecated, [AC_HELP_STRING([--disable-deprecated], [compile without deprecated API usage])], , enable_deprecated=yes) +AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes) +AC_ARG_ENABLE(screensaver, [AC_HELP_STRING([--disable-screensaver], [compile without X screensaver extension])], , enable_xss=yes) +AC_ARG_ENABLE(sm, [AC_HELP_STRING([--disable-sm], [compile without X session management support])], , enable_sm=yes) +AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no") +AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no") AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") AC_CHECK_HEADER(sys/utsname.h) @@ -688,7 +688,7 @@ dnl # Check for DBUS libraries dnl ####################################################################### -AC_ARG_ENABLE(dbus, [ --enable-dbus enable DBUS support],,enable_dbus=yes) +AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--enable-dbus], [enable DBUS support])], , enable_dbus=yes) if test "x$enable_dbus" = "xyes" ; then AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no) @@ -758,7 +758,7 @@ dnl # although a newer dbus is installed. But I have tried to order the dnl # directory searching to keep this situation at a minimum. dnl ########################################################################### -AC_ARG_WITH(dbus-services, [ --with-dbus-services=<dir> where the D-Bus services directory is located.]) +AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])]) DBUS_SERVICES_DIR="" @@ -897,7 +897,7 @@ dnl # Check for stuff needed by the evolution integration plugin. dnl ####################################################################### build_gevo=no -AC_ARG_ENABLE(gevolution, [ --disable-gevolution compile without the Gaim-Evolution plugin],,enable_gevolution=yes) +AC_ARG_ENABLE(gevolution, [AC_HELP_STRING([--disable-gevolution], [compile without the Gaim-Evolution plugin])], , enable_gevolution=yes) if test "x$enable_gevolution" = "xyes"; then evo_deps="libebook-1.2 libedata-book-1.2" @@ -1142,8 +1142,8 @@ fi AC_ARG_WITH(perl-lib, - [ --with-perl-lib=[site|vendor|DIR] specify where to install the - Perl libraries for gaim. Default is site.], + [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]], [specify where to install the + Perl libraries for gaim. Default is site.])], [ if test "x$withval" = xsite; then PERL_MM_PARAMS="" @@ -1257,7 +1257,7 @@ fi AC_ARG_WITH(gnutls-libs, - [ --with-gnutls-libs=PREFIX location of GnuTLS libraries.], + [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])], [ with_gnutls_libs="$withval" ]) if test "x$with_gnutls_libs" != "xno" -a \ @@ -1309,19 +1309,19 @@ if test "x$enable_nss" != "xno"; then AC_ARG_WITH(nspr-includes, - [ --with-nspr-includes=PREFIX specify location of Mozilla nspr4 includes.], + [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])], [with_nspr_includes="$withval"]) AC_ARG_WITH(nspr-libs, - [ --with-nspr-libs=PREFIX specify location of Mozilla nspr4 libs.], + [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])], [with_nspr_libs="$withval"]) AC_ARG_WITH(nss-includes, - [ --with-nss-includes=PREFIX specify location of Mozilla nss3 includes.], + [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])], [with_nss_includes="$withval"]) AC_ARG_WITH(nss-libs, - [ --with-nss-libs=PREFIX specify location of Mozilla nss3 libs.], + [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])], [with_nss_libs="$withval"]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <amc...@us...> - 2006-09-04 04:11:54
|
Revision: 17153 http://svn.sourceforge.net/gaim/?rev=17153&view=rev Author: amc_grim Date: 2006-09-03 21:11:51 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Let's not even bother creating and assigning variables until we need them and when we're sure we won't crash when already trying to get them. Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-09-04 04:08:07 UTC (rev 17152) +++ trunk/gtk/gtkblist.c 2006-09-04 04:11:51 UTC (rev 17153) @@ -4366,13 +4366,6 @@ int count; gboolean show = FALSE; GaimBlistNode* gnode; - GdkColor bgcolor; - GdkColor textcolor; - - if (gtkblist) { - bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; - textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; - } g_return_if_fail(node != NULL); @@ -4403,12 +4396,17 @@ GtkTreeIter iter; GtkTreePath *path; gboolean expanded; - + GdkColor bgcolor; + GdkColor textcolor; + if(!insert_node(list, gnode, &iter)) return; - path = gtk_tree_model_get_path(gtkblist->treemodel, &iter); - expanded = gtk_tree_view_row_expanded(gtkblist->treeview, path); + bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; + textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; + + path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter); + expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path); gtk_tree_path_free(path); esc = g_markup_escape_text(group->name, -1); @@ -4518,13 +4516,6 @@ GaimContact *contact; GaimBuddy *buddy; struct _gaim_gtk_blist_node *gtknode; - GdkColor bgcolor; - GdkColor textcolor; - - if (gtkblist) { - bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; - textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; - } if (GAIM_BLIST_NODE_IS_BUDDY(node)) cnode = node->parent; @@ -4555,6 +4546,11 @@ GdkPixbuf *status; char *mark; char *white; + GdkColor bgcolor; + GdkColor textcolor; + + bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; + textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; status = gaim_gtk_blist_get_status_icon(cnode, (gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons") ? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2006-09-04 04:08:14
|
Revision: 17152 http://svn.sourceforge.net/gaim/?rev=17152&view=rev Author: deryni9 Date: 2006-09-03 21:08:07 -0700 (Sun, 03 Sep 2006) Log Message: ----------- I'm not sure how I put these in the wrong place to being with, but this is where they belong. Modified Paths: -------------- trunk/gtk/plugins/perl/common/GtkPluginPref.xs trunk/gtk/plugins/perl/common/GtkPrefs.xs Modified: trunk/gtk/plugins/perl/common/GtkPluginPref.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkPluginPref.xs 2006-09-04 03:58:23 UTC (rev 17151) +++ trunk/gtk/plugins/perl/common/GtkPluginPref.xs 2006-09-04 04:08:07 UTC (rev 17152) @@ -6,64 +6,7 @@ Gtk::Widget gaim_gtk_plugin_pref_create_frame(frame) Gaim::PluginPref::Frame frame - -Gtk::Widget -gaim_gtk_prefs_checkbox(title, key, page) - const char * title - const char * key - Gtk::Widget page - -Gtk::Widget -gaim_gtk_prefs_labeled_spin_button(page, title, key, min, max, sg) - Gtk::Widget page - const gchar * title - const char * key - int min - int max - Gtk::Size::Group sg - -Gtk::Widget -gaim_gtk_prefs_labeled_entry(page, title, key, sg) - Gtk::Widget page - const gchar * title - const char * key - Gtk::Size::Group sg */ -/* TODO I don't know how to handle this in XS -Gtk::Widget -gaim_gtk_prefs_dropdown(page, title, type, key, ...) - Gtk::Widget page - const gchar * title - Gaim::Pref::Type type - const char * key - -*/ - -/* This can't work at the moment since I don't have a typemap for Gtk::Widget. - * I thought about using the one from libgtk2-perl but wasn't sure how to go - * about doing that. -Gtk::Widget -gaim_gtk_prefs_dropdown_from_list(page, title, type, key, menuitems) - Gtk::Widget page - const gchar * title - Gaim::Pref::Type type - const char * key - SV *menuitems -PREINIT: - GList *t_GL; - int i, t_len; -CODE: - t_GL = NULL; - t_len = av_len((AV *)SvRV(menuitems)); - - for ( i = 0; i < t_len; i++) { - STRLEN t_sl; - t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(menuitems), i, 0), t_sl)); - RETVAL = gaim_gtk_prefs_dropdown_from_list(page, title, type, key, t_GL); -OUTPUT: - RETVAL -*/ - MODULE = Gaim::Gtk::PluginPref PACKAGE = Gaim::Gtk::PluginPref PREFIX = gaim_gtk_plugin_pref_ PROTOTYPES: ENABLE Modified: trunk/gtk/plugins/perl/common/GtkPrefs.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkPrefs.xs 2006-09-04 03:58:23 UTC (rev 17151) +++ trunk/gtk/plugins/perl/common/GtkPrefs.xs 2006-09-04 04:08:07 UTC (rev 17152) @@ -1,8 +1,74 @@ #include "gtkmodule.h" +/* This can't work at the moment since I don't have a typemap for Gtk::Widget. + * I thought about using the one from libgtk2-perl but wasn't sure how to go + * about doing that. +Gtk::Widget +gaim_gtk_prefs_checkbox(title, key, page) + const char * title + const char * key + Gtk::Widget page + +Gtk::Widget +gaim_gtk_prefs_labeled_spin_button(page, title, key, min, max, sg) + Gtk::Widget page + const gchar * title + const char * key + int min + int max + Gtk::Size::Group sg + +Gtk::Widget +gaim_gtk_prefs_labeled_entry(page, title, key, sg) + Gtk::Widget page + const gchar * title + const char * key + Gtk::Size::Group sg + +TODO Test this carefully, I'm not at all confident in the loop. +Gtk::Widget +gaim_gtk_prefs_dropdown(page, title, type, key, ...) + Gtk::Widget page + const gchar * title + Gaim::Pref::Type type + const char * key +PREINIT: + GList *t_GL; + int i; +CODE: + t_GL = NULL; + for (i = 0; i < items; i++) { + if (type == GAIM_PREF_INT || type == GAIM_PREF_BOOLEAN) { + t_GL = g_list_append(t_GL, SvIV(ST(i+1))); + else { + t_GL = g_list_append(t_GL, SvPV(ST(i+1))); + } + } + +Gtk::Widget +gaim_gtk_prefs_dropdown_from_list(page, title, type, key, menuitems) + Gtk::Widget page + const gchar * title + Gaim::Pref::Type type + const char * key + SV *menuitems +PREINIT: + GList *t_GL; + int i, t_len; +CODE: + t_GL = NULL; + t_len = av_len((AV *)SvRV(menuitems)); + + for ( i = 0; i < t_len; i++) { + STRLEN t_sl; + t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(menuitems), i, 0), t_sl)); + RETVAL = gaim_gtk_prefs_dropdown_from_list(page, title, type, key, t_GL); +OUTPUT: + RETVAL +*/ + MODULE = Gaim::Gtk::Prefs PACKAGE = Gaim::Gtk::Prefs PREFIX = gaim_gtk_prefs_ PROTOTYPES: ENABLE void gaim_gtk_prefs_show() - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <amc...@us...> - 2006-09-04 03:58:30
|
Revision: 17151 http://svn.sourceforge.net/gaim/?rev=17151&view=rev Author: amc_grim Date: 2006-09-03 20:58:23 -0700 (Sun, 03 Sep 2006) Log Message: ----------- A patch from John Bailey to get gntgaim compiling for him, although we're both running debian and it worked fine here... Well whatever, doesn't hurt my build ;) Modified Paths: -------------- trunk/console/libgnt/wms/Makefile.am trunk/console/plugins/Makefile.am Modified: trunk/console/libgnt/wms/Makefile.am =================================================================== --- trunk/console/libgnt/wms/Makefile.am 2006-09-04 03:55:12 UTC (rev 17150) +++ trunk/console/libgnt/wms/Makefile.am 2006-09-04 03:58:23 UTC (rev 17151) @@ -17,5 +17,6 @@ -I$(top_srcdir)/console/libgnt \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ + $(GNT_CFLAGS) \ $(PLUGIN_CFLAGS) Modified: trunk/console/plugins/Makefile.am =================================================================== --- trunk/console/plugins/Makefile.am 2006-09-04 03:55:12 UTC (rev 17150) +++ trunk/console/plugins/Makefile.am 2006-09-04 03:58:23 UTC (rev 17151) @@ -25,6 +25,7 @@ -I$(top_srcdir)/console/libgnt \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ + $(GNT_CFLAGS) \ $(PLUGIN_CFLAGS) # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-04 03:55:16
|
Revision: 17150 http://svn.sourceforge.net/gaim/?rev=17150&view=rev Author: thekingant Date: 2006-09-03 20:55:12 -0700 (Sun, 03 Sep 2006) Log Message: ----------- libxml2 is now required for XML parsing Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac trunk/gtk/gtkdialogs.c trunk/libgaim/protocols/jabber/jabber.c trunk/libgaim/protocols/jabber/jabber.h trunk/libgaim/protocols/jabber/parser.c trunk/libgaim/xmlnode.c trunk/libgaim/xmlnode.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/ChangeLog 2006-09-04 03:55:12 UTC (rev 17150) @@ -9,8 +9,8 @@ (Sadrul Habib Chowdhury, Google Summer of Code) * Reorganized the source tree to split apart the code for the UI changes and libgaim targets - * libxml2 can now be used in place of gmarkup for expanded XML parsing - features + * libxml2 is now required. We switched from gmarkup to libxml2 for + more correct XML parsing. Status System: * The code dealing with buddy and account status, away messages, Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/configure.ac 2006-09-04 03:55:12 UTC (rev 17150) @@ -183,17 +183,16 @@ dnl ################# enable_libxml2=yes PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , - [ - AC_MSG_RESULT(no) - enable_libxml2=no - ]) + [ + AC_MSG_ERROR([ +*** libxml2 is required to build Gaim; please make sure you have the +*** libxml2 development headers installed.]) + ]) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) -AC_ARG_ENABLE(libxml, [AC_HELP_STRING([--disable-libxml], [compile without libxml2 support])],enable_libxml2=no) -if test "x$enable_libxml2" = "xyes"; then - AC_DEFINE(HAVE_LIBXML, 1, [Use libxml2 for xml parsing]) -fi + + dnl ####################################################################### dnl # Check for Meanwhile headers (for Sametime) dnl ####################################################################### @@ -1933,7 +1932,6 @@ eval eval echo DBUS servies directory........ : $DBUS_SERVICES_DIR fi echo Build with Cyrus SASL support. : $enable_cyrus_sasl -echo Build with libxml2 support.... : $enable_libxml2 echo Has you....................... : yes echo echo Use kerberos 4 with zephyr.... : $kerberos Modified: trunk/gtk/gtkdialogs.c =================================================================== --- trunk/gtk/gtkdialogs.c 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/gtk/gtkdialogs.c 2006-09-04 03:55:12 UTC (rev 17150) @@ -558,12 +558,6 @@ g_string_append(str, " <b>Tk:</b> Disabled<br/>"); #endif -#ifdef HAVE_LIBXML - g_string_append(str, " <b>XML Parser:</b> libxml2<br/>"); -#else - g_string_append(str, " <b>XML Parser:</b> GMarkup<br/>"); -#endif - #ifndef _WIN32 #ifdef USE_SM g_string_append(str, " <b>X Session Management:</b> Enabled<br/>"); Modified: trunk/libgaim/protocols/jabber/jabber.c =================================================================== --- trunk/libgaim/protocols/jabber/jabber.c 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/libgaim/protocols/jabber/jabber.c 2006-09-04 03:55:12 UTC (rev 17150) @@ -945,10 +945,6 @@ gaim_input_remove(js->gc->inpa); close(js->fd); } -#ifndef HAVE_LIBXML - if(js->context) - g_markup_parse_context_free(js->context); -#endif if(js->iq_callbacks) g_hash_table_destroy(js->iq_callbacks); if(js->disco_callbacks) Modified: trunk/libgaim/protocols/jabber/jabber.h =================================================================== --- trunk/libgaim/protocols/jabber/jabber.h 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/libgaim/protocols/jabber/jabber.h 2006-09-04 03:55:12 UTC (rev 17150) @@ -22,9 +22,7 @@ #ifndef _GAIM_JABBER_H_ #define _GAIM_JABBER_H_ -#ifdef HAVE_LIBXML #include <libxml/parser.h> -#endif #include <glib.h> #include "circbuffer.h" #include "connection.h" @@ -71,11 +69,7 @@ GaimSrvQueryData *srv_query_data; GaimProxyConnectData *connect_data; -#ifdef HAVE_LIBXML xmlParserCtxt *context; -#else - GMarkupParseContext *context; -#endif xmlnode *current; enum { Modified: trunk/libgaim/protocols/jabber/parser.c =================================================================== --- trunk/libgaim/protocols/jabber/parser.c 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/libgaim/protocols/jabber/parser.c 2006-09-04 03:55:12 UTC (rev 17150) @@ -20,9 +20,7 @@ */ #include "internal.h" -#ifdef HAVE_LIBXML #include <libxml/parser.h> -#endif #include "connection.h" #include "debug.h" @@ -30,88 +28,7 @@ #include "parser.h" #include "xmlnode.h" -#ifndef HAVE_LIBXML static void -jabber_parser_element_start(GMarkupParseContext *context, - const char *element_name, const char **attrib_names, - const char **attrib_values, gpointer user_data, GError **error) -{ - JabberStream *js = user_data; - xmlnode *node; - int i; - - if(!element_name) { - return; - } else if(!strcmp(element_name, "stream:stream")) { - js->protocol_version = JABBER_PROTO_0_9; - for(i=0; attrib_names[i]; i++) { - if(!strcmp(attrib_names[i], "version") - && !strcmp(attrib_values[i], "1.0")) { - js->protocol_version = JABBER_PROTO_1_0; - } else if(!strcmp(attrib_names[i], "id")) { - if(js->stream_id) - g_free(js->stream_id); - js->stream_id = g_strdup(attrib_values[i]); - } - } - if(js->protocol_version == JABBER_PROTO_0_9) - js->auth_type = JABBER_AUTH_IQ_AUTH; - - if(js->state == JABBER_STREAM_INITIALIZING) - jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING); - } else { - - if(js->current) - node = xmlnode_new_child(js->current, element_name); - else - node = xmlnode_new(element_name); - - for(i=0; attrib_names[i]; i++) { - xmlnode_set_attrib(node, attrib_names[i], attrib_values[i]); - } - - js->current = node; - } -} - -static void -jabber_parser_element_end(GMarkupParseContext *context, - const char *element_name, gpointer user_data, GError **error) -{ - JabberStream *js = user_data; - - if(!js->current) - return; - - if(js->current->parent) { - if(!strcmp(js->current->name, element_name)) - js->current = js->current->parent; - } else { - xmlnode *packet = js->current; - js->current = NULL; - jabber_process_packet(js, packet); - xmlnode_free(packet); - } -} - -static void -jabber_parser_element_text(GMarkupParseContext *context, const char *text, - gsize text_len, gpointer user_data, GError **error) -{ - JabberStream *js = user_data; - - if(!js->current) - return; - - if(!text || !text_len) - return; - - xmlnode_insert_data(js->current, text, text_len); -} - -#else /* HAVE_LIBXML */ - -static void jabber_parser_element_start_libxml(void *user_data, const xmlChar *element_name, const xmlChar *prefix, const xmlChar *namespace, int nb_namespaces, const xmlChar **namespaces, @@ -130,7 +47,7 @@ char *attrib = g_malloc(attrib_len + 1); memcpy(attrib, attributes[i+3], attrib_len); attrib[attrib_len] = '\0'; - + if(!strcmp(attributes[i], "version") && !strcmp(attrib, "1.0")) { js->protocol_version = JABBER_PROTO_1_0; @@ -168,7 +85,7 @@ } static void -jabber_parser_element_end_libxml(void *user_data, const xmlChar *element_name, +jabber_parser_element_end_libxml(void *user_data, const xmlChar *element_name, const xmlChar *prefix, const xmlChar *namespace) { JabberStream *js = user_data; @@ -200,10 +117,7 @@ xmlnode_insert_data(js->current, text, text_len); } -#endif /* HAVE_LIBXML */ - -#ifdef HAVE_LIBXML static xmlSAXHandler jabber_parser_libxml = { .internalSubset = NULL, .isStandalone = NULL, @@ -238,20 +152,10 @@ .endElementNs = jabber_parser_element_end_libxml, .serror = NULL }; -#else -static GMarkupParser jabber_parser = { - jabber_parser_element_start, - jabber_parser_element_end, - jabber_parser_element_text, - NULL, - NULL -}; -#endif void jabber_parser_setup(JabberStream *js) { -#ifdef HAVE_LIBXML /* This seems backwards, but it makes sense. The libxml code creates the parser * context when you try to use it (this way, it can figure out the encoding at * creation time. So, setting up the parser is just a matter of destroying any @@ -261,24 +165,11 @@ xmlFreeParserCtxt(js->context); js->context = NULL; } -#else - if(!js->context) - js->context = g_markup_parse_context_new(&jabber_parser, 0, js, NULL); -#endif } void jabber_parser_process(JabberStream *js, const char *buf, int len) { - -#ifndef HAVE_LIBXML - /* May need to check for other encodings and do the conversion here */ - if(!g_markup_parse_context_parse(js->context, buf, len, NULL)) { - g_markup_parse_context_free(js->context); - js->context = NULL; - gaim_connection_error(js->gc, _("XML Parse error")); - } -#else if (js->context == NULL) { /* libxml inconsistently starts parsing on creating the parser, so so a ParseChunk * right afterwards to force it. */ @@ -286,6 +177,5 @@ } else if (xmlParseChunk(js->context, buf, len, 0) < 0) { gaim_connection_error(js->gc, _("XML Parse error")); } -#endif } Modified: trunk/libgaim/xmlnode.c =================================================================== --- trunk/libgaim/xmlnode.c 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/libgaim/xmlnode.c 2006-09-04 03:55:12 UTC (rev 17150) @@ -29,9 +29,7 @@ #include "internal.h" -#ifdef HAVE_LIBXML #include <libxml/parser.h> -#endif #include <string.h> #include <glib.h> @@ -181,25 +179,17 @@ void xmlnode_set_namespace(xmlnode *node, const char *xmlns) { -#ifdef HAVE_LIBXML g_return_if_fail(node != NULL); g_free(node->namespace); node->namespace = g_strdup(xmlns); -#else - xmlnode_set_attrib(node, "xmlns", xmlns); -#endif } const char *xmlnode_get_namespace(xmlnode *node) { -#ifdef HAVE_LIBXML g_return_val_if_fail(node != NULL, NULL); return node->namespace; -#else - return xmlnode_get_attrib(node, "xmlns"); -#endif } void @@ -218,9 +208,7 @@ g_free(node->name); g_free(node->data); -#ifdef HAVE_LIBXML g_free(node->namespace); -#endif GAIM_DBUS_UNREGISTER_POINTER(node); g_free(node); @@ -305,13 +293,11 @@ node_name = g_markup_escape_text(node->name, -1); g_string_append_printf(text, "<%s", node_name); -#ifdef HAVE_LIBXML if (node->namespace) { char *namespace = g_markup_escape_text(node->namespace, -1); g_string_append_printf(text, " xmlns='%s'", namespace); g_free(namespace); } -#endif for(c = node->child; c; c = c->next) { if(c->type == XMLNODE_TYPE_ATTRIB) { @@ -386,7 +372,6 @@ xmlnode *current; }; -#ifdef HAVE_LIBXML static void xmlnode_parser_element_start_libxml(void *user_data, const xmlChar *element_name, const xmlChar *prefix, const xmlChar *namespace, @@ -408,18 +393,14 @@ xmlnode_set_namespace(node, namespace); for(i=0; i < nb_attributes * 5; i+=5) { -#ifdef HAVE_LIBXML char *txt; -#endif int attrib_len = attributes[i+4] - attributes[i+3]; char *attrib = g_malloc(attrib_len + 1); memcpy(attrib, attributes[i+3], attrib_len); attrib[attrib_len] = '\0'; -#ifdef HAVE_LIBXML txt = attrib; attrib = gaim_unescape_html(txt); g_free(txt); -#endif xmlnode_set_attrib(node, attributes[i], attrib); g_free(attrib); } @@ -457,64 +438,6 @@ xmlnode_insert_data(xpd->current, text, text_len); } -#else - -static void -xmlnode_parser_element_start(GMarkupParseContext *context, - const char *element_name, const char **attrib_names, - const char **attrib_values, gpointer user_data, GError **error) -{ - struct _xmlnode_parser_data *xpd = user_data; - xmlnode *node; - int i; - - if(!element_name) { - return; - } else { - if(xpd->current) - node = xmlnode_new_child(xpd->current, element_name); - else - node = xmlnode_new(element_name); - - for(i=0; attrib_names[i]; i++) - xmlnode_set_attrib(node, attrib_names[i], attrib_values[i]); - - xpd->current = node; - } -} - -static void -xmlnode_parser_element_end(GMarkupParseContext *context, - const char *element_name, gpointer user_data, GError **error) -{ - struct _xmlnode_parser_data *xpd = user_data; - - if(!element_name || !xpd->current) - return; - - if(xpd->current->parent) { - if(!strcmp(xpd->current->name, element_name)) - xpd->current = xpd->current->parent; - } -} - -static void -xmlnode_parser_element_text(GMarkupParseContext *context, const char *text, - gsize text_len, gpointer user_data, GError **error) -{ - struct _xmlnode_parser_data *xpd = user_data; - - if(!xpd->current) - return; - - if(!text || !text_len) - return; - - xmlnode_insert_data(xpd->current, text, text_len); -} -#endif - -#ifdef HAVE_LIBXML static xmlSAXHandler xmlnode_parser_libxml = { .internalSubset = NULL, .isStandalone = NULL, @@ -549,24 +472,12 @@ .endElementNs = xmlnode_parser_element_end_libxml, .serror = NULL }; -#else -static GMarkupParser xmlnode_parser = { - xmlnode_parser_element_start, - xmlnode_parser_element_end, - xmlnode_parser_element_text, - NULL, - NULL -}; -#endif xmlnode * xmlnode_from_str(const char *str, gssize size) { struct _xmlnode_parser_data *xpd; xmlnode *ret; -#ifndef HAVE_LIBXML - GMarkupParseContext *context; -#endif gsize real_size; g_return_val_if_fail(str != NULL, NULL); @@ -574,7 +485,6 @@ real_size = size < 0 ? strlen(str) : size; xpd = g_new0(struct _xmlnode_parser_data, 1); -#ifdef HAVE_LIBXML if (xmlSAXUserParseMemory(&xmlnode_parser_libxml, xpd, str, real_size) < 0) { while(xpd->current && xpd->current->parent) xpd->current = xpd->current->parent; @@ -582,18 +492,6 @@ xmlnode_free(xpd->current); xpd->current = NULL; } -#else - context = g_markup_parse_context_new(&xmlnode_parser, 0, xpd, NULL); - - if(!g_markup_parse_context_parse(context, str, real_size, NULL)) { - while(xpd->current && xpd->current->parent) - xpd->current = xpd->current->parent; - if(xpd->current) - xmlnode_free(xpd->current); - xpd->current = NULL; - } - g_markup_parse_context_free(context); -#endif ret = xpd->current; g_free(xpd); return ret; Modified: trunk/libgaim/xmlnode.h =================================================================== --- trunk/libgaim/xmlnode.h 2006-09-04 03:23:41 UTC (rev 17149) +++ trunk/libgaim/xmlnode.h 2006-09-04 03:55:12 UTC (rev 17150) @@ -42,9 +42,7 @@ struct _xmlnode { char *name; /**< The name of the node. */ -#ifdef HAVE_LIBXML char *namespace; /**< The namespace of the node */ -#endif XMLNodeType type; /**< The type of the node. */ char *data; /**< The data for the node. */ size_t data_sz; /**< The size of the data. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <amc...@us...> - 2006-09-04 03:23:45
|
Revision: 17149 http://svn.sourceforge.net/gaim/?rev=17149&view=rev Author: amc_grim Date: 2006-09-03 20:23:41 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Never EVER use -L and -l for a library in your own build. Modified Paths: -------------- trunk/console/Makefile.am trunk/gtk/Makefile.am Modified: trunk/console/Makefile.am =================================================================== --- trunk/console/Makefile.am 2006-09-04 01:06:28 UTC (rev 17148) +++ trunk/console/Makefile.am 2006-09-04 03:23:41 UTC (rev 17149) @@ -45,8 +45,8 @@ $(GLIB_LIBS) \ $(LIBXML_LIBS) \ $(GNT_LIBS) \ - -L./libgnt/ -lgnt \ - -L$(top_builddir)/libgaim -lgaim + ./libgnt/libgnt.la \ + $(top_builddir)/libgaim/libgaim.la AM_CPPFLAGS = \ -DSTANDALONE \ Modified: trunk/gtk/Makefile.am =================================================================== --- trunk/gtk/Makefile.am 2006-09-04 01:06:28 UTC (rev 17148) +++ trunk/gtk/Makefile.am 2006-09-04 03:23:41 UTC (rev 17149) @@ -166,7 +166,7 @@ $(LIBXML_LIBS) \ $(GTK_LIBS) \ $(CAP_LIBS) \ - -L$(top_builddir)/libgaim -lgaim + $(top_builddir)/libgaim/libgaim.la AM_CPPFLAGS = \ -DBR_PTHREADS=0 \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-09-04 01:06:34
|
Revision: 17148 http://svn.sourceforge.net/gaim/?rev=17148&view=rev Author: rlaager Date: 2006-09-03 18:06:28 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Patch from SimGuy to update the ChangeLog. I changed the line about libxml2 to reflect that it's currently optional. Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-09-03 23:30:06 UTC (rev 17147) +++ trunk/ChangeLog 2006-09-04 01:06:28 UTC (rev 17148) @@ -1,6 +1,17 @@ Gaim: The Pimpin' Penguin IM Client that's good for the soul! version 2.0.0: + Build Changes: + * With the Core/UI split completed, it is now possible to build Gaim + without any UIs, creating a libgaim library upon which other UIs + may be constructed + * A new ncurses-based console UI called gntgaim is now available + (Sadrul Habib Chowdhury, Google Summer of Code) + * Reorganized the source tree to split apart the code for the UI + changes and libgaim targets + * libxml2 can now be used in place of gmarkup for expanded XML parsing + features + Status System: * The code dealing with buddy and account status, away messages, away states, online/offline, etc has been completely rewritten. @@ -12,6 +23,8 @@ becomes idle, load the "Buddy State Notification" plugin Buddy List: + * Performance when manipulating and displaying the buddy list has + been significantly improved (Aaron Sheldon, Google Summer of Code) * Buddy icons are now shown in tooltips (Felipe Contreras) * Tooltips now contain additional information about a "Person" that contains multiple online buddies @@ -20,6 +33,11 @@ * If Gaim is exited with the buddy list hidden in the docklet, it will remain hidden when Gaim is started again (Scott Shedden) * Improved buddy list searching with CTRL+F + * Ability to set a buddy icon for all of your accounts at once via + the buddy list (You can still set per-account icons via the + account editor) + * The space wasted by the group expanders has been eliminated and + the expander setting in .gtkrc-2.0 is no longer needed Conversations and Chats: * Timestamps honor the locale. To use the traditional style, @@ -53,6 +71,8 @@ (There are known issues with pasting formatted text. Either use "Paste as Plain Text", hit Ctrl-R after pasting, or use the Clear Formatting button on the toolbar.) + * Performance while joining large chat rooms has been significantly + improved (Aaron Sheldon, Google Summer of Code) Sounds: * Beautiful new default sounds (Brad Turcotte) @@ -100,6 +120,8 @@ * 'Highlight when nick said' option added to Message Notification plugin. * The system tray icon is now transparent (Dan Winship) + * New Log Reader plugin that can read and display logs from Adium, + MSN Messenger, and Trillian in the log viewer MSN Features: * Custom smiley receiving support (Irving Cordova & Francesco Fracassi) @@ -153,7 +175,8 @@ * SIP/SIMPLE support (Thomas Butter, Google Summer of Code) * Sametime protocol support Requires the meanwhile library: http://meanwhile.sourceforge.net - * Removed support for the napster and toc protocols + * QQ protocol support (Mark Huetsch, Google Summer of Code) + * Removed support for the Napster and TOC protocols Other Noteworthy Changes: * UPnP and NAT traversal support (Adam J. Warrington, Google Summer of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |