Do not redefine it though when already set, so that it can be
overridden by the user, or indirectly by the compiler settings.
local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx
endif
# Ensure that local include directories are always searched first.
-AM_CPPFLAGS = $(local_includes) -D_POSIX_C_SOURCE=200112L -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+AM_CPPFLAGS = $(local_includes) -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
# The tests CFLAGS are a superset of the libsigrok CFLAGS, and the
# python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
# Required for per-target flags or subdir-objects with C sources.
AM_PROG_CC_C_O
+# Set the standard the C library headers should conform to.
+AH_VERBATIM([_POSIX_C_SOURCE], [/* The targeted POSIX standard. */
+#ifndef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200112L
+#endif])
+
# Get compiler versions.
SR_PROG_VERSION([$CC], [sr_cc_version])
SR_PROG_VERSION([$CXX], [sr_cxx_version])