89 Commits

Author SHA1 Message Date
Robert Edmonds
6600fd55b9 Bump version to 1.5.0 2023-11-25 18:21:08 -05:00
Robert Edmonds
7f006f8ad5 configure.ac: Drop -Wc99-c11-compat
This diagnostic isn't particularly useful since it fires on generated
.pb-c.h files.
2023-07-09 00:00:12 -04:00
Robert Edmonds
7dca1c382c configure.ac: Remove proto3_supported, BUILD_PROTO3
Since we require protobuf >= 3.0.0 now, the proto3 syntax is always
supported.
2023-07-08 23:11:03 -04:00
Robert Edmonds
5b0661f1e8 configure.ac: Require C++17
There are some recent reports of strange build failures that might have
been fixed by compiling in C++17 mode, so it might be a good idea to use
C++17 in general, and not just when building against very recent
protobuf versions.

Since it looks like we've lost protobuf < 3.0.0 support, configure.ac
can be simplified a bit if we just use C++17 by default.
2023-07-03 01:10:28 -04:00
Robert Edmonds
23d2246e0f configure.ac: Require C++17 when building against protobuf >= 4.22.0
It's unclear from looking at the online protobuf documentation whether
C++14 or C++17 is now required when building against newer versions of
protobuf (or perhaps I'm looking in the wrong place), but experimentally
it did not work for me with C++14.

This commit rewrites the versioned PKG_CHECK_MODULES checks in
configure.ac to enforce the following policies:

 * Require protobuf >= 2.6.0.
 * On protobuf >= 3.0.0, require C++11.
 * On protobuf >= 4.22.0, require C++17.
2023-07-02 22:45:44 -04:00
Rose
59a3f1925e Update autotools
AC_PROG_CC_STDC is obsolete. Instead, AC_PROG_CC is recommended.
2023-05-06 19:18:26 -04:00
Robert Edmonds
a0a0131c89 Bump version to 1.4.1 2022-07-10 21:33:59 -04:00
Robert Edmonds
a124b38608 Bump version to 1.4.0 2021-05-18 20:28:48 -04:00
Robert Edmonds
d0531beaad Bump version to 1.3.3 2019-12-04 16:08:05 -05:00
Robert Edmonds
62ecf2b467 Bump version to 1.3.2 2019-06-24 00:37:47 -04:00
Robert Edmonds
53bf6c0b7c Bump version to 1.3.1 2018-08-13 23:18:25 -04:00
Robert Edmonds
9becc1b66f configure.ac: Use AX_CXX_COMPILE_STDCXX to enable C++11 support in old compilers
This commit enables use of the AX_CXX_COMPILE_STDCXX macro from the
autoconf-archive (added in the previous commit), which automatically
adds needed flags to the CXX variable to enable C++11 support. This only
works and is only required on compilers that are both new enough to have
C++11 support and old enough to not enable it by default.

We call it with "noext" as the second argument (so that we get the "std"
C++11 variant on GCC) and "mandatory" as the third argument, since we
now rely on C++11 features as of 83c59e705f461cc08e5844d62514dff27c33a74f.

Note that this macro is only called when we are building the compiler
(i.e., without --disable-protoc) so that the library can still be built
on ancient C compilers.
2018-08-13 22:38:19 -04:00
Robert Edmonds
25cb6e2bdf Bump version to 1.3.0 2017-07-29 19:30:36 -04:00
Robert Edmonds
6eb0b271ae configure.ac: Add warning flags to my_CFLAGS 2017-02-25 18:18:12 -05:00
Paolo Borelli
8194f4d91a proto3 support
This is a first cut at adding proto3 support.

As far as I understand protobuf-c already has pretty much everything
needed once it is built using a new version of protobuf itself.
The only missing thing is that in proto3 all fields are optional and
having to manually set has_foo is inconvenient.

This patch special cases the proto3 syntax files so that structs for the
bytes, enum and primitive fields do not emit the has_ field.

It also adds PROTOBUF_C_LABEL_NONE to the label enum that is used for
proto3 fields. When a fields has this label, the quantifier is not
consulted and instead the field is packed/unpacked depending on
whether it has a value different from NULL/0.
2016-10-30 10:06:52 +01:00
Ben Farnham
d0b0dbaeeb relax constraint slightly from v2.64 -> v2.63 (so that it works on scientific linux 6) 2016-09-07 09:07:12 +02:00
Robert Edmonds
4560136675 Bump version to 1.2.1 2016-02-02 15:03:53 -05:00
Robert Edmonds
25d5e51db7 Bump version to 1.2.0 2016-01-29 19:52:28 -05:00
Zex
d6ac08c8ba skip protoc-c tests on cross-compiling 2016-01-29 18:53:04 -05:00
Robert Edmonds
9983a190a0 Bump version to 1.1.1 2015-03-14 17:00:57 -04:00
Robert Edmonds
287c916f9d bump version to 1.1.0 2015-01-05 15:54:02 -05:00
Robert Edmonds
e0841a957e configure.ac: next has 1.1.0 in development 2014-11-24 16:23:08 -05:00
Ilya Lipnitskiy
2e465cfdc7 configure.ac: Bump min protobuf version to 2.6.0 for oneof parsing support 2014-11-19 22:06:21 -08:00
Robert Edmonds
58f764ecfe bump version to 1.0.2 2014-09-08 17:07:47 -04:00
Robert Edmonds
f25a0f4e58 configure.ac: require protobuf >= 2.5.0
In order to add compatibility with the latest protobuf 2.6.0 release, we
need to add an option to the t/test-full.proto schema that was
introduced in protobuf 2.5.0, so we need to depend on protobuf 2.5.0 or
higher now.
2014-09-05 15:16:06 -04:00
Robert Edmonds
5c3a7b9464 bump version to 1.0.1 2014-08-05 14:30:33 -04:00
Robert Edmonds
b1c2ca4cf1 configure.ac: bump version to 1.0.0 2014-07-22 19:19:38 -04:00
Robert Edmonds
93b9674e93 configure.ac: bump version to 1.0.0-rc2 2014-06-27 17:59:43 -04:00
Robert Edmonds
0df53ea0c5 switch to a more automake-ish method of generating the html doxygen documentation 2014-06-03 17:30:13 -04:00
Robert Edmonds
d46d52dfaa configure.ac: use the 5-argument form of AC_INIT() and also define our own PACKAGE_DESCRIPTION 2014-06-03 16:34:38 -04:00
Robert Edmonds
e72e7e7e81 add code coverage option to the build system
configure now has a "--enable-code-coverage" option, and if the
lcov/gcov tools are available a code coverage report can be built with
"make check-code-coverage".

this is mostly based on the AX_CODE_COVERAGE / GNOME_CODE_COVERAGE
macro:

    http://savannah.gnu.org/patch/?8451

but i also looked at knot-dns's code coverage implementation:

    https://github.com/CZNIC-Labs/knot/blob/master/m4/code-coverage.m4

and kevin lyda's pull request:

    https://github.com/protobuf-c/protobuf-c/pull/131/files
2014-06-02 17:56:41 -04:00
Robert Edmonds
84be226396 configure.ac: bump version to 1.0.0-rc1 2014-04-04 19:21:31 -04:00
Robert Edmonds
e1e044da01 configure.ac: search the pkg-config exec_prefix for the protobuf compiler
protoc may not be on the default PATH, so augment $PATH with the
executable path registered by pkg-config for the protobuf package.

additionally declare PROTOC as a precious variable, thus allowing it to
be explicitly set by the user at ./configure time.

based on a patch from Andrei Nigmatulin.
2014-03-28 14:03:59 -04:00
Robert Edmonds
e633dda6e4 configure.ac: use $protobuf_CFLAGS to find protobuf header files
the protobuf header files may be installed in a non-standard location
and thus we need to use the CFLAGS registered for protobuf in pkg-config
in order to find them.

based on a patch from Andrei Nigmatulin.
2014-03-28 14:03:59 -04:00
Robert Edmonds
c6f43d347f configure.ac: make pkg-config optional when building with --disable-protoc
if pkg-config is installed, the libprotobuf-c .pc file will be
installed; if pkg-config is not installed, the .pc file won't be
installed.

this behavior only applies when we're building with ./configure
--disable-protoc, since pkg-config is required in order to detect the
protobuf dependency.
2014-03-27 16:57:21 -04:00
Robert Edmonds
daad5868cf version the libprotobuf-c symbols on compatible linkers (Issue #116)
this is conditional on whether the linker supports version scripts, for
which we use the gl_LD_VERSION_SCRIPT macro from the gnulib project.

on platforms without version scripts, we fall back to libtool's
-export-symbols-regex.
2014-03-27 15:22:55 -04:00
Robert Edmonds
16e3465d21 configure.ac: check for a libprotoc header file
it's possible for the <google/protobuf/compiler/> header files to be
shipped in a separate package (e.g., debian's libprotoc-dev). check for
this at configure time rather than allowing the build process to fail.
2014-03-24 19:04:15 -04:00
Robert Edmonds
2976be8666 configure.ac: tweak the ${has_doxygen} status display 2014-03-06 22:05:27 -05:00
Kevin Lyda
369f7e58a1 Default doxygen-doc to not enabled.
Also, don't default dot support to on and emit something to say if
the dogygen-doc target is enabled.
2014-02-17 09:24:51 +00:00
Kevin Lyda
b9f94db3cc Autoconf configuration for doxygen.
Still need to add the comments in the source code. Currently I've
seeded it with the libprotobuf-c files.  I've configured it
to make man pages and html pages.  Might not be ideal, but makes it easy
for me to check things (html is nicer, but man pages are handier for
remote servers).
2014-02-16 21:45:02 +00:00
Robert Edmonds
7ea757dd13 configure.ac: bump version to 1.0.0-pre 2014-02-10 10:57:27 -05:00
Kevin Lyda
f52f500995 Autoconf portability tweaks.
Use MKDIR_P and LN_S rather than their usual expansions.
2014-01-25 15:56:40 +00:00
Ilya Lipnitskiy
baa3ab296d .travis.yml: add a travis build entry to run tests under valgrind
Makefile.am: add valgrind to the AM_TESTS_ENVIRONMENT
configure.ac: enable valgrind testing option for ./configure
m4/valgrind-tests.m4: enable tracing children for libtool wrapper
script compatibility, but ignore standard binaries in /usr or /bin
2014-01-14 00:20:05 -08:00
Robert Edmonds
a2fb294a22 build system: add back the --disable-protoc option to configure 2014-01-13 19:53:41 -05:00
Robert Edmonds
4c7904fc13 configure.ac: remove the AC_CHECK_HEADERS checks
some of these headers aren't used in the protobuf-c code base any more,
and in any case the results of these checks (the HAVE_*_H defines in
config.h) are not actually used anywhere and the absence of any of these
headers doesn't cause configure to fail, so just delete these useless
checks.
2014-01-13 19:53:41 -05:00
Robert Edmonds
ac71dd5859 configure.ac: error out if protoc is not found 2014-01-11 15:04:30 -05:00
Robert Edmonds
410a5b8e4e configure.ac: remove protobuf-c-rpc 2014-01-10 13:25:11 -05:00
Robert Edmonds
49faa55bc2 IS_LITTLE_ENDIAN -> !defined(WORDS_BIGENDIAN)
this simplifies the AC_C_BIGENDIAN invocation.
2013-11-21 17:12:00 -05:00
Robert Edmonds
c64da22059 configure.ac: add the protobuf version to the configure summary 2013-11-18 14:32:31 -05:00
Robert Edmonds
4142d7e92e build system: remove --disable-protoc option
for some reason, "make distcheck" fails when the build is configured
with --disable-protoc. i haven't been able to track down the root cause
(it appears the build is trying to generate the generated pb-c files for
the test cases, but the test cases should be disabled when
--disable-protoc is specified). so, remove the --disable-protoc option.
libprotobuf-c should always be tested as part of a build, and this can't
be done unless protoc-c is built. this also reduces the number of build
combinations that need to be tested.
2013-11-18 14:24:05 -05:00