[Binary specific version])
])
-dnl
-dnl Check for the contrib directory
-dnl
-AC_ARG_WITH(contrib,
- [AS_HELP_STRING([--with-contrib[=DIR]],
- [search for 3rd party libraries in DIR/include and DIR/lib])
-])
-AC_MSG_CHECKING([for 3rd party libraries path])
-AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
- CONTRIB_DIR="${srcdir}/contrib/${host}"
- AS_IF([test ! -d "${CONTRIB_DIR}"], [
- echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
- CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
- AS_IF([test ! -d "${CONTRIB_DIR}"], [
- echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
- CONTRIB_DIR="${srcdir}/extras/contrib/hosts/${host}"
- AS_IF([test ! -d "${CONTRIB_DIR}"], [
- echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
- CONTRIB_DIR="${srcdir}/extras/contrib/hosts/`$CC -dumpmachine`"
- AS_IF([test ! -d "${CONTRIB_DIR}"], [
- echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
- CONTRIB_DIR=""
- AC_MSG_RESULT([not found])
- ])
- ])
- ])
- ])
-], [
- AS_IF([test "${with_contrib}" != "no"], [
- CONTRIB_DIR="${with_contrib}"
- ], [
- CONTRIB_DIR=""
- AC_MSG_RESULT([disabled])
- ])
-])
-AS_IF([test -n "${CONTRIB_DIR}"], [
- AS_IF([test -d "${CONTRIB_DIR}/lib"],[
- CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
- ], [
- echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
- CONTRIB_DIR=""
- AC_MSG_RESULT([not usable])
- ])
-
-])
-AS_IF([test -n "${CONTRIB_DIR}"], [
- AC_MSG_RESULT([${CONTRIB_DIR}])
- export PATH=${CONTRIB_DIR}/bin:$PATH
- CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
- CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
- CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
- CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
- CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
- CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
- OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
- OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
- AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
- export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
- ], [
- export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
- ])
- LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
- LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
-
- AS_IF([test "${SYS}" = "darwin"], [
- export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
- export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
- ])
-], [
- AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
- AC_MSG_ERROR([Third party libraries not found!])
- ])
-])
-AC_SUBST(CONTRIB_DIR)
-
-dnl
-dnl Set default values
-dnl
-LDFLAGS_vlc="${LDFLAGS}"
-
dnl
dnl Check the operating system
dnl
dnl NSIS Installer prefix and WIN64
dnl
case "${host}" in
- amd64*|i686-w64*|x86_64*)
+ amd64*|x86_64*)
HAVE_WIN64="1"
PROGRAMFILES="PROGRAMFILES64"
;;
AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
dnl
-dnl Sadly autoconf doesn't think about testing foo.exe when ask to test
+dnl Check for the contrib directory
+dnl
+AC_ARG_WITH(contrib,
+ [AS_HELP_STRING([--with-contrib[=DIR]],
+ [search for 3rd party libraries in DIR/include and DIR/lib])
+])
+AC_MSG_CHECKING([for 3rd party libraries path])
+AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
+ CONTRIB_DIR="${srcdir}/contrib/${host}"
+ AS_IF([test ! -d "${CONTRIB_DIR}"], [
+ echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+ CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
+ AS_IF([test ! -d "${CONTRIB_DIR}"], [
+ echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+ CONTRIB_DIR="${srcdir}/extras/contrib/hosts/${host}"
+ AS_IF([test ! -d "${CONTRIB_DIR}"], [
+ echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+ CONTRIB_DIR="${srcdir}/extras/contrib/hosts/`$CC -dumpmachine`"
+ AS_IF([test ! -d "${CONTRIB_DIR}"], [
+ echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+ AS_IF([test "${SYS}" = "mingw32"], [
+ if test "${HAVE_WIN64}" = "1"
+ then
+ CONTRIB_DIR="/usr/win64"
+ else
+ CONTRIB_DIR="/usr/win32"
+ fi
+ AS_IF([test ! -d "${CONTRIB_DIR}"], [
+ echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
+ CONTRIB_DIR=""
+ AC_MSG_RESULT([not found])
+ ])], [
+ CONTRIB_DIR=""
+ AC_MSG_RESULT([not found])
+ ])
+ ])
+ ])
+ ])
+ ])
+], [
+ AS_IF([test "${with_contrib}" != "no"], [
+ CONTRIB_DIR="${with_contrib}"
+ ], [
+ CONTRIB_DIR=""
+ AC_MSG_RESULT([disabled])
+ ])
+])
+
+AS_IF([test -n "${CONTRIB_DIR}"], [
+ AS_IF([test -d "${CONTRIB_DIR}/lib"],[
+ CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
+ ], [
+ echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
+ CONTRIB_DIR=""
+ AC_MSG_RESULT([not usable])
+ ])
+
+])
+
+AS_IF([test -n "${CONTRIB_DIR}"], [
+ AC_MSG_RESULT([${CONTRIB_DIR}])
+ export PATH=${CONTRIB_DIR}/bin:$PATH
+ CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
+ CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
+ CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
+ CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
+ CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
+ CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
+ OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
+ OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
+ AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
+ export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
+ ], [
+ export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
+ ])
+ LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
+ LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
+
+ AS_IF([test "${SYS}" = "darwin"], [
+ export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
+ export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
+ ])
+], [
+ AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
+ AC_MSG_ERROR([Third party libraries not found!])
+ ])
+])
+AC_SUBST(CONTRIB_DIR)
+
+dnl
+dnl Sadly autoconf does not think about testing foo.exe when ask to test
dnl for program foo on win32
case "${build_os}" in
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
])
-# Windows CE doesn't have strcoll()
+# Windows CE does not have strcoll()
AC_FUNC_STRCOLL
dnl Check for non-standard system calls
[AS_HELP_STRING([--disable-optimizations],
[disable compiler optimizations (default enabled)])],,
[enable_optimizations="yes"])
-AS_IF([test "${enable_optimizations}" != "no"], [
- enable_optimizations="speed"
-])
dnl Check for various optimization flags
AS_IF([test "${enable_optimizations}" != "no"], [
])
AS_IF([test "${ac_cv_c_omit_frame_pointer}" != "no"], [
VLC_RESTORE_FLAGS
- AS_IF([test "${SYS}" != "darwin"], [
CFLAGS="${CFLAGS} -fomit-frame-pointer"
CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
- ], [
- dnl On darwin we explicitely disable it.
- CFLAGS="${CFLAGS} -fno-omit-frame-pointer"
- CXXFLAGS="${CXXFLAGS} -fno-omit-frame-pointer"
- OBJCFLAGS="${OBJCFLAGS} -fno-omit-frame-pointer"
- ])
+ OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
VLC_SAVE_FLAGS
])
])
AS_IF([test "${enable_mmx}" != "no"], [
ARCH="${ARCH} mmx"
- AC_CACHE_CHECK([if $CC groks MMX intrinsics],
- [ac_cv_c_mmx_intrinsics],
- [CFLAGS="${CFLAGS_save} -O -mmmx"
- AC_TRY_COMPILE([#include <mmintrin.h>
- #include <stdint.h>
- uint64_t frobzor;],
- [__m64 a, b, c;
- a = b = c = (__m64)frobzor;
- a = _mm_slli_pi16(a, 3);
- a = _mm_adds_pi16(a, b);
- c = _mm_srli_pi16(c, 8);
- c = _mm_slli_pi16(c, 3);
- b = _mm_adds_pi16(b, c);
- a = _mm_unpacklo_pi8(a, b);
- frobzor = (uint64_t)a;],
- [ac_cv_c_mmx_intrinsics=yes],
- [ac_cv_c_mmx_intrinsics=no])])
+ AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
+ CFLAGS="${CFLAGS_save} -O -mmmx"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+[#include <mmintrin.h>
+#include <stdint.h>
+uint64_t frobzor;]], [
+[__m64 a, b, c;
+a = b = c = (__m64)frobzor;
+a = _mm_slli_pi16(a, 3);
+a = _mm_adds_pi16(a, b);
+c = _mm_srli_pi16(c, 8);
+c = _mm_slli_pi16(c, 3);
+b = _mm_adds_pi16(b, c);
+a = _mm_unpacklo_pi8(a, b);
+frobzor = (uint64_t)a;]])], [
+ ac_cv_c_mmx_intrinsics=yes
+ ], [
+ ac_cv_c_mmx_intrinsics=no
+ ])
+ CFLAGS="${CFLAGS_save}"
+ ])
AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
AC_DEFINE(HAVE_MMX_INTRINSICS, 1,
[Define to 1 if MMX intrinsics are available.])
], [
ac_cv_mmx_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_MMX, 1,
], [
ac_cv_mmxext_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_MMXEXT, 1,
AS_IF([test "${enable_sse}" != "no"], [
ARCH="${ARCH} sse sse2"
- AC_CACHE_CHECK([if $CC groks SSE2 intrinsics],
- [ac_cv_c_sse2_intrinsics],
- [CFLAGS="${CFLAGS_save} -O -msse2"
- AC_TRY_COMPILE([#include <emmintrin.h>
- #include <stdint.h>
- uint64_t frobzor;],
- [__m128i a, b, c;
- a = b = c = _mm_set1_epi64((__m64)frobzor);
- a = _mm_slli_epi16(a, 3);
- a = _mm_adds_epi16(a, b);
- c = _mm_srli_epi16(c, 8);
- c = _mm_slli_epi16(c, 3);
- b = _mm_adds_epi16(b, c);
- a = _mm_unpacklo_epi8(a, b);
- frobzor = (uint64_t)_mm_movepi64_pi64(a);],
- [ac_cv_c_sse2_intrinsics=yes],
- [ac_cv_c_sse2_intrinsics=no])])
+ AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
+ CFLAGS="${CFLAGS_save} -O -msse2"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+[#include <emmintrin.h>
+#include <stdint.h>
+uint64_t frobzor;]], [
+[__m128i a, b, c;
+a = b = c = _mm_set1_epi64((__m64)frobzor);
+a = _mm_slli_epi16(a, 3);
+a = _mm_adds_epi16(a, b);
+c = _mm_srli_epi16(c, 8);
+c = _mm_slli_epi16(c, 3);
+b = _mm_adds_epi16(b, c);
+a = _mm_unpacklo_epi8(a, b);
+frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
+ ac_cv_c_sse2_intrinsics=yes
+ ], [
+ ac_cv_c_sse2_intrinsics=no
+ ])
+ CFLAGS="${CFLAGS_save}"
+])
AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
AC_DEFINE(HAVE_SSE2_INTRINSICS, 1,
[Define to 1 if SSE2 intrinsics are available.])
], [
ac_cv_sse_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
AC_DEFINE(CAN_COMPILE_SSE, 1,
], [
ac_cv_sse2_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
AC_DEFINE(CAN_COMPILE_SSE2, 1,
], [
ac_cv_sse3_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_SSE3, 1,
], [
ac_cv_ssse3_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_SSSE3, 1,
], [
ac_cv_sse4_1_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_SSE4_1, 1,
], [
ac_cv_sse4_2_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_SSE4_2, 1,
], [
ac_cv_sse4a_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_SSE4A, 1,
], [
ac_cv_3dnow_inline=no
])
+ CFLAGS="${CFLAGS_save}"
])
AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
AC_DEFINE(CAN_COMPILE_3DNOW, 1,
AC_CACHE_CHECK([if linker needs -framework vecLib],
[ac_cv_ld_altivec],
- [LDFLAGS="${LDFLAGS_vlc} -Wl,-framework,vecLib"
+ [LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
LDFLAGS="${LDFLAGS_save}"
])
fi
dnl NOTE: this can't be cached cleanly
-AS_IF([test "${CFLAGS_TUNING}"],
- [CFLAGS_save="${CFLAGS}"
- CFLAGS="${CFLAGS} ${CFLAGS_TUNING}"
-
- AC_MSG_CHECKING([whether $CC accepts ${CFLAGS_TUNING}])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],
- [tuning="yes"],
- [CFLAGS_TUNING=""; tuning="no"
- AS_IF([test "${with_tuning}"],
- [AC_MSG_ERROR([requested tuning not supported])])])
-
- AC_MSG_RESULT([$tuning])
- CFLAGS="${CFLAGS_save}"
+AS_IF([test -n "${CFLAGS_TUNING}"], [
+ AC_MSG_CHECKING([whether $CC accepts ${CFLAGS_TUNING}])
+ CFLAGS="${CFLAGS_save} ${CFLAGS_TUNING}"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], [
+ tuning="yes"
+ ], [
+ CFLAGS_TUNING=""; tuning="no"
+ AS_IF([test "${with_tuning}"], [
+ AC_MSG_ERROR([requested tuning not supported])
+ ])
+ ])
+ CFLAGS="${CFLAGS_save}"
+ AC_MSG_RESULT([$tuning])
+ VLC_RESTORE_FLAGS
+ CFLAGS="${CFLAGS} ${CFLAGS_TUNING}"
+ VLC_SAVE_FLAGS
])
dnl
AC_ARG_ENABLE(live555,
[AS_HELP_STRING([--enable-live555],
[enable RTSP input through live555 (default enabled)])])
-AC_ARG_WITH(live555-tree,
- [AS_HELP_STRING([--with-live555-tree=PATH],
- [live555 tree for static linking])])
AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
- dnl
- dnl test for --with-live555-tree
- dnl
- if test -z "${with_live555_tree}"; then
- AC_LANG_PUSH(C++)
- CPPFLAGS_save="${CPPFLAGS}"
- if test -z "${CONTRIB_DIR}"; then
- CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
- else
- CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
- fi
- if test "${SYS}" = "solaris"; then
- CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
- fi
- CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
-
- AC_CHECK_HEADERS(liveMedia_version.hh, [
- AC_MSG_CHECKING(for liveMedia version >= 1275091200 )
- AC_EGREP_CPP(yes,
- [#include <liveMedia_version.hh>
- #ifdef LIVEMEDIA_LIBRARY_VERSION_INT
- #if LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200
- yes
- #endif
- #endif],
- [AC_MSG_RESULT([no])
- AC_MSG_WARN([The installed liveMedia version is too old:
+ AC_LANG_PUSH(C++)
+ CPPFLAGS_save="${CPPFLAGS}"
+ AS_IF([test -z "${CONTRIB_DIR}"], [
+ CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
+ ], [
+ CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
+ ])
+ AS_IF([test "${SYS}" = "solaris"], [
+ CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
+ ])
+ CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
+
+ AC_CACHE_CHECK([for live555 version 1275091200 or later], [ac_cv_live555], [
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
+[#include <liveMedia_version.hh>
+#if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200)
+# error BOOM
+#endif]])
+ ], [
+ ac_cv_live555="yes"
+ ], [
+ ac_cv_live555="no"
+ ])
+ ])
+ AS_IF([test "$ac_cv_live555" = "no"], [
+ AC_MSG_WARN([liveMedia is missing or its installed version is too old:
Version 2010.05.29 or later is required to proceed.
You can get an updated one from http://www.live555.com/liveMedia .])
- AS_IF([test "${enable_live555}" = "yes"], [
- AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable the plugin.])
- ])
- ],[
- AC_MSG_RESULT([yes])
- other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
- other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
- if test "${SYS}" = "mingw32"; then
- # add ws2_32 for closesocket, select, recv
- other_libs="$other_libs -lws2_32"
- elif test "${SYS}" = "mingwce"; then
- # add ws2 for closesocket, select, recv
- other_libs="$other_libs -lws2"
- fi
-
- dnl We need to check for pic because live555 don't provide shared libs
- dnl and we want to build a plugins so we need -fPIC on some arch.
- VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
- AC_CHECK_LIB(liveMedia_pic, main, [
- VLC_ADD_PLUGIN([live555])
- VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
- ],[
- AC_CHECK_LIB(liveMedia, main, [
- VLC_ADD_PLUGIN([live555])
- VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
- ],[],[${other_libs}]) ],[${other_libs_pic}])
-
- CPPFLAGS="${CPPFLAGS_save}"
- AC_LANG_POP(C++)
- ])
- ])
- else
- AC_MSG_CHECKING(for liveMedia/libliveMedia.a in ${with_live555_tree})
- real_live555_tree="`cd ${with_live555_tree} 2>/dev/null && pwd`"
- if test -z "${real_live555_tree}"; then
- dnl The given directory can't be found
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot cd to ${with_live555_tree}])
- fi
- if test -f "${real_live555_tree}/liveMedia/libliveMedia.a"; then
- AC_MSG_RESULT(${real_live555_tree}/liveMedia/libliveMedia.a)
-
- AC_CHECK_HEADERS(${real_live555_tree}/liveMedia/include/liveMedia_version.hh,[
- AC_MSG_CHECKING(for liveMedia version >= 1275091200 )
- AC_EGREP_CPP(yes,
- [#include "${real_live555_tree}/liveMedia/include/liveMedia_version.hh"
- #ifdef LIVEMEDIA_LIBRARY_VERSION_INT
- #if LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200
- yes
- #endif
- #endif],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia.
-lternatively you can use --disable-live555 to disable the liveMedia plugin.])
- ],[
- AC_MSG_RESULT([yes])
- ])
+ AS_IF([test -n "${enable_live555}"], [
+ AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
+ ])
+ ac_cv_live555_usable=""
+ ], [
+ dnl Check that live555 is patched correctly.
+ AC_CACHE_CHECK([for live555 usability], [ac_cv_live555_usable], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+[#include <locale.h>
+#ifdef __APPLE__
+# include <xlocale.h>
+#endif
+#undef LC_ALL
+#define LC_ALL BOOM
+#ifdef LC_ALL_MASK
+#include <Locale.hh>
+#endif
+#include <GroupsockHelper.hh>]], [
+[struct in_addr addr;
+our_inet_ntoa(addr, NULL);]])
+ ], [
+ ac_cv_live555_usable="yes"
+ ], [
+ ac_cv_live555_usable="no"
])
+ ])
+ AS_IF([test "$ac_cv_live555_usable" = "no"], [
+ AC_MSG_ERROR([liveMedia lacks patches and is not usable.
+Please apply our patches from the VLC contrib (contrib/src/live555/).
+You can also disable RTSP input with --disable-live555. You were warned.])
+ ])
+ other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
+ other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
+ AS_IF([test "${SYS}" = "mingw32"], [
+ # add ws2_32 for closesocket, select, recv
+ other_libs="$other_libs -lws2_32"
+ ], [test "${SYS}" = "mingwce"], [
+ # add ws2 for closesocket, select, recv
+ other_libs="$other_libs -lws2"
+ ])
+ dnl We need to check for pic because live555 don't provide shared libs
+ dnl and we want to build a plugins so we need -fPIC on some arch.
+ VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
+ AC_CHECK_LIB(liveMedia_pic, main, [
VLC_ADD_PLUGIN([live555])
-
- if test "${SYS}" = "mingw32"; then
- # add ws2_32 for closesocket, select, recv
- VLC_ADD_LIBS([live555],[-lws2_32])
- fi
-
- VLC_ADD_LIBS([live555],[-L${real_live555_tree}/UsageEnvironment -lUsageEnvironment])
- VLC_ADD_LIBS([live555],[-L${real_live555_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
- VLC_ADD_LIBS([live555],[-L${real_live555_tree}/groupsock -lgroupsock])
- VLC_ADD_LIBS([live555],[-L${real_live555_tree}/liveMedia -lliveMedia])
-
- VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/BasicUsageEnvironment/include])
- VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/groupsock/include])
- VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/liveMedia/include])
- VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/UsageEnvironment/include ])
- if test "${SYS}" = "solaris"; then
- VLC_ADD_CXXFLAGS([live555],[-DSOLARIS])
- fi
- else
- dnl The given live555 wasn't built
- AC_MSG_RESULT(no)
- if test "${enable_live555}" = "yes"; then
- AC_MSG_ERROR([cannot find ${real_live555_tree}/liveMedia/libliveMedia.a, make sure you compiled live555 in ${with_live555_tree}])
- fi
- fi
- fi
+ VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
+ ],[
+ AC_CHECK_LIB(liveMedia, main, [
+ VLC_ADD_PLUGIN([live555])
+ VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
+ ],[],[${other_libs}])],[${other_libs_pic}])
+ ])
+ CPPFLAGS="${CPPFLAGS_save}"
+ AC_LANG_POP(C++)
])
dnl
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
- AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
+ AC_MSG_ERROR([${with_mad_tree} directory does not exist])
fi
dnl Use a custom libmad
AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
AC_CHECK_LIB(mad, mad_bit_init, [
VLC_ADD_PLUGIN([mpgatofixed32])
VLC_ADD_LIBS([mpgatofixed32],[-lmad])
- ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
+ ],[ AC_MSG_ERROR([the specified tree has not been compiled ])
],[])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR([the specified tree doesn't have mad.h])
+ AC_MSG_ERROR([the specified tree does not have mad.h])
fi
else
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
AC_CACHE_CHECK([if linker supports -Bsymbolic],
[ac_cv_ld_bsymbolic],
- [LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic"
+ [LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
LDFLAGS="${LDFLAGS_save}"
])
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
- AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
+ AC_MSG_ERROR([${with_a52_tree} directory does not exist])
fi
dnl Use a custom a52dec
AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
then
AC_MSG_ERROR([make sure you have at least a52dec-0.7.3 ($real_a52_tree)])
else
- AC_MSG_ERROR([the specified tree hasn't been compiled])
+ AC_MSG_ERROR([the specified tree has not been compiled])
fi
])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR([the specified tree doesn't have a52.h])
+ AC_MSG_ERROR([the specified tree does not have a52.h])
fi
else
if test -z "${with_a52}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
- AC_MSG_ERROR([${with_x264_tree} directory doesn't exist])
+ AC_MSG_ERROR([${with_x264_tree} directory does not exist])
fi
dnl Use a custom libx264
AC_MSG_CHECKING(for x264.h in ${real_x264_tree})
VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
fi
],[
- AC_MSG_ERROR([the specified tree hasn't been compiled])
+ AC_MSG_ERROR([the specified tree has not been compiled])
])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR([the specified tree doesn't have x264.h])
+ AC_MSG_ERROR([the specified tree does not have x264.h])
fi
else
PKG_CHECK_MODULES(X264,x264 >= 0.86, [
AS_IF([test "${SYS}" = "mingw32"], [
VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
- VLC_ADD_LIBS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32 -lmsimg32 -luser32])
+ VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
], [test "${SYS}" = "darwin"], [
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
dnl Simple test for skins2 dependency
dnl
AS_IF([test "${enable_skins2}" != "no" && test "x$enable_qt4" = "xno"], [
- AC_MSG_ERROR([The skins2 module depends on a the Qt4 development package. Without it you won't be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
+ AC_MSG_ERROR([The skins2 module depends on a the Qt4 development package. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
])
dnl
echo exit \$ERROR >>compile
chmod a+x compile
-printf "
+echo "
libvlc configuration
--------------------
version : ${VERSION}
system : ${SYS}
architecture : ${ARCH}
-build flavour : "
-test "${enable_optimizations}" != "no" && printf ${enable_optimizations}
-echo ""
+optimizations : ${enable_optimizations}"
if test "${enable_vlc}" != "no"; then
echo "vlc aliases :${ALIASES}"
else