configure.ac 10.2 KB
Newer Older
1 2 3
dnl **************************************************************************
dnl Define version info
dnl **************************************************************************
4

5
m4_define([gp_major_version], [3])
6
m4_define([gp_minor_version], [32])
7
m4_define([gp_micro_version], [0])
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
m4_define([gp_version], [gp_major_version.gp_minor_version.gp_micro_version])

dnl **************************************************************************
dnl Define bugzilla address
dnl **************************************************************************

m4_define([gp_bugzilla_url],
          [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-panel])

dnl **************************************************************************
dnl Initialize autoconf
dnl **************************************************************************

AC_INIT([gnome-panel], [gp_version], [gp_bugzilla_url])
AC_CONFIG_HEADERS([config.h])
23
AC_CONFIG_MACRO_DIR([m4])
24
AC_CONFIG_AUX_DIR([build-aux])
25

26 27 28 29
dnl **************************************************************************
dnl Set release policy
dnl **************************************************************************

30 31 32 33 34 35 36 37
m4_ifdef([AX_IS_RELEASE], [
  AX_IS_RELEASE([git-directory])
], [
  AC_MSG_ERROR([m4_normalize([
    could not find AX_IS_RELEASE macro. Please install the
    'autoconf-archive' package.
  ])])
])
38

39 40 41 42 43 44 45 46 47 48 49 50
dnl **************************************************************************
dnl Enable debug
dnl **************************************************************************

AX_CHECK_ENABLE_DEBUG([yes])

dnl **************************************************************************
dnl Add warning flags
dnl **************************************************************************

AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS])

51 52 53 54 55 56 57 58 59 60 61 62 63 64
dnl **************************************************************************
dnl Initialize automake
dnl **************************************************************************

AM_INIT_AUTOMAKE([1.13 no-dist-gzip dist-xz tar-ustar -Wno-portability])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])

dnl **************************************************************************
dnl Initialize libtool
dnl **************************************************************************

LT_PREREQ([2.2.6])
LT_INIT([dlopen disable-static])
65
LT_LIB_M
66

67 68 69 70 71 72 73 74 75
dnl **************************************************************************
dnl Check for required programs
dnl **************************************************************************

AC_PROG_CC
AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])

76 77 78 79 80 81 82 83 84 85 86 87
dnl **************************************************************************
dnl Internationalization
dnl **************************************************************************

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.4])

GETTEXT_PACKAGE=gnome-panel
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                   [Name of default gettext domain])

88 89 90 91 92 93
dnl **************************************************************************
dnl Desktop settings support
dnl **************************************************************************

GLIB_GSETTINGS

94 95 96 97 98 99 100 101
# 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

102
LIB_PANEL_APPLET_LT_VERSION=3:0:0
103 104
AC_SUBST(LIB_PANEL_APPLET_LT_VERSION)

105 106 107
LIBGNOME_PANEL_LT_VERSION=0:0:0
AC_SUBST([LIBGNOME_PANEL_LT_VERSION])

108 109 110 111 112
AC_ARG_ENABLE([documentation],
	AS_HELP_STRING([--enable-documentation], [enable man pages and HTML]),
	[], [enable_documentation=yes])
AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)

Christian Persch's avatar
Christian Persch committed
113
LIBGNOME_DESKTOP_REQUIRED=2.91.0
114
GDK_PIXBUF_REQUIRED=2.26.0
115
PANGO_REQUIRED=1.15.4
116
GLIB_REQUIRED=2.45.3
117
GTK_REQUIRED=3.22.0
118
LIBWNCK_REQUIRED=3.4.6
119
LIBGNOME_MENU_REQUIRED=3.7.90
120
LIBECAL_REQUIRED=3.33.2
121
LIBEDATASERVER_REQUIRED=3.5.3
122
LIBSYSTEMD_REQUIRED=230
123
CAIRO_REQUIRED=1.0.0
124
GWEATHER_REQUIRED=3.28.0
125
DCONF_REQUIRED=0.13.4
126
XRANDR_REQUIRED=1.3.0
Elliot Lee's avatar
Elliot Lee committed
127

128
dnl pkg-config dependency checks
129

