Commit e387684b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix discrepency when in CyberLink precompile test

parent 11a24227
......@@ -3940,44 +3940,42 @@ dnl CyberLink for C++ UPnP stack
dnl
AC_ARG_ENABLE(cyberlink,
[ --enable-cyberlink CyberLink for C++ UPnP stack (default disabled)])
if test "${CXX}" != "" -a "${enable_cyberlink}" = "yes" || (test "${enable_cyberlink}" != "no"); then
AS_IF([test "${CXX}" != "" -a "${enable_cyberlink}" = "yes" || (test "${enable_cyberlink}" != "no")], [
AC_ARG_WITH(cyberlink-tree,
[ --with-cyberlink-tree=PATH CyberLink for C++ tree for static linking])
dnl
dnl test for --with-cyberlink-tree
dnl
if test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""; then
AS_IF([test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""], [
AC_LANG_PUSH(C++)
real_cyberlink_tree="`cd ${with_cyberlink_tree} 2>/dev/null && pwd`"
if test -z "${real_cyberlink_tree}"
then
AS_IF([test -z "${real_cyberlink_tree}"], [
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_cyberlink_tree}])
fi
CXXFLAGS_save="${CXXFLAGS}"
CXXFLAGS_cyberlink="-I${real_cyberlink_tree}/include"
CXXFLAGS="${CXXFLAGS} ${CXXFLAGS_cyberlink}"
])
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS_cyberlink="-I${real_cyberlink_tree}/include"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_cyberlink}"
AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h],
[ VLC_ADD_CXXFLAGS([upnp], [${CXXFLAGS_cyberlink}])
[ VLC_ADD_CPPFLAGS([upnp], [${CPPFLAGS_cyberlink}])
VLC_ADD_PLUGINS([upnp])
],[
AC_MSG_ERROR([cannot find CyberLink for C++ headers])
])
AC_MSG_CHECKING(for libclink.a in ${with_cyberlink_tree})
if test -f "${real_cyberlink_tree}/lib/unix/libclink.a"
then
AS_IF([test -f "${real_cyberlink_tree}/lib/unix/libclink.a"], [
AC_MSG_RESULT(${real_cyberlink_tree}/lib/unix/libclink.a)
VLC_ADD_LDFLAGS([upnp], [${real_cyberlink_tree}/lib/unix/libclink.a -lexpat])
else
], [
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_cyberlink_tree}/lib/unix/libclink.a, make sure you compiled CyberLink for C++ in ${with_cyberlink_tree}])
fi
CXXFLAGS="${CXXFLAGS_save}"
AC_MSG_ERROR([cannot find ${real_cyberlink_tree}/lib/unix/libclink.a, make sure you compiled CyberLink for C++ in ${with_cyberlink_tree}])
])
CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP([C++])
fi
fi
])
])
dnl
dnl Interface plugins
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment