]> git.sesse.net Git - vlc/blobdiff - configure.ac
Adds missing assert.h header
[vlc] / configure.ac
index 4b2308c89025038f692f083464123fc3dc8c982b..d7c9656cf5e027855469dd5226b7b8398b5dcca3 100644 (file)
@@ -29,6 +29,24 @@ AS_IF([test "x${enable_maintainer_mode}" != "xno"],
        [enable_maintainer_mode="yes"])
 AM_MAINTAINER_MODE
 
+dnl
+dnl  Deprecated options
+dnl  to notify packagers that stuff has changed
+dnl
+AC_ARG_ENABLE(python-bindings,
+  [  --enable-python-bindings Always fails for historical reasons)],,
+  [enable_python_bindings="no"])
+AS_IF([test "${enable_python_bindings}" != "no"], [
+  AC_MSG_ERROR([Python bindings are now built from a separate source package])
+])
+
+AC_ARG_ENABLE(java-bindings,
+  [  --enable-java-bindings  Always fails for historical reasons],,
+  [enable_java_bindings="no"])
+AS_IF([test "${enable_java_bindings}" != "no"], [
+  AC_MSG_ERROR([Java bindings are now built from a separate source package])
+])
+
 dnl
 dnl  Save *FLAGS
 dnl
@@ -465,7 +483,7 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise])
+AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale])
 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
 AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
@@ -500,7 +518,7 @@ AC_CHECK_FUNCS(connect,,[
 
 AC_CHECK_FUNCS(send,,[
   AC_CHECK_LIB(socket,send,[
-    VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp stream_out_standard growl_udp],[-lsocket])
+    VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp],[-lsocket])
   ])
 ])
 
@@ -1048,34 +1066,6 @@ if test "${ac_cv_c_omit_frame_pointer}" != "no"; then
     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
 fi
 
-dnl Check for -fvisibility=hidden
-dnl Don't test on mingw32, because it is going to work with just a warning
-dnl even if it doesn't support it
-if test "${SYS}" != "mingw32"
-then
-AC_CACHE_CHECK([if \$CC accepts -fvisibility=hidden],
-    [ac_cv_c_visibility_hidden],
-    [CFLAGS="${CFLAGS_save} -fvisibility=hidden"
-     AC_TRY_COMPILE([],,ac_cv_c_visibility_hidden=yes, ac_cv_c_visibility_hidden=no)])
-if test "${ac_cv_c_visibility_hidden}" != "no"; then
-    VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden])
-fi
-fi
-
-AM_CONDITIONAL(HAVE_COMPILER_EXPORT, [test "$SYS" = "mingw32" -o "${ac_cv_c_visibility_hidden}" != "no"])
-
-dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers)
-dnl AC_LANG_PUSH(C++)
-dnl     AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden],
-dnl         [ac_cv_c_visibility_inlines_hidden],
-dnl         [CXXFLAGS="${CXXFLAGS_save} -fvisibility-inlines-hidden"
-dnl          AC_TRY_COMPILE([],,ac_cv_c_visibility_inlines_hidden=yes, ac_cv_c_visibility_inlines_hidden=no)])
-dnl     if test "${ac_cv_c_visibility_inlines_hidden}" != "no"; then
-dnl         VLC_ADD_CXXFLAGS([libvlc plugin],[-fvisibility-inlines-hidden])
-dnl     fi
-dnl     CXXFLAGS="${CXXFLAGS_save}"
-dnl AC_LANG_POP(C++)
-
 dnl Check for -mdynamic-no-pic
 dnl AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
 dnl     [ac_cv_c_dynamic_no_pic],
@@ -1148,16 +1138,6 @@ if test "${ac_cv_c_attribute_packed}" != "no"; then
   AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
 fi
 
-dnl Check for __attribute__((visibility()))
-AC_CACHE_CHECK([for __attribute__((visibility()))],
-  [ac_cv_c_attribute_visibility],
-  [ac_cv_c_attribute_visibility=no
-   AC_TRY_COMPILE(, [extern __attribute__((visibility("default"))) int foo(int);],
-                    [ac_cv_c_attribute_visibility=yes])])
-if test "${ac_cv_c_attribute_visibility}" != "no"; then
-  AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1, Support for __attribute__((visibility())) for exporting symbols)
-fi
-
 dnl
 dnl  Check the CPU
 dnl
@@ -1741,7 +1721,7 @@ fi
 
 dnl Lua modules
 AC_ARG_ENABLE(lua,
-  [  --enable-lua            lua playlist and metafetcher plugins (default enabled)])
+  [  --enable-lua            lua playlist, metafetcher and interface plugins (default enabled)])
 if test "${enable_lua}" != "no"
 then
   PKG_CHECK_MODULES(LUA, lua5.1,
@@ -3048,6 +3028,15 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
              LDFLAGS="${LDFLAGS_save}"
      fi])
 
