- 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"