]> git.sesse.net Git - vlc/blobdiff - configure.ac
Move src/control/ to lib/
[vlc] / configure.ac
index 21a98e5ea86f8822e65c9d57dc2b280a2b0e11aa..bcd74f4cec26fb0b20e41ca6def7eaff7968aa14 100644 (file)
@@ -179,7 +179,6 @@ dnl
 dnl  Set default values
 dnl
 LDFLAGS_vlc="${LDFLAGS}"
-SOCKET_LIBS=""
 
 dnl
 dnl  Check the operating system
@@ -321,8 +320,8 @@ case "${host_os}" in
   *mingw32* | *cygwin* | *wince* | *mingwce*)
     AC_CHECK_TOOL(WINDRES, windres, :)
     AC_CHECK_TOOL(OBJCOPY, objcopy, :)
-    AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0501' for Windows XP APIs.])
-    AC_DEFINE([_WIN32_IE], 0x0501, [Define to '0x0501' for IE 5.01 (and shell) APIs.])
+    AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows XP SP2 APIs.])
+    AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
 
     case "${host_os}" in
       *wince* | *mingwce* | *mingw32ce*)
@@ -453,36 +452,31 @@ dnl fail on anything other than pass_all.
 AC_CACHE_VAL(lt_cv_deplibs_check_method,
     [lt_cv_deplibs_check_method=pass_all])
 
-AC_DISABLE_STATIC
-dnl AC_DISABLE_FAST_INSTALL
-AC_LIBTOOL_DLOPEN
-AC_LIBTOOL_WIN32_DLL
-m4_undefine([AC_PROG_F77])
-m4_defun([AC_PROG_F77],[])
-AC_PROG_LIBTOOL
+LT_INIT([dlopen win32-dll shared disable-static])
+LT_LANG([C++])
+LT_LANG([Windows Resource])
 
 m4_undefine([AC_DEPLIBS_CHECK_METHOD])
 m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
 
 lt_cv_deplibs_check_method=pass_all
 
-AS_IF([test "${enable_shared}" = "no"], [
+AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
   AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
 ])
 
+AM_CONDITIONAL(HAVE_SHARED_PLUGINS, [test "${enable_shared}" != "no"])
+
 dnl
 dnl Gettext stuff
 dnl
 AM_GNU_GETTEXT_VERSION([0.18.1])
 AM_GNU_GETTEXT([external])
-VLC_ADD_LIBS([libvlccore vlc], [${LTLIBINTL}])
 
 dnl
 dnl Iconv stuff
 dnl
 AM_ICONV
-VLC_ADD_CFLAGS([libvlccore],[${INCICONV}])
-VLC_ADD_LIBS([libvlccore],[${LTLIBICONV}])
 
 dnl Check for broken versions of mingw-runtime compatability library
 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
@@ -565,9 +559,6 @@ dnl Plugin compilation stuff
 
 VLC_LIBRARY_SUFFIX
 
-dnl The -DSYS_FOO flag
-CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
-
 dnl Check for system libs needed
 need_libc=false
 
@@ -596,6 +587,17 @@ AC_SEARCH_LIBS(poll, [poll], [
   ])
 ])
 
+dnl Check for struct pollfd
+AC_CHECK_TYPES([struct pollfd],,,
+[#include <sys/types.h>
+#if HAVE_POLL
+# include <poll.h>
+#elif defined (WIN32)
+# include <winsock2.h>
+#endif
+])
+
+dnl Check for connect
 LIBS_save="$LIBS"
 SOCKET_LIBS=""
 AC_SEARCH_LIBS(connect, [socket], [
@@ -612,7 +614,7 @@ AC_SEARCH_LIBS(connect, [socket], [
 ])
 LIBS="$LIBS_save"
 AS_IF([test -n "$SOCKET_LIBS"], [
-  VLC_ADD_LIBS([libvlccore cdda access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp remoteosd netsync],[${SOCKET_LIBS}])
+  VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap stream_out_select stream_out_standard stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[${SOCKET_LIBS}])
 ])
 AC_SUBST(SOCKET_LIBS)
 
@@ -676,7 +678,7 @@ AC_CHECK_FUNC(getopt_long,, [
 AC_SUBST(GNUGETOPT_LIBS)
 
 AC_CHECK_LIB(m,cos,[
-  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate libvlccore freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264],[-lm])
   LIBM="-lm"
 ], [
   LIBM=""
@@ -689,50 +691,31 @@ AC_CHECK_LIB(m,lrintf, [
 ])
 
 dnl Check for dynamic plugins
-ac_cv_have_plugins=no
-
-# Win32 style
-if test "${ac_cv_have_plugins}" = "no"; then
-  if test "${SYS}" = "mingw32" ; then
-    AC_CHECK_LIB(kernel32, main,
-     [VLC_ADD_LIBS([libvlccore],[-lkernel32])
-      ac_cv_have_plugins=yes])
-  fi
-fi
+LIBDL="no"
+LIBS_save="$LIBS"
+AC_SEARCH_LIBS(dlopen, [dl svld], [
+  AS_IF([test "$ac_cv_search_dlopen" != "none required"], [
+    LIBDL="$ac_cv_search_dlopen"
+  ])
+])
+LIBS="$LIBS_save"
 
-# WinCE style
-if test "${ac_cv_have_plugins}" = "no"; then
-  if test "${SYS}" = "mingwce"; then
-    ac_cv_have_plugins=yes
-  fi
-fi
+# Windows
+AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
+  LIBDL=""
+])
 
-# Only test for dlopen() if the others didn't work
-LIBDL=""
-if test "${ac_cv_have_plugins}" = "no" -o "${SYS}" = "darwin"; then
-  AC_CHECK_HEADERS(dlfcn.h sys/dl.h)
-  ac_cv_my_have_dlopen=no
-  AC_CHECK_FUNC(dlopen, [
-    ac_cv_my_have_dlopen=yes
-  ], [
-    AC_CHECK_LIB(dl, dlopen, [
-      ac_cv_my_have_dlopen=yes
-      LIBDL="-ldl"
-    ], [
-      AC_CHECK_LIB(svld, dlopen, [
-        ac_cv_my_have_dlopen=yes
-        LIBDL="-lsvld"
-      ])
-    ])
-  ])
-  if test "${ac_cv_my_have_dlopen}" = "yes"; then
-    AC_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API])
-    ac_cv_have_plugins=yes
-    VLC_ADD_LIBS([libvlccore realvideo lua],[$LIBDL])
-  fi
-fi
+AS_IF([test "$LIBDL" != "no"], [
+  AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1,
+            [Define to 1 if dynamic plugins are supported.])
+], [
+  dnl Clear $LIBDL so as not to break linking
+  LIBDL=""
+])
 AC_SUBST(LIBDL)
+VLC_ADD_LIBS([realvideo lua],[$LIBDL])
 
+dnl Check for thread library
 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
   dnl Check for pthreads - borrowed from XMMS
   THREAD_LIB=error
@@ -839,14 +822,12 @@ then
       MINIZIP_LIBS="-lminizip -lz"
     ], [
       have_minizip=no
-      MINIZIP_CFLAGS="-I\\\${top_srcdir}/libs/unzip"
-      MINIZIP_LIBS="\\\${top_builddir}/libs/unzip/libunzip.la"
+      MINIZIP_CFLAGS="-I\\\${top_srcdir}/modules/access/zip/unzip"
+      MINIZIP_LIBS="\\\${top_builddir}/modules/access/zip/unzip/libunzip.la"
     ])
   ])
   VLC_ADD_CPPFLAGS([skins2],[$MINIZIP_CFLAGS])
-  VLC_ADD_CFLAGS([zip],[$MINIZIP_CFLAGS])
-  VLC_ADD_LIBS([skins2 zip],[$MINIZIP_LIBS])
-  VLC_ADD_PLUGIN([unzip zip])
+  VLC_ADD_LIBS([skins2],[$MINIZIP_LIBS])
 fi
 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
 
@@ -3346,14 +3327,12 @@ AC_ARG_ENABLE(direct2d,
   ])
 ])
 AS_IF([test "${enable_direct2d}" != "no"], [
-  AC_LANG_PUSH([C++])
   AC_CHECK_HEADERS(d2d1.h, [
     VLC_ADD_PLUGIN([direct2d])
     VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32])
   ], [
     AC_MSG_WARN([Cannot find Direct2D headers!])
   ])
-  AC_LANG_POP([C++])
 ])
 
 dnl
@@ -4196,8 +4175,8 @@ AC_ARG_ENABLE(loader,
 AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
 AS_IF([test "${enable_loader}" = "yes"],
   [ VLC_ADD_PLUGIN([dmo])
-    VLC_ADD_CPPFLAGS([dmo quicktime realvideo],[-I\\\${top_srcdir}/libs/loader])
-    VLC_ADD_LIBS([dmo quicktime realvideo],[\\\${top_builddir}/libs/loader/libloader.la])
+    VLC_ADD_CPPFLAGS([dmo quicktime realvideo],[-I\\\${top_srcdir}/modules/codec/loader])
+    VLC_ADD_LIBS([dmo quicktime realvideo],[\\\${top_builddir}/modules/codec/loader/libloader.la])
     VLC_ADD_CPPFLAGS([realvideo], [-DLOADER])
     VLC_ADD_LIBS([dmo quicktime], [-lpthread])
   ])
@@ -4212,23 +4191,6 @@ AC_ARG_ENABLE(vlc,
 AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
 
 
-dnl
-dnl  Plugin and builtin checks
-dnl
-plugin_support=yes
-
-dnl Automagically disable plugins if there is no system support for
-dnl dynamically loadable files (.so, .dll, .dylib).
-dnl don't forget vlc-win32 still can load .dll as plugins
-AS_IF([test "${ac_cv_have_plugins}" = "no"], [
-  AC_MSG_WARN([*** No plugin support! Building statically! ***])
-  plugin_support=no
-])
-
-AS_IF([test "${plugin_support}" != "no"], [
-  AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, [Define if dynamic plugins are supported])
-])
-
 dnl
 dnl Pic and shared libvlc stuff
 dnl
@@ -4297,9 +4259,6 @@ AC_SUBST(FILE_LIBVLC_DLL)
 AC_CONFIG_FILES([
   Makefile
   doc/Makefile
-  libs/loader/Makefile
-  libs/srtp/Makefile
-  libs/unzip/Makefile
   modules/Makefile
   m4/Makefile
   po/Makefile.in
@@ -4307,6 +4266,7 @@ AC_CONFIG_FILES([
   compat/Makefile
   src/Makefile
   src/test/Makefile
+  lib/Makefile
   bin/Makefile
   test/Makefile
   modules/access/Makefile
@@ -4319,6 +4279,7 @@ AC_CONFIG_FILES([
   modules/access/vcdx/Makefile
   modules/access/screen/Makefile
   modules/access/zip/Makefile
+  modules/access/zip/unzip/Makefile
   modules/access_output/Makefile
   modules/audio_filter/Makefile
   modules/audio_mixer/Makefile
@@ -4326,6 +4287,7 @@ AC_CONFIG_FILES([
   modules/codec/Makefile
   modules/codec/avcodec/Makefile
   modules/codec/dmo/Makefile
+  modules/codec/loader/Makefile
   modules/codec/omxil/Makefile
   modules/codec/shine/Makefile
   modules/codec/spudec/Makefile