File: configure.ac

package info (click to toggle)
grilo 0.1.19-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,632 kB
  • sloc: ansic: 13,303; sh: 11,334; xml: 2,327; makefile: 481; python: 289
file content (280 lines) | stat: -rw-r--r-- 8,150 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
138
139
140
141
142
143
144
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
171
172
173
174
175
176
177
178
179
180
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#
# configure.ac
# 
# Author: Iago Toral Quiroga <itoral@igalia.com>
#
# Copyright (C) 2010, 2011 Igalia S.L.. All rights reserved.

m4_define([prj_name],    [grilo])
m4_define([prj_gir_name], [Grilo])
m4_define([grl_major_version], [0])
m4_define([grl_minor_version], [1])
m4_define([grl_micro_version], [19])
m4_define([prj_version], grl_major_version.grl_minor_version.grl_micro_version)

AC_INIT([prj_name],
        [prj_version],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=grilo;component=core],
        [prj_name],
        [http://live.gnome.org/Grilo])

AM_INIT_AUTOMAKE([foreign])

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src])

AM_CONFIG_HEADER(src/config.h)

AC_PROG_CC
AC_PROG_INSTALL

LT_PREREQ([2.2.6])
LT_INIT

AM_PROG_CC_C_O

AC_HEADER_STDC

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

# ----------------------------------------------------------
# ENVIRONMENT CONFIGURATION
# ----------------------------------------------------------

GNOME_COMPILE_WARNINGS([maximum])
CFLAGS+=" ${WARN_CFLAGS} -Wmissing-declarations -std=c99 "

GNOME_MAINTAINER_MODE_DEFINES

# ----------------------------------------------------------
# DEFINITIONS
# ----------------------------------------------------------

# ABI version

GRL_MAJORMINOR=grl_major_version.grl_minor_version
GRL_MAJORMINOR_NORM=grl_major_version[_]grl_minor_version
AC_SUBST(GRL_MAJORMINOR)
AC_SUBST(GRL_MAJORMINOR_NORM)
AC_DEFINE_UNQUOTED(GRL_MAJORMINOR, "$GRL_MAJORMINOR", [library major.minor version])

# Framework name (contains ABI version)

GRL_NAME="${PACKAGE_NAME}-${GRL_MAJORMINOR}"
AC_SUBST(GRL_NAME)
AC_DEFINE_UNQUOTED(GRL_NAME, "$GRL_NAME", [framework name])

# Give parameters a default value

if test $prefix = "NONE" ; then
	prefix="/usr/local"
fi

if test $libdir = "\${exec_prefix}/lib" ; then
	libdir="$prefix/lib"
fi

# Plugins directory

GRL_PLUGINS_DIR=`eval echo ${libdir}/${GRL_NAME}`
AC_SUBST(GRL_PLUGINS_DIR)
AC_DEFINE_UNQUOTED(GRL_PLUGINS_DIR, "$GRL_PLUGINS_DIR", [Plugins directory])

# ----------------------------------------------------------
# DEPENDENCIES
# ----------------------------------------------------------

PKG_CHECK_MODULES(DEPS, glib-2.0 >= 2.22 \
			gobject-2.0 \
			gmodule-2.0 \
			gio-2.0 \
			libxml-2.0)

GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
GLIB_MKENUMS=`pkg-config --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GLIB_MKENUMS)

# ----------------------------------------------------------
# UI Tool
# ----------------------------------------------------------

gtkver="gtk+-3.0"
PKG_CHECK_EXISTS([gtk+-3.0 >= 3.0], [gtkver="gtk+-3.0"], [gtkver="gtk+-2.0"])

PKG_CHECK_MODULES([GTU], [ ${gtkver} ],
                       [ BUILD_GRILO_TEST_UI=yes ],
                       [ BUILD_GRILO_TEST_UI=no ])

AM_CONDITIONAL(BUILD_GRILO_TEST_UI, test "x$BUILD_GRILO_TEST_UI" = "xyes")

# ----------------------------------------------------------
# NET LIBRARY
# ----------------------------------------------------------

PKG_CHECK_MODULES(NET, libsoup-2.4,
			HAVE_LIBSOUP=yes,
			HAVE_LIBSOUP=no)

PKG_CHECK_EXISTS([libsoup-2.4 >= 2.33.4],
		 [HAVE_CACHED_LIBSOUP=yes],
		 [HAVE_CACHED_LIBSOUP=no])
AC_ARG_ENABLE([grl_net],
        AS_HELP_STRING([--enable-grl-net],
                [Enable Grilo Net library (default: auto)]),
        [
                case "$enableval" in
                     yes)
                        if test "x$HAVE_LIBSOUP" = "xno"; then
                           AC_MSG_ERROR([libsoup-2.4 not found, install it or use --disable-grl-net])
                        fi
                        ;;
                     no)
                        HAVE_LIBSOUP=no
                        ;;
                esac
        ])

AM_CONDITIONAL(BUILD_GRILO_NET, test "x$HAVE_LIBSOUP" = "xyes")
AM_CONDITIONAL(BUILD_GRILO_NET_WITH_CACHE, test "x$HAVE_CACHED_LIBSOUP" = "xyes")

# ----------------------------------------------------------
# DEBUG SUPPORT
# ----------------------------------------------------------

AC_ARG_ENABLE(debug,
        AC_HELP_STRING([--enable-debug],
        [include debug symbols (default: no)]),,
        [enable_debug=no])

if test "x$enable_debug" = "xyes"; then
   AC_MSG_WARN("Configuring with debugging options enabled!")
	CFLAGS="$CFLAGS -g3 -O0"
fi

# ----------------------------------------------------------
# TESTS SUPPORT
# ----------------------------------------------------------

AC_ARG_ENABLE(tests,
        AC_HELP_STRING([--enable-tests],
        [build unit tests (default: no)]),,
        [enable_tests=no])

AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")

# ----------------------------------------------------------
# VALA BINDINGS
# ----------------------------------------------------------

AC_MSG_CHECKING([whether Vala plugin support is requested])
AC_ARG_ENABLE([vala],
        AS_HELP_STRING([--enable-vala],[Enable Vala plugin support]),
        [enable_vala=$enableval have_vala=$enableval],
        [enable_vala=autodetect have_vala=yes])
AC_MSG_RESULT([$enable_vala])
if test "x$enable_vala" != "xno"; then
	valapkg=""
	m4_foreach([VERSION], [[0.12], [0.14], [0.16], [0.18]],
		   [PKG_CHECK_EXISTS([ libvala-VERSION ],
                           [ valapkg="libvala-VERSION" ])
		   ])

	if test "x$valapkg" != "x"; then
	        PKG_CHECK_MODULES([VALA], [ ${valapkg} ],
				  [ with_vala="yes" ],
			          [ with_vala="no" ])
	else
               with_vala="no"
	fi

        if test "x$with_vala" = "xyes"; then
                AC_PATH_PROG([VALAC], [valac])
                if test "x$VALAC" = "x"; then
                        AC_MSG_ERROR([No Vala compiler found.])
                fi

                if test "x$VAPIDIR" = "x"; then
                        VAPIDIR=`$PKG_CONFIG --variable=vapidir $valapkg`
                fi
                AC_SUBST([VAPIDIR])

                AC_PATH_PROG([VALA_GEN_INTROSPECT], [vala-gen-introspect])
                if test "x$VALA_GEN_INTROSPECT" = "x"; then
                        AC_MSG_ERROR([Cannot find "vala-gen-introspect" in your PATH])
                fi

                AC_PATH_PROG([VAPIGEN], [vapigen])
                if test "x$VAPIGEN" = "x"; then
                        AC_MSG_ERROR([Cannot fine "vapigen" in your PATH])
                fi

        elif test "x$enable_vala" = "xyes"; then
                AC_MSG_ERROR([Vala plugin support explicitly requested, but not found])
        fi
fi
AM_CONDITIONAL(HAVE_VALA, test "x$with_vala" = "xyes")

# ----------------------------------------------------------
# GTK-DOC
# ----------------------------------------------------------

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

# ----------------------------------------------------------
# GOBJECT-INTROSPECTION
# ----------------------------------------------------------

GOBJECT_INTROSPECTION_CHECK([0.9])

# ----------------------------------------------------------
# GETTEXT
# ----------------------------------------------------------

#GETTEXT_PACKAGE=grilo
#AC_SUBST(GETTEXT_PACKAGE)
#AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])

#AM_GLIB_GNU_GETTEXT

# ----------------------------------------------------------
# WORKAROUNDS
# ----------------------------------------------------------

AC_SUBST([abs_top_builddir])
AC_SUBST([builddir])

# ----------------------------------------------------------
# OUTPUT
# ----------------------------------------------------------

if test "x$HAVE_LIBSOUP" = "xyes"; then
   AC_CONFIG_FILES([grilo-net-uninstalled.pc grilo-net-0.1.pc])
fi

AC_CONFIG_FILES([
  Makefile
  grilo-uninstalled.pc
  grilo-0.1.pc
  src/Makefile
  tests/Makefile
  tests/python/Makefile
  tests/python/util.py
  libs/Makefile
  libs/net/Makefile
  tools/Makefile
  tools/grilo-test-ui/Makefile
  tools/grilo-inspect/Makefile
  tools/vala/Makefile
  bindings/Makefile
  bindings/vala/Makefile
  bindings/vala/grilo-uninstalled.files
  bindings/vala/grilo-uninstalled.namespace
  bindings/vala/grilo-net-uninstalled.files
  bindings/vala/grilo-net-uninstalled.namespace
  doc/Makefile
  doc/grilo/Makefile
  examples/Makefile
])

AC_OUTPUT