]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid too much inlining when testing for the library containing ceil(), sqrt().
authorBruno Haible <bruno@clisp.org>
Sun, 11 Feb 2007 04:42:06 +0000 (04:42 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:40 +0000 (12:14 +0200)
gettext-tools/ChangeLog
gettext-tools/configure.ac

index 75dcf9d5457fd0af65029e80c77c041baa0c4609..1e2e550047b0ea59883bd191374756c1daebb131 100644 (file)
@@ -1,3 +1,9 @@
+2007-01-10  Bruno Haible  <bruno@clisp.org>
+
+       * configure.ac (MSGMERGE_LIBM): Avoid inlining of the ceil, sqrt calls
+       on glibc systems.
+       Reported by I. Thomas Cundiff <tcundiff@eclipse.net>.
+
 2006-12-23  Bruno Haible  <bruno@clisp.org>
 
        * gnulib-lib/Makefile.am (libgettextlib_la_LINK): New variable.
index 6ca0f61d65a91359b326783e5ea3bb3b3a96e17d..ead326794607cf051ff88c49ca5be5ea6f1286c6 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-tools directory of GNU gettext
-dnl Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
 dnl
 dnl This program is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -111,12 +111,24 @@ dnl Test whether msgmerge must be linked against libm. This is the case on
 dnl most systems; but BeOS has all <math.h> functions in libc and doesn't have
 dnl a libm.
 MSGMERGE_LIBM=?
-AC_TRY_LINK([#include <math.h>], [static double x; x = ceil(x); x = sqrt(x);],
+AC_TRY_LINK([
+   #ifndef __NO_MATH_INLINES
+   # define __NO_MATH_INLINES 1 /* for glibc */
+   #endif
+   #include <math.h>
+   double x;],
+  [x = ceil(x); x = sqrt(x);],
   [MSGMERGE_LIBM=])
 if test "$MSGMERGE_LIBM" = "?"; then
   save_LIBS="$LIBS" 
   LIBS="$LIBS -lm"
-  AC_TRY_LINK([#include <math.h>], [static double x; x = ceil(x); x = sqrt(x);],
+  AC_TRY_LINK([
+     #ifndef __NO_MATH_INLINES
+     # define __NO_MATH_INLINES 1 /* for glibc */
+     #endif
+     #include <math.h>
+     double x;],
+    [x = ceil(x); x = sqrt(x);],
     [MSGMERGE_LIBM="-lm"])
   LIBS="$save_LIBS"
 fi