130 131 132 133 134 135
PKG_CHECK_MODULES([PANEL], [
  gmodule-2.0 >= $GLIB_REQUIRED
  gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
  pango >= $PANGO_REQUIRED
  gtk+-3.0 >= $GTK_REQUIRED
  cairo-xlib
136
  gdm
137 138 139 140 141 142 143 144 145 146 147
  glib-2.0 >= $GLIB_REQUIRED
  gmodule-2.0 >= $GLIB_REQUIRED
  gio-2.0 >= $GLIB_REQUIRED
  gio-unix-2.0 >= $GLIB_REQUIRED
  gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED
  libgnome-menu-3.0 >= $LIBGNOME_MENU_REQUIRED
  dconf >= $DCONF_REQUIRED
  x11
  xrandr >= $XRANDR_REQUIRED
])

148 149
PKG_CHECK_MODULES([LIBGNOME_PANEL], [
  gio-2.0 >= $GLIB_REQUIRED
150
  gmodule-2.0 >= $GLIB_REQUIRED
151 152 153
  gtk+-3.0 >= $GTK_REQUIRED
])

154 155 156 157 158 159 160 161
PKG_CHECK_MODULES([LIBPANEL_APPLET], [
  gtk+-3.0 >= $GTK_REQUIRED
  cairo-xlib
  cairo-gobject
  gio-2.0 >= $GLIB_REQUIRED
  gio-unix-2.0 >= $GLIB_REQUIRED
  x11
])
162

163
PKG_CHECK_MODULES(FISH, gtk+-3.0 >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
164 165 166
AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)

167
PKG_CHECK_MODULES([MENU], [
168
  gdm
Alberts Muktupāvels's avatar
Alberts Muktupāvels committed
169
  gio-unix-2.0 >= $GLIB_REQUIRED
170 171
  gtk+-3.0 >= $GTK_REQUIRED
  libgnome-menu-3.0 >= $LIBGNOME_MENU_REQUIRED
172
  libsystemd >= $LIBSYSTEMD_REQUIRED
173 174
])

175 176 177 178
PKG_CHECK_MODULES([NOTIFICATION_AREA], [
  gtk+-3.0 >= $GTK_REQUIRED
  x11
])
179

180 181 182 183
PKG_CHECK_MODULES([SEPARATOR], [
  gtk+-3.0 >= $GTK_REQUIRED
])

184
PKG_CHECK_MODULES([STATUS_NOTIFIER], [
185
  gio-unix-2.0 >= $GLIB_REQUIRED
186 187 188
  gtk+-3.0 >= $GTK_REQUIRED
])

189
PKG_CHECK_MODULES(WNCKLET, gtk+-3.0 >= $GTK_REQUIRED libwnck-3.0 >= $LIBWNCK_REQUIRED)
190 191 192
AC_SUBST(WNCKLET_CFLAGS)
AC_SUBST(WNCKLET_LIBS)

193 194 195
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNCS(nl_langinfo)

196 197 198
PKG_CHECK_MODULES([CLOCK], [
  dconf >= $DCONF_REQUIRED
  gio-2.0 >= $GLIB_REQUIRED
Alberts Muktupāvels's avatar
Alberts Muktupāvels committed
199
  gio-unix-2.0 >= $GLIB_REQUIRED
200 201 202 203 204 205 206
  glib-2.0 >= $GLIB_REQUIRED
  gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED
  gtk+-3.0 >= $GTK_REQUIRED
  gweather-3.0 >= $GWEATHER_REQUIRED
  pango >= $PANGO_REQUIRED
  polkit-gobject-1
])
207

208 209 210 211 212 213 214 215 216
# Check whether to enable e-d-s support for clock applet
AC_MSG_CHECKING([whether to enable evolution-data-server support])
AC_ARG_ENABLE([eds],
    AS_HELP_STRING([--enable-eds], [Whether to enable evolution-data-server support @<:@default=auto@:>@]),
    [], [enable_eds=auto])
AC_MSG_RESULT([$enable_eds])
CLOCK_EDS_ICONDIR=
if test "$enable_eds" != "no"; then
    PKG_CHECK_MODULES(CLOCK_EDS,[
217
        libecal-2.0 >= $LIBECAL_REQUIRED
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
        libedataserver-1.2 >= $LIBEDATASERVER_REQUIRED
     ], [have_eds=yes], [have_eds=no])

    if test "$enable_eds" = "yes" -a "$have_eds" = "no"; then
        AC_MSG_ERROR([evolution-data-server support was requested but required dependencies were not found: $CLOCK_EDS_PKG_ERRORS])
    elif test "$have_eds" = "yes"; then
        enable_eds=yes
        AC_DEFINE([HAVE_EDS], 1, [Define to enable evolution-data-server support])
        CLOCK_EDS_ICONDIR=`$PKG_CONFIG --variable=datadir evolution-data-server-1.2`/pixmaps/evolution-data-server
    else
        enable_eds=no
    fi
