[vlc-commits] configure: fix FAAD linking test (-lm) and clean up
Rémi Denis-Courmont
git at videolan.org
Sat Dec 6 18:50:48 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 5 20:05:16 2014 +0200| [bae26a1be6643dc9b6e6235b3923909c43c64a3a] | committer: Jean-Baptiste Kempf
configure: fix FAAD linking test (-lm) and clean up
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bae26a1be6643dc9b6e6235b3923909c43c64a3a
---
configure.ac | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5edc868..b1edbf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2520,25 +2520,24 @@ dnl faad decoder plugin
dnl
AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default auto)])
-if test "${enable_faad}" != "no"; then
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}"
- LDFLAGS="${LDFLAGS} ${LIBS_faad}"
- AC_CHECK_HEADERS(faad.h,
- [ AC_CHECK_LIB(faad, faacDecOpen, [
- VLC_ADD_PLUGIN([faad])
- VLC_ADD_LIBS([faad],[-lfaad]) ], [
- AC_CHECK_LIB(faad, NeAACDecOpen, [
- VLC_ADD_PLUGIN([faad])
- VLC_ADD_LIBS([faad],[-lfaad]) ], [
- AS_IF([test "${enable_faad}" = "yes"],
- [ AC_MSG_ERROR([Cannot find libfaad library...]) ],
- [ AC_MSG_WARN([Cannot find libfaad library...]) ]) ]) ])
- ] , [ AS_IF([test "${enable_faad}" = "yes"],
- [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ],
- [ AC_MSG_WARN([Cannot find development headers for libfaad...]) ]) ])
- VLC_RESTORE_FLAGS
-fi
+have_faad="no"
+AS_IF([test "${enable_faad}" != "no"], [
+ AC_CHECK_HEADERS([faad.h], [
+ AC_CHECK_LIB(faad, faacDecOpen, [have_faad="yes"],, [$LIBM])
+ AC_CHECK_LIB(faad, NeAACDecOpen, [have_faad="yes"],, [$LIBM])
+
+ AS_IF([test "${have_faad}" = "yes"], [
+ VLC_ADD_PLUGIN([faad])
+ VLC_ADD_LIBS([faad],[-lfaad])
+ ], [
+ AS_IF([test "${enable_faad}" = "yes"], [
+ AC_MSG_ERROR([cannot find FAAD library])
+ ], [
+ AC_MSG_WARN([cannot find FAAD library])
+ ])
+ ])
+ ])
+])
dnl
dnl libvpx decoder plugin
More information about the vlc-commits
mailing list