1
dnl BEGIN CF_GNU_SOURCE from lynx 2.8.5 distibution
2
dnl $Id: ac_cf_gnu_source.m4,v 1.1 2003/06/07 02:56:50 dnelson Exp $
3
dnl ---------------------------------------------------------------------------
4
dnl Check if we must define _GNU_SOURCE to get a reasonable value for
5
dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
6
dnl (or misfeature) of glibc2, which breaks portability of many applications,
7
dnl since it is interwoven with GNU extensions.
9
dnl Well, yes we could work around it...
10
AC_DEFUN([CF_GNU_SOURCE],
12
AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
13
AC_TRY_COMPILE([#include <sys/types.h>],[
17
[cf_cv_gnu_source=no],
19
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
20
AC_TRY_COMPILE([#include <sys/types.h>],[
24
[cf_cv_gnu_source=no],
25
[cf_cv_gnu_source=yes])
29
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
31
dnl END CF_GNU_SOURCE from lynx 2.8.5 distibution