File: configure.ac

package info (click to toggle)
telepathy-farstream 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 2,756 kB
  • ctags: 1,058
  • sloc: sh: 11,072; ansic: 9,131; python: 2,875; makefile: 223
file content (137 lines) | stat: -rw-r--r-- 4,516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
AC_PREREQ([2.59])

# Making releases:
#   set the new version number:
#     odd minor -> development series
#     even minor -> stable series
#     increment micro for each release within a series
#   set tp_farstream_release to 1

m4_define([tp_farstream_major_version], [0])
m4_define([tp_farstream_minor_version], [6])
m4_define([tp_farstream_micro_version], [2])
m4_define([tp_farstream_nano_version], [0])

dnl CURRENT, REVISION, AGE
dnl - library source changed -> increment REVISION
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
m4_define([tp_farstream_lt_current], [3])
m4_define([tp_farstream_lt_revision], [1])
m4_define([tp_farstream_lt_age], [0])


# Some magic
m4_define([tp_farstream_base_version],
          [tp_farstream_major_version.tp_farstream_minor_version.tp_farstream_micro_version])
m4_define([tp_farstream_version],
          [m4_if(tp_farstream_nano_version, 0, [tp_farstream_base_version],
              [tp_farstream_base_version].[tp_farstream_nano_version])])

AC_INIT([Telepathy-Farstream], [tp_farstream_version],
        [https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=tp-farstream])

AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([1.11 -Wno-portability])
AC_CONFIG_HEADERS(config.h)

dnl use pretty build output with automake >= 1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
  [AM_DEFAULT_VERBOSITY=1
   AC_SUBST(AM_DEFAULT_VERBOSITY)])

dnl check for tools
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_LIBTOOL

dnl decide error flags
AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
AS_COMPILER_FLAG(-Werror -Wno-error=deprecated-declarations, werror=yes, werror=no)

AC_ARG_ENABLE(Werror,
  AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
    werror=$enableval, :)

AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
AS_COMPILER_FLAG(-Wno-missing-field-initializers,
        wno_missing_field_initializers=yes,
        wno_missing_field_initializers=no)
AS_COMPILER_FLAG(-Wno-unused-parameter,
        wno_unused_parameter=yes,
        wno_unused_parameter=no)

ifelse(tp_farstream_nano_version, 0, [],
    [
        AS_IF([test x$werror = xyes],
            [ERROR_CFLAGS="$ERROR_CFLAGS -Werror -Wno-error=deprecated-declarations"])
	AS_IF([test x$wextra = xyes -a \
            x$wno_missing_field_initializers = xyes -a \
            x$wno_unused_parameter = xyes].
            [ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"])
    ])

AC_SUBST(ERROR_CFLAGS)

AC_ARG_ENABLE(coverage,       [  --enable-coverage         compile with coverage info],[enable_coverage=${enableval}],enable_coverage=no)
AS_IF([test "x$enable_coverage" = "xyes"],
	    [CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"])

CFLAGS="$CFLAGS"

dnl Check for Glib
PKG_CHECK_MODULES(GLIB, gobject-2.0 >= 2.32 glib-2.0 >= 2.32 gio-2.0)
AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations])
AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_32, [Prevent post 2.32 APIs])

AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

dnl Check for DBus
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60])

AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

dnl Check for Telepathy libraries
PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib >= 0.21])
AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_22, [Ignore post 0.22 deprecations])
AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_22, [Prevent post 0.22 APIs])
AC_DEFINE(TP_SEAL_ENABLE, 1, [Prevent to use sealed variables])
AC_DEFINE(TP_DISABLE_SINGLE_INCLUDE, 1, [Disable single include header])

AC_SUBST(TELEPATHY_CFLAGS)
AC_SUBST(TELEPATHY_LIBS)

dnl Check for farstream
PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2])

AC_SUBST(FARSTREAM_CFLAGS)
AC_SUBST(FARSTREAM_LIBS)

GOBJECT_INTROSPECTION_CHECK([1.30.0])

GTK_DOC_CHECK([1.17], [--flavour no-tmpl])

LT_CURRENT=tp_farstream_lt_current
LT_REVISION=tp_farstream_lt_revision
LT_AGE=tp_farstream_lt_age
AC_SUBST([LT_CURRENT])
AC_SUBST([LT_REVISION])
AC_SUBST([LT_AGE])


AC_OUTPUT( Makefile \
          doc/Makefile \
          doc/lib/Makefile \
          m4/Makefile \
          examples/Makefile \
          examples/python/Makefile \
          telepathy-farstream/Makefile  \
          telepathy-farstream/telepathy-farstream.pc \
          telepathy-farstream/telepathy-farstream-uninstalled.pc
          tools/Makefile
)