2 # arch-tag: Toplevel Autoconf configuration script
5 AC_CONFIG_MACRO_DIR(macros)
6 AM_CONFIG_HEADER(config.h)
7 AM_INIT_AUTOMAKE(rhythmbox, 0.9.6)
11 dnl XXXX hack to kill off all the libtool tags ...
12 dnl it isn't like we are using C++ or Fortran.
13 m4_define([_LT_AC_TAGCONFIG],[])
27 OLD_DBUS_MIN_REQS=0.31
29 TOTEM_PLPARSER_REQS=1.1.5
31 AC_MSG_CHECKING([for GNU extension fwrite_unlocked])
37 [[fwrite_unlocked ("foo", 1, sizeof ("foo"), stdout);]])],[have_fwrite_unlocked=yes])
38 if test x"$have_fwrite_unlocked" = xyes; then
39 AC_DEFINE(HAVE_GNU_FWRITE_UNLOCKED,1,[Define if you have GNU fwrite_unlocked])
46 AC_CHECK_FUNC(mkdtemp,
47 [AC_DEFINE([HAVE_MKDTEMP], 1, [Have GlibC function to make temp dirs])],
49 AM_CONDITIONAL(MKDTEMP_MISSING, test x$mkdtemp_missing = xtrue)
51 AC_CHECK_LIB(glib-2.0, g_utf8_collate_key_for_filename,
52 [AC_DEFINE([HAVE_COLLATE_KEY_FILENAME], 1, [Have glib function to collate filename sort keys])])
53 AC_CHECK_LIB(glib-2.0, g_mapped_file_new,
54 [AC_DEFINE([HAVE_G_MAPPED_FILE], 1, [Have glib mmap wrapper])])
58 PKG_CHECK_MODULES(RB_CLIENT, gnome-vfs-2.0 >= $GNOME_VFS_REQS)
60 PKG_CHECK_MODULES(RHYTHMBOX, \
61 gtk+-2.0 >= $GTK_REQS \
64 gnome-vfs-2.0 >= $GNOME_VFS_REQS \
67 PKG_CHECK_MODULES(TOTEM_PLPARSER, totem-plparser >= $TOTEM_PLPARSER_REQS, have_totem_plparser=yes, have_totem_plparser=no)
68 if test x$have_totem_plparser != xyes; then
69 AC_MSG_ERROR([totem playlist parsing library not found or too old])
73 AC_HELP_STRING([--without-hal],
74 [Disable HAL support]))
75 if test "x$with_hal" != "xno"; then
76 PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6, enable_hal05=yes, enable_hal05=no)
77 if test x$enable_hal05 != xyes; then
78 PKG_CHECK_MODULES(HAL, hal >= 0.2.92 hal < 0.5, enable_hal02=yes, enable_hal02=no)
80 if test x$enable_hal05 = xyes || test x$enable_hal02 = xyes; then
82 AC_DEFINE(HAVE_HAL, 1, [Define if you HAL support])
83 if test x$enable_hal05 = xyes; then
84 AC_DEFINE(HAVE_HAL_0_5, 1, [Define if you have HAL 0.5 or later])
86 AC_DEFINE(HAVE_HAL_0_2, 1, [Define if you have HAL 0.2 or later])
91 if test "x$with_hal" = "xyes"; then
92 AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
96 AM_CONDITIONAL(HAVE_HAL_0_5, test x"$enable_hal05" = xyes)
97 AM_CONDITIONAL(HAVE_HAL_0_2, test x"$enable_hal02" = xyes)
98 AM_CONDITIONAL(HAVE_HAL, test x"$enable_hal" = xyes)
103 AC_HELP_STRING([--with-ipod],
104 [Enable iPod support]),,
106 if test "x$with_ipod" != "xno"; then
108 PKG_CHECK_MODULES(IPOD, libgpod-1.0 >= 0.4, have_libgpod=yes, have_libgpod=no)
109 if test "x$have_libgpod" = "xno" -a "x$with_ipod" = "xyes"; then
110 AC_MSG_ERROR([iPod explicitly requested but libgpod couldn't be found])
112 if test "x$have_libgpod" = "xyes"; then
113 if test "x$with_hal" = xyes && test "x$enable_hal" = xno; then
114 AC_MSG_ERROR([iPod explicitly requested but HAL not found or too old])
116 if test "x$enable_hal" = xyes; then
117 AC_DEFINE(WITH_IPOD_SUPPORT, 1, [Define if iPod support is enabled])
120 AC_SUBST(IPOD_CFLAGS)
124 AM_CONDITIONAL(USE_IPOD, test x"$use_ipod" = xyes)
127 dnl gnome-keyring support
129 AC_ARG_WITH(gnome-keyring,
130 AC_HELP_STRING([--with-gnome-keyring],
131 [Enable gnome-keyring support]),,
132 with_gnome_keyring=auto)
133 if test "x$with_gnome_keyring" != "xno"; then
135 PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1, have_gnome_keyring=yes, have_gnome_keyring=no)
136 if test "x$have_gnome_keyring" = "xno" -a "x$with_gnome_keyring" = "xyes"; then
137 AC_MSG_ERROR([gnome-keyring support explicitly requested but gnome-keyring couldn't be found])
139 if test "x$have_gnome_keyring" = "xyes"; then
140 AC_DEFINE(WITH_GNOME_KEYRING, 1, [Define if gnome-keyring support is enabled])
141 use_gnome_keyring=yes
142 AC_SUBST(GNOME_KEYRING_CFLAGS)
143 AC_SUBST(GNOME_KEYRING_LIBS)
146 AM_CONDITIONAL(USE_GNOME_KEYRING, test x"$use_gnome_keyring" = xyes)
149 AC_ARG_WITH(database,
150 AC_HELP_STRING([--with-database=tree|libgda],
151 [Select the database to use (default tree)]),,
153 AM_CONDITIONAL(USE_TREEDB, test x"$with_database" = xtree)
154 AM_CONDITIONAL(USE_GDADB, test x"$with_database" = xlibgda)
158 case "x$with_database" in
160 AC_DEFINE(WITH_RHYTHMDB_TREE, 1, [Define if you are using the RhythmDB tree database])
163 AC_DEFINE(WITH_RHYTHMDB_GDA, 1, [Define if you are using the RhythmDB sqlite/libgda database])
164 dnl FIXME: check for sqlite, too?
165 PKG_CHECK_MODULES(GDA, libgda > 1.0.3)
168 AC_MSG_ERROR([Unknown database selected])
174 dnl Database debugging
175 AC_ARG_WITH(rhythmdb-debug,
176 AC_HELP_STRING([--with-rhythmdb-debug=0|1|2],
177 [Level of RhythmDB sanity checking]),,with_rhythmdb_debug=0)
178 if test x"${with_rhythmdb_debug}" != x0; then
179 AC_DEFINE_UNQUOTED([RHYTHMDB_ENABLE_SANITY_CHECK], "${with_rhythmdb_debug}", [Define to the level of RhythmDB sanity checking])
183 dnl Now we're ready to ask for gstreamer libs and cflags
184 dnl And we can also ask for the right version of gstreamer
187 GST_0_8_MAJORMINOR=0.8
188 GST_0_8_REQUIRED_VERSION=0.8.2
189 PKG_CHECK_MODULES(GSTREAMER_0_8, \
190 gstreamer-$GST_0_8_MAJORMINOR >= $GST_0_8_REQUIRED_VERSION gstreamer-libs-$GST_0_8_MAJORMINOR >= $GST_0_8_REQUIRED_VERSION
191 gstreamer-control-$GST_0_8_MAJORMINOR >= $GST_0_8_REQUIRED_VERSION
192 gstreamer-gconf-$GST_0_8_MAJORMINOR >= $GST_0_8_REQUIRED_VERSION,
193 have_gstreamer_0_8=yes,have_gstreamer_0_8=no)
195 GST_0_10_MAJORMINOR=0.10
196 GST_0_10_REQUIRED_VERSION=0.9.7
197 PKG_CHECK_MODULES(GSTREAMER_0_10, \
198 gstreamer-$GST_0_10_MAJORMINOR >= $GST_0_10_REQUIRED_VERSION
199 gstreamer-base-$GST_0_10_MAJORMINOR >= $GST_0_10_REQUIRED_VERSION
200 gstreamer-plugins-base-$GST_0_10_MAJORMINOR >= $GST_0_10_REQUIRED_VERSION,
201 have_gstreamer_0_10=yes,have_gstreamer_0_10=no)
203 AC_ARG_WITH(playback,
204 AC_HELP_STRING([--with-playback=auto|gstreamer-0-8|gstreamer-0-10],
205 [Select the playback backend to use (default auto)]),,
208 if test x$with_playback = xauto -o x$with_playback = xgstreamer-0-10; then
209 if test x"$have_gstreamer_0_10" = xyes; then
210 with_playback=gstreamer_0_10
211 SOUNDSYSTEM_DEPS="gstreamer-$GST_0_10_MAJORMINOR"
212 AC_DEFINE(HAVE_GSTREAMER,1,[Define if you want to use the GStreamer media framework])
213 AC_DEFINE(HAVE_GSTREAMER_0_10,1,[Define if you want to use the GStreamer 0.10])
214 SOUNDSYSTEM_CFLAGS="$GSTREAMER_0_10_CFLAGS"
215 SOUNDSYSTEM_LIBS="$GSTREAMER_0_10_LIBS"
216 elif test x$with_playback = xgstreamer-0-10; then
217 AC_MSG_ERROR([GStreamer 0.10 explicitly requested, and it was not found or older than version $GST_0_10_REQUIRED_VERSION, or gst-plugins-base was missing])
220 if test x$with_playback = xauto -o x$with_playback = xgstreamer-0-8; then
221 if test x"$have_gstreamer_0_8" = xyes; then
222 with_playback=gstreamer_0_8
223 SOUNDSYSTEM_DEPS="gstreamer-$GST_0_8_MAJORMINOR"
224 AC_DEFINE(HAVE_GSTREAMER,1,[Define if you want to use the GStreamer media framework])
225 AC_DEFINE(HAVE_GSTREAMER_0_8,1,[Define if you want to use the GStreamer 0.8])
226 SOUNDSYSTEM_CFLAGS="$GSTREAMER_0_8_CFLAGS"
227 SOUNDSYSTEM_LIBS="$GSTREAMER_0_8_LIBS"
228 elif test x$with_playback = xgstreamer-0-8; then
229 AC_MSG_ERROR([GStreamer 0.8 explicitly requested, and it was not found or older than version $GST_0_8_REQUIRED_VERSION])
232 AM_CONDITIONAL(USE_GSTREAMER_0_10, test x"$with_playback" = xgstreamer_0_10)
233 AM_CONDITIONAL(USE_GSTREAMER_0_8, test x"$with_playback" = xgstreamer_0_8)
235 dnl Give error and exit if we don't have gstreamer
236 if test x$with_playback = xauto; then
237 AC_MSG_ERROR([GStreamer not found, or older than version $GST_0_8_REQUIRED_VERSION/$GST_0_10_REQUIRED_VERSION])
240 AC_SUBST(SOUNDSYSTEM_DEPS)
241 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $SOUNDSYSTEM_CFLAGS"
242 RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $SOUNDSYSTEM_LIBS"
246 AC_ARG_ENABLE(tag-writing,
247 AC_HELP_STRING([--disable-tag-writing],
248 [Disable tag writing support in rhythmbox]))
249 if test x"$enable_tag_writing" != xno; then
250 AC_DEFINE(ENABLE_TAG_WRITING, 1, [Define if tag writing should be enabled])
254 AC_ARG_ENABLE(track-transfer,
255 AC_HELP_STRING([--disable-track-transfer],
256 [Disable track transfer support in rhythmbox]))
257 if test x"$enable_track_transfer" != xno; then
258 PKG_CHECK_MODULES(GNOME_MEDIA_PROFILES,
259 gnome-media-profiles >= 2.8,
260 with_track_transfer=yes,
261 with_track_transfer=no)
263 if test "x$with_track_transfer" = xno -a "x$enable_track_transfer" = xyes; then
264 AC_MSG_ERROR([Track transfer support explicitly requested but gnome-media-profiles not found.])
267 if test "x$with_track_transfer" = xyes; then
268 AC_DEFINE(ENABLE_TRACK_TRANSFER, 1, [Define if track transfer should be enabled])
271 AM_CONDITIONAL(ENABLE_TRACK_TRANSFER, test "x$with_track_transfer" = "xyes")
274 AC_ARG_ENABLE(ipod-writing,
275 AC_HELP_STRING([--disable-ipod-writing],
276 [Disable support for writing to ipods in rhythmbox]))
277 if test x"$enable_ipod_writing" != xno; then
278 if test "x$use_ipod" != xyes; then
279 if test "x$enable_ipod_writing" = xyes; then
280 AC_MSG_ERROR([iPod write support explicitly requested but iPod support is disabled.])
282 enable_ipod_writing = no
283 elif test "x$with_track_transfer" != xyes; then
284 if test "x$enable_ipod_writing" = xyes; then
285 AC_MSG_ERROR([iPod write support explicitly requested but track transfer support is disabled.])
287 enable_ipod_writing = no
289 AC_DEFINE(ENABLE_IPOD_WRITING, 1, [Define if ipod writing should be enabled])
295 AC_ARG_ENABLE(audioscrobbler,
296 AC_HELP_STRING([--disable-audioscrobbler],
297 [Disable Audioscrobbler support in Rhythmbox]))
299 dnl DAAP (iTunes Music Shares)
301 AC_HELP_STRING([--disable-daap],
302 [Disable Digital Audio Access Protocol (music sharing) in rhythmbox]))
305 AC_HELP_STRING([--with-mdns=auto|howl|avahi],
306 [Select the mDNS/DNS-SD implementation to use (default auto)]),,
315 PKG_CHECK_MODULES(AVAHI,
320 if test x$have_avahi_06 != xyes; then
321 PKG_CHECK_MODULES(AVAHI,
327 if test x$have_avahi_06 = xyes || test x$have_avahi_05 = xyes; then
333 PKG_CHECK_MODULES(HOWL,
338 if test x"$with_mdns" = xauto; then
339 if test x"$have_avahi" = xyes; then
340 MDNS_CFLAGS=$AVAHI_CFLAGS
341 MDNS_LIBS=$AVAHI_LIBS
342 AC_DEFINE(WITH_AVAHI, 1, [Define if mDNS/DNS-SD implementation uses Avahi])
344 AC_MSG_NOTICE([Detected Avahi, using it for mDNS/DNS-SD])
345 if test x$have_avahi_06 = xyes; then
346 AC_DEFINE(HAVE_AVAHI_0_6, 1, [Define if mDNS/DNS-SD implementation uses Avahi 0.6])
348 AC_DEFINE(HAVE_AVAHI_0_5, 1, [Define if mDNS/DNS-SD implementation uses Avahi 0.5])
352 elif test x"$have_howl" = xyes; then
353 MDNS_CFLAGS=$HOWL_CFLAGS
355 AC_DEFINE(WITH_HOWL, 1, [Define if mDNS/DNS-SD implementation uses Howl])
357 AC_MSG_NOTICE([Detected Howl, using it for mDNS/DNS-SD])
363 if test x"$with_mdns" = xhowl; then
364 if test x"$have_howl" = xno; then
365 AC_MSG_ERROR([Howl explicitly requested but not found. Install Howl or try --with-mdns=avahi])
368 MDNS_CFLAGS=$HOWL_CFLAGS
370 AC_DEFINE(WITH_HOWL, 1, [Define if mDNS/DNS-SD implementation uses Howl])
372 AC_MSG_NOTICE([Using Howl for mDNS/DNS-SD])
376 if test x"$with_mdns" = xavahi; then
377 if test x"$have_avahi" = xno; then
378 AC_MSG_ERROR([Avahi explicitly requested but not found. Install Avahi or try --with-mdns=howl])
381 MDNS_CFLAGS=$AVAHI_CFLAGS
382 MDNS_LIBS=$AVAHI_LIBS
383 AC_DEFINE(WITH_AVAHI, 1, [Define if mDNS/DNS-SD implementation uses Avahi])
385 AC_MSG_NOTICE([Using Avahi for mDNS/DNS-SD])
387 if test x$have_avahi_06 = xyes; then
388 AC_DEFINE(HAVE_AVAHI_0_6, 1, [Define if mDNS/DNS-SD implementation uses Avahi 0.6])
390 AC_DEFINE(HAVE_AVAHI_0_5, 1, [Define if mDNS/DNS-SD implementation uses Avahi 0.5])
396 AM_CONDITIONAL(USE_HOWL, test "x$use_howl" = "xyes")
397 AM_CONDITIONAL(USE_AVAHI, test "x$use_avahi" = "xyes")
399 LIBNOTIFY_REQUIRED=0.2.2
400 AC_ARG_ENABLE(libnotify,
401 AC_HELP_STRING([--disable-libnotify],
402 [Disable libnotify support]),,
403 enable_libnotify=auto)
404 if test "x$enable_libnotify" != "xno"; then
405 PKG_CHECK_MODULES(NOTIFY, \
406 libnotify >= $LIBNOTIFY_REQUIRED,
409 if test "x$have_libnotify" = "xno" -a "x$enable_libnotify" = "xyes"; then
410 AC_MSG_ERROR([libnotify support explicitly requested, but libnotify couldn't be found])
412 if test "x$have_libnotify" = "xyes"; then
416 AM_CONDITIONAL(USE_NOTIFY, test x"$enable_libnotify" = xyes)
417 if test x$enable_libnotify = xyes ; then
418 # Find out the version of LIBNOTIFY we're using
419 libnotify_version=`pkg-config --modversion libnotify`
420 LIBNOTIFY_VERSION_MAJOR=`echo $libnotify_version | awk -F. '{print $1}'`
421 LIBNOTIFY_VERSION_MINOR=`echo $libnotify_version | awk -F. '{print $2}'`
422 LIBNOTIFY_VERSION_MICRO=`echo $libnotify_version | awk -F. '{print $3}'`
423 if test "z$LIBNOTIFY_VERSION_MAJOR" = "z"; then
424 LIBNOTIFY_VERSION_MAJOR="0"
426 if test "z$LIBNOTIFY_VERSION_MINOR" = "z"; then
427 LIBNOTIFY_VERSION_MINOR="0"
429 if test "z$LIBNOTIFY_VERSION_MICRO" = "z"; then
430 LIBNOTIFY_VERSION_MICRO="0"
432 echo "Your libnotify version is $LIBNOTIFY_VERSION_MAJOR,$LIBNOTIFY_VERSION_MINOR,$LIBNOTIFY_VERSION_MICRO."
433 NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MAJOR=$LIBNOTIFY_VERSION_MAJOR"
434 NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MINOR=$LIBNOTIFY_VERSION_MINOR"
435 NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MICRO=$LIBNOTIFY_VERSION_MICRO"
437 AC_DEFINE(HAVE_NOTIFY, 1, [Define if libnotify support is enabled])
438 AC_SUBST(NOTIFY_CFLAGS)
439 AC_SUBST(NOTIFY_LIBS)
442 dnl Check for libsoup, needed for DAAP and audioscrobbler
443 if test "x$enable_daap" = "xyes" || test "x$enable_audioscrobbler" != "xno"; then
444 PKG_CHECK_MODULES(SOUP, \
448 if test x"$have_libsoup" = "xno"; then
449 PKG_CHECK_MODULES(SOUP,
454 if test x"$have_libsoup" = "xyes"; then
455 AC_DEFINE(HAVE_LIBSOUP, 1, [Define if libsoup support is enabled])
459 AM_CONDITIONAL(USE_LIBSOUP, test x"$have_libsoup" = "xyes")
462 dnl audioscrobbler support
463 if test "x$enable_audioscrobbler" != "xno"; then
464 if test x"$have_libsoup" = "xno"; then
465 if test "x$enable_audioscrobbler" = "xyes"; then
466 AC_MSG_ERROR([AudioScrobbler support explicitly requested, but no libsoup found. Install libsoup])
468 enable_audioscrobbler=no
470 AC_DEFINE(WITH_AUDIOSCROBBLER, 1, [define if Audioscrobbler support should be enabled])
473 AM_CONDITIONAL(WITH_AUDIOSCROBBLER, test "x$enable_audioscrobbler" != "xno")
477 if test "x$enable_daap" != "xno"; then
478 if test x"$have_libsoup" = "xno"; then
479 if test "x$enable_daap" = "xyes"; then
480 AC_MSG_ERROR([DAAP support explicitly requested, but no libsoup found. Install libsoup])
483 elif test x"$have_mdns" = xno; then
484 if test "x$enable_daap" = "xyes"; then
485 AC_MSG_ERROR([DAAP support explicitly requested, but no mDNS implementation found. Install Howl or Avahi])
489 AC_DEFINE(WITH_DAAP_SUPPORT, 1, [Define if DAAP should be enabled])
491 AC_SUBST(MDNS_CFLAGS)
495 AM_CONDITIONAL(USE_DAAP, test "x$enable_daap" != "xno")
497 AC_CHECK_LIB(z, uncompress)
501 dnl check for MusicBrainz
502 AC_ARG_ENABLE(musicbrainz, AC_HELP_STRING([--disable-musicbrainz],
503 [don't build with MusicBrainz support]))
504 if test x"$enable_musicbrainz" != "xno"; then
505 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, enable_musicbrainz=yes,
506 enable_musicbrainz=no)
508 if test x"$enable_musicbrainz" = xyes; then
509 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $MUSICBRAINZ_CFLAGS"
510 RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $MUSICBRAINZ_LIBS"
511 AC_DEFINE(HAVE_MUSICBRAINZ, 1, [define if you have Musicbrainz])
513 AM_CONDITIONAL(HAVE_MUSICBRAINZ, test "x$enable_musicbrainz" = "xyes")
519 if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
520 CFLAGS=$CFLAGS -I`echo $x_includes | sed -e "s/:/ -I/g"`
522 if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
523 LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
528 #include <X11/extensions/xidle.h>
529 int main(int argc,char **argv) {
533 AC_MSG_CHECKING(for XIDLE extension)
534 AC_MSG_RESULT($have_xidle)
535 if test x"$have_xidle" = "xyes" ; then
536 AC_DEFINE(HAVE_XIDLE_EXTENSION, 1, [defined if you have X11/extensions/xidle.h])
542 #include <X11/XF86keysym.h>
543 int main(int argc,char **argv) {
547 AC_MSG_CHECKING(for XFree86 headers)
548 AC_MSG_RESULT($have_xfree)
549 if test x"$have_xfree" = "xyes" ; then
550 AC_DEFINE(HAVE_XFREE, 1, [defined if you have X11/XF86keysym.h])
553 AC_ARG_ENABLE(mmkeys, AC_HELP_STRING([--disable-mmkeys],
554 [don't build with Multimedia Keys support]))
555 if test x"$have_xfree" = xyes; then
556 if test x"$enable_mmkeys" != xno; then
558 AC_DEFINE(HAVE_MMKEYS, 1, [define if Multimedia Keys are enabled])
561 if test x"$enable_mmkeys" = xyes; then
562 AC_MSG_ERROR([Multimedia keys explicitly requested but no support found])
566 dnl CD burner support
567 AC_ARG_WITH(cd-burning,
568 AC_HELP_STRING([--with-cd-burning],
569 [Enable CD burning support]),,
570 with_cd_burning=auto)
571 if test "x$with_cd_burning" != "xno"; then
572 NCB_DRIVE_DOOR_VERSION=2.11.3
573 PKG_CHECK_MODULES(LIBNAUTILUS_BURN, [libnautilus-burn >= $NCB_MIN_REQS], have_cd_burner=yes, have_cd_burner=no)
574 if test "x$have_cd_burner" = xno; then
575 AC_MSG_ERROR([libnautilus-burn not found or too cold])
578 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_door_is_open,
579 [AC_DEFINE([HAVE_BURN_DRIVE_DOOR], 1, [Have nautilus-burn function to check drive door state])],
580 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
581 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_unref,
582 [AC_DEFINE([HAVE_BURN_DRIVE_UNREF], 1, [Have nautilus-burn 2.13 drive unref function])],
583 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
584 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_new_from_path,
585 [AC_DEFINE([HAVE_BURN_DRIVE_NEW_FROM_PATH], 1, [Have nautilus-burn 2.13 drive new_from_path function])],
586 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
587 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_get_write_speeds,
588 [AC_DEFINE([HAVE_BURN_DRIVE_GET_WRITE_SPEEDS], 1, [Have nautilus-burn 2.13 drive get_write_speeds])],
589 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
591 AC_DEFINE([HAVE_NAUTILUS_BURN], 1, [Have nautilus-burn])
594 AM_CONDITIONAL(USE_CD_BURNING, test "x$with_cd_burning" != "xno")
599 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
600 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
601 AC_PATH_PROG(GCONFTOOL, gconftool-2)
603 AC_SUBST(RHYTHMBOX_CFLAGS)
604 AC_SUBST(RHYTHMBOX_LIBS)
605 AC_SUBST(RB_CLIENT_CFLAGS)
606 AC_SUBST(RB_CLIENT_LIBS)
608 AC_TRY_RUN([#include <time.h>
614 if (strftime(buf, 100, "%EY", &tm) == 4 &&
615 strcmp (buf, "1999")==0)
620 AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
623 GETTEXT_PACKAGE=rhythmbox
624 AC_SUBST(GETTEXT_PACKAGE)
625 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
626 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
627 ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"
631 dnl Workaround for automake 1.8
632 AC_SUBST(mkdir_p) if test x"$mkdir_p" = "x"; then
633 MKINSTALLDIRS="mkinstalldirs"
635 AC_SUBST(MKINSTALLDIRS)
637 AS_AC_EXPAND(DATADIR, $datadir)
640 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_MIN_REQS, enable_dbus=yes, enable_dbus=no)
641 if test "x$enable_dbus" = xno; then
642 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $OLD_DBUS_MIN_REQS, enable_old_dbus=yes, enable_old_dbus=no)
643 if test "x$enable_old_dbus" = xno; then
644 AC_MSG_ERROR([DBUS not found or too old])
646 AC_DEFINE(WITH_OLD_DBUS, 1, [Define if old D-BUS is enabled])
648 AC_DEFINE(WITH_DBUS, 1, [Define if D-BUS is enabled])
651 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
652 DBUS_GLIB_BIN="`$PKG_CONFIG --variable=exec_prefix dbus-glib-1`/bin"
653 AC_SUBST(DBUS_GLIB_BIN)
654 AM_CONDITIONAL(WITH_DBUS, test "x$enable_dbus" = "xyes")
655 AM_CONDITIONAL(WITH_OLD_DBUS, test "x$enable_old_dbus" = "xyes")
657 dnl out-of-process metadata reader (requires dbus)
658 AC_ARG_WITH(metadata-helper,
659 AC_HELP_STRING([--with-metadata-helper],
660 [Use a separate process for metadata reading]),,
661 with_metadata_helper=auto)
662 enable_metadata_helper=no
663 if test "x$with_metadata_helper" != xno; then
664 if test "x$enable_dbus" = xyes || test "x$enable_old_dbus" = xyes; then
665 AC_DEFINE(WITH_METADATA_HELPER, 1, [Define if the metadata helper process is enabled])
666 enable_metadata_helper=yes
667 elif test "x$with_metadata_helper" = xyes; then
668 AC_MSG_ERROR([Metadata helper process explicitly requested, but D-BUS is not enabled])
671 AM_CONDITIONAL(WITH_METADATA_HELPER, test "x$enable_metadata_helper" = "xyes")
677 AC_HELP_STRING([--enable-lirc],[enable lirc support]))
679 if test x"$enable_lirc" != xno; then
680 AC_CHECK_HEADER(lirc/lirc_client.h,[with_lirc=yes],[with_lirc=no])
681 if test x"$with_lirc" = xyes; then
682 AC_CHECK_LIB(lirc_client,lirc_init,[with_lirc=yes],[with_lirc=no])
684 if test x"$with_lirc" = xno -a x"$enable_lirc" = xyes; then
685 AC_MSG_ERROR([lirc explicitly requested but no support found])
688 AM_CONDITIONAL(WITH_LIRC, test x"$with_lirc" = xyes)
691 AC_ARG_ENABLE(uninstalled-build,
692 AC_HELP_STRING([--enable-uninstalled-build],
693 [Search for files in build directory as well]),
694 enable_uninstalled=yes,)
695 if test x"$enable_uninstalled" = xyes; then
696 AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_DIR,"`pwd`/data",[path to source data dir])
697 AC_DEFINE_UNQUOTED(METADATA_UNINSTALLED_DIR,"`pwd`/metadata",[path to metadata build dir])
700 AC_ARG_WITH(internal-libsexy,
701 AC_HELP_STRING([--with-internal-libsexy],
702 [Build using internal libsexy library]),,
703 with_internal_libsexy=no)
704 if test "x$with_internal_libsexy" = "xno"; then
705 PKG_CHECK_MODULES(LIBSEXY, libsexy >= 0.1.5, with_internal_libsexy=no,
706 with_internal_libsexy=yes)
708 AC_SUBST(LIBSEXY_CFLAGS)
709 AC_SUBST(LIBSEXY_LIBS)
710 AM_CONDITIONAL(WITH_INTERNAL_LIBSEXY, test "x$with_internal_libsexy" = "xyes")
712 dnl warnings bits, copied from gnome-keyring configure.in
713 dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
715 AC_ARG_ENABLE(more-warnings,
716 [ --enable-more-warnings Maximum compiler warnings],
717 set_more_warnings="$enableval",[
718 if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS" || test -d "$srcdir/_darcs"; then
719 set_more_warnings=yes
724 AC_MSG_CHECKING(for more warnings, including -Werror)
725 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
728 -Wcomment -Wformat -Wnonnull -Wimplicit-int -Wimplicit \
729 -Wmain -Wmissing-braces -Wparentheses -Wsequence-point \
730 -Wreturn-type -Wswitch -Wtrigraphs -Wunused-function \
731 -Wunused-label -Wunused-value \
732 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
733 -Wnested-externs -Wpointer-arith \
737 if echo "$CFLAGS" | grep -e '-O[1-9]'; then
738 WARN_CFLAGS="-Wuninitialized $WARN_CFLAGS"
741 for option in $WARN_CFLAGS; do
742 SAVE_CFLAGS="$CFLAGS"
743 CFLAGS="$CFLAGS $option"
744 AC_MSG_CHECKING([whether gcc understands $option])
745 AC_TRY_COMPILE([], [],
748 if test x$has_option = xyes; then
749 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $option"
751 AC_MSG_RESULT($has_option)
752 CFLAGS="$SAVE_CFLAGS"
758 SAVE_CFLAGS="$CFLAGS"
759 CFLAGS="$CFLAGS -Wno-error"
760 AC_TRY_COMPILE([], [],
761 WNOERROR_CFLAGS="-Wno-error",
763 AC_SUBST(WNOERROR_CFLAGS)
764 CFLAGS="$SAVE_CFLAGS"
774 dnl Enable gnome-doc-utils
778 dnl ================================================================
780 dnl ================================================================
782 PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
783 AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
785 AS_AC_EXPAND(PLUGINDIR, ${libdir}/rhythmbox/plugins)
788 dnl ================================================================
790 dnl ================================================================
792 AC_MSG_CHECKING([whether Python support is requested])
793 AC_ARG_ENABLE([python],
794 AS_HELP_STRING([--enable-python],[Enable python support]),
795 [enable_python=$enableval have_python=$enableval],
796 [enable_python=autodetect have_python=yes])
797 AC_MSG_RESULT([$enable_python])
799 if test "x$have_python" != "xno"; then
800 AM_PATH_PYTHON([2.3],[],[no])
801 if test "x$PYTHON" = "x:"; then
806 if test "x$have_python" != "xno"; then
807 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
808 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
809 PYTHON_LIBS="-lpython$PYTHON_VERSION"
810 PYTHON_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config"
811 PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION"
812 PYTHON_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/Makefile"
813 PYTHON_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
814 PYTHON_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
815 PYTHON_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
816 PYTHON_EXTRA_LIBS="$PYTHON_LOCALMODLIBS $PYTHON_BASEMODLIBS $PYTHON_OTHER_LIBS"
817 AC_SUBST([PYTHON_LIBS])
818 AC_SUBST([PYTHON_LIB_LOC])
819 AC_SUBST([PYTHON_CFLAGS])
820 AC_SUBST([PYTHON_EXTRA_LIBS])
822 dnl FIXME: do we really need this test?
823 AC_MSG_CHECKING([whether we can build a shared library depending on libpython])
827 cat > testpython.c <<EOF
829 int testpython (void)
835 if /bin/sh ../libtool --mode=compile ${CC} $PYTHON_CFLAGS -c testpython.c >/dev/null 2>&1 && \
836 /bin/sh ../libtool --mode=link ${CC} -o testpython.la -rpath `pwd` -module -avoid-version $PYTHON_LIB_LOC testpython.lo $PYTHON_LIBS $PYTHON_EXTRA_LIBS >/dev/null 2>&1 && \
837 grep 'dlname.*testpython' testpython.la >/dev/null 2>&1; then
845 AC_MSG_RESULT([$result])
848 if test "x$have_python" != "xno"; then
851 PKG_CHECK_MODULES([PYGTK], [
852 pygtk-2.0 >= $PYGTK_REQUIRED],
855 AC_SUBST([PYGTK_CFLAGS])
856 AC_SUBST([PYGTK_LIBS])
859 if test "x$have_python" != "xno"; then
860 AC_MSG_CHECKING([for pygtk defs])
861 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
862 AC_MSG_RESULT([$PYGTK_DEFSDIR])
864 AC_MSG_CHECKING([for pygtk codegen])
865 PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
866 AC_MSG_RESULT([$PYGTK_CODEGEN])
868 AC_MSG_CHECKING([for pygtk h2def])
869 PYGTK_H2DEF="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py"
870 AC_MSG_RESULT([$PYGTK_H2DEF])
872 AC_SUBST([PYGTK_DEFSDIR])
873 AC_SUBST([PYGTK_CODEGEN])
874 AC_SUBST([PYGTK_H2DEF])
876 dnl uncomment when http://bugzilla.gnome.org/show_bug.cgi?id=351072 fixed
877 dnl PKG_CHECK_EXISTS([pygobject-2.0 >= X.XX.X],
878 dnl AC_DEFINE([PYGOBJECT_CAN_MARSHAL_GVALUE]))
880 dnl Check for -fno-strict-aliasing
881 FLAGS="-fno-strict-aliasing"
882 save_CFLAGS="$CFLAGS"
883 CFLAGS="$CFLAGS $FLAGS"
884 AC_MSG_CHECKING([whether [$]CC understands $FLAGS])
885 AC_TRY_COMPILE([], [], [compiler_has_option=yes], [compiler_has_option=no])
886 CFLAGS="$save_CFLAGS"
887 AC_MSG_RESULT($compiler_has_option)
888 if test $compiler_has_option = yes; then
889 NO_STRICT_ALIASING_CFLAGS="$FLAGS"
891 AC_SUBST([NO_STRICT_ALIASING_CFLAGS])
894 if test "x$have_python" != "xyes"; then
895 if test "x$enable_python" = "xyes"; then
896 AC_MSG_ERROR([Python support explicitly requested, but not found])
897 elif test "x$enable_python" != "xno"; then
899 AC_MSG_WARN([Python not found, disabling python support])
901 elif test "x$enable_python" != "xno"; then
903 AC_DEFINE([ENABLE_PYTHON],[1],[Define to compile with python support])
906 AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
909 dnl check, for unit tests
910 AM_PATH_CHECK([], have_check=yes, have_check=no)
911 AM_CONDITIONAL([HAVE_CHECK],[test "x$have_check" = "xyes"])
914 dnl ================================================================
916 dnl ================================================================
925 widgets/libsexy/Makefile
929 data/rhythmbox.desktop.in
936 plugins/sample/Makefile
937 plugins/audiocd/Makefile
938 plugins/audioscrobbler/Makefile
939 plugins/cd-recorder/Makefile
940 plugins/ipod/Makefile
941 plugins/iradio/Makefile
942 plugins/lirc/Makefile
943 plugins/lyrics/Makefile
944 plugins/sample-python/Makefile
945 plugins/pythonconsole/Makefile
946 plugins/artdisplay/Makefile
947 plugins/artdisplay/artdisplay/Makefile
948 plugins/magnatune/Makefile
949 plugins/magnatune/magnatune/Makefile
950 plugins/generic-player/Makefile
952 plugins/power-manager/Makefile
954 bindings/python/Makefile
959 doc/reference/Makefile
961 backends/gstreamer/Makefile
966 AC_MSG_NOTICE([Rhythmbox was configured with the following options:])
967 if test x"$with_database" = xtree; then
968 AC_MSG_NOTICE([** Tree database is enabled])
969 elif test x"$with_database" = xlibgda; then
970 AC_MSG_NOTICE([** libgda/sqlite database is enabled])
972 AC_MSG_ERROR([Unknown database!])
974 if test x"${with_rhythmdb_debug}" != x0; then
975 AC_MSG_NOTICE([** RhythmDB sanity checking enabled (may be slow!)])
979 if test x"$enable_tag_writing" != xno; then
980 AC_MSG_NOTICE([** Tag writing is enabled])
982 AC_MSG_NOTICE([ Tag writing is disabled])
984 if test x"$with_track_transfer" = xyes; then
985 AC_MSG_NOTICE([** Track transfer is enabled])
987 AC_MSG_NOTICE([ Track transfer is disabled])
989 if test x"$enable_ipod_writing" != xno; then
990 AC_MSG_NOTICE([** iPod write support is enabled])
992 AC_MSG_NOTICE([ iPod write support is disabled])
994 if test x"$enable_mmkeys" != "xyes"; then
995 AC_MSG_NOTICE([ Multimedia keys support is disabled])
997 AC_MSG_NOTICE([** Multimedia keys support is enabled])
999 if test x"$enable_musicbrainz" != "xyes"; then
1000 AC_MSG_NOTICE([ MusicBrainz support is disabled])
1002 AC_MSG_NOTICE([** MusicBrainz support is enabled])
1005 if test x"$with_playback" = xgstreamer_0_8; then
1006 AC_MSG_NOTICE([** GStreamer 0.8 player is enabled])
1007 elif test x"$with_playback" = xgstreamer_0_10; then
1008 AC_MSG_NOTICE([** GStreamer 0.10 player is enabled])
1010 AC_MSG_ERROR([ Playback engine set incorrectly])
1013 if test x"$use_ipod" = xyes; then
1014 AC_MSG_NOTICE([** iPod integration enabled])
1016 AC_MSG_NOTICE([ iPod integration disabled])
1018 if test x"$with_cd_burning" != xno; then
1019 AC_MSG_NOTICE([** CD burning support enabled])
1021 AC_MSG_NOTICE([ CD burning support disabled])
1023 if test x"$enable_daap" = xyes; then
1024 AC_MSG_NOTICE([** DAAP (music sharing) support is enabled])
1026 AC_MSG_NOTICE([ DAAP (music sharing) support is disabled])
1028 if test x"$have_libnotify" = xyes; then
1029 AC_MSG_NOTICE([** libnotify support is enabled])
1031 AC_MSG_NOTICE([ libnotify support is disabled])
1033 if test x"$enable_hal" = xyes; then
1034 AC_MSG_NOTICE([** HAL support enabled])
1036 AC_MSG_NOTICE([ HAL support disabled])
1038 if test x"$enable_old_dbus" = xyes; then
1039 AC_MSG_NOTICE([** using D-BUS < 0.35 control/activation])
1041 if test x"$enable_python" != xno; then
1042 AC_MSG_NOTICE([** Python support enabled])
1044 AC_MSG_NOTICE([ Python support disabled])
1046 if test x"$use_gnome_keyring" = xyes; then
1047 AC_MSG_NOTICE([** gnome-keyring support enabled])
1049 AC_MSG_NOTICE([ gnome-keyring support disabled])
1051 if test x"$enable_audioscrobbler" != xno; then
1052 AC_MSG_NOTICE([** Audioscrobbler support enabled])
1054 AC_MSG_NOTICE([ Audioscrobbler support disabled])
1056 if test x"$enable_metadata_helper" = xyes; then
1057 AC_MSG_NOTICE([** Separate metadata helper process enabled])
1059 AC_MSG_NOTICE([ Separate metadata helper process disabled])
1061 if test x"$with_internal_libsexy" = xyes; then
1062 AC_MSG_NOTICE([ using internal libsexy])
1064 AC_MSG_NOTICE([** using system-wide libsexy])
1067 AC_MSG_NOTICE([End options])