build: use AC_FUNC_STRERROR_R to check the version of strerror_r()
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 24 Jan 2017 10:45:36 +0000 (11:45 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Tue, 24 Jan 2017 10:45:36 +0000 (11:45 +0100)
commit8e1fdcdc2028a3d5184bd99e320b62d0fe59e3c9
treeedc2e52a666ea74a4e994fb63e0f17abda72ed3a
parent339760773b0455284c42714c87514cdb21761d5d
build: use AC_FUNC_STRERROR_R to check the version of strerror_r()

Define _GNU_SOURCE globally in configure.ac and use the
AC_FUNC_STRERROR_R macro to figure out what version of strerror_r() is
provided. Some libraries (e.g. musl) only provide the POSIX version
even if we explicitly request GNU extensions.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
configure.ac
src/lib/Makefile.am
src/lib/core.c
src/tools/Makefile.am