Skip to content

Commit

Permalink
Fixes for R/conda/Mac-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
grimbough committed Feb 7, 2024
1 parent 7ab9204 commit f4cab37
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rhdf5lib
Type: Package
Title: hdf5 library as an R package
Version: 1.24.1
Version: 1.24.2
Authors@R: c(
person(
"Mike", "Smith",
Expand Down
69 changes: 61 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3997,6 +3997,45 @@ else $as_nop
:
fi

elif echo $CC_BASENAME | grep -q 'clang\|gcc'; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -w" >&5
printf %s "checking whether C compiler accepts -w... " >&6; }
if test ${ax_cv_check_cflags___w+y}
then :
printf %s "(cached) " >&6
else $as_nop

ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -w"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___w=yes
else $as_nop
ax_cv_check_cflags___w=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___w" >&5
printf "%s\n" "$ax_cv_check_cflags___w" >&6; }
if test "x$ax_cv_check_cflags___w" = xyes
then :
CFLAGS="$CFLAGS -w"; CXXFLAGS="-w $CXXFLAGS"
else $as_nop
:
fi

fi

###########################
Expand Down Expand Up @@ -4135,9 +4174,22 @@ esac

###########################################

HAVE_SZLIB="yes"
HAVE_AEC="yes"
for ac_header in szlib.h
ON_BUILDER=false
echo ON_BUILDER=${ON_BUILDER}

MY_UNIVERSE=${MY_UNIVERSE:-false}
IS_BIOC_BUILD_MACHINE=${IS_BIOC_BUILD_MACHINE:-false}

if test ${MY_UNIVERSE} != false -o ${IS_BIOC_BUILD_MACHINE} == true; then
ON_BUILDER=true
fi
echo ON_BUILDER=${ON_BUILDER}


if test ${ON_BUILDER} == false; then
HAVE_SZLIB="yes"
HAVE_AEC="yes"
for ac_header in szlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default"
if test "x$ac_cv_header_szlib_h" = xyes
Expand All @@ -4149,7 +4201,7 @@ else $as_nop
fi

done
for ac_header in libaec.h
for ac_header in libaec.h
do :
ac_fn_c_check_header_compile "$LINENO" "libaec.h" "ac_cv_header_libaec_h" "$ac_includes_default"
if test "x$ac_cv_header_libaec_h" = xyes
Expand All @@ -4161,8 +4213,8 @@ else $as_nop
fi

done
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5
printf %s "checking for SZ_BufftoBuffCompress in -lsz... " >&6; }
if test ${ac_cv_lib_sz_SZ_BufftoBuffCompress+y}
then :
Expand Down Expand Up @@ -4207,8 +4259,8 @@ else $as_nop
unset HAVE_SZLIB
fi

if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_AEC_H" = "xyes" -a "x$HAVE_AEC" = "xyes"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for aec_buffer_encode in -lsz" >&5
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_AEC_H" = "xyes" -a "x$HAVE_AEC" = "xyes"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for aec_buffer_encode in -lsz" >&5
printf %s "checking for aec_buffer_encode in -lsz... " >&6; }
if test ${ac_cv_lib_sz_aec_buffer_encode+y}
then :
Expand Down Expand Up @@ -4253,6 +4305,7 @@ else $as_nop
unset HAVE_AEC
fi

fi
fi
fi

Expand Down
33 changes: 25 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ echo "COMPILER = $CC_BASENAME"

if test "X$CC_BASENAME" = "Xgcc" -o "X$CC_BASENAME" = "Xclang"; then
AX_CHECK_COMPILE_FLAG([-w], [CFLAGS="$CFLAGS -w"; CXXFLAGS="-w $CXXFLAGS"])
elif echo $CC_BASENAME | grep -q 'clang\|gcc'; then
AX_CHECK_COMPILE_FLAG([-w], [CFLAGS="$CFLAGS -w"; CXXFLAGS="-w $CXXFLAGS"])
fi

###########################
Expand Down Expand Up @@ -122,14 +124,29 @@ AC_SUBST(ZLIB_INCLUDE_PATH)

###########################################

HAVE_SZLIB="yes"
HAVE_AEC="yes"
AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB])
AC_CHECK_HEADERS([libaec.h], [HAVE_AEC_H="yes"], [unset HAVE_AEC])
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_AEC_H" = "xyes" -a "x$HAVE_AEC" = "xyes"; then
AC_CHECK_LIB([sz], [aec_buffer_encode],, [unset HAVE_AEC], [-laec])
ON_BUILDER=false
echo ON_BUILDER=${ON_BUILDER}

dnl we always want to build our own versions on the various build systems
MY_UNIVERSE=${MY_UNIVERSE:-false}
IS_BIOC_BUILD_MACHINE=${IS_BIOC_BUILD_MACHINE:-false}

if test ${MY_UNIVERSE} != false -o ${IS_BIOC_BUILD_MACHINE} == true; then
ON_BUILDER=true
fi
echo ON_BUILDER=${ON_BUILDER}


if test ${ON_BUILDER} == false; then
HAVE_SZLIB="yes"
HAVE_AEC="yes"
AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB])
AC_CHECK_HEADERS([libaec.h], [HAVE_AEC_H="yes"], [unset HAVE_AEC])
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_AEC_H" = "xyes" -a "x$HAVE_AEC" = "xyes"; then
AC_CHECK_LIB([sz], [aec_buffer_encode],, [unset HAVE_AEC], [-laec])
fi
fi
fi

Expand Down
Binary file modified src/hdf5small_cxx_hl_1.10.7.tar.gz
Binary file not shown.

0 comments on commit f4cab37

Please sign in to comment.