~tangerine-developers/tangerine/trunk

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
281
282
283
284
285
286
287
288
289
290
291
292
293
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.54])
AC_INIT([tangerine], [0.3.3])
AM_INIT_AUTOMAKE([foreign tar-pax])

AC_CONFIG_MACRO_DIR([m4])

dnl -- Intl

IT_PROG_INTLTOOL([0.35.0])
SHAMROCK_CONFIGURE_I18N(tangerine)

dnl -- Populate top_srcdir variable
top_srcdir=$(cd $(dirname $0) && pwd)

if test -d $top_srcdir/.bzr ; then
   VERSION_INFO=`bzr version-info --custom \
   --template="bzr {branch_nick} r{revno}"`
else
   VERSION_INFO="Release"
fi
AC_SUBST(VERSION_INFO)

dnl pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
        AC_MSG_ERROR([You need to install pkg-config])
fi

AC_PROG_SED
AC_PROG_INSTALL
AC_PROG_CC
AC_HEADER_STDC

SHAMROCK_FIND_C_SHARP_3_0_COMPILER

dnl libtool for libtangglue
AM_DISABLE_STATIC
AM_PROG_LIBTOOL

dnl Expansions
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR


dnl mono-zeroconf, taglib-sharp, glib-sharp, log4net
PKG_CHECK_MODULES(MONO_ZEROCONF, mono-zeroconf)
PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp)
PKG_CHECK_MODULES(LOG_4_NET, log4net)
PKG_CHECK_MODULES(NINI, nini-1.1)

AC_SUBST([MONO_ZEROCONF_LIBS])
AC_SUBST([TAGLIB_SHARP_LIBS])
AC_SUBST([LOG_4_NET_LIBS])
AC_SUBST([DB4O_LIBS])
AC_SUBST([NINI_LIBS])

dnl {{{ enable debug release configuration
AC_ARG_ENABLE(debug,
	    AC_HELP_STRING([--enable-debug],[Use 'DEBUG' Configuration [default=YES]]),
    	enable_debug=yes,
	    enable_debug=no)

AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
if test "x$enable_debug" = "xyes" ; then
        CONFIG_REQUESTED="yes"
fi
dnl }}}

dnl {{{ enable release build configuration
AC_ARG_ENABLE(release,
	    AC_HELP_STRING([--enable-release],[Use 'RELEASE' Configuration [default=NO]]),
		enable_release=yes,
		enable_release=no)

AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
if test "x$enable_release" = "xyes" ; then
    	CONFIG_REQUESTED="yes"
fi

if test -z "$CONFIG_REQUESTED" ; then
	    AM_CONDITIONAL(ENABLE_DEBUG, true)
fi
dnl }}}

have_inotify="no"
build_gui="no"
build_banshee_plugin="no"
build_itunes_plugin="no"
build_session_plugin="no"
build_spotlight_plugin="no"
build_prefpane="no"
platform="none"
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
    *-*-linux*|*-*-kfreebsd*)
        PKG_CHECK_MODULES(GLIB_SHARP_20, glib-sharp-2.0)
        AC_SUBST(GLIB_SHARP_20_LIBS)

        PKG_CHECK_MODULES(GTK_SHARP_20, gtk-sharp-2.0)
        AC_SUBST(GTK_SHARP_LIBS_20)

        PKG_CHECK_MODULES(GLADE_SHARP_20, glade-sharp-2.0)
        AC_SUBST(GLADE_SHARP_LIBS_20)

        PKG_CHECK_MODULES(NDESK_DBUS_10, ndesk-dbus-1.0)
        AC_SUBST([NDESK_DBUS_10_LIBS])

        PKG_CHECK_MODULES(NDESK_DBUS_GLIB_10, ndesk-dbus-glib-1.0)
        AC_SUBST([NDESK_DBUS_GLIB_10_LIBS])

        PKG_CHECK_MODULES(X_SESSION, sm)
        AC_SUBST([X_SESSION_LIBS])

        have_inotify=yes

        case $host in
             *-*-kfreebsd*)
                have_inotify=no
             ;;
        esac

        build_gui="yes"
        build_session_plugin="yes"
        platform="LINUX"
        ;;
    *-*-darwin*)
        have_inotify="no"
        build_gui="no"
        build_session_plugin="no"
        build_itunes_plugin="yes"
        build_spotlight_plugin="yes"
        build_prefpane="yes"
        platform="MACOSX"
        ;;
esac

dnl file {{{
AC_ARG_ENABLE(file,
        AC_HELP_STRING([--enable-file], [Build the file plugin (default: auto)]),
        file_beagle=$enableval,
        enable_file=auto)

if test "x$enable_file" != "xno"; then 
        PKG_CHECK_MODULES([DB4O], [db4o], HAVE_DB4O=yes, HAVE_DB4O=no)

        if test "x$enable_file" = "xyes" -a "x$HAVE_DB4O" = "xno"; then
				AC_MSG_ERROR([File support explicitly requested, but dependencies not met])
        fi
fi

if test "x$HAVE_DB4O" = "xyes"; then
        have_file=yes
else
        have_file=no
fi
dnl }}}

