~ubuntu-branches/ubuntu/precise/rygel/precise

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Henriksson
  • Date: 2009-09-26 14:04:05 UTC
  • Revision ID: james.westby@ubuntu.com-20090926140405-d5x3j13k10psa1gu
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ(2.53)
 
2
AC_INIT([rygel],
 
3
        [0.4.1],
 
4
        [http://live.gnome.org/Rygel])
 
5
AC_CONFIG_AUX_DIR([build-aux])
 
6
 
 
7
# require automake-1.11 for vala support
 
8
AM_INIT_AUTOMAKE([1.11])
 
9
AC_CONFIG_SRCDIR([src/rygel/rygel-root-device.vala])
 
10
AM_CONFIG_HEADER([config.h])
 
11
AC_CONFIG_MACRO_DIR([m4])
 
12
AM_MAINTAINER_MODE
 
13
 
 
14
# Disable generation of static libraries
 
15
AC_DISABLE_STATIC
 
16
 
 
17
AC_ISC_POSIX
 
18
AC_PROG_CC
 
19
AC_STDC_HEADERS
 
20
AC_PROG_LIBTOOL
 
21
AC_FUNC_MMAP
 
22
 
 
23
VALA_REQUIRED=0.7.7
 
24
GUPNP_REQUIRED=0.13
 
25
GUPNP_AV_REQUIRED=0.5
 
26
GUPNP_VALA_REQUIRED=0.6
 
27
DBUS_GLIB_REQUIRED=0.74
 
28
GSTREAMER_REQUIRED=0.10.23
 
29
GIO_REQUIRED=2.16
 
30
GEE_REQUIRED=0.3.0
 
31
UUID_REQUIRED=1.41.3
 
32
LIBSOUP_REQUIRED=2.26.0
 
33
GTK_REQUIRED=2.16
 
34
LIBSQLITE3_REQUIRED=3.5
 
35
 
 
36
PKG_CHECK_MODULES(LIBGUPNP, gupnp-1.0 >= $GUPNP_REQUIRED)
 
37
PKG_CHECK_MODULES(LIBGUPNP_AV, gupnp-av-1.0 >= $GUPNP_AV_REQUIRED)
 
38
PKG_CHECK_MODULES(LIBDBUS_GLIB, dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
 
39
PKG_CHECK_MODULES(LIBGSTREAMER, gstreamer-0.10 >= $GSTREAMER_REQUIRED)
 
40
PKG_CHECK_MODULES(LIBGIO, gio-2.0 >= $GIO_REQUIRED)
 
41
PKG_CHECK_MODULES(GEE, gee-1.0 >= $GEE_REQUIRED)
 
42
PKG_CHECK_MODULES(UUID, uuid >= $UUID_REQUIRED)
 
43
PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= $LIBSOUP_REQUIRED)
 
44
PKG_CHECK_MODULES(LIBSQLITE3, sqlite3 >= $LIBSQLITE3_REQUIRED)
 
45
 
 
46
# glib-genmarshal
 
47
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
 
48
AC_SUBST(GLIB_GENMARSHAL)
 
49
 
 
50
AC_ARG_ENABLE(vala,
 
51
        [  --enable-vala          enable checks for vala],,
 
52
        enable_vala=no)
 
53
 
 
54
# Vala
 
55
if test x$enable_vala = xyes ; then
 
56
    # check for vala
 
57
    AM_PROG_VALAC([$VALA_REQUIRED])
 
58
 
 
59
    if test "x$VALAC" = "x"; then
 
60
        AC_MSG_ERROR([Cannot find the "valac" compiler in your PATH])
 
61
    fi
 
62
 
 
63
    PKG_CHECK_MODULES(GUPNP_VALA, gupnp-vala-1.0 >= $GUPNP_VALA_REQUIRED)
 
64
    VAPIDIR=`pkg-config --variable=vapidir vala-1.0`
 
65
 
 
66
    # FIXME: Whats the proper way for checking for particular Vala bindings
 
67
    AC_CHECK_FILE("${VAPIDIR}/gupnp-1.0.vapi",
 
68
                  true,
 
69
                  [AC_MSG_ERROR("Unable to find Vala bindings for gupnp-1.0")])
 
70
 
 
71
    AC_CHECK_FILE("${VAPIDIR}/gupnp-av-1.0.vapi",
 
72
                  true,
 
73
                  [AC_MSG_ERROR("Unable to find Vala bindings for gupnp-av-1.0")])
 
74
 
 
75
    AC_CHECK_FILE("${VAPIDIR}/dbus-glib-1.vapi",
 
76
                  true,
 
77
                  [AC_MSG_ERROR("Unable to find Vala bindings for dbus-glib-1")])
 
78
 
 
79
    AC_CHECK_FILE("${VAPIDIR}/gstreamer-0.10.vapi",
 
80
                  true,
 
81
                  [AC_MSG_ERROR("Unable to find Vala bindings for gstreamer-0.10")])
 
82
 
 
83
    AC_CHECK_FILE("${VAPIDIR}/gio-2.0.vapi",
 
84
                  true,
 
85
                  [AC_MSG_ERROR("Unable to find Vala bindings for gio-2.0")])
 
86
 
 
87
    AC_CHECK_FILE("${VAPIDIR}/gee-1.0.vapi",
 
88
                  true,
 
89
                  [AC_MSG_ERROR("Unable to find Vala bindings for gee-1.0")])
 
90
 
 
91
    AC_CHECK_FILE("${VAPIDIR}/sqlite3.vapi",
 
92
                  true,
 
93
                  [AC_MSG_ERROR("Unable to find Vala bindings for sqlite3")])
 
94
else
 
95
    VAPIDIR=`echo ${datadir}/vala/vapi`
 
96
fi
 
97
 
 
98
AC_SUBST(VAPIDIR)
 
99
 
 
100
# Maemo support
 
101
AC_ARG_ENABLE(maemo,
 
102
        [  --enable-maemo          enable maemo support],,
 
103
        enable_maemo=no)
 
104
 
 
105
# Debugging
 
106
AC_ARG_ENABLE(debug,
 
107
        [  --enable-debug          enable debugging],,
 
108
        enable_debug=no)
 
109
if test "x$enable_debug" = "xyes"; then
 
110
        CFLAGS="$CFLAGS -g"
 
111
fi
 
112
 
 
113
# Strict compiler
 
114
AC_ARG_ENABLE(strict-cc,
 
115
        [  --enable-strict-cc          enable strict C compiler],,
 
116
        enable_strict_cc=no)
 
117
if test "x$enable_strict_cc" = "xyes"; then
 
118
        CFLAGS="$CFLAGS -Wall -Werror"
 
119
else
 
120
        CFLAGS="$CFLAGS -w"
 
121
fi
 
122
 
 
123
# Run uninstalled
 
124
AC_ARG_ENABLE(uninstalled,
 
125
        [  --enable-uninstalled          run uninstalled],,
 
126
        enable_uninstalled=no)
 
127
if test "x$enable_uninstalled" = "xyes"; then
 
128
        AC_MSG_WARN("You want to run the tools uninstalled only? Fine!")
 
129
fi
 
130
 
 
131
# Check wether user wants to build UIs
 
132
AC_ARG_WITH( ui,
 
133
  AC_HELP_STRING([--disable-ui],[Don't build UI applications]),
 
134
  try_ui=$withval, try_ui=yes )
 
135
 
 
136
HAVE_GTK=no
 
137
if test x$try_ui = xyes ; then
 
138
    dnl check for gtk
 
139
    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED ,
 
140
      [
 
141
        AC_SUBST(GTK_CFLAGS)
 
142
        AC_SUBST(GTK_LIBS)
 
143
        if test x$enable_vala = xyes ; then
 
144
                AC_CHECK_FILE("${VAPIDIR}/gtk+-2.0.vapi",
 
145
                  [
 
146
                        HAVE_GTK=yes
 
147
                  ],
 
148
                  [
 
149
                        HAVE_GTK=no
 
150
                        AC_MSG_ERROR("Unable to find Vala bindings for gtk+-2.0")
 
151
                  ])
 
152
        else
 
153
                HAVE_GTK=yes
 
154
        fi
 
155
      ],
 
156
      [
 
157
        HAVE_GTK=no
 
158
        AC_MSG_WARN([gtk $GTK_REQUIRED or greater not found.])
 
159
        AC_MSG_WARN([UI applications will not be built.])
 
160
      ])
 
161
else
 
162
    AC_MSG_NOTICE([UI applications disabled.])
 
163
fi
 
164
 
 
165
if test x$HAVE_GTK = xno; then
 
166
  BUILD_UI=no
 
167
else
 
168
  BUILD_UI=yes
 
169
  AC_DEFINE(HAVE_GTK, , [Build UI applications])
 
170
fi
 
171
 
 
172
AC_SUBST(HAVE_GTK)
 
173
AM_CONDITIONAL(BUILD_UI, test x$BUILD_UI = xyes)
 
174
 
 
175
# Build test plugin
 
176
AC_ARG_ENABLE(test-plugin,
 
177
        [  --enable-test-plugin          build test plugin],,
 
178
        enable_test_plugin=no)
 
179
 
 
180
# Build Tracker plugin
 
181
AC_ARG_ENABLE(tracker-plugin,
 
182
        [  --enable-tracker-plugin      build tracker plugin],,
 
183
        enable_tracker_plugin=yes)
 
184
 
 
185
# Build MediaExport plugin
 
186
AC_ARG_ENABLE(media-export-plugin,
 
187
        [  --enable-media-export-plugin          build MediaExport plugin],,
 
188
        enable_media_export_plugin=yes)
 
189
 
 
190
# Build External plugin
 
191
AC_ARG_ENABLE(external-plugin,
 
192
        [  --enable-external-plugin          build External plugin],,
 
193
        enable_external_plugin=yes)
 
194
 
 
195
# Build Mediathek plugin
 
196
AC_ARG_ENABLE(mediathek-plugin,
 
197
        [  --enable-mediathek-plugin          build Mediathek plugin],,
 
198
        enable_mediathek_plugin=no)
 
199
 
 
200
# Build GstLaunch plugin
 
201
AC_ARG_ENABLE(gstlaunch-plugin,
 
202
        [  --enable-gstlaunch-plugin          build Gstreamer launchline plugin],,
 
203
        enable_gstlaunch_plugin=no)
 
204
 
 
205
 
 
206
AC_SUBST(abs_top_builddir)
 
207
 
 
208
AM_CONDITIONAL([UNINSTALLED], [test "x$enable_uninstalled" = "xyes"])
 
209
AM_CONDITIONAL([ENABLE_MAEMO], [test "x$enable_maemo" = "xyes"])
 
210
AM_CONDITIONAL([BUILD_TEST_PLUGIN], [test "x$enable_test_plugin" = "xyes"])
 
211
AM_CONDITIONAL([BUILD_TRACKER_PLUGIN],
 
212
               [test "x$enable_tracker_plugin" = "xyes"])
 
213
AM_CONDITIONAL([BUILD_MEDIATHEK_PLUGIN], [test "x$enable_mediathek_plugin" = "xyes"])
 
214
AM_CONDITIONAL([BUILD_MEDIA_EXPORT_PLUGIN], [test "x$enable_media_export_plugin" = "xyes"])
 
215
AM_CONDITIONAL([BUILD_EXTERNAL_PLUGIN], [test "x$enable_external_plugin" = "xyes"])
 
216
AM_CONDITIONAL([BUILD_GSTLAUNCH_PLUGIN], [test "x$enable_gstlaunch_plugin" = "xyes"])
 
217
 
 
218
# Gettext
 
219
GETTEXT_PACKAGE=rygel
 
220
AC_SUBST(GETTEXT_PACKAGE)
 
221
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], 
 
222
  [Define the gettext package to be used])
 
223
 
 
224
ALL_LINGUAS=""
 
225
AM_GLIB_GNU_GETTEXT
 
226
AM_GLIB_DEFINE_LOCALEDIR([LOCALEDIR])
 
227
 
 
228
dnl Shave the output
 
229
AM_SILENT_RULES([yes])
 
230
 
 
231
AC_OUTPUT([
 
232
Makefile
 
233
src/Makefile
 
234
src/rygel/Makefile
 
235
src/ui/Makefile
 
236
src/plugins/Makefile
 
237
src/plugins/media-export/Makefile
 
238
src/plugins/external/Makefile
 
239
src/plugins/gstlaunch/Makefile
 
240
src/plugins/mediathek/Makefile
 
241
src/plugins/tracker/Makefile
 
242
src/plugins/test/Makefile
 
243
data/Makefile
 
244
data/xml/Makefile
 
245
rygel-1.0.pc
 
246
])
 
247
 
 
248
echo "
 
249
 
 
250
                    ${PACKAGE} ${VERSION}
 
251
                    ============
 
252
 
 
253
 
 
254
        Prefix:                 ${prefix}
 
255
        Source code location:   ${srcdir}
 
256
        Compiler:               ${CC}
 
257
        CFLAGS:                 ${CFLAGS}
 
258
"