dnl CDPATH=
AC_INIT(src/ctsim.cpp)
-AM_INIT_AUTOMAKE(ctsim,3.1.0)
+AM_INIT_AUTOMAKE(ctsim,3.5.0)
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_CHECK_LIB(curses, main, [curses=true], [curses=false])
AC_CHECK_LIB(ncurses, main, [ncurses=true], [ncurses=false])
AC_CHECK_LIB(g2, main, [g2=true], [g2=false])
-AC_CHECK_LIB(readline, main, [readline=true; AC_DEFINE(HAVE_READLINE)], [readline=false])
+AC_CHECK_LIB(readline, main, [readline=true; AC_DEFINE(HAVE_READLINE)], [readline=false], [-lcurses])
AC_CHECK_LIB(ncurses, main, [ncurses=true; AC_DEFINE(HAVE_NCURSES)], [ncurses=false])
AC_CHECK_LIB(curses, main, [curses=true; AC_DEFINE(HAVE_CURSES)], [curses=false])
wxwin=false
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`
CXXFLAGS="$CFLAGS"
-AC_OUTPUT(Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile doc/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile)
+AC_OUTPUT(Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile doc/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile helical/Makefile helical/sample-helical.sh)