diff --git a/.circleci/config.yml b/.circleci/config.yml index 1acb42d..5ca7eea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,7 +104,7 @@ jobs: environment: WORKDIR: "test_macos_libcf_py2" PY_VER: "py2" - CONDA_COMPILER: "gcc" + CONDA_COMPILER: "clang_osx-64" steps: - checkout - run: *setup_miniconda @@ -125,7 +125,7 @@ jobs: environment: WORKDIR: "test_macos_libcf_py3" PY_VER: "py3" - CONDA_COMPILER: "gcc" + CONDA_COMPILER: "clang_osx-64" steps: - checkout - run: *setup_miniconda diff --git a/cf_config.h b/cf_config.h index e851de2..9710cf6 100644 --- a/cf_config.h +++ b/cf_config.h @@ -21,10 +21,10 @@ /* Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran. */ -/* #undef FC_FUNC */ +#define FC_FUNC(name,NAME) name ## _ /* As FC_FUNC, but for C identifiers containing underscores. */ -/* #undef FC_FUNC_ */ +#define FC_FUNC_(name,NAME) name ## _ /* Define to 1 if you have `alloca', as a function or macro. */ #define HAVE_ALLOCA 1 @@ -70,7 +70,7 @@ #define HAVE_STRING_H 1 /* Define this if you have strlcat() */ -/* #undef HAVE_STRLCAT */ +#define HAVE_STRLCAT 1 /* Define to 1 if `st_blksize' is a member of `struct stat'. */ #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 diff --git a/recipe/build.sh b/recipe/build.sh index 0edcaff..4f7f3ff 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,10 +1,15 @@ -#source activate "${CONDA_DEFAULT_ENV}" -export CFLAGS="-Wall -m64 -pipe -O2 -fPIC ${CFLAGS}" +export CFLAGS="-Wall -m64 -pipe -O2 -fPIC -I${PREFIX}/include ${CFLAGS}" export CXXFLAGS="${CFLAGS} ${CXXFLAGS}" export CPPFLAGS="-I${PREFIX}/include ${CPPFLAGS}" export LDFLAGS="-L${PREFIX}/lib ${LDFLAGS}" export LFLAGS="-fPIC ${LFLAGS}" export FC="" +# needed for clang_osx-64 +if [ ${HOME} == "/Users/distiller" ]; then + export CFLAGS="-Wl,-syslibroot / -isysroot / ${CFLAGS}" + # configure need this otherwise "error.h" is not found and configure report netcdf.h + export CPPFLAGS="-Wl,-syslibroot / -isysroot / -I${PREFIX}/include ${CPPFLAGS}" +fi ./configure --prefix=${PREFIX} make make install diff --git a/recipe/meta.yaml.in b/recipe/meta.yaml.in index c89090a..3aeb840 100644 --- a/recipe/meta.yaml.in +++ b/recipe/meta.yaml.in @@ -30,6 +30,8 @@ requirements: - curl >=7.44.0,<8 - python - libuuid + - libblas + - libcblas test: imports: