configure.ac 20.9 KB
Newer Older
1
m4_define([goa_major_version], [3])
Debarshi Ray's avatar
Debarshi Ray committed
2
m4_define([goa_minor_version], [23])
Debarshi Ray's avatar
Debarshi Ray committed
3
m4_define([goa_micro_version], [4])
Debarshi Ray's avatar
Debarshi Ray committed
4
m4_define([goa_nano_version], [0])
5 6 7 8 9 10 11

m4_define([goa_base_version],
          [goa_major_version.goa_minor_version.goa_micro_version])
m4_define([goa_version],
          [m4_if(goa_nano_version, 0, [goa_base_version],
                 [goa_base_version].[goa_nano_version])])

Debarshi Ray's avatar
Debarshi Ray committed
12
AC_INIT([GNOME Online Accounts],
13
        [goa_version],
Debarshi Ray's avatar
Debarshi Ray committed
14 15
        [https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-online-accounts],
        [gnome-online-accounts])
David Zeuthen's avatar
David Zeuthen committed
16

17
AM_INIT_AUTOMAKE([1.9 foreign dist-xz no-dist-gzip tar-ustar])
18
AC_CONFIG_MACRO_DIR([m4])
David Zeuthen's avatar
David Zeuthen committed
19 20 21
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])

22
AM_MAINTAINER_MODE([enable])
David Zeuthen's avatar
David Zeuthen committed
23

24 25
GNOME_DEBUG_CHECK

David Zeuthen's avatar
David Zeuthen committed
26 27 28 29 30
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_PROG_LIBTOOL

31 32
PKG_PROG_PKG_CONFIG(0.16)

David Zeuthen's avatar
David Zeuthen committed
33 34
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

35 36 37 38 39 40 41 42
GOA_MAJOR_VERSION=goa_major_version
GOA_MINOR_VERSION=goa_minor_version
GOA_MICRO_VERSION=goa_micro_version

AC_SUBST(GOA_MAJOR_VERSION)
AC_SUBST(GOA_MINOR_VERSION)
AC_SUBST(GOA_MICRO_VERSION)

43 44 45 46 47 48 49 50 51 52 53 54
# 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
GOA_LT_VERSION=0:0:0
GOA_BACKEND_LT_VERSION=1:0:0
AC_SUBST(GOA_LT_VERSION)
AC_SUBST(GOA_BACKEND_LT_VERSION)

55 56 57 58 59 60 61 62 63 64
AC_DEFINE(GOA_MAJOR_VERSION,
          [goa_major_version],
          [Define to the GOA major version])
AC_DEFINE(GOA_MINOR_VERSION,
          [goa_minor_version],
          [Define to the GOA minor version])
AC_DEFINE(GOA_MICRO_VERSION,
          [goa_micro_version],
          [Define to the GOA micro version])

David Zeuthen's avatar
David Zeuthen committed
65 66 67
# Initialization
#

68
GLIB_GSETTINGS
David Zeuthen's avatar
David Zeuthen committed
69 70 71
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES

72 73 74 75 76 77 78 79 80
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)
if test x$enable_documentation = xyes; then
   AC_PATH_PROG([XSLTPROC], [xsltproc])
   if test -z "$XSLTPROC"; then
     AC_MSG_ERROR([xsltproc is needed])
   fi
81
fi
David Zeuthen's avatar
David Zeuthen committed
82

David Zeuthen's avatar
David Zeuthen committed
83 84
GTK_DOC_CHECK([1.3])

85 86 87
# Libraries
#

88
PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0 gio-unix-2.0 >= 2.40])
David Zeuthen's avatar
David Zeuthen committed
89 90 91
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

92
GOBJECT_INTROSPECTION_CHECK([0.6.2])
Debarshi Ray's avatar
Debarshi Ray committed
93
VAPIGEN_CHECK()
94

95 96 97 98 99 100 101 102 103 104 105 106
# Telepathy
AC_DEFINE(GOA_TELEPATHY_NAME, ["telepathy"], [ProviderType and extension point name])
AC_ARG_ENABLE([telepathy],
              [AS_HELP_STRING([--enable-telepathy],
              [Enable Telepathy IM provider])],
              [],
              [enable_telepathy=yes])