fi

AM_CONDITIONAL(ENABLE_EDS, test "$enable_eds" = "yes")
AC_SUBST(CLOCK_EDS_ICONDIR)

235 236 237 238 239
dnl **************************************************************************
dnl Check if struct dirent contains a d_type member, for run dialog
dnl **************************************************************************

AC_STRUCT_DIRENT_D_TYPE
240

241
dnl Applets dir
242 243
AC_SUBST([appletsdir],"\$(datadir)/gnome-panel/applets")
AC_SUBST([appletsdir_pkgconfig],"\${datadir}/gnome-panel/applets")
244

245
dnl gtk-doc stuff
246

247
GTK_DOC_CHECK([1.25], [--flavour no-tmpl])
248

249
dnl yelp-tools stuff
250

251
YELP_HELP_INIT
252

253 254 255 256 257
dnl **************************************************************************
dnl Find zoneinfo directory
dnl **************************************************************************

AX_ZONEINFO
258

259 260 261 262
dnl **************************************************************************
dnl Process .in files
dnl **************************************************************************

Christian Persch's avatar
Christian Persch committed
263
AC_CONFIG_FILES([
264 265 266 267 268 269 270 271 272 273
  Makefile

  data/Makefile
  data/16x16/Makefile
  data/22x22/Makefile
  data/24x24/Makefile
  data/32x32/Makefile
  data/48x48/Makefile
  data/scalable/Makefile

274 275 276
  data/pkgconfig/Makefile
  data/pkgconfig/libgnome-panel.pc

277 278 279 280
  data/theme/Makefile
  data/theme/Adwaita/Makefile
  data/theme/HighContrast/Makefile

281 282 283 284
  gnome-panel/Makefile
  gnome-panel/libpanel-applet-private/Makefile
  gnome-panel/libpanel-util/Makefile

285 286
  libgnome-panel/Makefile

287 288 289
  libpanel-applet/Makefile
  libpanel-applet/libpanel-applet.pc

290 291 292 293
  doc/Makefile
  doc/reference/Makefile
  doc/reference/libpanel-applet/Makefile

294 295 296 297 298
  help/Makefile
  help/clock/Makefile
  help/fish/Makefile

  man/Makefile
299 300

  modules/Makefile
301 302 303
  modules/clock/Makefile
  modules/clock/pixmaps/Makefile
  modules/fish/Makefile
304
  modules/menu/Makefile
305
  modules/notification-area/Makefile
306
  modules/separator/Makefile
307 308
  modules/status-notifier/Makefile
  modules/wncklet/Makefile
309 310

  po/Makefile.in
311
])
312

Christian Persch's avatar
Christian Persch committed
313 314
AC_OUTPUT

315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
dnl **************************************************************************
dnl Show summary
dnl **************************************************************************

echo ""
echo "  GNOME Panel $VERSION"
echo "  `echo GNOME Panel $VERSION | sed "s/./=/g"`"
echo ""
echo "  srcdir ..........................: ${srcdir}"
echo ""
echo "  compiler ........................: ${CC}"
echo "  cflags ..........................: ${CFLAGS}"
echo ""
echo "  prefix ..........................: ${prefix}"
echo "  exec_prefix .....................: ${exec_prefix}"
echo "  bindir ..........................: ${bindir}"
echo "  datadir .........................: ${datadir}"
echo "  libdir ..........................: ${libdir}"
echo "  libexecdir ......................: ${libexecdir}"
echo "  localstatedir ...................: ${localstatedir}"
echo "  sbindir .........................: ${sbindir}"
echo "  sysconfdir ......................: ${sysconfdir}"
echo ""
echo "  Maintainer mode .................: ${USE_MAINTAINER_MODE}"
echo ""
echo "  Evolution-Data-Server support ...: ${enable_eds}"
echo "  Build gtk-doc documentation .....: ${enable_gtk_doc}"
echo ""