~ubuntu-branches/ubuntu/maverick/uim/maverick

« back to all changes in this revision

Viewing changes to m4/ax_lib_glibc.m4

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2008-06-25 19:56:33 UTC
  • mfrom: (3.1.18 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080625195633-8jljph4rfq00l8o7
Tags: 1:1.5.1-2
* uim-tcode: provide tutcode-custom.scm, tutcode-bushudic.scm
  and tutcode-rule.scm (Closes: #482659)
* Fix FTBFS: segv during compile (Closes: #483078).
  I personally think this bug is not specific for uim but is a optimization
  problem on gcc-4.3.1. (https://bugs.freedesktop.org/show_bug.cgi?id=16477)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Copyright (C) 2006 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
 
2
dnl
 
3
dnl Copying and distribution of this file, with or without modification,
 
4
dnl are permitted in any medium without royalty provided the copyright
 
5
dnl notice and this notice are preserved.
 
6
dnl
 
7
dnl
 
8
dnl @synopsis AX_LIB_GLIBC
 
9
dnl
 
10
dnl Defines HAVE_GLIBC if libc is the GNU libc.
 
11
dnl
 
12
dnl This macro only performs the glibc detection, and not responsible for
 
13
dnl defining any extension specifiers such as _GNU_SOURCE or _BSD_SOURCE. Do it
 
14
dnl by separate code as needed, or simply use AC_GNU_SOURCE instead.
 
15
dnl 
 
16
dnl Although __GLIBC__ is provided by glibc, it is available only after
 
17
dnl including feature.h. But some extensions of glibc requires that
 
18
dnl corresponding macro is defined by user before feature.h is included,
 
19
dnl to be enabled. For example, _GNU_SOURCE is required to enable
 
20
dnl asprintf(3). So this macro provide HAVE_GLIBC to define such extension
 
21
dnl specifier macros only if the libc is glibc, to avoid that unneeded
 
22
dnl macros that may cause an incompatible effect are defined in non-glibc
 
23
dnl environment.
 
24
dnl
 
25
dnl @category LIB
 
26
dnl @author YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
 
27
dnl @version 2006-12-13
 
28
dnl @license AllPermissive
 
29
 
 
30
AC_DEFUN([AX_LIB_GLIBC], [
 
31
  AC_CACHE_CHECK([if libc is the GNU libc],
 
32
    ax_cv_lib_glibc,
 
33
    [AC_EGREP_CPP([^ax_cv_lib_glibc_yes$], [[
 
34
/* To avoid being affected from possible header reorganization, this macro
 
35
 * does not include features.h directly. */
 
36
#include <stdlib.h>
 
37
#if (defined(__GLIBC__) || defined(__GNU_LIBRARY__))
 
38
ax_cv_lib_glibc_yes
 
39
#endif
 
40
      ]],
 
41
      [ax_cv_lib_glibc=yes],
 
42
      [ax_cv_lib_glibc=no])])
 
43
  if test "x$ax_cv_lib_glibc" = xyes; then
 
44
    AC_DEFINE(HAVE_GLIBC, 1, [Define to 1 if you have the GNU libc.])
 
45
  fi
 
46
])