Mercurial > hg > octave-lojdl > gnulib-hg
annotate m4/floorf.m4 @ 14473:acd1454e6a45
New module 'unictype/category-LC'.
* lib/unictype.in.h (UC_CATEGORY_MASK_LC): New enumeration value.
(UC_CATEGORY_LC): New declaration.
(UC_CASED_LETTER): New macro.
* lib/gen-uni-tables.c (is_category_LC): New function.
(output_categories): Also handle category LC.
(UC_CATEGORY_MASK_LC): New enumeration value.
(general_category_byname): Also handle category LC.
* lib/unictype/categ_LC.c: New file.
* lib/unictype/categ_LC.h: New file, automatically generated.
* lib/unictype/categ_name.c (uc_general_category_name): Also handle
category LC.
* lib/unictype/categ_byname.c (uc_general_category_byname): Likewise.
* modules/unictype/category-LC: New file.
* modules/unictype/category-all (Depends-on): Add unictype/category-LC.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 25 Mar 2011 20:23:43 +0100 |
parents | 97fc9a21a8fb |
children | 038c814724c1 |
rev | line source |
---|---|
13977 | 1 # floorf.m4 serial 8 |
14079
97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents:
13977
diff
changeset
|
2 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. |
9291 | 3 dnl This file is free software; the Free Software Foundation |
4 dnl gives unlimited permission to copy and/or distribute it, | |
5 dnl with or without modifications, as long as this notice is preserved. | |
6 | |
7 AC_DEFUN([gl_FUNC_FLOORF], | |
8 [ | |
13977 | 9 m4_divert_text([DEFAULTS], [gl_floorf_required=plain]) |
9291 | 10 AC_REQUIRE([gl_MATH_H_DEFAULTS]) |
11 dnl Persuade glibc <math.h> to declare floorf(). | |
12 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | |
13 dnl Test whether floorf() is declared. | |
14 AC_CHECK_DECLS([floorf], , , [#include <math.h>]) | |
15 if test "$ac_cv_have_decl_floorf" = yes; then | |
16 dnl Test whether floorf() can be used without libm. | |
9419
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
17 gl_FUNC_FLOORF_LIBS |
9291 | 18 if test "$FLOORF_LIBM" = "?"; then |
9420
9e0484f26251
Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents:
9419
diff
changeset
|
19 dnl Sun C 5.0 on Solaris declares floorf() and has it in the system-wide |
9e0484f26251
Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents:
9419
diff
changeset
|
20 dnl libm.so, but not in the libm.so that the compiler uses. |
9e0484f26251
Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents:
9419
diff
changeset
|
21 REPLACE_FLOORF=1 |
9291 | 22 fi |
13977 | 23 m4_ifdef([gl_FUNC_FLOORF_IEEE], [ |
24 if test $gl_floorf_required = ieee && test $REPLACE_FLOORF = 0; then | |
25 AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559], | |
26 [gl_cv_func_floorf_ieee], | |
27 [ | |
28 save_LIBS="$LIBS" | |
29 LIBS="$LIBS $FLOORF_LIBM" | |
30 AC_RUN_IFELSE( | |
31 [AC_LANG_SOURCE([[ | |
32 #ifndef __NO_MATH_INLINES | |
33 # define __NO_MATH_INLINES 1 /* for glibc */ | |
34 #endif | |
35 #include <math.h> | |
36 ]gl_FLOAT_MINUS_ZERO_CODE[ | |
37 ]gl_FLOAT_SIGNBIT_CODE[ | |
38 int main() | |
39 { | |
40 /* Test whether floorf (-0.0f) is -0.0f. */ | |
41 if (signbitf (minus_zerof) && !signbitf (floorf (minus_zerof))) | |
42 return 1; | |
43 return 0; | |
44 } | |
45 ]])], | |
46 [gl_cv_func_floorf_ieee=yes], | |
47 [gl_cv_func_floorf_ieee=no], | |
48 [gl_cv_func_floorf_ieee="guessing no"]) | |
49 LIBS="$save_LIBS" | |
50 ]) | |
51 case "$gl_cv_func_floorf_ieee" in | |
52 *yes) ;; | |
53 *) REPLACE_FLOORF=1 ;; | |
54 esac | |
55 fi | |
56 ]) | |
9291 | 57 else |
13142
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13140
diff
changeset
|
58 HAVE_DECL_FLOORF=0 |
9420
9e0484f26251
Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents:
9419
diff
changeset
|
59 fi |
13142
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13140
diff
changeset
|
60 if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then |
9291 | 61 AC_LIBOBJ([floorf]) |
62 FLOORF_LIBM= | |
63 fi | |
64 AC_SUBST([FLOORF_LIBM]) | |
65 ]) | |
9419
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
66 |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
67 # Determines the libraries needed to get the floorf() function. |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
68 # Sets FLOORF_LIBM. |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
69 AC_DEFUN([gl_FUNC_FLOORF_LIBS], |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
70 [ |
11229
6dad92faecd1
Avoid spurious "(cached)" in configure output.
Bruno Haible <bruno@clisp.org>
parents:
9425
diff
changeset
|
71 gl_CACHE_VAL_SILENT([gl_cv_func_floorf_libm], [ |
9425
b60ac48de79f
Rename the cache variable to contain the special marker '_cv_'.
Bruno Haible <bruno@clisp.org>
parents:
9420
diff
changeset
|
72 gl_cv_func_floorf_libm=? |
13578
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
73 AC_LINK_IFELSE( |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
74 [AC_LANG_PROGRAM( |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
75 [[#ifndef __NO_MATH_INLINES |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
76 # define __NO_MATH_INLINES 1 /* for glibc */ |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
77 #endif |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
78 #include <math.h> |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
79 float x;]], |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
80 [[x = floorf(x);]])], |
9425
b60ac48de79f
Rename the cache variable to contain the special marker '_cv_'.
Bruno Haible <bruno@clisp.org>
parents:
9420
diff
changeset
|
81 [gl_cv_func_floorf_libm=]) |
b60ac48de79f
Rename the cache variable to contain the special marker '_cv_'.
Bruno Haible <bruno@clisp.org>
parents:
9420
diff
changeset
|
82 if test "$gl_cv_func_floorf_libm" = "?"; then |
9419
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
83 save_LIBS="$LIBS" |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
84 LIBS="$LIBS -lm" |
13578
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
85 AC_LINK_IFELSE( |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
86 [AC_LANG_PROGRAM( |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
87 [[#ifndef __NO_MATH_INLINES |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
88 # define __NO_MATH_INLINES 1 /* for glibc */ |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
89 #endif |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
90 #include <math.h> |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
91 float x;]], |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13142
diff
changeset
|
92 [[x = floorf(x);]])], |
9425
b60ac48de79f
Rename the cache variable to contain the special marker '_cv_'.
Bruno Haible <bruno@clisp.org>
parents:
9420
diff
changeset
|
93 [gl_cv_func_floorf_libm="-lm"]) |
9419
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
94 LIBS="$save_LIBS" |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
95 fi |
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
96 ]) |
9425
b60ac48de79f
Rename the cache variable to contain the special marker '_cv_'.
Bruno Haible <bruno@clisp.org>
parents:
9420
diff
changeset
|
97 FLOORF_LIBM="$gl_cv_func_floorf_libm" |
9419
8c764a2deb81
Put the test whether the floor or ceil variant needs libm into a separate macro.
Bruno Haible <bruno@clisp.org>
parents:
9291
diff
changeset
|
98 ]) |