]> git.sesse.net Git - vlc/blobdiff - configure.ac
Don't rebuild the skin all the time
[vlc] / configure.ac
index f6dc9331685819ec358eca54e2bb7c16018cd3b2..76db50a357f3fd9face81b9bdf08c69410b0ae05 100644 (file)
@@ -9,7 +9,7 @@ VERSION_EXTRA="svn"
 CONFIGURE_LINE="$0 $*"
 CODENAME="Janus"
 
-AC_PREREQ(2.50)
+AC_PREREQ(2.59c)
 AC_CONFIG_SRCDIR(src/libvlc.c)
 AC_CONFIG_AUX_DIR(autotools)
 AC_CANONICAL_SYSTEM
@@ -37,7 +37,7 @@ VLC_SAVE_FLAGS
 dnl
 dnl Check for tools
 dnl
-AC_PROG_CC
+AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AC_PROG_CPP
 AC_PROG_CXX
@@ -74,6 +74,7 @@ AC_CHECK_TOOL(LD, ld, :)
 dnl Check for compiler properties
 AC_C_CONST
 AC_C_INLINE
+AC_C_RESTRICT
 
 dnl
 dnl  Check for the contrib directory
@@ -784,6 +785,8 @@ fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 
 AC_HEADER_TIME
 
+AC_SEARCH_LIBS(poll, [poll], [AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS is usabl... err, has poll().])])
+
 dnl Check for dirent
 need_dirent=false
 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
@@ -1143,6 +1146,7 @@ VLC_ADD_PLUGINS([access_http access_mms access_ftp ipv4])
 VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
 VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
 
+
 if test "${SYS}" != "mingwce"; then
 dnl  VLC_ADD_PLUGINS([externrun])
   VLC_ADD_PLUGINS([access_fake access_filter_timeshift access_filter_record])
@@ -1873,6 +1877,45 @@ then
   fi
 fi
 
+
+dnl
+dnl  OpenCV wrapper and example filters
+dnl
+AC_ARG_ENABLE(opencv,
+  [  --enable-opencv            OpenCV (computer vision) filter (default disabled)])
+if test "${enable_opencv}" = "yes" -a "${CXX}" != "";
+then
+  AC_ARG_WITH(opencv-tree,
+  [    --with-opencv-tree=PATH opencv tree for linking])
+  if test -n "${with_opencv_tree}"
+  then
+    if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+    then
+         AC_MSG_CHECKING(for opencv in ${with_opencv_tree})
+         if test -f ${with_opencv_tree}/cv/include/cv.h -a -f ${with_opencv_tree}/cxcore/include/cxcore.h \
+           -a -f ${with_opencv_tree}/cvaux/include/cvaux.h -a -f ${with_opencv_tree}/otherlibs/highgui/highgui.h
+      then
+        AC_MSG_RESULT(yes)
+        VLC_ADD_PLUGINS([opencv_wrapper])
+        VLC_ADD_LDFLAGS([opencv_wrapper],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
+        VLC_ADD_CFLAGS([opencv_wrapper],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
+        AC_LANG_PUSH(C++)
+        VLC_ADD_PLUGINS([opencv_example])
+        VLC_ADD_LDFLAGS([opencv_example],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
+        VLC_ADD_CXXFLAGS([opencv_example],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
+        AC_LANG_POP(C++)        
+         else
+        dnl  No opencv could be found, sorry
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([cannot find opencv in ${with_opencv_tree}])
+         fi
+    else
+         AC_MSG_WARN([--enable-opencv currently only works on windows])
+    fi
+  fi  
+fi
+
+
 dnl
 dnl  libsmbclient plugin
 dnl
@@ -2739,12 +2782,20 @@ dnl Trying with pkg-config
      AC_CHECK_HEADERS(ffmpeg/avformat.h)
      AC_CHECK_HEADERS(ffmpeg/avutil.h)
      AC_CHECK_HEADERS(postproc/postprocess.h)
-     VLC_ADD_PLUGINS([ffmpeg])
+     if test "${SYS}" = "darwin"; then
+        VLC_ADD_BUILTINS([ffmpeg])
+     else
+        VLC_ADD_PLUGINS([ffmpeg])
+     fi
      if test "${enable_sout}" != "no"; then
-         VLC_ADD_PLUGINS([stream_out_switcher])
+        if test "${SYS}" = "darwin"; then
+            VLC_ADD_BUILTINS([stream_out_switcher])
+        else
+            VLC_ADD_PLUGINS([stream_out_switcher])
+        fi
      fi
      VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
-     VLC_ADD_LDFLAGS([ffmpeg],[${FFMPEG_LIBS}])
+     VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
      dnl newer ffmpeg have a separate libpostproc
      PKG_CHECK_MODULES(POSTPROC, libpostproc,[
        VLC_ADD_LDFLAGS([ffmpeg],[${POSTPROC_LIBS}]) 
@@ -5023,7 +5074,7 @@ AC_ARG_ENABLE(gnutls,
   [  --enable-gnutls         gnutls TLS/SSL support (default enabled)])
 
 AS_IF([test "${enable_gnutls}" != "no"], [
-  PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.0.17], [have_gnutls="yes"], [have_gnutls="no"])
+  PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2.9], [have_gnutls="yes"], [have_gnutls="no"])
 
   AS_IF([test "${have_gnutls}" = "yes"], [
     VLC_ADD_PLUGINS([gnutls])
@@ -5031,7 +5082,7 @@ AS_IF([test "${enable_gnutls}" != "no"], [
     VLC_ADD_LDFLAGS([gnutls], [$GNUTLS_LIBS])
   ], [
     AS_IF([test "${enable_gnutls}" = "yes"], [
-      AC_MSG_ERROR([gnutls not present or too old (version 1.0.17 required)])
+      AC_MSG_ERROR([gnutls not present or too old (version 1.2.9 required)])
     ])
   ])
 ])