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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13977
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
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
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_FLOORF],
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 [
13977
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
9 m4_divert_text([DEFAULTS], [gl_floorf_required=plain])
9291
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_REQUIRE([gl_MATH_H_DEFAULTS])
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 dnl Persuade glibc <math.h> to declare floorf().
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 dnl Test whether floorf() is declared.
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 AC_CHECK_DECLS([floorf], , , [#include <math.h>])
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 if test "$ac_cv_have_decl_floorf" = yes; then
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 fi
13977
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
23 m4_ifdef([gl_FUNC_FLOORF_IEEE], [
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
24 if test $gl_floorf_required = ieee && test $REPLACE_FLOORF = 0; then
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
25 AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559],
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
26 [gl_cv_func_floorf_ieee],
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
27 [
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
28 save_LIBS="$LIBS"
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
29 LIBS="$LIBS $FLOORF_LIBM"
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
30 AC_RUN_IFELSE(
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
31 [AC_LANG_SOURCE([[
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
32 #ifndef __NO_MATH_INLINES
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
33 # define __NO_MATH_INLINES 1 /* for glibc */
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
34 #endif
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
35 #include <math.h>
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
36 ]gl_FLOAT_MINUS_ZERO_CODE[
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
37 ]gl_FLOAT_SIGNBIT_CODE[
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
38 int main()
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
39 {
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
40 /* Test whether floorf (-0.0f) is -0.0f. */
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
41 if (signbitf (minus_zerof) && !signbitf (floorf (minus_zerof)))
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
42 return 1;
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
43 return 0;
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
44 }
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
45 ]])],
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
46 [gl_cv_func_floorf_ieee=yes],
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
47 [gl_cv_func_floorf_ieee=no],
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
48 [gl_cv_func_floorf_ieee="guessing no"])
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
49 LIBS="$save_LIBS"
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
50 ])
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
51 case "$gl_cv_func_floorf_ieee" in
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
52 *yes) ;;
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
53 *) REPLACE_FLOORF=1 ;;
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
54 esac
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
55 fi
dcd86f222143 New module 'floorf-ieee'.
Bruno Haible <bruno@clisp.org>
parents: 13578
diff changeset
56 ])
9291
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 AC_LIBOBJ([floorf])
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 FLOORF_LIBM=
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 fi
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 AC_SUBST([FLOORF_LIBM])
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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 ])