autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: char-ranges.patch


From: Lars J. Aas
Subject: Re: char-ranges.patch
Date: Tue, 24 Oct 2000 15:57:55 +0200
User-agent: Mutt/1.2.5i

On Tue, Oct 24, 2000 at 01:54:33PM +0200, Akim Demaille wrote:
: >>>>> "Lars" == Lars J Aas <address@hidden> writes:
: 
: Lars> I've had the need for translating strings to upper and lowercase
: Lars> too recently (needed a macro argument in a define and in a
: Lars> variable name).  I propose that we create m4_toupper() and
: Lars> m4_tolower() for this purpose...
: 
: Patches are welcome :P


2000-10-24  Lars J. Aas  <address@hidden>

        * m4sugar.m4: (m4_tolower, m4_toupper): New macros.
        * acgeneral.m4 (AC_PREFIX_PROGRAM): Use m4_toupper().
        * aclang.m4 (AC_F77_FUNC): Use m4_toupper()/m4_tolower().

Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.587
diff -u -r1.587 acgeneral.m4
--- acgeneral.m4        2000/10/24 11:59:46     1.587
+++ acgeneral.m4        2000/10/24 13:52:35
@@ -3241,7 +3241,7 @@
 # No big loss, I think, since most configures don't use this macro anyway.
 AC_DEFUN([AC_PREFIX_PROGRAM],
 [dnl Get an upper case version of $[1].
-pushdef([AC_Prog], translit([$1], [a-z], [A-Z]))dnl
+pushdef([AC_Prog], m4_toupper([$1]))dnl
 if test "x$prefix" = xNONE; then
 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
   echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.74
diff -u -r1.74 aclang.m4
--- aclang.m4   2000/10/23 04:07:43     1.74
+++ aclang.m4   2000/10/24 13:52:36
@@ -1733,8 +1733,8 @@
 AC_DEFUN([AC_F77_FUNC],
 [AC_REQUIRE([_AC_F77_NAME_MANGLING])dnl
 case $ac_cv_f77_mangling in
-  upper*) ac_val="translit([$1],[a-z],[A-Z])" ;;
-  lower*) ac_val="translit([$1],[A-Z],[a-z])" ;;
+  upper*) ac_val="m4_toupper([$1])" ;;
+  lower*) ac_val="m4_tolower([$1])" ;;
   *)      ac_val="unknown" ;;
 esac
 case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac
Index: m4sugar.m4
===================================================================
RCS file: /cvs/autoconf/m4sugar.m4,v
retrieving revision 2.1
diff -u -r2.1 m4sugar.m4
--- m4sugar.m4  2000/10/23 19:13:37     2.1
+++ m4sugar.m4  2000/10/24 13:52:37
@@ -467,6 +467,14 @@
 ## Text processing.  ##
 ## ----------------- ##
 
+# m4_tolower(STRING)
+# m4_toupper(STRING)
+# ------------------
+# These macros lowercase and uppercase strings.
+
+define([m4_tolower], [translit([$1], [A-Z], [a-z])])
+define([m4_toupper], [translit([$1], [a-z], [A-Z])])
+
 
 # m4_quote(STRING)
 # ----------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]