Commit 16da539b by Phil Edwards

acinclude.m4: Move all AM_CONDITIONAL calls out.

2003-06-09  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4:  Move all AM_CONDITIONAL calls out.
	(GLIBCPP_CONFIGURE):  Set defaults for variables used in AM_CONDITIONAL
	statements.
	* configure.in:  Centralize AM_CONDITIONALs so that they are always
	run.  Make use of GLIBCPP_IS_CROSS_COMPILING.
	* aclocal.m4, configure:  Regenerated.

From-SVN: r67663
parent 36f04556
2003-06-09 Phil Edwards <pme@gcc.gnu.org>
* acinclude.m4: Move all AM_CONDITIONAL calls out.
(GLIBCPP_CONFIGURE): Set defaults for variables used in AM_CONDITIONAL
statements.
* configure.in: Centralize AM_CONDITIONALs so that they are always
run. Make use of GLIBCPP_IS_CROSS_COMPILING.
* aclocal.m4, configure: Regenerated.
2003-06-09 Paolo Carlini <pcarlini@unitus.it> 2003-06-09 Paolo Carlini <pcarlini@unitus.it>
* docs/html/ext/howto.html ('LWG Issues'): Add issue 235. * docs/html/ext/howto.html ('LWG Issues'): Add issue 235.
......
...@@ -202,6 +202,18 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -202,6 +202,18 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
*) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;; *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
esac esac
# Set up safe default values for all subsequent AM_CONDITIONAL tests.
need_libmath=no
enable_wchar_t=no
#enable_debug=no
#need_libio=no
#need_wlibio=no
#glibcpp_pch_comp=no
#enable_cheaders=c
#c_compatibility=no
enable_abi_check=no
#enable_symvers=no
# Find platform-specific directories containing configuration info. In # Find platform-specific directories containing configuration info. In
# addition to possibly modifying the same flags, it also sets up symlinks. # addition to possibly modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_HOST GLIBCPP_CHECK_HOST
...@@ -849,7 +861,9 @@ dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found. ...@@ -849,7 +861,9 @@ dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
dnl dnl
dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
dnl Check for complex versions of math functions of platform. dnl Check for complex versions of math functions of platform. This will
dnl always pass if libm is available, and fail if it isn't. If it is
dnl available, we assume we'll need it later, so add it to LIBS.
AC_CHECK_LIB(m, main) AC_CHECK_LIB(m, main)
AC_REPLACE_MATHFUNCS(nan copysignf) AC_REPLACE_MATHFUNCS(nan copysignf)
...@@ -869,7 +883,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [ ...@@ -869,7 +883,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
need_libmath=yes need_libmath=yes
fi fi
AC_SUBST(LIBMATHOBJS) AC_SUBST(LIBMATHOBJS)
AM_CONDITIONAL(GLIBCPP_BUILD_LIBMATH, test "$need_libmath" = yes)
]) ])
...@@ -896,7 +909,6 @@ dnl ...@@ -896,7 +909,6 @@ dnl
dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Wide characters disabled by default. dnl Wide characters disabled by default.
enable_wchar_t=no
dnl Test wchar.h for mbstate_t, which is needed for char_traits and dnl Test wchar.h for mbstate_t, which is needed for char_traits and
dnl others even if wchar_t support is not on. dnl others even if wchar_t support is not on.
...@@ -995,7 +1007,6 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ ...@@ -995,7 +1007,6 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
fi fi
AC_MSG_CHECKING([for enabled wchar_t specializations]) AC_MSG_CHECKING([for enabled wchar_t specializations])
AC_MSG_RESULT($enable_wchar_t) AC_MSG_RESULT($enable_wchar_t)
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
]) ])
...@@ -2132,15 +2143,11 @@ AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [ ...@@ -2132,15 +2143,11 @@ AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_triplet}/baseline_symbols.txt" baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_triplet}/baseline_symbols.txt"
AC_SUBST(baseline_file) AC_SUBST(baseline_file)
dnl XXX move to configure.host?
case "$target" in case "$target" in
*-*-cygwin* ) enable_abi_check=no ;; *-*-cygwin* ) enable_abi_check=no ;;
* ) enable_abi_check=yes ;; * ) enable_abi_check=yes ;;
esac esac
# Don't do ABI checking unless native.
AM_CONDITIONAL(GLIBCPP_BUILD_ABI_CHECK,
test x"$build" = x"$host" && test -z "$with_cross_host" \
&& test "$enable_abi_check" = yes )
]) ])
......
...@@ -214,6 +214,18 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -214,6 +214,18 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
*) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;; *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
esac esac
# Set up safe default values for all subsequent AM_CONDITIONAL tests.
need_libmath=no
enable_wchar_t=no
#enable_debug=no
#need_libio=no
#need_wlibio=no
#glibcpp_pch_comp=no
#enable_cheaders=c
#c_compatibility=no
enable_abi_check=no
#enable_symvers=no
# Find platform-specific directories containing configuration info. In # Find platform-specific directories containing configuration info. In
# addition to possibly modifying the same flags, it also sets up symlinks. # addition to possibly modifying the same flags, it also sets up symlinks.
GLIBCPP_CHECK_HOST GLIBCPP_CHECK_HOST
...@@ -861,7 +873,9 @@ dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found. ...@@ -861,7 +873,9 @@ dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
dnl dnl
dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
dnl Check for complex versions of math functions of platform. dnl Check for complex versions of math functions of platform. This will
dnl always pass if libm is available, and fail if it isn't. If it is
dnl available, we assume we'll need it later, so add it to LIBS.
AC_CHECK_LIB(m, main) AC_CHECK_LIB(m, main)
AC_REPLACE_MATHFUNCS(nan copysignf) AC_REPLACE_MATHFUNCS(nan copysignf)
...@@ -881,7 +895,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [ ...@@ -881,7 +895,6 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
need_libmath=yes need_libmath=yes
fi fi
AC_SUBST(LIBMATHOBJS) AC_SUBST(LIBMATHOBJS)
AM_CONDITIONAL(GLIBCPP_BUILD_LIBMATH, test "$need_libmath" = yes)
]) ])
...@@ -908,7 +921,6 @@ dnl ...@@ -908,7 +921,6 @@ dnl
dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Wide characters disabled by default. dnl Wide characters disabled by default.
enable_wchar_t=no
dnl Test wchar.h for mbstate_t, which is needed for char_traits and dnl Test wchar.h for mbstate_t, which is needed for char_traits and
dnl others even if wchar_t support is not on. dnl others even if wchar_t support is not on.
...@@ -1007,7 +1019,6 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ ...@@ -1007,7 +1019,6 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
fi fi
AC_MSG_CHECKING([for enabled wchar_t specializations]) AC_MSG_CHECKING([for enabled wchar_t specializations])
AC_MSG_RESULT($enable_wchar_t) AC_MSG_RESULT($enable_wchar_t)
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
]) ])
...@@ -2144,15 +2155,11 @@ AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [ ...@@ -2144,15 +2155,11 @@ AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_triplet}/baseline_symbols.txt" baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_triplet}/baseline_symbols.txt"
AC_SUBST(baseline_file) AC_SUBST(baseline_file)
dnl XXX move to configure.host?
case "$target" in case "$target" in
*-*-cygwin* ) enable_abi_check=no ;; *-*-cygwin* ) enable_abi_check=no ;;
* ) enable_abi_check=yes ;; * ) enable_abi_check=yes ;;
esac esac
# Don't do ABI checking unless native.
AM_CONDITIONAL(GLIBCPP_BUILD_ABI_CHECK,
test x"$build" = x"$host" && test -z "$with_cross_host" \
&& test "$enable_abi_check" = yes )
]) ])
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -81,7 +81,7 @@ fi ...@@ -81,7 +81,7 @@ fi
if test x"$build" != x"$host"; then if test x"$build" != x"$host"; then
# We are being configured with some form of cross compiler. # We are being configured with some form of cross compiler.
GLIBCPP_IS_CROSS_COMPILING=1 GLIBCPP_IS_CROSS_COMPILING=true
# This lets us hard-code the functionality we know we'll have in the cross # 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 # target environment. "Let" is a sugar-coated word placed on an especially
...@@ -401,7 +401,7 @@ else ...@@ -401,7 +401,7 @@ else
# We are being configured natively. We can do more elaborate tests # We are being configured natively. We can do more elaborate tests
# that include AC_TRY_COMPILE now, as the linker is assumed to be # that include AC_TRY_COMPILE now, as the linker is assumed to be
# working. # working.
GLIBCPP_IS_CROSS_COMPILING=0 GLIBCPP_IS_CROSS_COMPILING=false
CANADIAN=no CANADIAN=no
# Check for available headers. # Check for available headers.
...@@ -447,9 +447,17 @@ ATOMICITY_INC_SRCDIR=config/${ATOMICITYH} ...@@ -447,9 +447,17 @@ ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
AC_SUBST(OS_INC_SRCDIR) AC_SUBST(OS_INC_SRCDIR)
AC_SUBST(ATOMICITY_INC_SRCDIR) AC_SUBST(ATOMICITY_INC_SRCDIR)
# Set up cross-compile flags # Set up cross-compile flags and all AM_CONDITIONALs.
AC_SUBST(GLIBCPP_IS_CROSS_COMPILING) dnl Unused so far. AC_SUBST(GLIBCPP_IS_CROSS_COMPILING)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes) AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
dnl from GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT:
AM_CONDITIONAL(GLIBCPP_BUILD_LIBMATH, test "$need_libmath" = yes)
dnl from GLIBCPP_CHECK_WCHAR_T_SUPPORT:
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
dnl from GLIBCPP_CONFIGURE_TESTSUITE:
# Don't do ABI checking unless native.
AM_CONDITIONAL(GLIBCPP_BUILD_ABI_CHECK,
${GLIBCPP_IS_CROSS_COMPILING} && test "$enable_abi_check" = yes )
AC_CACHE_SAVE AC_CACHE_SAVE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment