From: Sebastian Harl Date: Sun, 23 Feb 2014 20:38:36 +0000 (-0800) Subject: configure: Include _BSD_SOURCE in standards related defines. X-Git-Tag: sysdb-0.1.0~179 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=cb62073c4a4b514f2144d73f8197d9dff357cece configure: Include _BSD_SOURCE in standards related defines. Else, GNU libc does not define strcasecmp() even though it conforms to POSIX.1-2001. --- diff --git a/configure.ac b/configure.ac index 5cae366..a5226d2 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,11 @@ if test "x$enable_standards" = "xyes"; then AC_DEFINE([_THREAD_SAFE], 1, [Define to enable reentrant interfaces.]) + dnl GNU libc defines strcasecmp() only when using _BSD_SOURCE even though + dnl the function is conforming to POSIX.1-2001 as well. Let's weaken + dnl strict standards compliance a bit to work around this. + AC_DEFINE([_BSD_SOURCE], 1, [Define to enable 4.3BSD support.]) + for flag in -std=c99 -pedantic; do AC_MSG_CHECKING([whether $CC accepts $flag])