acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT): Check for cabs, cabsf, and cabsl, too.

* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT): Check
        for cabs, cabsf, and cabsl, too.
        * aclocal.m4: Regenerated.
        * config.h.in: Likewise.
        * configure: Likewise.
        * libmath/Makefile.am (libmath_la_SOURCES): Remove cabs.c and
        cabsf.c.
        * libmath/Makefile.in: Regenerated.
        * libmath/complex-stub.h (cabs): Don't declare if the system
        already provides this function.
        (cabsf): Likewise.
        (cabsl): Likewise.
        * src/complex.cc (abs): Directly use `hypot' since we can't call
        cabs on IRIX.

From-SVN: r37145
This commit is contained in:
Mark Mitchell 2000-10-30 21:30:30 +00:00 committed by Mark Mitchell
parent 747dcaf1dd
commit b4b2a48720
9 changed files with 202 additions and 113 deletions

View File

@ -1,3 +1,20 @@
2000-10-30 Mark Mitchell <mark@codesourcery.com>
* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT): Check
for cabs, cabsf, and cabsl, too.
* aclocal.m4: Regenerated.
* config.h.in: Likewise.
* configure: Likewise.
* libmath/Makefile.am (libmath_la_SOURCES): Remove cabs.c and
cabsf.c.
* libmath/Makefile.in: Regenerated.
* libmath/complex-stub.h (cabs): Don't declare if the system
already provides this function.
(cabsf): Likewise.
(cabsl): Likewise.
* src/complex.cc (abs): Directly use `hypot' since we can't call
cabs on IRIX.
2000-10-30 Joseph S. Myers <jsm28@cam.ac.uk>
* acinclude.m4: Update URL on egcs.cygnus.com to point to

View File