dnl beagle {{{
AC_ARG_ENABLE(beagle,
        AC_HELP_STRING([--enable-beagle], [Build the beagle plugin (default: auto)]),
        enable_beagle=$enableval,
        enable_beagle=auto)

if test "x$enable_beagle" != "xno"; then 
        PKG_CHECK_MODULES([BEAGLE], [beagle-0.0 >= 0.1.4], HAVE_BEAGLE=yes, HAVE_BEAGLE=no)

        if test "x$enable_beagle" = "xyes" -a "x$HAVE_BEAGLE" = "xno"; then
				AC_MSG_ERROR([Beagle support explicitly requested, but dependencies not met])
        fi
fi

if test "x$HAVE_BEAGLE" = "xyes"; then
        have_beagle=yes
else
        have_beagle=no
fi
dnl }}}

dnl banshee {{{
AC_ARG_ENABLE(banshee,
	AC_HELP_STRING([--enable-banshee], [Build plugin to share banshee library (default: NO)]),
	enable_banshee=$enableval,
	enable_banshee=auto)

if test "x$enable_banshee" != "xno"; then
        PKG_CHECK_MODULES([BANSHEE_INDEXER], [banshee-collection-indexer >= 1.4.2], HAVE_BANSHEE=yes, HAVE_BANSHEE=no)

        if test "x$enable_banshee" = "xyes" -a "x$HAVE_BANSHEE" = "xno"; then
                AC_MSG_ERROR([Banshee support explicitly requested, but dependencies not met])
        fi
fi

if test "x$HAVE_BANSHEE" = "xyes"; then
       have_banshee=yes
else
       have_banshee=no
fi
dnl }}}

dnl muine {{{
have_muine=no

AC_PATH_PROG(MUINE, muine)
if test "x$MUINE" != "x" ; then
    LIBMUINE32=`dirname $MUINE | sed -e "s/bin/lib\/muine\/libmuine.so/"`
    LIBMUINE64=`dirname $MUINE | sed -e "s/bin/lib64\/muine\/libmuine.so/"`

    LIBMUINE=bogus

    if test -f $LIBMUINE32; then \
        have_muine=yes
        LIBMUINE=$LIBMUINE32
    elif test -f $LIBMUINE64; then \
        have_muine=yes
        LIBMUINE=$LIBMUINE64
    fi
    
    AC_SUBST(LIBMUINE)
fi

AM_CONDITIONAL(BUILD_GUI, test "x$build_gui" = "xyes")       
AM_CONDITIONAL(BUILD_ITUNES_PLUGIN, test "x$build_itunes_plugin" = "xyes")
AM_CONDITIONAL(BUILD_PREFPANE, test "x$build_prefpane" = "xyes")
AM_CONDITIONAL(BUILD_SESSION_PLUGIN, test "x$build_session_plugin" = "xyes")
AM_CONDITIONAL(BUILD_SPOTLIGHT_PLUGIN, test "x$build_spotlight_plugin" = "xyes")
AM_CONDITIONAL(HAVE_BANSHEE, test "x$have_banshee" = "xyes")
AM_CONDITIONAL(HAVE_BEAGLE, test "x$have_beagle" = "xyes")
AM_CONDITIONAL(HAVE_DB4O, test "x$have_file" = "xyes")
AM_CONDITIONAL(HAVE_INOTIFY, test "x$have_inotify" = "xyes")       
AM_CONDITIONAL(HAVE_MUINE, test "x$have_muine" = "xyes")

dnl We need to copy Banshee.CollectionIndexer.dll; it's not in the GAC
BANSHEE_INDEXER_DLL=$(dirname $($PKG_CONFIG --variable=Libraries banshee-collection-indexer))
AC_SUBST([BANSHEE_INDEXER_DLL])

AC_CONFIG_FILES([
daap-sharp/daap-sharp.pc
daap-sharp/Makefile
data/Makefile
data/icons/Makefile
libtangglue/Makefile
Makefile
m4/Makefile
plugins/File/Makefile
plugins/Beagle/Makefile
plugins/Session/Makefile
plugins/Banshee/Makefile
plugins/LSongs/Makefile
plugins/Rhythmbox/Makefile
plugins/Amarok/Makefile
plugins/Muine/Makefile
plugins/Muine/src/MuineDatabase.cs
po/Makefile.in
Tangerine/Makefile
Tangerine/tangerine.pc
Tangerine.Daemon/Makefile
Tangerine.Daemon/tangerine
TangerinePrefPane/Makefile
TangerineProperties/Makefile
TangerineProperties/tangerine-properties
])

AC_OUTPUT

cat <<EOF

${PACKAGE}-${VERSION}

  Build Environment
    Install Prefix:     ${prefix}
    Mono C# Compiler:   ${MCS} ${GMCS_FLAGS}
    Mono Runtime:       ${MONO}
    Platform:           $platform

  Plugins:
    Amarok:             yes
    Beagle:             $have_beagle
    Banshee:            $have_banshee
    File:               $have_file
    LSongs:             yes
    Muine:              $have_muine
    Session:            $build_session_plugin
    ITunes:             $build_itunes_plugin
    Spotlight:          $build_spotlight_plugin

  Build GUI:            $build_gui

  Build/Development
    Release Build:      ${enable_release}

EOF