build: Fix up some conditional code
Avahi and Ogg/Vorbis library conditional enablement wasn't working as intended.
This commit is contained in:
parent
cee5cfc04e
commit
da7d868c4b
24
Makefile.am
24
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 .
|
||||
|
||||
|
29
configure.ac
29
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])
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
/* This file is derived from mt-daapd project */
|
||||
|
||||
#include "config.h"
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <id3tag.h>
|
||||
@ -32,11 +33,12 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_VORBISFILE
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/codec.h>
|
||||
#endif
|
||||
#include <FLAC/metadata.h>
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_ICONV
|
||||
#include <iconv.h>
|
||||
#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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user