Files
c/configure.ac
zeekay a84cf7189d Rename shared C runtime to brand-neutral zap names; fix build; bump gtest
Finish the capnp->ZAP rebrand for the shared runtime and make the build
configure and pass on a clean checkout.

Runtime file rename (history-preserving git mv) + every reference updated
in one pass:
  lib/capn.c        -> lib/zap.c
  lib/capn-malloc.c -> lib/zap-malloc.c
  lib/capn-stream.c -> lib/zap-stream.c
  lib/capn-list.inc -> lib/zap-list.inc
  tests/capn-test.cpp        -> tests/zap-test.cpp
  tests/capn-stream-test.cpp -> tests/zap-stream-test.cpp
Updated #include directives (zap.c's 4 SZ-templated zap-list.inc includes,
the two unity-build test includes), file banner comments, and the
meson/autotools targets (test target capn-test -> zap-test, with the
matching automake zap_test_* variables and the libzap source list).

The upstream `capn_`/`CAPN_` C ABI (struct capn, capn_get, ...) is left
intact: it is the original MIT library's neutral symbol prefix, not a
capnp/Cap'n Proto brand token, and renaming it would break the generated
*.zap.c/*.zap.h and the runtime shared into the lua binding.

Build fixes:
- example-test.cpp wrote to a fixed relative path ("tests/...out"), which
  fails under `meson test` (cwd is the build dir). Use tmpfile() so the
  test is cwd-independent and leaves no artifact.
- CI workflow: trigger on main (default branch was renamed master->main),
  run the renamed zap-test binary, drop EOL ubuntu-20.04, pin checkout@v4.

Dependency bump (in-major): gtest wrap 1.13.0-1 -> 1.17.0-4. gtest >=1.14
requires C++17, so bump the test C++ standard c++14 -> c++17 in meson.build
and Makefile.am (the runtime stays c99; C++ is test-only).

Verified: meson setup build && ninja builds libzap + zapc-c + zap-test
clean; zap-test passes 24/24; `meson test` green (1/1). autoreconf
generates configure and automake accepts the renamed targets.
2026-06-20 00:00:29 -07:00

54 lines
995 B
Plaintext
Executable File

AC_PREREQ(2.60)
AC_INIT(c-zap, 0.3, [])
AC_CONFIG_SRCDIR(lib/zap_c.h)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([ac])
AC_CANONICAL_BUILD()
AC_CANONICAL_HOST()
AC_CANONICAL_TARGET()
AM_INIT_AUTOMAKE(1.11)
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h])
AC_USE_SYSTEM_EXTENSIONS
LT_INIT
AC_LANG([C])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror], [enable -Werror (for developers only)]))
if test x"${enable_werror}" = x"yes" ; then
WERROR="-Werror"
fi
AC_SUBST(WERROR)
AC_ARG_WITH(zapdir,
AS_HELP_STRING([--with-zapdir=DIR], [directory to install c.zap file in (default: $includedir/zap)]))
if test x"${with_zapdir}" != x ; then
zapdir="${with_zapdir}"
else
zapdir="${includedir}/zap"
fi
AC_SUBST(zapdir)
#PKG_CHECK_MODULES(ZAP, [zap >= 0.5.2], [], [
# AC_MSG_ERROR([zap base package (0.5.2 or newer) not found])
#])
AC_CONFIG_SUBDIRS([gtest/googletest])
AC_CONFIG_FILES([
Makefile
c-zap.pc
])
AC_OUTPUT