]> git.sesse.net Git - vlc/blobdiff - configure.ac
libvlc_free: wrapper around free() when the C run-time is not known
[vlc] / configure.ac
index 4806174703647831f979a5b8224c176a206525e7..e7f74ac40632b460298e24c895d2efcbbae43cfc 100644 (file)
@@ -217,8 +217,10 @@ case "${host_os}" in
     then
         echo ""
         echo "Building with Mac OS X defaults:"
-        with_macosx_version_min="10.4"
-        echo "  Assuming --with-macosx-version-min=10.4"
+        with_macosx_version_min="10.5"
+        echo "  Assuming --with-macosx-version-min=10.5"
+        with_macosx_sdk="/Developer/SDKs/MacOSX${with_macosx_version_min}.sdk"
+        echo "  Assuming --with-macosx-sdk=/Developer/SDKs/MacOSX${with_macosx_version_min}.sdk"
         build_dir=`pwd`
         echo "  Assuming --prefix=${build_dir}/vlc_install_dir"
         ac_default_prefix="${build_dir}/vlc_install_dir"
@@ -550,9 +552,6 @@ AC_CHECK_FUNCS(send,,[
   ])
 ])
 
-AC_CHECK_HEADERS(zlib.h, [
-  VLC_ADD_LIBS([access_http],[-lz])
-])
 
 dnl Check for socklen_t
 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
@@ -877,6 +876,33 @@ AC_ARG_VAR(PKG_CONFIG_PATH,
           [Paths where to find .pc not at the default location])
 PKG_PROG_PKG_CONFIG()
 
+dnl
+dnl Check for zlib.h and -lz along with system -lminizip if available
+dnl 
+AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
+AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
+if test "${have_zlib}" = "yes"
+then
+  VLC_ADD_LIBS([access_http gme mp4 skins2 sap mkv unzip zip],[-lz])
+  PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [
+    AC_CHECK_HEADERS([unzip.h], [ 
+      have_minizip=yes
+      MINIZIP_LIBS="-lminizip -lz"
+    ], [
+      have_minizip=no
+      MINIZIP_CFLAGS="-I../../../@top_srcdir@//libs/unzip"
+      MINIZIP_LIBS="../../../libs/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])
+  VLC_ADD_PLUGIN([zip])
+fi
+AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
+
+
 dnl Check for hal
 AC_ARG_ENABLE(hal,
   [  --enable-hal            Linux HAL services discovery (default enabled)])
@@ -894,6 +920,21 @@ then
   )
 fi
 
+dnl Check for mtp
+AC_ARG_ENABLE(mtp,
+  [  --enable-mtp            MTP devices support (default enabled)])
+
+if test "${enable_mtp}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
+then
+  PKG_CHECK_MODULES(MTP, libmtp >= 0.3.0,
+    [ VLC_ADD_PLUGIN([mtp])
+      VLC_ADD_PLUGIN([access_mtp])
+      VLC_ADD_LIBS([mtp access_mtp],[$MTP_LIBS])
+      VLC_ADD_CFLAGS([mtp access_mtp],[$MTP_CFLAGS])],
+       [AC_MSG_WARN(MTP library not found)]
+  )
+fi
+
 dnl Check for dbus
 AC_ARG_ENABLE(dbus,
   [  --enable-dbus           Linux D-BUS message bus system (default enabled)])
@@ -1754,7 +1795,7 @@ dnl
 dnl Taglibplugin
 dnl
 AC_ARG_ENABLE(taglib,
-  [  --disable-taglib Taglib support (default enabled) ])
+  [  --disable-taglib        Taglib support (default enabled) ])
   AS_IF([test "${enable_taglib}" != "no"],[
     PKG_CHECK_MODULES(TAGLIB, taglib,
       [ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] )
@@ -2977,11 +3018,11 @@ AC_ARG_ENABLE( id3tag,
 [  --disable-id3tag        id3tag metadata reader plugin (default disabled)])
 AS_IF([test "${enable_id3tag}" = "yes"], [
   AC_CHECK_HEADERS(id3tag.h, [
-    AC_CHECK_HEADERS(zlib.h, [
-      VLC_ADD_LIBS([id3tag],[-lid3tag -lz])
-      VLC_ADD_PLUGIN([id3tag])
+      AS_IF([test "${have_zlib}" = "yes"],[
+          VLC_ADD_LIBS([id3tag],[-lid3tag -lz])
+          VLC_ADD_PLUGIN([id3tag])
+       ])
     ])
-  ])
 ])
 
 dnl
@@ -3257,15 +3298,6 @@ if test "${enable_realrtsp}" = "yes"; then
   VLC_ADD_PLUGIN([access_realrtsp])
 fi
 
-dnl
-dnl MP4 module
-dnl
-AC_CHECK_HEADERS(zlib.h, [
-  VLC_ADD_LIBS([mp4 skins2 sap mkv gme],[-lz])
-  VLC_ADD_CPPFLAGS([skins2],[-I../../../@top_srcdir@/libs/unzip])
-  VLC_ADD_LIBS([skins2],[../../../libs/unzip/libunzip.la])
-] )
-
 AC_ARG_ENABLE(libsysfs,
   [  --enable-libsysfs       Get user key from firewire connected iPod via libsysfs (default enabled)])
 
@@ -5411,21 +5443,6 @@ then
 fi
 
 
-dnl
-dnl ZIP files demuxer
-dnl
-AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
-AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
-if test "${have_zlib}" = "yes"
-then
-  VLC_ADD_PLUGIN([unzip])
-  VLC_ADD_LIBS([zip],[-lz])
-  VLC_ADD_PLUGIN([zip])
-  VLC_ADD_CFLAGS([zip],[-I../../../@top_srcdir@/libs/unzip])
-  VLC_ADD_LIBS([zip],[../../../libs/unzip/libunzip.la])
-fi
-
-
 dnl
 dnl  Endianness check
 dnl
@@ -5777,18 +5794,9 @@ AS_IF([test "${ac_cv_have_plugins}" = "no"], [
   plugin_support=no
 ])
 
-AS_IF([test "${enable_shared}" = "no"], [
-  plugin_support=no
-])
-
 AS_IF([test "${plugin_support}" != "no"], [
-  AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins)
+  AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, [Define if dynamic plugins are supported])
 ])
-AM_CONDITIONAL(HAVE_PLUGINS, [test "${plugin_support}" != "no"])
-
-dnl Temporary(?) hack for plugins/builtins transition
-dnl VLC_ADD_PLUGIN([${BUILTINS}])
-dnl BUILTINS=""
 
 dnl
 dnl Pic and shared libvlc stuff
@@ -5883,7 +5891,6 @@ AC_CONFIG_FILES([
   extras/package/macosx/Resources/English.lproj/InfoPlist.strings
   extras/package/macosx/plugin/Info.plist
   extras/package/macosx/plugin/InstallerInfo.plist
-  extras/package/macosx/plugin/English.lproj/InfoPlist.strings
   Makefile
   projects/activex/Makefile
   projects/activex/axvlc.inf