~ubuntu-branches/ubuntu/karmic/spamass-milter/karmic-updates

« back to all changes in this revision

Viewing changes to ac_cf_gnu_source.m4

  • Committer: Bazaar Package Importer
  • Author(s): Don Armstrong
  • Date: 2005-03-01 18:20:21 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050301182021-dtkbgiftuspoteu0
Tags: 0.3.0-1
* New upstream release (closes: #295586)
* Include sendmail.mc in the reportbug script
* Stop using cdbs
* Specify path to spamc and sendmail directly to eliminate (useless)
  build dependencies on spamc and sendmail

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
8
dnl
 
9
dnl Well, yes we could work around it...
 
10
AC_DEFUN([CF_GNU_SOURCE],
 
11
[
 
12
AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
 
13
AC_TRY_COMPILE([#include <sys/types.h>],[
 
14
#ifndef _XOPEN_SOURCE
 
15
make an error
 
16
#endif],
 
17
        [cf_cv_gnu_source=no],
 
18
        [cf_save="$CPPFLAGS"
 
19
         CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 
20
         AC_TRY_COMPILE([#include <sys/types.h>],[
 
21
#ifdef _XOPEN_SOURCE
 
22
make an error
 
23
#endif],
 
24
        [cf_cv_gnu_source=no],
 
25
        [cf_cv_gnu_source=yes])
 
26
        CPPFLAGS="$cf_save"
 
27
        ])
 
28
])
 
29
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 
30
])dnl
 
31
dnl END CF_GNU_SOURCE from lynx 2.8.5 distibution