Commit d10379a6 authored by Scott Wheeler's avatar Scott Wheeler

Make it possible to compile without aRts.

svn path=/trunk/kdemultimedia/juk/; revision=364787
parent 13f9ac32
......@@ -71,7 +71,7 @@ juk_SOURCES = \
tagguessertest_SOURCES = tagguessertest.cpp tagguesser.cpp
mbtest_SOURCES = mbtest.cpp musicbrainzquery.cpp
INCLUDES= $(all_includes) -I$(arts_includes) $(taglib_includes) $(GST_CFLAGS)
INCLUDES= $(all_includes) $(taglib_includes) $(GST_CFLAGS) $(ARTS_CFLAGS)
##################################################
# check to see if MusicBrainz is available
......@@ -81,7 +81,7 @@ mblibs = -lmusicbrainz -ltunepimp
endif
##################################################
juk_LDADD = $(LDADD_GST) $(mblibs) -lartskde $(LIB_KIO) $(taglib_libs) $(LIB_KHTML)
juk_LDADD = $(LDADD_GST) $(mblibs) $(LIB_KIO) $(taglib_libs) $(LIB_KHTML) $(LIB_ARTS)
juk_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LDFLAGS_GST)
tagguessertest_LDADD = $(LIB_KDECORE)
......
......@@ -18,6 +18,8 @@
#include "artsplayer.h"
#ifdef HAVE_ARTS
#include <kdebug.h>
#include <kconfig.h>
#include <kstandarddirs.h>
......@@ -287,4 +289,6 @@ bool ArtsPlayer::serverRunning() const
#include "artsplayer.moc"
#endif
// vim: sw=4 ts=8 et
......@@ -21,6 +21,8 @@
#include <config.h>
#ifdef HAVE_ARTS
#include "player.h"
#include <kurl.h>
......@@ -87,6 +89,7 @@ private:
float m_currentVolume;
};
#endif
#endif
// vim: sw=4 ts=8 et
......@@ -2,14 +2,22 @@
AM_INIT_AUTOMAKE(juk,1.0)
if test "x$have_taglib" = "xfalse" || test "x$build_arts" = "xno"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE juk"
fi
AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
if test "x$build_arts" = "xno"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE juk"
if test "x$build_arts" = "xyes" && test "x$ARTSC_CONFIG" != "xno" ; then
LIB_ARTS="-lartskde"
ARTS_PREFIX=[`$ARTSC_CONFIG --arts-prefix`]
ARTS_CFLAGS="-I$ARTS_PREFIX/include/arts"
AC_DEFINE(HAVE_ARTS, 1, [have arts support in juk])
else
build_arts="no"
LIB_ARTS=""
ARTS_CFLAGS=""
fi
AC_SUBST(LIB_ARTS)
AC_SUBST(ARTS_CFLAGS)
AC_DEFUN([AC_HAVE_MUSICBRAINZ],
[
AC_DEFINE(HAVE_MUSICBRAINZ, 1, [have MusicBrainz])
......@@ -75,7 +83,7 @@ else
# Append -L entries, since they are masked by --libs-only-l and
# --libs-only-other
LIBDIRS_GST=`$PKG_CONFIG --libs-only-L gstreamer-$GST_MAJORMINOR`
[ -n "$LIBDIRS_GST" ] && LDFLAGS_GST="$LDFLAGS_GST $LIBDIRS_GST"
LDADD_GST="$LDADD_GST $LIBDIRS_GST"
AC_SUBST(CFLAGS_GST)
AC_SUBST(LDADD_GST)
......@@ -83,3 +91,7 @@ else
AC_MSG_NOTICE([GStreamer version >= $GST_REQ found.])
AC_DEFINE(HAVE_GSTREAMER, 1, [have GStreamer])
fi
if test "x$have_taglib" = "xfalse" || ( test "x$build_arts" = "xno" && test "x$have_gst" = "xno" ) ; then
DO_NOT_COMPILE="$DO_NOT_COMPILE juk"
fi
......@@ -47,7 +47,8 @@ static Player *createPlayer(int system = ArtsBackend)
{
Player *p = 0;
#if HAVE_GSTREAMER
#if defined(HAVE_ARTS) && defined(HAVE_GSTREAMER)
switch(system) {
case ArtsBackend:
p = new ArtsPlayer;
......@@ -55,12 +56,23 @@ static Player *createPlayer(int system = ArtsBackend)
case GStreamerBackend:
p = new GStreamerPlayer;
break;
default:
p = new ArtsPlayer;
break;
}
#else
Q_UNUSED(system);
Q_UNUSED(system)
#ifdef HAVE_ARTS
p = new ArtsPlayer;
#endif
#ifdef HAVE_GSTREAMER
p = new GStreamerPlayer;
#else
#warning No Player Backend Available
#endif
#endif
return p;
}
......@@ -202,13 +214,14 @@ void PlayerManager::setStatusLabel(StatusLabel *label)
KSelectAction *PlayerManager::playerSelectAction(QObject *parent) // static
{
KSelectAction *action = 0;
#if HAVE_GSTREAMER
action = new KSelectAction(i18n("&Output To"), 0, parent, "outputSelect");
QStringList l;
l << "aRts" << "GStreamer";
#if defined(HAVE_ARTS) && defined(HAVE_GSTREAMER)
l << i18n("aRts") << i18n("GStreamer");
action->setItems(l);
#else
Q_UNUSED(parent);
Q_UNUSED(parent)
#endif
return action;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment