This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: A question on ACX_BUGURL
On Fri, Mar 23, 2007 at 06:20:10PM -0000, Dave Korn wrote:
> On 23 March 2007 18:11, H. J. Lu wrote:
>
> > On Fri, Mar 23, 2007 at 06:55:38PM +0100, Andreas Schwab wrote:
> >> "H. J. Lu" <hjl@lucon.org> writes:
> >>
> >>> REPORT_BUGS_TO="<$1>"
> >>> - REPORT_BUGS_TEXI="@uref{$1}"
> >>> + REPORT_BUGS_TEXI="@uref{`echo $1 | sed 's/@/@@/g'`}"
> >>
> >> You need to quote $1.
> >
> > I treated it the same as
> >
> > REPORT_BUGS_TEXI="@uref{`echo $withval | sed 's/@/@@/g'`}".
> >
> > It works for me.
>
> It's a url, right? It could have colons and forward slashes, but I don't
> think most of the remaining metacharacters would be valid in a URL, would
> they?
>
If we want to change, we should first unify the argument processing
with something like the change below.
H.J.
---
--- acx.m4.url 2007-03-23 10:14:25.000000000 -0700
+++ acx.m4 2007-03-23 11:51:24.000000000 -0700
@@ -577,16 +577,23 @@ AC_DEFUN([ACX_BUGURL],[
[Direct users to URL to report a bug]),
[case "$withval" in
yes) AC_MSG_ERROR([bug URL not specified]) ;;
- no) REPORT_BUGS_TO="";
- REPORT_BUGS_TEXI=""
+ no) BUGURL="";
;;
- *) REPORT_BUGS_TO="<$withval>"
- REPORT_BUGS_TEXI="@uref{`echo $withval | sed 's/@/@@/g'`}"
+ *) BUGURL="$withval"
;;
esac],
- REPORT_BUGS_TO="<$1>"
- REPORT_BUGS_TEXI="@uref{`echo $1 | sed 's/@/@@/g'`}"
+ BUGURL="$1"
)
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=""
+ REPORT_BUGS_TEXI=""
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI="@uref{`echo $BUGURL | sed 's/@/@@/g'`}"
+ ;;
+ esac;
AC_SUBST(REPORT_BUGS_TO)
AC_SUBST(REPORT_BUGS_TEXI)
])