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