]> git.sesse.net Git - vlc/blobdiff - configure.ac
VLC_EXPORT is meant for libvlccore, not libvlc-control
[vlc] / configure.ac
index b76426ded9013e69ce4e96a6f100f04a61b80dab..5ac937f60b596a90a3aee71e879c95489b8f0465 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
@@ -346,6 +364,7 @@ case "${host_os}" in
 esac
 AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos")
 AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
+AM_CONDITIONAL(HAVE_LINUX, [test "${SYS}" = "linux"])
 AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
 AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
 
@@ -464,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 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)])
@@ -474,10 +493,6 @@ AH_BOTTOM([#include <vlc_fixups.h>])
 
 AC_CHECK_FUNCS(mmap, [VLC_ADD_PLUGIN([access_mmap])])
 
-AS_IF([test "${SYS}" = "linux"], [
-  AC_CHECK_FUNCS(tee)
-])
-
 dnl Check for setlocal and langinfo
 AC_CHECK_FUNCS(setlocale)
 AC_CHECK_HEADERS(langinfo.h)
@@ -503,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])
   ])
 ])
 
@@ -641,6 +656,9 @@ AC_CHECK_LIB(m,ceil,[
 AC_CHECK_LIB(m,exp,[
   VLC_ADD_LIBS([gaussianblur],[-lm])
 ])
+AC_CHECK_LIB(m,round,[
+  VLC_ADD_LIBS([dbus],[-lm])
+])
 AC_CHECK_LIB(mx,sqrtf,[
   VLC_ADD_LIBS([x264],[-lmx])
 ])
@@ -1062,8 +1080,6 @@ if test "${ac_cv_c_visibility_hidden}" != "no"; then
 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],
@@ -1290,12 +1306,6 @@ VLC_ADD_PLUGIN([access_filter_timeshift])
 VLC_ADD_PLUGIN([access_filter_record])
 VLC_ADD_PLUGIN([access_filter_dump])
 VLC_ADD_PLUGIN([access_filter_bandwidth])
-dnl Packetizers:
-VLC_ADD_PLUGIN([packetizer_mpegvideo])
-VLC_ADD_PLUGIN([packetizer_h264])
-VLC_ADD_PLUGIN([packetizer_mpeg4video])
-VLC_ADD_PLUGIN([packetizer_mpeg4audio])
-VLC_ADD_PLUGIN([packetizer_vc1])
 
 ALIASES="${ALIASES} cvlc"
 
@@ -1725,43 +1735,9 @@ dnl Stream output
 dnl
 AC_ARG_ENABLE(sout,
   [  --enable-sout           Stream output modules (default enabled)])
-if test "${enable_sout}" != "no"
-then
-  dnl Access outputs:
-  VLC_ADD_PLUGIN([access_output_dummy])
-  VLC_ADD_PLUGIN([access_output_udp])
-  VLC_ADD_PLUGIN([access_output_file])
-  VLC_ADD_PLUGIN([access_output_http])
-  dnl Muxers:
-  VLC_ADD_PLUGIN([mux_ps])
-  VLC_ADD_PLUGIN([mux_avi])
-  VLC_ADD_PLUGIN([mux_mp4])
-  VLC_ADD_PLUGIN([mux_asf])
-  VLC_ADD_PLUGIN([mux_dummy])
-  VLC_ADD_PLUGIN([mux_wav])
-  VLC_ADD_PLUGIN([mux_mpjpeg])
-  dnl Packetizers (FIXME: why are the others outside --enable-sout??):
-  VLC_ADD_PLUGIN([packetizer_copy])
-  dnl Stream outputs:
-  VLC_ADD_PLUGIN([stream_out_dummy])
-  VLC_ADD_PLUGIN([stream_out_standard])
-  VLC_ADD_PLUGIN([stream_out_es])
-  VLC_ADD_PLUGIN([stream_out_rtp])
-  VLC_ADD_PLUGIN([stream_out_description])
-  VLC_ADD_PLUGIN([stream_out_duplicate])
-  VLC_ADD_PLUGIN([stream_out_display])
-  VLC_ADD_PLUGIN([stream_out_transcode])
-  VLC_ADD_PLUGIN([stream_out_bridge])
-  VLC_ADD_PLUGIN([stream_out_mosaic_bridge])
-  VLC_ADD_PLUGIN([stream_out_autodel])
-  VLC_ADD_PLUGIN([stream_out_gather])
-#  VLC_ADD_PLUGIN([stream_out_transrate])
-  dnl Misc:
-  VLC_ADD_PLUGIN([vod_rtsp])
-  VLC_ADD_PLUGIN([profile_parser])
-
-  AC_DEFINE(ENABLE_SOUT, 1, Define if you want the stream output support)
-fi
+AS_IF([test "${enable_sout}" != "no"], [
+  AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
+])
 AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
 
 AC_ARG_ENABLE(switcher,
@@ -1810,7 +1786,6 @@ then
     ])
   if test "x${have_lua}" = "xyes" ;  then
      AC_DEFINE(HAVE_LUA, 1, [Define if you have the lua library])
