From patchwork Thu Sep 30 09:42:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 66142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 714CFB70A8 for ; Thu, 30 Sep 2010 19:43:02 +1000 (EST) Received: (qmail 8392 invoked by alias); 30 Sep 2010 09:43:00 -0000 Received: (qmail 8374 invoked by uid 22791); 30 Sep 2010 09:42:59 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_CX, TW_DC, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Sep 2010 09:42:53 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8U9gqvo018025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Sep 2010 05:42:52 -0400 Received: from hase.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8U9godo028796; Thu, 30 Sep 2010 05:42:51 -0400 From: Andreas Schwab To: libstdc++@gcc.gnu.org Subject: Quoting fixes in GLIBCXX_ENABLE CC: gcc-patches@gcc.gnu.org X-Yow: YOW!!! I am having fun!!! Date: Thu, 30 Sep 2010 11:42:50 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The definition of GLIBCXX_ENABLE has some quoting problems which results in square brackets around optional arguments in the help text being lost during autoconf processing. OK? Andreas. 2010-09-30 Andreas Schwab * acinclude.m4 (GLIBCXX_ENABLE): Properly quote argument to AC_HELP_STRING. Double quote expansion of _g_help. (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Double quote third argument of GLIBCXX_ENABLE. (GLIBCXX_ENABLE_CHEADERS): Likewise. (GLIBCXX_ENABLE_CLOCALE): Likewise. (GLIBCXX_ENABLE_ALLOCATOR): Likewise. (GLIBCXX_ENABLE_CSTDIO): Likewise. (GLIBCXX_ENABLE_SYMVERS): Likewise. * configure: Regenerate. Index: libstdc++/acinclude.m4 =================================================================== --- libstdc++/acinclude.m4 (revision 164746) +++ libstdc++/acinclude.m4 (working copy) @@ -776,8 +776,8 @@ dnl m4_define([GLIBCXX_ENABLE],[dnl m4_define([_g_switch],[--enable-$1])dnl -m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl - AC_ARG_ENABLE($1,_g_help, +m4_define([_g_help],[AC_HELP_STRING([_g_switch$3],[$4 @<:@default=$2@:>@])])dnl + AC_ARG_ENABLE([$1],m4_dquote(_g_help), m4_bmatch([$5], [^permit ], [[ @@ -1072,7 +1072,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield]) - GLIBCXX_ENABLE(libstdcxx-time,$1,[=KIND], + GLIBCXX_ENABLE(libstdcxx-time,$1,[[[=KIND]]], [use KIND for check type], [permit yes|no|rt]) @@ -1684,7 +1684,7 @@ dnl Where DEFAULT is either 'c' or 'c_std' or 'c_global'. dnl AC_DEFUN([GLIBCXX_ENABLE_CHEADERS], [ - GLIBCXX_ENABLE(cheaders,$1,[=KIND], + GLIBCXX_ENABLE(cheaders,$1,[[[=KIND]]], [construct "C" headers for g++], [permit c|c_std|c_global]) AC_MSG_NOTICE("C" header strategy set to $enable_cheaders) @@ -1710,7 +1710,7 @@ dnl Default is generic. dnl AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + GLIBCXX_ENABLE(clocale,auto,[[[=MODEL]]], [use MODEL for target locale package], [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) @@ -1915,7 +1915,7 @@ dnl AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [ AC_MSG_CHECKING([for std::allocator base class]) - GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND], + GLIBCXX_ENABLE(libstdcxx-allocator,auto,[[[=KIND]]], [use KIND for target std::allocator base], [permit new|malloc|mt|bitmap|pool|yes|no|auto]) @@ -2022,7 +2022,7 @@ dnl AC_DEFUN([GLIBCXX_ENABLE_CSTDIO], [ AC_MSG_CHECKING([for underlying I/O to use]) - GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE], + GLIBCXX_ENABLE(cstdio,stdio,[[[=PACKAGE]]], [use target-specific I/O package], [permit stdio]) # Now that libio has been removed, you can have any color you want as long @@ -2812,7 +2812,7 @@ dnl AC_DEFUN([GLIBCXX_ENABLE_SYMVERS], [ -GLIBCXX_ENABLE(symvers,$1,[=STYLE], +GLIBCXX_ENABLE(symvers,$1,[[[=STYLE]]], [enables symbol versioning of the shared library], [permit yes|no|gnu|gnu-versioned-namespace|darwin|darwin-export|sun]) Index: libstdc++/configure =================================================================== --- libstdc++/configure (revision 164746) +++ libstdc++/configure (working copy) @@ -1492,14 +1492,16 @@ [default=auto] --enable-libstdcxx-pch build pre-compiled libstdc++ headers [default=$is_hosted] - --enable-cstdio=PACKAGE use target-specific I/O package [default=stdio] + --enable-cstdio[=PACKAGE] + use target-specific I/O package [default=stdio] --enable-clocale[=MODEL] use MODEL for target locale package [default=auto] --enable-nls use Native Language Support (default) - --enable-libstdcxx-allocator=KIND + --enable-libstdcxx-allocator[=KIND] use KIND for target std::allocator base [default=auto] - --enable-cheaders=KIND construct "C" headers for g++ [default=$c_model] + --enable-cheaders[=KIND] + construct "C" headers for g++ [default=$c_model] --enable-long-long enable template specializations for 'long long' [default=yes] --enable-wchar_t enable template specializations for 'wchar_t' @@ -1516,12 +1518,13 @@ --enable-fully-dynamic-string do not put empty strings in per-process static memory [default=no] - --enable-libstdcxx-time=KIND + --enable-libstdcxx-time[=KIND] use KIND for check type [default=no] --enable-tls Use thread-local storage [default=yes] --disable-rpath do not hardcode runtime library paths --enable-linux-futex use the Linux futex system call [default=default] - --enable-symvers=STYLE enables symbol versioning of the shared library + --enable-symvers[=STYLE] + enables symbol versioning of the shared library [default=yes] --enable-visibility enables visibility safe usage [default=yes] --enable-version-specific-runtime-libs @@ -11466,7 +11469,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11469 "configure" +#line 11472 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11572,7 +11575,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11575 "configure" +#line 11578 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14912,7 +14915,7 @@ # # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 14915 "configure" +#line 14918 "configure" struct S { ~S(); }; void bar(); void foo() @@ -15280,7 +15283,7 @@ # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15283 "configure" +#line 15286 "configure" int main() { typedef bool atomic_type; @@ -15317,7 +15320,7 @@ rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15320 "configure" +#line 15323 "configure" int main() { typedef short atomic_type; @@ -15354,7 +15357,7 @@ rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15357 "configure" +#line 15360 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -15392,7 +15395,7 @@ rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15395 "configure" +#line 15398 "configure" int main() { typedef long long atomic_type; @@ -15468,7 +15471,7 @@ # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15471 "configure" +#line 15474 "configure" int main() { _Decimal32 d1;