X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Fconfigure.in;h=ab3bdca05a7c058e19ef71782f3dbec0c0823d1c;hb=7465ab7167618322165e069782d7a03462f8218a;hp=e4c03f55b179fcf167e74985dd1d7e6a05fafe80;hpb=985550e9a89b11e17b07a4582bdc30ceefcab064;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libstdc++-v3/configure.in b/libstdc++-v3/configure.in index e4c03f55b17..ab3bdca05a7 100644 --- a/libstdc++-v3/configure.in +++ b/libstdc++-v3/configure.in @@ -2,145 +2,267 @@ # aclocal, autoconf, autoheader, automake AC_PREREQ(2.13) -AC_INIT(src/complex.cc) -AC_CONFIG_AUX_DIR(..) - -# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc. +AC_INIT(src/ios.cc) + +PACKAGE=libstdc++ +AC_SUBST(PACKAGE) +# For typical GNU versioning info, format is MAJOR.MINOR.MICRO +release_VERSION=3.1.0 +AC_SUBST(release_VERSION) +# For libtool versioning info, format is CURRENT:REVISION:AGE +libtool_VERSION=4:0:0 +AC_SUBST(libtool_VERSION) + +# Gets build, host, target, *_vendor, *_cpu, *_os, etc. +# AC 2.50 sets target_alias iff the user specified --target, but we use it +# everywhere, so we set it here just to be sure. AC_CANONICAL_SYSTEM +target_alias=${target_alias-$target} +AC_SUBST(target_alias) -# We use these options to decide which functions to include. -AC_ARG_WITH(target-subdir, -[ --with-target-subdir=SUBDIR - configuring in a subdirectory]) -AC_ARG_WITH(cross-host, -[ --with-cross-host=HOST configuring with a cross compiler]) +AM_INIT_AUTOMAKE($PACKAGE, $release_VERSION) +AM_CONFIG_HEADER(config.h) +# Runs configure.host and configure.target, as well as finds CC, CXX +# and assorted other critical bits. Have to run this before the +# GLIBCPP_ENABLE_* macros below. GLIBCPP_CONFIGURE(.) + AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL -GLIBCPP_CHECK_GNU_MAKE - if test "x$_cv_gnu_make_command" = "x"; then - AC_MSG_ERROR([GNU make not found. Please install it or correct your path.]) - fi -AM_CONFIG_HEADER(config.h) +AC_SUBST(enable_shared) +AC_SUBST(enable_static) # Check for c++ or library specific bits that don't require linking. -GLIBCPP_CHECK_COMPILER_VERSION -GLIBCPP_CHECK_CPU -GLIBCPP_CHECK_OS - -AC_CACHE_SAVE +#GLIBCPP_CHECK_COMPILER_VERSION +GLIBCPP_CHECK_GNU_MAKE -# Enable all the crazy c++ stuff. +# Enable all the variable C++ stuff. C_MBCHAR must come early. GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE) GLIBCPP_ENABLE_CSTDIO -GLIBCPP_ENABLE_LONG_LONG(yes) -GLIBCPP_ENABLE_SHADOW(no) +GLIBCPP_ENABLE_CLOCALE +GLIBCPP_ENABLE_C_MBCHAR([yes]) +GLIBCPP_ENABLE_C99([yes]) +GLIBCPP_ENABLE_LONG_LONG([yes]) +GLIBCPP_ENABLE_CHEADERS([c_std]) GLIBCPP_ENABLE_THREADS -GLIBCPP_ENABLE_ATOMICITY GLIBCPP_ENABLE_CXX_FLAGS([none]) +GLIBCPP_ENABLE_SJLJ_EXCEPTIONS +GLIBCPP_ENABLE_CONCEPT_CHECKS + +if test -n "$with_cross_host" || test x"$build" != x"$host"; then -if test -n "$with_cross_host"; then + # This lets us hard-code the functionality we know + # we'll have in the cross target environment. "Let" is a + # sugar-coated word placed on an especially dull and tedious hack, actually. + # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros + # that involve linking can't be used: + # "cannot open sim-crt0.o" + # "cannot open crt0.o" + # etc. All this is because there currently exists no unified, + # consistent way for top level CC information to be passed down + # to target directories: newlib includes, newlib linking info, + # libgloss versus newlib crt0.o, etc. When all of this is done, all + # of this hokey, excessive AC_DEFINE junk for crosses can be removed. - # We are being configured with a cross compiler. AC_REPLACE_FUNCS - # may not work correctly, because the compiler may not be able to - # link executables. + # We are being configured with some form of cross compiler. + GLIBCPP_IS_CROSS_COMPILING=1 - xcompiling=1 - NATIVE=no # If Canadian cross, then don't pick up tools from the build # directory. - if test "$build" != "$with_cross_host"; then + if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then CANADIAN=yes - NULL_TARGET=yes else CANADIAN=no - NULL_TARGET=no fi + # Construct crosses by hand, eliminating bits that need ld... + # GLIBCPP_CHECK_COMPILER_FEATURES + # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT + # GLIBCPP_CHECK_MATH_SUPPORT + case "$target_alias" in - *-wince-*) - # Configure for Microsoft Windows CE, or whatever they are - # currently calling it. - AC_DEFINE(HAVE_FLOAT_H) - - AC_DEFINE(HAVE__FINITE) - AC_DEFINE(HAVE__ISNAN) - AC_DEFINE(HAVE__COPYSIGN) - AC_DEFINE(HAVE__FPCLASS) - AC_DEFINE(HAVE_MODF) - - ctype_include_dir="config/os/wince" - AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h, bits/ctype_base.h) - AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \ - bits/ctype_inline.h) - AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \ - bits/ctype_noninline.h) - - - AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T) - - AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX) - AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX) - ;; + *-linux*) + # Check for available headers. + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ + fp.h locale.h float.h inttypes.h]) + SECTION_FLAGS='-ffunction-sections -fdata-sections' + AC_SUBST(SECTION_FLAGS) + GLIBCPP_CHECK_LINKER_FEATURES + GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT + GLIBCPP_CHECK_WCHAR_T_SUPPORT + os_include_dir="config/os/gnu-linux" + AC_DEFINE(HAVE_COPYSIGN) + AC_DEFINE(HAVE_COPYSIGNF) + AC_DEFINE(HAVE_FINITEF) + AC_DEFINE(HAVE_FREXPF) + AC_DEFINE(HAVE_HYPOTF) + AC_DEFINE(HAVE_SINCOS) + AC_DEFINE(HAVE_SINCOSF) + if test x"long_double_math_on_this_cpu" = x"yes"; then + AC_DEFINE(HAVE_HYPOTL) + fi + ;; + *-hpux*) + # Check for available headers. + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ + fp.h locale.h float.h inttypes.h]) + SECTION_FLAGS='-ffunction-sections -fdata-sections' + AC_SUBST(SECTION_FLAGS) + GLIBCPP_CHECK_LINKER_FEATURES + GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT + GLIBCPP_CHECK_WCHAR_T_SUPPORT + os_include_dir="config/os/hpux" + AC_DEFINE(HAVE_COPYSIGN) + AC_DEFINE(HAVE_COPYSIGNF) + AC_DEFINE(HAVE_FINITEF) + AC_DEFINE(HAVE_FREXPF) + AC_DEFINE(HAVE_HYPOT) + AC_DEFINE(HAVE_SINCOS) + AC_DEFINE(HAVE_SINCOSF) + ;; + *-netbsd*) + # Check for available headers. + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ + fp.h locale.h float.h inttypes.h]) + SECTION_FLAGS='-ffunction-sections -fdata-sections' + AC_SUBST(SECTION_FLAGS) + GLIBCPP_CHECK_LINKER_FEATURES + GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT + GLIBCPP_CHECK_WCHAR_T_SUPPORT + os_include_dir="config/os/bsd/netbsd" + AC_DEFINE(HAVE_COPYSIGN) + AC_DEFINE(HAVE_COPYSIGNF) + AC_DEFINE(HAVE_FINITEF) + AC_DEFINE(HAVE_FREXPF) + AC_DEFINE(HAVE_HYPOTF) + ;; *) - # We assume newlib. This lets us hard-code the functions we know - # we'll have. - AC_DEFINE(HAVE_FINITE) - AC_DEFINE(HAVE_ISNAN) - AC_DEFINE(HAVE_ISNANF) - AC_DEFINE(HAVE_ISINF) - AC_DEFINE(HAVE_ISINFF) - - ctype_include_dir="config/os/newlib" - AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h, bits/ctype_base.h) - AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \ - bits/ctype_inline.h) - AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \ - bits/ctype_noninline.h) - - AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T) - - AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX) - AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX) - # need to ceck for faster f versions of math functions, ie sinf? - ;; + os_include_dir="config/os/newlib" + AC_DEFINE(HAVE_HYPOT) + ;; esac + + # GLIBCPP_CHECK_STDLIB_SUPPORT + AC_DEFINE(HAVE_STRTOF) + AC_DEFINE(HAVE_STRTOLD) + # AC_FUNC_MMAP + AC_DEFINE(HAVE_MMAP) + + AC_DEFINE(HAVE_ACOSF) + AC_DEFINE(HAVE_ASINF) + AC_DEFINE(HAVE_ATAN2F) + AC_DEFINE(HAVE_ATANF) + AC_DEFINE(HAVE_CEILF) + AC_DEFINE(HAVE_COPYSIGN) + AC_DEFINE(HAVE_COPYSIGNF) + AC_DEFINE(HAVE_COSF) + AC_DEFINE(HAVE_COSHF) + AC_DEFINE(HAVE_EXPF) + AC_DEFINE(HAVE_FABSF) + AC_DEFINE(HAVE_FINITE) + AC_DEFINE(HAVE_FINITEF) + AC_DEFINE(HAVE_FLOORF) + AC_DEFINE(HAVE_FMODF) + AC_DEFINE(HAVE_FREXPF) + AC_DEFINE(HAVE_ISINF) + AC_DEFINE(HAVE_ISINFF) + AC_DEFINE(HAVE_ISNAN) + AC_DEFINE(HAVE_ISNANF) + AC_DEFINE(HAVE_LDEXPF) + AC_DEFINE(HAVE_LOG10F) + AC_DEFINE(HAVE_LOGF) + AC_DEFINE(HAVE_MODFF) + AC_DEFINE(HAVE_POWF) + AC_DEFINE(HAVE_SINF) + AC_DEFINE(HAVE_SINHF) + AC_DEFINE(HAVE_SQRTF) + AC_DEFINE(HAVE_TANF) + AC_DEFINE(HAVE_TANHF) + + # At some point, we should differentiate between architectures + # like x86, which have long double versions, and alpha/powerpc/etc., + # which don't. For the time being, punt. + if test x"long_double_math_on_this_cpu" = x"yes"; then + AC_DEFINE(HAVE_ACOSL) + AC_DEFINE(HAVE_ASINL) + AC_DEFINE(HAVE_ATAN2L) + AC_DEFINE(HAVE_ATANL) + AC_DEFINE(HAVE_CEILL) + AC_DEFINE(HAVE_COPYSIGNL) + AC_DEFINE(HAVE_COSL) + AC_DEFINE(HAVE_COSHL) + AC_DEFINE(HAVE_EXPL) + AC_DEFINE(HAVE_FABSL) + AC_DEFINE(HAVE_FINITEL) + AC_DEFINE(HAVE_FLOORL) + AC_DEFINE(HAVE_FMODL) + AC_DEFINE(HAVE_FREXPL) + AC_DEFINE(HAVE_ISINFL) + AC_DEFINE(HAVE_ISNANL) + AC_DEFINE(HAVE_LDEXPL) + AC_DEFINE(HAVE_LOG10L) + AC_DEFINE(HAVE_LOGL) + AC_DEFINE(HAVE_MODFL) + AC_DEFINE(HAVE_POWL) + AC_DEFINE(HAVE_SINCOSL) + AC_DEFINE(HAVE_SINL) + AC_DEFINE(HAVE_SINHL) + AC_DEFINE(HAVE_SQRTL) + AC_DEFINE(HAVE_TANL) + AC_DEFINE(HAVE_TANHL) + fi else # We are being configured natively. We can do more elaborate tests # that include AC_TRY_COMPILE now, as the linker is assumed to be # working. - - xcompiling=0 - NATIVE=yes + GLIBCPP_IS_CROSS_COMPILING=0 CANADIAN=no - NULL_TARGET=no # Check for available headers. AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \ - machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h]) + machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h]) GLIBCPP_CHECK_COMPILER_FEATURES GLIBCPP_CHECK_LINKER_FEATURES GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT GLIBCPP_CHECK_MATH_SUPPORT GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT - GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT - AC_CACHE_SAVE GLIBCPP_CHECK_WCHAR_T_SUPPORT - GLIBCPP_CHECK_CTYPE + GLIBCPP_CHECK_STDLIB_SUPPORT + AC_LC_MESSAGES + + AC_TRY_COMPILE([ + #include + ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);], + [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ]) + ]) AC_FUNC_MMAP + + # Establish limits on memory usage during 'make check' + GLIBCPP_CONFIGURE_TESTSUITE fi -AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes) -AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes) -AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes) -AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host") -AC_LC_MESSAGES +# Propagate the target-specific source directories through the build chain. +OS_INC_SRCDIR=$os_include_dir/bits +ATOMICITY_INC_SRCDIR=$ATOMICITYH/bits +CPU_LIMITS_INC_SRCDIR=$CPULIMITSH/bits +AC_SUBST(OS_INC_SRCDIR) +AC_SUBST(ATOMICITY_INC_SRCDIR) +AC_SUBST(CPU_LIMITS_INC_SRCDIR) + +# Set up cross-compile flags +AC_SUBST(GLIBCPP_IS_CROSS_COMPILING) +AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes) + +AC_CACHE_SAVE if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" @@ -148,79 +270,42 @@ else multilib_arg= fi - -# Generate the various Makefiles, include files, and scripts. - -# This helps subvert libstdcxx_interface, as calculated by devo/config.if # Needed so that g++ can find the correct include subdir automatically. INTERFACE=v3 -# Check for the interface version number for specifying where header -# files are installed, if a version number is provided. -AC_MSG_CHECKING([for interface version number]) -libstdcxx_interface=$INTERFACE -AC_MSG_RESULT($libstdcxx_interface) -AC_SUBST(libstdcxx_interface) - -# Process the option --with-gxx-include-dir= -AC_MSG_CHECKING([for --with-gxx-include-dir]) -AC_ARG_WITH(gxx-include-dir, -[ --with-gxx-include-dir the installation directory for include files], -[case "${withval}" in - yes) - AC_MSG_ERROR(Missing directory for --with-gxx-include-dir) - gxx_include_dir=no - ;; - no) - gxx_include_dir=no - ;; - *) - gxx_include_dir=${withval} - ;; -esac], [gxx_include_dir=no]) -AC_MSG_RESULT($gxx_include_dir) -AC_SUBST(gxx_include_dir) -AM_CONDITIONAL(GXX_INCLUDE_DIR, test x${gxx_include_dir} != xno) - -# Process the option "--enable-version-specific-runtime-libs" -AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) -AC_ARG_ENABLE(version-specific-runtime-libs, -[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], -[ version_specific_libs=yes -# Need the gcc compiler version to know where to install libraries -# and header files if --enable-version-specific-runtime-libs option -# is selected. -changequote(,)dnl -gcc_tmp=`grep version_string ${srcdir}/../gcc/version.c | awk '{print $6}'` -gcc_num=`echo ${gcc_tmp} | sed 's/\"//g'` -#gcc_date=`grep version_string ${srcdir}/../gcc/version.c | awk '{print $7}'` -#gcc_version=$gcc_num-$gcc_date -gcc_version=$gcc_num -changequote([,])dnl -AC_SUBST(gcc_version) -],version_specific_libs=no) -AC_MSG_RESULT($version_specific_libs) -if test x${version_specific_libs} = xyes; then - AM_CONDITIONAL(VERSION_SPECIFIC_LIBS, test x${version_specific_libs} = xyes) - AC_MSG_WARN(version specific directory is: $gcc_version) -fi - - +# Export all the install information +GLIBCPP_EXPORT_INSTALL_INFO # Export all the include and flag information to makefiles. GLIBCPP_EXPORT_INCLUDES GLIBCPP_EXPORT_FLAGS +if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features | + grep "enable shared" > /dev/null; then + LIBSUPCXX_PICFLAGS=-prefer-pic +else + LIBSUPCXX_PICFLAGS= +fi +AC_SUBST(LIBSUPCXX_PICFLAGS) + +# Generate the various Makefiles, include files, and scripts. # NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am -# so that multilib installs will end up installed in the correct -# place. To work around this not being passed down from config-ml.in -# -> top_srcdir/Makefile.am -> top_srcdir/src/Makefile.am, manually -# append it here. -AC_OUTPUT(mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile, +# and libsupc++/Makefile.am so that multilib installs will end up +# installed in the correct place. To work around this not being passed +# down from config-ml.in -> top_srcdir/Makefile.am -> +# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here. +AC_OUTPUT(Makefile \ + include/Makefile src/Makefile \ + libmath/Makefile libio/Makefile libsupc++/Makefile \ + po/Makefile testsuite/Makefile mkcheck testsuite_flags, [if test -n "$CONFIG_FILES"; then ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in grep '^MULTISUBDIR =' Makefile >> src/Makefile -fi], + grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile +fi +chmod +x mkcheck +chmod +x testsuite_flags +], srcdir=${srcdir} host=${host} target=${target} @@ -233,18 +318,6 @@ CXX="${CXX}" ) -blddir=`pwd` -# Generate bits/c++config.h -# NB: This must be the first generated file as others include it. . . -AC_OUTPUT_COMMANDS([$srcdir/mkc++config $blddir $srcdir]) - -# Generate bits/std_limits.h and src/limitsMEMBERS.cc -if test ! -f stamp-limits; then - AC_OUTPUT_COMMANDS([$srcdir/mknumeric_limits $blddir $srcdir $xcompiling]) - touch stamp-limits -fi - - # Sanity checking & User-visible messages. # Checks down here, otherwise they get scrolled off before # the user will notice. @@ -258,14 +331,12 @@ if test ! -f stamp-sanity-warned; then echo "" echo "Please make certain that you read the installation information here:" echo " faster => ${srcdir}/docs/install.html" - echo " slower => " + echo " slower => " echo "" echo "and the configuration information here:" echo " faster => ${srcdir}/docs/configopts.html" - echo " slower => " + echo " slower => " echo "" echo "before proceeding with ${_cv_gnu_make_command}." echo "" fi - -