configure.in 8.72 KB
Newer Older
1
AC_INIT(gnome-panel)
Arturo Espinosa's avatar
Arturo Espinosa committed
2
AM_CONFIG_HEADER(config.h)
Vincent Untz's avatar
Vincent Untz committed
3
AM_INIT_AUTOMAKE(gnome-panel, 2.10.0)
Arturo Espinosa's avatar
Arturo Espinosa committed
4

5 6
AC_CONFIG_MACRO_DIR(m4)

7
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
8
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
9

10 11 12 13 14 15 16 17
# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
#   been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
#   change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A

Vincent Untz's avatar
Vincent Untz committed
18
LIB_PANEL_APPLET_LT_VERSION=1:3:1
19 20
AC_SUBST(LIB_PANEL_APPLET_LT_VERSION)

Arturo Espinosa's avatar
Arturo Espinosa committed
21 22
AM_MAINTAINER_MODE

23
AC_PROG_INTLTOOL([0.31])
24

Arturo Espinosa's avatar
Arturo Espinosa committed
25 26 27
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
28
AC_LIBTOOL_WIN32_DLL
Arturo Espinosa's avatar
Arturo Espinosa committed
29
AM_PROG_LIBTOOL
30
#AC_PROG_SED available in 2.59b
31
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
Mark McLoughlin's avatar
Mark McLoughlin committed
32
AC_PATH_PROG(GCONFTOOL, gconftool-2)
Raja R Harinath's avatar
Raja R Harinath committed
33

Mark McLoughlin's avatar
Mark McLoughlin committed
34
GNOME_COMPILE_WARNINGS(yes)
35

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
AC_ARG_ENABLE(deprecations,
              [AC_HELP_STRING([--enable-deprecations],
                              [warn about deprecated usages [default=no]])],,
              [enable_deprecations=no])

if test "x$enable_deprecations" = "xyes"; then
   DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED"
   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi

51 52 53
dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!

54
LIBGNOME_DESKTOP_REQUIRED=2.9.91
55
GDK_PIXBUF_REQUIRED=2.1.0
Mark McLoughlin's avatar
Mark McLoughlin committed
56
GTK_REQUIRED=2.5.4
Vincent Untz's avatar
Vincent Untz committed
57
LIBGLADE_REQUIRED=2.5.0
Mark McLoughlin's avatar
Mark McLoughlin committed
58
LIBGNOME_REQUIRED=2.1.1
59
LIBGNOMEUI_REQUIRED=2.5.4
60
LIBBONOBOUI_REQUIRED=2.1.1
Mark McLoughlin's avatar
Mark McLoughlin committed
61
ORBIT_REQUIRED=2.4.0
62
GNOME_VFS_REQUIRED=2.9.1
63
LIBWNCK_REQUIRED=2.9.92
64
GCONF_REQUIRED=2.6.1
65
LIBGNOME_MENU_REQUIRED=2.9.4.1
66
LIBECAL_REQUIRED=0.0.97
Elliot Lee's avatar
Elliot Lee committed
67

