From patchwork Tue May 22 20:37:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Add AC_ARG_ENABLE for libstdc++-v3 Date: Tue, 22 May 2012 10:37:04 -0000 From: rbmj X-Patchwork-Id: 160737 Message-Id: <4FBBF8F0.2000803@verizon.net> To: gcc-patches@gcc.gnu.org This patch adds an AC_ARG_ENABLE option to build/not build libstdc++-v3. I wrote the patch in order to allow the user to override the automatic disable for libstdc++-v3 for certain targets. Patch is against configure.ac in trunk. Robert Mason >From 69c085f3742e94501f4a202d1321e143afe9a115 Mon Sep 17 00:00:00 2001 From: rbmj Date: Tue, 22 May 2012 16:32:02 -0400 Subject: [PATCH] Added --enable-libstdc++-v3 option. --- configure.ac | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 378e9f5..c06b400 100644 --- a/configure.ac +++ b/configure.ac @@ -425,6 +425,15 @@ AC_ARG_ENABLE(libssp, ENABLE_LIBSSP=$enableval, ENABLE_LIBSSP=yes) +AC_ARG_ENABLE(libstdc++-v3, +AS_HELP_STRING([--disable-libstdc++-v3], + [do not build libstdc++-v3 directory]), +ENABLE_LIBSTDCXX=$enableval, +ENABLE_LIBSTDCXX=default) +if test "${ENABLE_LIBSTDCXX}" = "no" ; then + noconfigdirs="$noconfigdirs libstdc++-v3" +fi + # Save it here so that, even in case of --enable-libgcj, if the Java # front-end isn't enabled, we still get libgcj disabled. libgcj_saved=$libgcj @@ -544,19 +553,22 @@ case "${target}" in esac # Disable libstdc++-v3 for some systems. -case "${target}" in - *-*-vxworks*) - # VxWorks uses the Dinkumware C++ library. - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; - arm*-wince-pe*) - # the C++ libraries don't build on top of CE's C libraries - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; - avr-*-*) - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; -esac +# Allow user to override this if they pass --enable-libstdc++-v3 +if test "${ENABLE_LIBSTDCXX}" = "default" ; then + case "${target}" in + *-*-vxworks*) + # VxWorks uses the Dinkumware C++ library. + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + arm*-wince-pe*) + # the C++ libraries don't build on top of CE's C libraries + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + avr-*-*) + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + esac +fi # Disable Fortran for some systems. case "${target}" in -- 1.7.5.4