Hello,
On Mon, Aug 27, 2007 at 11:44:07AM -0400, Dave Mielke wrote:
> There are still uses of changequote() in aclocal.m4 which need to be dealt
> with. If you fix them then it'll be easier for me. :-) One of them, for
> example, relies on patsubst() being expanded so I'm not sure what'll happen if
> that line is quoted.
attached please find a patch.
I have verified with my autoconf-2.61 that the configure script
generated with the original aclocal.m4 and with the patched one is
the same.
(If you are using an older version of Autoconf, you might make the same
check with your version.)
The patsubsts were not a problem, I just quoted the second argument.
(A problem would appear if any of the manipulated strings used [ ],
but that was not the case.)
BTW: note that the parameter placeholders ($1, $2,...) can happily be
quoted, as the parameter substitution is a search-and-replace at the
time the macro expands, so it is practically orthogonal to the
quoting.
So this was a snap; any other contribution I can make to (the
autoconfigury of) the brltty project? :-)
(I have a sypathy for people who use Autotools creatively; and using
Autoconf solo, without Automake, really qualifies as that. ;-)
(But don't just say "review the whole autoconfigury"---at first
glance, it looks too big. ;-)
Have a nice day,
Stepan
2007-08-27 Stepan Kasal <[EMAIL PROTECTED]>
* aclocal.m4: Expunge changequote calls.
--- brltty-3.8/aclocal.m4 2007-06-04 15:20:45.000000000 +0200
+++ brltty-3.8.new/aclocal.m4 2007-08-27 18:25:13.000000000 +0200
@@ -5,9 +5,8 @@
AC_SEARCH_LIBS([$1], [$2], [AC_DEFINE_UNQUOTED(HAVE_${brltty_uc}, [1], [Define
this if the function $1 is available.])])])
AC_DEFUN([BRLTTY_VAR_TRIM], [dnl
-changequote(, )dnl
$1="`echo "${$1}" | sed -e 's/^ *//' -e 's/ *$//'`"
-changequote([, ])])
+])
AC_DEFUN([BRLTTY_VAR_EXPAND], [dnl
eval '$1="'"$2"'"'])
@@ -146,11 +145,9 @@
AC_DEFUN([BRLTTY_HELP_STRING], [dnl
AC_HELP_STRING([$1], patsubst([$2], [
.*$]), [brltty_help_prefix])dnl
-changequote(<, >)dnl
-patsubst(patsubst(<$2>, <\`[^
-]*>), <
->, <\&brltty_help_prefix>)<>dnl
-changequote([, ])dnl
+patsubst(patsubst([$2], [\`[^
+]*]), [
+], [\&brltty_help_prefix])[]dnl
])
m4_define([brltty_help_indent], 32)
m4_define([brltty_help_prefix], m4_format([%]brltty_help_indent[s], []))
@@ -210,8 +207,7 @@
then
while :
do
-changequote(, )dnl
- brltty_delimiter="`expr "${brltty_items}" : '[^,]*,'`"
+ [brltty_delimiter="`expr "${brltty_items}" : '[^,]*,'`"]
if test "${brltty_delimiter}" -eq 0
then
brltty_item="${brltty_items}"
@@ -239,8 +235,8 @@
break
fi
else
- brltty_item="`expr "${brltty_items}" : '\([^,]*\)'`"
- brltty_items="`expr "${brltty_items}" : '[^,]*,\(.*\)'`"
+ [brltty_item="`expr "${brltty_items}" : '\([^,]*\)'`"]
+ [brltty_items="`expr "${brltty_items}" : '[^,]*,\(.*\)'`"]
fi
brltty_item_suffix="${brltty_item#-}"
if test "${brltty_item}" = "${brltty_item_suffix}"
@@ -253,32 +249,31 @@
brltty_item_unknown=true
if test -n "${brltty_item}"
then
- brltty_item_entry="`expr "${brltty_item_entries_$1}" : '.*
\('"${brltty_item}"'-[^ ]*\)'`"
+ [brltty_item_entry="`expr "${brltty_item_entries_$1}" : '.*
\('"${brltty_item}"'-[^ ]*\)'`"]
if test -n "${brltty_item_entry}"
then
brltty_item_code="${brltty_item}"
- brltty_item_name="`expr "${brltty_item_entry}" :
'[^[.-.]]*-\(.*\)$'`"
+ [brltty_item_name="`expr "${brltty_item_entry}" :
'[^[.-.]]*-\(.*\)$'`"]
brltty_item_unknown=false
else
- brltty_item_entry="`expr "${brltty_item_entries_$1}" : '.*
\([^- ]*-'"${brltty_item}"'[^ ]*\)'`"
+ [brltty_item_entry="`expr "${brltty_item_entries_$1}" : '.*
\([^- ]*-'"${brltty_item}"'[^ ]*\)'`"]
if test -z "${brltty_item_entry}"
then
brltty_lowercase="`echo "${brltty_item_entries_$1}" | sed
'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ%abcdefghijklmnopqrstuvwxyz%'`"
- brltty_item_code="`expr "${brltty_lowercase}" : '.* \([^-
]*\)-'"${brltty_item}"`"
+ [brltty_item_code="`expr "${brltty_lowercase}" : '.* \([^-
]*\)-'"${brltty_item}"`"]
if test -n "${brltty_item_code}"
then
- brltty_item_entry="`expr "${brltty_item_entries_$1}" :
'.* \('"${brltty_item_code}"'-[^ ]*\)'`"
+ [brltty_item_entry="`expr "${brltty_item_entries_$1}" :
'.* \('"${brltty_item_code}"'-[^ ]*\)'`"]
fi
fi
if test -n "${brltty_item_entry}"
then
- brltty_item_code="`expr "${brltty_item_entry}" :
'\([^[.-.]]*\)'`"
- brltty_item_name="`expr "${brltty_item_entry}" :
'[^[.-.]]*-\(.*\)$'`"
+ [brltty_item_code="`expr "${brltty_item_entry}" :
'\([^[.-.]]*\)'`"]
+ [brltty_item_name="`expr "${brltty_item_entry}" :
'[^[.-.]]*-\(.*\)$'`"]
brltty_item_unknown=false
fi
fi
fi
-changequote([, ])dnl
if "${brltty_item_unknown}"
then
AC_MSG_ERROR([unknown $1 $2: ${brltty_item}])
@@ -337,9 +332,7 @@
then
if test -n "${brltty_internal_codes_$1}"
then
-changequote(, )dnl
- $1_driver_objects="`echo "${brltty_internal_names_$1}" | sed -e 's%\([^
][^ ]*\)%$(BLD_TOP)$2/\1/$1.$O%g'`"
-changequote([, ])dnl
+ [$1_driver_objects="`echo "${brltty_internal_names_$1}" | sed -e 's%\([^
][^ ]*\)%$(BLD_TOP)$2/\1/$1.$O%g'`"]
$1_help="$1-help"
fi
@@ -425,9 +418,7 @@
then
if test -z "${execute_root}"
then
-changequote()dnl
- if test `expr "${$1} " : '\${$3}/[^/]*$'` -gt 0
-changequote([, ])dnl
+ [if test `expr "${$1} " : '\${$3}/[^/]*$'` -gt 0]
then
$1="`echo ${$1} | sed -e 's%/%$2/%'`"
fi
@@ -435,9 +426,7 @@
fi])
AC_DEFUN([BRLTTY_EXECUTABLE_PATH], [dnl
-changequote()dnl
-if test `expr "${$1} " : '[^/ ][^/ ]*/'` -gt 0
-changequote([, ])dnl
+[if test `expr "${$1} " : '[^/ ][^/ ]*/'` -gt 0]
then
$1="`pwd`/${$1}"
fi])
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://mielke.cc/mailman/listinfo/brltty