LIB_SUBST_FLAGS(mad)
UNSTASH_FLAGS
###################################################################### libid3tag
-OLD_CPPFLAGS="$CPPFLAGS"
-OLD_LDFLAGS="$LDFLAGS"
-OLD_LIBS="$LIBS"
-
-have_libid3tag="yes"
-AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
- [look for id3tag header files also in dir])])
-if test -n "$with_id3tag_headers"; then
- id3tag_cppflags="-I$with_id3tag_headers"
- CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
-fi
-AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
- [look for id3tag libs also in dir])])
-if test -n "$with_id3tag_libs"; then
- id3tag_libs="-L$with_id3tag_libs"
- LDFLAGS="$LDFLAGS $id3tag_libs"
-fi
-
-AC_MSG_CHECKING(for libid3tag)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- #include <id3tag.h>
-]], [[
- struct id3_tag t = {.flags = 0};
-]])],[],[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)
- AC_SUBST(id3tag_cppflags)
- AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
-fi
-CPPFLAGS="$OLD_CPPFLAGS"
-LDFLAGS="$OLD_LDFLAGS"
-LIBS="$OLD_LIBS"
+STASH_FLAGS
+LIB_ARG_WITH([id3tag], [-lid3tag -lz])
+HAVE_ID3TAG=yes
+AC_CHECK_HEADER(id3tag.h, [], HAVE_ID3TAG=no)
+AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
+LIB_SUBST_FLAGS(id3tag)
+UNSTASH_FLAGS
########################################################################### flac
OLD_CPPFLAGS="$CPPFLAGS"
OLD_LDFLAGS="$LDFLAGS"
unix socket credentials: $have_ucred
readline (interactive CLIs): $have_readline
audio formats handlers: $audio_format_handlers
-id3 version2 support: $have_libid3tag
+id3 version 2 support: $HAVE_ID3TAG
filters: $filters
writers: $writers
static const int frame_size_index[] = {24000, 72000, 72000};
static const char *mode_text[] = {"stereo", "joint stereo", "dual channel", "mono", "invalid"};
-#ifdef HAVE_LIBID3TAG
+#ifdef HAVE_ID3TAG
#include <id3tag.h>
return ret;
}
-#else /* HAVE_LIBID3TAG */
+#else /* HAVE_ID3TAG */
/*
* Remove trailing whitespace from the end of a string
tags->comment = para_strdup(comment);
return 1;
}
-#endif /* HAVE_LIBID3TAG */
+#endif /* HAVE_ID3TAG */
static int header_frequency(struct mp3header *h)
{