]> git.sesse.net Git - vlc/blobdiff - configure.ac
Makefile: tell wxwidgets not to use precompiled headers since it is broken under...
[vlc] / configure.ac
index 6f367e445d0becbd6e6a178d80d981add3a3302f..88874523f6c820b5862a05f7f93579b6e00143fa 100644 (file)
@@ -180,14 +180,14 @@ case "${target_os}" in
         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
         VLC_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
         VLC_ADD_LDFLAGS([vcdx cddax],[-lwinmm])
-        VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_rtp access_rtsp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp telnet netsync],[-lws2_32])
+        VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp telnet netsync],[-lws2_32])
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
         VLC_ADD_CPPFLAGS([vlc],[-Dmain(a,b)=maince(a,b)])
         VLC_ADD_LDFLAGS([vlc],[-lws2 -e WinMainCRTStartup])
-        VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_rtp access_rtsp  access_tcp access_ftp access_output_udp sap http netsync],[-lws2])
+        VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap http netsync],[-lws2])
    fi
     ;;
   *nto*)
@@ -373,7 +373,7 @@ AC_CHECK_FUNCS(connect,,[
 
 AC_CHECK_FUNCS(send,,[
   AC_CHECK_LIB(socket,send,[
-    VLC_ADD_LDFLAGS([access_http access_mms access_udp access_rtp access_rtsp access_tcp access_ftp sap access_output_udp stream_out_standard],[-lsocket])
+    VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap access_output_udp stream_out_standard],[-lsocket])
   ])
 ])
 
@@ -1022,7 +1022,7 @@ VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
 VLC_ADD_PLUGINS([playlist export sgimb m3u nsc xtag])
 VLC_ADD_PLUGINS([i420_rgb rawvideo blend scale image logo magnify])
 VLC_ADD_PLUGINS([wav araw subtitle vobsub adpcm a52sys dtssys au ty voc xa nuv])
-VLC_ADD_PLUGINS([access_directory access_file access_udp access_rtp access_rtsp access_tcp])
+VLC_ADD_PLUGINS([access_directory access_file access_udp access_tcp])
 VLC_ADD_PLUGINS([access_http access_mms access_ftp ipv4])
 VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
 VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
@@ -1485,6 +1485,128 @@ if test "${enable_livedotcom}" = "yes"; then
   fi
 fi
 
+dnl
+dnl dv module: digital video module check for libraw1394
+dnl
+AC_ARG_ENABLE(dv,
+[  --enable-dv             dv input module (default disabled)])
+if test "{enable_dv}" = "yes"
+then
+  AC_ARG_WITH(dv-raw1394,
+  [    --with-dv-raw1394=PATH   libraw1394 headers and libraries])
+  AC_ARG_WITH(dv-raw1394-tree,
+  [    --with-dv-raw1394=PATH   libraw1394 tree for static linking])
+
+  if test -z "${with_dv_raw1394}" -a "${with_dv_raw1394}" != ""
+  then
+    AC_MSG_CHECKING(for raw1394 headers in ${with_dv_raw1394})
+    if test -f ${with_dv_raw1394}/include/libraw1394/raw1394.h
+    then
+      dnl  Use ${with_dv_raw1394}/include/libraw1394/raw1394.h
+      AC_MSG_RESULT(yes)
+      VLC_ADD_PLUGINS([access_dv])
+      VLC_ADD_LDFLAGS([access_dv],[-L${with_dv_raw1394}/lib -lraw1394 -lpthread])
+      VLC_ADD_CPPFLAGS([access_dv],[-I${with_dv_raw1394}/include])
+    else
+      dnl  No libraw1394 could be found, sorry
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${with_dv_raw1394}/include/libraw1394/raw1394.h])
+    fi
+  else
+    AC_CHECK_HEADERS(libraw1394/raw1394.h,
+    [ VLC_ADD_PLUGINS([access_dv])
+        VLC_ADD_LDFLAGS([access_dv],[-lraw1394 -lavc1394])
+    ],[
+        if test -n "${enable_dv}"
+        then
+          AC_MSG_ERROR([cannot find libraw1394 headers])
+        fi
+    ])
+  fi
+
+  dnl Check for static linking of libraw1394
+  if test -z "${with_dv_raw1394_tree}" -a "${with_dv_raw1394_tree}" != ""
+  then
+    AC_MSG_CHECKING(for libraw1394.a in ${with_dv_raw1394_tree})
+    real_dv_raw1394_tree="`cd ${with_dv_raw1394_tree} 2>/dev/null && pwd`"
+    if test -z "${real_dv_raw1394_tree}"
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${real_dv_raw1394_tree}])
+    fi
+    if test -f "${real_dv_raw1394_tree}/src/.libs/libraw1394.a"
+    then
+      dnl  Use a custom libraw1394
+      AC_MSG_RESULT(${real_dv_raw1394_tree}/src/.libs/libraw1394.a)
+      VLC_ADD_BUILTINS([access_dv])
+      VLC_ADD_LDFLAGS([access_dv],[-L${real_dv_raw1394_tree}/src/.libs -lraw1394])
+      VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_raw1394_tree}])
+    else
+      dnl  The given libraw1394 wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_dv_raw1394_tree}/src/.libs/libraw1394.a, make sure you compiled libraw1394 in ${with_dv_raw1394_tree}])
+    fi
+  fi
+
+  dnl
+  dnl Check for libavc1394
+  dnl
+
+  AC_ARG_WITH(dv-avc1394,
+  [    --with-dv-avc1394=PATH   libavc1394 headers and libraries])
+  AC_ARG_WITH(dv-avc1394-tree,
+  [    --with-dv-avc1394=PATH   libavc1394 tree for static linking])
+
+  if test -z "${with_dv_avc1394}" -a "${with_dv_avc1394}" != ""
+  then
+    AC_MSG_CHECKING(for avc1394 headers in ${with_dv_avc1394})
+    if test -f ${with_dv_avc1394}/include/libavc1394/avc1394.h
+    then
+      dnl  Use ${with_dv_avc1394}/include/libavc1394/avc1394.h
+      AC_MSG_RESULT(yes)
+      VLC_ADD_LDFLAGS([access_dv],[-L${with_dv_avc1394}/lib -lavc1394 -lrom1394 -lpthread])
+      VLC_ADD_CPPFLAGS([access_dv],[-I${with_avc1394}/include])
+    else
+      dnl  No libavc1394 could be found, sorry
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${with_dv_avc1394}/include/libavc1394/avc1394.h])
+    fi
+  else
+    AC_CHECK_HEADERS(libavc1394/avc1394.h,
+    [ VLC_ADD_LDFLAGS([access_dv],[-lavc1394 -lrom1394 -lpthread])
+    ],[
+        if test -n "${enable_dv}"
+        then
+          AC_MSG_ERROR([cannot find libavc1394 headers])
+        fi
+    ])
+  fi
+
+  dnl Check for static linking of libavc1394
+  if test -z "${with_dv_avc1394_tree}" -a "${with_dv_avc1394_tree}" != ""
+  then
+    AC_MSG_CHECKING(for libavc1394.a in ${with_dv_avc1394_tree})
+    real_dv_avc1394_tree="`cd ${with_dv_avc1394_tree} 2>/dev/null && pwd`"
+    if test -z "${real_dv_avc1394_tree}"
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${real_dv_avc1394_tree}])
+    fi
+    if test -f "${real_dv_avc1394_tree}/src/.libs/libavc1394.a"
+    then
+      dnl  Use a custom libavc1394
+      AC_MSG_RESULT(${real_dv_avc1394_tree}/src/.libs/libavc1394.a)
+      VLC_ADD_LDFLAGS([access_dv],[-L${real_dv_avc1394_tree}/src/.libs -lavc1394 -lrom1394 -lpthread])
+      VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_avc1394_tree}])
+    else
+      dnl  The given libavc1394 wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_dv_avc1394_tree}/src/.libs/libavc1394.a, make sure you compiled libavc1394 in ${with_dv_avc1394_tree}])
+    fi
+  fi
+fi
 
 dnl
 dnl dvdread module: check for libdvdread
