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])
488 elif test x"$with_playback" = xgstreamer_0_8; then
489 if test "x$enable_daap" = "xyes"; then
490 AC_MSG_ERROR([DAAP support explicitly requested, but not supported with GStreamer 0.8])
494 AC_DEFINE(WITH_DAAP_SUPPORT, 1, [Define if DAAP should be enabled])
496 AC_SUBST(MDNS_CFLAGS)
500 AM_CONDITIONAL(USE_DAAP, test "x$enable_daap" != "xno")
502 AC_CHECK_LIB(z, uncompress)
506 dnl check for MusicBrainz
507 AC_ARG_ENABLE(musicbrainz, AC_HELP_STRING([--disable-musicbrainz],
508 [don't build with MusicBrainz support]))
509 if test x"$enable_musicbrainz" != "xno"; then
510 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, enable_musicbrainz=yes,
511 enable_musicbrainz=no)
513 if test x"$enable_musicbrainz" = xyes; then
514 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $MUSICBRAINZ_CFLAGS"
515 RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $MUSICBRAINZ_LIBS"
516 AC_DEFINE(HAVE_MUSICBRAINZ, 1, [define if you have Musicbrainz])
518 AM_CONDITIONAL(HAVE_MUSICBRAINZ, test "x$enable_musicbrainz" = "xyes")
524 if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
525 CFLAGS=$CFLAGS -I`echo $x_includes | sed -e "s/:/ -I/g"`
527 if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
528 LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
533 #include <X11/extensions/xidle.h>
534 int main(int argc,char **argv) {
538 AC_MSG_CHECKING(for XIDLE extension)
539 AC_MSG_RESULT($have_xidle)
540 if test x"$have_xidle" = "xyes" ; then
541 AC_DEFINE(HAVE_XIDLE_EXTENSION, 1, [defined if you have X11/extensions/xidle.h])
547 #include <X11/XF86keysym.h>
548 int main(int argc,char **argv) {
552 AC_MSG_CHECKING(for XFree86 headers)
553 AC_MSG_RESULT($have_xfree)
554 if test x"$have_xfree" = "xyes" ; then
555 AC_DEFINE(HAVE_XFREE, 1, [defined if you have X11/XF86keysym.h])
558 AC_ARG_ENABLE(mmkeys, AC_HELP_STRING([--disable-mmkeys],
559 [don't build with Multimedia Keys support]))
560 if test x"$have_xfree" = xyes; then
561 if test x"$enable_mmkeys" != xno; then
563 AC_DEFINE(HAVE_MMKEYS, 1, [define if Multimedia Keys are enabled])
566 if test x"$enable_mmkeys" = xyes; then
567 AC_MSG_ERROR([Multimedia keys explicitly requested but no support found])
571 dnl CD burner support
572 AC_ARG_WITH(cd-burning,
573 AC_HELP_STRING([--with-cd-burning],
574 [Enable CD burning support]),,
575 with_cd_burning=auto)
576 if test "x$with_cd_burning" != "xno"; then
577 NCB_DRIVE_DOOR_VERSION=2.11.3
578 PKG_CHECK_MODULES(LIBNAUTILUS_BURN, [libnautilus-burn >= $NCB_MIN_REQS], have_cd_burner=yes, have_cd_burner=no)
579 if test "x$have_cd_burner" = xno; then
580 AC_MSG_ERROR([libnautilus-burn not found or too cold])
583 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_door_is_open,
584 [AC_DEFINE([HAVE_BURN_DRIVE_DOOR], 1, [Have nautilus-burn function to check drive door state])],
585 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
586 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_unref,
587 [AC_DEFINE([HAVE_BURN_DRIVE_UNREF], 1, [Have nautilus-burn 2.13 drive unref function])],
588 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
589 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_new_from_path,
590 [AC_DEFINE([HAVE_BURN_DRIVE_NEW_FROM_PATH], 1, [Have nautilus-burn 2.13 drive new_from_path function])],
591 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
592 AC_CHECK_LIB(nautilus-burn, nautilus_burn_drive_get_write_speeds,
593 [AC_DEFINE([HAVE_BURN_DRIVE_GET_WRITE_SPEEDS], 1, [Have nautilus-burn 2.13 drive get_write_speeds])],
594 ,[$LIBNAUTILUS_BURN_LIBS $LIBNAUTILUS_BURN_CFLAGS])
596 AC_DEFINE([HAVE_NAUTILUS_BURN], 1, [Have nautilus-burn])
599 AM_CONDITIONAL(USE_CD_BURNING, test "x$with_cd_burning" != "xno")
604 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
605 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
606 AC_PATH_PROG(GCONFTOOL, gconftool-2)
608 AC_SUBST(RHYTHMBOX_CFLAGS)
609 AC_SUBST(RHYTHMBOX_LIBS)
610 AC_SUBST(RB_CLIENT_CFLAGS)
611 AC_SUBST(RB_CLIENT_LIBS)
613 AC_TRY_RUN([#include <time.h>
619 if (strftime(buf, 100, "%EY", &tm) == 4 &&
620 strcmp (buf, "1999")==0)
625 AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
628 GETTEXT_PACKAGE=rhythmbox
629 AC_SUBST(GETTEXT_PACKAGE)
630 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
631 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
632 ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"
636 dnl Workaround for automake 1.8
637 AC_SUBST(mkdir_p) if test x"$mkdir_p" = "x"; then
638 MKINSTALLDIRS="mkinstalldirs"
640 AC_SUBST(MKINSTALLDIRS)
642 AS_AC_EXPAND(DATADIR, $datadir)
645 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_MIN_REQS, enable_dbus=yes, enable_dbus=no)
646 if test "x$enable_dbus" = xno; then
647 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $OLD_DBUS_MIN_REQS, enable_old_dbus=yes, enable_old_dbus=no)
648 if test "x$enable_old_dbus" = xno; then
649 AC_MSG_ERROR([DBUS not found or too old])
651 AC_DEFINE(WITH_OLD_DBUS, 1, [Define if old D-BUS is enabled])
653 AC_DEFINE(WITH_DBUS, 1, [Define if D-BUS is enabled])
656 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
657 DBUS_GLIB_BIN="`$PKG_CONFIG --variable=exec_prefix dbus-glib-1`/bin"
658 AC_SUBST(DBUS_GLIB_BIN)
659 AM_CONDITIONAL(WITH_DBUS, test "x$enable_dbus" = "xyes")
660 AM_CONDITIONAL(WITH_OLD_DBUS, test "x$enable_old_dbus" = "xyes")
662 dnl out-of-process metadata reader (requires dbus)
663 AC_ARG_WITH(metadata-helper,
664 AC_HELP_STRING([--with-metadata-helper],
665 [Use a separate process for metadata reading]),,
666 with_metadata_helper=auto)
667 enable_metadata_helper=no
668 if test "x$with_metadata_helper" != xno; then
669 if test "x$enable_dbus" = xyes || test "x$enable_old_dbus" = xyes; then
670 AC_DEFINE(WITH_METADATA_HELPER, 1, [Define if the metadata helper process is enabled])
671 enable_metadata_helper=yes
672 elif test "x$with_metadata_helper" = xyes; then
673 AC_MSG_ERROR([Metadata helper process explicitly requested, but D-BUS is not enabled])
676 AM_CONDITIONAL(WITH_METADATA_HELPER, test "x$enable_metadata_helper" = "xyes")
682 AC_HELP_STRING([--enable-lirc],[enable lirc support]))
684 if test x"$enable_lirc" != xno; then
685 AC_CHECK_HEADER(lirc/lirc_client.h,[with_lirc=yes],[with_lirc=no])
686 if test x"$with_lirc" = xyes; then
687 AC_CHECK_LIB(lirc_client,lirc_init,[with_lirc=yes],[with_lirc=no])
689 if test x"$with_lirc" = xno -a x"$enable_lirc" = xyes; then
690 AC_MSG_ERROR([lirc explicitly requested but no support found])
693 AM_CONDITIONAL(WITH_LIRC, test x"$with_lirc" = xyes)
696 AC_ARG_ENABLE(uninstalled-build,
697 AC_HELP_STRING([--enable-uninstalled-build],
698 [Search for files in build directory as well]),
699 enable_uninstalled=yes,)
700 if test x"$enable_uninstalled" = xyes; then
701 AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_DIR,"`pwd`/data",[path to source data dir])
702 AC_DEFINE_UNQUOTED(METADATA_UNINSTALLED_DIR,"`pwd`/metadata",[path to metadata build dir])
705 AC_ARG_WITH(internal-libsexy,
706 AC_HELP_STRING([--with-internal-libsexy],
707 [Build using internal libsexy library]),,
708 with_internal_libsexy=no)
709 if test "x$with_internal_libsexy" = "xno"; then
710 PKG_CHECK_MODULES(LIBSEXY, libsexy >= 0.1.5, with_internal_libsexy=no,
711 with_internal_libsexy=yes)
713 AC_SUBST(LIBSEXY_CFLAGS)
714 AC_SUBST(LIBSEXY_LIBS)
715 AM_CONDITIONAL(WITH_INTERNAL_LIBSEXY, test "x$with_internal_libsexy" = "xyes")
717 dnl warnings bits, copied from gnome-keyring configure.in
718 dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
720 AC_ARG_ENABLE(more-warnings,
721 [ --enable-more-warnings Maximum compiler warnings],
722 set_more_warnings="$enableval",[
723 if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS" || test -d "$srcdir/_darcs"; then
724 set_more_warnings=yes
729 AC_MSG_CHECKING(for more warnings, including -Werror)
730 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
733 -Wcomment -Wformat -Wnonnull -Wimplicit-int -Wimplicit \
734 -Wmain -Wmissing-braces -Wparentheses -Wsequence-point \
735 -Wreturn-type -Wswitch -Wtrigraphs -Wunused-function \
736 -Wunused-label -Wunused-value \
737 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
738 -Wnested-externs -Wpointer-arith \
742 if echo "$CFLAGS" | grep -e '-O[1-9]'; then
743 WARN_CFLAGS="-Wuninitialized $WARN_CFLAGS"
746 for option in $WARN_CFLAGS; do
747 SAVE_CFLAGS="$CFLAGS"
748 CFLAGS="$CFLAGS $option"
749 AC_MSG_CHECKING([whether gcc understands $option])
750 AC_TRY_COMPILE([], [],
753 if test x$has_option = xyes; then
754 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $option"
756 AC_MSG_RESULT($has_option)
757 CFLAGS="$SAVE_CFLAGS"
763 SAVE_CFLAGS="$CFLAGS"
764 CFLAGS="$CFLAGS -Wno-error"
765 AC_TRY_COMPILE([], [],
766 WNOERROR_CFLAGS="-Wno-error",
768 AC_SUBST(WNOERROR_CFLAGS)
769 CFLAGS="$SAVE_CFLAGS"
779 dnl Enable gnome-doc-utils
783 dnl ================================================================
785 dnl ================================================================
787 PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
788 AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
790 AS_AC_EXPAND(PLUGINDIR, ${libdir}/rhythmbox/plugins)
793 dnl ================================================================
795 dnl ================================================================
797 AC_MSG_CHECKING([whether Python support is requested])
798 AC_ARG_ENABLE([python],
799 AS_HELP_STRING([--enable-python],[Enable python support]),
800 [enable_python=$enableval have_python=$enableval],
801 [enable_python=autodetect have_python=yes])
802 AC_MSG_RESULT([$enable_python])
804 if test "x$have_python" != "xno"; then
805 AM_PATH_PYTHON([2.3],[],[no])
806 if test "x$PYTHON" = "x:"; then
811 if test "x$have_python" != "xno"; then
812 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
813 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
814 PYTHON_LIBS="-lpython$PYTHON_VERSION"
815 PYTHON_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config"
816 PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION"
817 PYTHON_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/Makefile"
818 PYTHON_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
819 PYTHON_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
820 PYTHON_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
821 PYTHON_EXTRA_LIBS="$PYTHON_LOCALMODLIBS $PYTHON_BASEMODLIBS $PYTHON_OTHER_LIBS"
822 AC_SUBST([PYTHON_LIBS])
823 AC_SUBST([PYTHON_LIB_LOC])
824 AC_SUBST([PYTHON_CFLAGS])
825 AC_SUBST([PYTHON_EXTRA_LIBS])
827 dnl FIXME: do we really need this test?
828 AC_MSG_CHECKING([whether we can build a shared library depending on libpython])
832 cat > testpython.c <<EOF
834 int testpython (void)
840 if /bin/sh ../libtool --mode=compile ${CC} $PYTHON_CFLAGS -c testpython.c >/dev/null 2>&1 && \
841 /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 && \
842 grep 'dlname.*testpython' testpython.la >/dev/null 2>&1; then
850 AC_MSG_RESULT([$result])
853 if test "x$have_python" != "xno"; then
856 PKG_CHECK_MODULES([PYGTK], [
857 pygtk-2.0 >= $PYGTK_REQUIRED],
860 AC_SUBST([PYGTK_CFLAGS])
861 AC_SUBST([PYGTK_LIBS])
864 if test "x$have_python" != "xno"; then
865 AC_MSG_CHECKING([for pygtk defs])
866 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
867 AC_MSG_RESULT([$PYGTK_DEFSDIR])
869 AC_MSG_CHECKING([for pygtk codegen])
870 PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
871 AC_MSG_RESULT([$PYGTK_CODEGEN])
873 AC_MSG_CHECKING([for pygtk h2def])
874 PYGTK_H2DEF="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py"
875 AC_MSG_RESULT([$PYGTK_H2DEF])
877 AC_SUBST([PYGTK_DEFSDIR])
878 AC_SUBST([PYGTK_CODEGEN])
879 AC_SUBST([PYGTK_H2DEF])
881 dnl uncomment when http://bugzilla.gnome.org/show_bug.cgi?id=351072 fixed
882 dnl PKG_CHECK_EXISTS([pygobject-2.0 >= X.XX.X],
883 dnl AC_DEFINE([PYGOBJECT_CAN_MARSHAL_GVALUE]))
885 dnl Check for -fno-strict-aliasing
886 FLAGS="-fno-strict-aliasing"
887 save_CFLAGS="$CFLAGS"
888 CFLAGS="$CFLAGS $FLAGS"
889 AC_MSG_CHECKING([whether [$]CC understands $FLAGS])
890 AC_TRY_COMPILE([], [], [compiler_has_option=yes], [compiler_has_option=no])
891 CFLAGS="$save_CFLAGS"
892 AC_MSG_RESULT($compiler_has_option)
893 if test $compiler_has_option = yes; then
894 NO_STRICT_ALIASING_CFLAGS="$FLAGS"
896 AC_SUBST([NO_STRICT_ALIASING_CFLAGS])
899 if test "x$have_python" != "xyes"; then
900 if test "x$enable_python" = "xyes"; then
901 AC_MSG_ERROR([Python support explicitly requested, but not found])
902 elif test "x$enable_python" != "xno"; then
904 AC_MSG_WARN([Python not found, disabling python support])
906 elif test "x$enable_python" != "xno"; then
908 AC_DEFINE([ENABLE_PYTHON],[1],[Define to compile with python support])
911 AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
914 dnl check, for unit tests
915 AM_PATH_CHECK([], have_check=yes, have_check=no)
916 AM_CONDITIONAL([HAVE_CHECK],[test "x$have_check" = "xyes"])
919 dnl ================================================================
921 dnl ================================================================
930 widgets/libsexy/Makefile
934 data/rhythmbox.desktop.in
941 plugins/sample/Makefile
942 plugins/audiocd/Makefile
943 plugins/audioscrobbler/Makefile
944 plugins/cd-recorder/Makefile
945 plugins/daap/Makefile
946 plugins/ipod/Makefile
947 plugins/iradio/Makefile
948 plugins/lirc/Makefile
949 plugins/lyrics/Makefile
950 plugins/sample-python/Makefile
951 plugins/pythonconsole/Makefile
952 plugins/artdisplay/Makefile
953 plugins/artdisplay/artdisplay/Makefile
954 plugins/magnatune/Makefile
955 plugins/magnatune/magnatune/Makefile
956 plugins/generic-player/Makefile
958 plugins/power-manager/Makefile
960 bindings/python/Makefile
965 doc/reference/Makefile
967 backends/gstreamer/Makefile
972 AC_MSG_NOTICE([Rhythmbox was configured with the following options:])
973 if test x"$with_database" = xtree; then
974 AC_MSG_NOTICE([** Tree database is enabled])
975 elif test x"$with_database" = xlibgda; then
976 AC_MSG_NOTICE([** libgda/sqlite database is enabled])
978 AC_MSG_ERROR([Unknown database!])
980 if test x"${with_rhythmdb_debug}" != x0; then
981 AC_MSG_NOTICE([** RhythmDB sanity checking enabled (may be slow!)])
985 if test x"$enable_tag_writing" != xno; then
986 AC_MSG_NOTICE([** Tag writing is enabled])
988 AC_MSG_NOTICE([ Tag writing is disabled])
990 if test x"$with_track_transfer" = xyes; then
991 AC_MSG_NOTICE([** Track transfer is enabled])
993 AC_MSG_NOTICE([ Track transfer is disabled])
995 if test x"$enable_ipod_writing" != xno; then
996 AC_MSG_NOTICE([** iPod write support is enabled])
998 AC_MSG_NOTICE([ iPod write support is disabled])
1000 if test x"$enable_mmkeys" != "xyes"; then
1001 AC_MSG_NOTICE([ Multimedia keys support is disabled])
1003 AC_MSG_NOTICE([** Multimedia keys support is enabled])
1005 if test x"$enable_musicbrainz" != "xyes"; then
1006 AC_MSG_NOTICE([ MusicBrainz support is disabled])
1008 AC_MSG_NOTICE([** MusicBrainz support is enabled])
1011 if test x"$with_playback" = xgstreamer_0_8; then
1012 AC_MSG_NOTICE([** GStreamer 0.8 player is enabled])
1013 elif test x"$with_playback" = xgstreamer_0_10; then
1014 AC_MSG_NOTICE([** GStreamer 0.10 player is enabled])
1016 AC_MSG_ERROR([ Playback engine set incorrectly])
1019 if test x"$use_ipod" = xyes; then
1020 AC_MSG_NOTICE([** iPod integration enabled])
1022 AC_MSG_NOTICE([ iPod integration disabled])
1024 if test x"$with_cd_burning" != xno; then
1025 AC_MSG_NOTICE([** CD burning support enabled])
1027 AC_MSG_NOTICE([ CD burning support disabled])
1029 if test x"$enable_daap" = xyes; then
1030 AC_MSG_NOTICE([** DAAP (music sharing) support is enabled])
1032 AC_MSG_NOTICE([ DAAP (music sharing) support is disabled])
1034 if test x"$have_libnotify" = xyes; then
1035 AC_MSG_NOTICE([** libnotify support is enabled])
1037 AC_MSG_NOTICE([ libnotify support is disabled])
1039 if test x"$enable_hal" = xyes; then
1040 AC_MSG_NOTICE([** HAL support enabled])
1042 AC_MSG_NOTICE([ HAL support disabled])
1044 if test x"$enable_old_dbus" = xyes; then
1045 AC_MSG_NOTICE([** using D-BUS < 0.35 control/activation])
1047 if test x"$enable_python" != xno; then
1048 AC_MSG_NOTICE([** Python support enabled])
1050 AC_MSG_NOTICE([ Python support disabled])
1052 if test x"$use_gnome_keyring" = xyes; then
1053 AC_MSG_NOTICE([** gnome-keyring support enabled])
1055 AC_MSG_NOTICE([ gnome-keyring support disabled])
1057 if test x"$enable_audioscrobbler" != xno; then
1058 AC_MSG_NOTICE([** Audioscrobbler support enabled])
1060 AC_MSG_NOTICE([ Audioscrobbler support disabled])
1062 if test x"$enable_metadata_helper" = xyes; then
1063 AC_MSG_NOTICE([** Separate metadata helper process enabled])
1065 AC_MSG_NOTICE([ Separate metadata helper process disabled])
1067 if test x"$with_internal_libsexy" = xyes; then
1068 AC_MSG_NOTICE([ using internal libsexy])
1070 AC_MSG_NOTICE([** using system-wide libsexy])
1073 AC_MSG_NOTICE([End options])