Skip to content

Commit 5a2febc

Browse files
committed
AVRO-1769. C: Use operating system's libjansson instead of bundling it with Avro. Contributed by Magnus Edenhill.
git-svn-id: https://svn.apache.org/repos/asf/avro/trunk@1725610 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3633602 commit 5a2febc

File tree

298 files changed

+41
-49936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+41
-49936
lines changed

CHANGES.txt

+3
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ Avro 1.8.0 (15 December 2015)
267267

268268
AVRO-1782. Ruby: Fix unit test failures in new versions of Ruby. (martinkl)
269269

270+
AVRO-1769. C: Use operating system's libjansson instead of bundling
271+
it with Avro. (Magnus Edenhill via martinkl)
272+
270273
Avro 1.7.7 (23 July 2014)
271274

272275
NEW FEATURES

LICENSE.txt

-152
Original file line numberDiff line numberDiff line change
@@ -232,158 +232,6 @@ Some files include an additional copyright notice:
232232
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
233233
| THE SOFTWARE.
234234

235-
----------------------------------------------------------------------
236-
License for the libtool scripts used in the Jansson C JSON parser:
237-
238-
libtool (GNU libtool) 2.2.10
239-
Written by Gordon Matzigkeit <[email protected]>, 1996
240-
241-
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
242-
2007, 2008, 2009, 2010 Free Software Foundation, Inc.
243-
244-
Included under the terms of the Apache License version 2.0.
245-
246-
| GNU Libtool is free software; you can redistribute it and/or modify
247-
| it under the terms of the GNU General Public License as published by
248-
| the Free Software Foundation; either version 2 of the License, or
249-
| (at your option) any later version.
250-
|
251-
| As a special exception to the GNU General Public License,
252-
| if you distribute this file as part of a program or library that
253-
| is built using GNU Libtool, you may include this file under the
254-
| same distribution terms that you use for the rest of that program.
255-
|
256-
| GNU Libtool is distributed in the hope that it will be useful, but
257-
| WITHOUT ANY WARRANTY; without even the implied warranty of
258-
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
259-
| General Public License for more details.
260-
|
261-
| You should have received a copy of the GNU General Public License
262-
| along with GNU Libtool; see the file COPYING. If not, a copy
263-
| can be downloaded from http://www.gnu.org/licenses/gpl.html,
264-
| or obtained by writing to the Free Software Foundation, Inc.,
265-
| 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
266-
267-
----------------------------------------------------------------------
268-
License for the configure script used in the Jansson C JSON parser:
269-
270-
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
271-
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
272-
Foundation, Inc.
273-
274-
| This configure script is free software; the Free Software Foundation
275-
| gives unlimited permission to copy, distribute and modify it.
276-
277-
Portions of the configure script are from libtool (see above) and are
278-
included under the terms of the Apache License version 2.0.
279-
280-
----------------------------------------------------------------------
281-
License for the install-sh script used in the Jansson C JSON parser:
282-
283-
Copyright (C) 1994 X Consortium
284-
285-
| This originates from X11R5 (mit/util/scripts/install.sh), which was
286-
| later released in X11R6 (xc/config/util/install.sh) with the
287-
| following copyright and license.
288-
|
289-
| Permission is hereby granted, free of charge, to any person obtaining a copy
290-
| of this software and associated documentation files (the "Software"), to
291-
| deal in the Software without restriction, including without limitation the
292-
| rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
293-
| sell copies of the Software, and to permit persons to whom the Software is
294-
| furnished to do so, subject to the following conditions:
295-
|
296-
| The above copyright notice and this permission notice shall be included in
297-
| all copies or substantial portions of the Software.
298-
|
299-
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
300-
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
301-
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
302-
| X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
303-
| AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
304-
| TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
305-
|
306-
| Except as contained in this notice, the name of the X Consortium shall not
307-
| be used in advertising or otherwise to promote the sale, use or other deal-
308-
| ings in this Software without prior written authorization from the X Consor-
309-
| tium.
310-
|
311-
| FSF changes to this file are in the public domain.
312-
313-
----------------------------------------------------------------------
314-
License for the aclocal.m4 script used in the Jansson C JSON parser:
315-
316-
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
317-
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
318-
319-
| This file is free software; the Free Software Foundation
320-
| gives unlimited permission to copy and/or distribute it,
321-
| with or without modifications, as long as this notice is preserved.
322-
|
323-
| This program is distributed in the hope that it will be useful,
324-
| but WITHOUT ANY WARRANTY, to the extent permitted by law; without
325-
| even the implied warranty of MERCHANTABILITY or FITNESS FOR A
326-
| PARTICULAR PURPOSE.
327-
328-
Portions of the aclocal.m4 file are from libtool (see above) and are
329-
included under the terms of the Apache License version 2.0.
330-
331-
----------------------------------------------------------------------
332-
License for build scripts used in the Jansson C JSON parser:
333-
334-
* config.guess
335-
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
336-
2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
337-
* missing
338-
Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
339-
Free Software Foundation, Inc.
340-
Originally by Fran,cois Pinard <[email protected]>, 1996.
341-
* config.sub
342-
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
343-
2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
344-
Inc.
345-
* depcomp
346-
Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
347-
Foundation, Inc.
348-
Originally written by Alexandre Oliva <[email protected]>.
349-
350-
Included under the terms of the Apache License version 2.0.
351-
352-
| This file is free software; you can redistribute it and/or modify it
353-
| under the terms of the GNU General Public License as published by
354-
| the Free Software Foundation; either version 2 of the License, or
355-
| (at your option) any later version.
356-
|
357-
| This program is distributed in the hope that it will be useful, but
358-
| WITHOUT ANY WARRANTY; without even the implied warranty of
359-
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
360-
| General Public License for more details.
361-
|
362-
| You should have received a copy of the GNU General Public License
363-
| along with this program; if not, write to the Free Software
364-
| Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
365-
| 02110-1301, USA.
366-
|
367-
| As a special exception to the GNU General Public License, if you
368-
| distribute this file as part of a program that contains a
369-
| configuration script generated by Autoconf, you may include it under
370-
| the same distribution terms that you use for the rest of that program.
371-
372-
----------------------------------------------------------------------
373-
License for Makefile.in files used in the Jansson C JSON parser:
374-
375-
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
376-
2003, 2004, 2005, 2006 Free Software Foundation, Inc.
377-
378-
| This Makefile.in is free software; the Free Software Foundation
379-
| gives unlimited permission to copy and/or distribute it,
380-
| with or without modifications, as long as this notice is preserved.
381-
|
382-
| This program is distributed in the hope that it will be useful,
383-
| but WITHOUT ANY WARRANTY, to the extent permitted by law; without
384-
| even the implied warranty of MERCHANTABILITY or FITNESS FOR A
385-
| PARTICULAR PURPOSE.
386-
387235
----------------------------------------------------------------------
388236
License for msinttypes.h and msstdint.h used in the C implementation:
389237
Source from:

lang/c/CMakeLists.txt

+10-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ if(UNIX AND THREADSAFE AND CMAKE_COMPILER_IS_GNUCC)
123123
endif(UNIX AND THREADSAFE AND CMAKE_COMPILER_IS_GNUCC)
124124

125125
include_directories(${AvroC_SOURCE_DIR}/src)
126-
include_directories(${AvroC_SOURCE_DIR}/jansson/src)
127126

128127

129128
# Enable codecs
@@ -169,6 +168,16 @@ endif (LZMA_FOUND)
169168
set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LZMA_LIBRARIES} ${SNAPPY_LIBRARIES})
170169
set(CODEC_PKG "@ZLIB_PKG@ @LZMA_PKG@ @SNAPPY_PKG@")
171170

171+
# Jansson JSON library
172+
pkg_check_modules(JANSSON jansson>=2.3)
173+
if (JANSSON_FOUND)
174+
set(JANSSON_PKG libjansson)
175+
include_directories(${JANSSON_INCLUDE_DIR})
176+
link_directories(${JANSSON_LIBRARY_DIRS})
177+
else (JANSSON_FOUND)
178+
message(FATAL_ERROR "libjansson >=2.3 not found")
179+
endif (JANSSON_FOUND)
180+
172181

173182
add_subdirectory(src)
174183
add_subdirectory(examples)

lang/c/INSTALL

+12-6
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ Prerequisites
1313
Avro uses CMake [1] as its build manager. You must have this installed,
1414
along with a C compiler (such as gcc) to build the library.
1515

16-
Avro doesn't depend on any other libraries, but you need asciidoc [2]
17-
and source-highlight [3] installed to build Avro's documentation. The
18-
build scripts will automatically detect whether these tools are
19-
installed, and will skip the documentation if they're not.
16+
Avro depends on the Jansson JSON parser [2], version 2.3 or higher. On
17+
many operating systems this library is available through your package
18+
manager (for example, `apt-get install libjansson-dev` on Ubuntu/Debian,
19+
and `brew install jansson` on Mac OS). If not, please download and
20+
install it from source [2].
21+
22+
To build the documentation you need asciidoc [3] and source-highlight [4]
23+
installed. The build scripts will automatically detect whether these
24+
tools are installed, and will skip the documentation if they're not.
2025

2126
[1] http://www.cmake.org/
22-
[2] http://www.methods.co.nz/asciidoc
23-
[3] http://www.gnu.org/software/src-highlite/
27+
[2] http://www.digip.org/jansson/
28+
[3] http://www.methods.co.nz/asciidoc
29+
[4] http://www.gnu.org/software/src-highlite/
2430

2531

2632
Building from source

0 commit comments

Comments
 (0)