~ricmm/+junk/unity-lens_music-sc

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Ricardo Mendoza
  • Date: 2012-09-05 14:20:15 UTC
  • Revision ID: ricardo.mendoza@canonical.com-20120905142015-prem6hiyfshwgm8q
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT(unity-lens-music, 6.6.0, https://launchpad.net/unity-lens-music)
 
2
AC_COPYRIGHT([Copyright 2011-2012 Canonical])
 
3
 
 
4
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
5
 
 
6
#####################################################
 
7
# Silent build rules
 
8
#####################################################
 
9
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
10
 
 
11
AC_PREREQ(2.59)
 
12
 
 
13
AC_CONFIG_HEADERS([config.h])
 
14
 
 
15
#####################################################
 
16
# Init the other things we depend on
 
17
#####################################################
 
18
AM_MAINTAINER_MODE
 
19
AM_PROG_VALAC([0.16.0])
 
20
AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])
 
21
AC_PROG_CC
 
22
AM_PROG_CC_C_O
 
23
AC_HEADER_STDC
 
24
 
 
25
LT_INIT
 
26
AC_CONFIG_MACRO_DIR([m4])
 
27
 
 
28
#############################################
 
29
# Gettext
 
30
#############################################
 
31
GETTEXT_PACKAGE="$PACKAGE"
 
32
AC_SUBST(GETTEXT_PACKAGE)
 
33
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
 
34
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain])
 
35
AM_GLIB_GNU_GETTEXT
 
36
 
 
37
# AM_GNOME_GETTEXT above substs $DATADIRNAME
 
38
# this is the directory where the *.{mo,gmo} files are installed
 
39
localedir='${prefix}/${DATADIRNAME}/locale'
 
40
AC_SUBST(localedir)
 
41
 
 
42
IT_PROG_INTLTOOL([0.40.0])
 
43
 
 
44
AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory])
 
45
AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory])
 
46
AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory])
 
47
 
 
48
######################################################
 
49
# intltool rule for generating translated .lens file
 
50
######################################################
 
51
INTLTOOL_LENS_RULE='%.lens: %.lens.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
52
AC_SUBST(INTLTOOL_LENS_RULE)
 
53
 
 
54
#####################################################
 
55
# Check for module and library dependancies
 
56
#####################################################
 
57
GLIB_REQUIRED=2.27
 
58
PKG_CHECK_MODULES(LENS_DAEMON,
 
59
                  glib-2.0 >= $GLIB_REQUIRED
 
60
                  gobject-2.0 >= $GLIB_REQUIRED
 
61
                  gio-2.0 >= $GLIB_REQUIRED
 
62
                  gio-unix-2.0 >= $GLIB_REQUIRED
 
63
                  dee-1.0 >= 1.0.7
 
64
                  sqlite3 >= 3.7.7
 
65
                  gee-1.0
 
66
                  json-glib-1.0
 
67
                  unity >= 4.99.0
 
68
                  tdb >= 1.2.6)
 
69
 
 
70
PKG_CHECK_MODULES(PREVIEW_PLAYER,
 
71
                  glib-2.0 >= $GLIB_REQUIRED
 
72
                  gobject-2.0 >= $GLIB_REQUIRED
 
73
                  gio-2.0 >= $GLIB_REQUIRED
 
74
                  gstreamer-0.10 >= 0.10.36
 
75
                  gstreamer-pbutils-0.10 >= 0.10.36
 
76
                  )
 
77
 
 
78
AC_SUBST(LENS_DAEMON_CFLAGS)
 
79
AC_SUBST(LENS_DAEMON_LIBS)
 
80
AC_SUBST(PREVIEW_PLAYER_CFLAGS)
 
81
AC_SUBST(PREVIEW_PLAYER_LIBS)
 
82
 
 
83
#####################################################
 
84
# local install for distcheck and stand-alone running
 
85
#####################################################
 
86
with_localinstall="no"
 
87
AC_ARG_ENABLE(localinstall,
 
88
              AS_HELP_STRING([--enable-localinstall],
 
89
                             [Install all of the files locally instead of in system directories (for distcheck)]),
 
90
              with_localinstall=$enableval,
 
91
              with_localinstall=no)
 
92
 
 
93
AM_CONDITIONAL([HAVE_LOCALINSTALL], [test "x$with_localinstall" = "xyes"])
 
94
 
 
95
#####################################################
 
96
# Expand variables needed for config.vala
 
97
#####################################################
 
98
AS_AC_EXPAND(PREFIX, $prefix)
 
99
AC_SUBST(PREFIX)
 
100
 
 
101
AS_AC_EXPAND(DATADIR, $datarootdir)
 
102
AC_SUBST(DATADIR)
 
103
 
 
104
#####################################################
 
105
# Look for dbus service dir
 
106
#####################################################
 
107
if test "x$with_localinstall" = "xyes"; then
 
108
        DBUSSERVICEDIR="${datadir}/dbus-1/services/"
 
109
else
 
110
        DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
 
111
fi
 
112
AC_SUBST(DBUSSERVICEDIR)
 
113
 
 
114
#####################################################
 
115
# Look for correct Lenses dir
 
116
#####################################################
 
117
if test "x$with_localinstall" = "xyes"; then
 
118
        LENSESDIR="${datadir}/unity/lenses"
 
119
else
 
120
        LENSESDIR=`$PKG_CONFIG --variable=lensesdir unity`
 
121
fi
 
122
AC_SUBST(LENSESDIR)
 
123
 
 
124
#####################################################
 
125
# Create the Makefiles
 
126
#####################################################
 
127
AC_CONFIG_FILES([
 
128
  Makefile
 
129
  music.lens.in
 
130
  data/Makefile
 
131
  src/Makefile
 
132
  src/config.vala
 
133
  po/Makefile.in
 
134
  tests/Makefile
 
135
  tests/unit/Makefile
 
136
])
 
137
AC_OUTPUT
 
138
 
 
139
#####################################################
 
140
# Output the results
 
141
#####################################################
 
142
AC_MSG_NOTICE([
 
143
 
 
144
  Unity Music Lens Daemon $VERSION
 
145
  -------------------------------
 
146
 
 
147
  Prefix          : ${prefix}
 
148
  
 
149
  Local install   : ${with_localinstall}
 
150
 
 
151
  Extra CFlags    : ${CPPFLAGS} $MAINTAINER_CFLAGS
 
152
  Extra ValaFlags : ${CPPFLAGS} $MAINTAINER_VALAFLAGS
 
153
 
 
154
  Lenses Directory: ${LENSESDIR}
 
155
])