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

Fix discrepency when in CyberLink precompile test

parent 11a24227
...@@ -3940,44 +3940,42 @@ dnl CyberLink for C++ UPnP stack ...@@ -3940,44 +3940,42 @@ dnl CyberLink for C++ UPnP stack
dnl dnl
AC_ARG_ENABLE(cyberlink, AC_ARG_ENABLE(cyberlink,
[ --enable-cyberlink CyberLink for C++ UPnP stack (default disabled)]) [ --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, AC_ARG_WITH(cyberlink-tree,
[ --with-cyberlink-tree=PATH CyberLink for C++ tree for static linking]) [ --with-cyberlink-tree=PATH CyberLink for C++ tree for static linking])
dnl dnl
dnl test for --with-cyberlink-tree dnl test for --with-cyberlink-tree
dnl dnl
if test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""; then AS_IF([test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""], [
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
real_cyberlink_tree="`cd ${with_cyberlink_tree} 2>/dev/null && pwd`" real_cyberlink_tree="`cd ${with_cyberlink_tree} 2>/dev/null && pwd`"
if test -z "${real_cyberlink_tree}" AS_IF([test -z "${real_cyberlink_tree}"], [
then
dnl The given directory can't be found dnl The given directory can't be found
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_cyberlink_tree}]) AC_MSG_ERROR([cannot cd to ${with_cyberlink_tree}])
fi ])
CXXFLAGS_save="${CXXFLAGS}" CPPFLAGS_save="${CPPFLAGS}"
CXXFLAGS_cyberlink="-I${real_cyberlink_tree}/include" CPPFLAGS_cyberlink="-I${real_cyberlink_tree}/include"
CXXFLAGS="${CXXFLAGS} ${CXXFLAGS_cyberlink}" CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_cyberlink}"
AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h], AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h],
[ VLC_ADD_CXXFLAGS([upnp], [${CXXFLAGS_cyberlink}]) [ VLC_ADD_CPPFLAGS([upnp], [${CPPFLAGS_cyberlink}])
VLC_ADD_PLUGINS([upnp]) VLC_ADD_PLUGINS([upnp])
],[ ],[
AC_MSG_ERROR([cannot find CyberLink for C++ headers]) AC_MSG_ERROR([cannot find CyberLink for C++ headers])
]) ])
AC_MSG_CHECKING(for libclink.a in ${with_cyberlink_tree}) AC_MSG_CHECKING(for libclink.a in ${with_cyberlink_tree})
if test -f "${real_cyberlink_tree}/lib/unix/libclink.a" AS_IF([test -f "${real_cyberlink_tree}/lib/unix/libclink.a"], [
then
AC_MSG_RESULT(${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]) VLC_ADD_LDFLAGS([upnp], [${real_cyberlink_tree}/lib/unix/libclink.a -lexpat])
else ], [
AC_MSG_RESULT(no) 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}]) 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}" CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP([C++]) AC_LANG_POP([C++])
fi ])
fi ])
dnl dnl
dnl Interface plugins 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