diff --git a/configure.ac b/configure.ac index 595db9481..bcbb18b31 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,16 @@ if test "$enable_flac" = "yes"; then AC_DEFINE(ENABLE_FLAC,1,[include FLAC support]) fi +# UPNP - upnp browser (borken right now) +AC_ARG_ENABLE(upnp, + AS_HELP_STRING(--disable-upnp,disable UPNP support), + ,[enable_upnp=yes]) + +AM_CONDITIONAL(ENABLE_UPNP,test "$enable_upnp" = "yes") +if test "$enable_upnp" = "yes"; then + AC_DEFINE(ENABLE_UPNP,1,[include UPNP support - currently broken]) +fi + AC_CHECK_HEADERS(coolstream/nevis_ir.h) # diff --git a/lib/Makefile.am b/lib/Makefile.am index e5e2ab1a8..47d51625a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -8,8 +8,12 @@ SUBDIRS = \ libnet \ xmltree \ libtuxtxt \ - libdvbsub \ + libdvbsub + +if ENABLE_UPNP +SUBDIRS += \ libupnpclient +endif if BOXTYPE_TRIPLE SUBDIRS += \ diff --git a/src/Makefile.am b/src/Makefile.am index 4e0ada1d8..3f3d13361 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -75,7 +75,6 @@ neutrino_LDADD = \ $(top_builddir)/lib/libmd5sum/libtuxbox-md5sum.a \ $(top_builddir)/lib/libtuxtxt/libtuxtxt.a \ $(top_builddir)/lib/libdvbsub/libdvbsub.a \ - $(top_builddir)/lib/libupnpclient/libtuxbox-upnpclient.a \ @CURL_LIBS@ \ @FREETYPE_LIBS@ \ @PNG_LIBS@ \ @@ -91,6 +90,11 @@ neutrino_LDADD = \ -lOpenThreads \ -lrt -lpthread +if ENABLE_UPNP +neutrino_LDADD += \ + $(top_builddir)/lib/libupnpclient/libtuxbox-upnpclient.a +endif + if BOXTYPE_COOL neutrino_LDADD += \ -lcoolstream-mt \ diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index fc3871fb6..1c4c8a71b 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -98,8 +98,12 @@ libneutrino_gui2_a_SOURCES = \ color.cpp \ hdd_menu.cpp \ infoclock.cpp \ - motorcontrol.cpp \ + motorcontrol.cpp + +if ENABLE_UPNP +libneutrino_gui2_a_SOURCES += \ upnpbrowser.cpp +endif libtimerlist_a_SOURCES = \ timerlist.cpp diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index 9966ab875..4f32bc454 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -39,7 +39,9 @@ #include "gui/movieplayer.h" #include "gui/pictureviewer.h" +#if ENABLE_UPNP #include "gui/upnpbrowser.h" +#endif #include @@ -116,7 +118,9 @@ void CMediaPlayerMenu::showMenu() CMenuForwarder *fw_inet = NULL; CMenuForwarder *fw_mp = NULL; CMenuForwarder *fw_pviewer = NULL; +#if ENABLE_UPNP CMenuForwarder *fw_upnp = NULL; +#endif CMenuWidget *moviePlayer = NULL; if (usage_mode != MODE_VIDEO) @@ -143,9 +147,10 @@ void CMediaPlayerMenu::showMenu() //pictureviewer fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE); +#if ENABLE_UPNP //upnp browser fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0); - +#endif media->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, usage_mode == MODE_AUDIO ? CMenuWidget::BTN_TYPE_CANCEL : CMenuWidget::BTN_TYPE_BACK); } @@ -175,9 +180,10 @@ void CMediaPlayerMenu::showMenu() //pictureviewer media->addItem(fw_pviewer); - +#if ENABLE_UPNP //upnp browser media->addItem(fw_upnp); +#endif } media->exec(NULL, ""); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d1704a5c2..543de75f2 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -105,7 +105,9 @@ #include "gui/sleeptimer.h" #include "gui/timerlist.h" #include "gui/update.h" +#if ENABLE_UPNP #include "gui/upnpbrowser.h" +#endif #include "gui/videosettings.h" #include "gui/widget/colorchooser.h" #include "gui/widget/hintbox.h"