@@ -1625,7 +1747,7 @@ if test "${enable_dvbpsi}" != "no"
 then
   AC_ARG_WITH(dvbpsi,
   [    --with-dvbpsi=PATH    libdvbpsi headers and libraries])
-  AC_ARG_WITH(dvbpsi-tree,
+  AC_ARG_WITH(dvbpsi,
   [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
   case "${with_dvbpsi}" in
   ""|yes)
@@ -1664,7 +1786,7 @@ then
         if test "${enable_sout}" != "no"; then
           VLC_ADD_BUILTINS([mux_ts])
         fi
-        VLC_ADD_CPPFLAGS([mux_ts ts dvb],[-I${real_dvbpsi_tree}/src -I${real_dvbpsi_tree}/src/descriptors])
+        VLC_ADD_CPPFLAGS([mux_ts ts dvb],[-I${real_dvbpsi_tree}/src])
         VLC_ADD_LDFLAGS([mux_ts ts dvb],[${real_dvbpsi_tree}/src/.libs/libdvbpsi.a])
       else
         dnl  The given libdvbpsi wasn't built
@@ -2251,8 +2373,7 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
       [
         if test "$with_ffmpeg_mp3lame" = "yes";        then
                VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
-       fi
-       ])
+       fi])
 
     AC_ARG_WITH(ffmpeg-faac,
       [    --with-ffmpeg-faac    specify if ffmpeg has been compiled with faac support],
@@ -2265,7 +2386,11 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
       [    --with-ffmpeg-dts     specify if ffmpeg has been compiled with dts support],
       [
         if test "$with_ffmpeg_dts" = "yes"; then
-               VLC_ADD_LDFLAGS([ffmpeg],[-ldts])
+                LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
+                AC_CHECK_LIB(dts_pic, dts_free, 
+                  [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
+                  [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
+                LDFLAGS="${LDFLAGS_save}"
        fi])
 
     AC_ARG_WITH(ffmpeg-zlib,
@@ -2360,7 +2485,11 @@ dnl Trying with pkg-config
       fi
       if fgrep -s "CONFIG_DTS=yes" "${real_ffmpeg_tree}/config.mak"; then
         if test "${with_ffmpeg_dts}" != "yes"; then
-          VLC_ADD_LDFLAGS([ffmpeg],[-ldts])
+          LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
+          AC_CHECK_LIB(dts_pic, dts_free, 
+            [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
+            [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
+          LDFLAGS="${LDFLAGS_save}"
         fi
       fi
       if fgrep -s "CONFIG_VORBIS=yes" "${real_ffmpeg_tree}/config.mak"; then
@@ -4906,7 +5035,6 @@ AC_CONFIG_FILES([
   modules/access/pvr/Makefile
   modules/access/v4l/Makefile
   modules/access/cdda/Makefile
-  modules/access/rtp/Makefile
   modules/access/rtsp/Makefile
   modules/access/vcd/Makefile
   modules/access/vcdx/Makefile