X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Fconfigure.in;h=45099b049409082c7ec7f461f37453243ad92359;hb=3461a998f83f6aba603802fcc1031a5898e9956f;hp=f9b1cf8f5740a9f95d6ecc96b7dec382f839690d;hpb=c3f3e8918fd3633fa2b5bf0dc6437540b6bbae73;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libstdc++-v3/configure.in b/libstdc++-v3/configure.in index f9b1cf8f574..45099b04940 100644 --- a/libstdc++-v3/configure.in +++ b/libstdc++-v3/configure.in @@ -36,6 +36,11 @@ AC_CANONICAL_SYSTEM target_alias=${target_alias-$target} AC_SUBST(target_alias) +# Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also +# be 'cp -p' if linking isn't available. +#ac_cv_prog_LN_S='cp -p' +AC_PROG_LN_S + # We use these options to decide which functions to include. AC_ARG_WITH(target-subdir, [ --with-target-subdir=SUBDIR @@ -53,8 +58,6 @@ AC_SUBST(enable_shared) AC_SUBST(enable_static) GLIBCPP_CHECK_GNU_MAKE - - AM_CONFIG_HEADER(config.h) # Check for c++ or library specific bits that don't require linking. @@ -72,22 +75,21 @@ GLIBCPP_ENABLE_THREADS GLIBCPP_ENABLE_CXX_FLAGS([none]) GLIBCPP_ENABLE_SJLJ_EXCEPTIONS -if test -n "$with_cross_host"; then +if test -n "$with_cross_host" || test x"$build" != x"$host"; then - # 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. - xcompiling=1 - NATIVE=no + # We are being configured with some form of cross compiler. + # mknumeric_limits may not work correctly, either because the + # compiler may not run on this machine, may not be able to link + # executables, or may produce executables we can't run on this + # machine. + GLIBCPP_IS_CROSS_COMPILING=1 # If Canadian cross, then don't pick up tools from the build # directory. - if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; 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 case "$target_alias" in @@ -197,10 +199,8 @@ 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 \ @@ -222,17 +222,14 @@ else AC_FUNC_MMAP fi -# Now that ctype is determined for all possible targets, we can do this... -AC_LINK_FILES($os_include_dir/bits/ctype_base.h, \ -include/bits/ctype_base.h) -AC_LINK_FILES($os_include_dir/bits/ctype_inline.h, \ -include/bits/ctype_inline.h) -AC_LINK_FILES($os_include_dir/bits/ctype_noninline.h, \ -include/bits/ctype_noninline.h) -AC_LINK_FILES($ATOMICITYH/bits/atomicity.h, include/bits/atomicity.h) - -AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes) -AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes) +# Propagate the target-specific source directories through the build chain. +OS_INC_SRCDIR=$os_include_dir/bits +ATOMICITY_INC_SRCDIR=$ATOMICITYH/bits +AC_SUBST(OS_INC_SRCDIR) +AC_SUBST(ATOMICITY_INC_SRCDIR) + +# Set up cross-compile flags +AC_SUBST(GLIBCPP_IS_CROSS_COMPILING) AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes) AC_CACHE_SAVE @@ -244,9 +241,6 @@ else multilib_arg= fi - -# Generate the various Makefiles, include files, and scripts. - # Needed so that g++ can find the correct include subdir automatically. INTERFACE=v3 @@ -265,20 +259,16 @@ else fi AC_SUBST(LIBSUPCXX_PICFLAGS) -# This should be done by mkincludedir, but hack around it now. -blddir=`pwd` -echo "checking for $blddir/include" - -if test ! -d "$blddir/include"; then - mkdir "$blddir/include" -fi - +# Generate the various Makefiles, include files, and scripts. # NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am # 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 src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile testsuite/Makefile mkcheck testsuite_flags, +AC_OUTPUT(Makefile \ + include/Makefile src/Makefile \ + libmath/Makefile libio/Makefile libsupc++/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 @@ -299,22 +289,6 @@ CXX="${CXX}" ) -# Generate bits/c++config.h -# NB: This must be the first generated file as others include it. . . -$srcdir/mkc++config $blddir $srcdir - -# Generate bits/std_limits.h and src/limitsMEMBERS.cc -if test ! -f stamp-limits; then - $srcdir/mknumeric_limits $blddir $srcdir $xcompiling - if test ! -f include/bits/std_limits.h; then - echo "mknumeric_limits failed to execute properly: exiting" - exit 1 - else - touch stamp-limits - fi -fi - - # Sanity checking & User-visible messages. # Checks down here, otherwise they get scrolled off before # the user will notice.