if test "$enable_telepathy" != "no"; then
  AC_DEFINE(GOA_TELEPATHY_ENABLED, 1, [Enable Telepathy data provider])
fi
AM_CONDITIONAL(BUILD_TELEPATHY, [test x$enable_telepathy != xno])

107 108 109 110 111 112 113 114 115 116
AC_ARG_ENABLE([backend],
              [AS_HELP_STRING([--enable-backend],
              [Enable goabackend library])],
	      [],
	      [enable_backend=yes])
AM_CONDITIONAL(BUILD_BACKEND, [test x$enable_backend != xno])

if test "$enable_backend" != "no"; then
  AC_DEFINE(GOA_BACKEND_ENABLED, 1, [Enable goabackend library])

117
  PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.19.12])
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
  AC_SUBST(GTK_CFLAGS)
  AC_SUBST(GTK_LIBS)

  PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.7.2])
  AC_SUBST(WEBKIT_GTK_CFLAGS)
  AC_SUBST(WEBKIT_GTK_LIBS)

  PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42])
  AC_SUBST(LIBSOUP_CFLAGS)
  AC_SUBST(LIBSOUP_LIBS)

  PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0])
  AC_SUBST(JSON_GLIB_CFLAGS)
  AC_SUBST(JSON_GLIB_LIBS)

  PKG_CHECK_MODULES(REST, [rest-0.7])
  AC_SUBST(REST_CFLAGS)
  AC_SUBST(REST_LIBS)

  PKG_CHECK_MODULES(SECRET, [libsecret-1])
  AC_SUBST(SECRET_CFLAGS)
  AC_SUBST(SECRET_LIBS)

  PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
  AC_SUBST(LIBXML_CFLAGS)
  AC_SUBST(LIBXML_LIBS)

145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
  if test "$enable_telepathy" != "no"; then
    PKG_CHECK_MODULES(TP, [telepathy-glib])
    AC_SUBST(TP_CFLAGS)
    AC_SUBST(TP_LIBS)

    # telepathy-account-widgets
    prev_top_build_prefix=$ac_top_build_prefix
    prev_ac_configure_args=$ac_configure_args
    ac_configure_args="$ac_configure_args --with-cheese=no --disable-gudev"
    # install the data together with the rest of GOA's data
    ac_configure_args="$ac_configure_args --with-pkgdatadir=${datadir}/gnome-online-accounts"
    # GOA ships its icons directly in ${datadir}/icons (usually /usr/share/icons/) and not
    # in its own data directory
    ac_configure_args="$ac_configure_args --with-icondir=${datadir}/icons"
    # Change the name of tpaw's .mo files to avoid conflicts with other packages using tp-aw
    ac_configure_args="$ac_configure_args --with-gettext-package=gnome-online-accounts-tpaw"
    # Disable the installation of the GSettings schema to avoid multiple components shipping
    # the same file. See https://bugzilla.gnome.org/show_bug.cgi?id=706803
    ac_configure_args="$ac_configure_args --disable-schemas-compile --disable-settings"
    AX_CONFIG_DIR([telepathy-account-widgets])
    ac_top_build_prefix=$prev_top_build_prefix
    ac_configure_args=$prev_ac_configure_args

    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-account-widgets/
    PKG_CHECK_MODULES(TPAW, telepathy-account-widgets)
  fi
171
fi
172

173 174 175 176 177 178 179 180 181
AC_ARG_ENABLE([inspector],
              [AS_HELP_STRING([--enable-inspector],
              [Enable a WebKitWebInspector for the embedded web view])],
              [],
              [enable_inspector=no])
if test "$enable_inspector" != "no"; then
  AC_DEFINE(GOA_INSPECTOR_ENABLED, 1, [Enable a WebKitWebInspector for the embedded web view])
fi

182 183 184 185 186 187 188
AC_ARG_WITH(template-file,
            [AS_HELP_STRING([--with-template-file],
                            [Path to the template file])],
                            [],
                            [])
AC_DEFINE_UNQUOTED(GOA_TEMPLATE_FILE, ["$with_template_file"], [Path to the template file])

189 190 191
# service providers
#

192
# Microsoft Exchange
193
AC_DEFINE(GOA_EXCHANGE_NAME, ["exchange"], [ProviderType and extension point name])
194 195 196 197
AC_ARG_ENABLE([exchange],
              [AS_HELP_STRING([--enable-exchange],
              [Enable Microsoft Exchange provider])],
              [],
198
              [enable_exchange=yes])
199 200 201 202
if test "$enable_exchange" != "no"; then
  AC_DEFINE(GOA_EXCHANGE_ENABLED, 1, [Enable Microsoft Exchange data provider])
fi

Willem van Engen's avatar
Willem van Engen committed
203
# Flickr
204
AC_DEFINE(GOA_FLICKR_NAME, ["flickr"], [ProviderType and extension point name])
Debarshi Ray's avatar
Debarshi Ray committed
205
AC_ARG_ENABLE([flickr], [AS_HELP_STRING([--enable-flickr], [Enable Flickr provider])], [], [enable_flickr=yes])
Willem van Engen's avatar
Willem van Engen committed
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
AC_ARG_WITH(flickr-consumer-key,
            [AS_HELP_STRING([--with-flickr-consumer-key],
                            [Flickr OAuth 1.0 consumer key])],
                            [],
                            [])
AC_ARG_WITH(flickr-consumer-secret,
            [AS_HELP_STRING([--with-flickr-consumer-secret],
                            [Flickr OAuth 1.0 consumer secret])],
                            [],
                            [])
if test "$with_flickr_consumer_key" = ""; then
  with_flickr_consumer_key=ed00ad7e0869897506e23c0d18e34d01
fi
if test "$with_flickr_consumer_secret" = ""; then
  with_flickr_consumer_secret=ebd556dd187188b1
fi
AC_DEFINE_UNQUOTED(GOA_FLICKR_CONSUMER_KEY, ["$with_flickr_consumer_key"], [Flickr OAuth 1.0 consumer key])
AC_DEFINE_UNQUOTED(GOA_FLICKR_CONSUMER_SECRET, ["$with_flickr_consumer_secret"], [Flickr OAuth 1.0 consumer secret])
if test "$enable_flickr" != "no"; then
  AC_DEFINE(GOA_FLICKR_ENABLED, 1, [Enable Flickr data provider])
fi

Damián Nohales's avatar
Damián Nohales committed
228 229 230 231 232 233
# Foursquare
AC_DEFINE(GOA_FOURSQUARE_NAME, ["foursquare"], [ProviderType and extension point name])
AC_ARG_ENABLE([foursquare],
              [AS_HELP_STRING([--enable-foursquare],
                              [Enable Foursquare provider])],
                              [],
234
                              [enable_foursquare=yes])
Damián Nohales's avatar
Damián Nohales committed
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
AC_ARG_WITH(foursquare-client-id,
            [AS_HELP_STRING([--with-foursquare-client-id],
                            [Foursquare OAuth 2.0 client id])],
                            [],
                            [])
if test "$with_foursquare_client_id" = ""; then
  with_foursquare_client_id="MBNU2NES5HASNDQJ25YPFGG2UGRZHPI3IYTNJGE0KIWT2HCF"
fi
AC_DEFINE_UNQUOTED(GOA_FOURSQUARE_CLIENT_ID,
                   ["$with_foursquare_client_id"],
                   [Foursquare OAuth 2.0 client id])
if test "$enable_foursquare" != "no"; then
  AC_DEFINE(GOA_FOURSQUARE_ENABLED, 1, [Enable Foursquare data provider])
fi

250
# Google
251
AC_DEFINE(GOA_GOOGLE_NAME, ["google"], [ProviderType and extension point name])
252
AC_ARG_ENABLE([google], [AS_HELP_STRING([--enable-google], [Enable Google provider])], [], [enable_google=yes])
253 254 255
AC_ARG_WITH(google-client-id,
            [AS_HELP_STRING([--with-google-client-id],
                            [Google OAuth 2.0 client id])],
256 257
                            [],
                            [])
258 259 260
AC_ARG_WITH(google-client-secret,
            [AS_HELP_STRING([--with-google-client-secret],
                            [Google OAuth 2.0 client secret])],
261 262
                            [],
                            [])
