| Summary: | add option to disable mp3 support (libmad) | ||
|---|---|---|---|
| Product: | [Unmaintained] arts | Reporter: | David Walser <luigiwalser> |
| Component: | general | Assignee: | Stefan Westerfeld <stefan> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | danarmak, rdieter |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Mandrake RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | optional-deps.diff | ||
|
Description
David Walser
2002-10-15 15:01:47 UTC
I've written such a patch for the Gentoo ebuilds. It adds --disable-arts-vorbis and --disable-libmad switches to configure. Applicable to both cvs head and 3_1_branch. autoconf isn't my strong point, so this is mostly on a copy-paste level and you might declare it the completely wrong way to do it. But it works :-) Attaching patch. Created attachment 1594 [details]
optional-deps.diff
CVS commit by akrille: Allow to disable vorbis and mad in arts. Hope that works as expected (I only have both libs installed). Should this be backported to ARTS_1_2_BRANCH? Thanks to danarmak@gentoo.org CCMAIL:49187-done@bugs.kde.org M +38 -19 configure.in.in 1.13 --- arts/flow/gsl/configure.in.in #1.12:1.13 @@ -42,16 +42,26 @@ [ dnl === Ogg/Vorbis check === - ov_headers=0 - AC_CHECK_LIB(vorbisfile, ov_read_float, - [AC_CHECK_HEADER(ogg/ogg.h, ov_headers=`expr $ov_headers + 1`)] - [AC_CHECK_HEADER(vorbis/vorbisfile.h, ov_headers=`expr $ov_headers + 1`)] - , - ov_headers=0, -lvorbis -logg) - if test $ov_headers = 2 ; then - GSL_LIBS="$GSL_LIBS -lvorbisfile -lvorbis -logg" - GSL_HAVE_OGGVORBIS=1 + AC_ARG_ENABLE(vorbis, + [ --disable-arts-vorbis disable arts Ogg Vorbis support], + [arts_want_vorbis="$enableval"],[arts_want_vorbis="yes"]) + + if test "$arts_want_vorbis" = "yes"; then + ov_headers=0 + AC_CHECK_LIB(vorbisfile, ov_read_float, + [AC_CHECK_HEADER(ogg/ogg.h, ov_headers=`expr $ov_headers + 1`)] + [AC_CHECK_HEADER(vorbis/vorbisfile.h, ov_headers=`expr $ov_headers + 1`)] + [AC_CHECK_HEADER(vorbis/vorbisenc.h, ov_headers=`expr $ov_headers + 1`)] + , + ov_headers=0, -lvorbisenc -lvorbis -logg) + if test $ov_headers = 3 ; then + GSL_LIBS="$GSL_LIBS -lvorbisfile -lvorbisenc -lvorbis -logg" + GSL_HAVE_OGGVORBIS=1 + else + GSL_HAVE_OGGVORBIS=0 + fi + dnl AC_DEFINE(GSL_HAVE_OGGVORBIS,1,[Define if you want Ogg Vorbis support unconditionally]) else - GSL_HAVE_OGGVORBIS=0 - dnl AC_MSG_WARN([failed to detect Ogg/Vorbis library (>=1.0rc3) or headers]) + GSL_HAVE_OGGVORBIS=0 + dnl AC_MSG_WARN([failed to detect Ogg/Vorbis library (>=1.0rc3) or headers]) fi AC_SUBST(GSL_HAVE_OGGVORBIS) @@ -75,12 +85,21 @@ dnl === libmad MPEG decoder check === - mad_detect=0 - AC_CHECK_LIB(mad, mad_synth_frame, - [AC_CHECK_HEADER(mad.h, mad_detect=1)] - , - mad_detect=0, -lmad) - if test $mad_detect = 1 ; then - GSL_LIBS="$GSL_LIBS -lmad" - GSL_HAVE_LIBMAD=1 + AC_ARG_ENABLE(libmad, + [ --disable-libmad disable arts MAD mp3 decoder support], + [arts_want_libmad="$enableval"],[arts_want_libmad="yes"]) + + if test "$arts_want_libmad" = "yes"; then + mad_detect=0 + AC_CHECK_LIB(mad, mad_synth_frame, + [AC_CHECK_HEADER(mad.h, mad_detect=1)] + , + mad_detect=0, -lmad) + if test $mad_detect = 1 ; then + GSL_LIBS="$GSL_LIBS -lmad" + GSL_HAVE_LIBMAD=1 + else + dnl AC_MSG_WARN([failed to detect libmad (MPEG I-III audio decoder) or headers]) + GSL_HAVE_LIBMAD=0 + fi else dnl AC_MSG_WARN([failed to detect libmad (MPEG I-III audio decoder) or headers]) |