diff options
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 007658ab8..944c1c153 100644 --- a/configure.ac +++ b/configure.ac @@ -623,6 +623,37 @@ fi AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes) if test x$enable_aac = xyes; then + oldcflags=$CFLAGS + oldlibs=$LIBS + oldcppflags=$CPPFLAGS + CFLAGS="$CFLAGS $MPD_CFLAGS $FAAD_CFLAGS -Werror" + LIBS="$LIBS $MPD_LIBS $FAAD_LIBS" + CPPFLAGS=$CFLAGS + + AC_MSG_CHECKING(for broken libfaad headers) + AC_COMPILE_IFELSE([ +#include <faad.h> +#include <stddef.h> +#include <stdint.h> + +int main() { + unsigned char channels; + uint32_t sample_rate; + + faacDecInit2(NULL, NULL, 0, &sample_rate, &channels); + return 0; +} + ], + [AC_MSG_RESULT(correct)], + [AC_MSG_RESULT(broken); + AC_DEFINE(HAVE_FAAD_LONG, 1, [Define if faad.h uses the broken "unsigned long" pointers])]) + + CFLAGS=$oldcflags + LIBS=$oldlibs + CPPFLAGS=$oldcppflags +fi + +if test x$enable_aac = xyes; then enable_mp4=yes MP4FF_LIBS="-lmp4ff" |