configure.in 12.9 KB
Newer Older
Vincent Untz's avatar
Vincent Untz committed
1
AC_INIT([gnome-panel], [2.23.90.1],
2
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-panel])
3
AM_CONFIG_HEADER(config.h)
4
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
5

6
AC_CONFIG_MACRO_DIR([m4])
7
GNOME_COMMON_INIT
8

9 10 11 12 13 14 15 16
# 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
17
LIB_PANEL_APPLET_LT_VERSION=2:42:2
18 19
AC_SUBST(LIB_PANEL_APPLET_LT_VERSION)

20
AM_MAINTAINER_MODE
21
GNOME_MAINTAINER_MODE_DEFINES
22

23
IT_PROG_INTLTOOL([0.40.0])
24

25 26 27
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
28
AC_LIBTOOL_WIN32_DLL
29
AC_PROG_LIBTOOL
30
#AC_PROG_SED available in 2.59b
31 32
AM_PROG_CC_C_O

33
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
Mark McLoughlin's avatar
Mark McLoughlin committed
34
AC_PATH_PROG(GCONFTOOL, gconftool-2)
Raja R Harinath's avatar
Raja R Harinath committed
35

36
GNOME_COMPILE_WARNINGS(maximum)
37

38 39 40 41 42 43
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
44
   DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
45 46 47
   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi

48 49 50
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)

51
LIBGNOME_DESKTOP_REQUIRED=2.11.1
52
GDK_PIXBUF_REQUIRED=2.7.1
53
PANGO_REQUIRED=1.15.4
54
GLIB_REQUIRED=2.15.6
55
GTK_REQUIRED=2.13.1
Vincent Untz's avatar
Vincent Untz committed
56
LIBGLADE_REQUIRED=2.5.0
57
LIBGNOME_REQUIRED=2.13.0
58
LIBGNOMEUI_REQUIRED=2.5.4
59
LIBBONOBOUI_REQUIRED=2.1.1
Mark McLoughlin's avatar
Mark McLoughlin committed
60
ORBIT_REQUIRED=2.4.0
61
LIBWNCK_REQUIRED=2.19.5
62
GCONF_REQUIRED=2.6.1
63
LIBGNOME_MENU_REQUIRED=2.11.1
64
LIBECAL_REQUIRED=1.6.0
65
LIBEDATASERVER_REQUIRED=1.2.0
66
LIBEDATASERVERUI_REQUIRED=1.2.0
67
CAIRO_REQUIRED=1.0.0
Vincent Untz's avatar
Vincent Untz committed
68
DBUS_GLIB_REQUIRED=0.60
69
GWEATHER_REQUIRED=2.23.6
Elliot Lee's avatar
Elliot Lee committed
70

71
dnl pkg-config dependency checks
72

73
PKG_CHECK_MODULES(PANEL, ORBit-2.0 >= $ORBIT_REQUIRED gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libgnome-menu >= $LIBGNOME_MENU_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
74 75
AC_SUBST(PANEL_CFLAGS)
AC_SUBST(PANEL_LIBS)
Jacob Berkman's avatar
Jacob Berkman committed
76

77
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 gconf-2.0 >= $GCONF_REQUIRED)
78 79 80
AC_SUBST(LIBPANEL_APPLET_CFLAGS)
AC_SUBST(LIBPANEL_APPLET_LIBS)

81
PKG_CHECK_MODULES(WNCKLET, 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)
82 83 84
AC_SUBST(WNCKLET_CFLAGS)
AC_SUBST(WNCKLET_LIBS)

85 86 87
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNCS(nl_langinfo)

88 89 90 91 92 93
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
94
  LIBECAL_REQUIREMENT="libecal-1.2 >= $LIBECAL_REQUIRED libedataserver-1.2 >= $LIBEDATASERVER_REQUIRED libedataserverui-1.2 >= $LIBEDATASERVERUI_REQUIRED"
95
else
96 97
  if test "x$enable_eds" != "xno"; then
    AC_MSG_CHECKING(for evolution-data-server)
98
    if $PKG_CONFIG --exists libecal-1.2 libedataserverui-1.2 evolution-data-server-1.2; then
99
       AC_MSG_RESULT(yes)
100
       LIBECAL_REQUIREMENT="libecal-1.2 >= $LIBECAL_REQUIRED libedataserver-1.2 >= $LIBEDATASERVER_REQUIRED libedataserverui-1.2 >= $LIBEDATASERVERUI_REQUIRED"
101
       CLOCK_EDS_ICONDIR=`$PKG_CONFIG --variable=datadir evolution-data-server-1.2`/pixmaps/evolution-data-server
102 103 104 105
    else
       AC_MSG_RESULT(no)
    fi
  fi
106
fi
107 108
if test -n "$LIBECAL_REQUIREMENT"; then
  AC_DEFINE([HAVE_LIBECAL], 1,
109
            [Defined when evolution-data-server libecal-1.2 and libedataserverui-1.2 are detected])
110
fi
111
AM_CONDITIONAL(HAVE_LIBECAL, test -n "$LIBECAL_REQUIREMENT")
112
AC_SUBST(CLOCK_EDS_ICONDIR)
113

114
PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED $LIBECAL_REQUIREMENT libglade-2.0 >= $LIBGLADE_REQUIRED librsvg-2.0 dbus-glib-1 gweather >= $GWEATHER_REQUIRED)
115 116 117
AC_SUBST(CLOCK_CFLAGS)
AC_SUBST(CLOCK_LIBS)

118
dnl Hmm, we already checked for these above.  Is there a way to avoid checking twice?
119
PKG_CHECK_MODULES(CLOCK_MECHANISM, [ gthread-2.0 gio-2.0 dbus-glib-1 ])
120 121 122 123 124 125 126
AC_SUBST(CLOCK_MECHANISM_CFLAGS)
AC_SUBST(CLOCK_MECHANISM_LIBS)

POLKIT_GNOME_REQUIRED=0.7
POLKIT_DBUS_REQUIRED=0.7
DBUS_GLIB_REQUIRED=0.71
DBUS_REQUIRED=1.1.2
127
NETWORK_MANAGER_REQUIRED=0.6
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
 
# PolicyKit detection; defaults to 'auto' (use it if it's available)
#
POLKIT_GNOME_CFLAGS=
POLKIT_GNOME_LIBS=
POLKIT_DBUS_CFLAGS=
POLKIT_DBUS_LIBS=
AC_ARG_ENABLE(polkit, AS_HELP_STRING([--enable-polkit],[Enable PolicyKit support (auto)]),enable_polkit=$enableval,enable_polkit=auto)
if test "x$enable_polkit" = "xno" ; then
  HAVE_POLKIT=no
else
  HAVE_POLKIT=no
  PKG_CHECK_MODULES(POLKIT_GNOME, polkit-gnome >= $POLKIT_GNOME_REQUIRED dbus-1 >= $DBUS_REQUIRED, HAVE_POLKIT=yes, HAVE_POLKIT=no)
 
  if test "x$enable_polkit" = "xyes" -a "x$HAVE_POLKIT" = "xno" ; then
    AC_MSG_ERROR(PolicyKit support explicity enabled but not available)
  fi

  if test "x$HAVE_POLKIT" = "xyes" ; then
    AC_DEFINE(HAVE_POLKIT, 1, [Defined if PolicyKit support is enabled])
    PKG_CHECK_MODULES(POLKIT_DBUS, polkit-dbus >= $POLKIT_DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED gobject-2.0)
149 150
    AC_CHECK_PROG([POLKIT_POLICY_FILE_VALIDATE],
                  [polkit-policy-file-validate], [polkit-policy-file-validate])
151 152 153 154 155 156 157 158 159 160 161 162
  fi
fi
AM_CONDITIONAL(HAVE_POLKIT, test "x$HAVE_POLKIT" = "xyes")
AC_SUBST(POLKIT_GNOME_CFLAGS)
AC_SUBST(POLKIT_GNOME_LIBS)
AC_SUBST(POLKIT_DBUS_CFLAGS)
AC_SUBST(POLKIT_DBUS_LIBS)

AC_ARG_ENABLE(network_manager, AS_HELP_STRING([--enable-network-manager],[Enable NetworkManager support (auto)]),enable_network_manager=$enableval,enable_network_manager=auto)
if test "x$enable_network_manager" = "xno" ; then
  HAVE_NETWORK_MANAGER=no
