1 # check-math-lib.m4 serial 1
2 dnl Copyright (C) 2007 Free Software Foundation, Inc.
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.
7 dnl AC_CHECK_MATH_LIB (VARIABLE, EXPRESSION)
9 dnl Checks whether EXPRESSION requires -lm to compile and link. If so, sets
10 dnl the shell VARIABLE to -lm, otherwise to the empty string.
12 dnl Example: AC_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);])
13 AC_DEFUN([gl_CHECK_MATH_LIB], [
16 for libm in "" "-lm"; do
17 LIBS="$save_LIBS $libm"
19 #ifndef __NO_MATH_INLINES
20 # define __NO_MATH_INLINES 1 /* for glibc */
29 if test "$$1" = "?"; then