]> git.sesse.net Git - vlc/blobdiff - configure.ac
Audio track and channel support for JavaScript API. The ActiveX vlc.audio.channel...
[vlc] / configure.ac
index 695ead4d777832aec9b82cf3014b798e3be630bd..8043aa36bc08dc5c029264c7e90508ba98906f01 100644 (file)
@@ -247,9 +247,9 @@ case "${host_os}" in
     LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}"
     dnl Check for BONE
     if test -f /boot/beos/system/lib/libbind.so; then
-        VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap vlc growl],[-lbind -lsocket])
+        VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lbind -lsocket])
     else
-        VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap vlc growl],[-lnet])
+        VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lnet])
     fi
 
     dnl Ugly check for Zeta
@@ -279,7 +279,7 @@ m4_defun([AC_PROG_F77],[])
 AC_PROG_LIBTOOL
 
 AC_ARG_ENABLE(libtool,
-    [  --enable-libtool        use libtool (default disabled)])
+    [  --enable-libtool        use libtool (default enabled)])
 AM_CONDITIONAL(USE_LIBTOOL, [test "x${enable_libtool}" != "xno"])
 
 
@@ -313,9 +313,9 @@ AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [
   ])
 ], [
   AS_IF([test "${enable_libtool}" != "no"], [
-    VLC_ADD_LDFLAGS([libvlc], [${LTLIBINTL}])
+    VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
   ], [
-    VLC_ADD_LDFLAGS([libvlc], [${LIBINTL}])
+    VLC_ADD_LDFLAGS([libvlc vlc], [${LIBINTL}])
   ])
 ])
 AC_SUBST(INCLUDED_LIBINTL)
@@ -330,9 +330,9 @@ AS_IF([test "$am_cv_func_iconv" != "yes"],
 fi
 VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
 AS_IF([test "${enable_libtool}" != "no"], [
-  VLC_ADD_LDFLAGS([libvlc],[${LIBICONV}])
+  VLC_ADD_LDFLAGS([libvlc vlc],[${LIBICONV}])
 ],[
-  VLC_ADD_LDFLAGS([libvlc],[${LTLIBICONV}])
+  VLC_ADD_LDFLAGS([libvlc vlc],[${LTLIBICONV}])
 ])
 
 dnl Check for the need to include the mingwex lib for mingw32
@@ -567,10 +567,10 @@ AC_CHECK_LIB(m,cos,[
   VLC_ADD_LDFLAGS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq vlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
+  VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
-  VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres],[-lm])
+  VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
 ])
 AC_CHECK_LIB(m,ceil,[
   VLC_ADD_LDFLAGS([mosaic],[-lm])
@@ -844,7 +844,7 @@ dnl Check for dbus
 AC_ARG_ENABLE(dbus,
   [  --enable-dbus           Linux D-BUS message bus system (default enabled)])
  
-if test "${enable_dbus}" != "no"
+if test "${enable_dbus}" != "no" -a "$SYS" = "Linux"
 then
   dnl api stable dbus
   PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
@@ -934,9 +934,10 @@ RDC_PROG_CC_FLAGS_IFELSE([-pipe])
 
 dnl This helps detect broken plugins with undefined symbols
 dnl Better fail loudly at build-time than silenty at run-time.
-RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
-  VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
-])
+dnl Unfortunately, this sucks on FreeBSD (won't even link with -lc)
+dnl RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
+dnl   VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
+dnl ])
 
 dnl Check for various optimization flags
 AC_CACHE_CHECK([if \$CC accepts -Os],
@@ -1126,7 +1127,7 @@ dnl
 VLC_ADD_PLUGINS([dummy logger memcpy])
 VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta])
 VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac])
-VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise])
+VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract])
 VLC_ADD_PLUGINS([converter_fixed mono])
 VLC_ADD_PLUGINS([trivial_resampler ugly_resampler])
 VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
@@ -1444,15 +1445,6 @@ AC_ARG_ENABLE(release,
 [  --enable-release        activate extra optimizations (default disabled)])
 test "${enable_release}" != "yes" && enable_release="no"
 
-dnl
-dnl  Is the shared libvlc forced ?
-dnl
-AC_ARG_ENABLE(shared-libvlc,
-  [  --enable-shared-libvlc  Win32 libvlc.dll build (default disabled)])
-AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [
-  AC_MSG_ERROR([--enable-shared-libvlc and --enable-libtool are mutually exclusive])
-])
-
 dnl
 dnl Stream output
 dnl
@@ -2151,8 +2143,8 @@ dnl
 dnl  gnomeVFS access module
 dnl
 AC_ARG_ENABLE(gnomevfs,
-  [  --enable-gnomevfs       GnomeVFS access module (default enabled)])
-if test "${enable_gnomevfs}" != "no
+  [  --enable-gnomevfs       GnomeVFS access module (default disabled)])
+if test "${enable_gnomevfs}" = "yes
 then
   PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0,
     VLC_ADD_LDFLAGS([access_gnomevfs],[$GNOMEVFS_LIBS])
