Use pkg-config for id3tag

This commit is contained in:
Julien BLACHE 2009-04-01 17:52:01 +02:00
parent 5f682ca276
commit 2fd4b744a7
2 changed files with 3 additions and 28 deletions

View File

@ -97,6 +97,7 @@ dnl Checks for libraries.
PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.24 ])
PKG_CHECK_MODULES(SQLITE3, [ sqlite3 ],
AC_DEFINE(HAVE_SQLITE3, 1, [define if sqlite3 is available]))
PKG_CHECK_MODULES(ID3TAG, [ id3tag ])
if test x$use_ffmpeg = xtrue; then
PKG_CHECK_MODULES(FFMPEG, [ libavcodec libavformat ])
@ -110,35 +111,9 @@ AC_ARG_WITH(static-libs,
fi
])
AC_ARG_WITH(id3tag,
[--with-id3tag[[=DIR]] use id3tag in DIR],[
if test "$withval" != "no" -a "$withval" != "yes"; then
Z_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LDFLAGS="${LDFLAGS} -L$withval/lib -R$withval/lib"
fi
])
AC_CHECK_HEADERS(getopt.h,,)
AC_CHECK_HEADERS(stdint.h,,)
AC_CHECK_HEADERS(id3tag.h,, [
AC_MSG_ERROR([id3tag.h not found... try --with-id3tag=dir])])
oldcflags=$CFLAGS
CFLAGS="$CFLAGS -lz"
OLDLIBS=$LIBS
AC_CHECK_LIB(id3tag,id3_file_open,,echo "no libid3tag. Try --with-id3tag=dir";exit)
LIBS=$OLDLIBS
if test "$STATIC_LIBS" != "no"; then
LIBS="${LIBS} ${STATIC_LIBS}/libid3tag.a ${STATIC_LIBS}/libz.a"
else
LIBS="${LIBS} -lid3tag -lz"
fi
CFLAGS=$oldcflags
if test x$use_oggvorbis = xtrue; then
AC_CHECK_HEADERS(ogg/ogg.h,, [
AC_MSG_ERROR([ogg/ogg.h not found... Must have libogg installed for Ogg/Vorbis support])])

View File

@ -24,8 +24,8 @@ endif
wavstreamer_SOURCES = wavstreamer.c
mt_daapd_CPPFLAGS = @AVAHI_CFLAGS@ @SQLITE3_CFLAGS@
mt_daapd_LDADD = @AVAHI_LIBS@ @SQLITE3_LIBS@
mt_daapd_CPPFLAGS = @AVAHI_CFLAGS@ @SQLITE3_CFLAGS@ @ID3TAG_CFLAGS@
mt_daapd_LDADD = @AVAHI_LIBS@ @SQLITE3_LIBS@ @ID3TAG_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 \