else
163
  PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED, HAVE_NETWORK_MANAGER=yes, HAVE_NETWORK_MANAGER=no)
164 165 166 167 168
fi
if test "x$HAVE_NETWORK_MANAGER" = "xyes" ; then
    AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [Defined if NetworkManager support is enabled])
fi

169
PKG_CHECK_MODULES(FISH, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED cairo >= $CAIRO_REQUIRED)
Mark McLoughlin's avatar
Mark McLoughlin committed
170 171 172
AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)

173 174 175 176 177 178
# Let distributor specify which utility to use when changing the time
AC_ARG_WITH(clock-time-utility,
              [AC_HELP_STRING([--with-clock-time-utility],
                              [Specify the utility to use when changing the time from the clock applet @<:@default=@:>@])],,
                              [with_clock_time_utility=""])

179 180
CLOCK_TIME_UTILITY=$with_clock_time_utility
AC_SUBST(CLOCK_TIME_UTILITY)
181

182

183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
# Make it possible to compile the applets in-process
PANEL_INPROCESS_NONE=
PANEL_INPROCESS_ALL=
PANEL_INPROCESS_APPLETS=
AC_ARG_WITH(in-process-applets,
	AC_HELP_STRING([--with-in-process-applets=APPLETS],
		[comma-separated list of applets to compile in-process (possible values: none, clock, fish, notification-area, wncklet, all) @<:@default=none@:>@]),
	[for i in `echo $withval | tr , ' '`; do
		if test $i = "none"; then
			PANEL_INPROCESS_NONE=1
		else if test $i = "all"; then
			PANEL_INPROCESS_ALL=1
		else if test $i = "clock"; then
			PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
		else if test $i = "fish"; then
			PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
		else if test $i = "notification-area"; then
			PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
		else if test $i = "wncklet"; then
			PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
		else
			echo "applet $i not recognized, ignoring..."
		fi; fi; fi; fi; fi; fi
	done],
	[])

if test -n "$PANEL_INPROCESS_ALL"; then
	PANEL_INPROCESS_APPLETS="clock fish notification-area wncklet"
fi
if test -n "$PANEL_INPROCESS_NONE"; then
	PANEL_INPROCESS_APPLETS=""
fi
for i in $PANEL_INPROCESS_APPLETS; do
	if test $i = "clock"; then
		CLOCK_COMPILE_INPROCESS=1
		AC_DEFINE([CLOCK_INPROCESS], 1,
		[Defined when compiling the clock applet in-process])
	else if test $i = "fish"; then
		FISH_COMPILE_INPROCESS=1
		AC_DEFINE([FISH_INPROCESS], 1,
		[Defined when compiling the fish applet in-process])
	else if test $i = "notification-area"; then
		NOTIFICATION_AREA_COMPILE_INPROCESS=1
		AC_DEFINE([NOTIFICATION_AREA_INPROCESS], 1,
		[Defined when compiling the notification-area applet in-process])
	else if test $i = "wncklet"; then
		WNCKLET_COMPILE_INPROCESS=1
		AC_DEFINE([WNCKLET_INPROCESS], 1,
		[Defined when compiling the wncklet applet in-process])
	fi; fi; fi; fi
done

AM_CONDITIONAL(CLOCK_INPROCESS, test -n "$CLOCK_COMPILE_INPROCESS")
AM_CONDITIONAL(FISH_INPROCESS, test -n "$FISH_COMPILE_INPROCESS")
AM_CONDITIONAL(NOTIFICATION_AREA_INPROCESS, test -n "$NOTIFICATION_AREA_COMPILE_INPROCESS")
AM_CONDITIONAL(WNCKLET_INPROCESS, test -n "$WNCKLET_COMPILE_INPROCESS")

240 241 242
# For the run dialog
gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE

243 244
dnl X development libraries check

