libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd configure.in configure


From: Edward Rosten
Subject: [libcvd-members] libcvd configure.in configure
Date: Tue, 12 Jun 2007 19:44:13 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        07/06/12 19:44:12

Modified files:
        .              : configure.in configure 

Log message:
        P4 D and --with-cpu=

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure.in?cvsroot=libcvd&r1=1.83&r2=1.84
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure?cvsroot=libcvd&r1=1.84&r2=1.85

Patches:
Index: configure.in
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure.in,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- configure.in        12 Jun 2007 17:17:50 -0000      1.83
+++ configure.in        12 Jun 2007 19:44:12 -0000      1.84
@@ -124,23 +124,39 @@
 
 
 #Custom host CPU detection
-case "$host" in
+AC_MSG_CHECKING([CPU type])
+AC_ARG_WITH(CPu, [  --with-cpu=[type]         Specify pocessor type:
+                            X86:
+                              p3 p4 p4_64 xeon pM core2 core2_64 opteron
+                              opteron_64 athlon athlon64 athlon64_64
+                            SPARC:
+                              sparc
+                          Autodetection works on Linux only.])
+if test "$with_cpu" == ""
+then 
+       case "$host" in
        *86*linux*)
                cpu="`awk '
-/Pentium III/                                          {print "p3";exit}
-/Intel\(R\) Pentium\(R\) 4/                    {print "p4";exit}
-/Intel\(R\) Pentium\(R\) M/                    {print "pM";exit}
-/Intel\(R\) Core\(TM\)2/                       {print "core2";exit}
-/Intel\(R\) Xeon\(TM\)/                                {print "xeon";exit}
-/Intel\(R\) XEON\(TM\)/                                {print "xeon";exit}
-/AMD Athlon\(tm\) 64 Processor/                {print "athlon64";exit}
-/AMD Athlon\(tm\)/                                     {print "athlon";exit}
-/AMD Opteron\(tm\)/                                    {print "opteron";exit}' 
/proc/cpuinfo`"
+       /Pentium III/                                           {print 
"p3";exit}
+       /Intel\(R\) Pentium\(R\) 4/                     {print "p4";exit}
+       /Intel\(R\) Pentium\(R\) D/                     {print "p4";exit}
+       /Intel\(R\) Pentium\(R\) M/                     {print "pM";exit}
+       /Intel\(R\) Core\(TM\)2/                        {print "core2";exit}
+       /Intel\(R\) Xeon\(TM\)/                         {print "xeon";exit}
+       /Intel\(R\) XEON\(TM\)/                         {print "xeon";exit}
+       /AMD Athlon\(tm\) 64 Processor/         {print "athlon64";exit}
+       /AMD Athlon\(tm\)/                                      {print 
"athlon";exit}
+       /AMD Opteron\(tm\)/                                     {print 
"opteron";exit}' /proc/cpuinfo`"
        ;;
        sparc*)
                cpu=sparc
                ;;
-esac
+       esac
+else
+       cpu="$with_cpu"
+fi
+
+AC_MSG_RESULT($cpu)
 
 AC_ARG_WITH(simd, [  --without-simd          disable SIMD code])
 

Index: configure
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- configure   12 Jun 2007 17:17:50 -0000      1.84
+++ configure   12 Jun 2007 19:44:12 -0000      1.85
@@ -862,6 +862,13 @@
   --without-debug         compile without debug support
   --with-debug=flags      compile with debug support
   --with-profile=flags    compile with profile support
+  --with-cpu=type         Specify pocessor type:
+                            X86:
+                              p3 p4 p4_64 xeon pM core2 core2_64 opteron
+                              opteron_64 athlon athlon64 athlon64_64
+                            SPARC:
+                              sparc
+                          Autodetection works on Linux only.
   --without-simd          disable SIMD code
     --with-mmx            force presence or absence of MMX  (x86 only)
     --with-mmxext         force presence or absence of MMXEXT (x86 only)
@@ -3890,23 +3897,40 @@
 
 
 #Custom host CPU detection
-case "$host" in
+echo "$as_me:$LINENO: checking CPU type" >&5
+echo $ECHO_N "checking CPU type... $ECHO_C" >&6
+
+# Check whether --with-CPu or --without-CPu was given.
+if test "${with_CPu+set}" = set; then
+  withval="$with_CPu"
+
+fi;
+if test "$with_cpu" == ""
+then
+       case "$host" in
        *86*linux*)
                cpu="`awk '
-/Pentium III/                                          {print "p3";exit}
-/Intel\(R\) Pentium\(R\) 4/                    {print "p4";exit}
-/Intel\(R\) Pentium\(R\) M/                    {print "pM";exit}
-/Intel\(R\) Core\(TM\)2/                       {print "core2";exit}
-/Intel\(R\) Xeon\(TM\)/                                {print "xeon";exit}
-/Intel\(R\) XEON\(TM\)/                                {print "xeon";exit}
-/AMD Athlon\(tm\) 64 Processor/                {print "athlon64";exit}
-/AMD Athlon\(tm\)/                                     {print "athlon";exit}
-/AMD Opteron\(tm\)/                                    {print "opteron";exit}' 
/proc/cpuinfo`"
+       /Pentium III/                                           {print 
"p3";exit}
+       /Intel\(R\) Pentium\(R\) 4/                     {print "p4";exit}
+       /Intel\(R\) Pentium\(R\) D/                     {print "p4";exit}
+       /Intel\(R\) Pentium\(R\) M/                     {print "pM";exit}
+       /Intel\(R\) Core\(TM\)2/                        {print "core2";exit}
+       /Intel\(R\) Xeon\(TM\)/                         {print "xeon";exit}
+       /Intel\(R\) XEON\(TM\)/                         {print "xeon";exit}
+       /AMD Athlon\(tm\) 64 Processor/         {print "athlon64";exit}
+       /AMD Athlon\(tm\)/                                      {print 
"athlon";exit}
+       /AMD Opteron\(tm\)/                                     {print 
"opteron";exit}' /proc/cpuinfo`"
        ;;
        sparc*)
                cpu=sparc
                ;;
-esac
+       esac
+else
+       cpu="$with_cpu"
+fi
+
+echo "$as_me:$LINENO: result: $cpu" >&5
+echo "${ECHO_T}$cpu" >&6
 
 
 # Check whether --with-simd or --without-simd was given.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]