-     VLC_ADD_PLUGIN([lua])
      VLC_ADD_LIBS([lua],[$LUA_LIBS])
      VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
   fi
@@ -1959,7 +1934,7 @@ if test "${enable_live555}" != "no"; then
       ], [
         AC_CHECK_LIB(liveMedia, main, [
           # We only have -lliveMedia, do builtins
-          VLC_ADD_BUILTINS([live555])
+          VLC_ADD_PLUGIN([live555])
           VLC_ADD_LIBS([live555], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
         ])
       ])
@@ -1981,7 +1956,7 @@ if test "${enable_live555}" != "no"; then
     if test -f "${real_live555_tree}/liveMedia/libliveMedia.a"; then
       AC_MSG_RESULT(${real_live555_tree}/liveMedia/libliveMedia.a)
 
-      VLC_ADD_BUILTINS([live555])
+      VLC_ADD_PLUGIN([live555])
 
       if test "${SYS}" = "mingw32"; then
         # add ws2_32 for closesocket, select, recv
@@ -3243,17 +3218,9 @@ dnl Trying with pkg-config
      CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
      CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
      AC_CHECK_HEADERS(postproc/postprocess.h)
-     if test "${SYS}" = "darwin"; then
-        VLC_ADD_BUILTINS([ffmpeg])
-     else
-        VLC_ADD_PLUGIN([ffmpeg])
-     fi
+     VLC_ADD_PLUGIN([ffmpeg])
      if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
-        if test "${SYS}" = "darwin"; then
-            VLC_ADD_BUILTINS([stream_out_switcher])
-        else
-            VLC_ADD_PLUGIN([stream_out_switcher])
-        fi
+        VLC_ADD_PLUGIN([stream_out_switcher])
      fi
      VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
      VLC_ADD_LIBS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