263
if test "$with_google_client_id" = ""; then
264
  with_google_client_id=44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com
265
fi
266
if test "$with_google_client_secret" = ""; then
267
  with_google_client_secret=-gMLuQyDiI0XrQS_vx_mhuYF
268
fi
269 270 271 272 273 274
AC_DEFINE_UNQUOTED(GOA_GOOGLE_CLIENT_ID,
                   ["$with_google_client_id"],
                   [Google OAuth 2.0 client id])
AC_DEFINE_UNQUOTED(GOA_GOOGLE_CLIENT_SECRET,
                   ["$with_google_client_secret"],
                   [Google OAuth 2.0 client secret])
275 276 277 278
if test "$enable_google" != "no"; then
  AC_DEFINE(GOA_GOOGLE_ENABLED, 1, [Enable Google data provider])
fi

Debarshi Ray's avatar
Debarshi Ray committed
279
# IMAP/SMTP
280
AC_DEFINE(GOA_IMAP_SMTP_NAME, ["imap_smtp"], [ProviderType and extension point name])
Debarshi Ray's avatar
Debarshi Ray committed
281 282 283 284
AC_ARG_ENABLE([imap-smtp],
              [AS_HELP_STRING([--enable-imap-smtp],
              [Enable IMAP/SMTP provider])],
              [],
285
              [enable_imap_smtp=yes])
Debarshi Ray's avatar
Debarshi Ray committed
286 287 288 289
if test "$enable_imap_smtp" != "no"; then
  AC_DEFINE(GOA_IMAP_SMTP_ENABLED, 1, [Enable IMAP/SMTP data provider])
fi

Pranav Kant's avatar
Pranav Kant committed
290
# Media Server
291
AC_DEFINE(GOA_MEDIA_SERVER_NAME, ["media-server"], [ProviderType and extension point name])
Pranav Kant's avatar
Pranav Kant committed
292 293 294 295 296 297 298 299 300
AC_ARG_ENABLE([media-server],
              [AS_HELP_STRING([--enable-media-server],
              [Enable Media Server provider])],
              [],
              [enable_media_server=no])
if test "$enable_media_server" != "no"; then
  AC_DEFINE(GOA_MEDIA_SERVER_ENABLED, 1, [Enable Media Server provider])
fi

Debarshi Ray's avatar
Debarshi Ray committed
301
# ownCloud
302
AC_DEFINE(GOA_OWNCLOUD_NAME, ["owncloud"], [ProviderType and extension point name])
Debarshi Ray's avatar
Debarshi Ray committed
303 304 305 306
AC_ARG_ENABLE([owncloud],
              [AS_HELP_STRING([--enable-owncloud],
              [Enable ownCloud provider])],
              [],
307
              [enable_owncloud=yes])
Debarshi Ray's avatar
Debarshi Ray committed
308 309 310 311
if test "$enable_owncloud" != "no"; then
  AC_DEFINE(GOA_OWNCLOUD_ENABLED, 1, [Enable ownCloud data provider])
fi

312
# Facebook
313
AC_DEFINE(GOA_FACEBOOK_NAME, ["facebook"], [ProviderType and extension point name])
314 315 316
AC_ARG_ENABLE([facebook], [AS_HELP_STRING([--enable-facebook],
                                          [Enable Facebook provider])],
                                          [],
317
                                          [enable_facebook=yes])
318
AC_ARG_WITH(facebook-client-id,
319 320 321 322
            [AS_HELP_STRING([--with-facebook-client-id],
                            [Facebook OAuth 2.0 client id])],
                            [],
                            [])
323

324
if test "$with_facebook_client_id" = ""; then
325
  with_facebook_client_id=297654143624603
326
fi
327 328 329
AC_DEFINE_UNQUOTED(GOA_FACEBOOK_CLIENT_ID,
                   ["$with_facebook_client_id"],
                   [Facebook OAuth 2.0 client id])
330 331 332 333
if test "$enable_facebook" != "no"; then
  AC_DEFINE(GOA_FACEBOOK_ENABLED, 1, [Enable Facebook data provider])
