[FFmpeg-devel] configure script and "toupper()", Solaris vs FreeBSD
Måns Rullgård
mans
Tue Aug 14 22:45:41 CEST 2007
usleepless at gmail.com writes:
> Hi All,
>
> i am trying to get Mythtv-SVN to compile on FreeBSD. however, Mythtv
> is borrowing it's configure script from ffmpeg. the guys who are
> maintaining ffmpeg for FreeBSD have the same problem:
>
> in the configure script there is a function called "toupper". the
> current implementation of this function does not work properly on
> FreeBSD:
>
> toupper(){
> echo "$@" | tr '[a-z]' '[A-Z]'
> }
>
> implementations that do work on Freebsd:
>
> toupper(){
> echo "$@" | tr "[a-z]" "[A-Z]"
> }
I fail to see any significant difference between this and the current
version. Nothing in those strings is affected differently by single
compared to double quotes in a POSIX shell.
Can you provide some more details on why one of these works while the
other does not?
> toupper(){
> echo "$@" | tr [a-z] [A-Z]
> }
This will break horribly if run in a directory containing a file with
a single-letter name.
> toupper(){
> echo "$@" | tr [:lower:] [:upper:]
> }
As Ismail said, this breaks in some locales. That could of course be
worked around by forcing the locale to C.
> will it be worth the effort to add this to your "List of issues" ? or
> should i post a patch to this list?
The configure script requires a POSIX shell and POSIX utilities. This
should already be noted in the documentation.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list