Use pkg-config for libFLAC

Don't use FLAC_CFLAGS because it contains -I/usr/lib/FLAC which breaks
anything using assert(), due to FLAC's own assert.h.
This commit is contained in:
Julien BLACHE 2009-04-01 18:12:22 +02:00
parent 22e646099a
commit b4deba68b6
3 changed files with 5 additions and 14 deletions

View File

@ -103,6 +103,10 @@ if test x$use_oggvorbis = xtrue; then
PKG_CHECK_MODULES(OGGVORBIS, [ ogg vorbis vorbisfile ])
fi
if test x$use_flac = xtrue; then
PKG_CHECK_MODULES(FLAC, [ flac ])
fi
if test x$use_ffmpeg = xtrue; then
PKG_CHECK_MODULES(FFMPEG, [ libavcodec libavformat ])
fi
@ -118,18 +122,6 @@ AC_ARG_WITH(static-libs,
AC_CHECK_HEADERS(getopt.h,,)
AC_CHECK_HEADERS(stdint.h,,)
if test x$use_flac = xtrue; then
AC_CHECK_HEADERS(FLAC/metadata.h,, [
AC_MSG_ERROR([FLAC/metadata.h not found... Must have libFLAC installed for FLAC support])])
AC_CHECK_LIB(FLAC,FLAC__metadata_chain_read,,echo "Must have libFLAC for FLAC support";exit)
if test x"$STATIC_LIBS" != x"no"; then
LIBS="${LIBS} ${STATIC_LIBS}/libFLAC.a"
else
LIBS="${LIBS} -lFLAC"
fi
fi
if test x$use_musepack = xtrue; then
AC_PATH_PROG(TAGLIB_CONFIG, taglib-config, no)
AC_CHECK_HEADERS(taglib/tag_c.h,, [

View File

@ -25,7 +25,7 @@ endif
wavstreamer_SOURCES = wavstreamer.c
mt_daapd_CPPFLAGS = @AVAHI_CFLAGS@ @SQLITE3_CFLAGS@ @ID3TAG_CFLAGS@ @OGGVORBIS_CFLAGS@
mt_daapd_LDADD = @AVAHI_LIBS@ @SQLITE3_LIBS@ @ID3TAG_LIBS@ @OGGVORBIS_LIBS@
mt_daapd_LDADD = @AVAHI_LIBS@ @SQLITE3_LIBS@ @ID3TAG_LIBS@ @OGGVORBIS_LIBS@ @FLAC_LIBS@
mt_daapd_SOURCES = main.c daapd.h rend.h webserver.c \
webserver.h configfile.c configfile.h err.c err.h restart.c restart.h \
mp3-scanner.h mp3-scanner.c \

View File

@ -23,7 +23,6 @@
# include "config.h"
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>