Patchwork [V2] libgfortran: do not assume libm

login
register
mail settings
Submitter Tristan Gingold
Date March 30, 2012, 10:22 a.m.
Message ID <8661DD82-57D2-4DB6-A433-B6E0497CABEC@adacore.com>
Download mbox | patch
Permalink /patch/149601/
State New
Headers show

Comments

Tristan Gingold - March 30, 2012, 10:22 a.m.
On Mar 27, 2012, at 10:38 AM, Janne Blomqvist wrote:

> On Tue, Mar 27, 2012 at 11:01, Tristan Gingold <gingold@adacore.com> wrote:
>> Hi,
>> 
>> this patch fixes this issue.  Is it OK ?
> 
> Ok.
> 
>> Maybe we should include the AC_DEFINE action within GCC_CHECK_MATH_FUNC.  Will try to do that.
> 
> That looks like a cleaner solution, yes, and less chance for typos to sneak in.

Hi,

here is the 'cleaner solution': now GCC_CHECK_MATH_FUNC automatically define the HAVE_xxx variable.

The description is now: Define to 1 if you have the `xxx' function.  As a consequence, libgfortran/config.h.in was regenerated (with differences like:
 
-/* acos is available */
+/* Define to 1 if you have the `acos' function. */
 #undef HAVE_ACOS
 
)

Tested by rebuild libgfortran for ia64-hp-openvms and visual inspection of differences.

I have CC: Paolo as he approved the first version of math.m4.

Ok for trunk ?

Tristan.


config/
2012-03-30  Tristan Gingold  <gingold@adacore.com>

	* math.m4 (GCC_CHECK_MATH_FUNC): Remove if-present
	argument.  Define the variable.


libgfortran/
2012-03-30  Tristan Gingold  <gingold@adacore.com>

	* configure.ac: Use new version of GCC_CHECK_MATH_FUNC.
	* configure: Regenerate
	* config.h.in: Regenerate.
Paolo Bonzini - March 30, 2012, 12:39 p.m.
Il 30/03/2012 12:22, Tristan Gingold ha scritto:
> 
> On Mar 27, 2012, at 10:38 AM, Janne Blomqvist wrote:
> 
>> On Tue, Mar 27, 2012 at 11:01, Tristan Gingold <gingold@adacore.com> wrote:
>>> Hi,
>>>
>>> this patch fixes this issue.  Is it OK ?
>>
>> Ok.
>>
>>> Maybe we should include the AC_DEFINE action within GCC_CHECK_MATH_FUNC.  Will try to do that.
>>
>> That looks like a cleaner solution, yes, and less chance for typos to sneak in.
> 
> Hi,
> 
> here is the 'cleaner solution': now GCC_CHECK_MATH_FUNC automatically define the HAVE_xxx variable.
> 
> The description is now: Define to 1 if you have the `xxx' function.  As a consequence, libgfortran/config.h.in was regenerated (with differences like:
>  
> -/* acos is available */
> +/* Define to 1 if you have the `acos' function. */
>  #undef HAVE_ACOS
>  
> )
> 
> Tested by rebuild libgfortran for ia64-hp-openvms and visual inspection of differences.
> 
> I have CC: Paolo as he approved the first version of math.m4.
> 
> Ok for trunk ?

Yes.

Paolo
Tristan Gingold - April 2, 2012, 7:47 a.m.
On Mar 30, 2012, at 2:39 PM, Paolo Bonzini wrote:

> Il 30/03/2012 12:22, Tristan Gingold ha scritto:
>> 
>> On Mar 27, 2012, at 10:38 AM, Janne Blomqvist wrote:
>> 
>>> On Tue, Mar 27, 2012 at 11:01, Tristan Gingold <gingold@adacore.com> wrote:
>>>> Hi,
>>>> 
>>>> this patch fixes this issue.  Is it OK ?
>>> 
>>> Ok.
>>> 
>>>> Maybe we should include the AC_DEFINE action within GCC_CHECK_MATH_FUNC.  Will try to do that.
>>> 
>>> That looks like a cleaner solution, yes, and less chance for typos to sneak in.
>> 
>> Hi,
>> 
>> here is the 'cleaner solution': now GCC_CHECK_MATH_FUNC automatically define the HAVE_xxx variable.
>> 
>> The description is now: Define to 1 if you have the `xxx' function.  As a consequence, libgfortran/config.h.in was regenerated (with differences like:
>> 
>> -/* acos is available */
>> +/* Define to 1 if you have the `acos' function. */
>> #undef HAVE_ACOS
>> 
>> )
>> 
>> Tested by rebuild libgfortran for ia64-hp-openvms and visual inspection of differences.
>> 
>> I have CC: Paolo as he approved the first version of math.m4.
>> 
>> Ok for trunk ?
> 
> Yes.

Thanks, committed.

Tristan.

Patch

diff --git a/config/math.m4 b/config/math.m4
index 5527c25..23835f2 100644
--- a/config/math.m4
+++ b/config/math.m4
@@ -14,10 +14,10 @@  dnl  functions).
 AC_DEFUN([GCC_CHECK_MATH_HEADERS],
 [AC_CHECK_HEADERS_ONCE(math.h complex.h)])
 
