Mercurial > pidgin
annotate m4/gnome.m4 @ 3413:ccf479022081
[gaim-migrate @ 3432]
It'd be one thing if they used autopoint all throughout 0.11.x, but
0.11.0, 0.11.1, and 0.11.2 (maybe even .3!) don't include it! So,
back go the hacks, except now it's all much bigger because of the
existance of autopoint.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 19 Aug 2002 05:25:16 +0000 |
parents | 5df423e0bca8 |
children |
rev | line source |
---|---|
2 | 1 dnl |
2 dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) | |
3 dnl | |
4 dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh | |
5 dnl is not found. | |
6 dnl | |
7 | |
8 AC_DEFUN([GNOME_INIT_HOOK],[ | |
9 AC_SUBST(GNOME_LIBS) | |
10 AC_SUBST(GNOMEUI_LIBS) | |
11 AC_SUBST(GNOMEGNORBA_LIBS) | |
12 AC_SUBST(GTKXMHTML_LIBS) | |
13 AC_SUBST(ZVT_LIBS) | |
14 AC_SUBST(GNOME_LIBDIR) | |
15 AC_SUBST(GNOME_INCLUDEDIR) | |
16 | |
17 AC_ARG_WITH(gnome-includes, | |
18 [ --with-gnome-includes Specify location of GNOME headers],[ | |
19 CFLAGS="$CFLAGS -I$withval" | |
20 ]) | |
21 | |
22 AC_ARG_WITH(gnome-libs, | |
23 [ --with-gnome-libs Specify location of GNOME libs],[ | |
24 LDFLAGS="$LDFLAGS -L$withval" | |
25 gnome_prefix=$withval | |
26 ]) | |
27 | |
28 AC_ARG_WITH(gnome, | |
29 [ --with-gnome Specify prefix for GNOME files], | |
30 if test x$withval = xyes; then | |
31 want_gnome=yes | |
32 dnl Note that an empty true branch is not | |
33 dnl valid sh syntax. | |
34 ifelse([$1], [], :, [$1]) | |
35 else | |
36 if test "x$withval" = xno; then | |
37 want_gnome=no | |
38 else | |
39 want_gnome=yes | |
40 LDFLAGS="$LDFLAGS -L$withval/lib" | |
41 CFLAGS="$CFLAGS -I$withval/include" | |
42 gnome_prefix=$withval/lib | |
43 fi | |
44 fi, | |
45 want_gnome=yes) | |
3411
5df423e0bca8
[gaim-migrate @ 3430]
Christian Hammond <chipx86@chipx86.com>
parents:
2
diff
changeset
|
46 |
5df423e0bca8
[gaim-migrate @ 3430]
Christian Hammond <chipx86@chipx86.com>
parents:
2
diff
changeset
|
47 GNOME_GNORBA_HOOK([],$2) |
2 | 48 |
49 if test "x$want_gnome" = xyes; then | |
50 | |
51 AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) | |
52 if test "$GNOME_CONFIG" = "no"; then | |
53 no_gnome_config="yes" | |
54 else | |
55 AC_MSG_CHECKING(if $GNOME_CONFIG works) | |
56 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then | |
57 AC_MSG_RESULT(yes) | |
58 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" | |
59 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" | |
60 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" | |
61 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" | |
62 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" | |
63 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" | |
64 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" | |
65 $1 | |
66 else | |
67 AC_MSG_RESULT(no) | |
68 no_gnome_config="yes" | |
69 fi | |
70 fi | |
71 | |
72 if test x$exec_prefix = xNONE; then | |
73 if test x$prefix = xNONE; then | |
74 gnome_prefix=$ac_default_prefix/lib | |
75 else | |
76 gnome_prefix=$prefix/lib | |
77 fi | |
78 else | |
79 gnome_prefix=`eval echo \`echo $libdir\`` | |
80 fi | |
81 | |
82 if test "$no_gnome_config" = "yes"; then | |
83 AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) | |
84 if test -f $gnome_prefix/gnomeConf.sh; then | |
85 AC_MSG_RESULT(found) | |
86 echo "loading gnome configuration from" \ | |
87 "$gnome_prefix/gnomeConf.sh" | |
88 . $gnome_prefix/gnomeConf.sh | |
89 $1 | |
90 else | |
91 AC_MSG_RESULT(not found) | |
92 if test x$2 = xfail; then | |
93 AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) | |
94 fi | |
95 fi | |
96 fi | |
97 fi | |
98 | |
99 if test -n "$3"; then | |
100 n="$3" | |
101 for i in $n; do | |
3411
5df423e0bca8
[gaim-migrate @ 3430]
Christian Hammond <chipx86@chipx86.com>
parents:
2
diff
changeset
|
102 AC_MSG_CHECKING(extra library \"$i\") |
2 | 103 case $i in |
104 applets) | |
105 AC_SUBST(GNOME_APPLETS_LIBS) | |
106 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` | |
107 AC_MSG_RESULT($GNOME_APPLETS_LIBS);; | |
108 capplet) | |
109 AC_SUBST(GNOME_CAPPLET_LIBS) | |
110 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` | |
111 AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; | |
112 *) | |
113 AC_MSG_RESULT(unknown library) | |
114 esac | |
115 done | |
116 fi | |
117 ]) | |
118 | |
119 dnl | |
120 dnl GNOME_INIT ([additional-inits]) | |
121 dnl | |
122 | |
123 AC_DEFUN([GNOME_INIT],[ | |
124 GNOME_INIT_HOOK([],fail,$1) | |
125 ]) |