From 3b75338147080ba6aed7d1f644a542695a40cbdd Mon Sep 17 00:00:00 2001 From: Daniel Richman Date: Tue, 4 Sep 2012 01:26:08 +0100 Subject: [PATCH] use habitat-cpp bundled JsonCPP --- configure.ac | 6 ------ habitat-cpp-connector | 2 +- m4/build.m4 | 4 ++-- src/Makefile.am | 2 ++ src/dl_fldigi/flights.cxx | 2 +- src/dl_fldigi/gps.cxx | 3 ++- src/dl_fldigi/hbtint.cxx | 2 +- src/habitat | 2 +- src/include/dl_fldigi/flights.h | 2 +- src/include/dl_fldigi/hbtint.h | 2 +- src/include/habitat/README | 6 ++++++ src/include/jsoncpp.h | 1 + src/misc/jsoncpp.cpp | 1 + 13 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 src/include/habitat/README create mode 120000 src/include/jsoncpp.h create mode 120000 src/misc/jsoncpp.cpp diff --git a/configure.ac b/configure.ac index ded50d72..3919a93b 100644 --- a/configure.ac +++ b/configure.ac @@ -286,12 +286,6 @@ if test "x$ac_cv_want_fldigi" = "xyes"; then AC_FLDIGI_JPEG fi -### jsoncpp -if test "x$ac_cv_want_fldigi" = "xyes"; then - AC_FLDIGI_PKG_CHECK([jsoncpp], [jsoncpp >= 0.5], [no], [no]) -fi - - ### libssl if test "x$ac_cv_want_fldigi" = "xyes"; then AC_FLDIGI_PKG_CHECK([ssl], [libssl], [no], [no]) diff --git a/habitat-cpp-connector b/habitat-cpp-connector index ff9d343e..8a2e0891 160000 --- a/habitat-cpp-connector +++ b/habitat-cpp-connector @@ -1 +1 @@ -Subproject commit ff9d343ebb4ba2fadcac2b83f473eb2d709a1ba9 +Subproject commit 8a2e0891ad5b971bdcf594a34373ad342ee58706 diff --git a/m4/build.m4 b/m4/build.m4 index 4d7646e0..91dcdd19 100644 --- a/m4/build.m4 +++ b/m4/build.m4 @@ -9,7 +9,7 @@ AC_DEFUN([AC_FLDIGI_BUILD_INFO], [ -I\$(srcdir)/fileselector -I\$(srcdir)/xmlrpcpp" # CXXFLAGS FLDIGI_BUILD_CXXFLAGS="$PORTAUDIO_CFLAGS $FLTK_CFLAGS $X_CFLAGS $SNDFILE_CFLAGS $SAMPLERATE_CFLAGS \ -$PULSEAUDIO_CFLAGS $HAMLIB_CFLAGS $PNG_CFLAGS $CURL_CFLAGS $XMLRPC_CFLAGS $MAC_UNIVERSAL_CFLAGS $JSONCPP_CFLAGS \ +$PULSEAUDIO_CFLAGS $HAMLIB_CFLAGS $PNG_CFLAGS $CURL_CFLAGS $XMLRPC_CFLAGS $MAC_UNIVERSAL_CFLAGS \ $INTL_CFLAGS $PTW32_CFLAGS $BFD_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $SSL_CFLAGS" if test "x$target_mingw32" = "xyes"; then FLDIGI_BUILD_CXXFLAGS="-mthreads $FLDIGI_BUILD_CXXFLAGS" @@ -22,7 +22,7 @@ $INTL_CFLAGS $PTW32_CFLAGS $BFD_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEB # LDADD FLDIGI_BUILD_LDADD="$PORTAUDIO_LIBS $FLTK_LIBS $X_LIBS $SNDFILE_LIBS $SAMPLERATE_LIBS \ $PULSEAUDIO_LIBS $HAMLIB_LIBS $PNG_LIBS $CURL_LIBS $XMLRPC_LIBS $INTL_LIBS $PTW32_LIBS $BFD_LIBS $EXTRA_LIBS \ -$SSL_LIBS $JSONCPP_LIBS" +$SSL_LIBS" # CPPFLAGS FLARQ_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include -I\$(srcdir)/fileselector \ diff --git a/src/Makefile.am b/src/Makefile.am index 8591bb02..c93e1521 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -416,6 +416,7 @@ dl_fldigi_SOURCES += \ include/table.h \ include/textio.h \ include/psk_browser.h \ + include/jsoncpp.h \ include/dl_fldigi/dl_fldigi.h \ include/dl_fldigi/flights.h \ include/dl_fldigi/location.h \ @@ -564,6 +565,7 @@ dl_fldigi_SOURCES += \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h \ xmlrpcpp/base64.h \ + misc/jsoncpp.cpp \ habitat/CouchDB.cxx \ habitat/Extractor.cxx \ habitat/EZ.cxx \ diff --git a/src/dl_fldigi/flights.cxx b/src/dl_fldigi/flights.cxx index 58521ef9..4cd970df 100644 --- a/src/dl_fldigi/flights.cxx +++ b/src/dl_fldigi/flights.cxx @@ -13,7 +13,6 @@ #include #include #include -#include #include "main.h" #include "debug.h" @@ -21,6 +20,7 @@ #include "configuration.h" #include "confdialog.h" +#include "jsoncpp.h" #include "habitat/RFC3339.h" #include "dl_fldigi/dl_fldigi.h" #include "dl_fldigi/hbtint.h" diff --git a/src/dl_fldigi/gps.cxx b/src/dl_fldigi/gps.cxx index e664575a..c362c9e5 100644 --- a/src/dl_fldigi/gps.cxx +++ b/src/dl_fldigi/gps.cxx @@ -14,7 +14,6 @@ #include #include #include -#include #ifndef __MINGW32__ #include @@ -31,6 +30,8 @@ #include "debug.h" #include "fl_digi.h" +#include "jsoncpp.h" + #include "dl_fldigi/dl_fldigi.h" #include "dl_fldigi/location.h" #include "dl_fldigi/hbtint.h" diff --git a/src/dl_fldigi/hbtint.cxx b/src/dl_fldigi/hbtint.cxx index b72ba597..227a878b 100644 --- a/src/dl_fldigi/hbtint.cxx +++ b/src/dl_fldigi/hbtint.cxx @@ -9,7 +9,6 @@ #include #include -#include #include @@ -17,6 +16,7 @@ #include "debug.h" #include "fl_digi.h" +#include "jsoncpp.h" #include "habitat/EZ.h" #include "habitat/UKHASExtractor.h" diff --git a/src/habitat b/src/habitat index 3ed726d6..1cf97f85 120000 --- a/src/habitat +++ b/src/habitat @@ -1 +1 @@ -../habitat-cpp-connector/src/ \ No newline at end of file +../../habitat-cpp-connector/src/ \ No newline at end of file diff --git a/src/include/dl_fldigi/flights.h b/src/include/dl_fldigi/flights.h index 3c79907f..67233fb2 100644 --- a/src/include/dl_fldigi/flights.h +++ b/src/include/dl_fldigi/flights.h @@ -2,7 +2,7 @@ #define DL_FLDIGI_FLIGHTS_H #include -#include +#include "jsoncpp.h" namespace dl_fldigi { namespace flights { diff --git a/src/include/dl_fldigi/hbtint.h b/src/include/dl_fldigi/hbtint.h index 74954e95..19ca5cf7 100644 --- a/src/include/dl_fldigi/hbtint.h +++ b/src/include/dl_fldigi/hbtint.h @@ -3,7 +3,7 @@ #include #include -#include +#include "jsoncpp.h" #include "habitat/Extractor.h" #include "habitat/UploaderThread.h" diff --git a/src/include/habitat/README b/src/include/habitat/README new file mode 100644 index 00000000..607170f4 --- /dev/null +++ b/src/include/habitat/README @@ -0,0 +1,6 @@ +Note: In order to build habitat-cpp-connector directly into fldigi, the +includes are both here (so that they are are available to dl-fldigi as +#include "habitat/*.h"), and in dl-fldigi/src/habitat/ via the symlink to +habitat-cpp-connector/src/ (since when the habitat-cpp-connector cpp files +themselves are compiled they expect the headers to be available in the same +directory). diff --git a/src/include/jsoncpp.h b/src/include/jsoncpp.h new file mode 120000 index 00000000..68a93fe3 --- /dev/null +++ b/src/include/jsoncpp.h @@ -0,0 +1 @@ +../../habitat-cpp-connector/jsoncpp/jsoncpp.h \ No newline at end of file diff --git a/src/misc/jsoncpp.cpp b/src/misc/jsoncpp.cpp new file mode 120000 index 00000000..33dca627 --- /dev/null +++ b/src/misc/jsoncpp.cpp @@ -0,0 +1 @@ +../../habitat-cpp-connector/jsoncpp/jsoncpp.cpp \ No newline at end of file