From faccd246cf9ee662cd8262d0db2a2375c1d4da86 Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@systemlinux.org>
Date: Sun, 29 Jun 2008 14:58:12 +0200
Subject: [PATCH] Link para_server and para_afh against libid3tag if available.

---
 configure.ac | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/configure.ac b/configure.ac
index a974ddb8..3ba67c4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,6 +434,21 @@ fi
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
 LIBS="$OLD_LIBS"
+###################################################################### libid3tag
+AC_MSG_CHECKING(for libid3tag)
+AC_TRY_LINK([
+	#include <id3tag.h>
+],[
+	struct id3_tag t = {.flags = 0};
+],[have_libid3tag=yes],[have_libid3tag=no])
+AC_MSG_RESULT($have_libid3tag)
+if test ${have_libid3tag} = yes; then
+	AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
+	server_ldflags="$server_ldflags -lid3tag"
+	afh_ldflags="$afh_ldflags -lid3tag"
+else
+	AC_MSG_WARN([no support for id3v2 tags])
+fi
 ########################################################################### alsa
 have_alsa="yes"
 OLD_CPPFLAGS="$CPPFLAGS"
-- 
2.39.5