[vlc-devel] [PATCH 1/2] x265: detect X265_BUILD
Rafaël Carré
funman at videolan.org
Mon Oct 14 12:50:36 CEST 2013
As the library symbols are suffixed with the exact build version, and
it is not clear yet whether the API will be broken or simply extended,
watch for the exact version number (which is 1)
---
configure.ac | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index be30c53..d5e2d81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2725,13 +2725,18 @@ dnl x265 encoder
AC_ARG_ENABLE(x265,
AS_HELP_STRING([--enable-x265],[H265 / HEVC encoding support with libx265 (default enabled)]))
AS_IF( [test "${enable_x265}" != "no"],[
- AC_CHECK_HEADER([x265.h], [
- AC_CHECK_LIB([x265],[x265_encoder_open], [
- VLC_ADD_PLUGIN([x265])
- VLC_ADD_LIBS([x265], [-lx265 -lstdc++ -lm -lpthread])
- ], [
- AC_MSG_ERROR([x265 library not found])
- ], [-lstdc++ -lm -lpthread])
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([
+#include <x265.h>
+#if X265_BUILD != 1
+# error Fail
+#endif
+ ])], [
+ AC_CHECK_LIB([x265],[x265_encoder_open_1], [
+ VLC_ADD_PLUGIN([x265])
+ VLC_ADD_LIBS([x265], [-lx265 -lstdc++ -lm -lpthread])
+ ], [
+ AC_MSG_ERROR([x265 library not found])
+ ], [-lstdc++ -lm -lpthread])
], [
AS_IF([test "${enable_x265}" = "yes"], [
AC_MSG_ERROR([x265.h not found])
--
1.8.3.2
More information about the vlc-devel
mailing list