Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
| 11147 | 1 | dnl ########################################################################### |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
2 | dnl # Configure paths for libpurple |
| 11147 | 3 | dnl # Gary Kramlich 2005 |
| 4 | dnl # | |
| 5 | dnl # Based off of glib-2.0.m4 by Owen Taylor | |
| 6 | dnl ########################################################################### | |
| 7 | ||
| 8 | dnl ########################################################################### | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
9 | dnl # AM_PATH_PURPLE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
| 11147 | 10 | dnl # |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
11 | dnl # Test for purple and define PURPLE_CFLAGS, PURPLE_LIBS, PURPLE_DATADIR, and |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
12 | dnl # PURPLE_LIBDIR |
| 11147 | 13 | dnl ########################################################################### |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
14 | AC_DEFUN([AM_PATH_PURPLE], |
| 11147 | 15 | [dnl |
| 16 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | |
| 17 | ||
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
18 | no_purple="" |
| 11147 | 19 | |
| 20 | if test x"$PKG_CONFIG" != x"no" ; then | |
| 21 | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then | |
| 22 | : | |
| 23 | else | |
| 24 | echo "*** pkg-config is too old; version 0.7 or newer is required." | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
25 | no_purple="yes" |
| 11147 | 26 | PKG_CONFIG="no" |
| 27 | fi | |
| 28 | else | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
29 | no_purple="yes" |
| 11147 | 30 | fi |
| 31 | ||
| 32 | min_version=ifelse([$1], ,2.0.0,$1) | |
| 33 | found_version="" | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
34 | |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
35 | AC_MSG_CHECKING(for purple - version >= $min_version) |
| 11147 | 36 | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
37 | if test x"$no_purple" = x"" ; then |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
38 | PURPLE_DATADIR=`$PKG_CONFIG --variable=datadir purple` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
39 | PURPLE_LIBDIR=`$PKG_CONFIG --variable=libdir purple` |
| 11147 | 40 | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
41 | PURPLE_CFLAGS=`$PKG_CONFIG --cflags purple` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
42 | PURPLE_LIBS=`$PKG_CONFIG --libs purple` |
| 11147 | 43 | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
44 | purple_version=`$PKG_CONFIG --modversion purple` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
45 | purple_major_version=`echo $purple_version | cut -d. -f 1` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
46 | purple_minor_version=`echo $purple_version | cut -d. -f 2` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
47 | |
| 11147 | 48 | dnl # stash the micro version in a temp variable. Then stash |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
49 | dnl # the numeric for it in purple_micro_version and anything |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
50 | dnl # else in purple_extra_version. |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
51 | purple_micro_version_temp=`echo $purple_version | cut -d. -f 3` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
52 | purple_micro_version=`echo $purple_micro_version_temp | sed 's/[[^0-9]]//g'` |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
53 | purple_extra_version=`echo $purple_micro_version_temp | sed 's/[[0-9]]//g'` |
| 11147 | 54 | |
| 55 | dnl # get the major, minor, and macro that the user gave us | |
| 56 | min_major_version=`echo $min_version | cut -d. -f 1` | |
| 57 | min_minor_version=`echo $min_version | cut -d. -f 2` | |
| 58 | min_micro_version=`echo $min_version | cut -d. -f 3` | |
| 59 | ||
| 60 | dnl # check the users version against the version from pkg-config | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
61 | if test $purple_major_version -eq $min_major_version -a \ |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
62 | $purple_minor_version -ge $min_minor_version -a \ |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
63 | $purple_micro_version -ge $min_micro_version |
| 11147 | 64 | then |
| 65 | : | |
| 66 | else | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
67 | no_purple="yes" |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
68 | found_version="$purple_major_version.$purple_minor_version.$purple_micro_version$purple_extra_version" |
| 11147 | 69 | fi |
| 70 | ||
| 71 | dnl # Do we want a compile test here? | |
| 72 | fi | |
| 73 | ||
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
74 | if test x"$no_purple" = x"" ; then |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
75 | AC_MSG_RESULT(yes (version $purple_major_version.$purple_minor_version.$purple_micro_version$purple_extra_version)) |
| 11147 | 76 | ifelse([$2], , :, [$2]) |
| 77 | else | |
| 78 | AC_MSG_RESULT(no) | |
| 79 | if test x"$PKG_CONFIG" = x"no" ; then | |
| 80 | echo "*** A new enough version of pkg-config was not found." | |
| 81 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" | |
| 82 | fi | |
| 83 | ||
| 84 | if test x"found_version" != x"" ; then | |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
85 | echo "*** A new enough version of purple was not found." |
| 11147 | 86 | echo "*** You have version $found_version" |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
87 | echo "*** See http://pidgin.im/" |
| 11147 | 88 | fi |
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
89 | |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
90 | PURPLE_CFLAGS="" |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
91 | PURPLE_LIBS="" |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
92 | PURPLE_DATADIR="" |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
93 | PURPLE_LIBDIR="" |
| 11147 | 94 | |
| 95 | ifelse([$3], , :, [$3]) | |
| 96 | fi | |
| 97 | ||
|
15964
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
98 | AC_SUBST(PURPLE_CFLAGS) |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
99 | AC_SUBST(PURPLE_LIBS) |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
100 | AC_SUBST(PURPLE_DATADIR) |
|
0b85a5aa80b1
Rename gaim.m4 to purple.m4. This is for other applications that
Mark Doliner <markdoliner@pidgin.im>
parents:
11147
diff
changeset
|
101 | AC_SUBST(PURPLE_LIBDIR) |
| 11147 | 102 | ]) |