On Mon, Jul 19, 2004 at 11:57:50AM +0100, Max Bowsher wrote:
> >> + if test -z "$4"; then
> >> + AC_MSG_ERROR([the APR_FI@&[EMAIL PROTECTED] macro requires an
> acceptable-majors
> >> parameter]) + fi
> >
> > You could have used an m4 conditional and ``errprint'' to raise this error
> at
> > autoconf-time.
>
> I'll read up on that, and produce a new version of the patch, but this
> probably doesn't need to hold up 1.0
Agreed. It may not even be a good idea, but I figured I would throw it out.
> > What is that @&t@ business?
>
> It expands to nothing. Without it there, APR_FIND_APR contains the string
> APR_FIND_APR, and m4 recurses infinitely.
Would this be clearer?: [the APR_F][IND_APR macro ...]
> >> + case $apr_bundled_major in
> >> + "")
> >> + AC_MSG_ERROR([failed to find major version of bundled APR])
> >> + ;;
> >> + 0)
> >> + apr_temp_apr_config_file="apr-config"
> >> + ;;
> >> + *)
> >> + apr_temp_apr_config_file="apr-$apr_bundled_major-config"
> >> + ;;
> >> + esac
> >
> > Would this make more sense as follows?
> >
> > case $apr_bundled_major in
> > 0)
> > apr_temp_apr_config_file="apr-config"
> > ;;
> > [[:digit:]])
> > apr_temp_apr_config_file="apr-$apr_bundled_major-config"
> > ;;
> > *)
> > AC_MSG_ERROR([failed to find major version of bundled APR])
> > ;;
> > esac
>
> Is [[:digit:]] portable?
POSIX requires it. It works (with /bin/sh) on HP/UX and Tru64. It does not
work on FreeBSD or NetBSD. One must use /usr/xpg4/bin/sh and not /bin/sh on
Solaris 2.8. It works on bash.
Okay, I would not use it, and I will add this information to the Autoconf
manual's shell portability notes.
> This will work until apr 10.0 is released :-)
[[:digit:]])
[[:digit:]][[:digit:]])
[[:digit:]][[:digit:]][[:digit:]])
apr_temp_apr_config_file="apr-$apr_bundled_major-config"
;;
... should suffice for a few millenia of Apache.
> Perhaps I should use expr instead of shell globbing?
Maybe, but I think your solution is fine. Sorry for the noise.