[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Yves Renard |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Sun, 4 Jun 2017 02:23:23 -0400 (EDT) |
branch: devel-yves
commit 0e9380ae46091c4d7cd7c876acc93a3119d181c9
Author: Yves Renard <address@hidden>
Date: Sun Jun 4 08:23:04 2017 +0200
adaptations for Mac osX
---
configure.ac | 6 ++++--
interface/src/python/Makefile.am | 2 +-
interface/src/python/getfem_python.c | 8 ++++----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index ef46104..988e802 100644
--- a/configure.ac
+++ b/configure.ac
@@ -547,7 +547,7 @@ CPPFLAGS="$CPPFLAGS $MUMPSINC"
MUMPS_LIBS=""
case $host in
*apple*)
- MUMPS_SEQ_LIBS="-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common
-lmpiseq -lpord"
+ MUMPS_SEQ_LIBS="-lsmumps -ldmumps -lcmumps -lzmumps -lmpiseq -lpord
-lmumps_common"
;;
*)
MUMPS_SEQ_LIBS="-lsmumps_seq -ldmumps_seq -lcmumps_seq -lzmumps_seq"
@@ -585,7 +585,7 @@ AC_ARG_WITH(mumps,
esac]
)
-
+save_LIBS="$LIBS";
if test "x$usemumps" = "xno" -o "x$acx_mumps_ok" = "xno"; then
echo "Building with MUMPS explicitly disabled";
else
@@ -627,8 +627,10 @@ else
if test "x$usemumps" = "xyes"; then
echo "Building with MUMPS (use --enable-mumps=no to disable it)"
+ LIBS="$MUMPS_LIBS $save_LIBS"
else
MUMPS_LIBS=""
+ LIBS="$save_LIBS"
fi;
fi;
diff --git a/interface/src/python/Makefile.am b/interface/src/python/Makefile.am
index 6759745..7a6ae9c 100644
--- a/interface/src/python/Makefile.am
+++ b/interface/src/python/Makefile.am
@@ -55,7 +55,7 @@ getfem_python_c.c : getfem_python.c
# ARCHFLAGS is set to empty to disable universal binaries with python 2.5 on
macos 10.5
_getfem.so: getfem_python_c.c ../libgetfemint.la $(GETFEM_LIB_LA)
touch _getfem.so && rm _getfem.so
- ARCHFLAGS="" python setup.py -v build --build-temp . --build-base .
--build-lib . --force
+ ARCHFLAGS="" CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py -v build
--build-temp . --build-base . --build-lib . --force
#LDSHARED="$(CXX) -shared" ARCHFLAGS="" python setup.py -v build --build-temp
. --build-base . --build-lib . --force
diff --git a/interface/src/python/getfem_python.c
b/interface/src/python/getfem_python.c
index d2408c7..7816c82 100644
--- a/interface/src/python/getfem_python.c
+++ b/interface/src/python/getfem_python.c
@@ -278,7 +278,7 @@ PyObject_to_gfi_array(gcollect *gc, PyObject *o)
if (PyString_Check(o)) {
//printf("String\n");
/* for strings, the pointer is shared, no copy */
- int L = strlen(PyString_AsString(o));
+ int L = (int)(strlen(PyString_AsString(o)));
char *s = PyString_AsString(o);
gc_ref(gc, o, 0);
@@ -420,8 +420,8 @@ PyObject_to_gfi_array(gcollect *gc, PyObject *o)
t->storage.type = GFI_CELL;
t->dim.dim_len = 1; t->dim.dim_val = &TGFISTORE(cell,len);
- if (PyTuple_Check(o)) TGFISTORE(cell,len) = PyTuple_GET_SIZE(o);
- else TGFISTORE(cell,len) = PyList_GET_SIZE(o);
+ if (PyTuple_Check(o)) TGFISTORE(cell,len) =
(unsigned)(PyTuple_GET_SIZE(o));
+ else TGFISTORE(cell,len) = (unsigned)(PyList_GET_SIZE(o));
if (!(TGFISTORE(cell,val)
= gc_alloc(gc,sizeof(gfi_array*)*TGFISTORE(cell,len)))) return NULL;
@@ -489,7 +489,7 @@ build_gfi_array_list(gcollect *gc, PyObject *tuple, char
**pfunction_name,
return NULL;
}
*pfunction_name = PyString_AsString(PyTuple_GET_ITEM(tuple,0));
- *nb = PyTuple_GET_SIZE(tuple) - 1;
+ *nb = (int)(PyTuple_GET_SIZE(tuple) - 1);
if (!(l = gc_alloc(gc, sizeof(gfi_array*) * *nb))) return NULL;
for (i=0, j = 0; i < *nb; ++i) {
PyObject *o = PyTuple_GET_ITEM(tuple,i+1);