[PATCH] configure.ac: search for new json.hpp version 3
authorGianfranco Costamagna <costamagnagianfranco@yahoo.it>
Tue, 31 Jul 2018 10:26:22 +0000 (12:26 +0200)
committerGianfranco Costamagna <locutusofborg@debian.org>
Tue, 22 Jan 2019 10:52:13 +0000 (10:52 +0000)
Patch configure file to find the new json.hpp file location

Gbp-Pq: Name new-json-hpp.patch

configure.ac
src/json.h

index aa6ac5236e8bb35b5cea376375c007048f534cc2..4fe8da6ceabe6efc55713315421e30483e253a91 100644 (file)
@@ -119,6 +119,7 @@ AS_IF([test "x$have_cpprest" = "xyes"],
 AM_CONDITIONAL([HAVE_CPPREST], [test "x$have_cpprest" != "xno"])
 
 AC_CHECK_HEADERS([json.hpp])
+AC_CHECK_HEADERS([nlohmann/json.hpp])
 
 WX_CONFIG_CHECK([3.0.3], [WXFOUND=1], [WXFOUND=0], [$WXLIBS_USED], [--unicode])
 
index 633b655437291c94d715b27c1e48c40abe244ea3..66035da07975515b66dda0a3372d7975cd481821 100644 (file)
 #include "str_helpers.h"
 
 #ifdef HAVE_JSON_HPP
-#include <json.hpp>
+ #include <json.hpp>
 #else
-#include "../deps/json/src/json.hpp"
+ #ifdef HAVE_NLOHMANN_JSON_HPP
+  #include <nlohmann/json.hpp>
+ #else
+  #include "../deps/json/src/json.hpp"
+ #endif
 #endif
 
 using json = nlohmann::json;