initial commit
[glibc.git] / sysdeps / powerpc / powerpc32 / fpu / configure.ac
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/powerpc/powerpc32/fpu.
3
4 # Test whether integer to floating point conversions use fcfid.
5 AC_CACHE_CHECK([for fcfid use], [libc_cv_ppc_fcfid], [dnl
6 echo 'double foo (int x) { return (double) x; }' > conftest.c
7 libc_cv_ppc_fcfid=no
8 if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
9 changequote(,)dnl
10 if grep '[ ]fcfid' conftest.s > /dev/null 2>&1; then
11 libc_cv_ppc_fcfid=yes
12 fi
13 changequote([,])dnl
14 fi
15 rm -rf conftest*])
16 if test $libc_cv_ppc_fcfid = yes; then
17 AC_DEFINE([HAVE_PPC_FCFID])
18 fi
19
20 # Test whether floating point to long long conversions use fctidz.
21 AC_CACHE_CHECK([for fctidz use], [libc_cv_ppc_fctidz], [dnl
22 echo 'long long int foo (double x) { return (long long int) x; }' > conftest.c
23 libc_cv_ppc_fctidz=no
24 if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
25 changequote(,)dnl
26 if grep '[ ]fctidz' conftest.s > /dev/null 2>&1; then
27 libc_cv_ppc_fctidz=yes
28 fi
29 changequote([,])dnl
30 fi
31 rm -rf conftest*])
32 if test $libc_cv_ppc_fctidz = yes; then
33 AC_DEFINE([HAVE_PPC_FCTIDZ])
34 fi