Skip to content

Commit bc64e81

Browse files
authored
Merge pull request #1237 from LourensVeen/issue_1225_simplex_depends_on_zlib
Add libz as an explicit dependency for SimpleX and MESA r15140
2 parents 3e98d75 + baa215b commit bc64e81

13 files changed

Lines changed: 288 additions & 11 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c c++ fortran python bison cmake install download patch mpi openmp hdf5 lapack blas perl tar gunzip unzip unxz
1+
c c++ fortran python bison cmake install download patch mpi openmp hdf5 libz lapack blas perl tar gunzip unzip unxz

src/amuse_mesa_r15140/support/aclocal.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1515
m4_include([shared/m4/amuse_download.m4])
1616
m4_include([shared/m4/amuse_lib.m4])
17+
m4_include([shared/m4/amuse_libz.m4])
1718
m4_include([shared/m4/amuse_log_envvars.m4])
1819
m4_include([shared/m4/amuse_venv.m4])
1920
m4_include([shared/m4/ax_blas.m4])

src/amuse_mesa_r15140/support/configure

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,8 @@ ac_includes_default="\
647647
ac_header_c_list=
648648
ac_subst_vars='LTLIBOBJS
649649
LIBOBJS
650+
LIBZ_LIBS
651+
LIBZ_CFLAGS
650652
HDF5_TYPE
651653
HDF5_FLIBS
652654
HDF5_FFLAGS
@@ -9991,6 +9993,72 @@ printf "%s\n" "#define HAVE_HDF5 1" >>confdefs.h
99919993
fi
99929994

99939995

9996+
amuse_libz_save_libs="$LIBS"
9997+
9998+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libz" >&5
9999+
printf %s "checking for libz... " >&6; }
10000+
10001+
ac_ext=c
10002+
ac_cpp='$CPP $CPPFLAGS'
10003+
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10004+
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10005+
ac_compiler_gnu=$ac_cv_c_compiler_gnu
10006+
10007+
10008+
LIBS="-lz"
10009+
10010+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10011+
/* end confdefs.h. */
10012+
10013+
10014+
#include <zlib.h>
10015+
10016+
#ifdef F77_DUMMY_MAIN
10017+
10018+
# ifdef __cplusplus
10019+
extern "C"
10020+
# endif
10021+
int F77_DUMMY_MAIN() { return 1; }
10022+
10023+
#endif
10024+
int
10025+
main (void)
10026+
{
10027+
10028+
z_stream strm;
10029+
deflateInit(&strm, 0);
10030+
10031+
;
10032+
return 0;
10033+
}
10034+
10035+
_ACEOF
10036+
if ac_fn_c_try_link "$LINENO"
10037+
then :
10038+
10039+
FOUND_LIBZ="yes"
10040+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10041+
printf "%s\n" "yes" >&6; }
10042+
10043+
else $as_nop
10044+
10045+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046+
printf "%s\n" "no" >&6; }
10047+
10048+
fi
10049+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
10050+
conftest$ac_exeext conftest.$ac_ext
10051+
10052+
ac_ext=${ac_fc_srcext-f}
10053+
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
10054+
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
10055+
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
10056+
10057+
10058+
10059+
10060+
10061+
999410062
ac_ext=c
999510063
ac_cpp='$CPP $CPPFLAGS'
999610064
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

src/amuse_mesa_r15140/support/configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ AC_SUBST(OPENMP_FCFLAGS)
7070

7171
AX_LAPACK()
7272
AX_LIB_HDF5()
73+
AMUSE_LIBZ()
7374

7475
AC_LANG_POP([Fortran])
7576

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c++ mpi gsl hdf5 qhull healpix-cxx
1+
c++ mpi gsl hdf5 qhull healpix-cxx libz

src/amuse_simplex/support/aclocal.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1515
m4_include([shared/m4/amuse_lib_healpix.m4])
1616
m4_include([shared/m4/amuse_lib_qhull.m4])
17+
m4_include([shared/m4/amuse_libz.m4])
1718
m4_include([shared/m4/amuse_log_envvars.m4])
1819
m4_include([shared/m4/amuse_venv.m4])
1920
m4_include([shared/m4/ax_count_cpus.m4])

