]> git.sesse.net Git - vlc/blobdiff - configure.ac
Merge branch '0.9.0-libass' of git://git.videolan.org/vlc
[vlc] / configure.ac
index 718f0e5394584e0805a46f1c4641505b9e5bf588..b9bc30e749c95426710ff811cddd1997c1db58c8 100644 (file)
@@ -810,10 +810,13 @@ AC_CHECK_TYPE(ssize_t,, [
   AC_DEFINE(ssize_t, int)
 ])
 
-dnl don't attemp to use poll on darwin, it can't poll a tty. select will do a better job.
-if test "${SYS}" != "darwin"; then
-  AC_SEARCH_LIBS(poll, [poll], [AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS is usabl... err, has poll().])])
+dnl Check for poll
+AC_SEARCH_LIBS(poll, [poll], [AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS is usabl... err, has poll().])], [
+if test ${SYS} != "mingw32"
+then
+    AC_MSG_WARN([Your platform does not support poll(). VLC has it's own poll() implementation, but it is only intended to be used on Windows. VLC might crash or be insecure when you see this message. Either switch to an OS with a proper poll() implementation, or implement one for your OS in VLC])
 fi
+])
 
 dnl Check for dirent
 need_dirent=false
@@ -3763,6 +3766,27 @@ AS_IF( [test "${enable_csri}" = "yes"], [
       ])
   ])
 
+dnl
+dnl libass subtitle rendering module
+dnl
+AC_ARG_ENABLE(libass,
+  [  --enable-libass           Subtitle support using libass (default disabled)])
+AS_IF( [test "${enable_libass}" = "yes"], [
+  PKG_CHECK_MODULES(LIBASS,
+      libass >= 0.9.5,
+      [
+        VLC_ADD_LDFLAGS([libass],[$LIBASS_LIBS])
+        VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
+        VLC_ADD_PLUGIN([libass])
+
+               AC_CHECK_HEADERS(fontconfig/fontconfig.h,
+                 [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
+                  VLC_ADD_LIBS([libass],[-lfontconfig])])
+      ],[
+        AC_MSG_WARN([LIBASS library not found])
+      ])
+  ])
+
 dnl
 dnl asa demuxer
 dnl