Re: [libav-devel] [PATCH] configure: separate option-arguments from options to POSIX commands

2012-10-19 Thread Diego Biurrun
On Sat, Oct 13, 2012 at 01:47:16PM +0300, Martin Storsjö wrote:
 On Sat, 13 Oct 2012, Måns Rullgård wrote:
 Martin Storsjö mar...@martin.st writes:
 On Sat, 13 Oct 2012, Mans Rullgard wrote:
 
 POSIX says this about option syntax:
 
  If the SYNOPSIS of a standard utility shows an option with a
  mandatory option-argument, a conforming application shall use
  separate arguments for that option and its option-argument.
  However, a conforming implementation shall also permit applications
  to specify the option and option-argument in the same argument
  string without intervening blank characters.
 
 Do I interpret this correctly if I read it as the tools should support
 both versions of parameter passing, so one that only supports either
 version is incorrect?
 
 It says tools should allow both, but scripts should always separate
 them.
 
 Ok then, the patch is ok with minix mentioned in the commit message.

Same for me: Patch is OK, mentioning Minix is an optional plus.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: separate option-arguments from options to POSIX commands

2012-10-13 Thread Martin Storsjö

On Sat, 13 Oct 2012, Mans Rullgard wrote:


POSIX says this about option syntax:

 If the SYNOPSIS of a standard utility shows an option with a
 mandatory option-argument, a conforming application shall use
 separate arguments for that option and its option-argument.
 However, a conforming implementation shall also permit applications
 to specify the option and option-argument in the same argument
 string without intervening blank characters.


Do I interpret this correctly if I read it as the tools should support 
both versions of parameter passing, so one that only supports either 
version is incorrect?


I'd appreciate if you'd amend the commit message to specify which actual 
systems this fixes.


// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: separate option-arguments from options to POSIX commands

2012-10-13 Thread Måns Rullgård
Martin Storsjö mar...@martin.st writes:

 On Sat, 13 Oct 2012, Mans Rullgard wrote:

 POSIX says this about option syntax:

  If the SYNOPSIS of a standard utility shows an option with a
  mandatory option-argument, a conforming application shall use
  separate arguments for that option and its option-argument.
  However, a conforming implementation shall also permit applications
  to specify the option and option-argument in the same argument
  string without intervening blank characters.

 Do I interpret this correctly if I read it as the tools should support
 both versions of parameter passing, so one that only supports either
 version is incorrect?

It says tools should allow both, but scripts should always separate
them.

 I'd appreciate if you'd amend the commit message to specify which
 actual systems this fixes.

Minix.

-- 
Måns Rullgård
m...@mansr.com
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: separate option-arguments from options to POSIX commands

2012-10-13 Thread Martin Storsjö

On Sat, 13 Oct 2012, Måns Rullgård wrote:


Martin Storsjö mar...@martin.st writes:


On Sat, 13 Oct 2012, Mans Rullgard wrote:


POSIX says this about option syntax:

 If the SYNOPSIS of a standard utility shows an option with a
 mandatory option-argument, a conforming application shall use
 separate arguments for that option and its option-argument.
 However, a conforming implementation shall also permit applications
 to specify the option and option-argument in the same argument
 string without intervening blank characters.


Do I interpret this correctly if I read it as the tools should support
both versions of parameter passing, so one that only supports either
version is incorrect?


It says tools should allow both, but scripts should always separate
them.


Ok then, the patch is ok with minix mentioned in the commit message.

// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] configure: separate option-arguments from options to POSIX commands

2012-10-12 Thread Mans Rullgard
POSIX says this about option syntax:

  If the SYNOPSIS of a standard utility shows an option with a
  mandatory option-argument, a conforming application shall use
  separate arguments for that option and its option-argument.
  However, a conforming implementation shall also permit applications
  to specify the option and option-argument in the same argument
  string without intervening blank characters.

Signed-off-by: Mans Rullgard m...@mansr.com
---
 configure | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/configure b/configure
