dnl Copyright © 2010, 2014 Nick Bowler dnl dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2. dnl This is free software: you are free to do what the fuck you want to. dnl There is NO WARRANTY, to the extent permitted by law.]) dnl _DX_LIBAVRESAMPLE_TEST_PROGRAM(major, minor, micro) AC_DEFUN([_DX_LIBAVRESAMPLE_TEST_PROGRAM], [AC_LANG_PROGRAM([dnl #include ifelse([$1], [], [], [dnl #if LIBAVRESAMPLE_VERSION_MAJOR < $1 # error libavresample version too low int fail[-1]; ifelse([$2], [], [], [dnl #elif LIBAVRESAMPLE_VERSION_MAJOR == $1 # if LIBAVRESAMPLE_VERSION_MINOR < $2 # error libavresample version too low int fail[-1]; ifelse([$3], [], [], [dnl # elif LIBAVRESAMPLE_VERSION_MINOR == $2 # if LIBAVRESAMPLE_VERSION_MICRO < $3 # error libavresample version too low int x[-1]; # endif ])dnl # endif ])dnl #endif ])dnl ], [dnl avresample_license(); ])]) dnl DX_CHECK_LIBAVRESAMPLE([min-version], [action-if-ok], [action-if-fail]) AC_DEFUN([DX_CHECK_LIBAVRESAMPLE], [DX_PKG_CONFIG([avresample], [libavresample], [libavresample]) DX_CHECK_LIB([avresample], [for libavresample[]ifelse([$1], [], [], [ version at least $1])], [m4_apply([_DX_LIBAVRESAMPLE_TEST_PROGRAM], m4_split([$1], [\.]))], [dnl [[$AVRESAMPLE_CFLAGS], [$AVRESAMPLE_LIBS]], [[$pkg_cv_avresample_cflags], [$pkg_cv_avresample_libs], [test ! x"$pkg_failed" = x"yes"]], [[], [-lavresample]], ]) if test x"$dx_cv_avresample_found" = x"yes"; then ifelse([$2], [], [:], [$2]) else ifelse([$3], [], [AC_MSG_FAILURE([dnl libavresample[]ifelse([$1], [], [], [ version at least $1]) is required. The latest version can be obtained from http://ffmpeg.org/download.html If libavresample is installed but was not found by this configure script, consider adjusting AVRESAMPLE_CFLAGS and/or AVRESAMPLE_LIBS as necessary. If pkg-config is installed, it may help to adjust PKG_CONFIG_PATH if libavresample is installed in a non-standard prefix. ])], [$3]) fi ])