From 8dad8afa09a3740dd90bd70917ff93a63098e576 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 5 Mar 2016 17:32:33 +0100 Subject: Compile under OSX --- INSTALL.md | 9 +++++++++ src/ClockTAI.cpp | 8 +++++++- src/DabMultiplexer.cpp | 4 +++- src/DabMux.cpp | 1 - src/dabOutput/dabOutputRaw.cpp | 8 ++++++++ src/dabOutput/dabOutputUdp.cpp | 7 +++++++ 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 7d4bcba..d4cc548 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -49,6 +49,15 @@ that did not yet make its way into a release, you can clone the * Bootstrap autotools:
% ./bootstrap.sh
* Then use ./configure as above +Develop on OSX +============== + +If you want to develop on OSX platform install the necessary build tools +with brew + + brew install automake boost + +raw, edi and udp output are not available. Advanced install procedure: =========================== diff --git a/src/ClockTAI.cpp b/src/ClockTAI.cpp index ea0e53c..c7b045b 100644 --- a/src/ClockTAI.cpp +++ b/src/ClockTAI.cpp @@ -34,7 +34,9 @@ #include #include -#include +#if SUPPORT_SETTING_CLOCK_TAI +# include +#endif #ifdef HAVE_CURL # include #endif @@ -56,6 +58,7 @@ ClockTAI::ClockTAI() int ClockTAI::get_offset() { +#if ENABLE_OUTPUT_EDI struct timespec time_now; int err = clock_gettime(CLOCK_REALTIME, &time_now); @@ -81,6 +84,7 @@ int ClockTAI::get_offset() etiLog.level(info) << "Updated TAI-UTC offset to " << m_offset << "s."; } +#endif // ENABLE_OUTPUT_EDI return m_offset; } @@ -226,3 +230,5 @@ void debug_tai_clk() } #endif + + diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index 52bca1b..e60feaa 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -215,11 +215,11 @@ void DabMultiplexer::prepare() */ gettimeofday(&mnsc_time, NULL); +#if HAVE_OUTPUT_EDI if (clock_gettime(CLOCK_REALTIME, &edi_time)) { throw std::runtime_error("Setting eti_time with clock_gettime failed"); } -#if HAVE_OUTPUT_EDI // Try to load offset once bool tist_enabled = m_pt.get("general.tist", false); @@ -1751,6 +1751,7 @@ void DabMultiplexer::mux_frame(std::vector >& outputs edi_tagDETI.atstf = 1; edi_tagDETI.utco = 0; edi_tagDETI.seconds = 0; +#if HAVE_OUTPUT_EDI try { bool tist_enabled = m_pt.get("general.tist", false); @@ -1763,6 +1764,7 @@ void DabMultiplexer::mux_frame(std::vector >& outputs catch (std::runtime_error& e) { etiLog.level(error) << "Could not get UTC-TAI offset for EDI timestamp"; } +#endif /* Coding of the TIST, according to ETS 300 799 Annex C diff --git a/src/DabMux.cpp b/src/DabMux.cpp index 19f11fe..0f66f71 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -82,7 +82,6 @@ typedef DWORD32 uint32_t; # include # include -# include #endif #include diff --git a/src/dabOutput/dabOutputRaw.cpp b/src/dabOutput/dabOutputRaw.cpp index 346d34d..42d9238 100644 --- a/src/dabOutput/dabOutputRaw.cpp +++ b/src/dabOutput/dabOutputRaw.cpp @@ -23,6 +23,12 @@ You should have received a copy of the GNU General Public License along with ODR-DabMux. If not, see . */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#if defined(HAVE_OUTPUT_RAW) + #include #include #include "dabOutput.h" @@ -390,3 +396,5 @@ int DabOutputRaw::Close() return -1; } +#endif // defined(HAVE_OUTPUT_RAW) + diff --git a/src/dabOutput/dabOutputUdp.cpp b/src/dabOutput/dabOutputUdp.cpp index 9664a2d..3338ea6 100644 --- a/src/dabOutput/dabOutputUdp.cpp +++ b/src/dabOutput/dabOutputUdp.cpp @@ -23,6 +23,11 @@ You should have received a copy of the GNU General Public License along with ODR-DabMux. If not, see . */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#if defined(HAVE_OUTPUT_UDP) #include #include @@ -105,3 +110,5 @@ int DabOutputUdp::Write(void* buffer, int size) this->packet_->addData(buffer, size); return this->socket_->send(*this->packet_); } +#endif // defined(HAVE_OUTPUT_UDP) + -- cgit v1.2.3