[Mplayer-cvslog] CVS: main configure,1.932,1.933

Colin Leroy CVS syncmail at mplayerhq.hu
Fri Nov 5 14:16:18 CET 2004


CVS change done by Colin Leroy CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv30796

Modified Files:
	configure 
Log Message:
after an upgrade of fileutils, head and tail spit out errors on "-1" params
instead of behaving correctly. As these new versions will get more and more
used, fix configure script.

Example error:
Checking for CPU type ... head: `-1' option is obsolete; use `-n 1'
Try `head --help' for more information.



Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.932
retrieving revision 1.933
diff -u -r1.932 -r1.933
--- configure	3 Nov 2004 02:47:05 -0000	1.932
+++ configure	5 Nov 2004 13:16:14 -0000	1.933
@@ -544,8 +544,8 @@
  if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then
   echocheck "$_cc version"
   cc_vendor=intel
-  cc_name=`( $_cc -V ) 2>&1 | head -1 | cut -d ',' -f 1`
-  cc_version=`( $_cc -V ) 2>&1 | head -1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
+  cc_name=`( $_cc -V ) 2>&1 | head -n 1 | cut -d ',' -f 1`
+  cc_version=`( $_cc -V ) 2>&1 | head -n 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
   _cc_major=`echo $cc_version | cut -d '.' -f 1`
   _cc_minor=`echo $cc_version | cut -d '.' -f 2`
   # TODO verify older icc/ecc compatibility
@@ -568,7 +568,7 @@
  for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do
   echocheck "$_cc version"
   cc_vendor=gnu
-  cc_name=`( $_cc -v ) 2>&1 | tail -1 | cut -d ' ' -f 1`
+  cc_name=`( $_cc -v ) 2>&1 | tail -n 1 | cut -d ' ' -f 1`
   cc_version=`( $_cc -dumpversion ) 2>&1`
   if test "$?" -gt 0; then
     cc_version="not found"
@@ -683,9 +683,9 @@
 
 x86_exts_check()
 {
-  pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | head -1`
+  pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | head -n 1`
   if test -z "$pparam" ; then
-    pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -1`
+    pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -n 1`
   fi
 
   _mmx=no
@@ -714,11 +714,11 @@
   _def_arch="#define ARCH_X86 1"
   _target_arch="TARGET_ARCH_X86 = yes"
 
-  pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
-  pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2  | cut -d ' ' -f 2 | head -1`
-  pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
-  pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
-  pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
+  pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1`
+  pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2  | cut -d ' ' -f 2 | head -n 1`
+  pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1`
+  pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1`
+  pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1`
 
   x86_exts_check
 
@@ -979,7 +979,7 @@
 
     echocheck "CPU type"
     if linux && test -n "$_cpuinfo"; then
-	proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -1`
+	proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -n 1`
 	if test -n "`$_cpuinfo | grep altivec`"; then
 	    _altivec=yes
 	fi




More information about the MPlayer-cvslog mailing list