~ubuntu-branches/ubuntu/raring/blitz++/raring

« back to all changes in this revision

Viewing changes to m4/ac_cxx_have_system_v_math.m4

  • Committer: Bazaar Package Importer
  • Author(s): Konstantinos Margaritis
  • Date: 2005-02-28 20:25:01 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050228202501-3i4f2sknnprsqfhz
Tags: 1:0.8-4
Added missing build-depends (Closes: #297323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Available from the GNU Autoconf Macro Archive at:
 
2
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_system_v_math.html
 
3
dnl
 
4
AC_DEFUN([AC_CXX_HAVE_SYSTEM_V_MATH],
 
5
[AC_CACHE_CHECK(whether the compiler supports System V math library,
 
6
ac_cv_cxx_have_system_v_math,
 
7
[AC_LANG_SAVE
 
8
 AC_LANG_CPLUSPLUS
 
9
 ac_save_LIBS="$LIBS"
 
10
 LIBS="$LIBS -lm"
 
11
 AC_TRY_LINK([
 
12
#ifndef _ALL_SOURCE
 
13
 #define _ALL_SOURCE
 
14
#endif
 
15
#ifndef _XOPEN_SOURCE
 
16
 #define _XOPEN_SOURCE
 
17
#endif
 
18
#ifndef _XOPEN_SOURCE_EXTENDED
 
19
 #define _XOPEN_SOURCE_EXTENDED 1
 
20
#endif
 
21
#include <math.h>],[double x = 1.0; double y = 1.0;
 
22
_class(x); trunc(x); finite(x); itrunc(x); nearest(x); rsqrt(x); uitrunc(x);
 
23
copysign(x,y); drem(x,y); unordered(x,y);
 
24
return 0;],
 
25
 ac_cv_cxx_have_system_v_math=yes, ac_cv_cxx_have_system_v_math=no)
 
26
 LIBS="$ac_save_LIBS"
 
27
 AC_LANG_RESTORE
 
28
])
 
29
if test "$ac_cv_cxx_have_system_v_math" = yes; then
 
30
  AC_DEFINE(HAVE_SYSTEM_V_MATH,,[define if the compiler supports System V math library])
 
31
fi
 
32
])