@@ -4101,7 +4093,7 @@ then
       ])
       AC_CHECK_HEADERS(d3d9.h,
       [ VLC_ADD_PLUGINS([direct3d])
-        VLC_ADD_LDFLAGS([direct3d],[-ld3d9 -lgdi32])
+        VLC_ADD_LDFLAGS([direct3d],[-lgdi32])
       ])
     else
       AC_MSG_CHECKING(for directX headers in ${with_directx})
@@ -4791,6 +4783,8 @@ then
       # wxwidgets should provide the following flags but does not
       # the following is required to compile for win32
       VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE])
+    else
+      AC_MSG_ERROR([You need a unicode build of wxWidgets. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
     fi
     if test "$have_libcdio" = "yes"
     then 
@@ -5271,17 +5265,24 @@ then
        WIDL=no
     fi
     AC_LANG_PUSH(C++)
-    AC_CHECK_HEADERS(ole2.h olectl.h,
-      [ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
-        VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
-        AC_CHECK_HEADERS(objsafe.h,
-          VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
-          [#if HAVE_OLE2_H
-           #   include <ole2.h>
-           #endif]
-        )
-        activex=:
-      ],
+    AC_CHECK_HEADERS(ole2.h, 
+      [AC_CHECK_HEADERS(olectl.h,
+        [ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_])
+          VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
+          VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
+          AC_CHECK_HEADERS(objsafe.h,
+            VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
+            [
+            #if HAVE_OLE2_H
+             #   include <ole2.h>
+             #endif
+            ]
+          )
+          activex=:
+         PLUGINS_BINDINGS="${PLUGINS_BINDINGS} activex"
+        ],
+        [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
+      )],
       [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
     )
     AC_LANG_POP(C++)
@@ -5326,21 +5327,22 @@ then
         MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
       fi
     fi
-    
+
     if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
       LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
       AC_CHECK_LIB(Xt,XtStrings,
        [
          VLC_ADD_CPPFLAGS([mozilla],[${X_CFLAGS}])
          VLC_ADD_LDFLAGS([mozilla],[${X_LIBS} ${X_PRE_LIBS} -lXt -lX11 -lSM -lICE])
-],
+       ],
        [],
        [[${X_LIBS} ${X_PRE_LIBS} -lX11 -lSM -lICE]
       ])
       LDFLAGS="${LDFLAGS_save}"
     fi
-    
+
       mozilla=:
+      PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
       dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
       VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
       if ${need_xpcom_libs}; then
@@ -5375,7 +5377,7 @@ then
           mozilla_sdk_xpcom="/xpcom"
       fi
     fi
-  
+
     real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
     CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
     MOZILLA_REQUIRED_HEADERS=1
@@ -5392,6 +5394,7 @@ then
     fi
     MOZILLA_REQUIRED_HEADERS=
     mozilla=:
+    PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
     VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
     if ${need_xpcom_libs}; then
        VLC_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue])
@@ -5420,6 +5423,10 @@ dnl
 AC_ARG_ENABLE(python-bindings,
   [  --enable-python-bindings    Enable Python bindings (default disabled)])
 dnl TODO: look for python dev headers
+AS_IF([test "${enable_python_bindings}" = "yes"],
+      PLUGINS_BINDINGS="${PLUGINS_BINDINGS} python"
+     ) 
+
 AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"])
 
 dnl
@@ -5433,6 +5440,7 @@ then
        [AC_MSG_ERROR([Please set the JAVA_HOME variable to your JDK environment])])
   AC_PROG_JAVAC
   AC_PROG_JAVA
+  PLUGINS_BINDINGS="${PLUGINS_BINDINGS} java"
 fi
 AM_CONDITIONAL(BUILD_JAVA, [test "${enable_java_bindings}" = "yes"])
 
@@ -5544,14 +5552,13 @@ AS_IF([${plugin_support}], [
 dnl
 dnl Pic and shared libvlc stuff
 dnl
-AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no])
-AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
-AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [
+AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [
   AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
   FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
   VLC_ADD_PLUGINS([${BUILTINS}])
   BUILTINS=""
 ], [
+  LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}"
   FILE_LIBVLC_DLL=""
 ])
 
@@ -5604,7 +5611,6 @@ dnl
 dnl  Create the vlc-config script
 dnl
 LDFLAGS_libvlc="${LDFLAGS_libvlc} ${LDFLAGS_builtin}"
-for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
 
 dnl
 dnl  Configuration is finished
@@ -5756,6 +5762,7 @@ test "${enable_optimizations}" = "yes" && printf "optim "
 test "${enable_release}" = "yes" && printf "release " || printf "devel "
 echo "
 vlc aliases           :${ALIASES}
+plugins/bindings      :${PLUGINS_BINDINGS}
 
 You can tune the compiler flags in vlc-config.
 To build vlc and its plugins, type \`./compile' or \`make'.