PACKAGE=libstdc++
AC_SUBST(PACKAGE)
-# For typical GNU versioning info, format is MAJOR.MINOR.MICRO
-release_VERSION=3.1.1
-AC_SUBST(release_VERSION)
# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=4:1:0
+libtool_VERSION=6:0:0
AC_SUBST(libtool_VERSION)
+GLIBCPP_TOPREL_CONFIGURE
+
# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
#
# You will slowly go insane if you do not grok the following fact: when
target_alias=${target_alias-$target}
AC_SUBST(target_alias)
-AM_INIT_AUTOMAKE($PACKAGE, $release_VERSION)
-AM_CONFIG_HEADER(config.h)
-
# Runs configure.target, finds CC, CXX and assorted other critical bits.
# Must run this before the GLIBCPP_ENABLE_* macros below.
GLIBCPP_CONFIGURE(.)
+AM_INIT_AUTOMAKE($PACKAGE, $gcc_version)
+AM_CONFIG_HEADER(config.h)
+
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
GLIBCPP_CHECK_GNU_MAKE
# Enable all the variable C++ stuff. C_MBCHAR must come early.
-GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_CLOCALE
+GLIBCPP_ENABLE_CHEADERS([$c_model])
GLIBCPP_ENABLE_C_MBCHAR([yes])
GLIBCPP_ENABLE_C99([yes])
GLIBCPP_ENABLE_LONG_LONG([yes])
-GLIBCPP_ENABLE_CHEADERS([$c_model])
GLIBCPP_ENABLE_THREADS
-GLIBCPP_ENABLE_CXX_FLAGS([none])
GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
GLIBCPP_ENABLE_CONCEPT_CHECKS
+GLIBCPP_ENABLE_CXX_FLAGS
+GLIBCPP_ENABLE_DEBUG([no])
+GLIBCPP_ENABLE_DEBUG_FLAGS([none])
# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
AC_CHECK_HEADERS(string.h stdlib.h)
+# No surprises, no surprises...
+if test $ATOMICITYH = cpu/generic ; then
+ AC_MSG_WARN([No native atomic operations are provided yet for this platform.])
+ if test $target_thread_file = single; then
+ AC_MSG_WARN([They cannot be faked when thread support is disabled.])
+ AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
+ else
+ AC_MSG_WARN([They will be faked using a mutex.])
+ AC_MSG_WARN([Performance of certain classes will degrade as a result.])
+ fi
+fi
+
+
if test -n "$with_cross_host" || test x"$build" != x"$host"; then
# We are being configured with some form of cross compiler.
# GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
# GLIBCPP_CHECK_MATH_SUPPORT
- case "$target_alias" in
+ case "$target" in
*-linux*)
os_include_dir="os/gnu-linux"
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
AC_DEFINE(HAVE_COPYSIGNF)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_HYPOT)
- case "$target_alias" in
+ case "$target" in
*-hpux10*)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FINITEF)
AC_DEFINE(HAVE_ISNANL)
fi
;;
+ *-freebsd*)
+ # 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 sys/resource.h sys/stat.h \
+ sys/time.h unistd.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="os/bsd/freebsd"
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ AC_DEFINE(HAVE_DRAND48)
+ AC_DEFINE(HAVE_GETPAGESIZE)
+ AC_DEFINE(HAVE_SETENV)
+ AC_DEFINE(HAVE_SIGSETJMP)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_FINITEF)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FREXPF)
+ AC_DEFINE(HAVE_HYPOT)
+ AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ if test x"long_double_math_on_this_cpu" = x"yes"; then
+ AC_DEFINE(HAVE_FINITEL)
+ AC_DEFINE(HAVE_ISINFL)
+ AC_DEFINE(HAVE_ISNANL)
+ fi
+ ;;
*-mingw32*)
AC_CHECK_HEADERS([sys/types.h locale.h float.h])
GLIBCPP_CHECK_LINKER_FEATURES
;;
esac
- case "$target_alias" in
+ case "$target" in
*-mingw32*)
;;
*-windiss*)
AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF)
;;
+ *-freebsd*)
+ # Must replicate generic section since we don't have strtof or strtold.
+ 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_FLOORF)
+ AC_DEFINE(HAVE_FMODF)
+ AC_DEFINE(HAVE_FREXPF)
+ 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)
+ ;;
*)
# GLIBCPP_CHECK_STDLIB_SUPPORT
AC_DEFINE(HAVE_STRTOF)
GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
GLIBCPP_CHECK_WCHAR_T_SUPPORT
GLIBCPP_CHECK_STDLIB_SUPPORT
+ GLIBCPP_CHECK_UNISTD_SUPPORT
AC_LC_MESSAGES
AC_TRY_COMPILE([
GLIBCPP_ENABLE_SYMVERS([yes])
# Propagate the target-specific source directories through the build chain.
-# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH and
-# CPULIMITSH [might] use it, and they only get used here.)
-OS_INC_SRCDIR=config/${os_include_dir}/bits
-ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}/bits
-CPU_LIMITS_INC_SRCDIR=config/${CPULIMITSH}/bits
+# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH
+# uses it, and it only gets used in this file.)
+OS_INC_SRCDIR=config/${os_include_dir}
+ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
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) dnl Unused so far.
multilib_arg=
fi
-# Needed so that g++ can find the correct include subdir automatically.
-INTERFACE=v3
-
# Export all the install information
GLIBCPP_EXPORT_INSTALL_INFO
-# Export all the include and flag information to makefiles.
+# Export all the include and flag information to Makefiles.
GLIBCPP_EXPORT_INCLUDES
GLIBCPP_EXPORT_FLAGS
# 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
- LD="${ORIGINAL_LD_FOR_MULTILIBS}"
- ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
- grep '^MULTISUBDIR =' Makefile >> src/Makefile
- grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
-fi
-chmod +x mkcheck
-chmod +x testsuite_flags
-],
+include/Makefile src/Makefile \
+libmath/Makefile libio/Makefile libsupc++/Makefile \
+po/Makefile testsuite/Makefile mkcheck testsuite_flags,
+[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+ if test -n "$CONFIG_FILES"; then
+ if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
+ LD="${ORIGINAL_LD_FOR_MULTILIBS}"
+ ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+ grep '^MULTISUBDIR =' Makefile >> src/Makefile
+ grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+ fi
+ fi
+ chmod +x mkcheck
+ chmod +x testsuite_flags],
srcdir=${srcdir}
host=${host}
target=${target}
+with_target_subdir=${with_target_subdir}
+with_build_subdir=${with_build_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="${multilib_arg} ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
glibcpp_basedir=${glibcpp_basedir}
CC="${CC}"
CXX="${CXX}"
+ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
)
dnl In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
dnl AC_CONFIG_FILES(Makefile \