[Ecm-commits] r1429 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Fri Jan 22 21:42:32 CET 2010


Author: kruppa
Date: 2010-01-22 21:42:31 +0100 (Fri, 22 Jan 2010)
New Revision: 1429

Modified:
   trunk/configure.in
Log:
Enable asm mulredc by default only on x86_64 and 64 bit PowerPC
Check for GSL


Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2010-01-22 20:23:19 UTC (rev 1428)
+++ trunk/configure.in	2010-01-22 20:42:31 UTC (rev 1429)
@@ -68,12 +68,20 @@
 ########################
 # Enable asm redc code #
 ########################
+# If --(en|dis)able-asm-redc not specified, choose default value
 # Test if asm redc code is available for this cpu.
-# If enable_asm_redc is not defined, change to "yes" or "no" accordingly
 # Point ASMPATH to the correct subdirectory.
 
-if test "x$enable_asm_redc" = "xyes" -o "x$enable_asm_redc" = "x"; then
+# asm_redc enabled by default for x86_64 and 64 bit PowerPC
+if test "x$enable_asm_redc" = "x"; then
   case $host in
+    x86_64* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
+    *) enable_asm_redc=no;;
+  esac
+fi
+
+if test "x$enable_asm_redc" = "xyes"; then
+  case $host in
     pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
     athlon-*-*) ASMPATH=athlon;;
     x86_64-*-*)  ASMPATH=x86_64;; 
@@ -84,23 +92,10 @@
     i[[56]]86-*-* | k[[78]]*-*-* | athlon*-*-* | pentiumpro-*-* | \
     pentium2-*-* | viac3*-*-* | i686-apple-darwin*)
     		   	  ASMPATH=athlon;;
-    *) # If user explicitly specified --enable-asm-redc and no asm redc
-       # is available for this cpu, stop with an error message
-       if test "x$enable_asm_redc" = "xyes"; then
-           AC_MSG_ERROR([[asm redc not available on this machine $host]])
-       fi
-       # Otherwise if no asm redc is available, simply disable it
-       enable_asm_redc=no;;
+    *) AC_MSG_ERROR([[asm redc not available on this machine $host]]);;
   esac
 
-  if test "x$enable_asm_redc" = "x"; then
-    enable_asm_redc=yes
-  fi
-fi
-
-# If the above test decided on using asm redc code, do the necessary 
-# definitions and includes
-if test "x$enable_asm_redc" = "xyes"; then
+# do the necessary definitions and includes
   AC_DEFINE(NATIVE_REDC,1,[Define to 1 to use asm redc])
   test -n "$CCAS" || CCAS="$CC -c"
   AC_SUBST(CCAS)
@@ -179,7 +174,10 @@
 
 dnl Checks for library functions that are not in GMP
 AC_FUNC_STRTOD
-AC_CHECK_LIB(m, floor)
+dnl Check for GSL, as recommended by GSL:
+AC_CHECK_LIB([m],[cos])
+AC_CHECK_LIB([gslcblas],[cblas_dgemm])
+AC_CHECK_LIB([gsl],[gsl_blas_dgemm])
 AC_CHECK_FUNCS([floor sqrt pow fmod], [], AC_MSG_ERROR([required function missing]))
 AC_CHECK_FUNCS([isascii memset strchr strlen strncasecmp strstr], [], AC_MSG_ERROR([required function missing]))
 AC_CHECK_FUNCS([access unlink], [], AC_MSG_ERROR([required function missing]))





More information about the Ecm-commits mailing list