OSDN Git Service

2001-01-02 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / acinclude.m4
index 002ea08..66a0bcc 100644 (file)
@@ -230,7 +230,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
     # this is the suspicious part
     CXXFLAGS=''
   fi
-  if test "$ac_gabydiags" = "yes"; then
+  if test x"$ac_gabydiags" = x"yes"; then
     WFMT_FLAGS='-fdiagnostics-show-location=once'
   fi
   AC_MSG_RESULT($ac_gabydiags)
@@ -246,7 +246,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
     # this is the suspicious part
     CXXFLAGS=''
   fi
-  if test "$ac_fdsections" = "yes"; then
+  if test x"$ac_fdsections" = x"yes" && test x"$enable_debug" = x"no"; then
     SECTION_FLAGS='-ffunction-sections -fdata-sections'
   fi
   AC_MSG_RESULT($ac_fdsections)
@@ -314,7 +314,7 @@ AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
   fi
 
   # Set linker optimization flags.
-  if test "$ac_cv_prog_gnu_ld" = "yes"; then
+  if test x"$ac_cv_prog_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
     OPT_LDFLAGS='-Wl,-O1'
   fi
 
@@ -617,11 +617,9 @@ AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(acosf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(asinf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(atanf)
-  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(ceilf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(cosf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(coshf)
-  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(floorf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
@@ -686,11 +684,9 @@ AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_acosf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_asinf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_atanf)
-  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_atan2f)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_ceilf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_cosf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_coshf)
-  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_expf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_fabsf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_floorf)
   GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_fmodf)
@@ -752,10 +748,8 @@ dnl
 dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
 AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
   dnl Check for complex versions of math functions of platform.
-  AC_CHECK_HEADERS([complex.h])
   AC_CHECK_LIB(m, main)
-  AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf atan2f expf \
-  copysignf)
+  AC_REPLACE_MATHFUNCS(nan hypot hypotf atan2f expf copysignf)
 
   dnl Compile the long double complex functions only if the function 
   dnl provides the non-complex long double functions that are needed.
@@ -765,7 +759,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
   if test x$ac_cv_func_atan2l = x"yes" \
      && test x$ac_cv_func_copysignl = x"yes"; then
     USE_COMPLEX_LONG_DOUBLE=yes
-    AC_REPLACE_MATHFUNCS(csqrtl hypotl signbitl)
+    AC_REPLACE_MATHFUNCS(hypotl signbitl)
   fi
 
   AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
@@ -963,13 +957,6 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE_SUPPORT, [
       ctype_include_dir="config/os/generic"
       AC_MSG_WARN("Using default ctype headers.")
     fi
-
-    AC_LINK_FILES($ctype_include_dir/bits/ctype_base.h, 
-    include/bits/ctype_base.h)
-    AC_LINK_FILES($ctype_include_dir/bits/ctype_inline.h, 
-    include/bits/ctype_inline.h)
-    AC_LINK_FILES($ctype_include_dir/bits/ctype_noninline.h, \
-    include/bits/ctype_noninline.h)
   ])
 ])
 
@@ -980,103 +967,102 @@ dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled.  (This
 dnl must have been previously checked.)
 dnl
 dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found 
-dnl Define _GLIBCPP_NEED_MBSTATE_T if mbstate_t is not in wchar.h
+dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
 dnl
 dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
 AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
