diff --git a/Makefile.am b/Makefile.am index c0bfdc5..74fc901 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,17 +30,19 @@ minidlnad_SOURCES = minidlna.c upnphttp.c upnpdescgen.c upnpsoap.c \ playlist.c image_utils.c albumart.c log.c \ containers.c avahi.c tagutils/tagutils.c -#if NEED_VORBIS -vorbisflag = -lvorbis -#endif +if HAVE_VORBISFILE +vorbislibs = -lvorbis -logg +else +if NEED_OGG +flacogglibs = -logg +endif +endif -#if NEED_OGG -flacoggflag = -logg -#endif - -#if HAVE_AVAHI +if TIVO_SUPPORT +if HAVE_AVAHI avahilibs = -lavahi-client -lavahi-common -#endif +endif +endif minidlnad_LDADD = \ @LIBJPEG_LIBS@ \ @@ -51,7 +53,7 @@ minidlnad_LDADD = \ @LIBEXIF_LIBS@ \ @LIBINTL@ \ @LIBICONV@ \ - -lFLAC $(flacoggflag) $(vorbisflag) $(avahilibs) + -lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs) minidlnad_LDFLAGS = @STATIC_LDFLAGS@ @@ -63,7 +65,7 @@ testupnpdescgen_LDADD = \ @LIBAVFORMAT_LIBS@ \ @LIBAVUTIL_LIBS@ \ @LIBEXIF_LIBS@ \ - -lFLAC $(flacoggflag) $(vorbisflag) + -lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs) SUFFIXES = .tmpl . diff --git a/configure.ac b/configure.ac index 5a18ba8..f343d21 100644 --- a/configure.ac +++ b/configure.ac @@ -454,12 +454,11 @@ AC_CHECK_LIB(pthread, pthread_create) # prior versions had ov_open_callbacks in libvorbis, test that, too. AC_CHECK_LIB(vorbisfile, ov_open_callbacks, [AC_CHECK_HEADERS([vorbis/vorbisfile.h], - AM_CONDITIONAL(HAVE_VORBISFILE, true) - AC_DEFINE(HAVE_VORBISFILE,1,[Have vorbisfile]), - AM_CONDITIONAL(HAVE_VORBISFILE, false) - AC_DEFINE(HAVE_VORBISFILE,0,[lacking vorbisfile]))], - AM_CONDITIONAL(HAVE_VORBISFILE, false), - -lvorbis -logg) + AM_CONDITIONAL(HAVE_VORBISFILE, true) + AC_DEFINE(HAVE_VORBISFILE,1,[Have vorbisfile]), + AM_CONDITIONAL(HAVE_VORBISFILE, false))], + AM_CONDITIONAL(HAVE_VORBISFILE, false), + -lvorbis -logg) AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init_stream, [AC_CHECK_HEADERS([FLAC/all.h], AM_CONDITIONAL(HAVE_FLAC, true) @@ -548,11 +547,14 @@ AC_ARG_ENABLE(tivo, [ --enable-tivo enable TiVo support],[ if test "$enableval" = "yes"; then AC_DEFINE(TIVO_SUPPORT, 1, [Define to 1 if you want to enable TiVo support]) + AM_CONDITIONAL(TIVO_SUPPORT, true) AC_MSG_RESULT([yes]) else + AM_CONDITIONAL(TIVO_SUPPORT, false) AC_MSG_RESULT([no]) fi ],[ + AM_CONDITIONAL(TIVO_SUPPORT, false) AC_MSG_RESULT([no]) ] ) @@ -588,13 +590,14 @@ AC_ARG_ENABLE(readynas, AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURER],"NETGEAR") AC_DEFINE_UNQUOTED([ROOTDEV_MODELNAME],"Windows Media Connect compatible (ReadyDLNA)") AC_DEFINE_UNQUOTED([ROOTDEV_MODELDESCRIPTION],"ReadyDLNA") - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ],[ - AC_MSG_RESULT([no]) - ] + AM_CONDITIONAL(TIVO_SUPPORT, true) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ],[ + AC_MSG_RESULT([no]) + ] ) AC_MSG_CHECKING([whether to build a static binary executable]) diff --git a/tagutils/tagutils.c b/tagutils/tagutils.c index 794e7b9..1a1b379 100644 --- a/tagutils/tagutils.c +++ b/tagutils/tagutils.c @@ -21,6 +21,7 @@ /* This file is derived from mt-daapd project */ +#include "config.h" #include #include #include @@ -32,11 +33,12 @@ #include #include #include +#ifdef HAVE_VORBISFILE #include #include +#endif #include -#include "config.h" #ifdef HAVE_ICONV #include #endif @@ -102,7 +104,9 @@ char *winamp_genre[] = { */ #include "tagutils-mp3.h" #include "tagutils-aac.h" +#ifdef HAVE_VORBISFILE #include "tagutils-ogg.h" +#endif #include "tagutils-flc.h" #include "tagutils-asf.h" #include "tagutils-wav.h" @@ -126,7 +130,9 @@ static taghandler taghandlers[] = { { "aac", _get_aactags, _get_aacfileinfo }, { "mp3", _get_mp3tags, _get_mp3fileinfo }, { "flc", _get_flctags, _get_flcfileinfo }, +#ifdef HAVE_VORBISFILE { "ogg", 0, _get_oggfileinfo }, +#endif { "asf", 0, _get_asffileinfo }, { "wav", _get_wavtags, _get_wavfileinfo }, { "pcm", 0, _get_pcmfileinfo }, @@ -139,7 +145,9 @@ static taghandler taghandlers[] = { #include "tagutils-misc.c" #include "tagutils-mp3.c" #include "tagutils-aac.c" +#ifdef HAVE_VORBISFILE #include "tagutils-ogg.c" +#endif #include "tagutils-flc.c" #include "tagutils-asf.c" #include "tagutils-wav.c"