configure.ac 9.81 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], [26])
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 30 31
dnl **************************************************************************
dnl Set release policy
dnl **************************************************************************

AX_IS_RELEASE([git-directory])

32 33 34 35 36 37 38 39 40 41 42 43
dnl **************************************************************************
dnl Enable debug
dnl **************************************************************************

AX_CHECK_ENABLE_DEBUG([yes])

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

AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS])

44 45 46 47 48 49 50 51 52 53 54 55 56 57
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])
58
LT_LIB_M
59

60 61 62 63 64 65 66 67 68
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])

69 70 71 72 73 74 75 76 77 78 79 80
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])

81 82 83 84 85 86
dnl **************************************************************************
dnl Desktop settings support
dnl **************************************************************************

GLIB_GSETTINGS

87 88 89 90 91 92 93 94
# 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

95
LIB_PANEL_APPLET_LT_VERSION=3:0:0
96 97
AC_SUBST(LIB_PANEL_APPLET_LT_VERSION)

98 99 100
LIBGNOME_PANEL_LT_VERSION=0:0:0
AC_SUBST([LIBGNOME_PANEL_LT_VERSION])

101 102 103 104 105
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)

106
LIBGNOME_DESKTOP_REQUIRED=2.91.0
107
GDK_PIXBUF_REQUIRED=2.26.0
108
PANGO_REQUIRED=1.15.4
109
GLIB_REQUIRED=2.45.3
110
GTK_REQUIRED=3.22.0
111
LIBWNCK_REQUIRED=3.4.6
112
LIBGNOME_MENU_REQUIRED=3.7.90
113 114
LIBECAL_REQUIRED=3.5.3
LIBEDATASERVER_REQUIRED=3.5.3
115
CAIRO_REQUIRED=1.0.0
116
GWEATHER_REQUIRED=3.17.1
117
DCONF_REQUIRED=0.13.4
118
XRANDR_REQUIRED=1.3.0
Elliot Lee's avatar
Elliot Lee committed
119

120
dnl pkg-config dependency checks
121

122 123 124 125 126 127
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
128
  gdm
129 130 131 132 133 134 135 136 137 138 139
  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
])

140 141 142 143 144
PKG_CHECK_MODULES([LIBGNOME_PANEL], [
  gio-2.0 >= $GLIB_REQUIRED
  gtk+-3.0 >= $GTK_REQUIRED
])

145 146 147 148 149 150 151 152
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
])
153

154
PKG_CHECK_MODULES(FISH, gtk+-3.0 >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
155 156 157
AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)

158 159 160 161 162
PKG_CHECK_MODULES([MENU], [
  gtk+-3.0 >= $GTK_REQUIRED
  libgnome-menu-3.0 >= $LIBGNOME_MENU_REQUIRED
])

163 164 165 166
PKG_CHECK_MODULES([NOTIFICATION_AREA], [
  gtk+-3.0 >= $GTK_REQUIRED
  x11
])
167

168 169 170 171
PKG_CHECK_MODULES([SEPARATOR], [
  gtk+-3.0 >= $GTK_REQUIRED
])

172 173 174 175
PKG_CHECK_MODULES([STATUS_NOTIFIER], [
  gtk+-3.0 >= $GTK_REQUIRED
])

176
PKG_CHECK_MODULES(WNCKLET, gtk+-3.0 >= $GTK_REQUIRED libwnck-3.0 >= $LIBWNCK_REQUIRED)
177 178 179
AC_SUBST(WNCKLET_CFLAGS)
AC_SUBST(WNCKLET_LIBS)

180 181 182
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNCS(nl_langinfo)

183 184 185 186 187 188 189 190 191 192
PKG_CHECK_MODULES([CLOCK], [
  dconf >= $DCONF_REQUIRED
  gio-2.0 >= $GLIB_REQUIRED
  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
])
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
# 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,[
        libecal-1.2 >= $LIBECAL_REQUIRED
        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)

221 222 223 224 225
dnl **************************************************************************
dnl Check if struct dirent contains a d_type member, for run dialog
dnl **************************************************************************

AC_STRUCT_DIRENT_D_TYPE
226

227
dnl Applets dir
228 229
AC_SUBST([appletsdir],"\$(datadir)/gnome-panel/applets")
AC_SUBST([appletsdir_pkgconfig],"\${datadir}/gnome-panel/applets")
230

231
dnl gtk-doc stuff
232

233
GTK_DOC_CHECK([1.25], [--flavour no-tmpl])
234

235
dnl yelp-tools stuff
236

237
YELP_HELP_INIT
238

239 240 241 242 243
dnl **************************************************************************
dnl Find zoneinfo directory
dnl **************************************************************************

AX_ZONEINFO
244

245 246 247 248
dnl **************************************************************************
dnl Process .in files
dnl **************************************************************************

249
AC_CONFIG_FILES([
250 251 252 253 254 255 256 257 258 259
  Makefile

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

260 261 262
  data/pkgconfig/Makefile
  data/pkgconfig/libgnome-panel.pc

263 264 265 266
  data/theme/Makefile
  data/theme/Adwaita/Makefile
  data/theme/HighContrast/Makefile

267 268 269 270
  gnome-panel/Makefile
  gnome-panel/libpanel-applet-private/Makefile
  gnome-panel/libpanel-util/Makefile

271 272
  libgnome-panel/Makefile

273 274 275
  libpanel-applet/Makefile
  libpanel-applet/libpanel-applet.pc

276 277 278 279
  doc/Makefile
  doc/reference/Makefile
  doc/reference/libpanel-applet/Makefile

280 281 282 283 284
  help/Makefile
  help/clock/Makefile
  help/fish/Makefile

  man/Makefile
285 286

  modules/Makefile
287 288 289
  modules/clock/Makefile
  modules/clock/pixmaps/Makefile
  modules/fish/Makefile
290
  modules/menu/Makefile
291
  modules/notification-area/Makefile
292
  modules/separator/Makefile
293 294
  modules/status-notifier/Makefile
  modules/wncklet/Makefile
295 296

  po/Makefile.in
297
])
298

299 300
AC_OUTPUT

301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
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 ""