-  if test x$enable_c_mbchar != xno; then
-
-    dnl Sanity check for existence of ISO C99 headers for extended encoding.
-    AC_CHECK_HEADER(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
-    AC_CHECK_HEADER(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
-          
-    dnl Only continue checking if the ISO C99 headers exist.
-    if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
+
+  dnl Test wchar.h for mbstate_t, which is needed for char_traits and
+  dnl others even if wchar_t support is not on.
+  AC_MSG_CHECKING([for mbstate_t])
+  AC_TRY_COMPILE([#include <wchar.h>],
+  [mbstate_t teststate;], 
+  have_mbstate_t=yes, have_mbstate_t=no)
+  AC_MSG_RESULT($have_mbstate_t)
+  if test x"$have_mbstate_t" = xyes; then
+    AC_DEFINE(HAVE_MBSTATE_T)
+  fi
+
+  dnl Sanity check for existence of ISO C99 headers for extended encoding.
+  AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
+  AC_CHECK_HEADER(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
   
-      dnl Test wchar.h for mbstate_t, which is needed for char_traits
-      dnl and others.
-      AC_MSG_CHECKING([for mbstate_t])
-      AC_TRY_COMPILE([#include <wchar.h>],
-      [mbstate_t teststate;], 
-      use_native_mbstatet=yes, use_native_mbstatet=no)
-      AC_MSG_RESULT($use_native_mbstatet)
+  dnl Only continue checking if the ISO C99 headers exist and support is on.
+  if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes \
+     && test x"$enable_c_mbchar" != xno; then
+      
+    dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+    dnl numeric_limits can instantiate type_traits<wchar_t>
+    AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
+    AC_TRY_COMPILE([#include <wchar.h>],
+    [int i = WCHAR_MIN; int j = WCHAR_MAX;], 
+    has_wchar_minmax=yes, has_wchar_minmax=no)
+    AC_MSG_RESULT($has_wchar_minmax)
     
-      dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
-      dnl numeric_limits can instantiate type_traits<wchar_t>
-      AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
-      AC_TRY_COMPILE([#include <wchar.h>],
-      [int i = WCHAR_MIN; int j = WCHAR_MAX;], 
-      has_wchar_minmax=yes, has_wchar_minmax=no)
-      AC_MSG_RESULT($has_wchar_minmax)
-    
-      dnl Test wchar.h for WEOF, which is what we use to determine whether
-      dnl to specialize for char_traits<wchar_t> or not.
-      AC_MSG_CHECKING([for WEOF])
-      AC_TRY_COMPILE([
-        #include <wchar.h>
-        #include <stddef.h>],
-      [wint_t i = WEOF;],
-      has_weof=yes, has_weof=no)
-      AC_MSG_RESULT($has_weof)
+    dnl Test wchar.h for WEOF, which is what we use to determine whether
+    dnl to specialize for char_traits<wchar_t> or not.
+    AC_MSG_CHECKING([for WEOF])
+    AC_TRY_COMPILE([
+      #include <wchar.h>
+      #include <stddef.h>],
+    [wint_t i = WEOF;],
+    has_weof=yes, has_weof=no)
+    AC_MSG_RESULT($has_weof)
   
-      dnl Tests for wide character functions used in char_traits<wchar_t>.
-      AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset \
-      wcsrtombs mbsrtowcs, ac_wfuncs=yes, ac_wfuncs=no)
+    dnl Tests for wide character functions used in char_traits<wchar_t>.
+    AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset \
+    wcsrtombs mbsrtowcs, ac_wfuncs=yes, ac_wfuncs=no)
   
-      AC_MSG_CHECKING([for ISO C99 wchar_t support])
-      if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes \
-         && test x"$ac_wfuncs" = xyes; then
-        ac_isoC99_wchar_t=yes
-      else
-        ac_isoC99_wchar_t=no
-      fi
-      AC_MSG_RESULT($ac_isoC99_wchar_t)
+    AC_MSG_CHECKING([for ISO C99 wchar_t support])
+    if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes \
+       && test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    AC_MSG_RESULT($ac_isoC99_wchar_t)
   
-      dnl Use iconv for wchar_t to char conversions. As such, check for 
-      dnl X/Open Portability Guide, version 2 features (XPG2).
-      AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
-      AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
-
-      dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
-      AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
-      ac_save_LIBS="$LIBS"
-      LIBS="$LIBS $libiconv"
-
-      AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
-      ac_XPG2funcs=yes, ac_XPG2funcs=no)
+    dnl Use iconv for wchar_t to char conversions. As such, check for 
+    dnl X/Open Portability Guide, version 2 features (XPG2).
+    AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
+    AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+
+    dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
+    AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
+    ac_XPG2funcs=yes, ac_XPG2funcs=no)
   
-      LIBS="$ac_save_LIBS"
+    LIBS="$ac_save_LIBS"
 
-      AC_MSG_CHECKING([for XPG2 wchar_t support])
-      if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes \
-         && test x"$ac_XPG2funcs" = xyes; then
-        ac_XPG2_wchar_t=yes
-      else
-        ac_XPG2_wchar_t=no
-      fi
-      AC_MSG_RESULT($ac_XPG2_wchar_t)
-  
-      dnl At the moment, only enable wchar_t specializations if all the
-      dnl above support is present.
-      AC_MSG_CHECKING([for enabled wchar_t specializations])
-      if test x"$ac_isoC99_wchar_t" = xyes \
-         && test x"$ac_XPG2_wchar_t" = xyes; then
-        libinst_wstring_la="libinst-wstring.la"
-        AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
-        AC_MSG_RESULT("yes")
-      else
-        libinst_wstring_la=""
-        AC_MSG_RESULT("no")
-      fi
-      AC_SUBST(libinst_wstring_la)
+    AC_MSG_CHECKING([for XPG2 wchar_t support])
+    if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes \
+       && test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    AC_MSG_RESULT($ac_XPG2_wchar_t)
   
+    dnl At the moment, only enable wchar_t specializations if all the
+    dnl above support is present.
+    AC_MSG_CHECKING([for enabled wchar_t specializations])
+    if test x"$ac_isoC99_wchar_t" = xyes \
+       && test x"$ac_XPG2_wchar_t" = xyes; then
+      libinst_wstring_la="libinst-wstring.la"
+      AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
+      AC_MSG_RESULT("yes")
     else
-      AC_MSG_WARN([<wchar.h> not found])
+      libinst_wstring_la=""
+      AC_MSG_RESULT("no")
     fi
-
+    AC_SUBST(libinst_wstring_la)
+  
   else
-    dnl Wide characters disabled by the user.  Maybe print a warning?
-    :
+    dnl Wide characters disabled by the user. 
+    AC_MSG_WARN([wchar_t support disabled.])
   fi
 ])
 
@@ -1179,7 +1165,7 @@ dnl Option parsed, now set things appropriately
 case "${enable_debug}" in
     yes) 
         DEBUG_FLAGS='-O0 -ggdb3'                        
-        ;;
+        ;; 
     no)   
         DEBUG_FLAGS='-g'
         ;;
@@ -1197,9 +1183,9 @@ dnl     experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
 dnl     Somehow this same set of flags must be passed when [re]building
 dnl     libgcc.
 dnl --disable-cxx-flags passes nothing.
-dnl  +  See http://sourceware.cygnus.com/ml/libstdc++/2000-q2/msg00131.html
-dnl         http://sourceware.cygnus.com/ml/libstdc++/2000-q2/msg00284.html
-dnl         http://sourceware.cygnus.com/ml/libstdc++/2000-q1/msg00035.html
+dnl  +  See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
+dnl         http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
+dnl         http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
 dnl  +  Usage:  GLIBCPP_ENABLE_CXX_FLAGS(default flags)
 dnl       If "default flags" is an empty string (or "none"), the effect is
 dnl       the same as --disable or --enable=no.
@@ -1253,8 +1239,9 @@ dnl
 AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
   AC_MSG_CHECKING([for cstdio to use])
   AC_ARG_ENABLE(cstdio,
-  [  --enable-cstdio        enable stdio for target io package. (default)
-     --enable-cstdio=LIB    use LIB target-speific io package.], 
+  [  --enable-cstdio        enable stdio for target io package. 
+     --enable-cstdio=LIB    use LIB target-speific io package. [default=stdio]
+  ], 
   if test x$enable_cstdio = xno; then
      enable_cstdio=stdio
   fi,
@@ -1344,12 +1331,14 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
   AC_LINK_FILES($CCODECVT_C, libio/c_codecvt.c)
   # 2000-08-04 bkoz hack
 
+  AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
+                 test "$need_libio" = yes || test "$need_wlibio" = yes)
   AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
   AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
   if test "$need_libio" = yes || test "$need_wlibio" = yes; then
-       libio_la=../libio/libio.la
+    libio_la=../libio/libio.la
   else
-       libio_la=
+    libio_la=
   fi
   AC_SUBST(libio_la)
 ])