index 20bd3ae..2890ab2 100755
--- a/configure
+++ b/configure
@@ -2241,14 +2241,14 @@ probe_cc(){
 
 if $_cc -v 21 | grep -q '^gcc.*LLVM'; then
 _type=llvm_gcc
-gcc_extra_ver=$(expr $($_cc --version | head -n1) : '.*\((.*)\)')
+gcc_extra_ver=$(expr $($_cc --version | head -n 1) : '.*\((.*)\)')
 _ident=llvm-gcc $($_cc -dumpversion) $gcc_extra_ver
 _depflags='-MMD -MF $(@:.o=.d) -MT $@'
 _cflags_speed='-O3'
 _cflags_size='-Os'
 elif $_cc -v 21 | grep -qi ^gcc; then
 _type=gcc
-gcc_version=$($_cc --version | head -n1)
+gcc_version=$($_cc --version | head -n 1)
 gcc_basever=$($_cc -dumpversion)
 gcc_pkg_ver=$(expr $gcc_version : '[^ ]* \(([^)]*)\)')
 gcc_ext_ver=$(expr $gcc_version : .*$gcc_pkg_ver $gcc_basever 
\\(.*\\))
@@ -2260,19 +2260,19 @@ probe_cc(){
 _cflags_size='-Os'
 elif $_cc --version 2/dev/null | grep -q Intel; then
 _type=icc
-_ident=$($_cc --version | head -n1)
+_ident=$($_cc --version | head -n 1)
 _depflags='-MMD'
 _cflags_speed='-O3'
 _cflags_size='-Os'
 _cflags_noopt='-O1'
 elif $_cc -v 21 | grep -q xlc; then
 _type=xlc
-_ident=$($_cc -qversion 2/dev/null | head -n1)
+_ident=$($_cc -qversion 2/dev/null | head -n 1)
 _cflags_speed='-O5'
 _cflags_size='-O5 -qcompact'
 elif $_cc -V 2/dev/null | grep -q Compaq; then
 _type=ccc
-_ident=$($_cc -V | head -n1 | cut -d' ' -f1-3)
+_ident=$($_cc -V | head -n 1 | cut -d ' ' -f 1-3)
 _DEPFLAGS='-M'
 debuglevel=3
 _ldflags='-Wl,-z,now' # calls to libots crash without this
@@ -2281,7 +2281,7 @@ probe_cc(){
 elif $_cc --vsn 2/dev/null | grep -q ARM C/C++ Compiler; then
 test -d $sysroot || die No valid sysroot specified.
 _type=armcc
-_ident=$($_cc --vsn | head -n1)
+_ident=$($_cc --vsn | head -n 1)
 armcc_conf=$PWD/armcc.conf
 $_cc --arm_linux_configure \
  --arm_linux_config_file=$armcc_conf \
@@ -2296,7 +2296,7 @@ probe_cc(){
 _cflags_size='-Os'
 elif $_cc -version 2/dev/null | grep -Eq 'TMS470|TI ARM'; then
 _type=tms470
-_ident=$($_cc -version | head -n1 | tr -s ' ')
+_ident=$($_cc -version | head -n 1 | tr -s ' ')
 _flags='--gcc --abi=eabi -me'
 _cflags='-D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__='
 _cc_e='-ppl -fe=$@'
@@ -2309,13 +2309,13 @@ probe_cc(){
 _flags_filter=tms470_flags
 elif $_cc -v 21 | grep -q clang; then
 _type=clang
-_ident=$($_cc --version | head -n1)
+_ident=$($_cc --version | head -n 1)
 _depflags='-MMD'
 _cflags_speed='-O3'
 _cflags_size='-Os'
 elif $_cc -V 21 | grep -q Sun; then
 _type=suncc
-_ident=$($_cc -V 21 | head -n1 | cut -d' ' -f 2-)
+_ident=$($_cc -V 21 | head -n 1 | cut -d ' ' -f 2-)
 _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $ | sed -e 
1s,^.*: ,$@: , -e \$$!s,\$$, \\\, -e 1!s,^.*: , ,  $(@:.o=.d)'
 _DEPFLAGS='-xM1 -xc99'
 _ldflags='-std=c99'
@@ -2324,14 +2324,14 @@ probe_cc(){
 _flags_filter=suncc_flags
 elif $_cc -v 21 | grep -q 'PathScale\|Path64'; then
 _type=pathscale
-_ident=$($_cc -v 21 | head -n1 | tr -d :)
+_ident=$($_cc -v 21 | head -n 1 | tr -d :)
 _depflags='-MMD -MF $(@:.o=.d) -MT $@'
 _cflags_speed='-O2'
 _cflags_size='-Os'
 _flags_filter=pathscale_flags
 elif $_cc -v 21 | grep -q Open64; then
 _type=open64
-_ident=$($_cc -v 21 | head -n1 | tr -d :)
+_ident=$($_cc -v 21 | head -n 1 | tr -d :)
 _depflags='-MMD -MF $(@:.o=.d) -MT $@'
 _cflags_speed='-O2'
 _cflags_size='-Os'
@@ -2346,7 +2346,7 @@ probe_cc(){
 _flags_filter=pgi_flags
 elif $_cc 21 | grep -q Microsoft; then
 _type=msvc
-_ident=$($cc 21 | head -n1)
+_ident=$($cc 21 | head -n 1)
 _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $ 21 | awk 
'\''/including/ { sub(/^.*file: */, ); gsub(/\\/, /); if (!match($$0, / /)) 
print $@:, $$0 }'\''  $(@:.o=.d)'
 _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
 _cflags_speed=-O2
@@ -2847,7 +2847,7 @@ case