AC_CANONICAL_SYSTEM
ACX_NONCANONICAL_TARGET
+AM_ENABLE_MULTILIB(, ..)
+
target_alias=${target_alias-$host_alias}
AC_SUBST(target_alias)
AC_SUBST(enable_static)
AM_MAINTAINER_MODE
-AM_ENABLE_MULTILIB(, ..)
AC_LANG_C
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
AC_SUBST(toolexeclibdir)
AC_CHECK_HEADERS(fenv.h langinfo.h locale.h wchar.h wctype.h limits.h ctype.h printf.h errno.h)
+LIBQUAD_CHECK_MATH_H_SIGNGAM
# If available, sqrtl and cbrtl speed up the calculation -
# but they are not required
AC_CHECK_LIB([m],[feupdateenv],[AC_DEFINE([HAVE_FEUPDATEENV],[1],[libm includes feupdateenv])])
AC_CHECK_LIB([m],[fesetenv],[AC_DEFINE([HAVE_FESETENV],[1],[libm includes fesetenv])])
AC_CHECK_LIB([m],[fetestexcept],[AC_DEFINE([HAVE_FETESTEXCEPT],[1],[libm includes fetestexcept])])
+ AC_CHECK_FUNCS(strtoull)
else
if test "x$ac_cv_lib_m_sqrtl" = x""yes; then
AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])
# Check for symbol versioning (copied from libssp).
AC_MSG_CHECKING([whether symbol versioning is supported])
-if test x$gcc_no_link = xyes; then
- # If we cannot link, we cannot build shared libraries, so do not use
- # symbol versioning.
- quadmath_use_symver=no
-else
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map"
- cat > conftest.map <<EOF
+AC_ARG_ENABLE(symvers,
+AS_HELP_STRING([--disable-symvers],
+ [disable symbol versioning for libquadmath]),
+quadmath_use_symver=$enableval,
+quadmath_use_symver=yes)
+if test "x$quadmath_use_symver" != xno; then
+ if test x$gcc_no_link = xyes; then
+ # If we cannot link, we cannot build shared libraries, so do not use
+ # symbol versioning.
+ quadmath_use_symver=no
+ else
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map"
+ cat > conftest.map <<EOF
FOO_1.0 {
global: *foo*; bar; local: *;
};
EOF
- AC_TRY_LINK([int foo;],[],[quadmath_use_symver=gnu],[quadmath_use_symver=no])
- if test x$quadmath_use_symver = xno; then
- case "$target_os" in
- solaris2*)
- LDFLAGS="$save_LDFLAGS"
- LDFLAGS="$LDFLAGS -fPIC -shared -Wl,-M,./conftest.map"
- # Sun ld cannot handle wildcards and treats all entries as undefined.
- cat > conftest.map <<EOF
+ AC_TRY_LINK([int foo;],[],[quadmath_use_symver=gnu],[quadmath_use_symver=no])
+ if test x$quadmath_use_symver = xno; then
+ case "$target_os" in
+ solaris2*)
+ LDFLAGS="$save_LDFLAGS"
+ LDFLAGS="$LDFLAGS -fPIC -shared -Wl,-M,./conftest.map"
+ # Sun ld cannot handle wildcards and treats all entries as undefined.
+ cat > conftest.map <<EOF
FOO_1.0 {
global: foo; local: *;
};
EOF
- AC_TRY_LINK([int foo;],[],[quadmath_use_symver=sun],[quadmath_use_symver=no])
- ;;
- esac
+ AC_TRY_LINK([int foo;],[],[quadmath_use_symver=sun],[quadmath_use_symver=no])
+ ;;
+ esac
+ fi
+ LDFLAGS="$save_LDFLAGS"
fi
- LDFLAGS="$save_LDFLAGS"
fi
AC_MSG_RESULT($quadmath_use_symver)
AM_CONDITIONAL(LIBQUAD_USE_SYMVER, [test "x$quadmath_use_symver" != xno])