~ubuntu-branches/ubuntu/oneiric/imagemagick/oneiric-updates

« back to all changes in this revision

Viewing changes to m4/ax_cxx_bool.m4

  • Committer: Bazaar Package Importer
  • Author(s): Nelson A. de Oliveira
  • Date: 2010-06-20 19:59:55 UTC
  • mfrom: (6.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100620195955-n3eq0yenhycw888i
Tags: 7:6.6.2.6-1
* New upstream release;
* Change Recommends on ufraw to ufraw-batch (Closes: #579775);
* Fix FTBFS when using dash to run the configure script, by setting
  CONFIG_SHELL=/bin/bash (Closes: #582073, #583024). Thank you, Niko Tyni!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ===========================================================================
 
2
#        http://www.gnu.org/software/autoconf-archive/ax_cxx_bool.html
 
3
# ===========================================================================
 
4
#
 
5
# SYNOPSIS
 
6
#
 
7
#   AX_CXX_BOOL
 
8
#
 
9
# DESCRIPTION
 
10
#
 
11
#   If the compiler recognizes bool as a separate built-in type, define
 
12
#   HAVE_BOOL. Note that a typedef is not a separate type since you cannot
 
13
#   overload a function such that it accepts either the basic type or the
 
14
#   typedef.
 
15
#
 
16
# LICENSE
 
17
#
 
18
#   Copyright (c) 2008 Todd Veldhuizen
 
19
#   Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
 
20
#
 
21
#   Copying and distribution of this file, with or without modification, are
 
22
#   permitted in any medium without royalty provided the copyright notice
 
23
#   and this notice are preserved. This file is offered as-is, without any
 
24
#   warranty.
 
25
 
 
26
#serial 6
 
27
 
 
28
AU_ALIAS([AC_CXX_BOOL], [AX_CXX_BOOL])
 
29
AC_DEFUN([AX_CXX_BOOL],
 
30
[AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
 
31
ax_cv_cxx_bool,
 
32
[AC_LANG_SAVE
 
33
 AC_LANG_CPLUSPLUS
 
34
 AC_TRY_COMPILE([
 
35
int f(int  x){return 1;}
 
36
int f(char x){return 1;}
 
37
int f(bool x){return 1;}
 
38
],[bool b = true; return f(b);],
 
39
 ax_cv_cxx_bool=yes, ax_cv_cxx_bool=no)
 
40
 AC_LANG_RESTORE
 
41
])
 
42
if test "$ax_cv_cxx_bool" = yes; then
 
43
  AC_DEFINE(HAVE_BOOL,,[define if bool is a built-in type])
 
44
fi
 
45
])