@ -725,9 +725,11 @@ dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf c_log c_logf \
clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt csqrtf \
ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf copysignf)
AC_CHECK_LIB(m, main)
AC_REPLACE_MATHFUNCS(cabs cabsf ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf)
dnl Compile the long double complex functions only if the function
dnl provides the non-complex long double functions that are needed.
@ -737,7 +739,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
AC_REPLACE_MATHFUNCS(cabsl ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
fi

View File

@ -737,9 +737,11 @@ dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf c_log c_logf \
clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt csqrtf \
ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf copysignf)
AC_CHECK_LIB(m, main)
AC_REPLACE_MATHFUNCS(cabs cabsf ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf)
dnl Compile the long double complex functions only if the function
dnl provides the non-complex long double functions that are needed.
@ -749,7 +751,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
AC_REPLACE_MATHFUNCS(cabsl ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
fi

View File

@ -291,6 +291,15 @@
/* Define if you have the c_logl function. */
#undef HAVE_C_LOGL
/* Define if you have the cabs function. */
#undef HAVE_CABS
/* Define if you have the cabsf function. */
#undef HAVE_CABSF
/* Define if you have the cabsl function. */
#undef HAVE_CABSL
/* Define if you have the carg function. */
#undef HAVE_CARG
@ -651,6 +660,9 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
/* Name of package */
#undef PACKAGE

244
libstdc++-v3/configure vendored
View File

@ -17068,17 +17068,61 @@ else
fi
done
for ac_func in ccos ccosf ccosh ccoshf cexp cexpf c_log c_logf \
clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt csqrtf \
ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf copysignf
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
echo "configure:17073: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 17081 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:17088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lm $LIBS"
else
echo "$ac_t""no" 1>&6
fi
for ac_func in cabs cabsf ccos ccosf ccosh ccoshf cexp cexpf \
c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
copysignf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17077: checking for $ac_func" >&5
echo "configure:17121: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17082 "configure"
#line 17126 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -17101,7 +17145,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:17105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:17149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -17132,16 +17176,16 @@ done
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
for ac_func in ccoshl ccosl cexpl cpowl csinhl csinl \
for ac_func in cabsl ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17140: checking for $ac_func" >&5
echo "configure:17184: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17145 "configure"
#line 17189 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -17164,7 +17208,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:17168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:17212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -17198,7 +17242,7 @@ done
echo $ac_n "checking for GNU C++ __complex__ support""... $ac_c" 1>&6
echo "configure:17202: checking for GNU C++ __complex__ support" >&5
echo "configure:17246: checking for GNU C++ __complex__ support" >&5
if eval "test \"`echo '$''{'glibcpp_cv_complex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -17212,7 +17256,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 17216 "configure"
#line 17260 "configure"
#include "confdefs.h"
struct dcomplex { __complex__ double x; }; \
dcomplex f(const dcomplex& x) { return dcomplex(x); }
@ -17221,7 +17265,7 @@ int main() {
dcomplex x; f(x);
; return 0; }
EOF
if { (eval echo configure:17225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_complex=ok
else
@ -17251,7 +17295,7 @@ EOF
fi
echo $ac_n "checking for GNU C++ __complex__ float support""... $ac_c" 1>&6
echo "configure:17255: checking for GNU C++ __complex__ float support" >&5
echo "configure:17299: checking for GNU C++ __complex__ float support" >&5
if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -17284,14 +17328,14 @@ cross_compiling=$ac_cv_prog_cxx_cross
};
EOB
cat > conftest.$ac_ext <<EOF
#line 17288 "configure"
#line 17332 "configure"
#include "confdefs.h"
#include "conftest.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:17295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_float_complex=ok
else
@ -17325,17 +17369,17 @@ EOF
ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
echo "configure:17329: checking for wchar.h" >&5
echo "configure:17373: checking for wchar.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17334 "configure"
#line 17378 "configure"
#include "confdefs.h"
#include <wchar.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:17339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:17383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -17359,17 +17403,17 @@ fi
ac_safe=`echo "wctype.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for wctype.h""... $ac_c" 1>&6
echo "configure:17363: checking for wctype.h" >&5
echo "configure:17407: checking for wctype.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17368 "configure"
#line 17412 "configure"
#include "confdefs.h"
#include <wctype.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:17373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:17417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -17395,16 +17439,16 @@ fi
if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
echo "configure:17399: checking for mbstate_t" >&5
echo "configure:17443: checking for mbstate_t" >&5
cat > conftest.$ac_ext <<EOF
#line 17401 "configure"
#line 17445 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t teststate;
; return 0; }
EOF
if { (eval echo configure:17408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_native_mbstatet=yes
else
@ -17423,16 +17467,16 @@ EOF
fi
echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
echo "configure:17427: checking for WCHAR_MIN and WCHAR_MAX" >&5
echo "configure:17471: checking for WCHAR_MIN and WCHAR_MAX" >&5
cat > conftest.$ac_ext <<EOF
#line 17429 "configure"
#line 17473 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
int i = WCHAR_MIN; int j = WCHAR_MAX;
; return 0; }
EOF
if { (eval echo configure:17436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
has_wchar_minmax=yes
else
@ -17445,9 +17489,9 @@ rm -f conftest*
echo "$ac_t""$has_wchar_minmax" 1>&6
echo $ac_n "checking for WEOF""... $ac_c" 1>&6
echo "configure:17449: checking for WEOF" >&5
echo "configure:17493: checking for WEOF" >&5
cat > conftest.$ac_ext <<EOF
#line 17451 "configure"
#line 17495 "configure"
#include "confdefs.h"
#include <wchar.h>
@ -17456,7 +17500,7 @@ int main() {
wint_t i = WEOF;
; return 0; }
EOF
if { (eval echo configure:17460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
has_weof=yes
else
@ -17472,12 +17516,12 @@ rm -f conftest*
wcsrtombs mbsrtowcs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17476: checking for $ac_func" >&5
echo "configure:17520: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17481 "configure"
#line 17525 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -17500,7 +17544,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:17504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:17548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -17527,7 +17571,7 @@ done
echo $ac_n "checking for ISO C9X wchar_t support""... $ac_c" 1>&6
echo "configure:17531: checking for ISO C9X wchar_t support" >&5
echo "configure:17575: checking for ISO C9X wchar_t support" >&5
if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes \
&& test x"$ac_wfuncs" = xyes; then
ac_isoC9X_wchar_t=yes
@ -17538,17 +17582,17 @@ echo "configure:17531: checking for ISO C9X wchar_t support" >&5
ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
echo "configure:17542: checking for iconv.h" >&5
echo "configure:17586: checking for iconv.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17547 "configure"
#line 17591 "configure"
#include "confdefs.h"
#include <iconv.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:17552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:17596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -17572,17 +17616,17 @@ fi
ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
echo "configure:17576: checking for langinfo.h" >&5
echo "configure:17620: checking for langinfo.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17581 "configure"
#line 17625 "configure"
#include "confdefs.h"
#include <langinfo.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:17586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:17630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -17607,12 +17651,12 @@ fi
for ac_func in iconv_open iconv_close iconv nl_langinfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17611: checking for $ac_func" >&5
echo "configure:17655: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17616 "configure"
#line 17660 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -17635,7 +17679,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:17639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:17683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -17663,7 +17707,7 @@ done
echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
echo "configure:17667: checking for XPG2 wchar_t support" >&5
echo "configure:17711: checking for XPG2 wchar_t support" >&5
if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes \
&& test x"$ac_XPG2funcs" = xyes; then
ac_XPG2_wchar_t=yes
@ -17673,7 +17717,7 @@ echo "configure:17667: checking for XPG2 wchar_t support" >&5
echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
echo "configure:17677: checking for enabled wchar_t specializations" >&5
echo "configure:17721: checking for enabled wchar_t specializations" >&5
if test x"$ac_isoC9X_wchar_t" = xyes \
&& test x"$ac_XPG2_wchar_t" = xyes; then
libinst_wstring_la="libinst-wstring.la"
@ -17703,17 +17747,17 @@ EOF
ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
echo "configure:17707: checking for ctype.h" >&5
echo "configure:17751: checking for ctype.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 17712 "configure"
#line 17756 "configure"
#include "confdefs.h"
#include <ctype.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:17717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:17761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -17734,9 +17778,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
ctype_default=yes
echo $ac_n "checking <ctype> for GNU/Linux""... $ac_c" 1>&6
echo "configure:17738: checking <ctype> for GNU/Linux" >&5
echo "configure:17782: checking <ctype> for GNU/Linux" >&5
cat > conftest.$ac_ext <<EOF
#line 17740 "configure"
#line 17784 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17747,7 +17791,7 @@ int
+ __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];}
; return 0; }
EOF
if { (eval echo configure:17751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_linux=yes
@ -17766,9 +17810,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for FreeBSD 4.0""... $ac_c" 1>&6
echo "configure:17770: checking <ctype> for FreeBSD 4.0" >&5
echo "configure:17814: checking <ctype> for FreeBSD 4.0" >&5
cat > conftest.$ac_ext <<EOF
#line 17772 "configure"
#line 17816 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17778,7 +17822,7 @@ int
+ _CTYPE_D + _CTYPE_P + _CTYPE_X + _CTYPE_G ;}
; return 0; }
EOF
if { (eval echo configure:17782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_bsd=yes
@ -17798,9 +17842,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for FreeBSD 3.4""... $ac_c" 1>&6
echo "configure:17802: checking <ctype> for FreeBSD 3.4" >&5
echo "configure:17846: checking <ctype> for FreeBSD 3.4" >&5
cat > conftest.$ac_ext <<EOF
#line 17804 "configure"
#line 17848 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17810,7 +17854,7 @@ int
+ _D + _P + _X + _G + __istype (a, 0);}
; return 0; }
EOF
if { (eval echo configure:17814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_freebsd34=yes
@ -17830,9 +17874,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for Solaris 2.6,7,8""... $ac_c" 1>&6
echo "configure:17834: checking <ctype> for Solaris 2.6,7,8" >&5
echo "configure:17878: checking <ctype> for Solaris 2.6,7,8" >&5
cat > conftest.$ac_ext <<EOF
#line 17836 "configure"
#line 17880 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17843,7 +17887,7 @@ int
+ __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];}
; return 0; }
EOF
if { (eval echo configure:17847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris=yes
@ -17858,7 +17902,7 @@ rm -f conftest*
if test $ctype_solaris = "yes"; then
echo $ac_n "checking for version""... $ac_c" 1>&6
echo "configure:17862: checking for version" >&5
echo "configure:17906: checking for version" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
@ -17867,14 +17911,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 17871 "configure"
#line 17915 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;
; return 0; }
EOF
if { (eval echo configure:17878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris26=yes
@ -17906,9 +17950,9 @@ cross_compiling=$ac_cv_prog_cc_cross
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for Solaris 2.5.1""... $ac_c" 1>&6
echo "configure:17910: checking <ctype> for Solaris 2.5.1" >&5
echo "configure:17954: checking <ctype> for Solaris 2.5.1" >&5
cat > conftest.$ac_ext <<EOF
#line 17912 "configure"
#line 17956 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17918,7 +17962,7 @@ int
+ __ctype[a];}
; return 0; }
EOF
if { (eval echo configure:17922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris25=yes
@ -17938,9 +17982,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for AIX""... $ac_c" 1>&6
echo "configure:17942: checking <ctype> for AIX" >&5
echo "configure:17986: checking <ctype> for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 17944 "configure"
#line 17988 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17951,7 +17995,7 @@ int
+ _VALC('a') + _IS('c', 0);}
; return 0; }
EOF
if { (eval echo configure:17955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:17999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_aix=yes
@ -17971,9 +18015,9 @@ rm -f conftest*
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for newlib""... $ac_c" 1>&6
echo "configure:17975: checking <ctype> for newlib" >&5
echo "configure:18019: checking <ctype> for newlib" >&5
cat > conftest.$ac_ext <<EOF
#line 17977 "configure"
#line 18021 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
@ -17983,7 +18027,7 @@ int
+ _ctype_[a];}
; return 0; }
EOF
if { (eval echo configure:17987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:18031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_newlib=yes
@ -18023,12 +18067,12 @@ fi
for ac_func in strtof
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18027: checking for $ac_func" >&5
echo "configure:18071: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 18032 "configure"
#line 18076 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -18051,7 +18095,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:18055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:18099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -18077,7 +18121,7 @@ done
echo $ac_n "checking for strtold declaration""... $ac_c" 1>&6
echo "configure:18081: checking for strtold declaration" >&5
echo "configure:18125: checking for strtold declaration" >&5
if eval "test \"`echo '$''{'glibcpp_cv_func_strtold_use'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -18091,14 +18135,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 18095 "configure"
#line 18139 "configure"
#include "confdefs.h"
#include <stdlib.h>
int main() {
strtold(0, 0);
; return 0; }
EOF
if { (eval echo configure:18102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:18146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_func_strtold_use=yes
else
@ -18123,12 +18167,12 @@ fi
for ac_func in strtold
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18127: checking for $ac_func" >&5
echo "configure:18171: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 18132 "configure"
#line 18176 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -18151,7 +18195,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:18155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:18199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -18185,17 +18229,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:18189: checking for $ac_hdr" >&5
echo "configure:18233: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 18194 "configure"
#line 18238 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:18199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:18243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -18224,12 +18268,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:18228: checking for $ac_func" >&5
echo "configure:18272: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 18233 "configure"
#line 18277 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -18252,7 +18296,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:18256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:18300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -18277,7 +18321,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:18281: checking for working mmap" >&5
echo "configure:18325: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -18285,7 +18329,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
#line 18289 "configure"
#line 18333 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@ -18425,7 +18469,7 @@ main()
}
EOF
if { (eval echo configure:18429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:18473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@ -18451,17 +18495,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:18455: checking for $ac_hdr" >&5
echo "configure:18499: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 18460 "configure"
#line 18504 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:18465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:18509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -18575,19 +18619,19 @@ rm -f confcache
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:18579: checking for LC_MESSAGES" >&5
echo "configure:18623: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 18584 "configure"
#line 18628 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
if { (eval echo configure:18591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:18635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_val_LC_MESSAGES=yes
else
@ -18624,14 +18668,14 @@ INTERFACE=v3
# Check for the interface version number for specifying where header
# files are installed, if a version number is provided.
echo $ac_n "checking for interface version number""... $ac_c" 1>&6
echo "configure:18628: checking for interface version number" >&5
echo "configure:18672: checking for interface version number" >&5
libstdcxx_interface=$INTERFACE
echo "$ac_t""$libstdcxx_interface" 1>&6
# Process the option --with-gxx-include-dir=<path to include-files directory>
echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6
echo "configure:18635: checking for --with-gxx-include-dir" >&5
echo "configure:18679: checking for --with-gxx-include-dir" >&5
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
@ -18665,7 +18709,7 @@ fi
# Process the option "--enable-version-specific-runtime-libs"
echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
echo "configure:18669: checking for --enable-version-specific-runtime-libs" >&5
echo "configure:18713: checking for --enable-version-specific-runtime-libs" >&5
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
if test "${enable_version_specific_runtime_libs+set}" = set; then
enableval="$enable_version_specific_runtime_libs"

View File

@ -46,7 +46,7 @@ libmath_la_LIBADD = \
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = \
signbit.c signbitf.c cabs.c cabsf.c
signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@

View File

@ -120,7 +120,7 @@ libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUB
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = signbit.c signbitf.c cabs.c cabsf.c
libmath_la_SOURCES = signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
@ -147,7 +147,7 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libmath_la_LDFLAGS =
libmath_la_OBJECTS = signbit.lo signbitf.lo cabs.lo cabsf.lo
libmath_la_OBJECTS = signbit.lo signbitf.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

View File

@ -78,9 +78,17 @@ double carg (__complex__ double x);
float cargf (__complex__ float x);
long double cargl (__complex__ long double x);
/* Some systems (like IRIX 6.5) already define these functions in
<math.h>. */
#ifndef _GLIBCPP_HAVE_CABS
double cabs (__complex__ double x);
#endif /* defined(_GLIBCPP_HAVE_CABS) */
#ifndef _GLIBCPP_HAVE_CABSF
float cabsf (__complex__ float x);
#endif /* defined(_GLIBCPP_HAVE_CABSF) */
#ifndef _GLIBCPP_HAVE_CABSL
long double cabsl (__complex__ long double x);
#endif /* defined(_GLIBCPP_HAVE_CABSL) */
#endif

View File

@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- complex number classes.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -48,7 +48,11 @@ namespace std
template<>
FLT
abs(const complex<FLT>& __x)
{ return cabs(__x._M_value); }
{
// We don't use cabs here because some systems (IRIX 6.5, for
// example) define their own incompatible version.
return hypot (__real__ __x._M_value, __imag__ __x._M_value);
}
template<>
FLT