+ AC_ARG_WITH(ffmpeg-dca,
+   [    --with-ffmpeg-dca     specify if ffmpeg has been compiled with dca support],
+   [
+     if test "$with_ffmpeg_dca" = "yes"; then
+             LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
+             AC_CHECK_LIB(dca, dca_free, [ VLC_ADD_LIBS([ffmpeg],[-ldca]) ])
+             LDFLAGS="${LDFLAGS_save}"
+     fi])
+
  AC_ARG_WITH(ffmpeg-vorbis,
    [    --with-ffmpeg-vorbis    specify if ffmpeg has been compiled with vorbis support],
    [
@@ -3214,7 +3203,7 @@ dnl Trying with pkg-config
        VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
        VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
        AC_CHECK_LIB(swscale, sws_getContext,
-         [AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h])],[],[-lavutil -lm])
+         [AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h])],[],[${SWSCALE_LIBS}])
        ],[ true ])
      VLC_RESTORE_FLAGS
     ],[
@@ -5181,6 +5170,8 @@ then
   VLC_ADD_PLUGIN([pda])
   if test "${SYS}" != "mingw32"; then
     NEED_GTK2_MAIN=yes
+    VLC_ADD_CFLAGS([gtk2_main],[$GTK2_CFLAGS])
+    VLC_ADD_LIBS([gtk2_main],[$GTK2_LIBS])
   fi
 fi
 AM_CONDITIONAL(BUILD_PDA, [test "${enable_pda}" = "yes"])
@@ -5501,18 +5492,20 @@ AC_ARG_ENABLE(macosx,
 if test "x${enable_macosx}" = "xyes"
 then
 #  VLC_ADD_LDFLAGS([access_eyetv],                     [-Wl,-framework,Foundation])
-  VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,Cocoa])
+  VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer qtcapture],[-Wl,-framework,Cocoa])
   VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,OpenGL])
   VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,Carbon])
   VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,AGL])
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,IOKit])
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,QuickTime])
-  VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,QTKit])
+  VLC_ADD_LDFLAGS([macosx qtcapture],                 [-Wl,-framework,QTKit])
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,WebKit])
-  VLC_ADD_LDFLAGS([opengllayer],                      [-Wl,-framework,QuartzCore])
+  VLC_ADD_LDFLAGS([opengllayer qtcapture],            [-Wl,-framework,QuartzCore])
+  VLC_ADD_LDFLAGS([qtcapture],                        [-Wl,-framework,CoreVideo])
   VLC_ADD_OBJCFLAGS([macosx minimal_macosx opengllayer growl], [-fobjc-exceptions] )
 
 #  VLC_ADD_PLUGIN([access_eyetv])
+  VLC_ADD_PLUGIN([qtcapture])
   VLC_ADD_PLUGIN([macosx])
   VLC_ADD_PLUGIN([minimal_macosx])
  
@@ -6134,56 +6127,16 @@ AC_LANG_POP(C++)
 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
 
 dnl Tests for Osso and Xsp
-if test "${enable_x11}" != "no" &&
-  (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
-   test "${enable_x11}" = "yes"); then
-   AC_CHECK_LIB(osso, osso_display_blanking_pause,[
-      PKG_CHECK_MODULES(GLIB2, glib-2.0, [                                               
-          VLC_ADD_CPPFLAGS([x11],[-DHAVE_OSSO ${DBUS_CFLAGS} ${GLIB2_CFLAGS}])
-          VLC_ADD_LIBS([x11],[-losso])
-      ])
-   ])
-   AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
-      VLC_ADD_CPPFLAGS([x11],[-DHAVE_XSP])
-      VLC_ADD_LIBS([x11],[-lXsp])
-   ])
-fi
-
-dnl
-dnl  Mediacontrol Python bindings
-dnl
-AC_ARG_ENABLE(python-bindings,
-  [  --enable-python-bindings Enable Python bindings (default disabled)])
-
-if test "${enable_python_bindings}" = "yes"; then
-  AC_PATH_PROG(PYTHON_CONFIG, python-config, no)
-  CFLAGS="${CFLAGS_save} `${PYTHON_CONFIG} --cflags`"
-  AC_CHECK_HEADER([Python.h],
-    PLUGINS_BINDINGS="${PLUGINS_BINDINGS} python",
-    AC_MSG_ERROR([You have to install python-dev to build the bindings]),
-    []
-  )
-  CFLAGS="${CFLAGS_save}"
-fi
-AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"])
-
-dnl
-dnl  Java bindings
-dnl
-AC_ARG_ENABLE(java-bindings,
-  [  --enable-java-bindings  Enable Java bindings (default disabled)])
-if test "${enable_java_bindings}" = "yes"
-then
-        echo ""
-        echo "****** WARNING **** WARNING ***** WARNING *************"
-        echo "*** To compile the java bindings go to the "
-        echo "*** bindings/java folder and run mvn install. "
-       echo "*** You need maven2 installed. "
-       echo "*** This configuration will continue, so you will be "
-       echo "*** able to compile VideoLAN as usual. "
-        echo "*******************************************************"
-        echo ""
-fi
+AC_CHECK_LIB(osso, osso_display_blanking_pause, [
+  PKG_CHECK_MODULES(GLIB2, glib-2.0, [
+    VLC_ADD_CPPFLAGS([x11 xvideo xvmc glx],[-DHAVE_OSSO ${DBUS_CFLAGS} ${GLIB2_CFLAGS}])
+    VLC_ADD_LIBS([x11 xvideo xvmc glx],[-losso])
+ ])
+])
+AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
+  VLC_ADD_CPPFLAGS([x11 xvideo xvmc glx],[-DHAVE_XSP])
+  VLC_ADD_LIBS([x11 xvideo xvmc glx],[-lXsp])
+])
 
 dnl
 dnl  test plugins
@@ -6260,7 +6213,6 @@ then
     VLC_ADD_LDFLAGS([qte_main],[${LDFLAGS_qte} ${LDFLAGS_qt_video}])
 fi
 
-
 dnl
 dnl  Plugin and builtin checks
 dnl
@@ -6363,7 +6315,6 @@ AC_CONFIG_FILES([
   Makefile
   projects/activex/Makefile
   projects/activex/axvlc.inf
-  bindings/python/Makefile
   doc/Makefile
   extras/package/ipkg/Makefile
   libs/loader/Makefile