@@ -3457,7 +3424,7 @@ then
     VLC_ADD_BUILTINS([quicktime])
   else
   AC_CHECK_HEADERS(QuickTime/QuickTime.h,
-    [ VLC_ADD_BUILTINS([quicktime])
+    [ VLC_ADD_PLUGIN([quicktime])
       VLC_ADD_LDFLAGS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
     ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
   fi
@@ -4044,6 +4011,35 @@ then
   VLC_ADD_PLUGIN([cmml])
 fi
 
+dnl
+dnl  kate decoder plugin
+dnl
+AC_ARG_ENABLE(kate,
+[  --enable-kate           kate codec (default enabled)])
+AS_IF([test "${enable_kate}" != "no"], [
+  PKG_CHECK_MODULES(KATE,[kate >= 0.1.1], [
+      VLC_ADD_PLUGIN([kate])
+      VLC_ADD_CFLAGS([kate],[$KATE_CFLAGS])
+      VLC_ADD_LIBS([kate],[$KATE_LIBS]) ],[
+        AC_CHECK_HEADERS(kate/kate.h, [
+          AC_CHECK_LIB(kate, kate_decode_init, [
+            VLC_ADD_PLUGIN([kate])
+            kate_libs="-lkate -logg"
+            VLC_ADD_LDFLAGS([kate],[${kate_libs}]) ],[
+            AS_IF([test "x${enable_kate}" != "x"], [
+              AC_MSG_ERROR([libkate doesn't appear to be installed on your system.
+              You also need to check that you have a libogg posterior to the 1.0 release.])
+            ])
+         ], [-lkate -logg])
+        ],[
+          AS_IF([test "x${enable_kate}" != "x"], [
+            AC_MSG_ERROR([libkate headers do not appear to be installed on your system.
+            You also need to check that you have a libogg posterior to the 1.0 release.])
+          ])
+        ])
+  ])
+])
+
 
 dnl
 dnl  Video plugins
@@ -4928,7 +4924,7 @@ if test "${enable_macosx-audio}" != "no" &&
   (test "${SYS}" = "darwin" || test "${enable_macosx-audio}" = "yes")
 then
   AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, 
-    [ VLC_ADD_BUILTINS([auhal])
+    [ VLC_ADD_PLUGIN([auhal])
       VLC_ADD_LDFLAGS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon])
     ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
 fi
@@ -5201,6 +5197,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"])
@@ -5533,11 +5531,14 @@ then
   VLC_ADD_OBJCFLAGS([macosx minimal_macosx opengllayer growl], [-fobjc-exceptions] )
 
 #  VLC_ADD_PLUGIN([access_eyetv])
-  VLC_ADD_BUILTINS([macosx minimal_macosx])
+  VLC_ADD_PLUGIN([macosx])
+  VLC_ADD_PLUGIN([minimal_macosx])
  
   ORIGCFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -x objective-c"
-  AC_CHECK_HEADER(QuartzCore/CALayer.h, [VLC_ADD_BUILTINS([opengllayer])])
+  AC_CHECK_HEADER(QuartzCore/CALayer.h, 
+  [VLC_ADD_PLUGIN([opengllayer])
+  VLC_ADD_OBJCFLAGS([opengllayer], [-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5])])
   CFLAGS=$ORIGCFLAGS
 fi
 
@@ -5678,7 +5679,7 @@ then
     fi
     if test -f "${real_goom_tree}/src/.libs/libgoom2.a"; then
       AC_MSG_RESULT(${real_goom_tree}/src/.libs/libgoom2.a)
-      VLC_ADD_BUILTINS([goom])
+      VLC_ADD_PLUGIN([goom])
       VLC_ADD_LIBS([goom],[-L${real_goom_tree}/src/.libs -lgoom2])
       VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree}/src -DUSE_GOOM_TREE])
     else
@@ -5687,7 +5688,7 @@ then
       AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
       if test -f "${real_goom_tree}/libgoom.a"; then
         AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
-        VLC_ADD_BUILTINS([goom])
+        VLC_ADD_PLUGIN([goom])
         VLC_ADD_LIBS([goom],[-L${real_goom_tree} -lgoom])
         VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree} -DUSE_GOOM_TREE -DOLD_GOOM])
       else
@@ -6151,56 +6152,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
@@ -6277,7 +6238,6 @@ then
     VLC_ADD_LDFLAGS([qte_main],[${LDFLAGS_qte} ${LDFLAGS_qt_video}])
 fi
 
-
 dnl
 dnl  Plugin and builtin checks
 dnl
@@ -6308,8 +6268,8 @@ dnl
 dnl Pic and shared libvlc stuff
 dnl
 AS_IF([test "${SYS}" = "mingw32"], [
+  FILE_LIBVLCCORE_DLL="!define LIBVLCCORE_DLL libvlccore.dll"
   FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
-  FILE_LIBVLC_CONTROL_DLL="!define LIBVLC_CONTROL_DLL libvlc-control.dll"
 ])
 
 dnl
@@ -6369,8 +6329,8 @@ AC_SUBST(WINE_SDK_PATH)
 AC_SUBST(LIBEXT)
 AC_SUBST(AM_CPPFLAGS)
 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+AC_SUBST(FILE_LIBVLCCORE_DLL)
 AC_SUBST(FILE_LIBVLC_DLL)
-AC_SUBST(FILE_LIBVLC_CONTROL_DLL)
 
 dnl Create vlc-config.in
 VLC_OUTPUT_VLC_CONFIG_IN
@@ -6380,8 +6340,6 @@ AC_CONFIG_FILES([
   Makefile
   projects/activex/Makefile
   projects/activex/axvlc.inf
-  bindings/Makefile
-  bindings/python/Makefile
   doc/Makefile
   extras/package/ipkg/Makefile
   libs/loader/Makefile