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_REPLACE_FUNCS([asprintf atof atoll dirfd flockfile 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.])
])
VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger],[-lm])
])
AC_CHECK_LIB(m,pow,[
- VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc ffmpegaltivec i420_rgb faad twolame equalizer spatializer param_eq libvlccore freetype mod mpc dmo quicktime realvideo qt4],[-lm])
+ 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])
])
AC_CHECK_LIB(m,sqrt,[
VLC_ADD_LIBS([compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball],[-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
LDFLAGS_save="${LDFLAGS}"
])
+AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
+ AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
+ [ac_cv_c_visibility_hidden], [
+ CFLAGS="${CFLAGS_save} -ffast-math"
+ 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"], [
+ CFLAGS="${CFLAGS} -fvisibility=hidden"
+ CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
+ OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
+ ])
+])
+
VLC_SAVE_FLAGS
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"
AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
[Define to 1 if AltiVec inline assembly is available.])
AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
- VLC_ADD_CFLAGS([idctaltivec],[${ac_cv_altivec_inline}])
- VLC_ADD_CFLAGS([motionaltivec],[${ac_cv_altivec_inline}])
VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1,
[Define to 1 if C AltiVec extensions are available.])
VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
- VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
have_altivec="yes"
])
LDFLAGS="${LDFLAGS_save}"
])
AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
- VLC_ADD_LDFLAGS([libvlccore idctaltivec motionaltivec memcpyaltivec],[-Wl,-framework,vecLib])
+ VLC_ADD_LDFLAGS([libvlccore memcpyaltivec],[-Wl,-framework,vecLib])
])
])
AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
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_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(taglib/mp4coverart.h)
+ AC_CHECK_HEADERS(taglib/apefile.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 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
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)])
])
])
])