arts client example
Matthias Kretz
Matthias.Kretz at urz.uni-heidelberg.de
Tue Jan 10 16:14:03 GMT 2006
Hi,
On Tuesday 10 January 2006 13:31, Christian Schoenebeck wrote:
> Well, I already started going the C++ way (I looked at streamsound.cc), but
> now that I wanted to write the autoconf rules, I noticed there's no clean
> way to check for the C++ interface of aRts (i.e. getting its include path,
> checking version, etc.). So I think I'm forced to go with artsc now...
Yes, that's rather messy as all KDE programs in 2.x and 3.x times expect arts
to be in the KDE prefix. So for KDE it's easy and that's probably the reason
nothing was done for external projects.
But I just had the joy of using aRts in KDE4 with a different prefix, so I can
give you the autoconf stuff I have. Though it's depending on standard KDE
autoconf makros that are defined in the admin directory.
It's probably gonna break on systems other than mine. I didn't put much
thought into it - just wanted to get it to work here.
--
C'ya
Matthias
________________________________________________________
Matthias Kretz (Germany) <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
dnl aRts specific configure tests
dnl
dnl
dnl ensure that the user has aRts-1.1.0 or newer installed
dnl
dnl Check for artsc-config
dnl no need to, AC_BASE_PATH_KDE does it for us already (see also
dnl comment below for mcopidl)
dnl AC_PATH_PROG(ARTSCCONFIG, artsc-config, no)
ARTS_WANT_VERSION_MAJOR=1
ARTS_WANT_VERSION_MINOR=1
ARTS_HAVE_VERSION=none
ARTS_HAVE_PREFIX=none
dnl Check for Glib-2.0
AC_MSG_CHECKING(for aRts-$ARTS_WANT_VERSION_MAJOR.$ARTS_WANT_VERSION_MINOR)
ARTS_OK=no
if test "$build_arts" != "yes"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE arts"
AC_MSG_RESULT(disabled)
else
if test "x$ARTSCCONFIG" != "xno"; then
ARTS_HAVE_VERSION=`$ARTSCCONFIG --arts-version`
ARTS_HAVE_PREFIX=`$ARTSCCONFIG --arts-prefix`
fi
# And delete superfluous '/' to make compares easier
ARTS_HAVE_PREFIX=`echo "$ARTS_HAVE_PREFIX" | sed 's,//*,/,g' | sed -e 's,/$,,'`
ARTS_MAJOR=`echo $ARTS_HAVE_VERSION | sed 's/\.[[0-9]]*\.[[0-9]]*$//'`
ARTS_MINOR=`echo $ARTS_HAVE_VERSION | sed 's/\.[[0-9]]*$//' | sed 's/^[[0-9]]*\.//'`
dnl don't look at the micro version
if test "x$ARTS_MAJOR" != "x" && test "x$ARTS_MINOR" != "x" && test $ARTS_MAJOR -ge $ARTS_WANT_VERSION_MAJOR && test $ARTS_MINOR -ge $ARTS_WANT_VERSION_MINOR; then
realartsprefix=`(cd $ARTS_HAVE_PREFIX; /bin/pwd)`
realprefix=`(cd $prefix; /bin/pwd)`
ARTS_INCLUDES=""
if test "x$realartsprefix" = "x$realprefix"; then
ARTS_OK=yes
else
AC_FIND_FILE(artsflow.h, $ac_kde_includes $realartsprefix/include $realartsprefix/include/arts $realartsprefix/include/kde/arts, arts_incdir)
ARTS_INCLUDES="$arts_incdir"
if test -n "$ARTS_INCLUDES" && test ! -r "$ARTS_INCLUDES/artsflow.h"; then
AC_MSG_ERROR([in the prefix, you've chosen, are no aRts headers installed. This will fail.
So, check this please and use another prefix!])
else
ARTS_OK=yes
fi
fi
AC_SUBST(ARTS_INCLUDES)
fi
AC_MSG_RESULT($ARTS_OK)
if test "x$ARTS_OK" = "xno"; then
AC_MSG_ERROR([aRts $ARTS_WANT_VERSION_MAJOR.$ARTS_WANT_VERSION_MINOR not found.
You'll need to install a suitable version of aRts in the same prefix as KDE
before you build kdelibs.
(found
* artsc-config: $ARTSCCONFIG
* kdelibs prefix: $prefix
* aRts prefix: $ARTS_HAVE_PREFIX
* aRts version: $ARTS_HAVE_VERSION (required: $ARTS_WANT_VERSION_MAJOR.$ARTS_WANT_VERSION_MINOR)
)
])
fi
fi
dnl AC_BASE_PATH_KDE already checks for mcopidl, and it does it the
dnl right way using KDE_FIND_PATH
dnl AC_PATH_PROG(MCOPIDL, mcopidl, no)
dnl AC_SUBST(MCOPIDL)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20060110/a7327cda/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
More information about the kde-multimedia
mailing list