On 12/07/2026 23:06, Kara McNair wrote:
I’m trying to build on Mac OS X Sequoia and running into an issue that Google is not making clear to me.
I’m getting a warning when I run
karamcnair@mymac libdivecomputer % autoreconf --install configure.ac:65: warning: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC configure.ac:68: warning: ac_ext=c
When I run ./configure I get:
checking whether gcc -std=gnu23 understands -c and -o together... (cached) yes checking dependency style of gcc -std=gnu23... (cached) gcc3 ./configure: line 15860: syntax error near unexpected token `newline' ./configure: line 15860: `yes:'
Can you show the contents of the ./configure script around line 15860?
I’m suspicious those two things are related, since I’ve found a similar issue someone else was having with a different project. https://github.com/Arkq/bluez- alsa/issues/495 <https://github.com/Arkq/bluez-alsa/issues/495> The proposed fix for their situation apparently worked but I confess that build & makefiles and all the automation around that is really something I don’t know anything about (I always worked with build tools and systems that were maintained by specialists in those areas - I was purely application dev).
I'm not a Mac developer, but the Github Actions do build successfully on Mac using these steps: https://github.com/libdivecomputer/libdivecomputer/blob/master/.github/workf... The latest CI build ran on Mac 26.4, which is even more recent than Sequoia. I also don't see this error (just the deprecation warning) on Linux with autconf 2.72. Anyway, the AC_PROG_CC_C99 is deprecated and I'll check if it can be removed safely (once I'm back from my holiday).
I am suspicious that my build setup maybe isn’t using the correct gcc or clang (because on your documentation page https://www.libdivecomputer.org/ documentation.html <https://www.libdivecomputer.org/documentation.html> there’s a paragraph that says: "Building the library on Windows, requires an up-to-date mingw/msys build environment. Building with the msvc compiler is also possible, but requires you to compile in C++ mode, due to the missing C99 support. A working msvc project file for the free Express Edition (version 2008) is included in the source code.”
The remark about compiling in C++ mode isn't needed anymore. The included msvc project has been upgraded to MSVC 2013 or later, where the C99 support is available
If there’s someone who has been working on the Mac build of this, would you be able to point me in the right direction for what gcc and/or clang I should be making sure I’m using? (And if you were able to give me a gentle shove in the direction of how to do that (macports?) I would be grateful.
Did you install autoconf (and friends) using brew, like in the CI script? Jef