... | ... |
@@ -55,7 +55,14 @@ if test "x$use_pthread_stack_min" = xno; then |
55 | 55 |
fi |
56 | 56 |
|
57 | 57 |
|
58 |
- |
|
58 |
+AC_MSG_CHECKING([if R is using flexiblas]) |
|
59 |
+BLAS_LIBS=`"${R_HOME}/bin/R" CMD config BLAS_LIBS` |
|
60 |
+if echo "${BLAS_LIBS}" | grep flexiblas > /dev/null; then |
|
61 |
+ AC_MSG_RESULT([flexiblas found. preprocessCore specific threading will be disabled]) |
|
62 |
+ use_pthreads=no |
|
63 |
+else |
|
64 |
+ AC_MSG_RESULT([flexiblas not found. preprocessCore threading will not be disabled]) |
|
65 |
+fi |
|
59 | 66 |
|
60 | 67 |
AC_ARG_ENABLE([threading], |
61 | 68 |
AS_HELP_STRING([--disable-threading],[Disable threading])) |
... | ... |
@@ -55,14 +55,6 @@ if test "x$use_pthread_stack_min" = xno; then |
55 | 55 |
fi |
56 | 56 |
|
57 | 57 |
|
58 |
-AC_MSG_CHECKING([if R is using openblas]) |
|
59 |
-BLAS_LIBS=`"${R_HOME}/bin/R" CMD config BLAS_LIBS` |
|
60 |
-if echo "${BLAS_LIBS}" | grep openblas > /dev/null; then |
|
61 |
- AC_MSG_RESULT([openblas found. preprocessCore threading will be disabled]) |
|
62 |
- use_pthreads=no |
|
63 |
-else |
|
64 |
- AC_MSG_RESULT([openblas not found. preprocessCore threading will not be disabled]) |
|
65 |
-fi |
|
66 | 58 |
|
67 | 59 |
|
68 | 60 |
AC_ARG_ENABLE([threading], |
... | ... |
@@ -25,8 +25,6 @@ AC_PROG_CPP |
25 | 25 |
|
26 | 26 |
AC_LANG(C) |
27 | 27 |
|
28 |
- |
|
29 |
- |
|
30 | 28 |
# Checks for libraries. |
31 | 29 |
use_pthreads=no |
32 | 30 |
AC_SEARCH_LIBS([pthread_create], [pthread], |
... | ... |
@@ -57,10 +55,21 @@ if test "x$use_pthread_stack_min" = xno; then |
57 | 55 |
fi |
58 | 56 |
|
59 | 57 |
|
58 |
+AC_MSG_CHECKING([if R is using openblas]) |
|
59 |
+BLAS_LIBS=`"${R_HOME}/bin/R" CMD config BLAS_LIBS` |
|
60 |
+if echo "${BLAS_LIBS}" | grep openblas > /dev/null; then |
|
61 |
+ AC_MSG_RESULT([openblas found. preprocessCore threading will be disabled]) |
|
62 |
+ use_pthreads=no |
|
63 |
+else |
|
64 |
+ AC_MSG_RESULT([openblas not found. preprocessCore threading will not be disabled]) |
|
65 |
+fi |
|
66 |
+ |
|
67 |
+ |
|
60 | 68 |
AC_ARG_ENABLE([threading], |
61 | 69 |
AS_HELP_STRING([--disable-threading],[Disable threading])) |
62 | 70 |
|
63 | 71 |
|
72 |
+ |
|
64 | 73 |
AS_IF([test "x$enable_threading" != "xno" ],[ |
65 | 74 |
if test "x${use_pthreads}" = "xno"; then |
66 | 75 |
AC_MSG_NOTICE(------------------------------------------) |
... | ... |
@@ -1,12 +1,6 @@ |
1 | 1 |
dnl |
2 |
-dnl Configuration things for affyR. |
|
3 |
-dnl (http://www.cbs.dtu.dk/laurent/download/affyR/ |
|
4 |
-dnl What is below (and in the other configuration fiels |
|
5 |
-dnl was taken from different configuration scripts for R version 1.3.0. |
|
2 |
+dnl Configuration things for preprocessCore |
|
6 | 3 |
dnl |
7 |
-dnl Acknowledgments: The author(s) of the R configure scripts, Kurt Hornik for the tip with autoconf. |
|
8 |
-dnl |
|
9 |
-dnl Laurent 2001 |
|
10 | 4 |
|
11 | 5 |
|
12 | 6 |
AC_INIT("DESCRIPTION") |
... | ... |
@@ -29,6 +23,7 @@ AC_PROG_CC |
29 | 23 |
AC_PROG_CPP |
30 | 24 |
|
31 | 25 |
|
26 |
+AC_LANG(C) |
|
32 | 27 |
|
33 | 28 |
|
34 | 29 |
|
... | ... |
@@ -48,13 +43,13 @@ fi |
48 | 43 |
|
49 | 44 |
|
50 | 45 |
AC_MSG_CHECKING([if PTHREAD_STACK_MIN is defined]) |
51 |
-AC_COMPILE_IFELSE([ |
|
46 |
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
|
52 | 47 |
#include <pthread.h> |
53 | 48 |
#include <limits.h> |
54 | 49 |
|
55 | 50 |
int main () {size_t stacksize = PTHREAD_STACK_MIN + 0x4000; |
56 | 51 |
} |
57 |
- ],[use_pthread_stack_min=yes], [use_pthread_stack_min=no]) |
|
52 |
+ ])],[use_pthread_stack_min=yes], [use_pthread_stack_min=no]) |
|
58 | 53 |
AC_MSG_RESULT($use_pthread_stack_min) |
59 | 54 |
|
60 | 55 |
if test "x$use_pthread_stack_min" = xno; then |
... | ... |
@@ -62,17 +57,28 @@ if test "x$use_pthread_stack_min" = xno; then |
62 | 57 |
fi |
63 | 58 |
|
64 | 59 |
|
60 |
+AC_ARG_ENABLE([threading], |
|
61 |
+ AS_HELP_STRING([--disable-threading],[Disable threading])) |
|
65 | 62 |
|
66 |
-if test "x${use_pthreads}" = "xno"; then |
|
67 |
- echo "------------------------------------------" |
|
68 |
- echo " Unable to find pthreads on this system. " |
|
69 |
- echo " Building a single-threaded version. " |
|
70 |
- echo "------------------------------------------" |
|
71 |
-fi |
|
72 | 63 |
|
73 |
-if test "x${use_pthreads}" = "xyes"; then |
|
74 |
- AC_DEFINE(USE_PTHREADS, 1) |
|
75 |
-fi |
|
64 |
+AS_IF([test "x$enable_threading" != "xno" ],[ |
|
65 |
+ if test "x${use_pthreads}" = "xno"; then |
|
66 |
+ AC_MSG_NOTICE(------------------------------------------) |
|
67 |
+ AC_MSG_NOTICE( Unable to find pthreads on this system. ) |
|
68 |
+ AC_MSG_NOTICE( Building a single-threaded version. ) |
|
69 |
+ AC_MSG_NOTICE(------------------------------------------) |
|
70 |
+ fi |
|
71 |
+ |
|
72 |
+ |
|
73 |
+ if test "x${use_pthreads}" = "xyes"; then |
|
74 |
+ AC_MSG_NOTICE(Enabling threading for preprocessCore) |
|
75 |
+ AC_DEFINE(USE_PTHREADS, 1) |
|
76 |
+ fi |
|
77 |
+ ], |
|
78 |
+ [ |
|
79 |
+ AC_MSG_NOTICE("Disabling threading for\n preprocessCore") |
|
80 |
+ ]) |
|
81 |
+ |
|
76 | 82 |
|
77 | 83 |
|
78 | 84 |
|
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,80 @@ |
1 |
+dnl |
|
2 |
+dnl Configuration things for affyR. |
|
3 |
+dnl (http://www.cbs.dtu.dk/laurent/download/affyR/ |
|
4 |
+dnl What is below (and in the other configuration fiels |
|
5 |
+dnl was taken from different configuration scripts for R version 1.3.0. |
|
6 |
+dnl |
|
7 |
+dnl Acknowledgments: The author(s) of the R configure scripts, Kurt Hornik for the tip with autoconf. |
|
8 |
+dnl |
|
9 |
+dnl Laurent 2001 |
|
10 |
+ |
|
11 |
+ |
|
12 |
+AC_INIT("DESCRIPTION") |
|
13 |
+ |
|
14 |
+dnl |
|
15 |
+dnl Are things (still) the same ? |
|
16 |
+dnl (taken from the 'writing R extensions manual') |
|
17 |
+ |
|
18 |
+dnl Now find the compiler and compiler flags to use |
|
19 |
+: ${R_HOME=`R RHOME`} |
|
20 |
+if test -z "${R_HOME}"; then |
|
21 |
+ echo "could not determine R_HOME" |
|
22 |
+ exit 1 |
|
23 |
+fi |
|
24 |
+CC=`"${R_HOME}/bin/R" CMD config CC` |
|
25 |
+CPP=`"${R_HOME}/bin/R" CMD config CPP` |
|
26 |
+CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` |
|
27 |
+CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` |
|
28 |
+AC_PROG_CC |
|
29 |
+AC_PROG_CPP |
|
30 |
+ |
|
31 |
+ |
|
32 |
+ |
|
33 |
+ |
|
34 |
+ |
|
35 |
+# Checks for libraries. |
|
36 |
+use_pthreads=no |
|
37 |
+AC_SEARCH_LIBS([pthread_create], [pthread], |
|
38 |
+ [use_pthreads=yes]) |
|
39 |
+ |
|
40 |
+# Checks for header files. |
|
41 |
+AC_HEADER_STDC |
|
42 |
+AC_CHECK_HEADERS([stdlib.h]) |
|
43 |
+ |
|
44 |
+if test "x${have_pthreads}" = xyes; then |
|
45 |
+ AC_CHECK_HEADERS([pthread.h], [], |
|
46 |
+ [use_pthreads=no]) |
|
47 |
+fi |
|
48 |
+ |
|
49 |
+ |
|
50 |
+AC_MSG_CHECKING([if PTHREAD_STACK_MIN is defined]) |
|
51 |
+AC_COMPILE_IFELSE([ |
|
52 |
+ #include <pthread.h> |
|
53 |
+ #include <limits.h> |
|
54 |
+ |
|
55 |
+ int main () {size_t stacksize = PTHREAD_STACK_MIN + 0x4000; |
|
56 |
+} |
|
57 |
+ ],[use_pthread_stack_min=yes], [use_pthread_stack_min=no]) |
|
58 |
+AC_MSG_RESULT($use_pthread_stack_min) |
|
59 |
+ |
|
60 |
+if test "x$use_pthread_stack_min" = xno; then |
|
61 |
+ use_pthreads=no |
|
62 |
+fi |
|
63 |
+ |
|
64 |
+ |
|
65 |
+ |
|
66 |
+if test "x${use_pthreads}" = "xno"; then |
|
67 |
+ echo "------------------------------------------" |
|
68 |
+ echo " Unable to find pthreads on this system. " |
|
69 |
+ echo " Building a single-threaded version. " |
|
70 |
+ echo "------------------------------------------" |
|
71 |
+fi |
|
72 |
+ |
|
73 |
+if test "x${use_pthreads}" = "xyes"; then |
|
74 |
+ AC_DEFINE(USE_PTHREADS, 1) |
|
75 |
+fi |
|
76 |
+ |
|
77 |
+ |
|
78 |
+ |
|
79 |
+ |
|
80 |
+AC_OUTPUT(src/Makevars) |