Commit 69465954 authored by Caleb Tennis's avatar Caleb Tennis

Major patches for KDE autoconf scripts.

These patches provide the KDE configure scripts (generated by the configure.in.in files spread all 
over the KDE modules) with --with-<option> and --without-<option> switches in many places where 
these switches are missing. This gives the user that compiles KDE the possibility to override the 
autodetection method used in these scripts to decide whether to make use or not of an external 
library or tool. 

Having the possibility to override all the autodection of external software has a very concrete 
benefit: it makes it possible for KDE packagers to build a customized version of a KDE package 
independently of the building host; and for source-based distributions, it makes it possible to 
define the dependency tree of the package in a deterministic way.

The coding style of these patches is the one recommended by autoconf developers, as illustrated in 
the info page of the AC_ARG_WITH macro.

See http://dev.gentoo.org/~greg_g/kde-configure/ for more information.



svn path=/trunk/KDE/kdemultimedia/juk/; revision=433982
parent 6714bd3a
if test "x$have_taglib" = "xfalse"; then
if test "x$with_taglib" = xcheck && test "x$have_taglib" != xyes; then
echo "**************************************************"
echo "*"
echo "* JuK will not be built without TagLib."
......@@ -7,7 +7,7 @@ if test "x$have_taglib" = "xfalse"; then
echo "**************************************************"
fi
if test "x$have_gst" = "xno"; then
if test "x$with_gstreamer" = xcheck && test "x$have_gst" = xno; then
echo "**************************************************"
echo "*"
echo "* You do not seem to have GStreamer >= 0.8 installed."
......@@ -19,7 +19,7 @@ if test "x$have_gst" = "xno"; then
echo "**************************************************"
fi
if test "x$have_musicbrainz" = "xfalse"; then
if test "x$with_musicbrainz" = xcheck && test "x$have_musicbrainz" = xno; then
echo "**************************************************"
echo "*"
echo "* You do not seem to have libmusicbrainz and"
......
......@@ -20,39 +20,60 @@ fi
AC_SUBST(LIB_ARTS)
AC_SUBST(ARTS_CFLAGS)
KDE_CHECK_HEADER(tunepimp/tp_c.h,
[
AC_DEFINE(HAVE_MUSICBRAINZ, 1, [have MusicBrainz])
have_musicbrainz=true
], [
AC_DEFINE(HAVE_MUSICBRAINZ, 0, [have MusicBrainz])
have_musicbrainz=false
])
AM_CONDITIONAL(link_lib_MB, test x$have_musicbrainz = xtrue)
# pkg-config seems to have a bug where it masks needed -L entries when it
# shouldn't, so disable that.
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
dnl start with 0.8
GST_MAJORMINOR=0.8
GST_REQ=0.8.0
PKG_CHECK_MODULES(GST, \
gstreamer-$GST_MAJORMINOR >= $GST_REQ \
gstreamer-control-$GST_MAJORMINOR >= $GST_REQ \
gstreamer-libs-$GST_MAJORMINOR >= $GST_REQ,
have_gst=yes, have_gst=no)
dnl Give error if we don't have gstreamer
AC_ARG_WITH(musicbrainz,
[AS_HELP_STRING(--with-musicbrainz,
[enable support for MusicBrainz @<:@default=check@:>@])],
[], with_musicbrainz=check)
have_musicbrainz=no
if test "x$with_musicbrainz" != xno; then
KDE_CHECK_HEADER(tunepimp/tp_c.h, have_musicbrainz=yes)
if test "x$with_musicbrainz" != xcheck && test "x$have_musicbrainz" != xyes; then
AC_MSG_FAILURE([--with-musicbrainz was given, but test for MusicBrainz failed])
fi
fi
if test "x$have_musicbrainz" = xyes; then
AC_DEFINE(HAVE_MUSICBRAINZ, 1, [have MusicBrainz])
else
AC_DEFINE(HAVE_MUSICBRAINZ, 0, [have MusicBrainz])
fi
AM_CONDITIONAL(link_lib_MB, test "x$have_musicbrainz" = xyes)
AC_ARG_WITH(gstreamer,
[AS_HELP_STRING(--with-gstreamer,
[enable support for GStreamer @<:@default=check@:>@])],
[], with_gstreamer=check)
have_gst=no
if test "x$with_gstreamer" != xno; then
# pkg-config seems to have a bug where it masks needed -L entries when it
# shouldn't, so disable that.
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
dnl start with 0.8
GST_MAJORMINOR=0.8
GST_REQ=0.8.0
PKG_CHECK_MODULES(GST, \
gstreamer-$GST_MAJORMINOR >= $GST_REQ \
gstreamer-control-$GST_MAJORMINOR >= $GST_REQ \
gstreamer-libs-$GST_MAJORMINOR >= $GST_REQ,
have_gst=yes, have_gst=no)
if test "x$with_gstreamer" != xcheck && test "x$have_gst" != xyes; then
AC_MSG_FAILURE([--with-gstreamer was given, but test for GStreamer failed])
fi
fi
if test "x$have_gst" = "xno"; then
GST_CFLAGS=""
LDADD_GST=""
LDFLAGS_GST=""
AC_MSG_WARN([GStreamer version >= $GST_REQ required.])
AC_DEFINE(HAVE_GSTREAMER, 0, [have GStreamer])
else
LDADD_GST=`$PKG_CONFIG --libs-only-l gstreamer-$GST_MAJORMINOR`
......@@ -63,13 +84,14 @@ else
LIBDIRS_GST=`$PKG_CONFIG --libs-only-L gstreamer-$GST_MAJORMINOR`
LDADD_GST="$LDADD_GST $LIBDIRS_GST"
AC_SUBST(GST_CFLAGS)
AC_SUBST(LDADD_GST)
AC_SUBST(LDFLAGS_GST)
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
AC_SUBST(GST_CFLAGS)
AC_SUBST(LDADD_GST)
AC_SUBST(LDFLAGS_GST)
if test "x$have_taglib" != xyes || ( test "x$build_arts" = "xno" && test "x$have_gst" = "xno" ) ; then
DO_NOT_COMPILE="$DO_NOT_COMPILE juk"
fi
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