-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD: Move libfaad checking into ax_check_faad.m4
- Loading branch information
Showing
2 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
dnl @synopsis AX_CHECK_FAAD(action-if, action-if-not) | ||
dnl | ||
dnl @summary check for libfaad | ||
dnl | ||
dnl Defines FAAD_LIBS, FAAD_CFLAGS. | ||
dnl | ||
dnl @category InstalledPackages | ||
dnl @author Sven Hesse <drmccoy@drmccoy.de> | ||
dnl @version 2013-12-14 | ||
dnl @license AllPermissive | ||
|
||
AC_DEFUN([AX_CHECK_FAAD], [ | ||
AC_ARG_VAR(FAAD_CFLAGS, [C compiler flags for libfaad]) | ||
AC_ARG_VAR(FAAD_LIBS, [libraries to pass to the linker for libfaad]) | ||
if test -z "$FAAD_CFLAGS"; then | ||
FAAD_CFLAGS="" | ||
fi | ||
if test -z "$FAAD_LIBS"; then | ||
FAAD_LIBS="-lfaad" | ||
fi | ||
save_CFLAGS="$CFLAGS" | ||
save_CXXFLAGS="$CXXFLAGS" | ||
save_LIBS="$LIBS" | ||
CFLAGS="$CFLAGS $FAAD_CFLAGS" | ||
CXXFLAGS="$CXXFLAGS $FAAD_CFLAGS" | ||
LIBS="$LIBS $FAAD_LIBS" | ||
AC_CHECK_HEADER([neaacdec.h], , nofaad=1) | ||
CFLAGS="$save_CFLAGS" | ||
CXXFLAGS="$save_CXXFLAGS" | ||
LIBS="$save_LIBS" | ||
if test "$nofaad" = "1"; then | ||
ifelse([$2], , :, [$2]) | ||
else | ||
ifelse([$1], , :, [$1]) | ||
fi | ||
AC_SUBST(FAAD_CFLAGS) | ||
AC_SUBST(FAAD_LIBS) | ||
]) |