# at least currently, we never actually build a program, so we never
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
# fails, because we are probably configuring with a cross compiler
- # which cant create executables. So we include AC_EXEEXT to keep
- # automake happy, but we dont execute it, since we dont care about
+ # which can't create executables. So we include AC_EXEEXT to keep
+ # automake happy, but we don't execute it, since we don't care about
# the result.
if false; then
# autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
dnl check for __builtin_labs
dnl check for __builtin_sqrtf
dnl check for __builtin_sqrtl
-dnl check for __builtin_fsqrt
+dnl check for __builtin_sqrt
dnl check for __builtin_sinf
dnl check for __builtin_sin
dnl check for __builtin_sinl
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
- GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fsqrt)
+ GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
AC_DEFINE(HAVE___BUILTIN_SIN)
AC_DEFINE(HAVE___BUILTIN_SINF)
AC_DEFINE(HAVE___BUILTIN_SINL)
- AC_DEFINE(HAVE___BUILTIN_FSQRT)
+ AC_DEFINE(HAVE___BUILTIN_SQRT)
AC_DEFINE(HAVE___BUILTIN_SQRTF)
AC_DEFINE(HAVE___BUILTIN_SQRTL)
fi
--enable-clocale=MODEL use MODEL target-speific locale package. [default=generic]
],
if test x$enable_clocale = xno; then
- enable_clocale=generic
+ enable_clocale=no
fi,
- enable_clocale=generic)
+ enable_clocale=no)
enable_clocale_flag=$enable_clocale
- dnl Check if a valid locale package
+ dnl Probe for locale support if no specific model is specified.
+ dnl Default to "generic"
+ if test x$enable_clocale_flag = xno; then
+ case x${target_os} in
+ xlinux* | xgnu*)
+ AC_EGREP_CPP([_GLIBCPP_ok], [
+ #include <features.h>
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+ _GLIBCPP_ok
+ #endif
+ ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
+
+ # Test for bugs early in glibc-2.2.x series
+ if test x$enable_clocale_flag = xgnu; then
+ AC_TRY_RUN([
+ #define _GNU_SOURCE 1
+ #include <locale.h>
+ int main()
+ {
+ const char __one[] = "Äuglein Augmen";
+ const char __two[] = "Äuglein";
+ int i;
+ int j;
+ __locale_t loc;
+ __locale_t loc_dup;
+ loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+ loc_dup = __duplocale(loc);
+ i = __strcoll_l(__one, __two, loc);
+ j = __strcoll_l(__one, __two, loc_dup);
+ return 0;
+ }
+ ],
+ [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
+ [enable_clocale_flag=generic])
+ fi
+
+ # ... at some point put __strxfrm_l tests in as well.
+ ;;
+ *)
+ enable_clocale_flag=generic
+ ;;
+ esac
+ fi
+
+ dnl Set configure bits for specified locale package
case x${enable_clocale_flag} in
xgeneric)
AC_MSG_RESULT(generic)
# Don't use gettext.
USE_NLS=no
- AC_SUBST(USE_NLS)
CLOCALE_H=config/locale/c_locale_generic.h
CLOCALE_CC=config/locale/c_locale_generic.cc
CCODECVT_H=config/locale/codecvt_specializations_generic.h
+ CCOLLATE_CC=config/locale/collate_members_generic.cc
+ CCTYPE_CC=config/locale/ctype_members_generic.cc
CMESSAGES_H=config/locale/messages_members_generic.h
CMESSAGES_CC=config/locale/messages_members_generic.cc
+ CMONEY_CC=config/locale/moneypunct_members_generic.cc
+ CNUMERIC_CC=config/locale/numpunct_members_generic.cc
+ CTIME_CC=config/locale/time_members_generic.cc
;;
xgnu)
AC_MSG_RESULT(gnu)
# languages.
# For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT
ALL_LINGUAS="de fr"
- AM_GNU_GETTEXT
+ # Don't call AM_GNU_GETTEXT here. Instead, assume glibc.
+ # Need to deal with MSGFMT, USE_NLS, and glibcpp_[P,M]OFILES
+ USE_NLS=yes
# Export the build objects.
for ling in $ALL_LINGUAS; do \
glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
+ glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
done
AC_SUBST(glibcpp_MOFILES)
+ AC_SUBST(glibcpp_POFILES)
CLOCALE_H=config/locale/c_locale_gnu.h
CLOCALE_CC=config/locale/c_locale_gnu.cc
CCODECVT_H=config/locale/codecvt_specializations_ieee_1003.1-200x.h
+ CCOLLATE_CC=config/locale/collate_members_gnu.cc
+ CCTYPE_CC=config/locale/ctype_members_gnu.cc
CMESSAGES_H=config/locale/messages_members_gnu.h
CMESSAGES_CC=config/locale/messages_members_gnu.cc
+ CMONEY_CC=config/locale/moneypunct_members_gnu.cc
+ CNUMERIC_CC=config/locale/numpunct_members_gnu.cc
+ CTIME_CC=config/locale/time_members_gnu.cc
;;
xieee_1003.1)
AC_MSG_RESULT(generic)
# Don't use gettext.
USE_NLS=no
- AC_SUBST(USE_NLS)
CLOCALE_H=config/locale/c_locale_ieee_1003.1-200x.h
CLOCALE_CC=config/locale/c_locale_ieee_1003.1-200x.cc
CCODECVT_H=config/locale/codecvt_specializations_ieee_1003.1-200x.h
+ CCOLLATE_CC=config/locale/collate_members_generic.cc
+ CCTYPE_CC=config/locale/ctype_members_generic.cc
CMESSAGES_H=config/locale/messages_members_ieee_1003.1-200x.h
CMESSAGES_CC=config/locale/messages_members_ieee_1003.1-200x.cc
+ CMONEY_CC=config/locale/moneypunct_members_generic.cc
+ CNUMERIC_CC=config/locale/numpunct_members_generic.cc
+ CTIME_CC=config/locale/time_members_generic.cc
;;
*)
echo "$enable_clocale is an unknown locale package" 1>&2
glibcpp_localedir=${glibcpp_builddir}/po/share/locale
AC_SUBST(glibcpp_localedir)
+ AC_SUBST(USE_NLS)
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
AC_SUBST(CMESSAGES_H)
AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
- AC_LINK_FILES($CMESSAGES_CC, src/messages_members.cc)
+ AC_LINK_FILES($CCOLLATE_CC, src/collate.cc)
+ AC_LINK_FILES($CCTYPE_CC, src/ctype.cc)
+ AC_LINK_FILES($CMESSAGES_CC, src/messages.cc)
+ AC_LINK_FILES($CMONEY_CC, src/moneypunct.cc)
+ AC_LINK_FILES($CNUMERIC_CC, src/numpunct.cc)
+ AC_LINK_FILES($CTIME_CC, src/time.cc)
])
AC_ARG_ENABLE(c99,
changequote(<<, >>)dnl
- <<--enable-c99 turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
+ <<--enable-c99 turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
changequote([, ])dnl
[case "$enableval" in
yes) enable_c99=yes ;;
[char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
dnl
dnl Check for template specializations for the 'long long' type extension.
-dnl NB: Must check for C99 support before calling _GLIBCPP_ENABLE_LONG_LONG
+dnl The result determines only whether 'long long' I/O is enabled; things
+dnl like numeric_limits<> specializations are always available.
dnl
dnl GLIBCPP_ENABLE_LONG_LONG
dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
esac],
enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
- # iostreams require strtoll, strtoull to compile. If the
- # GLIBCPP_ENABLE_C99 tests found these, and if C99 support is enabled,
- # go ahead and allow long long to be used.
- if test x"$enable_c99" = x"no"; then
- enable_long_long=no;
- fi
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_MSG_CHECKING([for enabled long long I/O support])
+ # iostreams require strtoll, strtoull to compile
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
# Option parsed, now set things appropriately
- AC_MSG_CHECKING([for enabled long long support])
if test x"$enable_long_long" = xyes; then
AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
fi
AC_MSG_RESULT($enable_long_long)
+
+ AC_LANG_RESTORE
])
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_version_trigger=${srcdir}/../gcc/version.c
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
-gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
-gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++
-glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
-glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
-changequote([,])dnl
-],version_specific_libs=no)
+[case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no) version_specific_libs=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+version_specific_libs=no)dnl
+# Option set, now we can test it.
AC_MSG_RESULT($version_specific_libs)
+if test $version_specific_libs = yes; then
+ # 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_version_trigger=${srcdir}/../gcc/version.c
+ gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+ gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+ gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++
+ glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+ changequote([,])dnl
+fi
+
# Default case for install directory for include files.
-if test x"$version_specific_libs" = x"no" \
- && test x"$gxx_include_dir" = x"no"; then
+if test $version_specific_libs = no &&
+ test $gxx_include_dir = no; then
gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface}
fi
])
])
+
+dnl
+dnl Check for whether the Boost-derived checks should be turned on.
+dnl
+dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
+dnl --enable-concept-checks turns them on.
+dnl --disable-concept-checks leaves them off.
+dnl + Usage: GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
+dnl defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
+define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(concept-checks,
+changequote(<<, >>)dnl
+<< --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_concept_checks=yes ;;
+ no) enable_concept_checks=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
+ esac],
+enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
+dnl Option parsed, now set things appropriately
+if test x"$enable_concept_checks" = xyes; then
+ AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
+fi
+])
+
+