fi

334
# Windows Live
335
AC_DEFINE(GOA_WINDOWS_LIVE_NAME, ["windows_live"], [ProviderType and extension point name])
336 337 338 339 340 341 342
AC_ARG_ENABLE([windows-live], [AS_HELP_STRING([--enable-windows-live],
                                              [Enable Windows Live provider])],
                                              [],
                                              [enable_windows_live=yes])
AC_ARG_WITH(windows-live-client-id,
            [AS_HELP_STRING([--with-windows-live-client-id],
                            [Windows Live OAuth 2.0 client id])],
343 344
                            [],
                            [])
345 346
if test "$with_windows_live_client_id" = ""; then
  with_windows_live_client_id=0000000044067703
347
fi
348 349 350 351 352
AC_DEFINE_UNQUOTED(GOA_WINDOWS_LIVE_CLIENT_ID,
                   ["$with_windows_live_client_id"],
                   [Windows Live OAuth 2.0 client id])
if test "$enable_windows_live" != "no"; then
  AC_DEFINE(GOA_WINDOWS_LIVE_ENABLED, 1, [Enable Windows Live data provider])
353
fi
354

Bastien Nocera's avatar
Bastien Nocera committed
355
# Pocket
356
AC_DEFINE(GOA_POCKET_NAME, ["pocket"], [ProviderType and extension point name])
Bastien Nocera's avatar
Bastien Nocera committed
357 358 359
AC_ARG_ENABLE([pocket], [AS_HELP_STRING([--enable-pocket],
                                              [Enable Pocket provider])],
                                              [],
360
                                              [enable_pocket=yes])
Bastien Nocera's avatar
Bastien Nocera committed
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
AC_ARG_WITH(pocket-client-id,
            [AS_HELP_STRING([--with-pocket-client-id],
                            [Pocket OAuth 2.0 client id])],
                            [],
                            [])
if test "$with_pocket_client_id" = ""; then
  with_pocket_client_id="16630-40b25246b56e8ad5310b2883"
fi
AC_DEFINE_UNQUOTED(GOA_POCKET_CLIENT_ID,
                   ["$with_pocket_client_id"],
                   [Pocket OAuth 2.0 client id])
if test "$enable_pocket" != "no"; then
  AC_DEFINE(GOA_POCKET_ENABLED, 1, [Enable Pocket data provider])
fi

376
# Kerberos
377
AC_DEFINE(GOA_KERBEROS_NAME, ["kerberos"], [ProviderType and extension point name])
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
AC_ARG_ENABLE([kerberos],
              [AS_HELP_STRING([--enable-kerberos],
              [Enable kerberos support])],
              [with_kerberos=$enableval],
              [enable_kerberos=no])
AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)

if test "x$KRB5_CONFIG" != "xnone"; then
    KRB5_LIBS="`${KRB5_CONFIG} --libs krb5`"
    KRB5_CFLAGS="`${KRB5_CONFIG} --cflags krb5`"
    have_kerberos=yes
else
    KRB5_LIBS=""
    KRB5_CFLAGS=""
    have_kerberos=no
fi
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LIBS)

if test "$enable_kerberos" != "no"; then
  if test "$have_kerberos" = "no" ; then
      AC_MSG_ERROR([kerberos support requested, but not available])
  fi

  PKG_CHECK_MODULES(GCR, gcr-3)
  AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Define to use the GCR API])
404
  AC_DEFINE(GOA_KERBEROS_ENABLED, 1, [Enable Enterprise Identity data provider])
405 406 407
fi
AM_CONDITIONAL(BUILD_KERBEROS, [test x$enable_kerberos != xno])

Felipe Borges's avatar
Felipe Borges committed
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
# Last.fm
AC_DEFINE(GOA_LASTFM_NAME, ["lastfm"], [ProviderType and extension point name])
AC_ARG_ENABLE([lastfm], [AS_HELP_STRING([--enable-lastfm],
                                        [Enable Last.fm provider])],
                                        [],
                                        [enable_lastfm=no])
AC_ARG_WITH(lastfm-client-id,
            [AS_HELP_STRING([--with-lastfm-client-id],
                            [Last.fm client id])],
                            [],
                            [])
