1
1

Fix a few places where we didn't properly escape []; consolidate all debug/optimization flag checking to use AC quadrigraphs properly

This commit was SVN r20097.
Этот коммит содержится в:
Jeff Squyres 2008-12-09 23:42:28 +00:00
родитель cad0f41391
Коммит ba359623e0
3 изменённых файлов: 29 добавлений и 44 удалений

Просмотреть файл

@ -11,6 +11,7 @@ dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -33,15 +34,17 @@ AC_DEFUN([OMPI_CHECK_OPTFLAGS],[
co_arg="$1" co_arg="$1"
co_found=0 co_found=0
for co_word in $co_arg; do for co_word in $co_arg; do
# See http://www.gnu.org/software/autoconf/manual/html_node/Quadrigraphs.html#Quadrigraphs
# for an explanation of @<:@ and @:>@ -- they m4 expand to [ and ]
case $co_word in case $co_word in
-g) co_found=1 ;; -g) co_found=1 ;;
-g[1-3]) co_found=1 ;; -g@<:@1-3@:>@) co_found=1 ;;
+K[0-5]) co_found=1 ;; +K@<:@0-5@:>@) co_found=1 ;;
-O) co_found=1 ;; -O) co_found=1 ;;
-O[0-9]) co_found=1 ;; -O@<:@0-9@:>@) co_found=1 ;;
-xO) co_found=1 ;; -xO) co_found=1 ;;
-xO[0-9]) co_found=1 ;; -xO@<:@0-9@:>@) co_found=1 ;;
-fast) co_found=1 ;; -fast) co_found=1 ;;
# The below Sun Studio flags require or # The below Sun Studio flags require or
# trigger -xO optimization # trigger -xO optimization

Просмотреть файл

@ -27,37 +27,17 @@ AC_DEFUN([OMPI_MAKE_STRIPPED_FLAGS],[
s_arg="$1" s_arg="$1"
s_result= s_result=
for s_word in $s_arg; do for s_word in $s_arg; do
# See http://www.gnu.org/software/autoconf/manual/html_node/Quadrigraphs.html#Quadrigraphs
# for an explanation of @<:@ and @:>@ -- they m4 expand to [ and ]
case $s_word in case $s_word in
-g) ;; -g) ;;
+K0) ;; -g@<:@1-3@:>@) ;;
+K1) ;; +K@<:@0-5@:>@) ;;
+K2) ;; -O) ;;
+K3) ;; -O@<:@0-9@:>@) ;;
+K4) ;; -xO) ;;
+K5) ;; -xO@<:@0-9@:>@) ;;
-O) ;; -fast) ;;
-O0) ;;
-O1) ;;
-O2) ;;
-O3) ;;
-O4) ;;
-O5) ;;
-O6) ;;
-O7) ;;
-O8) ;;
-O9) ;;
-xO) ;;
-xO0) ;;
-xO1) ;;
-xO2) ;;
-xO3) ;;
-xO4) ;;
-xO5) ;;
-xO6) ;;
-xO7) ;;
-xO8) ;;
-xO9) ;;
-fast) ;;
# The below Sun Studio flags require or # The below Sun Studio flags require or
# trigger -xO optimization # trigger -xO optimization

Просмотреть файл

@ -276,13 +276,15 @@ AC_DEFUN([OMPI_SETUP_CC],[
CFLAGS_WITHOUT_OPTFLAGS="" CFLAGS_WITHOUT_OPTFLAGS=""
for co_word in $CFLAGS ; do for co_word in $CFLAGS ; do
co_found=0 co_found=0
# See http://www.gnu.org/software/autoconf/manual/html_node/Quadrigraphs.html#Quadrigraphs
# for an explanation of @<:@ and @:>@ -- they m4 expand to [ and ]
case $co_word in case $co_word in
+K[0-5]) co_found=1 ;; +K@<:@0-5@:>@) co_found=1 ;;
-O) co_found=1 ;; -O) co_found=1 ;;
-O[0-9]) co_found=1 ;; -O@<:@0-9@:>@) co_found=1 ;;
-xO) co_found=1 ;; -xO) co_found=1 ;;
-xO[0-9]) co_found=1 ;; -xO@<:@0-9@:>@) co_found=1 ;;
-fast) co_found=1 ;; -fast) co_found=1 ;;
# The below Sun Studio flags require or # The below Sun Studio flags require or
# trigger -xO optimization # trigger -xO optimization