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)
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,
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`