+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.
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
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