diff options
author | spiff <spiff@xbmc.org> | 2012-05-02 19:24:50 +0200 |
---|---|---|
committer | spiff <spiff@xbmc.org> | 2012-05-02 22:07:00 +0200 |
commit | 9a6940bb92fba0fd8a03d6a913261feeb1ade3ef (patch) | |
tree | d322c1975fe037c3f1d22ee9679dd1c5aa5b5dad /configure.in | |
parent | 6ad8770d9f6c062249fd60c659c6f3c81541d55f (diff) |
changed: make mp3lame and vorbisenc optional
Diffstat (limited to 'configure.in')
-rwxr-xr-x | configure.in | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 9082e71a3e..e2710d7667 100755 --- a/configure.in +++ b/configure.in @@ -410,6 +410,18 @@ AC_ARG_ENABLE([libcec], [use_libcec=$enableval], [use_libcec=auto]) +AC_ARG_ENABLE([libmp3lame], + [AS_HELP_STRING([--enable-libmp3lame], + [enable lame mp3 encoder support (default is auto)])], + [use_libmp3lame=$enableval], + [use_libmp3lame=auto]) + +AC_ARG_ENABLE([vorbisenc], + [AS_HELP_STRING([--enable-libvorbisenc], + [enable vorbis encoder support (default is auto)])], + [use_libvorbisenc=$enableval], + [use_libvorbisenc=auto]) + ### External libraries options AC_ARG_ENABLE([external-libraries], [AS_HELP_STRING([--enable-external-libraries], @@ -690,11 +702,9 @@ AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([samplerate.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library)) -AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([curl/curl.h],, AC_MSG_ERROR($missing_library)) AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library)) -AC_CHECK_HEADER([lame/lame.h],, AC_MSG_ERROR($missing_headers)) # we need to check for the header because if it exists we set the openssl # and gcrypt MT callback hooks. This is mostly so that libcurl operates @@ -815,8 +825,35 @@ XB_FIND_SONAME([ASS], [ass]) XB_FIND_SONAME([MPEG2], [mpeg2]) # Audio encoders -XB_FIND_SONAME([LAMEENC], [mp3lame]) -XB_FIND_SONAME([VORBISENC], [vorbisenc]) +if test "x$use_libmp3lame" != "xno"; then + XB_FIND_SONAME([LAMEENC], [mp3lame], [use_libmp3lame]) + if test "x$use_libmp3lame" != "xno"; then + AC_CHECK_HEADER([lame/lame.h],, AC_MSG_ERROR($missing_headers)) + fi +fi +AS_CASE([x$use_libmp3lame], + [xno],[ + AC_SUBST([HAVE_LIBMP3LAME], 0) + ], + [ + AC_DEFINE([HAVE_LIBMP3LAME], 1, [System has libmp3lame library]) + AC_SUBST([HAVE_LIBMP3LAME], 1) + ] +) +if test "x$use_libvorbisenc" != "xno"; then + XB_FIND_SONAME([VORBISENC], [vorbisenc], [use_libvorbisenc]) + if test "x$use_libvorbisenc" != "xno"; then + AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_headers)) + fi +fi +AS_CASE([x$use_libvorbisenc], + [xno],[ + AC_SUBST([HAVE_LIBVORBISENC], 0) + ],[ + AC_DEFINE([HAVE_LIBVORBISENC], 1, [System has libvorbisenc library]) + AC_SUBST([HAVE_LIBVORBISENC], 1) + ] +) # WebServer if test "$use_webserver" = "yes"; then @@ -1812,6 +1849,18 @@ else final_message="$final_message\n libcec support:\tNo" fi +if test "x$use_libmp3lame" != "xno"; then + final_message="$final_message\n libmp3lame support:\tYes" +else + final_message="$final_message\n libmp3lame support:\tNo" +fi + +if test "x$use_libvorbisenc" != "xno"; then + final_message="$final_message\n libvorbisenc support:\tYes" +else + final_message="$final_message\n libvorbisenc support:\tNo" +fi + ### External libraries messages if test "$use_external_ffmpeg" = "yes"; then |