AC_ARG_WITH(lastfm-client-secret,
            [AS_HELP_STRING([--with-lastfm-client-secret],
                            [Last.fm client secret])],
                            [],
                            [])
if test "$with_lastfm_client_id" = ""; then
  with_lastfm_client_id="7a2461fe34c9c8124fb28ac750ba12fa"
fi
if test "$with_lastfm_client_secret" = ""; then
  with_lastfm_client_secret="49ec391644459c417f3afe57ca246c5a"
fi
AC_DEFINE_UNQUOTED(GOA_LASTFM_CLIENT_ID,
                   ["$with_lastfm_client_id"],
                   [LastFM client id])
AC_DEFINE_UNQUOTED(GOA_LASTFM_CLIENT_SECRET,
                   ["$with_lastfm_client_secret"],
                   [LastFM client secret])
if test "$enable_lastfm" != "no"; then
  AC_DEFINE(GOA_LASTFM_ENABLED, 1, [Enable LastFM data provider])
fi

440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
# Optional timerfd support
AC_MSG_CHECKING([for timerfd support])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <sys/timerfd.h>
#include <unistd.h>
],[
int
main (void)
{
  struct itimerspec timer_spec = { 0 };
  timerfd_settime (timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC),
                   TFD_TIMER_ABSTIME,
                   &timer_spec,
                   NULL);

  return 0;
}
])],
[have_timerfd=yes],
[have_timerfd=no])
AC_MSG_RESULT($have_timerfd)
if test x"$have_timerfd" = x"yes"; then
    AC_DEFINE(HAVE_TIMERFD, 1, [have timerfd support])

    dnl libc headers tend to trail kernel support
    dnl so compensate if necessary
    AC_MSG_CHECKING([for timerfd cancel-on-set support])
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
    #include <sys/timerfd.h>
    #include <unistd.h>
    ],[
    int
    main (void)
    {
      struct itimerspec timer_spec = { 0 };
      timerfd_settime (timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC),
                       TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET,
                       &timer_spec,
                       NULL);

      return 0;
    }
    ])],
    [have_tfd_timer_cancel_on_set=yes],
    [have_tfd_timer_cancel_on_set=no])
    AC_MSG_RESULT($have_tfd_timer_cancel_on_set)
    if test x"$have_tfd_timer_cancel_on_set" = x"no"; then
       AC_DEFINE(TFD_TIMER_CANCEL_ON_SET, [(1 << 1)], [have timerfd support])
    fi
fi

David Zeuthen's avatar
David Zeuthen committed
491 492 493
# Internationalization
#

494
IT_PROG_INTLTOOL([0.50.1])
495
GETTEXT_PACKAGE=gnome-online-accounts
David Zeuthen's avatar
David Zeuthen committed
496 497 498 499
AC_SUBST([GETTEXT_PACKAGE])
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])

500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
# goaconfig.h
#

AC_CONFIG_COMMANDS([src/goa/goaconfig.h],
[
	outfile=src/goa/goaconfig.h-tmp
	cat > $outfile <<\_______EOF
/* goaconfig.h
 *
 * This is a generated file.  Please modify 'configure.ac'
 */

#ifndef __GOA_CONFIG_H__
#define __GOA_CONFIG_H__

G_BEGIN_DECLS

_______EOF
	echo "#define GOA_MAJOR_VERSION $GOA_MAJOR_VERSION" >> $outfile
	echo "#define GOA_MINOR_VERSION $GOA_MINOR_VERSION" >> $outfile
	echo "#define GOA_MICRO_VERSION $GOA_MICRO_VERSION" >> $outfile
	cat >> $outfile <<\_______EOF

G_END_DECLS

#endif /* __GOA_CONFIG_H__ */
_______EOF


	if cmp -s $outfile src/goa/goaconfig.h; then
	  AC_MSG_NOTICE([src/goa/goaconfig.h is unchanged])
	  rm -f $outfile
	else
	  mv $outfile src/goa/goaconfig.h
	fi
],[
	GOA_MAJOR_VERSION=$GOA_MAJOR_VERSION
	GOA_MINOR_VERSION=$GOA_MINOR_VERSION
	GOA_MICRO_VERSION=$GOA_MICRO_VERSION
])