68
AC_SUBST(GTK_REQUIRED)
69 70 71 72
AC_SUBST(GDK_PIXBUF_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(LIBGNOME_REQUIRED)
AC_SUBST(ORBIT_REQUIRED)
73
AC_SUBST(GNOME_VFS_REQUIRED)
74
AC_SUBST(LIBWNCK_REQUIRED)
75
AC_SUBST(GCONF_REQUIRED)
76
AC_SUBST(LIBECAL_REQUIRED)
77

78
dnl pkg-config dependency checks
79

80
PKG_CHECK_MODULES(PANEL, ORBit-2.0 >= $ORBIT_REQUIRED gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libgnome-menu >= $LIBGNOME_MENU_REQUIRED)
81 82
AC_SUBST(PANEL_CFLAGS)
AC_SUBST(PANEL_LIBS)
Jacob Berkman's avatar
Jacob Berkman committed
83

Mark McLoughlin's avatar
Mark McLoughlin committed
84
PKG_CHECK_MODULES(LIBPANEL_APPLET, ORBit-2.0 >= $ORBIT_REQUIRED gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED)
85 86 87
AC_SUBST(LIBPANEL_APPLET_CFLAGS)
AC_SUBST(LIBPANEL_APPLET_LIBS)

88
PKG_CHECK_MODULES(WNCKLET, ORBit-2.0 >= $ORBIT_REQUIRED gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED)
89 90 91
AC_SUBST(WNCKLET_CFLAGS)
AC_SUBST(WNCKLET_LIBS)

92 93 94 95 96 97
AC_ARG_ENABLE(eds,
	AC_HELP_STRING([--enable-eds],
		[Enable evolution-data-server dependencies @<:@default=auto@:>@]
	),,enable_eds=auto)
LIBECAL_REQUIREMENT=
if test "x$enable_eds" = "xyes"; then
98
  LIBECAL_REQUIREMENT="libecal-1.2 >= $LIBECAL_REQUIRED"
99
else
100 101
  if test "x$enable_eds" != "xno"; then
    AC_MSG_CHECKING(for evolution-data-server)
Vincent Untz's avatar
Vincent Untz committed
102
    if $PKG_CONFIG --exists libecal-1.2; then
103
       AC_MSG_RESULT(yes)
104
       LIBECAL_REQUIREMENT="libecal-1.2 >= $LIBECAL_REQUIRED"
105 106 107 108
    else
       AC_MSG_RESULT(no)
    fi
  fi
109
fi
110 111
if test -n "$LIBECAL_REQUIREMENT"; then
  AC_DEFINE([HAVE_LIBECAL], 1,
Vincent Untz's avatar
Vincent Untz committed
112
            [Defined when evolution-data-server libecal-1.2 is detected])
113
fi
114 115 116
AM_CONDITIONAL(HAVE_LIBECAL, test -n "$LIBECAL_REQUIREMENT")

PKG_CHECK_MODULES(CLOCK, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED $LIBECAL_REQUIREMENT)
117 118 119
AC_SUBST(CLOCK_CFLAGS)
AC_SUBST(CLOCK_LIBS)

Mark McLoughlin's avatar
Mark McLoughlin committed
120 121 122 123
PKG_CHECK_MODULES(FISH, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)

124 125 126
# For egg-recent-files
AC_CHECK_FUNCS(lockf)

127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
dnl X development libraries check

#
# If Pango included the shared library dependencies from X11 in
# the pkg-config output, then we use that (to avoid duplicates).
# but if they were omitted to avoid binary compatibility problems
# then we need to repeat the checks.
#
if $PKG_CONFIG --exists pangoxft ; then
  PANGO_PACKAGES="pangox pangoxft"
else
  PANGO_PACKAGES="pangox"
fi

x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
case x_libs in
  *-lX11*) pango_omitted_x_deps=no ;;
  *)       pango_omitted_x_deps=yes ;;
esac

if test $pango_omitted_x_deps = yes ; then
  AC_PATH_XTRA

  if test x$no_x = xyes ; then
    AC_MSG_ERROR([X development libraries not found])
  else
    X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
  fi
fi

AC_SUBST(X_LIBS)

159
dnl IDL directories
160

161 162
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
Jacob Berkman's avatar
Jacob Berkman committed
163

164 165
BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(BONOBO_IDLDIR)
166

167 168 169
BONOBO_ACT_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACT_IDLDIR)

170
dnl  Language Support 
171

172
GETTEXT_PACKAGE=gnome-panel-2.0
Vincent Untz's avatar
Vincent Untz committed
173
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define the gettext package to be used])
174 175
AC_SUBST(GETTEXT_PACKAGE)

Pawan Chitrakar's avatar
Pawan Chitrakar committed
176
ALL_LINGUAS="af am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso or pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tr uk vi wa yi zh_CN zh_TW zu"
177
AM_GLIB_GNU_GETTEXT
178

179
dnl gtk-doc stuff
Jacob Berkman's avatar
Jacob Berkman committed
180

181
GTK_DOC_CHECK([1.0])
182

183 184 185 186 187 188
dnl scrollkeeper checks 

AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
fi
Jacob Berkman's avatar
Jacob Berkman committed
189