245 246 247 248 249
PKG_CHECK_MODULES(X, x11 xau, :, [
  # pkg-config modules not found (only present since X11R7 aka Xorg); use
  # old-style detection
  AC_PATH_XTRA()
  # X not found
250 251 252 253
  if test x$no_x = xyes ; then
    AC_MSG_ERROR([X development libraries not found])
  fi

254 255 256 257 258 259 260 261 262 263 264
  gp_save_cflags="$CFLAGS"
  gp_save_libs="$LIBS"
  CFLAGS="$X_CFLAGS"
  LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
  AC_CHECK_LIB(X11, XFree,, AC_MSG_ERROR([libX11 not found]))
  AC_CHECK_LIB(Xau, XauFileName,, AC_MSG_ERROR([libXau not found]))
  CFLAGS="$gp_save_cflags"
  LIBS="$gp_save_libs"

  X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXau $X_EXTRA_LIBS"
])
265

266 267
AC_SUBST(X_LIBS)

268
dnl IDL directories
269

270 271
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
Jacob Berkman's avatar
Jacob Berkman committed
272

273 274
BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(BONOBO_IDLDIR)
275

276 277 278
BONOBO_ACT_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACT_IDLDIR)

279
dnl  Language Support
280

281
GETTEXT_PACKAGE=gnome-panel-2.0
Vincent Untz's avatar
Vincent Untz committed
282
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define the gettext package to be used])
283 284
AC_SUBST(GETTEXT_PACKAGE)

285
AM_GLIB_GNU_GETTEXT
286

287
dnl gtk-doc stuff
288

289
GTK_DOC_CHECK([1.0])
290

291 292 293 294
dnl gnome-doc-utils stuff

GNOME_DOC_INIT

295
dnl scrollkeeper checks
296 297 298 299 300

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
301

302
AM_GCONF_SOURCE_2
303

304 305 306 307 308 309 310 311
dnl platform test
case $host in
*-*-solaris*)
	ostype=solaris
	AC_DEFINE(HAVE_SOLARIS, 1, [Define to 1])
	;;
esac

312 313 314 315
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)

316 317
dnl define a MAINT-like variable REBUILD which is set if Perl
dnl and awk are found, so autogenerated sources can be rebuilt
318 319 320 321 322 323 324 325 326
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)
327

328 329
AC_OUTPUT([
Makefile
330
idl/Makefile
331
icons/Makefile
Vincent Untz's avatar
Vincent Untz committed
332 333
icons/16x16/Makefile
icons/22x22/Makefile
334
icons/24x24/Makefile
Vincent Untz's avatar
Vincent Untz committed
335
icons/32x32/Makefile
336
icons/48x48/Makefile
Vincent Untz's avatar
Vincent Untz committed
337
icons/scalable/Makefile
338
gnome-panel/Makefile
Vincent Untz's avatar
Vincent Untz committed
339
gnome-panel/libpanel-util/Makefile
340
gnome-panel/gnome-panel.desktop.in
341
libpanel-applet/libpanelapplet-2.0.pc
342
libpanel-applet/libpanelapplet-2.0-uninstalled.pc
343
libpanel-applet/Makefile
344
po/Makefile.in
345
applets/Makefile
346
applets/clock/Makefile
347
applets/clock/pixmaps/Makefile
348
applets/fish/Makefile
349
applets/notification_area/Makefile
350
applets/wncklet/Makefile
351 352 353
doc/Makefile
doc/reference/Makefile
doc/reference/panel-applet/Makefile
354
help/Makefile
355 356 357 358
help/clock/Makefile
help/fish/Makefile
help/window-list/Makefile
help/workspace-switcher/Makefile
359 360 361 362
help/ja/Makefile
help/ja/fish/Makefile
help/ja/window-list/Makefile
help/ja/workspace-switcher/Makefile
Mike Lei's avatar
Mike Lei committed
363 364 365 366 367 368 369 370 371 372 373
help/de/Makefile
help/de/fish/Makefile
help/de/window-list/Makefile
help/de/workspace-switcher/Makefile
help/zh_CN/Makefile
help/zh_CN/fish/Makefile
help/zh_CN/workspace-switcher/Makefile
help/zh_TW/Makefile
help/zh_TW/fish/Makefile
help/zh_TW/window-list/Makefile
help/zh_TW/workspace-switcher/Makefile
374
man/Makefile
375
])
376 377 378 379 380 381 382 383 384 385

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