David Zeuthen's avatar
David Zeuthen committed
541 542 543 544 545
# Generate
#

AC_OUTPUT([
Makefile
David Zeuthen's avatar
David Zeuthen committed
546
data/Makefile
547 548 549 550 551 552
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
553
data/icons/96x96/Makefile
554
data/icons/256x256/Makefile
555
data/org.gnome.online-accounts.gschema.xml
David Zeuthen's avatar
David Zeuthen committed
556
src/Makefile
557
src/goa/Makefile
558
src/goa/goa-1.0.pc
559
src/goabackend/Makefile
560
src/goabackend/goa-backend-1.0.pc
561
src/goaidentity/Makefile
562
src/daemon/Makefile
563
src/examples/Makefile
David Zeuthen's avatar
David Zeuthen committed
564
po/Makefile.in
David Zeuthen's avatar
David Zeuthen committed
565 566
doc/Makefile
doc/version.xml
David Zeuthen's avatar
David Zeuthen committed
567 568 569 570
])

dnl ==========================================================================
echo "
571 572
               gnome-online-accounts $VERSION
             ===============================
David Zeuthen's avatar
David Zeuthen committed
573

Debarshi Ray's avatar
Debarshi Ray committed
574 575 576 577 578 579 580 581 582 583 584 585
	prefix:                         ${prefix}
	libdir:                         ${libdir}
	libexecdir:                     ${libexecdir}
	bindir:                         ${bindir}
	sbindir:                        ${sbindir}
	datadir:                        ${datadir}
	sysconfdir:                     ${sysconfdir}
	localstatedir:                  ${localstatedir}

	compiler:                       ${CC}
	cflags:                         ${CFLAGS}
	cppflags:                       ${CPPFLAGS}
586 587

	backend:                        ${enable_backend}
588
	inspector:		        ${enable_inspector}
Debarshi Ray's avatar
Debarshi Ray committed
589
	introspection:		        ${found_introspection}
590
	template file:		        ${with_template_file}
Debarshi Ray's avatar
Debarshi Ray committed
591

Willem van Engen's avatar
Willem van Engen committed
592
	Flickr provider:                ${enable_flickr} (OAuth 1.0, key:${with_flickr_consumer_key} secret:${with_flickr_consumer_secret})
Damián Nohales's avatar
Damián Nohales committed
593
	Foursquare provider:            ${enable_foursquare} (id:${with_foursquare_client_id})
594
	Google provider:                ${enable_google} (OAuth 2.0, id:${with_google_client_id} secret:${with_google_client_secret})
Debarshi Ray's avatar
Debarshi Ray committed
595
	IMAP/SMTP provider:             ${enable_imap_smtp}
Pranav Kant's avatar
Pranav Kant committed
596
	Media Server provider:          ${enable_media_server}
Debarshi Ray's avatar
Debarshi Ray committed
597
	Microsoft Exchange provider:    ${enable_exchange}
Debarshi Ray's avatar
Debarshi Ray committed
598
	ownCloud provider:              ${enable_owncloud}
599
	Kerberos provider:              ${enable_kerberos}
Debarshi Ray's avatar
Debarshi Ray committed
600 601
	Facebook provider:              ${enable_facebook} (OAuth 2.0, id:${with_facebook_client_id})
	Windows Live provider:          ${enable_windows_live} (OAuth 2.0, id:${with_windows_live_client_id})
602
        Telepathy provider:             ${enable_telepathy}
Bastien Nocera's avatar
Bastien Nocera committed
603
        Pocket provider:                ${enable_pocket} (id:${with_pocket_client_id})
Felipe Borges's avatar
Felipe Borges committed
604
	Last.fm provider:               ${enable_lastfm} (id:${with_lastfm_client_id} secret:${with_lastfm_client_secret})
Debarshi Ray's avatar
Debarshi Ray committed
605 606 607

	Maintainer mode:                ${USE_MAINTAINER_MODE}
	Building api docs:              ${enable_gtk_doc}
David Zeuthen's avatar
David Zeuthen committed
608
"