| | 3438 | fi |
|---|
| | 3439 | |
|---|
| | 3440 | dnl |
|---|
| | 3441 | dnl CyberLink for C++ UPnP stack |
|---|
| | 3442 | dnl |
|---|
| | 3443 | AC_ARG_ENABLE(cyberlink, |
|---|
| | 3444 | [ --enable-cyberlink CyberLink for C++ UPnP stack (default disabled)]) |
|---|
| | 3445 | if test "${CXX}" != "" -a "${enable_cyberlink}" = "yes" || (test "${enable_cyberlink}" != "no"); then |
|---|
| | 3446 | AC_ARG_WITH(cyberlink-tree, |
|---|
| | 3447 | [ --with-cyberlink-tree=PATH CyberLink for C++ tree for static linking]) |
|---|
| | 3448 | |
|---|
| | 3449 | dnl |
|---|
| | 3450 | dnl test for --with-cyberlink-tree |
|---|
| | 3451 | dnl |
|---|
| | 3452 | if test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""; then |
|---|
| | 3453 | AC_LANG_PUSH(C++) |
|---|
| | 3454 | real_cyberlink_tree="`cd ${with_cyberlink_tree} 2>/dev/null && pwd`" |
|---|
| | 3455 | if test -z "${real_cyberlink_tree}" |
|---|
| | 3456 | then |
|---|
| | 3457 | dnl The given directory can't be found |
|---|
| | 3458 | AC_MSG_RESULT(no) |
|---|
| | 3459 | AC_MSG_ERROR([cannot cd to ${with_cyberlink_tree}]) |
|---|
| | 3460 | fi |
|---|
| | 3461 | CXXFLAGS_save="${CXXFLAGS}" |
|---|
| | 3462 | CXXFLAGS_cyberlink="-I${real_cyberlink_tree}/include" |
|---|
| | 3463 | CXXFLAGS="${CXXFLAGS} ${CXXFLAGS_cyberlink}" |
|---|
| | 3464 | AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h], |
|---|
| | 3465 | [ VLC_ADD_CXXFLAGS([upnp], [${CXXFLAGS_cyberlink}]) |
|---|
| | 3466 | VLC_ADD_PLUGINS([upnp]) |
|---|
| | 3467 | ],[ |
|---|
| | 3468 | AC_MSG_ERROR([cannot find CyberLink for C++ headers]) |
|---|
| | 3469 | ]) |
|---|
| | 3470 | AC_MSG_CHECKING(for libclink.a in ${with_cyberlink_tree}) |
|---|
| | 3471 | if test -f "${real_cyberlink_tree}/lib/unix/libclink.a" |
|---|
| | 3472 | then |
|---|
| | 3473 | AC_MSG_RESULT(${real_cyberlink_tree}/lib/unix/libclink.a) |
|---|
| | 3474 | VLC_ADD_LDFLAGS([upnp], [${real_cyberlink_tree}/lib/unix/libclink.a -lexpat]) |
|---|
| | 3475 | else |
|---|
| | 3476 | AC_MSG_RESULT(no) |
|---|
| | 3477 | AC_MSG_ERROR([cannot find ${real_cyberlink_tree}/lib/unix/libclink.a, make sure you compiled CyberLink for C++ in ${with_cyberlink_tree}]) |
|---|
| | 3478 | fi |
|---|
| | 3479 | CXXFLAGS="${CXXFLAGS_save}" |
|---|
| | 3480 | AC_LANG_POP([C++]) |
|---|
| | 3481 | fi |
|---|