@@ -1369,8 +1358,9 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
   dnl Efforts should be made to keep this in sync.
   AC_MSG_CHECKING([for threads package to use])
   AC_ARG_ENABLE(threads,
-  [  --enable-threads        enable thread usage for target GCC.
-     --enable-threads=LIB    use LIB thread package for target GCC.],
+  [  --enable-threads       enable thread usage for target GCC.
+     --enable-threads=LIB   use LIB thread package for target GCC. [default=no]
+  ],
   if test x$enable_threads = xno; then
     enable_threads=''
   fi,
@@ -1477,7 +1467,7 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
   AC_MSG_CHECKING([for lldiv_t declaration])
   AC_CACHE_VAL(glibcpp_lldiv_t_use, [
   AC_TRY_COMPILE([#include <bits/os_defines.h>
-                 #include <stdlib.h>], 
+                  #include <stdlib.h>], 
                    [ lldiv_t mydivt;], 
                    [glibcpp_lldiv_t_use=yes], [glibcpp_lldiv_t_use=no])
   ])
@@ -1496,50 +1486,58 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
   if test x"$enable_long_long" = xyes; then
     AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
   fi
-       
+
   # Reset CFLAGS
   CFLAGS="$ac_save_CFLAGS"
 ])
 
 
 dnl
-dnl Check for whether or not to do shadowed C headers.
+dnl Check for what kind of C headers to use.
 dnl