src/amuse_simplex/support/configure

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,8 @@ HEALPIX_CXX_LIBS
711711
HEALPIX_CXX_CFLAGS
712712
QHULL_FLAGS
713713
QHULL_LIBS
714+
LIBZ_LIBS
715+
LIBZ_CFLAGS
714716
HDF5_TYPE
715717
HDF5_FLIBS
716718
HDF5_FFLAGS
@@ -5983,6 +5985,65 @@ printf "%s\n" "#define HAVE_HDF5 1" >>confdefs.h
59835985
fi
59845986

59855987

5988+
amuse_libz_save_libs="$LIBS"
5989+
5990+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libz" >&5
5991+
printf %s "checking for libz... " >&6; }
5992+
5993+
ac_ext=c
5994+
ac_cpp='$CPP $CPPFLAGS'
5995+
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5996+
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5997+
ac_compiler_gnu=$ac_cv_c_compiler_gnu
5998+
5999+
6000+
LIBS="-lz"
6001+
6002+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6003+
/* end confdefs.h. */
6004+
6005+
6006+
#include <zlib.h>
6007+
6008+
int
6009+
main (void)
6010+
{
6011+
6012+
z_stream strm;
6013+
deflateInit(&strm, 0);
6014+
6015+
;
6016+
return 0;
6017+
}
6018+
6019+
_ACEOF
6020+
if ac_fn_c_try_link "$LINENO"
6021+
then :
6022+
6023+
FOUND_LIBZ="yes"
6024+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6025+
printf "%s\n" "yes" >&6; }
6026+
6027+
else $as_nop
6028+
6029+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030+
printf "%s\n" "no" >&6; }
6031+
6032+
fi
6033+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
6034+
conftest$ac_exeext conftest.$ac_ext
6035+
6036+
ac_ext=cpp
6037+
ac_cpp='$CXXCPP $CPPFLAGS'
6038+
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6039+
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6040+
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6041+
6042+
6043+
6044+
6045+
6046+
59866047
amuse_lib_qhull_save_libs="$LIBS"
59876048

59886049
LIBS=""

src/amuse_simplex/support/configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ AX_MPI()
2929

3030
AX_PATH_GSL(1.0, [FOUND_GSL=yes])
3131
AX_LIB_HDF5()
32+
AMUSE_LIBZ()
3233
AMUSE_LIB_QHULL()
3334
AMUSE_LIB_HEALPIX_CXX()
3435

support/aclocal.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ m4_include([shared/m4/amuse_download.m4])
1818
m4_include([shared/m4/amuse_lib.m4])
1919
m4_include([shared/m4/amuse_lib_healpix.m4])
2020
m4_include([shared/m4/amuse_lib_qhull.m4])
21+
m4_include([shared/m4/amuse_libz.m4])
2122
m4_include([shared/m4/amuse_log_envvars.m4])
2223
m4_include([shared/m4/amuse_opencl.m4])
2324
m4_include([shared/m4/ax_blas.m4])

support/configure

