X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=configure.in;h=e2c9244c1aea20bbdade8c092f6b11934b663ac1;hb=c4af77faf7f216b936f0782e918634d34980c63f;hp=0363f91509b741c1328783638ea78b17f04ff281;hpb=286d655a25df2668bd65ad365676c6ecc94415a1;p=ctsim.git diff --git a/configure.in b/configure.in index 0363f91..e2c9244 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= AC_INIT(src/ctsim.cpp) -AM_INIT_AUTOMAKE(ctsim,2.0.0-b6) +AM_INIT_AUTOMAKE(ctsim,2.0.0-b7) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -80,7 +80,7 @@ AC_CHECK_LIB(g2, main, [g2=true], [g2=false]) wxwin=false AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)]) AC_CHECK_LIB(wx_msw, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)]) -AC_CHECK_LIB(dmallocxx, main, [dmalloc=true], [dmalloc=false]) +AC_CHECK_LIB(hdf5, main, [hdf5=true], [hdf5=false], -lz) AC_CHECK_LIB(fftw, main, [fftw=true; AC_DEFINE(HAVE_FFTW)], [fftw=false]) if test "$zlib" = "true" ; then @@ -317,6 +317,29 @@ if test "$fftw" = "true" ; then ctlibs_tools="$ctlibs_tools -lrfftw -lfftw" fi +dnl Check for dmalloc +AC_CHECK_LIB(dmallocxx, main, [dmallocxx=true], [dmallocxx=false]) +AC_MSG_CHECKING([for enable-dmalloc]) +AC_ARG_ENABLE(dmalloc, +[ --enable-dmalloc Use dmalloc memory allocation], +[case "${enableval}" in + yes) usedmalloc=true + AC_MSG_RESULT(yes) + ;; + no) usedmalloc=false + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT([bad value ${enableval} for --enable-dmalloc]) + ;; +esac], +[usedmalloc=false; AC_MSG_RESULT(no)]) + +if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then + ctlibs_tools="$ctlibs_tools -ldmallocxx" + AC_DEFINE(HAVE_DMALLOC) + AC_MSG_RESULT(Using dmalloc) +fi + dnl Setting projet libraries and includes LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"