*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.])
case "${host_os}" in
*wince* | *mingwce* | *mingw32ce*)
SYS=mingwce
dnl Sadly CeGCC still needs non-wince macros
- AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0500' for Windows 2000 APIs.])
;;
*mingw32*)
SYS=mingw32
- AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0500' for Windows XP APIs.])
;;
*cygwin*)
dnl Check if we are using the mno-cygwin mode in which case we are
dnl actually dealing with a mingw32 compiler.
- AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0501' for Windows XP APIs.])
AC_EGREP_CPP(yes,
[#ifdef WIN32
yes
;;
esac
+dnl Android is linux, but a bit different
+AS_IF([test "$SYS" = linux],[
+ AC_MSG_CHECKING([for an Android system])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
+ [[#ifndef __ANDROID__
+ # error Not Android
+ #endif
+ ]],[[;]])
+ ],[
+ HAVE_ANDROID="1"
+ AC_MSG_RESULT([yes])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
+AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
+
dnl
dnl Libtool
dnl It's very bad, but our former custom system was worst
need_libc=false
dnl Check for usual libc functions
-AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r gettimeofday isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
-AC_REPLACE_FUNCS([asprintf atof atoll dirfd getcwd getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
+AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r gettimeofday if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
+AC_REPLACE_FUNCS([asprintf atof atoll dirfd flockfile fsync getcwd getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
])
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
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],[-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],[-lm])
])
AC_CHECK_LIB(m,pow,[
VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq libvlccore freetype mod mpc dmo quicktime realvideo qt4],[-lm])
dnl Check for dynamic plugins
ac_cv_have_plugins=no
-# HP-UX style
-if test "${ac_cv_have_plugins}" = "no"; then
- AC_CHECK_HEADERS(dl.h)
- ac_cv_my_have_shl_load=no
- AC_CHECK_FUNC(shl_load,
- [ac_cv_my_have_shl_load=yes,
- AC_CHECK_LIB(dld, shl_load,
- [ac_cv_my_have_shl_load=yes
- VLC_ADD_LIBS([libvlccore],[-ldld])])])
- if test "${ac_cv_my_have_shl_load}" = "yes"; then
- AC_DEFINE(HAVE_DL_SHL_LOAD, 1, [Define if you have the shl_load API])
- ac_cv_have_plugins=yes
- fi
-fi
-
# Win32 style
if test "${ac_cv_have_plugins}" = "no"; then
if test "${SYS}" = "mingw32" ; then
RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration])
RDC_PROG_CC_FLAGS([-pipe])
+AC_LANG_PUSH([C++])
+RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var])
+AC_LANG_POP([C++])
dnl
dnl Debugging mode
CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
LDFLAGS="-lgcov ${LDFLAGS}"
- CFLAGS_save="${CFLAGS}"
- CXXFLAGS_save="${CXXFLAGS}"
- LDFLAGS_save="${LDFLAGS}"
])
VLC_SAVE_FLAGS
+AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
+ AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
+ [ac_cv_c_visibility_hidden], [
+ CFLAGS="${CFLAGS_save} -fvisibility=hidden"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
+ ac_cv_c_visibility_hidden=yes
+ ], [
+ ac_cv_c_visibility_hidden=no
+ ])
+ ])
+ AS_IF([test "${ac_cv_c_visibility_hidden}" != "no"], [
+ VLC_RESTORE_FLAGS
+ CFLAGS="${CFLAGS} -fvisibility=hidden"
+ CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
+ OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
+ VLC_SAVE_FLAGS
+ ])
+])
+
+
dnl
dnl Enable/disable optimizations
dnl
AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
AC_DEFINE(HAVE_MMX_INTRINSICS, 1,
[Define to 1 if MMX intrinsics are available.])
- MMX_CFLAGS="-mmmx"
])
AC_CACHE_CHECK([if $CC groks MMX inline assembly],
have_mmxext="yes"
])
])
-AC_SUBST(MMX_CFLAGS)
AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
[AS_HELP_STRING([--disable-sse],
[disable SSE (1-4) optimizations (default auto)])],, [
case "${host_cpu}" in
- i686|x86_64)
+ i?86|x86_64)
enable_sse=yes
;;
*)
AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
AC_DEFINE(HAVE_SSE2_INTRINSICS, 1,
[Define to 1 if SSE2 intrinsics are available.])
- SSE2_CFLAGS="-msse2"
])
AC_CACHE_CHECK([if $CC groks SSE inline assembly],
AC_DEFINE(CAN_COMPILE_SSE4A, 1,
[Define to 1 if SSE4A inline assembly is available.]) ])
])
-AC_SUBST(SSE2_CFLAGS)
AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
have_3dnow="no"
dnl Growl notification plugin
dnl
AC_ARG_ENABLE(growl,
- [AS_HELP_STRING([--enable-growl],
- [enable growl notifications (default disabled)])],,
- [enable_growl="no"])
+ [ --enable-growl growl notification plugin (default disabled)],,
+ [enable_growl=no])
AS_IF([test "${enable_growl}" != "no"], [
VLC_ADD_PLUGIN([growl_udp])
- AC_CHECK_HEADERS(Growl/GrowlDefines.h, [
+ AC_CHECK_HEADERS(${CONTRIB_DIR}/Growl/Growl.framework/Versions/A/Headers/GrowlDefines.h, [
VLC_ADD_PLUGIN([growl])
- VLC_ADD_LDFLAGS([growl], [-Wl,-framework,Growl,-framework,AppKit])
+ VLC_ADD_LDFLAGS([growl], [-F${CONTRIB_DIR}/Growl -Wl,-framework,Growl,-framework,CoreFoundation])
+ VLC_ADD_OBJCFLAGS([growl], [-F${CONTRIB_DIR}/Growl])
VLC_ADD_OBJCFLAGS([growl], [-fobjc-exceptions] )
])
]
VLC_ADD_PLUGIN([taglib])
VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
- AC_LANG_PUSH(C++)
- AC_CHECK_HEADERS(taglib/mp4coverart.h)
- AC_LANG_POP(C++)
], [
AC_MSG_WARN(TagLib library not found)])
])
dnl
dnl Blu-ray Disc Support with libbluray
dnl
-PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2 ], (libbluray for Blu-ray disc support ) )
+PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2 libxml-2.0 >= 2.6 ], (libbluray for Blu-ray disc support ) )
dnl
dnl OpenCV wrapper and example filters
dnl
dnl libdvbpsi check for ts mux/demux
dnl
-PKG_WITH_MODULES([DVBPSI], [libdvbpsi],
- VLC_ADD_PLUGIN([ts])
- VLC_ADD_LIBS([ts],[-ldvbpsi])
-if test "${enable_sout}" != "no"; then
- VLC_ADD_PLUGIN([mux_ts])
- VLC_ADD_LIBS([mux_ts],[-ldvbpsi])
-fi
-)
+have_dvbpsi="no"
+PKG_WITH_MODULES([DVBPSI], [libdvbpsi], [have_dvbpsi="yes"])
+AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
dnl
dnl Screen capture module
dnl
dnl schroedinger decoder plugin (for dirac format video)
dnl
-PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
+PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.6], [dirac decoder using schroedinger], [auto])
dnl
dnl PNG decoder module
have_xcb="no"
AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb
- PKG_CHECK_MODULES(XCB, [xcb])
+ PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
have_xcb="yes"
PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
+ PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
AS_IF([test "${enable_xvideo}" != "no"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
dnl freetype module
dnl
AC_ARG_ENABLE(freetype,
- [ --enable-freetype freetype support (default enabled)])
+ [ --enable-freetype freetype support (default auto)])
AC_ARG_ENABLE(fribidi,
- [ --enable-fribidi fribidi support (default enabled)])
+ [ --enable-fribidi fribidi support (default auto)])
AC_ARG_ENABLE(fontconfig,
- [ --enable-fontconfig fontconfig support (default enabled)])
+ [ --enable-fontconfig fontconfig support (default auto)])
+
if test "${enable_freetype}" != "no"; then
- PKG_CHECK_MODULES(FREETYPE, freetype2,[
- VLC_ADD_PLUGIN([freetype])
+ PKG_CHECK_MODULES(FREETYPE, freetype2, [
have_freetype=yes
+ VLC_ADD_PLUGIN([freetype])
VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([freetype],[-liconv -lz])
fi
VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
+ AC_CHECK_HEADERS(Carbon/Carbon.h,
+ [VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
+
+ dnl fontconfig support
if test "${SYS}" != "mingw32"; then
if test "${enable_fontconfig}" != "no"; then
- AC_CHECK_HEADERS(fontconfig/fontconfig.h,
- [VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
- VLC_ADD_LIBS([freetype],[-lfontconfig])])
- AC_CHECK_HEADERS(Carbon/Carbon.h,
- [VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
+ AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
+ VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
+ VLC_ADD_LIBS([freetype],[-lfontconfig])
+ ],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
fi
else
VLC_ADD_LIBS([freetype],[-lgdi32])
fi
dnl fribidi support
- if test "${enable_fribidi}" != "no"
- then
+ if test "${enable_fribidi}" != "no"; then
PKG_CHECK_MODULES(FRIBIDI, fribidi, [
VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
- ])
+ ],[AC_MSG_WARN([library fribidi not found. Bidirectional support will be disabled in freetype])])
fi
],[
have_freetype=no
- AS_IF([ test "${enable_freetype}" = "yes"],[
- AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
-from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
- ])
+ AS_IF([ test "${enable_freetype}" = "yes"],[
+ AC_MSG_ERROR([Freetype2 package cannot be detected. Install Freetype2 development or configure with --disable-freetype.])
])
])
-
fi
dnl
dnl
PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
+dnl
+dnl android surface module
+dnl
+AC_ARG_ENABLE(android-surface,
+ [ --enable-android-surface Android Surface video output module (default disabled)])
+if test "${enable_android_surface}" = "yes"; then
+ if test "${HAVE_ANDROID}" = "1"; then
+ VLC_ADD_PLUGIN([android_surface])
+ VLC_ADD_LDFLAGS([android_surface], [-ldl])
+ fi
+fi
+
+
dnl
dnl iOS vout module
dnl
dnl
PKG_ENABLE_MODULES_VLC([JACK], [jack access_jack], [jack], [JACK audio I/O modules],[auto])
+dnl
+dnl OpenSLES Android
+dnl
+AC_ARG_ENABLE(opensles,
+ [ --enable-opensles Android OpenSL ES audio module (default disabled)])
+if test "${HAVE_ANDROID}" = "1"; then
+ if test "${enable_opensles}" = "yes"; then
+ AC_CHECK_HEADERS(SLES/OpenSLES.h,
+ [ VLC_ADD_PLUGIN([opensles_android]) ],
+ [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
+ fi
+fi
+
dnl
dnl UPnP Plugin (Intel SDK)
dnl
], [
PKG_CHECK_MODULES([XPM], [xpm])
+ PKG_CHECK_MODULES([XINERAMA], [xinerama])
PKG_CHECK_MODULES([XEXT], [xext])
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
- VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} -lX11])
+ VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
])
VLC_ADD_PLUGIN([skins2])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,Carbon])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,AGL])
+ VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,QTKit])
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,IOKit])
VLC_ADD_LDFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
dnl TLS/SSL
dnl
AC_ARG_ENABLE(gnutls,
- [ --enable-gnutls gnutls TLS/SSL support (default enabled)])
+ [ --enable-gnutls GNU TLS TLS/SSL support (default enabled)])
AS_IF([test "${have_libgcrypt}" != "yes"], [
AS_IF([test "${enable_gnutls}" = "yes"], [
enable_gnutls="no"
])
AS_IF([test "${enable_gnutls}" != "no"], [
- PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.4], [
+ PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.0.0], [
VLC_ADD_PLUGIN([gnutls])
VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS])
AS_IF([test "${SYS}" = "mingw32"], [
VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS])
], [
AS_IF([test "${enable_gnutls}" = "yes"], [
- AC_MSG_ERROR([gnutls not present or too old (version 1.7.4 required)])
+ AC_MSG_ERROR([GNU TLS not present or too old (version 2.0.0 required)])
])
])
])
dnl media library
dnl
AC_ARG_ENABLE(media-library, [--enable-media-library media library (default disabled)])
-if test "${enable_media_library}" == "yes"; then
+if test "${enable_media_library}" = "yes"; then
if test "${enable_sqlite}" != "yes"; then
AC_MSG_ERROR([SQLite module is required for the media library])
else
else
echo "build vlc executable : no"
fi
-echo "plugins/bindings :${PLUGINS_BINDINGS}
-
+echo "
You can tune the compiler flags in vlc-config.
-To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'.
-"
-if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then
- echo ""
- echo "Warning: Due to a bug in ld, mmx/sse support has been"
- echo " turned off."
- echo " FFmpeg will be REALLY slow."
- echo " VLC WILL NOT PERFORM AS EXPECTED."
- echo ""
-fi
+To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'."