r1018: *** empty log message ***
[ctsim.git] / configure.in
index c8e272bd85e29c7f102f6fa5e29545fe75203b08..bb61c8619c958f19728205427b83f9328a6c7384 100644 (file)
@@ -39,7 +39,7 @@ AC_CHECK_LIB(m, sin)
 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
@@ -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`
@@ -431,4 +454,4 @@ fi
 
 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)