annotate m4macros/gaim.m4 @ 12603:e4e47871c373

[gaim-migrate @ 14938] SF Patch #1377898 from Nathan Conrad "This patch adds accelerator key mappings for buttons in dialog boxes created using gaim_request_action." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 21 Dec 2005 21:18:25 +0000
parents 616feca04ada
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11147
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 dnl ###########################################################################
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 dnl # Configure paths for Gaim
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 dnl # Gary Kramlich 2005
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 dnl #
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 dnl # Based off of glib-2.0.m4 by Owen Taylor
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 dnl ###########################################################################
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 dnl ###########################################################################
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 dnl # AM_PATH_GAIM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 dnl #
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 dnl # Test for gaim and define GAIM_CFLAGS, GAIM_LIBS, GAIM_DATADIR, and
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 dnl # GAIM_LIBDIR
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 dnl ###########################################################################
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 AC_DEFUN([AM_PATH_GAIM],
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 [dnl
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 no_gaim=""
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 if test x"$PKG_CONFIG" != x"no" ; then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 :
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 else
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 echo "*** pkg-config is too old; version 0.7 or newer is required."
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 no_gaim="yes"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 PKG_CONFIG="no"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 else
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 no_gaim="yes"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 min_version=ifelse([$1], ,2.0.0,$1)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 found_version=""
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 AC_MSG_CHECKING(for gaim - version >= $min_version)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 if test x"$no_gaim" = x"" ; then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 GAIM_DATADIR=`$PKG_CONFIG --variable=datadir gaim`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 GAIM_LIBDIR=`$PKG_CONFIG --variable=libdir gaim`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 GAIM_CFLAGS=`$PKG_CONFIG --cflags gaim`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 GAIM_LIBS=`$PKG_CONFIG --libs gaim`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 gaim_version=`$PKG_CONFIG --modversion gaim`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 gaim_major_version=`echo $gaim_version | cut -d. -f 1`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 gaim_minor_version=`echo $gaim_version | cut -d. -f 2`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 dnl # stash the micro version in a temp variable. Then stash
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 dnl # the numeric for it in gaim_micro_version and anything
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 dnl # else in gaim_extra_version.
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 gaim_micro_version_temp=`echo $gaim_version | cut -d. -f 3`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 gaim_micro_version=`echo $gaim_micro_version_temp | sed 's/[[^0-9]]//g'`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 gaim_extra_version=`echo $gaim_micro_version_temp | sed 's/[[0-9]]//g'`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 dnl # get the major, minor, and macro that the user gave us
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 min_major_version=`echo $min_version | cut -d. -f 1`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 min_minor_version=`echo $min_version | cut -d. -f 2`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 min_micro_version=`echo $min_version | cut -d. -f 3`
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 dnl # check the users version against the version from pkg-config
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 if test $gaim_major_version -eq $min_major_version -a \
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 $gaim_minor_version -ge $min_minor_version -a \
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 $gaim_micro_version -ge $min_micro_version
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 :
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 else
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 no_gaim="yes"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 found_version="$gaim_major_version.$gaim_minor_version.$gaim_micro_version$gaim_extra_version"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 dnl # Do we want a compile test here?
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 if test x"$no_gaim" = x"" ; then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 AC_MSG_RESULT(yes (version $gaim_major_version.$gaim_minor_version.$gaim_micro_version$gaim_extra_version))
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 ifelse([$2], , :, [$2])
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 else
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 AC_MSG_RESULT(no)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 if test x"$PKG_CONFIG" = x"no" ; then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 echo "*** A new enough version of pkg-config was not found."
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 if test x"found_version" != x"" ; then
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 echo "*** A new enough version of gaim was not found."
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 echo "*** You have version $found_version"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 echo "*** See http://gaim.sf.net/"
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 GAIM_CFLAGS=""
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 GAIM_LIBS=""
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 GAIM_DATADIR=""
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 GAIM_LIBDIR=""
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 ifelse([$3], , :, [$3])
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 fi
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 AC_SUBST(GAIM_CFLAGS)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 AC_SUBST(GAIM_LIBS)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 AC_SUBST(GAIM_DATADIR)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 AC_SUBST(GAIM_LIBDIR)
616feca04ada [gaim-migrate @ 13226]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 ])