-dnl GCC_CHECK_MATH_FUNC([name],[if-present])
+dnl GCC_CHECK_MATH_FUNC([name])
 dnl
 dnl Check whether math function NAME is available on the system (by compiling
-dnl and linking a C program) and run if-present on success.
+dnl and linking a C program) and run define HAVE_name on success.
 dnl
 dnl Note that OpenVMS system insists on including complex.h before math.h
 AC_DEFUN([GCC_CHECK_MATH_FUNC],
@@ -44,6 +44,7 @@  main ()
 [gcc_cv_math_func_$1=yes],
 [gcc_cv_math_func_$1=no])])
   if test $gcc_cv_math_func_$1 = yes; then
-    $2
+    AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1),[1],
+                       [Define to 1 if you have the `$1' function.])
   fi
 ])
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 08eb789..d70924e 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -269,191 +269,191 @@  getcwd localtime_r gmtime_r strerror_r getpwuid_r ttyname_r clock_gettime \
 readlink getgid getpid getppid getuid geteuid umask)
 
 # Check for C99 (and other IEEE) math functions
-GCC_CHECK_MATH_FUNC([acosf],[AC_DEFINE([HAVE_ACOSF],[1],[acosf is available])])
-GCC_CHECK_MATH_FUNC([acos],[AC_DEFINE([HAVE_ACOS],[1],[acos is available])])
-GCC_CHECK_MATH_FUNC([acosl],[AC_DEFINE([HAVE_ACOSL],[1],[acosl is available])])
-GCC_CHECK_MATH_FUNC([acoshf],[AC_DEFINE([HAVE_ACOSHF],[1],[acoshf is available])])
-GCC_CHECK_MATH_FUNC([acosh],[AC_DEFINE([HAVE_ACOSH],[1],[acosh is available])])
-GCC_CHECK_MATH_FUNC([acoshl],[AC_DEFINE([HAVE_ACOSHL],[1],[acoshl is available])])
-GCC_CHECK_MATH_FUNC([asinf],[AC_DEFINE([HAVE_ASINF],[1],[asinf is available])])
-GCC_CHECK_MATH_FUNC([asin],[AC_DEFINE([HAVE_ASIN],[1],[asin is available])])
-GCC_CHECK_MATH_FUNC([asinl],[AC_DEFINE([HAVE_ASINL],[1],[asinl is available])])
-GCC_CHECK_MATH_FUNC([asinhf],[AC_DEFINE([HAVE_ASINHF],[1],[asinhf is available])])
-GCC_CHECK_MATH_FUNC([asinh],[AC_DEFINE([HAVE_ASINH],[1],[asinh is available])])
-GCC_CHECK_MATH_FUNC([asinhl],[AC_DEFINE([HAVE_ASINHL],[1],[asinhl is available])])
-GCC_CHECK_MATH_FUNC([atan2f],[AC_DEFINE([HAVE_ATAN2F],[1],[atan2f is available])])
-GCC_CHECK_MATH_FUNC([atan2],[AC_DEFINE([HAVE_ATAN2],[1],[atan2 is available])])
-GCC_CHECK_MATH_FUNC([atan2l],[AC_DEFINE([HAVE_ATAN2L],[1],[atan2l is available])])
-GCC_CHECK_MATH_FUNC([atanf],[AC_DEFINE([HAVE_ATANF],[1],[atanf is available])])
-GCC_CHECK_MATH_FUNC([atan],[AC_DEFINE([HAVE_ATAN],[1],[atan is available])])
-GCC_CHECK_MATH_FUNC([atanl],[AC_DEFINE([HAVE_ATANL],[1],[atanl is available])])
-GCC_CHECK_MATH_FUNC([atanhf],[AC_DEFINE([HAVE_ATANHF],[1],[atanhf is available])])
-GCC_CHECK_MATH_FUNC([atanh],[AC_DEFINE([HAVE_ATANH],[1],[atanh is available])])
-GCC_CHECK_MATH_FUNC([atanhl],[AC_DEFINE([HAVE_ATANHL],[1],[atanhl is available])])
-GCC_CHECK_MATH_FUNC([cargf],[AC_DEFINE([HAVE_CARGF],[1],[cargf is available])])
-GCC_CHECK_MATH_FUNC([carg],[AC_DEFINE([HAVE_CARG],[1],[carg is available])])
-GCC_CHECK_MATH_FUNC([cargl],[AC_DEFINE([HAVE_CARGL],[1],[cargl is available])])
-GCC_CHECK_MATH_FUNC([ceilf],[AC_DEFINE([HAVE_CEILF],[1],[ceilf is available])])
-GCC_CHECK_MATH_FUNC([ceil],[AC_DEFINE([HAVE_CEIL],[1],[ceil is available])])
-GCC_CHECK_MATH_FUNC([ceill],[AC_DEFINE([HAVE_CEILL],[1],[ceill is available])])
-GCC_CHECK_MATH_FUNC([copysignf],[AC_DEFINE([HAVE_COPYSIGNF],[1],[copysignf is available])])
-GCC_CHECK_MATH_FUNC([copysign],[AC_DEFINE([HAVE_COPYSIGN],[1],[copysign is available])])
-GCC_CHECK_MATH_FUNC([copysignl],[AC_DEFINE([HAVE_COPYSIGNL],[1],[copysignl is available])])
-GCC_CHECK_MATH_FUNC([cosf],[AC_DEFINE([HAVE_COSF],[1],[cosf is available])])
-GCC_CHECK_MATH_FUNC([cos],[AC_DEFINE([HAVE_COS],[1],[cos is available])])
-GCC_CHECK_MATH_FUNC([cosl],[AC_DEFINE([HAVE_COSL],[1],[cosl is available])])
-GCC_CHECK_MATH_FUNC([ccosf],[AC_DEFINE([HAVE_CCOSF],[1],[ccosf is available])])
-GCC_CHECK_MATH_FUNC([ccos],[AC_DEFINE([HAVE_CCOS],[1],[ccos is available])])
-GCC_CHECK_MATH_FUNC([ccosl],[AC_DEFINE([HAVE_CCOSL],[1],[ccosl is available])])
-GCC_CHECK_MATH_FUNC([coshf],[AC_DEFINE([HAVE_COSHF],[1],[coshf is available])])
-GCC_CHECK_MATH_FUNC([cosh],[AC_DEFINE([HAVE_COSH],[1],[cosh is available])])
-GCC_CHECK_MATH_FUNC([coshl],[AC_DEFINE([HAVE_COSHL],[1],[coshl is available])])
-GCC_CHECK_MATH_FUNC([ccoshf],[AC_DEFINE([HAVE_CCOSHF],[1],[ccoshf is available])])
-GCC_CHECK_MATH_FUNC([ccosh],[AC_DEFINE([HAVE_CCOSH],[1],[ccosh is available])])
-GCC_CHECK_MATH_FUNC([ccoshl],[AC_DEFINE([HAVE_CCOSHL],[1],[ccoshl is available])])
-GCC_CHECK_MATH_FUNC([expf],[AC_DEFINE([HAVE_EXPF],[1],[expf is available])])
-GCC_CHECK_MATH_FUNC([exp],[AC_DEFINE([HAVE_EXP],[1],[exp is available])])
-GCC_CHECK_MATH_FUNC([expl],[AC_DEFINE([HAVE_EXPL],[1],[expl is available])])
-GCC_CHECK_MATH_FUNC([cexpf],[AC_DEFINE([HAVE_CEXPF],[1],[cexpf is available])])
-GCC_CHECK_MATH_FUNC([cexp],[AC_DEFINE([HAVE_CEXP],[1],[cexp is available])])
-GCC_CHECK_MATH_FUNC([cexpl],[AC_DEFINE([HAVE_CEXPL],[1],[cexpl is available])])
-GCC_CHECK_MATH_FUNC([fabsf],[AC_DEFINE([HAVE_FABSF],[1],[fabsf is available])])
-GCC_CHECK_MATH_FUNC([fabs],[AC_DEFINE([HAVE_FABS],[1],[fabs is available])])
-GCC_CHECK_MATH_FUNC([fabsl],[AC_DEFINE([HAVE_FABSL],[1],[fabsl is available])])
-GCC_CHECK_MATH_FUNC([cabsf],[AC_DEFINE([HAVE_CABSF],[1],[cabsf is available])])
-GCC_CHECK_MATH_FUNC([cabs],[AC_DEFINE([HAVE_CABS],[1],[cabs is available])])
-GCC_CHECK_MATH_FUNC([cabsl],[AC_DEFINE([HAVE_CABSL],[1],[cabsl is available])])
-GCC_CHECK_MATH_FUNC([floorf],[AC_DEFINE([HAVE_FLOORF],[1],[floorf is available])])
-GCC_CHECK_MATH_FUNC([floor],[AC_DEFINE([HAVE_FLOOR],[1],[floor is available])])
-GCC_CHECK_MATH_FUNC([floorl],[AC_DEFINE([HAVE_FLOORL],[1],[floorl is available])])
-GCC_CHECK_MATH_FUNC([fmodf],[AC_DEFINE([HAVE_FMODF],[1],[fmodf is available])])
-GCC_CHECK_MATH_FUNC([fmod],[AC_DEFINE([HAVE_FMOD],[1],[fmod is available])])
-GCC_CHECK_MATH_FUNC([fmodl],[AC_DEFINE([HAVE_FMODL],[1],[fmodl is available])])
-GCC_CHECK_MATH_FUNC([frexpf],[AC_DEFINE([HAVE_FREXPF],[1],[frexpf is available])])
-GCC_CHECK_MATH_FUNC([frexp],[AC_DEFINE([HAVE_FREXP],[1],[frexp is available])])
-GCC_CHECK_MATH_FUNC([frexpl],[AC_DEFINE([HAVE_FREXPL],[1],[frexpl is available])])
-GCC_CHECK_MATH_FUNC([hypotf],[AC_DEFINE([HAVE_HYPOTF],[1],[hypotf is available])])
-GCC_CHECK_MATH_FUNC([hypot],[AC_DEFINE([HAVE_HYPOT],[1],[hypot is available])])
-GCC_CHECK_MATH_FUNC([hypotl],[AC_DEFINE([HAVE_HYPOTL],[1],[hypotl is available])])
-GCC_CHECK_MATH_FUNC([ldexpf],[AC_DEFINE([HAVE_LDEXPF],[1],[ldexpf is available])])
-GCC_CHECK_MATH_FUNC([ldexp],[AC_DEFINE([HAVE_LDEXP],[1],[ldexp is available])])
-GCC_CHECK_MATH_FUNC([ldexpl],[AC_DEFINE([HAVE_LDEXPL],[1],[ldexpl is available])])
-GCC_CHECK_MATH_FUNC([logf],[AC_DEFINE([HAVE_LOGF],[1],[logf is available])])
-GCC_CHECK_MATH_FUNC([log],[AC_DEFINE([HAVE_LOG],[1],[log is available])])
-GCC_CHECK_MATH_FUNC([logl],[AC_DEFINE([HAVE_LOGL],[1],[logl is available])])
-GCC_CHECK_MATH_FUNC([clogf],[AC_DEFINE([HAVE_CLOGF],[1],[clogf is available])])
-GCC_CHECK_MATH_FUNC([clog],[AC_DEFINE([HAVE_CLOG],[1],[clog is available])])
-GCC_CHECK_MATH_FUNC([clogl],[AC_DEFINE([HAVE_CLOGL],[1],[clogl is available])])
-GCC_CHECK_MATH_FUNC([log10f],[AC_DEFINE([HAVE_LOG10F],[1],[log10f is available])])
-GCC_CHECK_MATH_FUNC([log10],[AC_DEFINE([HAVE_LOG10],[1],[log10 is available])])
-GCC_CHECK_MATH_FUNC([log10l],[AC_DEFINE([HAVE_LOG10L],[1],[log10l is available])])
-GCC_CHECK_MATH_FUNC([clog10f],[AC_DEFINE([HAVE_CLOG10F],[1],[clog10f is available])])
-GCC_CHECK_MATH_FUNC([clog10],[AC_DEFINE([HAVE_CLOG10],[1],[clog10 is available])])
-GCC_CHECK_MATH_FUNC([clog10l],[AC_DEFINE([HAVE_CLOG10L],[1],[clog10l is available])])
-GCC_CHECK_MATH_FUNC([nextafterf],[AC_DEFINE([HAVE_NEXTAFTERF],[1],[nextafterf is available])])
-GCC_CHECK_MATH_FUNC([nextafter],[AC_DEFINE([HAVE_NEXTAFTER],[1],[nextafter is available])])
-GCC_CHECK_MATH_FUNC([nextafterl],[AC_DEFINE([HAVE_NEXTAFTERL],[1],[nextafterl is available])])
-GCC_CHECK_MATH_FUNC([powf],[AC_DEFINE([HAVE_POWF],[1],[powf is available])])
-GCC_CHECK_MATH_FUNC([pow],[AC_DEFINE([HAVE_POW],[1],[pow is available])])
-GCC_CHECK_MATH_FUNC([powl],[AC_DEFINE([HAVE_POWL],[1],[powl is available])])
-GCC_CHECK_MATH_FUNC([cpowf],[AC_DEFINE([HAVE_CPOWF],[1],[cpowf is available])])
-GCC_CHECK_MATH_FUNC([cpow],[AC_DEFINE([HAVE_CPOW],[1],[cpow is available])])
-GCC_CHECK_MATH_FUNC([cpowl],[AC_DEFINE([HAVE_CPOWL],[1],[cpowl is available])])
-GCC_CHECK_MATH_FUNC([roundf],[AC_DEFINE([HAVE_ROUNDF],[1],[roundf is available])])
-GCC_CHECK_MATH_FUNC([round],[AC_DEFINE([HAVE_ROUND],[1],[round is available])])
-GCC_CHECK_MATH_FUNC([roundl],[AC_DEFINE([HAVE_ROUNDL],[1],[roundl is available])])
-GCC_CHECK_MATH_FUNC([lroundf],[AC_DEFINE([HAVE_LROUNDF],[1],[lroundf is available])])
-GCC_CHECK_MATH_FUNC([lround],[AC_DEFINE([HAVE_LROUND],[1],[lround is available])])
-GCC_CHECK_MATH_FUNC([lroundl],[AC_DEFINE([HAVE_LROUNDL],[1],[lroundl is available])])
-GCC_CHECK_MATH_FUNC([llroundf],[AC_DEFINE([HAVE_LLROUNDF],[1],[llroundf is available])])
-GCC_CHECK_MATH_FUNC([llround],[AC_DEFINE([HAVE_LLROUND],[1],[llround is available])])
-GCC_CHECK_MATH_FUNC([llroundl],[AC_DEFINE([HAVE_LLROUNDL],[1],[llroundl is available])])
-GCC_CHECK_MATH_FUNC([scalbnf],[AC_DEFINE([HAVE_SCALBNF],[1],[scalbnf is available])])
-GCC_CHECK_MATH_FUNC([scalbn],[AC_DEFINE([HAVE_SCALBN],[1],[scalbn is available])])
-GCC_CHECK_MATH_FUNC([scalbnl],[AC_DEFINE([HAVE_SCALBNL],[1],[scalbnl is available])])
-GCC_CHECK_MATH_FUNC([sinf],[AC_DEFINE([HAVE_SINF],[1],[sinf is available])])
-GCC_CHECK_MATH_FUNC([sin],[AC_DEFINE([HAVE_SIN],[1],[sin is available])])
-GCC_CHECK_MATH_FUNC([sinl],[AC_DEFINE([HAVE_SINL],[1],[sinl is available])])
-GCC_CHECK_MATH_FUNC([csinf],[AC_DEFINE([HAVE_CSINF],[1],[csinf is available])])
-GCC_CHECK_MATH_FUNC([csin],[AC_DEFINE([HAVE_CSIN],[1],[csin is available])])
-GCC_CHECK_MATH_FUNC([csinl],[AC_DEFINE([HAVE_CSINL],[1],[csinl is available])])
-GCC_CHECK_MATH_FUNC([sinhf],[AC_DEFINE([HAVE_SINHF],[1],[sinhf is available])])
-GCC_CHECK_MATH_FUNC([sinh],[AC_DEFINE([HAVE_SINH],[1],[sinh is available])])
-GCC_CHECK_MATH_FUNC([sinhl],[AC_DEFINE([HAVE_SINHL],[1],[sinhl is available])])
-GCC_CHECK_MATH_FUNC([csinhf],[AC_DEFINE([HAVE_CSINHF],[1],[csinhf is available])])
-GCC_CHECK_MATH_FUNC([csinh],[AC_DEFINE([HAVE_CSINH],[1],[csinh is available])])
-GCC_CHECK_MATH_FUNC([csinhl],[AC_DEFINE([HAVE_CSINHL],[1],[csinhl is available])])
-GCC_CHECK_MATH_FUNC([sqrtf],[AC_DEFINE([HAVE_SQRTF],[1],[sqrtf is available])])
-GCC_CHECK_MATH_FUNC([sqrt],[AC_DEFINE([HAVE_SQRT],[1],[sqrt is available])])
-GCC_CHECK_MATH_FUNC([sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[sqrtl is available])])
-GCC_CHECK_MATH_FUNC([csqrtf],[AC_DEFINE([HAVE_CSQRTF],[1],[csqrtf is available])])
-GCC_CHECK_MATH_FUNC([csqrt],[AC_DEFINE([HAVE_CSQRT],[1],[csqrt is available])])
-GCC_CHECK_MATH_FUNC([csqrtl],[AC_DEFINE([HAVE_CSQRTL],[1],[csqrtl is available])])
-GCC_CHECK_MATH_FUNC([tanf],[AC_DEFINE([HAVE_TANF],[1],[tanf is available])])
-GCC_CHECK_MATH_FUNC([tan],[AC_DEFINE([HAVE_TAN],[1],[tan is available])])
-GCC_CHECK_MATH_FUNC([tanl],[AC_DEFINE([HAVE_TANL],[1],[tanl is available])])
-GCC_CHECK_MATH_FUNC([ctanf],[AC_DEFINE([HAVE_CTANF],[1],[ctanf is available])])
-GCC_CHECK_MATH_FUNC([ctan],[AC_DEFINE([HAVE_CTAN],[1],[ctan is available])])
-GCC_CHECK_MATH_FUNC([ctanl],[AC_DEFINE([HAVE_CTANL],[1],[ctanl is available])])
-GCC_CHECK_MATH_FUNC([tanhf],[AC_DEFINE([HAVE_TANHF],[1],[tanhf is available])])
-GCC_CHECK_MATH_FUNC([tanh],[AC_DEFINE([HAVE_TANH],[1],[tanh is available])])
-GCC_CHECK_MATH_FUNC([tanhl],[AC_DEFINE([HAVE_TANHL],[1],[tanhl is available])])
-GCC_CHECK_MATH_FUNC([ctanhf],[AC_DEFINE([HAVE_CTANHF],[1],[ctanhf is available])])
-GCC_CHECK_MATH_FUNC([ctanh],[AC_DEFINE([HAVE_CTANH],[1],[ctanh is available])])
-GCC_CHECK_MATH_FUNC([ctanhl],[AC_DEFINE([HAVE_CTANHL],[1],[ctanhl is available])])
-GCC_CHECK_MATH_FUNC([truncf],[AC_DEFINE([HAVE_TRUNCF],[1],[truncf is available])])
-GCC_CHECK_MATH_FUNC([trunc],[AC_DEFINE([HAVE_TRUNC],[1],[trunc is available])])
-GCC_CHECK_MATH_FUNC([truncl],[AC_DEFINE([HAVE_TRUNCL],[1],[truncl is available])])
-GCC_CHECK_MATH_FUNC([erff],[AC_DEFINE([HAVE_ERFF],[1],[erff is available])])
-GCC_CHECK_MATH_FUNC([erf],[AC_DEFINE([HAVE_ERF],[1],[erf is available])])
-GCC_CHECK_MATH_FUNC([erfl],[AC_DEFINE([HAVE_ERFL],[1],[erfl is available])])
-GCC_CHECK_MATH_FUNC([erfcf],[AC_DEFINE([HAVE_ERFCF],[1],[erfcf is available])])
-GCC_CHECK_MATH_FUNC([erfc],[AC_DEFINE([HAVE_ERFC],[1],[erfc is available])])
-GCC_CHECK_MATH_FUNC([erfcl],[AC_DEFINE([HAVE_ERFCL],[1],[erfcl is available])])
-GCC_CHECK_MATH_FUNC([j0f],[AC_DEFINE([HAVE_J0F],[1],[j0f is available])])
-GCC_CHECK_MATH_FUNC([j0],[AC_DEFINE([HAVE_J0],[1],[j0 is available])])
-GCC_CHECK_MATH_FUNC([j0l],[AC_DEFINE([HAVE_J0L],[1],[j0l is available])])
-GCC_CHECK_MATH_FUNC([j1f],[AC_DEFINE([HAVE_J1F],[1],[j1f is available])])
-GCC_CHECK_MATH_FUNC([j1],[AC_DEFINE([HAVE_J1],[1],[j1 is available])])
-GCC_CHECK_MATH_FUNC([j1l],[AC_DEFINE([HAVE_J1L],[1],[j1l is available])])
-GCC_CHECK_MATH_FUNC([jnf],[AC_DEFINE([HAVE_JNF],[1],[jnf is available])])
-GCC_CHECK_MATH_FUNC([jn],[AC_DEFINE([HAVE_JN],[1],[jn is available])])
-GCC_CHECK_MATH_FUNC([jnl],[AC_DEFINE([HAVE_JNL],[1],[jnl is available])])
-GCC_CHECK_MATH_FUNC([y0f],[AC_DEFINE([HAVE_Y0F],[1],[y0f is available])])
-GCC_CHECK_MATH_FUNC([y0],[AC_DEFINE([HAVE_Y0],[1],[y0 is available])])
-GCC_CHECK_MATH_FUNC([y0l],[AC_DEFINE([HAVE_Y0L],[1],[y0l is available])])
-GCC_CHECK_MATH_FUNC([y1f],[AC_DEFINE([HAVE_Y1F],[1],[y1f is available])])
-GCC_CHECK_MATH_FUNC([y1],[AC_DEFINE([HAVE_Y1],[1],[y1 is available])])
-GCC_CHECK_MATH_FUNC([y1l],[AC_DEFINE([HAVE_Y1L],[1],[y1l is available])])
-GCC_CHECK_MATH_FUNC([ynf],[AC_DEFINE([HAVE_YNF],[1],[ynf is available])])
-GCC_CHECK_MATH_FUNC([yn],[AC_DEFINE([HAVE_YN],[1],[yn is available])])
-GCC_CHECK_MATH_FUNC([ynl],[AC_DEFINE([HAVE_YNL],[1],[ynl is available])])
-GCC_CHECK_MATH_FUNC([tgamma],[AC_DEFINE([HAVE_TGAMMA],[1],[tgamma is available])])
-GCC_CHECK_MATH_FUNC([tgammaf],[AC_DEFINE([HAVE_TGAMMAF],[1],[tgammaf is available])])
-GCC_CHECK_MATH_FUNC([tgammal],[AC_DEFINE([HAVE_TGAMMAL],[1],[tgammal is available])])
-GCC_CHECK_MATH_FUNC([lgamma],[AC_DEFINE([HAVE_LGAMMA],[1],[lgamma is available])])
-GCC_CHECK_MATH_FUNC([lgammaf],[AC_DEFINE([HAVE_LGAMMAF],[1],[lgammaf is available])])
-GCC_CHECK_MATH_FUNC([lgammal],[AC_DEFINE([HAVE_LGAMMAL],[1],[lgammal is available])])
+GCC_CHECK_MATH_FUNC([acosf])
+GCC_CHECK_MATH_FUNC([acos])
+GCC_CHECK_MATH_FUNC([acosl])
+GCC_CHECK_MATH_FUNC([acoshf])
+GCC_CHECK_MATH_FUNC([acosh])
+GCC_CHECK_MATH_FUNC([acoshl])
+GCC_CHECK_MATH_FUNC([asinf])
+GCC_CHECK_MATH_FUNC([asin])
+GCC_CHECK_MATH_FUNC([asinl])
+GCC_CHECK_MATH_FUNC([asinhf])
+GCC_CHECK_MATH_FUNC([asinh])
+GCC_CHECK_MATH_FUNC([asinhl])
+GCC_CHECK_MATH_FUNC([atan2f])
+GCC_CHECK_MATH_FUNC([atan2])
+GCC_CHECK_MATH_FUNC([atan2l])
+GCC_CHECK_MATH_FUNC([atanf])
+GCC_CHECK_MATH_FUNC([atan])
+GCC_CHECK_MATH_FUNC([atanl])
+GCC_CHECK_MATH_FUNC([atanhf])
+GCC_CHECK_MATH_FUNC([atanh])
+GCC_CHECK_MATH_FUNC([atanhl])
+GCC_CHECK_MATH_FUNC([cargf])
+GCC_CHECK_MATH_FUNC([carg])
+GCC_CHECK_MATH_FUNC([cargl])
+GCC_CHECK_MATH_FUNC([ceilf])
+GCC_CHECK_MATH_FUNC([ceil])
+GCC_CHECK_MATH_FUNC([ceill])
+GCC_CHECK_MATH_FUNC([copysignf])
+GCC_CHECK_MATH_FUNC([copysign])
+GCC_CHECK_MATH_FUNC([copysignl])
+GCC_CHECK_MATH_FUNC([cosf])
+GCC_CHECK_MATH_FUNC([cos])
+GCC_CHECK_MATH_FUNC([cosl])
+GCC_CHECK_MATH_FUNC([ccosf])
+GCC_CHECK_MATH_FUNC([ccos])
+GCC_CHECK_MATH_FUNC([ccosl])
+GCC_CHECK_MATH_FUNC([coshf])
+GCC_CHECK_MATH_FUNC([cosh])
+GCC_CHECK_MATH_FUNC([coshl])
+GCC_CHECK_MATH_FUNC([ccoshf])
+GCC_CHECK_MATH_FUNC([ccosh])
+GCC_CHECK_MATH_FUNC([ccoshl])
+GCC_CHECK_MATH_FUNC([expf])
+GCC_CHECK_MATH_FUNC([exp])
+GCC_CHECK_MATH_FUNC([expl])
+GCC_CHECK_MATH_FUNC([cexpf])
+GCC_CHECK_MATH_FUNC([cexp])
+GCC_CHECK_MATH_FUNC([cexpl])
+GCC_CHECK_MATH_FUNC([fabsf])
+GCC_CHECK_MATH_FUNC([fabs])
+GCC_CHECK_MATH_FUNC([fabsl])
+GCC_CHECK_MATH_FUNC([cabsf])
+GCC_CHECK_MATH_FUNC([cabs])
+GCC_CHECK_MATH_FUNC([cabsl])
+GCC_CHECK_MATH_FUNC([floorf])
+GCC_CHECK_MATH_FUNC([floor])
+GCC_CHECK_MATH_FUNC([floorl])
+GCC_CHECK_MATH_FUNC([fmodf])
+GCC_CHECK_MATH_FUNC([fmod])
+GCC_CHECK_MATH_FUNC([fmodl])
+GCC_CHECK_MATH_FUNC([frexpf])
+GCC_CHECK_MATH_FUNC([frexp])
+GCC_CHECK_MATH_FUNC([frexpl])
+GCC_CHECK_MATH_FUNC([hypotf])
+GCC_CHECK_MATH_FUNC([hypot])
+GCC_CHECK_MATH_FUNC([hypotl])
+GCC_CHECK_MATH_FUNC([ldexpf])
+GCC_CHECK_MATH_FUNC([ldexp])
+GCC_CHECK_MATH_FUNC([ldexpl])
+GCC_CHECK_MATH_FUNC([logf])
+GCC_CHECK_MATH_FUNC([log])
+GCC_CHECK_MATH_FUNC([logl])
+GCC_CHECK_MATH_FUNC([clogf])
+GCC_CHECK_MATH_FUNC([clog])
+GCC_CHECK_MATH_FUNC([clogl])
+GCC_CHECK_MATH_FUNC([log10f])
+GCC_CHECK_MATH_FUNC([log10])
+GCC_CHECK_MATH_FUNC([log10l])
+GCC_CHECK_MATH_FUNC([clog10f])
+GCC_CHECK_MATH_FUNC([clog10])
+GCC_CHECK_MATH_FUNC([clog10l])
+GCC_CHECK_MATH_FUNC([nextafterf])
+GCC_CHECK_MATH_FUNC([nextafter])
+GCC_CHECK_MATH_FUNC([nextafterl])
+GCC_CHECK_MATH_FUNC([powf])
+GCC_CHECK_MATH_FUNC([pow])
+GCC_CHECK_MATH_FUNC([powl])
+GCC_CHECK_MATH_FUNC([cpowf])
+GCC_CHECK_MATH_FUNC([cpow])
+GCC_CHECK_MATH_FUNC([cpowl])
+GCC_CHECK_MATH_FUNC([roundf])
+GCC_CHECK_MATH_FUNC([round])
+GCC_CHECK_MATH_FUNC([roundl])
+GCC_CHECK_MATH_FUNC([lroundf])
+GCC_CHECK_MATH_FUNC([lround])
+GCC_CHECK_MATH_FUNC([lroundl])
+GCC_CHECK_MATH_FUNC([llroundf])
+GCC_CHECK_MATH_FUNC([llround])
+GCC_CHECK_MATH_FUNC([llroundl])
+GCC_CHECK_MATH_FUNC([scalbnf])
+GCC_CHECK_MATH_FUNC([scalbn])
+GCC_CHECK_MATH_FUNC([scalbnl])
+GCC_CHECK_MATH_FUNC([sinf])
+GCC_CHECK_MATH_FUNC([sin])
+GCC_CHECK_MATH_FUNC([sinl])
+GCC_CHECK_MATH_FUNC([csinf])
+GCC_CHECK_MATH_FUNC([csin])
+GCC_CHECK_MATH_FUNC([csinl])
+GCC_CHECK_MATH_FUNC([sinhf])
+GCC_CHECK_MATH_FUNC([sinh])
+GCC_CHECK_MATH_FUNC([sinhl])
+GCC_CHECK_MATH_FUNC([csinhf])
+GCC_CHECK_MATH_FUNC([csinh])
+GCC_CHECK_MATH_FUNC([csinhl])
+GCC_CHECK_MATH_FUNC([sqrtf])
+GCC_CHECK_MATH_FUNC([sqrt])
+GCC_CHECK_MATH_FUNC([sqrtl])
+GCC_CHECK_MATH_FUNC([csqrtf])
+GCC_CHECK_MATH_FUNC([csqrt])
+GCC_CHECK_MATH_FUNC([csqrtl])
+GCC_CHECK_MATH_FUNC([tanf])
+GCC_CHECK_MATH_FUNC([tan])
+GCC_CHECK_MATH_FUNC([tanl])
+GCC_CHECK_MATH_FUNC([ctanf])
+GCC_CHECK_MATH_FUNC([ctan])
+GCC_CHECK_MATH_FUNC([ctanl])
+GCC_CHECK_MATH_FUNC([tanhf])
+GCC_CHECK_MATH_FUNC([tanh])
+GCC_CHECK_MATH_FUNC([tanhl])
+GCC_CHECK_MATH_FUNC([ctanhf])
+GCC_CHECK_MATH_FUNC([ctanh])
+GCC_CHECK_MATH_FUNC([ctanhl])
+GCC_CHECK_MATH_FUNC([truncf])
+GCC_CHECK_MATH_FUNC([trunc])
+GCC_CHECK_MATH_FUNC([truncl])
+GCC_CHECK_MATH_FUNC([erff])
+GCC_CHECK_MATH_FUNC([erf])
+GCC_CHECK_MATH_FUNC([erfl])
+GCC_CHECK_MATH_FUNC([erfcf])
+GCC_CHECK_MATH_FUNC([erfc])
+GCC_CHECK_MATH_FUNC([erfcl])
+GCC_CHECK_MATH_FUNC([j0f])
+GCC_CHECK_MATH_FUNC([j0])
+GCC_CHECK_MATH_FUNC([j0l])
+GCC_CHECK_MATH_FUNC([j1f])
+GCC_CHECK_MATH_FUNC([j1])
+GCC_CHECK_MATH_FUNC([j1l])
+GCC_CHECK_MATH_FUNC([jnf])
+GCC_CHECK_MATH_FUNC([jn])
+GCC_CHECK_MATH_FUNC([jnl])
+GCC_CHECK_MATH_FUNC([y0f])
+GCC_CHECK_MATH_FUNC([y0])
+GCC_CHECK_MATH_FUNC([y0l])
+GCC_CHECK_MATH_FUNC([y1f])
+GCC_CHECK_MATH_FUNC([y1])
+GCC_CHECK_MATH_FUNC([y1l])
+GCC_CHECK_MATH_FUNC([ynf])
+GCC_CHECK_MATH_FUNC([yn])
+GCC_CHECK_MATH_FUNC([ynl])
+GCC_CHECK_MATH_FUNC([tgamma])
+GCC_CHECK_MATH_FUNC([tgammaf])
+GCC_CHECK_MATH_FUNC([tgammal])
+GCC_CHECK_MATH_FUNC([lgamma])
+GCC_CHECK_MATH_FUNC([lgammaf])
+GCC_CHECK_MATH_FUNC([lgammal])
 
 # Check for GFORTRAN_C99_1.1 funcs
-GCC_CHECK_MATH_FUNC([cacos],[AC_DEFINE([HAVE_CACOS],[1],[cacos is available])])
-GCC_CHECK_MATH_FUNC([cacosf],[AC_DEFINE([HAVE_CACOSF],[1],[cacosf is available])])
-GCC_CHECK_MATH_FUNC([cacosh],[AC_DEFINE([HAVE_CACOSH],[1],[cacosh is available])])
-GCC_CHECK_MATH_FUNC([cacoshf],[AC_DEFINE([HAVE_CACOSHF],[1],[cacoshf is available])])
-GCC_CHECK_MATH_FUNC([cacoshl],[AC_DEFINE([HAVE_CACOSHL],[1],[cacoshl is available])])
-GCC_CHECK_MATH_FUNC([cacosl],[AC_DEFINE([HAVE_CACOSL],[1],[cacosl is available])])
-GCC_CHECK_MATH_FUNC([casin],[AC_DEFINE([HAVE_CASIN],[1],[casin is available])])
-GCC_CHECK_MATH_FUNC([casinf],[AC_DEFINE([HAVE_CASINF],[1],[casinf is available])])
-GCC_CHECK_MATH_FUNC([casinh],[AC_DEFINE([HAVE_CASINH],[1],[casinh is available])])
-GCC_CHECK_MATH_FUNC([casinhf],[AC_DEFINE([HAVE_CASINHF],[1],[casinhf is available])])
-GCC_CHECK_MATH_FUNC([casinhl],[AC_DEFINE([HAVE_CASINHL],[1],[casinhl is available])])
-GCC_CHECK_MATH_FUNC([casinl],[AC_DEFINE([HAVE_CASINL],[1],[casinl is available])])
-GCC_CHECK_MATH_FUNC([catan],[AC_DEFINE([HAVE_CATAN],[1],[catan is available])])
-GCC_CHECK_MATH_FUNC([catanf],[AC_DEFINE([HAVE_CATANF],[1],[catanf is available])])
-GCC_CHECK_MATH_FUNC([catanh],[AC_DEFINE([HAVE_CATANH],[1],[catanh is available])])
-GCC_CHECK_MATH_FUNC([catanhf],[AC_DEFINE([HAVE_CATANHF],[1],[catanhf is available])])
-GCC_CHECK_MATH_FUNC([catanhl],[AC_DEFINE([HAVE_CATANHL],[1],[catanhl is available])])
-GCC_CHECK_MATH_FUNC([catanl],[AC_DEFINE([HAVE_CATANL],[1],[catanl is available])])
+GCC_CHECK_MATH_FUNC([cacos])
+GCC_CHECK_MATH_FUNC([cacosf])
+GCC_CHECK_MATH_FUNC([cacosh])
+GCC_CHECK_MATH_FUNC([cacoshf])
+GCC_CHECK_MATH_FUNC([cacoshl])
+GCC_CHECK_MATH_FUNC([cacosl])
+GCC_CHECK_MATH_FUNC([casin])
+GCC_CHECK_MATH_FUNC([casinf])
+GCC_CHECK_MATH_FUNC([casinh])
+GCC_CHECK_MATH_FUNC([casinhf])
+GCC_CHECK_MATH_FUNC([casinhl])
+GCC_CHECK_MATH_FUNC([casinl])
+GCC_CHECK_MATH_FUNC([catan])
+GCC_CHECK_MATH_FUNC([catanf])
+GCC_CHECK_MATH_FUNC([catanh])
+GCC_CHECK_MATH_FUNC([catanhf])
+GCC_CHECK_MATH_FUNC([catanhl])
+GCC_CHECK_MATH_FUNC([catanl])
 
 # On AIX, clog is present in libm as __clog
 AC_CHECK_LIB([m],[__clog],[AC_DEFINE([HAVE_CLOG],[1],[libm includes clog])])