X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.in;h=7463752b23c556e94a51b3396b438423cfebbe31;hp=c8e272bd85e29c7f102f6fa5e29545fe75203b08;hb=bf055865d682c7ff942b36315985711a2c5e5793;hpb=ccef53961d87b0d95da3b753e32e117a7fa4e3ea diff --git a/configure.in b/configure.in index c8e272b..7463752 100644 --- a/configure.in +++ b/configure.in @@ -79,6 +79,11 @@ else AC_CHECK_FUNC(getopt_long, [ getopt_long=true ], [ getopt_long=false ]) fi +if test "${pthread}" = "true" ; then + AC_ADD_GCC_CFLAGS([-pthread -D_REENTRANT]) + AC_DEFINE(HAVE_WXTHREADS) +fi + if test "${getopt_long}" = "false" ; then my_includes="$my_includes -I../getopt" AC_DEFINE(HAVE_GETOPT_LONG) @@ -132,11 +137,6 @@ fi AC_MSG_RESULT(no) -if test "${pthread}" = "true" ; then - AC_ADD_GCC_CFLAGS([-pthread -D_REENTRANT]) - AC_DEFINE(HAVE_WXTHREADS) -fi - AC_ADD_GCC_CFLAGS([-Wall]) AC_MSG_CHECKING(whether to enable verbose warnings) AC_ARG_ENABLE(verbose-warnings, @@ -402,6 +402,29 @@ if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then AC_MSG_RESULT(Using dmalloc) fi +dnl Check for efence +AC_CHECK_LIB(efence, main, [efence=true], [efence=false]) +AC_MSG_CHECKING([for enable-efence]) +AC_ARG_ENABLE(efence, +[ --enable-efence Use ElectricFence memory allocation], +[case "${enableval}" in + yes) useefence=true + AC_MSG_RESULT(yes) + ;; + no) useefence=false + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT([bad value ${enableval} for --enable-efence]) + ;; +esac], +[useefence=false; AC_MSG_RESULT(no)]) + +if test "$efence" = "true" -a "$useefence" = "true" ; then + ctlibs_tools="$ctlibs_tools -lefence" + AC_DEFINE(HAVE_EFENCE) + AC_MSG_RESULT(Using efence) +fi + if test "$wxwin" = "true" ; then if test "$wx_gtk" = "true" ; then wxcflags=`$wxconfig --cflags`