-dnl GLIBCPP_ENABLE_SHADOW
-dnl --enable-cshadow-headers [does stuff].
-dnl --disable-cshadow-headers [does not do stuff].
-dnl  +  This will eventually need to be on by default.
-dnl  +  Usage:  GLIBCPP_ENABLE_SHADOW[(DEFAULT)]
-dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
-dnl       defaults to `no'.
-AC_DEFUN(GLIBCPP_ENABLE_SHADOW, [dnl
-define([GLIBCPP_ENABLE_SHADOW_DEFAULT], ifelse($1, yes, yes, no))dnl
-AC_MSG_CHECKING([for enabled cshadow headers])
-AC_ARG_ENABLE(cshadow-headers,
+dnl GLIBCPP_ENABLE_CHEADERS
+dnl --enable-cheaders= [does stuff].
+dnl --disable-cheaders [does not do anything, really].
+dnl  +  This will eventually need to be 'c_shadow' by default.
+dnl  +  Usage:  GLIBCPP_ENABLE_CHEADERS[(DEFAULT)]
+dnl       Where DEFAULT is either `c' or `c_std' or 'c_shadow'.  
+dnl       If ommitted, it defaults to `c_std'.
+AC_DEFUN(GLIBCPP_ENABLE_CHEADERS, [dnl
+define([GLIBCPP_ENABLE_CHEADERS_DEFAULT], ifelse($1, c_std, c_std, c_std))dnl
+AC_MSG_CHECKING([for c header strategy to use])
+AC_ARG_ENABLE(cheaders,
 changequote(<<, >>)dnl
-<<  --enable-cshadow-headers construct "shadowed" C header files for
-                           g++ [default=>>GLIBCPP_ENABLE_SHADOW_DEFAULT],
+<<  --enable-cheaders construct "C" header files for
+                           g++ [default=>>GLIBCPP_ENABLE_CHEADERS_DEFAULT],
 changequote([, ])
   [case "$enableval" in
-   yes) enable_cshadow_headers=yes 
+   c) 
+       enable_cheaders=c 
         ;;
-   no)  enable_cshadow_headers=no 
+   c_std)  
+       enable_cheaders=c_std 
         ;;
-   *)   AC_MSG_ERROR([Unknown argument to enable/disable shadowed C headers]) 
+   c_shadow)  
+       enable_cheaders=c_shadow 
+        ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable "C" headers]) 
         ;;
   esac],
-  enable_cshadow_headers=GLIBCPP_ENABLE_SHADOW_DEFAULT)
-  AC_MSG_RESULT($enable_cshadow_headers)
+  enable_cheaders=GLIBCPP_ENABLE_CHEADERS_DEFAULT)
+  AC_MSG_RESULT($enable_cheaders)
 
   dnl Option parsed, now set things appropriately
-  dnl NB: these things may be duplicated in c++config.h as well.
-  case "$enable_cshadow_headers" in
-    yes) 
+  case "$enable_cheaders" in
+    c_shadow) 
         CSHADOW_FLAGS="-fno-builtin"
-        C_INCLUDE_DIR='${top_srcdir}/include/c_std'
+        C_INCLUDE_DIR='${top_srcdir}/include/c_shadow'
         AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS)
         ;;
-    no)   
+    c_std)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${top_srcdir}/include/c_std'
+        ;;
+    c)   
         CSHADOW_FLAGS=""
         C_INCLUDE_DIR='${top_srcdir}/include/c'
         ;;
@@ -1547,7 +1545,7 @@ changequote([, ])
 
   AC_SUBST(CSHADOW_FLAGS)
   AC_SUBST(C_INCLUDE_DIR)
-  AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cshadow_headers" = yes)
+  AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cheaders" = c_shadow)
 ])
 
 
@@ -1595,7 +1593,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
 
   # Can either use include/c or include/c_std to grab "C" headers. This
   # variable is set to the include directory currently in use.
-  # set with C_INCLUDE_DIR in GLIBCPP_ENABLE_SHADOW
+  # set with C_INCLUDE_DIR in GLIBCPP_ENABLE_CHEADERS
    
   # Passed down for canadian crosses.
   if  test x"$CANADIAN" = xyes; then
@@ -1616,7 +1614,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
   #  CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR) \
   #                   -I$(top_blddir)/cshadow'
   #else
-  CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)'
+  CSTD_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)'
   #endif
 
   # Now, export this to all the little Makefiles....
@@ -1625,7 +1623,7 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
   AC_SUBST(LIBMATH_INCLUDES)
   AC_SUBST(LIBSUPCXX_INCLUDES)
   AC_SUBST(LIBIO_INCLUDES)
-  AC_SUBST(CSHADOW_INCLUDES)
+  AC_SUBST(CSTD_INCLUDES)
 ])