Lines changed: 97 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ H5FC
741741
H5CC
742742
GREP
743743
SED
744+
LIBZ_LIBS
745+
LIBZ_CFLAGS
744746
FFTW_FLAGS
745747
FOUND_FFTW
746748
FFTW_LIBS
@@ -3117,7 +3119,7 @@ then
31173119
# we assume that the conda metadata is correct, and that if it isn't there's
31183120
# an expert packager who can fix things.
31193121
printf "%s\n" "Conda package build detected, skipping checks for dependencies."
3120-
ASSUME_FEATURES="c c++ fortran java python tar unzip gunzip bunzip2 unxz bison perl gmake cmake install download mpi openmp cuda opencl blas lapack gsl gmp mpfr fftw hdf5 netcdf4 sapporo_light"
3122+
ASSUME_FEATURES="c c++ fortran java python tar unzip gunzip bunzip2 unxz bison perl gmake cmake install download mpi openmp cuda opencl blas lapack gsl gmp mpfr fftw hdf5 libz netcdf4 sapporo_light"
31213123
31223124
else
31233125
if test "x" != "x$CONDA_DEFAULT_ENV"
@@ -4509,6 +4511,27 @@ else $as_nop
45094511
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45104512
printf "%s\n" "no" >&6; }
45114513
4514+
fi
4515+
4516+
4517+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for conda package zlib" >&5
4518+
printf %s "checking for conda package zlib... " >&6; }
4519+
ax_conda_package_line="$(echo $amuse_conda_list | tr '^' '\n' | grep '^zlib ')"
4520+
if test "$?" = "0"
4521+
then :
4522+
4523+
# FOUND_LIBZ="$(AS_ECHO("$ax_conda_package_line") | tr -s ' ' | cut -f 2 -d ' ')"
4524+
4525+
FOUND_LIBZ="yes"
4526+
4527+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4528+
printf "%s\n" "yes" >&6; }
4529+
4530+
else $as_nop
4531+
4532+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533+
printf "%s\n" "no" >&6; }
4534+
45124535
fi
45134536
45144537
@@ -13551,6 +13574,73 @@ fi
1355113574
1355213575
1355313576
13577+
13578+
amuse_libz_save_libs="$LIBS"
13579+
13580+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libz" >&5
13581+
printf %s "checking for libz... " >&6; }
13582+
13583+
ac_ext=c
13584+
ac_cpp='$CPP $CPPFLAGS'
13585+
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13586+
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13587+
ac_compiler_gnu=$ac_cv_c_compiler_gnu
13588+
13589+
13590+
LIBS="-lz"
13591+
13592+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13593+
/* end confdefs.h. */
13594+
13595+
13596+
#include <zlib.h>
13597+
13598+
#ifdef F77_DUMMY_MAIN
13599+
13600+
# ifdef __cplusplus
13601+
extern "C"
13602+
# endif
13603+
int F77_DUMMY_MAIN() { return 1; }
13604+
13605+
#endif
13606+
int
13607+
main (void)
13608+
{
13609+
13610+
z_stream strm;
13611+
deflateInit(&strm, 0);
13612+
13613+
;
13614+
return 0;
13615+
}
13616+
13617+
_ACEOF
13618+
if ac_fn_c_try_link "$LINENO"
13619+
then :
13620+
13621+
FOUND_LIBZ="yes"
13622+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13623+
printf "%s\n" "yes" >&6; }
13624+
13625+
else $as_nop
13626+
13627+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13628+
printf "%s\n" "no" >&6; }
13629+
13630+
fi
13631+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
13632+
conftest$ac_exeext conftest.$ac_ext
13633+
13634+
ac_ext=c
13635+
ac_cpp='$CPP $CPPFLAGS'
13636+
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13637+
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13638+
ac_compiler_gnu=$ac_cv_c_compiler_gnu
13639+
13640+
13641+
13642+
13643+
1355413644
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
1355513645
printf %s "checking for a sed that does not truncate output... " >&6; }
1355613646
if test ${ac_cv_path_SED+y}
@@ -15494,7 +15584,7 @@ if test "x" != "x${HAVE_LAPACK}"
1549415584
then :
1549515585
FEATURES="${FEATURES} lapack"
1549615586
fi
15497-
if test "x" != "x${FOUND_GSL}"
15587+
if test "x${FOUND_GSL}" = "xyes"
1549815588
then :
1549915589
FEATURES="${FEATURES} gsl"
1550015590
fi
@@ -15510,7 +15600,11 @@ if test "x${FOUND_FFTW}" = "xyes"
1551015600
then :
1551115601
FEATURES="${FEATURES} fftw"
1551215602
fi
15513-
if test "x" != "x${with_hdf5}"
15603+
if test "x${FOUND_LIBZ}" = "xyes"
15604+
then :
15605+
FEATURES="${FEATURES} libz"
15606+
fi
15607+
if test "x${with_hdf5}" = "xyes"
1551415608
then :
1551515609
FEATURES="${FEATURES} hdf5"
1551615610
fi

0 commit comments

Comments
 (0)