2000-04-22 04:33:34 +08:00
|
|
|
# Process this file with autoconf to produce a configure script, like so:
|
2000-05-25 13:11:42 +08:00
|
|
|
# aclocal, autoconf, autoheader, automake
|
2000-04-22 04:33:34 +08:00
|
|
|
|
|
|
|
AC_PREREQ(2.13)
|
|
|
|
AC_INIT(src/complex.cc)
|
|
|
|
AC_CONFIG_AUX_DIR(..)
|
|
|
|
|
|
|
|
# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
|
|
|
# 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])
|
|
|
|
|
|
|
|
GLIBCPP_CONFIGURE(.)
|
|
|
|
AC_LIBTOOL_DLOPEN
|
2000-07-26 14:51:38 +08:00
|
|
|
AM_PROG_LIBTOOL
|
2000-10-31 09:56:19 +08:00
|
|
|
AC_SUBST(enable_shared)
|
|
|
|
AC_SUBST(enable_static)
|
2000-07-18 02:17:33 +08:00
|
|
|
GLIBCPP_CHECK_GNU_MAKE
|
|
|
|
if test "x$_cv_gnu_make_command" = "x"; then
|
2000-07-25 00:34:00 +08:00
|
|
|
AC_MSG_ERROR([GNU make not found. Please install it or correct your path.])
|
2000-07-18 02:17:33 +08:00
|
|
|
fi
|
2000-04-22 04:33:34 +08:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
# Check for c++ or library specific bits that don't require linking.
|
|
|
|
GLIBCPP_CHECK_COMPILER_VERSION
|
|
|
|
|
2000-10-25 20:50:06 +08:00
|
|
|
# Enable all the crazy c++ stuff. C_MBCHAR must come early.
|
2000-09-08 06:40:17 +08:00
|
|
|
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
|
2000-04-22 04:33:34 +08:00
|
|
|
GLIBCPP_ENABLE_CSTDIO
|
2000-11-17 09:04:02 +08:00
|
|
|
GLIBCPP_ENABLE_C_MBCHAR([yes])
|
2000-10-31 09:56:19 +08:00
|
|
|
GLIBCPP_ENABLE_LONG_LONG([yes])
|
|
|
|
GLIBCPP_ENABLE_SHADOW([no])
|
2000-04-22 04:33:34 +08:00
|
|
|
GLIBCPP_ENABLE_THREADS
|
2000-10-08 02:54:08 +08:00
|
|
|
GLIBCPP_ENABLE_ATOMICITY
|
2000-05-12 03:52:00 +08:00
|
|
|
GLIBCPP_ENABLE_CXX_FLAGS([none])
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2000-05-02 07:47:31 +08:00
|
|
|
|
2000-04-22 04:33:34 +08:00
|
|
|
if test -n "$with_cross_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
|
|
|
|
# If Canadian cross, then don't pick up tools from the build
|
|
|
|
# directory.
|
|
|
|
if test "$build" != "$with_cross_host"; then
|
|
|
|
CANADIAN=yes
|
|
|
|
NULL_TARGET=yes
|
|
|
|
else
|
|
|
|
CANADIAN=no
|
|
|
|
NULL_TARGET=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
case "$target_alias" in
|
|
|
|
*-wince-*)
|
|
|
|
# Configure for Microsoft Windows CE, or whatever they are
|
|
|
|
# currently calling it.
|
|
|
|
AC_DEFINE(HAVE_FLOAT_H)
|
|
|
|
|
2000-10-15 16:45:33 +08:00
|
|
|
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"
|
2000-10-30 06:32:30 +08:00
|
|
|
AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h,
|
|
|
|
include/bits/ctype_base.h)
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \
|
2000-10-30 06:32:30 +08:00
|
|
|
include/bits/ctype_inline.h)
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
|
2000-10-30 06:32:30 +08:00
|
|
|
include/bits/ctype_noninline.h)
|
2000-10-08 02:54:08 +08:00
|
|
|
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
|
|
|
|
AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
|
2000-04-22 04:33:34 +08:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# We assume newlib. This lets us hard-code the functions we know
|
|
|
|
# we'll have.
|
2000-10-15 16:45:33 +08:00
|
|
|
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"
|
2000-10-30 06:32:30 +08:00
|
|
|
AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h,
|
|
|
|
include/bits/ctype_base.h)
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, \
|
2000-10-30 06:32:30 +08:00
|
|
|
include/bits/ctype_inline.h)
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
|
2000-10-30 06:32:30 +08:00
|
|
|
include/bits/ctype_noninline.h)
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2000-10-15 16:45:33 +08:00
|
|
|
AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
|
|
|
|
AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
|
2000-10-31 09:56:19 +08:00
|
|
|
# need to check for faster f versions of math functions, ie sinf?
|
2000-04-22 04:33:34 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
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
|
|
|
|
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 \
|
2000-10-31 09:56:19 +08:00
|
|
|
machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h])
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2000-06-19 11:14:40 +08:00
|
|
|
GLIBCPP_CHECK_COMPILER_FEATURES
|
|
|
|
GLIBCPP_CHECK_LINKER_FEATURES
|
2000-04-22 04:33:34 +08:00
|
|
|
GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
|
|
|
|
GLIBCPP_CHECK_MATH_SUPPORT
|
2000-06-20 06:20:15 +08:00
|
|
|
GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|
|
|
GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT
|
2000-04-22 04:33:34 +08:00
|
|
|
GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
2000-10-27 20:31:37 +08:00
|
|
|
GLIBCPP_CHECK_CTYPE_SUPPORT
|
|
|
|
GLIBCPP_CHECK_STDLIB_SUPPORT
|
2000-04-22 04:33:34 +08:00
|
|
|
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
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")
|
2000-11-16 09:44:03 +08:00
|
|
|
|
2000-10-30 06:32:30 +08:00
|
|
|
AC_CACHE_SAVE
|
2000-04-22 04:33:34 +08:00
|
|
|
AC_LC_MESSAGES
|
|
|
|
|
|
|
|
if test "${multilib}" = "yes"; then
|
|
|
|
multilib_arg="--enable-multilib"
|
|
|
|
else
|
|
|
|
multilib_arg=
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Generate the various Makefiles, include files, and scripts.
|
|
|
|
|
2000-10-15 16:45:33 +08:00
|
|
|
# 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=<path to include-files directory>
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-10-12 19:45:23 +08:00
|
|
|
# Export all the include and flag information to makefiles.
|
|
|
|
GLIBCPP_EXPORT_INCLUDES
|
|
|
|
GLIBCPP_EXPORT_FLAGS
|
|
|
|
|
2000-10-30 06:32:30 +08:00
|
|
|
# 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
|
|
|
|
|
2000-04-22 04:33:34 +08:00
|
|
|
# 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.
|
2000-10-07 09:05:37 +08:00
|
|
|
AC_OUTPUT(mkcheck Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile,
|
2000-04-22 04:33:34 +08:00
|
|
|
[if test -n "$CONFIG_FILES"; then
|
|
|
|
ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
|
|
|
|
grep '^MULTISUBDIR =' Makefile >> src/Makefile
|
2000-10-26 15:28:25 +08:00
|
|
|
fi
|
|
|
|
chmod +x mkcheck
|
|
|
|
],
|
2000-04-22 04:33:34 +08:00
|
|
|
srcdir=${srcdir}
|
|
|
|
host=${host}
|
|
|
|
target=${target}
|
|
|
|
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}"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
2000-10-15 16:45:33 +08:00
|
|
|
if test ! -f stamp-limits; then
|
|
|
|
AC_OUTPUT_COMMANDS([$srcdir/mknumeric_limits $blddir $srcdir $xcompiling])
|
|
|
|
touch stamp-limits
|
|
|
|
fi
|
2000-07-18 02:17:33 +08:00
|
|
|
|
2000-10-17 18:12:23 +08:00
|
|
|
|
2000-07-18 02:17:33 +08:00
|
|
|
# Sanity checking & User-visible messages.
|
|
|
|
# Checks down here, otherwise they get scrolled off before
|
|
|
|
# the user will notice.
|
|
|
|
|
2000-07-26 14:51:38 +08:00
|
|
|
# Trying to get more people to read documentation. Possibly remove
|
|
|
|
# check and warn all the time. There is no "informational" AC_MSG_
|
|
|
|
# macro, so these are going to be printed even when --quiet/--silent
|
|
|
|
# is given.
|
2000-07-25 00:34:00 +08:00
|
|
|
if test ! -f stamp-sanity-warned; then
|
|
|
|
touch stamp-sanity-warned
|
2000-07-26 14:51:38 +08:00
|
|
|
echo ""
|
|
|
|
echo "Please make certain that you read the installation information here:"
|
2000-07-18 02:17:33 +08:00
|
|
|
echo " faster => ${srcdir}/docs/install.html"
|
2000-07-26 14:51:38 +08:00
|
|
|
echo " slower => <URL:http://sources.redhat.com/libstdc++/install.html>"
|
|
|
|
echo ""
|
|
|
|
echo "and the configuration information here:"
|
2000-07-18 02:17:33 +08:00
|
|
|
echo " faster => ${srcdir}/docs/configopts.html"
|
2000-07-26 14:51:38 +08:00
|
|
|
echo " slower => <URL:http://sources.redhat.com/libstdc++/configopts.html>"
|
|
|
|
echo ""
|
2000-07-27 05:30:45 +08:00
|
|
|
echo "before proceeding with ${_cv_gnu_make_command}."
|
2000-07-26 14:51:38 +08:00
|
|
|
echo ""
|
2000-07-18 02:17:33 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|