annotate m4/gnome.m4 @ 13161:02268b52ced3

[gaim-migrate @ 15524] SF Patch #1426210 from Sadrul "When you toggle `Show details' from on to off, the columns don't resize, so I end up with some empty space between the icon and the screen-names." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 07 Feb 2006 16:53:57 +0000
parents 80faf1ca5280
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12023
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 dnl
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 dnl
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 dnl is not found.
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 dnl
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 AC_DEFUN([GNOME_INIT_HOOK],[
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 AC_SUBST(GNOME_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 AC_SUBST(GNOMEUI_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 AC_SUBST(GNOMEGNORBA_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 AC_SUBST(GTKXMHTML_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 AC_SUBST(ZVT_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 AC_SUBST(GNOME_LIBDIR)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 AC_SUBST(GNOME_INCLUDEDIR)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 AC_ARG_WITH(gnome-includes,
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 [ --with-gnome-includes Specify location of GNOME headers],[
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 CFLAGS="$CFLAGS -I$withval"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 ])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 AC_ARG_WITH(gnome-libs,
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 [ --with-gnome-libs Specify location of GNOME libs],[
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 LDFLAGS="$LDFLAGS -L$withval"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 gnome_prefix=$withval
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 ])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 AC_ARG_WITH(gnome,
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 [ --with-gnome Specify prefix for GNOME files],
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 if test x$withval = xyes; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 want_gnome=yes
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 dnl Note that an empty true branch is not
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 dnl valid sh syntax.
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 ifelse([$1], [], :, [$1])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 if test "x$withval" = xno; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 want_gnome=no
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 want_gnome=yes
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 LDFLAGS="$LDFLAGS -L$withval/lib"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 CFLAGS="$CFLAGS -I$withval/include"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 gnome_prefix=$withval/lib
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 fi,
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 want_gnome=yes)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 GNOME_GNORBA_HOOK([],$2)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 if test "x$want_gnome" = xyes; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 if test "$GNOME_CONFIG" = "no"; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 no_gnome_config="yes"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 AC_MSG_CHECKING(if $GNOME_CONFIG works)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 AC_MSG_RESULT(yes)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 $1
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 AC_MSG_RESULT(no)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 no_gnome_config="yes"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 if test x$exec_prefix = xNONE; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 if test x$prefix = xNONE; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 gnome_prefix=$ac_default_prefix/lib
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 gnome_prefix=$prefix/lib
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 gnome_prefix=`eval echo \`echo $libdir\``
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 if test "$no_gnome_config" = "yes"; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 if test -f $gnome_prefix/gnomeConf.sh; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 AC_MSG_RESULT(found)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 echo "loading gnome configuration from" \
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 "$gnome_prefix/gnomeConf.sh"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 . $gnome_prefix/gnomeConf.sh
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 $1
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 AC_MSG_RESULT(not found)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 if test x$2 = xfail; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 if test -n "$3"; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 n="$3"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101 for i in $n; do
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 AC_MSG_CHECKING(extra library \"$i\")
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 case $i in
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 applets)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 AC_SUBST(GNOME_APPLETS_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 capplet)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 AC_SUBST(GNOME_CAPPLET_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 *)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 AC_MSG_RESULT(unknown library)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 esac
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 done
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 ])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 dnl
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 dnl GNOME_INIT ([additional-inits])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 dnl
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123 AC_DEFUN([GNOME_INIT],[
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 GNOME_INIT_HOOK([],fail,$1)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 ])