190
AM_GCONF_SOURCE_2
191

Martin Baulig's avatar
Martin Baulig committed
192 193 194 195
dnl Don't use AC_PROG_AWK since we need the full pathname.
AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
AC_PATH_PROGS(PERL, perl5 perl)

196 197
dnl define a MAINT-like variable REBUILD which is set if Perl
dnl and awk are found, so autogenerated sources can be rebuilt
Martin Baulig's avatar
Martin Baulig committed
198 199 200 201 202 203 204 205 206
AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
     test -n "$PERL" && \
     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
     test -n "$AWK" ; then
  REBUILD=
fi
AC_SUBST(REBUILD)
Jacob Berkman's avatar
Jacob Berkman committed
207

Arturo Espinosa's avatar
Arturo Espinosa committed
208 209
AC_OUTPUT([
Makefile
210
gnome-panel.spec
211
idl/Makefile
212
icons/Makefile
213
gnome-panel/Makefile
214
libpanel-applet/libpanelapplet-2.0.pc
215
libpanel-applet/libpanelapplet-2.0-uninstalled.pc
216
libpanel-applet/Makefile
217
po/Makefile.in
218
applets/Makefile
219
applets/clock/Makefile
220
applets/fish/Makefile
221
applets/notification_area/Makefile
222
applets/wncklet/Makefile
223 224 225
doc/Makefile
doc/reference/Makefile
doc/reference/panel-applet/Makefile
226 227 228 229 230 231
help/Makefile
help/C/Makefile
help/C/fish/Makefile
help/C/clock/Makefile
help/C/window-list/Makefile
help/C/workspace-switcher/Makefile
Dan Mills's avatar
Dan Mills committed
232 233 234 235 236
help/ja/Makefile
help/ja/fish/Makefile
help/ja/clock/Makefile
help/ja/window-list/Makefile
help/ja/workspace-switcher/Makefile
Mike Lei's avatar
Mike Lei committed
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
help/de/Makefile
help/de/fish/Makefile
help/de/clock/Makefile
help/de/window-list/Makefile
help/de/workspace-switcher/Makefile
help/es/Makefile
help/es/fish/Makefile
help/es/clock/Makefile
help/es/window-list/Makefile
help/es/workspace-switcher/Makefile
help/fr/Makefile
help/fr/fish/Makefile
help/fr/clock/Makefile
help/fr/window-list/Makefile
help/fr/workspace-switcher/Makefile
help/it/Makefile
help/it/fish/Makefile
help/it/clock/Makefile
help/it/window-list/Makefile
help/it/workspace-switcher/Makefile
help/sv/Makefile
help/sv/fish/Makefile
help/sv/clock/Makefile
help/sv/window-list/Makefile
help/sv/workspace-switcher/Makefile
help/ko/Makefile
help/ko/fish/Makefile
help/ko/clock/Makefile
help/ko/window-list/Makefile
help/ko/workspace-switcher/Makefile
267 268 269 270 271
help/uk/Makefile
help/uk/fish/Makefile
help/uk/clock/Makefile
help/uk/window-list/Makefile
help/uk/workspace-switcher/Makefile
Mike Lei's avatar
Mike Lei committed
272 273 274 275 276 277 278 279 280 281
help/zh_CN/Makefile
help/zh_CN/fish/Makefile
help/zh_CN/clock/Makefile
help/zh_CN/window-list/Makefile
help/zh_CN/workspace-switcher/Makefile
help/zh_TW/Makefile
help/zh_TW/fish/Makefile
help/zh_TW/clock/Makefile
help/zh_TW/window-list/Makefile
help/zh_TW/workspace-switcher/Makefile
282
man/Makefile
283
])
284 285 286 287 288 289 290 291 292 293

if echo foo | xgettext --from-code=UTF-8 -LC -o - - 2>/dev/null ; then
:;
else
echo "Warning: Your version of gettext does not support --from-code."
echo "         This will cause translation of some strings in non US-English"
echo "         locales to fail. For full support please upgrade to GNU"
echo "         gettext 0.12 or later."
echo
fi